@justanarthur/modo-ui 2.5.0 → 2.6.1

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/blocks/desktop-shell/index.tsx +3 -2
  2. package/components/data-display/diff/index.tsx +5 -4
  3. package/components/data-display/markdown/index.tsx +6 -6
  4. package/components/inputs/editable-text/index.tsx +7 -2
  5. package/components/navigation/tabs/list.tsx +1 -5
  6. package/dist/blocks/desktop-shell/index.js +27 -27
  7. package/dist/blocks/sidebar-app/index.js +37 -37
  8. package/dist/components/actions/button/index.js +4 -4
  9. package/dist/components/actions/copy/index.js +12 -12
  10. package/dist/components/containers/accordion/index.js +16 -16
  11. package/dist/components/containers/card/index.js +14 -14
  12. package/dist/components/data-display/avatar/index.js +3 -3
  13. package/dist/components/data-display/badge/index.js +2 -2
  14. package/dist/components/data-display/diff/index.d.ts +2 -1
  15. package/dist/components/data-display/diff/index.js +5 -4
  16. package/dist/components/data-display/list/index.js +3 -3
  17. package/dist/components/data-display/log-view/index.js +8 -8
  18. package/dist/components/data-display/markdown/index.js +16 -16
  19. package/dist/components/data-display/table/index.js +10 -10
  20. package/dist/components/feedback/empty-state/index.js +3 -3
  21. package/dist/components/feedback/meter/index.js +2 -2
  22. package/dist/components/feedback/progress/index.js +2 -2
  23. package/dist/components/inputs/checkbox/index.js +13 -13
  24. package/dist/components/inputs/choice-list/index.js +10 -10
  25. package/dist/components/inputs/color-picker/index.js +22 -22
  26. package/dist/components/inputs/combobox/index.js +22 -21
  27. package/dist/components/inputs/date-time/calendar/index.js +9 -9
  28. package/dist/components/inputs/date-time/date-picker/index.js +28 -28
  29. package/dist/components/inputs/date-time/date-range-picker/index.js +28 -28
  30. package/dist/components/inputs/date-time/duration-picker/index.js +27 -27
  31. package/dist/components/inputs/date-time/month-picker/index.js +26 -26
  32. package/dist/components/inputs/date-time/time-picker/index.js +27 -27
  33. package/dist/components/inputs/editable-text/index.d.ts +4 -1
  34. package/dist/components/inputs/editable-text/index.js +2 -2
  35. package/dist/components/inputs/field/index.js +5 -5
  36. package/dist/components/inputs/file-dropzone/index.js +8 -8
  37. package/dist/components/inputs/input/index.js +6 -6
  38. package/dist/components/inputs/key-value/index.js +12 -12
  39. package/dist/components/inputs/number-input/index.js +7 -7
  40. package/dist/components/inputs/radio/index.js +12 -12
  41. package/dist/components/inputs/search/index.js +24 -23
  42. package/dist/components/inputs/select/index.js +22 -21
  43. package/dist/components/inputs/slider/index.js +4 -4
  44. package/dist/components/inputs/switch/index.js +9 -9
  45. package/dist/components/inputs/textarea/index.js +5 -5
  46. package/dist/components/navigation/breadcrumb/index.js +25 -25
  47. package/dist/components/navigation/navigation-menu/index.js +17 -17
  48. package/dist/components/navigation/pagination/index.js +16 -16
  49. package/dist/components/navigation/sidebar/index.js +25 -25
  50. package/dist/components/navigation/tabs/index.js +13 -13
  51. package/dist/components/navigation/tree/index.js +9 -9
  52. package/dist/components/overlays/alert-dialog/index.js +15 -15
  53. package/dist/components/overlays/command/index.js +22 -21
  54. package/dist/components/overlays/context-menu/index.js +25 -25
  55. package/dist/components/overlays/dialog/index.js +14 -14
  56. package/dist/components/overlays/dropdown/index.js +24 -24
  57. package/dist/components/overlays/lightbox/index.js +12 -12
  58. package/dist/components/overlays/popover/index.js +10 -10
  59. package/dist/components/overlays/preview-card/index.js +10 -10
  60. package/dist/components/overlays/sheet/index.js +15 -15
  61. package/dist/components/overlays/toast/index.js +11 -11
  62. package/dist/components/overlays/tooltip/index.js +7 -7
  63. package/dist/docs/index.js +18 -18
  64. package/dist/index.d.ts +19 -8
  65. package/dist/index.js +79 -79
  66. package/dist/lib/fluid-hover-highlight.js +4 -4
  67. package/dist/lib/focus-ring.js +2 -2
  68. package/dist/lib/goo-indicator.js +3 -3
  69. package/dist/lib/morph-layers.js +4 -4
  70. package/dist/lib/morph-part.js +2 -2
  71. package/dist/lib/overlay.js +4 -4
  72. package/dist/lib/popup-rows.js +2 -2
  73. package/dist/lib/popup-surface.js +7 -7
  74. package/dist/lib/scroll-column.js +6 -6
  75. package/dist/lib/use-autosize-textarea.d.ts +6 -4
  76. package/dist/lib/use-autosize-textarea.js +1 -1
  77. package/dist/lib/use-merge-split.js +4 -4
  78. package/dist/lib/use-morph.js +2 -2
  79. package/dist/primitives/content/code/index.d.ts +3 -1
  80. package/dist/primitives/content/code/index.js +4 -3
  81. package/dist/primitives/layout/resizable/index.js +2 -2
  82. package/dist/primitives/layout/scroll-area/index.d.ts +4 -1
  83. package/dist/primitives/layout/scroll-area/index.js +2 -1
  84. package/dist/primitives/layout/sortable/index.js +5 -5
  85. package/dist/primitives/systems/craft/index.js +3 -3
  86. package/dist/primitives/systems/fluid-hover/index.js +6 -6
  87. package/dist/primitives/systems/morph/index.js +13 -13
  88. package/dist/primitives/systems/motion/index.js +6 -6
  89. package/dist/primitives/systems/sizes/index.js +2 -2
  90. package/dist/shared/{components-yfx0skxc.js → components-07nbrsr5.js} +1 -1
  91. package/dist/shared/{components-jnjw9j2z.js → components-0t4a8wkh.js} +9 -9
  92. package/dist/shared/{components-qrtcc8aw.js → components-25mzyrp5.js} +3 -3
  93. package/dist/shared/{components-0ep66sg9.js → components-2amv2322.js} +2 -2
  94. package/dist/shared/{components-wq9hrera.js → components-313rmbxy.js} +2 -2
  95. package/dist/shared/{components-b2fag579.js → components-3pcrvb6c.js} +11 -11
  96. package/dist/shared/{components-8nnhzeb3.js → components-46cav8vk.js} +1 -1
  97. package/dist/shared/{components-mb80a9wg.js → components-4as7ke76.js} +3 -3
  98. package/dist/shared/{components-9yrajpy0.js → components-4k5gtrp0.js} +3 -3
  99. package/dist/shared/{components-8xe4h118.js → components-4resn8g6.js} +4 -7
  100. package/dist/shared/{components-v1zzr668.js → components-54cxavcc.js} +5 -5
  101. package/dist/shared/{components-resqc2d2.js → components-5fet4gqt.js} +59 -7
  102. package/dist/shared/{components-eawe4nxm.js → components-5gbczwgv.js} +2 -2
  103. package/dist/shared/{components-bxqmbcz2.js → components-5mhrz0bz.js} +1 -1
  104. package/dist/shared/{components-zckgawt6.js → components-6pnc6yff.js} +1 -1
  105. package/dist/shared/{components-t0c1rw40.js → components-7v6869ga.js} +1 -1
  106. package/dist/shared/components-7v6ncqfc.js +80 -0
  107. package/dist/shared/{components-zv63s4fh.js → components-85dz3xx3.js} +3 -3
  108. package/dist/shared/{components-4d0v8nzm.js → components-89gqy9dx.js} +4 -4
  109. package/dist/shared/{components-s2pnh8h9.js → components-8qkd3659.js} +1 -1
  110. package/dist/shared/{components-nxqrw789.js → components-90sfqz5t.js} +1 -1
  111. package/dist/shared/{components-1f5624hb.js → components-9hysh6d3.js} +1 -1
  112. package/dist/shared/{components-br6t88cb.js → components-9j2kfdje.js} +5 -5
  113. package/dist/shared/{components-fpgfs01m.js → components-9y6pt2jm.js} +3 -3
  114. package/dist/shared/{components-vcmky8ns.js → components-9zyw4da7.js} +3 -3
  115. package/dist/shared/{components-9b2m90st.js → components-a3twtgef.js} +1 -1
  116. package/dist/shared/{components-abqfs5fh.js → components-ajgwbabq.js} +4 -4
  117. package/dist/shared/{components-d4gkhy26.js → components-avxbkpyq.js} +1 -1
  118. package/dist/shared/{components-k8awpmbn.js → components-b189975f.js} +6 -6
  119. package/dist/shared/{components-4m9stj7d.js → components-b5cnztd6.js} +4 -4
  120. package/dist/shared/{components-3qcgeay1.js → components-b7a6s0cz.js} +2 -2
  121. package/dist/shared/{components-4fay97sm.js → components-cfegytd4.js} +7 -7
  122. package/dist/shared/{components-gr82tz50.js → components-d35g9d6b.js} +4 -3
  123. package/dist/shared/{components-ft5dgjg6.js → components-d83d42wc.js} +1 -1
  124. package/dist/shared/{components-766w1xcw.js → components-dkx9se7d.js} +6 -6
  125. package/dist/shared/{components-y9se9mx5.js → components-ea97qgh7.js} +3 -3
  126. package/dist/shared/{components-z14s3avn.js → components-f0qgww3t.js} +9 -9
  127. package/dist/shared/{components-8hzwz162.js → components-fk9m24pg.js} +8 -7
  128. package/dist/shared/{components-nmbcfwx8.js → components-frshs2x3.js} +4 -4
  129. package/dist/shared/{components-pfwjhxd8.js → components-h7mpem9e.js} +10 -10
  130. package/dist/shared/{components-8m5e493q.js → components-hz4vjjkb.js} +2 -2
  131. package/dist/shared/{components-1qw8hqwq.js → components-k7pvrn80.js} +5 -5
  132. package/dist/shared/{components-q28xct6t.js → components-kvfzrb1r.js} +5 -5
  133. package/dist/shared/{components-t4j0r23n.js → components-mamtvenk.js} +2 -2
  134. package/dist/shared/{components-fymenepq.js → components-mgdjq5zv.js} +4 -4
  135. package/dist/shared/{components-5w7hxa1n.js → components-p3nsjhbh.js} +10 -6
  136. package/dist/shared/{components-4t2cjav8.js → components-pgs3p035.js} +1 -1
  137. package/dist/shared/{components-3sb31vw5.js → components-ppc2dmxs.js} +1 -1
  138. package/dist/shared/{components-2c22zpm2.js → components-qsbcc57j.js} +3 -3
  139. package/dist/shared/{components-gd8gmr6w.js → components-rmhdr4g1.js} +1 -1
  140. package/dist/shared/{components-mzdbtgvz.js → components-smhnc4dt.js} +8 -8
  141. package/dist/shared/{components-4fhjk3jz.js → components-tn8m9wq7.js} +2 -2
  142. package/dist/shared/{components-0v4jxw7z.js → components-ts40dgzr.js} +3 -3
  143. package/dist/shared/{components-rtwfh1gc.js → components-twngan89.js} +3 -3
  144. package/dist/shared/{components-5xs8pkkj.js → components-w5p7mfb4.js} +1 -1
  145. package/dist/shared/{components-8dgrpegd.js → components-w8ffqns0.js} +4 -2
  146. package/dist/shared/{components-m3vxpz2z.js → components-wjxyscry.js} +1 -1
  147. package/dist/shared/{components-7rn454aq.js → components-xxrsqp60.js} +3 -3
  148. package/dist/shared/{components-895m1f3s.js → components-xzqh7g3t.js} +4 -4
  149. package/dist/shared/{components-af44r4y9.js → components-ycx7d6wx.js} +1 -1
  150. package/dist/shared/{components-ac0x7zpq.js → components-yjz0bbvj.js} +4 -4
  151. package/dist/shared/{components-hjk6dwsp.js → components-z52eyy5f.js} +2 -2
  152. package/dist/shared/{components-66aw235e.js → components-z93zp2tm.js} +3 -3
  153. package/dist/shared/{components-9am5511q.js → components-zef9ab75.js} +3 -3
  154. package/dist/shared/{components-gzve0nkp.js → components-zhsjckqd.js} +8 -8
  155. package/dist/shared/{components-3rt5c1qt.js → components-zk1tj5za.js} +3 -3
  156. package/dist/shared/{components-ypxst3cn.js → components-zwkqmb71.js} +1 -1
  157. package/dist/styles.css +2 -2
  158. package/lib/use-autosize-textarea.ts +65 -18
  159. package/package.json +6 -1
  160. package/primitives/content/code/index.tsx +11 -6
  161. package/primitives/layout/resizable/index.tsx +15 -6
  162. package/primitives/layout/scroll-area/examples.mdx +16 -0
  163. package/primitives/layout/scroll-area/index.tsx +69 -9
  164. package/dist/shared/components-vpkh6j83.js +0 -42
  165. /package/dist/shared/{components-jw45ck66.js → components-02683eqd.js} +0 -0
  166. /package/dist/shared/{components-5wykqxph.js → components-1r1b57ew.js} +0 -0
  167. /package/dist/shared/{components-ycwhrqe1.js → components-31pkxwfz.js} +0 -0
  168. /package/dist/shared/{components-q0hs5rqn.js → components-6c52v58g.js} +0 -0
  169. /package/dist/shared/{components-nz14rwtd.js → components-ffng9rpa.js} +0 -0
  170. /package/dist/shared/{components-vx286kq7.js → components-h9se5cz5.js} +0 -0
  171. /package/dist/shared/{components-knryyjme.js → components-hbqyf35a.js} +0 -0
  172. /package/dist/shared/{components-8pnvkrbw.js → components-mp7en54n.js} +0 -0
  173. /package/dist/shared/{components-pa43g2r2.js → components-wddr0r6a.js} +0 -0
  174. /package/dist/shared/{components-ymq8tbq9.js → components-wqac4434.js} +0 -0
  175. /package/dist/shared/{components-92mvpt9h.js → components-zwgxvktt.js} +0 -0
