polen 0.10.0-next.14 → 0.10.0-next.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -2
- package/build/api/builder/builder.js +1 -1
- package/build/api/builder/builder.js.map +1 -1
- package/build/api/config/load.js +6 -6
- package/build/api/config/load.js.map +1 -1
- package/build/api/config-resolver/resolve.js +2 -2
- package/build/api/config-resolver/resolve.js.map +1 -1
- package/build/api/schema/data-sources/schema-directory/schema-directory.js +1 -1
- package/build/api/schema/data-sources/schema-directory/schema-directory.js.map +1 -1
- package/build/api/vite/plugins/branding/index.js +4 -4
- package/build/api/vite/plugins/branding/index.js.map +1 -1
- package/build/api/vite/plugins/build.d.ts.map +1 -1
- package/build/api/vite/plugins/build.js +4 -12
- package/build/api/vite/plugins/build.js.map +1 -1
- package/build/api/vite/plugins/core.d.ts +2 -2
- package/build/api/vite/plugins/core.d.ts.map +1 -1
- package/build/api/vite/plugins/core.js +13 -13
- package/build/api/vite/plugins/core.js.map +1 -1
- package/build/api/vite/plugins/pages.d.ts +14 -8
- package/build/api/vite/plugins/pages.d.ts.map +1 -1
- package/build/api/vite/plugins/pages.js +185 -111
- package/build/api/vite/plugins/pages.js.map +1 -1
- package/build/api/vite/plugins/serve.d.ts.map +1 -1
- package/build/api/vite/plugins/serve.js +12 -52
- package/build/api/vite/plugins/serve.js.map +1 -1
- package/build/cli/_/self-contained-mode.js +5 -5
- package/build/cli/_/self-contained-mode.js.map +1 -1
- package/build/lib/demos/config-schema.d.ts +20 -20
- package/build/lib/file-router/diagnostic-reporter.js +2 -2
- package/build/lib/file-router/diagnostic-reporter.js.map +1 -1
- package/build/lib/file-router/file-router.d.ts +2 -0
- package/build/lib/file-router/file-router.d.ts.map +1 -1
- package/build/lib/file-router/file-router.js +2 -0
- package/build/lib/file-router/file-router.js.map +1 -1
- package/build/lib/file-router/route.d.ts +0 -2
- package/build/lib/file-router/route.d.ts.map +1 -1
- package/build/lib/file-router/route.js.map +1 -1
- package/build/lib/file-router/scan-tree.d.ts +20 -0
- package/build/lib/file-router/scan-tree.d.ts.map +1 -0
- package/build/lib/file-router/scan-tree.js +158 -0
- package/build/lib/file-router/scan-tree.js.map +1 -0
- package/build/lib/file-router/scan.d.ts.map +1 -1
- package/build/lib/file-router/scan.js +13 -22
- package/build/lib/file-router/scan.js.map +1 -1
- package/build/lib/file-router/sidebar/index.d.ts +3 -0
- package/build/lib/file-router/sidebar/index.d.ts.map +1 -0
- package/build/lib/file-router/sidebar/index.js +4 -0
- package/build/lib/file-router/sidebar/index.js.map +1 -0
- package/build/lib/file-router/sidebar/sidebar-tree.d.ts +9 -0
- package/build/lib/file-router/sidebar/sidebar-tree.d.ts.map +1 -0
- package/build/lib/file-router/sidebar/sidebar-tree.js +85 -0
- package/build/lib/file-router/sidebar/sidebar-tree.js.map +1 -0
- package/build/lib/file-router/sidebar/types.d.ts +17 -0
- package/build/lib/file-router/sidebar/types.d.ts.map +1 -0
- package/build/lib/file-router/sidebar/types.js.map +1 -0
- package/build/lib/github-actions/runner.js +2 -2
- package/build/lib/github-actions/runner.js.map +1 -1
- package/build/lib/github-actions/schemas/context.d.ts +2 -2
- package/build/lib/kit-temp.d.ts +0 -103
- package/build/lib/kit-temp.d.ts.map +1 -1
- package/build/lib/kit-temp.js +3 -239
- package/build/lib/kit-temp.js.map +1 -1
- package/build/lib/tree/index.d.ts +3 -0
- package/build/lib/tree/index.d.ts.map +1 -0
- package/build/lib/tree/index.js +2 -0
- package/build/lib/tree/index.js.map +1 -0
- package/build/lib/tree/tree.d.ts +62 -0
- package/build/lib/tree/tree.d.ts.map +1 -0
- package/build/lib/tree/tree.js +134 -0
- package/build/lib/tree/tree.js.map +1 -0
- package/build/lib/vite-plugin-reactive-data/vite-plugin-reactive-data.d.ts +8 -1
- package/build/lib/vite-plugin-reactive-data/vite-plugin-reactive-data.d.ts.map +1 -1
- package/build/lib/vite-plugin-reactive-data/vite-plugin-reactive-data.js +53 -48
- package/build/lib/vite-plugin-reactive-data/vite-plugin-reactive-data.js.map +1 -1
- package/build/package-paths.js +3 -3
- package/build/package-paths.js.map +1 -1
- package/build/sandbox.js +2 -17
- package/build/sandbox.js.map +1 -1
- package/build/singletons/debug.d.ts +1 -1
- package/build/singletons/debug.d.ts.map +1 -1
- package/build/singletons/debug.js +1 -1
- package/build/singletons/debug.js.map +1 -1
- package/build/template/components/ArgumentAnnotation.jsx +16 -0
- package/build/template/components/ArgumentAnnotation.jsx.map +1 -0
- package/build/template/components/ArgumentList.jsx +16 -0
- package/build/template/components/ArgumentList.jsx.map +1 -0
- package/build/template/components/ArgumentListAnnotation.jsx +23 -0
- package/build/template/components/ArgumentListAnnotation.jsx.map +1 -0
- package/build/template/components/Changelog.jsx +68 -0
- package/build/template/components/Changelog.jsx.map +1 -0
- package/build/template/components/{CodeBlock.js → CodeBlock.jsx} +5 -4
- package/build/template/components/{CodeBlock.js.map → CodeBlock.jsx.map} +1 -1
- package/build/template/components/DeprecationReason.jsx +10 -0
- package/build/template/components/DeprecationReason.jsx.map +1 -0
- package/build/template/components/Description.jsx +10 -0
- package/build/template/components/Description.jsx.map +1 -0
- package/build/template/components/Field.jsx +22 -0
- package/build/template/components/Field.jsx.map +1 -0
- package/build/template/components/{FieldList.js → FieldList.jsx} +5 -4
- package/build/template/components/FieldList.jsx.map +1 -0
- package/build/template/components/{FieldListSection.js → FieldListSection.jsx} +6 -4
- package/build/template/components/FieldListSection.jsx.map +1 -0
- package/build/template/components/Link.d.ts +2 -2
- package/build/template/components/Link.d.ts.map +1 -1
- package/build/template/components/{Link.js → Link.jsx} +9 -17
- package/build/template/components/Link.jsx.map +1 -0
- package/build/template/components/Logo.jsx +29 -0
- package/build/template/components/Logo.jsx.map +1 -0
- package/build/template/components/{Markdown.js → Markdown.jsx} +2 -3
- package/build/template/components/Markdown.jsx.map +1 -0
- package/build/template/components/MissingSchema.d.ts +1 -1
- package/build/template/components/MissingSchema.d.ts.map +1 -1
- package/build/template/components/MissingSchema.jsx +4 -0
- package/build/template/components/MissingSchema.jsx.map +1 -0
- package/build/template/components/NamedType.jsx +17 -0
- package/build/template/components/NamedType.jsx.map +1 -0
- package/build/template/components/{RadixLink.js → RadixLink.jsx} +1 -1
- package/build/template/components/RadixLink.jsx.map +1 -0
- package/build/template/components/Texts/{MinorHeading.js → MinorHeading.jsx} +3 -4
- package/build/template/components/Texts/MinorHeading.jsx.map +1 -0
- package/build/template/components/Texts/texts.js +1 -1
- package/build/template/components/Texts/texts.js.map +1 -1
- package/build/template/components/{TypeAnnotation.js → TypeAnnotation.jsx} +18 -8
- package/build/template/components/TypeAnnotation.jsx.map +1 -0
- package/build/template/components/TypeFieldsLinkList.jsx +17 -0
- package/build/template/components/TypeFieldsLinkList.jsx.map +1 -0
- package/build/template/components/TypeIndex.jsx +27 -0
- package/build/template/components/TypeIndex.jsx.map +1 -0
- package/build/template/components/graphql/graphql.d.ts +2 -2
- package/build/template/components/graphql/graphql.jsx +3 -0
- package/build/template/components/graphql/graphql.jsx.map +1 -0
- package/build/template/components/graphql/index.d.ts +1 -1
- package/build/template/components/graphql/index.js +1 -1
- package/build/template/components/graphql/index.js.map +1 -1
- package/build/template/components/graphql/{type-kind-icon.js → type-kind-icon.jsx} +2 -3
- package/build/template/components/graphql/type-kind-icon.jsx.map +1 -0
- package/build/template/components/graphql/type-link.jsx +16 -0
- package/build/template/components/graphql/type-link.jsx.map +1 -0
- package/build/template/components/sidebar/Sidebar.d.ts +3 -3
- package/build/template/components/sidebar/Sidebar.d.ts.map +1 -1
- package/build/template/components/sidebar/Sidebar.jsx +15 -0
- package/build/template/components/sidebar/Sidebar.jsx.map +1 -0
- package/build/template/components/sidebar/SidebarItem.d.ts +3 -3
- package/build/template/components/sidebar/SidebarItem.d.ts.map +1 -1
- package/build/template/components/sidebar/{SidebarItem.js → SidebarItem.jsx} +35 -18
- package/build/template/components/sidebar/SidebarItem.jsx.map +1 -0
- package/build/template/components/sidebar/ToggleButton.d.ts +1 -1
- package/build/template/components/sidebar/ToggleButton.d.ts.map +1 -1
- package/build/template/components/sidebar/ToggleButton.jsx +6 -0
- package/build/template/components/sidebar/ToggleButton.jsx.map +1 -0
- package/build/template/entry.client.d.ts +0 -1
- package/build/template/entry.client.d.ts.map +1 -1
- package/build/template/{entry.client.js → entry.client.jsx} +9 -5
- package/build/template/entry.client.jsx.map +1 -0
- package/build/template/routes/changelog.d.ts +1 -1
- package/build/template/routes/{changelog.js → changelog.jsx} +4 -5
- package/build/template/routes/changelog.jsx.map +1 -0
- package/build/template/routes/{index.js → index.jsx} +2 -3
- package/build/template/routes/index.jsx.map +1 -0
- package/build/template/routes/reference.$type.$field.d.ts +1 -1
- package/build/template/routes/{reference.$type.$field.js → reference.$type.$field.jsx} +5 -6
- package/build/template/routes/reference.$type.$field.jsx.map +1 -0
- package/build/template/routes/reference.$type.d.ts +1 -1
- package/build/template/routes/{reference.$type.js → reference.$type.jsx} +5 -6
- package/build/template/routes/reference.$type.jsx.map +1 -0
- package/build/template/routes/reference.d.ts +2 -2
- package/build/template/routes/reference.d.ts.map +1 -1
- package/build/template/routes/{reference.js → reference.jsx} +12 -7
- package/build/template/routes/reference.jsx.map +1 -0
- package/build/template/routes/root.d.ts +2 -2
- package/build/template/routes/root.d.ts.map +1 -1
- package/build/template/routes/root.jsx +188 -0
- package/build/template/routes/root.jsx.map +1 -0
- package/build/template/routes.jsx +5 -0
- package/build/template/routes.jsx.map +1 -0
- package/build/template/server/app.d.ts +1 -8
- package/build/template/server/app.d.ts.map +1 -1
- package/build/template/server/app.js +21 -21
- package/build/template/server/app.js.map +1 -1
- package/build/template/server/main.js +1 -2
- package/build/template/server/main.js.map +1 -1
- package/build/template/server/render-page.d.ts +3 -0
- package/build/template/server/render-page.d.ts.map +1 -0
- package/build/template/server/{create-page-html-response.js → render-page.jsx} +17 -11
- package/build/template/server/render-page.jsx.map +1 -0
- package/build/template/server/ssg/generate.d.ts.map +1 -1
- package/build/template/server/ssg/generate.js +34 -33
- package/build/template/server/ssg/generate.js.map +1 -1
- package/build/template/server/ssg/get-route-paths.js +1 -1
- package/build/template/server/ssg/get-route-paths.js.map +1 -1
- package/build/template/server/view.js +1 -1
- package/build/template/server/view.js.map +1 -1
- package/package.json +9 -66
- package/src/api/config/load.ts +5 -5
- package/src/api/config-resolver/resolve.ts +2 -2
- package/src/api/schema/data-sources/schema-directory/schema-directory.ts +1 -1
- package/src/api/singletons/markdown/markdown.test.ts +1 -1
- package/src/api/vite/plugins/branding/index.ts +4 -4
- package/src/api/vite/plugins/build.ts +89 -97
- package/src/api/vite/plugins/core.ts +16 -18
- package/src/api/vite/plugins/pages.ts +209 -135
- package/src/api/vite/plugins/serve.ts +14 -67
- package/src/cli/_/self-contained-mode.ts +5 -5
- package/src/lib/deployment/$$.ts +1 -1
- package/src/lib/deployment/$.test.ts +3 -3
- package/src/lib/deployment/$.ts +1 -1
- package/src/lib/file-router/diagnostic-reporter.ts +2 -2
- package/src/lib/file-router/file-router.ts +2 -0
- package/src/lib/file-router/linter.test.ts +0 -2
- package/src/lib/file-router/route.ts +0 -2
- package/src/lib/file-router/scan-tree.test.ts +189 -0
- package/src/lib/file-router/scan-tree.ts +205 -0
- package/src/lib/file-router/scan.ts +14 -26
- package/src/lib/file-router/sidebar/index.ts +3 -0
- package/src/lib/file-router/sidebar/sidebar-tree.test.ts +123 -0
- package/src/lib/file-router/sidebar/sidebar-tree.ts +110 -0
- package/src/lib/file-router/sidebar/types.ts +19 -0
- package/src/lib/kit-temp.test.ts +7 -19
- package/src/lib/kit-temp.ts +5 -307
- package/src/lib/task/$.test.ts +3 -3
- package/src/lib/tree/index.ts +2 -0
- package/src/lib/tree/tree.test.ts +117 -0
- package/src/lib/tree/tree.ts +183 -0
- package/src/lib/version-history/index.test.ts +4 -12
- package/src/lib/vite-plugin-reactive-data/vite-plugin-reactive-data.ts +58 -52
- package/src/package-paths.ts +3 -3
- package/src/sandbox.ts +1 -20
- package/src/singletons/debug.ts +1 -1
- package/src/template/components/ArgumentAnnotation.tsx +1 -1
- package/src/template/components/ArgumentList.tsx +1 -1
- package/src/template/components/ArgumentListAnnotation.tsx +2 -2
- package/src/template/components/DeprecationReason.tsx +1 -1
- package/src/template/components/Description.tsx +1 -1
- package/src/template/components/Field.tsx +4 -4
- package/src/template/components/FieldList.tsx +1 -1
- package/src/template/components/FieldListSection.tsx +1 -1
- package/src/template/components/Link.tsx +14 -22
- package/src/template/components/NamedType.tsx +2 -2
- package/src/template/components/TypeAnnotation.tsx +1 -1
- package/src/template/components/TypeFieldsLinkList.tsx +1 -1
- package/src/template/components/TypeIndex.tsx +1 -1
- package/src/template/components/graphql/graphql.tsx +2 -2
- package/src/template/components/graphql/index.ts +1 -1
- package/src/template/components/graphql/type-link.tsx +2 -2
- package/src/template/components/sidebar/Sidebar.tsx +2 -2
- package/src/template/components/sidebar/SidebarItem.tsx +14 -14
- package/src/template/entry.client.tsx +5 -2
- package/src/template/routes/changelog.tsx +1 -1
- package/src/template/routes/reference.$type.$field.tsx +3 -3
- package/src/template/routes/reference.$type.tsx +3 -3
- package/src/template/routes/reference.tsx +10 -6
- package/src/template/routes/root.tsx +108 -112
- package/src/template/routes.tsx +1 -1
- package/src/template/server/app.ts +23 -33
- package/src/template/server/main.ts +1 -2
- package/src/template/server/{create-page-html-response.ts → render-page.tsx} +16 -19
- package/src/template/server/ssg/generate.ts +72 -68
- package/src/template/server/ssg/get-route-paths.ts +1 -1
- package/src/template/server/view.ts +1 -1
- package/src/template/styles/code-block.css +0 -32
- package/build/api/content/$$.d.ts +0 -7
- package/build/api/content/$$.d.ts.map +0 -1
- package/build/api/content/$$.js +0 -7
- package/build/api/content/$$.js.map +0 -1
- package/build/api/content/$.d.ts +0 -2
- package/build/api/content/$.d.ts.map +0 -1
- package/build/api/content/$.js +0 -2
- package/build/api/content/$.js.map +0 -1
- package/build/api/content/metadata.d.ts +0 -10
- package/build/api/content/metadata.d.ts.map +0 -1
- package/build/api/content/metadata.js +0 -9
- package/build/api/content/metadata.js.map +0 -1
- package/build/api/content/navbar.d.ts +0 -10
- package/build/api/content/navbar.d.ts.map +0 -1
- package/build/api/content/navbar.js +0 -45
- package/build/api/content/navbar.js.map +0 -1
- package/build/api/content/page.d.ts +0 -11
- package/build/api/content/page.d.ts.map +0 -1
- package/build/api/content/page.js +0 -2
- package/build/api/content/page.js.map +0 -1
- package/build/api/content/scan.d.ts +0 -19
- package/build/api/content/scan.d.ts.map +0 -1
- package/build/api/content/scan.js +0 -90
- package/build/api/content/scan.js.map +0 -1
- package/build/api/content/sidebar.d.ts +0 -104
- package/build/api/content/sidebar.d.ts.map +0 -1
- package/build/api/content/sidebar.js +0 -166
- package/build/api/content/sidebar.js.map +0 -1
- package/build/api/content/utils.d.ts +0 -5
- package/build/api/content/utils.d.ts.map +0 -1
- package/build/api/content/utils.js +0 -8
- package/build/api/content/utils.js.map +0 -1
- package/build/exports/components.d.ts +0 -5
- package/build/exports/components.d.ts.map +0 -1
- package/build/exports/components.js +0 -5
- package/build/exports/components.js.map +0 -1
- package/build/lib/graphql-document/$$.d.ts +0 -5
- package/build/lib/graphql-document/$$.d.ts.map +0 -1
- package/build/lib/graphql-document/$$.js +0 -5
- package/build/lib/graphql-document/$$.js.map +0 -1
- package/build/lib/graphql-document/$.d.ts +0 -2
- package/build/lib/graphql-document/$.d.ts.map +0 -1
- package/build/lib/graphql-document/$.js +0 -2
- package/build/lib/graphql-document/$.js.map +0 -1
- package/build/lib/graphql-document/analysis.d.ts +0 -44
- package/build/lib/graphql-document/analysis.d.ts.map +0 -1
- package/build/lib/graphql-document/analysis.js +0 -361
- package/build/lib/graphql-document/analysis.js.map +0 -1
- package/build/lib/graphql-document/components/CopyButton.d.ts +0 -19
- package/build/lib/graphql-document/components/CopyButton.d.ts.map +0 -1
- package/build/lib/graphql-document/components/CopyButton.js +0 -43
- package/build/lib/graphql-document/components/CopyButton.js.map +0 -1
- package/build/lib/graphql-document/components/GraphQLDocument.d.ts +0 -38
- package/build/lib/graphql-document/components/GraphQLDocument.d.ts.map +0 -1
- package/build/lib/graphql-document/components/GraphQLDocument.js +0 -142
- package/build/lib/graphql-document/components/GraphQLDocument.js.map +0 -1
- package/build/lib/graphql-document/components/GraphQLDocumentWithSchema.d.ts +0 -7
- package/build/lib/graphql-document/components/GraphQLDocumentWithSchema.d.ts.map +0 -1
- package/build/lib/graphql-document/components/GraphQLDocumentWithSchema.js +0 -45
- package/build/lib/graphql-document/components/GraphQLDocumentWithSchema.js.map +0 -1
- package/build/lib/graphql-document/components/GraphQLIdentifierPopover.d.ts +0 -33
- package/build/lib/graphql-document/components/GraphQLIdentifierPopover.d.ts.map +0 -1
- package/build/lib/graphql-document/components/GraphQLIdentifierPopover.js +0 -48
- package/build/lib/graphql-document/components/GraphQLIdentifierPopover.js.map +0 -1
- package/build/lib/graphql-document/components/IdentifierLink.d.ts +0 -39
- package/build/lib/graphql-document/components/IdentifierLink.d.ts.map +0 -1
- package/build/lib/graphql-document/components/IdentifierLink.js +0 -75
- package/build/lib/graphql-document/components/IdentifierLink.js.map +0 -1
- package/build/lib/graphql-document/components/graphql-document-styles.d.ts +0 -5
- package/build/lib/graphql-document/components/graphql-document-styles.d.ts.map +0 -1
- package/build/lib/graphql-document/components/graphql-document-styles.js +0 -167
- package/build/lib/graphql-document/components/graphql-document-styles.js.map +0 -1
- package/build/lib/graphql-document/components/index.d.ts +0 -6
- package/build/lib/graphql-document/components/index.d.ts.map +0 -1
- package/build/lib/graphql-document/components/index.js +0 -6
- package/build/lib/graphql-document/components/index.js.map +0 -1
- package/build/lib/graphql-document/example.d.ts +0 -25
- package/build/lib/graphql-document/example.d.ts.map +0 -1
- package/build/lib/graphql-document/example.js +0 -140
- package/build/lib/graphql-document/example.js.map +0 -1
- package/build/lib/graphql-document/graphql-document.d.ts +0 -35
- package/build/lib/graphql-document/graphql-document.d.ts.map +0 -1
- package/build/lib/graphql-document/graphql-document.js +0 -36
- package/build/lib/graphql-document/graphql-document.js.map +0 -1
- package/build/lib/graphql-document/hooks/use-tooltip-state.d.ts +0 -43
- package/build/lib/graphql-document/hooks/use-tooltip-state.d.ts.map +0 -1
- package/build/lib/graphql-document/hooks/use-tooltip-state.js +0 -132
- package/build/lib/graphql-document/hooks/use-tooltip-state.js.map +0 -1
- package/build/lib/graphql-document/positioning-simple.d.ts +0 -63
- package/build/lib/graphql-document/positioning-simple.d.ts.map +0 -1
- package/build/lib/graphql-document/positioning-simple.js +0 -185
- package/build/lib/graphql-document/positioning-simple.js.map +0 -1
- package/build/lib/graphql-document/schema-context.d.ts +0 -8
- package/build/lib/graphql-document/schema-context.d.ts.map +0 -1
- package/build/lib/graphql-document/schema-context.js +0 -11
- package/build/lib/graphql-document/schema-context.js.map +0 -1
- package/build/lib/graphql-document/schema-integration-example.d.ts +0 -27
- package/build/lib/graphql-document/schema-integration-example.d.ts.map +0 -1
- package/build/lib/graphql-document/schema-integration-example.js +0 -297
- package/build/lib/graphql-document/schema-integration-example.js.map +0 -1
- package/build/lib/graphql-document/schema-integration.d.ts +0 -135
- package/build/lib/graphql-document/schema-integration.d.ts.map +0 -1
- package/build/lib/graphql-document/schema-integration.js +0 -328
- package/build/lib/graphql-document/schema-integration.js.map +0 -1
- package/build/lib/graphql-document/types.d.ts +0 -117
- package/build/lib/graphql-document/types.d.ts.map +0 -1
- package/build/lib/graphql-document/types.js.map +0 -1
- package/build/template/components/ArgumentAnnotation.js +0 -10
- package/build/template/components/ArgumentAnnotation.js.map +0 -1
- package/build/template/components/ArgumentList.js +0 -9
- package/build/template/components/ArgumentList.js.map +0 -1
- package/build/template/components/ArgumentListAnnotation.js +0 -15
- package/build/template/components/ArgumentListAnnotation.js.map +0 -1
- package/build/template/components/Changelog.js +0 -44
- package/build/template/components/Changelog.js.map +0 -1
- package/build/template/components/CodeBlockEnhancer.d.ts +0 -2
- package/build/template/components/CodeBlockEnhancer.d.ts.map +0 -1
- package/build/template/components/CodeBlockEnhancer.js +0 -175
- package/build/template/components/CodeBlockEnhancer.js.map +0 -1
- package/build/template/components/DeprecationReason.js +0 -9
- package/build/template/components/DeprecationReason.js.map +0 -1
- package/build/template/components/Description.js +0 -9
- package/build/template/components/Description.js.map +0 -1
- package/build/template/components/Field.js +0 -14
- package/build/template/components/Field.js.map +0 -1
- package/build/template/components/FieldList.js.map +0 -1
- package/build/template/components/FieldListSection.js.map +0 -1
- package/build/template/components/HamburgerMenu.d.ts +0 -9
- package/build/template/components/HamburgerMenu.d.ts.map +0 -1
- package/build/template/components/HamburgerMenu.js +0 -30
- package/build/template/components/HamburgerMenu.js.map +0 -1
- package/build/template/components/Link.js.map +0 -1
- package/build/template/components/Logo.js +0 -20
- package/build/template/components/Logo.js.map +0 -1
- package/build/template/components/MDXComponents.d.ts +0 -11
- package/build/template/components/MDXComponents.d.ts.map +0 -1
- package/build/template/components/MDXComponents.js +0 -70
- package/build/template/components/MDXComponents.js.map +0 -1
- package/build/template/components/Markdown.js.map +0 -1
- package/build/template/components/MissingSchema.js +0 -5
- package/build/template/components/MissingSchema.js.map +0 -1
- package/build/template/components/NamedType.js +0 -12
- package/build/template/components/NamedType.js.map +0 -1
- package/build/template/components/NotFound.d.ts +0 -2
- package/build/template/components/NotFound.d.ts.map +0 -1
- package/build/template/components/NotFound.js +0 -7
- package/build/template/components/NotFound.js.map +0 -1
- package/build/template/components/RadixLink.js.map +0 -1
- package/build/template/components/TestComponent.d.ts +0 -5
- package/build/template/components/TestComponent.d.ts.map +0 -1
- package/build/template/components/TestComponent.js +0 -7
- package/build/template/components/TestComponent.js.map +0 -1
- package/build/template/components/Texts/MinorHeading.js.map +0 -1
- package/build/template/components/ThemeToggle.d.ts +0 -3
- package/build/template/components/ThemeToggle.d.ts.map +0 -1
- package/build/template/components/ThemeToggle.js +0 -9
- package/build/template/components/ThemeToggle.js.map +0 -1
- package/build/template/components/TypeAnnotation.js.map +0 -1
- package/build/template/components/TypeFieldsLinkList.js +0 -9
- package/build/template/components/TypeFieldsLinkList.js.map +0 -1
- package/build/template/components/TypeIndex.js +0 -17
- package/build/template/components/TypeIndex.js.map +0 -1
- package/build/template/components/content/$$.d.ts +0 -3
- package/build/template/components/content/$$.d.ts.map +0 -1
- package/build/template/components/content/$$.js +0 -3
- package/build/template/components/content/$$.js.map +0 -1
- package/build/template/components/content/GraphQLDocumentWithSchema.d.ts +0 -8
- package/build/template/components/content/GraphQLDocumentWithSchema.d.ts.map +0 -1
- package/build/template/components/content/GraphQLDocumentWithSchema.js +0 -13
- package/build/template/components/content/GraphQLDocumentWithSchema.js.map +0 -1
- package/build/template/components/content/GraphQLDocumentWrapper.d.ts +0 -7
- package/build/template/components/content/GraphQLDocumentWrapper.d.ts.map +0 -1
- package/build/template/components/content/GraphQLDocumentWrapper.js +0 -63
- package/build/template/components/content/GraphQLDocumentWrapper.js.map +0 -1
- package/build/template/components/graphql/graphql.js +0 -3
- package/build/template/components/graphql/graphql.js.map +0 -1
- package/build/template/components/graphql/type-kind-icon.js.map +0 -1
- package/build/template/components/graphql/type-link.js +0 -11
- package/build/template/components/graphql/type-link.js.map +0 -1
- package/build/template/components/sidebar/Sidebar.js +0 -11
- package/build/template/components/sidebar/Sidebar.js.map +0 -1
- package/build/template/components/sidebar/SidebarItem.js.map +0 -1
- package/build/template/components/sidebar/ToggleButton.js +0 -5
- package/build/template/components/sidebar/ToggleButton.js.map +0 -1
- package/build/template/contexts/ThemeContext.d.ts +0 -12
- package/build/template/contexts/ThemeContext.d.ts.map +0 -1
- package/build/template/contexts/ThemeContext.js +0 -40
- package/build/template/contexts/ThemeContext.js.map +0 -1
- package/build/template/entry.client.js.map +0 -1
- package/build/template/hooks/useClientOnly.d.ts +0 -9
- package/build/template/hooks/useClientOnly.d.ts.map +0 -1
- package/build/template/hooks/useClientOnly.js +0 -16
- package/build/template/hooks/useClientOnly.js.map +0 -1
- package/build/template/routes/changelog.js.map +0 -1
- package/build/template/routes/index.js.map +0 -1
- package/build/template/routes/reference.$type.$field.js.map +0 -1
- package/build/template/routes/reference.$type.js.map +0 -1
- package/build/template/routes/reference.js.map +0 -1
- package/build/template/routes/root.js +0 -138
- package/build/template/routes/root.js.map +0 -1
- package/build/template/routes.js +0 -5
- package/build/template/routes.js.map +0 -1
- package/build/template/server/create-page-html-response.d.ts +0 -7
- package/build/template/server/create-page-html-response.d.ts.map +0 -1
- package/build/template/server/create-page-html-response.js.map +0 -1
- package/build/template/server/middleware/page.d.ts +0 -4
- package/build/template/server/middleware/page.d.ts.map +0 -1
- package/build/template/server/middleware/page.js +0 -15
- package/build/template/server/middleware/page.js.map +0 -1
- package/build/template/server/middleware/unsupported-assets.d.ts +0 -10
- package/build/template/server/middleware/unsupported-assets.d.ts.map +0 -1
- package/build/template/server/middleware/unsupported-assets.js +0 -21
- package/build/template/server/middleware/unsupported-assets.js.map +0 -1
- package/build/template/styles/code-block.css +0 -218
- package/src/api/content/$$.ts +0 -6
- package/src/api/content/$.test.ts +0 -72
- package/src/api/content/$.ts +0 -1
- package/src/api/content/metadata.ts +0 -11
- package/src/api/content/navbar.test.ts +0 -55
- package/src/api/content/navbar.ts +0 -61
- package/src/api/content/page.ts +0 -12
- package/src/api/content/scan.ts +0 -117
- package/src/api/content/sidebar.test.ts +0 -297
- package/src/api/content/sidebar.ts +0 -283
- package/src/api/content/utils.ts +0 -7
- package/src/exports/components.ts +0 -4
- package/src/lib/graphql-document/$$.ts +0 -4
- package/src/lib/graphql-document/$.test.ts +0 -132
- package/src/lib/graphql-document/$.ts +0 -1
- package/src/lib/graphql-document/README.md +0 -102
- package/src/lib/graphql-document/analysis.ts +0 -415
- package/src/lib/graphql-document/components/CopyButton.tsx +0 -76
- package/src/lib/graphql-document/components/GraphQLDocument.tsx +0 -262
- package/src/lib/graphql-document/components/GraphQLDocument.unit.test.ts +0 -188
- package/src/lib/graphql-document/components/GraphQLDocumentWithSchema.tsx +0 -70
- package/src/lib/graphql-document/components/GraphQLIdentifierPopover.tsx +0 -197
- package/src/lib/graphql-document/components/IdentifierLink.tsx +0 -160
- package/src/lib/graphql-document/components/graphql-document-styles.ts +0 -167
- package/src/lib/graphql-document/components/index.ts +0 -5
- package/src/lib/graphql-document/demo.md +0 -155
- package/src/lib/graphql-document/example.ts +0 -163
- package/src/lib/graphql-document/graphql-document.ts +0 -37
- package/src/lib/graphql-document/hooks/use-tooltip-state.test.ts +0 -76
- package/src/lib/graphql-document/hooks/use-tooltip-state.ts +0 -191
- package/src/lib/graphql-document/positioning-simple.test.ts +0 -248
- package/src/lib/graphql-document/positioning-simple.ts +0 -260
- package/src/lib/graphql-document/schema-context.tsx +0 -20
- package/src/lib/graphql-document/schema-integration-example.ts +0 -341
- package/src/lib/graphql-document/schema-integration.test.ts +0 -365
- package/src/lib/graphql-document/schema-integration.ts +0 -497
- package/src/lib/graphql-document/types.ts +0 -129
- package/src/template/components/CodeBlockEnhancer.tsx +0 -192
- package/src/template/components/HamburgerMenu.tsx +0 -96
- package/src/template/components/MDXComponents.tsx +0 -101
- package/src/template/components/NotFound.tsx +0 -28
- package/src/template/components/TestComponent.tsx +0 -6
- package/src/template/components/ThemeToggle.tsx +0 -21
- package/src/template/components/content/$$.ts +0 -2
- package/src/template/components/content/GraphQLDocumentWithSchema.tsx +0 -13
- package/src/template/components/content/GraphQLDocumentWrapper.tsx +0 -89
- package/src/template/contexts/ThemeContext.tsx +0 -60
- package/src/template/hooks/useClientOnly.ts +0 -21
- package/src/template/server/middleware/page.ts +0 -19
- package/src/template/server/middleware/unsupported-assets.ts +0 -25
- /package/build/lib/{graphql-document → file-router/sidebar}/types.js +0 -0
@@ -0,0 +1,134 @@
|
|
1
|
+
/**
|
2
|
+
* Generic tree data structure and utilities
|
3
|
+
*/
|
4
|
+
/**
|
5
|
+
* Create a new tree node
|
6
|
+
*/
|
7
|
+
export const node = (value, children = []) => ({
|
8
|
+
value,
|
9
|
+
children,
|
10
|
+
});
|
11
|
+
/**
|
12
|
+
* Map over a tree, transforming each node's value
|
13
|
+
*/
|
14
|
+
export const map = (tree, mapper, depth = 0, path = []) => {
|
15
|
+
const newPath = [...path, tree.value];
|
16
|
+
return {
|
17
|
+
value: mapper(tree.value, depth, path),
|
18
|
+
children: tree.children.map(child => map(child, mapper, depth + 1, newPath)),
|
19
|
+
};
|
20
|
+
};
|
21
|
+
/**
|
22
|
+
* Visit each node in the tree (depth-first)
|
23
|
+
*/
|
24
|
+
export const visit = (tree, visitor, depth = 0, path = []) => {
|
25
|
+
visitor(tree, depth, path);
|
26
|
+
const newPath = [...path, tree.value];
|
27
|
+
tree.children.forEach(child => visit(child, visitor, depth + 1, newPath));
|
28
|
+
};
|
29
|
+
/**
|
30
|
+
* Find a node in the tree
|
31
|
+
*/
|
32
|
+
export const find = (tree, predicate, depth = 0, path = []) => {
|
33
|
+
if (predicate(tree.value, depth, path)) {
|
34
|
+
return tree;
|
35
|
+
}
|
36
|
+
const newPath = [...path, tree.value];
|
37
|
+
for (const child of tree.children) {
|
38
|
+
const found = find(child, predicate, depth + 1, newPath);
|
39
|
+
if (found)
|
40
|
+
return found;
|
41
|
+
}
|
42
|
+
return undefined;
|
43
|
+
};
|
44
|
+
/**
|
45
|
+
* Filter tree nodes (keeps structure, removes non-matching nodes)
|
46
|
+
*/
|
47
|
+
export const filter = (tree, predicate, depth = 0, path = []) => {
|
48
|
+
const newPath = [...path, tree.value];
|
49
|
+
const filteredChildren = tree.children
|
50
|
+
.map(child => filter(child, predicate, depth + 1, newPath))
|
51
|
+
.filter((child) => child !== undefined);
|
52
|
+
// Keep node if it matches or has matching children
|
53
|
+
if (predicate(tree.value, depth, path) || filteredChildren.length > 0) {
|
54
|
+
return {
|
55
|
+
value: tree.value,
|
56
|
+
children: filteredChildren,
|
57
|
+
};
|
58
|
+
}
|
59
|
+
return undefined;
|
60
|
+
};
|
61
|
+
/**
|
62
|
+
* Sort a tree's children at each level
|
63
|
+
*/
|
64
|
+
export const sort = (tree, compareFn) => ({
|
65
|
+
value: tree.value,
|
66
|
+
children: tree.children
|
67
|
+
.map(child => sort(child, compareFn))
|
68
|
+
.sort((a, b) => compareFn(a.value, b.value)),
|
69
|
+
});
|
70
|
+
/**
|
71
|
+
* Flatten a tree into an array (depth-first)
|
72
|
+
*/
|
73
|
+
export const flatten = (tree) => {
|
74
|
+
const result = [tree.value];
|
75
|
+
tree.children.forEach(child => {
|
76
|
+
result.push(...flatten(child));
|
77
|
+
});
|
78
|
+
return result;
|
79
|
+
};
|
80
|
+
/**
|
81
|
+
* Get the depth of the tree
|
82
|
+
*/
|
83
|
+
export const depth = (tree) => {
|
84
|
+
if (tree.children.length === 0)
|
85
|
+
return 0;
|
86
|
+
return 1 + Math.max(...tree.children.map(depth));
|
87
|
+
};
|
88
|
+
/**
|
89
|
+
* Count total nodes in the tree
|
90
|
+
*/
|
91
|
+
export const count = (tree) => {
|
92
|
+
return 1 + tree.children.reduce((sum, child) => sum + count(child), 0);
|
93
|
+
};
|
94
|
+
/**
|
95
|
+
* Check if a node is a leaf (has no children)
|
96
|
+
*/
|
97
|
+
export const isLeaf = (node) => {
|
98
|
+
return node.children.length === 0;
|
99
|
+
};
|
100
|
+
/**
|
101
|
+
* Get all leaf nodes
|
102
|
+
*/
|
103
|
+
export const leaves = (tree) => {
|
104
|
+
if (isLeaf(tree))
|
105
|
+
return [tree];
|
106
|
+
return tree.children.flatMap(leaves);
|
107
|
+
};
|
108
|
+
/**
|
109
|
+
* Build a tree from a flat list with parent references
|
110
|
+
*/
|
111
|
+
export const fromList = (items, rootId) => {
|
112
|
+
const itemMap = new Map(items.map(item => [item.id, item]));
|
113
|
+
const roots = [];
|
114
|
+
const nodeMap = new Map();
|
115
|
+
// Create all nodes
|
116
|
+
items.forEach(item => {
|
117
|
+
nodeMap.set(item.id, node(item));
|
118
|
+
});
|
119
|
+
// Build hierarchy
|
120
|
+
items.forEach(item => {
|
121
|
+
const itemNode = nodeMap.get(item.id);
|
122
|
+
if (item.parentId === rootId) {
|
123
|
+
roots.push(itemNode);
|
124
|
+
}
|
125
|
+
else if (item.parentId) {
|
126
|
+
const parent = nodeMap.get(item.parentId);
|
127
|
+
if (parent) {
|
128
|
+
parent.children.push(itemNode);
|
129
|
+
}
|
130
|
+
}
|
131
|
+
});
|
132
|
+
return roots;
|
133
|
+
};
|
134
|
+
//# sourceMappingURL=tree.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"tree.js","sourceRoot":"","sources":["../../../src/lib/tree/tree.ts"],"names":[],"mappings":"AAAA;;GAEG;AAaH;;GAEG;AACH,MAAM,CAAC,MAAM,IAAI,GAAG,CAAI,KAAQ,EAAE,WAA0B,EAAE,EAAe,EAAE,CAAC,CAAC;IAC/E,KAAK;IACL,QAAQ;CACT,CAAC,CAAA;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,GAAG,GAAG,CACjB,IAAiB,EACjB,MAAwB,EACxB,KAAK,GAAG,CAAC,EACT,OAAY,EAAE,EACD,EAAE;IACf,MAAM,OAAO,GAAG,CAAC,GAAG,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,CAAA;IACrC,OAAO;QACL,KAAK,EAAE,MAAM,CAAC,IAAI,CAAC,KAAK,EAAE,KAAK,EAAE,IAAI,CAAC;QACtC,QAAQ,EAAE,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,GAAG,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,GAAG,CAAC,EAAE,OAAO,CAAC,CAAC;KAC7E,CAAA;AACH,CAAC,CAAA;AAED;;GAEG;AACH,MAAM,CAAC,MAAM,KAAK,GAAG,CACnB,IAAiB,EACjB,OAAuB,EACvB,KAAK,GAAG,CAAC,EACT,OAAY,EAAE,EACR,EAAE;IACR,OAAO,CAAC,IAAI,EAAE,KAAK,EAAE,IAAI,CAAC,CAAA;IAC1B,MAAM,OAAO,GAAG,CAAC,GAAG,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,CAAA;IACrC,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,KAAK,EAAE,OAAO,EAAE,KAAK,GAAG,CAAC,EAAE,O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M,EAAE,CAAC;YAC7B,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAA;QACtB,CAAC;aAAM,IAAI,IAAI,CAAC,QAAQ,EAAE,CAAC;YACzB,MAAM,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAA;YACzC,IAAI,MAAM,EAAE,CAAC;gBACX,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAA;YAChC,CAAC;QACH,CAAC;IACH,CAAC,CAAC,CAAA;IAEF,OAAO,KAAK,CAAA;AACd,CAAC,CAAA"}
|
@@ -15,9 +15,11 @@ interface ReactiveDataOptions {
|
|
15
15
|
* - A reactive value directly
|
16
16
|
*/
|
17
17
|
data: ComputedRef<object | unknown[]> | (() => object | unknown[]) | object | unknown[];
|
18
|
+
/** Debounce updates (ms). If not set, uses process.nextTick for batching */
|
19
|
+
debounce?: number;
|
18
20
|
/**
|
19
21
|
* JSON codec to use (e.g., superjson)
|
20
|
-
* Default:
|
22
|
+
* Default: superjson
|
21
23
|
* Only used when includeJsonPlugin is true
|
22
24
|
*/
|
23
25
|
codec?: VitePluginJson.Codec;
|
@@ -26,6 +28,11 @@ interface ReactiveDataOptions {
|
|
26
28
|
@default 'reactive-data'
|
27
29
|
*/
|
28
30
|
name?: string;
|
31
|
+
/**
|
32
|
+
* Module type to return. Default: 'json'
|
33
|
+
* Use 'superjson' to avoid conflicts with built-in JSON plugin
|
34
|
+
*/
|
35
|
+
moduleType?: string;
|
29
36
|
}
|
30
37
|
export declare const create: (options: ReactiveDataOptions) => Plugin;
|
31
38
|
export {};
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"vite-plugin-reactive-data.d.ts","sourceRoot":"","sources":["../../../src/lib/vite-plugin-reactive-data/vite-plugin-reactive-data.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"vite-plugin-reactive-data.d.ts","sourceRoot":"","sources":["../../../src/lib/vite-plugin-reactive-data/vite-plugin-reactive-data.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAA;AAE5D,OAAO,EAAE,KAAK,WAAW,EAAiB,MAAM,iBAAiB,CAAA;AAEjE,OAAO,KAAK,EAAE,MAAM,EAAiB,MAAM,MAAM,CAAA;AAEjD,UAAU,mBAAmB;IAC3B;;;OAGG;IACH,QAAQ,EAAE,MAAM,CAAA;IAChB;;;;;;OAMG;IACH,IAAI,EAAE,WAAW,CAAC,MAAM,GAAG,OAAO,EAAE,CAAC,GAAG,CAAC,MAAM,MAAM,GAAG,OAAO,EAAE,CAAC,GAAG,MAAM,GAAG,OAAO,EAAE,CAAA;IACvF,4EAA4E;IAC5E,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB;;;;OAIG;IACH,KAAK,CAAC,EAAE,cAAc,CAAC,KAAK,CAAA;IAC5B;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAA;IACb;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAA;CACpB;AAID,eAAO,MAAM,MAAM,GAAI,SAAS,mBAAmB,KAAG,MAuFrD,CAAA"}
|
@@ -1,41 +1,43 @@
|
|
1
|
+
import { ensureEnd } from '#lib/kit-temp';
|
1
2
|
import { VitePluginJson } from '#lib/vite-plugin-json/index';
|
2
|
-
import {
|
3
|
+
import { superjson } from '#singletons/superjson';
|
3
4
|
import { effect, isRef } from '@vue/reactivity';
|
4
|
-
|
5
|
+
import { Debug } from '@wollybeard/kit';
|
6
|
+
const debug = Debug.create('vite-plugin-reactive-data');
|
5
7
|
export const create = (options) => {
|
6
|
-
const codec = options.codec ??
|
7
|
-
const
|
8
|
+
const codec = options.codec ?? superjson;
|
9
|
+
const moduleType = options.moduleType ?? 'json';
|
10
|
+
const moduleId = ensureEnd(options.moduleId, `.${moduleType}`);
|
8
11
|
const name = options.name ?? `reactive-data`;
|
9
|
-
|
10
|
-
|
11
|
-
let
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
if (
|
17
|
-
|
18
|
-
const moduleNode =
|
12
|
+
let server;
|
13
|
+
let updateTimer;
|
14
|
+
let updateScheduled = false;
|
15
|
+
const doUpdate = () => {
|
16
|
+
debug('update');
|
17
|
+
updateTimer = undefined;
|
18
|
+
updateScheduled = false;
|
19
|
+
if (!server)
|
20
|
+
return;
|
21
|
+
const moduleNode = server.moduleGraph.getModuleById(moduleId);
|
19
22
|
if (moduleNode) {
|
20
|
-
|
21
|
-
|
23
|
+
server.moduleGraph.invalidateModule(moduleNode);
|
24
|
+
}
|
25
|
+
};
|
26
|
+
const scheduleUpdate = () => {
|
27
|
+
if (options.debounce) {
|
28
|
+
// User wants actual debouncing for rapid updates
|
29
|
+
if (updateTimer)
|
30
|
+
clearTimeout(updateTimer);
|
31
|
+
updateTimer = setTimeout(doUpdate, options.debounce);
|
22
32
|
}
|
23
33
|
else {
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
34
|
+
// Just batch synchronous updates using nextTick
|
35
|
+
if (updateScheduled)
|
36
|
+
return;
|
37
|
+
updateScheduled = true;
|
38
|
+
process.nextTick(doUpdate);
|
29
39
|
}
|
30
40
|
};
|
31
|
-
const scheduleInvalidate = () => {
|
32
|
-
if ($invalidationScheduled)
|
33
|
-
return; // already scheduled
|
34
|
-
$invalidationScheduled = true;
|
35
|
-
if (!$server)
|
36
|
-
return; // server will flush when ready
|
37
|
-
tryInvalidate();
|
38
|
-
};
|
39
41
|
// Helper to get the current data value
|
40
42
|
const getData = () => {
|
41
43
|
if (isRef(options.data)) {
|
@@ -52,35 +54,38 @@ export const create = (options) => {
|
|
52
54
|
effect(() => {
|
53
55
|
// Access data to track dependencies
|
54
56
|
const data = getData();
|
55
|
-
debug('
|
56
|
-
|
57
|
+
debug('data changed:', data);
|
58
|
+
// Trigger update only if server is available
|
59
|
+
if (server) {
|
60
|
+
scheduleUpdate();
|
61
|
+
}
|
57
62
|
});
|
58
63
|
return {
|
59
64
|
name,
|
60
65
|
configureServer(_server) {
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
debug('try invalidate scheduled before server was ready');
|
65
|
-
tryInvalidate();
|
66
|
-
}
|
66
|
+
server = _server;
|
67
|
+
// Trigger initial update since server is now available
|
68
|
+
scheduleUpdate();
|
67
69
|
},
|
68
70
|
resolveId(id) {
|
69
71
|
if (id === moduleId) {
|
70
72
|
return moduleId;
|
71
73
|
}
|
72
74
|
},
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
75
|
+
load: {
|
76
|
+
// todo: doesn't work for some reason, prefer over handler
|
77
|
+
// filter: {
|
78
|
+
// id: {
|
79
|
+
// include: moduleId,
|
80
|
+
// },
|
81
|
+
// },
|
82
|
+
handler: (id) => {
|
83
|
+
if (id !== moduleId)
|
84
|
+
return;
|
85
|
+
const data = getData();
|
86
|
+
// Return just the raw JSON string - let the JSON plugin handle the transformation
|
87
|
+
return codec.stringify(data);
|
88
|
+
},
|
84
89
|
},
|
85
90
|
};
|
86
91
|
};
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"vite-plugin-reactive-data.js","sourceRoot":"","sources":["../../../src/lib/vite-plugin-reactive-data/vite-plugin-reactive-data.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAA;AAC5D,OAAO,EAAE,
|
1
|
+
{"version":3,"file":"vite-plugin-reactive-data.js","sourceRoot":"","sources":["../../../src/lib/vite-plugin-reactive-data/vite-plugin-reactive-data.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AACzC,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAA;AAC5D,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAA;AACjD,OAAO,EAAoB,MAAM,EAAE,KAAK,EAAE,MAAM,iBAA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AAC,IAAI,CAAC,CAAA;YAC9B,CAAC;SACF;KACF,CAAA;AACH,CAAC,CAAA"}
|
package/build/package-paths.js
CHANGED
@@ -22,11 +22,11 @@ export const packagePaths = {
|
|
22
22
|
template: {
|
23
23
|
rootDir: templateDir,
|
24
24
|
server: {
|
25
|
-
app: Path.join(templateDir, `server/app
|
26
|
-
entrypoint: Path.join(templateDir, `server/main
|
25
|
+
app: Path.join(templateDir, `server/app.js`),
|
26
|
+
entrypoint: Path.join(templateDir, `server/main.js`),
|
27
27
|
},
|
28
28
|
client: {
|
29
|
-
entrypoint: Path.join(templateDir, `entry.client
|
29
|
+
entrypoint: Path.join(templateDir, `entry.client.jsx`),
|
30
30
|
},
|
31
31
|
},
|
32
32
|
};
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"package-paths.js","sourceRoot":"","sources":["../src/package-paths.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAA;AAwBtC,MAAM,oBAAoB,GAAG,KAAK,CAAA;AAClC,MAAM,mBAAmB,GAAG,OAAO,CAAA;AAEnC;;GAEG;AACH,MAAM,SAAS,GAAG,MAAM,CAAC,IAAI,CAAC,OAAO,CAAA;AACrC,MAAM,WAAW,GAAG,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,UAAU,CAAC,CAAA;AACpD,MAAM,OAAO,GAAG,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,CAAA;AAE1C,MAAM,mBAAmB,GAAG,SAAS,CAAC,QAAQ,CAAC,oBAAoB,CAAC,CAAA;AAEpE,MAAM,UAAU,GAAG,mBAAmB,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAA;AAEtD,MAAM,CAAC,MAAM,YAAY,GAAiB;IACxC,IAAI,EAAE,OAAO;IACb,mBAAmB;IACnB,MAAM,EAAE;QACN,MAAM,EAAE,SAAS;QACjB,KAAK,EAAE,mBAAmB;KAC3B;IACD,eA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W,EAAE,kBAAkB,CAAC;SACvD;KACF;CACF,CAAA"}
|
package/build/sandbox.js
CHANGED
@@ -1,18 +1,3 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
// Test parsing of numbered directory
|
4
|
-
const testPath1 = Path.parse('a/10_b/index.md');
|
5
|
-
const logical1 = filePathToRouteLogical(testPath1);
|
6
|
-
console.log('Path 1:', testPath1);
|
7
|
-
console.log('Logical 1:', logical1);
|
8
|
-
// Test parsing of numbered file
|
9
|
-
const testPath2 = Path.parse('a/10_b/g.md');
|
10
|
-
const logical2 = filePathToRouteLogical(testPath2);
|
11
|
-
console.log('\nPath 2:', testPath2);
|
12
|
-
console.log('Logical 2:', logical2);
|
13
|
-
// Test directory structure
|
14
|
-
const testPath3 = Path.parse('a/30_d/index.md');
|
15
|
-
const logical3 = filePathToRouteLogical(testPath3);
|
16
|
-
console.log('\nPath 3:', testPath3);
|
17
|
-
console.log('Logical 3:', logical3);
|
1
|
+
export {};
|
2
|
+
// Sandbox file for temporary testing
|
18
3
|
//# sourceMappingURL=sandbox.js.map
|
package/build/sandbox.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"sandbox.js","sourceRoot":"","sources":["../src/sandbox.ts"],"names":[],"mappings":"AAAA,
|
1
|
+
{"version":3,"file":"sandbox.js","sourceRoot":"","sources":["../src/sandbox.ts"],"names":[],"mappings":";AAAA,qCAAqC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"debug.d.ts","sourceRoot":"","sources":["../../src/singletons/debug.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAA;AAEvC,eAAO,MAAM,
|
1
|
+
{"version":3,"file":"debug.d.ts","sourceRoot":"","sources":["../../src/singletons/debug.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAA;AAEvC,eAAO,MAAM,KAAK,aAAwB,CAAA"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"debug.js","sourceRoot":"","sources":["../../src/singletons/debug.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAA;AAEvC,MAAM,CAAC,MAAM,
|
1
|
+
{"version":3,"file":"debug.js","sourceRoot":"","sources":["../../src/singletons/debug.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAA;AAEvC,MAAM,CAAC,MAAM,KAAK,GAAG,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,CAAA"}
|
@@ -0,0 +1,16 @@
|
|
1
|
+
import { Box, Flex, Text } from '@radix-ui/themes';
|
2
|
+
import { TypeAnnotation } from './TypeAnnotation.jsx';
|
3
|
+
/**
|
4
|
+
* Renders a single GraphQL argument in SDL syntax
|
5
|
+
*/
|
6
|
+
export const ArgumentAnnotation = ({ data }) => {
|
7
|
+
return (<Box as='div'>
|
8
|
+
<Flex>
|
9
|
+
<Text>{data.name}</Text>
|
10
|
+
<Text>: </Text>
|
11
|
+
|
12
|
+
<TypeAnnotation type={data.type}/>
|
13
|
+
</Flex>
|
14
|
+
</Box>);
|
15
|
+
};
|
16
|
+
//# sourceMappingURL=ArgumentAnnotation.jsx.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"ArgumentAnnotation.jsx","sourceRoot":"","sources":["../../../src/template/components/ArgumentAnnotation.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAA;AAGlD,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAMrD;;GAEG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAc,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE;IACxD,OAAO,CACL,CAAC,GAAG,CAAC,EAAE,CAAC,KAAK,CACX;MAAA,CAAC,IAAI,CACH;QAAA,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,IAAI,CACvB;QAAA,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAEnB;;QAAA,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EAClC;MAAA,EAAE,IAAI,CACR;IAAA,EAAE,GAAG,CAAC,CACP,CAAA;AACH,CAAC,CAAA"}
|
@@ -0,0 +1,16 @@
|
|
1
|
+
import { Box, Flex, Heading, Text } from '@radix-ui/themes';
|
2
|
+
import { TypeAnnotation } from './TypeAnnotation.jsx';
|
3
|
+
export const ArgumentsList = ({ args }) => {
|
4
|
+
if (args.length === 0)
|
5
|
+
return null;
|
6
|
+
return (<Flex direction='column'>
|
7
|
+
<Heading size='1' weight='bold'>Arguments</Heading>
|
8
|
+
{args.map(arg => (<Box key={arg.name}>
|
9
|
+
<Text>{arg.name}</Text>
|
10
|
+
<Text>:</Text>
|
11
|
+
<TypeAnnotation type={arg.type}/>
|
12
|
+
{arg.description && <Text as='p' size='2' color='gray'>{arg.description}</Text>}
|
13
|
+
</Box>))}
|
14
|
+
</Flex>);
|
15
|
+
};
|
16
|
+
//# sourceMappingURL=ArgumentList.jsx.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"ArgumentList.jsx","sourceRoot":"","sources":["../../../src/template/components/ArgumentList.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAA;AAG3D,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAMrD,MAAM,CAAC,MAAM,aAAa,GAAc,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE;IACnD,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,IAAI,CAAA;IAElC,OAAO,CACL,CAAC,IAAI,CAAC,SAAS,CAAC,QAAQ,CACtB;MAAA,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,MAAM,CAAC,SAAS,EAAE,OAAO,CAClD;MAAA,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC,CACf,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,CACjB;UAAA,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,IAAI,CACtB;UAAA,CAAC,IAAI,CAAC,CAAC,EAAE,IAAI,CACb;UAAA,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,EAC/B;UAAA,CAAC,GAAG,CAAC,WAAW,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,WAAW,CAAC,EAAE,IAAI,CAAC,CACjF;QAAA,EAAE,GAAG,CAAC,CACP,CAAC,CACJ;IAAA,EAAE,IAAI,CAAC,CACR,CAAA;AACH,CAAC,CAAA"}
|
@@ -0,0 +1,23 @@
|
|
1
|
+
import { GrafaidOld } from '#lib/grafaid-old/index';
|
2
|
+
import { Box, Text } from '@radix-ui/themes';
|
3
|
+
import { ArgumentAnnotation } from './ArgumentAnnotation.jsx';
|
4
|
+
import { FieldList } from './FieldList.jsx';
|
5
|
+
export const ArgumentListAnnotation = ({ field }) => {
|
6
|
+
if (field.args.length === 0)
|
7
|
+
return null;
|
8
|
+
const inputObject = GrafaidOld.getIAP(field);
|
9
|
+
const inputObjectFields = inputObject
|
10
|
+
? (<Box pl='3' style={{ borderLeft: `1px solid var(--gray-6)` }}>
|
11
|
+
<FieldList data={inputObject}/>
|
12
|
+
</Box>)
|
13
|
+
: null;
|
14
|
+
return (<>
|
15
|
+
<Text>(</Text>
|
16
|
+
<Box ml='2'>
|
17
|
+
{field.args.map(arg => <ArgumentAnnotation key={arg.name} data={arg}/>)}
|
18
|
+
{inputObjectFields}
|
19
|
+
</Box>
|
20
|
+
<Text>)</Text>
|
21
|
+
</>);
|
22
|
+
};
|
23
|
+
//# sourceMappingURL=ArgumentListAnnotation.jsx.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"ArgumentListAnnotation.jsx","sourceRoot":"","sources":["../../../src/template/components/ArgumentListAnnotation.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AACnD,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAA;AAG5C,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAA;AAC7D,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAM3C,MAAM,CAAC,MAAM,sBAAsB,GAAc,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE;IAC7D,IAAI,KAAK,CAAC,IAAI,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,IAAI,CAAA;IAExC,MAAM,WAAW,GAAG,UAAU,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;IAC5C,MAAM,iBAAiB,GAAG,WAAW;QACnC,CAAC,CAAC,CACA,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,EAAE,UAAU,EAAE,yBAAyB,EAAE,CAAC,CAC3D;QAAA,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,WAAW,CAAC,EAC/B;MAAA,EAAE,GAAG,CAAC,CACP;QACD,CAAC,CAAC,IAAI,CAAA;IAER,OAAO,CACL,EACE;MAAA,CAAC,IAAI,CAAC,CAAC,EAAE,IAAI,CACb;MAAA,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CACT;QAAA,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,kBAAkB,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,EAAG,CAAC,CACxE;QAAA,CAAC,iBAAiB,CACpB;MAAA,EAAE,GAAG,CACL;MAAA,CAAC,IAAI,CAAC,CAAC,EAAE,IAAI,CACf;IAAA,GAAG,CACJ,CAAA;AACH,CAAC,CAAA"}
|
@@ -0,0 +1,68 @@
|
|
1
|
+
import { Grafaid } from '#lib/grafaid/index';
|
2
|
+
import { Box, Code } from '@radix-ui/themes';
|
3
|
+
import { Graphql } from "./graphql/index.js";
|
4
|
+
export const renderDate = (date) => {
|
5
|
+
return date.toLocaleString(`default`, {
|
6
|
+
month: `long`,
|
7
|
+
year: `numeric`,
|
8
|
+
day: `numeric`,
|
9
|
+
timeZone: `utc`,
|
10
|
+
});
|
11
|
+
};
|
12
|
+
export const Changelog = ({ schema }) => {
|
13
|
+
return (<Box>
|
14
|
+
{schema.versions.map(changeset => <Changeset key={changeset.date.getDate()} changeset={changeset}/>)}
|
15
|
+
</Box>);
|
16
|
+
};
|
17
|
+
const Changeset = ({ changeset }) => {
|
18
|
+
return (<Box>
|
19
|
+
<h1 title={changeset.date.toISOString()}>
|
20
|
+
{renderDate(changeset.date)}
|
21
|
+
</h1>
|
22
|
+
<ul>
|
23
|
+
{changeset.changes.map(change => <Change key={change.message} change={change} schema={changeset.after}/>)}
|
24
|
+
</ul>
|
25
|
+
</Box>);
|
26
|
+
};
|
27
|
+
const Change = ({ change, schema }) => {
|
28
|
+
const getTypeOrThrow = (name) => {
|
29
|
+
const type = schema.getType(name);
|
30
|
+
if (!type)
|
31
|
+
throw new Error(`Type ${name} not found`);
|
32
|
+
return type;
|
33
|
+
};
|
34
|
+
switch (change.type) {
|
35
|
+
case `TYPE_ADDED`: {
|
36
|
+
const type = getTypeOrThrow(change.meta.addedTypeName);
|
37
|
+
return (<li>
|
38
|
+
Added type <Graphql.TypeLink type={type}/>
|
39
|
+
</li>);
|
40
|
+
}
|
41
|
+
case `FIELD_ADDED`: {
|
42
|
+
const rootTypeMap = Grafaid.Schema.getRootTypeMap(schema);
|
43
|
+
const rootDetails = rootTypeMap.list.find(_ => _.name.canonical === change.meta.typeName);
|
44
|
+
const type = getTypeOrThrow(change.meta.typeName);
|
45
|
+
if (rootDetails) {
|
46
|
+
return (<li>
|
47
|
+
Added {rootDetails.operationType}
|
48
|
+
{` `}
|
49
|
+
<Code color='jade' variant='ghost' style={{ borderBottom: `1px dotted var(--jade-6)`, borderRadius: `0` }}>
|
50
|
+
{change.meta.addedFieldName}
|
51
|
+
</Code>
|
52
|
+
</li>);
|
53
|
+
}
|
54
|
+
return (<li>
|
55
|
+
Added field{` `}
|
56
|
+
<Code color='gray' variant='ghost' style={{ borderBottom: `1px dotted var(--gray-6)`, borderRadius: `0` }}>
|
57
|
+
{change.meta.addedFieldName}
|
58
|
+
</Code>
|
59
|
+
{` `}
|
60
|
+
to type{` `}
|
61
|
+
<Graphql.TypeLink type={type}/>.
|
62
|
+
</li>);
|
63
|
+
}
|
64
|
+
default:
|
65
|
+
return <li>TODO: {change.type}</li>;
|
66
|
+
}
|
67
|
+
};
|
68
|
+
//# sourceMappingURL=Changelog.jsx.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"Changelog.jsx","sourceRoot":"","sources":["../../../src/template/components/Changelog.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAA;AAG5C,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAA;AAG5C,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAA;AAE5C,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,IAAU,EAAE,EAAE;IACvC,OAAO,IAAI,CAAC,cAAc,CAAC,SAAS,EAAE;QACpC,KAAK,EAAE,MAAM;QACb,IAAI,EAAE,SAAS;QACf,GAAG,EAAE,SAAS;QACd,QAAQ,EAAE,KAAK;KAChB,CAAC,CAAA;AACJ,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,SAAS,GAA+C,CAAC,EAAE,MAAM,EAAE,EAAE,EAA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AG,EAAE,CAAC,CAEvE;YAAA,CAAC,MAAM,CAAC,IAAI,CAAC,cAAc,CAC7B;UAAA,EAAE,IAAI,CACN;UAAA,CAAC,GAAG,CACJ;iBAAO,CAAC,GAAG,CACX;UAAA,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,EAAG;QAClC,EAAE,EAAE,CAAC,CACN,CAAA;QACH,CAAC;QACD;YACE,OAAO,CAAC,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC,CAAA;IACvC,CAAC;AACH,CAAC,CAAA"}
|
@@ -1,4 +1,3 @@
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
2
1
|
import { highlightCode } from '#lib/shiki/index';
|
3
2
|
import React, { useEffect, useState } from 'react';
|
4
3
|
export const CodeBlock = ({ children, language = `text`, className = ``, showLineNumbers = false, highlightLines = [], diffLines, focusLines = [], showInvisibles = false, }) => {
|
@@ -34,8 +33,10 @@ export const CodeBlock = ({ children, language = `text`, className = ``, showLin
|
|
34
33
|
renderCode();
|
35
34
|
}, [children, language, showLineNumbers, highlightLines, diffLines, focusLines, showInvisibles]);
|
36
35
|
if (isLoading) {
|
37
|
-
return (
|
36
|
+
return (<pre className={className}>
|
37
|
+
<code>{children}</code>
|
38
|
+
</pre>);
|
38
39
|
}
|
39
|
-
return (
|
40
|
+
return (<div className={`code-block ${className}`} dangerouslySetInnerHTML={{ __html: html }}/>);
|
40
41
|
};
|
41
|
-
//# sourceMappingURL=CodeBlock.
|
42
|
+
//# sourceMappingURL=CodeBlock.jsx.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"CodeBlock.
|
1
|
+
{"version":3,"file":"CodeBlock.jsx","sourceRoot":"","sources":["../../../src/template/components/CodeBlock.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAA;AAChD,OAAO,KAAK,EAAE,EAAE,SAAS,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AI,SAAS,EAAE,CAAC;QACd,OAAO,CACL,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC,SAAS,CAAC,CACxB;QAAA,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,EAAE,IAAI,CACxB;MAAA,EAAE,GAAG,CAAC,CACP,CAAA;IACH,CAAC;IAED,OAAO,CACL,CAAC,GAAG,CACF,SAAS,CAAC,CAAC,cAAc,SAAS,EAAE,CAAC,CACrC,uBAAuB,CAAC,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,EAC1C,CACH,CAAA;AACH,CAAC,CAAA"}
|
@@ -0,0 +1,10 @@
|
|
1
|
+
import { Text } from '@radix-ui/themes';
|
2
|
+
import { Markdown } from './Markdown.jsx';
|
3
|
+
export const DeprecationReason = ({ data }) => {
|
4
|
+
if (!data.deprecationReason)
|
5
|
+
return null;
|
6
|
+
return (<Text as='div' color='red'>
|
7
|
+
<Markdown>{data.deprecationReason}</Markdown>
|
8
|
+
</Text>);
|
9
|
+
};
|
10
|
+
//# sourceMappingURL=DeprecationReason.jsx.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"DeprecationReason.jsx","sourceRoot":"","sources":["../../../src/template/components/DeprecationReason.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAA;AAEvC,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AAEzC,MAAM,CAAC,MAAM,iBAAiB,GAA0C,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE;IACnF,IAAI,CAAC,IAAI,CAAC,iBAAiB;QAAE,OAAO,IAAI,CAAA;IAExC,OAAO,CACL,CAAC,IAAI,CAAC,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,KAAK,CACxB;MAAA,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,iBAAiB,CAAC,EAAE,QAAQ,CAC9C;IAAA,EAAE,IAAI,CAAC,CACR,CAAA;AACH,CAAC,CAAA"}
|
@@ -0,0 +1,10 @@
|
|
1
|
+
import { Text } from '@radix-ui/themes';
|
2
|
+
import { Markdown } from './Markdown.jsx';
|
3
|
+
export const Description = ({ data }) => {
|
4
|
+
if (!data.description)
|
5
|
+
return null;
|
6
|
+
return (<Text as='div' color='gray'>
|
7
|
+
<Markdown>{data.description}</Markdown>
|
8
|
+
</Text>);
|
9
|
+
};
|
10
|
+
//# sourceMappingURL=Description.jsx.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"Description.jsx","sourceRoot":"","sources":["../../../src/template/components/Description.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAA;AAEvC,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AAKzC,MAAM,CAAC,MAAM,WAAW,GAA6D,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE;IAChG,IAAI,CAAC,IAAI,CAAC,WAAW;QAAE,OAAO,IAAI,CAAA;IAElC,OAAO,CACL,CAAC,IAAI,CAAC,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,CACzB;MAAA,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE,QAAQ,CACxC;IAAA,EAAE,IAAI,CAAC,CACR,CAAA;AACH,CAAC,CAAA"}
|