@justanarthur/modo-ui 2.2.0 → 2.4.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 (179) hide show
  1. package/components/data-display/diff/index.tsx +19 -3
  2. package/components/inputs/choice-list/index.tsx +4 -3
  3. package/components/navigation/sidebar/menu-scope.tsx +142 -53
  4. package/components/navigation/sidebar/sidebar-menu-actions.tsx +5 -5
  5. package/components/navigation/sidebar/sidebar-menu-button.tsx +4 -7
  6. package/components/navigation/sidebar/sidebar-menu-item.tsx +39 -36
  7. package/components/navigation/sidebar/sidebar-menu-sub.tsx +3 -2
  8. package/components/overlays/command/index.tsx +70 -12
  9. package/components/overlays/dropdown/menu-popup.tsx +11 -2
  10. package/components/overlays/tooltip/index.tsx +9 -1
  11. package/dist/blocks/desktop-shell/index.js +28 -28
  12. package/dist/blocks/sidebar-app/index.js +38 -38
  13. package/dist/components/actions/button/index.js +4 -4
  14. package/dist/components/actions/copy/index.js +12 -12
  15. package/dist/components/containers/accordion/index.js +17 -17
  16. package/dist/components/containers/card/index.js +15 -15
  17. package/dist/components/data-display/avatar/index.js +3 -3
  18. package/dist/components/data-display/badge/index.js +2 -2
  19. package/dist/components/data-display/diff/index.d.ts +1 -1
  20. package/dist/components/data-display/diff/index.js +4 -4
  21. package/dist/components/data-display/list/index.js +3 -3
  22. package/dist/components/data-display/log-view/index.js +8 -8
  23. package/dist/components/data-display/markdown/index.js +16 -16
  24. package/dist/components/data-display/table/index.js +10 -10
  25. package/dist/components/feedback/empty-state/index.js +3 -3
  26. package/dist/components/feedback/meter/index.js +2 -2
  27. package/dist/components/feedback/progress/index.js +2 -2
  28. package/dist/components/inputs/checkbox/index.js +14 -14
  29. package/dist/components/inputs/choice-list/index.js +11 -11
  30. package/dist/components/inputs/color-picker/index.js +23 -23
  31. package/dist/components/inputs/combobox/index.js +21 -21
  32. package/dist/components/inputs/date-time/calendar/index.js +10 -10
  33. package/dist/components/inputs/date-time/date-picker/index.js +28 -28
  34. package/dist/components/inputs/date-time/date-range-picker/index.js +28 -28
  35. package/dist/components/inputs/date-time/duration-picker/index.js +27 -27
  36. package/dist/components/inputs/date-time/month-picker/index.js +26 -26
  37. package/dist/components/inputs/date-time/time-picker/index.js +27 -27
  38. package/dist/components/inputs/editable-text/index.js +2 -2
  39. package/dist/components/inputs/field/index.js +5 -5
  40. package/dist/components/inputs/file-dropzone/index.js +8 -8
  41. package/dist/components/inputs/input/index.js +6 -6
  42. package/dist/components/inputs/key-value/index.js +12 -12
  43. package/dist/components/inputs/number-input/index.js +7 -7
  44. package/dist/components/inputs/radio/index.js +13 -13
  45. package/dist/components/inputs/search/index.js +24 -24
  46. package/dist/components/inputs/select/index.js +22 -22
  47. package/dist/components/inputs/slider/index.js +4 -4
  48. package/dist/components/inputs/switch/index.js +10 -10
  49. package/dist/components/inputs/textarea/index.js +4 -4
  50. package/dist/components/navigation/breadcrumb/index.js +26 -26
  51. package/dist/components/navigation/navigation-menu/index.js +18 -18
  52. package/dist/components/navigation/pagination/index.js +17 -17
  53. package/dist/components/navigation/sidebar/index.js +26 -26
  54. package/dist/components/navigation/tabs/index.js +14 -14
  55. package/dist/components/navigation/tree/index.js +10 -10
  56. package/dist/components/overlays/alert-dialog/index.js +15 -15
  57. package/dist/components/overlays/command/index.d.ts +6 -3
  58. package/dist/components/overlays/command/index.js +22 -22
  59. package/dist/components/overlays/context-menu/index.js +26 -26
  60. package/dist/components/overlays/dialog/index.js +14 -14
  61. package/dist/components/overlays/dropdown/index.js +25 -25
  62. package/dist/components/overlays/lightbox/index.js +12 -12
  63. package/dist/components/overlays/popover/index.js +10 -10
  64. package/dist/components/overlays/preview-card/index.js +10 -10
  65. package/dist/components/overlays/sheet/index.js +15 -15
  66. package/dist/components/overlays/toast/index.js +11 -11
  67. package/dist/components/overlays/tooltip/index.js +7 -7
  68. package/dist/docs/index.js +17 -17
  69. package/dist/index.d.ts +16 -8
  70. package/dist/index.js +80 -80
  71. package/dist/lib/fluid-hover-highlight.js +5 -4
  72. package/dist/lib/focus-ring.d.ts +5 -2
  73. package/dist/lib/focus-ring.js +3 -2
  74. package/dist/lib/goo-indicator.d.ts +5 -2
  75. package/dist/lib/goo-indicator.js +4 -3
  76. package/dist/lib/morph-layers.js +4 -4
  77. package/dist/lib/morph-part.js +2 -2
  78. package/dist/lib/overlay.d.ts +8 -1
  79. package/dist/lib/overlay.js +6 -4
  80. package/dist/lib/popup-rows.js +2 -2
  81. package/dist/lib/popup-surface.js +7 -7
  82. package/dist/lib/scroll-column.js +7 -7
  83. package/dist/lib/use-fluid-hover.d.ts +3 -1
  84. package/dist/lib/use-fluid-hover.js +3 -1
  85. package/dist/lib/use-merge-split.js +5 -4
  86. package/dist/lib/use-morph.js +2 -2
  87. package/dist/primitives/content/code/index.js +3 -3
  88. package/dist/primitives/layout/resizable/index.d.ts +4 -2
  89. package/dist/primitives/layout/resizable/index.js +2 -2
  90. package/dist/primitives/layout/sortable/index.js +5 -5
  91. package/dist/primitives/systems/craft/index.js +3 -3
  92. package/dist/primitives/systems/fluid-hover/index.js +7 -7
  93. package/dist/primitives/systems/morph/index.js +13 -13
  94. package/dist/primitives/systems/motion/index.js +6 -6
  95. package/dist/primitives/systems/sizes/index.js +2 -2
  96. package/dist/shared/{components-19e2wpxc.js → components-0bvxny7s.js} +5 -5
  97. package/dist/shared/{components-v3c3madd.js → components-0ep66sg9.js} +6 -6
  98. package/dist/shared/{components-nd3f803g.js → components-0v4jxw7z.js} +3 -3
  99. package/dist/shared/{components-9hysh6d3.js → components-1f5624hb.js} +1 -1
  100. package/dist/shared/{components-8qwbwtv9.js → components-1qw8hqwq.js} +9 -9
  101. package/dist/shared/{components-7c4a0egq.js → components-21hcwp85.js} +78 -43
  102. package/dist/shared/{components-qhk2m7fj.js → components-3qcgeay1.js} +2 -2
  103. package/dist/shared/{components-zk1tj5za.js → components-3rt5c1qt.js} +3 -3
  104. package/dist/shared/{components-ppc2dmxs.js → components-3sb31vw5.js} +1 -1
  105. package/dist/shared/{components-qs0cwe8p.js → components-4fay97sm.js} +10 -10
  106. package/dist/shared/{components-09n5hgmx.js → components-4fhjk3jz.js} +2 -2
  107. package/dist/shared/{components-vkrp4nb9.js → components-4m9stj7d.js} +11 -11
  108. package/dist/shared/{components-pgs3p035.js → components-4t2cjav8.js} +1 -1
  109. package/dist/shared/{components-v1m0xjbw.js → components-5wykqxph.js} +6 -1
  110. package/dist/shared/{components-w5p7mfb4.js → components-5xs8pkkj.js} +1 -1
  111. package/dist/shared/{components-rj4nnqkz.js → components-7rn454aq.js} +13 -4
  112. package/dist/shared/{components-zktkxnzq.js → components-895m1f3s.js} +8 -8
  113. package/dist/shared/{components-t4eb37vd.js → components-8m5e493q.js} +2 -2
  114. package/dist/shared/{components-1nqp7wqr.js → components-8nnhzeb3.js} +5 -5
  115. package/dist/shared/{components-mcnyaaep.js → components-8xe4h118.js} +6 -6
  116. package/dist/shared/{components-a3edrqpb.js → components-9am5511q.js} +3 -3
  117. package/dist/shared/{components-95kp19zn.js → components-9b2m90st.js} +1 -1
  118. package/dist/shared/{components-qd27dvgj.js → components-9yrajpy0.js} +3 -3
  119. package/dist/shared/{components-ajgwbabq.js → components-abqfs5fh.js} +4 -4
  120. package/dist/shared/{components-dr5c27yd.js → components-ac0x7zpq.js} +4 -4
  121. package/dist/shared/{components-y07de1qv.js → components-af44r4y9.js} +2 -2
  122. package/dist/shared/{components-90y8qwxv.js → components-br6t88cb.js} +5 -5
  123. package/dist/shared/{components-gvwxswpr.js → components-bxqmbcz2.js} +7 -3
  124. package/dist/shared/{components-9e5fpy3v.js → components-cc9kfhkb.js} +171 -115
  125. package/dist/shared/{components-rts2mggt.js → components-d4gkhy26.js} +1 -1
  126. package/dist/shared/{components-veaxns17.js → components-eawe4nxm.js} +2 -2
  127. package/dist/shared/{components-qe8yp3vf.js → components-fpgfs01m.js} +3 -3
  128. package/dist/shared/{components-xvf8jcza.js → components-ft5dgjg6.js} +10 -3
  129. package/dist/shared/{components-pbx77hzb.js → components-fv9y76b0.js} +15 -3
  130. package/dist/shared/{components-afj2ajea.js → components-fymenepq.js} +8 -8
  131. package/dist/shared/{components-rmhdr4g1.js → components-gd8gmr6w.js} +1 -1
  132. package/dist/shared/{components-k9qbcmaa.js → components-gr82tz50.js} +21 -3
  133. package/dist/shared/{components-nc8wggew.js → components-greka6z2.js} +59 -19
  134. package/dist/shared/{components-qkt4h7x4.js → components-gzve0nkp.js} +8 -8
  135. package/dist/shared/{components-4xd21p2p.js → components-hjdv4y8d.js} +3 -3
  136. package/dist/shared/{components-v81eejq6.js → components-hjk6dwsp.js} +2 -2
  137. package/dist/shared/{components-151vndgm.js → components-mb80a9wg.js} +3 -3
  138. package/dist/shared/{components-gfw4zk8b.js → components-mzdbtgvz.js} +12 -12
  139. package/dist/shared/{components-9s9vb2w0.js → components-nmbcfwx8.js} +8 -8
  140. package/dist/shared/{components-90sfqz5t.js → components-nxqrw789.js} +1 -1
  141. package/dist/shared/{components-2q0m4mxf.js → components-pw6gzev8.js} +2 -2
  142. package/dist/shared/{components-fqdh9ysk.js → components-pwsqp2np.js} +24 -14
  143. package/dist/shared/{components-yn8bw8tv.js → components-qmkfpcw0.js} +12 -12
  144. package/dist/shared/{components-z9gc2weg.js → components-qrtcc8aw.js} +3 -3
  145. package/dist/shared/{components-jd21f3mb.js → components-rgdspnth.js} +5 -5
  146. package/dist/shared/{components-r6ejdtpr.js → components-rtwfh1gc.js} +4 -4
  147. package/dist/shared/{components-16wx5av1.js → components-s0megs1g.js} +6 -6
  148. package/dist/shared/{components-8qkd3659.js → components-s2pnh8h9.js} +1 -1
  149. package/dist/shared/{components-2zr49v82.js → components-sh8j39z3.js} +7 -7
  150. package/dist/shared/{components-7v6869ga.js → components-t0c1rw40.js} +1 -1
  151. package/dist/shared/{components-mamtvenk.js → components-t4j0r23n.js} +2 -2
  152. package/dist/shared/{components-qc1fae2s.js → components-v1zzr668.js} +6 -6
  153. package/dist/shared/{components-vv420geb.js → components-vcmky8ns.js} +7 -7
  154. package/dist/shared/{components-313rmbxy.js → components-wq9hrera.js} +2 -2
  155. package/dist/shared/{components-mpx3yq5c.js → components-xq8j9c2f.js} +12 -12
  156. package/dist/shared/{components-3cvwrzc1.js → components-y9se9mx5.js} +3 -3
  157. package/dist/shared/{components-nehs80xd.js → components-yfx0skxc.js} +1 -1
  158. package/dist/shared/{components-s25rehbv.js → components-zckgawt6.js} +5 -5
  159. package/dist/shared/{components-85dz3xx3.js → components-zv63s4fh.js} +3 -3
  160. package/dist/styles.css +1 -1
  161. package/lib/focus-ring.tsx +15 -8
  162. package/lib/goo-indicator.tsx +20 -8
  163. package/lib/overlay.tsx +22 -1
  164. package/lib/use-fluid-hover.ts +96 -72
  165. package/package.json +1 -1
  166. package/primitives/layout/resizable/index.tsx +35 -7
  167. /package/dist/shared/{components-mp7en54n.js → components-8pnvkrbw.js} +0 -0
  168. /package/dist/shared/{components-zwgxvktt.js → components-92mvpt9h.js} +0 -0
  169. /package/dist/shared/{components-02683eqd.js → components-jw45ck66.js} +0 -0
  170. /package/dist/shared/{components-hbqyf35a.js → components-knryyjme.js} +0 -0
  171. /package/dist/shared/{components-yy0a9b02.js → components-m3vxpz2z.js} +0 -0
  172. /package/dist/shared/{components-ffng9rpa.js → components-nz14rwtd.js} +0 -0
  173. /package/dist/shared/{components-wddr0r6a.js → components-pa43g2r2.js} +0 -0
  174. /package/dist/shared/{components-6c52v58g.js → components-q0hs5rqn.js} +0 -0
  175. /package/dist/shared/{components-h9se5cz5.js → components-vx286kq7.js} +0 -0
  176. /package/dist/shared/{components-fa61vwag.js → components-y4gsk1jt.js} +0 -0
  177. /package/dist/shared/{components-31pkxwfz.js → components-ycwhrqe1.js} +0 -0
  178. /package/dist/shared/{components-wqac4434.js → components-ymq8tbq9.js} +0 -0
  179. /package/dist/shared/{components-sxstx1x7.js → components-ypxst3cn.js} +0 -0