@@ -14,14 +14,14 @@ import {
14
14
  } from "./components-xnp09586.js";
15
15
  import {
16
16
  SizeScope2
17
- } from "./components-nz14rwtd.js";
17
+ } from "./components-ffng9rpa.js";
18
18
  import {
19
19
  button_default
20
- } from "./components-ycwhrqe1.js";
20
+ } from "./components-31pkxwfz.js";
21
21
  import {
22
22
  InputAction2,
23
23
  input_default
24
- } from "./components-af44r4y9.js";
24
+ } from "./components-ycx7d6wx.js";
25
25
 
26
26
  // components/inputs/key-value/index.tsx
27
27
  import { useRef, useState } from "react";
@@ -5,7 +5,7 @@ import {
5
5
  } from "./components-bkwjvvkh.js";
6
6
  import {
7
7
  useMorph2
8
- } from "./components-8pnvkrbw.js";
8
+ } from "./components-mp7en54n.js";
9
9
  import {
10
10
  cn2
11
11
  } from "./components-xnp09586.js";
@@ -15,10 +15,10 @@ import {
15
15
  useOverlay2,
16
16
  positionerProps2,
17
17
  usePortalContainer2
18
- } from "./components-ft5dgjg6.js";
18
+ } from "./components-d83d42wc.js";
19
19
  import {
20
20
  PopupSurface2
21
- } from "./components-nxqrw789.js";
21
+ } from "./components-90sfqz5t.js";
22
22
 
