@justanarthur/modo-ui 2.3.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 (123) 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 +10 -10
  12. package/dist/blocks/sidebar-app/index.js +13 -13
  13. package/dist/components/actions/copy/index.js +3 -3
  14. package/dist/components/containers/accordion/index.js +5 -5
  15. package/dist/components/containers/card/index.js +4 -4
  16. package/dist/components/data-display/diff/index.d.ts +1 -1
  17. package/dist/components/data-display/diff/index.js +1 -1
  18. package/dist/components/data-display/markdown/index.js +5 -5
  19. package/dist/components/data-display/table/index.js +4 -4
  20. package/dist/components/inputs/checkbox/index.js +6 -6
  21. package/dist/components/inputs/choice-list/index.js +5 -5
  22. package/dist/components/inputs/color-picker/index.js +7 -7
  23. package/dist/components/inputs/combobox/index.js +6 -6
  24. package/dist/components/inputs/date-time/calendar/index.js +5 -5
  25. package/dist/components/inputs/date-time/date-picker/index.js +12 -12
  26. package/dist/components/inputs/date-time/date-range-picker/index.js +12 -12
  27. package/dist/components/inputs/date-time/duration-picker/index.js +11 -11
  28. package/dist/components/inputs/date-time/month-picker/index.js +10 -10
  29. package/dist/components/inputs/date-time/time-picker/index.js +11 -11
  30. package/dist/components/inputs/input/index.js +2 -2
  31. package/dist/components/inputs/key-value/index.js +3 -3
  32. package/dist/components/inputs/number-input/index.js +3 -3
  33. package/dist/components/inputs/radio/index.js +5 -5
  34. package/dist/components/inputs/search/index.js +7 -7
  35. package/dist/components/inputs/select/index.js +6 -6
  36. package/dist/components/inputs/switch/index.js +4 -4
  37. package/dist/components/navigation/breadcrumb/index.js +8 -8
  38. package/dist/components/navigation/navigation-menu/index.js +6 -6
  39. package/dist/components/navigation/pagination/index.js +5 -5
  40. package/dist/components/navigation/sidebar/index.js +9 -9
  41. package/dist/components/navigation/tabs/index.js +4 -4
  42. package/dist/components/navigation/tree/index.js +5 -5
  43. package/dist/components/overlays/alert-dialog/index.js +3 -3
  44. package/dist/components/overlays/command/index.d.ts +6 -3
  45. package/dist/components/overlays/command/index.js +6 -6
  46. package/dist/components/overlays/context-menu/index.js +8 -8
  47. package/dist/components/overlays/dialog/index.js +2 -2
  48. package/dist/components/overlays/dropdown/index.js +7 -7
  49. package/dist/components/overlays/popover/index.js +2 -2
  50. package/dist/components/overlays/preview-card/index.js +2 -2
  51. package/dist/components/overlays/sheet/index.js +3 -3
  52. package/dist/components/overlays/tooltip/index.js +2 -2
  53. package/dist/docs/index.js +10 -10
  54. package/dist/index.d.ts +12 -6
  55. package/dist/index.js +53 -53
  56. package/dist/lib/fluid-hover-highlight.js +3 -2
  57. package/dist/lib/focus-ring.d.ts +5 -2
  58. package/dist/lib/focus-ring.js +2 -1
  59. package/dist/lib/goo-indicator.d.ts +5 -2
  60. package/dist/lib/goo-indicator.js +2 -1
  61. package/dist/lib/overlay.d.ts +8 -1
  62. package/dist/lib/overlay.js +3 -1
  63. package/dist/lib/scroll-column.js +4 -4
  64. package/dist/lib/use-fluid-hover.d.ts +3 -1
  65. package/dist/lib/use-fluid-hover.js +3 -1
  66. package/dist/lib/use-merge-split.js +3 -2
  67. package/dist/primitives/systems/fluid-hover/index.js +4 -4
  68. package/dist/shared/{components-m7d7r3r8.js → components-0bvxny7s.js} +2 -2
  69. package/dist/shared/{components-7xc2dne4.js → components-0ep66sg9.js} +5 -5
  70. package/dist/shared/{components-agjpst9b.js → components-0v4jxw7z.js} +1 -1
  71. package/dist/shared/{components-a3brpprb.js → components-1qw8hqwq.js} +7 -7
  72. package/dist/shared/{components-7c4a0egq.js → components-21hcwp85.js} +78 -43
  73. package/dist/shared/{components-kz6ak6kj.js → components-3qcgeay1.js} +2 -2
  74. package/dist/shared/{components-e52xgvd9.js → components-4fay97sm.js} +7 -7
  75. package/dist/shared/{components-fxw1122w.js → components-4fhjk3jz.js} +2 -2
  76. package/dist/shared/{components-czvraaw9.js → components-4m9stj7d.js} +10 -10
  77. package/dist/shared/{components-c515d6xr.js → components-5wykqxph.js} +6 -1
  78. package/dist/shared/{components-8e0fjgm9.js → components-7rn454aq.js} +11 -2
  79. package/dist/shared/{components-2tw25pk6.js → components-895m1f3s.js} +7 -7
  80. package/dist/shared/{components-b7p1pjcm.js → components-8m5e493q.js} +1 -1
  81. package/dist/shared/{components-rzy6h7s4.js → components-8nnhzeb3.js} +5 -5
  82. package/dist/shared/{components-1hga6pkn.js → components-8xe4h118.js} +5 -5
  83. package/dist/shared/{components-83jn0raj.js → components-9am5511q.js} +3 -3
  84. package/dist/shared/{components-g35n8tzm.js → components-9b2m90st.js} +1 -1
  85. package/dist/shared/{components-2bq4ng4d.js → components-9yrajpy0.js} +1 -1
  86. package/dist/shared/{components-mvwf8ckh.js → components-ac0x7zpq.js} +2 -2
  87. package/dist/shared/{components-q7zk70tx.js → components-af44r4y9.js} +1 -1
  88. package/dist/shared/{components-ex2xtqv7.js → components-br6t88cb.js} +1 -1
  89. package/dist/shared/{components-z0kz9rxj.js → components-bxqmbcz2.js} +6 -2
  90. package/dist/shared/{components-2v4mmw1s.js → components-cc9kfhkb.js} +169 -113
  91. package/dist/shared/{components-e7zxwja1.js → components-d4gkhy26.js} +1 -1
  92. package/dist/shared/{components-w1ysefg1.js → components-eawe4nxm.js} +1 -1
  93. package/dist/shared/{components-1sbnbq6a.js → components-fpgfs01m.js} +1 -1
  94. package/dist/shared/{components-tcm3k3wj.js → components-ft5dgjg6.js} +9 -2
  95. package/dist/shared/{components-h8v9nh5r.js → components-fv9y76b0.js} +15 -3
  96. package/dist/shared/{components-6g8a5nrs.js → components-fymenepq.js} +7 -7
  97. package/dist/shared/{components-8ybvpebx.js → components-greka6z2.js} +58 -18
  98. package/dist/shared/{components-k2gg1agj.js → components-gzve0nkp.js} +4 -4
  99. package/dist/shared/{components-fjg4j430.js → components-hjdv4y8d.js} +2 -2
  100. package/dist/shared/{components-k25zw9g8.js → components-hjk6dwsp.js} +1 -1
  101. package/dist/shared/{components-4fswe4kh.js → components-mb80a9wg.js} +1 -1
  102. package/dist/shared/{components-nh05qz8b.js → components-mzdbtgvz.js} +8 -8
  103. package/dist/shared/{components-x5v7e0fz.js → components-nmbcfwx8.js} +7 -7
  104. package/dist/shared/{components-9rebr89j.js → components-pw6gzev8.js} +1 -1
  105. package/dist/shared/{components-01e24999.js → components-pwsqp2np.js} +20 -10
  106. package/dist/shared/{components-eebf7f9c.js → components-qmkfpcw0.js} +8 -8
  107. package/dist/shared/{components-etgpz4zk.js → components-qrtcc8aw.js} +3 -3
  108. package/dist/shared/{components-nred2e6g.js → components-rgdspnth.js} +2 -2
  109. package/dist/shared/{components-gnsvnejm.js → components-rtwfh1gc.js} +2 -2
  110. package/dist/shared/{components-z87sanbc.js → components-s0megs1g.js} +4 -4
  111. package/dist/shared/{components-7g2q2ccp.js → components-sh8j39z3.js} +6 -6
  112. package/dist/shared/{components-vykcfb5r.js → components-v1zzr668.js} +3 -3
  113. package/dist/shared/{components-5vezp3e5.js → components-vcmky8ns.js} +6 -6
  114. package/dist/shared/{components-6xtntksc.js → components-xq8j9c2f.js} +8 -8
  115. package/dist/shared/{components-27fatggq.js → components-y9se9mx5.js} +3 -3
  116. package/dist/shared/{components-9ca0c92a.js → components-yfx0skxc.js} +1 -1
  117. package/dist/shared/{components-ta4e10mx.js → components-zckgawt6.js} +5 -5
  118. package/dist/styles.css +1 -1
  119. package/lib/focus-ring.tsx +15 -8
  120. package/lib/goo-indicator.tsx +20 -8
  121. package/lib/overlay.tsx +22 -1
  122. package/lib/use-fluid-hover.ts +96 -72
  123. package/package.json +1 -1
