polen 0.10.0-next.13 → 0.10.0-next.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +375 -49
- package/build/api/api.d.ts +0 -1
- package/build/api/api.d.ts.map +1 -1
- package/build/api/api.js +0 -1
- package/build/api/api.js.map +1 -1
- package/build/api/builder/builder.js +1 -1
- package/build/api/builder/builder.js.map +1 -1
- package/build/api/config/load.js +6 -6
- package/build/api/config/load.js.map +1 -1
- package/build/api/config-resolver/resolve.js +2 -2
- package/build/api/config-resolver/resolve.js.map +1 -1
- package/build/api/schema/data-sources/schema-directory/schema-directory.js +1 -1
- package/build/api/schema/data-sources/schema-directory/schema-directory.js.map +1 -1
- package/build/api/vite/plugins/branding/index.js +4 -4
- package/build/api/vite/plugins/branding/index.js.map +1 -1
- package/build/api/vite/plugins/build.d.ts.map +1 -1
- package/build/api/vite/plugins/build.js +2 -23
- package/build/api/vite/plugins/build.js.map +1 -1
- package/build/api/vite/plugins/core.d.ts +2 -2
- package/build/api/vite/plugins/core.d.ts.map +1 -1
- package/build/api/vite/plugins/core.js +4 -2
- package/build/api/vite/plugins/core.js.map +1 -1
- package/build/api/vite/plugins/pages.d.ts +14 -8
- package/build/api/vite/plugins/pages.d.ts.map +1 -1
- package/build/api/vite/plugins/pages.js +184 -111
- package/build/api/vite/plugins/pages.js.map +1 -1
- package/build/api/vite/plugins/serve.js +5 -5
- package/build/api/vite/plugins/serve.js.map +1 -1
- package/build/cli/_/self-contained-mode.js +5 -5
- package/build/cli/_/self-contained-mode.js.map +1 -1
- package/build/lib/file-router/file-router.d.ts +2 -0
- package/build/lib/file-router/file-router.d.ts.map +1 -1
- package/build/lib/file-router/file-router.js +2 -0
- package/build/lib/file-router/file-router.js.map +1 -1
- package/build/lib/file-router/route.d.ts +0 -2
- package/build/lib/file-router/route.d.ts.map +1 -1
- package/build/lib/file-router/route.js.map +1 -1
- package/build/lib/file-router/scan-tree.d.ts +20 -0
- package/build/lib/file-router/scan-tree.d.ts.map +1 -0
- package/build/lib/file-router/scan-tree.js +158 -0
- package/build/lib/file-router/scan-tree.js.map +1 -0
- package/build/lib/file-router/scan.d.ts.map +1 -1
- package/build/lib/file-router/scan.js +13 -22
- package/build/lib/file-router/scan.js.map +1 -1
- package/build/lib/file-router/sidebar/index.d.ts +3 -0
- package/build/lib/file-router/sidebar/index.d.ts.map +1 -0
- package/build/lib/file-router/sidebar/index.js +4 -0
- package/build/lib/file-router/sidebar/index.js.map +1 -0
- package/build/lib/file-router/sidebar/sidebar-tree.d.ts +9 -0
- package/build/lib/file-router/sidebar/sidebar-tree.d.ts.map +1 -0
- package/build/lib/file-router/sidebar/sidebar-tree.js +85 -0
- package/build/lib/file-router/sidebar/sidebar-tree.js.map +1 -0
- package/build/lib/file-router/sidebar/types.d.ts +17 -0
- package/build/lib/file-router/sidebar/types.d.ts.map +1 -0
- package/build/lib/file-router/sidebar/types.js.map +1 -0
- package/build/lib/helpers.d.ts.map +1 -1
- package/build/lib/helpers.js +3 -5
- package/build/lib/helpers.js.map +1 -1
- package/build/lib/kit-temp.d.ts +0 -54
- package/build/lib/kit-temp.d.ts.map +1 -1
- package/build/lib/kit-temp.js +14 -82
- package/build/lib/kit-temp.js.map +1 -1
- package/build/lib/tree/index.d.ts +3 -0
- package/build/lib/tree/index.d.ts.map +1 -0
- package/build/lib/tree/index.js +2 -0
- package/build/lib/tree/index.js.map +1 -0
- package/build/lib/tree/tree.d.ts +62 -0
- package/build/lib/tree/tree.d.ts.map +1 -0
- package/build/lib/tree/tree.js +134 -0
- package/build/lib/tree/tree.js.map +1 -0
- package/build/singletons/debug.d.ts +1 -1
- package/build/singletons/debug.d.ts.map +1 -1
- package/build/singletons/debug.js +1 -1
- package/build/singletons/debug.js.map +1 -1
- package/build/template/components/ArgumentAnnotation.jsx +16 -0
- package/build/template/components/ArgumentAnnotation.jsx.map +1 -0
- package/build/template/components/ArgumentList.jsx +16 -0
- package/build/template/components/ArgumentList.jsx.map +1 -0
- package/build/template/components/ArgumentListAnnotation.jsx +23 -0
- package/build/template/components/ArgumentListAnnotation.jsx.map +1 -0
- package/build/template/components/Changelog.jsx +68 -0
- package/build/template/components/Changelog.jsx.map +1 -0
- package/build/template/components/{CodeBlock.js → CodeBlock.jsx} +5 -4
- package/build/template/components/{CodeBlock.js.map → CodeBlock.jsx.map} +1 -1
- package/build/template/components/DeprecationReason.jsx +10 -0
- package/build/template/components/DeprecationReason.jsx.map +1 -0
- package/build/template/components/Description.jsx +10 -0
- package/build/template/components/Description.jsx.map +1 -0
- package/build/template/components/Field.jsx +22 -0
- package/build/template/components/Field.jsx.map +1 -0
- package/build/template/components/{FieldList.js → FieldList.jsx} +5 -4
- package/build/template/components/FieldList.jsx.map +1 -0
- package/build/template/components/{FieldListSection.js → FieldListSection.jsx} +6 -4
- package/build/template/components/FieldListSection.jsx.map +1 -0
- package/build/template/components/Link.d.ts +1 -1
- package/build/template/components/{Link.js → Link.jsx} +6 -5
- package/build/template/components/Link.jsx.map +1 -0
- package/build/template/components/Logo.jsx +29 -0
- package/build/template/components/Logo.jsx.map +1 -0
- package/build/template/components/{Markdown.js → Markdown.jsx} +2 -3
- package/build/template/components/Markdown.jsx.map +1 -0
- package/build/template/components/MissingSchema.d.ts +1 -1
- package/build/template/components/MissingSchema.d.ts.map +1 -1
- package/build/template/components/MissingSchema.jsx +4 -0
- package/build/template/components/MissingSchema.jsx.map +1 -0
- package/build/template/components/NamedType.jsx +17 -0
- package/build/template/components/NamedType.jsx.map +1 -0
- package/build/template/components/{RadixLink.js → RadixLink.jsx} +1 -1
- package/build/template/components/RadixLink.jsx.map +1 -0
- package/build/template/components/Texts/{MinorHeading.js → MinorHeading.jsx} +3 -4
- package/build/template/components/Texts/MinorHeading.jsx.map +1 -0
- package/build/template/components/Texts/texts.js +1 -1
- package/build/template/components/Texts/texts.js.map +1 -1
- package/build/template/components/{TypeAnnotation.js → TypeAnnotation.jsx} +18 -8
- package/build/template/components/TypeAnnotation.jsx.map +1 -0
- package/build/template/components/TypeFieldsLinkList.jsx +17 -0
- package/build/template/components/TypeFieldsLinkList.jsx.map +1 -0
- package/build/template/components/TypeIndex.jsx +27 -0
- package/build/template/components/TypeIndex.jsx.map +1 -0
- package/build/template/components/graphql/graphql.d.ts +2 -2
- package/build/template/components/graphql/graphql.jsx +3 -0
- package/build/template/components/graphql/graphql.jsx.map +1 -0
- package/build/template/components/graphql/index.d.ts +1 -1
- package/build/template/components/graphql/index.js +1 -1
- package/build/template/components/graphql/index.js.map +1 -1
- package/build/template/components/graphql/{type-kind-icon.js → type-kind-icon.jsx} +2 -3
- package/build/template/components/graphql/type-kind-icon.jsx.map +1 -0
- package/build/template/components/graphql/type-link.jsx +16 -0
- package/build/template/components/graphql/type-link.jsx.map +1 -0
- package/build/template/components/sidebar/Sidebar.d.ts +3 -3
- package/build/template/components/sidebar/Sidebar.d.ts.map +1 -1
- package/build/template/components/sidebar/Sidebar.jsx +15 -0
- package/build/template/components/sidebar/Sidebar.jsx.map +1 -0
- package/build/template/components/sidebar/SidebarItem.d.ts +3 -3
- package/build/template/components/sidebar/SidebarItem.d.ts.map +1 -1
- package/build/template/components/sidebar/{SidebarItem.js → SidebarItem.jsx} +33 -16
- package/build/template/components/sidebar/SidebarItem.jsx.map +1 -0
- package/build/template/components/sidebar/ToggleButton.d.ts +1 -1
- package/build/template/components/sidebar/ToggleButton.d.ts.map +1 -1
- package/build/template/components/sidebar/ToggleButton.jsx +6 -0
- package/build/template/components/sidebar/ToggleButton.jsx.map +1 -0
- package/build/template/entry.client.d.ts +0 -1
- package/build/template/entry.client.d.ts.map +1 -1
- package/build/template/{entry.client.js → entry.client.jsx} +6 -5
- package/build/template/entry.client.jsx.map +1 -0
- package/build/template/routes/changelog.d.ts +1 -1
- package/build/template/routes/{changelog.js → changelog.jsx} +4 -5
- package/build/template/routes/changelog.jsx.map +1 -0
- package/build/template/routes/{index.js → index.jsx} +2 -3
- package/build/template/routes/index.jsx.map +1 -0
- package/build/template/routes/reference.$type.$field.d.ts +1 -1
- package/build/template/routes/{reference.$type.$field.js → reference.$type.$field.jsx} +5 -6
- package/build/template/routes/reference.$type.$field.jsx.map +1 -0
- package/build/template/routes/reference.$type.d.ts +1 -1
- package/build/template/routes/{reference.$type.js → reference.$type.jsx} +5 -6
- package/build/template/routes/reference.$type.jsx.map +1 -0
- package/build/template/routes/reference.d.ts +2 -2
- package/build/template/routes/reference.d.ts.map +1 -1
- package/build/template/routes/{reference.js → reference.jsx} +12 -7
- package/build/template/routes/reference.jsx.map +1 -0
- package/build/template/routes/root.d.ts +2 -2
- package/build/template/routes/root.d.ts.map +1 -1
- package/build/template/routes/root.jsx +188 -0
- package/build/template/routes/root.jsx.map +1 -0
- package/build/template/routes.jsx +5 -0
- package/build/template/routes.jsx.map +1 -0
- package/build/template/server/app.js +1 -1
- package/build/template/server/app.js.map +1 -1
- package/build/template/server/{render-page.js → render-page.jsx} +4 -3
- package/build/template/server/render-page.jsx.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 +8 -71
- package/src/api/api.ts +0 -1
- package/src/api/config/load.ts +5 -5
- package/src/api/config-resolver/resolve.ts +2 -2
- package/src/api/schema/data-sources/schema-directory/schema-directory.ts +1 -1
- package/src/api/singletons/markdown/markdown.test.ts +1 -1
- package/src/api/utils/asset-url/asset-url.test.ts +4 -4
- package/src/api/vite/plugins/branding/index.ts +4 -4
- package/src/api/vite/plugins/build.ts +1 -25
- package/src/api/vite/plugins/core.ts +8 -5
- package/src/api/vite/plugins/pages.ts +208 -132
- package/src/api/vite/plugins/serve.ts +5 -5
- package/src/cli/_/self-contained-mode.ts +5 -5
- package/src/lib/file-router/file-router.ts +2 -0
- package/src/lib/file-router/linter.test.ts +0 -2
- package/src/lib/file-router/route.ts +0 -2
- package/src/lib/file-router/scan-tree.test.ts +189 -0
- package/src/lib/file-router/scan-tree.ts +205 -0
- package/src/lib/file-router/scan.ts +14 -26
- package/src/lib/file-router/sidebar/index.ts +3 -0
- package/src/lib/file-router/sidebar/sidebar-tree.test.ts +123 -0
- package/src/lib/file-router/sidebar/sidebar-tree.ts +110 -0
- package/src/lib/file-router/sidebar/types.ts +19 -0
- package/src/lib/helpers.ts +3 -4
- package/src/lib/kit-temp.ts +14 -128
- package/src/lib/shiki/shiki.test.ts +1 -1
- package/src/lib/tree/index.ts +2 -0
- package/src/lib/tree/tree.test.ts +117 -0
- package/src/lib/tree/tree.ts +183 -0
- package/src/singletons/debug.ts +1 -1
- package/src/template/components/ArgumentAnnotation.tsx +1 -1
- package/src/template/components/ArgumentList.tsx +1 -1
- package/src/template/components/ArgumentListAnnotation.tsx +2 -2
- package/src/template/components/DeprecationReason.tsx +1 -1
- package/src/template/components/Description.tsx +1 -1
- package/src/template/components/Field.tsx +4 -4
- package/src/template/components/FieldList.tsx +1 -1
- package/src/template/components/FieldListSection.tsx +1 -1
- package/src/template/components/Link.tsx +3 -3
- package/src/template/components/NamedType.tsx +2 -2
- package/src/template/components/TypeAnnotation.tsx +1 -1
- package/src/template/components/TypeFieldsLinkList.tsx +1 -1
- package/src/template/components/TypeIndex.tsx +1 -1
- package/src/template/components/graphql/graphql.tsx +2 -2
- package/src/template/components/graphql/index.ts +1 -1
- package/src/template/components/graphql/type-link.tsx +2 -2
- package/src/template/components/sidebar/Sidebar.tsx +2 -2
- package/src/template/components/sidebar/SidebarItem.tsx +12 -12
- 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 +10 -6
- package/src/template/routes/root.tsx +57 -220
- 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 +0 -32
- package/build/api/content/$$.d.ts +0 -7
- package/build/api/content/$$.d.ts.map +0 -1
- package/build/api/content/$$.js +0 -7
- package/build/api/content/$$.js.map +0 -1
- package/build/api/content/$.d.ts +0 -2
- package/build/api/content/$.d.ts.map +0 -1
- package/build/api/content/$.js +0 -2
- package/build/api/content/$.js.map +0 -1
- package/build/api/content/metadata.d.ts +0 -10
- package/build/api/content/metadata.d.ts.map +0 -1
- package/build/api/content/metadata.js +0 -9
- package/build/api/content/metadata.js.map +0 -1
- package/build/api/content/navbar.d.ts +0 -10
- package/build/api/content/navbar.d.ts.map +0 -1
- package/build/api/content/navbar.js +0 -45
- package/build/api/content/navbar.js.map +0 -1
- package/build/api/content/page.d.ts +0 -11
- package/build/api/content/page.d.ts.map +0 -1
- package/build/api/content/page.js +0 -2
- package/build/api/content/page.js.map +0 -1
- package/build/api/content/scan.d.ts +0 -19
- package/build/api/content/scan.d.ts.map +0 -1
- package/build/api/content/scan.js +0 -90
- package/build/api/content/scan.js.map +0 -1
- package/build/api/content/sidebar.d.ts +0 -104
- package/build/api/content/sidebar.d.ts.map +0 -1
- package/build/api/content/sidebar.js +0 -166
- package/build/api/content/sidebar.js.map +0 -1
- package/build/api/content/utils.d.ts +0 -5
- package/build/api/content/utils.d.ts.map +0 -1
- package/build/api/content/utils.js +0 -8
- package/build/api/content/utils.js.map +0 -1
- package/build/api/static/index.d.ts +0 -2
- package/build/api/static/index.d.ts.map +0 -1
- package/build/api/static/index.js +0 -2
- package/build/api/static/index.js.map +0 -1
- package/build/api/static/manifest.d.ts +0 -18
- package/build/api/static/manifest.d.ts.map +0 -1
- package/build/api/static/manifest.js +0 -13
- package/build/api/static/manifest.js.map +0 -1
- package/build/api/static/rebase.d.ts +0 -14
- package/build/api/static/rebase.d.ts.map +0 -1
- package/build/api/static/rebase.js +0 -110
- package/build/api/static/rebase.js.map +0 -1
- package/build/api/static/static.d.ts +0 -3
- package/build/api/static/static.d.ts.map +0 -1
- package/build/api/static/static.js +0 -3
- package/build/api/static/static.js.map +0 -1
- package/build/cli/commands/static/$default.d.ts +0 -3
- package/build/cli/commands/static/$default.d.ts.map +0 -1
- package/build/cli/commands/static/$default.js +0 -38
- package/build/cli/commands/static/$default.js.map +0 -1
- package/build/cli/commands/static/rebase.d.ts +0 -2
- package/build/cli/commands/static/rebase.d.ts.map +0 -1
- package/build/cli/commands/static/rebase.js +0 -26
- package/build/cli/commands/static/rebase.js.map +0 -1
- package/build/cli/commands/static.d.ts +0 -3
- package/build/cli/commands/static.d.ts.map +0 -1
- package/build/cli/commands/static.js +0 -5
- package/build/cli/commands/static.js.map +0 -1
- package/build/exports/components.d.ts +0 -5
- package/build/exports/components.d.ts.map +0 -1
- package/build/exports/components.js +0 -5
- package/build/exports/components.js.map +0 -1
- package/build/lib/demos/builder.d.ts +0 -83
- package/build/lib/demos/builder.d.ts.map +0 -1
- package/build/lib/demos/builder.js +0 -237
- package/build/lib/demos/builder.js.map +0 -1
- package/build/lib/demos/config-schema.d.ts +0 -243
- package/build/lib/demos/config-schema.d.ts.map +0 -1
- package/build/lib/demos/config-schema.js +0 -52
- package/build/lib/demos/config-schema.js.map +0 -1
- package/build/lib/demos/config.d.ts +0 -40
- package/build/lib/demos/config.d.ts.map +0 -1
- package/build/lib/demos/config.js +0 -180
- package/build/lib/demos/config.js.map +0 -1
- package/build/lib/demos/index.d.ts +0 -9
- package/build/lib/demos/index.d.ts.map +0 -1
- package/build/lib/demos/index.js +0 -8
- package/build/lib/demos/index.js.map +0 -1
- package/build/lib/demos/ui/components.d.ts +0 -33
- package/build/lib/demos/ui/components.d.ts.map +0 -1
- package/build/lib/demos/ui/components.js +0 -699
- package/build/lib/demos/ui/components.js.map +0 -1
- package/build/lib/demos/ui/data-collector.d.ts +0 -88
- package/build/lib/demos/ui/data-collector.d.ts.map +0 -1
- package/build/lib/demos/ui/data-collector.js +0 -174
- package/build/lib/demos/ui/data-collector.js.map +0 -1
- package/build/lib/demos/ui/landing-page-cli.d.ts +0 -3
- package/build/lib/demos/ui/landing-page-cli.d.ts.map +0 -1
- package/build/lib/demos/ui/landing-page-cli.js +0 -21
- package/build/lib/demos/ui/landing-page-cli.js.map +0 -1
- package/build/lib/demos/ui/landing-page.d.ts +0 -32
- package/build/lib/demos/ui/landing-page.d.ts.map +0 -1
- package/build/lib/demos/ui/landing-page.js +0 -83
- package/build/lib/demos/ui/landing-page.js.map +0 -1
- package/build/lib/demos/ui/page-renderer.d.ts +0 -26
- package/build/lib/demos/ui/page-renderer.d.ts.map +0 -1
- package/build/lib/demos/ui/page-renderer.js +0 -104
- package/build/lib/demos/ui/page-renderer.js.map +0 -1
- package/build/lib/demos/utils.d.ts +0 -14
- package/build/lib/demos/utils.d.ts.map +0 -1
- package/build/lib/demos/utils.js +0 -37
- package/build/lib/demos/utils.js.map +0 -1
- package/build/lib/deployment/$$.d.ts +0 -3
- package/build/lib/deployment/$$.d.ts.map +0 -1
- package/build/lib/deployment/$$.js +0 -3
- package/build/lib/deployment/$$.js.map +0 -1
- package/build/lib/deployment/$.d.ts +0 -2
- package/build/lib/deployment/$.d.ts.map +0 -1
- package/build/lib/deployment/$.js +0 -2
- package/build/lib/deployment/$.js.map +0 -1
- package/build/lib/deployment/metadata.d.ts +0 -32
- package/build/lib/deployment/metadata.d.ts.map +0 -1
- package/build/lib/deployment/metadata.js +0 -37
- package/build/lib/deployment/metadata.js.map +0 -1
- package/build/lib/deployment/path-manager.d.ts +0 -41
- package/build/lib/deployment/path-manager.d.ts.map +0 -1
- package/build/lib/deployment/path-manager.js +0 -157
- package/build/lib/deployment/path-manager.js.map +0 -1
- package/build/lib/github-actions/git-controller.d.ts +0 -50
- package/build/lib/github-actions/git-controller.d.ts.map +0 -1
- package/build/lib/github-actions/git-controller.js +0 -90
- package/build/lib/github-actions/git-controller.js.map +0 -1
- package/build/lib/github-actions/github-actions.d.ts +0 -7
- package/build/lib/github-actions/github-actions.d.ts.map +0 -1
- package/build/lib/github-actions/github-actions.js +0 -7
- package/build/lib/github-actions/github-actions.js.map +0 -1
- package/build/lib/github-actions/index.d.ts +0 -2
- package/build/lib/github-actions/index.d.ts.map +0 -1
- package/build/lib/github-actions/index.js +0 -2
- package/build/lib/github-actions/index.js.map +0 -1
- package/build/lib/github-actions/lib/get-pr-deployments.d.ts +0 -12
- package/build/lib/github-actions/lib/get-pr-deployments.d.ts.map +0 -1
- package/build/lib/github-actions/lib/get-pr-deployments.js +0 -51
- package/build/lib/github-actions/lib/get-pr-deployments.js.map +0 -1
- package/build/lib/github-actions/pr-controller.d.ts +0 -39
- package/build/lib/github-actions/pr-controller.d.ts.map +0 -1
- package/build/lib/github-actions/pr-controller.js +0 -122
- package/build/lib/github-actions/pr-controller.js.map +0 -1
- package/build/lib/github-actions/run-step-cli.d.ts +0 -9
- package/build/lib/github-actions/run-step-cli.d.ts.map +0 -1
- package/build/lib/github-actions/run-step-cli.js +0 -71
- package/build/lib/github-actions/run-step-cli.js.map +0 -1
- package/build/lib/github-actions/runner.d.ts +0 -17
- package/build/lib/github-actions/runner.d.ts.map +0 -1
- package/build/lib/github-actions/runner.js +0 -195
- package/build/lib/github-actions/runner.js.map +0 -1
- package/build/lib/github-actions/schemas/context.d.ts +0 -933
- package/build/lib/github-actions/schemas/context.d.ts.map +0 -1
- package/build/lib/github-actions/schemas/context.js +0 -407
- package/build/lib/github-actions/schemas/context.js.map +0 -1
- package/build/lib/github-actions/schemas/index.d.ts +0 -5
- package/build/lib/github-actions/schemas/index.d.ts.map +0 -1
- package/build/lib/github-actions/schemas/index.js +0 -5
- package/build/lib/github-actions/schemas/index.js.map +0 -1
- package/build/lib/github-actions/search-module.d.ts +0 -38
- package/build/lib/github-actions/search-module.d.ts.map +0 -1
- package/build/lib/github-actions/search-module.js +0 -40
- package/build/lib/github-actions/search-module.js.map +0 -1
- package/build/lib/github-actions/step.d.ts +0 -163
- package/build/lib/github-actions/step.d.ts.map +0 -1
- package/build/lib/github-actions/step.js +0 -121
- package/build/lib/github-actions/step.js.map +0 -1
- package/build/lib/graphql-document/$$.d.ts +0 -5
- package/build/lib/graphql-document/$$.d.ts.map +0 -1
- package/build/lib/graphql-document/$$.js +0 -5
- package/build/lib/graphql-document/$$.js.map +0 -1
- package/build/lib/graphql-document/$.d.ts +0 -2
- package/build/lib/graphql-document/$.d.ts.map +0 -1
- package/build/lib/graphql-document/$.js +0 -2
- package/build/lib/graphql-document/$.js.map +0 -1
- package/build/lib/graphql-document/analysis.d.ts +0 -44
- package/build/lib/graphql-document/analysis.d.ts.map +0 -1
- package/build/lib/graphql-document/analysis.js +0 -361
- package/build/lib/graphql-document/analysis.js.map +0 -1
- package/build/lib/graphql-document/components/CopyButton.d.ts +0 -19
- package/build/lib/graphql-document/components/CopyButton.d.ts.map +0 -1
- package/build/lib/graphql-document/components/CopyButton.js +0 -43
- package/build/lib/graphql-document/components/CopyButton.js.map +0 -1
- package/build/lib/graphql-document/components/GraphQLDocument.d.ts +0 -38
- package/build/lib/graphql-document/components/GraphQLDocument.d.ts.map +0 -1
- package/build/lib/graphql-document/components/GraphQLDocument.js +0 -130
- package/build/lib/graphql-document/components/GraphQLDocument.js.map +0 -1
- package/build/lib/graphql-document/components/GraphQLDocumentWithSchema.d.ts +0 -7
- package/build/lib/graphql-document/components/GraphQLDocumentWithSchema.d.ts.map +0 -1
- package/build/lib/graphql-document/components/GraphQLDocumentWithSchema.js +0 -45
- package/build/lib/graphql-document/components/GraphQLDocumentWithSchema.js.map +0 -1
- package/build/lib/graphql-document/components/GraphQLIdentifierPopover.d.ts +0 -33
- package/build/lib/graphql-document/components/GraphQLIdentifierPopover.d.ts.map +0 -1
- package/build/lib/graphql-document/components/GraphQLIdentifierPopover.js +0 -48
- package/build/lib/graphql-document/components/GraphQLIdentifierPopover.js.map +0 -1
- package/build/lib/graphql-document/components/IdentifierLink.d.ts +0 -39
- package/build/lib/graphql-document/components/IdentifierLink.d.ts.map +0 -1
- package/build/lib/graphql-document/components/IdentifierLink.js +0 -75
- package/build/lib/graphql-document/components/IdentifierLink.js.map +0 -1
- package/build/lib/graphql-document/components/graphql-document-styles.d.ts +0 -5
- package/build/lib/graphql-document/components/graphql-document-styles.d.ts.map +0 -1
- package/build/lib/graphql-document/components/graphql-document-styles.js +0 -167
- package/build/lib/graphql-document/components/graphql-document-styles.js.map +0 -1
- package/build/lib/graphql-document/components/index.d.ts +0 -6
- package/build/lib/graphql-document/components/index.d.ts.map +0 -1
- package/build/lib/graphql-document/components/index.js +0 -6
- package/build/lib/graphql-document/components/index.js.map +0 -1
- package/build/lib/graphql-document/example.d.ts +0 -25
- package/build/lib/graphql-document/example.d.ts.map +0 -1
- package/build/lib/graphql-document/example.js +0 -140
- package/build/lib/graphql-document/example.js.map +0 -1
- package/build/lib/graphql-document/graphql-document.d.ts +0 -35
- package/build/lib/graphql-document/graphql-document.d.ts.map +0 -1
- package/build/lib/graphql-document/graphql-document.js +0 -36
- package/build/lib/graphql-document/graphql-document.js.map +0 -1
- package/build/lib/graphql-document/hooks/use-tooltip-state.d.ts +0 -43
- package/build/lib/graphql-document/hooks/use-tooltip-state.d.ts.map +0 -1
- package/build/lib/graphql-document/hooks/use-tooltip-state.js +0 -132
- package/build/lib/graphql-document/hooks/use-tooltip-state.js.map +0 -1
- package/build/lib/graphql-document/positioning-simple.d.ts +0 -68
- package/build/lib/graphql-document/positioning-simple.d.ts.map +0 -1
- package/build/lib/graphql-document/positioning-simple.js +0 -197
- package/build/lib/graphql-document/positioning-simple.js.map +0 -1
- package/build/lib/graphql-document/schema-context.d.ts +0 -8
- package/build/lib/graphql-document/schema-context.d.ts.map +0 -1
- package/build/lib/graphql-document/schema-context.js +0 -11
- package/build/lib/graphql-document/schema-context.js.map +0 -1
- package/build/lib/graphql-document/schema-integration-example.d.ts +0 -27
- package/build/lib/graphql-document/schema-integration-example.d.ts.map +0 -1
- package/build/lib/graphql-document/schema-integration-example.js +0 -297
- package/build/lib/graphql-document/schema-integration-example.js.map +0 -1
- package/build/lib/graphql-document/schema-integration.d.ts +0 -135
- package/build/lib/graphql-document/schema-integration.d.ts.map +0 -1
- package/build/lib/graphql-document/schema-integration.js +0 -328
- package/build/lib/graphql-document/schema-integration.js.map +0 -1
- package/build/lib/graphql-document/types.d.ts +0 -117
- package/build/lib/graphql-document/types.d.ts.map +0 -1
- package/build/lib/graphql-document/types.js.map +0 -1
- package/build/lib/kit-temp.test-d.d.ts +0 -2
- package/build/lib/kit-temp.test-d.d.ts.map +0 -1
- package/build/lib/kit-temp.test-d.js +0 -75
- package/build/lib/kit-temp.test-d.js.map +0 -1
- package/build/lib/mask/$$.d.ts +0 -3
- package/build/lib/mask/$$.d.ts.map +0 -1
- package/build/lib/mask/$$.js +0 -3
- package/build/lib/mask/$$.js.map +0 -1
- package/build/lib/mask/$.d.ts +0 -2
- package/build/lib/mask/$.d.ts.map +0 -1
- package/build/lib/mask/$.js +0 -2
- package/build/lib/mask/$.js.map +0 -1
- package/build/lib/mask/apply.d.ts +0 -86
- package/build/lib/mask/apply.d.ts.map +0 -1
- package/build/lib/mask/apply.js +0 -86
- package/build/lib/mask/apply.js.map +0 -1
- package/build/lib/mask/mask.d.ts +0 -124
- package/build/lib/mask/mask.d.ts.map +0 -1
- package/build/lib/mask/mask.js +0 -137
- package/build/lib/mask/mask.js.map +0 -1
- package/build/lib/mask/mask.test-d.d.ts +0 -2
- package/build/lib/mask/mask.test-d.d.ts.map +0 -1
- package/build/lib/mask/mask.test-d.js +0 -102
- package/build/lib/mask/mask.test-d.js.map +0 -1
- package/build/lib/task/$$.d.ts +0 -3
- package/build/lib/task/$$.d.ts.map +0 -1
- package/build/lib/task/$$.js +0 -3
- package/build/lib/task/$$.js.map +0 -1
- package/build/lib/task/$.d.ts +0 -2
- package/build/lib/task/$.d.ts.map +0 -1
- package/build/lib/task/$.js +0 -2
- package/build/lib/task/$.js.map +0 -1
- package/build/lib/task/report.d.ts +0 -28
- package/build/lib/task/report.d.ts.map +0 -1
- package/build/lib/task/report.js +0 -33
- package/build/lib/task/report.js.map +0 -1
- package/build/lib/task/task.d.ts +0 -44
- package/build/lib/task/task.d.ts.map +0 -1
- package/build/lib/task/task.js +0 -63
- package/build/lib/task/task.js.map +0 -1
- package/build/lib/version-history/index.d.ts +0 -3
- package/build/lib/version-history/index.d.ts.map +0 -1
- package/build/lib/version-history/index.js +0 -2
- package/build/lib/version-history/index.js.map +0 -1
- package/build/lib/version-history/types.d.ts +0 -64
- package/build/lib/version-history/types.d.ts.map +0 -1
- package/build/lib/version-history/types.js +0 -5
- package/build/lib/version-history/types.js.map +0 -1
- package/build/lib/version-history/version-history.d.ts +0 -85
- package/build/lib/version-history/version-history.d.ts.map +0 -1
- package/build/lib/version-history/version-history.js +0 -248
- package/build/lib/version-history/version-history.js.map +0 -1
- package/build/sandbox.d.ts +0 -2
- package/build/sandbox.d.ts.map +0 -1
- package/build/sandbox.js +0 -18
- package/build/sandbox.js.map +0 -1
- package/build/template/components/ArgumentAnnotation.js +0 -10
- package/build/template/components/ArgumentAnnotation.js.map +0 -1
- package/build/template/components/ArgumentList.js +0 -9
- package/build/template/components/ArgumentList.js.map +0 -1
- package/build/template/components/ArgumentListAnnotation.js +0 -15
- package/build/template/components/ArgumentListAnnotation.js.map +0 -1
- package/build/template/components/Changelog.js +0 -44
- package/build/template/components/Changelog.js.map +0 -1
- package/build/template/components/CodeBlockEnhancer.d.ts +0 -2
- package/build/template/components/CodeBlockEnhancer.d.ts.map +0 -1
- package/build/template/components/CodeBlockEnhancer.js +0 -175
- package/build/template/components/CodeBlockEnhancer.js.map +0 -1
- package/build/template/components/DeprecationReason.js +0 -9
- package/build/template/components/DeprecationReason.js.map +0 -1
- package/build/template/components/Description.js +0 -9
- package/build/template/components/Description.js.map +0 -1
- package/build/template/components/Field.js +0 -14
- package/build/template/components/Field.js.map +0 -1
- package/build/template/components/FieldList.js.map +0 -1
- package/build/template/components/FieldListSection.js.map +0 -1
- package/build/template/components/HamburgerMenu.d.ts +0 -9
- package/build/template/components/HamburgerMenu.d.ts.map +0 -1
- package/build/template/components/HamburgerMenu.js +0 -30
- package/build/template/components/HamburgerMenu.js.map +0 -1
- package/build/template/components/Link.js.map +0 -1
- package/build/template/components/Logo.js +0 -20
- package/build/template/components/Logo.js.map +0 -1
- package/build/template/components/MDXComponents.d.ts +0 -11
- package/build/template/components/MDXComponents.d.ts.map +0 -1
- package/build/template/components/MDXComponents.js +0 -70
- package/build/template/components/MDXComponents.js.map +0 -1
- package/build/template/components/Markdown.js.map +0 -1
- package/build/template/components/MissingSchema.js +0 -5
- package/build/template/components/MissingSchema.js.map +0 -1
- package/build/template/components/NamedType.js +0 -12
- package/build/template/components/NamedType.js.map +0 -1
- package/build/template/components/NotFound.d.ts +0 -2
- package/build/template/components/NotFound.d.ts.map +0 -1
- package/build/template/components/NotFound.js +0 -7
- package/build/template/components/NotFound.js.map +0 -1
- package/build/template/components/RadixLink.js.map +0 -1
- package/build/template/components/TestComponent.d.ts +0 -5
- package/build/template/components/TestComponent.d.ts.map +0 -1
- package/build/template/components/TestComponent.js +0 -7
- package/build/template/components/TestComponent.js.map +0 -1
- package/build/template/components/Texts/MinorHeading.js.map +0 -1
- package/build/template/components/ThemeToggle.d.ts +0 -3
- package/build/template/components/ThemeToggle.d.ts.map +0 -1
- package/build/template/components/ThemeToggle.js +0 -9
- package/build/template/components/ThemeToggle.js.map +0 -1
- package/build/template/components/TypeAnnotation.js.map +0 -1
- package/build/template/components/TypeFieldsLinkList.js +0 -9
- package/build/template/components/TypeFieldsLinkList.js.map +0 -1
- package/build/template/components/TypeIndex.js +0 -17
- package/build/template/components/TypeIndex.js.map +0 -1
- package/build/template/components/content/$$.d.ts +0 -3
- package/build/template/components/content/$$.d.ts.map +0 -1
- package/build/template/components/content/$$.js +0 -3
- package/build/template/components/content/$$.js.map +0 -1
- package/build/template/components/content/GraphQLDocumentWithSchema.d.ts +0 -8
- package/build/template/components/content/GraphQLDocumentWithSchema.d.ts.map +0 -1
- package/build/template/components/content/GraphQLDocumentWithSchema.js +0 -16
- package/build/template/components/content/GraphQLDocumentWithSchema.js.map +0 -1
- package/build/template/components/content/GraphQLDocumentWrapper.d.ts +0 -7
- package/build/template/components/content/GraphQLDocumentWrapper.d.ts.map +0 -1
- package/build/template/components/content/GraphQLDocumentWrapper.js +0 -62
- package/build/template/components/content/GraphQLDocumentWrapper.js.map +0 -1
- package/build/template/components/graphql/graphql.js +0 -3
- package/build/template/components/graphql/graphql.js.map +0 -1
- package/build/template/components/graphql/type-kind-icon.js.map +0 -1
- package/build/template/components/graphql/type-link.js +0 -11
- package/build/template/components/graphql/type-link.js.map +0 -1
- package/build/template/components/sidebar/Sidebar.js +0 -11
- package/build/template/components/sidebar/Sidebar.js.map +0 -1
- package/build/template/components/sidebar/SidebarItem.js.map +0 -1
- package/build/template/components/sidebar/ToggleButton.js +0 -5
- package/build/template/components/sidebar/ToggleButton.js.map +0 -1
- package/build/template/contexts/ThemeContext.d.ts +0 -12
- package/build/template/contexts/ThemeContext.d.ts.map +0 -1
- package/build/template/contexts/ThemeContext.js +0 -40
- package/build/template/contexts/ThemeContext.js.map +0 -1
- package/build/template/entry.client.js.map +0 -1
- package/build/template/routes/changelog.js.map +0 -1
- package/build/template/routes/index.js.map +0 -1
- package/build/template/routes/reference.$type.$field.js.map +0 -1
- package/build/template/routes/reference.$type.js.map +0 -1
- package/build/template/routes/reference.js.map +0 -1
- package/build/template/routes/root.js +0 -286
- package/build/template/routes/root.js.map +0 -1
- package/build/template/routes.js +0 -5
- package/build/template/routes.js.map +0 -1
- package/build/template/server/render-page.js.map +0 -1
- package/src/api/content/$$.ts +0 -6
- package/src/api/content/$.test.ts +0 -72
- package/src/api/content/$.ts +0 -1
- package/src/api/content/metadata.ts +0 -11
- package/src/api/content/navbar.test.ts +0 -55
- package/src/api/content/navbar.ts +0 -61
- package/src/api/content/page.ts +0 -12
- package/src/api/content/scan.ts +0 -117
- package/src/api/content/sidebar.test.ts +0 -297
- package/src/api/content/sidebar.ts +0 -283
- package/src/api/content/utils.ts +0 -7
- package/src/api/static/index.ts +0 -1
- package/src/api/static/manifest.test.ts +0 -106
- package/src/api/static/manifest.ts +0 -16
- package/src/api/static/rebase.test.ts +0 -229
- package/src/api/static/rebase.ts +0 -140
- package/src/api/static/static.ts +0 -2
- package/src/cli/commands/static/$default.ts +0 -43
- package/src/cli/commands/static/rebase.ts +0 -37
- package/src/cli/commands/static.ts +0 -6
- package/src/exports/components.ts +0 -4
- package/src/lib/demos/builder.ts +0 -298
- package/src/lib/demos/config-schema.ts +0 -56
- package/src/lib/demos/config.test.ts +0 -193
- package/src/lib/demos/config.ts +0 -205
- package/src/lib/demos/index.ts +0 -9
- package/src/lib/demos/ui/components.ts +0 -739
- package/src/lib/demos/ui/data-collector.ts +0 -246
- package/src/lib/demos/ui/landing-page-cli.ts +0 -23
- package/src/lib/demos/ui/landing-page.ts +0 -126
- package/src/lib/demos/ui/page-renderer.ts +0 -124
- package/src/lib/demos/utils.ts +0 -43
- package/src/lib/deployment/$$.ts +0 -2
- package/src/lib/deployment/$.test.ts +0 -53
- package/src/lib/deployment/$.ts +0 -1
- package/src/lib/deployment/metadata.ts +0 -40
- package/src/lib/deployment/path-manager.ts +0 -186
- package/src/lib/github-actions/git-controller.ts +0 -151
- package/src/lib/github-actions/github-actions.ts +0 -6
- package/src/lib/github-actions/index.ts +0 -1
- package/src/lib/github-actions/lib/get-pr-deployments.ts +0 -76
- package/src/lib/github-actions/pr-controller.test.ts +0 -172
- package/src/lib/github-actions/pr-controller.ts +0 -183
- package/src/lib/github-actions/run-step-cli.ts +0 -84
- package/src/lib/github-actions/runner.test.ts +0 -192
- package/src/lib/github-actions/runner.ts +0 -226
- package/src/lib/github-actions/schemas/context.ts +0 -424
- package/src/lib/github-actions/schemas/index.ts +0 -5
- package/src/lib/github-actions/search-module.test.ts +0 -110
- package/src/lib/github-actions/search-module.ts +0 -76
- package/src/lib/github-actions/step.test.ts +0 -149
- package/src/lib/github-actions/step.ts +0 -232
- package/src/lib/graphql-document/$$.ts +0 -4
- package/src/lib/graphql-document/$.test.ts +0 -132
- package/src/lib/graphql-document/$.ts +0 -1
- package/src/lib/graphql-document/README.md +0 -102
- package/src/lib/graphql-document/analysis.ts +0 -415
- package/src/lib/graphql-document/components/CopyButton.tsx +0 -76
- package/src/lib/graphql-document/components/GraphQLDocument.tsx +0 -250
- package/src/lib/graphql-document/components/GraphQLDocument.unit.test.ts +0 -188
- package/src/lib/graphql-document/components/GraphQLDocumentWithSchema.tsx +0 -70
- package/src/lib/graphql-document/components/GraphQLIdentifierPopover.tsx +0 -197
- package/src/lib/graphql-document/components/IdentifierLink.tsx +0 -160
- package/src/lib/graphql-document/components/graphql-document-styles.ts +0 -167
- package/src/lib/graphql-document/components/index.ts +0 -5
- package/src/lib/graphql-document/demo.md +0 -155
- package/src/lib/graphql-document/example.ts +0 -163
- package/src/lib/graphql-document/graphql-document.ts +0 -37
- package/src/lib/graphql-document/hooks/use-tooltip-state.test.ts +0 -76
- package/src/lib/graphql-document/hooks/use-tooltip-state.ts +0 -191
- package/src/lib/graphql-document/positioning-simple.test.ts +0 -252
- package/src/lib/graphql-document/positioning-simple.ts +0 -271
- package/src/lib/graphql-document/schema-context.tsx +0 -20
- package/src/lib/graphql-document/schema-integration-example.ts +0 -341
- package/src/lib/graphql-document/schema-integration.test.ts +0 -365
- package/src/lib/graphql-document/schema-integration.ts +0 -497
- package/src/lib/graphql-document/types.ts +0 -129
- package/src/lib/kit-temp.test-d.ts +0 -115
- package/src/lib/kit-temp.test.ts +0 -127
- package/src/lib/mask/$$.ts +0 -2
- package/src/lib/mask/$.test.ts +0 -248
- package/src/lib/mask/$.ts +0 -1
- package/src/lib/mask/apply.ts +0 -134
- package/src/lib/mask/mask.test-d.ts +0 -144
- package/src/lib/mask/mask.ts +0 -244
- package/src/lib/task/$$.ts +0 -2
- package/src/lib/task/$.test.ts +0 -209
- package/src/lib/task/$.ts +0 -1
- package/src/lib/task/report.ts +0 -72
- package/src/lib/task/task.ts +0 -112
- package/src/lib/version-history/index.test.ts +0 -196
- package/src/lib/version-history/index.ts +0 -4
- package/src/lib/version-history/types.ts +0 -68
- package/src/lib/version-history/version-history.ts +0 -293
- package/src/sandbox.ts +0 -20
- package/src/template/components/CodeBlockEnhancer.tsx +0 -192
- package/src/template/components/HamburgerMenu.tsx +0 -96
- package/src/template/components/MDXComponents.tsx +0 -101
- package/src/template/components/NotFound.tsx +0 -28
- package/src/template/components/TestComponent.tsx +0 -6
- package/src/template/components/ThemeToggle.tsx +0 -21
- package/src/template/components/content/$$.ts +0 -2
- package/src/template/components/content/GraphQLDocumentWithSchema.tsx +0 -18
- package/src/template/components/content/GraphQLDocumentWrapper.tsx +0 -82
- package/src/template/contexts/ThemeContext.tsx +0 -60
- /package/build/lib/{graphql-document → file-router/sidebar}/types.js +0 -0
@@ -1,248 +0,0 @@
|
|
1
|
-
import { compare as semverCompare, parse as semverParse, prerelease as semverPrerelease, } from '@vltpkg/semver';
|
2
|
-
import { simpleGit } from 'simple-git';
|
3
|
-
// Helper to get git instance
|
4
|
-
function getGit(repoPath = process.cwd()) {
|
5
|
-
return simpleGit(repoPath);
|
6
|
-
}
|
7
|
-
/**
|
8
|
-
* Parse a semver string into a Version object
|
9
|
-
*/
|
10
|
-
export function parseSemver(tag) {
|
11
|
-
return semverParse(tag) || null;
|
12
|
-
}
|
13
|
-
/**
|
14
|
-
* Check if a tag is a semver tag
|
15
|
-
*/
|
16
|
-
export function isSemverTag(tag) {
|
17
|
-
return semverParse(tag) !== undefined;
|
18
|
-
}
|
19
|
-
/**
|
20
|
-
* Check if a version is a prerelease
|
21
|
-
*/
|
22
|
-
export function isPrerelease(tag) {
|
23
|
-
const prereleaseArray = semverPrerelease(tag);
|
24
|
-
return prereleaseArray !== undefined && prereleaseArray.length > 0;
|
25
|
-
}
|
26
|
-
/**
|
27
|
-
* Check if a version is stable (not a prerelease)
|
28
|
-
*/
|
29
|
-
export function isStableVersion(tag) {
|
30
|
-
return !isPrerelease(tag);
|
31
|
-
}
|
32
|
-
/**
|
33
|
-
* Get the deployment path for a version
|
34
|
-
* Stable versions go to /latest/, prereleases go to /[version]/
|
35
|
-
*/
|
36
|
-
export function getDeploymentPath(version, prefix = '/polen') {
|
37
|
-
const isStable = isStableVersion(version);
|
38
|
-
return isStable ? `${prefix}/latest/` : `${prefix}/${version}/`;
|
39
|
-
}
|
40
|
-
/**
|
41
|
-
* Get all versions from the repository
|
42
|
-
*/
|
43
|
-
export async function getVersions(repoPath) {
|
44
|
-
const git = getGit(repoPath);
|
45
|
-
const tags = await git.tags();
|
46
|
-
const versions = [];
|
47
|
-
for (const tag of tags.all) {
|
48
|
-
if (!isSemverTag(tag))
|
49
|
-
continue;
|
50
|
-
const semver = parseSemver(tag);
|
51
|
-
if (!semver)
|
52
|
-
continue;
|
53
|
-
try {
|
54
|
-
const tagInfo = await git.show([`${tag}^{commit}`, `--format=%H %at`]);
|
55
|
-
const [commit, timestamp] = tagInfo.trim().split(' ');
|
56
|
-
if (!commit)
|
57
|
-
continue;
|
58
|
-
versions.push({
|
59
|
-
git: {
|
60
|
-
tag,
|
61
|
-
sha: commit,
|
62
|
-
},
|
63
|
-
date: new Date(parseInt(timestamp || '0', 10) * 1000),
|
64
|
-
isPrerelease: isPrerelease(tag),
|
65
|
-
semver,
|
66
|
-
});
|
67
|
-
}
|
68
|
-
catch (e) {
|
69
|
-
// Skip tags that can't be resolved
|
70
|
-
console.warn(`Failed to get info for tag ${tag}:`, e);
|
71
|
-
}
|
72
|
-
}
|
73
|
-
// Sort by semver (newest first) - reverse of semverCompare
|
74
|
-
return versions.sort((a, b) => semverCompare(b.semver, a.semver));
|
75
|
-
}
|
76
|
-
/**
|
77
|
-
* Get dist-tag information (latest, next, etc.)
|
78
|
-
*/
|
79
|
-
export async function getDistTag(tagName, repoPath) {
|
80
|
-
const git = getGit(repoPath);
|
81
|
-
try {
|
82
|
-
const commit = await git.revparse([tagName]);
|
83
|
-
// Find semver tag at this commit
|
84
|
-
const tags = await git.tag([`--points-at`, commit]);
|
85
|
-
const semverTags = tags.split('\n').filter(isSemverTag);
|
86
|
-
return {
|
87
|
-
name: tagName,
|
88
|
-
commit: commit.trim(),
|
89
|
-
semverTag: semverTags[0],
|
90
|
-
};
|
91
|
-
}
|
92
|
-
catch (e) {
|
93
|
-
return null;
|
94
|
-
}
|
95
|
-
}
|
96
|
-
/**
|
97
|
-
* Get the 'latest' dist-tag
|
98
|
-
*/
|
99
|
-
export async function getDistTagLatest(repoPath) {
|
100
|
-
return getDistTag('latest', repoPath);
|
101
|
-
}
|
102
|
-
/**
|
103
|
-
* Get all dist-tags
|
104
|
-
*/
|
105
|
-
export async function getDistTags(repoPath) {
|
106
|
-
const commonDistTags = ['latest', 'next', 'beta', 'alpha', 'canary'];
|
107
|
-
const distTags = [];
|
108
|
-
for (const tag of commonDistTags) {
|
109
|
-
const info = await getDistTag(tag, repoPath);
|
110
|
-
if (info) {
|
111
|
-
distTags.push(info);
|
112
|
-
}
|
113
|
-
}
|
114
|
-
return distTags;
|
115
|
-
}
|
116
|
-
/**
|
117
|
-
* Get the latest stable version
|
118
|
-
*/
|
119
|
-
export async function getLatestStableVersion(repoPath) {
|
120
|
-
const versions = await getVersions(repoPath);
|
121
|
-
return versions.find(v => !v.isPrerelease) || null;
|
122
|
-
}
|
123
|
-
/**
|
124
|
-
* Get the latest prerelease version
|
125
|
-
*/
|
126
|
-
export async function getLatestPrereleaseVersion(repoPath) {
|
127
|
-
const versions = await getVersions(repoPath);
|
128
|
-
return versions.find(v => v.isPrerelease) || null;
|
129
|
-
}
|
130
|
-
/**
|
131
|
-
* Get version at a specific commit
|
132
|
-
*/
|
133
|
-
export async function getVersionAtCommit(commit, repoPath) {
|
134
|
-
const git = getGit(repoPath);
|
135
|
-
const tags = await git.tag([`--points-at`, commit]);
|
136
|
-
const semverTags = tags.split('\n').filter(isSemverTag);
|
137
|
-
if (semverTags.length === 0)
|
138
|
-
return null;
|
139
|
-
// Get full info for the first semver tag
|
140
|
-
const versions = await getVersions(repoPath);
|
141
|
-
return versions.find(v => v.git.tag === semverTags[0]) || null;
|
142
|
-
}
|
143
|
-
/**
|
144
|
-
* Get deployment history for demos (versions that should have demos)
|
145
|
-
*/
|
146
|
-
export async function getDeploymentHistory(minimumVersion, repoPath) {
|
147
|
-
const versions = await getVersions(repoPath);
|
148
|
-
if (!minimumVersion)
|
149
|
-
return versions;
|
150
|
-
const minSemver = parseSemver(minimumVersion);
|
151
|
-
if (!minSemver)
|
152
|
-
return versions;
|
153
|
-
return versions.filter(v => semverCompare(v.semver, minSemver) >= 0);
|
154
|
-
}
|
155
|
-
/**
|
156
|
-
* Get the current development cycle: latest stable + all newer prereleases
|
157
|
-
*/
|
158
|
-
export async function getCurrentDevelopmentCycle(repoPath) {
|
159
|
-
const latestStable = await getLatestStableVersion(repoPath);
|
160
|
-
if (!latestStable) {
|
161
|
-
// No stable version yet, return all versions as prereleases
|
162
|
-
const allVersions = await getVersions(repoPath);
|
163
|
-
return {
|
164
|
-
stable: null,
|
165
|
-
prereleases: allVersions,
|
166
|
-
all: allVersions,
|
167
|
-
};
|
168
|
-
}
|
169
|
-
const allVersions = await getVersions(repoPath);
|
170
|
-
const prereleases = allVersions.filter(v => v.isPrerelease && semverCompare(v.semver, latestStable.semver) > 0);
|
171
|
-
return {
|
172
|
-
stable: latestStable,
|
173
|
-
prereleases,
|
174
|
-
all: [latestStable, ...prereleases],
|
175
|
-
};
|
176
|
-
}
|
177
|
-
/**
|
178
|
-
* Get versions since a specific version (inclusive)
|
179
|
-
*/
|
180
|
-
export async function getVersionsSince(sinceVersion, skipVersions = [], repoPath) {
|
181
|
-
const sinceSemver = parseSemver(sinceVersion);
|
182
|
-
if (!sinceSemver) {
|
183
|
-
throw new Error(`Invalid version: ${sinceVersion}`);
|
184
|
-
}
|
185
|
-
const allVersions = await getVersions(repoPath);
|
186
|
-
return allVersions.filter(v => {
|
187
|
-
// Skip if in skip list
|
188
|
-
if (skipVersions.includes(v.git.tag))
|
189
|
-
return false;
|
190
|
-
// Include if >= sinceVersion
|
191
|
-
return semverCompare(v.semver, sinceSemver) >= 0;
|
192
|
-
});
|
193
|
-
}
|
194
|
-
/**
|
195
|
-
* Get all prereleases from past development cycles
|
196
|
-
*
|
197
|
-
* A development cycle is the set of prereleases between stable versions.
|
198
|
-
* This returns all prereleases that are not part of the current development cycle.
|
199
|
-
*
|
200
|
-
* Note: This only returns prereleases. Stable versions are not part of development cycles.
|
201
|
-
*/
|
202
|
-
export async function getPastDevelopmentCycles(repoPath) {
|
203
|
-
const allVersions = await getVersions(repoPath);
|
204
|
-
const currentCycle = await getCurrentDevelopmentCycle(repoPath);
|
205
|
-
const currentCycleTags = new Set(currentCycle.all.map(v => v.git.tag));
|
206
|
-
// Return prereleases not in the current cycle
|
207
|
-
return allVersions.filter(v => {
|
208
|
-
return v.isPrerelease && !currentCycleTags.has(v.git.tag);
|
209
|
-
});
|
210
|
-
}
|
211
|
-
/**
|
212
|
-
* Get a complete registry of all versions and dist-tags
|
213
|
-
*/
|
214
|
-
export async function getVersionCatalog(repoPath) {
|
215
|
-
const [allVersions, distTagInfos] = await Promise.all([
|
216
|
-
getVersions(repoPath),
|
217
|
-
getDistTags(repoPath),
|
218
|
-
]);
|
219
|
-
// Map dist-tags to versions
|
220
|
-
const distTags = {};
|
221
|
-
for (const tagInfo of distTagInfos) {
|
222
|
-
if (tagInfo.semverTag) {
|
223
|
-
const version = allVersions.find(v => v.git.tag === tagInfo.semverTag);
|
224
|
-
if (version) {
|
225
|
-
distTags[tagInfo.name] = version;
|
226
|
-
}
|
227
|
-
}
|
228
|
-
}
|
229
|
-
// Separate stable and prerelease versions
|
230
|
-
const stable = allVersions.filter(v => !v.isPrerelease);
|
231
|
-
const prerelease = allVersions.filter(v => v.isPrerelease);
|
232
|
-
return {
|
233
|
-
distTags,
|
234
|
-
versions: allVersions,
|
235
|
-
stable,
|
236
|
-
prerelease,
|
237
|
-
};
|
238
|
-
}
|
239
|
-
// Legacy class export for backward compatibility
|
240
|
-
// TODO: Remove this once all usages are migrated
|
241
|
-
export class VersionHistory {
|
242
|
-
static parseSemver = parseSemver;
|
243
|
-
static isSemverTag = isSemverTag;
|
244
|
-
static isPrerelease = isPrerelease;
|
245
|
-
static isStableVersion = isStableVersion;
|
246
|
-
static getDeploymentPath = getDeploymentPath;
|
247
|
-
}
|
248
|
-
//# sourceMappingURL=version-history.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"version-history.js","sourceRoot":"","sources":["../../../src/lib/version-history/version-history.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,OAAO,IAAI,aAAa,EACxB,KAAK,IAAI,WAAW,EACpB,UAAU,IAAI,gBAAgB,GAE/B,MAAM,gBAAgB,CAAA;AACvB,OAAO,EAAkB,SAAS,EAAE,MAAM,YAAY,CAAA;AAKtD,6BAA6B;AAC7B,SAAS,MAAM,CAAC,WAAmB,OAAO,CAAC,GAAG,EAAE;IAC9C,OAAO,SAAS,CAAC,QAAQ,CAAC,CAAA;AAC5B,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,WAAW,CAAC,GAAW;IACrC,OAAO,WAAW,CAAC,GAAG,CAAC,IAAI,IAAI,CAAA;AACjC,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,WAAW,CAAC,GAAW;IACrC,OAAO,WAAW,CAAC,GAAG,CAAC,KAAK,SAAS,CAAA;AACvC,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,YAAY,CAAC,GAAW;IACtC,MAAM,eAAe,GAAG,gBAAgB,CAAC,GAAG,CAAC,CAAA;IAC7C,OAAO,eAAe,KAAK,SAAS,IAAI,eAAe,CAAC,MAAM,GAAG,CAAC,CAAA;AACpE,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,eAAe,CAAC,GAAW;IACzC,OAAO,CAAC,YAAY,CAAC,GAAG,CAAC,CAAA;AAC3B,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,iBAAiB,CAAC,OAAe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,CAAC,iBAAiB,GAAG,iBAAiB,CAAA"}
|
package/build/sandbox.d.ts
DELETED
package/build/sandbox.d.ts.map
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"sandbox.d.ts","sourceRoot":"","sources":["../src/sandbox.ts"],"names":[],"mappings":""}
|
package/build/sandbox.js
DELETED
@@ -1,18 +0,0 @@
|
|
1
|
-
import { filePathToRouteLogical } from '#lib/file-router/scan';
|
2
|
-
import { Path } from '@wollybeard/kit';
|
3
|
-
// Test parsing of numbered directory
|
4
|
-
const testPath1 = Path.parse('a/10_b/index.md');
|
5
|
-
const logical1 = filePathToRouteLogical(testPath1);
|
6
|
-
console.log('Path 1:', testPath1);
|
7
|
-
console.log('Logical 1:', logical1);
|
8
|
-
// Test parsing of numbered file
|
9
|
-
const testPath2 = Path.parse('a/10_b/g.md');
|
10
|
-
const logical2 = filePathToRouteLogical(testPath2);
|
11
|
-
console.log('\nPath 2:', testPath2);
|
12
|
-
console.log('Logical 2:', logical2);
|
13
|
-
// Test directory structure
|
14
|
-
const testPath3 = Path.parse('a/30_d/index.md');
|
15
|
-
const logical3 = filePathToRouteLogical(testPath3);
|
16
|
-
console.log('\nPath 3:', testPath3);
|
17
|
-
console.log('Logical 3:', logical3);
|
18
|
-
//# sourceMappingURL=sandbox.js.map
|
package/build/sandbox.js.map
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"sandbox.js","sourceRoot":"","sources":["../src/sandbox.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAA;AAC9D,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAA;AAEtC,qCAAqC;AACrC,MAAM,SAAS,GAAG,IAAI,CAAC,KAAK,CAAC,iBAAiB,CAAC,CAAA;AAC/C,MAAM,QAAQ,GAAG,sBAAsB,CAAC,SAAS,CAAC,CAAA;AAClD,OAAO,CAAC,GAAG,CAAC,SAAS,EAAE,SAAS,CAAC,CAAA;AACjC,OAAO,CAAC,GAAG,CAAC,YAAY,EAAE,QAAQ,CAAC,CAAA;AAEnC,gCAAgC;AAChC,MAAM,SAAS,GAAG,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,CAAA;AAC3C,MAAM,QAAQ,GAAG,sBAAsB,CAAC,SAAS,CAAC,CAAA;AAClD,OAAO,CAAC,GAAG,CAAC,WAAW,EAAE,SAAS,CAAC,CAAA;AACnC,OAAO,CAAC,GAAG,CAAC,YAAY,EAAE,QAAQ,CAAC,CAAA;AAEnC,2BAA2B;AAC3B,MAAM,SAAS,GAAG,IAAI,CAAC,KAAK,CAAC,iBAAiB,CAAC,CAAA;AAC/C,MAAM,QAAQ,GAAG,sBAAsB,CAAC,SAAS,CAAC,CAAA;AAClD,OAAO,CAAC,GAAG,CAAC,WAAW,EAAE,SAAS,CAAC,CAAA;AACnC,OAAO,CAAC,GAAG,CAAC,YAAY,EAAE,QAAQ,CAAC,CAAA"}
|
@@ -1,10 +0,0 @@
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
2
|
-
import { Box, Flex, Text } from '@radix-ui/themes';
|
3
|
-
import { TypeAnnotation } from './TypeAnnotation.js';
|
4
|
-
/**
|
5
|
-
* Renders a single GraphQL argument in SDL syntax
|
6
|
-
*/
|
7
|
-
export const ArgumentAnnotation = ({ data }) => {
|
8
|
-
return (_jsx(Box, { as: 'div', children: _jsxs(Flex, { children: [_jsx(Text, { children: data.name }), _jsx(Text, { children: ":\u00A0" }), _jsx(TypeAnnotation, { type: data.type })] }) }));
|
9
|
-
};
|
10
|
-
//# sourceMappingURL=ArgumentAnnotation.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"ArgumentAnnotation.js","sourceRoot":"","sources":["../../../src/template/components/ArgumentAnnotation.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAA;AAGlD,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAA;AAMpD;;GAEG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAc,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE;IACxD,OAAO,CACL,KAAC,GAAG,IAAC,EAAE,EAAC,KAAK,YACX,MAAC,IAAI,eACH,KAAC,IAAI,cAAE,IAAI,CAAC,IAAI,GAAQ,EACxB,KAAC,IAAI,0BAAe,EAEpB,KAAC,cAAc,IAAC,IAAI,EAAE,IAAI,CAAC,IAAI,GAAI,IAC9B,GACH,CACP,CAAA;AACH,CAAC,CAAA"}
|
@@ -1,9 +0,0 @@
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
2
|
-
import { Box, Flex, Heading, Text } from '@radix-ui/themes';
|
3
|
-
import { TypeAnnotation } from "./TypeAnnotation.js";
|
4
|
-
export const ArgumentsList = ({ args }) => {
|
5
|
-
if (args.length === 0)
|
6
|
-
return null;
|
7
|
-
return (_jsxs(Flex, { direction: 'column', children: [_jsx(Heading, { size: '1', weight: 'bold', children: "Arguments" }), args.map(arg => (_jsxs(Box, { children: [_jsx(Text, { children: arg.name }), _jsx(Text, { children: ":" }), _jsx(TypeAnnotation, { type: arg.type }), arg.description && _jsx(Text, { as: 'p', size: '2', color: 'gray', children: arg.description })] }, arg.name)))] }));
|
8
|
-
};
|
9
|
-
//# sourceMappingURL=ArgumentList.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"ArgumentList.js","sourceRoot":"","sources":["../../../src/template/components/ArgumentList.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAA;AAG3D,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAsB,CAAA;AAMrD,MAAM,CAAC,MAAM,aAAa,GAAc,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE;IACnD,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,IAAI,CAAA;IAElC,OAAO,CACL,MAAC,IAAI,IAAC,SAAS,EAAC,QAAQ,aACtB,KAAC,OAAO,IAAC,IAAI,EAAC,GAAG,EAAC,MAAM,EAAC,MAAM,0BAAoB,EAClD,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC,CACf,MAAC,GAAG,eACF,KAAC,IAAI,cAAE,GAAG,CAAC,IAAI,GAAQ,EACvB,KAAC,IAAI,oBAAS,EACd,KAAC,cAAc,IAAC,IAAI,EAAE,GAAG,CAAC,IAAI,GAAI,EACjC,GAAG,CAAC,WAAW,IAAI,KAAC,IAAI,IAAC,EAAE,EAAC,GAAG,EAAC,IAAI,EAAC,GAAG,EAAC,KAAK,EAAC,MAAM,YAAE,GAAG,CAAC,WAAW,GAAQ,KAJvE,GAAG,CAAC,IAAI,CAKZ,CACP,CAAC,IACG,CACR,CAAA;AACH,CAAC,CAAA"}
|
@@ -1,15 +0,0 @@
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
2
|
-
import { GrafaidOld } from '#lib/grafaid-old/index';
|
3
|
-
import { Box, Text } from '@radix-ui/themes';
|
4
|
-
import { ArgumentAnnotation } from "./ArgumentAnnotation.js";
|
5
|
-
import { FieldList } from "./FieldList.js";
|
6
|
-
export const ArgumentListAnnotation = ({ field }) => {
|
7
|
-
if (field.args.length === 0)
|
8
|
-
return null;
|
9
|
-
const inputObject = GrafaidOld.getIAP(field);
|
10
|
-
const inputObjectFields = inputObject
|
11
|
-
? (_jsx(Box, { pl: '3', style: { borderLeft: `1px solid var(--gray-6)` }, children: _jsx(FieldList, { data: inputObject }) }))
|
12
|
-
: null;
|
13
|
-
return (_jsxs(_Fragment, { children: [_jsx(Text, { children: "(" }), _jsxs(Box, { ml: '2', children: [field.args.map(arg => _jsx(ArgumentAnnotation, { data: arg }, arg.name)), inputObjectFields] }), _jsx(Text, { children: ")" })] }));
|
14
|
-
};
|
15
|
-
//# sourceMappingURL=ArgumentListAnnotation.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"ArgumentListAnnotation.js","sourceRoot":"","sources":["../../../src/template/components/ArgumentListAnnotation.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AACnD,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAA;AAG5C,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAA0B,CAAA;AAC7D,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAiB,CAAA;AAM3C,MAAM,CAAC,MAAM,sBAAsB,GAAc,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE;IAC7D,IAAI,KAAK,CAAC,IAAI,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,IAAI,CAAA;IAExC,MAAM,WAAW,GAAG,UAAU,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;IAC5C,MAAM,iBAAiB,GAAG,WAAW;QACnC,CAAC,CAAC,CACA,KAAC,GAAG,IAAC,EAAE,EAAC,GAAG,EAAC,KAAK,EAAE,EAAE,UAAU,EAAE,yBAAyB,EAAE,YAC1D,KAAC,SAAS,IAAC,IAAI,EAAE,WAAW,GAAI,GAC5B,CACP;QACD,CAAC,CAAC,IAAI,CAAA;IAER,OAAO,CACL,8BACE,KAAC,IAAI,oBAAS,EACd,MAAC,GAAG,IAAC,EAAE,EAAC,GAAG,aACR,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC,KAAC,kBAAkB,IAAgB,IAAI,EAAE,GAAG,IAAnB,GAAG,CAAC,IAAI,CAAe,CAAC,EACvE,iBAAiB,IACd,EACN,KAAC,IAAI,oBAAS,IACb,CACJ,CAAA;AACH,CAAC,CAAA"}
|
@@ -1,44 +0,0 @@
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
2
|
-
import { Grafaid } from '#lib/grafaid/index';
|
3
|
-
import { Box, Code } from '@radix-ui/themes';
|
4
|
-
import { Graphql } from "./graphql/index.js";
|
5
|
-
export const renderDate = (date) => {
|
6
|
-
return date.toLocaleString(`default`, {
|
7
|
-
month: `long`,
|
8
|
-
year: `numeric`,
|
9
|
-
day: `numeric`,
|
10
|
-
timeZone: `utc`,
|
11
|
-
});
|
12
|
-
};
|
13
|
-
export const Changelog = ({ schema }) => {
|
14
|
-
return (_jsx(Box, { children: schema.versions.map(changeset => _jsx(Changeset, { changeset: changeset }, changeset.date.getDate())) }));
|
15
|
-
};
|
16
|
-
const Changeset = ({ changeset }) => {
|
17
|
-
return (_jsxs(Box, { children: [_jsx("h1", { title: changeset.date.toISOString(), children: renderDate(changeset.date) }), _jsx("ul", { children: changeset.changes.map(change => _jsx(Change, { change: change, schema: changeset.after }, change.message)) })] }));
|
18
|
-
};
|
19
|
-
const Change = ({ change, schema }) => {
|
20
|
-
const getTypeOrThrow = (name) => {
|
21
|
-
const type = schema.getType(name);
|
22
|
-
if (!type)
|
23
|
-
throw new Error(`Type ${name} not found`);
|
24
|
-
return type;
|
25
|
-
};
|
26
|
-
switch (change.type) {
|
27
|
-
case `TYPE_ADDED`: {
|
28
|
-
const type = getTypeOrThrow(change.meta.addedTypeName);
|
29
|
-
return (_jsxs("li", { children: ["Added type ", _jsx(Graphql.TypeLink, { type: type })] }));
|
30
|
-
}
|
31
|
-
case `FIELD_ADDED`: {
|
32
|
-
const rootTypeMap = Grafaid.Schema.getRootTypeMap(schema);
|
33
|
-
const rootDetails = rootTypeMap.list.find(_ => _.name.canonical === change.meta.typeName);
|
34
|
-
const type = getTypeOrThrow(change.meta.typeName);
|
35
|
-
if (rootDetails) {
|
36
|
-
return (_jsxs("li", { children: ["Added ", rootDetails.operationType, ` `, _jsx(Code, { color: 'jade', variant: 'ghost', style: { borderBottom: `1px dotted var(--jade-6)`, borderRadius: `0` }, children: change.meta.addedFieldName })] }));
|
37
|
-
}
|
38
|
-
return (_jsxs("li", { children: ["Added field", ` `, _jsx(Code, { color: 'gray', variant: 'ghost', style: { borderBottom: `1px dotted var(--gray-6)`, borderRadius: `0` }, children: change.meta.addedFieldName }), ` `, "to type", ` `, _jsx(Graphql.TypeLink, { type: type }), "."] }));
|
39
|
-
}
|
40
|
-
default:
|
41
|
-
return _jsxs("li", { children: ["TODO: ", change.type] });
|
42
|
-
}
|
43
|
-
};
|
44
|
-
//# sourceMappingURL=Changelog.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"Changelog.js","sourceRoot":"","sources":["../../../src/template/components/Changelog.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAA;AAG5C,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAA;AAG5C,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAA;AAE5C,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,IAAU,EAAE,EAAE;IACvC,OAAO,IAAI,CAAC,cAAc,CAAC,SAAS,EAAE;QACpC,KAAK,EAAE,MAAM;QACb,IAAI,EAAE,SAAS;QACf,GAAG,EAAE,SAAS;QACd,QAAQ,EAAE,KAAK;KAChB,CAAC,CAAA;AACJ,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,SAAS,GAA+C,CAAC,EAAE,MAAM,EAAE,EAAE,EAAE;IAClF,OAAO,CACL,KAAC,GAAG,cACD,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAC,SAAS,CAAC,EAAE,CAAC,KAAC,SAAS,IAAgC,SAAS,EAAE,SAAS,IAA9C,SAAS,CAAC,IAAI,CAAC,OAAO,EAAE,CAA0B,CAAC,GACjG,CACP,CAAA;AACH,CAAC,CAAA;AAED,MAAM,SAAS,GAAwD,CAAC,EAAE,SAAS,EAAE,EAAE,EAAE;IACvF,OAAO,CACL,MAAC,GAAG,eACF,aAAI,KAAK,EAAE,SAAS,CAAC,I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AI,WAAW,EAAE,CAAC;gBAChB,OAAO,CACL,mCACS,WAAW,CAAC,aAAa,EAC/B,GAAG,EACJ,KAAC,IAAI,IACH,KAAK,EAAC,MAAM,EACZ,OAAO,EAAC,OAAO,EACf,KAAK,EAAE,EAAE,YAAY,EAAE,0BAA0B,EAAE,YAAY,EAAE,GAAG,EAAE,YAErE,MAAM,CAAC,IAAI,CAAC,cAAc,GACtB,IACJ,CACN,CAAA;YACH,CAAC;YAED,OAAO,CACL,wCACc,GAAG,EACf,KAAC,IAAI,IACH,KAAK,EAAC,MAAM,EACZ,OAAO,EAAC,OAAO,EACf,KAAK,EAAE,EAAE,YAAY,EAAE,0BAA0B,EAAE,YAAY,EAAE,GAAG,EAAE,YAErE,MAAM,CAAC,IAAI,CAAC,cAAc,GACtB,EACN,GAAG,aACI,GAAG,EACX,KAAC,OAAO,CAAC,QAAQ,IAAC,IAAI,EAAE,IAAI,GAAI,SAC7B,CACN,CAAA;QACH,CAAC;QACD;YACE,OAAO,mCAAW,MAAM,CAAC,IAAI,IAAM,CAAA;IACvC,CAAC;AACH,CAAC,CAAA"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"CodeBlockEnhancer.d.ts","sourceRoot":"","sources":["../../../src/template/components/CodeBlockEnhancer.tsx"],"names":[],"mappings":"AAIA,eAAO,MAAM,iBAAiB,YA2L7B,CAAA"}
|
@@ -1,175 +0,0 @@
|
|
1
|
-
import { useEffect } from 'react';
|
2
|
-
import { useLocation } from 'react-router';
|
3
|
-
import { useTheme } from "../contexts/ThemeContext.js";
|
4
|
-
export const CodeBlockEnhancer = () => {
|
5
|
-
const { appearance } = useTheme();
|
6
|
-
const location = useLocation();
|
7
|
-
useEffect(() => {
|
8
|
-
// Add styles for code block enhancements
|
9
|
-
const styleId = 'code-block-enhancer-styles';
|
10
|
-
let styleElement = document.getElementById(styleId);
|
11
|
-
if (!styleElement) {
|
12
|
-
styleElement = document.createElement('style');
|
13
|
-
styleElement.id = styleId;
|
14
|
-
document.head.appendChild(styleElement);
|
15
|
-
}
|
16
|
-
styleElement.textContent = `
|
17
|
-
/* Enhanced code block styles */
|
18
|
-
pre.shiki {
|
19
|
-
position: relative;
|
20
|
-
}
|
21
|
-
|
22
|
-
pre.shiki[data-title] {
|
23
|
-
margin-top: 0;
|
24
|
-
border-radius: 0 0 8px 8px !important;
|
25
|
-
}
|
26
|
-
|
27
|
-
pre.shiki[data-title]::before {
|
28
|
-
content: attr(data-title);
|
29
|
-
display: block;
|
30
|
-
position: absolute;
|
31
|
-
top: -2.5rem;
|
32
|
-
left: -1px;
|
33
|
-
right: -1px;
|
34
|
-
background-color: ${appearance === 'dark' ? '#2a2b3d' : '#f3f4f6'};
|
35
|
-
border: 1px solid var(--gray-4);
|
36
|
-
border-bottom: 1px solid ${appearance === 'dark' ? '#3a3b4d' : '#e5e7eb'};
|
37
|
-
border-radius: 8px 8px 0 0;
|
38
|
-
padding: 0.5rem 1rem;
|
39
|
-
font-size: 0.875rem;
|
40
|
-
font-weight: 500;
|
41
|
-
color: var(--gray-11);
|
42
|
-
font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
|
43
|
-
}
|
44
|
-
|
45
|
-
pre.shiki[data-title][data-language]::after {
|
46
|
-
content: attr(data-language);
|
47
|
-
position: absolute;
|
48
|
-
top: -2rem;
|
49
|
-
right: 1rem;
|
50
|
-
font-size: 0.75rem;
|
51
|
-
color: var(--gray-9);
|
52
|
-
font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
|
53
|
-
}
|
54
|
-
|
55
|
-
.code-block-copy {
|
56
|
-
position: absolute;
|
57
|
-
top: 0.5rem;
|
58
|
-
right: 0.5rem;
|
59
|
-
padding: 0.25rem 0.5rem;
|
60
|
-
font-size: 0.75rem;
|
61
|
-
cursor: pointer;
|
62
|
-
border: none;
|
63
|
-
border-radius: 4px;
|
64
|
-
transition: all 0.2s;
|
65
|
-
background-color: ${appearance === 'dark' ? 'rgba(0, 0, 0, 0.5)' : 'rgba(255, 255, 255, 0.8)'};
|
66
|
-
backdrop-filter: blur(4px);
|
67
|
-
color: ${appearance === 'dark' ? '#fff' : '#000'};
|
68
|
-
font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
|
69
|
-
}
|
70
|
-
|
71
|
-
pre.shiki[data-title] .code-block-copy {
|
72
|
-
top: -2rem;
|
73
|
-
right: 6rem;
|
74
|
-
background-color: transparent;
|
75
|
-
color: var(--gray-11);
|
76
|
-
}
|
77
|
-
|
78
|
-
.code-block-copy:hover {
|
79
|
-
background-color: var(--accent-9) !important;
|
80
|
-
color: white !important;
|
81
|
-
}
|
82
|
-
|
83
|
-
.code-block-copy[data-copied="true"] {
|
84
|
-
background-color: var(--green-9) !important;
|
85
|
-
color: white !important;
|
86
|
-
}
|
87
|
-
`;
|
88
|
-
return () => {
|
89
|
-
if (styleElement && styleElement.parentNode) {
|
90
|
-
styleElement.parentNode.removeChild(styleElement);
|
91
|
-
}
|
92
|
-
};
|
93
|
-
}, [appearance]);
|
94
|
-
useEffect(() => {
|
95
|
-
const enhanceCodeBlocks = () => {
|
96
|
-
const codeBlocks = document.querySelectorAll('pre.shiki:not([data-enhanced])');
|
97
|
-
codeBlocks.forEach((block) => {
|
98
|
-
const preElement = block;
|
99
|
-
preElement.setAttribute('data-enhanced', 'true');
|
100
|
-
// Get language from class name
|
101
|
-
const classes = preElement.className.split(' ');
|
102
|
-
const language = classes.find(c => c !== 'shiki' && c !== 'shiki-light' && c !== 'shiki-dark') || 'text';
|
103
|
-
// Check for title in first line
|
104
|
-
const codeElement = preElement.querySelector('code');
|
105
|
-
if (!codeElement)
|
106
|
-
return;
|
107
|
-
const firstLine = codeElement.textContent?.split('\n')[0] || '';
|
108
|
-
let title = '';
|
109
|
-
const titleMatch = firstLine.match(/^\/\/\s*title:\s*(.+)$/i);
|
110
|
-
if (titleMatch && titleMatch[1]) {
|
111
|
-
title = titleMatch[1];
|
112
|
-
// Remove title line from display
|
113
|
-
const firstLineElement = codeElement.querySelector('span.line');
|
114
|
-
if (firstLineElement) {
|
115
|
-
firstLineElement.style.display = 'none';
|
116
|
-
}
|
117
|
-
// Set data attributes for CSS
|
118
|
-
preElement.setAttribute('data-title', title);
|
119
|
-
preElement.setAttribute('data-language', language);
|
120
|
-
preElement.style.marginTop = '3rem';
|
121
|
-
}
|
122
|
-
// Create copy button
|
123
|
-
const copyButton = document.createElement('button');
|
124
|
-
copyButton.className = 'code-block-copy';
|
125
|
-
copyButton.textContent = 'Copy';
|
126
|
-
copyButton.setAttribute('data-copied', 'false');
|
127
|
-
copyButton.onclick = async (e) => {
|
128
|
-
e.preventDefault();
|
129
|
-
e.stopPropagation();
|
130
|
-
// Get clean code without the title line
|
131
|
-
const code = codeElement.textContent || '';
|
132
|
-
const cleanCode = title ? code.split('\n').slice(1).join('\n') : code;
|
133
|
-
try {
|
134
|
-
await navigator.clipboard.writeText(cleanCode);
|
135
|
-
copyButton.textContent = 'Copied!';
|
136
|
-
copyButton.setAttribute('data-copied', 'true');
|
137
|
-
setTimeout(() => {
|
138
|
-
copyButton.textContent = 'Copy';
|
139
|
-
copyButton.setAttribute('data-copied', 'false');
|
140
|
-
}, 2000);
|
141
|
-
}
|
142
|
-
catch (err) {
|
143
|
-
console.error('Failed to copy:', err);
|
144
|
-
}
|
145
|
-
};
|
146
|
-
// Append copy button directly to pre element
|
147
|
-
preElement.appendChild(copyButton);
|
148
|
-
});
|
149
|
-
};
|
150
|
-
// Small delay to ensure DOM is ready
|
151
|
-
const timeoutId = setTimeout(enhanceCodeBlocks, 100);
|
152
|
-
return () => {
|
153
|
-
clearTimeout(timeoutId);
|
154
|
-
// Clean up enhanced code blocks
|
155
|
-
document.querySelectorAll('pre.shiki[data-enhanced]').forEach(block => {
|
156
|
-
block.removeAttribute('data-enhanced');
|
157
|
-
block.removeAttribute('data-title');
|
158
|
-
block.removeAttribute('data-language');
|
159
|
-
const copyButton = block.querySelector('.code-block-copy');
|
160
|
-
if (copyButton) {
|
161
|
-
copyButton.remove();
|
162
|
-
}
|
163
|
-
// Restore hidden title lines
|
164
|
-
const firstLine = block.querySelector('span.line');
|
165
|
-
if (firstLine && firstLine.style.display === 'none') {
|
166
|
-
firstLine.style.display = '';
|
167
|
-
} // Reset margin
|
168
|
-
;
|
169
|
-
block.style.marginTop = '';
|
170
|
-
});
|
171
|
-
};
|
172
|
-
}, [location.pathname]); // Re-run when route changes
|
173
|
-
return null;
|
174
|
-
};
|
175
|
-
//# sourceMappingURL=CodeBlockEnhancer.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"CodeBlockEnhancer.js","sourceRoot":"","sources":["../../../src/template/components/CodeBlockEnhancer.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AACjC,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAA;AAC1C,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA8B,CAAA;AAEvD,MAAM,CAAC,MAAM,iBAAiB,GAAG,GAAG,EAAE;IACpC,MAAM,EAAE,UAAU,EAAE,GAAG,QAAQ,EAAE,CAAA;IACjC,MAAM,QAAQ,GAAG,WAAW,EAAE,CAAA;IAE9B,SAAS,CAAC,GAAG,EAAE;QACb,yCAAyC;QACzC,MAAM,OAAO,GAAG,4BAA4B,CAAA;QAC5C,IAAI,YAAY,GAAG,QAAQ,CAAC,cAAc,CAAC,OAAO,CAAqB,CAAA;QAEvE,IAAI,CAAC,YAAY,EAAE,CAAC;YAClB,YAAY,GAAG,QAAQ,CAAC,aAAa,CAAC,OAAO,CAAC,CAAA;YAC9C,YAAY,CAAC,EAAE,GAAG,OAAO,CAAA;YACzB,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,YAAY,CAAC,CAAA;QACzC,CAAC;QAED,YAAY,CAAC,WAAW,GAAG;;;;;;;;;;;;;;;;;;4BAkBH,UAAU,KAAK,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS;;m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;gBACrB,CAAC;gBACD,6BAA6B;gBAC7B,MAAM,SAAS,GAAG,KAAK,CAAC,aAAa,CAAC,WAAW,CAAgB,CAAA;gBACjE,IAAI,SAAS,IAAI,SAAS,CAAC,KAAK,CAAC,OAAO,KAAK,MAAM,EAAE,CAAC;oBACpD,SAAS,CAAC,KAAK,CAAC,OAAO,GAAG,EAAE,CAAA;gBAC9B,CAAC,CAAC,eAAe;gBAEjB,CAAC;gBAAC,KAAqB,CAAC,KAAK,CAAC,SAAS,GAAG,EAAE,CAAA;YAC9C,CAAC,CAAC,CAAA;QACJ,CAAC,CAAA;IACH,CAAC,EAAE,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAA,CAAC,4BAA4B;IAEpD,OAAO,IAAI,CAAA;AACb,CAAC,CAAA"}
|
@@ -1,9 +0,0 @@
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
2
|
-
import { Text } from '@radix-ui/themes';
|
3
|
-
import { Markdown } from "./Markdown.js";
|
4
|
-
export const DeprecationReason = ({ data }) => {
|
5
|
-
if (!data.deprecationReason)
|
6
|
-
return null;
|
7
|
-
return (_jsx(Text, { as: 'div', color: 'red', children: _jsx(Markdown, { children: data.deprecationReason }) }));
|
8
|
-
};
|
9
|
-
//# sourceMappingURL=DeprecationReason.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"DeprecationReason.js","sourceRoot":"","sources":["../../../src/template/components/DeprecationReason.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAA;AAEvC,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAgB,CAAA;AAEzC,MAAM,CAAC,MAAM,iBAAiB,GAA0C,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE;IACnF,IAAI,CAAC,IAAI,CAAC,iBAAiB;QAAE,OAAO,IAAI,CAAA;IAExC,OAAO,CACL,KAAC,IAAI,IAAC,EAAE,EAAC,KAAK,EAAC,KAAK,EAAC,KAAK,YACxB,KAAC,QAAQ,cAAE,IAAI,CAAC,iBAAiB,GAAY,GACxC,CACR,CAAA;AACH,CAAC,CAAA"}
|
@@ -1,9 +0,0 @@
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
2
|
-
import { Text } from '@radix-ui/themes';
|
3
|
-
import { Markdown } from "./Markdown.js";
|
4
|
-
export const Description = ({ data }) => {
|
5
|
-
if (!data.description)
|
6
|
-
return null;
|
7
|
-
return (_jsx(Text, { as: 'div', color: 'gray', children: _jsx(Markdown, { children: data.description }) }));
|
8
|
-
};
|
9
|
-
//# sourceMappingURL=Description.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"Description.js","sourceRoot":"","sources":["../../../src/template/components/Description.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAA;AAEvC,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAgB,CAAA;AAKzC,MAAM,CAAC,MAAM,WAAW,GAA6D,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE;IAChG,IAAI,CAAC,IAAI,CAAC,WAAW;QAAE,OAAO,IAAI,CAAA;IAElC,OAAO,CACL,KAAC,IAAI,IAAC,EAAE,EAAC,KAAK,EAAC,KAAK,EAAC,MAAM,YACzB,KAAC,QAAQ,cAAE,IAAI,CAAC,WAAW,GAAY,GAClC,CACR,CAAA;AACH,CAAC,CAAA"}
|
@@ -1,14 +0,0 @@
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
2
|
-
import { GrafaidOld } from '#lib/grafaid-old/index';
|
3
|
-
import { Box, Text } from '@radix-ui/themes';
|
4
|
-
import { ArgumentListAnnotation } from "./ArgumentListAnnotation.js";
|
5
|
-
import { DeprecationReason } from "./DeprecationReason.js";
|
6
|
-
import { Description } from "./Description.js";
|
7
|
-
import { TypeAnnotation } from "./TypeAnnotation.js";
|
8
|
-
export const Field = ({ data, ...boxProps }) => {
|
9
|
-
const argumentList = GrafaidOld.isOutputField(data)
|
10
|
-
? _jsx(ArgumentListAnnotation, { field: data })
|
11
|
-
: null;
|
12
|
-
return (_jsxs(Box, { ...boxProps, children: [_jsx(Description, { data: data }), _jsx(DeprecationReason, { data: data }), _jsx(Text, { weight: 'medium', children: data.name }), _jsxs(Text, { children: [argumentList, ":", ` `, _jsx(TypeAnnotation, { type: data.type })] })] }));
|
13
|
-
};
|
14
|
-
//# sourceMappingURL=Field.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"Field.js","sourceRoot":"","sources":["../../../src/template/components/Field.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AAEnD,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAA;AAE5C,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA8B,CAAA;AACrE,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAyB,CAAA;AAC3D,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAmB,CAAA;AAC/C,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAsB,CAAA;AAMrD,MAAM,CAAC,MAAM,KAAK,GAAc,CAAC,EAAE,IAAI,EAAE,GAAG,QAAQ,EAAE,EAAE,EAAE;IACxD,MAAM,YAAY,GAAG,UAAU,CAAC,aAAa,CAAC,IAAI,CAAC;QACjD,CAAC,CAAC,KAAC,sBAAsB,IAAC,KAAK,EAAE,IAAI,GAAI;QACzC,CAAC,CAAC,IAAI,CAAA;IAER,OAAO,CACL,MAAC,GAAG,OAAK,QAAQ,aACf,KAAC,WAAW,IAAC,IAAI,EAAE,IAAI,GAAI,EAC3B,KAAC,iBAAiB,IAAC,IAAI,EAAE,IAAI,GAAI,EACjC,KAAC,IAAI,IAAC,MAAM,EAAC,QAAQ,YAAE,IAAI,CAAC,IAAI,GAAQ,EACxC,MAAC,IAAI,eACF,YAAY,OACX,GAAG,EACL,KAAC,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