23
23
  // components/overlays/preview-card/index.tsx
24
24
  import { PreviewCard as PreviewCardPrimitive } from "@base-ui/react/preview-card";
@@ -11,7 +11,7 @@ import {
11
11
  } from "./components-znspksk0.js";
12
12
  import {
13
13
  SizeScope2
14
- } from "./components-nz14rwtd.js";
14
+ } from "./components-ffng9rpa.js";
15
15
  import {
16
16
  useMergeRefs2
17
17
  } from "./components-bkwjvvkh.js";
@@ -33,10 +33,10 @@ import {
33
33
  } from "./components-21hcwp85.js";
34
34
  import {
35
35
  FocusRing2
36
- } from "./components-5wykqxph.js";
36
+ } from "./components-1r1b57ew.js";
37
37
  import {
38
38
  GooIndicator2
39
- } from "./components-bxqmbcz2.js";
39
+ } from "./components-5mhrz0bz.js";
40
40
  import {
41
41
  useRowFocus2
42
42
  } from "./components-vcte8p75.js";
@@ -216,7 +216,7 @@ var TabsList2 = forwardRef2(({ children, className, activateOnFocus, ...props },
216
216
  const size = useSize2();
217
217
  const lift = useLift2(3);
218
218
  const hover = useFluidHover2(containerRef, { axis: "x" });
219
- const { activeIndex: hoveredIndex, setActiveIndex, itemRects, handlers, registerItem, measureItems } = hover;
219
+ const { activeIndex: hoveredIndex, setActiveIndex, itemRects, handlers, registerItem } = hover;
220
220
  const focus = useRowFocus2(hover);
221
221
  const items = Children.toArray(children).filter(isValidElement).map((child) => child.props);
222
222
  const values = items.map((item) => item.value);
@@ -225,9 +225,6 @@ var TabsList2 = forwardRef2(({ children, className, activateOnFocus, ...props },
225
225
  useLayoutEffect(() => {
226
226
  setFallback(first);
227
227
  }, [first, setFallback]);
228
- useEffect2(() => {
229
- measureItems();
230
- }, [measureItems, children]);
231
228
  const selectedIndex = selectedValue === undefined ? -1 : values.indexOf(selectedValue);
232
229
  const [optimisticIndex, setOptimisticIndex] = useState2(null);
233
230
  useEffect2(() => {
@@ -39,7 +39,7 @@ import {
39
39
  } from "./components-wwd093xg.js";
40
40
  import {
41
41
  SizeScope2
42
- } from "./components-nz14rwtd.js";
42
+ } from "./components-ffng9rpa.js";
43
43
  import {
44
44
  useReduceMotion2
45
45
  } from "./components-tz0axc0f.js";
@@ -50,19 +50,19 @@ import {
50
50
  } from "./components-pva1wj1r.js";
51
51
  import {
52
52
  GOO_BLUR_RATIO2
53
- } from "./components-8pnvkrbw.js";
53
+ } from "./components-mp7en54n.js";
54
54
  import {
55
55
  GooFilter2
56
- } from "./components-wq9hrera.js";
56
+ } from "./components-313rmbxy.js";
57
57
  import {
58
58
  useIsoLayoutEffect2
59
59
  } from "./components-v2j3jx89.js";
60
60
  import {
61
61
  FluidHoverHighlight2
62
- } from "./components-9b2m90st.js";
62
+ } from "./components-a3twtgef.js";
63
63
  import {
64
64
  FocusRing2
65
- } from "./components-5wykqxph.js";
65
+ } from "./components-1r1b57ew.js";
66
66
  import {
67
67
  useRowFocus2
68
68
  } from "./components-vcte8p75.js";
@@ -3,6 +3,9 @@
3
3
  import {
4
4
  useShape2
5
5
  } from "./components-kxpcj2ry.js";
6
+ import {
7
+ useIsoLayoutEffect2
8
+ } from "./components-v2j3jx89.js";
6
9
  import {
7
10
  useTouchPrimary2
8
11
  } from "./components-6f5pyzb2.js";
@@ -15,7 +18,8 @@ import { ScrollArea as ScrollAreaPrimitive } from "@base-ui/react/scroll-area";
15
18
  import {
16
19
  createContext,
17
20
  forwardRef,
18
- useContext
21
+ useContext,
22
+ useRef
19
23
  } from "react";
20
24
  import { jsx, jsxs } from "react/jsx-runtime";
21
25
  /*!
@@ -37,11 +41,57 @@ if (typeof CSS !== "undefined" && "registerProperty" in CSS) {
37
41
  }
38
42
  }
39
43
  var ScrollAreaContext = createContext(false);
40
- var ScrollArea2 = forwardRef(({ className, children, viewportClassName, orientation = "vertical", ...props }, ref) => {
41
- const isTouch = useTouchPrimary2();
44
+ var viewportOf = new WeakMap;
45
+ var edgeObserver;
46
+ function setEdge(viewport, edge, distance) {
47
+ const name = `--scroll-area-overflow-${edge}`;
48
+ const value = `${Math.max(0, Math.round(distance))}px`;
49
+ if (viewport.style.getPropertyValue(name) !== value)
50
+ viewport.style.setProperty(name, value);
51
+ }
52
+ function writeEdges(viewport) {
53
+ const { scrollLeft, scrollTop, scrollWidth, scrollHeight, clientWidth, clientHeight } = viewport;
54
+ setEdge(viewport, "x-start", scrollLeft);
55
+ setEdge(viewport, "x-end", scrollWidth - clientWidth - scrollLeft);
56
+ setEdge(viewport, "y-start", scrollTop);
57
+ setEdge(viewport, "y-end", scrollHeight - clientHeight - scrollTop);
58
+ }
59
+ function trackEdges(viewport) {
60
+ edgeObserver ??= new ResizeObserver((entries) => {
61
+ const seen = new Set;
62
+ for (const { target } of entries) {
63
+ const area = viewportOf.get(target);
64
+ if (!area || seen.has(area))
65
+ continue;
66
+ seen.add(area);
67
+ writeEdges(area);
68
+ }
69
+ });
70
+ const observer = edgeObserver;
71
+ const targets = [viewport, ...viewport.children];
72
+ for (const target of targets) {
73
+ viewportOf.set(target, viewport);
74
+ observer.observe(target);
75
+ }
76
+ const onScroll = () => writeEdges(viewport);
77
+ viewport.addEventListener("scroll", onScroll, { passive: true });
78
+ return () => {
79
+ for (const target of targets)
80
+ observer.unobserve(target);
81
+ viewport.removeEventListener("scroll", onScroll);
82
+ };
83
+ }
84
+ var ScrollArea2 = forwardRef(({ className, children, viewportClassName, orientation = "vertical", native = false, ...props }, ref) => {
85
+ const isNative = useTouchPrimary2() || native;
86
+ const viewportRef = useRef(null);
87
+ useIsoLayoutEffect2(() => {
88
+ const viewport = viewportRef.current;
89
+ if (isNative && viewport)
90
+ return trackEdges(viewport);
91
+ }, [isNative, children]);
42
92
  return /* @__PURE__ */ jsx(ScrollAreaContext.Provider, {
43
- value: isTouch,
44
- children: isTouch ? /* @__PURE__ */ jsx("div", {
93
+ value: isNative,
94
+ children: isNative ? /* @__PURE__ */ jsx("div", {
45
95
  ref,
46
96
  role: "group",
47
97
  "data-slot": "scroll-area",
@@ -49,7 +99,9 @@ var ScrollArea2 = forwardRef(({ className, children, viewportClassName, orientat
49
99
  className: cn2("relative overflow-hidden", className),
50
100
  ...props,
51
101
  children: /* @__PURE__ */ jsx("div", {
102
+ ref: viewportRef,
52
103
  "data-slot": "scroll-area-viewport",
104
+ "data-scroll-edges": "",
53
105
  className: cn2("size-full rounded-[inherit]", orientation === "vertical" && "overflow-y-auto", orientation === "horizontal" && "overflow-x-auto", orientation === "both" && "overflow-auto", viewportClassName),
54
106
  tabIndex: 0,
55
107
  children
@@ -81,9 +133,9 @@ var ScrollArea2 = forwardRef(({ className, children, viewportClassName, orientat
81
133
  });
82
134
  ScrollArea2.displayName = "ScrollArea";
83
135
  var ScrollBar2 = forwardRef(({ className, orientation = "vertical", ...props }, ref) => {
84
- const isTouch = useContext(ScrollAreaContext);
136
+ const isNative = useContext(ScrollAreaContext);
85
137
  const shape = useShape2();
86
- if (isTouch)
138
+ if (isNative)
87
139
  return null;
88
140
  return /* @__PURE__ */ jsx(ScrollAreaPrimitive.Scrollbar, {
89
141
  ref,
@@ -8,11 +8,11 @@ import {
8
8
  } from "./components-45r18egt.js";
9
9
  import {
10
10
  GOO_BLUR_RATIO2
11
- } from "./components-8pnvkrbw.js";
11
+ } from "./components-mp7en54n.js";
12
12
  import {
13
13
  union2,
14
14
  GooLayer2
15
- } from "./components-bxqmbcz2.js";
15
+ } from "./components-5mhrz0bz.js";
16
16
 
17
17
  // lib/use-merge-split.tsx
18
18
  import { AnimatePresence, motion } from "motion/react";
@@ -12,7 +12,7 @@ import {
12
12
  import {
13
13
  GOO_MATRIX2,
14
14
  GOO_BLUR_RATIO2
15
- } from "./components-8pnvkrbw.js";
15
+ } from "./components-mp7en54n.js";
16
16
  import {
17
17
  cn2
18
18
  } from "./components-xnp09586.js";
@@ -12,7 +12,7 @@ import {
12
12
  } from "./components-xnp09586.js";
13
13
  import {
14
14
  FluidHoverHighlight2
15
- } from "./components-9b2m90st.js";
15
+ } from "./components-a3twtgef.js";
16
16
  import {
17
17
  useShape2
18
18
  } from "./components-kxpcj2ry.js";
@@ -8,7 +8,7 @@ import {
8
8
  } from "./components-xnp09586.js";
9
9
  import {
10
10
  SizeScope2
11
- } from "./components-nz14rwtd.js";
11
+ } from "./components-ffng9rpa.js";
12
12
 
13
13
  // components/data-display/list/index.tsx
14
14
  import { forwardRef } from "react";
@@ -0,0 +1,80 @@
1
+ "use client";
2
+
3
+ import {
4
+ useIsoLayoutEffect2
5
+ } from "./components-v2j3jx89.js";
6
+
7
+ // lib/use-autosize-textarea.ts
8
+ import { useCallback, useEffect } from "react";
9
+ var nativeSizing = typeof CSS !== "undefined" && CSS.supports("field-sizing", "content");
10
+ function lineHeightOf(el) {
11
+ const style = getComputedStyle(el);
12
+ return Number.parseFloat(style.lineHeight) || Number.parseFloat(style.fontSize) * 1.2;
13
+ }
14
+ function fit(el, height, max) {
15
+ const next = `${Math.min(height, max)}px`;
16
+ const overflow = height > max ? "auto" : "hidden";
17
+ if (el.style.height !== next)
18
+ el.style.height = next;
19
+ if (el.style.overflowY !== overflow)
20
+ el.style.overflowY = overflow;
21
+ }
22
+ function useAutosizeTextarea2(ref, { minRows, maxRows }, deps) {
23
+ const measure = useCallback((grow) => {
24
+ const el = ref.current;
25
+ if (!el || nativeSizing)
26
+ return;
27
+ const line = lineHeightOf(el);
28
+ const floor = line * minRows;
29
+ const max = line * Math.max(maxRows, minRows);
30
+ if (el.value === "" && minRows >= 1)
31
+ return fit(el, floor, max);
32
+ if (!grow)
33
+ el.style.height = "auto";
34
+ fit(el, Math.max(el.scrollHeight, floor), max);
35
+ }, [ref, minRows, maxRows]);
36
+ const resize = useCallback(() => measure(false), [measure]);
37
+ useIsoLayoutEffect2(() => {
38
+ const el = ref.current;
39
+ if (!el || !nativeSizing)
40
+ return;
41
+ el.style.setProperty("field-sizing", "content");
42
+ el.style.minHeight = `${minRows}lh`;
43
+ el.style.maxHeight = `${Math.max(maxRows, minRows)}lh`;
44
+ el.style.overflowY = "auto";
45
+ }, [ref, minRows, maxRows]);
46
+ useIsoLayoutEffect2(resize, [resize, ...deps]);
47
+ useEffect(() => {
48
+ const el = ref.current;
49
+ if (!el || nativeSizing)
50
+ return;
51
+ let width = el.offsetWidth;
52
+ let frame = 0;
53
+ const observer = new ResizeObserver(() => {
54
+ const next = el.offsetWidth;
55
+ const wider = next > width;
56
+ if (next === width)
57
+ return;
58
+ width = next;
59
+ if (el.value === "")
60
+ return;
61
+ if (!wider) {
62
+ if (el.scrollHeight > el.clientHeight)
63
+ measure(true);
64
+ return;
65
+ }
66
+ frame ||= requestAnimationFrame(() => {
67
+ frame = 0;
68
+ resize();
69
+ });
70
+ });
71
+ observer.observe(el);
72
+ return () => {
73
+ observer.disconnect();
74
+ cancelAnimationFrame(frame);
75
+ };
76
+ }, [ref, measure, resize]);
77
+ return resize;
78
+ }
79
+
80
+ export { useAutosizeTextarea2 };
@@ -12,13 +12,13 @@ import {
12
12
  import {
13
13
  GOO_BLUR_RATIO2,
14
14
  holdExit2
15
- } from "./components-8pnvkrbw.js";
15
+ } from "./components-mp7en54n.js";
16
16
  import {
17
17
  cn2
18
18
  } from "./components-xnp09586.js";
19
19
  import {
20
20
  GooFilter2
21
- } from "./components-wq9hrera.js";
21
+ } from "./components-313rmbxy.js";
22
22
  import {
23
23
  useShape2
24
24
  } from "./components-kxpcj2ry.js";
@@ -38,7 +38,7 @@ import {
38
38
  } from "./components-nwa2a9tq.js";
39
39
  import {
40
40
  button_default
41
- } from "./components-ycwhrqe1.js";
41
+ } from "./components-31pkxwfz.js";
42
42
 
43
43
  // components/overlays/toast/index.tsx
44
44
  import { Toast as ToastPrimitive2 } from "@base-ui/react/toast";
@@ -9,7 +9,7 @@ import {
9
9
  } from "./components-xnp09586.js";
10
10
  import {
11
11
  FluidHoverHighlight2
12
- } from "./components-9b2m90st.js";
12
+ } from "./components-a3twtgef.js";
13
13
  import {
14
14
  useIcon2
15
15
  } from "./components-jnhpgpfk.js";
@@ -27,15 +27,15 @@ import {
27
27
  rowLabelClass2,
28
28
  RowIcon2,
29
29
  PopupLabel2
30
- } from "./components-q0hs5rqn.js";
30
+ } from "./components-6c52v58g.js";
31
31
  import {
32
32
  ScrollArea2
33
- } from "./components-resqc2d2.js";
33
+ } from "./components-5fet4gqt.js";
34
34
  import {
35
35
  DialogTrigger2,
36
36
  DialogContent2,
37
37
  DialogState2
38
- } from "./components-br6t88cb.js";
38
+ } from "./components-9j2kfdje.js";
39
39
 
40
40
  // components/overlays/command/index.tsx
41
41
  import { Autocomplete } from "@base-ui/react/autocomplete";
@@ -23,7 +23,7 @@ import {
23
23
  } from "./components-6h5qg9rs.js";
24
24
  import {
25
25
  button_default
26
- } from "./components-ycwhrqe1.js";
26
+ } from "./components-31pkxwfz.js";
27
27
 
28
28
  // components/data-display/log-view/index.tsx
29
29
  import { AnimatePresence, motion } from "motion/react";
@@ -2,7 +2,7 @@
2
2
 
3
3
  import {
4
4
  MorphSurface2
5
- } from "./components-wq9hrera.js";
5
+ } from "./components-313rmbxy.js";
6
6
  import {
7
7
  useShape2
8
8
  } from "./components-kxpcj2ry.js";
@@ -8,7 +8,7 @@ import {
8
8
  } from "./components-45r18egt.js";
9
9
  import {
10
10
  button_default
11
- } from "./components-ycwhrqe1.js";
11
+ } from "./components-31pkxwfz.js";
12
12
  import {
13
13
  useControllableState2
14
14
  } from "./components-wwd093xg.js";
@@ -8,10 +8,10 @@ import {
8
8
  } from "./components-bkwjvvkh.js";
9
9
  import {
10
10
  MorphPartScope2
11
- } from "./components-pa43g2r2.js";
11
+ } from "./components-wddr0r6a.js";
12
12
  import {
13
13
  useMorph2
14
- } from "./components-8pnvkrbw.js";
14
+ } from "./components-mp7en54n.js";
15
15
  import {
16
16
  cn2
17
17
  } from "./components-xnp09586.js";
@@ -20,10 +20,10 @@ import {
20
20
  useOverlayRoot2,
21
21
  useOverlay2,
22
22
  usePortalContainer2
23
- } from "./components-ft5dgjg6.js";
23
+ } from "./components-d83d42wc.js";
24
24
  import {
25
25
  PopupSurface2
26
- } from "./components-nxqrw789.js";
26
+ } from "./components-90sfqz5t.js";
27
27
  import {
28
28
  useSizeVariant2
29
29
  } from "./components-znspksk0.js";