@@ -31,16 +31,28 @@ var SIGN = {
31
31
  hunk: "text-muted-foreground"
32
32
  };
33
33
  var SIGN_CHAR = { add: "+", remove: "−", context: " ", hunk: "" };
34
+ var GIT_HEADER = /^(diff --git |index |(new|deleted) file mode |(old|new) mode |(dis)?similarity index |rename (from|to) |copy (from|to) |Binary files )/;
34
35
  function parsePatch2(patch) {
35
36
  const lines = [];
36
37
  let oldNo = 0;
37
38
  let newNo = 0;
38
- for (const raw of patch.replace(/^\n+|\n+$/g, "").split(`
39
- `)) {
40
- if (raw.startsWith("+++") || raw.startsWith("---"))
39
+ let header = true;
40
+ const raws = patch.replace(/^\n+|\n+$/g, "").split(`
41
+ `);
42
+ for (const [i, raw] of raws.entries()) {
43
+ if (raw.startsWith("diff --git "))
44
+ header = true;
45
+ if (header && (GIT_HEADER.test(raw) || raw.startsWith("---") || raw.startsWith("+++")))
46
+ continue;
47
+ if (raw.startsWith("--- ") && raws[i + 1]?.startsWith("+++ ")) {
48
+ header = true;
49
+ continue;
50
+ }
51
+ if (raw.startsWith("\\"))
41
52
  continue;
42
53
  const hunk = raw.match(/^@@ -(\d+)(?:,\d+)? \+(\d+)(?:,\d+)? @@(.*)$/);
43
54
  if (hunk) {
55
+ header = false;
44
56
  oldNo = Number(hunk[1]);
45
57
  newNo = Number(hunk[2]);
46
58
  lines.push({ kind: "hunk", text: raw });
@@ -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-z0kz9rxj.js";
18
+ } from "./components-bxqmbcz2.js";
15
19
  import {
16
20
  FluidHoverHighlight2
17
- } from "./components-g35n8tzm.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-c515d6xr.js";
27
+ } from "./components-5wykqxph.js";
24
28
  import {
25
29
  useIcon2
26
30
  } from "./components-jnhpgpfk.js";
@@ -33,10 +37,6 @@ 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";
@@ -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-g35n8tzm.js";
12
+ } from "./components-9b2m90st.js";
9
13
  import {
10
14
  useIcon2
11
15
  } from "./components-jnhpgpfk.js";
@@ -24,10 +28,6 @@ import {
24
28
  RowIcon2,
25
29
  PopupLabel2
26
30
  } from "./components-q0hs5rqn.js";
27
- import {
28
- useFluidHover2,
29
- useRegisterFluidHoverItem2
30
- } from "./components-7c4a0egq.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-ex2xtqv7.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
  });
