@justanarthur/modo-ui 0.1.0 → 0.3.0

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 (175) hide show
  1. package/README.md +18 -15
  2. package/dist/blocks/sidebar-app/index.d.ts +1 -1
  3. package/dist/blocks/sidebar-app/index.js +28 -31
  4. package/dist/components/{inputs → AI}/input-message/index.d.ts +1 -1
  5. package/dist/components/AI/input-message/index.js +25 -0
  6. package/dist/components/{thinking-indicator → AI/thinking-indicator}/index.d.ts +1 -1
  7. package/dist/components/AI/thinking-indicator/index.js +13 -0
  8. package/dist/components/{navigation/accordion → accordion}/index.d.ts +1 -1
  9. package/dist/components/accordion/index.js +28 -0
  10. package/dist/components/badge/index.d.ts +1 -1
  11. package/dist/components/badge/index.js +12 -14
  12. package/dist/components/button/index.d.ts +1 -1
  13. package/dist/components/button/index.js +10 -12
  14. package/dist/components/card/index.d.ts +1 -1
  15. package/dist/components/card/index.js +38 -40
  16. package/dist/components/{inputs/input-copy → copy}/index.d.ts +7 -7
  17. package/dist/components/copy/index.js +16 -0
  18. package/dist/components/inputs/checkbox/index.d.ts +62 -0
  19. package/dist/components/inputs/checkbox/index.js +22 -0
  20. package/dist/components/inputs/color-picker/index.d.ts +1 -1
  21. package/dist/components/inputs/color-picker/index.js +31 -33
  22. package/dist/components/inputs/combobox/index.d.ts +2 -2
  23. package/dist/components/inputs/combobox/index.js +31 -34
  24. package/dist/components/inputs/date-time/calendar/index.d.ts +1 -1
  25. package/dist/components/inputs/date-time/calendar/index.js +14 -16
  26. package/dist/components/inputs/date-time/date-picker/index.d.ts +1 -1
  27. package/dist/components/inputs/date-time/date-picker/index.js +28 -30
  28. package/dist/components/inputs/date-time/date-range-picker/index.d.ts +1 -1
  29. package/dist/components/inputs/date-time/date-range-picker/index.js +27 -29
  30. package/dist/components/inputs/date-time/duration-picker/index.d.ts +1 -1
  31. package/dist/components/inputs/date-time/duration-picker/index.js +27 -29
  32. package/dist/components/inputs/date-time/month-picker/index.d.ts +1 -1
  33. package/dist/components/inputs/date-time/month-picker/index.js +26 -28
  34. package/dist/components/inputs/date-time/time-picker/index.d.ts +1 -1
  35. package/dist/components/inputs/date-time/time-picker/index.js +27 -29
  36. package/dist/components/inputs/input/index.d.ts +1 -1
  37. package/dist/components/inputs/input/index.js +15 -16
  38. package/dist/components/inputs/{radio-group → radio}/index.d.ts +30 -30
  39. package/dist/components/inputs/radio/index.js +21 -0
  40. package/dist/components/inputs/search/index.d.ts +1 -1
  41. package/dist/components/inputs/search/index.js +21 -24
  42. package/dist/components/inputs/select/index.d.ts +1 -1
  43. package/dist/components/inputs/select/index.js +30 -33
  44. package/dist/components/inputs/slider/index.d.ts +1 -1
  45. package/dist/components/inputs/slider/index.js +10 -12
  46. package/dist/components/inputs/switch/index.d.ts +27 -6
  47. package/dist/components/inputs/switch/index.js +17 -12
  48. package/dist/components/navigation/sidebar/index.d.ts +3 -3
  49. package/dist/components/navigation/sidebar/index.js +95 -97
  50. package/dist/components/navigation/tabs/index.d.ts +1 -1
  51. package/dist/components/navigation/tabs/index.js +19 -21
  52. package/dist/components/navigation/tabs-subtle/index.d.ts +1 -1
  53. package/dist/components/navigation/tabs-subtle/index.js +17 -19
  54. package/dist/components/overlays/alert-dialog/index.d.ts +2 -2
  55. package/dist/components/overlays/alert-dialog/index.js +18 -20
  56. package/dist/components/overlays/command/index.d.ts +1 -1
  57. package/dist/components/overlays/command/index.js +32 -35
  58. package/dist/components/overlays/context-menu/index.d.ts +1 -1
  59. package/dist/components/overlays/context-menu/index.js +25 -28
  60. package/dist/components/overlays/dialog/index.d.ts +1 -1
  61. package/dist/components/overlays/dialog/index.js +33 -35
  62. package/dist/components/overlays/dropdown/index.d.ts +3 -3
  63. package/dist/components/overlays/dropdown/index.js +40 -43
  64. package/dist/components/overlays/popover/index.d.ts +1 -1
  65. package/dist/components/overlays/popover/index.js +22 -24
  66. package/dist/components/overlays/preview-card/index.d.ts +1 -1
  67. package/dist/components/overlays/preview-card/index.js +15 -17
  68. package/dist/components/overlays/sheet/index.d.ts +1 -1
  69. package/dist/components/overlays/sheet/index.js +20 -22
  70. package/dist/components/overlays/toast/index.d.ts +1 -1
  71. package/dist/components/overlays/toast/index.js +17 -19
  72. package/dist/components/overlays/tooltip/index.d.ts +1 -1
  73. package/dist/components/overlays/tooltip/index.js +13 -15
  74. package/dist/components/table/index.d.ts +1 -1
  75. package/dist/components/table/index.js +22 -24
  76. package/dist/index.d.ts +828 -795
  77. package/dist/index.js +509 -508
  78. package/dist/preset.d.ts +1 -1
  79. package/dist/preset.js +5 -5
  80. package/dist/primitives/code/index.d.ts +1 -1
  81. package/dist/primitives/code/index.js +8 -9
  82. package/dist/primitives/craft/index.d.ts +1 -1
  83. package/dist/primitives/craft/index.js +6 -8
  84. package/dist/primitives/fluid-hover/index.d.ts +1 -1
  85. package/dist/primitives/fluid-hover/index.js +18 -20
  86. package/dist/primitives/morph/index.d.ts +3 -3
  87. package/dist/primitives/morph/index.js +15 -17
  88. package/dist/primitives/motion/index.d.ts +1 -1
  89. package/dist/primitives/motion/index.js +15 -16
  90. package/dist/primitives/scroll-area/index.d.ts +1 -1
  91. package/dist/primitives/scroll-area/index.js +8 -9
  92. package/dist/primitives/sizes/index.d.ts +3 -3
  93. package/dist/primitives/sizes/index.js +17 -18
  94. package/dist/primitives/surface/index.d.ts +1 -1
  95. package/dist/primitives/surface/index.js +11 -12
  96. package/dist/shared/{components-jxgznftn.js → components-0q0sqfh4.js} +16 -16
  97. package/dist/shared/{components-x3rz4cyn.js → components-0sn7ypjw.js} +14 -14
  98. package/dist/shared/components-1434p1mh.js +123 -0
  99. package/dist/shared/{components-vc1k7yv2.js → components-1v7rxytx.js} +3 -3
  100. package/dist/shared/{components-6phwsry6.js → components-1z6tdadk.js} +25 -25
  101. package/dist/shared/{components-5zry9te1.js → components-27nnvrwe.js} +27 -27
  102. package/dist/shared/{components-ess3ch6w.js → components-2dxkv6zm.js} +23 -23
  103. package/dist/shared/{components-s5pkbjx1.js → components-2n3whx7z.js} +56 -56
  104. package/dist/shared/{components-v7es8aan.js → components-2nhgyh31.js} +15 -15
  105. package/dist/shared/{components-6t6nr33r.js → components-39jq9va1.js} +26 -26
  106. package/dist/shared/{components-4hh0gm0v.js → components-39vmfq9s.js} +61 -61
  107. package/dist/shared/{components-zx2hr57f.js → components-3fbbvq5j.js} +15 -15
  108. package/dist/shared/{components-6y1th6k4.js → components-3mkepka5.js} +31 -31
  109. package/dist/shared/{components-e46kf6cp.js → components-59efxjd9.js} +8 -8
  110. package/dist/shared/{components-rc63qsy6.js → components-5xc2j8jz.js} +10 -10
  111. package/dist/shared/{components-hzfp4tjb.js → components-7btqt08d.js} +42 -42
  112. package/dist/shared/{components-9p8s8n5q.js → components-7r3etddy.js} +22 -22
  113. package/dist/shared/{components-j65qt1mq.js → components-8ey44d79.js} +101 -101
  114. package/dist/shared/{components-hjkrv00c.js → components-8snj490h.js} +120 -23
  115. package/dist/shared/{components-40j34hdb.js → components-a86dytt0.js} +116 -116
  116. package/dist/shared/{components-tm88ghva.js → components-ar66gnt0.js} +58 -58
  117. package/dist/shared/{components-5pkcfprd.js → components-b2wyq2cq.js} +22 -22
  118. package/dist/shared/{components-vktws5r6.js → components-b3c5et5b.js} +73 -73
  119. package/dist/shared/{components-4xxtggzp.js → components-bshdmf75.js} +18 -18
  120. package/dist/shared/{components-kf2ehztc.js → components-chacnk61.js} +16 -16
  121. package/dist/shared/{components-7zp99w5d.js → components-cv16mryv.js} +2 -2
  122. package/dist/shared/{components-gjfrycb5.js → components-d6xtjht3.js} +66 -69
  123. package/dist/shared/{components-aaq3yk4f.js → components-dk0gjr5a.js} +43 -43
  124. package/dist/shared/{components-0f0as45n.js → components-ezxhrmer.js} +2 -2
  125. package/dist/shared/{components-7gv95yfy.js → components-frw34b65.js} +83 -83
  126. package/dist/shared/{components-s3yfvfkr.js → components-gc5vtq2f.js} +42 -42
  127. package/dist/shared/components-gf5s6ap9.js +42 -0
  128. package/dist/shared/{components-7cqq1sqy.js → components-gvr9w41t.js} +40 -40
  129. package/dist/shared/{components-x2xyckd5.js → components-gz8zf3ec.js} +20 -20
  130. package/dist/shared/{components-ed7cmssr.js → components-hawvy2qz.js} +18 -18
  131. package/dist/shared/{components-7nww01w4.js → components-hqeq3w9q.js} +34 -34
  132. package/dist/shared/{components-zvb11ker.js → components-hw9yk32z.js} +47 -47
  133. package/dist/shared/{components-y3cqdrgy.js → components-hyq23phv.js} +73 -54
  134. package/dist/shared/{components-bf2d9k02.js → components-jbbmdr74.js} +94 -94
  135. package/dist/shared/{components-vb033rns.js → components-jjw69c4c.js} +6 -6
  136. package/dist/shared/{components-r2gke5p6.js → components-jthe1pwb.js} +125 -125
  137. package/dist/shared/{components-tad5h7ta.js → components-jwst3vtj.js} +48 -48
  138. package/dist/shared/{components-xszag63d.js → components-k809mbn0.js} +12 -12
  139. package/dist/shared/{components-r22vtgqc.js → components-kvr7f9hy.js} +11 -11
  140. package/dist/shared/{components-r4jt6hgd.js → components-mjthm1kf.js} +6 -6
  141. package/dist/shared/{components-nn6xezy2.js → components-nb87fjy4.js} +226 -226
  142. package/dist/shared/{components-gndm6am4.js → components-ng72k97e.js} +17 -17
  143. package/dist/shared/{components-54nf2x99.js → components-pbmqctfa.js} +52 -45
  144. package/dist/shared/{components-peg09pzs.js → components-q5xj5c16.js} +11 -11
  145. package/dist/shared/{components-taxmgbnh.js → components-re6rs21k.js} +17 -17
  146. package/dist/shared/{components-r43mqnd6.js → components-rr7a6ja9.js} +46 -46
  147. package/dist/shared/{components-p2vmyfe1.js → components-s083f38z.js} +43 -43
  148. package/dist/shared/{components-bkvb6nem.js → components-s2bz1xpk.js} +11 -11
  149. package/dist/shared/components-ta7shw28.js +19 -0
  150. package/dist/shared/components-vc7vq5nz.js +32 -0
  151. package/dist/shared/{components-6hzwfmfd.js → components-vfbhxf5r.js} +8 -8
  152. package/dist/shared/{components-8hk9ve3r.js → components-wvp1m52g.js} +57 -57
  153. package/dist/shared/{components-brnzrp2t.js → components-xxvdw7k1.js} +41 -41
  154. package/dist/shared/{components-61ckf42z.js → components-zfnmn5d4.js} +64 -64
  155. package/dist/shared/{components-m5br529r.js → components-zrkzcayz.js} +2 -2
  156. package/dist/shared/{components-csxz9f52.js → components-zx6b6yby.js} +4 -4
  157. package/dist/styles.css +1 -1
  158. package/package.json +3 -3
  159. package/dist/components/inputs/checkbox-group/index.d.ts +0 -50
  160. package/dist/components/inputs/checkbox-group/index.js +0 -23
  161. package/dist/components/inputs/input-copy/index.js +0 -18
  162. package/dist/components/inputs/input-message/index.js +0 -27
  163. package/dist/components/inputs/radio-group/index.js +0 -22
  164. package/dist/components/navigation/accordion/index.js +0 -30
  165. package/dist/components/thinking-indicator/index.js +0 -15
  166. package/dist/shared/components-74c20v2f.js +0 -32
  167. package/dist/shared/components-8hzbsfbd.js +0 -123
  168. package/dist/shared/components-dphg9gjr.js +0 -42
  169. package/dist/shared/components-kpbcms10.js +0 -9
  170. /package/dist/shared/{components-5vxtcp88.js → components-3ky44908.js} +0 -0
  171. /package/dist/shared/{components-4xxddc44.js → components-c6s6b43g.js} +0 -0
  172. /package/dist/shared/{components-nnnd2xef.js → components-men63rwj.js} +0 -0
  173. /package/dist/shared/{components-de8xsm9y.js → components-mhd39z7x.js} +0 -0
  174. /package/dist/shared/{components-dg0w8g5p.js → components-n7mjr357.js} +0 -0
  175. /package/dist/shared/{components-jw16snbn.js → components-vynjtrk6.js} +0 -0