@@ -32,7 +32,7 @@ import {
32
32
  } from "./components-7wjkag2j.js";
33
33
  import {
34
34
  Button2
35
- } from "./components-ycwhrqe1.js";
35
+ } from "./components-31pkxwfz.js";
36
36
 
37
37
  // components/overlays/dialog/index.tsx
38
38
  import { Dialog as DialogPrimitive } from "@base-ui/react/dialog";
@@ -17,13 +17,13 @@ import {
17
17
  } from "./components-pva1wj1r.js";
18
18
  import {
19
19
  GOO_BLUR_RATIO2
20
- } from "./components-8pnvkrbw.js";
20
+ } from "./components-mp7en54n.js";
21
21
  import {
22
22
  cn2
23
23
  } from "./components-xnp09586.js";
24
24
  import {
25
25
  GooFilter2
26
- } from "./components-wq9hrera.js";
26
+ } from "./components-313rmbxy.js";
27
27
  import {
28
28
  useShape2
29
29
  } from "./components-kxpcj2ry.js";
@@ -35,7 +35,7 @@ import {
35
35
  } from "./components-nwa2a9tq.js";
36
36
  import {
37
37
  Tooltip2
38
- } from "./components-7rn454aq.js";
38
+ } from "./components-xxrsqp60.js";
39
39
 
