polen 0.10.0 → 0.11.0-next.2
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/api.d.ts +1 -0
- package/build/api/api.d.ts.map +1 -1
- package/build/api/api.js +1 -0
- package/build/api/api.js.map +1 -1
- package/build/api/config/configurator.d.ts +20 -22
- package/build/api/config/configurator.d.ts.map +1 -1
- package/build/api/config/configurator.js +27 -9
- package/build/api/config/configurator.js.map +1 -1
- package/build/api/config/merge.d.ts.map +1 -1
- package/build/api/config/merge.js +0 -11
- package/build/api/config/merge.js.map +1 -1
- package/build/api/content/metadata.d.ts +8 -2
- package/build/api/content/metadata.d.ts.map +1 -1
- package/build/api/content/metadata.js +1 -1
- package/build/api/content/metadata.js.map +1 -1
- package/build/api/schema/data-sources/memory/memory.d.ts +2 -2
- package/build/api/schema/data-sources/memory/memory.d.ts.map +1 -1
- package/build/api/schema/data-sources/memory/memory.js +1 -3
- package/build/api/schema/data-sources/memory/memory.js.map +1 -1
- package/build/api/schema/data-sources/schema-directory/file-name-expression/file-name-expression.d.ts +7 -3
- package/build/api/schema/data-sources/schema-directory/file-name-expression/file-name-expression.d.ts.map +1 -1
- package/build/api/schema/data-sources/schema-directory/file-name-expression/file-name-expression.js +15 -11
- package/build/api/schema/data-sources/schema-directory/file-name-expression/file-name-expression.js.map +1 -1
- package/build/api/schema/data-sources/schema-directory/schema-directory.d.ts +16 -7
- package/build/api/schema/data-sources/schema-directory/schema-directory.d.ts.map +1 -1
- package/build/api/schema/data-sources/schema-directory/schema-directory.js +26 -7
- package/build/api/schema/data-sources/schema-directory/schema-directory.js.map +1 -1
- package/build/api/schema/data-sources/schema-file/schema-file.d.ts +7 -2
- package/build/api/schema/data-sources/schema-file/schema-file.d.ts.map +1 -1
- package/build/api/schema/data-sources/schema-file/schema-file.js +13 -5
- package/build/api/schema/data-sources/schema-file/schema-file.js.map +1 -1
- package/build/api/schema/metadata.d.ts +16 -0
- package/build/api/schema/metadata.d.ts.map +1 -0
- package/build/api/schema/metadata.js +19 -0
- package/build/api/schema/metadata.js.map +1 -0
- package/build/api/schema/read.d.ts +3 -3
- package/build/api/schema/read.d.ts.map +1 -1
- package/build/api/schema/read.js.map +1 -1
- package/build/api/schema/schema.d.ts +33 -2
- package/build/api/schema/schema.d.ts.map +1 -1
- package/build/api/schema/schema.js +42 -0
- package/build/api/schema/schema.js.map +1 -1
- package/build/api/schema-source/index.d.ts +2 -0
- package/build/api/schema-source/index.d.ts.map +1 -0
- package/build/api/schema-source/index.js +2 -0
- package/build/api/schema-source/index.js.map +1 -0
- package/build/api/schema-source/schema-source.d.ts +33 -0
- package/build/api/schema-source/schema-source.d.ts.map +1 -0
- package/build/api/schema-source/schema-source.js +137 -0
- package/build/api/schema-source/schema-source.js.map +1 -0
- package/build/api/static/manifest.d.ts +1 -2
- package/build/api/static/manifest.d.ts.map +1 -1
- package/build/api/static/manifest.js +1 -1
- package/build/api/static/manifest.js.map +1 -1
- package/build/api/vite/plugins/core.d.ts +1 -0
- package/build/api/vite/plugins/core.d.ts.map +1 -1
- package/build/api/vite/plugins/core.js +21 -18
- package/build/api/vite/plugins/core.js.map +1 -1
- package/build/api/vite/plugins/main.d.ts.map +1 -1
- package/build/api/vite/plugins/main.js +1 -8
- package/build/api/vite/plugins/main.js.map +1 -1
- package/build/api/vite/plugins/schema-assets.d.ts +22 -0
- package/build/api/vite/plugins/schema-assets.d.ts.map +1 -0
- package/build/api/vite/plugins/schema-assets.js +269 -0
- package/build/api/vite/plugins/schema-assets.js.map +1 -0
- package/build/api/vite/plugins/serve.d.ts.map +1 -1
- package/build/api/vite/plugins/serve.js +11 -0
- package/build/api/vite/plugins/serve.js.map +1 -1
- package/build/lib/graphql-change/change-groups.d.ts +2 -0
- package/build/lib/graphql-change/change-groups.d.ts.map +1 -1
- package/build/lib/graphql-change/change-groups.js +54 -0
- package/build/lib/graphql-change/change-groups.js.map +1 -1
- package/build/lib/kit-temp.d.ts +9 -0
- package/build/lib/kit-temp.d.ts.map +1 -1
- package/build/lib/kit-temp.js +12 -0
- package/build/lib/kit-temp.js.map +1 -1
- package/build/lib/path-map/path-map.d.ts.map +1 -1
- package/build/lib/path-map/path-map.js +3 -1
- package/build/lib/path-map/path-map.js.map +1 -1
- package/build/project-data.d.ts +3 -11
- package/build/project-data.d.ts.map +1 -1
- package/build/template/components/Changelog.d.ts +3 -3
- package/build/template/components/Changelog.d.ts.map +1 -1
- package/build/template/components/Changelog.js +8 -84
- package/build/template/components/Changelog.js.map +1 -1
- package/build/template/components/CodeBlock.d.ts +2 -0
- package/build/template/components/CodeBlock.d.ts.map +1 -1
- package/build/template/components/CodeBlock.js +1 -4
- package/build/template/components/CodeBlock.js.map +1 -1
- package/build/template/components/ComponentDispatch.d.ts +34 -0
- package/build/template/components/ComponentDispatch.d.ts.map +1 -0
- package/build/template/components/ComponentDispatch.js +33 -0
- package/build/template/components/ComponentDispatch.js.map +1 -0
- package/build/template/components/ReferenceLink.d.ts +19 -0
- package/build/template/components/ReferenceLink.d.ts.map +1 -0
- package/build/template/components/ReferenceLink.js +19 -0
- package/build/template/components/ReferenceLink.js.map +1 -0
- package/build/template/components/TypeAnnotation.d.ts.map +1 -1
- package/build/template/components/TypeAnnotation.js +3 -3
- package/build/template/components/TypeAnnotation.js.map +1 -1
- package/build/template/components/TypeFieldsLinkList.d.ts.map +1 -1
- package/build/template/components/TypeFieldsLinkList.js +4 -4
- package/build/template/components/TypeFieldsLinkList.js.map +1 -1
- package/build/template/components/TypeIndex.js +2 -2
- package/build/template/components/TypeIndex.js.map +1 -1
- package/build/template/components/VersionSelector.d.ts +7 -0
- package/build/template/components/VersionSelector.d.ts.map +1 -0
- package/build/template/components/VersionSelector.js +30 -0
- package/build/template/components/VersionSelector.js.map +1 -0
- package/build/template/components/graphql/type-link.d.ts.map +1 -1
- package/build/template/components/graphql/type-link.js +2 -2
- package/build/template/components/graphql/type-link.js.map +1 -1
- package/build/template/hooks/useVersionPath.d.ts +6 -0
- package/build/template/hooks/useVersionPath.d.ts.map +1 -0
- package/build/template/hooks/useVersionPath.js +10 -0
- package/build/template/hooks/useVersionPath.js.map +1 -0
- package/build/template/layouts/ChangelogLayout.d.ts.map +1 -0
- package/build/template/{components → layouts}/ChangelogLayout.js +1 -1
- package/build/template/layouts/ChangelogLayout.js.map +1 -0
- package/build/template/layouts/index.d.ts +1 -0
- package/build/template/layouts/index.d.ts.map +1 -1
- package/build/template/layouts/index.js +1 -0
- package/build/template/layouts/index.js.map +1 -1
- package/build/template/lib/fetch-text.d.ts +8 -0
- package/build/template/lib/fetch-text.d.ts.map +1 -0
- package/build/template/lib/fetch-text.js +14 -0
- package/build/template/lib/fetch-text.js.map +1 -0
- package/build/template/lib/polen-url.d.ts +14 -0
- package/build/template/lib/polen-url.d.ts.map +1 -1
- package/build/template/lib/polen-url.js +16 -0
- package/build/template/lib/polen-url.js.map +1 -1
- package/build/template/lib/schema-utils/constants.d.ts +5 -0
- package/build/template/lib/schema-utils/constants.d.ts.map +1 -0
- package/build/template/lib/schema-utils/constants.js +5 -0
- package/build/template/lib/schema-utils/constants.js.map +1 -0
- package/build/template/lib/schema-utils/schema-utils.d.ts +15 -0
- package/build/template/lib/schema-utils/schema-utils.d.ts.map +1 -0
- package/build/template/lib/schema-utils/schema-utils.js +37 -0
- package/build/template/lib/schema-utils/schema-utils.js.map +1 -0
- package/build/template/routes/changelog.d.ts +4 -3
- package/build/template/routes/changelog.d.ts.map +1 -1
- package/build/template/routes/changelog.js +13 -7
- package/build/template/routes/changelog.js.map +1 -1
- package/build/template/routes/pages.d.ts +10 -0
- package/build/template/routes/pages.d.ts.map +1 -0
- package/build/template/routes/pages.js +76 -0
- package/build/template/routes/pages.js.map +1 -0
- package/build/template/routes/reference.$type.$field.js +1 -1
- package/build/template/routes/reference.$type.$field.js.map +1 -1
- package/build/template/routes/reference.$type.d.ts +4 -0
- package/build/template/routes/reference.$type.d.ts.map +1 -1
- package/build/template/routes/reference.$type.js +2 -0
- package/build/template/routes/reference.$type.js.map +1 -1
- package/build/template/routes/reference.d.ts +9 -3
- package/build/template/routes/reference.d.ts.map +1 -1
- package/build/template/routes/reference.js +30 -8
- package/build/template/routes/reference.js.map +1 -1
- package/build/template/routes/reference.version.$version.$type.$field.d.ts +6 -0
- package/build/template/routes/reference.version.$version.$type.$field.d.ts.map +1 -0
- package/build/template/routes/reference.version.$version.$type.$field.js +32 -0
- package/build/template/routes/reference.version.$version.$type.$field.js.map +1 -0
- package/build/template/routes/reference.version.$version.$type.d.ts +11 -0
- package/build/template/routes/reference.version.$version.$type.d.ts.map +1 -0
- package/build/template/routes/reference.version.$version.$type.js +26 -0
- package/build/template/routes/reference.version.$version.$type.js.map +1 -0
- package/build/template/routes/root.d.ts.map +1 -1
- package/build/template/routes/root.js +8 -72
- package/build/template/routes/root.js.map +1 -1
- package/build/template/server/app.d.ts +22 -1
- package/build/template/server/app.d.ts.map +1 -1
- package/build/template/server/app.js +19 -9
- package/build/template/server/app.js.map +1 -1
- package/build/template/server/main.js +9 -1
- package/build/template/server/main.js.map +1 -1
- package/build/template/server/ssg/generate.js +2 -2
- package/build/template/server/ssg/generate.js.map +1 -1
- package/build/template/server/ssg/get-route-paths.d.ts +1 -1
- package/build/template/server/ssg/get-route-paths.d.ts.map +1 -1
- package/build/template/server/ssg/get-route-paths.js +51 -27
- package/build/template/server/ssg/get-route-paths.js.map +1 -1
- package/build/template/sources/schema-source.d.ts +15 -0
- package/build/template/sources/schema-source.d.ts.map +1 -0
- package/build/template/sources/schema-source.js +63 -0
- package/build/template/sources/schema-source.js.map +1 -0
- package/package.json +16 -17
- package/src/api/api.ts +1 -0
- package/src/api/config/configurator.ts +51 -32
- package/src/api/config/merge.ts +0 -16
- package/src/api/content/metadata.ts +1 -1
- package/src/api/schema/data-sources/memory/memory.ts +3 -5
- package/src/api/schema/data-sources/schema-directory/file-name-expression/file-name-expression.ts +29 -13
- package/src/api/schema/data-sources/schema-directory/schema-directory.ts +56 -16
- package/src/api/schema/data-sources/schema-file/schema-file.ts +16 -7
- package/src/api/schema/metadata.ts +23 -0
- package/src/api/schema/read.ts +3 -3
- package/src/api/schema/schema.ts +62 -2
- package/src/api/schema-source/index.ts +1 -0
- package/src/api/schema-source/schema-source.ts +189 -0
- package/src/api/static/manifest.ts +1 -1
- package/src/api/vite/plugins/core.ts +23 -18
- package/src/api/vite/plugins/main.ts +1 -9
- package/src/api/vite/plugins/schema-assets.ts +317 -0
- package/src/api/vite/plugins/serve.ts +15 -8
- package/src/lib/graphql-change/change-groups.ts +57 -0
- package/src/lib/kit-temp.ts +13 -0
- package/src/lib/path-map/$.test.ts +22 -19
- package/src/lib/path-map/path-map.ts +3 -1
- package/src/project-data.ts +3 -11
- package/src/template/components/Changelog.tsx +16 -67
- package/src/template/components/CodeBlock.tsx +3 -5
- package/src/template/components/ComponentDispatch.tsx +42 -0
- package/src/template/components/ReferenceLink.tsx +34 -0
- package/src/template/components/TypeAnnotation.tsx +5 -7
- package/src/template/components/TypeFieldsLinkList.tsx +20 -23
- package/src/template/components/TypeIndex.tsx +10 -12
- package/src/template/components/VersionSelector.tsx +50 -0
- package/src/template/components/graphql/type-link.tsx +4 -3
- package/src/template/hooks/useVersionPath.ts +10 -0
- package/src/template/{components → layouts}/ChangelogLayout.tsx +1 -1
- package/src/template/layouts/index.ts +1 -0
- package/src/template/lib/fetch-text.ts +13 -0
- package/src/template/lib/polen-url.ts +20 -0
- package/src/template/lib/schema-utils/constants.ts +4 -0
- package/src/template/lib/schema-utils/schema-utils.ts +42 -0
- package/src/template/routes/changelog.tsx +17 -8
- package/src/template/routes/pages.tsx +109 -0
- package/src/template/routes/reference.$type.$field.tsx +1 -1
- package/src/template/routes/reference.$type.tsx +2 -0
- package/src/template/routes/reference.tsx +38 -6
- package/src/template/routes/reference.version.$version.$type.$field.tsx +35 -0
- package/src/template/routes/reference.version.$version.$type.tsx +30 -0
- package/src/template/routes/root.tsx +8 -109
- package/src/template/server/app.ts +47 -14
- package/src/template/server/main.ts +9 -1
- package/src/template/server/ssg/generate.ts +2 -2
- package/src/template/server/ssg/get-route-paths.ts +53 -27
- package/src/template/sources/schema-source.ts +68 -0
- 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/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 -151
- 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 -27
- 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 -50
- 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 -144
- package/build/lib/graphql-document/components/graphql-document-styles.js.map +0 -1
- package/build/lib/graphql-document/components/index.d.ts +0 -5
- package/build/lib/graphql-document/components/index.d.ts.map +0 -1
- package/build/lib/graphql-document/components/index.js +0 -5
- 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.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 +0 -2
- package/build/lib/graphql-document/types.js.map +0 -1
- package/build/template/components/ChangelogLayout.d.ts.map +0 -1
- package/build/template/components/ChangelogLayout.js.map +0 -1
- package/build/template/components/CodeHikePre.d.ts +0 -16
- package/build/template/components/CodeHikePre.d.ts.map +0 -1
- package/build/template/components/CodeHikePre.js +0 -37
- package/build/template/components/CodeHikePre.js.map +0 -1
- 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/GraphQLDocument.tsx +0 -265
- package/src/lib/graphql-document/components/GraphQLDocument.unit.test.ts +0 -188
- package/src/lib/graphql-document/components/GraphQLDocumentWithSchema.tsx +0 -46
- package/src/lib/graphql-document/components/GraphQLIdentifierPopover.tsx +0 -199
- package/src/lib/graphql-document/components/IdentifierLink.tsx +0 -160
- package/src/lib/graphql-document/components/graphql-document-styles.ts +0 -144
- package/src/lib/graphql-document/components/index.ts +0 -4
- 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.test.ts +0 -365
- package/src/lib/graphql-document/schema-integration.ts +0 -488
- package/src/lib/graphql-document/types.ts +0 -129
- package/src/template/components/CodeHikePre.tsx +0 -51
- /package/build/template/{components → layouts}/ChangelogLayout.d.ts +0 -0
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/template/layouts/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAA"}
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/template/layouts/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAA;AACpC,cAAc,oBAAoB,CAAA"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/template/layouts/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAA"}
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/template/layouts/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAA;AACpC,cAAc,oBAAoB,CAAA"}
|
@@ -0,0 +1,8 @@
|
|
1
|
+
/**
|
2
|
+
* Fetch text content from a URL
|
3
|
+
* @param url - The URL to fetch from
|
4
|
+
* @returns Promise that resolves to the text content
|
5
|
+
* @throws Error if the request fails
|
6
|
+
*/
|
7
|
+
export declare const fetchText: (url: string) => Promise<string>;
|
8
|
+
//# sourceMappingURL=fetch-text.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"fetch-text.d.ts","sourceRoot":"","sources":["../../../src/template/lib/fetch-text.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,eAAO,MAAM,SAAS,GAAU,KAAK,MAAM,KAAG,OAAO,CAAC,MAAM,CAM3D,CAAA"}
|
@@ -0,0 +1,14 @@
|
|
1
|
+
/**
|
2
|
+
* Fetch text content from a URL
|
3
|
+
* @param url - The URL to fetch from
|
4
|
+
* @returns Promise that resolves to the text content
|
5
|
+
* @throws Error if the request fails
|
6
|
+
*/
|
7
|
+
export const fetchText = async (url) => {
|
8
|
+
const response = await fetch(url);
|
9
|
+
if (!response.ok) {
|
10
|
+
throw new Error(`Failed to fetch: ${url} (${response.status} ${response.statusText})`);
|
11
|
+
}
|
12
|
+
return response.text();
|
13
|
+
};
|
14
|
+
//# sourceMappingURL=fetch-text.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"fetch-text.js","sourceRoot":"","sources":["../../../src/template/lib/fetch-text.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,CAAC,MAAM,SAAS,GAAG,KAAK,EAAE,GAAW,EAAmB,EAAE;IAC9D,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,GAAG,CAAC,CAAA;IACjC,IAAI,CAAC,QAAQ,CAAC,EAAE,EAAE,CAAC;QACjB,MAAM,IAAI,KAAK,CAAC,oBAAoB,GAAG,KAAK,QAAQ,CAAC,MAAM,IAAI,QAAQ,CAAC,UAAU,GAAG,CAAC,CAAA;IACxF,CAAC;IACD,OAAO,QAAQ,CAAC,IAAI,EAAE,CAAA;AACxB,CAAC,CAAA"}
|
@@ -21,4 +21,18 @@
|
|
21
21
|
* polenUrlPath('reference/Pokemon#field') // '/demos/pokemon/reference/Pokemon#field'
|
22
22
|
*/
|
23
23
|
export declare const polenUrlPath: (...segments: string[]) => string;
|
24
|
+
/**
|
25
|
+
* Create a Polen URL path for assets.
|
26
|
+
*
|
27
|
+
* This is a convenience wrapper around `polenUrlPath` that automatically
|
28
|
+
* prepends the assets root path.
|
29
|
+
*
|
30
|
+
* @param segments - Path segments within the assets directory
|
31
|
+
* @returns Full URL path to the asset
|
32
|
+
*
|
33
|
+
* @example
|
34
|
+
* polenUrlPathAssets('schemas', 'latest.json') // '/demos/pokemon/assets/schemas/latest.json'
|
35
|
+
* polenUrlPathAssets('images/logo.png') // '/demos/pokemon/assets/images/logo.png'
|
36
|
+
*/
|
37
|
+
export declare const polenUrlPathAssets: (...segments: string[]) => string;
|
24
38
|
//# sourceMappingURL=polen-url.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"polen-url.d.ts","sourceRoot":"","sources":["../../../src/template/lib/polen-url.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,eAAO,MAAM,YAAY,GAAI,GAAG,UAAU,MAAM,EAAE,KAAG,MAUpD,CAAA"}
|
1
|
+
{"version":3,"file":"polen-url.d.ts","sourceRoot":"","sources":["../../../src/template/lib/polen-url.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,eAAO,MAAM,YAAY,GAAI,GAAG,UAAU,MAAM,EAAE,KAAG,MAUpD,CAAA;AAED;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,kBAAkB,GAAI,GAAG,UAAU,MAAM,EAAE,KAAG,MAK1D,CAAA"}
|
@@ -30,4 +30,20 @@ export const polenUrlPath = (...segments) => {
|
|
30
30
|
.replace(/^\//, ''); // Remove leading slash
|
31
31
|
return basePath + path;
|
32
32
|
};
|
33
|
+
/**
|
34
|
+
* Create a Polen URL path for assets.
|
35
|
+
*
|
36
|
+
* This is a convenience wrapper around `polenUrlPath` that automatically
|
37
|
+
* prepends the assets root path.
|
38
|
+
*
|
39
|
+
* @param segments - Path segments within the assets directory
|
40
|
+
* @returns Full URL path to the asset
|
41
|
+
*
|
42
|
+
* @example
|
43
|
+
* polenUrlPathAssets('schemas', 'latest.json') // '/demos/pokemon/assets/schemas/latest.json'
|
44
|
+
* polenUrlPathAssets('images/logo.png') // '/demos/pokemon/assets/images/logo.png'
|
45
|
+
*/
|
46
|
+
export const polenUrlPathAssets = (...segments) => {
|
47
|
+
return polenUrlPath(PROJECT_DATA.server.routes.assets, ...segments);
|
48
|
+
};
|
33
49
|
//# sourceMappingURL=polen-url.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"polen-url.js","sourceRoot":"","sources":["../../../src/template/lib/polen-url.ts"],"names":[],"mappings":"AAAA,OAAO,YAAY,MAAM,sCAAsC,CAAA;AAE/D;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,GAAG,QAAkB,EAAU,EAAE;IAC5D,MAAM,QAAQ,GAAG,YAAY,CAAC,QAAQ,CAAA,CAAC,0BAA0B;IAEjE,sCAAsC;IACtC,MAAM,IAAI,GAAG,QAAQ;SAClB,IAAI,CAAC,GAAG,CAAC;SACT,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,2BAA2B;SAChD,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAA,CAAC,uBAAuB;IAE7C,OAAO,QAAQ,GAAG,IAAI,CAAA;AACxB,CAAC,CAAA"}
|
1
|
+
{"version":3,"file":"polen-url.js","sourceRoot":"","sources":["../../../src/template/lib/polen-url.ts"],"names":[],"mappings":"AAAA,OAAO,YAAY,MAAM,sCAAsC,CAAA;AAE/D;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,GAAG,QAAkB,EAAU,EAAE;IAC5D,MAAM,QAAQ,GAAG,YAAY,CAAC,QAAQ,CAAA,CAAC,0BAA0B;IAEjE,sCAAsC;IACtC,MAAM,IAAI,GAAG,QAAQ;SAClB,IAAI,CAAC,GAAG,CAAC;SACT,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,2BAA2B;SAChD,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAA,CAAC,uBAAuB;IAE7C,OAAO,QAAQ,GAAG,IAAI,CAAA;AACxB,CAAC,CAAA;AAED;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,GAAG,QAAkB,EAAU,EAAE;IAClE,OAAO,YAAY,CACjB,YAAY,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,EACjC,GAAG,QAAQ,CACZ,CAAA;AACH,CAAC,CAAA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../src/template/lib/schema-utils/constants.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,mBAAmB,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../src/template/lib/schema-utils/constants.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,mBAAmB,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAA"}
|
@@ -0,0 +1,15 @@
|
|
1
|
+
import type { DocumentNode, GraphQLSchema } from 'graphql';
|
2
|
+
/**
|
3
|
+
* Convert a GraphQL AST back to a GraphQL Schema object
|
4
|
+
*/
|
5
|
+
export declare const astToSchema: (ast: DocumentNode) => GraphQLSchema;
|
6
|
+
/**
|
7
|
+
* Simple cache for loaded schemas to avoid repeated conversions
|
8
|
+
*/
|
9
|
+
export declare const createSchemaCache: () => {
|
10
|
+
get(version: string): GraphQLSchema | undefined;
|
11
|
+
set(version: string, schema: GraphQLSchema): void;
|
12
|
+
has(version: string): boolean;
|
13
|
+
clear(): void;
|
14
|
+
};
|
15
|
+
//# sourceMappingURL=schema-utils.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"schema-utils.d.ts","sourceRoot":"","sources":["../../../../src/template/lib/schema-utils/schema-utils.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AAE1D;;GAEG;AACH,eAAO,MAAM,WAAW,GAAI,KAAK,YAAY,KAAG,aAK/C,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,iBAAiB;iBAIb,MAAM,GAAG,aAAa,GAAG,SAAS;iBAIlC,MAAM,UAAU,aAAa,GAAG,IAAI;iBASpC,MAAM,GAAG,OAAO;aAIpB,IAAI;CAIhB,CAAA"}
|
@@ -0,0 +1,37 @@
|
|
1
|
+
import { buildSchema, print } from 'graphql';
|
2
|
+
/**
|
3
|
+
* Convert a GraphQL AST back to a GraphQL Schema object
|
4
|
+
*/
|
5
|
+
export const astToSchema = (ast) => {
|
6
|
+
// Convert AST back to SDL string
|
7
|
+
const sdl = print(ast);
|
8
|
+
// Build schema from SDL
|
9
|
+
return buildSchema(sdl);
|
10
|
+
};
|
11
|
+
/**
|
12
|
+
* Simple cache for loaded schemas to avoid repeated conversions
|
13
|
+
*/
|
14
|
+
export const createSchemaCache = () => {
|
15
|
+
const cache = new Map();
|
16
|
+
return {
|
17
|
+
get(version) {
|
18
|
+
return cache.get(version);
|
19
|
+
},
|
20
|
+
set(version, schema) {
|
21
|
+
// Limit cache size to prevent memory issues
|
22
|
+
if (cache.size >= 10) {
|
23
|
+
const firstKey = cache.keys().next().value;
|
24
|
+
if (firstKey)
|
25
|
+
cache.delete(firstKey);
|
26
|
+
}
|
27
|
+
cache.set(version, schema);
|
28
|
+
},
|
29
|
+
has(version) {
|
30
|
+
return cache.has(version);
|
31
|
+
},
|
32
|
+
clear() {
|
33
|
+
cache.clear();
|
34
|
+
},
|
35
|
+
};
|
36
|
+
};
|
37
|
+
//# sourceMappingURL=schema-utils.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"schema-utils.js","sourceRoot":"","sources":["../../../../src/template/lib/schema-utils/schema-utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAG5C;;GAEG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,GAAiB,EAAiB,EAAE;IAC9D,iCAAiC;IACjC,MAAM,GAAG,GAAG,KAAK,CAAC,GAAG,CAAC,CAAA;IACtB,wBAAwB;IACxB,OAAO,WAAW,CAAC,GAAG,CAAC,CAAA;AACzB,CAAC,CAAA;AAED;;GAEG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,GAAG,EAAE;IACpC,MAAM,KAAK,GAAG,IAAI,GAAG,EAAyB,CAAA;IAE9C,OAAO;QACL,GAAG,CAAC,OAAe;YACjB,OAAO,KAAK,CAAC,GAAG,CAAC,OAAO,CAAC,CAAA;QAC3B,CAAC;QAED,GAAG,CAAC,OAAe,EAAE,MAAqB;YACxC,4CAA4C;YAC5C,IAAI,KAAK,CAAC,IAAI,IAAI,EAAE,EAAE,CAAC;gBACrB,MAAM,QAAQ,GAAG,KAAK,CAAC,IAAI,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,CAAA;gBAC1C,IAAI,QAAQ;oBAAE,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAA;YACtC,CAAC;YACD,KAAK,CAAC,GAAG,CAAC,OAAO,EAAE,MAAM,CAAC,CAAA;QAC5B,CAAC;QAED,GAAG,CAAC,OAAe;YACjB,OAAO,KAAK,CAAC,GAAG,CAAC,OAAO,CAAC,CAAA;QAC3B,CAAC;QAED,KAAK;YACH,KAAK,CAAC,KAAK,EAAE,CAAA;QACf,CAAC;KACF,CAAA;AACH,CAAC,CAAA"}
|
@@ -1,8 +1,9 @@
|
|
1
|
+
import type { GraphqlChangeset } from '#lib/graphql-changeset/index';
|
1
2
|
export declare const changelog: {
|
2
3
|
path: string;
|
3
|
-
loader: () => {
|
4
|
-
|
5
|
-
}
|
4
|
+
loader: () => Promise<{
|
5
|
+
changesets: GraphqlChangeset.ChangeSet[];
|
6
|
+
}>;
|
6
7
|
Component: () => import("react/jsx-runtime").JSX.Element;
|
7
8
|
};
|
8
9
|
//# sourceMappingURL=changelog.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"changelog.d.ts","sourceRoot":"","sources":["../../../src/template/routes/changelog.tsx"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"changelog.d.ts","sourceRoot":"","sources":["../../../src/template/routes/changelog.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAA;AAmCpE,eAAO,MAAM,SAAS;;;;;;CAIpB,CAAA"}
|
@@ -1,20 +1,26 @@
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
2
2
|
import { createRoute } from '#lib/react-router-aid/react-router-aid';
|
3
3
|
import { createLoader, useLoaderData } from '#lib/react-router-loader/react-router-loader';
|
4
|
-
import PROJECT_DATA from 'virtual:polen/project/data.jsonsuper';
|
5
4
|
import { Changelog } from '../components/Changelog.js';
|
6
|
-
import { ChangelogLayout } from '../
|
7
|
-
|
5
|
+
import { ChangelogLayout } from '../layouts/index.js';
|
6
|
+
import { schemaSource } from '../sources/schema-source.js';
|
7
|
+
const loader = createLoader(async () => {
|
8
|
+
// Check if schema exists first
|
9
|
+
if (schemaSource.isEmpty) {
|
10
|
+
return { changesets: [] };
|
11
|
+
}
|
12
|
+
// Fetch all changesets with before/after/changes data
|
13
|
+
const changesets = await schemaSource.getAllChangesets();
|
8
14
|
return {
|
9
|
-
|
15
|
+
changesets,
|
10
16
|
};
|
11
17
|
});
|
12
18
|
const Component = () => {
|
13
19
|
const data = useLoaderData();
|
14
|
-
if (
|
15
|
-
return _jsx("div", { children: "No
|
20
|
+
if (data.changesets.length === 0) {
|
21
|
+
return _jsx("div", { children: "No schema versions available for changelog." });
|
16
22
|
}
|
17
|
-
return (_jsx(ChangelogLayout, { versions: data.
|
23
|
+
return (_jsx(ChangelogLayout, { versions: data.changesets, children: _jsx(Changelog, { changesets: data.changesets }) }));
|
18
24
|
};
|
19
25
|
export const changelog = createRoute({
|
20
26
|
path: `changelog`,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"changelog.js","sourceRoot":"","sources":["../../../src/template/routes/changelog.tsx"],"names":[],"mappings":";
|
1
|
+
{"version":3,"file":"changelog.js","sourceRoot":"","sources":["../../../src/template/routes/changelog.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAA;AACpE,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,8CAA8C,CAAA;AAC1F,OAAO,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAA;AACtD,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAA;AACrD,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAA;AAE1D,MAAM,MAAM,GAAG,YAAY,CAAC,KAAK,IAAI,EAAE;IACrC,+BAA+B;IAC/B,IAAI,YAAY,CAAC,OAAO,EAAE,CAAC;QACzB,OAAO,EAAE,UAAU,EAAE,EAAE,EAAE,CAAA;IAC3B,CAAC;IAED,sDAAsD;IACtD,MAAM,UAAU,GAAG,MAAM,YAAY,CAAC,gBAAgB,EAAE,CAAA;IAExD,OAAO;QACL,UAAU;KACX,CAAA;AACH,CAAC,CAAC,CAAA;AAEF,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,IAAI,GAAG,aAAa,EAAiB,CAAA;IAE3C,IAAI,IAAI,CAAC,UAAU,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACjC,OAAO,wEAAsD,CAAA;IAC/D,CAAC;IAED,OAAO,CACL,KAAC,eAAe,IAAC,QAAQ,EAAE,IAAI,CAAC,UAAU,YACxC,KAAC,SAAS,IAAC,UAAU,EAAE,IAAI,CAAC,UAA2E,GAAI,GAC3F,CACnB,CAAA;AACH,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,SAAS,GAAG,WAAW,CAAC;IACnC,IAAI,EAAE,WAAW;IACjB,MAAM;IACN,SAAS;CACV,CAAC,CAAA"}
|
@@ -0,0 +1,10 @@
|
|
1
|
+
export declare const pages: {
|
2
|
+
loader: () => Promise<{
|
3
|
+
schema: null;
|
4
|
+
} | {
|
5
|
+
schema: import("graphql").GraphQLSchema;
|
6
|
+
}>;
|
7
|
+
Component: () => import("react/jsx-runtime").JSX.Element;
|
8
|
+
children: import("react-router").RouteObject[];
|
9
|
+
};
|
10
|
+
//# sourceMappingURL=pages.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"pages.d.ts","sourceRoot":"","sources":["../../../src/template/routes/pages.tsx"],"names":[],"mappings":"AAuGA,eAAO,MAAM,KAAK;;;;;;;;CAKhB,CAAA"}
|
@@ -0,0 +1,76 @@
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
2
|
+
import { createRoute } from '#lib/react-router-aid/react-router-aid';
|
3
|
+
import { createLoader, useLoaderData } from '#lib/react-router-loader/react-router-loader';
|
4
|
+
import { SidebarLayout } from '#template/layouts/index';
|
5
|
+
import { MDXProvider } from '@mdx-js/react';
|
6
|
+
import { Badge, Box, Button, Callout, Card, Code, DataList, Em, Heading, Link, Quote, Separator, Strong, Table, Tabs, Text, Tooltip, } from '@radix-ui/themes';
|
7
|
+
import { Outlet, useLocation } from 'react-router';
|
8
|
+
import PROJECT_DATA_PAGES_CATALOG from 'virtual:polen/project/data/pages-catalog.jsonsuper';
|
9
|
+
import { routes } from 'virtual:polen/project/routes.jsx';
|
10
|
+
import { CodeBlock } from '../components/CodeBlock.js';
|
11
|
+
import { schemaSource } from '../sources/schema-source.js';
|
12
|
+
const loader = createLoader(async () => {
|
13
|
+
// Check if schema exists first
|
14
|
+
if (schemaSource.isEmpty) {
|
15
|
+
return { schema: null };
|
16
|
+
}
|
17
|
+
// Fetch the latest schema for MDX pages
|
18
|
+
const schema = await schemaSource.get('latest');
|
19
|
+
return { schema };
|
20
|
+
});
|
21
|
+
const Component = () => {
|
22
|
+
const { schema } = useLoaderData();
|
23
|
+
const location = useLocation();
|
24
|
+
// Build sidebar from pages catalog
|
25
|
+
// Get the top-level path segment (e.g., '/guide/foo' -> '/guide')
|
26
|
+
const pathSegments = location.pathname.split('/').filter(Boolean);
|
27
|
+
const topLevelPath = pathSegments[0] ? `/${pathSegments[0]}` : '/';
|
28
|
+
// Get the sidebar for this section
|
29
|
+
const sidebar = PROJECT_DATA_PAGES_CATALOG.sidebarIndex[topLevelPath]?.items || [];
|
30
|
+
return (_jsx(MDXProvider, { components: {
|
31
|
+
// Map markdown elements to Radix with spacing
|
32
|
+
p: (props) => _jsx(Text, { as: 'p', mb: '4', ...props }),
|
33
|
+
h1: (props) => _jsx(Heading, { size: '8', mt: '6', mb: '4', ...props }),
|
34
|
+
h2: (props) => _jsx(Heading, { size: '7', mt: '6', mb: '3', ...props }),
|
35
|
+
h3: (props) => _jsx(Heading, { size: '6', mt: '5', mb: '3', ...props }),
|
36
|
+
h4: (props) => _jsx(Heading, { size: '5', mt: '5', mb: '2', ...props }),
|
37
|
+
h5: (props) => _jsx(Heading, { size: '4', mt: '4', mb: '2', ...props }),
|
38
|
+
h6: (props) => _jsx(Heading, { size: '3', mt: '4', mb: '2', ...props }),
|
39
|
+
strong: Strong,
|
40
|
+
em: Em,
|
41
|
+
code: Code,
|
42
|
+
blockquote: (props) => _jsx(Quote, { my: '4', ...props }),
|
43
|
+
a: Link,
|
44
|
+
hr: (props) => _jsx(Separator, { my: '6', ...props }),
|
45
|
+
table: Table.Root,
|
46
|
+
thead: Table.Header,
|
47
|
+
tbody: Table.Body,
|
48
|
+
tr: Table.Row,
|
49
|
+
th: Table.ColumnHeaderCell,
|
50
|
+
td: Table.Cell,
|
51
|
+
// Lists need spacing too
|
52
|
+
ul: (props) => _jsx(Box, { as: 'ul', mb: '4', style: { paddingLeft: '1.5rem' }, ...props }),
|
53
|
+
ol: (props) => _jsx(Box, { as: 'ol', mb: '4', style: { paddingLeft: '1.5rem' }, ...props }),
|
54
|
+
li: (props) => _jsx(Box, { as: 'li', mb: '2', ...props }),
|
55
|
+
// Direct Radix components for MDX
|
56
|
+
Badge,
|
57
|
+
Button,
|
58
|
+
// @ts-expect-error
|
59
|
+
Callout,
|
60
|
+
Card,
|
61
|
+
// @ts-expect-error
|
62
|
+
DataList,
|
63
|
+
// @ts-expect-error
|
64
|
+
Tabs,
|
65
|
+
Tooltip,
|
66
|
+
// Code Hike component with schema injected
|
67
|
+
CodeBlock: (props) => _jsx(CodeBlock, { ...props, schema: schema }),
|
68
|
+
}, children: _jsx(SidebarLayout, { sidebar: sidebar, children: _jsx(Outlet, {}) }) }));
|
69
|
+
};
|
70
|
+
export const pages = createRoute({
|
71
|
+
// Pathless layout route - doesn't affect URL paths
|
72
|
+
loader,
|
73
|
+
Component,
|
74
|
+
children: [...routes], // All MDX page routes go here
|
75
|
+
});
|
76
|
+
//# sourceMappingURL=pages.js.map
|
@@ -0,0 +1 @@
|
|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KAAK,KAAK,GAAI;YAEhD,kCAAkC;YAClC,KAAK;YACL,MAAM;YACN,mBAAmB;YACnB,OAAO;YACP,IAAI;YACJ,mBAAmB;YACnB,QAAQ;YACR,mBAAmB;YACnB,IAAI;YACJ,OAAO;YAEP,2CAA2C;YAC3C,SAAS,EAAE,CAAC,KAAU,EAAE,EAAE,CAAC,KAAC,SAAS,OAAK,KAAK,EAAE,MAAM,EAAE,MAAM,GAAI;SACpE,YAED,KAAC,aAAa,IAAC,OAAO,EAAE,OAAO,YAC7B,KAAC,MAAM,KAAG,GACI,GACJ,CACf,CAAA;AACH,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,KAAK,GAAG,WAAW,CAAC;IAC/B,mDAAmD;IACnD,MAAM;IACN,SAAS;IACT,QAAQ,EAAE,CAAC,GAAG,MAAM,CAAC,EAAE,8BAA8B;CACtD,CAAC,CAAA"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"reference.$type.$field.js","sourceRoot":"","sources":["../../../src/template/routes/reference.$type.$field.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAA;AAC5C,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAA;AAC5D,OAAO,EAAE,aAAa,EAAE,MAAM,8CAA8C,CAAA;AAC5E,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AACxC,OAAO,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAA;AAC9C,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAA;AAG9D,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,MAAM,GAAG,SAAS,EAAqC,CAAA;IAC7D,MAAM,IAAI,GAAG,aAAa,CAA0B,WAAW,CAAC,CAAA;IAChE,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC;QACjB,OAAO,KAAC,aAAa,KAAG,CAAA;IAC1B,CAAC;IAED,MAAM,IAAI,GAAG,IAAI,CA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IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC;QACjB,OAAO,KAAC,aAAa,KAAG,CAAA;IAC1B,CAAC;IAED,MAAM,IAAI,GAAG,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,CAAA;IAC7C,IAAI,CAAC,IAAI;QAAE,OAAO,uBAAuB,MAAM,CAAC,IAAI,EAAE,CAAA;IACtD,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,SAAS,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,CAAC;QAC9C,OAAO,QAAQ,MAAM,CAAC,IAAI,uBAAuB,CAAA;IACnD,CAAC;IAED,MAAM,MAAM,GAAG,IAAI,CAAC,SAAS,EAAE,CAAA;IAC/B,MAAM,KAAK,GAAG,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;IAClC,IAAI,CAAC,KAAK,EAAE,CAAC;QACX,OAAO,wBAAwB,MAAM,CAAC,KAAK,YAAY,MAAM,CAAC,IAAI,EAAE,CAAA;IACtE,CAAC;IAED,OAAO,KAAC,KAAK,IAAC,IAAI,EAAE,KAAK,GAAI,CAAA;AAC/B,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,oBAAoB,GAAG,cAAc,CAAC,WAAW,CAAC;IAC7D,IAAI,EAAE,QAAQ;IACd,SAAS;CACV,CAAC,CAAA"}
|
@@ -1,5 +1,9 @@
|
|
1
1
|
export declare const reference$type: {
|
2
2
|
path: string;
|
3
3
|
Component: () => string | import("react/jsx-runtime").JSX.Element;
|
4
|
+
children: {
|
5
|
+
path: string;
|
6
|
+
Component: () => string | import("react/jsx-runtime").JSX.Element;
|
7
|
+
}[];
|
4
8
|
};
|
5
9
|
//# sourceMappingURL=reference.$type.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"reference.$type.d.ts","sourceRoot":"","sources":["../../../src/template/routes/reference.$type.tsx"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"reference.$type.d.ts","sourceRoot":"","sources":["../../../src/template/routes/reference.$type.tsx"],"names":[],"mappings":"AAwBA,eAAO,MAAM,cAAc;;;;;;;CAIzB,CAAA"}
|
@@ -4,6 +4,7 @@ import { useLoaderData } from '#lib/react-router-loader/react-router-loader';
|
|
4
4
|
import { useParams } from 'react-router';
|
5
5
|
import { MissingSchema } from '../components/MissingSchema.js';
|
6
6
|
import { NamedType } from '../components/NamedType.js';
|
7
|
+
import { reference$type$field } from './reference.$type.$field.js';
|
7
8
|
const Component = () => {
|
8
9
|
const params = useParams();
|
9
10
|
const data = useLoaderData(`reference`);
|
@@ -19,5 +20,6 @@ const Component = () => {
|
|
19
20
|
export const reference$type = createRoute({
|
20
21
|
path: `:type`,
|
21
22
|
Component,
|
23
|
+
children: [reference$type$field],
|
22
24
|
});
|
23
25
|
//# sourceMappingURL=reference.$type.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"reference.$type.js","sourceRoot":"","sources":["../../../src/template/routes/reference.$type.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAA;AACpE,OAAO,EAAE,aAAa,EAAE,MAAM,8CAA8C,CAAA;AAC5E,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AACxC,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAA;AAC9D,OAAO,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAA;
|
1
|
+
{"version":3,"file":"reference.$type.js","sourceRoot":"","sources":["../../../src/template/routes/reference.$type.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAA;AACpE,OAAO,EAAE,aAAa,EAAE,MAAM,8CAA8C,CAAA;AAC5E,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AACxC,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAA;AAC9D,OAAO,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAA;AACtD,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAA;AAGlE,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,MAAM,GAAG,SAAS,EAAsB,CAAA;IAE9C,MAAM,IAAI,GAAG,aAAa,CAA0B,WAAW,CAAC,CAAA;IAChE,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC;QACjB,OAAO,KAAC,aAAa,KAAG,CAAA;IAC1B,CAAC;IAED,MAAM,IAAI,GAAG,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,CAAA;IAC7C,IAAI,CAAC,IAAI,EAAE,CAAC;QACV,OAAO,uBAAuB,MAAM,CAAC,IAAI,EAAE,CAAA;IAC7C,CAAC;IAED,OAAO,KAAC,SAAS,IAAC,IAAI,EAAE,IAAI,GAAI,CAAA;AAClC,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,cAAc,GAAG,WAAW,CAAC;IACxC,IAAI,EAAE,OAAO;IACb,SAAS;IACT,QAAQ,EAAE,CAAC,oBAAoB,CAAC;CACjC,CAAC,CAAA"}
|
@@ -1,13 +1,19 @@
|
|
1
1
|
import { GrafaidOld } from '#lib/grafaid-old/index';
|
2
2
|
export declare const reference: {
|
3
3
|
path: string;
|
4
|
-
loader: () => {
|
5
|
-
schema: GrafaidOld.Schema.Schema
|
6
|
-
|
4
|
+
loader: ({ params }: any) => Promise<{
|
5
|
+
schema: GrafaidOld.Schema.Schema;
|
6
|
+
currentVersion: any;
|
7
|
+
availableVersions: string[];
|
8
|
+
}>;
|
7
9
|
Component: () => import("react/jsx-runtime").JSX.Element;
|
8
10
|
children: {
|
9
11
|
path: string;
|
10
12
|
Component: () => string | import("react/jsx-runtime").JSX.Element;
|
13
|
+
children: {
|
14
|
+
path: string;
|
15
|
+
Component: () => string | import("react/jsx-runtime").JSX.Element;
|
16
|
+
}[];
|
11
17
|
}[];
|
12
18
|
};
|
13
19
|
//# sourceMappingURL=reference.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"reference.d.ts","sourceRoot":"","sources":["../../../src/template/routes/reference.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;
|
1
|
+
{"version":3,"file":"reference.d.ts","sourceRoot":"","sources":["../../../src/template/routes/reference.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AAkFnD,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;CAKpB,CAAA"}
|
@@ -1,16 +1,28 @@
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
2
2
|
import { GrafaidOld } from '#lib/grafaid-old/index';
|
3
3
|
import { createRoute } from '#lib/react-router-aid/react-router-aid';
|
4
4
|
import { createLoader, useLoaderData } from '#lib/react-router-loader/react-router-loader';
|
5
|
+
import { Box } from '@radix-ui/themes';
|
5
6
|
import { Outlet } from 'react-router';
|
6
|
-
import PROJECT_DATA from 'virtual:polen/project/data.jsonsuper';
|
7
7
|
import { MissingSchema } from '../components/MissingSchema.js';
|
8
|
+
import { VersionSelector } from '../components/VersionSelector.js';
|
9
|
+
import { useVersionPath } from '../hooks/useVersionPath.js';
|
8
10
|
import { SidebarLayout } from '../layouts/index.js';
|
11
|
+
import { VERSION_LATEST } from '../lib/schema-utils/constants.js';
|
12
|
+
import { schemaSource } from '../sources/schema-source.js';
|
9
13
|
import { reference$type } from './reference.$type.js';
|
10
|
-
|
11
|
-
|
14
|
+
import { referenceVersion$version$type } from './reference.version.$version.$type.js';
|
15
|
+
const loader = createLoader(async ({ params }) => {
|
16
|
+
// Handle both versioned and unversioned routes:
|
17
|
+
// - Versioned: /reference/version/:version/:type → params.version exists
|
18
|
+
// - Unversioned: /reference/:type → params.version is undefined, defaults to latest
|
19
|
+
const currentVersion = params.version ?? VERSION_LATEST;
|
20
|
+
const schema = await schemaSource.get(currentVersion);
|
21
|
+
const availableVersions = schemaSource.versions;
|
12
22
|
return {
|
13
|
-
schema
|
23
|
+
schema,
|
24
|
+
currentVersion,
|
25
|
+
availableVersions,
|
14
26
|
};
|
15
27
|
});
|
16
28
|
const Component = () => {
|
@@ -22,6 +34,8 @@ const Component = () => {
|
|
22
34
|
const kindMap = GrafaidOld.getKindMap(data.schema);
|
23
35
|
const sidebarItems = [];
|
24
36
|
const kindEntries = Object.entries(kindMap.list).filter(([_, types]) => types.length > 0);
|
37
|
+
// Build path prefix based on current version using new route structure
|
38
|
+
const versionPath = useVersionPath();
|
25
39
|
for (const [title, types] of kindEntries) {
|
26
40
|
sidebarItems.push({
|
27
41
|
type: `ItemSection`,
|
@@ -31,16 +45,24 @@ const Component = () => {
|
|
31
45
|
links: types.map(type => ({
|
32
46
|
type: `ItemLink`,
|
33
47
|
title: type.name,
|
34
|
-
pathExp: `reference/${type.name}`,
|
48
|
+
pathExp: `reference/${versionPath}${type.name}`,
|
35
49
|
})),
|
36
50
|
});
|
37
51
|
}
|
38
|
-
return (
|
52
|
+
return (_jsxs(SidebarLayout, { sidebar: sidebarItems, children: [_jsx(Box, { mb: `4`, children: _jsx(VersionSelector, { availableVersions: data.availableVersions, currentVersion: data.currentVersion }) }), _jsx(Outlet, {})] }));
|
39
53
|
};
|
54
|
+
// Create the versioned reference route with explicit version prefix
|
55
|
+
const referenceVersioned = createRoute({
|
56
|
+
path: `version/:version`,
|
57
|
+
loader,
|
58
|
+
Component,
|
59
|
+
children: [referenceVersion$version$type],
|
60
|
+
});
|
61
|
+
// Create the main reference route with explicit version path and fallback type path
|
40
62
|
export const reference = createRoute({
|
41
63
|
path: `reference`,
|
42
64
|
loader,
|
43
65
|
Component,
|
44
|
-
children: [reference$type],
|
66
|
+
children: [referenceVersioned, reference$type],
|
45
67
|
});
|
46
68
|
//# sourceMappingURL=reference.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"reference.js","sourceRoot":"","sources":["../../../src/template/routes/reference.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AACnD,OAAO,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAA;AACpE,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,8CAA8C,CAAA;AAC1F,OAAO,EAAE,
|
1
|
+
{"version":3,"file":"reference.js","sourceRoot":"","sources":["../../../src/template/routes/reference.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AACnD,OAAO,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAA;AACpE,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,8CAA8C,CAAA;AAC1F,OAAO,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAA;AACtC,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAA;AACrC,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAA;AAC9D,OAAO,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAA;AAClE,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAA;AAC3D,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AACnD,OAAO,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAA;AACjE,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAA;AAC1D,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AACrD,OAAO,EAAE,6BAA6B,EAAE,MAAM,uCAAuC,CAAA;AAErF,MAAM,MAAM,GAAG,YAAY,CAAC,KAAK,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE;IAC/C,gDAAgD;IAChD,yEAAyE;IACzE,oFAAoF;IACpF,MAAM,cAAc,GAAG,MAAM,CAAC,OAAO,IAAI,cAAc,CAAA;IAEvD,MAAM,MAAM,GAAG,MAAM,YAAY,CAAC,GAAG,CAAC,cAAc,CAAC,CAAA;IAC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EAAE,GAAG,YACV,KAAC,eAAe,IACd,iBAAiB,EAAE,IAAI,CAAC,iBAAiB,EACzC,cAAc,EAAE,IAAI,CAAC,cAAc,GACnC,GACE,EACN,KAAC,MAAM,KAAG,IACI,CACjB,CAAA;AACH,CAAC,CAAA;AAED,oEAAoE;AACpE,MAAM,kBAAkB,GAAG,WAAW,CAAC;IACrC,IAAI,EAAE,kBAAkB;IACxB,MAAM;IACN,SAAS;IACT,QAAQ,EAAE,CAAC,6BAA6B,CAAC;CAC1C,CAAC,CAAA;AAEF,oFAAoF;AACpF,MAAM,CAAC,MAAM,SAAS,GAAG,WAAW,CAAC;IACnC,IAAI,EAAE,WAAW;IACjB,MAAM;IACN,SAAS;IACT,QAAQ,EAAE,CAAC,kBAAkB,EAAE,cAAc,CAAC;CAC/C,CAAC,CAAA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"reference.version.$version.$type.$field.d.ts","sourceRoot":"","sources":["../../../src/template/routes/reference.version.$version.$type.$field.tsx"],"names":[],"mappings":"AA8BA,eAAO,MAAM,mCAAmC;;;;CAI9C,CAAA"}
|
@@ -0,0 +1,32 @@
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
2
|
+
import { Grafaid } from '#lib/grafaid/index';
|
3
|
+
import { createRoute } from '#lib/react-router-aid/react-router-aid';
|
4
|
+
import { useLoaderData } from '#lib/react-router-loader/react-router-loader';
|
5
|
+
import { useParams } from 'react-router';
|
6
|
+
import { Field } from '../components/Field.js';
|
7
|
+
import { MissingSchema } from '../components/MissingSchema.js';
|
8
|
+
const Component = () => {
|
9
|
+
const params = useParams();
|
10
|
+
const data = useLoaderData(`reference`);
|
11
|
+
if (!data.schema) {
|
12
|
+
return _jsx(MissingSchema, {});
|
13
|
+
}
|
14
|
+
const type = data.schema.getType(params.type);
|
15
|
+
if (!type)
|
16
|
+
return `Could not find type ${params.type}`;
|
17
|
+
if (!Grafaid.Schema.TypesLike.isFielded(type)) {
|
18
|
+
return `Type ${params.type} does not have fields`;
|
19
|
+
}
|
20
|
+
const fields = type.getFields();
|
21
|
+
const field = fields[params.field];
|
22
|
+
if (!field) {
|
23
|
+
return `Could not find field ${params.field} on type ${params.type}`;
|
24
|
+
}
|
25
|
+
return _jsx(Field, { data: field });
|
26
|
+
};
|
27
|
+
export const referenceVersion$version$type$field = createRoute({
|
28
|
+
id: `reference-version-type-field`,
|
29
|
+
path: `:field`,
|
30
|
+
Component,
|
31
|
+
});
|
32
|
+
//# sourceMappingURL=reference.version.$version.$type.$field.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"reference.version.$version.$type.$field.js","sourceRoot":"","sources":["../../../src/template/routes/reference.version.$version.$type.$field.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAA;AAC5C,OAAO,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAA;AACpE,OAAO,EAAE,aAAa,EAAE,MAAM,8CAA8C,CAAA;AAC5E,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AACxC,OAAO,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAA;AAC9C,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAA;AAG9D,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,MAAM,GAAG,SAAS,EAAsD,CAAA;IAC9E,MAAM,IAAI,GAAG,aAAa,CAA0B,WAAW,CAAC,CAAA;IAChE,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC;QACjB,OAAO,KAAC,aAAa,KAAG,CAAA;IAC1B,CAAC;IAED,MAAM,IAAI,GAAG,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,CAAA;IAC7C,IAAI,CAAC,IAAI;QAAE,OAAO,uBAAuB,MAAM,CAAC,IAAI,EAAE,CAAA;IACtD,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,SAAS,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,CAAC;QAC9C,OAAO,QAAQ,MAAM,CAAC,IAAI,uBAAuB,CAAA;IACnD,CAAC;IAED,MAAM,MAAM,GAAG,IAAI,CAAC,SAAS,EAAE,CAAA;IAC/B,MAAM,KAAK,GAAG,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;IAClC,IAAI,CAAC,KAAK,EAAE,CAAC;QACX,OAAO,wBAAwB,MAAM,CAAC,KAAK,YAAY,MAAM,CAAC,IAAI,EAAE,CAAA;IACtE,CAAC;IAED,OAAO,KAAC,KAAK,IAAC,IAAI,EAAE,KAAK,GAAI,CAAA;AAC/B,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,mCAAmC,GAAG,WAAW,CAAC;IAC7D,EAAE,EAAE,8BAA8B;IAClC,IAAI,EAAE,QAAQ;IACd,SAAS;CACV,CAAC,CAAA"}
|
@@ -0,0 +1,11 @@
|
|
1
|
+
export declare const referenceVersion$version$type: {
|
2
|
+
id: string;
|
3
|
+
path: string;
|
4
|
+
Component: () => import("react/jsx-runtime").JSX.Element;
|
5
|
+
children: {
|
6
|
+
id: string;
|
7
|
+
path: string;
|
8
|
+
Component: () => string | import("react/jsx-runtime").JSX.Element;
|
9
|
+
}[];
|
10
|
+
};
|
11
|
+
//# sourceMappingURL=reference.version.$version.$type.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"reference.version.$version.$type.d.ts","sourceRoot":"","sources":["../../../src/template/routes/reference.version.$version.$type.tsx"],"names":[],"mappings":"AAwBA,eAAO,MAAM,6BAA6B;;;;;;;;;CAKxC,CAAA"}
|