@@ -1,32 +1,32 @@
1
- import {
2
- Tooltip
3
- } from "./components-gndm6am4.js";
4
1
  import {
5
2
  useIcon
6
- } from "./components-m5br529r.js";
3
+ } from "./components-zrkzcayz.js";
7
4
  import {
8
- GooFilter
9
- } from "./components-jxgznftn.js";
5
+ useReduceMotion
6
+ } from "./components-men63rwj.js";
10
7
  import {
11
- useShape
12
- } from "./components-7zp99w5d.js";
8
+ GooFilter
9
+ } from "./components-0q0sqfh4.js";
13
10
  import {
14
11
  GOO_BLUR_RATIO
15
- } from "./components-7nww01w4.js";
12
+ } from "./components-hqeq3w9q.js";
16
13
  import {
17
- useReduceMotion
18
- } from "./components-nnnd2xef.js";
14
+ cn2
15
+ } from "./components-ezxhrmer.js";
16
+ import {
17
+ useShape
18
+ } from "./components-cv16mryv.js";
19
19
  import {
20
- spring
21
- } from "./components-vc1k7yv2.js";
20
+ useSize2
21
+ } from "./components-0sn7ypjw.js";
22
22
  import {
23
- useSize
24
- } from "./components-x3rz4cyn.js";
23
+ Tooltip2
24
+ } from "./components-ng72k97e.js";
25
25
  import {
26
- cn
27
- } from "./components-0f0as45n.js";
26
+ spring2
27
+ } from "./components-1v7rxytx.js";
28
28
 