40
40
  // components/actions/copy/index.tsx
41
41
  import { AnimatePresence, animate, motion, useMotionValue } from "motion/react";
@@ -12,10 +12,10 @@ import {
12
12
  } from "./components-xnp09586.js";
13
13
  import {
14
14
  GooIndicator2
15
- } from "./components-bxqmbcz2.js";
15
+ } from "./components-5mhrz0bz.js";
16
16
  import {
17
17
  FluidHoverHighlight2
18
- } from "./components-9b2m90st.js";
18
+ } from "./components-a3twtgef.js";
19
19
  import {
20
20
  mergeRefs2
21
21
  } from "./components-bkwjvvkh.js";
@@ -34,7 +34,7 @@ import {
34
34
  } from "./components-wwd093xg.js";
35
35
  import {
36
36
  SizeScope2
37
- } from "./components-nz14rwtd.js";
37
+ } from "./components-ffng9rpa.js";
38
38
 
39
39
  // components/inputs/switch/index.tsx
40
40
  import { Switch as SwitchPrimitive } from "@base-ui/react/switch";
@@ -8,7 +8,7 @@ import {
8
8
  } from "./components-xnp09586.js";
9
9
  import {
10
10
  GooIndicator2
11
- } from "./components-bxqmbcz2.js";
11
+ } from "./components-5mhrz0bz.js";
12
12
 
