@publish.os/nextjs 0.0.1-alpha.5 → 0.0.1-alpha.7
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 -5
- package/compiler-assets/nextjs/defaults/app/globals.css +6 -0
- package/compiler-assets/nextjs/defaults/group/layout.tsx +23 -0
- package/compiler-assets/nextjs/defaults/group/leaf.tsx +48 -0
- package/compiler-assets/nextjs/defaults/group/page.tsx +50 -0
- package/compiler-assets/nextjs/defaults/project/next.config.mjs +45 -0
- package/compiler-assets/nextjs/defaults/project/postcss.config.mjs +5 -0
- package/compiler-assets/nextjs/defaults/project/tsconfig.json.template +41 -0
- package/compiler-assets/nextjs/defaults/root/css/animation.css +90 -0
- package/compiler-assets/nextjs/defaults/root/css/components/dialog.css +21 -0
- package/compiler-assets/nextjs/defaults/root/css/components/drawer.css +21 -0
- package/compiler-assets/nextjs/defaults/root/css/components/menu.css +23 -0
- package/compiler-assets/nextjs/defaults/root/css/components/navigation-menu.css +25 -0
- package/compiler-assets/nextjs/defaults/root/css/components/popover.css +17 -0
- package/compiler-assets/nextjs/defaults/root/css/components/select.css +23 -0
- package/compiler-assets/nextjs/defaults/root/css/components/toast.css +19 -0
- package/compiler-assets/nextjs/defaults/root/css/components/tooltip.css +15 -0
- package/compiler-assets/nextjs/defaults/root/css/layout.css +22 -0
- package/compiler-assets/nextjs/defaults/root/css/media.css +81 -0
- package/compiler-assets/nextjs/defaults/root/css/radius.css +49 -0
- package/compiler-assets/nextjs/defaults/root/css/scrollbar.css +43 -0
- package/compiler-assets/nextjs/defaults/root/css/shadow.css +145 -0
- package/compiler-assets/nextjs/defaults/root/css/typography.css +607 -0
- package/compiler-assets/nextjs/defaults/root/css/zindex.css +39 -0
- package/compiler-assets/nextjs/defaults/root/globals.css +191 -0
- package/compiler-assets/nextjs/defaults/root/layout.tsx +19 -0
- package/compiler-assets/nextjs/defaults/root/page.tsx +61 -0
- package/compiler-assets/nextjs/defaults/root/theme.css +50 -0
- package/compiler-assets/nextjs/defaults/source/_internal/logger.ts +21 -0
- package/compiler-assets/nextjs/shims/generated-group-layout.tsx +19 -0
- package/compiler-assets/nextjs/shims/generated-group-page.tsx +18 -0
- package/compiler-assets/nextjs/shims/generated-leaf-page.tsx +21 -0
- package/compiler-assets/nextjs/shims/global-layout.tsx +134 -0
- package/compiler-assets/nextjs/shims/markdown-route.ts +29 -0
- package/compiler-assets/nextjs/shims/og-image-route.ts +18 -0
- package/compiler-assets/nextjs/shims/powered-by-footer.tsx +40 -0
- package/compiler-assets/nextjs/shims/providers.tsx +13 -0
- package/compiler-assets/nextjs/shims/proxy.ts +317 -0
- package/compiler-assets/nextjs/shims/publish-os-theme-provider.tsx +77 -0
- package/compiler-assets/nextjs/shims/root-page.tsx +13 -0
- package/compiler-assets/nextjs/shims/theme-defaults.css +177 -0
- package/dist/{kernel/components/ui/button.d.cts → button-CFdx-ohV.d.ts} +1 -3
- package/dist/cache/tags.js +6 -14
- package/dist/compiler.d.ts +100 -0
- package/dist/compiler.js +13379 -0
- package/dist/config/createNextConfig.d.ts +2 -1
- package/dist/config/createNextConfig.js +16 -12
- package/dist/icons.d.ts +1 -0
- package/dist/icons.js +2 -0
- package/dist/index.d.ts +303 -15
- package/dist/index.js +30 -1196
- package/dist/kernel/components/blocks/AgentActions.d.ts +9 -3
- package/dist/kernel/components/blocks/AgentActions.js +114 -200
- package/dist/kernel/components/blocks/animated-icon-swap.js +4 -25
- package/dist/kernel/components/blocks/color-palette.js +107 -157
- package/dist/kernel/components/blocks/design-system-preview.d.ts +38 -6
- package/dist/kernel/components/blocks/design-system-preview.js +44 -52
- package/dist/kernel/components/blocks/link-playground.js +23 -71
- package/dist/kernel/components/blocks/logo-block.js +19 -48
- package/dist/kernel/components/blocks/nav-breadcrumb.d.ts +1 -1
- package/dist/kernel/components/blocks/nav-breadcrumb.js +28 -52
- package/dist/kernel/components/blocks/navbar.d.ts +1 -1
- package/dist/kernel/components/blocks/navbar.js +14 -41
- package/dist/kernel/components/blocks/navigation-progress-playground.js +56 -149
- package/dist/kernel/components/blocks/navigation-progress.js +53 -157
- package/dist/kernel/components/blocks/next-prev.d.ts +1 -1
- package/dist/kernel/components/blocks/next-prev.js +16 -42
- package/dist/kernel/components/blocks/page-list.d.ts +1 -1
- package/dist/kernel/components/blocks/page-list.js +11 -16
- package/dist/kernel/components/blocks/search.d.ts +13 -2
- package/dist/kernel/components/blocks/search.js +116 -247
- package/dist/kernel/components/blocks/sidebar-node.d.ts +2 -2
- package/dist/kernel/components/blocks/sidebar-node.js +56 -95
- package/dist/kernel/components/blocks/sidebar.d.ts +5 -23
- package/dist/kernel/components/blocks/sidebar.js +35 -103
- package/dist/kernel/components/blocks/theme-toggle.d.ts +7 -3
- package/dist/kernel/components/blocks/theme-toggle.js +2 -2
- package/dist/kernel/components/blocks/toc.js +42 -178
- package/dist/kernel/components/mdx/components/blockquote.js +3 -24
- package/dist/kernel/components/mdx/components/callout.d.ts +1 -1
- package/dist/kernel/components/mdx/components/callout.js +15 -47
- package/dist/kernel/components/mdx/components/code-block.js +2 -2
- package/dist/kernel/components/mdx/components/figure-caption.js +6 -24
- package/dist/kernel/components/mdx/components/figure.js +9 -36
- package/dist/kernel/components/mdx/components/footnotes.js +3 -24
- package/dist/kernel/components/mdx/components/heading-copy-link.js +13 -37
- package/dist/kernel/components/mdx/components/heading.d.ts +8 -3
- package/dist/kernel/components/mdx/components/heading.js +32 -116
- package/dist/kernel/components/mdx/components/hr.d.ts +5 -3
- package/dist/kernel/components/mdx/components/hr.js +2 -2
- package/dist/kernel/components/mdx/components/image-zoom.js +2 -3
- package/dist/kernel/components/mdx/components/image.js +23 -63
- package/dist/kernel/components/mdx/components/inline-code.js +3 -24
- package/dist/kernel/components/mdx/components/kbd.d.ts +9 -4
- package/dist/kernel/components/mdx/components/kbd.js +2 -2
- package/dist/kernel/components/mdx/components/link.d.ts +1 -2
- package/dist/kernel/components/mdx/components/link.js +2 -2
- package/dist/kernel/components/mdx/components/paragraph.js +13 -41
- package/dist/kernel/components/mdx/components/pre.js +3 -24
- package/dist/kernel/components/mdx/components/strikethrough.js +6 -24
- package/dist/kernel/components/mdx/components/table.js +2 -2
- package/dist/kernel/components/mdx/components/task-list.js +6 -28
- package/dist/kernel/components/mdx/components/video-player.js +53 -88
- package/dist/kernel/components/mdx/components/video.js +27 -75
- package/dist/kernel/components/mdx/error-boundary.d.ts +1 -1
- package/dist/kernel/components/mdx/error-boundary.js +12 -15
- package/dist/kernel/components/mdx/error-fallback.js +4 -4
- package/dist/kernel/components/mdx/mdx.d.ts +68 -11
- package/dist/kernel/components/mdx/mdx.js +29 -29
- package/dist/kernel/components/mdx/rehype-heading-ids.js +11 -67
- package/dist/kernel/components/mdx/types.d.ts +1 -1
- package/dist/kernel/components/ui/accordion.js +3 -26
- package/dist/kernel/components/ui/breadcrumb-trail.d.ts +26 -8
- package/dist/kernel/components/ui/breadcrumb-trail.js +32 -79
- package/dist/kernel/components/ui/breadcrumb.d.ts +2 -6
- package/dist/kernel/components/ui/breadcrumb.js +21 -70
- package/dist/kernel/components/ui/button-group.d.ts +4 -3
- package/dist/kernel/components/ui/button-group.js +7 -30
- package/dist/kernel/components/ui/button.js +13 -36
- package/dist/kernel/components/ui/card.d.ts +2 -2
- package/dist/kernel/components/ui/card.js +2 -23
- package/dist/kernel/components/ui/dialog.d.ts +9 -9
- package/dist/kernel/components/ui/dialog.js +15 -33
- package/dist/kernel/components/ui/drawer.d.ts +10 -10
- package/dist/kernel/components/ui/drawer.js +15 -33
- package/dist/kernel/components/ui/input.js +6 -30
- package/dist/kernel/components/ui/kbd.js +10 -31
- package/dist/kernel/components/ui/link.d.ts +1 -1
- package/dist/kernel/components/ui/link.js +53 -104
- package/dist/kernel/components/ui/menu.d.ts +21 -21
- package/dist/kernel/components/ui/menu.js +14 -36
- package/dist/kernel/components/ui/meta-key.d.ts +9 -4
- package/dist/kernel/components/ui/meta-key.js +2 -2
- package/dist/kernel/components/ui/navigation-menu.d.ts +14 -14
- package/dist/kernel/components/ui/navigation-menu.js +9 -30
- package/dist/kernel/components/ui/popover.d.ts +10 -10
- package/dist/kernel/components/ui/popover.js +13 -34
- package/dist/kernel/components/ui/progress.js +2 -25
- package/dist/kernel/components/ui/scroll-area.js +39 -118
- package/dist/kernel/components/ui/select.d.ts +15 -15
- package/dist/kernel/components/ui/select.js +19 -35
- package/dist/kernel/components/ui/separator.js +2 -25
- package/dist/kernel/components/ui/table.js +2 -23
- package/dist/kernel/components/ui/tabs.js +39 -99
- package/dist/kernel/components/ui/tag.d.ts +2 -2
- package/dist/kernel/components/ui/tag.js +4 -25
- package/dist/kernel/components/ui/text.d.ts +2 -2
- package/dist/kernel/components/ui/text.js +112 -131
- package/dist/kernel/components/ui/theme-toggle.d.ts +18 -4
- package/dist/kernel/components/ui/theme-toggle.js +18 -44
- package/dist/kernel/components/ui/toast.d.ts +10 -10
- package/dist/kernel/components/ui/toast.js +13 -35
- package/dist/kernel/components/ui/tooltip.d.ts +8 -8
- package/dist/kernel/components/ui/tooltip.js +9 -30
- package/dist/kernel/defaults.registry.d.ts +61 -70
- package/dist/kernel/defaults.registry.js +61 -69
- package/dist/kernel/framework-icons.d.ts +1 -0
- package/dist/kernel/framework-icons.js +39 -0
- package/dist/kernel/routes/agent/markdown.js +36 -65
- package/dist/kernel/routes/layouts/group.d.ts +1 -1
- package/dist/kernel/routes/layouts/group.js +20 -109
- package/dist/kernel/routes/metadata/feed.d.ts +1 -2
- package/dist/kernel/routes/metadata/feed.js +46 -127
- package/dist/kernel/routes/metadata/llms.d.ts +1 -2
- package/dist/kernel/routes/metadata/llms.js +42 -120
- package/dist/kernel/routes/metadata/og-image.d.ts +11 -1
- package/dist/kernel/routes/metadata/og-image.js +264 -198
- package/dist/kernel/routes/metadata/robots.d.ts +1 -2
- package/dist/kernel/routes/metadata/robots.js +21 -90
- package/dist/kernel/routes/metadata/sitemap.d.ts +1 -2
- package/dist/kernel/routes/metadata/sitemap.js +36 -102
- package/dist/kernel/routes/pages/group.d.ts +1 -1
- package/dist/kernel/routes/pages/group.js +42 -137
- package/dist/kernel/routes/pages/leaf.d.ts +1 -1
- package/dist/kernel/routes/pages/leaf.js +74 -213
- package/dist/kernel/routes/pages/root.d.ts +1 -1
- package/dist/kernel/routes/pages/root.js +37 -108
- package/dist/keyboard-shortcuts.js +69 -141
- package/dist/{kernel/components/ui/link.d.cts → link-CYaCRDb6.d.ts} +9 -5
- package/dist/resolvers/manifest-resolver.d.ts +3 -3
- package/dist/resolvers/manifest-resolver.js +15 -21
- package/dist/{kernel/routes/metadata/og-image.d.cts → route-metadata-og-image-BeKKFHg7.d.ts} +12 -16
- package/dist/search.d.ts +81 -4
- package/dist/search.js +124 -195
- package/dist/{kernel/components/blocks/sidebar.d.cts → sidebar-types-Bgchdfd6.d.ts} +2 -10
- package/dist/theme-scope.d.ts +15 -0
- package/dist/theme-scope.js +23 -0
- package/dist/types-B_b3C0U6.d.ts +63 -0
- package/dist/types-CIwwieNw.d.ts +127 -0
- package/dist/types-DHBm7-j6.d.ts +57 -0
- package/dist/types-sM2g9nW0.d.ts +12 -0
- package/dist/types.d.ts +0 -1
- package/dist/types.js +1 -1
- package/dist/utils/cn.d.ts +5 -9
- package/dist/utils/cn.js +13 -7
- package/dist/utils/heading-ids.js +20 -47
- package/dist/utils/pretty-date.js +7 -13
- package/init/seed/minimal/publish.os/assets/logo/publish-dev-logo.dark.png +0 -0
- package/init/seed/minimal/publish.os/assets/logo/publish-dev-logo.png +0 -0
- package/init/seed/minimal/publish.os/docs/content/get-started.mdx +54 -0
- package/init/seed/minimal/publish.os/docs/content/groups.mdx +31 -0
- package/init/seed/minimal/publish.os/docs/content/theme.mdx +64 -0
- package/init/seed/minimal/publish.os/publish.os.config.json +21 -0
- package/init/seed/minimal/publish.os/theme.css +47 -0
- package/init/seed/minimal/seed.json +13 -0
- package/package.json +470 -40
- package/release/{package.json → app/lucide/package.json} +14 -7
- package/release/app/lucide/pnpm-lock.yaml.template +2905 -0
- package/release/app/lucide/pnpm-workspace.yaml +11 -0
- package/release/app/phosphor/package.json +30 -0
- package/release/app/phosphor/pnpm-lock.yaml.template +2908 -0
- package/release/app/phosphor/pnpm-workspace.yaml +11 -0
- package/release/app/tabler/package.json +30 -0
- package/release/app/tabler/pnpm-lock.yaml.template +2911 -0
- package/release/app/tabler/pnpm-workspace.yaml +11 -0
- package/release/compiler/package.json +20 -0
- package/release/compiler/pnpm-lock.yaml.template +2432 -0
- package/release/compiler/pnpm-workspace.yaml +11 -0
- package/release/release.json +31 -7
- package/dist/cache/tags.cjs +0 -79
- package/dist/cache/tags.d.cts +0 -13
- package/dist/config/createNextConfig.cjs +0 -52
- package/dist/config/createNextConfig.d.cts +0 -8
- package/dist/config.cjs +0 -78
- package/dist/config.d.cts +0 -101
- package/dist/config.d.ts +0 -101
- package/dist/config.js +0 -48
- package/dist/index.cjs +0 -1266
- package/dist/index.d.cts +0 -18
- package/dist/kernel/components/blocks/AgentActions.cjs +0 -425
- package/dist/kernel/components/blocks/AgentActions.d.cts +0 -52
- package/dist/kernel/components/blocks/animated-icon-swap.cjs +0 -101
- package/dist/kernel/components/blocks/animated-icon-swap.d.cts +0 -16
- package/dist/kernel/components/blocks/color-palette.cjs +0 -413
- package/dist/kernel/components/blocks/color-palette.d.cts +0 -7
- package/dist/kernel/components/blocks/design-system-preview.cjs +0 -593
- package/dist/kernel/components/blocks/design-system-preview.d.cts +0 -29
- package/dist/kernel/components/blocks/link-playground.cjs +0 -816
- package/dist/kernel/components/blocks/link-playground.d.cts +0 -5
- package/dist/kernel/components/blocks/logo-block.cjs +0 -156
- package/dist/kernel/components/blocks/logo-block.d.cts +0 -21
- package/dist/kernel/components/blocks/nav-breadcrumb.cjs +0 -122
- package/dist/kernel/components/blocks/nav-breadcrumb.d.cts +0 -11
- package/dist/kernel/components/blocks/navbar.cjs +0 -154
- package/dist/kernel/components/blocks/navbar.d.cts +0 -16
- package/dist/kernel/components/blocks/navigation-progress-playground.cjs +0 -735
- package/dist/kernel/components/blocks/navigation-progress-playground.d.cts +0 -5
- package/dist/kernel/components/blocks/navigation-progress.cjs +0 -270
- package/dist/kernel/components/blocks/navigation-progress.d.cts +0 -16
- package/dist/kernel/components/blocks/next-prev.cjs +0 -142
- package/dist/kernel/components/blocks/next-prev.d.cts +0 -11
- package/dist/kernel/components/blocks/page-list.cjs +0 -59
- package/dist/kernel/components/blocks/page-list.d.cts +0 -11
- package/dist/kernel/components/blocks/search.cjs +0 -717
- package/dist/kernel/components/blocks/search.d.cts +0 -77
- package/dist/kernel/components/blocks/sidebar-node.cjs +0 -309
- package/dist/kernel/components/blocks/sidebar-node.d.cts +0 -8
- package/dist/kernel/components/blocks/sidebar.cjs +0 -317
- package/dist/kernel/components/blocks/theme-toggle.cjs +0 -31
- package/dist/kernel/components/blocks/theme-toggle.d.cts +0 -6
- package/dist/kernel/components/blocks/toc.cjs +0 -356
- package/dist/kernel/components/blocks/toc.d.cts +0 -10
- package/dist/kernel/components/mdx/components/blockquote.cjs +0 -66
- package/dist/kernel/components/mdx/components/blockquote.d.cts +0 -6
- package/dist/kernel/components/mdx/components/callout.cjs +0 -137
- package/dist/kernel/components/mdx/components/callout.d.cts +0 -18
- package/dist/kernel/components/mdx/components/code-block.cjs +0 -39
- package/dist/kernel/components/mdx/components/code-block.d.cts +0 -9
- package/dist/kernel/components/mdx/components/figure-caption.cjs +0 -63
- package/dist/kernel/components/mdx/components/figure-caption.d.cts +0 -6
- package/dist/kernel/components/mdx/components/figure.cjs +0 -78
- package/dist/kernel/components/mdx/components/figure.d.cts +0 -10
- package/dist/kernel/components/mdx/components/footnotes.cjs +0 -66
- package/dist/kernel/components/mdx/components/footnotes.d.cts +0 -6
- package/dist/kernel/components/mdx/components/heading-copy-link.cjs +0 -108
- package/dist/kernel/components/mdx/components/heading-copy-link.d.cts +0 -23
- package/dist/kernel/components/mdx/components/heading.cjs +0 -166
- package/dist/kernel/components/mdx/components/heading.d.cts +0 -8
- package/dist/kernel/components/mdx/components/hr.cjs +0 -34
- package/dist/kernel/components/mdx/components/hr.d.cts +0 -9
- package/dist/kernel/components/mdx/components/image-zoom.cjs +0 -49
- package/dist/kernel/components/mdx/components/image-zoom.d.cts +0 -10
- package/dist/kernel/components/mdx/components/image.cjs +0 -192
- package/dist/kernel/components/mdx/components/image.d.cts +0 -21
- package/dist/kernel/components/mdx/components/inline-code.cjs +0 -66
- package/dist/kernel/components/mdx/components/inline-code.d.cts +0 -6
- package/dist/kernel/components/mdx/components/kbd.cjs +0 -34
- package/dist/kernel/components/mdx/components/kbd.d.cts +0 -10
- package/dist/kernel/components/mdx/components/link.cjs +0 -49
- package/dist/kernel/components/mdx/components/link.d.cts +0 -11
- package/dist/kernel/components/mdx/components/paragraph.cjs +0 -87
- package/dist/kernel/components/mdx/components/paragraph.d.cts +0 -5
- package/dist/kernel/components/mdx/components/pre.cjs +0 -66
- package/dist/kernel/components/mdx/components/pre.d.cts +0 -6
- package/dist/kernel/components/mdx/components/strikethrough.cjs +0 -63
- package/dist/kernel/components/mdx/components/strikethrough.d.cts +0 -6
- package/dist/kernel/components/mdx/components/table.cjs +0 -59
- package/dist/kernel/components/mdx/components/table.d.cts +0 -10
- package/dist/kernel/components/mdx/components/task-list.cjs +0 -88
- package/dist/kernel/components/mdx/components/task-list.d.cts +0 -8
- package/dist/kernel/components/mdx/components/video-player.cjs +0 -173
- package/dist/kernel/components/mdx/components/video-player.d.cts +0 -18
- package/dist/kernel/components/mdx/components/video.cjs +0 -185
- package/dist/kernel/components/mdx/components/video.d.cts +0 -15
- package/dist/kernel/components/mdx/error-boundary.cjs +0 -62
- package/dist/kernel/components/mdx/error-boundary.d.cts +0 -8
- package/dist/kernel/components/mdx/error-fallback.cjs +0 -58
- package/dist/kernel/components/mdx/error-fallback.d.cts +0 -9
- package/dist/kernel/components/mdx/mdx.cjs +0 -141
- package/dist/kernel/components/mdx/mdx.d.cts +0 -22
- package/dist/kernel/components/mdx/rehype-heading-ids.cjs +0 -113
- package/dist/kernel/components/mdx/rehype-heading-ids.d.cts +0 -10
- package/dist/kernel/components/mdx/types.cjs +0 -18
- package/dist/kernel/components/mdx/types.d.cts +0 -18
- package/dist/kernel/components/ui/accordion.cjs +0 -104
- package/dist/kernel/components/ui/accordion.d.cts +0 -16
- package/dist/kernel/components/ui/breadcrumb-trail.cjs +0 -238
- package/dist/kernel/components/ui/breadcrumb-trail.d.cts +0 -13
- package/dist/kernel/components/ui/breadcrumb.cjs +0 -399
- package/dist/kernel/components/ui/breadcrumb.d.cts +0 -52
- package/dist/kernel/components/ui/button-group.cjs +0 -143
- package/dist/kernel/components/ui/button-group.d.cts +0 -19
- package/dist/kernel/components/ui/button.cjs +0 -139
- package/dist/kernel/components/ui/card.cjs +0 -133
- package/dist/kernel/components/ui/card.d.cts +0 -17
- package/dist/kernel/components/ui/dialog.cjs +0 -149
- package/dist/kernel/components/ui/dialog.d.cts +0 -22
- package/dist/kernel/components/ui/drawer.cjs +0 -163
- package/dist/kernel/components/ui/drawer.d.cts +0 -24
- package/dist/kernel/components/ui/input.cjs +0 -96
- package/dist/kernel/components/ui/input.d.cts +0 -18
- package/dist/kernel/components/ui/kbd.cjs +0 -105
- package/dist/kernel/components/ui/kbd.d.cts +0 -13
- package/dist/kernel/components/ui/link.cjs +0 -253
- package/dist/kernel/components/ui/menu.cjs +0 -301
- package/dist/kernel/components/ui/menu.d.cts +0 -70
- package/dist/kernel/components/ui/meta-key.cjs +0 -34
- package/dist/kernel/components/ui/meta-key.d.cts +0 -12
- package/dist/kernel/components/ui/navigation-menu.cjs +0 -253
- package/dist/kernel/components/ui/navigation-menu.d.cts +0 -47
- package/dist/kernel/components/ui/popover.cjs +0 -168
- package/dist/kernel/components/ui/popover.d.cts +0 -24
- package/dist/kernel/components/ui/progress.cjs +0 -112
- package/dist/kernel/components/ui/progress.d.cts +0 -16
- package/dist/kernel/components/ui/scroll-area.cjs +0 -413
- package/dist/kernel/components/ui/scroll-area.d.cts +0 -58
- package/dist/kernel/components/ui/select.cjs +0 -244
- package/dist/kernel/components/ui/select.d.cts +0 -40
- package/dist/kernel/components/ui/separator.cjs +0 -73
- package/dist/kernel/components/ui/separator.d.cts +0 -8
- package/dist/kernel/components/ui/table.cjs +0 -131
- package/dist/kernel/components/ui/table.d.cts +0 -11
- package/dist/kernel/components/ui/tabs.cjs +0 -450
- package/dist/kernel/components/ui/tabs.d.cts +0 -82
- package/dist/kernel/components/ui/tag.cjs +0 -104
- package/dist/kernel/components/ui/tag.d.cts +0 -14
- package/dist/kernel/components/ui/text.cjs +0 -184
- package/dist/kernel/components/ui/text.d.cts +0 -17
- package/dist/kernel/components/ui/theme-toggle.cjs +0 -108
- package/dist/kernel/components/ui/theme-toggle.d.cts +0 -10
- package/dist/kernel/components/ui/toast.cjs +0 -154
- package/dist/kernel/components/ui/toast.d.cts +0 -26
- package/dist/kernel/components/ui/tooltip.cjs +0 -127
- package/dist/kernel/components/ui/tooltip.d.cts +0 -20
- package/dist/kernel/defaults.registry.cjs +0 -541
- package/dist/kernel/defaults.registry.d.cts +0 -469
- package/dist/kernel/routes/agent/markdown.cjs +0 -202
- package/dist/kernel/routes/agent/markdown.d.cts +0 -58
- package/dist/kernel/routes/layouts/group.cjs +0 -181
- package/dist/kernel/routes/layouts/group.d.cts +0 -20
- package/dist/kernel/routes/metadata/feed.cjs +0 -293
- package/dist/kernel/routes/metadata/feed.d.cts +0 -20
- package/dist/kernel/routes/metadata/llms.cjs +0 -239
- package/dist/kernel/routes/metadata/llms.d.cts +0 -26
- package/dist/kernel/routes/metadata/og-image.cjs +0 -630
- package/dist/kernel/routes/metadata/robots.cjs +0 -148
- package/dist/kernel/routes/metadata/robots.d.cts +0 -6
- package/dist/kernel/routes/metadata/sitemap.cjs +0 -192
- package/dist/kernel/routes/metadata/sitemap.d.cts +0 -8
- package/dist/kernel/routes/pages/group.cjs +0 -263
- package/dist/kernel/routes/pages/group.d.cts +0 -17
- package/dist/kernel/routes/pages/leaf.cjs +0 -421
- package/dist/kernel/routes/pages/leaf.d.cts +0 -36
- package/dist/kernel/routes/pages/root.cjs +0 -229
- package/dist/kernel/routes/pages/root.d.cts +0 -16
- package/dist/keyboard-shortcuts.cjs +0 -345
- package/dist/keyboard-shortcuts.d.cts +0 -34
- package/dist/resolvers/manifest-resolver.cjs +0 -111
- package/dist/resolvers/manifest-resolver.d.cts +0 -13
- package/dist/search.cjs +0 -411
- package/dist/search.d.cts +0 -20
- package/dist/types.cjs +0 -30
- package/dist/types.d.cts +0 -269
- package/dist/utils/cn.cjs +0 -49
- package/dist/utils/cn.d.cts +0 -15
- package/dist/utils/heading-ids.cjs +0 -119
- package/dist/utils/heading-ids.d.cts +0 -15
- package/dist/utils/pretty-date.cjs +0 -55
- package/dist/utils/pretty-date.d.cts +0 -6
- package/release/pnpm-lock.yaml +0 -1215
|
@@ -1,735 +0,0 @@
|
|
|
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: "soft", 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: "soft", 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
|
-
});
|