@@ -6,21 +6,25 @@ import {
6
6
  import {
7
7
  spring2
8
8
  } from "./components-45r18egt.js";
9
+ import {
10
+ useFluidHover2,
11
+ useRegisterFluidHoverItem2
12
+ } from "./components-21hcwp85.js";
9
13
  import {
10
14
  cn2
11
15
  } from "./components-xnp09586.js";
12
16
  import {
13
17
  GooIndicator2
14
- } from "./components-gvwxswpr.js";
18
+ } from "./components-bxqmbcz2.js";
15
19
  import {
16
20
  FluidHoverHighlight2
17
- } from "./components-95kp19zn.js";
21
+ } from "./components-9b2m90st.js";
18
22
  import {
19
23
  useShape2
20
24
  } from "./components-kxpcj2ry.js";
21
25
  import {
22
26
  FocusRing2
23
- } from "./components-v1m0xjbw.js";
27
+ } from "./components-5wykqxph.js";
24
28
  import {
25
29
  useIcon2
26
30
  } from "./components-jnhpgpfk.js";
@@ -33,16 +37,12 @@ import {
33
37
  import {
34
38
  useControllableState2
35
39
  } from "./components-wwd093xg.js";
36
- import {
37
- useFluidHover2,
38
- useRegisterFluidHoverItem2
39
- } from "./components-7c4a0egq.js";
40
40
  import {
41
41
  WeightLabel2
42
42
  } from "./components-y09nr7fe.js";
43
43
  import {
44
44
  SizeScope2
45
- } from "./components-ffng9rpa.js";
45
+ } from "./components-nz14rwtd.js";
46
46
 
