polen 0.10.0-next.11 → 0.10.0-next.13
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/build/api/builder/builder.js +1 -1
- package/build/api/builder/builder.js.map +1 -1
- package/build/api/config/load.js +1 -1
- package/build/api/config/load.js.map +1 -1
- package/build/api/vite/plugins/build.js +1 -1
- package/build/api/vite/plugins/build.js.map +1 -1
- package/build/api/vite/plugins/core.d.ts.map +1 -1
- package/build/api/vite/plugins/core.js +0 -2
- package/build/api/vite/plugins/core.js.map +1 -1
- package/build/api/vite/plugins/pages.js +1 -1
- package/build/api/vite/plugins/pages.js.map +1 -1
- package/build/exports/components.d.ts +4 -1
- package/build/exports/components.d.ts.map +1 -1
- package/build/exports/components.js +4 -1
- package/build/exports/components.js.map +1 -1
- package/build/lib/demos/config-schema.d.ts +6 -6
- package/build/lib/github-actions/runner.js +2 -2
- package/build/lib/github-actions/runner.js.map +1 -1
- package/build/lib/graphql-document/$$.d.ts +5 -0
- package/build/lib/graphql-document/$$.d.ts.map +1 -0
- package/build/lib/graphql-document/$$.js +5 -0
- package/build/lib/graphql-document/$$.js.map +1 -0
- package/build/lib/graphql-document/$.d.ts +2 -0
- package/build/lib/graphql-document/$.d.ts.map +1 -0
- package/build/lib/graphql-document/$.js +2 -0
- package/build/lib/graphql-document/$.js.map +1 -0
- package/build/lib/graphql-document/analysis.d.ts +44 -0
- package/build/lib/graphql-document/analysis.d.ts.map +1 -0
- package/build/lib/graphql-document/analysis.js +361 -0
- package/build/lib/graphql-document/analysis.js.map +1 -0
- package/build/lib/graphql-document/components/CopyButton.d.ts +19 -0
- package/build/lib/graphql-document/components/CopyButton.d.ts.map +1 -0
- package/build/lib/graphql-document/components/CopyButton.js +43 -0
- package/build/lib/graphql-document/components/CopyButton.js.map +1 -0
- package/build/lib/graphql-document/components/GraphQLDocument.d.ts +38 -0
- package/build/lib/graphql-document/components/GraphQLDocument.d.ts.map +1 -0
- package/build/lib/graphql-document/components/GraphQLDocument.js +130 -0
- package/build/lib/graphql-document/components/GraphQLDocument.js.map +1 -0
- package/build/lib/graphql-document/components/GraphQLDocumentWithSchema.d.ts +7 -0
- package/build/lib/graphql-document/components/GraphQLDocumentWithSchema.d.ts.map +1 -0
- package/build/lib/graphql-document/components/GraphQLDocumentWithSchema.js +45 -0
- package/build/lib/graphql-document/components/GraphQLDocumentWithSchema.js.map +1 -0
- package/build/lib/graphql-document/components/GraphQLIdentifierPopover.d.ts +33 -0
- package/build/lib/graphql-document/components/GraphQLIdentifierPopover.d.ts.map +1 -0
- package/build/lib/graphql-document/components/GraphQLIdentifierPopover.js +48 -0
- package/build/lib/graphql-document/components/GraphQLIdentifierPopover.js.map +1 -0
- package/build/lib/graphql-document/components/IdentifierLink.d.ts +39 -0
- package/build/lib/graphql-document/components/IdentifierLink.d.ts.map +1 -0
- package/build/lib/graphql-document/components/IdentifierLink.js +75 -0
- package/build/lib/graphql-document/components/IdentifierLink.js.map +1 -0
- package/build/lib/graphql-document/components/graphql-document-styles.d.ts +5 -0
- package/build/lib/graphql-document/components/graphql-document-styles.d.ts.map +1 -0
- package/build/lib/graphql-document/components/graphql-document-styles.js +167 -0
- package/build/lib/graphql-document/components/graphql-document-styles.js.map +1 -0
- package/build/lib/graphql-document/components/index.d.ts +6 -0
- package/build/lib/graphql-document/components/index.d.ts.map +1 -0
- package/build/lib/graphql-document/components/index.js +6 -0
- package/build/lib/graphql-document/components/index.js.map +1 -0
- package/build/lib/graphql-document/example.d.ts +25 -0
- package/build/lib/graphql-document/example.d.ts.map +1 -0
- package/build/lib/graphql-document/example.js +140 -0
- package/build/lib/graphql-document/example.js.map +1 -0
- package/build/lib/graphql-document/graphql-document.d.ts +35 -0
- package/build/lib/graphql-document/graphql-document.d.ts.map +1 -0
- package/build/lib/graphql-document/graphql-document.js +36 -0
- package/build/lib/graphql-document/graphql-document.js.map +1 -0
- package/build/lib/graphql-document/hooks/use-tooltip-state.d.ts +43 -0
- package/build/lib/graphql-document/hooks/use-tooltip-state.d.ts.map +1 -0
- package/build/lib/graphql-document/hooks/use-tooltip-state.js +132 -0
- package/build/lib/graphql-document/hooks/use-tooltip-state.js.map +1 -0
- package/build/lib/graphql-document/positioning-simple.d.ts +68 -0
- package/build/lib/graphql-document/positioning-simple.d.ts.map +1 -0
- package/build/lib/graphql-document/positioning-simple.js +197 -0
- package/build/lib/graphql-document/positioning-simple.js.map +1 -0
- package/build/lib/graphql-document/schema-context.d.ts +8 -0
- package/build/lib/graphql-document/schema-context.d.ts.map +1 -0
- package/build/lib/graphql-document/schema-context.js +11 -0
- package/build/lib/graphql-document/schema-context.js.map +1 -0
- package/build/lib/graphql-document/schema-integration-example.d.ts +27 -0
- package/build/lib/graphql-document/schema-integration-example.d.ts.map +1 -0
- package/build/lib/graphql-document/schema-integration-example.js +297 -0
- package/build/lib/graphql-document/schema-integration-example.js.map +1 -0
- package/build/lib/graphql-document/schema-integration.d.ts +135 -0
- package/build/lib/graphql-document/schema-integration.d.ts.map +1 -0
- package/build/lib/graphql-document/schema-integration.js +328 -0
- package/build/lib/graphql-document/schema-integration.js.map +1 -0
- package/build/lib/graphql-document/types.d.ts +117 -0
- package/build/lib/graphql-document/types.d.ts.map +1 -0
- package/build/lib/graphql-document/types.js +2 -0
- package/build/lib/graphql-document/types.js.map +1 -0
- package/build/template/components/ArgumentAnnotation.js +10 -0
- package/build/template/components/ArgumentAnnotation.js.map +1 -0
- package/build/template/components/ArgumentList.js +9 -0
- package/build/template/components/ArgumentList.js.map +1 -0
- package/build/template/components/ArgumentListAnnotation.js +15 -0
- package/build/template/components/ArgumentListAnnotation.js.map +1 -0
- package/build/template/components/Changelog.js +44 -0
- package/build/template/components/Changelog.js.map +1 -0
- package/build/template/components/{CodeBlock.jsx → CodeBlock.js} +4 -5
- package/build/template/components/{CodeBlock.jsx.map → CodeBlock.js.map} +1 -1
- package/build/template/components/{CodeBlockEnhancer.jsx → CodeBlockEnhancer.js} +4 -4
- package/build/template/components/CodeBlockEnhancer.js.map +1 -0
- package/build/template/components/DeprecationReason.js +9 -0
- package/build/template/components/DeprecationReason.js.map +1 -0
- package/build/template/components/Description.js +9 -0
- package/build/template/components/Description.js.map +1 -0
- package/build/template/components/Field.js +14 -0
- package/build/template/components/Field.js.map +1 -0
- package/build/template/components/{FieldList.jsx → FieldList.js} +4 -5
- package/build/template/components/FieldList.js.map +1 -0
- package/build/template/components/{FieldListSection.jsx → FieldListSection.js} +4 -6
- package/build/template/components/FieldListSection.js.map +1 -0
- package/build/template/components/HamburgerMenu.js +30 -0
- package/build/template/components/HamburgerMenu.js.map +1 -0
- package/build/template/components/Link.d.ts +1 -1
- package/build/template/components/{Link.jsx → Link.js} +4 -5
- package/build/template/components/Link.js.map +1 -0
- package/build/template/components/Logo.js +20 -0
- package/build/template/components/Logo.js.map +1 -0
- package/build/template/components/MDXComponents.d.ts +11 -0
- package/build/template/components/MDXComponents.d.ts.map +1 -0
- package/build/template/components/MDXComponents.js +70 -0
- package/build/template/components/MDXComponents.js.map +1 -0
- package/build/template/components/{Markdown.jsx → Markdown.js} +3 -2
- package/build/template/components/Markdown.js.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.js +5 -0
- package/build/template/components/MissingSchema.js.map +1 -0
- package/build/template/components/NamedType.js +12 -0
- package/build/template/components/NamedType.js.map +1 -0
- package/build/template/components/NotFound.js +7 -0
- package/build/template/components/NotFound.js.map +1 -0
- package/build/template/components/{RadixLink.jsx → RadixLink.js} +1 -1
- package/build/template/components/RadixLink.js.map +1 -0
- package/build/template/components/TestComponent.d.ts +5 -0
- package/build/template/components/TestComponent.d.ts.map +1 -0
- package/build/template/components/TestComponent.js +7 -0
- package/build/template/components/TestComponent.js.map +1 -0
- package/build/template/components/Texts/{MinorHeading.jsx → MinorHeading.js} +4 -3
- package/build/template/components/Texts/MinorHeading.js.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/ThemeToggle.js +9 -0
- package/build/template/components/ThemeToggle.js.map +1 -0
- package/build/template/components/{TypeAnnotation.jsx → TypeAnnotation.js} +8 -18
- package/build/template/components/TypeAnnotation.js.map +1 -0
- package/build/template/components/TypeFieldsLinkList.js +9 -0
- package/build/template/components/TypeFieldsLinkList.js.map +1 -0
- package/build/template/components/TypeIndex.js +17 -0
- package/build/template/components/TypeIndex.js.map +1 -0
- package/build/template/components/content/$$.d.ts +1 -0
- package/build/template/components/content/$$.d.ts.map +1 -1
- package/build/template/components/content/$$.js +1 -0
- package/build/template/components/content/$$.js.map +1 -1
- package/build/template/components/content/GraphQLDocumentWithSchema.d.ts +8 -0
- package/build/template/components/content/GraphQLDocumentWithSchema.d.ts.map +1 -0
- package/build/template/components/content/GraphQLDocumentWithSchema.js +16 -0
- package/build/template/components/content/GraphQLDocumentWithSchema.js.map +1 -0
- package/build/template/components/content/GraphQLDocumentWrapper.d.ts +7 -0
- package/build/template/components/content/GraphQLDocumentWrapper.d.ts.map +1 -0
- package/build/template/components/content/GraphQLDocumentWrapper.js +62 -0
- package/build/template/components/content/GraphQLDocumentWrapper.js.map +1 -0
- package/build/template/components/graphql/graphql.d.ts +2 -2
- package/build/template/components/graphql/graphql.js +3 -0
- package/build/template/components/graphql/graphql.js.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.jsx → type-kind-icon.js} +3 -2
- package/build/template/components/graphql/type-kind-icon.js.map +1 -0
- package/build/template/components/graphql/type-link.js +11 -0
- package/build/template/components/graphql/type-link.js.map +1 -0
- package/build/template/components/sidebar/Sidebar.d.ts +1 -1
- package/build/template/components/sidebar/Sidebar.d.ts.map +1 -1
- package/build/template/components/sidebar/Sidebar.js +11 -0
- package/build/template/components/sidebar/Sidebar.js.map +1 -0
- package/build/template/components/sidebar/{SidebarItem.jsx → SidebarItem.js} +15 -32
- package/build/template/components/sidebar/SidebarItem.js.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.js +5 -0
- package/build/template/components/sidebar/ToggleButton.js.map +1 -0
- package/build/template/contexts/{ThemeContext.jsx → ThemeContext.js} +3 -4
- package/build/template/contexts/{ThemeContext.jsx.map → ThemeContext.js.map} +1 -1
- package/build/template/entry.client.d.ts +1 -0
- package/build/template/entry.client.d.ts.map +1 -1
- package/build/template/{entry.client.jsx → entry.client.js} +5 -6
- package/build/template/entry.client.js.map +1 -0
- package/build/template/routes/changelog.d.ts +1 -1
- package/build/template/routes/{changelog.jsx → changelog.js} +5 -4
- package/build/template/routes/changelog.js.map +1 -0
- package/build/template/routes/{index.jsx → index.js} +3 -2
- package/build/template/routes/index.js.map +1 -0
- package/build/template/routes/reference.$type.$field.d.ts +1 -1
- package/build/template/routes/{reference.$type.$field.jsx → reference.$type.$field.js} +6 -5
- package/build/template/routes/reference.$type.$field.js.map +1 -0
- package/build/template/routes/reference.$type.d.ts +1 -1
- package/build/template/routes/{reference.$type.jsx → reference.$type.js} +6 -5
- package/build/template/routes/reference.$type.js.map +1 -0
- package/build/template/routes/reference.d.ts +2 -2
- package/build/template/routes/{reference.jsx → reference.js} +6 -7
- package/build/template/routes/reference.js.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 → root.js} +46 -88
- package/build/template/routes/root.js.map +1 -0
- package/build/template/routes.js +5 -0
- package/build/template/routes.js.map +1 -0
- package/build/template/server/app.js +1 -1
- package/build/template/server/app.js.map +1 -1
- package/build/template/server/{render-page.jsx → render-page.js} +3 -4
- package/build/template/server/render-page.js.map +1 -0
- package/build/template/server/ssg/generate.js +1 -1
- 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 +57 -8
- package/src/api/vite/plugins/core.ts +0 -3
- package/src/api/vite/plugins/pages.ts +1 -1
- package/src/exports/components.ts +4 -1
- package/src/lib/graphql-document/$$.ts +4 -0
- package/src/lib/graphql-document/$.test.ts +132 -0
- package/src/lib/graphql-document/$.ts +1 -0
- package/src/lib/graphql-document/README.md +102 -0
- package/src/lib/graphql-document/analysis.ts +415 -0
- package/src/lib/graphql-document/components/CopyButton.tsx +76 -0
- package/src/lib/graphql-document/components/GraphQLDocument.tsx +250 -0
- package/src/lib/graphql-document/components/GraphQLDocument.unit.test.ts +188 -0
- package/src/lib/graphql-document/components/GraphQLDocumentWithSchema.tsx +70 -0
- package/src/lib/graphql-document/components/GraphQLIdentifierPopover.tsx +197 -0
- package/src/lib/graphql-document/components/IdentifierLink.tsx +160 -0
- package/src/lib/graphql-document/components/graphql-document-styles.ts +167 -0
- package/src/lib/graphql-document/components/index.ts +5 -0
- package/src/lib/graphql-document/demo.md +155 -0
- package/src/lib/graphql-document/example.ts +163 -0
- package/src/lib/graphql-document/graphql-document.ts +37 -0
- package/src/lib/graphql-document/hooks/use-tooltip-state.test.ts +76 -0
- package/src/lib/graphql-document/hooks/use-tooltip-state.ts +191 -0
- package/src/lib/graphql-document/positioning-simple.test.ts +252 -0
- package/src/lib/graphql-document/positioning-simple.ts +271 -0
- package/src/lib/graphql-document/schema-context.tsx +20 -0
- package/src/lib/graphql-document/schema-integration-example.ts +341 -0
- package/src/lib/graphql-document/schema-integration.test.ts +365 -0
- package/src/lib/graphql-document/schema-integration.ts +497 -0
- package/src/lib/graphql-document/types.ts +129 -0
- 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/CodeBlockEnhancer.tsx +21 -21
- 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 +2 -2
- package/src/template/components/MDXComponents.tsx +101 -0
- package/src/template/components/NamedType.tsx +2 -2
- package/src/template/components/TestComponent.tsx +6 -0
- 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/content/$$.ts +1 -0
- package/src/template/components/content/GraphQLDocumentWithSchema.tsx +18 -0
- package/src/template/components/content/GraphQLDocumentWrapper.tsx +82 -0
- 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/entry.client.tsx +2 -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 +3 -3
- package/src/template/routes/root.tsx +36 -25
- package/src/template/routes.tsx +1 -1
- package/src/template/server/app.ts +1 -1
- package/src/template/server/ssg/generate.ts +1 -1
- 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 +32 -0
- package/build/template/components/ArgumentAnnotation.jsx +0 -16
- package/build/template/components/ArgumentAnnotation.jsx.map +0 -1
- package/build/template/components/ArgumentList.jsx +0 -16
- package/build/template/components/ArgumentList.jsx.map +0 -1
- package/build/template/components/ArgumentListAnnotation.jsx +0 -23
- package/build/template/components/ArgumentListAnnotation.jsx.map +0 -1
- package/build/template/components/Changelog.jsx +0 -68
- package/build/template/components/Changelog.jsx.map +0 -1
- package/build/template/components/CodeBlockEnhancer.jsx.map +0 -1
- package/build/template/components/DeprecationReason.jsx +0 -10
- package/build/template/components/DeprecationReason.jsx.map +0 -1
- package/build/template/components/Description.jsx +0 -10
- package/build/template/components/Description.jsx.map +0 -1
- package/build/template/components/Field.jsx +0 -22
- package/build/template/components/Field.jsx.map +0 -1
- package/build/template/components/FieldList.jsx.map +0 -1
- package/build/template/components/FieldListSection.jsx.map +0 -1
- package/build/template/components/HamburgerMenu.jsx +0 -53
- package/build/template/components/HamburgerMenu.jsx.map +0 -1
- package/build/template/components/Link.jsx.map +0 -1
- package/build/template/components/Logo.jsx +0 -29
- package/build/template/components/Logo.jsx.map +0 -1
- package/build/template/components/Markdown.jsx.map +0 -1
- package/build/template/components/MissingSchema.jsx +0 -4
- package/build/template/components/MissingSchema.jsx.map +0 -1
- package/build/template/components/NamedType.jsx +0 -17
- package/build/template/components/NamedType.jsx.map +0 -1
- package/build/template/components/NotFound.jsx +0 -26
- package/build/template/components/NotFound.jsx.map +0 -1
- package/build/template/components/RadixLink.jsx.map +0 -1
- package/build/template/components/Texts/MinorHeading.jsx.map +0 -1
- package/build/template/components/ThemeToggle.jsx +0 -10
- package/build/template/components/ThemeToggle.jsx.map +0 -1
- package/build/template/components/TypeAnnotation.jsx.map +0 -1
- package/build/template/components/TypeFieldsLinkList.jsx +0 -17
- package/build/template/components/TypeFieldsLinkList.jsx.map +0 -1
- package/build/template/components/TypeIndex.jsx +0 -27
- package/build/template/components/TypeIndex.jsx.map +0 -1
- package/build/template/components/graphql/graphql.jsx +0 -3
- package/build/template/components/graphql/graphql.jsx.map +0 -1
- package/build/template/components/graphql/type-kind-icon.jsx.map +0 -1
- package/build/template/components/graphql/type-link.jsx +0 -16
- package/build/template/components/graphql/type-link.jsx.map +0 -1
- package/build/template/components/sidebar/Sidebar.jsx +0 -15
- package/build/template/components/sidebar/Sidebar.jsx.map +0 -1
- package/build/template/components/sidebar/SidebarItem.jsx.map +0 -1
- package/build/template/components/sidebar/ToggleButton.jsx +0 -6
- package/build/template/components/sidebar/ToggleButton.jsx.map +0 -1
- package/build/template/entry.client.jsx.map +0 -1
- package/build/template/routes/changelog.jsx.map +0 -1
- package/build/template/routes/index.jsx.map +0 -1
- package/build/template/routes/reference.$type.$field.jsx.map +0 -1
- package/build/template/routes/reference.$type.jsx.map +0 -1
- package/build/template/routes/reference.jsx.map +0 -1
- package/build/template/routes/root.jsx.map +0 -1
- package/build/template/routes.jsx +0 -5
- package/build/template/routes.jsx.map +0 -1
- package/build/template/server/render-page.jsx.map +0 -1
@@ -1,43 +1,33 @@
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
1
2
|
import { Text } from '@radix-ui/themes';
|
2
3
|
import { isInputObjectType, isListType, isNamedType, isNonNullType, isScalarType } from 'graphql';
|
3
|
-
import { Link } from
|
4
|
+
import { Link } from "./Link.js";
|
4
5
|
/**
|
5
6
|
* Renders a GraphQL type recursively, with links for named types
|
6
7
|
*/
|
7
8
|
export const TypeAnnotation = ({ type }) => {
|
8
9
|
// Handle NonNull type wrapper
|
9
10
|
if (isNonNullType(type)) {
|
10
|
-
return (
|
11
|
-
<TypeAnnotation type={type.ofType}/>
|
12
|
-
<Text color='gray'>!</Text>
|
13
|
-
</>);
|
11
|
+
return (_jsxs(_Fragment, { children: [_jsx(TypeAnnotation, { type: type.ofType }), _jsx(Text, { color: 'gray', children: "!" })] }));
|
14
12
|
}
|
15
13
|
// Handle List type wrapper
|
16
14
|
if (isListType(type)) {
|
17
|
-
return (
|
18
|
-
<Text color='gray'>[</Text>
|
19
|
-
<TypeAnnotation type={type.ofType}/>
|
20
|
-
<Text color='gray'>]</Text>
|
21
|
-
</>);
|
15
|
+
return (_jsxs(_Fragment, { children: [_jsx(Text, { color: 'gray', children: "[" }), _jsx(TypeAnnotation, { type: type.ofType }), _jsx(Text, { color: 'gray', children: "]" })] }));
|
22
16
|
}
|
23
17
|
// Handle named types
|
24
18
|
if (isNamedType(type)) {
|
25
19
|
const namedType = type;
|
26
20
|
// Handle input object types
|
27
21
|
if (isInputObjectType(namedType)) {
|
28
|
-
return (
|
29
|
-
<Text color='green'>{namedType.name}</Text>
|
30
|
-
</Link>);
|
22
|
+
return (_jsx(Link, { to: `/reference/${namedType.name}`, children: _jsx(Text, { color: 'green', children: namedType.name }) }));
|
31
23
|
}
|
32
24
|
// If it's an expandable type (object or interface), make it a link
|
33
25
|
// if (Grafaid.isExpandableType(namedType)) {
|
34
|
-
return (
|
35
|
-
<Text color={isScalarType(namedType) ? `purple` : `blue`}>{namedType.name}</Text>
|
36
|
-
</Link>);
|
26
|
+
return (_jsx(Link, { to: `/reference/${namedType.name}`, children: _jsx(Text, { color: isScalarType(namedType) ? `purple` : `blue`, children: namedType.name }) }));
|
37
27
|
// For scalar and other non-expandable types, just render the name
|
38
28
|
// return <Text color="purple">{namedType.name}</Text>
|
39
29
|
}
|
40
30
|
// Fallback for any other case (shouldn't happen in standard GraphQL usage)
|
41
|
-
return
|
31
|
+
return _jsx(Text, { children: String(type) });
|
42
32
|
};
|
43
|
-
//# sourceMappingURL=TypeAnnotation.
|
33
|
+
//# sourceMappingURL=TypeAnnotation.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"TypeAnnotation.js","sourceRoot":"","sources":["../../../src/template/components/TypeAnnotation.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAA;AAEvC,OAAO,EAAE,iBAAiB,EAAE,UAAU,EAAE,WAAW,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAEjG,OAAO,EAAE,IAAI,EAAE,MAAM,WAAY,CAAA;AAMjC;;GAEG;AACH,MAAM,CAAC,MAAM,cAAc,GAAc,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE;IACpD,8BAA8B;IAC9B,IAAI,aAAa,CAAC,IAAI,CAAC,EAAE,CAAC;QACxB,OAAO,CACL,8BACE,KAAC,cAAc,IAAC,IAAI,EAAE,IAAI,CAAC,MAAM,GAAI,EACrC,KAAC,IAAI,IAAC,KAAK,EAAC,MAAM,kBAAS,IAC1B,CACJ,CAAA;IACH,CAAC;IAED,2BAA2B;IAC3B,IAAI,UAAU,CAAC,IAAI,CAAC,EAAE,CAAC;QACrB,OAAO,CACL,8BACE,KAAC,IAAI,IAAC,KAAK,EAAC,MAAM,kBAAS,EAC3B,KAAC,cAAc,IAAC,IAAI,EAAE,IAAI,CAAC,MAAM,GAAI,EACrC,KAAC,IAAI,IAAC,KAAK,EAAC,MAAM,kBAAS,IAC1B,CACJ,CAAA;IACH,CAAC;IAED,qBAAqB;IACrB,IAAI,WAAW,CAAC,IAAI,CAAC,EAAE,CAAC;QACtB,MAAM,SAAS,GAAG,IAAI,CAAA;QAEtB,4BAA4B;QAC5B,IAAI,iBAAiB,CAAC,SAAS,CAAC,EAAE,CAAC;YACjC,OAAO,CACL,KAAC,IAAI,IACH,EAAE,EAAE,cAAc,SAAS,CAAC,IAAI,EAAE,YAElC,KAAC,IAAI,IAAC,KAAK,EAAC,OAAO,YAAE,SAAS,CAAC,IAAI,GAAQ,GACtC,CACR,CAAA;QACH,CAAC;QAED,mEAAmE;QACnE,6CAA6C;QAC7C,OAAO,CACL,KAAC,IAAI,IAAC,EAAE,EAAE,cAAc,SAAS,CAAC,IAAI,EAAE,YACtC,KAAC,IAAI,IAAC,KAAK,EAAE,YAAY,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,YAAG,SAAS,CAAC,IAAI,GAAQ,GAC5E,CACR,CAAA;QAED,kEAAkE;QAClE,sDAAsD;IACxD,CAAC;IAED,2EAA2E;IAC3E,OAAO,KAAC,IAAI,cAAE,MAAM,CAAC,IAAI,CAAC,GAAQ,CAAA;AACpC,CAAC,CAAA"}
|
@@ -0,0 +1,9 @@
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
2
|
+
import { Box, Flex, Heading } from '@radix-ui/themes';
|
3
|
+
import { Link } from "./Link.js";
|
4
|
+
export const TypeFieldsLinkList = ({ type }) => {
|
5
|
+
return ((_jsxs(Box, { children: [_jsx(Heading, { children: type.name }), _jsx(Flex, { direction: 'column', children: Object.values(type.getFields()).map(field => {
|
6
|
+
return ((_jsx(Box, { children: _jsx(Link, { to: `/reference/${type.name}/${field.name}`, children: field.name }) }, field.name)));
|
7
|
+
}) })] })));
|
8
|
+
};
|
9
|
+
//# sourceMappingURL=TypeFieldsLinkList.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"TypeFieldsLinkList.js","sourceRoot":"","sources":["../../../src/template/components/TypeFieldsLinkList.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAA;AAGrD,OAAO,EAAE,IAAI,EAAE,MAAM,WAAY,CAAA;AAMjC,MAAM,CAAC,MAAM,kBAAkB,GAAc,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE;IACxD,OAAO,CACL,CACE,MAAC,GAAG,eACF,KAAC,OAAO,cAAE,IAAI,CAAC,IAAI,GAAW,EAC9B,KAAC,IAAI,IAAC,SAAS,EAAC,QAAQ,YACrB,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,SAAS,EAAE,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE;oBAC3C,OAAO,CACL,CACE,KAAC,GAAG,cACF,KAAC,IAAI,IACH,EAAE,EAAE,cAAc,IAAI,CAAC,IAAI,IAAI,KAAK,CAAC,IAAI,EAAE,YAI1C,KAAK,CAAC,IAAI,GACN,IAPC,KAAK,CAAC,IAAI,CAQd,CACP,CACF,CAAA;gBACH,CAAC,CAAC,GACG,IACH,CACP,CACF,CAAA;AACH,CAAC,CAAA"}
|
@@ -0,0 +1,17 @@
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
2
|
+
import { GrafaidOld } from '#lib/grafaid-old/index';
|
3
|
+
import { Box, Flex, Heading } from '@radix-ui/themes';
|
4
|
+
import { Obj } from '@wollybeard/kit';
|
5
|
+
import { Link } from "./Link.js";
|
6
|
+
export const TypeIndex = ({ schema }) => {
|
7
|
+
const kindMap = GrafaidOld.getKindMap(schema);
|
8
|
+
const sections = Obj.entries(kindMap.list);
|
9
|
+
return (_jsx(Flex, { direction: 'column', gap: '6', children: sections.map(([title, types]) => _jsx(TypeSection, { title: title, types: types }, title)) }));
|
10
|
+
};
|
11
|
+
const TypeSection = ({ title, types }) => {
|
12
|
+
return (_jsxs(Box, { children: [_jsx(Heading, { size: '3', children: title }), _jsx(TypeList, { types: types })] }));
|
13
|
+
};
|
14
|
+
const TypeList = ({ types }) => {
|
15
|
+
return ((_jsx(Box, { children: types.map(type => (_jsx(Box, { children: _jsx(Link, { to: `/reference/${type.name}`, children: type.name }) }, type.name))) })));
|
16
|
+
};
|
17
|
+
//# sourceMappingURL=TypeIndex.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"TypeIndex.js","sourceRoot":"","sources":["../../../src/template/components/TypeIndex.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AACnD,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAA;AACrD,OAAO,EAAE,GAAG,EAAE,MAAM,iBAAiB,CAAA;AAGrC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAY,CAAA;AAMjC,MAAM,CAAC,MAAM,SAAS,GAAc,CAAC,EAAE,MAAM,EAAE,EAAE,EAAE;IACjD,MAAM,OAAO,GAAG,UAAU,CAAC,UAAU,CAAC,MAAM,CAAC,CAAA;IAC7C,MAAM,QAAQ,GAAG,GAAG,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,CAAA;IAE1C,OAAO,CACL,KAAC,IAAI,IAAC,SAAS,EAAC,QAAQ,EAAC,GAAG,EAAC,GAAG,YAC7B,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC,KAAC,WAAW,IAAa,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,IAAjC,KAAK,CAAgC,CAAC,GACrF,CACR,CAAA;AACH,CAAC,CAAA;AAED,MAAM,WAAW,GAAqD,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,EAAE;IACzF,OAAO,CACL,MAAC,GAAG,eACF,KAAC,OAAO,IAAC,IAAI,EAAC,GAAG,YAAE,KAAK,GAAW,EACnC,KAAC,QAAQ,IAAC,KAAK,EAAE,KAAK,GAAI,IACtB,CACP,CAAA;AACH,CAAC,CAAA;AAED,MAAM,QAAQ,GAAsC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE;IAChE,OAAO,CACL,CACE,KAAC,GAAG,cACD,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,CACjB,KAAC,GAAG,cACF,KAAC,IAAI,IAAC,EAAE,EAAE,cAAc,IAAI,CAAC,IAAI,EAAE,YAChC,IAAI,CAAC,IAAI,GACL,IAHC,IAAI,CAAC,IAAI,CAIb,CACP,CAAC,GACE,CACP,CACF,CAAA;AACH,CAAC,CAAA"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"$$.d.ts","sourceRoot":"","sources":["../../../../src/template/components/content/$$.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAA"}
|
1
|
+
{"version":3,"file":"$$.d.ts","sourceRoot":"","sources":["../../../../src/template/components/content/$$.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAA;AAChD,OAAO,EAAE,yBAAyB,EAAE,MAAM,iCAAiC,CAAA"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"$$.js","sourceRoot":"","sources":["../../../../src/template/components/content/$$.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAA"}
|
1
|
+
{"version":3,"file":"$$.js","sourceRoot":"","sources":["../../../../src/template/components/content/$$.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAA;AAChD,OAAO,EAAE,yBAAyB,EAAE,MAAM,gCAAiC,CAAA"}
|
@@ -0,0 +1,8 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import type { GraphQLDocumentProps } from '../../../lib/graphql-document/components/GraphQLDocument.tsx';
|
3
|
+
/**
|
4
|
+
* Wrapper component that provides schema from virtual module directly to GraphQLDocument
|
5
|
+
* This bypasses the context issue with MDX components
|
6
|
+
*/
|
7
|
+
export declare const GraphQLDocumentWithSchema: React.FC<Omit<GraphQLDocumentProps, 'schema'>>;
|
8
|
+
//# sourceMappingURL=GraphQLDocumentWithSchema.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"GraphQLDocumentWithSchema.d.ts","sourceRoot":"","sources":["../../../../src/template/components/content/GraphQLDocumentWithSchema.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,8DAA8D,CAAA;AAExG;;;GAGG;AACH,eAAO,MAAM,yBAAyB,EAAE,KAAK,CAAC,EAAE,CAAC,IAAI,CAAC,oBAAoB,EAAE,QAAQ,CAAC,CAOpF,CAAA"}
|
@@ -0,0 +1,16 @@
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
2
|
+
import React from 'react';
|
3
|
+
import PROJECT_DATA from 'virtual:polen/project/data.jsonsuper';
|
4
|
+
import { GraphQLDocument } from "../../../lib/graphql-document/components/GraphQLDocument.js";
|
5
|
+
/**
|
6
|
+
* Wrapper component that provides schema from virtual module directly to GraphQLDocument
|
7
|
+
* This bypasses the context issue with MDX components
|
8
|
+
*/
|
9
|
+
export const GraphQLDocumentWithSchema = (props) => {
|
10
|
+
const schema = PROJECT_DATA.schema?.versions[0]?.after;
|
11
|
+
console.log('Template wrapper - schema:', schema ? 'EXISTS' : 'UNDEFINED');
|
12
|
+
console.log('Template wrapper - props:', props);
|
13
|
+
console.log('Template wrapper - PROJECT_DATA.schema:', PROJECT_DATA.schema);
|
14
|
+
return _jsx(GraphQLDocument, { ...props, schema: schema });
|
15
|
+
};
|
16
|
+
//# sourceMappingURL=GraphQLDocumentWithSchema.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"GraphQLDocumentWithSchema.js","sourceRoot":"","sources":["../../../../src/template/components/content/GraphQLDocumentWithSchema.tsx"],"names":[],"mappings":";AACA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,YAAY,MAAM,sCAAsC,CAAA;AAC/D,OAAO,EAAE,eAAe,EAAE,MAAM,6DAA8D,CAAA;AAG9F;;;GAGG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAmD,CAAC,KAAK,EAAE,EAAE;IACjG,MAAM,MAAM,GAAG,YAAY,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC,EAAE,KAAK,CAAA;IACtD,OAAO,CAAC,GAAG,CAAC,4BAA4B,EAAE,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,WAAW,CAAC,CAAA;IAC1E,OAAO,CAAC,GAAG,CAAC,2BAA2B,EAAE,KAAK,CAAC,CAAA;IAC/C,OAAO,CAAC,GAAG,CAAC,yCAAyC,EAAE,YAAY,CAAC,MAAM,CAAC,CAAA;IAE3E,OAAO,KAAC,eAAe,OAAK,KAAK,EAAE,MAAM,EAAE,MAAM,GAAI,CAAA;AACvD,CAAC,CAAA"}
|
@@ -0,0 +1,7 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import type { GraphQLDocumentProps } from '../../../lib/graphql-document/components/GraphQLDocument.tsx';
|
3
|
+
/**
|
4
|
+
* Client-side wrapper that hydrates GraphQL documents with schema
|
5
|
+
*/
|
6
|
+
export declare const GraphQLDocumentWithSchema: React.FC<Omit<GraphQLDocumentProps, 'schema'>>;
|
7
|
+
//# sourceMappingURL=GraphQLDocumentWrapper.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"GraphQLDocumentWrapper.d.ts","sourceRoot":"","sources":["../../../../src/template/components/content/GraphQLDocumentWrapper.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,8DAA8D,CAAA;AAGxG;;GAEG;AACH,eAAO,MAAM,yBAAyB,EAAE,KAAK,CAAC,EAAE,CAAC,IAAI,CAAC,oBAAoB,EAAE,QAAQ,CAAC,CAwEpF,CAAA"}
|
@@ -0,0 +1,62 @@
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
2
|
+
import React from 'react';
|
3
|
+
import { useNavigate } from 'react-router';
|
4
|
+
import { GraphQLDocument } from "../../../lib/graphql-document/components/GraphQLDocument.js";
|
5
|
+
import { highlightCode } from "../../../lib/shiki/shiki.js";
|
6
|
+
/**
|
7
|
+
* Client-side wrapper that hydrates GraphQL documents with schema
|
8
|
+
*/
|
9
|
+
export const GraphQLDocumentWithSchema = (props) => {
|
10
|
+
try {
|
11
|
+
const [schema, setSchema] = React.useState(null);
|
12
|
+
const [isClient, setIsClient] = React.useState(false);
|
13
|
+
const [highlightedHtml, setHighlightedHtml] = React.useState(null);
|
14
|
+
React.useEffect(() => {
|
15
|
+
setIsClient(true);
|
16
|
+
// Highlight the code
|
17
|
+
if (typeof props.children === 'string') {
|
18
|
+
highlightCode({
|
19
|
+
code: props.children,
|
20
|
+
lang: 'graphql',
|
21
|
+
theme: 'light', // You can make this dynamic based on theme
|
22
|
+
}).then(html => {
|
23
|
+
setHighlightedHtml(html);
|
24
|
+
}).catch(err => {
|
25
|
+
console.error('Failed to highlight code:', err);
|
26
|
+
});
|
27
|
+
}
|
28
|
+
// Access virtual module only on client side
|
29
|
+
if (typeof window !== 'undefined') {
|
30
|
+
import('virtual:polen/project/data.jsonsuper').then(PROJECT_DATA => {
|
31
|
+
const s = PROJECT_DATA.default?.schema?.versions?.[0]?.after;
|
32
|
+
if (s) {
|
33
|
+
setSchema(s);
|
34
|
+
}
|
35
|
+
}).catch(err => {
|
36
|
+
console.error('Failed to load schema:', err);
|
37
|
+
});
|
38
|
+
}
|
39
|
+
}, [props.children]);
|
40
|
+
// During SSR, render a simple code block
|
41
|
+
if (!isClient) {
|
42
|
+
return (_jsx("div", { "data-testid": 'graphql-document', className: 'graphql-document graphql-document-static', children: _jsx("pre", { className: 'shiki shiki-themes github-light tokyo-night', children: _jsx("code", { className: "language-graphql", children: props.children }) }) }));
|
43
|
+
}
|
44
|
+
// During client render, use the full component
|
45
|
+
// Pass a custom navigate function that doesn't require router
|
46
|
+
const handleNavigate = (url) => {
|
47
|
+
if (typeof window !== 'undefined') {
|
48
|
+
window.location.href = url;
|
49
|
+
}
|
50
|
+
};
|
51
|
+
return (_jsx("div", { "data-testid": 'graphql-document', children: _jsx(GraphQLDocument, { ...props, schema: schema, highlightedHtml: highlightedHtml || undefined, options: {
|
52
|
+
...props.options,
|
53
|
+
onNavigate: handleNavigate,
|
54
|
+
debug: false, // Disable debug mode for shipping
|
55
|
+
} }) }));
|
56
|
+
}
|
57
|
+
catch (err) {
|
58
|
+
console.error('GraphQLDocumentWithSchema error:', err);
|
59
|
+
return _jsx("div", { children: "Error rendering GraphQL document" });
|
60
|
+
}
|
61
|
+
};
|
62
|
+
//# sourceMappingURL=GraphQLDocumentWrapper.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"GraphQLDocumentWrapper.js","sourceRoot":"","sources":["../../../../src/template/components/content/GraphQLDocumentWrapper.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAA;AAC1C,OAAO,EAAE,eAAe,EAAE,MAAM,6DAA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ind-icon.tsx';
|
2
|
+
export * from './type-link.tsx';
|
3
3
|
//# sourceMappingURL=graphql.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"graphql.js","sourceRoot":"","sources":["../../../../src/template/components/graphql/graphql.tsx"],"names":[],"mappings":"AAAA,cAAc,qBAAsB,CAAA;AACpC,cAAc,gBAAiB,CAAA"}
|
@@ -1,2 +1,2 @@
|
|
1
|
-
export * as Graphql from './graphql.
|
1
|
+
export * as Graphql from './graphql.tsx';
|
2
2
|
//# sourceMappingURL=index.d.ts.map
|
@@ -1,2 +1,2 @@
|
|
1
|
-
export * as Graphql from
|
1
|
+
export * as Graphql from "./graphql.js";
|
2
2
|
//# sourceMappingURL=index.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/template/components/graphql/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,OAAO,MAAM,
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/template/components/graphql/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,OAAO,MAAM,cAAe,CAAA"}
|
@@ -1,8 +1,9 @@
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
1
2
|
import { Code } from '@radix-ui/themes';
|
2
3
|
import { typeKindTokensIndex, unknownTypeKindToken } from "./type-kind-tokens.js";
|
3
4
|
export const TypeKindIcon = ({ kind }) => {
|
4
5
|
// eslint-disable-next-line
|
5
6
|
const { symbol, color } = typeKindTokensIndex[kind] ?? unknownTypeKindToken;
|
6
|
-
return
|
7
|
+
return _jsx(Code, { color: color, weight: 'bold', variant: 'outline', children: symbol });
|
7
8
|
};
|
8
|
-
//# sourceMappingURL=type-kind-icon.
|
9
|
+
//# sourceMappingURL=type-kind-icon.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"type-kind-icon.js","sourceRoot":"","sources":["../../../../src/template/components/graphql/type-kind-icon.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAA;AACvC,OAAO,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAA;AAEjF,MAAM,CAAC,MAAM,YAAY,GAAoD,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE;IACxF,2BAA2B;IAC3B,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,mBAAmB,CAAC,IAAI,CAAC,IAAI,oBAAoB,CAAA;IAE3E,OAAO,KAAC,IAAI,IAAC,KAAK,EAAE,KAAK,EAAE,MAAM,EAAC,MAAM,EAAC,OAAO,EAAC,SAAS,YAAE,MAAM,GAAQ,CAAA;AAC5E,CAAC,CAAA"}
|
@@ -0,0 +1,11 @@
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
2
|
+
import { Grafaid } from '#lib/grafaid/index';
|
3
|
+
import { Code, Flex } from '@radix-ui/themes';
|
4
|
+
import { Link } from "../Link.js";
|
5
|
+
import { TypeKindIcon } from "./graphql.js";
|
6
|
+
import { typeKindTokensIndex } from "./type-kind-tokens.js";
|
7
|
+
export const TypeLink = ({ type }) => {
|
8
|
+
const kind = Grafaid.Schema.typeKindFromClass(type);
|
9
|
+
return (_jsx(Link, { to: `/reference/${type.name}`, children: _jsxs(Flex, { align: 'center', gap: '1', display: 'inline-flex', children: [_jsx(TypeKindIcon, { kind: kind }), ` `, _jsx(Code, { color: typeKindTokensIndex[kind].color, variant: 'ghost', children: type.name })] }) }));
|
10
|
+
};
|
11
|
+
//# sourceMappingURL=type-link.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"type-link.js","sourceRoot":"","sources":["../../../../src/template/components/graphql/type-link.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAA;AAC5C,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAA;AAC7C,OAAO,EAAE,IAAI,EAAE,MAAM,YAAa,CAAA;AAClC,OAAO,EAAE,YAAY,EAAE,MAAM,cAAe,CAAA;AAC5C,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAA;AAE3D,MAAM,CAAC,MAAM,QAAQ,GAAuD,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE;IACvF,MAAM,IAAI,GAAG,OAAO,CAAC,MAAM,CAAC,iBAAiB,CAAC,IAAI,CAAC,CAAA;IACnD,OAAO,CACL,KAAC,IAAI,IAAC,EAAE,EAAE,cAAc,IAAI,CAAC,IAAI,EAAE,YACjC,MAAC,IAAI,IAAC,KAAK,EAAC,QAAQ,EAAC,GAAG,EAAC,GAAG,EAAC,OAAO,EAAC,aAAa,aAChD,KAAC,YAAY,IAAC,IAAI,EAAE,IAAI,GAAI,EAC3B,GAAG,EACJ,KAAC,IAAI,IAAC,KAAK,EAAE,mBAAmB,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,OAAO,EAAC,OAAO,YAAE,IAAI,CAAC,IAAI,GAAQ,IAC3E,GACF,CACR,CAAA;AACH,CAAC,CAAA"}
|
@@ -4,6 +4,6 @@ interface SidebarProps extends LayoutProps, MarginProps, BoxOwnProps {
|
|
4
4
|
data: Content.Item[];
|
5
5
|
style?: React.CSSProperties;
|
6
6
|
}
|
7
|
-
export declare const Sidebar: ({ data, ...props }: SidebarProps) => import("react").JSX.Element;
|
7
|
+
export declare const Sidebar: ({ data, ...props }: SidebarProps) => import("react/jsx-runtime").JSX.Element;
|
8
8
|
export {};
|
9
9
|
//# sourceMappingURL=Sidebar.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Sidebar.d.ts","sourceRoot":"","sources":["../../../../src/template/components/sidebar/Sidebar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAA;AAE7C,OAAO,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAA;AAGnF,UAAU,YAAa,SAAQ,WAAW,EAAE,WAAW,EAAE,WAAW;IAClE,IAAI,EAAE,OAAO,CAAC,IAAI,EAAE,CAAA;IACpB,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAA;CAC5B;AAED,eAAO,MAAM,OAAO,GAAI,oBAAoB,YAAY,
|
1
|
+
{"version":3,"file":"Sidebar.d.ts","sourceRoot":"","sources":["../../../../src/template/components/sidebar/Sidebar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAA;AAE7C,OAAO,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAA;AAGnF,UAAU,YAAa,SAAQ,WAAW,EAAE,WAAW,EAAE,WAAW;IAClE,IAAI,EAAE,OAAO,CAAC,IAAI,EAAE,CAAA;IACpB,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAA;CAC5B;AAED,eAAO,MAAM,OAAO,GAAI,oBAAoB,YAAY,4CAiBvD,CAAA"}
|
@@ -0,0 +1,11 @@
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
2
|
+
import { Box } from '@radix-ui/themes';
|
3
|
+
import { Items } from "./SidebarItem.js";
|
4
|
+
export const Sidebar = ({ data, ...props }) => {
|
5
|
+
return (_jsxs(Box, { "data-testid": 'sidebar', role: 'Sidebar', ...props, children: [_jsx("style", { children: `
|
6
|
+
div[role="Sidebar"] a:not([data-active]):hover {
|
7
|
+
background-color: var(--iris-2) !important;
|
8
|
+
}
|
9
|
+
` }), _jsx(Items, { items: data })] }));
|
10
|
+
};
|
11
|
+
//# sourceMappingURL=Sidebar.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"Sidebar.js","sourceRoot":"","sources":["../../../../src/template/components/sidebar/Sidebar.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAA;AAEtC,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAmB,CAAA;AAOzC,MAAM,CAAC,MAAM,OAAO,GAAG,CAAC,EAAE,IAAI,EAAE,GAAG,KAAK,EAAgB,EAAE,EAAE;IAC1D,OAAO,CACL,MAAC,GAAG,mBACU,SAAS,EACrB,IAAI,EAAC,SAAS,KACV,KAAK,aAET,0BACG;;;;SAIA,GACK,EACR,KAAC,KAAK,IAAC,KAAK,EAAE,IAAI,GAAI,IAClB,CACP,CAAA;AACH,CAAC,CAAA"}
|
@@ -1,11 +1,10 @@
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
1
2
|
import { Texts } from '#template/components/Texts/index';
|
2
3
|
import { Box, Flex } from '@radix-ui/themes';
|
3
4
|
import { useLocation } from 'react-router';
|
4
|
-
import { getPathActiveReport, Link } from "../Link.
|
5
|
+
import { getPathActiveReport, Link } from "../Link.js";
|
5
6
|
export const Items = ({ items }) => {
|
6
|
-
return (
|
7
|
-
{items.map((item, index) => (<Item key={`${item.pathExp}-${index}`} item={item}/>))}
|
8
|
-
</Flex>);
|
7
|
+
return (_jsx(Flex, { direction: 'column', gap: '2px', children: items.map((item, index) => (_jsx(Item, { item: item }, `${item.pathExp}-${index}`))) }));
|
9
8
|
};
|
10
9
|
//
|
11
10
|
//
|
@@ -16,12 +15,12 @@ export const Items = ({ items }) => {
|
|
16
15
|
//
|
17
16
|
export const Item = ({ item }) => {
|
18
17
|
if (item.type === `ItemLink`) {
|
19
|
-
return
|
18
|
+
return _jsx(SBLink, { link: item });
|
20
19
|
}
|
21
20
|
if (item.type === 'ItemSection' && item.isLinkToo) {
|
22
|
-
return
|
21
|
+
return _jsx(LinkedSection, { section: item });
|
23
22
|
}
|
24
|
-
return
|
23
|
+
return _jsx(Section, { section: item });
|
25
24
|
};
|
26
25
|
//
|
27
26
|
//
|
@@ -34,15 +33,13 @@ const SBLink = ({ link }) => {
|
|
34
33
|
const location = useLocation();
|
35
34
|
const currentPathExp = location.pathname;
|
36
35
|
const active = getPathActiveReport(link.pathExp, currentPathExp);
|
37
|
-
return (
|
36
|
+
return (_jsx(Link, { role: 'Sidebar Link', color: active.is ? `iris` : `gray`, "data-testid": `sidebar-link-${link.pathExp}`, to: `/${link.pathExp}`, style: {
|
38
37
|
display: `block`,
|
39
38
|
textDecoration: `none`,
|
40
39
|
color: active.is ? `var(--accent-12)` : undefined,
|
41
40
|
backgroundColor: active.isDirect ? `var(--accent-2)` : active.isdescendant ? `var(--accent-1)` : `transparent`,
|
42
41
|
borderRadius: `var(--radius-2)`,
|
43
|
-
}}
|
44
|
-
<Box py='2' px='4'>{link.title}</Box>
|
45
|
-
</Link>);
|
42
|
+
}, children: _jsx(Box, { py: '2', px: '4', children: link.title }) }));
|
46
43
|
};
|
47
44
|
//
|
48
45
|
//
|
@@ -52,14 +49,7 @@ const SBLink = ({ link }) => {
|
|
52
49
|
//
|
53
50
|
//
|
54
51
|
const Section = ({ section }) => {
|
55
|
-
return (
|
56
|
-
<Box ml='4' mb='2'>
|
57
|
-
<Texts.MinorHeading color='gray'>
|
58
|
-
{section.title}
|
59
|
-
</Texts.MinorHeading>
|
60
|
-
</Box>
|
61
|
-
<Items items={section.links}/>
|
62
|
-
</Box>);
|
52
|
+
return (_jsxs(Box, { mt: '8', children: [_jsx(Box, { ml: '4', mb: '2', children: _jsx(Texts.MinorHeading, { color: 'gray', children: section.title }) }), _jsx(Items, { items: section.links })] }));
|
63
53
|
};
|
64
54
|
//
|
65
55
|
//
|
@@ -69,26 +59,19 @@ const Section = ({ section }) => {
|
|
69
59
|
//
|
70
60
|
//
|
71
61
|
const LinkedSection = ({ section }) => {
|
72
|
-
return (
|
73
|
-
|
74
|
-
|
75
|
-
borderLeft: `1px solid var(--gray-5)`,
|
76
|
-
}}>
|
77
|
-
{section.links.map((link, index) => (<SectionLink key={`${link.pathExp}-${index}`} link={link}/>))}
|
78
|
-
</Flex>}
|
79
|
-
</Box>);
|
62
|
+
return (_jsxs(Box, { children: [_jsx(SBLink, { link: section }), _jsx(Flex, { direction: 'column', gap: '2', id: `section-${section.pathExp.replace(/\//g, '-')}`, role: 'group', ml: '5', py: '2px', style: {
|
63
|
+
borderLeft: `1px solid var(--gray-5)`,
|
64
|
+
}, children: section.links.map((link, index) => (_jsx(SectionLink, { link: link }, `${link.pathExp}-${index}`))) })] }));
|
80
65
|
};
|
81
66
|
const SectionLink = ({ link }) => {
|
82
67
|
const location = useLocation();
|
83
68
|
const active = getPathActiveReport(link.pathExp, location.pathname);
|
84
|
-
return (
|
69
|
+
return (_jsx(Link, { role: 'Sidebar Link', to: '/' + link.pathExp, color: active.is ? `iris` : `gray`, style: {
|
85
70
|
textDecoration: `none`,
|
86
71
|
color: active.is ? `var(--accent-12)` : undefined,
|
87
72
|
backgroundColor: active.isDirect ? `var(--accent-2)` : active.isdescendant ? `var(--accent-1)` : `transparent`,
|
88
73
|
borderBottomRightRadius: `var(--radius-2)`,
|
89
74
|
borderTopRightRadius: `var(--radius-2)`,
|
90
|
-
}}
|
91
|
-
<Box py='2' px='4'>{link.title}</Box>
|
92
|
-
</Link>);
|
75
|
+
}, children: _jsx(Box, { py: '2', px: '4', children: link.title }) }));
|
93
76
|
};
|
94
|
-
//# sourceMappingURL=SidebarItem.
|
77
|
+
//# sourceMappingURL=SidebarItem.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"SidebarItem.js","sourceRoot":"","sources":["../../../../src/template/components/sidebar/SidebarItem.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,KAAK,EAAE,MAAM,kCAAkC,CAAA;AACxD,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAA;AAC5C,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAA;AAC1C,OAAO,EAAE,mBAAmB,EAAE,IAAI,EAAE,MAAM,YAAa,CAAA;AAEvD,MAAM,CAAC,MAAM,KAAK,GAAwC,CAAC,EAAE,K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oBAAoB,EAAE,iBAAiB;SACxC,YAED,KAAC,GAAG,IAAC,EAAE,EAAC,GAAG,EAAC,EAAE,EAAC,GAAG,YAAE,IAAI,CAAC,KAAK,GAAO,GAChC,CACR,CAAA;AACH,CAAC,CAAA"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ToggleButton.d.ts","sourceRoot":"","sources":["../../../../src/template/components/sidebar/ToggleButton.tsx"],"names":[],"mappings":"AAGA,eAAO,MAAM,YAAY,GAAI,gCAAgC;IAAE,UAAU,EAAE,OAAO,CAAC;IAAC,cAAc,EAAE,MAAM,IAAI,CAAA;CAAE,
|
1
|
+
{"version":3,"file":"ToggleButton.d.ts","sourceRoot":"","sources":["../../../../src/template/components/sidebar/ToggleButton.tsx"],"names":[],"mappings":"AAGA,eAAO,MAAM,YAAY,GAAI,gCAAgC;IAAE,UAAU,EAAE,OAAO,CAAC;IAAC,cAAc,EAAE,MAAM,IAAI,CAAA;CAAE,4CAQ/G,CAAA"}
|
@@ -0,0 +1,5 @@
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
2
|
+
import { ChevronDownIcon, ChevronRightIcon } from '@radix-ui/react-icons';
|
3
|
+
import { Button } from '@radix-ui/themes';
|
4
|
+
export const ToggleButton = ({ isExpanded, toggleExpanded }) => (_jsx(Button, { variant: 'ghost', onClick: toggleExpanded, "aria-expanded": isExpanded, children: isExpanded ? _jsx(ChevronDownIcon, {}) : _jsx(ChevronRightIcon, {}) }));
|
5
|
+
//# sourceMappingURL=ToggleButton.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"ToggleButton.js","sourceRoot":"","sources":["../../../../src/template/components/sidebar/ToggleButton.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AACzE,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAA;AAEzC,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,EAAE,UAAU,EAAE,cAAc,EAAuD,EAAE,EAAE,CAAC,CACnH,KAAC,MAAM,IACL,OAAO,EAAC,OAAO,EACf,OAAO,EAAE,cAAc,mBACR,UAAU,YAExB,UAAU,CAAC,CAAC,CAAC,KAAC,eAAe,KAAG,CAAC,CAAC,CAAC,KAAC,gBAAgB,KAAG,GACjD,CACV,CAAA"}
|
@@ -1,3 +1,4 @@
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
1
2
|
import { createContext, useContext, useEffect, useState } from 'react';
|
2
3
|
const ThemeContext = createContext(undefined);
|
3
4
|
const THEME_STORAGE_KEY = 'polen-theme-preference';
|
@@ -27,9 +28,7 @@ export const ThemeProvider = ({ children }) => {
|
|
27
28
|
const toggleTheme = () => {
|
28
29
|
setAppearance(prev => prev === 'light' ? 'dark' : 'light');
|
29
30
|
};
|
30
|
-
return (
|
31
|
-
{children}
|
32
|
-
</ThemeContext.Provider>);
|
31
|
+
return (_jsx(ThemeContext.Provider, { value: { appearance, toggleTheme }, children: children }));
|
33
32
|
};
|
34
33
|
export const useTheme = () => {
|
35
34
|
const context = useContext(ThemeContext);
|
@@ -38,4 +37,4 @@ export const useTheme = () => {
|
|
38
37
|
}
|
39
38
|
return context;
|
40
39
|
};
|
41
|
-
//# sourceMappingURL=ThemeContext.
|
40
|
+
//# sourceMappingURL=ThemeContext.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ThemeContext.
|
1
|
+
{"version":3,"file":"ThemeContext.js","sourceRoot":"","sources":["../../../src/template/contexts/ThemeContext.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAStE,MAAM,YAAY,GAAG,aAAa,CAAgC,SAAS,CAAC,CAAA;AAE5E,MAAM,iBAAiB,GAAG,wBAAwB,CAAA;AAElD,MAAM,CAAC,MAAM,aAAa,GAA4C,CAAC,EAAE,QAAQ,EAAE,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QACb,MAAM,IAAI,KAAK,CAAC,8CAA8C,CAAC,CAAA;IACjE,CAAC;IACD,OAAO,OAAO,CAAA;AAChB,CAAC,CAAA"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"entry.client.d.ts","sourceRoot":"","sources":["../../src/template/entry.client.tsx"],"names":[],"mappings":"AAGA,OAAO,6BAA6B,CAAA"}
|
1
|
+
{"version":3,"file":"entry.client.d.ts","sourceRoot":"","sources":["../../src/template/entry.client.tsx"],"names":[],"mappings":"AAGA,OAAO,6BAA6B,CAAA;AACpC,OAAO,yBAAyB,CAAA"}
|
@@ -1,13 +1,14 @@
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
1
2
|
// TODO it seems more logical to have this asset imported in the server entry.
|
2
3
|
// But then, we won't get it from the client manifest. But we could get it from the server manifest. Should we do that?
|
3
4
|
// But then, that wouldn't work for SPA. Does that matter? Just put a conditional here e.g. if (import.meta.env.PROD) ...?
|
4
5
|
import '@radix-ui/themes/styles.css';
|
5
|
-
|
6
|
+
import './styles/code-block.css';
|
6
7
|
import { ReactDomClient } from '#dep/react-dom-client/index';
|
7
8
|
import { StrictMode } from 'react';
|
8
9
|
import { createBrowserRouter, RouterProvider } from 'react-router';
|
9
10
|
import PROJECT_DATA from 'virtual:polen/project/data.jsonsuper';
|
10
|
-
import { routes } from
|
11
|
+
import { routes } from "./routes.js";
|
11
12
|
// SPA
|
12
13
|
// const router = createBrowserRouter(routes)
|
13
14
|
// createRoot(document).render(
|
@@ -18,7 +19,5 @@ const router = createBrowserRouter(routes, {
|
|
18
19
|
hydrationData: window.__staticRouterHydrationData,
|
19
20
|
basename: PROJECT_DATA.basePath === `/` ? undefined : PROJECT_DATA.basePath.slice(0, -1), // Remove trailing slash for React Router
|
20
21
|
});
|
21
|
-
ReactDomClient.hydrateRoot(document, (
|
22
|
-
|
23
|
-
</StrictMode>));
|
24
|
-
//# sourceMappingURL=entry.client.jsx.map
|
22
|
+
ReactDomClient.hydrateRoot(document, (_jsx(StrictMode, { children: _jsx(RouterProvider, { router: router }) })));
|
23
|
+
//# sourceMappingURL=entry.client.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"entry.client.js","sourceRoot":"","sources":["../../src/template/entry.client.tsx"],"names":[],"mappings":";AAAA,8EAA8E;AAC9E,uHAAuH;AACvH,0HAA0H;AAC1H,OAAO,6BAA6B,CAAA;AACpC,OAAO,yBAAyB,CAAA;AAChC,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAA;AAC5D,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AAClC,OAAO,EAAE,mBAAmB,EAAE,cAAc,EAAE,MAAM,cAAc,CAAA;AAClE,OAAO,YAAY,MAAM,sCAAsC,CAAA;AAC/D,OAAO,EAAE,MAAM,EAAE,MAAM,aAAc,CAAA;AAErC,MAAM;AAEN,6CAA6C;AAE7C,+BAA+B;AAC/B,wCAAwC;AACxC,IAAI;AAEJ,MAAM;AAEN,MAAM,MAAM,GAAG,mBAAmB,CAAC,MAAM,EAAE;IACzC,aAAa,EAAE,MAAM,CAAC,2BAA2B;IACjD,QAAQ,EAAE,YAAY,CAAC,QAAQ,KAAK,GAAG,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,YAAY,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,yCAAyC;CACpI,CAAC,CAAA;AAEF,cAAc,CAAC,WAAW,CACxB,QAAQ,EACR,CACE,KAAC,UAAU,cACT,KAAC,cAAc,IAAC,MAAM,EAAE,MAAM,GAAI,GACvB,CACd,CACF,CAAA"}
|
@@ -3,6 +3,6 @@ export declare const changelog: {
|
|
3
3
|
loader: () => {
|
4
4
|
schema: import("../../api/schema/schema.ts").Schema | null;
|
5
5
|
};
|
6
|
-
Component: () => import("react").JSX.Element;
|
6
|
+
Component: () => import("react/jsx-runtime").JSX.Element;
|
7
7
|
};
|
8
8
|
//# sourceMappingURL=changelog.d.ts.map
|
@@ -1,7 +1,8 @@
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
1
2
|
import { createRoute } from '#lib/react-router-aid/react-router-aid';
|
2
3
|
import { createLoader, useLoaderData } from '#lib/react-router-loader/react-router-loader';
|
3
4
|
import PROJECT_DATA from 'virtual:polen/project/data.jsonsuper';
|
4
|
-
import { Changelog } from
|
5
|
+
import { Changelog } from "../components/Changelog.js";
|
5
6
|
const loader = createLoader(() => {
|
6
7
|
return {
|
7
8
|
schema: PROJECT_DATA.schema,
|
@@ -10,13 +11,13 @@ const loader = createLoader(() => {
|
|
10
11
|
const Component = () => {
|
11
12
|
const data = useLoaderData();
|
12
13
|
if (!data.schema) {
|
13
|
-
return
|
14
|
+
return _jsx("div", { children: "No data to show. There is no schema is." });
|
14
15
|
}
|
15
|
-
return
|
16
|
+
return _jsx(Changelog, { schema: data.schema });
|
16
17
|
};
|
17
18
|
export const changelog = createRoute({
|
18
19
|
path: `changelog`,
|
19
20
|
loader,
|
20
21
|
Component,
|
21
22
|
});
|
22
|
-
//# sourceMappingURL=changelog.
|
23
|
+
//# sourceMappingURL=changelog.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"changelog.js","sourceRoot":"","sources":["../../../src/template/routes/changelog.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAA;AACpE,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,8CAA8C,CAAA;AAC1F,OAAO,YAAY,MAAM,sCAAsC,CAAA;AAC/D,OAAO,EAAE,SAAS,EAAE,MAAM,4BAA6B,CAAA;AAEvD,MAAM,MAAM,GAAG,YAAY,CAAC,GAAG,EAAE;IAC/B,OAAO;QACL,MAAM,EAAE,YAAY,CAAC,MAAM;KAC5B,CAAA;AACH,CAAC,CAAC,CAAA;AAEF,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,IAAI,GAAG,aAAa,EAAiB,CAAA;IAE3C,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC;QACjB,OAAO,oEAAkD,CAAA;IAC3D,CAAC;IAED,OAAO,KAAC,SAAS,IAAC,MAAM,EAAE,IAAI,CAAC,MAAM,GAAI,CAAA;AAC3C,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,SAAS,GAAG,WAAW,CAAC;IACnC,IAAI,EAAE,WAAW;IACjB,MAAM;IACN,SAAS;CACV,CAAC,CAAA"}
|