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
@@ -2,7 +2,7 @@ import type { FC } from 'react'
|
|
2
2
|
import type { LinkProps as LinkPropsReactRouter } from 'react-router'
|
3
3
|
import { Link as LinkReactRouter, useLocation } from 'react-router'
|
4
4
|
// todo: #lib/kit-temp does not work as import
|
5
|
-
import { ObjPartition } from '../../lib/kit-temp.
|
5
|
+
import { ObjPartition } from '../../lib/kit-temp.ts'
|
6
6
|
import type { LinkPropsRadix } from './RadixLink.jsx'
|
7
7
|
import { LinkRadix } from './RadixLink.jsx'
|
8
8
|
|
@@ -0,0 +1,46 @@
|
|
1
|
+
import { Box, Flex, Text } from '@radix-ui/themes'
|
2
|
+
|
3
|
+
interface Props {
|
4
|
+
src: string
|
5
|
+
title?: string
|
6
|
+
height?: number
|
7
|
+
showTitle?: boolean
|
8
|
+
}
|
9
|
+
|
10
|
+
export const Logo: React.FC<Props> = ({ src, title, height = 30, showTitle = true }) => {
|
11
|
+
return (
|
12
|
+
<Flex align='center' gap='2'>
|
13
|
+
<Box style={{ height, display: 'flex', alignItems: 'center' }}>
|
14
|
+
<img
|
15
|
+
src={src}
|
16
|
+
alt={title}
|
17
|
+
height={height}
|
18
|
+
className='polen-logo'
|
19
|
+
style={{
|
20
|
+
height: '100%',
|
21
|
+
width: 'auto',
|
22
|
+
transition: 'filter 0.2s ease-in-out',
|
23
|
+
}}
|
24
|
+
/>
|
25
|
+
</Box>
|
26
|
+
{showTitle && (
|
27
|
+
<Text size='3' weight='medium'>
|
28
|
+
{title}
|
29
|
+
</Text>
|
30
|
+
)}
|
31
|
+
<style>
|
32
|
+
{`
|
33
|
+
.polen-logo {
|
34
|
+
filter: none;
|
35
|
+
}
|
36
|
+
|
37
|
+
@media (prefers-color-scheme: dark) {
|
38
|
+
.polen-logo {
|
39
|
+
filter: invert(1);
|
40
|
+
}
|
41
|
+
}
|
42
|
+
`}
|
43
|
+
</style>
|
44
|
+
</Flex>
|
45
|
+
)
|
46
|
+
}
|
@@ -0,0 +1,28 @@
|
|
1
|
+
import { Box, Button, Flex, Heading, Text } from '@radix-ui/themes'
|
2
|
+
import { Link as LinkReactRouter } from 'react-router'
|
3
|
+
|
4
|
+
export const NotFound: React.FC = () => {
|
5
|
+
return (
|
6
|
+
<Flex direction='column' align='center' gap='6' style={{ textAlign: `center`, paddingTop: `4rem` }}>
|
7
|
+
<Heading size='9' style={{ color: `var(--gray-12)` }}>404</Heading>
|
8
|
+
<Box>
|
9
|
+
<Heading size='5' mb='2'>Page Not Found</Heading>
|
10
|
+
<Text size='3' color='gray'>
|
11
|
+
The page you're looking for doesn't exist or has been moved.
|
12
|
+
</Text>
|
13
|
+
</Box>
|
14
|
+
<Flex gap='3'>
|
15
|
+
<LinkReactRouter to='/'>
|
16
|
+
<Button variant='soft' size='3'>
|
17
|
+
Go Home
|
18
|
+
</Button>
|
19
|
+
</LinkReactRouter>
|
20
|
+
<LinkReactRouter to='/reference'>
|
21
|
+
<Button variant='outline' size='3'>
|
22
|
+
View API Reference
|
23
|
+
</Button>
|
24
|
+
</LinkReactRouter>
|
25
|
+
</Flex>
|
26
|
+
</Flex>
|
27
|
+
)
|
28
|
+
}
|
@@ -0,0 +1,21 @@
|
|
1
|
+
import type { React } from '#dep/react/index'
|
2
|
+
import { MoonIcon, SunIcon } from '@radix-ui/react-icons'
|
3
|
+
import { IconButton } from '@radix-ui/themes'
|
4
|
+
import { useTheme } from '../contexts/ThemeContext.tsx'
|
5
|
+
|
6
|
+
export const ThemeToggle: React.FC = () => {
|
7
|
+
const { appearance, toggleTheme } = useTheme()
|
8
|
+
|
9
|
+
return (
|
10
|
+
<IconButton
|
11
|
+
size='2'
|
12
|
+
variant='ghost'
|
13
|
+
color='gray'
|
14
|
+
onClick={toggleTheme}
|
15
|
+
aria-label={`Switch to ${appearance === 'light' ? 'dark' : 'light'} theme`}
|
16
|
+
style={{ cursor: 'pointer' }}
|
17
|
+
>
|
18
|
+
{appearance === 'light' ? <MoonIcon width='18' height='18' /> : <SunIcon width='18' height='18' />}
|
19
|
+
</IconButton>
|
20
|
+
)
|
21
|
+
}
|
@@ -0,0 +1 @@
|
|
1
|
+
export { Callout, Tabs } from '@radix-ui/themes'
|
@@ -1,10 +1,10 @@
|
|
1
|
-
import type {
|
1
|
+
import type { Content } from '#api/content/$'
|
2
2
|
import { Box } from '@radix-ui/themes'
|
3
3
|
import type { BoxOwnProps, LayoutProps, MarginProps } from '@radix-ui/themes/props'
|
4
4
|
import { Items } from './SidebarItem.tsx'
|
5
5
|
|
6
6
|
interface SidebarProps extends LayoutProps, MarginProps, BoxOwnProps {
|
7
|
-
data:
|
7
|
+
data: Content.Item[]
|
8
8
|
style?: React.CSSProperties
|
9
9
|
}
|
10
10
|
|
@@ -1,11 +1,11 @@
|
|
1
|
+
import type { Content } from '#api/content/$'
|
1
2
|
import type { React } from '#dep/react/index'
|
2
|
-
import type { FileRouter } from '#lib/file-router/index'
|
3
3
|
import { Texts } from '#template/components/Texts/index'
|
4
|
-
import { Box, Flex
|
4
|
+
import { Box, Flex } from '@radix-ui/themes'
|
5
5
|
import { useLocation } from 'react-router'
|
6
6
|
import { getPathActiveReport, Link } from '../Link.tsx'
|
7
7
|
|
8
|
-
export const Items: React.FC<{ items:
|
8
|
+
export const Items: React.FC<{ items: Content.Item[] }> = ({ items }) => {
|
9
9
|
return (
|
10
10
|
<Flex direction='column' gap='2px'>
|
11
11
|
{items.map((item) => (
|
@@ -26,7 +26,7 @@ export const Items: React.FC<{ items: FileRouter.Sidebar.Item[] }> = ({ items })
|
|
26
26
|
//
|
27
27
|
//
|
28
28
|
|
29
|
-
export const Item: React.FC<{ item:
|
29
|
+
export const Item: React.FC<{ item: Content.Item }> = ({ item }) => {
|
30
30
|
if (item.type === `ItemLink`) {
|
31
31
|
return <SBLink link={item} />
|
32
32
|
}
|
@@ -47,7 +47,7 @@ export const Item: React.FC<{ item: FileRouter.Sidebar.Item }> = ({ item }) => {
|
|
47
47
|
//
|
48
48
|
|
49
49
|
const SBLink: React.FC<{
|
50
|
-
link:
|
50
|
+
link: Content.ItemLink | Content.ItemSection
|
51
51
|
}> = ({ link }) => {
|
52
52
|
const location = useLocation()
|
53
53
|
const currentPathExp = location.pathname
|
@@ -81,7 +81,7 @@ const SBLink: React.FC<{
|
|
81
81
|
//
|
82
82
|
|
83
83
|
const Section: React.FC<{
|
84
|
-
section:
|
84
|
+
section: Content.ItemSection
|
85
85
|
}> = ({ section }) => {
|
86
86
|
return (
|
87
87
|
<Box mt='8'>
|
@@ -104,7 +104,7 @@ const Section: React.FC<{
|
|
104
104
|
//
|
105
105
|
|
106
106
|
const LinkedSection: React.FC<{
|
107
|
-
section:
|
107
|
+
section: Content.ItemSection
|
108
108
|
}> = ({ section }) => {
|
109
109
|
return (
|
110
110
|
<Box>
|
@@ -133,7 +133,7 @@ const LinkedSection: React.FC<{
|
|
133
133
|
)
|
134
134
|
}
|
135
135
|
|
136
|
-
const SectionLink: React.FC<{ link:
|
136
|
+
const SectionLink: React.FC<{ link: Content.ItemLink }> = ({ link }) => {
|
137
137
|
const location = useLocation()
|
138
138
|
const active = getPathActiveReport(link.pathExp, location.pathname)
|
139
139
|
|
@@ -0,0 +1,60 @@
|
|
1
|
+
import type { React } from '#dep/react/index'
|
2
|
+
import { createContext, useContext, useEffect, useState } from 'react'
|
3
|
+
|
4
|
+
type ThemeAppearance = 'light' | 'dark'
|
5
|
+
|
6
|
+
interface ThemeContextValue {
|
7
|
+
appearance: ThemeAppearance
|
8
|
+
toggleTheme: () => void
|
9
|
+
}
|
10
|
+
|
11
|
+
const ThemeContext = createContext<ThemeContextValue | undefined>(undefined)
|
12
|
+
|
13
|
+
const THEME_STORAGE_KEY = 'polen-theme-preference'
|
14
|
+
|
15
|
+
export const ThemeProvider: React.FC<{ children: React.ReactNode }> = ({ children }) => {
|
16
|
+
const [appearance, setAppearance] = useState<ThemeAppearance>(() => {
|
17
|
+
// Check if we're in the browser
|
18
|
+
if (typeof window === 'undefined') {
|
19
|
+
return 'light'
|
20
|
+
}
|
21
|
+
|
22
|
+
// Check localStorage first
|
23
|
+
const stored = localStorage.getItem(THEME_STORAGE_KEY)
|
24
|
+
if (stored === 'light' || stored === 'dark') {
|
25
|
+
return stored
|
26
|
+
}
|
27
|
+
|
28
|
+
// Check system preference
|
29
|
+
if (window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches) {
|
30
|
+
return 'dark'
|
31
|
+
}
|
32
|
+
|
33
|
+
return 'light'
|
34
|
+
})
|
35
|
+
|
36
|
+
useEffect(() => {
|
37
|
+
// Persist to localStorage
|
38
|
+
if (typeof window !== 'undefined') {
|
39
|
+
localStorage.setItem(THEME_STORAGE_KEY, appearance)
|
40
|
+
}
|
41
|
+
}, [appearance])
|
42
|
+
|
43
|
+
const toggleTheme = () => {
|
44
|
+
setAppearance(prev => prev === 'light' ? 'dark' : 'light')
|
45
|
+
}
|
46
|
+
|
47
|
+
return (
|
48
|
+
<ThemeContext.Provider value={{ appearance, toggleTheme }}>
|
49
|
+
{children}
|
50
|
+
</ThemeContext.Provider>
|
51
|
+
)
|
52
|
+
}
|
53
|
+
|
54
|
+
export const useTheme = () => {
|
55
|
+
const context = useContext(ThemeContext)
|
56
|
+
if (!context) {
|
57
|
+
throw new Error('useTheme must be used within a ThemeProvider')
|
58
|
+
}
|
59
|
+
return context
|
60
|
+
}
|
@@ -1,24 +1,29 @@
|
|
1
|
-
import { assetUrl, faviconUrl } from '#api/utils/asset-url/index'
|
2
1
|
import type { ReactRouter } from '#dep/react-router/index'
|
3
2
|
import { createRoute } from '#lib/react-router-aid/react-router-aid'
|
4
|
-
import {
|
5
|
-
import { Box, Button, Grid, Heading, Text } from '@radix-ui/themes'
|
3
|
+
import { Box, Grid } from '@radix-ui/themes'
|
6
4
|
import { Flex, Theme } from '@radix-ui/themes'
|
7
5
|
import radixStylesUrl from '@radix-ui/themes/styles.css?url'
|
8
6
|
import { Arr } from '@wollybeard/kit'
|
7
|
+
import { useEffect, useState } from 'react'
|
9
8
|
import { Link as LinkReactRouter } from 'react-router'
|
10
9
|
import { Outlet, ScrollRestoration, useLocation } from 'react-router'
|
10
|
+
import logoSrc from 'virtual:polen/project/assets/logo.svg'
|
11
11
|
import PROJECT_DATA from 'virtual:polen/project/data.jsonsuper'
|
12
12
|
import projectDataNavbar from 'virtual:polen/project/data/navbar.jsonsuper'
|
13
|
-
import
|
14
|
-
import {
|
13
|
+
import projectPagesCatalog from 'virtual:polen/project/data/pages-catalog.jsonsuper'
|
14
|
+
import { routes } from 'virtual:polen/project/routes.jsx'
|
15
15
|
import { templateVariables } from 'virtual:polen/template/variables'
|
16
|
-
import {
|
16
|
+
import { HamburgerMenu } from '../components/HamburgerMenu.tsx'
|
17
|
+
import { Link } from '../components/Link.tsx'
|
18
|
+
import { Logo } from '../components/Logo.tsx'
|
19
|
+
import { NotFound } from '../components/NotFound.tsx'
|
17
20
|
import { Sidebar } from '../components/sidebar/Sidebar.tsx'
|
21
|
+
import { ThemeToggle } from '../components/ThemeToggle.tsx'
|
22
|
+
import { ThemeProvider, useTheme } from '../contexts/ThemeContext.tsx'
|
18
23
|
import entryClientUrl from '../entry.client.jsx?url'
|
19
|
-
import { changelog } from './changelog.
|
20
|
-
import { index } from './index.
|
21
|
-
import { reference } from './reference.
|
24
|
+
import { changelog } from './changelog.tsx'
|
25
|
+
import { index } from './index.tsx'
|
26
|
+
import { reference } from './reference.tsx'
|
22
27
|
|
23
28
|
// todo: not needed anymore because not using hono dev vite plugin right?
|
24
29
|
const reactRefreshPreamble = `
|
@@ -39,20 +44,14 @@ export const Component = () => {
|
|
39
44
|
<meta name='viewport' content='width=device-width, initial-scale=1' />
|
40
45
|
<title>{templateVariables.title}</title>
|
41
46
|
{import.meta.env.DEV && <link rel='stylesheet' href={radixStylesUrl} />}
|
42
|
-
<link
|
43
|
-
|
44
|
-
|
45
|
-
sizes='256 x 256'
|
46
|
-
/>
|
47
|
-
<link
|
48
|
-
rel='icon'
|
49
|
-
href={faviconUrl(PROJECT_DATA.faviconPath + `?v=1`, PROJECT_DATA.basePath)}
|
50
|
-
sizes='any'
|
51
|
-
type='image/svg+xml'
|
52
|
-
/>
|
47
|
+
{/* <link rel='icon' type='image/svg+xml' href={assetUrl('/favicon.svg', PROJECT_DATA.basePath)} /> */}
|
48
|
+
{/* <link rel='manifest' href={assetUrl('/manifest.json', PROJECT_DATA.basePath)} /> */}
|
49
|
+
{/* <meta name='theme-color' content='#000000' /> */}
|
53
50
|
</head>
|
54
51
|
<body style={{ margin: 0 }}>
|
55
|
-
<
|
52
|
+
<ThemeProvider>
|
53
|
+
<Layout />
|
54
|
+
</ThemeProvider>
|
56
55
|
<ScrollRestoration />
|
57
56
|
{import.meta.env.DEV && <script type='module' src={entryClientUrl}></script>}
|
58
57
|
</body>
|
@@ -62,6 +61,13 @@ export const Component = () => {
|
|
62
61
|
|
63
62
|
const Layout = () => {
|
64
63
|
const location = useLocation()
|
64
|
+
const { appearance } = useTheme()
|
65
|
+
const [mobileMenuOpen, setMobileMenuOpen] = useState(false)
|
66
|
+
|
67
|
+
// Close mobile menu on route change
|
68
|
+
useEffect(() => {
|
69
|
+
setMobileMenuOpen(false)
|
70
|
+
}, [location.pathname])
|
65
71
|
|
66
72
|
// Determine if we should show sidebar based on current path
|
67
73
|
const getCurrentNavPathExp = (): string | null => {
|
@@ -75,54 +81,82 @@ const Layout = () => {
|
|
75
81
|
}
|
76
82
|
|
77
83
|
const currentNavPathExp = getCurrentNavPathExp()
|
78
|
-
const sidebar = currentNavPathExp &&
|
84
|
+
const sidebar = currentNavPathExp && projectPagesCatalog.sidebarIndex[currentNavPathExp]
|
79
85
|
const isShowSidebar = sidebar && sidebar.items.length > 0
|
80
86
|
|
81
87
|
const header = (
|
82
88
|
<Flex
|
83
89
|
gridArea={'header'}
|
84
90
|
align='center'
|
85
|
-
gap='8'
|
91
|
+
gap={{ initial: '4', md: '8' }}
|
86
92
|
pb='4'
|
87
|
-
mb='8'
|
93
|
+
mb={{ initial: '4', md: '8' }}
|
88
94
|
style={{
|
89
95
|
borderBottom: `1px solid var(--gray-3)`,
|
90
96
|
}}
|
91
97
|
>
|
98
|
+
{/* Mobile menu - only show when sidebar exists */}
|
99
|
+
{isShowSidebar && (
|
100
|
+
<HamburgerMenu
|
101
|
+
isOpen={mobileMenuOpen}
|
102
|
+
onToggle={() => setMobileMenuOpen(!mobileMenuOpen)}
|
103
|
+
onClose={() => setMobileMenuOpen(false)}
|
104
|
+
sidebarData={sidebar.items}
|
105
|
+
/>
|
106
|
+
)}
|
107
|
+
|
92
108
|
<LinkReactRouter
|
93
109
|
to='/'
|
94
110
|
style={{ color: `inherit`, textDecoration: `none` }}
|
95
111
|
>
|
96
|
-
<
|
97
|
-
<
|
98
|
-
|
99
|
-
{templateVariables.title}
|
100
|
-
</Text>
|
101
|
-
</Flex>
|
112
|
+
<Box display={{ initial: 'block', md: 'block' }}>
|
113
|
+
<Logo src={logoSrc} title={templateVariables.title} height={30} showTitle={true} />
|
114
|
+
</Box>
|
102
115
|
</LinkReactRouter>
|
103
|
-
<Flex direction='row' gap='4'>
|
116
|
+
<Flex direction='row' gap='4' style={{ flex: 1 }}>
|
104
117
|
{projectDataNavbar.map((item, key) => (
|
105
118
|
<Link key={key} color='gray' to={item.pathExp}>
|
106
119
|
{item.title}
|
107
120
|
</Link>
|
108
121
|
))}
|
109
122
|
</Flex>
|
123
|
+
<ThemeToggle />
|
110
124
|
</Flex>
|
111
125
|
)
|
112
126
|
|
113
127
|
return (
|
114
|
-
<Theme asChild>
|
128
|
+
<Theme asChild appearance={appearance}>
|
115
129
|
<Grid
|
116
|
-
width={{ initial: 'var(--container-4)' }}
|
117
|
-
|
130
|
+
width={{ initial: '100%', sm: '100%', md: 'var(--container-4)' }}
|
131
|
+
maxWidth='100vw'
|
132
|
+
areas={{
|
133
|
+
initial: "'header' 'content'",
|
134
|
+
sm: "'header' 'content'",
|
135
|
+
md:
|
136
|
+
"'header header header header header header header header' 'sidebar sidebar . content content content content content'",
|
137
|
+
}}
|
118
138
|
rows='min-content auto'
|
119
|
-
columns='repeat(8, 1fr)'
|
120
|
-
gapX='2'
|
121
|
-
my='8'
|
139
|
+
columns={{ initial: '1fr', sm: '1fr', md: 'repeat(8, 1fr)' }}
|
140
|
+
gapX={{ initial: '0', sm: '0', md: '2' }}
|
141
|
+
my={{ initial: '0', sm: '0', md: '8' }}
|
122
142
|
mx='auto'
|
143
|
+
px={{ initial: '4', sm: '4', md: '0' }}
|
144
|
+
py={{ initial: '4', sm: '4', md: '0' }}
|
123
145
|
>
|
124
146
|
<style>
|
125
147
|
{`
|
148
|
+
/* Responsive container fixes */
|
149
|
+
@media (max-width: 768px) {
|
150
|
+
body {
|
151
|
+
overflow-x: hidden;
|
152
|
+
}
|
153
|
+
}
|
154
|
+
|
155
|
+
/* Ensure proper centering on all screen sizes */
|
156
|
+
.rt-Grid {
|
157
|
+
box-sizing: border-box;
|
158
|
+
}
|
159
|
+
|
126
160
|
/* Shiki code blocks */
|
127
161
|
pre.shiki {
|
128
162
|
margin: 1rem 0;
|
@@ -133,21 +167,21 @@ const Layout = () => {
|
|
133
167
|
line-height: 1.6;
|
134
168
|
background-color: #f6f8fa;
|
135
169
|
}
|
136
|
-
|
170
|
+
|
137
171
|
/* Light mode: use --shiki-light CSS variables from inline styles */
|
138
172
|
pre.shiki span {
|
139
173
|
color: var(--shiki-light);
|
140
174
|
}
|
141
|
-
|
175
|
+
|
142
176
|
/* Dark mode - Radix Themes uses [data-is-root-theme="dark"] */
|
143
177
|
[data-is-root-theme="dark"] pre.shiki {
|
144
178
|
background-color: #1a1b26;
|
145
179
|
}
|
146
|
-
|
180
|
+
|
147
181
|
[data-is-root-theme="dark"] pre.shiki span {
|
148
182
|
color: var(--shiki-dark);
|
149
183
|
}
|
150
|
-
|
184
|
+
|
151
185
|
pre.shiki code {
|
152
186
|
font-family: 'JetBrains Mono', 'Fira Code', 'SF Mono', Consolas, 'Liberation Mono', Menlo, monospace;
|
153
187
|
background: transparent;
|
@@ -156,15 +190,18 @@ const Layout = () => {
|
|
156
190
|
`}
|
157
191
|
</style>
|
158
192
|
{header}
|
193
|
+
|
194
|
+
{/* Desktop Sidebar */}
|
159
195
|
{isShowSidebar && (
|
160
|
-
<
|
196
|
+
<Box
|
197
|
+
display={{ initial: 'none', xs: 'none', sm: 'none', md: 'block' }}
|
161
198
|
gridColumn='1 / 3'
|
162
199
|
gridRow='2 / auto'
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
/>
|
200
|
+
>
|
201
|
+
<Sidebar data={sidebar.items} />
|
202
|
+
</Box>
|
167
203
|
)}
|
204
|
+
|
168
205
|
<Box gridArea='content / content / auto / 8'>
|
169
206
|
<Outlet />
|
170
207
|
</Box>
|
@@ -175,7 +212,7 @@ const Layout = () => {
|
|
175
212
|
|
176
213
|
const children: ReactRouter.RouteObject[] = [
|
177
214
|
index,
|
178
|
-
...
|
215
|
+
...routes,
|
179
216
|
]
|
180
217
|
|
181
218
|
//
|
@@ -201,36 +238,10 @@ if (PROJECT_DATA.schema) {
|
|
201
238
|
//
|
202
239
|
//
|
203
240
|
|
204
|
-
const NotFoundComponent = () => {
|
205
|
-
return (
|
206
|
-
<Flex direction='column' align='center' gap='6' style={{ textAlign: `center`, paddingTop: `4rem` }}>
|
207
|
-
<Heading size='9' style={{ color: `var(--gray-12)` }}>404</Heading>
|
208
|
-
<Box>
|
209
|
-
<Heading size='5' mb='2'>Page Not Found</Heading>
|
210
|
-
<Text size='3' color='gray'>
|
211
|
-
The page you're looking for doesn't exist or has been moved.
|
212
|
-
</Text>
|
213
|
-
</Box>
|
214
|
-
<Flex gap='3'>
|
215
|
-
<LinkReactRouter to='/'>
|
216
|
-
<Button variant='soft' size='3'>
|
217
|
-
Go Home
|
218
|
-
</Button>
|
219
|
-
</LinkReactRouter>
|
220
|
-
<LinkReactRouter to='/reference'>
|
221
|
-
<Button variant='outline' size='3'>
|
222
|
-
View API Reference
|
223
|
-
</Button>
|
224
|
-
</LinkReactRouter>
|
225
|
-
</Flex>
|
226
|
-
</Flex>
|
227
|
-
)
|
228
|
-
}
|
229
|
-
|
230
241
|
const notFoundRoute = createRoute({
|
231
242
|
id: `*_not_found`,
|
232
243
|
path: `*`,
|
233
|
-
Component:
|
244
|
+
Component: NotFound,
|
234
245
|
handle: {
|
235
246
|
statusCode: 404,
|
236
247
|
},
|
@@ -1,10 +1,8 @@
|
|
1
1
|
import { Hono } from '#dep/hono/index'
|
2
|
-
// import { Hono } from '../../dep/hono/index.ts'
|
3
|
-
|
4
2
|
import { AppleTouchIcon } from '#lib/apple-touch-icon/index'
|
5
3
|
import { Favicon } from '#lib/favicon/index'
|
6
4
|
import { serveStatic } from '@hono/node-server/serve-static'
|
7
|
-
import {
|
5
|
+
import { Http } from '@wollybeard/kit'
|
8
6
|
import PROJECT_DATA from 'virtual:polen/project/data.jsonsuper'
|
9
7
|
import { renderPage } from './render-page.jsx'
|
10
8
|
import { view } from './view.ts'
|
@@ -18,36 +16,13 @@ if (__BUILDING__) {
|
|
18
16
|
)
|
19
17
|
}
|
20
18
|
|
21
|
-
app.
|
19
|
+
app.all(`*`, async (ctx) => {
|
22
20
|
const staticHandlerContext = await view.query(ctx.req.raw)
|
23
21
|
|
24
22
|
if (staticHandlerContext instanceof Response) {
|
25
23
|
return staticHandlerContext
|
26
24
|
}
|
27
25
|
|
28
|
-
if (
|
29
|
-
ctx.req.path.includes(PROJECT_DATA.faviconPath)
|
30
|
-
|| ctx.req.path.includes(PROJECT_DATA.faviconPath.replace(`.svg`, `.ico`))
|
31
|
-
) {
|
32
|
-
const path = ctx.req.path === PROJECT_DATA.faviconPath
|
33
|
-
? PROJECT_DATA.faviconPath
|
34
|
-
: PROJECT_DATA.faviconPath.replace(`.svg`, `.ico`)
|
35
|
-
const faviconPath = Path.join(import.meta.dirname, `../../assets`, path)
|
36
|
-
const favicon = await Fs.read(faviconPath)
|
37
|
-
return new Response(favicon, {
|
38
|
-
headers: [
|
39
|
-
Http.Headers.contentType(
|
40
|
-
path.endsWith(`.ico`) ? `image/x-icon` : `image/svg+xml`,
|
41
|
-
),
|
42
|
-
Http.Headers.responseCacheControl({
|
43
|
-
visibility: `public`,
|
44
|
-
maxAge: 31536000,
|
45
|
-
immutable: true,
|
46
|
-
}),
|
47
|
-
],
|
48
|
-
})
|
49
|
-
}
|
50
|
-
|
51
26
|
if (Favicon.fileNamePattern.test(ctx.req.path)) {
|
52
27
|
return Http.Response.notFound
|
53
28
|
}
|
@@ -1,13 +0,0 @@
|
|
1
|
-
type DebugParameters = [event: string, payload?: unknown];
|
2
|
-
export interface Debug {
|
3
|
-
(...args: DebugParameters): void;
|
4
|
-
toggle: (isEnabled: boolean) => void;
|
5
|
-
sub: (subNamespace: string | string[]) => Debug;
|
6
|
-
}
|
7
|
-
interface State {
|
8
|
-
isEnabled: boolean;
|
9
|
-
}
|
10
|
-
export declare const create: (namespaceInput?: string | string[], initialState?: State) => Debug;
|
11
|
-
export declare const debugGlobal: Debug;
|
12
|
-
export {};
|
13
|
-
//# sourceMappingURL=debug.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"debug.d.ts","sourceRoot":"","sources":["../../../src/lib/debug/debug.ts"],"names":[],"mappings":"AAKA,KAAK,eAAe,GAAG,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,OAAO,CAAC,CAAA;AAEzD,MAAM,WAAW,KAAK;IACpB,CAAC,GAAG,IAAI,EAAE,eAAe,GAAG,IAAI,CAAA;IAChC,MAAM,EAAE,CAAC,SAAS,EAAE,OAAO,KAAK,IAAI,CAAA;IACpC,GAAG,EAAE,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM,EAAE,KAAK,KAAK,CAAA;CAChD;AAED,UAAU,KAAK;IACb,SAAS,EAAE,OAAO,CAAA;CACnB;AAgCD,eAAO,MAAM,MAAM,GAAI,iBAAiB,MAAM,GAAG,MAAM,EAAE,EAAE,eAAe,KAAK,KAAG,KA0DjF,CAAA;AAcD,eAAO,MAAM,WAAW,OAAW,CAAA"}
|
package/build/lib/debug/debug.js
DELETED
@@ -1,86 +0,0 @@
|
|
1
|
-
import { Arr, Str } from '@wollybeard/kit';
|
2
|
-
import { colorize } from 'consola/utils';
|
3
|
-
import { inspect } from 'node:util';
|
4
|
-
import { calcIsEnabledFromEnv } from "./environment-variable.js";
|
5
|
-
// todo:
|
6
|
-
// const Option = {
|
7
|
-
// else:
|
8
|
-
// <alternative>(alternative: alternative) => <value>(value: value): value extends undefined ? alternative : value => {
|
9
|
-
// if (value === undefined || value === null) {
|
10
|
-
// return alternative as any
|
11
|
-
// }
|
12
|
-
// return value as any
|
13
|
-
// },
|
14
|
-
// }
|
15
|
-
// const namespaceToString = (namespace: string[] = []): string => {
|
16
|
-
// return formatNamespaceSegment(namespace.join(`_`))
|
17
|
-
// // todo:
|
18
|
-
// // const x = Option.else([] as string[])
|
19
|
-
// // const y = x(namespace)
|
20
|
-
// // const z = Fn.pipe(
|
21
|
-
// // namespace,
|
22
|
-
// // x,
|
23
|
-
// // // Option.else([]),
|
24
|
-
// // // (_) => Array.is(_) ? _ : [],
|
25
|
-
// // // Str.joinWith(`_`),
|
26
|
-
// // // Str.Case.upper,
|
27
|
-
// // )
|
28
|
-
// }
|
29
|
-
const formatNamespaceSegment = (segment) => {
|
30
|
-
return Str.Case.snake(segment).toUpperCase();
|
31
|
-
};
|
32
|
-
export const create = (namespaceInput, initialState) => {
|
33
|
-
const namespace = Arr.sure(namespaceInput ?? []);
|
34
|
-
const isDebugEnabledFromEnv = calcIsEnabledFromEnv(process.env, namespace);
|
35
|
-
const state = initialState ?? {
|
36
|
-
isEnabled: isDebugEnabledFromEnv,
|
37
|
-
};
|
38
|
-
const debug = (...args) => {
|
39
|
-
const isPayloadPassed = args.length === 2;
|
40
|
-
const [event, payload] = args;
|
41
|
-
if (state.isEnabled) {
|
42
|
-
// If a payload is an array then default depth to 1 so that we see its _contents_
|
43
|
-
const isPayloadArray = Array.isArray(payload);
|
44
|
-
const depthBoost = isPayloadArray ? 1 : 0;
|
45
|
-
const defaultDepth = 3;
|
46
|
-
const debugDepth = parseNumberOr(process.env[`DEBUG_DEPTH`], defaultDepth) + depthBoost;
|
47
|
-
const isPayloadDisabled = debugDepth < 0;
|
48
|
-
const payloadRendered = isPayloadPassed && !isPayloadDisabled
|
49
|
-
? inspect(payload, {
|
50
|
-
colors: true,
|
51
|
-
depth: debugDepth,
|
52
|
-
// compact: true,
|
53
|
-
maxStringLength: 1000,
|
54
|
-
})
|
55
|
-
: ``;
|
56
|
-
const formatNamespaceSegmentAnsi = (segment) => {
|
57
|
-
return colorize(`bold`, colorize(`bgYellowBright`, ` ` + formatNamespaceSegment(segment) + ` `));
|
58
|
-
};
|
59
|
-
const namespaceRendered = namespace.map(formatNamespaceSegmentAnsi).join(` `);
|
60
|
-
const eventRendered = colorize(`bold`, colorize(`bgMagentaBright`, ` ` + formatNamespaceSegment(event) + ` `));
|
61
|
-
const prefixRendered = `${namespaceRendered} ${eventRendered}`;
|
62
|
-
console.debug(prefixRendered, payloadRendered);
|
63
|
-
}
|
64
|
-
};
|
65
|
-
debug.toggle = (isEnabled) => {
|
66
|
-
state.isEnabled = isEnabled;
|
67
|
-
};
|
68
|
-
debug.sub = (subNamespace) => {
|
69
|
-
const s = Arr.sure(subNamespace);
|
70
|
-
const stateCopy = structuredClone(state);
|
71
|
-
return create([...namespace, ...s], stateCopy);
|
72
|
-
};
|
73
|
-
return debug;
|
74
|
-
};
|
75
|
-
const parseNumberOr = (str, defaultValue) => {
|
76
|
-
if (str === ``)
|
77
|
-
return defaultValue;
|
78
|
-
const parsed = Number(str);
|
79
|
-
if (Number.isNaN(parsed)) {
|
80
|
-
return defaultValue;
|
81
|
-
}
|
82
|
-
return parsed;
|
83
|
-
};
|
84
|
-
// initialize root debug
|
85
|
-
export const debugGlobal = create();
|
86
|
-
//# sourceMappingURL=debug.js.map
|