47
47
  // components/navigation/tree/index.tsx
48
48
  import { AnimatePresence, motion } from "motion/react";
@@ -8,7 +8,7 @@ import {
8
8
  } from "./components-xnp09586.js";
9
9
  import {
10
10
  badge_default
11
- } from "./components-02683eqd.js";
11
+ } from "./components-jw45ck66.js";
12
12
 
13
13
  // primitives/systems/craft/index.tsx
14
14
  import { jsx, jsxs } from "react/jsx-runtime";
@@ -88,13 +88,20 @@ function ResizableHandle2({ label = "Resize", className }) {
88
88
  const onPointerDown = (e) => {
89
89
  if (e.button !== 0)
90
90
  return;
91
- const panels = [...e.currentTarget.parentElement?.children ?? []].filter((el) => el.hasAttribute("data-resizable-panel"));
91
+ const panels = [...e.currentTarget.parentElement?.children ?? []].filter((el) => el instanceof HTMLElement && el.hasAttribute("data-resizable-panel"));
92
92
  const px = panels.reduce((sum, el) => {
93
93
  const rect = el.getBoundingClientRect();
94
94
  return sum + (horizontal ? rect.width : rect.height);
95
95
  }, 0);
96
96
  e.currentTarget.setPointerCapture(e.pointerId);
97
- drag.current = { start: horizontal ? e.clientX : e.clientY, sizes: group.sizes, pxPerPercent: px / 100 };
97
+ drag.current = {
98
+ start: horizontal ? e.clientX : e.clientY,
99
+ sizes: group.sizes,
100
+ next: group.sizes,
101
+ panels,
102
+ flex: panels.map((el) => el.style.flex),
103
+ pxPerPercent: px / 100
104
+ };
98
105
  setDragging(true);
99
106
  e.preventDefault();
100
107
  };
@@ -103,11 +110,22 @@ function ResizableHandle2({ label = "Resize", className }) {
103
110
  if (!d?.pxPerPercent)
104
111
  return;
105
112
  const delta = ((horizontal ? e.clientX : e.clientY) - d.start) / d.pxPerPercent;
106
- group.setSizes(resize(d.sizes, index, delta, group.limits));
113
+ d.next = resize(d.sizes, index, delta, group.limits);
114
+ d.panels.forEach((el, i) => {
115
+ el.style.flex = `${d.next[i] ?? 0} 1 0px`;
116
+ });
117
+ e.currentTarget.setAttribute("aria-valuenow", String(Math.round(d.next[index] ?? 0)));
107
118
  };
108
119
  const onPointerUp = () => {
120
+ const d = drag.current;
109
121
  drag.current = null;
110
122
  setDragging(false);
123
+ if (!d)
124
+ return;
125
+ d.panels.forEach((el, i) => {
126
+ el.style.flex = d.flex[i] ?? "";
127
+ });
128
+ group.setSizes(d.next);
111
129
  };
112
130
  const onKeyDown = (e) => {
113
131
  const keys = horizontal ? { ArrowLeft: -group.step, ArrowRight: group.step } : { ArrowUp: -group.step, ArrowDown: group.step };
@@ -1,11 +1,15 @@
1
1
  "use client";
2
2
 
3
+ import {
4
+ useFluidHover2,
5
+ useRegisterFluidHoverItem2
6
+ } from "./components-21hcwp85.js";
3
7
  import {
4
8
  cn2
5
9
  } from "./components-xnp09586.js";
6
10
  import {
7
11
  FluidHoverHighlight2
8
- } from "./components-95kp19zn.js";
12
+ } from "./components-9b2m90st.js";
9
13
  import {
10
14
  useIcon2
11
15
  } from "./components-jnhpgpfk.js";
@@ -23,11 +27,7 @@ import {
23
27
  rowLabelClass2,
24
28
  RowIcon2,
25
29
  PopupLabel2
26
- } from "./components-6c52v58g.js";
27
- import {
28
- useFluidHover2,
29
- useRegisterFluidHoverItem2
30
- } from "./components-7c4a0egq.js";
30
+ } from "./components-q0hs5rqn.js";
31
31
  import {
32
32
  ScrollArea2
33
33
  } from "./components-esy5nsvc.js";
