@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,31 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
|
-
// src/
|
|
3
|
+
// src/components/ui/navigation-menu.tsx
|
|
4
4
|
import { NavigationMenu as BaseNavigationMenu } from "@base-ui/react/navigation-menu";
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
import { clsx } from "clsx";
|
|
8
|
-
import { extendTailwindMerge } from "tailwind-merge";
|
|
9
|
-
var twMerge = extendTailwindMerge({
|
|
10
|
-
extend: {
|
|
11
|
-
classGroups: {
|
|
12
|
-
z: [
|
|
13
|
-
"z-content",
|
|
14
|
-
"z-nav",
|
|
15
|
-
"z-overlay",
|
|
16
|
-
"z-modal",
|
|
17
|
-
"z-search",
|
|
18
|
-
"z-toast",
|
|
19
|
-
"z-progress"
|
|
20
|
-
]
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
});
|
|
24
|
-
function cn(...inputs) {
|
|
25
|
-
return twMerge(clsx(inputs));
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
// src/kernel/components/ui/navigation-menu.tsx
|
|
5
|
+
import { useThemeScope } from "@publish.os/nextjs/theme-scope";
|
|
6
|
+
import { cn } from "@publish.os/nextjs/utils/cn";
|
|
29
7
|
import { jsx } from "react/jsx-runtime";
|
|
30
8
|
function NavigationMenuRoot({
|
|
31
9
|
className,
|
|
@@ -54,7 +32,7 @@ function NavigationMenuItem(props) {
|
|
|
54
32
|
var navigationMenuTriggerClassName = [
|
|
55
33
|
"inline-flex shrink-0 select-none items-center justify-center gap-2 whitespace-nowrap rounded-button px-3 py-1.5 text-sm font-medium leading-none text-foreground-2 outline-none transition-colors duration-150 ease-out",
|
|
56
34
|
"hover:bg-surface-hover hover:text-foreground-1 active:bg-surface-active data-[popup-open]:bg-surface-active data-[popup-open]:text-foreground-1",
|
|
57
|
-
"focus-visible:outline-2 focus-visible:outline-offset-0 focus-visible:outline-focus-
|
|
35
|
+
"focus-visible:outline-2 focus-visible:outline-offset-0 focus-visible:outline-focus-stroke disabled:pointer-events-none disabled:opacity-50 data-disabled:pointer-events-none data-disabled:opacity-50",
|
|
58
36
|
"[&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0"
|
|
59
37
|
].join(" ");
|
|
60
38
|
function NavigationMenuTrigger({
|
|
@@ -105,7 +83,7 @@ function NavigationMenuLink({
|
|
|
105
83
|
{
|
|
106
84
|
className: cn(
|
|
107
85
|
navigationMenuTriggerClassName,
|
|
108
|
-
"!no-underline hover:!no-underline active:!no-underline data-active:bg-surface
|
|
86
|
+
"!no-underline hover:!no-underline active:!no-underline data-active:bg-navigation-menu-highlight-surface data-active:text-navigation-menu-highlight-foreground data-[state=path-active]:bg-navigation-menu-highlight-surface data-[state=path-active]:text-navigation-menu-highlight-foreground",
|
|
109
87
|
className
|
|
110
88
|
),
|
|
111
89
|
...props
|
|
@@ -125,7 +103,8 @@ function NavigationMenuBackdrop({
|
|
|
125
103
|
);
|
|
126
104
|
}
|
|
127
105
|
function NavigationMenuPortal(props) {
|
|
128
|
-
|
|
106
|
+
let themeScope = useThemeScope();
|
|
107
|
+
return /* @__PURE__ */ jsx(BaseNavigationMenu.Portal, { ...props, ...themeScope });
|
|
129
108
|
}
|
|
130
109
|
function NavigationMenuPositioner({
|
|
131
110
|
className,
|
|
@@ -149,7 +128,7 @@ function NavigationMenuPopup({
|
|
|
149
128
|
BaseNavigationMenu.Popup,
|
|
150
129
|
{
|
|
151
130
|
className: cn(
|
|
152
|
-
"animate-popup min-w-56 rounded-popup border border-
|
|
131
|
+
"animate-popup min-w-56 rounded-popup border border-navigation-menu-stroke-3 bg-navigation-menu-surface-1 p-2 text-navigation-menu-foreground-1 shadow-navigation-menu outline-none [--text-foreground:var(--navigation-menu-foreground-1)] [--text-muted-foreground:var(--navigation-menu-foreground-4)]",
|
|
153
132
|
className
|
|
154
133
|
),
|
|
155
134
|
...props
|
|
@@ -176,7 +155,7 @@ function NavigationMenuArrow({
|
|
|
176
155
|
BaseNavigationMenu.Arrow,
|
|
177
156
|
{
|
|
178
157
|
className: cn(
|
|
179
|
-
"size-2 rotate-45 border border-
|
|
158
|
+
"size-2 rotate-45 border border-navigation-menu-stroke-3 bg-navigation-menu-surface-1",
|
|
180
159
|
className
|
|
181
160
|
),
|
|
182
161
|
...props
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import { Popover as Popover$1 } from '@base-ui/react/popover';
|
|
3
|
-
import {
|
|
3
|
+
import { ComponentPropsWithRef } from 'react';
|
|
4
4
|
|
|
5
|
-
type PopoverProps =
|
|
6
|
-
type PopoverTriggerProps =
|
|
7
|
-
type PopoverPortalProps =
|
|
8
|
-
type PopoverPositionerProps =
|
|
9
|
-
type PopoverPopupProps =
|
|
10
|
-
type PopoverTitleProps =
|
|
11
|
-
type PopoverDescriptionProps =
|
|
12
|
-
type PopoverCloseProps =
|
|
13
|
-
type PopoverArrowProps =
|
|
5
|
+
type PopoverProps = ComponentPropsWithRef<typeof Popover$1.Root>;
|
|
6
|
+
type PopoverTriggerProps = ComponentPropsWithRef<typeof Popover$1.Trigger>;
|
|
7
|
+
type PopoverPortalProps = ComponentPropsWithRef<typeof Popover$1.Portal>;
|
|
8
|
+
type PopoverPositionerProps = ComponentPropsWithRef<typeof Popover$1.Positioner>;
|
|
9
|
+
type PopoverPopupProps = ComponentPropsWithRef<typeof Popover$1.Popup>;
|
|
10
|
+
type PopoverTitleProps = ComponentPropsWithRef<typeof Popover$1.Title>;
|
|
11
|
+
type PopoverDescriptionProps = ComponentPropsWithRef<typeof Popover$1.Description>;
|
|
12
|
+
type PopoverCloseProps = ComponentPropsWithRef<typeof Popover$1.Close>;
|
|
13
|
+
type PopoverArrowProps = ComponentPropsWithRef<typeof Popover$1.Arrow>;
|
|
14
14
|
declare function Popover(props: PopoverProps): react_jsx_runtime.JSX.Element;
|
|
15
15
|
declare function PopoverTrigger({ className, ...props }: PopoverTriggerProps): react_jsx_runtime.JSX.Element;
|
|
16
16
|
declare function PopoverPortal(props: PopoverPortalProps): react_jsx_runtime.JSX.Element;
|
|
@@ -1,31 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
|
-
// src/
|
|
3
|
+
// src/components/ui/popover.tsx
|
|
4
4
|
import { Popover as BasePopover } from "@base-ui/react/popover";
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
import { clsx } from "clsx";
|
|
8
|
-
import { extendTailwindMerge } from "tailwind-merge";
|
|
9
|
-
var twMerge = extendTailwindMerge({
|
|
10
|
-
extend: {
|
|
11
|
-
classGroups: {
|
|
12
|
-
z: [
|
|
13
|
-
"z-content",
|
|
14
|
-
"z-nav",
|
|
15
|
-
"z-overlay",
|
|
16
|
-
"z-modal",
|
|
17
|
-
"z-search",
|
|
18
|
-
"z-toast",
|
|
19
|
-
"z-progress"
|
|
20
|
-
]
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
});
|
|
24
|
-
function cn(...inputs) {
|
|
25
|
-
return twMerge(clsx(inputs));
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
// src/kernel/components/ui/popover.tsx
|
|
5
|
+
import { useThemeScope } from "@publish.os/nextjs/theme-scope";
|
|
6
|
+
import { cn } from "@publish.os/nextjs/utils/cn";
|
|
29
7
|
import { jsx } from "react/jsx-runtime";
|
|
30
8
|
function Popover(props) {
|
|
31
9
|
return /* @__PURE__ */ jsx(BasePopover.Root, { ...props });
|
|
@@ -35,7 +13,7 @@ function PopoverTrigger({ className, ...props }) {
|
|
|
35
13
|
BasePopover.Trigger,
|
|
36
14
|
{
|
|
37
15
|
className: cn(
|
|
38
|
-
"rounded-button focus-visible:outline-2 focus-visible:outline-offset-0 focus-visible:outline-focus-
|
|
16
|
+
"rounded-button focus-visible:outline-2 focus-visible:outline-offset-0 focus-visible:outline-focus-stroke",
|
|
39
17
|
className
|
|
40
18
|
),
|
|
41
19
|
...props
|
|
@@ -43,7 +21,8 @@ function PopoverTrigger({ className, ...props }) {
|
|
|
43
21
|
);
|
|
44
22
|
}
|
|
45
23
|
function PopoverPortal(props) {
|
|
46
|
-
|
|
24
|
+
let themeScope = useThemeScope();
|
|
25
|
+
return /* @__PURE__ */ jsx(BasePopover.Portal, { ...props, ...themeScope });
|
|
47
26
|
}
|
|
48
27
|
function PopoverPositioner({
|
|
49
28
|
className,
|
|
@@ -53,7 +32,7 @@ function PopoverPositioner({
|
|
|
53
32
|
return /* @__PURE__ */ jsx(
|
|
54
33
|
BasePopover.Positioner,
|
|
55
34
|
{
|
|
56
|
-
className: cn("z-
|
|
35
|
+
className: cn("z-overlay outline-none", className),
|
|
57
36
|
sideOffset,
|
|
58
37
|
...props
|
|
59
38
|
}
|
|
@@ -64,7 +43,7 @@ function PopoverPopup({ className, ...props }) {
|
|
|
64
43
|
BasePopover.Popup,
|
|
65
44
|
{
|
|
66
45
|
className: cn(
|
|
67
|
-
"animate-popup w-72 rounded-popup border border-
|
|
46
|
+
"animate-popup w-72 rounded-popup border border-popover-stroke-3 bg-popover-surface-1 p-4 text-popover-foreground-1 shadow-popover outline-none [--text-foreground:var(--popover-foreground-1)] [--text-muted-foreground:var(--popover-foreground-4)]",
|
|
68
47
|
className
|
|
69
48
|
),
|
|
70
49
|
...props
|
|
@@ -76,7 +55,7 @@ function PopoverTitle({ className, ...props }) {
|
|
|
76
55
|
BasePopover.Title,
|
|
77
56
|
{
|
|
78
57
|
className: cn(
|
|
79
|
-
"text-sm font-semibold text-
|
|
58
|
+
"text-sm font-semibold text-popover-foreground-1",
|
|
80
59
|
className
|
|
81
60
|
),
|
|
82
61
|
...props
|
|
@@ -91,7 +70,7 @@ function PopoverDescription({
|
|
|
91
70
|
BasePopover.Description,
|
|
92
71
|
{
|
|
93
72
|
className: cn(
|
|
94
|
-
"mt-1 text-sm leading-6 text-
|
|
73
|
+
"mt-1 text-sm leading-6 text-popover-foreground-4",
|
|
95
74
|
className
|
|
96
75
|
),
|
|
97
76
|
...props
|
|
@@ -103,8 +82,8 @@ function PopoverClose({ className, ...props }) {
|
|
|
103
82
|
BasePopover.Close,
|
|
104
83
|
{
|
|
105
84
|
className: cn(
|
|
106
|
-
"inline-flex size-8 items-center justify-center rounded-button text-
|
|
107
|
-
"focus-visible:outline-2 focus-visible:outline-offset-0 focus-visible:outline-focus-
|
|
85
|
+
"inline-flex size-8 items-center justify-center rounded-button text-popover-foreground-4 transition-colors hover:bg-popover-surface-3 hover:text-popover-foreground-1",
|
|
86
|
+
"focus-visible:outline-2 focus-visible:outline-offset-0 focus-visible:outline-focus-stroke",
|
|
108
87
|
className
|
|
109
88
|
),
|
|
110
89
|
...props
|
|
@@ -116,7 +95,7 @@ function PopoverArrow({ className, ...props }) {
|
|
|
116
95
|
BasePopover.Arrow,
|
|
117
96
|
{
|
|
118
97
|
className: cn(
|
|
119
|
-
"size-2 rotate-45 border border-
|
|
98
|
+
"size-2 rotate-45 border border-popover-stroke-3 bg-popover-surface-1",
|
|
120
99
|
className
|
|
121
100
|
),
|
|
122
101
|
...props
|
|
@@ -1,31 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
|
-
// src/
|
|
3
|
+
// src/components/ui/progress.tsx
|
|
4
4
|
import { Progress as BaseProgress } from "@base-ui/react/progress";
|
|
5
|
-
|
|
6
|
-
// src/utils/cn.ts
|
|
7
|
-
import { clsx } from "clsx";
|
|
8
|
-
import { extendTailwindMerge } from "tailwind-merge";
|
|
9
|
-
var twMerge = extendTailwindMerge({
|
|
10
|
-
extend: {
|
|
11
|
-
classGroups: {
|
|
12
|
-
z: [
|
|
13
|
-
"z-content",
|
|
14
|
-
"z-nav",
|
|
15
|
-
"z-overlay",
|
|
16
|
-
"z-modal",
|
|
17
|
-
"z-search",
|
|
18
|
-
"z-toast",
|
|
19
|
-
"z-progress"
|
|
20
|
-
]
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
});
|
|
24
|
-
function cn(...inputs) {
|
|
25
|
-
return twMerge(clsx(inputs));
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
// src/kernel/components/ui/progress.tsx
|
|
5
|
+
import { cn } from "@publish.os/nextjs/utils/cn";
|
|
29
6
|
import { jsx } from "react/jsx-runtime";
|
|
30
7
|
function Progress(props) {
|
|
31
8
|
return /* @__PURE__ */ jsx(BaseProgress.Root, { ...props });
|
|
@@ -1,31 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
|
-
// src/
|
|
3
|
+
// src/components/ui/scroll-area.tsx
|
|
4
4
|
import { ScrollArea as BaseScrollArea } from "@base-ui/react/scroll-area";
|
|
5
|
-
|
|
6
|
-
// src/utils/cn.ts
|
|
7
|
-
import { clsx } from "clsx";
|
|
8
|
-
import { extendTailwindMerge } from "tailwind-merge";
|
|
9
|
-
var twMerge = extendTailwindMerge({
|
|
10
|
-
extend: {
|
|
11
|
-
classGroups: {
|
|
12
|
-
z: [
|
|
13
|
-
"z-content",
|
|
14
|
-
"z-nav",
|
|
15
|
-
"z-overlay",
|
|
16
|
-
"z-modal",
|
|
17
|
-
"z-search",
|
|
18
|
-
"z-toast",
|
|
19
|
-
"z-progress"
|
|
20
|
-
]
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
});
|
|
24
|
-
function cn(...inputs) {
|
|
25
|
-
return twMerge(clsx(inputs));
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
// src/kernel/components/ui/scroll-area.tsx
|
|
5
|
+
import { cn } from "@publish.os/nextjs/utils/cn";
|
|
29
6
|
import { cva } from "class-variance-authority";
|
|
30
7
|
import {
|
|
31
8
|
Children,
|
|
@@ -50,18 +27,11 @@ var scrollAreaVariants = cva(
|
|
|
50
27
|
variant: "default"
|
|
51
28
|
}
|
|
52
29
|
}
|
|
53
|
-
);
|
|
54
|
-
var DEFAULT_MASK_SIZE = 24;
|
|
30
|
+
), DEFAULT_MASK_SIZE = 24;
|
|
55
31
|
function mergeRefs(...refs) {
|
|
56
32
|
return (value) => {
|
|
57
|
-
for (
|
|
58
|
-
|
|
59
|
-
if (typeof ref === "function") {
|
|
60
|
-
ref(value);
|
|
61
|
-
} else {
|
|
62
|
-
ref.current = value;
|
|
63
|
-
}
|
|
64
|
-
}
|
|
33
|
+
for (let ref of refs)
|
|
34
|
+
ref && (typeof ref == "function" ? ref(value) : ref.current = value);
|
|
65
35
|
};
|
|
66
36
|
}
|
|
67
37
|
function normalizeMaskConfig({
|
|
@@ -69,11 +39,8 @@ function normalizeMaskConfig({
|
|
|
69
39
|
orientation,
|
|
70
40
|
variant
|
|
71
41
|
}) {
|
|
72
|
-
if (mask ===
|
|
73
|
-
|
|
74
|
-
const maskConfig = typeof mask === "object" ? mask : {};
|
|
75
|
-
const axis = maskConfig.axis ?? (orientation === "horizontal" ? "horizontal" : "vertical");
|
|
76
|
-
const size = maskConfig.size ?? (axis === "horizontal" ? maskConfig.width : maskConfig.height) ?? maskConfig.height ?? maskConfig.width ?? DEFAULT_MASK_SIZE;
|
|
42
|
+
if (mask === !1 || !mask && variant !== "gradient") return null;
|
|
43
|
+
let maskConfig = typeof mask == "object" ? mask : {}, axis = maskConfig.axis ?? (orientation === "horizontal" ? "horizontal" : "vertical"), size = maskConfig.size ?? (axis === "horizontal" ? maskConfig.width : maskConfig.height) ?? maskConfig.height ?? maskConfig.width ?? DEFAULT_MASK_SIZE;
|
|
77
44
|
return {
|
|
78
45
|
axis,
|
|
79
46
|
size,
|
|
@@ -85,12 +52,11 @@ function createMaskValue({
|
|
|
85
52
|
endSize,
|
|
86
53
|
startSize
|
|
87
54
|
}) {
|
|
88
|
-
|
|
89
|
-
return `linear-gradient(${direction}, transparent 0, black ${startSize}px, black calc(100% - ${endSize}px), transparent 100%)`;
|
|
55
|
+
return `linear-gradient(${axis === "horizontal" ? "to right" : "to bottom"}, transparent 0, black ${startSize}px, black calc(100% - ${endSize}px), transparent 100%)`;
|
|
90
56
|
}
|
|
91
57
|
function initialMaskStyle(mask) {
|
|
92
58
|
if (!mask) return {};
|
|
93
|
-
|
|
59
|
+
let maskValue = createMaskValue({
|
|
94
60
|
axis: mask.axis,
|
|
95
61
|
endSize: mask.size,
|
|
96
62
|
startSize: 0
|
|
@@ -106,7 +72,7 @@ function isScrollAreaBlock(child) {
|
|
|
106
72
|
function hasScrollAreaBlocks(children) {
|
|
107
73
|
return Children.toArray(children).some(isScrollAreaBlock);
|
|
108
74
|
}
|
|
109
|
-
var ScrollAreaRoot = forwardRef(function
|
|
75
|
+
var ScrollAreaRoot = forwardRef(function({ className, ...props }, ref) {
|
|
110
76
|
return /* @__PURE__ */ jsx(
|
|
111
77
|
BaseScrollArea.Root,
|
|
112
78
|
{
|
|
@@ -129,7 +95,7 @@ function ScrollArea({
|
|
|
129
95
|
cornerProps,
|
|
130
96
|
mask,
|
|
131
97
|
orientation = "vertical",
|
|
132
|
-
scrollbar =
|
|
98
|
+
scrollbar = !0,
|
|
133
99
|
scrollbarClassName,
|
|
134
100
|
scrollbarProps,
|
|
135
101
|
thumbClassName,
|
|
@@ -140,18 +106,7 @@ function ScrollArea({
|
|
|
140
106
|
viewportRef,
|
|
141
107
|
...props
|
|
142
108
|
}) {
|
|
143
|
-
|
|
144
|
-
const [showStartBorder, setShowStartBorder] = useState(false);
|
|
145
|
-
const [showEndBorder, setShowEndBorder] = useState(false);
|
|
146
|
-
const maskConfig = typeof mask === "object" ? mask : void 0;
|
|
147
|
-
const maskFallback = typeof mask === "object" ? true : mask;
|
|
148
|
-
const hasMaskConfig = maskConfig !== void 0;
|
|
149
|
-
const maskAxis = maskConfig?.axis;
|
|
150
|
-
const maskHeight = maskConfig?.height;
|
|
151
|
-
const maskSize = maskConfig?.size;
|
|
152
|
-
const maskTriggerSize = maskConfig?.triggerSize;
|
|
153
|
-
const maskWidth = maskConfig?.width;
|
|
154
|
-
const normalizedMask = useMemo(
|
|
109
|
+
let internalViewportRef = useRef(null), [showStartBorder, setShowStartBorder] = useState(!1), [showEndBorder, setShowEndBorder] = useState(!1), maskConfig = typeof mask == "object" ? mask : void 0, maskFallback = typeof mask == "object" ? !0 : mask, hasMaskConfig = maskConfig !== void 0, maskAxis = maskConfig?.axis, maskHeight = maskConfig?.height, maskSize = maskConfig?.size, maskTriggerSize = maskConfig?.triggerSize, maskWidth = maskConfig?.width, normalizedMask = useMemo(
|
|
155
110
|
() => normalizeMaskConfig({
|
|
156
111
|
mask: hasMaskConfig ? {
|
|
157
112
|
axis: maskAxis,
|
|
@@ -174,68 +129,44 @@ function ScrollArea({
|
|
|
174
129
|
orientation,
|
|
175
130
|
variant
|
|
176
131
|
]
|
|
177
|
-
)
|
|
178
|
-
const viewportStyle = useMemo(
|
|
132
|
+
), viewportStyle = useMemo(
|
|
179
133
|
() => ({
|
|
180
134
|
...initialMaskStyle(normalizedMask),
|
|
181
135
|
...viewportProps?.style
|
|
182
136
|
}),
|
|
183
137
|
[normalizedMask, viewportProps?.style]
|
|
184
|
-
)
|
|
185
|
-
const setViewportRef = useMemo(
|
|
138
|
+
), setViewportRef = useMemo(
|
|
186
139
|
() => mergeRefs(internalViewportRef, viewportRef),
|
|
187
140
|
[viewportRef]
|
|
188
141
|
);
|
|
189
|
-
useEffect(() => {
|
|
190
|
-
|
|
191
|
-
if (!viewport || !normalizedMask && border === "none")
|
|
142
|
+
if (useEffect(() => {
|
|
143
|
+
let viewport = internalViewportRef.current;
|
|
144
|
+
if (!viewport || !normalizedMask && border === "none")
|
|
192
145
|
return;
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
const isHorizontal = scrollAxis === "horizontal";
|
|
197
|
-
const scrollOffset = isHorizontal ? viewport.scrollLeft : viewport.scrollTop;
|
|
198
|
-
const scrollSize = isHorizontal ? viewport.scrollWidth : viewport.scrollHeight;
|
|
199
|
-
const clientSize = isHorizontal ? viewport.clientWidth : viewport.clientHeight;
|
|
200
|
-
const maxScroll = Math.max(0, scrollSize - clientSize);
|
|
201
|
-
const hasOverflow = maxScroll > 1;
|
|
202
|
-
const showStart = hasOverflow && scrollOffset > 1;
|
|
203
|
-
const showEnd = hasOverflow && scrollOffset < maxScroll - 1;
|
|
204
|
-
setShowStartBorder(showStart);
|
|
205
|
-
setShowEndBorder(showEnd);
|
|
206
|
-
if (!normalizedMask) return;
|
|
146
|
+
let updateScrollState = () => {
|
|
147
|
+
let isHorizontal = (normalizedMask?.axis ?? (orientation === "horizontal" ? "horizontal" : "vertical")) === "horizontal", scrollOffset = isHorizontal ? viewport.scrollLeft : viewport.scrollTop, scrollSize = isHorizontal ? viewport.scrollWidth : viewport.scrollHeight, clientSize = isHorizontal ? viewport.clientWidth : viewport.clientHeight, maxScroll = Math.max(0, scrollSize - clientSize), hasOverflow = maxScroll > 1, showStart = hasOverflow && scrollOffset > 1, showEnd = hasOverflow && scrollOffset < maxScroll - 1;
|
|
148
|
+
if (setShowStartBorder(showStart), setShowEndBorder(showEnd), !normalizedMask) return;
|
|
207
149
|
if (!hasOverflow) {
|
|
208
|
-
viewport.style.removeProperty("mask-image");
|
|
209
|
-
viewport.style.removeProperty("-webkit-mask-image");
|
|
150
|
+
viewport.style.removeProperty("mask-image"), viewport.style.removeProperty("-webkit-mask-image");
|
|
210
151
|
return;
|
|
211
152
|
}
|
|
212
|
-
|
|
153
|
+
let startSize = Math.min(
|
|
213
154
|
normalizedMask.size,
|
|
214
155
|
scrollOffset / normalizedMask.triggerSize * normalizedMask.size
|
|
215
|
-
)
|
|
216
|
-
const remainingScroll = maxScroll - scrollOffset;
|
|
217
|
-
const endSize = Math.min(
|
|
156
|
+
), remainingScroll = maxScroll - scrollOffset, endSize = Math.min(
|
|
218
157
|
normalizedMask.size,
|
|
219
158
|
remainingScroll / normalizedMask.triggerSize * normalizedMask.size
|
|
220
|
-
)
|
|
221
|
-
const maskValue = createMaskValue({
|
|
159
|
+
), maskValue = createMaskValue({
|
|
222
160
|
axis: normalizedMask.axis,
|
|
223
161
|
endSize,
|
|
224
162
|
startSize
|
|
225
163
|
});
|
|
226
|
-
viewport.style.setProperty("mask-image", maskValue);
|
|
227
|
-
|
|
164
|
+
viewport.style.setProperty("mask-image", maskValue), viewport.style.setProperty("-webkit-mask-image", maskValue);
|
|
165
|
+
}, resizeObserver = new ResizeObserver(updateScrollState);
|
|
166
|
+
return resizeObserver.observe(viewport), viewport.addEventListener("scroll", updateScrollState, { passive: !0 }), updateScrollState(), () => {
|
|
167
|
+
resizeObserver.disconnect(), viewport.removeEventListener("scroll", updateScrollState);
|
|
228
168
|
};
|
|
229
|
-
|
|
230
|
-
resizeObserver.observe(viewport);
|
|
231
|
-
viewport.addEventListener("scroll", updateScrollState, { passive: true });
|
|
232
|
-
updateScrollState();
|
|
233
|
-
return () => {
|
|
234
|
-
resizeObserver.disconnect();
|
|
235
|
-
viewport.removeEventListener("scroll", updateScrollState);
|
|
236
|
-
};
|
|
237
|
-
}, [border, normalizedMask, orientation]);
|
|
238
|
-
if (hasScrollAreaBlocks(children)) {
|
|
169
|
+
}, [border, normalizedMask, orientation]), hasScrollAreaBlocks(children))
|
|
239
170
|
return /* @__PURE__ */ jsx(
|
|
240
171
|
ScrollAreaRoot,
|
|
241
172
|
{
|
|
@@ -244,13 +175,7 @@ function ScrollArea({
|
|
|
244
175
|
children
|
|
245
176
|
}
|
|
246
177
|
);
|
|
247
|
-
|
|
248
|
-
const showVerticalScrollbar = scrollbar && orientation !== "horizontal";
|
|
249
|
-
const showHorizontalScrollbar = scrollbar && orientation !== "vertical";
|
|
250
|
-
const showCorner = corner ?? orientation === "both";
|
|
251
|
-
const defaultStartBorderClassName = orientation === "horizontal" ? "border-l-stroke-2" : "border-t-stroke-2";
|
|
252
|
-
const defaultEndBorderClassName = orientation === "horizontal" ? "border-r-stroke-2" : "border-b-stroke-2";
|
|
253
|
-
const scrollBorderClassName = orientation === "horizontal" ? cn(
|
|
178
|
+
let showVerticalScrollbar = scrollbar && orientation !== "horizontal", showHorizontalScrollbar = scrollbar && orientation !== "vertical", showCorner = corner ?? orientation === "both", defaultStartBorderClassName = orientation === "horizontal" ? "border-l-stroke-2" : "border-t-stroke-2", defaultEndBorderClassName = orientation === "horizontal" ? "border-r-stroke-2" : "border-b-stroke-2", scrollBorderClassName = orientation === "horizontal" ? cn(
|
|
254
179
|
border !== "none" && "border-x border-x-transparent transition-colors",
|
|
255
180
|
(border === "start" || border === "both") && showStartBorder && (borderStartClassName ?? defaultStartBorderClassName),
|
|
256
181
|
(border === "end" || border === "both") && showEndBorder && (borderEndClassName ?? defaultEndBorderClassName)
|
|
@@ -327,7 +252,7 @@ function ScrollArea({
|
|
|
327
252
|
}
|
|
328
253
|
);
|
|
329
254
|
}
|
|
330
|
-
var ScrollAreaViewport = forwardRef(function
|
|
255
|
+
var ScrollAreaViewport = forwardRef(function({ className, ...props }, ref) {
|
|
331
256
|
return /* @__PURE__ */ jsx(
|
|
332
257
|
BaseScrollArea.Viewport,
|
|
333
258
|
{
|
|
@@ -336,17 +261,15 @@ var ScrollAreaViewport = forwardRef(function ScrollAreaViewport2({ className, ..
|
|
|
336
261
|
...props
|
|
337
262
|
}
|
|
338
263
|
);
|
|
339
|
-
})
|
|
340
|
-
var ScrollAreaContent = forwardRef(function ScrollAreaContent2({ className, ...props }, ref) {
|
|
264
|
+
}), ScrollAreaContent = forwardRef(function({ className, ...props }, ref) {
|
|
341
265
|
return /* @__PURE__ */ jsx(BaseScrollArea.Content, { className: cn(className), ref, ...props });
|
|
342
|
-
})
|
|
343
|
-
var ScrollAreaScrollbar = forwardRef(function ScrollAreaScrollbar2({ className, orientation = "vertical", ...props }, ref) {
|
|
266
|
+
}), ScrollAreaScrollbar = forwardRef(function({ className, orientation = "vertical", ...props }, ref) {
|
|
344
267
|
return /* @__PURE__ */ jsx(
|
|
345
268
|
BaseScrollArea.Scrollbar,
|
|
346
269
|
{
|
|
347
270
|
className: cn(
|
|
348
|
-
"flex touch-none select-none bg-
|
|
349
|
-
orientation === "vertical" ? "h-full w-
|
|
271
|
+
"flex touch-none select-none bg-[var(--scrollbar-track-surface)] p-[var(--scrollbar-thumb-stroke-width)] transition-colors",
|
|
272
|
+
orientation === "vertical" ? "h-full w-[var(--scrollbar-size)]" : "h-[var(--scrollbar-size)] w-full",
|
|
350
273
|
className
|
|
351
274
|
),
|
|
352
275
|
orientation,
|
|
@@ -354,25 +277,23 @@ var ScrollAreaScrollbar = forwardRef(function ScrollAreaScrollbar2({ className,
|
|
|
354
277
|
...props
|
|
355
278
|
}
|
|
356
279
|
);
|
|
357
|
-
})
|
|
358
|
-
var ScrollAreaThumb = forwardRef(function ScrollAreaThumb2({ className, ...props }, ref) {
|
|
280
|
+
}), ScrollAreaThumb = forwardRef(function({ className, ...props }, ref) {
|
|
359
281
|
return /* @__PURE__ */ jsx(
|
|
360
282
|
BaseScrollArea.Thumb,
|
|
361
283
|
{
|
|
362
284
|
className: cn(
|
|
363
|
-
"flex-1 rounded-scrollbar-thumb bg-stroke
|
|
285
|
+
"flex-1 rounded-scrollbar-thumb bg-[var(--scrollbar-thumb-stroke)] transition-colors hover:bg-[var(--scrollbar-thumb-hover-stroke)]",
|
|
364
286
|
className
|
|
365
287
|
),
|
|
366
288
|
ref,
|
|
367
289
|
...props
|
|
368
290
|
}
|
|
369
291
|
);
|
|
370
|
-
})
|
|
371
|
-
var ScrollAreaCorner = forwardRef(function ScrollAreaCorner2({ className, ...props }, ref) {
|
|
292
|
+
}), ScrollAreaCorner = forwardRef(function({ className, ...props }, ref) {
|
|
372
293
|
return /* @__PURE__ */ jsx(
|
|
373
294
|
BaseScrollArea.Corner,
|
|
374
295
|
{
|
|
375
|
-
className: cn("bg-
|
|
296
|
+
className: cn("bg-[var(--scrollbar-track-surface)]", className),
|
|
376
297
|
ref,
|
|
377
298
|
...props
|
|
378
299
|
}
|
|
@@ -2,26 +2,26 @@ import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
|
2
2
|
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
3
3
|
import { Select as Select$1 } from '@base-ui/react/select';
|
|
4
4
|
import { VariantProps } from 'class-variance-authority';
|
|
5
|
-
import {
|
|
5
|
+
import { ComponentPropsWithRef } from 'react';
|
|
6
6
|
|
|
7
|
-
type SelectRootProps =
|
|
8
|
-
type SelectLabelProps =
|
|
7
|
+
type SelectRootProps = ComponentPropsWithRef<typeof Select$1.Root>;
|
|
8
|
+
type SelectLabelProps = ComponentPropsWithRef<typeof Select$1.Label>;
|
|
9
9
|
declare const selectTriggerVariants: (props?: ({
|
|
10
10
|
size?: "xs" | "sm" | "md" | "lg" | "xl" | null | undefined;
|
|
11
11
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
12
12
|
type SelectTriggerVariantProps = VariantProps<typeof selectTriggerVariants>;
|
|
13
|
-
type SelectTriggerProps =
|
|
14
|
-
type SelectValueProps =
|
|
15
|
-
type SelectIconProps =
|
|
16
|
-
type SelectPortalProps =
|
|
17
|
-
type SelectPositionerProps =
|
|
18
|
-
type SelectPopupProps =
|
|
19
|
-
type SelectListProps =
|
|
20
|
-
type SelectItemProps =
|
|
21
|
-
type SelectItemIndicatorProps =
|
|
22
|
-
type SelectItemTextProps =
|
|
23
|
-
type SelectGroupProps =
|
|
24
|
-
type SelectGroupLabelProps =
|
|
13
|
+
type SelectTriggerProps = ComponentPropsWithRef<typeof Select$1.Trigger> & SelectTriggerVariantProps;
|
|
14
|
+
type SelectValueProps = ComponentPropsWithRef<typeof Select$1.Value>;
|
|
15
|
+
type SelectIconProps = ComponentPropsWithRef<typeof Select$1.Icon>;
|
|
16
|
+
type SelectPortalProps = ComponentPropsWithRef<typeof Select$1.Portal>;
|
|
17
|
+
type SelectPositionerProps = ComponentPropsWithRef<typeof Select$1.Positioner>;
|
|
18
|
+
type SelectPopupProps = ComponentPropsWithRef<typeof Select$1.Popup>;
|
|
19
|
+
type SelectListProps = ComponentPropsWithRef<typeof Select$1.List>;
|
|
20
|
+
type SelectItemProps = ComponentPropsWithRef<typeof Select$1.Item>;
|
|
21
|
+
type SelectItemIndicatorProps = ComponentPropsWithRef<typeof Select$1.ItemIndicator>;
|
|
22
|
+
type SelectItemTextProps = ComponentPropsWithRef<typeof Select$1.ItemText>;
|
|
23
|
+
type SelectGroupProps = ComponentPropsWithRef<typeof Select$1.Group>;
|
|
24
|
+
type SelectGroupLabelProps = ComponentPropsWithRef<typeof Select$1.GroupLabel>;
|
|
25
25
|
declare function Select(props: SelectRootProps): react_jsx_runtime.JSX.Element;
|
|
26
26
|
declare function SelectLabel({ className, ...props }: SelectLabelProps): react_jsx_runtime.JSX.Element;
|
|
27
27
|
declare function SelectTrigger({ className, size, ...props }: SelectTriggerProps): react_jsx_runtime.JSX.Element;
|