polen 0.9.1-next.1 → 0.10.0-next.10
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 +49 -364
- 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 +9 -1
- package/build/api/config/configurator.d.ts.map +1 -1
- package/build/api/config/configurator.js +18 -6
- package/build/api/config/configurator.js.map +1 -1
- package/build/api/config/load.js +5 -5
- 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/content/$$.d.ts +7 -0
- package/build/api/content/$$.d.ts.map +1 -0
- package/build/api/content/$$.js +7 -0
- package/build/api/content/$$.js.map +1 -0
- package/build/api/content/$.d.ts +2 -0
- package/build/api/content/$.d.ts.map +1 -0
- package/build/api/content/$.js +2 -0
- package/build/api/content/$.js.map +1 -0
- package/build/api/content/metadata.d.ts +10 -0
- package/build/api/content/metadata.d.ts.map +1 -0
- package/build/api/content/metadata.js +9 -0
- package/build/api/content/metadata.js.map +1 -0
- package/build/api/content/navbar.d.ts +10 -0
- package/build/api/content/navbar.d.ts.map +1 -0
- package/build/api/content/navbar.js +45 -0
- package/build/api/content/navbar.js.map +1 -0
- package/build/api/content/page.d.ts +11 -0
- package/build/api/content/page.d.ts.map +1 -0
- package/build/api/content/page.js +2 -0
- package/build/api/content/page.js.map +1 -0
- package/build/api/content/scan.d.ts +19 -0
- package/build/api/content/scan.d.ts.map +1 -0
- package/build/api/content/scan.js +90 -0
- package/build/api/content/scan.js.map +1 -0
- package/build/api/content/sidebar.d.ts +104 -0
- package/build/api/content/sidebar.d.ts.map +1 -0
- package/build/api/content/sidebar.js +166 -0
- package/build/api/content/sidebar.js.map +1 -0
- package/build/api/content/utils.d.ts +5 -0
- package/build/api/content/utils.d.ts.map +1 -0
- package/build/api/content/utils.js +8 -0
- package/build/api/content/utils.js.map +1 -0
- 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 +3 -2
- package/build/api/schema/data-sources/schema-directory/schema-directory.js.map +1 -1
- package/build/api/static/index.d.ts +2 -0
- package/build/api/static/index.d.ts.map +1 -0
- package/build/api/static/index.js +2 -0
- package/build/api/static/index.js.map +1 -0
- package/build/api/static/manifest.d.ts +18 -0
- package/build/api/static/manifest.d.ts.map +1 -0
- package/build/api/static/manifest.js +13 -0
- package/build/api/static/manifest.js.map +1 -0
- package/build/api/static/rebase.d.ts +14 -0
- package/build/api/static/rebase.d.ts.map +1 -0
- package/build/api/static/rebase.js +110 -0
- package/build/api/static/rebase.js.map +1 -0
- package/build/api/static/static.d.ts +3 -0
- package/build/api/static/static.d.ts.map +1 -0
- package/build/api/static/static.js +3 -0
- package/build/api/static/static.js.map +1 -0
- package/build/api/vite/plugins/branding/index.d.ts +4 -0
- package/build/api/vite/plugins/branding/index.d.ts.map +1 -0
- package/build/api/vite/plugins/branding/index.js +80 -0
- package/build/api/vite/plugins/branding/index.js.map +1 -0
- package/build/api/vite/plugins/build.d.ts.map +1 -1
- package/build/api/vite/plugins/build.js +22 -1
- 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 -5
- 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 +2 -1
- package/build/api/vite/plugins/main.js.map +1 -1
- package/build/api/vite/plugins/pages.d.ts +8 -14
- package/build/api/vite/plugins/pages.d.ts.map +1 -1
- package/build/api/vite/plugins/pages.js +110 -183
- 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/cli/commands/static/$default.d.ts +3 -0
- package/build/cli/commands/static/$default.d.ts.map +1 -0
- package/build/cli/commands/static/$default.js +38 -0
- package/build/cli/commands/static/$default.js.map +1 -0
- package/build/cli/commands/static/rebase.d.ts +2 -0
- package/build/cli/commands/static/rebase.d.ts.map +1 -0
- package/build/cli/commands/static/rebase.js +26 -0
- package/build/cli/commands/static/rebase.js.map +1 -0
- package/build/cli/commands/static.d.ts +3 -0
- package/build/cli/commands/static.d.ts.map +1 -0
- package/build/cli/commands/static.js +5 -0
- package/build/cli/commands/static.js.map +1 -0
- package/build/exports/components.d.ts +2 -0
- package/build/exports/components.d.ts.map +1 -0
- package/build/exports/components.js +2 -0
- package/build/exports/components.js.map +1 -0
- package/build/lib/demos/builder.d.ts +83 -0
- package/build/lib/demos/builder.d.ts.map +1 -0
- package/build/lib/demos/builder.js +237 -0
- package/build/lib/demos/builder.js.map +1 -0
- package/build/lib/demos/config-schema.d.ts +243 -0
- package/build/lib/demos/config-schema.d.ts.map +1 -0
- package/build/lib/demos/config-schema.js +52 -0
- package/build/lib/demos/config-schema.js.map +1 -0
- package/build/lib/demos/config.d.ts +40 -0
- package/build/lib/demos/config.d.ts.map +1 -0
- package/build/lib/demos/config.js +180 -0
- package/build/lib/demos/config.js.map +1 -0
- package/build/lib/demos/index.d.ts +9 -0
- package/build/lib/demos/index.d.ts.map +1 -0
- package/build/lib/demos/index.js +8 -0
- package/build/lib/demos/index.js.map +1 -0
- package/build/lib/demos/ui/components.d.ts +33 -0
- package/build/lib/demos/ui/components.d.ts.map +1 -0
- package/build/lib/demos/ui/components.js +699 -0
- package/build/lib/demos/ui/components.js.map +1 -0
- package/build/lib/demos/ui/data-collector.d.ts +88 -0
- package/build/lib/demos/ui/data-collector.d.ts.map +1 -0
- package/build/lib/demos/ui/data-collector.js +174 -0
- package/build/lib/demos/ui/data-collector.js.map +1 -0
- package/build/lib/demos/ui/landing-page-cli.d.ts +3 -0
- package/build/lib/demos/ui/landing-page-cli.d.ts.map +1 -0
- package/build/lib/demos/ui/landing-page-cli.js +21 -0
- package/build/lib/demos/ui/landing-page-cli.js.map +1 -0
- package/build/lib/demos/ui/landing-page.d.ts +32 -0
- package/build/lib/demos/ui/landing-page.d.ts.map +1 -0
- package/build/lib/demos/ui/landing-page.js +83 -0
- package/build/lib/demos/ui/landing-page.js.map +1 -0
- package/build/lib/demos/ui/page-renderer.d.ts +26 -0
- package/build/lib/demos/ui/page-renderer.d.ts.map +1 -0
- package/build/lib/demos/ui/page-renderer.js +104 -0
- package/build/lib/demos/ui/page-renderer.js.map +1 -0
- package/build/lib/demos/utils.d.ts +14 -0
- package/build/lib/demos/utils.d.ts.map +1 -0
- package/build/lib/demos/utils.js +37 -0
- package/build/lib/demos/utils.js.map +1 -0
- package/build/lib/deployment/$$.d.ts +3 -0
- package/build/lib/deployment/$$.d.ts.map +1 -0
- package/build/lib/deployment/$$.js +3 -0
- package/build/lib/deployment/$$.js.map +1 -0
- package/build/lib/deployment/$.d.ts +2 -0
- package/build/lib/deployment/$.d.ts.map +1 -0
- package/build/lib/deployment/$.js +2 -0
- package/build/lib/deployment/$.js.map +1 -0
- package/build/lib/deployment/metadata.d.ts +32 -0
- package/build/lib/deployment/metadata.d.ts.map +1 -0
- package/build/lib/deployment/metadata.js +37 -0
- package/build/lib/deployment/metadata.js.map +1 -0
- package/build/lib/deployment/path-manager.d.ts +41 -0
- package/build/lib/deployment/path-manager.d.ts.map +1 -0
- package/build/lib/deployment/path-manager.js +157 -0
- package/build/lib/deployment/path-manager.js.map +1 -0
- package/build/lib/file-router/file-router.d.ts +0 -2
- package/build/lib/file-router/file-router.d.ts.map +1 -1
- package/build/lib/file-router/file-router.js +0 -2
- package/build/lib/file-router/file-router.js.map +1 -1
- package/build/lib/file-router/route.d.ts +2 -0
- 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.d.ts.map +1 -1
- package/build/lib/file-router/scan.js +22 -13
- package/build/lib/file-router/scan.js.map +1 -1
- package/build/lib/github-actions/git-controller.d.ts +50 -0
- package/build/lib/github-actions/git-controller.d.ts.map +1 -0
- package/build/lib/github-actions/git-controller.js +90 -0
- package/build/lib/github-actions/git-controller.js.map +1 -0
- package/build/lib/github-actions/github-actions.d.ts +7 -0
- package/build/lib/github-actions/github-actions.d.ts.map +1 -0
- package/build/lib/github-actions/github-actions.js +7 -0
- package/build/lib/github-actions/github-actions.js.map +1 -0
- package/build/lib/github-actions/index.d.ts +2 -0
- package/build/lib/github-actions/index.d.ts.map +1 -0
- package/build/lib/github-actions/index.js +2 -0
- package/build/lib/github-actions/index.js.map +1 -0
- package/build/lib/github-actions/lib/get-pr-deployments.d.ts +12 -0
- package/build/lib/github-actions/lib/get-pr-deployments.d.ts.map +1 -0
- package/build/lib/github-actions/lib/get-pr-deployments.js +51 -0
- package/build/lib/github-actions/lib/get-pr-deployments.js.map +1 -0
- package/build/lib/github-actions/pr-controller.d.ts +39 -0
- package/build/lib/github-actions/pr-controller.d.ts.map +1 -0
- package/build/lib/github-actions/pr-controller.js +122 -0
- package/build/lib/github-actions/pr-controller.js.map +1 -0
- package/build/lib/github-actions/run-step-cli.d.ts +9 -0
- package/build/lib/github-actions/run-step-cli.d.ts.map +1 -0
- package/build/lib/github-actions/run-step-cli.js +71 -0
- package/build/lib/github-actions/run-step-cli.js.map +1 -0
- package/build/lib/github-actions/runner.d.ts +17 -0
- package/build/lib/github-actions/runner.d.ts.map +1 -0
- package/build/lib/github-actions/runner.js +195 -0
- package/build/lib/github-actions/runner.js.map +1 -0
- package/build/lib/github-actions/schemas/context.d.ts +933 -0
- package/build/lib/github-actions/schemas/context.d.ts.map +1 -0
- package/build/lib/github-actions/schemas/context.js +407 -0
- package/build/lib/github-actions/schemas/context.js.map +1 -0
- package/build/lib/github-actions/schemas/index.d.ts +5 -0
- package/build/lib/github-actions/schemas/index.d.ts.map +1 -0
- package/build/lib/github-actions/schemas/index.js +5 -0
- package/build/lib/github-actions/schemas/index.js.map +1 -0
- package/build/lib/github-actions/search-module.d.ts +38 -0
- package/build/lib/github-actions/search-module.d.ts.map +1 -0
- package/build/lib/github-actions/search-module.js +40 -0
- package/build/lib/github-actions/search-module.js.map +1 -0
- package/build/lib/github-actions/step.d.ts +163 -0
- package/build/lib/github-actions/step.d.ts.map +1 -0
- package/build/lib/github-actions/step.js +121 -0
- package/build/lib/github-actions/step.js.map +1 -0
- package/build/lib/helpers.d.ts.map +1 -1
- package/build/lib/helpers.js +5 -3
- package/build/lib/helpers.js.map +1 -1
- package/build/lib/kit-temp.d.ts +54 -0
- package/build/lib/kit-temp.d.ts.map +1 -1
- package/build/lib/kit-temp.js +82 -14
- package/build/lib/kit-temp.js.map +1 -1
- package/build/lib/kit-temp.test-d.d.ts +2 -0
- package/build/lib/kit-temp.test-d.d.ts.map +1 -0
- package/build/lib/kit-temp.test-d.js +75 -0
- package/build/lib/kit-temp.test-d.js.map +1 -0
- package/build/lib/mask/$$.d.ts +3 -0
- package/build/lib/mask/$$.d.ts.map +1 -0
- package/build/lib/mask/$$.js +3 -0
- package/build/lib/mask/$$.js.map +1 -0
- package/build/lib/mask/$.d.ts +2 -0
- package/build/lib/mask/$.d.ts.map +1 -0
- package/build/lib/mask/$.js +2 -0
- package/build/lib/mask/$.js.map +1 -0
- package/build/lib/mask/apply.d.ts +86 -0
- package/build/lib/mask/apply.d.ts.map +1 -0
- package/build/lib/mask/apply.js +86 -0
- package/build/lib/mask/apply.js.map +1 -0
- package/build/lib/mask/mask.d.ts +124 -0
- package/build/lib/mask/mask.d.ts.map +1 -0
- package/build/lib/mask/mask.js +137 -0
- package/build/lib/mask/mask.js.map +1 -0
- package/build/lib/mask/mask.test-d.d.ts +2 -0
- package/build/lib/mask/mask.test-d.d.ts.map +1 -0
- package/build/lib/mask/mask.test-d.js +102 -0
- package/build/lib/mask/mask.test-d.js.map +1 -0
- package/build/lib/mutation-type.d.ts +18 -0
- package/build/lib/mutation-type.d.ts.map +1 -0
- package/build/lib/mutation-type.js +16 -0
- package/build/lib/mutation-type.js.map +1 -0
- package/build/lib/task/$$.d.ts +3 -0
- package/build/lib/task/$$.d.ts.map +1 -0
- package/build/lib/task/$$.js +3 -0
- package/build/lib/task/$$.js.map +1 -0
- package/build/lib/task/$.d.ts +2 -0
- package/build/lib/task/$.d.ts.map +1 -0
- package/build/lib/task/$.js +2 -0
- package/build/lib/task/$.js.map +1 -0
- package/build/lib/task/report.d.ts +28 -0
- package/build/lib/task/report.d.ts.map +1 -0
- package/build/lib/task/report.js +33 -0
- package/build/lib/task/report.js.map +1 -0
- package/build/lib/task/task.d.ts +44 -0
- package/build/lib/task/task.d.ts.map +1 -0
- package/build/lib/task/task.js +63 -0
- package/build/lib/task/task.js.map +1 -0
- package/build/lib/version-history/index.d.ts +3 -0
- package/build/lib/version-history/index.d.ts.map +1 -0
- package/build/lib/version-history/index.js +2 -0
- package/build/lib/version-history/index.js.map +1 -0
- package/build/lib/version-history/types.d.ts +64 -0
- package/build/lib/version-history/types.d.ts.map +1 -0
- package/build/lib/version-history/types.js +5 -0
- package/build/lib/version-history/types.js.map +1 -0
- package/build/lib/version-history/version-history.d.ts +85 -0
- package/build/lib/version-history/version-history.d.ts.map +1 -0
- package/build/lib/version-history/version-history.js +248 -0
- package/build/lib/version-history/version-history.js.map +1 -0
- package/build/lib/vite-virtual/debug.d.ts +1 -1
- package/build/lib/vite-virtual/debug.d.ts.map +1 -1
- package/build/lib/vite-virtual/debug.js +1 -1
- package/build/lib/vite-virtual/debug.js.map +1 -1
- package/build/project-data.d.ts +0 -1
- package/build/project-data.d.ts.map +1 -1
- package/build/sandbox.d.ts +2 -0
- package/build/sandbox.d.ts.map +1 -0
- package/build/sandbox.js +18 -0
- package/build/sandbox.js.map +1 -0
- package/build/singletons/debug.d.ts +2 -2
- package/build/singletons/debug.d.ts.map +1 -1
- package/build/singletons/debug.js +2 -2
- package/build/singletons/debug.js.map +1 -1
- package/build/template/components/HamburgerMenu.d.ts +9 -0
- package/build/template/components/HamburgerMenu.d.ts.map +1 -0
- package/build/template/components/HamburgerMenu.jsx +53 -0
- package/build/template/components/HamburgerMenu.jsx.map +1 -0
- package/build/template/components/Link.jsx +1 -1
- package/build/template/components/Logo.d.ts +9 -0
- package/build/template/components/Logo.d.ts.map +1 -0
- package/build/template/components/Logo.jsx +29 -0
- package/build/template/components/Logo.jsx.map +1 -0
- package/build/template/components/NotFound.d.ts +2 -0
- package/build/template/components/NotFound.d.ts.map +1 -0
- package/build/template/components/NotFound.jsx +26 -0
- package/build/template/components/NotFound.jsx.map +1 -0
- package/build/template/components/ThemeToggle.d.ts +3 -0
- package/build/template/components/ThemeToggle.d.ts.map +1 -0
- package/build/template/components/ThemeToggle.jsx +10 -0
- package/build/template/components/ThemeToggle.jsx.map +1 -0
- package/build/template/components/content/$$.d.ts +2 -0
- package/build/template/components/content/$$.d.ts.map +1 -0
- package/build/template/components/content/$$.js +2 -0
- package/build/template/components/content/$$.js.map +1 -0
- package/build/template/components/sidebar/Sidebar.d.ts +2 -2
- package/build/template/components/sidebar/Sidebar.d.ts.map +1 -1
- 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.jsx +1 -1
- package/build/template/components/sidebar/SidebarItem.jsx.map +1 -1
- package/build/template/contexts/ThemeContext.d.ts +12 -0
- package/build/template/contexts/ThemeContext.d.ts.map +1 -0
- package/build/template/contexts/ThemeContext.jsx +41 -0
- package/build/template/contexts/ThemeContext.jsx.map +1 -0
- package/build/template/routes/root.d.ts.map +1 -1
- package/build/template/routes/root.jsx +66 -53
- package/build/template/routes/root.jsx.map +1 -1
- package/build/template/server/app.d.ts.map +1 -1
- package/build/template/server/app.js +2 -21
- package/build/template/server/app.js.map +1 -1
- package/package.json +42 -28
- package/src/api/api.ts +1 -0
- package/src/api/config/configurator.ts +28 -6
- package/src/api/config/load.ts +5 -5
- package/src/api/config-resolver/resolve.ts +2 -2
- package/src/api/content/$$.ts +6 -0
- package/src/api/content/$.test.ts +72 -0
- package/src/api/content/$.ts +1 -0
- package/src/api/content/metadata.ts +11 -0
- package/src/api/content/navbar.test.ts +55 -0
- package/src/api/content/navbar.ts +61 -0
- package/src/api/content/page.ts +12 -0
- package/src/api/content/scan.ts +117 -0
- package/src/api/content/sidebar.test.ts +297 -0
- package/src/api/content/sidebar.ts +283 -0
- package/src/api/content/utils.ts +7 -0
- package/src/api/schema/data-sources/schema-directory/schema-directory.ts +3 -2
- package/src/api/singletons/markdown/markdown.test.ts +1 -1
- package/src/api/static/index.ts +1 -0
- package/src/api/static/manifest.test.ts +106 -0
- package/src/api/static/manifest.ts +16 -0
- package/src/api/static/rebase.test.ts +229 -0
- package/src/api/static/rebase.ts +140 -0
- package/src/api/static/static.ts +2 -0
- package/src/api/utils/asset-url/asset-url.test.ts +4 -4
- package/src/api/vite/plugins/branding/index.ts +108 -0
- package/src/api/vite/plugins/build.ts +25 -1
- package/src/api/vite/plugins/core.ts +6 -7
- package/src/api/vite/plugins/main.ts +2 -0
- package/src/api/vite/plugins/pages.ts +131 -207
- package/src/api/vite/plugins/serve.ts +5 -5
- package/src/cli/_/self-contained-mode.ts +5 -5
- package/src/cli/commands/static/$default.ts +43 -0
- package/src/cli/commands/static/rebase.ts +37 -0
- package/src/cli/commands/static.ts +6 -0
- package/src/exports/components.ts +1 -0
- package/src/lib/demos/builder.ts +298 -0
- package/src/lib/demos/config-schema.ts +56 -0
- package/src/lib/demos/config.test.ts +193 -0
- package/src/lib/demos/config.ts +205 -0
- package/src/lib/demos/index.ts +9 -0
- package/src/lib/demos/ui/components.ts +739 -0
- package/src/lib/demos/ui/data-collector.ts +246 -0
- package/src/lib/demos/ui/landing-page-cli.ts +23 -0
- package/src/lib/demos/ui/landing-page.ts +126 -0
- package/src/lib/demos/ui/page-renderer.ts +124 -0
- package/src/lib/demos/utils.ts +43 -0
- package/src/lib/deployment/$$.ts +2 -0
- package/src/lib/deployment/$.test.ts +53 -0
- package/src/lib/deployment/$.ts +1 -0
- package/src/lib/deployment/metadata.ts +40 -0
- package/src/lib/deployment/path-manager.ts +186 -0
- package/src/lib/file-router/file-router.ts +0 -2
- package/src/lib/file-router/linter.test.ts +2 -0
- package/src/lib/file-router/route.ts +2 -0
- package/src/lib/file-router/scan.ts +26 -14
- package/src/lib/github-actions/git-controller.ts +151 -0
- package/src/lib/github-actions/github-actions.ts +6 -0
- package/src/lib/github-actions/index.ts +1 -0
- package/src/lib/github-actions/lib/get-pr-deployments.ts +76 -0
- package/src/lib/github-actions/pr-controller.test.ts +172 -0
- package/src/lib/github-actions/pr-controller.ts +183 -0
- package/src/lib/github-actions/run-step-cli.ts +84 -0
- package/src/lib/github-actions/runner.test.ts +192 -0
- package/src/lib/github-actions/runner.ts +226 -0
- package/src/lib/github-actions/schemas/context.ts +424 -0
- package/src/lib/github-actions/schemas/index.ts +5 -0
- package/src/lib/github-actions/search-module.test.ts +110 -0
- package/src/lib/github-actions/search-module.ts +76 -0
- package/src/lib/github-actions/step.test.ts +149 -0
- package/src/lib/github-actions/step.ts +232 -0
- package/src/lib/helpers.ts +4 -3
- package/src/lib/kit-temp.test-d.ts +115 -0
- package/src/lib/kit-temp.test.ts +127 -0
- package/src/lib/kit-temp.ts +128 -14
- package/src/lib/mask/$$.ts +2 -0
- package/src/lib/mask/$.test.ts +248 -0
- package/src/lib/mask/$.ts +1 -0
- package/src/lib/mask/apply.ts +134 -0
- package/src/lib/mask/mask.test-d.ts +144 -0
- package/src/lib/mask/mask.ts +244 -0
- package/src/lib/mutation-type.ts +20 -0
- package/src/lib/shiki/shiki.test.ts +1 -1
- package/src/lib/task/$$.ts +2 -0
- package/src/lib/task/$.test.ts +209 -0
- package/src/lib/task/$.ts +1 -0
- package/src/lib/task/report.ts +72 -0
- package/src/lib/task/task.ts +112 -0
- package/src/lib/version-history/index.test.ts +196 -0
- package/src/lib/version-history/index.ts +4 -0
- package/src/lib/version-history/types.ts +68 -0
- package/src/lib/version-history/version-history.ts +293 -0
- package/src/lib/vite-virtual/debug.ts +1 -1
- package/src/project-data.ts +0 -1
- package/src/sandbox.ts +20 -0
- package/src/singletons/debug.ts +2 -2
- package/src/template/components/HamburgerMenu.tsx +96 -0
- package/src/template/components/Link.tsx +1 -1
- package/src/template/components/Logo.tsx +46 -0
- package/src/template/components/NotFound.tsx +28 -0
- package/src/template/components/ThemeToggle.tsx +21 -0
- package/src/template/components/content/$$.ts +1 -0
- package/src/template/components/sidebar/Sidebar.tsx +2 -2
- package/src/template/components/sidebar/SidebarItem.tsx +8 -8
- package/src/template/contexts/ThemeContext.tsx +60 -0
- package/src/template/routes/root.tsx +85 -74
- package/src/template/server/app.ts +2 -27
- package/build/lib/debug/debug.d.ts +0 -13
- package/build/lib/debug/debug.d.ts.map +0 -1
- package/build/lib/debug/debug.js +0 -86
- package/build/lib/debug/debug.js.map +0 -1
- package/build/lib/debug/environment-variable.d.ts +0 -6
- package/build/lib/debug/environment-variable.d.ts.map +0 -1
- package/build/lib/debug/environment-variable.js +0 -48
- package/build/lib/debug/environment-variable.js.map +0 -1
- package/build/lib/debug/index.d.ts +0 -2
- package/build/lib/debug/index.d.ts.map +0 -1
- package/build/lib/debug/index.js +0 -2
- package/build/lib/debug/index.js.map +0 -1
- package/build/lib/file-router/scan-tree.d.ts +0 -20
- package/build/lib/file-router/scan-tree.d.ts.map +0 -1
- package/build/lib/file-router/scan-tree.js +0 -158
- package/build/lib/file-router/scan-tree.js.map +0 -1
- package/build/lib/file-router/sidebar/index.d.ts +0 -3
- package/build/lib/file-router/sidebar/index.d.ts.map +0 -1
- package/build/lib/file-router/sidebar/index.js +0 -4
- package/build/lib/file-router/sidebar/index.js.map +0 -1
- package/build/lib/file-router/sidebar/sidebar-tree.d.ts +0 -9
- package/build/lib/file-router/sidebar/sidebar-tree.d.ts.map +0 -1
- package/build/lib/file-router/sidebar/sidebar-tree.js +0 -85
- package/build/lib/file-router/sidebar/sidebar-tree.js.map +0 -1
- package/build/lib/file-router/sidebar/types.d.ts +0 -17
- package/build/lib/file-router/sidebar/types.d.ts.map +0 -1
- package/build/lib/file-router/sidebar/types.js +0 -2
- package/build/lib/file-router/sidebar/types.js.map +0 -1
- package/build/lib/tree/index.d.ts +0 -3
- package/build/lib/tree/index.d.ts.map +0 -1
- package/build/lib/tree/index.js +0 -2
- package/build/lib/tree/index.js.map +0 -1
- package/build/lib/tree/tree.d.ts +0 -62
- package/build/lib/tree/tree.d.ts.map +0 -1
- package/build/lib/tree/tree.js +0 -134
- package/build/lib/tree/tree.js.map +0 -1
- package/src/lib/debug/debug.ts +0 -120
- package/src/lib/debug/environment-variable.ts +0 -56
- package/src/lib/debug/index.ts +0 -1
- package/src/lib/file-router/scan-tree.test.ts +0 -189
- package/src/lib/file-router/scan-tree.ts +0 -205
- package/src/lib/file-router/sidebar/index.ts +0 -3
- package/src/lib/file-router/sidebar/sidebar-tree.test.ts +0 -123
- package/src/lib/file-router/sidebar/sidebar-tree.ts +0 -110
- package/src/lib/file-router/sidebar/types.ts +0 -19
- package/src/lib/tree/index.ts +0 -2
- package/src/lib/tree/tree.test.ts +0 -117
- package/src/lib/tree/tree.ts +0 -183
@@ -1,23 +1,28 @@
|
|
1
|
-
import { assetUrl, faviconUrl } from '#api/utils/asset-url/index';
|
2
1
|
import { createRoute } from '#lib/react-router-aid/react-router-aid';
|
3
|
-
import {
|
4
|
-
import { Box, Button, Grid, Heading, Text } from '@radix-ui/themes';
|
2
|
+
import { Box, Grid } from '@radix-ui/themes';
|
5
3
|
import { Flex, Theme } from '@radix-ui/themes';
|
6
4
|
import radixStylesUrl from '@radix-ui/themes/styles.css?url';
|
7
5
|
import { Arr } from '@wollybeard/kit';
|
6
|
+
import { useEffect, useState } from 'react';
|
8
7
|
import { Link as LinkReactRouter } from 'react-router';
|
9
8
|
import { Outlet, ScrollRestoration, useLocation } from 'react-router';
|
9
|
+
import logoSrc from 'virtual:polen/project/assets/logo.svg';
|
10
10
|
import PROJECT_DATA from 'virtual:polen/project/data.jsonsuper';
|
11
11
|
import projectDataNavbar from 'virtual:polen/project/data/navbar.jsonsuper';
|
12
|
-
import
|
13
|
-
import {
|
12
|
+
import projectPagesCatalog from 'virtual:polen/project/data/pages-catalog.jsonsuper';
|
13
|
+
import { routes } from 'virtual:polen/project/routes.jsx';
|
14
14
|
import { templateVariables } from 'virtual:polen/template/variables';
|
15
|
-
import {
|
15
|
+
import { HamburgerMenu } from "../components/HamburgerMenu.jsx";
|
16
|
+
import { Link } from "../components/Link.jsx";
|
17
|
+
import { Logo } from "../components/Logo.jsx";
|
18
|
+
import { NotFound } from "../components/NotFound.jsx";
|
16
19
|
import { Sidebar } from "../components/sidebar/Sidebar.jsx";
|
20
|
+
import { ThemeToggle } from "../components/ThemeToggle.jsx";
|
21
|
+
import { ThemeProvider, useTheme } from "../contexts/ThemeContext.jsx";
|
17
22
|
import entryClientUrl from '../entry.client.jsx?url';
|
18
|
-
import { changelog } from
|
19
|
-
import { index } from
|
20
|
-
import { reference } from
|
23
|
+
import { changelog } from "./changelog.jsx";
|
24
|
+
import { index } from "./index.jsx";
|
25
|
+
import { reference } from "./reference.jsx";
|
21
26
|
// todo: not needed anymore because not using hono dev vite plugin right?
|
22
27
|
const reactRefreshPreamble = `
|
23
28
|
import RefreshRuntime from "/@react-refresh";
|
@@ -35,11 +40,14 @@ export const Component = () => {
|
|
35
40
|
<meta name='viewport' content='width=device-width, initial-scale=1'/>
|
36
41
|
<title>{templateVariables.title}</title>
|
37
42
|
{import.meta.env.DEV && <link rel='stylesheet' href={radixStylesUrl}/>}
|
38
|
-
<link rel='icon' href={
|
39
|
-
<link rel='
|
43
|
+
{/* <link rel='icon' type='image/svg+xml' href={assetUrl('/favicon.svg', PROJECT_DATA.basePath)} /> */}
|
44
|
+
{/* <link rel='manifest' href={assetUrl('/manifest.json', PROJECT_DATA.basePath)} /> */}
|
45
|
+
{/* <meta name='theme-color' content='#000000' /> */}
|
40
46
|
</head>
|
41
47
|
<body style={{ margin: 0 }}>
|
42
|
-
<
|
48
|
+
<ThemeProvider>
|
49
|
+
<Layout />
|
50
|
+
</ThemeProvider>
|
43
51
|
<ScrollRestoration />
|
44
52
|
{import.meta.env.DEV && <script type='module' src={entryClientUrl}></script>}
|
45
53
|
</body>
|
@@ -47,6 +55,12 @@ export const Component = () => {
|
|
47
55
|
};
|
48
56
|
const Layout = () => {
|
49
57
|
const location = useLocation();
|
58
|
+
const { appearance } = useTheme();
|
59
|
+
const [mobileMenuOpen, setMobileMenuOpen] = useState(false);
|
60
|
+
// Close mobile menu on route change
|
61
|
+
useEffect(() => {
|
62
|
+
setMobileMenuOpen(false);
|
63
|
+
}, [location.pathname]);
|
50
64
|
// Determine if we should show sidebar based on current path
|
51
65
|
const getCurrentNavPathExp = () => {
|
52
66
|
// todo: general path manipulation lib because we are duplicating logic here found in FileRouter
|
@@ -58,29 +72,46 @@ const Layout = () => {
|
|
58
72
|
return null;
|
59
73
|
};
|
60
74
|
const currentNavPathExp = getCurrentNavPathExp();
|
61
|
-
const sidebar = currentNavPathExp &&
|
75
|
+
const sidebar = currentNavPathExp && projectPagesCatalog.sidebarIndex[currentNavPathExp];
|
62
76
|
const isShowSidebar = sidebar && sidebar.items.length > 0;
|
63
|
-
const header = (<Flex gridArea={'header'} align='center' gap='8' pb='4' mb='8' style={{
|
77
|
+
const header = (<Flex gridArea={'header'} align='center' gap={{ initial: '4', md: '8' }} pb='4' mb={{ initial: '4', md: '8' }} style={{
|
64
78
|
borderBottom: `1px solid var(--gray-3)`,
|
65
79
|
}}>
|
80
|
+
{/* Mobile menu - only show when sidebar exists */}
|
81
|
+
{isShowSidebar && (<HamburgerMenu isOpen={mobileMenuOpen} onToggle={() => setMobileMenuOpen(!mobileMenuOpen)} onClose={() => setMobileMenuOpen(false)} sidebarData={sidebar.items}/>)}
|
82
|
+
|
66
83
|
<LinkReactRouter to='/' style={{ color: `inherit`, textDecoration: `none` }}>
|
67
|
-
<
|
68
|
-
<
|
69
|
-
|
70
|
-
{templateVariables.title}
|
71
|
-
</Text>
|
72
|
-
</Flex>
|
84
|
+
<Box display={{ initial: 'block', md: 'block' }}>
|
85
|
+
<Logo src={logoSrc} title={templateVariables.title} height={30} showTitle={true}/>
|
86
|
+
</Box>
|
73
87
|
</LinkReactRouter>
|
74
|
-
<Flex direction='row' gap='4'>
|
88
|
+
<Flex direction='row' gap='4' style={{ flex: 1 }}>
|
75
89
|
{projectDataNavbar.map((item, key) => (<Link key={key} color='gray' to={item.pathExp}>
|
76
90
|
{item.title}
|
77
91
|
</Link>))}
|
78
92
|
</Flex>
|
93
|
+
<ThemeToggle />
|
79
94
|
</Flex>);
|
80
|
-
return (<Theme asChild>
|
81
|
-
<Grid width={{ initial: '
|
95
|
+
return (<Theme asChild appearance={appearance}>
|
96
|
+
<Grid width={{ initial: '100%', sm: '100%', md: 'var(--container-4)' }} maxWidth='100vw' areas={{
|
97
|
+
initial: "'header' 'content'",
|
98
|
+
sm: "'header' 'content'",
|
99
|
+
md: "'header header header header header header header header' 'sidebar sidebar . content content content content content'",
|
100
|
+
}} rows='min-content auto' columns={{ initial: '1fr', sm: '1fr', md: 'repeat(8, 1fr)' }} gapX={{ initial: '0', sm: '0', md: '2' }} my={{ initial: '0', sm: '0', md: '8' }} mx='auto' px={{ initial: '4', sm: '4', md: '0' }} py={{ initial: '4', sm: '4', md: '0' }}>
|
82
101
|
<style>
|
83
102
|
{`
|
103
|
+
/* Responsive container fixes */
|
104
|
+
@media (max-width: 768px) {
|
105
|
+
body {
|
106
|
+
overflow-x: hidden;
|
107
|
+
}
|
108
|
+
}
|
109
|
+
|
110
|
+
/* Ensure proper centering on all screen sizes */
|
111
|
+
.rt-Grid {
|
112
|
+
box-sizing: border-box;
|
113
|
+
}
|
114
|
+
|
84
115
|
/* Shiki code blocks */
|
85
116
|
pre.shiki {
|
86
117
|
margin: 1rem 0;
|
@@ -91,21 +122,21 @@ const Layout = () => {
|
|
91
122
|
line-height: 1.6;
|
92
123
|
background-color: #f6f8fa;
|
93
124
|
}
|
94
|
-
|
125
|
+
|
95
126
|
/* Light mode: use --shiki-light CSS variables from inline styles */
|
96
127
|
pre.shiki span {
|
97
128
|
color: var(--shiki-light);
|
98
129
|
}
|
99
|
-
|
130
|
+
|
100
131
|
/* Dark mode - Radix Themes uses [data-is-root-theme="dark"] */
|
101
132
|
[data-is-root-theme="dark"] pre.shiki {
|
102
133
|
background-color: #1a1b26;
|
103
134
|
}
|
104
|
-
|
135
|
+
|
105
136
|
[data-is-root-theme="dark"] pre.shiki span {
|
106
137
|
color: var(--shiki-dark);
|
107
138
|
}
|
108
|
-
|
139
|
+
|
109
140
|
pre.shiki code {
|
110
141
|
font-family: 'JetBrains Mono', 'Fira Code', 'SF Mono', Consolas, 'Liberation Mono', Menlo, monospace;
|
111
142
|
background: transparent;
|
@@ -114,7 +145,12 @@ const Layout = () => {
|
|
114
145
|
`}
|
115
146
|
</style>
|
116
147
|
{header}
|
117
|
-
|
148
|
+
|
149
|
+
{/* Desktop Sidebar */}
|
150
|
+
{isShowSidebar && (<Box display={{ initial: 'none', xs: 'none', sm: 'none', md: 'block' }} gridColumn='1 / 3' gridRow='2 / auto'>
|
151
|
+
<Sidebar data={sidebar.items}/>
|
152
|
+
</Box>)}
|
153
|
+
|
118
154
|
<Box gridArea='content / content / auto / 8'>
|
119
155
|
<Outlet />
|
120
156
|
</Box>
|
@@ -123,7 +159,7 @@ const Layout = () => {
|
|
123
159
|
};
|
124
160
|
const children = [
|
125
161
|
index,
|
126
|
-
...
|
162
|
+
...routes,
|
127
163
|
];
|
128
164
|
//
|
129
165
|
//
|
@@ -145,33 +181,10 @@ if (PROJECT_DATA.schema) {
|
|
145
181
|
//
|
146
182
|
//
|
147
183
|
//
|
148
|
-
const NotFoundComponent = () => {
|
149
|
-
return (<Flex direction='column' align='center' gap='6' style={{ textAlign: `center`, paddingTop: `4rem` }}>
|
150
|
-
<Heading size='9' style={{ color: `var(--gray-12)` }}>404</Heading>
|
151
|
-
<Box>
|
152
|
-
<Heading size='5' mb='2'>Page Not Found</Heading>
|
153
|
-
<Text size='3' color='gray'>
|
154
|
-
The page you're looking for doesn't exist or has been moved.
|
155
|
-
</Text>
|
156
|
-
</Box>
|
157
|
-
<Flex gap='3'>
|
158
|
-
<LinkReactRouter to='/'>
|
159
|
-
<Button variant='soft' size='3'>
|
160
|
-
Go Home
|
161
|
-
</Button>
|
162
|
-
</LinkReactRouter>
|
163
|
-
<LinkReactRouter to='/reference'>
|
164
|
-
<Button variant='outline' size='3'>
|
165
|
-
View API Reference
|
166
|
-
</Button>
|
167
|
-
</LinkReactRouter>
|
168
|
-
</Flex>
|
169
|
-
</Flex>);
|
170
|
-
};
|
171
184
|
const notFoundRoute = createRoute({
|
172
185
|
id: `*_not_found`,
|
173
186
|
path: `*`,
|
174
|
-
Component:
|
187
|
+
Component: NotFound,
|
175
188
|
handle: {
|
176
189
|
statusCode: 404,
|
177
190
|
},
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"root.jsx","sourceRoot":"","sources":["../../../src/template/routes/root.tsx"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"root.jsx","sourceRoot":"","sources":["../../../src/template/routes/root.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAA;AACpE,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAA;AAC5C,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAA;AAC9C,OAAO,cAAc,MAAM,iCAAiC,CAAA;AAC5D,OAAO,EAAE,GAAG,EAAE,MAAM,iBAAiB,CAAA;AACrC,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAC3C,OAAO,EAAE,IAAI,IAAI,eAAe,EAAE,MAAM,cAAc,CAAA;AACtD,OAAO,EAAE,MAAM,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,cAAc,CA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AAA,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAA;
|
1
|
+
{"version":3,"file":"app.d.ts","sourceRoot":"","sources":["../../../src/template/server/app.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAA;AAStC,eAAO,MAAM,GAAG,iFAAkB,CAAA"}
|
@@ -1,9 +1,8 @@
|
|
1
1
|
import { Hono } from '#dep/hono/index';
|
2
|
-
// import { Hono } from '../../dep/hono/index.ts'
|
3
2
|
import { AppleTouchIcon } from '#lib/apple-touch-icon/index';
|
4
3
|
import { Favicon } from '#lib/favicon/index';
|
5
4
|
import { serveStatic } from '@hono/node-server/serve-static';
|
6
|
-
import {
|
5
|
+
import { Http } from '@wollybeard/kit';
|
7
6
|
import PROJECT_DATA from 'virtual:polen/project/data.jsonsuper';
|
8
7
|
import { renderPage } from './render-page.jsx';
|
9
8
|
import { view } from "./view.js";
|
@@ -11,29 +10,11 @@ export const app = new Hono.Hono();
|
|
11
10
|
if (__BUILDING__) {
|
12
11
|
app.use(PROJECT_DATA.server.static.route, serveStatic({ root: PROJECT_DATA.server.static.directory }));
|
13
12
|
}
|
14
|
-
app.
|
13
|
+
app.all(`*`, async (ctx) => {
|
15
14
|
const staticHandlerContext = await view.query(ctx.req.raw);
|
16
15
|
if (staticHandlerContext instanceof Response) {
|
17
16
|
return staticHandlerContext;
|
18
17
|
}
|
19
|
-
if (ctx.req.path.includes(PROJECT_DATA.faviconPath)
|
20
|
-
|| ctx.req.path.includes(PROJECT_DATA.faviconPath.replace(`.svg`, `.ico`))) {
|
21
|
-
const path = ctx.req.path === PROJECT_DATA.faviconPath
|
22
|
-
? PROJECT_DATA.faviconPath
|
23
|
-
: PROJECT_DATA.faviconPath.replace(`.svg`, `.ico`);
|
24
|
-
const faviconPath = Path.join(import.meta.dirname, `../../assets`, path);
|
25
|
-
const favicon = await Fs.read(faviconPath);
|
26
|
-
return new Response(favicon, {
|
27
|
-
headers: [
|
28
|
-
Http.Headers.contentType(path.endsWith(`.ico`) ? `image/x-icon` : `image/svg+xml`),
|
29
|
-
Http.Headers.responseCacheControl({
|
30
|
-
visibility: `public`,
|
31
|
-
maxAge: 31536000,
|
32
|
-
immutable: true,
|
33
|
-
}),
|
34
|
-
],
|
35
|
-
});
|
36
|
-
}
|
37
18
|
if (Favicon.fileNamePattern.test(ctx.req.path)) {
|
38
19
|
return Http.Response.notFound;
|
39
20
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"app.js","sourceRoot":"","sources":["../../../src/template/server/app.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAA;AACtC,
|
1
|
+
{"version":3,"file":"app.js","sourceRoot":"","sources":["../../../src/template/server/app.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAA;AACtC,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAA;AAC5D,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAA;AAC5C,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAA;AAC5D,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAA;AACtC,OAAO,YAAY,MAAM,sCAAsC,CAAA;AAC/D,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAA;AAC9C,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAEhC,MAAM,CAAC,MAAM,GAAG,GAAG,IAAI,IAAI,CAAC,IAAI,EAAE,CAAA;AAElC,IAAI,YAAY,EAAE,CAAC;IACjB,GAAG,CAAC,GAAG,CACL,YAAY,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,EAChC,WAAW,CAAC,EAAE,IAAI,EAAE,YAAY,CAAC,MAAM,CAAC,MAAM,CAAC,SAAS,EAAE,CAAC,CAC5D,CAAA;AACH,CAAC;AAED,GAAG,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,EAAE,GAAG,EAAE,EAAE;IACzB,MAAM,oBAAoB,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAA;IAE1D,IAAI,oBAAoB,YAAY,QAAQ,EAAE,CAAC;QAC7C,OAAO,oBAAoB,CAAA;IAC7B,CAAC;IAED,IAAI,OAAO,CAAC,eAAe,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC;QAC/C,OAAO,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAA;IAC/B,CAAC;IAED,IAAI,cAAc,CAAC,eAAe,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC;QACtD,OAAO,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAA;IAC/B,CAAC;IAED,OAAO,UAAU,CAAC,oBAAoB,CAAC,CAAA;AACzC,CAAC,CAAC,CAAA"}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "polen",
|
3
|
-
"version": "0.
|
3
|
+
"version": "0.10.0-next.10",
|
4
4
|
"type": "module",
|
5
5
|
"description": "A framework for delightful GraphQL developer portals",
|
6
6
|
"author": {
|
@@ -35,13 +35,24 @@
|
|
35
35
|
"#*": {
|
36
36
|
"source": "./src/*.ts",
|
37
37
|
"default": "./build/*.js"
|
38
|
-
}
|
38
|
+
},
|
39
|
+
"#lib/mask": "./src/lib/mask/$.ts",
|
40
|
+
"#lib/mask/mask": "./src/lib/mask/$$.ts",
|
41
|
+
"#lib/task": "./src/lib/task/$.ts",
|
42
|
+
"#lib/task/task": "./src/lib/task/$$.ts",
|
43
|
+
"#lib/deployment": "./src/lib/deployment/$.ts",
|
44
|
+
"#lib/deployment/deployment": "./src/lib/deployment/$$.ts",
|
45
|
+
"#template/components/content/$$": "./src/template/components/content/$$.ts"
|
39
46
|
},
|
40
47
|
"exports": {
|
41
48
|
".": {
|
42
49
|
"source": "./src/exports/index.ts",
|
43
50
|
"default": "./build/exports/index.js"
|
44
51
|
},
|
52
|
+
"./components": {
|
53
|
+
"source": "./src/exports/components.ts",
|
54
|
+
"default": "./build/exports/components.js"
|
55
|
+
},
|
45
56
|
"./polen": {
|
46
57
|
"source": "./src/exports/polen.ts",
|
47
58
|
"default": "./build/exports/polen.js"
|
@@ -77,17 +88,18 @@
|
|
77
88
|
"@mdx-js/rollup": "^3.1.0",
|
78
89
|
"@radix-ui/react-icons": "^1.3.2",
|
79
90
|
"@radix-ui/themes": "^3.2.1",
|
80
|
-
"@rolldown/pluginutils": "1.0.0-beta.
|
91
|
+
"@rolldown/pluginutils": "1.0.0-beta.16",
|
81
92
|
"@rollup/pluginutils": "^5.1.4",
|
82
93
|
"@shikijs/rehype": "^3.6.0",
|
83
94
|
"@shikijs/transformers": "^3.6.0",
|
84
95
|
"@shikijs/twoslash": "^3.6.0",
|
85
|
-
"@swc/core": "^1.
|
96
|
+
"@swc/core": "^1.12.1",
|
86
97
|
"@types/jsesc": "^3.0.3",
|
87
|
-
"@vitejs/plugin-react": "^4.5.
|
88
|
-
"@vitejs/plugin-react-oxc": "^0.2.
|
98
|
+
"@vitejs/plugin-react": "^4.5.2",
|
99
|
+
"@vitejs/plugin-react-oxc": "^0.2.3",
|
100
|
+
"@vltpkg/semver": "0.0.0-15",
|
89
101
|
"@vue/reactivity": "^3.5.16",
|
90
|
-
"@wollybeard/kit": "^0.
|
102
|
+
"@wollybeard/kit": "^0.41.0",
|
91
103
|
"@wollybeard/projector": "^0.2.0",
|
92
104
|
"ansis": "^4.1.0",
|
93
105
|
"clean-stack": "^5.2.0",
|
@@ -97,6 +109,7 @@
|
|
97
109
|
"fuse.js": "^7.1.0",
|
98
110
|
"graffle": "8.0.0-next.163",
|
99
111
|
"graphql": "^16.11.0",
|
112
|
+
"gray-matter": "^4.0.3",
|
100
113
|
"hono": "^4.7.11",
|
101
114
|
"jsesc": "^3.1.0",
|
102
115
|
"jsonc-parser": "^3.3.1",
|
@@ -105,22 +118,24 @@
|
|
105
118
|
"react-router": "^7.6.2",
|
106
119
|
"rehype-stringify": "^10.0.1",
|
107
120
|
"remark": "^15.0.1",
|
121
|
+
"remark-frontmatter": "^5.0.0",
|
108
122
|
"remark-gfm": "^4.0.1",
|
109
123
|
"remark-html": "^16.0.1",
|
110
124
|
"remark-parse": "^11.0.0",
|
111
125
|
"remark-rehype": "^11.1.2",
|
112
126
|
"resolve.imports": "^2.0.3",
|
113
|
-
"rolldown": "1.0.0-beta.
|
127
|
+
"rolldown": "1.0.0-beta.16",
|
114
128
|
"shiki": "^3.6.0",
|
129
|
+
"simple-git": "^3.28.0",
|
115
130
|
"source-map": "^0.7.4",
|
116
131
|
"superjson": "^2.2.2",
|
117
132
|
"tinyglobby": "^0.2.14",
|
118
|
-
"tsx": "^4.
|
133
|
+
"tsx": "^4.20.3",
|
119
134
|
"typescript": "^5.8.3",
|
120
135
|
"unified": "^11.0.5",
|
121
136
|
"vfile": "^6.0.3",
|
122
|
-
"vite": "npm:rolldown-vite@~6.3.
|
123
|
-
"vite-plugin-inspect": "^11.
|
137
|
+
"vite": "npm:rolldown-vite@~6.3.21",
|
138
|
+
"vite-plugin-inspect": "^11.2.0",
|
124
139
|
"vite-plugin-restart": "^0.4.2",
|
125
140
|
"youch-core": "^0.3.2",
|
126
141
|
"zx": "8.5.5"
|
@@ -132,61 +147,60 @@
|
|
132
147
|
"@actions/glob": "^0.5.0",
|
133
148
|
"@actions/io": "^1.1.3",
|
134
149
|
"@changesets/cli": "^2.29.4",
|
135
|
-
"@eslint/js": "^9.
|
150
|
+
"@eslint/js": "^9.29.0",
|
136
151
|
"@molt/command": "^0.9.0",
|
137
152
|
"@octokit/core": "^7.0.2",
|
138
153
|
"@octokit/types": "^14.1.0",
|
139
|
-
"@playwright/browser-chromium": "^1.
|
154
|
+
"@playwright/browser-chromium": "^1.53.0",
|
140
155
|
"@stylistic/eslint-plugin": "^4.4.1",
|
141
156
|
"@tsconfig/node-lts": "^22.0.1",
|
142
157
|
"@tsconfig/node22": "^22.0.2",
|
143
158
|
"@tsconfig/strictest": "^2.0.5",
|
144
|
-
"@types/node": "^
|
145
|
-
"@types/react": "^19.1.
|
159
|
+
"@types/node": "^24.0.3",
|
160
|
+
"@types/react": "^19.1.8",
|
146
161
|
"@types/react-dom": "^19.1.6",
|
147
162
|
"@types/semver": "^7.7.0",
|
148
|
-
"@typescript-eslint/eslint-plugin": "^8.
|
149
|
-
"@typescript-eslint/parser": "^8.
|
163
|
+
"@typescript-eslint/eslint-plugin": "^8.34.1",
|
164
|
+
"@typescript-eslint/parser": "^8.34.1",
|
150
165
|
"dprint": "^0.50.0",
|
151
166
|
"dripip": "^0.10.0",
|
152
|
-
"eslint": "^9.
|
167
|
+
"eslint": "^9.29.0",
|
153
168
|
"eslint-plugin-deprecation": "^3.0.0",
|
154
169
|
"eslint-plugin-only-warn": "^1.1.0",
|
155
170
|
"eslint-plugin-react-hooks": "^5.2.0",
|
156
171
|
"eslint-plugin-react-refresh": "^0.4.20",
|
157
172
|
"eslint-plugin-tsdoc": "^0.4.0",
|
158
173
|
"eslint-plugin-unused-imports": "^4.1.4",
|
174
|
+
"fast-check": "^4.1.1",
|
159
175
|
"fs-jetpack": "^5.1.0",
|
160
176
|
"get-port-please": "^3.1.2",
|
161
177
|
"globals": "^16.2.0",
|
162
|
-
"playwright": "1.53.0
|
178
|
+
"playwright": "1.53.0",
|
163
179
|
"publint": "^0.3.12",
|
164
180
|
"semver": "^7.7.2",
|
165
181
|
"strip-ansi": "^7.1.0",
|
166
182
|
"type-fest": "^4.41.0",
|
167
183
|
"typescript": "^5.8.3",
|
168
|
-
"typescript-eslint": "^8.
|
184
|
+
"typescript-eslint": "^8.34.1",
|
169
185
|
"vite-tsconfig-paths": "^5.1.4",
|
170
|
-
"vitest": "^3.2.
|
171
|
-
"zod": "
|
186
|
+
"vitest": "^3.2.3",
|
187
|
+
"zod": "3.25.67"
|
172
188
|
},
|
173
189
|
"packageManager": "pnpm@10.11.1",
|
174
190
|
"scripts": {
|
175
|
-
"gh:demos-rebuild": "gh workflow run demos-rebuild.yaml -f since_version=0.9.0-next.8",
|
176
|
-
"gh:demos-rebuild:list": "gh run list --workflow=demos-rebuild.yaml",
|
177
|
-
"gh:demos-rebuild:logs": "gh run view $(gh run list --workflow=demos-rebuild.yaml --limit=1 --json databaseId -q '.[0].databaseId') --log",
|
178
|
-
"gh:demos-rebuild:watch": "gh run watch $(gh run list --workflow=demos-rebuild.yaml --limit=1 --json databaseId -q '.[0].databaseId')",
|
179
191
|
"sandbox": "tsx src/sandbox",
|
180
192
|
"sandbox:watch": "tsx --watch src/sandbox",
|
181
193
|
"sb": "pnpm sandbox",
|
182
194
|
"sb:w": "pnpm sandbox:watch",
|
183
|
-
"polen": "node --no-warnings --conditions source ./src/cli/index.ts",
|
195
|
+
"polen": "node --no-warnings --experimental-transform-types --conditions source ./src/cli/index.ts",
|
184
196
|
"test:examples": "playwright test --config 'tests/playwright.config.ts' --project=examples",
|
185
197
|
"test:integration": "playwright test --config 'tests/playwright.config.ts' --project=integration",
|
186
198
|
"test:unit": "vitest",
|
187
199
|
"dev": "pnpm build:watch:emit",
|
188
200
|
"dev:pokemon": "pnpm polen dev --project examples/pokemon",
|
189
|
-
"dev:
|
201
|
+
"dev:hive": "pnpm polen dev --project examples/hive",
|
202
|
+
"dev:github": "pnpm polen dev --project examples/github",
|
203
|
+
"dev:demo-index": "node --no-warnings --experimental-transform-types --conditions source ./src/lib/demos/ui/landing-page-cli.ts --mode dev --serve",
|
190
204
|
"build:demos": "zx ./scripts/build-demos.mjs",
|
191
205
|
"build:clean": "pnpm tsc --build tsconfig.build.json --clean && rm -rf build",
|
192
206
|
"build": "tsc --build tsconfig.build.json",
|
package/src/api/api.ts
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
import type { Vite } from '#dep/vite/index'
|
2
2
|
import { assertPathAbsolute } from '#lib/kit-temp'
|
3
|
+
import { type PackagePaths, packagePaths } from '#package-paths'
|
3
4
|
import { Path } from '@wollybeard/kit'
|
4
5
|
import { z } from 'zod'
|
5
6
|
import type { SchemaAugmentation } from '../../api/schema-augmentation/index.ts'
|
6
|
-
import { type PackagePaths, packagePaths } from '../../package-paths.ts'
|
7
7
|
import type { Schema } from '../schema/index.ts'
|
8
8
|
|
9
9
|
export const BuildArchitectureEnum = {
|
@@ -124,7 +124,13 @@ export interface TemplateVariables {
|
|
124
124
|
|
125
125
|
const buildPaths = (rootDir: string): Config[`paths`] => {
|
126
126
|
if (!Path.isAbsolute(rootDir)) throw new Error(`Root dir path must be absolute: ${rootDir}`)
|
127
|
-
const
|
127
|
+
const rootAbsolute = Path.ensureAbsoluteWith(rootDir)
|
128
|
+
|
129
|
+
const buildAbsolutePath = rootAbsolute(`build`)
|
130
|
+
const buildAbsolute = Path.ensureAbsoluteWith(buildAbsolutePath)
|
131
|
+
|
132
|
+
const publicAbsolutePath = rootAbsolute(`public`)
|
133
|
+
const publicAbsolute = Path.ensureAbsoluteWith(publicAbsolutePath)
|
128
134
|
return {
|
129
135
|
project: {
|
130
136
|
rootDir,
|
@@ -137,14 +143,22 @@ const buildPaths = (rootDir: string): Config[`paths`] => {
|
|
137
143
|
},
|
138
144
|
},
|
139
145
|
pages: `pages`,
|
146
|
+
public: {
|
147
|
+
root: 'public',
|
148
|
+
logo: 'logo.svg',
|
149
|
+
},
|
140
150
|
},
|
141
151
|
absolute: {
|
152
|
+
pages: rootAbsolute(`pages`),
|
142
153
|
build: {
|
143
|
-
root:
|
144
|
-
serverEntrypoint:
|
145
|
-
assets:
|
154
|
+
root: buildAbsolute('.'),
|
155
|
+
serverEntrypoint: buildAbsolute(`app.js`),
|
156
|
+
assets: buildAbsolute(`assets`),
|
157
|
+
},
|
158
|
+
public: {
|
159
|
+
root: publicAbsolute('.'),
|
160
|
+
logo: publicAbsolute('logo.svg'),
|
146
161
|
},
|
147
|
-
pages: ensureAbsolute(`pages`),
|
148
162
|
},
|
149
163
|
},
|
150
164
|
framework: packagePaths,
|
@@ -178,6 +192,10 @@ export interface Config {
|
|
178
192
|
}
|
179
193
|
}
|
180
194
|
pages: string
|
195
|
+
public: {
|
196
|
+
root: string
|
197
|
+
logo: string
|
198
|
+
}
|
181
199
|
}
|
182
200
|
absolute: {
|
183
201
|
build: {
|
@@ -186,6 +204,10 @@ export interface Config {
|
|
186
204
|
serverEntrypoint: string
|
187
205
|
}
|
188
206
|
pages: string
|
207
|
+
public: {
|
208
|
+
root: string
|
209
|
+
logo: string
|
210
|
+
}
|
189
211
|
}
|
190
212
|
}
|
191
213
|
framework: PackagePaths
|
package/src/api/config/load.ts
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
import type { SelfContainedModeHooksData } from '#cli/_/self-contained-mode'
|
2
2
|
import { assertOptionalPathAbsolute, pickFirstPathExisting } from '#lib/kit-temp'
|
3
3
|
import { packagePaths } from '#package-paths'
|
4
|
-
import {
|
4
|
+
import { debugPolen } from '#singletons/debug'
|
5
5
|
import type { Prom } from '@wollybeard/kit'
|
6
6
|
import { Path } from '@wollybeard/kit'
|
7
7
|
import * as Module from 'node:module'
|
@@ -20,7 +20,7 @@ export interface LoadOptions {
|
|
20
20
|
let isSelfContainedModeRegistered = false
|
21
21
|
|
22
22
|
export const load = async (options: LoadOptions): Promise<ConfigInput> => {
|
23
|
-
const
|
23
|
+
const debug = debugPolen.sub(`load`)
|
24
24
|
assertOptionalPathAbsolute(options.dir)
|
25
25
|
|
26
26
|
//
|
@@ -35,7 +35,7 @@ export const load = async (options: LoadOptions): Promise<ConfigInput> => {
|
|
35
35
|
const initializeData: SelfContainedModeHooksData = {
|
36
36
|
projectDirPathExp: options.dir,
|
37
37
|
}
|
38
|
-
|
38
|
+
debug(`register node module hooks`, { data: initializeData })
|
39
39
|
// TODO: would be simpler to use sync hooks
|
40
40
|
// https://nodejs.org/api/module.html#synchronous-hooks-accepted-by-moduleregisterhooks
|
41
41
|
// Requires NodeJS 22.15+ -- which is not working with PW until its next release.
|
@@ -67,7 +67,7 @@ export const load = async (options: LoadOptions): Promise<ConfigInput> => {
|
|
67
67
|
// eslint-disable-next-line
|
68
68
|
module = await import(filePath)
|
69
69
|
}
|
70
|
-
|
70
|
+
debug(`imported config module`)
|
71
71
|
|
72
72
|
// // Use dynamic import with file URL to support Windows
|
73
73
|
// const configUrl = pathToFileURL(configPath).href
|
@@ -97,7 +97,7 @@ export const load = async (options: LoadOptions): Promise<ConfigInput> => {
|
|
97
97
|
configInput.advanced.isSelfContainedMode = true
|
98
98
|
}
|
99
99
|
|
100
|
-
|
100
|
+
debug(`loaded config input`, configInput)
|
101
101
|
|
102
102
|
return configInput
|
103
103
|
}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import {
|
1
|
+
import { debugPolen } from '#singletons/debug'
|
2
2
|
import { type ConfigInput, normalizeInput } from '../config/configurator.ts'
|
3
3
|
import { load, type LoadOptions } from '../config/load.ts'
|
4
4
|
import { mergeInputs } from '../config/merge.ts'
|
@@ -12,7 +12,7 @@ export const fromFile = async (options: ResolveFromFileOptions): Promise<ViteUse
|
|
12
12
|
const configInput = await load(options)
|
13
13
|
const configInputMerged = mergeInputs(configInput, options.overrides)
|
14
14
|
const config = await fromMemory(configInputMerged, options.dir)
|
15
|
-
|
15
|
+
debugPolen(`resolved config`, config)
|
16
16
|
return config
|
17
17
|
}
|
18
18
|
|