@@ -35,7 +35,7 @@ import {
35
35
  DialogTrigger2,
36
36
  DialogContent2,
37
37
  DialogState2
38
- } from "./components-90y8qwxv.js";
38
+ } from "./components-br6t88cb.js";
39
39
 
40
40
  // components/overlays/command/index.tsx
41
41
  import { Autocomplete } from "@base-ui/react/autocomplete";
@@ -43,12 +43,15 @@ import { Dialog as DialogPrimitive } from "@base-ui/react/dialog";
43
43
  import {
44
44
  createContext,
45
45
  forwardRef,
46
+ memo,
47
+ useCallback,
46
48
  useContext,
47
49
  useEffect,
48
50
  useImperativeHandle,
49
51
  useMemo,
50
52
  useRef,
51
- useState
53
+ useState,
54
+ useSyncExternalStore
52
55
  } from "react";
53
56
  import { jsx, jsxs } from "react/jsx-runtime";
54
57
  var CommandContext = createContext({
@@ -56,11 +59,42 @@ var CommandContext = createContext({
56
59
  close: () => {},
57
60
  session: 0
58
61
  });
59
- var CommandHighlight = createContext(null);
62
+ function useHighlightStore() {
63
+ const [store] = useState(() => {
64
+ let current = null;
65
+ const listeners = new Set;
66
+ return {
67
+ get: () => current,
68
+ set: (next) => {
69
+ if (next === current)
70
+ return;
71
+ current = next;
72
+ for (const listener of listeners)
73
+ listener();
74
+ },
75
+ subscribe: (listener) => {
76
+ listeners.add(listener);
77
+ return () => {
78
+ listeners.delete(listener);
79
+ };
80
+ }
81
+ };
82
+ });
83
+ return store;
84
+ }
85
+ var CommandHighlight = createContext({ get: () => null, subscribe: () => () => {} });
86
+ function useHighlight() {
87
+ const store = useContext(CommandHighlight);
88
+ return useSyncExternalStore(store.subscribe, store.get, () => null);
89
+ }
90
+ function useIsHighlighted(index) {
91
+ const store = useContext(CommandHighlight);
92
+ return useSyncExternalStore(store.subscribe, () => store.get() === index, () => false);
93
+ }
60
94
  var CommandRows = createContext(undefined);
61
95
  var isGrouped = (items) => items[0] !== undefined && ("items" in items[0]);
62
96
  function CommandListRoot2({ items, ...props }) {
63
- const [highlight, setHighlight] = useState(null);
97
+ const highlight = useHighlightStore();
64
98
  const { contains } = Autocomplete.useFilter();
65
99
  return /* @__PURE__ */ jsx(CommandHighlight.Provider, {
66
100
  value: highlight,
@@ -69,7 +103,7 @@ function CommandListRoot2({ items, ...props }) {
69
103
  items,
70
104
  itemToStringValue: (item) => item.label,
71
105
  filter: (item, query) => contains([item.label, ...item.keywords ?? []].join(" "), query),
72
- onItemHighlighted: (item, details) => setHighlight(item ? details.index : null)
106
+ onItemHighlighted: (item, details) => highlight.set(item ? details.index : null)
73
107
  })
74
108
  });
75
109
  }
@@ -79,13 +113,13 @@ function CommandShortcut2({ className, ...props }) {
79
113
  ...props
80
114
  });
