@publish.os/nextjs 0.0.1-alpha.81 → 0.0.1-alpha.91

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.
Files changed (265) hide show
  1. package/compiler-assets/nextjs/defaults/app/globals.css +1 -0
  2. package/compiler-assets/nextjs/defaults/group/index.tsx +50 -0
  3. package/compiler-assets/nextjs/defaults/group/layout.tsx +8 -8
  4. package/compiler-assets/nextjs/defaults/group/page.tsx +44 -43
  5. package/compiler-assets/nextjs/defaults/project/next.config.mjs +33 -13
  6. package/compiler-assets/nextjs/defaults/project/tsconfig.json.template +10 -3
  7. package/compiler-assets/nextjs/defaults/root/css/animation.css +131 -0
  8. package/compiler-assets/nextjs/defaults/root/css/components/code-block.css +18 -0
  9. package/compiler-assets/nextjs/defaults/root/css/components/dialog.css +4 -1
  10. package/compiler-assets/nextjs/defaults/root/css/components/menu.css +1 -1
  11. package/compiler-assets/nextjs/defaults/root/css/components/navigation-menu.css +1 -1
  12. package/compiler-assets/nextjs/defaults/root/css/components/popover.css +1 -1
  13. package/compiler-assets/nextjs/defaults/root/css/components/select.css +1 -1
  14. package/compiler-assets/nextjs/defaults/root/css/components/tooltip.css +1 -1
  15. package/compiler-assets/nextjs/defaults/root/css/shadow.css +6 -25
  16. package/compiler-assets/nextjs/defaults/root/css/typography.css +51 -68
  17. package/compiler-assets/nextjs/defaults/root/globals.css +25 -0
  18. package/compiler-assets/nextjs/defaults/root/{page.tsx → index.tsx} +6 -2
  19. package/compiler-assets/nextjs/defaults/root/layout.tsx +7 -1
  20. package/compiler-assets/nextjs/defaults/root/theme.css +22 -22
  21. package/compiler-assets/nextjs/shims/document.tsx +38 -0
  22. package/compiler-assets/nextjs/shims/generated-group-page.tsx +19 -2
  23. package/compiler-assets/nextjs/shims/generated-leaf-page.tsx +18 -2
  24. package/compiler-assets/nextjs/shims/global-layout.tsx +19 -85
  25. package/compiler-assets/nextjs/shims/global-not-found.tsx +69 -0
  26. package/compiler-assets/nextjs/shims/markdown-route.ts +2 -0
  27. package/compiler-assets/nextjs/shims/metadata-icons.tsx +39 -0
  28. package/compiler-assets/nextjs/shims/not-found-content.tsx +53 -0
  29. package/compiler-assets/nextjs/shims/not-found-navigation.tsx +60 -0
  30. package/compiler-assets/nextjs/shims/proxy.ts +143 -65
  31. package/compiler-assets/nextjs/shims/publish-os-theme-provider.tsx +76 -15
  32. package/compiler-assets/nextjs/shims/root-page.tsx +7 -1
  33. package/compiler-assets/nextjs/shims/site-fenced-code-block.tsx +30 -0
  34. package/compiler-assets/nextjs/shims/site-heading-level.tsx +14 -0
  35. package/compiler-assets/nextjs/shims/site-mdx-components.tsx +112 -0
  36. package/compiler-assets/nextjs/shims/site-mdx.tsx +17 -0
  37. package/compiler-assets/nextjs/shims/theme-defaults.css +41 -25
  38. package/dist/build-operation-5QMLXF7N.js +89 -0
  39. package/dist/{button-CFdx-ohV.d.ts → button-BdCScEKi.d.ts} +6 -6
  40. package/dist/capture-local-source-WGGDIUU2.js +258 -0
  41. package/dist/chunk-22RSSUNV.js +13 -0
  42. package/dist/chunk-4BC2L2KA.js +620 -0
  43. package/dist/chunk-5J3YUNRY.js +121 -0
  44. package/dist/chunk-5KAD7W53.js +248 -0
  45. package/dist/chunk-6C65KV7O.js +142 -0
  46. package/dist/chunk-6D2E6UMD.js +695 -0
  47. package/dist/chunk-7NY22B5U.js +161 -0
  48. package/dist/chunk-AI2UULNX.js +9 -0
  49. package/dist/chunk-EFO6AWXN.js +19 -0
  50. package/dist/chunk-F3AGNDF4.js +2377 -0
  51. package/dist/chunk-GBPLER5H.js +426 -0
  52. package/dist/chunk-IL4RJOKI.js +186 -0
  53. package/dist/chunk-NNBJZPFM.js +193 -0
  54. package/dist/chunk-ORIUWJBQ.js +58 -0
  55. package/dist/chunk-OXOFRXEI.js +7129 -0
  56. package/dist/chunk-UYGCOWRF.js +1709 -0
  57. package/dist/chunk-WL75GQ5M.js +80 -0
  58. package/dist/compiler.d.ts +54 -7
  59. package/dist/compiler.js +121 -13147
  60. package/dist/components/blocks/agent-actions.d.ts +81 -0
  61. package/dist/components/blocks/agent-actions.js +594 -0
  62. package/dist/components/blocks/toc.d.ts +43 -0
  63. package/dist/components/blocks/toc.js +136 -0
  64. package/dist/components/ui/button.d.ts +5 -0
  65. package/dist/components/ui/button.js +94 -0
  66. package/dist/compose-CVBJRAF6.js +16 -0
  67. package/dist/config/createNextConfig.js +27 -0
  68. package/dist/dev-operation-OSHHWRWK.js +1095 -0
  69. package/dist/framework-selection-ZVO323PK.js +11 -0
  70. package/dist/ide-support-CU6Z5PVR.js +16 -0
  71. package/dist/index.d.ts +55 -4
  72. package/dist/jsx-dev-runtime.d.ts +6 -0
  73. package/dist/jsx-dev-runtime.js +100 -0
  74. package/dist/jsx-runtime.d.ts +7 -0
  75. package/dist/jsx-runtime.js +97 -0
  76. package/dist/kernel/components/blocks/AgentActions.d.ts +35 -6
  77. package/dist/kernel/components/blocks/AgentActions.js +401 -150
  78. package/dist/kernel/components/blocks/agent-actions.d.ts +5 -0
  79. package/dist/kernel/components/blocks/agent-actions.js +594 -0
  80. package/dist/kernel/components/blocks/animated-icon-swap.js +1 -1
  81. package/dist/kernel/components/blocks/color-palette.js +4 -4
  82. package/dist/kernel/components/blocks/logo-block.js +3 -3
  83. package/dist/kernel/components/blocks/nav-breadcrumb.d.ts +10 -2
  84. package/dist/kernel/components/blocks/nav-breadcrumb.js +22 -7
  85. package/dist/kernel/components/blocks/navbar.d.ts +2 -2
  86. package/dist/kernel/components/blocks/navbar.js +406 -65
  87. package/dist/kernel/components/blocks/navigation-progress.js +6 -3
  88. package/dist/kernel/components/blocks/next-prev.d.ts +1 -1
  89. package/dist/kernel/components/blocks/next-prev.js +12 -24
  90. package/dist/kernel/components/blocks/page-list.d.ts +1 -1
  91. package/dist/kernel/components/blocks/page-list.js +7 -6
  92. package/dist/kernel/components/blocks/search.d.ts +83 -58
  93. package/dist/kernel/components/blocks/search.js +554 -428
  94. package/dist/kernel/components/blocks/sidebar-node.d.ts +2 -2
  95. package/dist/kernel/components/blocks/sidebar-node.js +12 -10
  96. package/dist/kernel/components/blocks/sidebar.d.ts +3 -3
  97. package/dist/kernel/components/blocks/sidebar.js +24 -14
  98. package/dist/kernel/components/blocks/theme-toggle.d.ts +2 -2
  99. package/dist/kernel/components/blocks/theme-toggle.js +47 -1
  100. package/dist/kernel/components/blocks/toc-client.d.ts +40 -0
  101. package/dist/kernel/components/blocks/toc-client.js +495 -0
  102. package/dist/kernel/components/blocks/toc.d.ts +19 -1
  103. package/dist/kernel/components/blocks/toc.js +122 -180
  104. package/dist/kernel/components/mdx/components/blockquote.js +2 -2
  105. package/dist/kernel/components/mdx/components/callout.d.ts +5 -7
  106. package/dist/kernel/components/mdx/components/callout.js +67 -36
  107. package/dist/kernel/components/mdx/components/code-block.d.ts +5 -2
  108. package/dist/kernel/components/mdx/components/code-block.js +106 -5
  109. package/dist/kernel/components/mdx/components/copy-code-button.d.ts +8 -0
  110. package/dist/kernel/components/mdx/components/copy-code-button.js +61 -0
  111. package/dist/kernel/components/mdx/components/figure-caption.d.ts +1 -1
  112. package/dist/kernel/components/mdx/components/figure-caption.js +4 -3
  113. package/dist/kernel/components/mdx/components/figure.d.ts +6 -2
  114. package/dist/kernel/components/mdx/components/figure.js +24 -14
  115. package/dist/kernel/components/mdx/components/footnotes.js +1 -1
  116. package/dist/kernel/components/mdx/components/heading-copy-link.js +4 -4
  117. package/dist/kernel/components/mdx/components/heading.js +6 -3
  118. package/dist/kernel/components/mdx/components/hr.js +2 -2
  119. package/dist/kernel/components/mdx/components/image-zoom.js +2 -2
  120. package/dist/kernel/components/mdx/components/image.d.ts +1 -1
  121. package/dist/kernel/components/mdx/components/image.js +94 -68
  122. package/dist/kernel/components/mdx/components/inline-code.js +2 -2
  123. package/dist/kernel/components/mdx/components/kbd.d.ts +2 -2
  124. package/dist/kernel/components/mdx/components/kbd.js +5 -4
  125. package/dist/kernel/components/mdx/components/link.d.ts +35 -4
  126. package/dist/kernel/components/mdx/components/link.js +3 -3
  127. package/dist/kernel/components/mdx/components/paragraph.js +2 -5
  128. package/dist/kernel/components/mdx/components/strikethrough.js +1 -1
  129. package/dist/kernel/components/mdx/components/table.js +2 -2
  130. package/dist/kernel/components/mdx/components/task-list.js +2 -2
  131. package/dist/kernel/components/mdx/components/video-player.d.ts +6 -2
  132. package/dist/kernel/components/mdx/components/video-player.js +8 -4
  133. package/dist/kernel/components/mdx/components/video.d.ts +5 -3
  134. package/dist/kernel/components/mdx/components/video.js +8 -6
  135. package/dist/kernel/components/mdx/error-boundary.js +2 -2
  136. package/dist/kernel/components/mdx/error-fallback.js +1 -1
  137. package/dist/kernel/components/mdx/mdx.d.ts +28 -14
  138. package/dist/kernel/components/mdx/mdx.js +336 -63
  139. package/dist/kernel/components/mdx/rehype-heading-ids.d.ts +1 -0
  140. package/dist/kernel/components/mdx/rehype-heading-ids.js +6 -4
  141. package/dist/kernel/components/next-image.d.ts +12 -0
  142. package/dist/kernel/components/next-image.js +61 -0
  143. package/dist/kernel/components/ui/accordion.js +1 -1
  144. package/dist/kernel/components/ui/breadcrumb-trail.d.ts +6 -23
  145. package/dist/kernel/components/ui/breadcrumb-trail.js +2 -2
  146. package/dist/kernel/components/ui/breadcrumb.d.ts +11 -3
  147. package/dist/kernel/components/ui/breadcrumb.js +10 -8
  148. package/dist/kernel/components/ui/button-group.js +8 -7
  149. package/dist/kernel/components/ui/button.d.ts +58 -6
  150. package/dist/kernel/components/ui/button.js +43 -39
  151. package/dist/kernel/components/ui/card.d.ts +2 -2
  152. package/dist/kernel/components/ui/card.js +1 -1
  153. package/dist/kernel/components/ui/dialog.js +1 -1
  154. package/dist/kernel/components/ui/drawer.d.ts +3 -1
  155. package/dist/kernel/components/ui/drawer.js +6 -2
  156. package/dist/kernel/components/ui/input.d.ts +2 -2
  157. package/dist/kernel/components/ui/input.js +1 -1
  158. package/dist/kernel/components/ui/kbd.js +10 -17
  159. package/dist/kernel/components/ui/link.d.ts +11 -3
  160. package/dist/kernel/components/ui/link.js +12 -11
  161. package/dist/kernel/components/ui/menu.js +6 -6
  162. package/dist/kernel/components/ui/mod-key.d.ts +10 -0
  163. package/dist/kernel/components/ui/mod-key.js +36 -0
  164. package/dist/kernel/components/ui/navigation-menu.js +3 -3
  165. package/dist/kernel/components/ui/popover.js +1 -1
  166. package/dist/kernel/components/ui/progress.js +2 -2
  167. package/dist/kernel/components/ui/scroll-area.js +5 -5
  168. package/dist/kernel/components/ui/select.js +8 -11
  169. package/dist/kernel/components/ui/separator.js +1 -1
  170. package/dist/kernel/components/ui/table.js +1 -1
  171. package/dist/kernel/components/ui/tabs.js +1 -1
  172. package/dist/kernel/components/ui/tag.js +1 -1
  173. package/dist/kernel/components/ui/text.d.ts +2 -2
  174. package/dist/kernel/components/ui/text.js +1 -1
  175. package/dist/kernel/components/ui/toast.js +1 -1
  176. package/dist/kernel/components/ui/tooltip.js +1 -1
  177. package/dist/kernel/defaults.registry.d.ts +11 -24
  178. package/dist/kernel/defaults.registry.js +11 -26
  179. package/dist/kernel/routes/agent/markdown.d.ts +3 -1
  180. package/dist/kernel/routes/agent/markdown.js +219 -48
  181. package/dist/kernel/routes/layouts/group.d.ts +1 -1
  182. package/dist/kernel/routes/layouts/group.js +5 -7
  183. package/dist/kernel/routes/metadata/feed.d.ts +1 -1
  184. package/dist/kernel/routes/metadata/feed.js +111 -81
  185. package/dist/kernel/routes/metadata/llms.d.ts +12 -3
  186. package/dist/kernel/routes/metadata/llms.js +156 -59
  187. package/dist/kernel/routes/metadata/og-image.js +1 -1
  188. package/dist/kernel/routes/metadata/robots.d.ts +1 -1
  189. package/dist/kernel/routes/metadata/robots.js +2 -2
  190. package/dist/kernel/routes/metadata/sitemap.d.ts +26 -4
  191. package/dist/kernel/routes/metadata/sitemap.js +206 -38
  192. package/dist/kernel/routes/not-found.d.ts +34 -0
  193. package/dist/kernel/routes/not-found.js +213 -0
  194. package/dist/kernel/routes/pages/group.d.ts +2 -2
  195. package/dist/kernel/routes/pages/group.js +21 -13
  196. package/dist/kernel/routes/pages/leaf.d.ts +28 -1
  197. package/dist/kernel/routes/pages/leaf.js +25 -16
  198. package/dist/kernel/routes/pages/root.js +19 -13
  199. package/dist/keyboard-shortcuts.js +1 -1
  200. package/dist/resolvers/manifest-resolver.js +29 -6
  201. package/dist/search.d.ts +6 -7
  202. package/dist/search.js +52 -29
  203. package/dist/{sidebar-types-Bgchdfd6.d.ts → sidebar-types-DKpR27II.d.ts} +1 -1
  204. package/dist/theme-scope.js +1 -1
  205. package/dist/{types-DHBm7-j6.d.ts → types-CJWRG05y.d.ts} +20 -1
  206. package/dist/{types-B_b3C0U6.d.ts → types-CUtrppxt.d.ts} +8 -2
  207. package/dist/{types-CIwwieNw.d.ts → types-J2w_puPF.d.ts} +11 -10
  208. package/dist/types.d.ts +15 -6
  209. package/dist/utils/heading-ids.js +30 -11
  210. package/dist/utils/toc-selection.d.ts +7 -0
  211. package/dist/utils/toc-selection.js +14 -0
  212. package/dist/validate-local-source-SV44DBQT.js +16 -0
  213. package/dist/validate-publish-os-source-NZJF3TB2.js +14 -0
  214. package/init/seed/minimal/.gitignore +1 -0
  215. package/init/seed/minimal/publish.os/assets/blog/hello-world.svg +13 -0
  216. package/init/seed/minimal/publish.os/assets/favicon.dark.svg +13 -0
  217. package/init/seed/minimal/publish.os/assets/favicon.svg +13 -0
  218. package/init/seed/minimal/publish.os/blog/content/hello-world.mdx +48 -0
  219. package/init/seed/minimal/publish.os/blog/content/series-a.mdx +11 -0
  220. package/init/seed/minimal/publish.os/blog/index.tsx +82 -0
  221. package/init/seed/minimal/publish.os/blog/layout.tsx +13 -0
  222. package/init/seed/minimal/publish.os/blog/page.tsx +76 -0
  223. package/init/seed/minimal/publish.os/components/blog/copy-link.tsx +64 -0
  224. package/init/seed/minimal/publish.os/docs/content/get-started.mdx +6 -11
  225. package/init/seed/minimal/publish.os/docs/content/groups.mdx +6 -7
  226. package/init/seed/minimal/publish.os/docs/content/{theme.mdx → themes.mdx} +14 -12
  227. package/init/seed/minimal/publish.os/publish.os.config.json +7 -7
  228. package/init/seed/minimal/publish.os/theme.css +52 -24
  229. package/init/seed/minimal/publish.os/tsconfig.json +3 -0
  230. package/init/seed/minimal/seed.json +12 -2
  231. package/init/seed/scratch/publish.os/docs/content/get-started.mdx +6 -0
  232. package/init/seed/scratch/publish.os/publish.os.config.json +4 -0
  233. package/init/seed/scratch/seed.json +5 -0
  234. package/package.json +55 -44
  235. package/release/app/phosphor/package.json +5 -5
  236. package/release/app/phosphor/pnpm-lock.yaml.template +553 -377
  237. package/release/app/phosphor/pnpm-workspace.yaml +3 -0
  238. package/release/compiler/package.json +5 -3
  239. package/release/compiler/pnpm-lock.yaml.template +500 -303
  240. package/release/compiler/pnpm-workspace.yaml +3 -0
  241. package/release/release.json +8 -37
  242. package/compiler-assets/nextjs/defaults/group/leaf.tsx +0 -48
  243. package/dist/icons.d.ts +0 -1
  244. package/dist/icons.js +0 -2
  245. package/dist/kernel/components/blocks/design-system-preview.d.ts +0 -61
  246. package/dist/kernel/components/blocks/design-system-preview.js +0 -648
  247. package/dist/kernel/components/blocks/link-playground.d.ts +0 -5
  248. package/dist/kernel/components/blocks/link-playground.js +0 -744
  249. package/dist/kernel/components/blocks/navigation-progress-playground.d.ts +0 -5
  250. package/dist/kernel/components/blocks/navigation-progress-playground.js +0 -629
  251. package/dist/kernel/components/mdx/components/pre.d.ts +0 -6
  252. package/dist/kernel/components/mdx/components/pre.js +0 -18
  253. package/dist/kernel/components/ui/meta-key.d.ts +0 -17
  254. package/dist/kernel/components/ui/meta-key.js +0 -9
  255. package/dist/kernel/components/ui/theme-toggle.d.ts +0 -24
  256. package/dist/kernel/components/ui/theme-toggle.js +0 -58
  257. package/dist/kernel/framework-icons.d.ts +0 -1
  258. package/dist/kernel/framework-icons.js +0 -39
  259. package/dist/link-CYaCRDb6.d.ts +0 -35
  260. package/release/app/lucide/package.json +0 -30
  261. package/release/app/lucide/pnpm-lock.yaml.template +0 -2905
  262. package/release/app/lucide/pnpm-workspace.yaml +0 -11
  263. package/release/app/tabler/package.json +0 -30
  264. package/release/app/tabler/pnpm-lock.yaml.template +0 -2911
  265. package/release/app/tabler/pnpm-workspace.yaml +0 -11