13
13
  // lib/fluid-hover-highlight.tsx
14
14
  import { AnimatePresence, motion } from "motion/react";
@@ -8,18 +8,18 @@ import {
8
8
  } from "./components-xnp09586.js";
9
9
  import {
10
10
  button_default
11
- } from "./components-ycwhrqe1.js";
11
+ } from "./components-31pkxwfz.js";
12
12
  import {
13
13
  MorphPart2
14
- } from "./components-pa43g2r2.js";
14
+ } from "./components-wddr0r6a.js";
15
15
  import {
16
16
  opensInPlace2,
17
17
  useMorphOrigin2,
18
18
  useMorph2
19
- } from "./components-8pnvkrbw.js";
19
+ } from "./components-mp7en54n.js";
20
20
  import {
21
21
  MorphSurface2
22
- } from "./components-wq9hrera.js";
22
+ } from "./components-313rmbxy.js";
23
23
  import {
24
24
  SURFACE_BG2,
25
25
  SURFACE_SHADOW2
@@ -8,7 +8,7 @@ import {
8
8
  } from "./components-xnp09586.js";
9
9
  import {
10
10
  ScrollColumn2
11
- } from "./components-zckgawt6.js";
11
+ } from "./components-6pnc6yff.js";
12
12
 
13
13
  // components/inputs/date-time/time-columns.tsx