@@ -28,13 +28,13 @@ import {
28
28
  useOverlayRoot2,
29
29
  useOverlay2,
30
30
  positionerProps2
31
- } from "./components-tcm3k3wj.js";
31
+ } from "./components-ft5dgjg6.js";
32
32
  import {
33
33
  PopupSurface2
34
34
  } from "./components-nxqrw789.js";
35
35
  import {
36
36
  dividedColumns2
37
- } from "./components-ta4e10mx.js";
37
+ } from "./components-zckgawt6.js";
38
38
  import {
39
39
  useIsMobile2
40
40
  } from "./components-8wp8d8q1.js";
@@ -46,12 +46,12 @@ import {
46
46
  } from "./components-ycwhrqe1.js";
47
47
  import {
48
48
  sheet_default
49
- } from "./components-mvwf8ckh.js";
49
+ } from "./components-ac0x7zpq.js";
50
50
  import {
51
51
  InputAdornment2,
52
52
  InputAction2,
53
53
  input_default
54
- } from "./components-q7zk70tx.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,7 +6,7 @@ import {
6
6
  import {
7
7
  OverlayContext2,
8
8
  useOverlayRoot2
9
- } from "./components-tcm3k3wj.js";
9
+ } from "./components-ft5dgjg6.js";
10
10
  import {
11
11
  SizeScope2
12
12
  } from "./components-nz14rwtd.js";
