@publish.os/nextjs 0.0.1-alpha.2 → 0.0.1-alpha.4
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 +3 -9
- package/dist/cache/tags.cjs +3 -0
- package/dist/cache/tags.d.cts +1 -0
- package/dist/cache/tags.d.ts +1 -0
- package/dist/cache/tags.js +3 -0
- package/dist/config.cjs +78 -0
- package/dist/config.d.cts +101 -0
- package/dist/config.d.ts +101 -0
- package/dist/config.js +48 -0
- package/dist/index.cjs +1043 -124
- package/dist/index.d.cts +11 -7
- package/dist/index.d.ts +11 -7
- package/dist/index.js +1031 -111
- package/dist/kernel/components/blocks/AgentActions.cjs +425 -0
- package/dist/kernel/components/blocks/AgentActions.d.cts +52 -0
- package/dist/kernel/components/blocks/AgentActions.d.ts +52 -0
- package/dist/kernel/components/blocks/AgentActions.js +429 -0
- package/dist/kernel/components/blocks/animated-icon-swap.cjs +101 -0
- package/dist/kernel/components/blocks/animated-icon-swap.d.cts +16 -0
- package/dist/kernel/components/blocks/animated-icon-swap.d.ts +16 -0
- package/dist/kernel/components/blocks/animated-icon-swap.js +74 -0
- package/dist/kernel/components/blocks/color-palette.cjs +413 -0
- package/dist/kernel/components/blocks/color-palette.d.cts +7 -0
- package/dist/kernel/components/blocks/color-palette.d.ts +7 -0
- package/dist/kernel/components/blocks/color-palette.js +407 -0
- package/dist/kernel/components/blocks/design-system-preview.cjs +592 -0
- package/dist/kernel/components/blocks/design-system-preview.d.cts +29 -0
- package/dist/kernel/components/blocks/design-system-preview.d.ts +29 -0
- package/dist/kernel/components/blocks/design-system-preview.js +655 -0
- package/dist/kernel/components/blocks/link-playground.cjs +816 -0
- package/dist/kernel/components/blocks/link-playground.d.cts +5 -0
- package/dist/kernel/components/blocks/link-playground.d.ts +5 -0
- package/dist/kernel/components/blocks/link-playground.js +792 -0
- package/dist/kernel/components/blocks/logo-block.cjs +156 -0
- package/dist/kernel/components/blocks/logo-block.d.cts +21 -0
- package/dist/kernel/components/blocks/logo-block.d.ts +21 -0
- package/dist/kernel/components/blocks/logo-block.js +129 -0
- package/dist/{components → kernel/components/blocks}/nav-breadcrumb.cjs +19 -38
- package/dist/kernel/components/blocks/nav-breadcrumb.d.cts +11 -0
- package/dist/kernel/components/blocks/nav-breadcrumb.d.ts +11 -0
- package/dist/{components → kernel/components/blocks}/nav-breadcrumb.js +22 -30
- package/dist/kernel/components/blocks/navbar.cjs +154 -0
- package/dist/kernel/components/blocks/navbar.d.cts +16 -0
- package/dist/kernel/components/blocks/navbar.d.ts +16 -0
- package/dist/kernel/components/blocks/navbar.js +122 -0
- package/dist/kernel/components/blocks/navigation-progress-playground.cjs +735 -0
- package/dist/kernel/components/blocks/navigation-progress-playground.d.cts +5 -0
- package/dist/kernel/components/blocks/navigation-progress-playground.d.ts +5 -0
- package/dist/kernel/components/blocks/navigation-progress-playground.js +722 -0
- package/dist/kernel/components/blocks/navigation-progress.cjs +270 -0
- package/dist/kernel/components/blocks/navigation-progress.d.cts +16 -0
- package/dist/kernel/components/blocks/navigation-progress.d.ts +16 -0
- package/dist/kernel/components/blocks/navigation-progress.js +249 -0
- package/dist/kernel/components/blocks/next-prev.cjs +142 -0
- package/dist/kernel/components/blocks/next-prev.d.cts +11 -0
- package/dist/kernel/components/blocks/next-prev.d.ts +11 -0
- package/dist/kernel/components/blocks/next-prev.js +105 -0
- package/dist/{components → kernel/components/blocks}/page-list.cjs +7 -16
- package/dist/{components → kernel/components/blocks}/page-list.d.cts +1 -1
- package/dist/{components → kernel/components/blocks}/page-list.d.ts +1 -1
- package/dist/{components → kernel/components/blocks}/page-list.js +6 -5
- package/dist/kernel/components/blocks/search.cjs +717 -0
- package/dist/kernel/components/blocks/search.d.cts +77 -0
- package/dist/kernel/components/blocks/search.d.ts +77 -0
- package/dist/kernel/components/blocks/search.js +697 -0
- package/dist/kernel/components/blocks/sidebar-node.cjs +309 -0
- package/dist/kernel/components/blocks/sidebar-node.d.cts +8 -0
- package/dist/kernel/components/blocks/sidebar-node.d.ts +8 -0
- package/dist/kernel/components/blocks/sidebar-node.js +272 -0
- package/dist/kernel/components/blocks/sidebar.cjs +317 -0
- package/dist/kernel/components/blocks/sidebar.d.cts +33 -0
- package/dist/kernel/components/blocks/sidebar.d.ts +33 -0
- package/dist/kernel/components/blocks/sidebar.js +302 -0
- package/dist/kernel/components/blocks/theme-toggle.cjs +31 -0
- package/dist/kernel/components/blocks/theme-toggle.d.cts +6 -0
- package/dist/kernel/components/blocks/theme-toggle.d.ts +6 -0
- package/dist/kernel/components/blocks/theme-toggle.js +7 -0
- package/dist/kernel/components/blocks/toc.cjs +356 -0
- package/dist/kernel/components/blocks/toc.d.cts +10 -0
- package/dist/kernel/components/blocks/toc.d.ts +10 -0
- package/dist/kernel/components/blocks/toc.js +330 -0
- package/dist/kernel/components/mdx/components/blockquote.cjs +66 -0
- package/dist/kernel/components/mdx/components/blockquote.d.cts +6 -0
- package/dist/kernel/components/mdx/components/blockquote.d.ts +6 -0
- package/dist/kernel/components/mdx/components/blockquote.js +39 -0
- package/dist/kernel/components/mdx/components/callout.cjs +137 -0
- package/dist/kernel/components/mdx/components/callout.d.cts +18 -0
- package/dist/kernel/components/mdx/components/callout.d.ts +18 -0
- package/dist/kernel/components/mdx/components/callout.js +109 -0
- package/dist/kernel/components/mdx/components/code-block.cjs +39 -0
- package/dist/kernel/components/mdx/components/code-block.d.cts +9 -0
- package/dist/kernel/components/mdx/components/code-block.d.ts +9 -0
- package/dist/kernel/components/mdx/components/code-block.js +14 -0
- package/dist/kernel/components/mdx/components/figure-caption.cjs +63 -0
- package/dist/kernel/components/mdx/components/figure-caption.d.cts +6 -0
- package/dist/kernel/components/mdx/components/figure-caption.d.ts +6 -0
- package/dist/kernel/components/mdx/components/figure-caption.js +36 -0
- package/dist/kernel/components/mdx/components/figure.cjs +78 -0
- package/dist/kernel/components/mdx/components/figure.d.cts +10 -0
- package/dist/kernel/components/mdx/components/figure.d.ts +10 -0
- package/dist/kernel/components/mdx/components/figure.js +53 -0
- package/dist/kernel/components/mdx/components/footnotes.cjs +66 -0
- package/dist/kernel/components/mdx/components/footnotes.d.cts +6 -0
- package/dist/kernel/components/mdx/components/footnotes.d.ts +6 -0
- package/dist/kernel/components/mdx/components/footnotes.js +39 -0
- package/dist/kernel/components/mdx/components/heading-copy-link.cjs +108 -0
- package/dist/kernel/components/mdx/components/heading-copy-link.d.cts +23 -0
- package/dist/kernel/components/mdx/components/heading-copy-link.d.ts +23 -0
- package/dist/kernel/components/mdx/components/heading-copy-link.js +81 -0
- package/dist/kernel/components/mdx/components/heading.cjs +166 -0
- package/dist/kernel/components/mdx/components/heading.d.cts +8 -0
- package/dist/kernel/components/mdx/components/heading.d.ts +8 -0
- package/dist/kernel/components/mdx/components/heading.js +144 -0
- package/dist/kernel/components/mdx/components/hr.cjs +34 -0
- package/dist/kernel/components/mdx/components/hr.d.cts +9 -0
- package/dist/kernel/components/mdx/components/hr.d.ts +9 -0
- package/dist/kernel/components/mdx/components/hr.js +9 -0
- package/dist/kernel/components/mdx/components/image-zoom.cjs +49 -0
- package/dist/kernel/components/mdx/components/image-zoom.d.cts +10 -0
- package/dist/kernel/components/mdx/components/image-zoom.d.ts +10 -0
- package/dist/kernel/components/mdx/components/image-zoom.js +15 -0
- package/dist/kernel/components/mdx/components/image.cjs +192 -0
- package/dist/kernel/components/mdx/components/image.d.cts +21 -0
- package/dist/kernel/components/mdx/components/image.d.ts +21 -0
- package/dist/kernel/components/mdx/components/image.js +157 -0
- package/dist/kernel/components/mdx/components/inline-code.cjs +66 -0
- package/dist/kernel/components/mdx/components/inline-code.d.cts +6 -0
- package/dist/kernel/components/mdx/components/inline-code.d.ts +6 -0
- package/dist/kernel/components/mdx/components/inline-code.js +39 -0
- package/dist/kernel/components/mdx/components/kbd.cjs +34 -0
- package/dist/kernel/components/mdx/components/kbd.d.cts +10 -0
- package/dist/kernel/components/mdx/components/kbd.d.ts +10 -0
- package/dist/kernel/components/mdx/components/kbd.js +9 -0
- package/dist/{components/providers.cjs → kernel/components/mdx/components/link.cjs} +20 -15
- package/dist/kernel/components/mdx/components/link.d.cts +11 -0
- package/dist/kernel/components/mdx/components/link.d.ts +11 -0
- package/dist/kernel/components/mdx/components/link.js +26 -0
- package/dist/kernel/components/mdx/components/paragraph.cjs +87 -0
- package/dist/kernel/components/mdx/components/paragraph.d.cts +5 -0
- package/dist/kernel/components/mdx/components/paragraph.d.ts +5 -0
- package/dist/kernel/components/mdx/components/paragraph.js +60 -0
- package/dist/kernel/components/mdx/components/pre.cjs +66 -0
- package/dist/kernel/components/mdx/components/pre.d.cts +6 -0
- package/dist/kernel/components/mdx/components/pre.d.ts +6 -0
- package/dist/kernel/components/mdx/components/pre.js +39 -0
- package/dist/kernel/components/mdx/components/strikethrough.cjs +63 -0
- package/dist/kernel/components/mdx/components/strikethrough.d.cts +6 -0
- package/dist/kernel/components/mdx/components/strikethrough.d.ts +6 -0
- package/dist/kernel/components/mdx/components/strikethrough.js +36 -0
- package/dist/kernel/components/mdx/components/table.cjs +59 -0
- package/dist/kernel/components/mdx/components/table.d.cts +10 -0
- package/dist/kernel/components/mdx/components/table.d.ts +10 -0
- package/dist/kernel/components/mdx/components/table.js +36 -0
- package/dist/kernel/components/mdx/components/task-list.cjs +88 -0
- package/dist/kernel/components/mdx/components/task-list.d.cts +8 -0
- package/dist/kernel/components/mdx/components/task-list.d.ts +8 -0
- package/dist/kernel/components/mdx/components/task-list.js +60 -0
- package/dist/kernel/components/mdx/components/video-player.cjs +173 -0
- package/dist/kernel/components/mdx/components/video-player.d.cts +18 -0
- package/dist/kernel/components/mdx/components/video-player.d.ts +18 -0
- package/dist/kernel/components/mdx/components/video-player.js +147 -0
- package/dist/kernel/components/mdx/components/video.cjs +185 -0
- package/dist/kernel/components/mdx/components/video.d.cts +15 -0
- package/dist/kernel/components/mdx/components/video.d.ts +15 -0
- package/dist/kernel/components/mdx/components/video.js +162 -0
- package/dist/kernel/components/mdx/error-boundary.cjs +62 -0
- package/dist/{mdx → kernel/components/mdx}/error-boundary.d.cts +3 -8
- package/dist/{mdx → kernel/components/mdx}/error-boundary.d.ts +3 -8
- package/dist/kernel/components/mdx/error-boundary.js +38 -0
- package/dist/{mdx → kernel/components/mdx}/error-fallback.cjs +8 -8
- package/dist/{mdx → kernel/components/mdx}/error-fallback.js +8 -8
- package/dist/kernel/components/mdx/mdx.cjs +141 -0
- package/dist/kernel/components/mdx/mdx.d.cts +22 -0
- package/dist/kernel/components/mdx/mdx.d.ts +22 -0
- package/dist/kernel/components/mdx/mdx.js +109 -0
- package/dist/kernel/components/mdx/rehype-heading-ids.cjs +113 -0
- package/dist/kernel/components/mdx/rehype-heading-ids.d.cts +10 -0
- package/dist/kernel/components/mdx/rehype-heading-ids.d.ts +10 -0
- package/dist/kernel/components/mdx/rehype-heading-ids.js +86 -0
- package/dist/kernel/components/mdx/types.cjs +18 -0
- package/dist/kernel/components/mdx/types.d.cts +18 -0
- package/dist/kernel/components/mdx/types.d.ts +18 -0
- package/dist/kernel/components/mdx/types.js +0 -0
- package/dist/kernel/components/ui/accordion.cjs +104 -0
- package/dist/kernel/components/ui/accordion.d.cts +16 -0
- package/dist/kernel/components/ui/accordion.d.ts +16 -0
- package/dist/kernel/components/ui/accordion.js +76 -0
- package/dist/kernel/components/ui/badge.cjs +75 -0
- package/dist/kernel/components/ui/badge.d.cts +12 -0
- package/dist/kernel/components/ui/badge.d.ts +12 -0
- package/dist/kernel/components/ui/badge.js +47 -0
- package/dist/kernel/components/ui/breadcrumb-trail.cjs +238 -0
- package/dist/kernel/components/ui/breadcrumb-trail.d.cts +13 -0
- package/dist/kernel/components/ui/breadcrumb-trail.d.ts +13 -0
- package/dist/kernel/components/ui/breadcrumb-trail.js +225 -0
- package/dist/kernel/components/ui/breadcrumb.cjs +399 -0
- package/dist/kernel/components/ui/breadcrumb.d.cts +52 -0
- package/dist/kernel/components/ui/breadcrumb.d.ts +52 -0
- package/dist/kernel/components/ui/breadcrumb.js +365 -0
- package/dist/kernel/components/ui/button-group.cjs +144 -0
- package/dist/kernel/components/ui/button-group.d.cts +19 -0
- package/dist/kernel/components/ui/button-group.d.ts +19 -0
- package/dist/kernel/components/ui/button-group.js +116 -0
- package/dist/kernel/components/ui/button.cjs +147 -0
- package/dist/kernel/components/ui/button.d.cts +23 -0
- package/dist/kernel/components/ui/button.d.ts +23 -0
- package/dist/kernel/components/ui/button.js +121 -0
- package/dist/kernel/components/ui/card.cjs +133 -0
- package/dist/kernel/components/ui/card.d.cts +17 -0
- package/dist/kernel/components/ui/card.d.ts +17 -0
- package/dist/kernel/components/ui/card.js +101 -0
- package/dist/kernel/components/ui/dialog.cjs +149 -0
- package/dist/kernel/components/ui/dialog.d.cts +22 -0
- package/dist/kernel/components/ui/dialog.d.ts +22 -0
- package/dist/kernel/components/ui/dialog.js +118 -0
- package/dist/kernel/components/ui/drawer.cjs +163 -0
- package/dist/kernel/components/ui/drawer.d.cts +24 -0
- package/dist/kernel/components/ui/drawer.d.ts +24 -0
- package/dist/kernel/components/ui/drawer.js +131 -0
- package/dist/kernel/components/ui/input.cjs +96 -0
- package/dist/kernel/components/ui/input.d.cts +18 -0
- package/dist/kernel/components/ui/input.d.ts +18 -0
- package/dist/kernel/components/ui/input.js +70 -0
- package/dist/kernel/components/ui/kbd.cjs +105 -0
- package/dist/kernel/components/ui/kbd.d.cts +13 -0
- package/dist/kernel/components/ui/kbd.d.ts +13 -0
- package/dist/kernel/components/ui/kbd.js +77 -0
- package/dist/kernel/components/ui/link.cjs +253 -0
- package/dist/kernel/components/ui/link.d.cts +31 -0
- package/dist/kernel/components/ui/link.d.ts +31 -0
- package/dist/kernel/components/ui/link.js +217 -0
- package/dist/kernel/components/ui/menu.cjs +301 -0
- package/dist/kernel/components/ui/menu.d.cts +70 -0
- package/dist/kernel/components/ui/menu.d.ts +70 -0
- package/dist/kernel/components/ui/menu.js +256 -0
- package/dist/kernel/components/ui/meta-key.cjs +34 -0
- package/dist/kernel/components/ui/meta-key.d.cts +12 -0
- package/dist/kernel/components/ui/meta-key.d.ts +12 -0
- package/dist/kernel/components/ui/meta-key.js +9 -0
- package/dist/kernel/components/ui/navigation-menu.cjs +253 -0
- package/dist/kernel/components/ui/navigation-menu.d.cts +47 -0
- package/dist/kernel/components/ui/navigation-menu.d.ts +47 -0
- package/dist/kernel/components/ui/navigation-menu.js +216 -0
- package/dist/kernel/components/ui/popover.cjs +168 -0
- package/dist/kernel/components/ui/popover.d.cts +24 -0
- package/dist/kernel/components/ui/popover.d.ts +24 -0
- package/dist/kernel/components/ui/popover.js +136 -0
- package/dist/kernel/components/ui/progress.cjs +112 -0
- package/dist/kernel/components/ui/progress.d.cts +16 -0
- package/dist/kernel/components/ui/progress.d.ts +16 -0
- package/dist/kernel/components/ui/progress.js +84 -0
- package/dist/kernel/components/ui/scroll-area.cjs +413 -0
- package/dist/kernel/components/ui/scroll-area.d.cts +58 -0
- package/dist/kernel/components/ui/scroll-area.d.ts +58 -0
- package/dist/kernel/components/ui/scroll-area.js +390 -0
- package/dist/kernel/components/ui/select.cjs +244 -0
- package/dist/kernel/components/ui/select.d.cts +40 -0
- package/dist/kernel/components/ui/select.d.ts +40 -0
- package/dist/kernel/components/ui/select.js +205 -0
- package/dist/kernel/components/ui/separator.cjs +73 -0
- package/dist/kernel/components/ui/separator.d.cts +8 -0
- package/dist/kernel/components/ui/separator.d.ts +8 -0
- package/dist/kernel/components/ui/separator.js +48 -0
- package/dist/kernel/components/ui/table.cjs +131 -0
- package/dist/kernel/components/ui/table.d.cts +11 -0
- package/dist/kernel/components/ui/table.d.ts +11 -0
- package/dist/kernel/components/ui/table.js +99 -0
- package/dist/kernel/components/ui/tabs.cjs +450 -0
- package/dist/kernel/components/ui/tabs.d.cts +82 -0
- package/dist/kernel/components/ui/tabs.d.ts +82 -0
- package/dist/kernel/components/ui/tabs.js +409 -0
- package/dist/kernel/components/ui/text.cjs +184 -0
- package/dist/kernel/components/ui/text.d.cts +17 -0
- package/dist/kernel/components/ui/text.d.ts +17 -0
- package/dist/kernel/components/ui/text.js +156 -0
- package/dist/kernel/components/ui/theme-toggle.cjs +108 -0
- package/dist/kernel/components/ui/theme-toggle.d.cts +10 -0
- package/dist/kernel/components/ui/theme-toggle.d.ts +10 -0
- package/dist/kernel/components/ui/theme-toggle.js +84 -0
- package/dist/kernel/components/ui/toast.cjs +154 -0
- package/dist/kernel/components/ui/toast.d.cts +26 -0
- package/dist/kernel/components/ui/toast.d.ts +26 -0
- package/dist/kernel/components/ui/toast.js +120 -0
- package/dist/kernel/components/ui/tooltip.cjs +127 -0
- package/dist/kernel/components/ui/tooltip.d.cts +20 -0
- package/dist/kernel/components/ui/tooltip.d.ts +20 -0
- package/dist/kernel/components/ui/tooltip.js +97 -0
- package/dist/kernel/defaults.registry.cjs +541 -0
- package/dist/kernel/defaults.registry.d.cts +469 -0
- package/dist/kernel/defaults.registry.d.ts +469 -0
- package/dist/kernel/defaults.registry.js +516 -0
- package/dist/kernel/routes/agent/markdown.cjs +202 -0
- package/dist/kernel/routes/agent/markdown.d.cts +58 -0
- package/dist/kernel/routes/agent/markdown.d.ts +58 -0
- package/dist/kernel/routes/agent/markdown.js +174 -0
- package/dist/{layouts → kernel/routes/layouts}/group.cjs +39 -15
- package/dist/kernel/routes/layouts/group.d.cts +20 -0
- package/dist/kernel/routes/layouts/group.d.ts +20 -0
- package/dist/{layouts → kernel/routes/layouts}/group.js +39 -15
- package/dist/kernel/routes/metadata/feed.cjs +293 -0
- package/dist/kernel/routes/metadata/feed.d.cts +20 -0
- package/dist/kernel/routes/metadata/feed.d.ts +20 -0
- package/dist/kernel/routes/metadata/feed.js +265 -0
- package/dist/kernel/routes/metadata/llms.cjs +239 -0
- package/dist/kernel/routes/metadata/llms.d.cts +26 -0
- package/dist/kernel/routes/metadata/llms.d.ts +26 -0
- package/dist/kernel/routes/metadata/llms.js +211 -0
- package/dist/kernel/routes/metadata/og-image.cjs +630 -0
- package/dist/kernel/routes/metadata/og-image.d.cts +62 -0
- package/dist/kernel/routes/metadata/og-image.d.ts +62 -0
- package/dist/kernel/routes/metadata/og-image.js +604 -0
- package/dist/{routes → kernel/routes/metadata}/robots.cjs +59 -5
- package/dist/{routes → kernel/routes/metadata}/robots.d.cts +2 -1
- package/dist/{routes → kernel/routes/metadata}/robots.d.ts +2 -1
- package/dist/kernel/routes/metadata/robots.js +123 -0
- package/dist/kernel/routes/metadata/sitemap.cjs +192 -0
- package/dist/kernel/routes/metadata/sitemap.d.cts +8 -0
- package/dist/kernel/routes/metadata/sitemap.d.ts +8 -0
- package/dist/kernel/routes/metadata/sitemap.js +166 -0
- package/dist/{pages → kernel/routes/pages}/group.cjs +107 -6
- package/dist/{pages → kernel/routes/pages}/group.d.cts +4 -2
- package/dist/{pages → kernel/routes/pages}/group.d.ts +4 -2
- package/dist/{pages → kernel/routes/pages}/group.js +107 -6
- package/dist/kernel/routes/pages/leaf.cjs +421 -0
- package/dist/kernel/routes/pages/leaf.d.cts +36 -0
- package/dist/kernel/routes/pages/leaf.d.ts +36 -0
- package/dist/kernel/routes/pages/leaf.js +397 -0
- package/dist/{pages → kernel/routes/pages}/root.cjs +108 -6
- package/dist/{pages → kernel/routes/pages}/root.d.cts +4 -2
- package/dist/{pages → kernel/routes/pages}/root.d.ts +4 -2
- package/dist/kernel/routes/pages/root.js +203 -0
- package/dist/keyboard-shortcuts.cjs +345 -0
- package/dist/keyboard-shortcuts.d.cts +34 -0
- package/dist/keyboard-shortcuts.d.ts +34 -0
- package/dist/keyboard-shortcuts.js +326 -0
- package/dist/resolvers/manifest-resolver.cjs +7 -3
- package/dist/resolvers/manifest-resolver.d.cts +2 -2
- package/dist/resolvers/manifest-resolver.d.ts +2 -2
- package/dist/resolvers/manifest-resolver.js +7 -3
- package/dist/search.cjs +411 -0
- package/dist/search.d.cts +20 -0
- package/dist/search.d.ts +20 -0
- package/dist/search.js +393 -0
- package/dist/types.cjs +12 -0
- package/dist/types.d.cts +132 -7
- package/dist/types.d.ts +132 -7
- package/dist/types.js +5 -0
- package/dist/utils/heading-ids.cjs +119 -0
- package/dist/utils/heading-ids.d.cts +15 -0
- package/dist/utils/heading-ids.d.ts +15 -0
- package/dist/utils/heading-ids.js +90 -0
- package/package.json +59 -38
- package/release/package.json +23 -0
- package/release/pnpm-lock.yaml +1192 -0
- package/release/release.json +39 -0
- package/dist/components/color-palette.cjs +0 -408
- package/dist/components/color-palette.d.cts +0 -5
- package/dist/components/color-palette.d.ts +0 -5
- package/dist/components/color-palette.js +0 -388
- package/dist/components/nav-breadcrumb.d.cts +0 -9
- package/dist/components/nav-breadcrumb.d.ts +0 -9
- package/dist/components/providers.d.cts +0 -8
- package/dist/components/providers.d.ts +0 -8
- package/dist/components/providers.js +0 -20
- package/dist/components/site-header.cjs +0 -302
- package/dist/components/site-header.d.cts +0 -12
- package/dist/components/site-header.d.ts +0 -12
- package/dist/components/site-header.js +0 -268
- package/dist/components/theme-toggle.cjs +0 -147
- package/dist/components/theme-toggle.d.cts +0 -5
- package/dist/components/theme-toggle.d.ts +0 -5
- package/dist/components/theme-toggle.js +0 -123
- package/dist/layouts/group.d.cts +0 -15
- package/dist/layouts/group.d.ts +0 -15
- package/dist/mdx/error-boundary.cjs +0 -94
- package/dist/mdx/error-boundary.js +0 -70
- package/dist/mdx/mdx.cjs +0 -182
- package/dist/mdx/mdx.d.cts +0 -10
- package/dist/mdx/mdx.d.ts +0 -10
- package/dist/mdx/mdx.js +0 -147
- package/dist/pages/leaf.cjs +0 -203
- package/dist/pages/leaf.d.cts +0 -23
- package/dist/pages/leaf.d.ts +0 -23
- package/dist/pages/leaf.js +0 -176
- package/dist/pages/root.js +0 -101
- package/dist/routes/llms.cjs +0 -101
- package/dist/routes/llms.d.cts +0 -7
- package/dist/routes/llms.d.ts +0 -7
- package/dist/routes/llms.js +0 -76
- package/dist/routes/robots.js +0 -69
- package/dist/routes/sitemap.cjs +0 -108
- package/dist/routes/sitemap.d.cts +0 -5
- package/dist/routes/sitemap.d.ts +0 -5
- package/dist/routes/sitemap.js +0 -83
- /package/dist/{mdx → kernel/components/mdx}/error-fallback.d.cts +0 -0
- /package/dist/{mdx → kernel/components/mdx}/error-fallback.d.ts +0 -0
|
@@ -0,0 +1,735 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
"use client";
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
20
|
+
|
|
21
|
+
// src/kernel/components/blocks/navigation-progress-playground.tsx
|
|
22
|
+
var navigation_progress_playground_exports = {};
|
|
23
|
+
__export(navigation_progress_playground_exports, {
|
|
24
|
+
NavigationProgressPlayground: () => NavigationProgressPlayground
|
|
25
|
+
});
|
|
26
|
+
module.exports = __toCommonJS(navigation_progress_playground_exports);
|
|
27
|
+
var import_button = require("../ui/button.js");
|
|
28
|
+
var import_progress = require("../ui/progress.js");
|
|
29
|
+
var import_tabs = require("../ui/tabs.js");
|
|
30
|
+
|
|
31
|
+
// src/utils/cn.ts
|
|
32
|
+
var import_clsx = require("clsx");
|
|
33
|
+
var import_tailwind_merge = require("tailwind-merge");
|
|
34
|
+
var twMerge = (0, import_tailwind_merge.extendTailwindMerge)({
|
|
35
|
+
extend: {
|
|
36
|
+
classGroups: {
|
|
37
|
+
z: [
|
|
38
|
+
"z-content",
|
|
39
|
+
"z-nav",
|
|
40
|
+
"z-overlay",
|
|
41
|
+
"z-modal",
|
|
42
|
+
"z-search",
|
|
43
|
+
"z-toast",
|
|
44
|
+
"z-progress"
|
|
45
|
+
]
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
function cn(...inputs) {
|
|
50
|
+
return twMerge((0, import_clsx.clsx)(inputs));
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
// src/kernel/components/blocks/navigation-progress-playground.tsx
|
|
54
|
+
var import_react = require("react");
|
|
55
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
56
|
+
var presets = {
|
|
57
|
+
current: {
|
|
58
|
+
description: "Current PublishOS navigation-progress settings.",
|
|
59
|
+
label: "Current",
|
|
60
|
+
settings: {
|
|
61
|
+
initialProgress: 0,
|
|
62
|
+
targetProgress: 98,
|
|
63
|
+
fastPhaseEnd: 38,
|
|
64
|
+
minDuration: 48,
|
|
65
|
+
maxDuration: 1800,
|
|
66
|
+
exitDuration: 188,
|
|
67
|
+
timeout: 8e3,
|
|
68
|
+
sampleMinDuration: 700,
|
|
69
|
+
sampleMaxDuration: 1800,
|
|
70
|
+
settleDelay: 100,
|
|
71
|
+
transitionDuration: 320,
|
|
72
|
+
curvePower: 3,
|
|
73
|
+
height: 2,
|
|
74
|
+
fill: "var(--progress-bar-fill, var(--accent-1, #111111))",
|
|
75
|
+
track: "var(--progress-bar-background, transparent)",
|
|
76
|
+
progressEase: "cubic-bezier(0.21, 0.65, 0.35, 1)",
|
|
77
|
+
exitEase: "cubic-bezier(0.55, 0.06, 0.68, 0.19)",
|
|
78
|
+
transformOrigin: "left",
|
|
79
|
+
exitTransformOrigin: "right"
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
aave: {
|
|
83
|
+
description: "Aave docs inspired: thin, calm, left-origin purple bar.",
|
|
84
|
+
label: "Aave",
|
|
85
|
+
settings: {
|
|
86
|
+
initialProgress: 0,
|
|
87
|
+
targetProgress: 92,
|
|
88
|
+
fastPhaseEnd: 38,
|
|
89
|
+
minDuration: 140,
|
|
90
|
+
maxDuration: 1800,
|
|
91
|
+
exitDuration: 260,
|
|
92
|
+
timeout: 7e3,
|
|
93
|
+
sampleMinDuration: 750,
|
|
94
|
+
sampleMaxDuration: 1900,
|
|
95
|
+
settleDelay: 80,
|
|
96
|
+
transitionDuration: 320,
|
|
97
|
+
curvePower: 2.2,
|
|
98
|
+
height: 2,
|
|
99
|
+
fill: "color(display-p3 0.5960784314 0.5882352941 1 / 1)",
|
|
100
|
+
track: "transparent",
|
|
101
|
+
progressEase: "cubic-bezier(0.21, 0.65, 0.35, 1)",
|
|
102
|
+
exitEase: "cubic-bezier(0.55, 0.06, 0.68, 0.19)",
|
|
103
|
+
transformOrigin: "left",
|
|
104
|
+
exitTransformOrigin: "right"
|
|
105
|
+
}
|
|
106
|
+
},
|
|
107
|
+
tuned: {
|
|
108
|
+
description: "A snappier PublishOS candidate with a shorter long tail.",
|
|
109
|
+
label: "Tuned",
|
|
110
|
+
settings: {
|
|
111
|
+
initialProgress: 8,
|
|
112
|
+
targetProgress: 94,
|
|
113
|
+
fastPhaseEnd: 34,
|
|
114
|
+
minDuration: 90,
|
|
115
|
+
maxDuration: 4200,
|
|
116
|
+
exitDuration: 180,
|
|
117
|
+
timeout: 8e3,
|
|
118
|
+
sampleMinDuration: 550,
|
|
119
|
+
sampleMaxDuration: 1600,
|
|
120
|
+
settleDelay: 70,
|
|
121
|
+
transitionDuration: 180,
|
|
122
|
+
curvePower: 2.6,
|
|
123
|
+
height: 2,
|
|
124
|
+
fill: "var(--progress-bar-fill, var(--accent-1, #111111))",
|
|
125
|
+
track: "var(--progress-bar-background, transparent)",
|
|
126
|
+
progressEase: "cubic-bezier(0.12, 0.72, 0, 1)",
|
|
127
|
+
exitEase: "cubic-bezier(0.2, 0, 0, 1)",
|
|
128
|
+
transformOrigin: "left",
|
|
129
|
+
exitTransformOrigin: "right"
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
};
|
|
133
|
+
var presetOrder = ["current", "aave", "tuned"];
|
|
134
|
+
function clamp({
|
|
135
|
+
max,
|
|
136
|
+
min,
|
|
137
|
+
value
|
|
138
|
+
}) {
|
|
139
|
+
return Math.min(max, Math.max(min, value));
|
|
140
|
+
}
|
|
141
|
+
function buildOutput(settings) {
|
|
142
|
+
return `export const navigationProgressConfig = {
|
|
143
|
+
initialProgress: ${settings.initialProgress},
|
|
144
|
+
targetProgress: ${settings.targetProgress},
|
|
145
|
+
fastPhaseEnd: ${settings.fastPhaseEnd},
|
|
146
|
+
minDuration: ${settings.minDuration},
|
|
147
|
+
maxDuration: ${settings.maxDuration},
|
|
148
|
+
exitDuration: ${settings.exitDuration},
|
|
149
|
+
timeout: ${settings.timeout},
|
|
150
|
+
};
|
|
151
|
+
|
|
152
|
+
const sampleDuration =
|
|
153
|
+
${settings.sampleMinDuration} +
|
|
154
|
+
Math.random() * (${settings.sampleMaxDuration} - ${settings.sampleMinDuration});
|
|
155
|
+
|
|
156
|
+
/* animation.css */
|
|
157
|
+
:root {
|
|
158
|
+
--animation-ease-progress: ${settings.progressEase};
|
|
159
|
+
--animation-ease-progress-exit: ${settings.exitEase};
|
|
160
|
+
--progress-bar-height: ${settings.height}px;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
/* NavigationProgress indicator */
|
|
164
|
+
style={{
|
|
165
|
+
transformOrigin: isExiting ? "${settings.exitTransformOrigin}" : "${settings.transformOrigin}",
|
|
166
|
+
transition: isExiting
|
|
167
|
+
? "transform ${settings.exitDuration}ms var(--animation-ease-progress-exit)"
|
|
168
|
+
: "transform ${settings.transitionDuration}ms var(--animation-ease-progress)",
|
|
169
|
+
}}
|
|
170
|
+
|
|
171
|
+
/* Theme tokens */
|
|
172
|
+
--progress-bar-fill: ${settings.fill};
|
|
173
|
+
--progress-bar-background: ${settings.track};`;
|
|
174
|
+
}
|
|
175
|
+
function randomDuration({ max, min }) {
|
|
176
|
+
const lower = Math.min(min, max);
|
|
177
|
+
const upper = Math.max(min, max);
|
|
178
|
+
return Math.round(lower + Math.random() * (upper - lower));
|
|
179
|
+
}
|
|
180
|
+
function NumberControl({
|
|
181
|
+
label,
|
|
182
|
+
max,
|
|
183
|
+
min,
|
|
184
|
+
onChange,
|
|
185
|
+
step = 1,
|
|
186
|
+
unit,
|
|
187
|
+
value
|
|
188
|
+
}) {
|
|
189
|
+
const id = (0, import_react.useId)();
|
|
190
|
+
const handleChange = (event) => {
|
|
191
|
+
onChange(Number(event.target.value));
|
|
192
|
+
};
|
|
193
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "grid gap-2", children: [
|
|
194
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
195
|
+
"label",
|
|
196
|
+
{
|
|
197
|
+
className: "flex items-center justify-between gap-3 text-xs font-medium text-foreground-2",
|
|
198
|
+
htmlFor: id,
|
|
199
|
+
children: [
|
|
200
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: label }),
|
|
201
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { className: "font-mono text-[11px] text-foreground-3", children: [
|
|
202
|
+
value,
|
|
203
|
+
unit
|
|
204
|
+
] })
|
|
205
|
+
]
|
|
206
|
+
}
|
|
207
|
+
),
|
|
208
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "grid grid-cols-[1fr_4.75rem] items-center gap-3", children: [
|
|
209
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
210
|
+
"input",
|
|
211
|
+
{
|
|
212
|
+
className: "h-1 w-full accent-foreground-1",
|
|
213
|
+
id,
|
|
214
|
+
max,
|
|
215
|
+
min,
|
|
216
|
+
onChange: handleChange,
|
|
217
|
+
step,
|
|
218
|
+
type: "range",
|
|
219
|
+
value
|
|
220
|
+
}
|
|
221
|
+
),
|
|
222
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
223
|
+
"input",
|
|
224
|
+
{
|
|
225
|
+
className: "h-8 rounded-button border border-stroke-2 bg-surface-1 px-2 text-right font-mono text-xs text-foreground-1 outline-none focus:border-accent-1",
|
|
226
|
+
max,
|
|
227
|
+
min,
|
|
228
|
+
onChange: handleChange,
|
|
229
|
+
step,
|
|
230
|
+
type: "number",
|
|
231
|
+
value
|
|
232
|
+
}
|
|
233
|
+
)
|
|
234
|
+
] })
|
|
235
|
+
] });
|
|
236
|
+
}
|
|
237
|
+
function TextControl({
|
|
238
|
+
label,
|
|
239
|
+
onChange,
|
|
240
|
+
value
|
|
241
|
+
}) {
|
|
242
|
+
const id = (0, import_react.useId)();
|
|
243
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
244
|
+
"label",
|
|
245
|
+
{
|
|
246
|
+
className: "grid gap-2 text-xs font-medium text-foreground-2",
|
|
247
|
+
htmlFor: id,
|
|
248
|
+
children: [
|
|
249
|
+
label,
|
|
250
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
251
|
+
"input",
|
|
252
|
+
{
|
|
253
|
+
className: "h-8 rounded-button border border-stroke-2 bg-surface-1 px-2 font-mono text-xs text-foreground-1 outline-none focus:border-accent-1",
|
|
254
|
+
id,
|
|
255
|
+
onChange: (event) => onChange(event.target.value),
|
|
256
|
+
spellCheck: false,
|
|
257
|
+
value
|
|
258
|
+
}
|
|
259
|
+
)
|
|
260
|
+
]
|
|
261
|
+
}
|
|
262
|
+
);
|
|
263
|
+
}
|
|
264
|
+
function OriginControl({
|
|
265
|
+
label,
|
|
266
|
+
onChange,
|
|
267
|
+
value
|
|
268
|
+
}) {
|
|
269
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "grid gap-2", children: [
|
|
270
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "text-xs font-medium text-foreground-2", children: label }),
|
|
271
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "grid grid-cols-2 rounded-button border border-stroke-2 bg-surface-2 p-1", children: ["left", "right"].map((origin) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
272
|
+
"button",
|
|
273
|
+
{
|
|
274
|
+
className: cn(
|
|
275
|
+
"h-7 rounded-[max(calc(var(--radius-button)_-_0.25rem),0px)] text-xs font-medium text-foreground-3 transition-colors",
|
|
276
|
+
origin === value && "bg-surface-1 text-foreground-1 shadow-sm"
|
|
277
|
+
),
|
|
278
|
+
onClick: () => onChange(origin),
|
|
279
|
+
type: "button",
|
|
280
|
+
children: origin
|
|
281
|
+
},
|
|
282
|
+
origin
|
|
283
|
+
)) })
|
|
284
|
+
] });
|
|
285
|
+
}
|
|
286
|
+
function ControlSection({
|
|
287
|
+
children,
|
|
288
|
+
title
|
|
289
|
+
}) {
|
|
290
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("section", { className: "grid gap-4 border-b border-stroke-3 px-4 py-5", children: [
|
|
291
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("h3", { className: "text-xs font-semibold uppercase text-foreground-3", children: title }),
|
|
292
|
+
children
|
|
293
|
+
] });
|
|
294
|
+
}
|
|
295
|
+
function ProgressPreview({
|
|
296
|
+
isExiting,
|
|
297
|
+
progress,
|
|
298
|
+
settings
|
|
299
|
+
}) {
|
|
300
|
+
const isVisible = progress > 0;
|
|
301
|
+
const boundedProgress = clamp({ max: 100, min: 0, value: progress });
|
|
302
|
+
const indicatorStyle = {
|
|
303
|
+
background: settings.fill,
|
|
304
|
+
transform: isExiting ? "scaleX(0)" : `scaleX(${boundedProgress / 100})`,
|
|
305
|
+
transformOrigin: isExiting ? settings.exitTransformOrigin : settings.transformOrigin,
|
|
306
|
+
transition: isExiting ? `transform ${settings.exitDuration}ms ${settings.exitEase}` : `transform ${settings.transitionDuration}ms ${settings.progressEase}`
|
|
307
|
+
};
|
|
308
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
309
|
+
import_progress.Progress,
|
|
310
|
+
{
|
|
311
|
+
"aria-label": "Sample page navigation",
|
|
312
|
+
className: cn(
|
|
313
|
+
"pointer-events-none absolute left-0 right-0 top-0 overflow-hidden transition-opacity duration-200",
|
|
314
|
+
isVisible ? "opacity-100" : "opacity-0"
|
|
315
|
+
),
|
|
316
|
+
style: { height: settings.height },
|
|
317
|
+
value: isVisible ? boundedProgress : null,
|
|
318
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
319
|
+
import_progress.ProgressTrack,
|
|
320
|
+
{
|
|
321
|
+
className: "h-full rounded-none",
|
|
322
|
+
style: { background: settings.track },
|
|
323
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
324
|
+
import_progress.ProgressIndicator,
|
|
325
|
+
{
|
|
326
|
+
className: "h-full w-full rounded-none transition-none",
|
|
327
|
+
style: indicatorStyle
|
|
328
|
+
}
|
|
329
|
+
)
|
|
330
|
+
}
|
|
331
|
+
)
|
|
332
|
+
}
|
|
333
|
+
);
|
|
334
|
+
}
|
|
335
|
+
function NavigationProgressPlayground() {
|
|
336
|
+
const [settings, setSettings] = (0, import_react.useState)(
|
|
337
|
+
presets.tuned.settings
|
|
338
|
+
);
|
|
339
|
+
const [activePreset, setActivePreset] = (0, import_react.useState)("tuned");
|
|
340
|
+
const [progress, setProgress] = (0, import_react.useState)(0);
|
|
341
|
+
const [isExiting, setIsExiting] = (0, import_react.useState)(false);
|
|
342
|
+
const [isRunning, setIsRunning] = (0, import_react.useState)(false);
|
|
343
|
+
const [copyState, setCopyState] = (0, import_react.useState)("idle");
|
|
344
|
+
const [sampleDuration, setSampleDuration] = (0, import_react.useState)(null);
|
|
345
|
+
const animationFrame = (0, import_react.useRef)(null);
|
|
346
|
+
const completionTimer = (0, import_react.useRef)(null);
|
|
347
|
+
const settleTimer = (0, import_react.useRef)(null);
|
|
348
|
+
const exitTimer = (0, import_react.useRef)(null);
|
|
349
|
+
const activeNavigation = (0, import_react.useRef)(false);
|
|
350
|
+
const output = (0, import_react.useMemo)(() => buildOutput(settings), [settings]);
|
|
351
|
+
const clearTimers = (0, import_react.useCallback)(() => {
|
|
352
|
+
if (animationFrame.current) cancelAnimationFrame(animationFrame.current);
|
|
353
|
+
if (completionTimer.current) clearTimeout(completionTimer.current);
|
|
354
|
+
if (settleTimer.current) clearTimeout(settleTimer.current);
|
|
355
|
+
if (exitTimer.current) clearTimeout(exitTimer.current);
|
|
356
|
+
animationFrame.current = null;
|
|
357
|
+
completionTimer.current = null;
|
|
358
|
+
settleTimer.current = null;
|
|
359
|
+
exitTimer.current = null;
|
|
360
|
+
}, []);
|
|
361
|
+
const resetSample = (0, import_react.useCallback)(() => {
|
|
362
|
+
clearTimers();
|
|
363
|
+
activeNavigation.current = false;
|
|
364
|
+
setProgress(0);
|
|
365
|
+
setIsExiting(false);
|
|
366
|
+
setIsRunning(false);
|
|
367
|
+
setSampleDuration(null);
|
|
368
|
+
}, [clearTimers]);
|
|
369
|
+
const completeSample = (0, import_react.useCallback)(() => {
|
|
370
|
+
if (!activeNavigation.current) return;
|
|
371
|
+
if (animationFrame.current) {
|
|
372
|
+
cancelAnimationFrame(animationFrame.current);
|
|
373
|
+
animationFrame.current = null;
|
|
374
|
+
}
|
|
375
|
+
if (completionTimer.current) {
|
|
376
|
+
clearTimeout(completionTimer.current);
|
|
377
|
+
completionTimer.current = null;
|
|
378
|
+
}
|
|
379
|
+
setProgress(100);
|
|
380
|
+
settleTimer.current = setTimeout(() => {
|
|
381
|
+
if (!activeNavigation.current) return;
|
|
382
|
+
setIsExiting(true);
|
|
383
|
+
exitTimer.current = setTimeout(() => {
|
|
384
|
+
setProgress(0);
|
|
385
|
+
setIsExiting(false);
|
|
386
|
+
setIsRunning(false);
|
|
387
|
+
activeNavigation.current = false;
|
|
388
|
+
exitTimer.current = null;
|
|
389
|
+
}, settings.exitDuration);
|
|
390
|
+
}, settings.settleDelay);
|
|
391
|
+
}, [settings.exitDuration, settings.settleDelay]);
|
|
392
|
+
const startSample = (0, import_react.useCallback)(() => {
|
|
393
|
+
resetSample();
|
|
394
|
+
activeNavigation.current = true;
|
|
395
|
+
setIsRunning(true);
|
|
396
|
+
setIsExiting(false);
|
|
397
|
+
setProgress(settings.initialProgress);
|
|
398
|
+
const startTime = performance.now();
|
|
399
|
+
const routeDuration = randomDuration({
|
|
400
|
+
max: settings.sampleMaxDuration,
|
|
401
|
+
min: settings.sampleMinDuration
|
|
402
|
+
});
|
|
403
|
+
setSampleDuration(routeDuration);
|
|
404
|
+
const animate = () => {
|
|
405
|
+
if (!activeNavigation.current) return;
|
|
406
|
+
const elapsed = performance.now() - startTime;
|
|
407
|
+
let progressValue;
|
|
408
|
+
if (elapsed < settings.minDuration) {
|
|
409
|
+
progressValue = settings.initialProgress + elapsed / settings.minDuration * (settings.fastPhaseEnd - settings.initialProgress);
|
|
410
|
+
} else {
|
|
411
|
+
const remainingProgress = settings.targetProgress - settings.fastPhaseEnd;
|
|
412
|
+
const normalizedTime = clamp({
|
|
413
|
+
max: 1,
|
|
414
|
+
min: 0,
|
|
415
|
+
value: (elapsed - settings.minDuration) / (settings.maxDuration - settings.minDuration)
|
|
416
|
+
});
|
|
417
|
+
const easedTime = 1 - (1 - normalizedTime) ** settings.curvePower;
|
|
418
|
+
progressValue = settings.fastPhaseEnd + easedTime * remainingProgress;
|
|
419
|
+
}
|
|
420
|
+
setProgress(
|
|
421
|
+
clamp({ max: settings.targetProgress, min: 0, value: progressValue })
|
|
422
|
+
);
|
|
423
|
+
animationFrame.current = requestAnimationFrame(animate);
|
|
424
|
+
};
|
|
425
|
+
animationFrame.current = requestAnimationFrame(animate);
|
|
426
|
+
completionTimer.current = setTimeout(completeSample, routeDuration);
|
|
427
|
+
}, [completeSample, resetSample, settings]);
|
|
428
|
+
(0, import_react.useEffect)(() => resetSample, [resetSample]);
|
|
429
|
+
const updateNumber = (key, value) => {
|
|
430
|
+
setActivePreset("custom");
|
|
431
|
+
setSettings((current) => ({ ...current, [key]: value }));
|
|
432
|
+
};
|
|
433
|
+
const updateText = (key, value) => {
|
|
434
|
+
setActivePreset("custom");
|
|
435
|
+
setSettings((current) => ({ ...current, [key]: value }));
|
|
436
|
+
};
|
|
437
|
+
const updateOrigin = (key, value) => {
|
|
438
|
+
setActivePreset("custom");
|
|
439
|
+
setSettings((current) => ({ ...current, [key]: value }));
|
|
440
|
+
};
|
|
441
|
+
const applyPreset = (preset) => {
|
|
442
|
+
resetSample();
|
|
443
|
+
setActivePreset(preset);
|
|
444
|
+
setSettings(presets[preset].settings);
|
|
445
|
+
};
|
|
446
|
+
const copyOutput = async () => {
|
|
447
|
+
await navigator.clipboard.writeText(output);
|
|
448
|
+
setCopyState("copied");
|
|
449
|
+
window.setTimeout(() => setCopyState("idle"), 1200);
|
|
450
|
+
};
|
|
451
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "min-h-screen bg-[#fafafa] text-foreground-1", children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "grid min-h-screen lg:grid-cols-[1fr_23rem]", children: [
|
|
452
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("main", { className: "relative min-h-screen overflow-hidden", children: [
|
|
453
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "absolute left-5 top-5 text-sm font-medium text-[#b4b4b4]", children: "Inline" }),
|
|
454
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "flex min-h-screen items-center justify-center px-8 py-20", children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("section", { className: "relative flex h-[15rem] w-full max-w-4xl flex-col items-center justify-center overflow-hidden bg-white shadow-[0_0_28px_rgba(0,0,0,0.012)]", children: [
|
|
455
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
456
|
+
ProgressPreview,
|
|
457
|
+
{
|
|
458
|
+
isExiting,
|
|
459
|
+
progress,
|
|
460
|
+
settings
|
|
461
|
+
}
|
|
462
|
+
),
|
|
463
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "grid justify-items-center gap-6", children: [
|
|
464
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "text-center text-base font-semibold text-black", children: "put progress bars here" }),
|
|
465
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex items-center gap-3", children: [
|
|
466
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_button.Button, { onClick: startSample, size: "sm", children: "Trigger navigation" }),
|
|
467
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_button.Button, { onClick: resetSample, size: "sm", variant: "outline", children: "Reset" })
|
|
468
|
+
] }),
|
|
469
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "font-mono text-xs text-foreground-3", children: isRunning ? `${Math.round(progress)}% / ${sampleDuration ?? 0}ms` : "idle" })
|
|
470
|
+
] })
|
|
471
|
+
] }) })
|
|
472
|
+
] }),
|
|
473
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("aside", { className: "flex max-h-screen min-h-screen flex-col border-l border-stroke-3 bg-surface-1", children: [
|
|
474
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "border-b border-stroke-3 px-4 py-4", children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex items-start justify-between gap-3", children: [
|
|
475
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { children: [
|
|
476
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("h1", { className: "text-sm font-semibold text-foreground-1", children: "Navigation Progress" }),
|
|
477
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "mt-1 text-xs leading-5 text-foreground-3", children: "Tune, trigger, copy." })
|
|
478
|
+
] }),
|
|
479
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_button.Button, { onClick: copyOutput, size: "xs", variant: "secondary", children: copyState === "copied" ? "Copied" : "Copy" })
|
|
480
|
+
] }) }),
|
|
481
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "border-b border-stroke-3 px-4 py-4", children: [
|
|
482
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "grid grid-cols-3 gap-1 rounded-button border border-stroke-2 bg-surface-2 p-1", children: presetOrder.map((preset) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
483
|
+
"button",
|
|
484
|
+
{
|
|
485
|
+
className: cn(
|
|
486
|
+
"h-8 rounded-[max(calc(var(--radius-button)_-_0.25rem),0px)] text-xs font-medium text-foreground-3 transition-colors",
|
|
487
|
+
activePreset === preset && "bg-surface-1 text-foreground-1 shadow-sm"
|
|
488
|
+
),
|
|
489
|
+
onClick: () => applyPreset(preset),
|
|
490
|
+
type: "button",
|
|
491
|
+
children: presets[preset].label
|
|
492
|
+
},
|
|
493
|
+
preset
|
|
494
|
+
)) }),
|
|
495
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "mt-3 text-xs leading-5 text-foreground-3", children: activePreset === "custom" ? "Custom settings ready to copy into the progress bar." : presets[activePreset].description })
|
|
496
|
+
] }),
|
|
497
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_tabs.Tabs, { className: "flex min-h-0 flex-1 flex-col", defaultValue: "timing", children: [
|
|
498
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "border-b border-stroke-3 px-4 py-3", children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_tabs.TabsList, { className: "grid w-full grid-cols-4", children: [
|
|
499
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tabs.TabsTab, { className: "px-2 text-xs", value: "timing", children: "Timing" }),
|
|
500
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tabs.TabsTab, { className: "px-2 text-xs", value: "motion", children: "Motion" }),
|
|
501
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tabs.TabsTab, { className: "px-2 text-xs", value: "visual", children: "Visual" }),
|
|
502
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tabs.TabsTab, { className: "px-2 text-xs", value: "output", children: "Output" })
|
|
503
|
+
] }) }),
|
|
504
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "min-h-0 flex-1 overflow-y-auto", children: [
|
|
505
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_tabs.TabsPanel, { value: "timing", children: [
|
|
506
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(ControlSection, { title: "Progress", children: [
|
|
507
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
508
|
+
NumberControl,
|
|
509
|
+
{
|
|
510
|
+
label: "Initial",
|
|
511
|
+
max: 40,
|
|
512
|
+
min: 0,
|
|
513
|
+
onChange: (value) => updateNumber("initialProgress", value),
|
|
514
|
+
unit: "%",
|
|
515
|
+
value: settings.initialProgress
|
|
516
|
+
}
|
|
517
|
+
),
|
|
518
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
519
|
+
NumberControl,
|
|
520
|
+
{
|
|
521
|
+
label: "Fast phase",
|
|
522
|
+
max: 80,
|
|
523
|
+
min: 0,
|
|
524
|
+
onChange: (value) => updateNumber("fastPhaseEnd", value),
|
|
525
|
+
unit: "%",
|
|
526
|
+
value: settings.fastPhaseEnd
|
|
527
|
+
}
|
|
528
|
+
),
|
|
529
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
530
|
+
NumberControl,
|
|
531
|
+
{
|
|
532
|
+
label: "Target",
|
|
533
|
+
max: 99,
|
|
534
|
+
min: 50,
|
|
535
|
+
onChange: (value) => updateNumber("targetProgress", value),
|
|
536
|
+
unit: "%",
|
|
537
|
+
value: settings.targetProgress
|
|
538
|
+
}
|
|
539
|
+
)
|
|
540
|
+
] }),
|
|
541
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(ControlSection, { title: "Duration", children: [
|
|
542
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
543
|
+
NumberControl,
|
|
544
|
+
{
|
|
545
|
+
label: "Fast duration",
|
|
546
|
+
max: 400,
|
|
547
|
+
min: 0,
|
|
548
|
+
onChange: (value) => updateNumber("minDuration", value),
|
|
549
|
+
unit: "ms",
|
|
550
|
+
value: settings.minDuration
|
|
551
|
+
}
|
|
552
|
+
),
|
|
553
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
554
|
+
NumberControl,
|
|
555
|
+
{
|
|
556
|
+
label: "Tail duration",
|
|
557
|
+
max: 3e4,
|
|
558
|
+
min: 500,
|
|
559
|
+
onChange: (value) => updateNumber("maxDuration", value),
|
|
560
|
+
step: 100,
|
|
561
|
+
unit: "ms",
|
|
562
|
+
value: settings.maxDuration
|
|
563
|
+
}
|
|
564
|
+
),
|
|
565
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
566
|
+
NumberControl,
|
|
567
|
+
{
|
|
568
|
+
label: "Sample min",
|
|
569
|
+
max: 5e3,
|
|
570
|
+
min: 150,
|
|
571
|
+
onChange: (value) => updateNumber("sampleMinDuration", value),
|
|
572
|
+
step: 50,
|
|
573
|
+
unit: "ms",
|
|
574
|
+
value: settings.sampleMinDuration
|
|
575
|
+
}
|
|
576
|
+
),
|
|
577
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
578
|
+
NumberControl,
|
|
579
|
+
{
|
|
580
|
+
label: "Sample max",
|
|
581
|
+
max: 8e3,
|
|
582
|
+
min: 150,
|
|
583
|
+
onChange: (value) => updateNumber("sampleMaxDuration", value),
|
|
584
|
+
step: 50,
|
|
585
|
+
unit: "ms",
|
|
586
|
+
value: settings.sampleMaxDuration
|
|
587
|
+
}
|
|
588
|
+
),
|
|
589
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
590
|
+
NumberControl,
|
|
591
|
+
{
|
|
592
|
+
label: "Timeout",
|
|
593
|
+
max: 2e4,
|
|
594
|
+
min: 1e3,
|
|
595
|
+
onChange: (value) => updateNumber("timeout", value),
|
|
596
|
+
step: 250,
|
|
597
|
+
unit: "ms",
|
|
598
|
+
value: settings.timeout
|
|
599
|
+
}
|
|
600
|
+
)
|
|
601
|
+
] })
|
|
602
|
+
] }),
|
|
603
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_tabs.TabsPanel, { value: "motion", children: [
|
|
604
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(ControlSection, { title: "Transform", children: [
|
|
605
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
606
|
+
NumberControl,
|
|
607
|
+
{
|
|
608
|
+
label: "Transition",
|
|
609
|
+
max: 700,
|
|
610
|
+
min: 0,
|
|
611
|
+
onChange: (value) => updateNumber("transitionDuration", value),
|
|
612
|
+
unit: "ms",
|
|
613
|
+
value: settings.transitionDuration
|
|
614
|
+
}
|
|
615
|
+
),
|
|
616
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
617
|
+
NumberControl,
|
|
618
|
+
{
|
|
619
|
+
label: "Curve power",
|
|
620
|
+
max: 6,
|
|
621
|
+
min: 1,
|
|
622
|
+
onChange: (value) => updateNumber("curvePower", value),
|
|
623
|
+
step: 0.1,
|
|
624
|
+
value: settings.curvePower
|
|
625
|
+
}
|
|
626
|
+
),
|
|
627
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
628
|
+
OriginControl,
|
|
629
|
+
{
|
|
630
|
+
label: "Fill origin",
|
|
631
|
+
onChange: (value) => updateOrigin("transformOrigin", value),
|
|
632
|
+
value: settings.transformOrigin
|
|
633
|
+
}
|
|
634
|
+
)
|
|
635
|
+
] }),
|
|
636
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(ControlSection, { title: "Exit", children: [
|
|
637
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
638
|
+
NumberControl,
|
|
639
|
+
{
|
|
640
|
+
label: "Settle delay",
|
|
641
|
+
max: 500,
|
|
642
|
+
min: 0,
|
|
643
|
+
onChange: (value) => updateNumber("settleDelay", value),
|
|
644
|
+
unit: "ms",
|
|
645
|
+
value: settings.settleDelay
|
|
646
|
+
}
|
|
647
|
+
),
|
|
648
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
649
|
+
NumberControl,
|
|
650
|
+
{
|
|
651
|
+
label: "Exit duration",
|
|
652
|
+
max: 700,
|
|
653
|
+
min: 0,
|
|
654
|
+
onChange: (value) => updateNumber("exitDuration", value),
|
|
655
|
+
unit: "ms",
|
|
656
|
+
value: settings.exitDuration
|
|
657
|
+
}
|
|
658
|
+
),
|
|
659
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
660
|
+
OriginControl,
|
|
661
|
+
{
|
|
662
|
+
label: "Exit origin",
|
|
663
|
+
onChange: (value) => updateOrigin("exitTransformOrigin", value),
|
|
664
|
+
value: settings.exitTransformOrigin
|
|
665
|
+
}
|
|
666
|
+
)
|
|
667
|
+
] }),
|
|
668
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(ControlSection, { title: "Easing", children: [
|
|
669
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
670
|
+
TextControl,
|
|
671
|
+
{
|
|
672
|
+
label: "Progress ease",
|
|
673
|
+
onChange: (value) => updateText("progressEase", value),
|
|
674
|
+
value: settings.progressEase
|
|
675
|
+
}
|
|
676
|
+
),
|
|
677
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
678
|
+
TextControl,
|
|
679
|
+
{
|
|
680
|
+
label: "Exit ease",
|
|
681
|
+
onChange: (value) => updateText("exitEase", value),
|
|
682
|
+
value: settings.exitEase
|
|
683
|
+
}
|
|
684
|
+
)
|
|
685
|
+
] })
|
|
686
|
+
] }),
|
|
687
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tabs.TabsPanel, { value: "visual", children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(ControlSection, { title: "Bar", children: [
|
|
688
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
689
|
+
NumberControl,
|
|
690
|
+
{
|
|
691
|
+
label: "Height",
|
|
692
|
+
max: 8,
|
|
693
|
+
min: 1,
|
|
694
|
+
onChange: (value) => updateNumber("height", value),
|
|
695
|
+
unit: "px",
|
|
696
|
+
value: settings.height
|
|
697
|
+
}
|
|
698
|
+
),
|
|
699
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
700
|
+
TextControl,
|
|
701
|
+
{
|
|
702
|
+
label: "Fill",
|
|
703
|
+
onChange: (value) => updateText("fill", value),
|
|
704
|
+
value: settings.fill
|
|
705
|
+
}
|
|
706
|
+
),
|
|
707
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
708
|
+
TextControl,
|
|
709
|
+
{
|
|
710
|
+
label: "Track",
|
|
711
|
+
onChange: (value) => updateText("track", value),
|
|
712
|
+
value: settings.track
|
|
713
|
+
}
|
|
714
|
+
)
|
|
715
|
+
] }) }),
|
|
716
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tabs.TabsPanel, { className: "h-full", value: "output", children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "grid h-full grid-rows-[1fr_auto] gap-3 p-4", children: [
|
|
717
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
718
|
+
"textarea",
|
|
719
|
+
{
|
|
720
|
+
className: "min-h-[26rem] resize-none rounded-panel border border-stroke-2 bg-surface-2 p-3 font-mono text-xs leading-5 text-foreground-1 outline-none focus:border-accent-1",
|
|
721
|
+
readOnly: true,
|
|
722
|
+
value: output
|
|
723
|
+
}
|
|
724
|
+
),
|
|
725
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_button.Button, { onClick: copyOutput, size: "sm", variant: "secondary", children: copyState === "copied" ? "Copied output" : "Copy output" })
|
|
726
|
+
] }) })
|
|
727
|
+
] })
|
|
728
|
+
] })
|
|
729
|
+
] })
|
|
730
|
+
] }) });
|
|
731
|
+
}
|
|
732
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
733
|
+
0 && (module.exports = {
|
|
734
|
+
NavigationProgressPlayground
|
|
735
|
+
});
|