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