@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,356 +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/toc.tsx
|
|
22
|
-
var toc_exports = {};
|
|
23
|
-
__export(toc_exports, {
|
|
24
|
-
Toc: () => Toc
|
|
25
|
-
});
|
|
26
|
-
module.exports = __toCommonJS(toc_exports);
|
|
27
|
-
|
|
28
|
-
// src/utils/cn.ts
|
|
29
|
-
var import_clsx = require("clsx");
|
|
30
|
-
var import_tailwind_merge = require("tailwind-merge");
|
|
31
|
-
var twMerge = (0, import_tailwind_merge.extendTailwindMerge)({
|
|
32
|
-
extend: {
|
|
33
|
-
classGroups: {
|
|
34
|
-
z: [
|
|
35
|
-
"z-content",
|
|
36
|
-
"z-nav",
|
|
37
|
-
"z-overlay",
|
|
38
|
-
"z-modal",
|
|
39
|
-
"z-search",
|
|
40
|
-
"z-toast",
|
|
41
|
-
"z-progress"
|
|
42
|
-
]
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
});
|
|
46
|
-
function cn(...inputs) {
|
|
47
|
-
return twMerge((0, import_clsx.clsx)(inputs));
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
// src/utils/heading-ids.ts
|
|
51
|
-
var import_react = require("react");
|
|
52
|
-
var SELF_CLOSING_TAG_RE = new RegExp("<[^>]+/>", "g");
|
|
53
|
-
var PAIRED_TAG_RE = /<\/?\w[^>]*>/g;
|
|
54
|
-
var MDX_BOLD_RE = /\*\*(.*?)\*\*/g;
|
|
55
|
-
var MDX_ITALIC_RE = /\*(.*?)\*/g;
|
|
56
|
-
var MDX_UNDERLINE_BOLD_RE = /__(.*?)__/g;
|
|
57
|
-
var MDX_UNDERLINE_ITALIC_RE = /_(.*?)_/g;
|
|
58
|
-
var MDX_STRIKETHROUGH_RE = /~~(.*?)~~/g;
|
|
59
|
-
var MDX_INLINE_CODE_RE = /`(.*?)`/g;
|
|
60
|
-
var MDX_LINK_RE = /\[(.*?)\]\(.*?\)/g;
|
|
61
|
-
var NON_ALPHANUMERIC_RE = /[^a-z0-9]+/g;
|
|
62
|
-
var LEADING_TRAILING_HYPHEN_RE = /^-+|-+$/g;
|
|
63
|
-
var LEADING_DIGIT_RE = /^(\d)/;
|
|
64
|
-
var HEADING_RE = /^(#{1,6})[ \t]+(.+?)\s*#*\s*$/gm;
|
|
65
|
-
var FENCED_CODE_RE = /```[\s\S]*?```|~~~[\s\S]*?~~~/g;
|
|
66
|
-
function extractText(node) {
|
|
67
|
-
if (typeof node === "string") return node;
|
|
68
|
-
if (typeof node === "number") return String(node);
|
|
69
|
-
if (node == null || typeof node === "boolean") return "";
|
|
70
|
-
if (Array.isArray(node)) {
|
|
71
|
-
return node.map(extractText).join("");
|
|
72
|
-
}
|
|
73
|
-
if ((0, import_react.isValidElement)(node)) {
|
|
74
|
-
const element = node;
|
|
75
|
-
return element.props.children === void 0 ? "" : extractText(element.props.children);
|
|
76
|
-
}
|
|
77
|
-
return "";
|
|
78
|
-
}
|
|
79
|
-
function cleanHeadingText(input) {
|
|
80
|
-
const text = typeof input === "string" ? input : extractText(input);
|
|
81
|
-
return text.replace(SELF_CLOSING_TAG_RE, "").replace(PAIRED_TAG_RE, "").replace(MDX_BOLD_RE, "$1").replace(MDX_ITALIC_RE, "$1").replace(MDX_UNDERLINE_BOLD_RE, "$1").replace(MDX_UNDERLINE_ITALIC_RE, "$1").replace(MDX_STRIKETHROUGH_RE, "$1").replace(MDX_INLINE_CODE_RE, "$1").replace(MDX_LINK_RE, "$1").trim();
|
|
82
|
-
}
|
|
83
|
-
function slugify(text) {
|
|
84
|
-
return text.toLowerCase().replace(NON_ALPHANUMERIC_RE, "-").replace(LEADING_TRAILING_HYPHEN_RE, "").replace(LEADING_DIGIT_RE, "id-$1");
|
|
85
|
-
}
|
|
86
|
-
function headingToHTMLId(input) {
|
|
87
|
-
try {
|
|
88
|
-
const id = slugify(cleanHeadingText(input));
|
|
89
|
-
return id || "empty-heading";
|
|
90
|
-
} catch {
|
|
91
|
-
return "empty-heading";
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
function createHeadingIdGenerator() {
|
|
95
|
-
const usedIds = /* @__PURE__ */ new Map();
|
|
96
|
-
return (input) => {
|
|
97
|
-
const baseId = headingToHTMLId(input);
|
|
98
|
-
if (baseId === "empty-heading") return baseId;
|
|
99
|
-
const count = usedIds.get(baseId) ?? 0;
|
|
100
|
-
usedIds.set(baseId, count + 1);
|
|
101
|
-
return count === 0 ? baseId : `${baseId}-${count}`;
|
|
102
|
-
};
|
|
103
|
-
}
|
|
104
|
-
function extractMdxHeadings(content = "", levels) {
|
|
105
|
-
const [minDepth, maxDepth] = levels;
|
|
106
|
-
const headingId = createHeadingIdGenerator();
|
|
107
|
-
const headings = [];
|
|
108
|
-
const searchableContent = content.replace(FENCED_CODE_RE, "");
|
|
109
|
-
HEADING_RE.lastIndex = 0;
|
|
110
|
-
while (true) {
|
|
111
|
-
const match = HEADING_RE.exec(searchableContent);
|
|
112
|
-
if (!match) break;
|
|
113
|
-
const marker = match[1];
|
|
114
|
-
const rawText = match[2];
|
|
115
|
-
if (!marker || !rawText) continue;
|
|
116
|
-
const level = marker.length;
|
|
117
|
-
const text = cleanHeadingText(rawText);
|
|
118
|
-
const id = headingId(rawText);
|
|
119
|
-
if (!text || id === "empty-heading") continue;
|
|
120
|
-
if (level < minDepth || level > maxDepth) continue;
|
|
121
|
-
headings.push({ id, level, text });
|
|
122
|
-
}
|
|
123
|
-
return headings;
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
// src/kernel/components/blocks/toc.tsx
|
|
127
|
-
var import_react2 = require("react");
|
|
128
|
-
var import_jsx_runtime = require("react/jsx-runtime");
|
|
129
|
-
var DEFAULT_LEVELS = [2, 3];
|
|
130
|
-
var ACTIVATION_OFFSET = 96;
|
|
131
|
-
var BOTTOM_THRESHOLD = 2;
|
|
132
|
-
var SCROLL_KEYS = /* @__PURE__ */ new Set([
|
|
133
|
-
" ",
|
|
134
|
-
"ArrowDown",
|
|
135
|
-
"ArrowUp",
|
|
136
|
-
"End",
|
|
137
|
-
"Home",
|
|
138
|
-
"PageDown",
|
|
139
|
-
"PageUp"
|
|
140
|
-
]);
|
|
141
|
-
function documentIsAtBottom() {
|
|
142
|
-
const root = document.documentElement;
|
|
143
|
-
return Math.ceil(window.scrollY + window.innerHeight) >= root.scrollHeight - BOTTOM_THRESHOLD;
|
|
144
|
-
}
|
|
145
|
-
function resolveActiveHeading(elements) {
|
|
146
|
-
if (documentIsAtBottom()) return elements.at(-1)?.id ?? "";
|
|
147
|
-
let nextActiveId = elements[0]?.id ?? "";
|
|
148
|
-
for (const element of elements) {
|
|
149
|
-
if (element.getBoundingClientRect().top <= ACTIVATION_OFFSET) {
|
|
150
|
-
nextActiveId = element.id;
|
|
151
|
-
} else {
|
|
152
|
-
break;
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
return nextActiveId;
|
|
156
|
-
}
|
|
157
|
-
function useTocActiveState(headingIds) {
|
|
158
|
-
const [activeId, setActiveId] = (0, import_react2.useState)("");
|
|
159
|
-
const [indicatorStyle, setIndicatorStyle] = (0, import_react2.useState)({
|
|
160
|
-
height: 0,
|
|
161
|
-
transform: 0
|
|
162
|
-
});
|
|
163
|
-
const [scrollMask, setScrollMask] = (0, import_react2.useState)({
|
|
164
|
-
bottom: false,
|
|
165
|
-
top: false
|
|
166
|
-
});
|
|
167
|
-
const clickedIdRef = (0, import_react2.useRef)(null);
|
|
168
|
-
const contentRef = (0, import_react2.useRef)(null);
|
|
169
|
-
const frameRef = (0, import_react2.useRef)(null);
|
|
170
|
-
const viewportRef = (0, import_react2.useRef)(null);
|
|
171
|
-
const clearClickedId = (0, import_react2.useCallback)(() => {
|
|
172
|
-
clickedIdRef.current = null;
|
|
173
|
-
}, []);
|
|
174
|
-
const updateActiveHeading = (0, import_react2.useCallback)(() => {
|
|
175
|
-
if (clickedIdRef.current) {
|
|
176
|
-
setActiveId(
|
|
177
|
-
(current) => current === clickedIdRef.current ? current : clickedIdRef.current ?? ""
|
|
178
|
-
);
|
|
179
|
-
return;
|
|
180
|
-
}
|
|
181
|
-
const elements = headingIds.map((id) => document.getElementById(id)).filter((element) => Boolean(element));
|
|
182
|
-
if (elements.length === 0) return;
|
|
183
|
-
const nextActiveId = resolveActiveHeading(elements);
|
|
184
|
-
setActiveId(
|
|
185
|
-
(current) => current === nextActiveId ? current : nextActiveId
|
|
186
|
-
);
|
|
187
|
-
}, [headingIds]);
|
|
188
|
-
const updateIndicator = (0, import_react2.useCallback)(() => {
|
|
189
|
-
const container = contentRef.current;
|
|
190
|
-
if (!container || !activeId) {
|
|
191
|
-
setIndicatorStyle({ height: 0, transform: 0 });
|
|
192
|
-
return;
|
|
193
|
-
}
|
|
194
|
-
const activeLink = Array.from(
|
|
195
|
-
container.querySelectorAll("[data-toc-link]")
|
|
196
|
-
).find((link) => link.dataset.tocId === activeId);
|
|
197
|
-
if (!activeLink) {
|
|
198
|
-
setIndicatorStyle({ height: 0, transform: 0 });
|
|
199
|
-
return;
|
|
200
|
-
}
|
|
201
|
-
const containerRect = container.getBoundingClientRect();
|
|
202
|
-
const activeRect = activeLink.getBoundingClientRect();
|
|
203
|
-
const nextStyle = {
|
|
204
|
-
height: activeRect.height,
|
|
205
|
-
transform: activeRect.top - containerRect.top
|
|
206
|
-
};
|
|
207
|
-
setIndicatorStyle(
|
|
208
|
-
(current) => current.height === nextStyle.height && current.transform === nextStyle.transform ? current : nextStyle
|
|
209
|
-
);
|
|
210
|
-
}, [activeId]);
|
|
211
|
-
const updateViewport = (0, import_react2.useCallback)(() => {
|
|
212
|
-
updateIndicator();
|
|
213
|
-
const viewport = viewportRef.current;
|
|
214
|
-
if (!viewport) return;
|
|
215
|
-
const hasOverflow = viewport.scrollHeight > viewport.clientHeight + 1;
|
|
216
|
-
const nextMask = {
|
|
217
|
-
bottom: hasOverflow && viewport.scrollTop + viewport.clientHeight < viewport.scrollHeight - 1,
|
|
218
|
-
top: hasOverflow && viewport.scrollTop > 0
|
|
219
|
-
};
|
|
220
|
-
setScrollMask(
|
|
221
|
-
(current) => current.top === nextMask.top && current.bottom === nextMask.bottom ? current : nextMask
|
|
222
|
-
);
|
|
223
|
-
}, [updateIndicator]);
|
|
224
|
-
(0, import_react2.useEffect)(() => {
|
|
225
|
-
const scheduleUpdate = () => {
|
|
226
|
-
if (frameRef.current !== null) return;
|
|
227
|
-
frameRef.current = window.requestAnimationFrame(() => {
|
|
228
|
-
frameRef.current = null;
|
|
229
|
-
updateActiveHeading();
|
|
230
|
-
updateViewport();
|
|
231
|
-
});
|
|
232
|
-
};
|
|
233
|
-
const handleKeyDown = (event) => {
|
|
234
|
-
if (SCROLL_KEYS.has(event.key)) clearClickedId();
|
|
235
|
-
};
|
|
236
|
-
scheduleUpdate();
|
|
237
|
-
window.addEventListener("scroll", scheduleUpdate, { passive: true });
|
|
238
|
-
window.addEventListener("resize", scheduleUpdate);
|
|
239
|
-
window.addEventListener("hashchange", scheduleUpdate);
|
|
240
|
-
window.addEventListener("wheel", clearClickedId, { passive: true });
|
|
241
|
-
window.addEventListener("touchstart", clearClickedId, { passive: true });
|
|
242
|
-
window.addEventListener("keydown", handleKeyDown);
|
|
243
|
-
return () => {
|
|
244
|
-
window.removeEventListener("scroll", scheduleUpdate);
|
|
245
|
-
window.removeEventListener("resize", scheduleUpdate);
|
|
246
|
-
window.removeEventListener("hashchange", scheduleUpdate);
|
|
247
|
-
window.removeEventListener("wheel", clearClickedId);
|
|
248
|
-
window.removeEventListener("touchstart", clearClickedId);
|
|
249
|
-
window.removeEventListener("keydown", handleKeyDown);
|
|
250
|
-
if (frameRef.current !== null) {
|
|
251
|
-
window.cancelAnimationFrame(frameRef.current);
|
|
252
|
-
frameRef.current = null;
|
|
253
|
-
}
|
|
254
|
-
};
|
|
255
|
-
}, [clearClickedId, updateActiveHeading, updateViewport]);
|
|
256
|
-
(0, import_react2.useEffect)(() => {
|
|
257
|
-
updateViewport();
|
|
258
|
-
}, [updateViewport]);
|
|
259
|
-
const handleTocClick = (0, import_react2.useCallback)((id) => {
|
|
260
|
-
clickedIdRef.current = id;
|
|
261
|
-
setActiveId(id);
|
|
262
|
-
}, []);
|
|
263
|
-
return {
|
|
264
|
-
activeId,
|
|
265
|
-
contentRef,
|
|
266
|
-
handleTocClick,
|
|
267
|
-
indicatorStyle,
|
|
268
|
-
scrollMask,
|
|
269
|
-
updateViewport,
|
|
270
|
-
viewportRef
|
|
271
|
-
};
|
|
272
|
-
}
|
|
273
|
-
function Toc({ className, content, levels = DEFAULT_LEVELS }) {
|
|
274
|
-
const headings = (0, import_react2.useMemo)(
|
|
275
|
-
() => extractMdxHeadings(content, levels),
|
|
276
|
-
[content, levels]
|
|
277
|
-
);
|
|
278
|
-
const headingIds = (0, import_react2.useMemo)(
|
|
279
|
-
() => headings.map((heading) => heading.id),
|
|
280
|
-
[headings]
|
|
281
|
-
);
|
|
282
|
-
const {
|
|
283
|
-
activeId,
|
|
284
|
-
contentRef,
|
|
285
|
-
handleTocClick,
|
|
286
|
-
indicatorStyle,
|
|
287
|
-
scrollMask,
|
|
288
|
-
updateViewport,
|
|
289
|
-
viewportRef
|
|
290
|
-
} = useTocActiveState(headingIds);
|
|
291
|
-
if (headings.length <= 1) return null;
|
|
292
|
-
const maskImage = scrollMask.top || scrollMask.bottom ? `linear-gradient(to bottom, ${scrollMask.top ? "transparent, black 14px" : "black 0, black 14px"}, ${scrollMask.bottom ? "black calc(100% - 14px), transparent" : "black calc(100% - 14px), black 100%"})` : void 0;
|
|
293
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("nav", { "aria-label": "On this page", className: cn("text-sm", className), children: [
|
|
294
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "mb-3 px-3 text-[11px] font-semibold uppercase leading-none tracking-wide text-foreground-3", children: "On this page" }),
|
|
295
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
296
|
-
"div",
|
|
297
|
-
{
|
|
298
|
-
ref: viewportRef,
|
|
299
|
-
className: "max-h-[calc(100dvh_-_var(--layout-global-nav-height)_-_3rem)] overflow-y-auto pr-2 [scrollbar-gutter:stable] supports-[top:anchor-size(--global-navbar_height)]:max-h-[calc(100dvh_-_anchor-size(--global-navbar_height,3.5rem)_-_3rem)]",
|
|
300
|
-
onScroll: updateViewport,
|
|
301
|
-
style: {
|
|
302
|
-
WebkitMaskImage: maskImage,
|
|
303
|
-
maskImage
|
|
304
|
-
},
|
|
305
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { ref: contentRef, className: "relative min-w-0 py-1", children: [
|
|
306
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "absolute bottom-1 left-0 top-1 w-px rounded-full bg-stroke-3" }),
|
|
307
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
308
|
-
"div",
|
|
309
|
-
{
|
|
310
|
-
"aria-hidden": "true",
|
|
311
|
-
className: "absolute left-0 w-px rounded-full bg-accent-1 transition-all duration-300 ease-out will-change-transform",
|
|
312
|
-
style: {
|
|
313
|
-
height: indicatorStyle.height,
|
|
314
|
-
transform: `translateY(${indicatorStyle.transform}px) scaleY(${activeId ? 1 : 0.5})`,
|
|
315
|
-
transformOrigin: "top"
|
|
316
|
-
}
|
|
317
|
-
}
|
|
318
|
-
),
|
|
319
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("ol", { className: "flex min-w-0 flex-col gap-0.5 pl-3", children: headings.map((heading, index) => {
|
|
320
|
-
const active = activeId === heading.id;
|
|
321
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
322
|
-
"li",
|
|
323
|
-
{
|
|
324
|
-
style: {
|
|
325
|
-
marginLeft: Math.max(heading.level - levels[0], 0) * 12,
|
|
326
|
-
marginTop: heading.level === levels[0] && index > 0 ? 4 : 0
|
|
327
|
-
},
|
|
328
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
329
|
-
"a",
|
|
330
|
-
{
|
|
331
|
-
"aria-current": active ? "location" : void 0,
|
|
332
|
-
className: cn(
|
|
333
|
-
"block rounded-button px-2 py-1 text-[13px] leading-snug text-foreground-3 no-underline transition-[background-color,color,font-weight] duration-200 hover:bg-surface-hover hover:text-foreground-1 hover:no-underline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-focus-ring",
|
|
334
|
-
active && "bg-surface-active font-medium text-accent-1 shadow-xs"
|
|
335
|
-
),
|
|
336
|
-
"data-state": active ? "heading-active" : void 0,
|
|
337
|
-
"data-toc-id": heading.id,
|
|
338
|
-
"data-toc-link": "",
|
|
339
|
-
href: `#${heading.id}`,
|
|
340
|
-
onClick: () => handleTocClick(heading.id),
|
|
341
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "block min-w-0 text-wrap break-words", children: heading.text })
|
|
342
|
-
}
|
|
343
|
-
)
|
|
344
|
-
},
|
|
345
|
-
heading.id
|
|
346
|
-
);
|
|
347
|
-
}) })
|
|
348
|
-
] })
|
|
349
|
-
}
|
|
350
|
-
)
|
|
351
|
-
] });
|
|
352
|
-
}
|
|
353
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
354
|
-
0 && (module.exports = {
|
|
355
|
-
Toc
|
|
356
|
-
});
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
|
|
3
|
-
type TocProps = {
|
|
4
|
-
className?: string;
|
|
5
|
-
content?: string;
|
|
6
|
-
levels?: [number, number];
|
|
7
|
-
};
|
|
8
|
-
declare function Toc({ className, content, levels }: TocProps): react_jsx_runtime.JSX.Element | null;
|
|
9
|
-
|
|
10
|
-
export { Toc, type TocProps };
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
|
|
20
|
-
// src/kernel/components/mdx/components/blockquote.tsx
|
|
21
|
-
var blockquote_exports = {};
|
|
22
|
-
__export(blockquote_exports, {
|
|
23
|
-
Blockquote: () => Blockquote
|
|
24
|
-
});
|
|
25
|
-
module.exports = __toCommonJS(blockquote_exports);
|
|
26
|
-
|
|
27
|
-
// src/utils/cn.ts
|
|
28
|
-
var import_clsx = require("clsx");
|
|
29
|
-
var import_tailwind_merge = require("tailwind-merge");
|
|
30
|
-
var twMerge = (0, import_tailwind_merge.extendTailwindMerge)({
|
|
31
|
-
extend: {
|
|
32
|
-
classGroups: {
|
|
33
|
-
z: [
|
|
34
|
-
"z-content",
|
|
35
|
-
"z-nav",
|
|
36
|
-
"z-overlay",
|
|
37
|
-
"z-modal",
|
|
38
|
-
"z-search",
|
|
39
|
-
"z-toast",
|
|
40
|
-
"z-progress"
|
|
41
|
-
]
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
});
|
|
45
|
-
function cn(...inputs) {
|
|
46
|
-
return twMerge((0, import_clsx.clsx)(inputs));
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
// src/kernel/components/mdx/components/blockquote.tsx
|
|
50
|
-
var import_jsx_runtime = require("react/jsx-runtime");
|
|
51
|
-
function Blockquote({ className, ...props }) {
|
|
52
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
53
|
-
"blockquote",
|
|
54
|
-
{
|
|
55
|
-
className: cn(
|
|
56
|
-
"my-6 border-l-2 border-accent-1 pl-4 text-sm leading-7 text-foreground-2",
|
|
57
|
-
className
|
|
58
|
-
),
|
|
59
|
-
...props
|
|
60
|
-
}
|
|
61
|
-
);
|
|
62
|
-
}
|
|
63
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
64
|
-
0 && (module.exports = {
|
|
65
|
-
Blockquote
|
|
66
|
-
});
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
|
|
3
|
-
type BlockquoteProps = React.ComponentPropsWithoutRef<"blockquote">;
|
|
4
|
-
declare function Blockquote({ className, ...props }: BlockquoteProps): react_jsx_runtime.JSX.Element;
|
|
5
|
-
|
|
6
|
-
export { Blockquote, type BlockquoteProps };
|
|
@@ -1,137 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
|
|
20
|
-
// src/kernel/components/mdx/components/callout.tsx
|
|
21
|
-
var callout_exports = {};
|
|
22
|
-
__export(callout_exports, {
|
|
23
|
-
Callout: () => Callout,
|
|
24
|
-
calloutVariants: () => calloutVariants
|
|
25
|
-
});
|
|
26
|
-
module.exports = __toCommonJS(callout_exports);
|
|
27
|
-
|
|
28
|
-
// src/utils/cn.ts
|
|
29
|
-
var import_clsx = require("clsx");
|
|
30
|
-
var import_tailwind_merge = require("tailwind-merge");
|
|
31
|
-
var twMerge = (0, import_tailwind_merge.extendTailwindMerge)({
|
|
32
|
-
extend: {
|
|
33
|
-
classGroups: {
|
|
34
|
-
z: [
|
|
35
|
-
"z-content",
|
|
36
|
-
"z-nav",
|
|
37
|
-
"z-overlay",
|
|
38
|
-
"z-modal",
|
|
39
|
-
"z-search",
|
|
40
|
-
"z-toast",
|
|
41
|
-
"z-progress"
|
|
42
|
-
]
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
});
|
|
46
|
-
function cn(...inputs) {
|
|
47
|
-
return twMerge((0, import_clsx.clsx)(inputs));
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
// src/kernel/components/mdx/components/callout.tsx
|
|
51
|
-
var import_class_variance_authority = require("class-variance-authority");
|
|
52
|
-
var import_jsx_runtime = require("react/jsx-runtime");
|
|
53
|
-
var calloutVariants = (0, import_class_variance_authority.cva)(
|
|
54
|
-
"my-6 rounded-callout border p-4 text-sm leading-6 [--callout-bg:color-mix(in_oklab,var(--callout-color)_8%,var(--surface-2))] [--callout-border:color-mix(in_oklab,var(--callout-color)_36%,var(--stroke-2))] [--callout-fg:var(--foreground-2)] [--callout-solid:var(--callout-color)] [--callout-solid-fg:var(--accent-foreground)] [--callout-title:var(--foreground-1)]",
|
|
55
|
-
{
|
|
56
|
-
variants: {
|
|
57
|
-
color: {
|
|
58
|
-
blue: "[--callout-color:var(--blue-10,var(--accent-1))]",
|
|
59
|
-
brown: "[--callout-color:var(--brown-10,oklch(44%_0.07_65))]",
|
|
60
|
-
cyan: "[--callout-color:var(--cyan-10,oklch(48%_0.11_220))]",
|
|
61
|
-
default: "[--callout-color:var(--foreground-1)] [--callout-solid-fg:var(--surface-1)]",
|
|
62
|
-
gray: "[--callout-color:var(--foreground-1)] [--callout-solid-fg:var(--surface-1)]",
|
|
63
|
-
green: "[--callout-color:var(--green-10,oklch(47%_0.13_145))]",
|
|
64
|
-
lime: "[--callout-color:var(--lime-10,oklch(55%_0.14_125))]",
|
|
65
|
-
navy: "[--callout-color:var(--navy-10,oklch(34%_0.12_265))]",
|
|
66
|
-
orange: "[--callout-color:var(--orange-10,oklch(58%_0.16_55))]",
|
|
67
|
-
pink: "[--callout-color:var(--pink-10,oklch(55%_0.18_350))]",
|
|
68
|
-
purple: "[--callout-color:var(--purple-10,oklch(48%_0.18_300))]",
|
|
69
|
-
red: "[--callout-color:var(--red-10,oklch(52%_0.18_30))]",
|
|
70
|
-
teal: "[--callout-color:var(--teal-10,oklch(48%_0.12_185))]",
|
|
71
|
-
white: "[--callout-color:var(--surface-1)] [--callout-solid-fg:var(--foreground-1)]",
|
|
72
|
-
yellow: "[--callout-color:var(--yellow-10,oklch(62%_0.14_90))]"
|
|
73
|
-
},
|
|
74
|
-
variant: {
|
|
75
|
-
outline: "border-[var(--callout-border)] bg-transparent text-[var(--callout-fg)]",
|
|
76
|
-
soft: "border-[var(--callout-border)] bg-[var(--callout-bg)] text-[var(--callout-fg)]",
|
|
77
|
-
solid: "border-[var(--callout-solid)] bg-[var(--callout-solid)] text-[var(--callout-solid-fg)]"
|
|
78
|
-
}
|
|
79
|
-
},
|
|
80
|
-
defaultVariants: {
|
|
81
|
-
color: "default",
|
|
82
|
-
variant: "soft"
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
);
|
|
86
|
-
function Callout({
|
|
87
|
-
children,
|
|
88
|
-
className,
|
|
89
|
-
color,
|
|
90
|
-
icon,
|
|
91
|
-
title,
|
|
92
|
-
variant
|
|
93
|
-
}) {
|
|
94
|
-
const resolvedVariant = variant ?? "soft";
|
|
95
|
-
const hasIcon = icon !== void 0 && icon !== null && icon !== false;
|
|
96
|
-
const hasTitle = title !== void 0 && title !== null && title !== false;
|
|
97
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
98
|
-
"aside",
|
|
99
|
-
{
|
|
100
|
-
"data-color": color ?? "default",
|
|
101
|
-
"data-variant": resolvedVariant,
|
|
102
|
-
className: cn(calloutVariants({ color, variant }), className),
|
|
103
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: cn(hasIcon ? "grid grid-cols-[auto_1fr] gap-x-3" : ""), children: [
|
|
104
|
-
hasIcon ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
105
|
-
"span",
|
|
106
|
-
{
|
|
107
|
-
"aria-hidden": "true",
|
|
108
|
-
className: cn(
|
|
109
|
-
"mt-[0.1875rem] flex size-4 shrink-0 items-center justify-center",
|
|
110
|
-
resolvedVariant === "solid" ? "text-inherit" : "text-[var(--callout-color)]",
|
|
111
|
-
"[&_svg]:size-4 [&_svg]:shrink-0"
|
|
112
|
-
),
|
|
113
|
-
children: icon
|
|
114
|
-
}
|
|
115
|
-
) : null,
|
|
116
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { children: [
|
|
117
|
-
hasTitle ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
118
|
-
"p",
|
|
119
|
-
{
|
|
120
|
-
className: cn(
|
|
121
|
-
"font-medium",
|
|
122
|
-
resolvedVariant === "solid" ? "text-inherit" : "text-[var(--callout-title)]"
|
|
123
|
-
),
|
|
124
|
-
children: title
|
|
125
|
-
}
|
|
126
|
-
) : null,
|
|
127
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: cn(hasTitle ? "mt-1" : ""), children })
|
|
128
|
-
] })
|
|
129
|
-
] })
|
|
130
|
-
}
|
|
131
|
-
);
|
|
132
|
-
}
|
|
133
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
134
|
-
0 && (module.exports = {
|
|
135
|
-
Callout,
|
|
136
|
-
calloutVariants
|
|
137
|
-
});
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
3
|
-
import { VariantProps } from 'class-variance-authority';
|
|
4
|
-
import { ReactNode } from 'react';
|
|
5
|
-
|
|
6
|
-
declare const calloutVariants: (props?: ({
|
|
7
|
-
color?: "blue" | "brown" | "cyan" | "default" | "gray" | "green" | "lime" | "navy" | "orange" | "pink" | "purple" | "red" | "teal" | "white" | "yellow" | null | undefined;
|
|
8
|
-
variant?: "outline" | "soft" | "solid" | null | undefined;
|
|
9
|
-
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
10
|
-
type CalloutProps = VariantProps<typeof calloutVariants> & {
|
|
11
|
-
children?: ReactNode;
|
|
12
|
-
className?: string;
|
|
13
|
-
icon?: ReactNode;
|
|
14
|
-
title?: ReactNode;
|
|
15
|
-
};
|
|
16
|
-
declare function Callout({ children, className, color, icon, title, variant, }: CalloutProps): react_jsx_runtime.JSX.Element;
|
|
17
|
-
|
|
18
|
-
export { Callout, type CalloutProps, calloutVariants };
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
|
|
20
|
-
// src/kernel/components/mdx/components/code-block.tsx
|
|
21
|
-
var code_block_exports = {};
|
|
22
|
-
__export(code_block_exports, {
|
|
23
|
-
CodeBlock: () => CodeBlock
|
|
24
|
-
});
|
|
25
|
-
module.exports = __toCommonJS(code_block_exports);
|
|
26
|
-
var import_pre = require("./pre.js");
|
|
27
|
-
var import_jsx_runtime = require("react/jsx-runtime");
|
|
28
|
-
function CodeBlock({
|
|
29
|
-
children,
|
|
30
|
-
code,
|
|
31
|
-
language,
|
|
32
|
-
...props
|
|
33
|
-
}) {
|
|
34
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_pre.Pre, { "data-language": language, ...props, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("code", { children: code ?? children }) });
|
|
35
|
-
}
|
|
36
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
37
|
-
0 && (module.exports = {
|
|
38
|
-
CodeBlock
|
|
39
|
-
});
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
|
|
3
|
-
type CodeBlockProps = React.ComponentPropsWithoutRef<"pre"> & {
|
|
4
|
-
code?: string;
|
|
5
|
-
language?: string;
|
|
6
|
-
};
|
|
7
|
-
declare function CodeBlock({ children, code, language, ...props }: CodeBlockProps): react_jsx_runtime.JSX.Element;
|
|
8
|
-
|
|
9
|
-
export { CodeBlock, type CodeBlockProps };
|