@publish.os/nextjs 0.0.1-alpha.2 → 0.0.1-alpha.3
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/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 +1039 -123
- package/dist/index.d.cts +11 -7
- package/dist/index.d.ts +11 -7
- package/dist/index.js +1027 -110
- 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 +208 -0
- package/dist/kernel/routes/agent/markdown.d.cts +59 -0
- package/dist/kernel/routes/agent/markdown.d.ts +59 -0
- package/dist/kernel/routes/agent/markdown.js +180 -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 +297 -0
- package/dist/kernel/routes/metadata/feed.d.cts +21 -0
- package/dist/kernel/routes/metadata/feed.d.ts +21 -0
- package/dist/kernel/routes/metadata/feed.js +269 -0
- package/dist/kernel/routes/metadata/llms.cjs +234 -0
- package/dist/kernel/routes/metadata/llms.d.cts +27 -0
- package/dist/kernel/routes/metadata/llms.d.ts +27 -0
- package/dist/kernel/routes/metadata/llms.js +206 -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 +48 -4
- 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 +113 -0
- package/dist/kernel/routes/metadata/sitemap.cjs +182 -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 +156 -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 +36 -39
- 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,792 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
// src/kernel/components/blocks/link-playground.tsx
|
|
4
|
+
import { InlineCode } from "../mdx/components/inline-code.js";
|
|
5
|
+
import { Button } from "../ui/button.js";
|
|
6
|
+
import { Link } from "../ui/link.js";
|
|
7
|
+
import { Tabs, TabsList, TabsPanel, TabsTab } from "../ui/tabs.js";
|
|
8
|
+
|
|
9
|
+
// src/utils/cn.ts
|
|
10
|
+
import { clsx } from "clsx";
|
|
11
|
+
import { extendTailwindMerge } from "tailwind-merge";
|
|
12
|
+
var twMerge = extendTailwindMerge({
|
|
13
|
+
extend: {
|
|
14
|
+
classGroups: {
|
|
15
|
+
z: [
|
|
16
|
+
"z-content",
|
|
17
|
+
"z-nav",
|
|
18
|
+
"z-overlay",
|
|
19
|
+
"z-modal",
|
|
20
|
+
"z-search",
|
|
21
|
+
"z-toast",
|
|
22
|
+
"z-progress"
|
|
23
|
+
]
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
function cn(...inputs) {
|
|
28
|
+
return twMerge(clsx(inputs));
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
// src/kernel/components/blocks/link-playground.tsx
|
|
32
|
+
import { useId, useMemo, useState } from "react";
|
|
33
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
34
|
+
var defaultSettings = {
|
|
35
|
+
defaultColor: "var(--foreground-1)",
|
|
36
|
+
accentColor: "var(--accent-1)",
|
|
37
|
+
underlineColor: "currentColor",
|
|
38
|
+
hoverUnderlineColor: "currentColor",
|
|
39
|
+
activeUnderlineColor: "currentColor",
|
|
40
|
+
textOpacity: 90,
|
|
41
|
+
hoverTextOpacity: 100,
|
|
42
|
+
activeTextOpacity: 100,
|
|
43
|
+
standaloneTextOpacity: 90,
|
|
44
|
+
underlineOpacity: 18,
|
|
45
|
+
hoverUnderlineOpacity: 38,
|
|
46
|
+
standaloneHoverUnderlineOpacity: 38,
|
|
47
|
+
activeUnderlineOpacity: 38,
|
|
48
|
+
underlineThickness: 1,
|
|
49
|
+
underlineOffset: -0.08,
|
|
50
|
+
transitionDuration: 90,
|
|
51
|
+
transitionEase: "ease-out",
|
|
52
|
+
lightnessDelta: 0,
|
|
53
|
+
chromaScale: 1,
|
|
54
|
+
hueShift: 0
|
|
55
|
+
};
|
|
56
|
+
var toneOrder = ["default", "accent"];
|
|
57
|
+
var variantOrder = ["link.standalone", "link.inline"];
|
|
58
|
+
function adjustedColor(color, settings) {
|
|
59
|
+
if (settings.lightnessDelta === 0 && settings.chromaScale === 1 && settings.hueShift === 0) {
|
|
60
|
+
return color;
|
|
61
|
+
}
|
|
62
|
+
return `oklch(from ${color} calc(l + ${settings.lightnessDelta / 100}) calc(c * ${settings.chromaScale}) calc(h + ${settings.hueShift}))`;
|
|
63
|
+
}
|
|
64
|
+
function linkStyle({
|
|
65
|
+
tone,
|
|
66
|
+
variant,
|
|
67
|
+
settings
|
|
68
|
+
}) {
|
|
69
|
+
const baseColor = tone === "accent" ? settings.accentColor : settings.defaultColor;
|
|
70
|
+
const isStandalone = variant === "link.standalone";
|
|
71
|
+
const textOpacity = isStandalone ? settings.standaloneTextOpacity : settings.textOpacity;
|
|
72
|
+
const hoverTextOpacity = isStandalone ? settings.standaloneTextOpacity : settings.hoverTextOpacity;
|
|
73
|
+
const underlineOpacity = isStandalone ? 0 : settings.underlineOpacity;
|
|
74
|
+
const hoverUnderlineOpacity = isStandalone ? settings.standaloneHoverUnderlineOpacity : settings.hoverUnderlineOpacity;
|
|
75
|
+
const underlineColor = settings.underlineColor;
|
|
76
|
+
const resolvedUnderlineColor = underlineColor === "currentColor" ? baseColor : underlineColor;
|
|
77
|
+
const resolvedHoverUnderlineColor = settings.hoverUnderlineColor === "currentColor" ? baseColor : settings.hoverUnderlineColor;
|
|
78
|
+
const resolvedActiveUnderlineColor = settings.activeUnderlineColor === "currentColor" ? baseColor : settings.activeUnderlineColor;
|
|
79
|
+
return {
|
|
80
|
+
"--link-active-text-opacity": `${settings.activeTextOpacity}%`,
|
|
81
|
+
"--link-active-underline-color": adjustedColor(
|
|
82
|
+
resolvedActiveUnderlineColor,
|
|
83
|
+
settings
|
|
84
|
+
),
|
|
85
|
+
"--link-active-underline-opacity": `${settings.activeUnderlineOpacity}%`,
|
|
86
|
+
"--link-color": adjustedColor(baseColor, settings),
|
|
87
|
+
"--link-hover-text-opacity": `${hoverTextOpacity}%`,
|
|
88
|
+
"--link-hover-underline-color": adjustedColor(
|
|
89
|
+
resolvedHoverUnderlineColor,
|
|
90
|
+
settings
|
|
91
|
+
),
|
|
92
|
+
"--link-hover-underline-opacity": `${hoverUnderlineOpacity}%`,
|
|
93
|
+
"--link-text-opacity": `${textOpacity}%`,
|
|
94
|
+
"--link-transition-duration": `${settings.transitionDuration}ms`,
|
|
95
|
+
"--link-underline-color": adjustedColor(resolvedUnderlineColor, settings),
|
|
96
|
+
"--link-underline-offset": `${settings.underlineOffset}em`,
|
|
97
|
+
"--link-underline-opacity": `${underlineOpacity}%`,
|
|
98
|
+
"--link-underline-thickness": `${settings.underlineThickness}px`,
|
|
99
|
+
transition: `color ${settings.transitionDuration}ms ${settings.transitionEase}`
|
|
100
|
+
};
|
|
101
|
+
}
|
|
102
|
+
function buildOutput(settings) {
|
|
103
|
+
return `/* Link candidate */
|
|
104
|
+
const linkBase =
|
|
105
|
+
"group/link inline break-words rounded-button font-medium !no-underline hover:!no-underline active:!no-underline transition-colors duration-[${settings.transitionDuration}ms]";
|
|
106
|
+
|
|
107
|
+
const linkLabel =
|
|
108
|
+
"relative inline !no-underline after:absolute after:bottom-[${settings.underlineOffset}em] after:left-0 after:h-[${settings.underlineThickness}px] after:w-full after:rounded-inline-code after:bg-current after:content-['']";
|
|
109
|
+
|
|
110
|
+
const inline =
|
|
111
|
+
"[--link-text-opacity:${settings.textOpacity}%] [--link-hover-text-opacity:${settings.hoverTextOpacity}%] [--link-active-text-opacity:${settings.activeTextOpacity}%] [--link-underline-opacity:${settings.underlineOpacity}%] [--link-hover-underline-opacity:${settings.hoverUnderlineOpacity}%] [--link-active-underline-opacity:${settings.activeUnderlineOpacity}%]";
|
|
112
|
+
|
|
113
|
+
const standalone =
|
|
114
|
+
"[--link-text-opacity:${settings.standaloneTextOpacity}%] [--link-hover-text-opacity:${settings.standaloneTextOpacity}%] [--link-active-text-opacity:${settings.activeTextOpacity}%] [--link-underline-opacity:0%] [--link-hover-underline-opacity:${settings.standaloneHoverUnderlineOpacity}%] [--link-active-underline-opacity:${settings.activeUnderlineOpacity}%]";
|
|
115
|
+
|
|
116
|
+
/* CSS variables */
|
|
117
|
+
--link-text-opacity: ${settings.textOpacity}%;
|
|
118
|
+
--link-hover-text-opacity: ${settings.hoverTextOpacity}%;
|
|
119
|
+
--link-active-text-opacity: ${settings.activeTextOpacity}%;
|
|
120
|
+
--link-standalone-text-opacity: ${settings.standaloneTextOpacity}%;
|
|
121
|
+
--link-underline-opacity: ${settings.underlineOpacity}%;
|
|
122
|
+
--link-hover-underline-opacity: ${settings.hoverUnderlineOpacity}%;
|
|
123
|
+
--link-standalone-hover-underline-opacity: ${settings.standaloneHoverUnderlineOpacity}%;
|
|
124
|
+
--link-active-underline-opacity: ${settings.activeUnderlineOpacity}%;
|
|
125
|
+
--link-underline-thickness: ${settings.underlineThickness}px;
|
|
126
|
+
--link-underline-offset: ${settings.underlineOffset}em;
|
|
127
|
+
--link-transition-duration: ${settings.transitionDuration}ms;
|
|
128
|
+
--link-transition-ease: ${settings.transitionEase};
|
|
129
|
+
--link-oklch-lightness-delta: ${settings.lightnessDelta / 100};
|
|
130
|
+
--link-oklch-chroma-scale: ${settings.chromaScale};
|
|
131
|
+
--link-oklch-hue-shift: ${settings.hueShift};`;
|
|
132
|
+
}
|
|
133
|
+
function NumberControl({
|
|
134
|
+
label,
|
|
135
|
+
max,
|
|
136
|
+
min,
|
|
137
|
+
onChange,
|
|
138
|
+
step = 1,
|
|
139
|
+
unit,
|
|
140
|
+
value
|
|
141
|
+
}) {
|
|
142
|
+
const id = useId();
|
|
143
|
+
return /* @__PURE__ */ jsxs("div", { className: "grid gap-2", children: [
|
|
144
|
+
/* @__PURE__ */ jsxs(
|
|
145
|
+
"label",
|
|
146
|
+
{
|
|
147
|
+
className: "flex items-center justify-between gap-3 text-xs font-medium text-foreground-2",
|
|
148
|
+
htmlFor: id,
|
|
149
|
+
children: [
|
|
150
|
+
/* @__PURE__ */ jsx("span", { children: label }),
|
|
151
|
+
/* @__PURE__ */ jsxs("span", { className: "font-mono text-[11px] text-foreground-3", children: [
|
|
152
|
+
value,
|
|
153
|
+
unit
|
|
154
|
+
] })
|
|
155
|
+
]
|
|
156
|
+
}
|
|
157
|
+
),
|
|
158
|
+
/* @__PURE__ */ jsxs("div", { className: "grid grid-cols-[1fr_4.75rem] items-center gap-3", children: [
|
|
159
|
+
/* @__PURE__ */ jsx(
|
|
160
|
+
"input",
|
|
161
|
+
{
|
|
162
|
+
className: "h-1 w-full accent-foreground-1",
|
|
163
|
+
id,
|
|
164
|
+
max,
|
|
165
|
+
min,
|
|
166
|
+
onChange: (event) => onChange(Number(event.target.value)),
|
|
167
|
+
step,
|
|
168
|
+
type: "range",
|
|
169
|
+
value
|
|
170
|
+
}
|
|
171
|
+
),
|
|
172
|
+
/* @__PURE__ */ jsx(
|
|
173
|
+
"input",
|
|
174
|
+
{
|
|
175
|
+
className: "h-8 rounded-button border border-stroke-2 bg-surface-1 px-2 text-right font-mono text-xs text-foreground-1 outline-none focus:border-accent-1",
|
|
176
|
+
max,
|
|
177
|
+
min,
|
|
178
|
+
onChange: (event) => onChange(Number(event.target.value)),
|
|
179
|
+
step,
|
|
180
|
+
type: "number",
|
|
181
|
+
value
|
|
182
|
+
}
|
|
183
|
+
)
|
|
184
|
+
] })
|
|
185
|
+
] });
|
|
186
|
+
}
|
|
187
|
+
function TextControl({
|
|
188
|
+
label,
|
|
189
|
+
onChange,
|
|
190
|
+
value
|
|
191
|
+
}) {
|
|
192
|
+
const id = useId();
|
|
193
|
+
return /* @__PURE__ */ jsxs(
|
|
194
|
+
"label",
|
|
195
|
+
{
|
|
196
|
+
className: "grid gap-2 text-xs font-medium text-foreground-2",
|
|
197
|
+
htmlFor: id,
|
|
198
|
+
children: [
|
|
199
|
+
label,
|
|
200
|
+
/* @__PURE__ */ jsx(
|
|
201
|
+
"input",
|
|
202
|
+
{
|
|
203
|
+
className: "h-8 rounded-button border border-stroke-2 bg-surface-1 px-2 font-mono text-xs text-foreground-1 outline-none focus:border-accent-1",
|
|
204
|
+
id,
|
|
205
|
+
onChange: (event) => onChange(event.target.value),
|
|
206
|
+
spellCheck: false,
|
|
207
|
+
value
|
|
208
|
+
}
|
|
209
|
+
)
|
|
210
|
+
]
|
|
211
|
+
}
|
|
212
|
+
);
|
|
213
|
+
}
|
|
214
|
+
function SegmentedControl({
|
|
215
|
+
label,
|
|
216
|
+
onChange,
|
|
217
|
+
options,
|
|
218
|
+
value
|
|
219
|
+
}) {
|
|
220
|
+
return /* @__PURE__ */ jsxs("div", { className: "grid gap-2", children: [
|
|
221
|
+
/* @__PURE__ */ jsx("div", { className: "text-xs font-medium text-foreground-2", children: label }),
|
|
222
|
+
/* @__PURE__ */ jsx(
|
|
223
|
+
"div",
|
|
224
|
+
{
|
|
225
|
+
className: "grid rounded-button border border-stroke-2 bg-surface-2 p-1",
|
|
226
|
+
style: {
|
|
227
|
+
gridTemplateColumns: `repeat(${options.length}, minmax(0, 1fr))`
|
|
228
|
+
},
|
|
229
|
+
children: options.map((option) => /* @__PURE__ */ jsx(
|
|
230
|
+
"button",
|
|
231
|
+
{
|
|
232
|
+
className: cn(
|
|
233
|
+
"h-8 rounded-[max(calc(var(--radius-button)_-_0.25rem),0px)] px-2 text-xs font-medium capitalize text-foreground-3 transition-colors",
|
|
234
|
+
option === value && "bg-surface-1 text-foreground-1 shadow-sm"
|
|
235
|
+
),
|
|
236
|
+
onClick: () => onChange(option),
|
|
237
|
+
type: "button",
|
|
238
|
+
children: option
|
|
239
|
+
},
|
|
240
|
+
option
|
|
241
|
+
))
|
|
242
|
+
}
|
|
243
|
+
)
|
|
244
|
+
] });
|
|
245
|
+
}
|
|
246
|
+
function ControlSection({
|
|
247
|
+
children,
|
|
248
|
+
title
|
|
249
|
+
}) {
|
|
250
|
+
return /* @__PURE__ */ jsxs("section", { className: "grid gap-4 border-b border-stroke-3 px-4 py-5", children: [
|
|
251
|
+
/* @__PURE__ */ jsx("h3", { className: "text-xs font-semibold uppercase text-foreground-3", children: title }),
|
|
252
|
+
children
|
|
253
|
+
] });
|
|
254
|
+
}
|
|
255
|
+
function PreviewBlock({
|
|
256
|
+
children,
|
|
257
|
+
title
|
|
258
|
+
}) {
|
|
259
|
+
return /* @__PURE__ */ jsxs("section", { className: "min-h-64 border-b border-r border-stroke-3 bg-white", children: [
|
|
260
|
+
/* @__PURE__ */ jsx("div", { className: "px-5 pt-5 text-sm font-medium text-[#858585]", children: title }),
|
|
261
|
+
/* @__PURE__ */ jsx("div", { className: "flex min-h-52 items-center justify-center px-8 py-8", children })
|
|
262
|
+
] });
|
|
263
|
+
}
|
|
264
|
+
function PlaygroundLink({
|
|
265
|
+
children,
|
|
266
|
+
disabled,
|
|
267
|
+
leftIcon,
|
|
268
|
+
rightIcon,
|
|
269
|
+
settings,
|
|
270
|
+
tone,
|
|
271
|
+
variant
|
|
272
|
+
}) {
|
|
273
|
+
return /* @__PURE__ */ jsx(
|
|
274
|
+
Link,
|
|
275
|
+
{
|
|
276
|
+
color: tone,
|
|
277
|
+
disabled,
|
|
278
|
+
href: "#",
|
|
279
|
+
leftIcon,
|
|
280
|
+
rightIcon,
|
|
281
|
+
style: linkStyle({ settings, tone, variant }),
|
|
282
|
+
variant,
|
|
283
|
+
children
|
|
284
|
+
}
|
|
285
|
+
);
|
|
286
|
+
}
|
|
287
|
+
function LinkSet({ settings }) {
|
|
288
|
+
return /* @__PURE__ */ jsxs("div", { className: "grid justify-items-center gap-6 text-[1.65rem] leading-none", children: [
|
|
289
|
+
/* @__PURE__ */ jsx(
|
|
290
|
+
PlaygroundLink,
|
|
291
|
+
{
|
|
292
|
+
settings,
|
|
293
|
+
tone: "default",
|
|
294
|
+
variant: "link.standalone",
|
|
295
|
+
children: "Default standalone"
|
|
296
|
+
}
|
|
297
|
+
),
|
|
298
|
+
/* @__PURE__ */ jsx(PlaygroundLink, { settings, tone: "accent", variant: "link.inline", children: "Accent inline" }),
|
|
299
|
+
/* @__PURE__ */ jsx(
|
|
300
|
+
PlaygroundLink,
|
|
301
|
+
{
|
|
302
|
+
leftIcon: /* @__PURE__ */ jsx("span", { "aria-hidden": "true", children: "\u2190" }),
|
|
303
|
+
settings,
|
|
304
|
+
tone: "default",
|
|
305
|
+
variant: "link.standalone",
|
|
306
|
+
children: "Back to overview"
|
|
307
|
+
}
|
|
308
|
+
),
|
|
309
|
+
/* @__PURE__ */ jsx(
|
|
310
|
+
PlaygroundLink,
|
|
311
|
+
{
|
|
312
|
+
rightIcon: /* @__PURE__ */ jsx("span", { "aria-hidden": "true", children: "\u2197" }),
|
|
313
|
+
settings,
|
|
314
|
+
tone: "accent",
|
|
315
|
+
variant: "link.standalone",
|
|
316
|
+
children: "External resource"
|
|
317
|
+
}
|
|
318
|
+
),
|
|
319
|
+
/* @__PURE__ */ jsx(
|
|
320
|
+
PlaygroundLink,
|
|
321
|
+
{
|
|
322
|
+
disabled: true,
|
|
323
|
+
settings,
|
|
324
|
+
tone: "accent",
|
|
325
|
+
variant: "link.standalone",
|
|
326
|
+
children: "Disabled link"
|
|
327
|
+
}
|
|
328
|
+
),
|
|
329
|
+
/* @__PURE__ */ jsx(Link, { href: "#", size: "lg", variant: "button.primary", children: "Link as button" })
|
|
330
|
+
] });
|
|
331
|
+
}
|
|
332
|
+
function SizeScale({ settings }) {
|
|
333
|
+
return /* @__PURE__ */ jsx("div", { className: "grid justify-items-start gap-3", children: ["xs", "sm", "md", "lg", "xl"].map((size) => /* @__PURE__ */ jsxs(
|
|
334
|
+
Link,
|
|
335
|
+
{
|
|
336
|
+
color: "accent",
|
|
337
|
+
href: "#",
|
|
338
|
+
size,
|
|
339
|
+
style: linkStyle({
|
|
340
|
+
settings,
|
|
341
|
+
tone: "accent",
|
|
342
|
+
variant: "link.standalone"
|
|
343
|
+
}),
|
|
344
|
+
variant: "link.standalone",
|
|
345
|
+
children: [
|
|
346
|
+
size.toUpperCase(),
|
|
347
|
+
" accent standalone"
|
|
348
|
+
]
|
|
349
|
+
},
|
|
350
|
+
size
|
|
351
|
+
)) });
|
|
352
|
+
}
|
|
353
|
+
function MdxSample({ settings }) {
|
|
354
|
+
const inlineStyle = linkStyle({
|
|
355
|
+
settings,
|
|
356
|
+
tone: "accent",
|
|
357
|
+
variant: "link.inline"
|
|
358
|
+
});
|
|
359
|
+
return /* @__PURE__ */ jsxs("div", { className: "max-w-xl text-base leading-8 text-foreground-2", children: [
|
|
360
|
+
/* @__PURE__ */ jsxs("p", { children: [
|
|
361
|
+
"MDX prose with an",
|
|
362
|
+
" ",
|
|
363
|
+
/* @__PURE__ */ jsx(
|
|
364
|
+
Link,
|
|
365
|
+
{
|
|
366
|
+
color: "accent",
|
|
367
|
+
href: "/ds",
|
|
368
|
+
style: inlineStyle,
|
|
369
|
+
variant: "link.inline",
|
|
370
|
+
children: "internal relative link"
|
|
371
|
+
}
|
|
372
|
+
),
|
|
373
|
+
", an",
|
|
374
|
+
" ",
|
|
375
|
+
/* @__PURE__ */ jsx(
|
|
376
|
+
Link,
|
|
377
|
+
{
|
|
378
|
+
color: "accent",
|
|
379
|
+
href: "https://example.com",
|
|
380
|
+
style: inlineStyle,
|
|
381
|
+
variant: "link.inline",
|
|
382
|
+
children: "external link"
|
|
383
|
+
}
|
|
384
|
+
),
|
|
385
|
+
", a",
|
|
386
|
+
" ",
|
|
387
|
+
/* @__PURE__ */ jsx(Link, { color: "accent", href: "#", style: inlineStyle, variant: "link.inline", children: /* @__PURE__ */ jsx("strong", { children: "bold link" }) }),
|
|
388
|
+
", an",
|
|
389
|
+
" ",
|
|
390
|
+
/* @__PURE__ */ jsx(Link, { color: "accent", href: "#", style: inlineStyle, variant: "link.inline", children: /* @__PURE__ */ jsx("em", { children: "italic link" }) }),
|
|
391
|
+
", and",
|
|
392
|
+
" ",
|
|
393
|
+
/* @__PURE__ */ jsx(Link, { color: "accent", href: "#", style: inlineStyle, variant: "link.inline", children: /* @__PURE__ */ jsx(InlineCode, { children: "linked code" }) }),
|
|
394
|
+
"."
|
|
395
|
+
] }),
|
|
396
|
+
/* @__PURE__ */ jsx("h2", { className: "mt-7 text-2xl font-semibold leading-9 text-foreground-1", children: /* @__PURE__ */ jsx(
|
|
397
|
+
Link,
|
|
398
|
+
{
|
|
399
|
+
color: "accent",
|
|
400
|
+
href: "#",
|
|
401
|
+
style: linkStyle({
|
|
402
|
+
settings,
|
|
403
|
+
tone: "accent",
|
|
404
|
+
variant: "link.standalone"
|
|
405
|
+
}),
|
|
406
|
+
variant: "link.standalone",
|
|
407
|
+
children: "Linked heading"
|
|
408
|
+
}
|
|
409
|
+
) })
|
|
410
|
+
] });
|
|
411
|
+
}
|
|
412
|
+
function BlockSamples({ settings }) {
|
|
413
|
+
return /* @__PURE__ */ jsxs("div", { className: "grid w-full max-w-2xl gap-5", children: [
|
|
414
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between border-y border-stroke-3 bg-surface-2 px-5 py-4", children: [
|
|
415
|
+
/* @__PURE__ */ jsx("span", { className: "text-sm font-medium text-foreground-1", children: "publishOS / Docs" }),
|
|
416
|
+
/* @__PURE__ */ jsxs("nav", { className: "flex gap-4", children: [
|
|
417
|
+
/* @__PURE__ */ jsx(
|
|
418
|
+
PlaygroundLink,
|
|
419
|
+
{
|
|
420
|
+
settings,
|
|
421
|
+
tone: "accent",
|
|
422
|
+
variant: "link.standalone",
|
|
423
|
+
children: "Docs"
|
|
424
|
+
}
|
|
425
|
+
),
|
|
426
|
+
/* @__PURE__ */ jsx(
|
|
427
|
+
PlaygroundLink,
|
|
428
|
+
{
|
|
429
|
+
settings,
|
|
430
|
+
tone: "default",
|
|
431
|
+
variant: "link.standalone",
|
|
432
|
+
children: "Blog"
|
|
433
|
+
}
|
|
434
|
+
)
|
|
435
|
+
] })
|
|
436
|
+
] }),
|
|
437
|
+
/* @__PURE__ */ jsxs("div", { className: "rounded-card border border-stroke-2 bg-surface-1 p-5", children: [
|
|
438
|
+
/* @__PURE__ */ jsx("p", { className: "text-xs font-medium uppercase text-foreground-3", children: "Start" }),
|
|
439
|
+
/* @__PURE__ */ jsxs("ol", { className: "mt-3 list-decimal space-y-2 pl-6 text-lg leading-8 text-foreground-2", children: [
|
|
440
|
+
/* @__PURE__ */ jsxs("li", { children: [
|
|
441
|
+
"Connect a",
|
|
442
|
+
" ",
|
|
443
|
+
/* @__PURE__ */ jsx(
|
|
444
|
+
PlaygroundLink,
|
|
445
|
+
{
|
|
446
|
+
settings,
|
|
447
|
+
tone: "accent",
|
|
448
|
+
variant: "link.inline",
|
|
449
|
+
children: "custom domain"
|
|
450
|
+
}
|
|
451
|
+
)
|
|
452
|
+
] }),
|
|
453
|
+
/* @__PURE__ */ jsxs("li", { children: [
|
|
454
|
+
"Review the",
|
|
455
|
+
" ",
|
|
456
|
+
/* @__PURE__ */ jsx(
|
|
457
|
+
PlaygroundLink,
|
|
458
|
+
{
|
|
459
|
+
settings,
|
|
460
|
+
tone: "default",
|
|
461
|
+
variant: "link.inline",
|
|
462
|
+
children: "deployment checklist"
|
|
463
|
+
}
|
|
464
|
+
)
|
|
465
|
+
] })
|
|
466
|
+
] })
|
|
467
|
+
] })
|
|
468
|
+
] });
|
|
469
|
+
}
|
|
470
|
+
function LinkPlayground() {
|
|
471
|
+
const [settings, setSettings] = useState(defaultSettings);
|
|
472
|
+
const [tone, setTone] = useState("accent");
|
|
473
|
+
const [variant, setVariant] = useState("link.standalone");
|
|
474
|
+
const [copyState, setCopyState] = useState("idle");
|
|
475
|
+
const output = useMemo(() => buildOutput(settings), [settings]);
|
|
476
|
+
const previewStyle = linkStyle({ settings, tone, variant });
|
|
477
|
+
const updateNumber = (key, value) => {
|
|
478
|
+
setSettings((current) => ({ ...current, [key]: value }));
|
|
479
|
+
};
|
|
480
|
+
const updateText = (key, value) => {
|
|
481
|
+
setSettings((current) => ({ ...current, [key]: value }));
|
|
482
|
+
};
|
|
483
|
+
const reset = () => setSettings(defaultSettings);
|
|
484
|
+
const copyOutput = async () => {
|
|
485
|
+
await navigator.clipboard.writeText(output);
|
|
486
|
+
setCopyState("copied");
|
|
487
|
+
window.setTimeout(() => setCopyState("idle"), 1200);
|
|
488
|
+
};
|
|
489
|
+
return /* @__PURE__ */ jsx("div", { className: "min-h-screen bg-[#fafafa] text-foreground-1", children: /* @__PURE__ */ jsxs("div", { className: "grid min-h-screen lg:grid-cols-[1fr_24rem]", children: [
|
|
490
|
+
/* @__PURE__ */ jsx("main", { className: "min-h-screen overflow-hidden", children: /* @__PURE__ */ jsxs("div", { className: "grid border-l border-t border-stroke-3", children: [
|
|
491
|
+
/* @__PURE__ */ jsx(PreviewBlock, { title: "Link", children: /* @__PURE__ */ jsx(LinkSet, { settings }) }),
|
|
492
|
+
/* @__PURE__ */ jsx(PreviewBlock, { title: "Focused sample", children: /* @__PURE__ */ jsxs("div", { className: "grid justify-items-center gap-5 text-[2rem] leading-none", children: [
|
|
493
|
+
/* @__PURE__ */ jsxs(
|
|
494
|
+
Link,
|
|
495
|
+
{
|
|
496
|
+
color: tone,
|
|
497
|
+
href: "#",
|
|
498
|
+
style: previewStyle,
|
|
499
|
+
variant,
|
|
500
|
+
children: [
|
|
501
|
+
tone,
|
|
502
|
+
" ",
|
|
503
|
+
variant
|
|
504
|
+
]
|
|
505
|
+
}
|
|
506
|
+
),
|
|
507
|
+
/* @__PURE__ */ jsx("div", { className: "font-mono text-xs text-foreground-3", children: "Hover and press directly" })
|
|
508
|
+
] }) }),
|
|
509
|
+
/* @__PURE__ */ jsx(PreviewBlock, { title: "Size scale", children: /* @__PURE__ */ jsx(SizeScale, { settings }) }),
|
|
510
|
+
/* @__PURE__ */ jsx(PreviewBlock, { title: "MDX", children: /* @__PURE__ */ jsx(MdxSample, { settings }) }),
|
|
511
|
+
/* @__PURE__ */ jsx(PreviewBlock, { title: "Blocks", children: /* @__PURE__ */ jsx(BlockSamples, { settings }) })
|
|
512
|
+
] }) }),
|
|
513
|
+
/* @__PURE__ */ jsxs("aside", { className: "flex max-h-screen min-h-screen flex-col border-l border-stroke-3 bg-surface-1", children: [
|
|
514
|
+
/* @__PURE__ */ jsx("div", { className: "border-b border-stroke-3 px-4 py-4", children: /* @__PURE__ */ jsxs("div", { className: "flex items-start justify-between gap-3", children: [
|
|
515
|
+
/* @__PURE__ */ jsxs("div", { children: [
|
|
516
|
+
/* @__PURE__ */ jsx("h1", { className: "text-sm font-semibold text-foreground-1", children: "Link Playground" }),
|
|
517
|
+
/* @__PURE__ */ jsx("p", { className: "mt-1 text-xs leading-5 text-foreground-3", children: "Tune states, decoration, OKLCH, copy." })
|
|
518
|
+
] }),
|
|
519
|
+
/* @__PURE__ */ jsxs("div", { className: "flex gap-2", children: [
|
|
520
|
+
/* @__PURE__ */ jsx(Button, { onClick: reset, size: "xs", variant: "outline", children: "Reset" }),
|
|
521
|
+
/* @__PURE__ */ jsx(Button, { onClick: copyOutput, size: "xs", variant: "secondary", children: copyState === "copied" ? "Copied" : "Copy" })
|
|
522
|
+
] })
|
|
523
|
+
] }) }),
|
|
524
|
+
/* @__PURE__ */ jsxs("div", { className: "grid gap-4 border-b border-stroke-3 px-4 py-5", children: [
|
|
525
|
+
/* @__PURE__ */ jsx(
|
|
526
|
+
SegmentedControl,
|
|
527
|
+
{
|
|
528
|
+
label: "Tone",
|
|
529
|
+
onChange: setTone,
|
|
530
|
+
options: toneOrder,
|
|
531
|
+
value: tone
|
|
532
|
+
}
|
|
533
|
+
),
|
|
534
|
+
/* @__PURE__ */ jsx(
|
|
535
|
+
SegmentedControl,
|
|
536
|
+
{
|
|
537
|
+
label: "Variant",
|
|
538
|
+
onChange: setVariant,
|
|
539
|
+
options: variantOrder,
|
|
540
|
+
value: variant
|
|
541
|
+
}
|
|
542
|
+
)
|
|
543
|
+
] }),
|
|
544
|
+
/* @__PURE__ */ jsxs(Tabs, { className: "flex min-h-0 flex-1 flex-col", defaultValue: "color", children: [
|
|
545
|
+
/* @__PURE__ */ jsx("div", { className: "border-b border-stroke-3 px-4 py-3", children: /* @__PURE__ */ jsxs(TabsList, { className: "grid w-full grid-cols-4", children: [
|
|
546
|
+
/* @__PURE__ */ jsx(TabsTab, { className: "px-2 text-xs", value: "color", children: "Color" }),
|
|
547
|
+
/* @__PURE__ */ jsx(TabsTab, { className: "px-2 text-xs", value: "line", children: "Line" }),
|
|
548
|
+
/* @__PURE__ */ jsx(TabsTab, { className: "px-2 text-xs", value: "motion", children: "Motion" }),
|
|
549
|
+
/* @__PURE__ */ jsx(TabsTab, { className: "px-2 text-xs", value: "output", children: "Output" })
|
|
550
|
+
] }) }),
|
|
551
|
+
/* @__PURE__ */ jsxs("div", { className: "min-h-0 flex-1 overflow-y-auto", children: [
|
|
552
|
+
/* @__PURE__ */ jsxs(TabsPanel, { value: "color", children: [
|
|
553
|
+
/* @__PURE__ */ jsxs(ControlSection, { title: "Text colors", children: [
|
|
554
|
+
/* @__PURE__ */ jsx(
|
|
555
|
+
TextControl,
|
|
556
|
+
{
|
|
557
|
+
label: "Default color",
|
|
558
|
+
onChange: (value) => updateText("defaultColor", value),
|
|
559
|
+
value: settings.defaultColor
|
|
560
|
+
}
|
|
561
|
+
),
|
|
562
|
+
/* @__PURE__ */ jsx(
|
|
563
|
+
TextControl,
|
|
564
|
+
{
|
|
565
|
+
label: "Accent color",
|
|
566
|
+
onChange: (value) => updateText("accentColor", value),
|
|
567
|
+
value: settings.accentColor
|
|
568
|
+
}
|
|
569
|
+
)
|
|
570
|
+
] }),
|
|
571
|
+
/* @__PURE__ */ jsxs(ControlSection, { title: "Underline colors", children: [
|
|
572
|
+
/* @__PURE__ */ jsx(
|
|
573
|
+
TextControl,
|
|
574
|
+
{
|
|
575
|
+
label: "Base underline",
|
|
576
|
+
onChange: (value) => updateText("underlineColor", value),
|
|
577
|
+
value: settings.underlineColor
|
|
578
|
+
}
|
|
579
|
+
),
|
|
580
|
+
/* @__PURE__ */ jsx(
|
|
581
|
+
TextControl,
|
|
582
|
+
{
|
|
583
|
+
label: "Hover underline",
|
|
584
|
+
onChange: (value) => updateText("hoverUnderlineColor", value),
|
|
585
|
+
value: settings.hoverUnderlineColor
|
|
586
|
+
}
|
|
587
|
+
),
|
|
588
|
+
/* @__PURE__ */ jsx(
|
|
589
|
+
TextControl,
|
|
590
|
+
{
|
|
591
|
+
label: "Active underline",
|
|
592
|
+
onChange: (value) => updateText("activeUnderlineColor", value),
|
|
593
|
+
value: settings.activeUnderlineColor
|
|
594
|
+
}
|
|
595
|
+
)
|
|
596
|
+
] }),
|
|
597
|
+
/* @__PURE__ */ jsxs(ControlSection, { title: "OKLCH adjustments", children: [
|
|
598
|
+
/* @__PURE__ */ jsx(
|
|
599
|
+
NumberControl,
|
|
600
|
+
{
|
|
601
|
+
label: "Lightness",
|
|
602
|
+
max: 20,
|
|
603
|
+
min: -20,
|
|
604
|
+
onChange: (value) => updateNumber("lightnessDelta", value),
|
|
605
|
+
unit: "%",
|
|
606
|
+
value: settings.lightnessDelta
|
|
607
|
+
}
|
|
608
|
+
),
|
|
609
|
+
/* @__PURE__ */ jsx(
|
|
610
|
+
NumberControl,
|
|
611
|
+
{
|
|
612
|
+
label: "Chroma scale",
|
|
613
|
+
max: 2,
|
|
614
|
+
min: 0,
|
|
615
|
+
onChange: (value) => updateNumber("chromaScale", value),
|
|
616
|
+
step: 0.05,
|
|
617
|
+
value: settings.chromaScale
|
|
618
|
+
}
|
|
619
|
+
),
|
|
620
|
+
/* @__PURE__ */ jsx(
|
|
621
|
+
NumberControl,
|
|
622
|
+
{
|
|
623
|
+
label: "Hue shift",
|
|
624
|
+
max: 180,
|
|
625
|
+
min: -180,
|
|
626
|
+
onChange: (value) => updateNumber("hueShift", value),
|
|
627
|
+
unit: "deg",
|
|
628
|
+
value: settings.hueShift
|
|
629
|
+
}
|
|
630
|
+
)
|
|
631
|
+
] })
|
|
632
|
+
] }),
|
|
633
|
+
/* @__PURE__ */ jsxs(TabsPanel, { value: "line", children: [
|
|
634
|
+
/* @__PURE__ */ jsxs(ControlSection, { title: "Text opacity", children: [
|
|
635
|
+
/* @__PURE__ */ jsx(
|
|
636
|
+
NumberControl,
|
|
637
|
+
{
|
|
638
|
+
label: "Inline idle",
|
|
639
|
+
max: 100,
|
|
640
|
+
min: 0,
|
|
641
|
+
onChange: (value) => updateNumber("textOpacity", value),
|
|
642
|
+
unit: "%",
|
|
643
|
+
value: settings.textOpacity
|
|
644
|
+
}
|
|
645
|
+
),
|
|
646
|
+
/* @__PURE__ */ jsx(
|
|
647
|
+
NumberControl,
|
|
648
|
+
{
|
|
649
|
+
label: "Standalone idle",
|
|
650
|
+
max: 100,
|
|
651
|
+
min: 0,
|
|
652
|
+
onChange: (value) => updateNumber("standaloneTextOpacity", value),
|
|
653
|
+
unit: "%",
|
|
654
|
+
value: settings.standaloneTextOpacity
|
|
655
|
+
}
|
|
656
|
+
),
|
|
657
|
+
/* @__PURE__ */ jsx(
|
|
658
|
+
NumberControl,
|
|
659
|
+
{
|
|
660
|
+
label: "Inline hover",
|
|
661
|
+
max: 100,
|
|
662
|
+
min: 0,
|
|
663
|
+
onChange: (value) => updateNumber("hoverTextOpacity", value),
|
|
664
|
+
unit: "%",
|
|
665
|
+
value: settings.hoverTextOpacity
|
|
666
|
+
}
|
|
667
|
+
),
|
|
668
|
+
/* @__PURE__ */ jsx(
|
|
669
|
+
NumberControl,
|
|
670
|
+
{
|
|
671
|
+
label: "Active",
|
|
672
|
+
max: 100,
|
|
673
|
+
min: 0,
|
|
674
|
+
onChange: (value) => updateNumber("activeTextOpacity", value),
|
|
675
|
+
unit: "%",
|
|
676
|
+
value: settings.activeTextOpacity
|
|
677
|
+
}
|
|
678
|
+
)
|
|
679
|
+
] }),
|
|
680
|
+
/* @__PURE__ */ jsxs(ControlSection, { title: "Underline opacity", children: [
|
|
681
|
+
/* @__PURE__ */ jsx(
|
|
682
|
+
NumberControl,
|
|
683
|
+
{
|
|
684
|
+
label: "Inline idle",
|
|
685
|
+
max: 100,
|
|
686
|
+
min: 0,
|
|
687
|
+
onChange: (value) => updateNumber("underlineOpacity", value),
|
|
688
|
+
unit: "%",
|
|
689
|
+
value: settings.underlineOpacity
|
|
690
|
+
}
|
|
691
|
+
),
|
|
692
|
+
/* @__PURE__ */ jsx(
|
|
693
|
+
NumberControl,
|
|
694
|
+
{
|
|
695
|
+
label: "Inline hover",
|
|
696
|
+
max: 100,
|
|
697
|
+
min: 0,
|
|
698
|
+
onChange: (value) => updateNumber("hoverUnderlineOpacity", value),
|
|
699
|
+
unit: "%",
|
|
700
|
+
value: settings.hoverUnderlineOpacity
|
|
701
|
+
}
|
|
702
|
+
),
|
|
703
|
+
/* @__PURE__ */ jsx(
|
|
704
|
+
NumberControl,
|
|
705
|
+
{
|
|
706
|
+
label: "Standalone hover",
|
|
707
|
+
max: 100,
|
|
708
|
+
min: 0,
|
|
709
|
+
onChange: (value) => updateNumber("standaloneHoverUnderlineOpacity", value),
|
|
710
|
+
unit: "%",
|
|
711
|
+
value: settings.standaloneHoverUnderlineOpacity
|
|
712
|
+
}
|
|
713
|
+
),
|
|
714
|
+
/* @__PURE__ */ jsx(
|
|
715
|
+
NumberControl,
|
|
716
|
+
{
|
|
717
|
+
label: "Active",
|
|
718
|
+
max: 100,
|
|
719
|
+
min: 0,
|
|
720
|
+
onChange: (value) => updateNumber("activeUnderlineOpacity", value),
|
|
721
|
+
unit: "%",
|
|
722
|
+
value: settings.activeUnderlineOpacity
|
|
723
|
+
}
|
|
724
|
+
)
|
|
725
|
+
] }),
|
|
726
|
+
/* @__PURE__ */ jsxs(ControlSection, { title: "Decoration", children: [
|
|
727
|
+
/* @__PURE__ */ jsx(
|
|
728
|
+
NumberControl,
|
|
729
|
+
{
|
|
730
|
+
label: "Thickness",
|
|
731
|
+
max: 4,
|
|
732
|
+
min: 0.5,
|
|
733
|
+
onChange: (value) => updateNumber("underlineThickness", value),
|
|
734
|
+
step: 0.25,
|
|
735
|
+
unit: "px",
|
|
736
|
+
value: settings.underlineThickness
|
|
737
|
+
}
|
|
738
|
+
),
|
|
739
|
+
/* @__PURE__ */ jsx(
|
|
740
|
+
NumberControl,
|
|
741
|
+
{
|
|
742
|
+
label: "Offset",
|
|
743
|
+
max: 0.7,
|
|
744
|
+
min: -0.7,
|
|
745
|
+
onChange: (value) => updateNumber("underlineOffset", value),
|
|
746
|
+
step: 0.01,
|
|
747
|
+
unit: "em",
|
|
748
|
+
value: settings.underlineOffset
|
|
749
|
+
}
|
|
750
|
+
)
|
|
751
|
+
] })
|
|
752
|
+
] }),
|
|
753
|
+
/* @__PURE__ */ jsx(TabsPanel, { value: "motion", children: /* @__PURE__ */ jsxs(ControlSection, { title: "Transition", children: [
|
|
754
|
+
/* @__PURE__ */ jsx(
|
|
755
|
+
NumberControl,
|
|
756
|
+
{
|
|
757
|
+
label: "Duration",
|
|
758
|
+
max: 500,
|
|
759
|
+
min: 0,
|
|
760
|
+
onChange: (value) => updateNumber("transitionDuration", value),
|
|
761
|
+
unit: "ms",
|
|
762
|
+
value: settings.transitionDuration
|
|
763
|
+
}
|
|
764
|
+
),
|
|
765
|
+
/* @__PURE__ */ jsx(
|
|
766
|
+
TextControl,
|
|
767
|
+
{
|
|
768
|
+
label: "Ease",
|
|
769
|
+
onChange: (value) => updateText("transitionEase", value),
|
|
770
|
+
value: settings.transitionEase
|
|
771
|
+
}
|
|
772
|
+
)
|
|
773
|
+
] }) }),
|
|
774
|
+
/* @__PURE__ */ jsx(TabsPanel, { className: "h-full", value: "output", children: /* @__PURE__ */ jsxs("div", { className: "grid h-full grid-rows-[1fr_auto] gap-3 p-4", children: [
|
|
775
|
+
/* @__PURE__ */ jsx(
|
|
776
|
+
"textarea",
|
|
777
|
+
{
|
|
778
|
+
className: "min-h-[26rem] resize-none rounded-panel border border-stroke-2 bg-surface-2 p-3 font-mono text-xs leading-5 text-foreground-1 outline-none focus:border-accent-1",
|
|
779
|
+
readOnly: true,
|
|
780
|
+
value: output
|
|
781
|
+
}
|
|
782
|
+
),
|
|
783
|
+
/* @__PURE__ */ jsx(Button, { onClick: copyOutput, size: "sm", variant: "secondary", children: copyState === "copied" ? "Copied output" : "Copy output" })
|
|
784
|
+
] }) })
|
|
785
|
+
] })
|
|
786
|
+
] })
|
|
787
|
+
] })
|
|
788
|
+
] }) });
|
|
789
|
+
}
|
|
790
|
+
export {
|
|
791
|
+
LinkPlayground
|
|
792
|
+
};
|