14
14
  import { format } from "date-fns";
@@ -8,10 +8,10 @@ import {
8
8
  } from "./components-xnp09586.js";
9
9
  import {
10
10
  Code2
11
- } from "./components-5w7hxa1n.js";
11
+ } from "./components-p3nsjhbh.js";
12
12
  import {
13
13
  table_default
14
- } from "./components-0ep66sg9.js";
14
+ } from "./components-2amv2322.js";
15
15
 
16
16
  // components/data-display/markdown/index.tsx
17
17
  import { Lexer } from "marked";
@@ -236,12 +236,12 @@ function MarkdownProse2({ children, className }) {
236
236
  });
237
237
  }
238
238
  var Markdown2 = Object.assign(function Markdown({ children, streaming = false, className }) {
239
- const tokens = useMemo(() => Lexer.lex(streaming ? settle(children) : children), [children, streaming]);
239
+ const blocks = useMemo(() => /* @__PURE__ */ jsx(Blocks, {
240
+ tokens: Lexer.lex(streaming ? settle(children) : children)
241
+ }), [children, streaming]);
240
242
  return /* @__PURE__ */ jsx(MarkdownProse2, {
241
243
  className,
242
- children: /* @__PURE__ */ jsx(Blocks, {
243
- tokens
244
- })
244
+ children: blocks
245
245
  });
246
246
  }, { Prose: MarkdownProse2 });