81
115
  }
82
- function CommandRow({
116
+ var CommandRow = memo(function CommandRow({
83
117
  item,
84
118
  index,
85
119
  onPick
86
120
  }) {
87
121
  const registerItem = useContext(CommandRows);
88
- const active = useContext(CommandHighlight) === index;
122
+ const active = useIsHighlighted(index);
89
123
  const ref = useRef(null);
90
124
  const size = useSize2();
91
125
  useRegisterFluidHoverItem2(registerItem, index, ref);
@@ -110,17 +144,20 @@ function CommandRow({
110
144
  })
111
145
  ]
112
146
  });
113
- }
147
+ });
114
148
  function CommandList2({ onPick, emptyMessage, className }) {
115
149
  const filtered = Autocomplete.useFilteredItems();
116
- const highlight = useContext(CommandHighlight);
150
+ const highlight = useHighlight();
117
151
  const containerRef = useRef(null);
152
+ const pickRef = useRef(onPick);
153
+ pickRef.current = onPick;
154
+ const pick = useCallback((item) => pickRef.current(item), []);
118
155
  const { itemRects, isMeasured, registerItem } = useFluidHover2(containerRef, { isItemDisabled: isDisabledRow2 });
119
156
  const rect = isMeasured && highlight !== null ? itemRects[highlight] ?? null : null;
120
157
  const rows = (items, start) => items.map((item, i) => /* @__PURE__ */ jsx(CommandRow, {
121
158
  item,
122
159
  index: start + i,
123
- onPick
160
+ onPick: pick
124
161
  }, item.label));
125
162
  let start = 0;
126
163
  return /* @__PURE__ */ jsx(CommandRows.Provider, {
@@ -168,7 +205,8 @@ function CommandPalette2({
168
205
  items,
169
206
  placeholder = "Type a command or search…",
170
207
  emptyMessage = "No results found.",
171
- className
208
+ className,
209
+ limit
172
210
  }) {
173
211
  const { close } = useContext(CommandContext);
174
212
  const SearchIcon = useIcon2("search");
@@ -176,6 +214,7 @@ function CommandPalette2({
176
214
  const [query, setQuery] = useState("");
177
215
  return /* @__PURE__ */ jsx(CommandListRoot2, {
178
216
  items,
217
+ limit,
179
218
  inline: true,
180
219
  open: true,
181
220
  autoHighlight: "always",
@@ -224,7 +263,7 @@ var CommandTrigger2 = forwardRef((props, ref) => {
224
263
  });
225
264
  });
226
265
  CommandTrigger2.displayName = "CommandTrigger";
227
- var CommandContent2 = forwardRef(({ items, placeholder, emptyMessage, className, label = "Command menu", ...props }, ref) => {
266
+ var CommandContent2 = forwardRef(({ items, placeholder, emptyMessage, className, limit, label = "Command menu", ...props }, ref) => {
228
267
  const { session } = useContext(CommandContext);
229
268
  return /* @__PURE__ */ jsx(DialogContent2, {
230
269
  ref,
@@ -238,7 +277,8 @@ var CommandContent2 = forwardRef(({ items, placeholder, emptyMessage, className,
238
277
  items,
239
278
  placeholder,
240
279
  emptyMessage,
241
- className
280
+ className,
281
+ limit
242
282
  }, session)
243
283
  });
244
284
  });
@@ -22,36 +22,36 @@ import {
22
22
  } from "./components-bkwjvvkh.js";
23
23
  import {
24
24
  useMorph2
25
- } from "./components-mp7en54n.js";
25
+ } from "./components-8pnvkrbw.js";
26
26
  import {
27
27
  OverlayContext2,
28
28
  useOverlayRoot2,
29
29
  useOverlay2,
30
30
  positionerProps2
31
- } from "./components-xvf8jcza.js";
31
+ } from "./components-ft5dgjg6.js";
32
32
  import {
33
33
  PopupSurface2
34
- } from "./components-90sfqz5t.js";
34
+ } from "./components-nxqrw789.js";
35
35
  import {
36
36
  dividedColumns2
37
- } from "./components-s25rehbv.js";
37
+ } from "./components-zckgawt6.js";
38
38
  import {
39
39
  useIsMobile2
40
40
  } from "./components-8wp8d8q1.js";
41
41
  import {
42
42
  SizeScope2
43
- } from "./components-ffng9rpa.js";
43
+ } from "./components-nz14rwtd.js";
44
44
  import {
45
45
  button_default
46
- } from "./components-31pkxwfz.js";
46
+ } from "./components-ycwhrqe1.js";
47
47
  import {
48
48
  sheet_default
49
- } from "./components-dr5c27yd.js";
49
+ } from "./components-ac0x7zpq.js";
50
50
  import {
51
51
  InputAdornment2,
52
52
  InputAction2,
53
53
  input_default
54
- } from "./components-y07de1qv.js";
54
+ } from "./components-af44r4y9.js";
55
55
 
56
56
  // components/inputs/date-time/picker-shell.tsx
57
57
  import { Popover } from "@base-ui/react/popover";
@@ -6,10 +6,10 @@ import {
6
6
  import {
7
7
  OverlayContext2,
8
8
  useOverlayRoot2
9
- } from "./components-xvf8jcza.js";
9
+ } from "./components-ft5dgjg6.js";
10
10
  import {
11
11
  SizeScope2
12
- } from "./components-ffng9rpa.js";
12
+ } from "./components-nz14rwtd.js";
13
13
  import {
14
14
  MenuItem2,
15
15
  DropdownLabel2,
@@ -18,7 +18,7 @@ import {
18
18
  DropdownSubTrigger2,
19
19
  DropdownSubContent2,
20
20
  DropdownSeparator2
21
- } from "./components-fqdh9ysk.js";
21
+ } from "./components-pwsqp2np.js";
22
22
 