@@ -18,7 +18,7 @@ import {
18
18
  DropdownSubTrigger2,
19
19
  DropdownSubContent2,
20
20
  DropdownSeparator2
21
- } from "./components-01e24999.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";
@@ -15,7 +15,7 @@ import {
15
15
  DialogTitle2,
16
16
  DialogDescription2,
17
17
  DialogState2
18
- } from "./components-ex2xtqv7.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";
@@ -21,7 +21,7 @@ import {
21
21
  import {
22
22
  InputAction2,
23
23
  input_default
24
- } from "./components-q7zk70tx.js";
24
+ } from "./components-af44r4y9.js";
25
25
 
26
26
  // components/inputs/key-value/index.tsx
27
27
  import { useRef, useState } from "react";
@@ -31,15 +31,19 @@ import {
31
31
  import {
32
32
  Slider2
33
33
  } from "./components-vx286kq7.js";
34
+ import {
35
+ useFluidHover2,
36
+ useRegisterFluidHoverItem2
37
+ } from "./components-21hcwp85.js";
34
38
  import {
35
39
  useMorph2
36
40
  } from "./components-8pnvkrbw.js";
37
41
  import {
38
42
  FluidHoverHighlight2
39
- } from "./components-g35n8tzm.js";
43
+ } from "./components-9b2m90st.js";
40
44
  import {
41
45
  FocusRing2
42
- } from "./components-c515d6xr.js";
46
+ } from "./components-5wykqxph.js";
43
47
  import {
44
48
  useIcon2
45
49
  } from "./components-jnhpgpfk.js";
@@ -50,7 +54,7 @@ import {
50
54
  positionerProps2,
51
55
  PortalContainer2,
52
56
  usePortalContainer2
53
- } from "./components-tcm3k3wj.js";
57
+ } from "./components-ft5dgjg6.js";
54
58
  import {
55
59
  POPUP_SHAPE2
56
60
  } from "./components-mse06t0x.js";
@@ -60,16 +64,12 @@ import {
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-8e0fjgm9.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-g35n8tzm.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-c515d6xr.js";
24
+ } from "./components-5wykqxph.js";
21
25
  import {
22
26
  useIcon2
23
27
  } from "./components-jnhpgpfk.js";