@@ -1,648 +0,0 @@
1
- "use client";
2
-
3
- // src/modules/design-system/design-system-preview.tsx
4
- import { AnimatedIconSwap } from "@publish.os/nextjs/kernel/components/blocks/animated-icon-swap";
5
- import ColorPalette from "@publish.os/nextjs/kernel/components/blocks/color-palette";
6
- import { InlineCode } from "@publish.os/nextjs/kernel/components/mdx/components/inline-code";
7
- import {
8
- Accordion,
9
- AccordionHeader,
10
- AccordionItem,
11
- AccordionPanel,
12
- AccordionTrigger
13
- } from "@publish.os/nextjs/kernel/components/ui/accordion";
14
- import {
15
- Breadcrumb,
16
- BreadcrumbItem,
17
- BreadcrumbLink,
18
- BreadcrumbList,
19
- BreadcrumbPage,
20
- BreadcrumbSeparator
21
- } from "@publish.os/nextjs/kernel/components/ui/breadcrumb";
22
- import { Button, buttonVariants } from "@publish.os/nextjs/kernel/components/ui/button";
23
- import {
24
- ButtonGroup,
25
- ButtonGroupSeparator,
26
- ButtonGroupText
27
- } from "@publish.os/nextjs/kernel/components/ui/button-group";
28
- import {
29
- Card,
30
- CardContent,
31
- CardDescription,
32
- CardHeader,
33
- CardTitle
34
- } from "@publish.os/nextjs/kernel/components/ui/card";
35
- import {
36
- Dialog,
37
- DialogBackdrop,
38
- DialogPopup,
39
- DialogPortal,
40
- DialogTitle,
41
- DialogTrigger
42
- } from "@publish.os/nextjs/kernel/components/ui/dialog";
43
- import {
44
- Drawer,
45
- DrawerPopup,
46
- DrawerPortal,
47
- DrawerTitle,
48
- DrawerTrigger,
49
- DrawerViewport
50
- } from "@publish.os/nextjs/kernel/components/ui/drawer";
51
- import { Input } from "@publish.os/nextjs/kernel/components/ui/input";
52
- import { Kbd } from "@publish.os/nextjs/kernel/components/ui/kbd";
53
- import { Link } from "@publish.os/nextjs/kernel/components/ui/link";
54
- import {
55
- Menu,
56
- MenuItem,
57
- MenuPopup,
58
- MenuPortal,
59
- MenuPositioner,
60
- MenuTrigger
61
- } from "@publish.os/nextjs/kernel/components/ui/menu";
62
- import { MetaKey } from "@publish.os/nextjs/kernel/components/ui/meta-key";
63
- import {
64
- Popover,
65
- PopoverPopup,
66
- PopoverPortal,
67
- PopoverPositioner,
68
- PopoverTitle,
69
- PopoverTrigger
70
- } from "@publish.os/nextjs/kernel/components/ui/popover";
71
- import {
72
- Progress,
73
- ProgressIndicator,
74
- ProgressTrack
75
- } from "@publish.os/nextjs/kernel/components/ui/progress";
76
- import { ScrollArea } from "@publish.os/nextjs/kernel/components/ui/scroll-area";
77
- import {
78
- Select,
79
- SelectIcon,
80
- SelectItem,
81
- SelectItemIndicator,
82
- SelectItemText,
83
- SelectList,
84
- SelectPopup,
85
- SelectPortal,
86
- SelectPositioner,
87
- SelectTrigger,
88
- SelectValue
89
- } from "@publish.os/nextjs/kernel/components/ui/select";
90
- import { Separator } from "@publish.os/nextjs/kernel/components/ui/separator";
91
- import {
92
- Table,
93
- TableBody,
94
- TableCell,
95
- TableHead,
96
- TableHeader,
97
- TableRow
98
- } from "@publish.os/nextjs/kernel/components/ui/table";
99
- import {
100
- NavigationTabs,
101
- NavigationTabsIndicator,
102
- NavigationTabsLink,
103
- NavigationTabsList,
104
- Tabs,
105
- TabsIndicator,
106
- TabsList,
107
- TabsPanel,
108
- TabsTab
109
- } from "@publish.os/nextjs/kernel/components/ui/tabs";
110
- import { Tag } from "@publish.os/nextjs/kernel/components/ui/tag";
111
- import { Text } from "@publish.os/nextjs/kernel/components/ui/text";
112
- import {
113
- Toast,
114
- ToastContent,
115
- ToastDescription,
116
- ToastProvider,
117
- ToastTitle
118
- } from "@publish.os/nextjs/kernel/components/ui/toast";
119
- import {
120
- Tooltip,
121
- TooltipPopup,
122
- TooltipPortal,
123
- TooltipPositioner,
124
- TooltipProvider,
125
- TooltipTrigger
126
- } from "@publish.os/nextjs/kernel/components/ui/tooltip";
127
- import {
128
- FrameworkCheckIcon as Check,
129
- FrameworkCopyIcon as Copy
130
- } from "@publish.os/nextjs/kernel/framework-icons";
131
- import { useState } from "react";
132
- import { jsx, jsxs } from "react/jsx-runtime";
133
- var tabs = [
134
- { id: "tokens", label: "Tokens" },
135
- { id: "typography", label: "Typography" },
136
- { id: "ui", label: "UI" },
137
- { id: "mdx", label: "MDX" },
138
- { id: "blocks", label: "Blocks" }
139
- ], scrollRows = Array.from({ length: 8 }, (_, index) => ({
140
- id: `row-${index + 1}`,
141
- label: `Scrollable row ${index + 1}`
142
- }));
143
- function hasFixture(items, name) {
144
- return items.some((item) => item.name === name);
145
- }
146
- function PreviewCell({
147
- children,
148
- name
149
- }) {
150
- return /* @__PURE__ */ jsxs("section", { className: "relative flex min-h-72 items-center justify-center border-b border-r border-stroke-3 bg-surface-1 p-8", children: [
151
- /* @__PURE__ */ jsx("h3", { className: "absolute left-4 top-4 text-xs font-medium text-foreground-3", children: name }),
152
- children
153
- ] });
154
- }
155
- function TypographyPreview() {
156
- return /* @__PURE__ */ jsxs("div", { className: "grid border-l border-t border-stroke-3 md:grid-cols-2", children: [
157
- /* @__PURE__ */ jsx(PreviewCell, { name: "Headings", children: /* @__PURE__ */ jsxs("div", { className: "space-y-3 text-foreground-1", children: [
158
- /* @__PURE__ */ jsx("h1", { className: "text-4xl font-semibold tracking-tight", children: "Heading One" }),
159
- /* @__PURE__ */ jsx("h2", { className: "text-2xl font-semibold tracking-tight", children: "Heading Two" }),
160
- /* @__PURE__ */ jsx("h3", { className: "text-xl font-medium", children: "Heading Three" })
161
- ] }) }),
162
- /* @__PURE__ */ jsx(PreviewCell, { name: "Paragraph", children: /* @__PURE__ */ jsx(Text, { className: "max-w-md text-foreground-2", children: "Good typography keeps dense documentation readable while leaving enough contrast for scanning headings, links, and inline code." }) }),
163
- /* @__PURE__ */ jsx(PreviewCell, { name: "Inline", children: /* @__PURE__ */ jsxs("p", { className: "text-sm leading-7 text-foreground-2", children: [
164
- "A paragraph with ",
165
- /* @__PURE__ */ jsx(Link, { href: "/ds", children: "a link" }),
166
- ",",
167
- " ",
168
- /* @__PURE__ */ jsx(InlineCode, { children: "code" }),
169
- ", and ",
170
- /* @__PURE__ */ jsx(Kbd, { children: "K" }),
171
- "."
172
- ] }) }),
173
- /* @__PURE__ */ jsx(PreviewCell, { name: "Longform", children: /* @__PURE__ */ jsx("blockquote", { className: "max-w-md border-l-2 border-accent-1 pl-4 text-sm leading-7 text-foreground-2", children: "The preview should reveal how content feels in real reading contexts, not only as isolated color chips." }) })
174
- ] });
175
- }
176
- function UiPreview({ items = [] }) {
177
- return /* @__PURE__ */ jsxs("div", { className: "grid border-l border-t border-stroke-3 md:grid-cols-2 xl:grid-cols-4", children: [
178
- items.map((item) => /* @__PURE__ */ jsx(PreviewCell, { name: item.name, children: item.children }, item.name)),
179
- !hasFixture(items, "Button") && /* @__PURE__ */ jsx(PreviewCell, { name: "Button", children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center gap-3", children: [
180
- /* @__PURE__ */ jsx(Button, { children: "Solid" }),
181
- /* @__PURE__ */ jsx(Button, { variant: "soft", children: "Soft" }),
182
- /* @__PURE__ */ jsx(Button, { disabled: !0, variant: "outline", children: "Disabled" })
183
- ] }) }),
184
- /* @__PURE__ */ jsx(PreviewCell, { name: "ButtonGroup", children: /* @__PURE__ */ jsxs("div", { className: "grid gap-4", children: [
185
- /* @__PURE__ */ jsxs(ButtonGroup, { children: [
186
- /* @__PURE__ */ jsx(Button, { variant: "soft", children: "Draft" }),
187
- /* @__PURE__ */ jsx(Button, { variant: "soft", children: "Preview" }),
188
- /* @__PURE__ */ jsx(Button, { variant: "soft", children: "Publish" })
189
- ] }),
190
- /* @__PURE__ */ jsxs(ButtonGroup, { children: [
191
- /* @__PURE__ */ jsx(ButtonGroupText, { size: "sm", children: "v1.2.0" }),
192
- /* @__PURE__ */ jsx(ButtonGroupSeparator, {}),
193
- /* @__PURE__ */ jsx(Button, { size: "sm", variant: "outline", children: "Copy" })
194
- ] }),
195
- /* @__PURE__ */ jsxs(ButtonGroup, { orientation: "vertical", children: [
196
- /* @__PURE__ */ jsx(Button, { size: "sm", variant: "soft", children: "Move up" }),
197
- /* @__PURE__ */ jsx(Button, { size: "sm", variant: "soft", children: "Move down" })
198
- ] })
199
- ] }) }),
200
- /* @__PURE__ */ jsx(PreviewCell, { name: "Tag", children: /* @__PURE__ */ jsxs("div", { className: "flex flex-wrap justify-center gap-2", children: [
201
- /* @__PURE__ */ jsx(Tag, { children: "Solid" }),
202
- /* @__PURE__ */ jsx(Tag, { variant: "soft", children: "Soft" }),
203
- /* @__PURE__ */ jsx(Tag, { variant: "outline", children: "Outline" }),
204
- /* @__PURE__ */ jsx(Tag, { borderStyle: "dotted", tone: "accent", variant: "soft", children: "Beta" })
205
- ] }) }),
206
- /* @__PURE__ */ jsx(PreviewCell, { name: "Input", children: /* @__PURE__ */ jsxs(
207
- "label",
208
- {
209
- className: "grid w-full max-w-xs gap-2 text-sm text-foreground-2",
210
- htmlFor: "design-system-preview-email",
211
- children: [
212
- "Email",
213
- /* @__PURE__ */ jsx(
214
- Input,
215
- {
216
- id: "design-system-preview-email",
217
- placeholder: "name@example.com",
218
- type: "email"
219
- }
220
- )
221
- ]
222
- }
223
- ) }),
224
- /* @__PURE__ */ jsx(PreviewCell, { name: "Link", children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center gap-3", children: [
225
- /* @__PURE__ */ jsx(Link, { color: "default", href: "#", variant: "link.standalone", children: "Default standalone" }),
226
- /* @__PURE__ */ jsx(Link, { color: "accent", href: "#", variant: "link.inline", children: "Accent inline" }),
227
- /* @__PURE__ */ jsx(
228
- Link,
229
- {
230
- color: "default",
231
- href: "#",
232
- leftIcon: /* @__PURE__ */ jsx("span", { "aria-hidden": "true", children: "\u2190" }),
233
- variant: "link.standalone",
234
- children: "Back to overview"
235
- }
236
- ),
237
- /* @__PURE__ */ jsx(
238
- Link,
239
- {
240
- color: "accent",
241
- href: "#",
242
- rightIcon: /* @__PURE__ */ jsx("span", { "aria-hidden": "true", children: "\u2197" }),
243
- variant: "link.standalone",
244
- children: "External resource"
245
- }
246
- ),
247
- /* @__PURE__ */ jsx(Link, { color: "accent", disabled: !0, href: "#", variant: "link.standalone", children: "Disabled link" }),
248
- /* @__PURE__ */ jsx(Link, { href: "#", size: "sm", variant: "button.solid", children: "Link as button" })
249
- ] }) }),
250
- /* @__PURE__ */ jsx(PreviewCell, { name: "Link colors", children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center gap-3", children: [
251
- /* @__PURE__ */ jsx(Link, { href: "/ds", color: "green-300", children: "Docs" }),
252
- /* @__PURE__ */ jsx(Link, { href: "/ds", color: "purple-800", children: "Purple link" }),
253
- /* @__PURE__ */ jsx(Link, { href: "/ds", color: "accent-1-hover", children: "Accent hover" }),
254
- /* @__PURE__ */ jsx(Link, { href: "/ds", color: "foreground-3", children: "Foreground 3" }),
255
- /* @__PURE__ */ jsx(Link, { href: "/ds", color: "--brand-link", children: "Brand var" }),
256
- /* @__PURE__ */ jsx(Link, { href: "/ds", color: "var(--brand-link)", children: "Brand var" }),
257
- /* @__PURE__ */ jsx(Link, { href: "/ds", color: "oklch(55% 0.18 280)", children: "Raw OKLCH" })
258
- ] }) }),
259
- /* @__PURE__ */ jsx(PreviewCell, { name: "Link Scale", children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-start gap-2", children: [
260
- /* @__PURE__ */ jsx(Link, { color: "accent", href: "#", size: "xs", variant: "link.standalone", children: "Extra small link" }),
261
- /* @__PURE__ */ jsx(Link, { color: "accent", href: "#", size: "sm", variant: "link.standalone", children: "Small link" }),
262
- /* @__PURE__ */ jsx(Link, { color: "accent", href: "#", size: "md", variant: "link.standalone", children: "Medium link" }),
263
- /* @__PURE__ */ jsx(Link, { color: "accent", href: "#", size: "lg", variant: "link.standalone", children: "Large link" }),
264
- /* @__PURE__ */ jsx(Link, { color: "accent", href: "#", size: "xl", variant: "link.standalone", children: "Extra large link" })
265
- ] }) }),
266
- /* @__PURE__ */ jsx(PreviewCell, { name: "Link Inline", children: /* @__PURE__ */ jsxs("div", { className: "max-w-xs text-sm leading-7 text-foreground-2", children: [
267
- "Start:",
268
- /* @__PURE__ */ jsxs("ol", { className: "mt-2 list-decimal space-y-1 pl-6", children: [
269
- /* @__PURE__ */ jsxs("li", { children: [
270
- "Connect a",
271
- " ",
272
- /* @__PURE__ */ jsx(Link, { color: "accent", href: "#", variant: "link.inline", children: "custom domain" })
273
- ] }),
274
- /* @__PURE__ */ jsxs("li", { children: [
275
- "Review the",
276
- " ",
277
- /* @__PURE__ */ jsx(Link, { color: "default", href: "#", variant: "link.inline", children: "deployment checklist" })
278
- ] })
279
- ] })
280
- ] }) }),
281
- /* @__PURE__ */ jsx(PreviewCell, { name: "Composed styles", children: /* @__PURE__ */ jsxs("div", { className: "grid w-full max-w-sm gap-5", children: [
282
- /* @__PURE__ */ jsx(Breadcrumb, { children: /* @__PURE__ */ jsxs(BreadcrumbList, { children: [
283
- /* @__PURE__ */ jsx(BreadcrumbItem, { children: /* @__PURE__ */ jsx(BreadcrumbLink, { href: "#", children: "Default" }) }),
284
- /* @__PURE__ */ jsx(BreadcrumbSeparator, {}),
285
- /* @__PURE__ */ jsx(BreadcrumbItem, { children: /* @__PURE__ */ jsx(BreadcrumbLink, { href: "#", variant: "link.standalone", children: "Link" }) }),
286
- /* @__PURE__ */ jsx(BreadcrumbSeparator, {}),
287
- /* @__PURE__ */ jsx(BreadcrumbItem, { children: /* @__PURE__ */ jsx(BreadcrumbLink, { href: "#", size: "sm", variant: "button.ghost", children: "Button" }) }),
288
- /* @__PURE__ */ jsx(BreadcrumbSeparator, {}),
289
- /* @__PURE__ */ jsx(BreadcrumbItem, { children: /* @__PURE__ */ jsx(BreadcrumbPage, { children: "Page" }) })
290
- ] }) }),
291
- /* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-center gap-3", children: [
292
- /* @__PURE__ */ jsx(Link, { href: "#", variant: "link.inline", children: "Link inline" }),
293
- /* @__PURE__ */ jsx(Link, { href: "#", size: "sm", variant: "button.soft", children: "Link button" }),
294
- /* @__PURE__ */ jsx(Button, { size: "sm", variant: "soft", children: "Button" })
295
- ] })
296
- ] }) }),
297
- /* @__PURE__ */ jsx(PreviewCell, { name: "Text", children: /* @__PURE__ */ jsxs("div", { className: "max-w-xs space-y-2", children: [
298
- /* @__PURE__ */ jsx(Text, { weight: "semibold", children: "Body text" }),
299
- /* @__PURE__ */ jsx(Text, { className: "text-foreground-2", size: "sm", children: "Supporting copy" }),
300
- /* @__PURE__ */ jsx(Text, { size: "xs", variant: "label", children: "Small interface text" }),
301
- /* @__PURE__ */ jsx(Text, { size: "xs", variant: "overline", children: "Overline" })
302
- ] }) }),
303
- /* @__PURE__ */ jsx(PreviewCell, { name: "Select", children: /* @__PURE__ */ jsxs(Select, { defaultValue: "docs", children: [
304
- /* @__PURE__ */ jsxs(SelectTrigger, { className: "w-48", children: [
305
- /* @__PURE__ */ jsx(SelectValue, { placeholder: "Choose section" }),
306
- /* @__PURE__ */ jsx(SelectIcon, {})
307
- ] }),
308
- /* @__PURE__ */ jsx(SelectPortal, { children: /* @__PURE__ */ jsx(SelectPositioner, { children: /* @__PURE__ */ jsx(SelectPopup, { children: /* @__PURE__ */ jsxs(SelectList, { children: [
309
- /* @__PURE__ */ jsxs(SelectItem, { value: "docs", children: [
310
- /* @__PURE__ */ jsx(SelectItemIndicator, {}),
311
- /* @__PURE__ */ jsx(SelectItemText, { children: "Docs" })
312
- ] }),
313
- /* @__PURE__ */ jsxs(SelectItem, { value: "api", children: [
314
- /* @__PURE__ */ jsx(SelectItemIndicator, {}),
315
- /* @__PURE__ */ jsx(SelectItemText, { children: "API" })
316
- ] })
317
- ] }) }) }) })
318
- ] }) }),
319
- /* @__PURE__ */ jsx(PreviewCell, { name: "ScrollArea", children: /* @__PURE__ */ jsx(
320
- ScrollArea,
321
- {
322
- className: "h-36 w-56 border border-stroke-2",
323
- contentClassName: "space-y-3 p-4 text-sm text-foreground-2",
324
- mask: { height: 16 },
325
- variant: "gradient",
326
- children: scrollRows.map((row) => /* @__PURE__ */ jsx("p", { children: row.label }, row.id))
327
- }
328
- ) }),
329
- /* @__PURE__ */ jsx(PreviewCell, { name: "Tooltip", children: /* @__PURE__ */ jsx(TooltipProvider, { children: /* @__PURE__ */ jsxs(Tooltip, { children: [
330
- /* @__PURE__ */ jsx(TooltipTrigger, { className: buttonVariants({ variant: "outline" }), children: "Hover" }),
331
- /* @__PURE__ */ jsx(TooltipPortal, { children: /* @__PURE__ */ jsx(TooltipPositioner, { children: /* @__PURE__ */ jsx(TooltipPopup, { children: "Helpful detail" }) }) })
332
- ] }) }) }),
333
- /* @__PURE__ */ jsx(PreviewCell, { name: "Popover", children: /* @__PURE__ */ jsxs(Popover, { children: [
334
- /* @__PURE__ */ jsx(PopoverTrigger, { className: buttonVariants({ variant: "outline" }), children: "Open" }),
335
- /* @__PURE__ */ jsx(PopoverPortal, { children: /* @__PURE__ */ jsx(PopoverPositioner, { children: /* @__PURE__ */ jsxs(PopoverPopup, { children: [
336
- /* @__PURE__ */ jsx(PopoverTitle, { children: "Popover" }),
337
- /* @__PURE__ */ jsx(Text, { className: "mt-2 text-foreground-2", size: "sm", children: "Floating content with tokenized surface styles." })
338
- ] }) }) })
339
- ] }) }),
340
- /* @__PURE__ */ jsx(PreviewCell, { name: "Dialog", children: /* @__PURE__ */ jsxs(Dialog, { children: [
341
- /* @__PURE__ */ jsx(DialogTrigger, { className: buttonVariants({ variant: "outline" }), children: "Open dialog" }),
342
- /* @__PURE__ */ jsxs(DialogPortal, { children: [
343
- /* @__PURE__ */ jsx(DialogBackdrop, {}),
344
- /* @__PURE__ */ jsxs(DialogPopup, { children: [
345
- /* @__PURE__ */ jsx(DialogTitle, { children: "Dialog title" }),
346
- /* @__PURE__ */ jsx(Text, { className: "mt-2 text-foreground-2", size: "sm", children: "Accessible modal behavior is handled by Base UI." })
347
- ] })
348
- ] })
349
- ] }) }),
350
- /* @__PURE__ */ jsx(PreviewCell, { name: "Menu", children: /* @__PURE__ */ jsxs(Menu, { children: [
351
- /* @__PURE__ */ jsx(MenuTrigger, { className: buttonVariants({ variant: "outline" }), children: "Actions" }),
352
- /* @__PURE__ */ jsx(MenuPortal, { children: /* @__PURE__ */ jsx(MenuPositioner, { children: /* @__PURE__ */ jsxs(MenuPopup, { children: [
353
- /* @__PURE__ */ jsx(MenuItem, { children: "Copy link" }),
354
- /* @__PURE__ */ jsx(MenuItem, { children: "Open settings" })
355
- ] }) }) })
356
- ] }) }),
357
- /* @__PURE__ */ jsx(PreviewCell, { name: "Drawer", children: /* @__PURE__ */ jsxs(Drawer, { children: [
358
- /* @__PURE__ */ jsx(DrawerTrigger, { className: buttonVariants({ variant: "outline" }), children: "Open drawer" }),
359
- /* @__PURE__ */ jsx(DrawerPortal, { children: /* @__PURE__ */ jsx(DrawerViewport, { children: /* @__PURE__ */ jsxs(DrawerPopup, { children: [
360
- /* @__PURE__ */ jsx(DrawerTitle, { children: "Drawer" }),
361
- /* @__PURE__ */ jsx(Text, { className: "mt-2 text-foreground-2", size: "sm", children: "Responsive panel for contextual actions." })
362
- ] }) }) })
363
- ] }) }),
364
- /* @__PURE__ */ jsx(PreviewCell, { name: "Tabs base", children: /* @__PURE__ */ jsxs(Tabs, { className: "w-full max-w-xs", defaultValue: "one", variant: "base", children: [
365
- /* @__PURE__ */ jsxs(TabsList, { "aria-label": "Base tabs", children: [
366
- /* @__PURE__ */ jsx(TabsTab, { value: "one", children: "One" }),
367
- /* @__PURE__ */ jsx(TabsTab, { value: "two", children: "Two" })
368
- ] }),
369
- /* @__PURE__ */ jsx(TabsPanel, { className: "mt-4 text-sm text-foreground-2", value: "one", children: "First panel" }),
370
- /* @__PURE__ */ jsx(TabsPanel, { className: "mt-4 text-sm text-foreground-2", value: "two", children: "Second panel" })
371
- ] }) }),
372
- /* @__PURE__ */ jsx(PreviewCell, { name: "Tabs button", children: /* @__PURE__ */ jsxs(Tabs, { className: "w-full max-w-xs", defaultValue: "draft", variant: "button", children: [
373
- /* @__PURE__ */ jsxs(TabsList, { "aria-label": "Button tabs", children: [
374
- /* @__PURE__ */ jsx(TabsTab, { value: "draft", children: "Draft" }),
375
- /* @__PURE__ */ jsx(TabsTab, { value: "review", children: "Review" }),
376
- /* @__PURE__ */ jsx(TabsTab, { value: "live", children: "Live" })
377
- ] }),
378
- /* @__PURE__ */ jsx(TabsPanel, { className: "mt-4 text-sm text-foreground-2", value: "draft", children: "Draft changes" }),
379
- /* @__PURE__ */ jsx(TabsPanel, { className: "mt-4 text-sm text-foreground-2", value: "review", children: "Review queue" }),
380
- /* @__PURE__ */ jsx(TabsPanel, { className: "mt-4 text-sm text-foreground-2", value: "live", children: "Live version" })
381
- ] }) }),
382
- /* @__PURE__ */ jsx(PreviewCell, { name: "Tabs underline", children: /* @__PURE__ */ jsxs(
383
- Tabs,
384
- {
385
- className: "w-full max-w-xs",
386
- defaultValue: "overview",
387
- indicatorColor: "accent",
388
- variant: "underline",
389
- children: [
390
- /* @__PURE__ */ jsxs(TabsList, { "aria-label": "Underline tabs", children: [
391
- /* @__PURE__ */ jsx(TabsTab, { value: "overview", children: "Overview" }),
392
- /* @__PURE__ */ jsx(TabsTab, { value: "activity", children: "Activity" }),
393
- /* @__PURE__ */ jsx(TabsTab, { value: "settings", children: "Settings" }),
394
- /* @__PURE__ */ jsx(TabsIndicator, {})
395
- ] }),
396
- /* @__PURE__ */ jsx(
397
- TabsPanel,
398
- {
399
- className: "mt-4 text-sm text-foreground-2",
400
- value: "overview",
401
- children: "Publication summary"
402
- }
403
- ),
404
- /* @__PURE__ */ jsx(
405
- TabsPanel,
406
- {
407
- className: "mt-4 text-sm text-foreground-2",
408
- value: "activity",
409
- children: "Recent updates"
410
- }
411
- ),
412
- /* @__PURE__ */ jsx(
413
- TabsPanel,
414
- {
415
- className: "mt-4 text-sm text-foreground-2",
416
- value: "settings",
417
- children: "Project settings"
418
- }
419
- )
420
- ]
421
- }
422
- ) }),
423
- /* @__PURE__ */ jsx(PreviewCell, { name: "NavigationTabs", children: /* @__PURE__ */ jsxs("div", { className: "grid w-full max-w-sm gap-4", children: [
424
- /* @__PURE__ */ jsx(NavigationTabs, { defaultValue: "docs", variant: "base", children: /* @__PURE__ */ jsxs(NavigationTabsList, { "aria-label": "Base navigation tabs", children: [
425
- /* @__PURE__ */ jsx(NavigationTabsLink, { active: !0, href: "#docs", value: "docs", children: "Docs" }),
426
- /* @__PURE__ */ jsx(NavigationTabsLink, { href: "#api", value: "api", children: "API" })
427
- ] }) }),
428
- /* @__PURE__ */ jsx(NavigationTabs, { defaultValue: "drafts", variant: "button", children: /* @__PURE__ */ jsxs(NavigationTabsList, { "aria-label": "Button navigation tabs", children: [
429
- /* @__PURE__ */ jsx(NavigationTabsLink, { active: !0, href: "#drafts", value: "drafts", children: "Drafts" }),
430
- /* @__PURE__ */ jsx(NavigationTabsLink, { href: "#published", value: "published", children: "Published" })
431
- ] }) }),
432
- /* @__PURE__ */ jsx(
433
- NavigationTabs,
434
- {
435
- defaultValue: "overview",
436
- indicatorColor: "foreground",
437
- variant: "underline",
438
- children: /* @__PURE__ */ jsxs(NavigationTabsList, { "aria-label": "Underline navigation tabs", children: [
439
- /* @__PURE__ */ jsx(NavigationTabsLink, { active: !0, href: "#overview", value: "overview", children: "Overview" }),
440
- /* @__PURE__ */ jsx(NavigationTabsLink, { href: "#analytics", value: "analytics", children: "Analytics" }),
441
- /* @__PURE__ */ jsx(NavigationTabsIndicator, {})
442
- ] })
443
- }
444
- )
445
- ] }) }),
446
- /* @__PURE__ */ jsx(PreviewCell, { name: "Progress", children: /* @__PURE__ */ jsx(Progress, { className: "w-full max-w-xs", value: 64, children: /* @__PURE__ */ jsx(ProgressTrack, { children: /* @__PURE__ */ jsx(ProgressIndicator, {}) }) }) }),
447
- /* @__PURE__ */ jsx(PreviewCell, { name: "Accordion", children: /* @__PURE__ */ jsx(Accordion, { className: "w-full max-w-xs", defaultValue: ["one"], children: /* @__PURE__ */ jsxs(AccordionItem, { value: "one", children: [
448
- /* @__PURE__ */ jsx(AccordionHeader, { children: /* @__PURE__ */ jsx(AccordionTrigger, { children: "Section" }) }),
449
- /* @__PURE__ */ jsx(AccordionPanel, { children: "Expandable content preview." })
450
- ] }) }) }),
451
- /* @__PURE__ */ jsx(PreviewCell, { name: "MetaKey", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
452
- /* @__PURE__ */ jsx(MetaKey, {}),
453
- /* @__PURE__ */ jsx(Kbd, { children: "K" })
454
- ] }) }),
455
- /* @__PURE__ */ jsx(PreviewCell, { name: "Toast", children: /* @__PURE__ */ jsx(ToastProvider, { children: /* @__PURE__ */ jsx(Toast, { className: "w-full max-w-xs", toast: { id: "preview" }, children: /* @__PURE__ */ jsxs(ToastContent, { children: [
456
- /* @__PURE__ */ jsx(ToastTitle, { children: "Saved" }),
457
- /* @__PURE__ */ jsx(ToastDescription, { children: "Changes are ready to publish." })
458
- ] }) }) }) }),
459
- /* @__PURE__ */ jsx(PreviewCell, { name: "Kbd", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
460
- /* @__PURE__ */ jsx(Kbd, { children: "\u2318" }),
461
- /* @__PURE__ */ jsx(Kbd, { children: "K" }),
462
- /* @__PURE__ */ jsx(Kbd, { children: "Esc" })
463
- ] }) }),
464
- /* @__PURE__ */ jsx(PreviewCell, { name: "Card", children: /* @__PURE__ */ jsxs(Card, { className: "w-full max-w-xs", variant: "elevated", children: [
465
- /* @__PURE__ */ jsxs(CardHeader, { children: [
466
- /* @__PURE__ */ jsx(CardTitle, { children: "Card title" }),
467
- /* @__PURE__ */ jsx(CardDescription, { children: "Uses surface, stroke, radius, and foreground tokens." })
468
- ] }),
469
- /* @__PURE__ */ jsxs(CardContent, { children: [
470
- /* @__PURE__ */ jsx(Separator, {}),
471
- /* @__PURE__ */ jsx("p", { className: "mt-4 text-sm text-foreground-2", children: "Composable content." })
472
- ] })
473
- ] }) })
474
- ] });
475
- }
476
- function MdxPreview({ items = [] }) {
477
- return /* @__PURE__ */ jsxs("div", { className: "grid border-l border-t border-stroke-3 md:grid-cols-2 xl:grid-cols-4", children: [
478
- items.map((item) => /* @__PURE__ */ jsx(PreviewCell, { name: item.name, children: item.children }, item.name)),
479
- !hasFixture(items, "Link") && /* @__PURE__ */ jsx(PreviewCell, { name: "Link", children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center gap-3", children: [
480
- /* @__PURE__ */ jsx(Link, { color: "default", href: "/ds", variant: "link.standalone", children: "Default standalone" }),
481
- /* @__PURE__ */ jsx(Link, { color: "accent", href: "/ds", variant: "link.inline", children: "Accent inline" }),
482
- /* @__PURE__ */ jsx(Link, { href: "/ds", size: "sm", variant: "button.solid", children: "Button link" })
483
- ] }) }),
484
- /* @__PURE__ */ jsx(PreviewCell, { name: "MDX Links", children: /* @__PURE__ */ jsxs("div", { className: "max-w-md space-y-4 text-sm leading-7 text-foreground-2", children: [
485
- /* @__PURE__ */ jsxs("p", { children: [
486
- "This MDX paragraph includes an",
487
- " ",
488
- /* @__PURE__ */ jsx(Link, { color: "accent", href: "/ds", variant: "link.inline", children: "internal relative link" }),
489
- ", an",
490
- " ",
491
- /* @__PURE__ */ jsx(
492
- Link,
493
- {
494
- color: "accent",
495
- href: "https://example.com",
496
- variant: "link.inline",
497
- children: "external link"
498
- }
499
- ),
500
- ", a",
501
- " ",
502
- /* @__PURE__ */ jsx(Link, { color: "accent", href: "/ds", variant: "link.inline", children: /* @__PURE__ */ jsx("strong", { children: "link with bold text" }) }),
503
- ", a",
504
- " ",
505
- /* @__PURE__ */ jsx(Link, { color: "accent", href: "/ds", variant: "link.inline", children: /* @__PURE__ */ jsx("em", { children: "link with italics" }) }),
506
- ", and a",
507
- " ",
508
- /* @__PURE__ */ jsx(Link, { color: "accent", href: "/ds", variant: "link.inline", children: /* @__PURE__ */ jsx(InlineCode, { children: "linked inline code" }) }),
509
- "."
510
- ] }),
511
- /* @__PURE__ */ jsx("h3", { className: "text-lg font-medium leading-7 text-foreground-1", children: /* @__PURE__ */ jsx(Link, { color: "accent", href: "/ds", variant: "link.standalone", children: "Linked heading" }) })
512
- ] }) }),
513
- /* @__PURE__ */ jsx(PreviewCell, { name: "Callout", children: /* @__PURE__ */ jsxs("div", { className: "max-w-xs rounded-card border border-stroke-2 bg-surface-2 p-4 text-sm leading-6 text-foreground-2", children: [
514
- /* @__PURE__ */ jsx("p", { className: "font-medium text-foreground-1", children: "Note" }),
515
- /* @__PURE__ */ jsx("p", { className: "mt-1", children: "A compact MDX callout preview." })
516
- ] }) }),
517
- /* @__PURE__ */ jsx(PreviewCell, { name: "Table", children: /* @__PURE__ */ jsx("div", { className: "w-full max-w-xs", children: /* @__PURE__ */ jsxs(Table, { children: [
518
- /* @__PURE__ */ jsx(TableHeader, { children: /* @__PURE__ */ jsxs(TableRow, { children: [
519
- /* @__PURE__ */ jsx(TableHead, { children: "Token" }),
520
- /* @__PURE__ */ jsx(TableHead, { children: "Use" })
521
- ] }) }),
522
- /* @__PURE__ */ jsx(TableBody, { children: /* @__PURE__ */ jsxs(TableRow, { children: [
523
- /* @__PURE__ */ jsx(TableCell, { children: "surface-2" }),
524
- /* @__PURE__ */ jsx(TableCell, { children: "Panels" })
525
- ] }) })
526
- ] }) }) }),
527
- /* @__PURE__ */ jsx(PreviewCell, { name: "Code", children: /* @__PURE__ */ jsx("pre", { className: "max-w-xs overflow-auto rounded-codeblock border border-stroke-2 bg-surface-3 p-4 text-xs text-foreground-1", children: /* @__PURE__ */ jsx("code", { children: 'export const value = "publishOS";' }) }) })
528
- ] });
529
- }
530
- function CopyToClipboardPreview() {
531
- let [copied, setCopied] = useState(!1);
532
- function handleCopy() {
533
- navigator.clipboard?.writeText("pnpm publish.os add block"), setCopied(!0), window.setTimeout(() => setCopied(!1), 1200);
534
- }
535
- return /* @__PURE__ */ jsx(
536
- Button,
537
- {
538
- "aria-label": copied ? "Copied command" : "Copy command",
539
- leftIcon: /* @__PURE__ */ jsx(
540
- AnimatedIconSwap,
541
- {
542
- active: copied,
543
- activeIcon: /* @__PURE__ */ jsx(Check, { "aria-hidden": "true" }),
544
- defaultIcon: /* @__PURE__ */ jsx(Copy, { "aria-hidden": "true" }),
545
- size: 16
546
- }
547
- ),
548
- onClick: handleCopy,
549
- variant: "soft",
550
- children: "Copy"
551
- }
552
- );
553
- }
554
- function BlocksPreview({
555
- items = []
556
- }) {
557
- return /* @__PURE__ */ jsxs("div", { className: "grid border-l border-t border-stroke-3", children: [
558
- items.map((item) => /* @__PURE__ */ jsxs(
559
- "section",
560
- {
561
- className: "border-b border-r border-stroke-3 bg-surface-1",
562
- children: [
563
- /* @__PURE__ */ jsx("h3", { className: "px-4 pt-4 text-xs font-medium text-foreground-3", children: item.name }),
564
- /* @__PURE__ */ jsx("div", { className: "mt-8", children: item.children })
565
- ]
566
- },
567
- item.name
568
- )),
569
- !hasFixture(items, "Navbar") && /* @__PURE__ */ jsxs("section", { className: "border-b border-r border-stroke-3 bg-surface-1", children: [
570
- /* @__PURE__ */ jsx("h3", { className: "px-4 pt-4 text-xs font-medium text-foreground-3", children: "Navbar" }),
571
- /* @__PURE__ */ jsx("div", { className: "mt-8 border-y border-stroke-3 bg-surface-2 px-6 py-4", children: /* @__PURE__ */ jsxs("div", { className: "mx-auto flex max-w-6xl flex-col gap-3 md:flex-row md:items-center md:justify-between", children: [
572
- /* @__PURE__ */ jsx("div", { className: "text-sm font-medium text-foreground-1", children: "publishOS / Docs / Introduction" }),
573
- /* @__PURE__ */ jsxs("nav", { className: "flex flex-wrap gap-4", children: [
574
- /* @__PURE__ */ jsx(Link, { active: !0, color: "accent", href: "#", size: "sm", children: "Docs" }),
575
- /* @__PURE__ */ jsx(Link, { href: "#", size: "sm", children: "Blog" }),
576
- /* @__PURE__ */ jsx(Link, { href: "#", size: "sm", children: "Changelog" })
577
- ] })
578
- ] }) })
579
- ] }),
580
- !hasFixture(items, "AnimatedIconSwap") && /* @__PURE__ */ jsxs("section", { className: "border-b border-r border-stroke-3 bg-surface-1 p-4", children: [
581
- /* @__PURE__ */ jsx("h3", { className: "text-xs font-medium text-foreground-3", children: "AnimatedIconSwap" }),
582
- /* @__PURE__ */ jsx("div", { className: "mt-8 flex justify-center", children: /* @__PURE__ */ jsx(CopyToClipboardPreview, {}) })
583
- ] }),
584
- /* @__PURE__ */ jsxs("section", { className: "border-b border-r border-stroke-3 bg-surface-1 p-4", children: [
585
- /* @__PURE__ */ jsx("h3", { className: "text-xs font-medium text-foreground-3", children: "Footer" }),
586
- /* @__PURE__ */ jsx("div", { className: "mt-8 border-t border-stroke-3 py-6 text-sm text-foreground-2", children: /* @__PURE__ */ jsxs("div", { className: "mx-auto flex max-w-6xl justify-between", children: [
587
- /* @__PURE__ */ jsx("span", { children: "publishOS" }),
588
- /* @__PURE__ */ jsx("span", { children: "Docs, API, Status" })
589
- ] }) })
590
- ] })
591
- ] });
592
- }
593
- function ActivePanel({
594
- blocks,
595
- mdx,
596
- tab,
597
- ui
598
- }) {
599
- return tab === "tokens" ? /* @__PURE__ */ jsx(ColorPalette, {}) : tab === "typography" ? /* @__PURE__ */ jsx(TypographyPreview, {}) : tab === "ui" ? /* @__PURE__ */ jsx(UiPreview, { items: ui }) : tab === "mdx" ? /* @__PURE__ */ jsx(MdxPreview, { items: mdx }) : /* @__PURE__ */ jsx(BlocksPreview, { items: blocks });
600
- }
601
- function DesignSystemPreview({
602
- blocks,
603
- initialTab = "ui",
604
- mdx,
605
- tabComponents,
606
- ui
607
- }) {
608
- let [activeTab, setActiveTab] = useState(initialTab), TabsRoot = tabComponents?.Tabs ?? Tabs, TabsListRoot = tabComponents?.TabsList ?? TabsList, TabsPanelRoot = tabComponents?.TabsPanel ?? TabsPanel, TabsTabRoot = tabComponents?.TabsTab ?? TabsTab;
609
- return /* @__PURE__ */ jsx("section", { className: "w-full text-foreground-1", children: /* @__PURE__ */ jsxs(
610
- TabsRoot,
611
- {
612
- className: "w-full",
613
- onValueChange: (value) => setActiveTab(value),
614
- value: activeTab,
615
- children: [
616
- /* @__PURE__ */ jsx(
617
- TabsListRoot,
618
- {
619
- "aria-label": "Design system preview sections",
620
- className: "mb-4",
621
- children: tabs.map((tab) => /* @__PURE__ */ jsx(
622
- TabsTabRoot,
623
- {
624
- id: `design-system-tab-${tab.id}`,
625
- value: tab.id,
626
- children: tab.label
627
- },
628
- tab.id
629
- ))
630
- }
631
- ),
632
- /* @__PURE__ */ jsx(
633
- TabsPanelRoot,
634
- {
635
- "aria-labelledby": `design-system-tab-${activeTab}`,
636
- className: "overflow-hidden rounded-card border border-stroke-3 bg-surface-1",
637
- id: `design-system-${activeTab}`,
638
- value: activeTab,
639
- children: /* @__PURE__ */ jsx(ActivePanel, { blocks, mdx, tab: activeTab, ui })
640
- }
641
- )
642
- ]
643
- }
644
- ) });
645
- }
646
- export {
647
- DesignSystemPreview
648
- };
@@ -1,5 +0,0 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
-
3
- declare function LinkPlayground(): react_jsx_runtime.JSX.Element;
4
-
5
- export { LinkPlayground };