23
23
  // components/overlays/context-menu/index.tsx
24
24
  import { ContextMenu as ContextMenuPrimitive } from "@base-ui/react/context-menu";
@@ -5,7 +5,7 @@ import {
5
5
  } from "./components-7wjkag2j.js";
6
6
  import {
7
7
  button_default
8
- } from "./components-31pkxwfz.js";
8
+ } from "./components-ycwhrqe1.js";
9
9
  import {
10
10
  DialogTrigger2,
11
11
  DialogClose2,
@@ -15,7 +15,7 @@ import {
15
15
  DialogTitle2,
16
16
  DialogDescription2,
17
17
  DialogState2
18
- } from "./components-90y8qwxv.js";
18
+ } from "./components-br6t88cb.js";
19
19
 
20
20
  // components/overlays/alert-dialog/index.tsx
21
21
  import { AlertDialog as AlertDialogPrimitive } from "@base-ui/react/alert-dialog";
@@ -14,14 +14,14 @@ import {
14
14
  } from "./components-xnp09586.js";
15
15
  import {
16
16
  SizeScope2
17
- } from "./components-ffng9rpa.js";
17
+ } from "./components-nz14rwtd.js";
18
18
  import {
19
19
  button_default
20
- } from "./components-31pkxwfz.js";
20
+ } from "./components-ycwhrqe1.js";
21
21
  import {
22
22
  InputAction2,
23
23
  input_default
24
- } from "./components-y07de1qv.js";
24
+ } from "./components-af44r4y9.js";
25
25
 