@@ -38,15 +42,11 @@ 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-w1ysefg1.js";
49
+ } from "./components-eawe4nxm.js";
50
50
  import {
51
51
  WeightLabel2
52
52
  } from "./components-y09nr7fe.js";
@@ -11,7 +11,7 @@ import {
11
11
  } from "./components-y4gsk1jt.js";
12
12
  import {
13
13
  table_default
14
- } from "./components-7xc2dne4.js";
14
+ } from "./components-0ep66sg9.js";
15
15
 
16
16
  // components/data-display/markdown/index.tsx
17
17
  import { Lexer } from "marked";
@@ -1,5 +1,9 @@
1
1
  "use client";
2
2
 
3
+ import {
4
+ useFluidHover2,
5
+ useRegisterFluidHoverItem2
6
+ } from "./components-21hcwp85.js";
3
7
  import {
4
8
  useMorph2
5
9
  } from "./components-8pnvkrbw.js";
@@ -8,13 +12,13 @@ import {
8
12
  } from "./components-xnp09586.js";
9
13
  import {
10
14
  GooIndicator2
11
- } from "./components-z0kz9rxj.js";
15
+ } from "./components-bxqmbcz2.js";
12
16
  import {
13
17
  FluidHoverHighlight2
14
- } from "./components-g35n8tzm.js";
18
+ } from "./components-9b2m90st.js";
15
19
  import {
16
20
  FocusRing2
17
- } from "./components-c515d6xr.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-tcm3k3wj.js";
35
+ } from "./components-ft5dgjg6.js";
31
36
  import {
32
37
  POPUP_SHAPE2,
33
38
  popupScrollAreaClass2,
@@ -58,15 +63,11 @@ 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-w1ysefg1.js";
70
+ } from "./components-eawe4nxm.js";
70
71
  import {
71
72
  SizeScope2
72
73
  } from "./components-nz14rwtd.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
@@ -34,19 +34,23 @@ import {
34
34
  useOverlay2,
35
35
  positionerProps2,
36
36
  usePortalContainer2
37
- } from "./components-tcm3k3wj.js";
37
+ } from "./components-ft5dgjg6.js";
38
38
  import {
39
39
  SizeScope2
40
40
  } from "./components-nz14rwtd.js";
41
41
  import {
42
42
  useIcon2
43
43
  } from "./components-jnhpgpfk.js";
44
+ import {
45
+ useFluidHover2,
46
+ useRegisterFluidHoverItem2
47
+ } from "./components-21hcwp85.js";
44
48
  import {
45
49
  GooIndicator2
46
- } from "./components-z0kz9rxj.js";
50
+ } from "./components-bxqmbcz2.js";
47
51
  import {
48
52
  FluidHoverHighlight2
49
- } from "./components-g35n8tzm.js";
53
+ } from "./components-9b2m90st.js";
50
54
  import {
51
55
  useMergeRefs2
52
56
  } from "./components-bkwjvvkh.js";
@@ -65,15 +69,11 @@ import {
65
69
  import {
66
70
  PopupSurface2
67
71
  } from "./components-nxqrw789.js";
68
- import {
69
- useFluidHover2,
70
- useRegisterFluidHoverItem2
71
- } from "./components-7c4a0egq.js";
72
72
  import {
73
73
  useSelectionRuns2,
74
74
  useMergeSplitBlocks2,
75
75
  SelectionBackgrounds2
76
- } from "./components-w1ysefg1.js";
76
+ } from "./components-eawe4nxm.js";
77
77
  import {
78
78
  ScrollArea2
79
79
  } from "./components-esy5nsvc.js";
@@ -25,7 +25,7 @@ import {
25
25
  } from "./components-wwd093xg.js";
