Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions apps/discovery/assets/svg/.gitignore

This file was deleted.

90 changes: 90 additions & 0 deletions apps/discovery/assets/svg/data-flow.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
const { WEBSITE_ROOT, WEBSITE_BASE } = require('@doc/constants');
const version = require('react-native-render-html/package.json').version;
const { existsSync } = require('fs');
import type { Config } from '@docusaurus/types';
import type * as Preset from '@docusaurus/preset-classic';
import { WEBSITE_ROOT, WEBSITE_BASE } from '@doc/constants';
import { version } from 'react-native-render-html/package.json';
import { existsSync } from 'node:fs';

const apisidebarPath = './apisidebar.json';
let hasAPIsidebar = existsSync(apisidebarPath);
Expand Down Expand Up @@ -45,8 +47,7 @@ const plugins = [
]
].filter((c) => c !== null);

/** @type {import('@docusaurus/types').DocusaurusConfig} */
module.exports = {
const config: Config = {
title: 'React Native Render HTML',
tagline:
'The hackable, full-featured Open Source HTML rendering solution for React Native.',
Expand Down Expand Up @@ -243,7 +244,7 @@ module.exports = {
],
copyright: `Copyright © ${new Date().getFullYear()} Meliorence, Inc and Jules Sam. Randolph.`
}
},
} satisfies Preset.ThemeConfig,
presets: [
[
'@docusaurus/preset-classic',
Expand All @@ -269,7 +270,9 @@ module.exports = {
trackingID: 'G-CYR1XDV25N',
anonymizeIP: true
}
}
} satisfies Preset.Options
]
]
};

export default config;
9 changes: 7 additions & 2 deletions apps/website/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,17 @@
"serve": "docusaurus serve",
"write-translations": "docusaurus write-translations",
"write-heading-ids": "docusaurus write-heading-ids",
"api-gendoc": "docusaurus api:gen"
"api-gendoc": "docusaurus api:gen",
"test": "yarn test:ts && yarn test:lint",
"test:ts": "tsc --noEmit",
"test:lint": "eslint --ext ts,tsx src/"
},
"dependencies": {
"@doc/constants": "workspace:*",
"@doc/svg-component": "workspace:*",
"@docusaurus/core": "^3.9.2",
"@docusaurus/preset-classic": "^3.9.2",
"@docusaurus/theme-common": "^3.9.2",
"@mdx-js/react": "^3.1.1",
"clsx": "^2.1.1",
"copy-text-to-clipboard": "^3.2.2",
Expand All @@ -35,7 +39,8 @@
"@doc/pages": "workspace:*",
"@doc/svgr-conf": "workspace:*",
"@docusaurus/module-type-aliases": "^3.9.2",
"@tsconfig/docusaurus": "^2.0.4",
"@docusaurus/tsconfig": "^3.9.2",
"@docusaurus/types": "^3.9.2",
"@types/react": "~19.1.0",
"@types/react-helmet": "^6.1.11",
"@types/react-modal": "^3.16.3",
Expand Down
5 changes: 2 additions & 3 deletions apps/website/src/components/DiscoveryFrame.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-disable no-undef */
import React, { useRef, useCallback } from 'react';
//@ts-ignore
import discoveryVideoUrl from '@site/static/video/discovery.webm';
Expand All @@ -7,7 +6,7 @@ import clsx from 'clsx';
import IPhoneFrame from './IPhoneFrame';

export default function DiscoveryFrame({ scale }: { scale?: number }) {
const videoRef = useRef<HTMLVideoElement>();
const videoRef = useRef<HTMLVideoElement>(null);
const playPause = useCallback(() => {
if (videoRef.current?.paused) {
videoRef.current?.play();
Expand All @@ -16,7 +15,7 @@ export default function DiscoveryFrame({ scale }: { scale?: number }) {
}
}, []);
return (
<div className={classes['container']}>
<div className={classes.container}>
<IPhoneFrame scale={scale}>
<video
ref={videoRef}
Expand Down
4 changes: 2 additions & 2 deletions apps/website/src/components/ExpoSnippet.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import React, {
useMemo,
useRef
} from 'react';
import useThemeContext from '@theme/hooks/useThemeContext';
import { useColorMode } from '@docusaurus/theme-common';
import styles from './ExpoSnippet.module.scss';

function makeIframeSrcParamsQuery({
Expand Down Expand Up @@ -145,7 +145,7 @@ export default function ExpoSnippet({
className?: string;
extraneousDeps: string[];
}>) {
const { isDarkTheme } = useThemeContext();
const isDarkTheme = useColorMode().colorMode === 'dark';
const style: React.CSSProperties = {
backgroundColor: isDarkTheme ? '#212121' : '#f9f9f9'
};
Expand Down
2 changes: 1 addition & 1 deletion apps/website/src/components/RenderHTMLCard.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
margin: var(--modal-inset);
padding: 0;
z-index: 1000;
width: calc(100vw - var(--modal-inset) * 2) - var(--scrollbar-width);
width: calc(100vw - var(--modal-inset) * 2 - var(--scrollbar-width));
height: calc(100vh - var(--modal-inset) * 2);
}

Expand Down
1 change: 0 additions & 1 deletion apps/website/src/svg/.gitignore

This file was deleted.

90 changes: 90 additions & 0 deletions apps/website/src/svg/data-flow.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions apps/website/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"extends": "@tsconfig/docusaurus/tsconfig.json",
"include": ["src/"]
"extends": "@docusaurus/tsconfig",
"include": ["src/", "docusaurus.config.ts"]
}
Loading