26
26
  // components/inputs/key-value/index.tsx
27
27
  import { useRef, useState } from "react";
@@ -21,7 +21,7 @@ import {
21
21
  } from "./components-znspksk0.js";
22
22
  import {
23
23
  SizeScope2
24
- } from "./components-ffng9rpa.js";
24
+ } from "./components-nz14rwtd.js";
25
25
  import {
26
26
  mergeRefs2
27
27
  } from "./components-bkwjvvkh.js";
@@ -30,16 +30,20 @@ import {
30
30
  } from "./components-45r18egt.js";
31
31
  import {
32
32
  Slider2
33
- } from "./components-h9se5cz5.js";
33
+ } from "./components-vx286kq7.js";
34
+ import {
35
+ useFluidHover2,
36
+ useRegisterFluidHoverItem2
37
+ } from "./components-21hcwp85.js";
34
38
  import {
35
39
  useMorph2
36
- } from "./components-mp7en54n.js";
40
+ } from "./components-8pnvkrbw.js";
37
41
  import {
38
42
  FluidHoverHighlight2
39
- } from "./components-95kp19zn.js";
43
+ } from "./components-9b2m90st.js";
40
44
  import {
41
45
  FocusRing2
42
- } from "./components-v1m0xjbw.js";
46
+ } from "./components-5wykqxph.js";
43
47
  import {
44
48
  useIcon2
45
49
  } from "./components-jnhpgpfk.js";
@@ -50,26 +54,22 @@ import {
50
54
  positionerProps2,
51
55
  PortalContainer2,
52
56
  usePortalContainer2
53
- } from "./components-xvf8jcza.js";
57
+ } from "./components-ft5dgjg6.js";
54
58
  import {
55
59
  POPUP_SHAPE2
56
60
  } from "./components-mse06t0x.js";
57
61
  import {
58
62
  PopupSurface2
59
- } from "./components-90sfqz5t.js";
63
+ } from "./components-nxqrw789.js";
60
64
  import {
61
65
  useRowFocus2
62
66
  } from "./components-vcte8p75.js";
63
- import {
64
- useFluidHover2,
65
- useRegisterFluidHoverItem2
66
- } from "./components-7c4a0egq.js";
67
67
  import {
68
68
  WeightLabel2
69
69
  } from "./components-y09nr7fe.js";
70
70
  import {
71
71
  Tooltip2
72
- } from "./components-rj4nnqkz.js";
72
+ } from "./components-7rn454aq.js";
73
73
  import {
74
74
  clamp012,
75
75
  hsvToRgb2,
@@ -6,18 +6,22 @@ import {
6
6
  import {
7
7
  spring2
8
8
  } from "./components-45r18egt.js";
9
+ import {
10
+ useFluidHover2,
11
+ useRegisterFluidHoverItem2
12
+ } from "./components-21hcwp85.js";
9
13
  import {
10
14
  cn2
11
15
  } from "./components-xnp09586.js";
12
16
  import {
13
17
  FluidHoverHighlight2
14
- } from "./components-95kp19zn.js";
18
+ } from "./components-9b2m90st.js";
15
19
  import {
16
20
  useShape2
17
21
  } from "./components-kxpcj2ry.js";
18
22
  import {
19
23
  FocusRing2
20
- } from "./components-v1m0xjbw.js";
24
+ } from "./components-5wykqxph.js";
21
25
  import {
22
26
  useIcon2
23
27
  } from "./components-jnhpgpfk.js";
@@ -38,21 +42,17 @@ import {
38
42
  import {
39
43
  useControllableState2
40
44
  } from "./components-wwd093xg.js";
41
- import {
42
- useFluidHover2,
43
- useRegisterFluidHoverItem2
44
- } from "./components-7c4a0egq.js";
45
45
  import {
46
46
  useSelectionRuns2,
47
47
  useMergeSplitBlocks2,
48
48
  SelectionBackgrounds2
49
- } from "./components-veaxns17.js";
49
+ } from "./components-eawe4nxm.js";
50
50
  import {
51
51
  WeightLabel2
52
52
  } from "./components-y09nr7fe.js";
53
53
  import {
54
54
  SizeScope2
55
- } from "./components-ffng9rpa.js";
55
+ } from "./components-nz14rwtd.js";
56
56
 