26
26
  import {
27
27
  calendar_default
28
- } from "./components-b7p1pjcm.js";
28
+ } from "./components-8m5e493q.js";
29
29
  import {
30
30
  readDateValue,
31
31
  writeDateValue,
@@ -37,10 +37,10 @@ import {
37
37
  invalidOf,
38
38
  PickerShell,
39
39
  PickerInput
40
- } from "./components-k2gg1agj.js";
40
+ } from "./components-gzve0nkp.js";
41
41
  import {
42
42
  TimeColumns
43
- } from "./components-e7zxwja1.js";
43
+ } from "./components-d4gkhy26.js";
44
44
 
45
45
  // components/inputs/date-time/date-range-picker/index.tsx
46
46
  import { format, set } from "date-fns";
@@ -21,7 +21,7 @@ import {
21
21
  import {
22
22
  positionerProps2,
23
23
  usePortalContainer2
24
- } from "./components-tcm3k3wj.js";
24
+ } from "./components-ft5dgjg6.js";
25
25
  import {
26
26
  POPUP_SHAPE2
27
27
  } from "./components-mse06t0x.js";
@@ -48,7 +48,7 @@ import {
48
48
  CommandListRoot2,
49
49
  CommandShortcut2,
50
50
  CommandList2
51
- } from "./components-8ybvpebx.js";
51
+ } from "./components-greka6z2.js";
52
52
 
53
53
  // components/inputs/search/index.tsx
54
54
  import { Autocomplete } from "@base-ui/react/autocomplete";
@@ -19,7 +19,7 @@ import {
19
19
  import {
20
20
  useFluidHover2,
21
21
  useRegisterFluidHoverItem2
22
- } from "./components-7c4a0egq.js";
22
+ } from "./components-21hcwp85.js";
23
23
  import {
24
24
  useIsoLayoutEffect2
25
25
  } from "./components-v2j3jx89.js";
@@ -34,7 +34,7 @@ import {
34
34
  } from "./components-nz14rwtd.js";
35
35
  import {
36
36
  FluidHoverHighlight2
37
- } from "./components-g35n8tzm.js";
37
+ } from "./components-9b2m90st.js";
38
38
  import {
39
39
  button_default
40
40
  } from "./components-ycwhrqe1.js";
@@ -22,19 +22,19 @@ import {
22
22
  SidebarInput2,
23
23
  SidebarTrigger2,
24
24
  sidebar_default
25
- } from "./components-2v4mmw1s.js";
25
+ } from "./components-cc9kfhkb.js";
26
26
  import {
27
27
  tooltip_default
28
- } from "./components-8e0fjgm9.js";
28
+ } from "./components-7rn454aq.js";
29
29
  import {
30
30
  MenuItem2,
31
31
  DropdownMenu2,
32
32
  DropdownTrigger2,
33
33
  DropdownContent2
34
- } from "./components-01e24999.js";
34
+ } from "./components-pwsqp2np.js";
35
35
  import {
36
36
  card_default
37
- } from "./components-gnsvnejm.js";
37
+ } from "./components-rtwfh1gc.js";
38
38
  import {
39
39
  badge_default
40
40
  } from "./components-jw45ck66.js";
@@ -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-g35n8tzm.js";
12
+ } from "./components-9b2m90st.js";
9
13
  import {
10
14
  useIcon2
11
15
  } from "./components-jnhpgpfk.js";
@@ -15,16 +19,12 @@ import {
15
19
  import {
16
20
  useSize2
17
21
  } from "./components-znspksk0.js";
18
- import {
19
- useFluidHover2,
20
- useRegisterFluidHoverItem2
21
- } from "./components-7c4a0egq.js";
22
22
  import {
23
23
  SizeScope2
24
24
  } from "./components-nz14rwtd.js";
25
25
  import {
26
26
  dropdown_default
27
- } from "./components-01e24999.js";
27
+ } from "./components-pwsqp2np.js";
28
28
 
29
29
  // components/navigation/breadcrumb/index.tsx
30
30
  import { Children, isValidElement, useLayoutEffect, useRef, useState } from "react";