@publish.os/nextjs 0.0.1-alpha.5 → 0.0.1-alpha.6

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