247
247
  var markdown_default = Markdown2;
@@ -9,16 +9,16 @@ import {
9
9
  } from "./components-xnp09586.js";
10
10
  import {
11
11
  GooIndicator2
12
- } from "./components-bxqmbcz2.js";
12
+ } from "./components-5mhrz0bz.js";
13
13
  import {
14
14
  FluidHoverHighlight2
15
- } from "./components-9b2m90st.js";
15
+ } from "./components-a3twtgef.js";
16
16
  import {
17
17
  useShape2
18
18
  } from "./components-kxpcj2ry.js";
19
19
  import {
20
20
  FocusRing2
21
- } from "./components-5wykqxph.js";
21
+ } from "./components-1r1b57ew.js";
22
22
  import {
23
23
  mergeRefs2
24
24
  } from "./components-bkwjvvkh.js";
@@ -34,7 +34,7 @@ import {
34
34
  } from "./components-wwd093xg.js";
35
35
  import {
36
36
  SizeScope2
37
- } from "./components-nz14rwtd.js";
37
+ } from "./components-ffng9rpa.js";
38
38
 
39
39
  // components/inputs/choice-list/index.tsx
40
40
  import { forwardRef, memo, useRef } from "react";
@@ -15,11 +15,11 @@ import {
15
15
  columnsPopupClass,
16
16
  ColumnsPanel,
17
17
  PickerInput
18
- } from "./components-gzve0nkp.js";
18
+ } from "./components-zhsjckqd.js";
19
19
  import {
20
20
  pad,
21
21
  TimeColumns
22
- } from "./components-d4gkhy26.js";
22
+ } from "./components-avxbkpyq.js";
23
23
 
24
24
  // components/inputs/date-time/time-picker/index.tsx
25
25
  import { set } from "date-fns";