29
- // components/inputs/input-copy/index.tsx
29
+ // components/copy/index.tsx
30
30
  import { AnimatePresence, animate, motion, useMotionValue } from "motion/react";
31
31
  import {
32
32
  forwardRef,
@@ -53,7 +53,7 @@ var CHECK_STROKE = {
53
53
  icon: "[&_svg]:stroke-[1.5] [&_svg]:transition-[stroke-width] [&_svg]:duration-fast group-hover:[&_svg]:stroke-[2]",
54
54
  button: "[&_svg]:stroke-[2]"
55
55
  };
56
- var { exit: _exit, ...enter } = spring.slow;
56
+ var { exit: _exit, ...enter } = spring2.slow;
57
57
  function placeSheet(el, a, b, p) {
58
58
  if (!el)
59
59
  return;
@@ -91,7 +91,7 @@ function CopyDisc({ status }) {
91
91
  progress.jump(target);
92
92
  return render(target);
93
93
  }
94
- const controls = animate(progress, target, { ...on ? enter : spring.slow.exit, onUpdate: render });
94
+ const controls = animate(progress, target, { ...on ? enter : spring2.slow.exit, onUpdate: render });
95
95
  return () => controls.stop();
96
96
  }, [on, reduced]);
97
97
  return /* @__PURE__ */ jsxs("span", {
@@ -110,11 +110,11 @@ function CopyDisc({ status }) {
110
110
  children: [
111
111
  /* @__PURE__ */ jsx("span", {
112
112
  ref: back,
113
- className: cn("absolute", TONE_BG[tone.current])
113
+ className: cn2("absolute", TONE_BG[tone.current])
114
114
  }),
115
115
  /* @__PURE__ */ jsx("span", {
116
116
  ref: front,
117
- className: cn("absolute", TONE_BG[tone.current])
117
+ className: cn2("absolute", TONE_BG[tone.current])
118
118
  })
119
119
  ]
120
120
  })
@@ -140,8 +140,8 @@ function CopyGlyph({
140
140
  children: status === "idle" ? /* @__PURE__ */ jsx(motion.span, {
141
141
  initial: { opacity: 0, scale: 0.8 },
142
142
  animate: { opacity: 1, scale: 1 },
143
- exit: { opacity: 0, scale: 0.8, transition: spring.fast.exit },
144
- transition: spring.fast,
143
+ exit: { opacity: 0, scale: 0.8, transition: spring2.fast.exit },
144
+ transition: spring2.fast,
145
145
  className: "absolute inset-0 flex items-center justify-center",
146
146
  children: /* @__PURE__ */ jsx(CopyIcon, {
147
147
  size: 14,
@@ -151,9 +151,9 @@ function CopyGlyph({
151
151
  }, "copy") : /* @__PURE__ */ jsx(motion.span, {
152
152
  initial: { opacity: 0, scale: 0.6 },
153
153
  animate: { opacity: 1, scale: 1 },
154
- exit: { opacity: 0, scale: 0.8, transition: spring.fast.exit },
155
- transition: spring.fast,
156
- className: cn("absolute inset-0 flex items-center justify-center", TONE_TEXT[status], CHECK_STROKE[variant]),
154
+ exit: { opacity: 0, scale: 0.8, transition: spring2.fast.exit },
155
+ transition: spring2.fast,
156
+ className: cn2("absolute inset-0 flex items-center justify-center", TONE_TEXT[status], CHECK_STROKE[variant]),
157
157
  children: /* @__PURE__ */ jsx("svg", {
158
158
  width: 14,
159
159
  height: 14,
@@ -167,7 +167,7 @@ function CopyGlyph({
167
167
  initial: { pathLength: 0 },
168
168
  animate: {
169
169
  pathLength: 1,
170
- transition: { duration: spring.fast.duration, ease: "easeOut" }
170
+ transition: { duration: spring2.fast.duration, ease: "easeOut" }
171
171
  }
172
172
  })
173
173
  })
@@ -176,7 +176,7 @@ function CopyGlyph({
176
176
  ]
177
177
  });
178
178
  }
179
- var InputCopy = forwardRef(({ value, label, onCopy, disabled, variant = "icon", align = "right", size, className, ...props }, ref) => {
179
+ var Copy2 = forwardRef(({ value, label, onCopy, disabled, variant = "icon", align = "right", size, className, ...props }, ref) => {
180
180
  const CopyIcon = useIcon("copy");
181
181
  const [status, setStatus] = useState("idle");
182
182
  const [copyCount, setCopyCount] = useState(0);
@@ -185,7 +185,7 @@ var InputCopy = forwardRef(({ value, label, onCopy, disabled, variant = "icon",
185
185
  const tooltipVisibleRef = useRef(false);
186
186
  const tooltipWasVisibleRef = useRef(false);
187
187
  const shape = useShape();
188
- const sizeClasses = useSize(size);
188
+ const sizeClasses = useSize2(size);
189
189
  const rowPy = sizeClasses.variant === "compact" ? "py-1" : "py-2";
190
190
  const generatedId = useId();
191
191
  const labelId = label ? `${generatedId}-label` : undefined;
@@ -247,7 +247,7 @@ var InputCopy = forwardRef(({ value, label, onCopy, disabled, variant = "icon",
247
247
  setTooltipState((prev) => prev === "copied" ? "suppressed" : prev);
248
248
  }, []);
249
249
  const actionElement = variant === "button" ? /* @__PURE__ */ jsxs("span", {
250
- className: cn("shrink-0 flex items-center gap-1.5 px-1.5 transition-colors duration-fast", rowPy, sizeClasses.text, "text-muted-foreground group-hover:text-foreground", "weight-normal"),
250
+ className: cn2("shrink-0 flex items-center gap-1.5 px-1.5 transition-colors duration-fast", rowPy, sizeClasses.text, "text-muted-foreground group-hover:text-foreground", "weight-normal"),
251
251
  children: [
252
252
  /* @__PURE__ */ jsx(CopyGlyph, {
253
253
  status,
@@ -267,11 +267,11 @@ var InputCopy = forwardRef(({ value, label, onCopy, disabled, variant = "icon",
267
267
  mode: "wait",
268
268
  initial: false,
269
269
  children: /* @__PURE__ */ jsx(motion.span, {
270
- className: cn("col-start-1 row-start-1", status === "error" && "text-destructive"),
270
+ className: cn2("col-start-1 row-start-1", status === "error" && "text-destructive"),
271
271
  initial: { opacity: 0, scale: 0.6 },
272
272
  animate: { opacity: 1, scale: 1 },
273
- exit: { opacity: 0, scale: 0.8, transition: spring.fast.exit },
274
- transition: spring.fast,
273
+ exit: { opacity: 0, scale: 0.8, transition: spring2.fast.exit },
274
+ transition: spring2.fast,
275
275
  children: status === "copied" ? "Copied" : status === "error" ? "Failed" : "Copy"
276
276
  }, status)
277
277
  })
@@ -279,7 +279,7 @@ var InputCopy = forwardRef(({ value, label, onCopy, disabled, variant = "icon",
279
279
  })
280
280
  ]
281
281
  }) : /* @__PURE__ */ jsx("span", {
282
- className: cn("shrink-0 flex px-1.5 transition-colors duration-fast", rowPy, "text-muted-foreground group-hover:text-foreground"),
282
+ className: cn2("shrink-0 flex px-1.5 transition-colors duration-fast", rowPy, "text-muted-foreground group-hover:text-foreground"),
283
283
  children: /* @__PURE__ */ jsx(CopyGlyph, {
284
284
  status,
285
285
  copyCount,
@@ -288,7 +288,7 @@ var InputCopy = forwardRef(({ value, label, onCopy, disabled, variant = "icon",
288
288
  })
289
289
  });
290
290
  const valueElement = /* @__PURE__ */ jsx("span", {
291
- className: cn("flex-1 min-w-0 text-left text-foreground font-mono select-none truncate", sizeClasses.text, rowPy, align === "left" ? "pl-1" : "pl-0", "weight-normal"),
291
+ className: cn2("flex-1 min-w-0 text-left text-foreground font-mono select-none truncate", sizeClasses.text, rowPy, align === "left" ? "pl-1" : "pl-0", "weight-normal"),
292
292
  children: /* @__PURE__ */ jsx("mark", {
293
293
  className: "bg-transparent text-foreground transition-colors duration-fast group-hover:bg-brand/20 group-hover:text-foreground",
294
294
  children: value
@@ -313,22 +313,22 @@ var InputCopy = forwardRef(({ value, label, onCopy, disabled, variant = "icon",
313
313
  disabled,
314
314
  "aria-label": status === "copied" ? "Copied" : status === "error" ? "Copy failed" : label ? "Copy" : "Copy to clipboard",
315
315
  "aria-labelledby": label ? `${buttonId} ${labelId}` : undefined,
316
- className: cn("group flex items-center w-full cursor-pointer outline-none transition-all duration-fast", "focus-visible:ring-1 focus-visible:ring-focus-ring", shape.input),
316
+ className: cn2("group flex items-center w-full cursor-pointer outline-none transition-all duration-fast", "focus-visible:ring-1 focus-visible:ring-focus-ring", shape.input),
317
317
  children: buttonContent
318
318
  });
319
319
  return /* @__PURE__ */ jsxs("div", {
320
320
  ref,
321
- className: cn("flex flex-col gap-0.5", disabled && "opacity-50 pointer-events-none", className),
321
+ className: cn2("flex flex-col gap-0.5", disabled && "opacity-50 pointer-events-none", className),
322
322
  onMouseEnter: handleMouseEnter,
323
323
  onMouseLeave: handleMouseLeave,
324
324
  ...props,
325
325
  children: [
326
326
  label && /* @__PURE__ */ jsx("span", {
327
327
  id: labelId,
328
- className: cn("text-muted-foreground", sizeClasses.text, align === "left" ? "pl-1" : "pl-0", "weight-normal"),
328
+ className: cn2("text-muted-foreground", sizeClasses.text, align === "left" ? "pl-1" : "pl-0", "weight-normal"),
329
329
  children: label
330
330
  }),
331
- variant === "icon" ? /* @__PURE__ */ jsx(Tooltip, {
331
+ variant === "icon" ? /* @__PURE__ */ jsx(Tooltip2, {
332
332
  content: tooltipState === "idle" ? "Copy to clipboard" : status === "error" ? "Copy failed" : "Copied",
333
333
  delayDuration: 500,
334
334
  sideOffset: 2,
@@ -339,7 +339,7 @@ var InputCopy = forwardRef(({ value, label, onCopy, disabled, variant = "icon",
339
339
  ]
340
340
  });
341
341
  });
342
- InputCopy.displayName = "InputCopy";
343
- var input_copy_default = InputCopy;
342
+ Copy2.displayName = "Copy";
343
+ var copy_default = Copy2;
344
344
 
345
- export { InputCopy, input_copy_default };
345
+ export { Copy2, copy_default };
@@ -1,13 +1,13 @@
1
- import {
2
- scroll_area_default
3
- } from "./components-ed7cmssr.js";
4
1
  import {
5
2
  SURFACE_BG,
6
- useSurface
7
- } from "./components-csxz9f52.js";
3
+ useSurface2
4
+ } from "./components-zx6b6yby.js";
8
5
  import {
9
- cn
10
- } from "./components-0f0as45n.js";
6
+ cn2
7
+ } from "./components-ezxhrmer.js";
8
+ import {
9
+ scroll_area_default
10
+ } from "./components-hawvy2qz.js";
11
11
 
12
12
  // primitives/code/index.tsx
13
13
  import { Fragment } from "react";
@@ -40,18 +40,18 @@ function highlight(source, language) {
40
40
  ]
41
41
  }, line.index));
42
42
  }
43
- function Code({
43
+ function Code2({
44
44
  children,
45
45
  language = "tsx",
46
46
  className
47
47
  }) {
48
- const level = Math.min(useSurface() + 1, 8);
48
+ const level = Math.min(useSurface2() + 1, 8);
49
49
  const source = children.trim();
50
50
  const id = lang(language);
51
51
  return /* @__PURE__ */ jsx(scroll_area_default, {
52
52
  orientation: "horizontal",
53
53
  viewportClassName: "scroll-fade-x",
54
- className: cn("rounded-xl", SURFACE_BG[level], className),
54
+ className: cn2("rounded-xl", SURFACE_BG[level], className),
55
55
  children: /* @__PURE__ */ jsx("pre", {
56
56
  className: "m-0 w-max min-w-full p-4 font-mono text-caption leading-relaxed text-foreground",
57
57
  children: /* @__PURE__ */ jsx("code", {
@@ -60,4 +60,4 @@ function Code({
60
60
  })
61
61
  });
62
62
  }
63
- export { Code };
63
+ export { Code2 };
@@ -0,0 +1,19 @@
1
+ // lib/row-index.tsx
2
+ import { Children, createContext, isValidElement, useContext } from "react";
3
+ import { jsx, Fragment } from "react/jsx-runtime";
4
+ var RowIndexContext = createContext(0);
5
+ function IndexedRows({ children }) {
6
+ let index = 0;
7
+ return /* @__PURE__ */ jsx(Fragment, {
8
+ children: Children.map(children, (child) => isValidElement(child) ? /* @__PURE__ */ jsx(RowIndexContext.Provider, {
9
+ value: index++,
10
+ children: child
11
+ }) : child)
12
+ });
13
+ }
14
+ function useRowIndex(own) {
15
+ const position = useContext(RowIndexContext);
16
+ return own ?? position;
17
+ }
18
+
19
+ export { IndexedRows, useRowIndex };
@@ -0,0 +1,32 @@
1
+ import {
2
+ surfaceClasses2,
3
+ useSurface2,
4
+ SurfaceProvider2
5
+ } from "./components-zx6b6yby.js";
6
+ import {
7
+ cn2
8
+ } from "./components-ezxhrmer.js";
9
+
10
+ // primitives/surface/index.tsx
11
+ import {
12
+ forwardRef
13
+ } from "react";
14
+ import { jsx } from "react/jsx-runtime";
15
+ var Elevated2 = forwardRef(({ offset, shadowLevel, className, children, ...props }, ref) => {
16
+ const substrate = useSurface2();
17
+ const level = Math.min(substrate + offset, 8);
18
+ return /* @__PURE__ */ jsx(SurfaceProvider2, {
19
+ value: level,
20
+ children: /* @__PURE__ */ jsx("div", {
21
+ ref,
22
+ className: cn2(surfaceClasses2(level, shadowLevel ?? level), className),
23
+ ...props,
24
+ children
25
+ })
26
+ });
27
+ });
28
+ Elevated2.displayName = "Elevated";
29
+ Object.assign(Elevated2, { Provider: SurfaceProvider2 });
30
+ var surface_default = Elevated2;
31
+
32
+ export { Elevated2, surface_default };
@@ -1,19 +1,19 @@
1
- import {
2
- badge_default
3
- } from "./components-9p8s8n5q.js";
4
1
  import {
5
2
  useShape
6
- } from "./components-7zp99w5d.js";
3
+ } from "./components-cv16mryv.js";
7
4
  import {
8
- cn
9
- } from "./components-0f0as45n.js";
5
+ cn2
6
+ } from "./components-ezxhrmer.js";
7
+ import {
8
+ badge_default
9
+ } from "./components-7r3etddy.js";
10
10
 
11
11
  // primitives/craft/index.tsx
12
12
  import { jsx, jsxs } from "react/jsx-runtime";
13
13
  function Pane({ verdict, note, children }) {
14
14
  const shape = useShape();
15
15
  return /* @__PURE__ */ jsxs("figure", {
16
- className: cn("row-span-2 m-0 grid min-w-0 grid-rows-subgrid gap-0 ring-1 ring-border", shape.container),
16
+ className: cn2("row-span-2 m-0 grid min-w-0 grid-rows-subgrid gap-0 ring-1 ring-border", shape.container),
17
17
  children: [
18
18
  /* @__PURE__ */ jsx("div", {
19
19
  className: "flex min-h-40 items-center justify-center p-4",
@@ -39,7 +39,7 @@ function Pane({ verdict, note, children }) {
39
39
  }
40
40
  function Craft({ bad, good, badNote, goodNote, className }) {
41
41
  return /* @__PURE__ */ jsxs("div", {
42
- className: cn("grid w-full gap-3 sm:grid-cols-2", className),
42
+ className: cn2("grid w-full gap-3 sm:grid-cols-2", className),
43
43
  children: [
44
44
  /* @__PURE__ */ jsx(Pane, {
45
45
  verdict: "bad",