From 6c37e6f5dd81f161ec2d5ec7eb7db0cbdef0f40b Mon Sep 17 00:00:00 2001 From: Romuald Brillout Date: Thu, 26 Dec 2024 20:07:20 +0100 Subject: [PATCH] minor refactor: rename JSX.Element => React.JSX.Element --- docs/components/Figure.tsx | 6 +- docs/components/static-host.tsx | 4 +- docs/package.json | 2 +- docs/pages/index/components/Icon.tsx | 2 +- .../components/ParagraphTextCollection.tsx | 4 +- .../components/SectionTextCollection.tsx | 4 +- .../components/Slotmachine/Slotmachine.tsx | 2 +- docs/pages/index/global.d.ts | 2 +- docs/pages/pageContext/+Page.mdx | 2 +- docs/pages/pricing/value-components.tsx | 2 +- pnpm-lock.yaml | 60 ++++++++++++++++--- 11 files changed, 69 insertions(+), 21 deletions(-) diff --git a/docs/components/Figure.tsx b/docs/components/Figure.tsx index fa4f8ce5354..c1d1ede8285 100644 --- a/docs/components/Figure.tsx +++ b/docs/components/Figure.tsx @@ -2,7 +2,11 @@ export { Figure } import React from 'react' -function Figure({ width, text, children }: { width: number; text: string | JSX.Element; children: React.ReactNode }) { +function Figure({ + width, + text, + children +}: { width: number; text: string | React.JSX.Element; children: React.ReactNode }) { return ( <>

@@ -46,7 +46,7 @@ function StaticHostDocStrategies({ name = 'the static host' }: { name?: string } ) } -function StaticHostDocOutro({ baseUrlAddendum }: { baseUrlAddendum?: JSX.Element }) { +function StaticHostDocOutro({ baseUrlAddendum }: { baseUrlAddendum?: React.JSX.Element }) { return ( <>

diff --git a/docs/package.json b/docs/package.json index 7a0c6a76020..da80356fe17 100644 --- a/docs/package.json +++ b/docs/package.json @@ -6,7 +6,7 @@ "typecheck": "tsc --noEmit --watch" }, "dependencies": { - "@brillout/docpress": "^0.10.11", + "@brillout/docpress": "^0.10.12", "@types/node": "^22.10.2", "@types/react": "^19.0.2", "@types/react-dom": "^19.0.2", diff --git a/docs/pages/index/components/Icon.tsx b/docs/pages/index/components/Icon.tsx index 93f93b9256f..5302e11d812 100644 --- a/docs/pages/index/components/Icon.tsx +++ b/docs/pages/index/components/Icon.tsx @@ -5,7 +5,7 @@ import React from 'react' const iconSizeDefault = 28 -function Icon({ icon, size, color }: { icon: JSX.Element; size: number; color: string }) { +function Icon({ icon, size, color }: { icon: React.JSX.Element; size: number; color: string }) { const margin = (iconSizeDefault - size) / 2 return (

{ return (
diff --git a/docs/pages/index/components/SectionTextCollection.tsx b/docs/pages/index/components/SectionTextCollection.tsx index 821d2274033..e3efb55da1d 100644 --- a/docs/pages/index/components/SectionTextCollection.tsx +++ b/docs/pages/index/components/SectionTextCollection.tsx @@ -8,8 +8,8 @@ export const SectionTextCollection = ({ style }: { caption: string - title: string | JSX.Element - descriptions?: (string | JSX.Element)[] + title: string | React.JSX.Element + descriptions?: (string | React.JSX.Element)[] style?: React.CSSProperties }) => { return ( diff --git a/docs/pages/index/components/Slotmachine/Slotmachine.tsx b/docs/pages/index/components/Slotmachine/Slotmachine.tsx index 938ef02fee6..fbaa97cada9 100644 --- a/docs/pages/index/components/Slotmachine/Slotmachine.tsx +++ b/docs/pages/index/components/Slotmachine/Slotmachine.tsx @@ -27,7 +27,7 @@ type slotMachineRegistryType = { name: string group: slotMachineGroupType bgColor: string - logo: JSX.Element + logo: React.JSX.Element } export const Slotmachine = () => { diff --git a/docs/pages/index/global.d.ts b/docs/pages/index/global.d.ts index 20860ff1928..e29acf47a21 100644 --- a/docs/pages/index/global.d.ts +++ b/docs/pages/index/global.d.ts @@ -1,6 +1,6 @@ /// declare module '*.svg?react' { - const value: () => JSX.Element + const value: () => React.JSX.Element export default value } diff --git a/docs/pages/pageContext/+Page.mdx b/docs/pages/pageContext/+Page.mdx index 3c6cc344d41..46736c3d12d 100644 --- a/docs/pages/pageContext/+Page.mdx +++ b/docs/pages/pageContext/+Page.mdx @@ -214,7 +214,7 @@ declare global { isAdmin: boolean } // Refine type of pageContext.Page (it's `unknown` by default) - Page: () => JSX.Element + Page: () => React.JSX.Element } } } diff --git a/docs/pages/pricing/value-components.tsx b/docs/pages/pricing/value-components.tsx index f5901f7600c..1b650056a3c 100644 --- a/docs/pages/pricing/value-components.tsx +++ b/docs/pages/pricing/value-components.tsx @@ -65,7 +65,7 @@ function compute_color(value: number) { return COLOR_ORANGE } -function TableRef({ name, children }: { name: string; children: JSX.Element[] }) { +function TableRef({ name, children }: { name: string; children: React.JSX.Element[] }) { return ( <> {name}: {children} diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 1762cadb9ed..22d3e751476 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -231,8 +231,8 @@ importers: docs: dependencies: '@brillout/docpress': - specifier: ^0.10.11 - version: 0.10.11(@algolia/client-search@4.24.0)(@types/node@22.10.2)(@types/react-dom@19.0.2(@types/react@19.0.2))(@types/react@19.0.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0)(rollup@4.27.3)(search-insights@2.17.3)(typescript@5.7.2)(vike@vike)(vite@6.0.6(@types/node@22.10.2)(terser@5.31.0)(tsx@4.19.2)) + specifier: ^0.10.12 + version: 0.10.12(@algolia/client-search@4.24.0)(@types/node@22.10.2)(@types/react-dom@19.0.2(@types/react@19.0.2))(@types/react@19.0.2)(acorn@8.12.1)(react-dom@19.0.0(react@19.0.0))(react@19.0.0)(rollup@4.27.3)(search-insights@2.17.3)(typescript@5.7.2)(vike@vike)(vite@6.0.6(@types/node@22.10.2)(terser@5.31.0)(tsx@4.19.2)) '@types/node': specifier: ^22.10.2 version: 22.10.2 @@ -2134,8 +2134,8 @@ packages: cpu: [x64] os: [win32] - '@brillout/docpress@0.10.11': - resolution: {integrity: sha512-itJxxH105TKrM0SJYbuaCMrCzz2blfLpgjCcBM4e5cHVnM0Ueto5+IpJOhKB5gB7r4zbwnOkM63KkbYiRCa/0g==} + '@brillout/docpress@0.10.12': + resolution: {integrity: sha512-NhUFsQR3tr5xH+DDrtxbvMmys+Gs9aBIk4/nKMNTxG5yR9Pp8Y7vGgDB2h3kLvXDAE/2bVvXLvP/ubvUf7XLjw==} peerDependencies: '@types/node': '*' '@types/react': '*' @@ -7938,14 +7938,14 @@ snapshots: '@biomejs/cli-win32-x64@1.9.4': optional: true - '@brillout/docpress@0.10.11(@algolia/client-search@4.24.0)(@types/node@22.10.2)(@types/react-dom@19.0.2(@types/react@19.0.2))(@types/react@19.0.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0)(rollup@4.27.3)(search-insights@2.17.3)(typescript@5.7.2)(vike@vike)(vite@6.0.6(@types/node@22.10.2)(terser@5.31.0)(tsx@4.19.2))': + '@brillout/docpress@0.10.12(@algolia/client-search@4.24.0)(@types/node@22.10.2)(@types/react-dom@19.0.2(@types/react@19.0.2))(@types/react@19.0.2)(acorn@8.12.1)(react-dom@19.0.0(react@19.0.0))(react@19.0.0)(rollup@4.27.3)(search-insights@2.17.3)(typescript@5.7.2)(vike@vike)(vite@6.0.6(@types/node@22.10.2)(terser@5.31.0)(tsx@4.19.2))': dependencies: '@brillout/picocolors': 1.0.15 '@docsearch/css': 3.8.0 '@docsearch/react': 3.6.1(@algolia/client-search@4.24.0)(@types/react@19.0.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0)(search-insights@2.17.3) '@mdx-js/mdx': 3.0.1 '@mdx-js/react': 3.0.1(@types/react@19.0.2)(react@19.0.0) - '@mdx-js/rollup': 3.0.1(rollup@4.27.3) + '@mdx-js/rollup': 3.0.1(acorn@8.12.1)(rollup@4.27.3) '@shikijs/transformers': 1.2.0 '@types/node': 22.10.2 '@types/react': 19.0.2 @@ -8665,6 +8665,36 @@ snapshots: - acorn - supports-color + '@mdx-js/mdx@3.1.0(acorn@8.12.1)': + dependencies: + '@types/estree': 1.0.6 + '@types/estree-jsx': 1.0.5 + '@types/hast': 3.0.4 + '@types/mdx': 2.0.13 + collapse-white-space: 2.1.0 + devlop: 1.1.0 + estree-util-is-identifier-name: 3.0.0 + estree-util-scope: 1.0.0 + estree-walker: 3.0.3 + hast-util-to-jsx-runtime: 2.3.0 + markdown-extensions: 2.0.0 + recma-build-jsx: 1.0.0 + recma-jsx: 1.0.0(acorn@8.12.1) + recma-stringify: 1.0.0 + rehype-recma: 1.0.0 + remark-mdx: 3.0.1 + remark-parse: 11.0.0 + remark-rehype: 11.1.0 + source-map: 0.7.4 + unified: 11.0.4 + unist-util-position-from-estree: 2.0.0 + unist-util-stringify-position: 4.0.0 + unist-util-visit: 5.0.0 + vfile: 6.0.1 + transitivePeerDependencies: + - acorn + - supports-color + '@mdx-js/react@3.0.1(@types/react@19.0.2)(react@19.0.0)': dependencies: '@types/mdx': 2.0.13 @@ -8677,9 +8707,9 @@ snapshots: '@types/react': 19.0.1 react: 19.0.0 - '@mdx-js/rollup@3.0.1(rollup@4.27.3)': + '@mdx-js/rollup@3.0.1(acorn@8.12.1)(rollup@4.27.3)': dependencies: - '@mdx-js/mdx': 3.1.0(acorn@8.11.3) + '@mdx-js/mdx': 3.1.0(acorn@8.12.1) '@rollup/pluginutils': 5.1.4(rollup@4.27.3) rollup: 4.27.3 source-map: 0.7.4 @@ -9942,6 +9972,10 @@ snapshots: dependencies: acorn: 8.11.3 + acorn-jsx@5.3.2(acorn@8.12.1): + dependencies: + acorn: 8.12.1 + acorn-walk@8.3.2: {} acorn@8.11.3: {} @@ -12609,6 +12643,16 @@ snapshots: transitivePeerDependencies: - acorn + recma-jsx@1.0.0(acorn@8.12.1): + dependencies: + acorn-jsx: 5.3.2(acorn@8.12.1) + estree-util-to-js: 2.0.0 + recma-parse: 1.0.0 + recma-stringify: 1.0.0 + unified: 11.0.4 + transitivePeerDependencies: + - acorn + recma-parse@1.0.0: dependencies: '@types/estree': 1.0.6