@publish.os/nextjs 0.0.1-alpha.2 → 0.0.1-alpha.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -9
- package/dist/cache/tags.cjs +3 -0
- package/dist/cache/tags.d.cts +1 -0
- package/dist/cache/tags.d.ts +1 -0
- package/dist/cache/tags.js +3 -0
- package/dist/config.cjs +78 -0
- package/dist/config.d.cts +101 -0
- package/dist/config.d.ts +101 -0
- package/dist/config.js +48 -0
- package/dist/index.cjs +1043 -124
- package/dist/index.d.cts +11 -7
- package/dist/index.d.ts +11 -7
- package/dist/index.js +1031 -111
- package/dist/kernel/components/blocks/AgentActions.cjs +425 -0
- package/dist/kernel/components/blocks/AgentActions.d.cts +52 -0
- package/dist/kernel/components/blocks/AgentActions.d.ts +52 -0
- package/dist/kernel/components/blocks/AgentActions.js +429 -0
- package/dist/kernel/components/blocks/animated-icon-swap.cjs +101 -0
- package/dist/kernel/components/blocks/animated-icon-swap.d.cts +16 -0
- package/dist/kernel/components/blocks/animated-icon-swap.d.ts +16 -0
- package/dist/kernel/components/blocks/animated-icon-swap.js +74 -0
- package/dist/kernel/components/blocks/color-palette.cjs +413 -0
- package/dist/kernel/components/blocks/color-palette.d.cts +7 -0
- package/dist/kernel/components/blocks/color-palette.d.ts +7 -0
- package/dist/kernel/components/blocks/color-palette.js +407 -0
- package/dist/kernel/components/blocks/design-system-preview.cjs +592 -0
- package/dist/kernel/components/blocks/design-system-preview.d.cts +29 -0
- package/dist/kernel/components/blocks/design-system-preview.d.ts +29 -0
- package/dist/kernel/components/blocks/design-system-preview.js +655 -0
- package/dist/kernel/components/blocks/link-playground.cjs +816 -0
- package/dist/kernel/components/blocks/link-playground.d.cts +5 -0
- package/dist/kernel/components/blocks/link-playground.d.ts +5 -0
- package/dist/kernel/components/blocks/link-playground.js +792 -0
- package/dist/kernel/components/blocks/logo-block.cjs +156 -0
- package/dist/kernel/components/blocks/logo-block.d.cts +21 -0
- package/dist/kernel/components/blocks/logo-block.d.ts +21 -0
- package/dist/kernel/components/blocks/logo-block.js +129 -0
- package/dist/{components → kernel/components/blocks}/nav-breadcrumb.cjs +19 -38
- package/dist/kernel/components/blocks/nav-breadcrumb.d.cts +11 -0
- package/dist/kernel/components/blocks/nav-breadcrumb.d.ts +11 -0
- package/dist/{components → kernel/components/blocks}/nav-breadcrumb.js +22 -30
- package/dist/kernel/components/blocks/navbar.cjs +154 -0
- package/dist/kernel/components/blocks/navbar.d.cts +16 -0
- package/dist/kernel/components/blocks/navbar.d.ts +16 -0
- package/dist/kernel/components/blocks/navbar.js +122 -0
- package/dist/kernel/components/blocks/navigation-progress-playground.cjs +735 -0
- package/dist/kernel/components/blocks/navigation-progress-playground.d.cts +5 -0
- package/dist/kernel/components/blocks/navigation-progress-playground.d.ts +5 -0
- package/dist/kernel/components/blocks/navigation-progress-playground.js +722 -0
- package/dist/kernel/components/blocks/navigation-progress.cjs +270 -0
- package/dist/kernel/components/blocks/navigation-progress.d.cts +16 -0
- package/dist/kernel/components/blocks/navigation-progress.d.ts +16 -0
- package/dist/kernel/components/blocks/navigation-progress.js +249 -0
- package/dist/kernel/components/blocks/next-prev.cjs +142 -0
- package/dist/kernel/components/blocks/next-prev.d.cts +11 -0
- package/dist/kernel/components/blocks/next-prev.d.ts +11 -0
- package/dist/kernel/components/blocks/next-prev.js +105 -0
- package/dist/{components → kernel/components/blocks}/page-list.cjs +7 -16
- package/dist/{components → kernel/components/blocks}/page-list.d.cts +1 -1
- package/dist/{components → kernel/components/blocks}/page-list.d.ts +1 -1
- package/dist/{components → kernel/components/blocks}/page-list.js +6 -5
- package/dist/kernel/components/blocks/search.cjs +717 -0
- package/dist/kernel/components/blocks/search.d.cts +77 -0
- package/dist/kernel/components/blocks/search.d.ts +77 -0
- package/dist/kernel/components/blocks/search.js +697 -0
- package/dist/kernel/components/blocks/sidebar-node.cjs +309 -0
- package/dist/kernel/components/blocks/sidebar-node.d.cts +8 -0
- package/dist/kernel/components/blocks/sidebar-node.d.ts +8 -0
- package/dist/kernel/components/blocks/sidebar-node.js +272 -0
- package/dist/kernel/components/blocks/sidebar.cjs +317 -0
- package/dist/kernel/components/blocks/sidebar.d.cts +33 -0
- package/dist/kernel/components/blocks/sidebar.d.ts +33 -0
- package/dist/kernel/components/blocks/sidebar.js +302 -0
- package/dist/kernel/components/blocks/theme-toggle.cjs +31 -0
- package/dist/kernel/components/blocks/theme-toggle.d.cts +6 -0
- package/dist/kernel/components/blocks/theme-toggle.d.ts +6 -0
- package/dist/kernel/components/blocks/theme-toggle.js +7 -0
- package/dist/kernel/components/blocks/toc.cjs +356 -0
- package/dist/kernel/components/blocks/toc.d.cts +10 -0
- package/dist/kernel/components/blocks/toc.d.ts +10 -0
- package/dist/kernel/components/blocks/toc.js +330 -0
- package/dist/kernel/components/mdx/components/blockquote.cjs +66 -0
- package/dist/kernel/components/mdx/components/blockquote.d.cts +6 -0
- package/dist/kernel/components/mdx/components/blockquote.d.ts +6 -0
- package/dist/kernel/components/mdx/components/blockquote.js +39 -0
- package/dist/kernel/components/mdx/components/callout.cjs +137 -0
- package/dist/kernel/components/mdx/components/callout.d.cts +18 -0
- package/dist/kernel/components/mdx/components/callout.d.ts +18 -0
- package/dist/kernel/components/mdx/components/callout.js +109 -0
- package/dist/kernel/components/mdx/components/code-block.cjs +39 -0
- package/dist/kernel/components/mdx/components/code-block.d.cts +9 -0
- package/dist/kernel/components/mdx/components/code-block.d.ts +9 -0
- package/dist/kernel/components/mdx/components/code-block.js +14 -0
- package/dist/kernel/components/mdx/components/figure-caption.cjs +63 -0
- package/dist/kernel/components/mdx/components/figure-caption.d.cts +6 -0
- package/dist/kernel/components/mdx/components/figure-caption.d.ts +6 -0
- package/dist/kernel/components/mdx/components/figure-caption.js +36 -0
- package/dist/kernel/components/mdx/components/figure.cjs +78 -0
- package/dist/kernel/components/mdx/components/figure.d.cts +10 -0
- package/dist/kernel/components/mdx/components/figure.d.ts +10 -0
- package/dist/kernel/components/mdx/components/figure.js +53 -0
- package/dist/kernel/components/mdx/components/footnotes.cjs +66 -0
- package/dist/kernel/components/mdx/components/footnotes.d.cts +6 -0
- package/dist/kernel/components/mdx/components/footnotes.d.ts +6 -0
- package/dist/kernel/components/mdx/components/footnotes.js +39 -0
- package/dist/kernel/components/mdx/components/heading-copy-link.cjs +108 -0
- package/dist/kernel/components/mdx/components/heading-copy-link.d.cts +23 -0
- package/dist/kernel/components/mdx/components/heading-copy-link.d.ts +23 -0
- package/dist/kernel/components/mdx/components/heading-copy-link.js +81 -0
- package/dist/kernel/components/mdx/components/heading.cjs +166 -0
- package/dist/kernel/components/mdx/components/heading.d.cts +8 -0
- package/dist/kernel/components/mdx/components/heading.d.ts +8 -0
- package/dist/kernel/components/mdx/components/heading.js +144 -0
- package/dist/kernel/components/mdx/components/hr.cjs +34 -0
- package/dist/kernel/components/mdx/components/hr.d.cts +9 -0
- package/dist/kernel/components/mdx/components/hr.d.ts +9 -0
- package/dist/kernel/components/mdx/components/hr.js +9 -0
- package/dist/kernel/components/mdx/components/image-zoom.cjs +49 -0
- package/dist/kernel/components/mdx/components/image-zoom.d.cts +10 -0
- package/dist/kernel/components/mdx/components/image-zoom.d.ts +10 -0
- package/dist/kernel/components/mdx/components/image-zoom.js +15 -0
- package/dist/kernel/components/mdx/components/image.cjs +192 -0
- package/dist/kernel/components/mdx/components/image.d.cts +21 -0
- package/dist/kernel/components/mdx/components/image.d.ts +21 -0
- package/dist/kernel/components/mdx/components/image.js +157 -0
- package/dist/kernel/components/mdx/components/inline-code.cjs +66 -0
- package/dist/kernel/components/mdx/components/inline-code.d.cts +6 -0
- package/dist/kernel/components/mdx/components/inline-code.d.ts +6 -0
- package/dist/kernel/components/mdx/components/inline-code.js +39 -0
- package/dist/kernel/components/mdx/components/kbd.cjs +34 -0
- package/dist/kernel/components/mdx/components/kbd.d.cts +10 -0
- package/dist/kernel/components/mdx/components/kbd.d.ts +10 -0
- package/dist/kernel/components/mdx/components/kbd.js +9 -0
- package/dist/{components/providers.cjs → kernel/components/mdx/components/link.cjs} +20 -15
- package/dist/kernel/components/mdx/components/link.d.cts +11 -0
- package/dist/kernel/components/mdx/components/link.d.ts +11 -0
- package/dist/kernel/components/mdx/components/link.js +26 -0
- package/dist/kernel/components/mdx/components/paragraph.cjs +87 -0
- package/dist/kernel/components/mdx/components/paragraph.d.cts +5 -0
- package/dist/kernel/components/mdx/components/paragraph.d.ts +5 -0
- package/dist/kernel/components/mdx/components/paragraph.js +60 -0
- package/dist/kernel/components/mdx/components/pre.cjs +66 -0
- package/dist/kernel/components/mdx/components/pre.d.cts +6 -0
- package/dist/kernel/components/mdx/components/pre.d.ts +6 -0
- package/dist/kernel/components/mdx/components/pre.js +39 -0
- package/dist/kernel/components/mdx/components/strikethrough.cjs +63 -0
- package/dist/kernel/components/mdx/components/strikethrough.d.cts +6 -0
- package/dist/kernel/components/mdx/components/strikethrough.d.ts +6 -0
- package/dist/kernel/components/mdx/components/strikethrough.js +36 -0
- package/dist/kernel/components/mdx/components/table.cjs +59 -0
- package/dist/kernel/components/mdx/components/table.d.cts +10 -0
- package/dist/kernel/components/mdx/components/table.d.ts +10 -0
- package/dist/kernel/components/mdx/components/table.js +36 -0
- package/dist/kernel/components/mdx/components/task-list.cjs +88 -0
- package/dist/kernel/components/mdx/components/task-list.d.cts +8 -0
- package/dist/kernel/components/mdx/components/task-list.d.ts +8 -0
- package/dist/kernel/components/mdx/components/task-list.js +60 -0
- package/dist/kernel/components/mdx/components/video-player.cjs +173 -0
- package/dist/kernel/components/mdx/components/video-player.d.cts +18 -0
- package/dist/kernel/components/mdx/components/video-player.d.ts +18 -0
- package/dist/kernel/components/mdx/components/video-player.js +147 -0
- package/dist/kernel/components/mdx/components/video.cjs +185 -0
- package/dist/kernel/components/mdx/components/video.d.cts +15 -0
- package/dist/kernel/components/mdx/components/video.d.ts +15 -0
- package/dist/kernel/components/mdx/components/video.js +162 -0
- package/dist/kernel/components/mdx/error-boundary.cjs +62 -0
- package/dist/{mdx → kernel/components/mdx}/error-boundary.d.cts +3 -8
- package/dist/{mdx → kernel/components/mdx}/error-boundary.d.ts +3 -8
- package/dist/kernel/components/mdx/error-boundary.js +38 -0
- package/dist/{mdx → kernel/components/mdx}/error-fallback.cjs +8 -8
- package/dist/{mdx → kernel/components/mdx}/error-fallback.js +8 -8
- package/dist/kernel/components/mdx/mdx.cjs +141 -0
- package/dist/kernel/components/mdx/mdx.d.cts +22 -0
- package/dist/kernel/components/mdx/mdx.d.ts +22 -0
- package/dist/kernel/components/mdx/mdx.js +109 -0
- package/dist/kernel/components/mdx/rehype-heading-ids.cjs +113 -0
- package/dist/kernel/components/mdx/rehype-heading-ids.d.cts +10 -0
- package/dist/kernel/components/mdx/rehype-heading-ids.d.ts +10 -0
- package/dist/kernel/components/mdx/rehype-heading-ids.js +86 -0
- package/dist/kernel/components/mdx/types.cjs +18 -0
- package/dist/kernel/components/mdx/types.d.cts +18 -0
- package/dist/kernel/components/mdx/types.d.ts +18 -0
- package/dist/kernel/components/mdx/types.js +0 -0
- package/dist/kernel/components/ui/accordion.cjs +104 -0
- package/dist/kernel/components/ui/accordion.d.cts +16 -0
- package/dist/kernel/components/ui/accordion.d.ts +16 -0
- package/dist/kernel/components/ui/accordion.js +76 -0
- package/dist/kernel/components/ui/badge.cjs +75 -0
- package/dist/kernel/components/ui/badge.d.cts +12 -0
- package/dist/kernel/components/ui/badge.d.ts +12 -0
- package/dist/kernel/components/ui/badge.js +47 -0
- package/dist/kernel/components/ui/breadcrumb-trail.cjs +238 -0
- package/dist/kernel/components/ui/breadcrumb-trail.d.cts +13 -0
- package/dist/kernel/components/ui/breadcrumb-trail.d.ts +13 -0
- package/dist/kernel/components/ui/breadcrumb-trail.js +225 -0
- package/dist/kernel/components/ui/breadcrumb.cjs +399 -0
- package/dist/kernel/components/ui/breadcrumb.d.cts +52 -0
- package/dist/kernel/components/ui/breadcrumb.d.ts +52 -0
- package/dist/kernel/components/ui/breadcrumb.js +365 -0
- package/dist/kernel/components/ui/button-group.cjs +144 -0
- package/dist/kernel/components/ui/button-group.d.cts +19 -0
- package/dist/kernel/components/ui/button-group.d.ts +19 -0
- package/dist/kernel/components/ui/button-group.js +116 -0
- package/dist/kernel/components/ui/button.cjs +147 -0
- package/dist/kernel/components/ui/button.d.cts +23 -0
- package/dist/kernel/components/ui/button.d.ts +23 -0
- package/dist/kernel/components/ui/button.js +121 -0
- package/dist/kernel/components/ui/card.cjs +133 -0
- package/dist/kernel/components/ui/card.d.cts +17 -0
- package/dist/kernel/components/ui/card.d.ts +17 -0
- package/dist/kernel/components/ui/card.js +101 -0
- package/dist/kernel/components/ui/dialog.cjs +149 -0
- package/dist/kernel/components/ui/dialog.d.cts +22 -0
- package/dist/kernel/components/ui/dialog.d.ts +22 -0
- package/dist/kernel/components/ui/dialog.js +118 -0
- package/dist/kernel/components/ui/drawer.cjs +163 -0
- package/dist/kernel/components/ui/drawer.d.cts +24 -0
- package/dist/kernel/components/ui/drawer.d.ts +24 -0
- package/dist/kernel/components/ui/drawer.js +131 -0
- package/dist/kernel/components/ui/input.cjs +96 -0
- package/dist/kernel/components/ui/input.d.cts +18 -0
- package/dist/kernel/components/ui/input.d.ts +18 -0
- package/dist/kernel/components/ui/input.js +70 -0
- package/dist/kernel/components/ui/kbd.cjs +105 -0
- package/dist/kernel/components/ui/kbd.d.cts +13 -0
- package/dist/kernel/components/ui/kbd.d.ts +13 -0
- package/dist/kernel/components/ui/kbd.js +77 -0
- package/dist/kernel/components/ui/link.cjs +253 -0
- package/dist/kernel/components/ui/link.d.cts +31 -0
- package/dist/kernel/components/ui/link.d.ts +31 -0
- package/dist/kernel/components/ui/link.js +217 -0
- package/dist/kernel/components/ui/menu.cjs +301 -0
- package/dist/kernel/components/ui/menu.d.cts +70 -0
- package/dist/kernel/components/ui/menu.d.ts +70 -0
- package/dist/kernel/components/ui/menu.js +256 -0
- package/dist/kernel/components/ui/meta-key.cjs +34 -0
- package/dist/kernel/components/ui/meta-key.d.cts +12 -0
- package/dist/kernel/components/ui/meta-key.d.ts +12 -0
- package/dist/kernel/components/ui/meta-key.js +9 -0
- package/dist/kernel/components/ui/navigation-menu.cjs +253 -0
- package/dist/kernel/components/ui/navigation-menu.d.cts +47 -0
- package/dist/kernel/components/ui/navigation-menu.d.ts +47 -0
- package/dist/kernel/components/ui/navigation-menu.js +216 -0
- package/dist/kernel/components/ui/popover.cjs +168 -0
- package/dist/kernel/components/ui/popover.d.cts +24 -0
- package/dist/kernel/components/ui/popover.d.ts +24 -0
- package/dist/kernel/components/ui/popover.js +136 -0
- package/dist/kernel/components/ui/progress.cjs +112 -0
- package/dist/kernel/components/ui/progress.d.cts +16 -0
- package/dist/kernel/components/ui/progress.d.ts +16 -0
- package/dist/kernel/components/ui/progress.js +84 -0
- package/dist/kernel/components/ui/scroll-area.cjs +413 -0
- package/dist/kernel/components/ui/scroll-area.d.cts +58 -0
- package/dist/kernel/components/ui/scroll-area.d.ts +58 -0
- package/dist/kernel/components/ui/scroll-area.js +390 -0
- package/dist/kernel/components/ui/select.cjs +244 -0
- package/dist/kernel/components/ui/select.d.cts +40 -0
- package/dist/kernel/components/ui/select.d.ts +40 -0
- package/dist/kernel/components/ui/select.js +205 -0
- package/dist/kernel/components/ui/separator.cjs +73 -0
- package/dist/kernel/components/ui/separator.d.cts +8 -0
- package/dist/kernel/components/ui/separator.d.ts +8 -0
- package/dist/kernel/components/ui/separator.js +48 -0
- package/dist/kernel/components/ui/table.cjs +131 -0
- package/dist/kernel/components/ui/table.d.cts +11 -0
- package/dist/kernel/components/ui/table.d.ts +11 -0
- package/dist/kernel/components/ui/table.js +99 -0
- package/dist/kernel/components/ui/tabs.cjs +450 -0
- package/dist/kernel/components/ui/tabs.d.cts +82 -0
- package/dist/kernel/components/ui/tabs.d.ts +82 -0
- package/dist/kernel/components/ui/tabs.js +409 -0
- package/dist/kernel/components/ui/text.cjs +184 -0
- package/dist/kernel/components/ui/text.d.cts +17 -0
- package/dist/kernel/components/ui/text.d.ts +17 -0
- package/dist/kernel/components/ui/text.js +156 -0
- package/dist/kernel/components/ui/theme-toggle.cjs +108 -0
- package/dist/kernel/components/ui/theme-toggle.d.cts +10 -0
- package/dist/kernel/components/ui/theme-toggle.d.ts +10 -0
- package/dist/kernel/components/ui/theme-toggle.js +84 -0
- package/dist/kernel/components/ui/toast.cjs +154 -0
- package/dist/kernel/components/ui/toast.d.cts +26 -0
- package/dist/kernel/components/ui/toast.d.ts +26 -0
- package/dist/kernel/components/ui/toast.js +120 -0
- package/dist/kernel/components/ui/tooltip.cjs +127 -0
- package/dist/kernel/components/ui/tooltip.d.cts +20 -0
- package/dist/kernel/components/ui/tooltip.d.ts +20 -0
- package/dist/kernel/components/ui/tooltip.js +97 -0
- package/dist/kernel/defaults.registry.cjs +541 -0
- package/dist/kernel/defaults.registry.d.cts +469 -0
- package/dist/kernel/defaults.registry.d.ts +469 -0
- package/dist/kernel/defaults.registry.js +516 -0
- package/dist/kernel/routes/agent/markdown.cjs +202 -0
- package/dist/kernel/routes/agent/markdown.d.cts +58 -0
- package/dist/kernel/routes/agent/markdown.d.ts +58 -0
- package/dist/kernel/routes/agent/markdown.js +174 -0
- package/dist/{layouts → kernel/routes/layouts}/group.cjs +39 -15
- package/dist/kernel/routes/layouts/group.d.cts +20 -0
- package/dist/kernel/routes/layouts/group.d.ts +20 -0
- package/dist/{layouts → kernel/routes/layouts}/group.js +39 -15
- package/dist/kernel/routes/metadata/feed.cjs +293 -0
- package/dist/kernel/routes/metadata/feed.d.cts +20 -0
- package/dist/kernel/routes/metadata/feed.d.ts +20 -0
- package/dist/kernel/routes/metadata/feed.js +265 -0
- package/dist/kernel/routes/metadata/llms.cjs +239 -0
- package/dist/kernel/routes/metadata/llms.d.cts +26 -0
- package/dist/kernel/routes/metadata/llms.d.ts +26 -0
- package/dist/kernel/routes/metadata/llms.js +211 -0
- package/dist/kernel/routes/metadata/og-image.cjs +630 -0
- package/dist/kernel/routes/metadata/og-image.d.cts +62 -0
- package/dist/kernel/routes/metadata/og-image.d.ts +62 -0
- package/dist/kernel/routes/metadata/og-image.js +604 -0
- package/dist/{routes → kernel/routes/metadata}/robots.cjs +59 -5
- package/dist/{routes → kernel/routes/metadata}/robots.d.cts +2 -1
- package/dist/{routes → kernel/routes/metadata}/robots.d.ts +2 -1
- package/dist/kernel/routes/metadata/robots.js +123 -0
- package/dist/kernel/routes/metadata/sitemap.cjs +192 -0
- package/dist/kernel/routes/metadata/sitemap.d.cts +8 -0
- package/dist/kernel/routes/metadata/sitemap.d.ts +8 -0
- package/dist/kernel/routes/metadata/sitemap.js +166 -0
- package/dist/{pages → kernel/routes/pages}/group.cjs +107 -6
- package/dist/{pages → kernel/routes/pages}/group.d.cts +4 -2
- package/dist/{pages → kernel/routes/pages}/group.d.ts +4 -2
- package/dist/{pages → kernel/routes/pages}/group.js +107 -6
- package/dist/kernel/routes/pages/leaf.cjs +421 -0
- package/dist/kernel/routes/pages/leaf.d.cts +36 -0
- package/dist/kernel/routes/pages/leaf.d.ts +36 -0
- package/dist/kernel/routes/pages/leaf.js +397 -0
- package/dist/{pages → kernel/routes/pages}/root.cjs +108 -6
- package/dist/{pages → kernel/routes/pages}/root.d.cts +4 -2
- package/dist/{pages → kernel/routes/pages}/root.d.ts +4 -2
- package/dist/kernel/routes/pages/root.js +203 -0
- package/dist/keyboard-shortcuts.cjs +345 -0
- package/dist/keyboard-shortcuts.d.cts +34 -0
- package/dist/keyboard-shortcuts.d.ts +34 -0
- package/dist/keyboard-shortcuts.js +326 -0
- package/dist/resolvers/manifest-resolver.cjs +7 -3
- package/dist/resolvers/manifest-resolver.d.cts +2 -2
- package/dist/resolvers/manifest-resolver.d.ts +2 -2
- package/dist/resolvers/manifest-resolver.js +7 -3
- package/dist/search.cjs +411 -0
- package/dist/search.d.cts +20 -0
- package/dist/search.d.ts +20 -0
- package/dist/search.js +393 -0
- package/dist/types.cjs +12 -0
- package/dist/types.d.cts +132 -7
- package/dist/types.d.ts +132 -7
- package/dist/types.js +5 -0
- package/dist/utils/heading-ids.cjs +119 -0
- package/dist/utils/heading-ids.d.cts +15 -0
- package/dist/utils/heading-ids.d.ts +15 -0
- package/dist/utils/heading-ids.js +90 -0
- package/package.json +59 -38
- package/release/package.json +23 -0
- package/release/pnpm-lock.yaml +1192 -0
- package/release/release.json +39 -0
- package/dist/components/color-palette.cjs +0 -408
- package/dist/components/color-palette.d.cts +0 -5
- package/dist/components/color-palette.d.ts +0 -5
- package/dist/components/color-palette.js +0 -388
- package/dist/components/nav-breadcrumb.d.cts +0 -9
- package/dist/components/nav-breadcrumb.d.ts +0 -9
- package/dist/components/providers.d.cts +0 -8
- package/dist/components/providers.d.ts +0 -8
- package/dist/components/providers.js +0 -20
- package/dist/components/site-header.cjs +0 -302
- package/dist/components/site-header.d.cts +0 -12
- package/dist/components/site-header.d.ts +0 -12
- package/dist/components/site-header.js +0 -268
- package/dist/components/theme-toggle.cjs +0 -147
- package/dist/components/theme-toggle.d.cts +0 -5
- package/dist/components/theme-toggle.d.ts +0 -5
- package/dist/components/theme-toggle.js +0 -123
- package/dist/layouts/group.d.cts +0 -15
- package/dist/layouts/group.d.ts +0 -15
- package/dist/mdx/error-boundary.cjs +0 -94
- package/dist/mdx/error-boundary.js +0 -70
- package/dist/mdx/mdx.cjs +0 -182
- package/dist/mdx/mdx.d.cts +0 -10
- package/dist/mdx/mdx.d.ts +0 -10
- package/dist/mdx/mdx.js +0 -147
- package/dist/pages/leaf.cjs +0 -203
- package/dist/pages/leaf.d.cts +0 -23
- package/dist/pages/leaf.d.ts +0 -23
- package/dist/pages/leaf.js +0 -176
- package/dist/pages/root.js +0 -101
- package/dist/routes/llms.cjs +0 -101
- package/dist/routes/llms.d.cts +0 -7
- package/dist/routes/llms.d.ts +0 -7
- package/dist/routes/llms.js +0 -76
- package/dist/routes/robots.js +0 -69
- package/dist/routes/sitemap.cjs +0 -108
- package/dist/routes/sitemap.d.cts +0 -5
- package/dist/routes/sitemap.d.ts +0 -5
- package/dist/routes/sitemap.js +0 -83
- /package/dist/{mdx → kernel/components/mdx}/error-fallback.d.cts +0 -0
- /package/dist/{mdx → kernel/components/mdx}/error-fallback.d.ts +0 -0
|
@@ -0,0 +1,330 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
// src/utils/cn.ts
|
|
4
|
+
import { clsx } from "clsx";
|
|
5
|
+
import { extendTailwindMerge } from "tailwind-merge";
|
|
6
|
+
var twMerge = extendTailwindMerge({
|
|
7
|
+
extend: {
|
|
8
|
+
classGroups: {
|
|
9
|
+
z: [
|
|
10
|
+
"z-content",
|
|
11
|
+
"z-nav",
|
|
12
|
+
"z-overlay",
|
|
13
|
+
"z-modal",
|
|
14
|
+
"z-search",
|
|
15
|
+
"z-toast",
|
|
16
|
+
"z-progress"
|
|
17
|
+
]
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
});
|
|
21
|
+
function cn(...inputs) {
|
|
22
|
+
return twMerge(clsx(inputs));
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
// src/utils/heading-ids.ts
|
|
26
|
+
import { isValidElement } from "react";
|
|
27
|
+
var SELF_CLOSING_TAG_RE = new RegExp("<[^>]+/>", "g");
|
|
28
|
+
var PAIRED_TAG_RE = /<\/?\w[^>]*>/g;
|
|
29
|
+
var MDX_BOLD_RE = /\*\*(.*?)\*\*/g;
|
|
30
|
+
var MDX_ITALIC_RE = /\*(.*?)\*/g;
|
|
31
|
+
var MDX_UNDERLINE_BOLD_RE = /__(.*?)__/g;
|
|
32
|
+
var MDX_UNDERLINE_ITALIC_RE = /_(.*?)_/g;
|
|
33
|
+
var MDX_STRIKETHROUGH_RE = /~~(.*?)~~/g;
|
|
34
|
+
var MDX_INLINE_CODE_RE = /`(.*?)`/g;
|
|
35
|
+
var MDX_LINK_RE = /\[(.*?)\]\(.*?\)/g;
|
|
36
|
+
var NON_ALPHANUMERIC_RE = /[^a-z0-9]+/g;
|
|
37
|
+
var LEADING_TRAILING_HYPHEN_RE = /^-+|-+$/g;
|
|
38
|
+
var LEADING_DIGIT_RE = /^(\d)/;
|
|
39
|
+
var HEADING_RE = /^(#{1,6})[ \t]+(.+?)\s*#*\s*$/gm;
|
|
40
|
+
var FENCED_CODE_RE = /```[\s\S]*?```|~~~[\s\S]*?~~~/g;
|
|
41
|
+
function extractText(node) {
|
|
42
|
+
if (typeof node === "string") return node;
|
|
43
|
+
if (typeof node === "number") return String(node);
|
|
44
|
+
if (node == null || typeof node === "boolean") return "";
|
|
45
|
+
if (Array.isArray(node)) {
|
|
46
|
+
return node.map(extractText).join("");
|
|
47
|
+
}
|
|
48
|
+
if (isValidElement(node)) {
|
|
49
|
+
const element = node;
|
|
50
|
+
return element.props.children === void 0 ? "" : extractText(element.props.children);
|
|
51
|
+
}
|
|
52
|
+
return "";
|
|
53
|
+
}
|
|
54
|
+
function cleanHeadingText(input) {
|
|
55
|
+
const text = typeof input === "string" ? input : extractText(input);
|
|
56
|
+
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();
|
|
57
|
+
}
|
|
58
|
+
function slugify(text) {
|
|
59
|
+
return text.toLowerCase().replace(NON_ALPHANUMERIC_RE, "-").replace(LEADING_TRAILING_HYPHEN_RE, "").replace(LEADING_DIGIT_RE, "id-$1");
|
|
60
|
+
}
|
|
61
|
+
function headingToHTMLId(input) {
|
|
62
|
+
try {
|
|
63
|
+
const id = slugify(cleanHeadingText(input));
|
|
64
|
+
return id || "empty-heading";
|
|
65
|
+
} catch {
|
|
66
|
+
return "empty-heading";
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
function createHeadingIdGenerator() {
|
|
70
|
+
const usedIds = /* @__PURE__ */ new Map();
|
|
71
|
+
return (input) => {
|
|
72
|
+
const baseId = headingToHTMLId(input);
|
|
73
|
+
if (baseId === "empty-heading") return baseId;
|
|
74
|
+
const count = usedIds.get(baseId) ?? 0;
|
|
75
|
+
usedIds.set(baseId, count + 1);
|
|
76
|
+
return count === 0 ? baseId : `${baseId}-${count}`;
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
function extractMdxHeadings(content = "", levels) {
|
|
80
|
+
const [minDepth, maxDepth] = levels;
|
|
81
|
+
const headingId = createHeadingIdGenerator();
|
|
82
|
+
const headings = [];
|
|
83
|
+
const searchableContent = content.replace(FENCED_CODE_RE, "");
|
|
84
|
+
HEADING_RE.lastIndex = 0;
|
|
85
|
+
while (true) {
|
|
86
|
+
const match = HEADING_RE.exec(searchableContent);
|
|
87
|
+
if (!match) break;
|
|
88
|
+
const marker = match[1];
|
|
89
|
+
const rawText = match[2];
|
|
90
|
+
if (!marker || !rawText) continue;
|
|
91
|
+
const level = marker.length;
|
|
92
|
+
const text = cleanHeadingText(rawText);
|
|
93
|
+
const id = headingId(rawText);
|
|
94
|
+
if (!text || id === "empty-heading") continue;
|
|
95
|
+
if (level < minDepth || level > maxDepth) continue;
|
|
96
|
+
headings.push({ id, level, text });
|
|
97
|
+
}
|
|
98
|
+
return headings;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
// src/kernel/components/blocks/toc.tsx
|
|
102
|
+
import { useCallback, useEffect, useMemo, useRef, useState } from "react";
|
|
103
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
104
|
+
var DEFAULT_LEVELS = [2, 3];
|
|
105
|
+
var ACTIVATION_OFFSET = 96;
|
|
106
|
+
var BOTTOM_THRESHOLD = 2;
|
|
107
|
+
var SCROLL_KEYS = /* @__PURE__ */ new Set([
|
|
108
|
+
" ",
|
|
109
|
+
"ArrowDown",
|
|
110
|
+
"ArrowUp",
|
|
111
|
+
"End",
|
|
112
|
+
"Home",
|
|
113
|
+
"PageDown",
|
|
114
|
+
"PageUp"
|
|
115
|
+
]);
|
|
116
|
+
function documentIsAtBottom() {
|
|
117
|
+
const root = document.documentElement;
|
|
118
|
+
return Math.ceil(window.scrollY + window.innerHeight) >= root.scrollHeight - BOTTOM_THRESHOLD;
|
|
119
|
+
}
|
|
120
|
+
function resolveActiveHeading(elements) {
|
|
121
|
+
if (documentIsAtBottom()) return elements.at(-1)?.id ?? "";
|
|
122
|
+
let nextActiveId = elements[0]?.id ?? "";
|
|
123
|
+
for (const element of elements) {
|
|
124
|
+
if (element.getBoundingClientRect().top <= ACTIVATION_OFFSET) {
|
|
125
|
+
nextActiveId = element.id;
|
|
126
|
+
} else {
|
|
127
|
+
break;
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
return nextActiveId;
|
|
131
|
+
}
|
|
132
|
+
function useTocActiveState(headingIds) {
|
|
133
|
+
const [activeId, setActiveId] = useState("");
|
|
134
|
+
const [indicatorStyle, setIndicatorStyle] = useState({
|
|
135
|
+
height: 0,
|
|
136
|
+
transform: 0
|
|
137
|
+
});
|
|
138
|
+
const [scrollMask, setScrollMask] = useState({
|
|
139
|
+
bottom: false,
|
|
140
|
+
top: false
|
|
141
|
+
});
|
|
142
|
+
const clickedIdRef = useRef(null);
|
|
143
|
+
const contentRef = useRef(null);
|
|
144
|
+
const frameRef = useRef(null);
|
|
145
|
+
const viewportRef = useRef(null);
|
|
146
|
+
const clearClickedId = useCallback(() => {
|
|
147
|
+
clickedIdRef.current = null;
|
|
148
|
+
}, []);
|
|
149
|
+
const updateActiveHeading = useCallback(() => {
|
|
150
|
+
if (clickedIdRef.current) {
|
|
151
|
+
setActiveId(
|
|
152
|
+
(current) => current === clickedIdRef.current ? current : clickedIdRef.current ?? ""
|
|
153
|
+
);
|
|
154
|
+
return;
|
|
155
|
+
}
|
|
156
|
+
const elements = headingIds.map((id) => document.getElementById(id)).filter((element) => Boolean(element));
|
|
157
|
+
if (elements.length === 0) return;
|
|
158
|
+
const nextActiveId = resolveActiveHeading(elements);
|
|
159
|
+
setActiveId(
|
|
160
|
+
(current) => current === nextActiveId ? current : nextActiveId
|
|
161
|
+
);
|
|
162
|
+
}, [headingIds]);
|
|
163
|
+
const updateIndicator = useCallback(() => {
|
|
164
|
+
const container = contentRef.current;
|
|
165
|
+
if (!container || !activeId) {
|
|
166
|
+
setIndicatorStyle({ height: 0, transform: 0 });
|
|
167
|
+
return;
|
|
168
|
+
}
|
|
169
|
+
const activeLink = Array.from(
|
|
170
|
+
container.querySelectorAll("[data-toc-link]")
|
|
171
|
+
).find((link) => link.dataset.tocId === activeId);
|
|
172
|
+
if (!activeLink) {
|
|
173
|
+
setIndicatorStyle({ height: 0, transform: 0 });
|
|
174
|
+
return;
|
|
175
|
+
}
|
|
176
|
+
const containerRect = container.getBoundingClientRect();
|
|
177
|
+
const activeRect = activeLink.getBoundingClientRect();
|
|
178
|
+
const nextStyle = {
|
|
179
|
+
height: activeRect.height,
|
|
180
|
+
transform: activeRect.top - containerRect.top
|
|
181
|
+
};
|
|
182
|
+
setIndicatorStyle(
|
|
183
|
+
(current) => current.height === nextStyle.height && current.transform === nextStyle.transform ? current : nextStyle
|
|
184
|
+
);
|
|
185
|
+
}, [activeId]);
|
|
186
|
+
const updateViewport = useCallback(() => {
|
|
187
|
+
updateIndicator();
|
|
188
|
+
const viewport = viewportRef.current;
|
|
189
|
+
if (!viewport) return;
|
|
190
|
+
const hasOverflow = viewport.scrollHeight > viewport.clientHeight + 1;
|
|
191
|
+
const nextMask = {
|
|
192
|
+
bottom: hasOverflow && viewport.scrollTop + viewport.clientHeight < viewport.scrollHeight - 1,
|
|
193
|
+
top: hasOverflow && viewport.scrollTop > 0
|
|
194
|
+
};
|
|
195
|
+
setScrollMask(
|
|
196
|
+
(current) => current.top === nextMask.top && current.bottom === nextMask.bottom ? current : nextMask
|
|
197
|
+
);
|
|
198
|
+
}, [updateIndicator]);
|
|
199
|
+
useEffect(() => {
|
|
200
|
+
const scheduleUpdate = () => {
|
|
201
|
+
if (frameRef.current !== null) return;
|
|
202
|
+
frameRef.current = window.requestAnimationFrame(() => {
|
|
203
|
+
frameRef.current = null;
|
|
204
|
+
updateActiveHeading();
|
|
205
|
+
updateViewport();
|
|
206
|
+
});
|
|
207
|
+
};
|
|
208
|
+
const handleKeyDown = (event) => {
|
|
209
|
+
if (SCROLL_KEYS.has(event.key)) clearClickedId();
|
|
210
|
+
};
|
|
211
|
+
scheduleUpdate();
|
|
212
|
+
window.addEventListener("scroll", scheduleUpdate, { passive: true });
|
|
213
|
+
window.addEventListener("resize", scheduleUpdate);
|
|
214
|
+
window.addEventListener("hashchange", scheduleUpdate);
|
|
215
|
+
window.addEventListener("wheel", clearClickedId, { passive: true });
|
|
216
|
+
window.addEventListener("touchstart", clearClickedId, { passive: true });
|
|
217
|
+
window.addEventListener("keydown", handleKeyDown);
|
|
218
|
+
return () => {
|
|
219
|
+
window.removeEventListener("scroll", scheduleUpdate);
|
|
220
|
+
window.removeEventListener("resize", scheduleUpdate);
|
|
221
|
+
window.removeEventListener("hashchange", scheduleUpdate);
|
|
222
|
+
window.removeEventListener("wheel", clearClickedId);
|
|
223
|
+
window.removeEventListener("touchstart", clearClickedId);
|
|
224
|
+
window.removeEventListener("keydown", handleKeyDown);
|
|
225
|
+
if (frameRef.current !== null) {
|
|
226
|
+
window.cancelAnimationFrame(frameRef.current);
|
|
227
|
+
frameRef.current = null;
|
|
228
|
+
}
|
|
229
|
+
};
|
|
230
|
+
}, [clearClickedId, updateActiveHeading, updateViewport]);
|
|
231
|
+
useEffect(() => {
|
|
232
|
+
updateViewport();
|
|
233
|
+
}, [updateViewport]);
|
|
234
|
+
const handleTocClick = useCallback((id) => {
|
|
235
|
+
clickedIdRef.current = id;
|
|
236
|
+
setActiveId(id);
|
|
237
|
+
}, []);
|
|
238
|
+
return {
|
|
239
|
+
activeId,
|
|
240
|
+
contentRef,
|
|
241
|
+
handleTocClick,
|
|
242
|
+
indicatorStyle,
|
|
243
|
+
scrollMask,
|
|
244
|
+
updateViewport,
|
|
245
|
+
viewportRef
|
|
246
|
+
};
|
|
247
|
+
}
|
|
248
|
+
function Toc({ className, content, levels = DEFAULT_LEVELS }) {
|
|
249
|
+
const headings = useMemo(
|
|
250
|
+
() => extractMdxHeadings(content, levels),
|
|
251
|
+
[content, levels]
|
|
252
|
+
);
|
|
253
|
+
const headingIds = useMemo(
|
|
254
|
+
() => headings.map((heading) => heading.id),
|
|
255
|
+
[headings]
|
|
256
|
+
);
|
|
257
|
+
const {
|
|
258
|
+
activeId,
|
|
259
|
+
contentRef,
|
|
260
|
+
handleTocClick,
|
|
261
|
+
indicatorStyle,
|
|
262
|
+
scrollMask,
|
|
263
|
+
updateViewport,
|
|
264
|
+
viewportRef
|
|
265
|
+
} = useTocActiveState(headingIds);
|
|
266
|
+
if (headings.length <= 1) return null;
|
|
267
|
+
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;
|
|
268
|
+
return /* @__PURE__ */ jsxs("nav", { "aria-label": "On this page", className: cn("text-sm", className), children: [
|
|
269
|
+
/* @__PURE__ */ jsx("p", { className: "mb-3 px-3 text-[11px] font-semibold uppercase leading-none tracking-wide text-foreground-3", children: "On this page" }),
|
|
270
|
+
/* @__PURE__ */ jsx(
|
|
271
|
+
"div",
|
|
272
|
+
{
|
|
273
|
+
ref: viewportRef,
|
|
274
|
+
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)]",
|
|
275
|
+
onScroll: updateViewport,
|
|
276
|
+
style: {
|
|
277
|
+
WebkitMaskImage: maskImage,
|
|
278
|
+
maskImage
|
|
279
|
+
},
|
|
280
|
+
children: /* @__PURE__ */ jsxs("div", { ref: contentRef, className: "relative min-w-0 py-1", children: [
|
|
281
|
+
/* @__PURE__ */ jsx("div", { className: "absolute bottom-1 left-0 top-1 w-px rounded-full bg-stroke-3" }),
|
|
282
|
+
/* @__PURE__ */ jsx(
|
|
283
|
+
"div",
|
|
284
|
+
{
|
|
285
|
+
"aria-hidden": "true",
|
|
286
|
+
className: "absolute left-0 w-px rounded-full bg-accent-1 transition-all duration-300 ease-out will-change-transform",
|
|
287
|
+
style: {
|
|
288
|
+
height: indicatorStyle.height,
|
|
289
|
+
transform: `translateY(${indicatorStyle.transform}px) scaleY(${activeId ? 1 : 0.5})`,
|
|
290
|
+
transformOrigin: "top"
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
),
|
|
294
|
+
/* @__PURE__ */ jsx("ol", { className: "flex min-w-0 flex-col gap-0.5 pl-3", children: headings.map((heading, index) => {
|
|
295
|
+
const active = activeId === heading.id;
|
|
296
|
+
return /* @__PURE__ */ jsx(
|
|
297
|
+
"li",
|
|
298
|
+
{
|
|
299
|
+
style: {
|
|
300
|
+
marginLeft: Math.max(heading.level - levels[0], 0) * 12,
|
|
301
|
+
marginTop: heading.level === levels[0] && index > 0 ? 4 : 0
|
|
302
|
+
},
|
|
303
|
+
children: /* @__PURE__ */ jsx(
|
|
304
|
+
"a",
|
|
305
|
+
{
|
|
306
|
+
"aria-current": active ? "location" : void 0,
|
|
307
|
+
className: cn(
|
|
308
|
+
"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",
|
|
309
|
+
active && "bg-surface-active font-medium text-accent-1 shadow-xs"
|
|
310
|
+
),
|
|
311
|
+
"data-state": active ? "heading-active" : void 0,
|
|
312
|
+
"data-toc-id": heading.id,
|
|
313
|
+
"data-toc-link": "",
|
|
314
|
+
href: `#${heading.id}`,
|
|
315
|
+
onClick: () => handleTocClick(heading.id),
|
|
316
|
+
children: /* @__PURE__ */ jsx("span", { className: "block min-w-0 text-wrap break-words", children: heading.text })
|
|
317
|
+
}
|
|
318
|
+
)
|
|
319
|
+
},
|
|
320
|
+
heading.id
|
|
321
|
+
);
|
|
322
|
+
}) })
|
|
323
|
+
] })
|
|
324
|
+
}
|
|
325
|
+
)
|
|
326
|
+
] });
|
|
327
|
+
}
|
|
328
|
+
export {
|
|
329
|
+
Toc
|
|
330
|
+
};
|
|
@@ -0,0 +1,66 @@
|
|
|
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
|
+
});
|
|
@@ -0,0 +1,6 @@
|
|
|
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 };
|
|
@@ -0,0 +1,6 @@
|
|
|
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 };
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
// src/utils/cn.ts
|
|
2
|
+
import { clsx } from "clsx";
|
|
3
|
+
import { extendTailwindMerge } from "tailwind-merge";
|
|
4
|
+
var twMerge = extendTailwindMerge({
|
|
5
|
+
extend: {
|
|
6
|
+
classGroups: {
|
|
7
|
+
z: [
|
|
8
|
+
"z-content",
|
|
9
|
+
"z-nav",
|
|
10
|
+
"z-overlay",
|
|
11
|
+
"z-modal",
|
|
12
|
+
"z-search",
|
|
13
|
+
"z-toast",
|
|
14
|
+
"z-progress"
|
|
15
|
+
]
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
function cn(...inputs) {
|
|
20
|
+
return twMerge(clsx(inputs));
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
// src/kernel/components/mdx/components/blockquote.tsx
|
|
24
|
+
import { jsx } from "react/jsx-runtime";
|
|
25
|
+
function Blockquote({ className, ...props }) {
|
|
26
|
+
return /* @__PURE__ */ jsx(
|
|
27
|
+
"blockquote",
|
|
28
|
+
{
|
|
29
|
+
className: cn(
|
|
30
|
+
"my-6 border-l-2 border-accent-1 pl-4 text-sm leading-7 text-foreground-2",
|
|
31
|
+
className
|
|
32
|
+
),
|
|
33
|
+
...props
|
|
34
|
+
}
|
|
35
|
+
);
|
|
36
|
+
}
|
|
37
|
+
export {
|
|
38
|
+
Blockquote
|
|
39
|
+
};
|
|
@@ -0,0 +1,137 @@
|
|
|
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
|
+
});
|
|
@@ -0,0 +1,18 @@
|
|
|
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 };
|
|
@@ -0,0 +1,18 @@
|
|
|
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 };
|