57
57
  // components/inputs/checkbox/index.tsx
58
58
  import { Checkbox as CheckboxPrimitive } from "@base-ui/react/checkbox";
@@ -2,7 +2,7 @@
2
2
 
3
3
  import {
4
4
  MorphSurface2
5
- } from "./components-313rmbxy.js";
5
+ } from "./components-wq9hrera.js";
6
6
  import {
7
7
  useShape2
8
8
  } from "./components-kxpcj2ry.js";
@@ -8,10 +8,10 @@ import {
8
8
  } from "./components-xnp09586.js";
9
9
  import {
10
10
  Code2
11
- } from "./components-fa61vwag.js";
11
+ } from "./components-y4gsk1jt.js";
12
12
  import {
13
13
  table_default
14
- } from "./components-v3c3madd.js";
14
+ } from "./components-0ep66sg9.js";
15
15
 
16
16
  // components/data-display/markdown/index.tsx
17
17
  import { Lexer } from "marked";
@@ -1,20 +1,24 @@
1
1
  "use client";
2
2
 
3
+ import {
4
+ useFluidHover2,
5
+ useRegisterFluidHoverItem2
6
+ } from "./components-21hcwp85.js";
3
7
  import {
4
8
  useMorph2
5
- } from "./components-mp7en54n.js";
9
+ } from "./components-8pnvkrbw.js";
6
10
  import {
7
11
  cn2
8
12
  } from "./components-xnp09586.js";
9
13
  import {
10
14
  GooIndicator2
11
- } from "./components-gvwxswpr.js";
15
+ } from "./components-bxqmbcz2.js";
12
16
  import {
13
17
  FluidHoverHighlight2
14
- } from "./components-95kp19zn.js";
18
+ } from "./components-9b2m90st.js";
15
19
  import {
16
20
  FocusRing2
17
- } from "./components-v1m0xjbw.js";
21
+ } from "./components-5wykqxph.js";
18
22
  import {
19
23
  useMergeRefs2
20
24
  } from "./components-bkwjvvkh.js";
@@ -25,9 +29,10 @@ import {
25
29
  OverlayContext2,
26
30
  useOverlayRoot2,
27
31
  useOverlay2,
32
+ useOpenedOnce2,
28
33
  positionerProps2,
29
34
  usePortalContainer2
30
- } from "./components-xvf8jcza.js";
35
+ } from "./components-ft5dgjg6.js";
31
36
  import {
32
37
  POPUP_SHAPE2,
33
38
  popupScrollAreaClass2,
@@ -43,7 +48,7 @@ import {
43
48
  CheckMark2,
44
49
  PopupLabel2,
45
50
  PopupSeparator2
46
- } from "./components-6c52v58g.js";
51
+ } from "./components-q0hs5rqn.js";
47
52
  import {
48
53
  rowIndexOf2,
49
54
  useRowGroup2
@@ -58,18 +63,14 @@ import {
58
63
  resolveSlotTemplate2,
59
64
  slotElement2
60
65
  } from "./components-7wjkag2j.js";
61
- import {
62
- useFluidHover2,
63
- useRegisterFluidHoverItem2
64
- } from "./components-7c4a0egq.js";
65
66
  import {
66
67
  useSelectionRuns2,
67
68
  useMergeSplitBlocks2,
68
69
  SelectionBackgrounds2
69
- } from "./components-veaxns17.js";
70
+ } from "./components-eawe4nxm.js";
70
71
  import {
71
72
  SizeScope2
72
- } from "./components-ffng9rpa.js";
73
+ } from "./components-nz14rwtd.js";
73
74
  import {
74
75
  SURFACE_BG2
75
76
  } from "./components-ceyn28cf.js";
@@ -87,7 +88,7 @@ import {
87
88
  } from "./components-y09nr7fe.js";
88
89
  import {
89
90
  PopupSurface2
90
- } from "./components-90sfqz5t.js";
91
+ } from "./components-nxqrw789.js";
91
92
  import {
92
93
  ScrollArea2
93
94
  } from "./components-esy5nsvc.js";
@@ -729,7 +730,7 @@ function renderMenuItem({
729
730
  children
730
731
  });
731
732
  }
732
- var MenuPopup = forwardRef4(({
733
+ var MenuPopupBody = forwardRef4(({
733
734
  part,
734
735
  positioner,
735
736
  container,
@@ -931,6 +932,15 @@ var MenuPopup = forwardRef4(({
931
932
  })
932
933
  });
933
934
  });
935
+ MenuPopupBody.displayName = "MenuPopupBody";
936
+ var MenuPopup = forwardRef4((props, ref) => {
937
+ const keepMounted = useContext4(KeepMountedContext) || (props.keepMounted ?? false);
938
+ const opened = useOpenedOnce2(useOverlay2(props.part).open);
939
+ return keepMounted || opened ? /* @__PURE__ */ jsx4(MenuPopupBody, {
940
+ ref,
941
+ ...props
942
+ }) : null;
943
+ });
934
944
  MenuPopup.displayName = "MenuPopup";
935
945
 
936
946
  // components/overlays/dropdown/submenu.tsx