@publish.os/nextjs 0.0.1-alpha.90 → 0.0.1-alpha.92

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 (284) hide show
  1. package/compiler-assets/nextjs/defaults/group/index.tsx +16 -11
  2. package/compiler-assets/nextjs/defaults/group/layout.tsx +6 -6
  3. package/compiler-assets/nextjs/defaults/group/page.tsx +36 -26
  4. package/compiler-assets/nextjs/defaults/project/next.config.mjs +21 -11
  5. package/compiler-assets/nextjs/defaults/project/tsconfig.json.template +10 -0
  6. package/compiler-assets/nextjs/defaults/root/css/components/code-block.css +18 -0
  7. package/compiler-assets/nextjs/defaults/root/index.tsx +16 -11
  8. package/compiler-assets/nextjs/defaults/root/layout.tsx +7 -3
  9. package/compiler-assets/nextjs/shims/agent-user-agents.ts +65 -0
  10. package/compiler-assets/nextjs/shims/document.tsx +46 -0
  11. package/compiler-assets/nextjs/shims/generated-leaf-page.tsx +5 -0
  12. package/compiler-assets/nextjs/shims/global-layout.tsx +8 -42
  13. package/compiler-assets/nextjs/shims/global-not-found.tsx +69 -0
  14. package/compiler-assets/nextjs/shims/markdown-route.ts +2 -0
  15. package/compiler-assets/nextjs/shims/metadata-icons.tsx +39 -0
  16. package/compiler-assets/nextjs/shims/not-found-content.tsx +53 -0
  17. package/compiler-assets/nextjs/shims/not-found-navigation.tsx +60 -0
  18. package/compiler-assets/nextjs/shims/proxy.ts +254 -86
  19. package/compiler-assets/nextjs/shims/site-fenced-code-block.tsx +2 -6
  20. package/compiler-assets/nextjs/shims/site-mdx-components.tsx +28 -16
  21. package/compiler-assets/nextjs/shims/site-mdx.tsx +6 -1
  22. package/dist/{build-operation-2JAYBSKF.js → build-operation-CJDUL4OW.js} +29 -23
  23. package/dist/{button-c3WGnxIj.d.ts → button-D6Xp2HBm.d.ts} +4 -4
  24. package/dist/capture-local-source-WGGDIUU2.js +258 -0
  25. package/dist/chunk-22RSSUNV.js +13 -0
  26. package/dist/chunk-3T4HVDSC.js +426 -0
  27. package/dist/{chunk-WKTEO6RS.js → chunk-4BC2L2KA.js} +46 -12
  28. package/dist/{chunk-WDY4IK6Z.js → chunk-5J3YUNRY.js} +3 -10
  29. package/dist/chunk-5KAD7W53.js +248 -0
  30. package/dist/{chunk-DWA3ZRGW.js → chunk-6C65KV7O.js} +2 -2
  31. package/dist/{chunk-GGKFQ3MA.js → chunk-6D2E6UMD.js} +144 -70
  32. package/dist/{chunk-7OGTPSKI.js → chunk-7NY22B5U.js} +8 -3
  33. package/dist/chunk-DX7PXFCM.js +2519 -0
  34. package/dist/{chunk-726GV2NF.js → chunk-DZ3VWEV5.js} +950 -632
  35. package/dist/chunk-EFO6AWXN.js +19 -0
  36. package/dist/chunk-IL4RJOKI.js +186 -0
  37. package/dist/{chunk-H6XILMZX.js → chunk-NHSLTARU.js} +2588 -1493
  38. package/dist/{chunk-DLDFHU7Y.js → chunk-NNBJZPFM.js} +4 -2
  39. package/dist/{chunk-VO2I7MTM.js → chunk-SBMDONTV.js} +10 -7
  40. package/dist/{chunk-YLTOLYWM.js → chunk-WL75GQ5M.js} +6 -18
  41. package/dist/compiler.d.ts +15 -2
  42. package/dist/compiler.js +111 -23
  43. package/dist/components/blocks/agent-actions.d.ts +81 -0
  44. package/dist/components/blocks/agent-actions.js +563 -0
  45. package/dist/components/blocks/toc.d.ts +43 -0
  46. package/dist/components/blocks/toc.js +136 -0
  47. package/dist/components/ui/button.d.ts +4 -0
  48. package/dist/components/ui/button.js +94 -0
  49. package/dist/compose-44GJSMXD.js +16 -0
  50. package/dist/config/createNextConfig.js +19 -3
  51. package/dist/{dev-operation-TZDVJCN7.js → dev-operation-WNECBHZ5.js} +134 -84
  52. package/dist/{framework-selection-X4U6Y6QC.js → framework-selection-ZVO323PK.js} +3 -2
  53. package/dist/ide-support-TG74L4FF.js +16 -0
  54. package/dist/index.d.ts +151 -95
  55. package/dist/index.js +25 -0
  56. package/dist/jsx-dev-runtime.d.ts +6 -0
  57. package/dist/jsx-dev-runtime.js +100 -0
  58. package/dist/jsx-runtime.d.ts +7 -0
  59. package/dist/jsx-runtime.js +97 -0
  60. package/dist/kernel/components/blocks/AgentActions.d.ts +37 -8
  61. package/dist/kernel/components/blocks/AgentActions.js +384 -174
  62. package/dist/kernel/components/blocks/agent-actions.d.ts +4 -0
  63. package/dist/kernel/components/blocks/agent-actions.js +563 -0
  64. package/dist/kernel/components/blocks/animated-icon-swap.d.ts +2 -2
  65. package/dist/kernel/components/blocks/animated-icon-swap.js +1 -1
  66. package/dist/kernel/components/blocks/color-palette.d.ts +2 -2
  67. package/dist/kernel/components/blocks/color-palette.js +4 -4
  68. package/dist/kernel/components/blocks/logo-block.d.ts +2 -2
  69. package/dist/kernel/components/blocks/logo-block.js +1 -1
  70. package/dist/kernel/components/blocks/nav-breadcrumb.d.ts +6 -5
  71. package/dist/kernel/components/blocks/nav-breadcrumb.js +21 -15
  72. package/dist/kernel/components/blocks/navbar.d.ts +5 -4
  73. package/dist/kernel/components/blocks/navbar.js +79 -59
  74. package/dist/kernel/components/blocks/navigation-progress.d.ts +2 -2
  75. package/dist/kernel/components/blocks/navigation-progress.js +2 -2
  76. package/dist/kernel/components/blocks/next-prev.d.ts +4 -4
  77. package/dist/kernel/components/blocks/next-prev.js +30 -7
  78. package/dist/kernel/components/blocks/page-list.d.ts +4 -4
  79. package/dist/kernel/components/blocks/page-list.js +32 -9
  80. package/dist/kernel/components/blocks/search.d.ts +9 -15
  81. package/dist/kernel/components/blocks/search.js +16 -17
  82. package/dist/kernel/components/blocks/sidebar-node.d.ts +3 -5
  83. package/dist/kernel/components/blocks/sidebar-node.js +13 -3
  84. package/dist/kernel/components/blocks/sidebar.d.ts +6 -7
  85. package/dist/kernel/components/blocks/sidebar.js +137 -28
  86. package/dist/kernel/components/blocks/theme-toggle.d.ts +3 -4
  87. package/dist/kernel/components/blocks/theme-toggle.js +5 -5
  88. package/dist/kernel/components/blocks/toc-client.d.ts +40 -0
  89. package/dist/kernel/components/blocks/toc-client.js +495 -0
  90. package/dist/kernel/components/blocks/toc.d.ts +20 -2
  91. package/dist/kernel/components/blocks/toc.js +121 -179
  92. package/dist/kernel/components/mdx/components/blockquote.d.ts +2 -2
  93. package/dist/kernel/components/mdx/components/blockquote.js +1 -1
  94. package/dist/kernel/components/mdx/components/callout.d.ts +3 -3
  95. package/dist/kernel/components/mdx/components/callout.js +1 -1
  96. package/dist/kernel/components/mdx/components/code-block.d.ts +2 -2
  97. package/dist/kernel/components/mdx/components/code-block.js +2 -2
  98. package/dist/kernel/components/mdx/components/copy-code-button.d.ts +2 -2
  99. package/dist/kernel/components/mdx/components/copy-code-button.js +5 -4
  100. package/dist/kernel/components/mdx/components/figure-caption.d.ts +3 -3
  101. package/dist/kernel/components/mdx/components/figure-caption.js +3 -2
  102. package/dist/kernel/components/mdx/components/figure.d.ts +8 -4
  103. package/dist/kernel/components/mdx/components/figure.js +23 -13
  104. package/dist/kernel/components/mdx/components/footnotes.d.ts +2 -2
  105. package/dist/kernel/components/mdx/components/footnotes.js +1 -1
  106. package/dist/kernel/components/mdx/components/heading-copy-link.d.ts +2 -2
  107. package/dist/kernel/components/mdx/components/heading-copy-link.js +1 -1
  108. package/dist/kernel/components/mdx/components/heading.d.ts +2 -2
  109. package/dist/kernel/components/mdx/components/heading.js +6 -3
  110. package/dist/kernel/components/mdx/components/hr.d.ts +4 -4
  111. package/dist/kernel/components/mdx/components/hr.js +2 -2
  112. package/dist/kernel/components/mdx/components/image-zoom.d.ts +3 -3
  113. package/dist/kernel/components/mdx/components/image-zoom.js +4 -3
  114. package/dist/kernel/components/mdx/components/image.d.ts +2 -2
  115. package/dist/kernel/components/mdx/components/image.js +22 -17
  116. package/dist/kernel/components/mdx/components/inline-code.d.ts +2 -2
  117. package/dist/kernel/components/mdx/components/inline-code.js +1 -1
  118. package/dist/kernel/components/mdx/components/kbd.d.ts +3 -3
  119. package/dist/kernel/components/mdx/components/kbd.js +2 -2
  120. package/dist/kernel/components/mdx/components/link.d.ts +6 -6
  121. package/dist/kernel/components/mdx/components/link.js +2 -2
  122. package/dist/kernel/components/mdx/components/paragraph.d.ts +2 -2
  123. package/dist/kernel/components/mdx/components/paragraph.js +1 -1
  124. package/dist/kernel/components/mdx/components/strikethrough.d.ts +2 -2
  125. package/dist/kernel/components/mdx/components/strikethrough.js +1 -1
  126. package/dist/kernel/components/mdx/components/table.d.ts +7 -7
  127. package/dist/kernel/components/mdx/components/table.js +2 -2
  128. package/dist/kernel/components/mdx/components/task-list.d.ts +3 -3
  129. package/dist/kernel/components/mdx/components/task-list.js +1 -1
  130. package/dist/kernel/components/mdx/components/video-player.d.ts +8 -4
  131. package/dist/kernel/components/mdx/components/video-player.js +6 -2
  132. package/dist/kernel/components/mdx/components/video.d.ts +5 -4
  133. package/dist/kernel/components/mdx/components/video.js +7 -5
  134. package/dist/kernel/components/mdx/error-boundary.d.ts +3 -4
  135. package/dist/kernel/components/mdx/error-boundary.js +2 -2
  136. package/dist/kernel/components/mdx/error-fallback.d.ts +2 -2
  137. package/dist/kernel/components/mdx/error-fallback.js +1 -1
  138. package/dist/kernel/components/mdx/mdx.d.ts +57 -16
  139. package/dist/kernel/components/mdx/mdx.js +232 -35
  140. package/dist/kernel/components/mdx/rehype-heading-ids.d.ts +1 -0
  141. package/dist/kernel/components/mdx/rehype-heading-ids.js +5 -3
  142. package/dist/kernel/components/mdx/types.d.ts +1 -1
  143. package/dist/kernel/components/next-image.d.ts +12 -0
  144. package/dist/kernel/components/next-image.js +61 -0
  145. package/dist/kernel/components/ui/accordion.d.ts +7 -7
  146. package/dist/kernel/components/ui/accordion.js +1 -1
  147. package/dist/kernel/components/ui/breadcrumb-trail.d.ts +3 -4
  148. package/dist/kernel/components/ui/breadcrumb-trail.js +2 -2
  149. package/dist/kernel/components/ui/breadcrumb.d.ts +14 -14
  150. package/dist/kernel/components/ui/breadcrumb.js +4 -4
  151. package/dist/kernel/components/ui/button-group.d.ts +6 -6
  152. package/dist/kernel/components/ui/button-group.js +3 -3
  153. package/dist/kernel/components/ui/button.d.ts +59 -7
  154. package/dist/kernel/components/ui/button.js +43 -39
  155. package/dist/kernel/components/ui/card.d.ts +7 -7
  156. package/dist/kernel/components/ui/card.js +1 -1
  157. package/dist/kernel/components/ui/dialog.d.ts +10 -10
  158. package/dist/kernel/components/ui/dialog.js +1 -1
  159. package/dist/kernel/components/ui/drawer.d.ts +12 -12
  160. package/dist/kernel/components/ui/drawer.js +1 -1
  161. package/dist/kernel/components/ui/input.d.ts +2 -2
  162. package/dist/kernel/components/ui/input.js +1 -1
  163. package/dist/kernel/components/ui/kbd.d.ts +4 -4
  164. package/dist/kernel/components/ui/kbd.js +1 -1
  165. package/dist/kernel/components/ui/link.d.ts +11 -5
  166. package/dist/kernel/components/ui/link.js +2 -2
  167. package/dist/kernel/components/ui/menu.d.ts +22 -22
  168. package/dist/kernel/components/ui/menu.js +1 -1
  169. package/dist/kernel/components/ui/mod-key.d.ts +2 -3
  170. package/dist/kernel/components/ui/mod-key.js +2 -2
  171. package/dist/kernel/components/ui/navigation-menu.d.ts +15 -15
  172. package/dist/kernel/components/ui/navigation-menu.js +1 -1
  173. package/dist/kernel/components/ui/popover.d.ts +11 -11
  174. package/dist/kernel/components/ui/popover.js +1 -1
  175. package/dist/kernel/components/ui/progress.d.ts +7 -7
  176. package/dist/kernel/components/ui/progress.js +1 -1
  177. package/dist/kernel/components/ui/scroll-area.d.ts +9 -10
  178. package/dist/kernel/components/ui/scroll-area.js +1 -1
  179. package/dist/kernel/components/ui/select.d.ts +16 -16
  180. package/dist/kernel/components/ui/select.js +1 -1
  181. package/dist/kernel/components/ui/separator.d.ts +3 -3
  182. package/dist/kernel/components/ui/separator.js +1 -1
  183. package/dist/kernel/components/ui/table.d.ts +7 -7
  184. package/dist/kernel/components/ui/table.js +1 -1
  185. package/dist/kernel/components/ui/tabs.d.ts +12 -12
  186. package/dist/kernel/components/ui/tabs.js +1 -1
  187. package/dist/kernel/components/ui/tag.d.ts +3 -3
  188. package/dist/kernel/components/ui/tag.js +1 -1
  189. package/dist/kernel/components/ui/text.d.ts +4 -4
  190. package/dist/kernel/components/ui/text.js +1 -1
  191. package/dist/kernel/components/ui/toast.d.ts +11 -11
  192. package/dist/kernel/components/ui/toast.js +1 -1
  193. package/dist/kernel/components/ui/tooltip.d.ts +9 -9
  194. package/dist/kernel/components/ui/tooltip.js +1 -1
  195. package/dist/kernel/defaults.registry.d.ts +4 -17
  196. package/dist/kernel/defaults.registry.js +4 -19
  197. package/dist/kernel/routes/agent/markdown.d.ts +7 -0
  198. package/dist/kernel/routes/agent/markdown.js +229 -54
  199. package/dist/kernel/routes/layouts/group.d.ts +1 -1
  200. package/dist/kernel/routes/layouts/group.js +5 -7
  201. package/dist/kernel/routes/metadata/feed.d.ts +1 -2
  202. package/dist/kernel/routes/metadata/feed.js +119 -88
  203. package/dist/kernel/routes/metadata/llms.d.ts +3 -23
  204. package/dist/kernel/routes/metadata/llms.js +2 -103
  205. package/dist/kernel/routes/metadata/og-image.js +1 -1
  206. package/dist/kernel/routes/metadata/robots.d.ts +5 -3
  207. package/dist/kernel/routes/metadata/robots.js +4 -25
  208. package/dist/kernel/routes/metadata/sitemap.d.ts +36 -3
  209. package/dist/kernel/routes/metadata/sitemap.js +277 -49
  210. package/dist/kernel/routes/not-found.d.ts +34 -0
  211. package/dist/kernel/routes/not-found.js +213 -0
  212. package/dist/kernel/routes/pages/group.d.ts +5 -5
  213. package/dist/kernel/routes/pages/group.js +11 -5
  214. package/dist/kernel/routes/pages/leaf.d.ts +38 -6
  215. package/dist/kernel/routes/pages/leaf.js +21 -12
  216. package/dist/kernel/routes/pages/root.d.ts +5 -5
  217. package/dist/kernel/routes/pages/root.js +21 -6
  218. package/dist/keyboard-shortcuts.d.ts +2 -2
  219. package/dist/keyboard-shortcuts.js +1 -1
  220. package/dist/manifest-types-CcVPH_jh.d.ts +83 -0
  221. package/dist/resolvers/manifest-resolver.d.ts +2 -2
  222. package/dist/resolvers/manifest-resolver.js +65 -35
  223. package/dist/route-metadata-og-image-BeKKFHg7.d.ts +58 -0
  224. package/dist/search.d.ts +2 -9
  225. package/dist/search.js +9 -16
  226. package/dist/sidebar-types-CMrMM0Nj.d.ts +105 -0
  227. package/dist/theme-scope.d.ts +2 -2
  228. package/dist/theme-scope.js +1 -1
  229. package/dist/types-BbqmOzLC.d.ts +168 -0
  230. package/dist/types-TjH1ek0X.d.ts +22 -0
  231. package/dist/types-sM2g9nW0.d.ts +12 -0
  232. package/dist/types.d.ts +117 -91
  233. package/dist/utils/heading-ids.js +30 -11
  234. package/dist/utils/toc-selection.d.ts +7 -0
  235. package/dist/utils/toc-selection.js +14 -0
  236. package/dist/validate-local-source-EN2GW4FR.js +16 -0
  237. package/dist/validate-publish-os-source-OEWQDB7B.js +14 -0
  238. package/init/seed/minimal/publish.os/assets/blog/hello-world.svg +13 -0
  239. package/init/seed/minimal/publish.os/assets/favicon.dark.svg +13 -0
  240. package/init/seed/minimal/publish.os/assets/favicon.svg +13 -0
  241. package/init/seed/minimal/publish.os/blog/content/hello-world.mdx +48 -0
  242. package/init/seed/minimal/publish.os/blog/content/series-a.mdx +11 -0
  243. package/init/seed/minimal/publish.os/blog/index.tsx +85 -0
  244. package/init/seed/minimal/publish.os/blog/layout.tsx +13 -0
  245. package/init/seed/minimal/publish.os/blog/page.tsx +91 -0
  246. package/init/seed/minimal/publish.os/components/blog/copy-link.tsx +64 -0
  247. package/init/seed/minimal/publish.os/components/blog/frontmatter.ts +41 -0
  248. package/init/seed/minimal/publish.os/docs/content/get-started.mdx +2 -3
  249. package/init/seed/minimal/publish.os/docs/content/groups.mdx +5 -6
  250. package/init/seed/minimal/publish.os/publish.os.config.json +17 -2
  251. package/init/seed/minimal/publish.os/theme.css +3 -3
  252. package/init/seed/minimal/seed.json +12 -4
  253. package/init/seed/scratch/publish.os/docs/content/get-started.mdx +1 -1
  254. package/init/seed/scratch/publish.os/publish.os.config.json +1 -1
  255. package/package.json +48 -23
  256. package/release/app/phosphor/package.json +4 -4
  257. package/release/app/phosphor/pnpm-lock.yaml.template +123 -184
  258. package/release/compiler/package.json +5 -3
  259. package/release/compiler/pnpm-lock.yaml.template +153 -183
  260. package/release/release.json +6 -6
  261. package/dist/button-CtzUJB8u.d.ts +0 -11
  262. package/dist/chunk-535TM4A5.js +0 -1455
  263. package/dist/chunk-B2V22WRT.js +0 -297
  264. package/dist/chunk-NECL5IBJ.js +0 -318
  265. package/dist/chunk-SVYGXXYR.js +0 -36
  266. package/dist/chunk-UF6ATARM.js +0 -1100
  267. package/dist/compose-NN23UJGC.js +0 -13
  268. package/dist/ide-support-ZNW7ODFY.js +0 -15
  269. package/dist/kernel/components/blocks/design-system-preview.d.ts +0 -61
  270. package/dist/kernel/components/blocks/design-system-preview.js +0 -667
  271. package/dist/kernel/components/blocks/link-playground.d.ts +0 -5
  272. package/dist/kernel/components/blocks/link-playground.js +0 -744
  273. package/dist/kernel/components/blocks/navigation-progress-playground.d.ts +0 -5
  274. package/dist/kernel/components/blocks/navigation-progress-playground.js +0 -629
  275. package/dist/kernel/components/ui/theme-toggle.d.ts +0 -24
  276. package/dist/kernel/components/ui/theme-toggle.js +0 -53
  277. package/dist/sidebar-types-DKpR27II.d.ts +0 -25
  278. package/dist/types-BzkZty3r.d.ts +0 -147
  279. package/dist/types-CJWRG05y.d.ts +0 -76
  280. package/dist/types-CUtrppxt.d.ts +0 -69
  281. package/dist/validate-local-source-XRL2Y7XE.js +0 -14
  282. package/dist/validate-publish-os-source-DAPZ4QGE.js +0 -12
  283. package/init/seed/minimal/publish.os/assets/favicon/favicon.dark.png +0 -0
  284. package/init/seed/minimal/publish.os/assets/favicon/favicon.png +0 -0
@@ -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-104 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
- };