@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
@@ -1,16 +1,16 @@
1
1
  import {
2
2
  dividedColumns2,
3
3
  ScrollColumn2
4
- } from "../shared/components-s25rehbv.js";
5
- import"../shared/components-95kp19zn.js";
6
- import"../shared/components-gvwxswpr.js";
7
- import"../shared/components-7c4a0egq.js";
4
+ } from "../shared/components-zckgawt6.js";
5
+ import"../shared/components-9b2m90st.js";
6
+ import"../shared/components-bxqmbcz2.js";
7
+ import"../shared/components-21hcwp85.js";
8
+ import"../shared/components-8pnvkrbw.js";
9
+ import"../shared/components-pva1wj1r.js";
10
+ import"../shared/components-45r18egt.js";
8
11
  import"../shared/components-znspksk0.js";
9
12
  import"../shared/components-ew4wq7mj.js";
10
- import"../shared/components-mp7en54n.js";
11
- import"../shared/components-pva1wj1r.js";
12
13
  import"../shared/components-tz0axc0f.js";
13
- import"../shared/components-45r18egt.js";
14
14
  import"../shared/components-kxpcj2ry.js";
15
15
  import"../shared/components-s217vq1n.js";
16
16
  import"../shared/components-xnp09586.js";
@@ -5,6 +5,8 @@ interface ItemRect {
5
5
  left: number;
6
6
  width: number;
7
7
  }
8
+ /** Two rects with the same box (either may be missing). */
9
+ declare function sameRect(a: ItemRect | null | undefined, b: ItemRect | null | undefined): boolean;
8
10
  interface UseFluidHoverOptions {
9
11
  /**
10
12
  * Which direction to resolve the nearest item along.
@@ -87,4 +89,4 @@ declare function useFluidHover<T extends HTMLElement>(containerRef: RefObject<T
87
89
  * item that is not grouped); then nothing is registered.
88
90
  */
89
91
  declare function useRegisterFluidHoverItem(registerItem: ((index: number, element: HTMLElement | null) => void) | undefined, index: number | undefined, ref: RefObject<HTMLElement | null>): void;
90
- export { ItemRect, UseFluidHoverOptions, UseFluidHoverReturn, useFluidHover, useRegisterFluidHoverItem };
92
+ export { ItemRect, UseFluidHoverOptions, UseFluidHoverReturn, sameRect, useFluidHover, useRegisterFluidHoverItem };
@@ -1,8 +1,10 @@
1
1
  import {
2
+ sameRect2,
2
3
  useFluidHover2,
3
4
  useRegisterFluidHoverItem2
4
- } from "../shared/components-7c4a0egq.js";
5
+ } from "../shared/components-21hcwp85.js";
5
6
  export {
7
+ sameRect2 as sameRect,
6
8
  useFluidHover2 as useFluidHover,
7
9
  useRegisterFluidHoverItem2 as useRegisterFluidHoverItem
8
10
  };
@@ -2,12 +2,13 @@ import {
2
2
  useSelectionRuns2,
3
3
  useMergeSplitBlocks2,
4
4
  SelectionBackgrounds2
5
- } from "../shared/components-veaxns17.js";
6
- import"../shared/components-gvwxswpr.js";
7
- import"../shared/components-mp7en54n.js";
5
+ } from "../shared/components-eawe4nxm.js";
6
+ import"../shared/components-bxqmbcz2.js";
7
+ import"../shared/components-21hcwp85.js";
8
+ import"../shared/components-8pnvkrbw.js";
8
9
  import"../shared/components-pva1wj1r.js";
9
- import"../shared/components-tz0axc0f.js";
10
10
  import"../shared/components-45r18egt.js";
11
+ import"../shared/components-tz0axc0f.js";
11
12
  import"../shared/components-xnp09586.js";
12
13
  export {
13
14
  SelectionBackgrounds2 as SelectionBackgrounds,
@@ -6,10 +6,10 @@ import {
6
6
  holdExit2,
7
7
  useMorphOrigin2,
8
8
  useMorph2
9
- } from "../shared/components-mp7en54n.js";
9
+ } from "../shared/components-8pnvkrbw.js";
10
10
  import"../shared/components-pva1wj1r.js";
11
- import"../shared/components-tz0axc0f.js";
12
11
  import"../shared/components-45r18egt.js";
12
+ import"../shared/components-tz0axc0f.js";
13
13
  export {
14
14
  GOO_BLUR_RATIO2 as GOO_BLUR_RATIO,
15
15
  GOO_MATRIX2 as GOO_MATRIX,
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  Code2
3
- } from "../../../shared/components-fa61vwag.js";
4
- import"../../../shared/components-esy5nsvc.js";
5
- import"../../../shared/components-6f5pyzb2.js";
3
+ } from "../../../shared/components-y4gsk1jt.js";
6
4
  import"../../../shared/components-ceyn28cf.js";
7
5
  import"../../../shared/components-nwa2a9tq.js";
6
+ import"../../../shared/components-esy5nsvc.js";
7
+ import"../../../shared/components-6f5pyzb2.js";
8
8
  import"../../../shared/components-kxpcj2ry.js";
9
9
  import"../../../shared/components-s217vq1n.js";
10
10
  import"../../../shared/components-xnp09586.js";
@@ -29,7 +29,7 @@ interface ResizableProps {
29
29
  direction?: ResizableDirection;
30
30
  /** Controlled panel sizes in percent, one per panel in order. Pair with `onSizesChange`. */
31
31
  sizes?: number[];
32
- /** Called with every panel's size whenever a handle moves. */
32
+ /** Called with every panel's size when a handle moves: on a drag's release, on each key and on a double-click. */
33
33
  onSizesChange?: (sizes: number[]) => void;
34
34
  /** Percent a handle moves per arrow key. Defaults to `5`. */
35
35
  step?: number;
@@ -50,7 +50,9 @@ interface ResizableProps {
50
50
  * its starting size. A collapsible panel snaps shut when dragged below half
51
51
  * its minimum. A drag follows the pointer; every other change of size (a
52
52
  * key, a reset, new controlled `sizes`, such as a toggle folding a pane)
53
- * glides there. Sizes work uncontrolled (each panel's `defaultSize`) or
53
+ * glides there. A drag writes the panels' sizes to the DOM and commits them
54
+ * (`onSizesChange`) on release, so it re-renders nothing on the way. Sizes
55
+ * work uncontrolled (each panel's `defaultSize`) or
54
56
  * controlled (`sizes` + `onSizesChange`). Groups nest: put a Resizable inside
55
57
  * a panel to split it the other way.
56
58
  *
@@ -3,10 +3,10 @@ import {
3
3
  ResizableHandle2,
4
4
  Resizable2,
5
5
  resizable_default
6
- } from "../../../shared/components-k9qbcmaa.js";
6
+ } from "../../../shared/components-gr82tz50.js";
7
+ import"../../../shared/components-45r18egt.js";
7
8
  import"../../../shared/components-wwd093xg.js";
8
9
  import"../../../shared/components-tz0axc0f.js";
9
- import"../../../shared/components-45r18egt.js";
10
10
  import"../../../shared/components-xnp09586.js";
11
11
  export {
12
12
  Resizable2 as Resizable,
@@ -3,15 +3,15 @@ import {
3
3
  SortableHandle2,
4
4
  Sortable2,
5
5
  sortable_default
6
- } from "../../../shared/components-zwgxvktt.js";
7
- import"../../../shared/components-ceyn28cf.js";
8
- import"../../../shared/components-nwa2a9tq.js";
6
+ } from "../../../shared/components-92mvpt9h.js";
9
7
  import"../../../shared/components-jnhpgpfk.js";
8
+ import"../../../shared/components-45r18egt.js";
9
+ import"../../../shared/components-wwd093xg.js";
10
10
  import"../../../shared/components-znspksk0.js";
11
11
  import"../../../shared/components-ew4wq7mj.js";
12
- import"../../../shared/components-wwd093xg.js";
13
12
  import"../../../shared/components-tz0axc0f.js";
14
- import"../../../shared/components-45r18egt.js";
13
+ import"../../../shared/components-ceyn28cf.js";
14
+ import"../../../shared/components-nwa2a9tq.js";
15
15
  import"../../../shared/components-kxpcj2ry.js";
16
16
  import"../../../shared/components-s217vq1n.js";
17
17
  import"../../../shared/components-xnp09586.js";
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  Craft2
3
- } from "../../../shared/components-rmhdr4g1.js";
4
- import"../../../shared/components-02683eqd.js";
3
+ } from "../../../shared/components-gd8gmr6w.js";
4
+ import"../../../shared/components-jw45ck66.js";
5
5
  import"../../../shared/components-9h3g4mnq.js";
6
+ import"../../../shared/components-45r18egt.js";
6
7
  import"../../../shared/components-znspksk0.js";
7
8
  import"../../../shared/components-ew4wq7mj.js";
8
9
  import"../../../shared/components-tz0axc0f.js";
9
- import"../../../shared/components-45r18egt.js";
10
10
  import"../../../shared/components-kxpcj2ry.js";
11
11
  import"../../../shared/components-s217vq1n.js";
12
12
  import"../../../shared/components-xnp09586.js";
@@ -2,21 +2,21 @@ import {
2
2
  FluidHoverItem2,
3
3
  FluidHover2,
4
4
  fluid_hover_default
5
- } from "../../../shared/components-1nqp7wqr.js";
6
- import"../../../shared/components-j3q9kaps.js";
5
+ } from "../../../shared/components-8nnhzeb3.js";
7
6
  import {
8
7
  FluidHoverHighlight2
9
- } from "../../../shared/components-95kp19zn.js";
10
- import"../../../shared/components-gvwxswpr.js";
8
+ } from "../../../shared/components-9b2m90st.js";
9
+ import"../../../shared/components-bxqmbcz2.js";
10
+ import"../../../shared/components-j3q9kaps.js";
11
11
  import {
12
12
  useFluidHover2,
13
13
  useRegisterFluidHoverItem2
14
- } from "../../../shared/components-7c4a0egq.js";
15
- import"../../../shared/components-mp7en54n.js";
14
+ } from "../../../shared/components-21hcwp85.js";
15
+ import"../../../shared/components-8pnvkrbw.js";
16
16
  import"../../../shared/components-pva1wj1r.js";
17
17
  import"../../../shared/components-bkwjvvkh.js";
18
- import"../../../shared/components-tz0axc0f.js";
19
18
  import"../../../shared/components-45r18egt.js";
19
+ import"../../../shared/components-tz0axc0f.js";
20
20
  import"../../../shared/components-kxpcj2ry.js";
21
21
  import"../../../shared/components-s217vq1n.js";
22
22
  import"../../../shared/components-xnp09586.js";
@@ -1,25 +1,25 @@
1
1
  import {
2
2
  Morph2,
3
3
  morph_default
4
- } from "../../../shared/components-ajgwbabq.js";
5
- import"../../../shared/components-31pkxwfz.js";
6
- import"../../../shared/components-ywgqahmg.js";
7
- import"../../../shared/components-3hgk57s0.js";
8
- import"../../../shared/components-ceyn28cf.js";
9
- import"../../../shared/components-nwa2a9tq.js";
10
- import"../../../shared/components-znspksk0.js";
11
- import"../../../shared/components-ew4wq7mj.js";
12
- import"../../../shared/components-313rmbxy.js";
4
+ } from "../../../shared/components-abqfs5fh.js";
5
+ import"../../../shared/components-wq9hrera.js";
13
6
  import {
14
7
  MorphPart2
15
- } from "../../../shared/components-wddr0r6a.js";
16
- import"../../../shared/components-wwd093xg.js";
17
- import"../../../shared/components-mp7en54n.js";
8
+ } from "../../../shared/components-pa43g2r2.js";
9
+ import"../../../shared/components-ycwhrqe1.js";
10
+ import"../../../shared/components-ywgqahmg.js";
11
+ import"../../../shared/components-3hgk57s0.js";
12
+ import"../../../shared/components-8pnvkrbw.js";
18
13
  import"../../../shared/components-pva1wj1r.js";
19
14
  import"../../../shared/components-7wjkag2j.js";
20
15
  import"../../../shared/components-bkwjvvkh.js";
21
- import"../../../shared/components-tz0axc0f.js";
22
16
  import"../../../shared/components-45r18egt.js";
17
+ import"../../../shared/components-wwd093xg.js";
18
+ import"../../../shared/components-znspksk0.js";
19
+ import"../../../shared/components-ew4wq7mj.js";
20
+ import"../../../shared/components-tz0axc0f.js";
21
+ import"../../../shared/components-ceyn28cf.js";
22
+ import"../../../shared/components-nwa2a9tq.js";
23
23
  import"../../../shared/components-kxpcj2ry.js";
24
24
  import"../../../shared/components-s217vq1n.js";
25
25
  import"../../../shared/components-xnp09586.js";
@@ -1,19 +1,19 @@
1
1
  import {
2
2
  Motion2
3
- } from "../../../shared/components-9hysh6d3.js";
4
- import"../../../shared/components-31pkxwfz.js";
3
+ } from "../../../shared/components-1f5624hb.js";
4
+ import"../../../shared/components-ycwhrqe1.js";
5
5
  import"../../../shared/components-ywgqahmg.js";
6
6
  import"../../../shared/components-3hgk57s0.js";
7
- import"../../../shared/components-znspksk0.js";
8
- import"../../../shared/components-ew4wq7mj.js";
9
- import"../../../shared/components-wwd093xg.js";
10
7
  import"../../../shared/components-7wjkag2j.js";
11
8
  import"../../../shared/components-bkwjvvkh.js";
12
- import"../../../shared/components-tz0axc0f.js";
13
9
  import {
14
10
  spring2,
15
11
  exitFallbackMs2
16
12
  } from "../../../shared/components-45r18egt.js";
13
+ import"../../../shared/components-wwd093xg.js";
14
+ import"../../../shared/components-znspksk0.js";
15
+ import"../../../shared/components-ew4wq7mj.js";
16
+ import"../../../shared/components-tz0axc0f.js";
17
17
  import"../../../shared/components-kxpcj2ry.js";
18
18
  import"../../../shared/components-s217vq1n.js";
19
19
  import"../../../shared/components-xnp09586.js";
@@ -1,7 +1,8 @@
1
1
  import {
2
2
  SizeProvider2,
3
3
  SizeScope2
4
- } from "../../../shared/components-ffng9rpa.js";
4
+ } from "../../../shared/components-nz14rwtd.js";
5
+ import"../../../shared/components-wwd093xg.js";
5
6
  import {
6
7
  useTypeScale2,
7
8
  useSizeVariant2,
@@ -12,7 +13,6 @@ import {
12
13
  sizeMap2,
13
14
  typeScale2
14
15
  } from "../../../shared/components-ew4wq7mj.js";
15
- import"../../../shared/components-wwd093xg.js";
16
16
  export {
17
17
  SizeProvider2 as SizeProvider,
18
18
  SizeScope2 as SizeScope,
@@ -11,7 +11,7 @@ import {
11
11
  } from "./components-xnp09586.js";
12
12
  import {
13
13
  button_default
14
- } from "./components-31pkxwfz.js";
14
+ } from "./components-ycwhrqe1.js";
15
15
  import {
16
16
  useControllableState2
17
17
  } from "./components-wwd093xg.js";
@@ -29,19 +29,19 @@ import {
29
29
  import {
30
30
  useSidebarShortcut,
31
31
  sidebar_default
32
- } from "./components-9e5fpy3v.js";
32
+ } from "./components-cc9kfhkb.js";
33
33
  import {
34
34
  inertProps2
35
35
  } from "./components-2myjk2zf.js";
36
36
  import {
37
37
  SizeProvider2
38
- } from "./components-ffng9rpa.js";
38
+ } from "./components-nz14rwtd.js";
39
39
  import {
40
40
  tooltip_default
41
- } from "./components-rj4nnqkz.js";
41
+ } from "./components-7rn454aq.js";
42
42
  import {
43
43
  resizable_default
44
- } from "./components-k9qbcmaa.js";
44
+ } from "./components-gr82tz50.js";
45
45
 
46
46
  // blocks/desktop-shell/index.tsx
47
47
  import { useCallback, useLayoutEffect, useRef, useState } from "react";
@@ -6,12 +6,16 @@ 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
  RowOrderContext2,
17
21
  useRowOrder2,
@@ -23,13 +27,9 @@ import {
23
27
  import {
24
28
  useControllableState2
25
29
  } from "./components-wwd093xg.js";
26
- import {
27
- useFluidHover2,
28
- useRegisterFluidHoverItem2
29
- } from "./components-7c4a0egq.js";
30
30
  import {
31
31
  SizeScope2
32
- } from "./components-ffng9rpa.js";
32
+ } from "./components-nz14rwtd.js";
33
33
  import {
34
34
  useIcon2
35
35
  } from "./components-jnhpgpfk.js";
@@ -5,7 +5,7 @@ import {
5
5
  } from "./components-bkwjvvkh.js";
6
6
  import {
7
7
  useMorph2
8
- } from "./components-mp7en54n.js";
8
+ } from "./components-8pnvkrbw.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-xvf8jcza.js";
18
+ } from "./components-ft5dgjg6.js";
19
19
  import {
20
20
  PopupSurface2
21
- } from "./components-90sfqz5t.js";
21
+ } from "./components-nxqrw789.js";
22
22
  import {
23
23
  slotPart2
24
24
  } from "./components-7wjkag2j.js";
@@ -8,7 +8,7 @@ import {
8
8
  } from "./components-45r18egt.js";
9
9
  import {
10
10
  button_default
11
- } from "./components-31pkxwfz.js";
11
+ } from "./components-ycwhrqe1.js";
12
12
  import {
13
13
  useControllableState2
14
14
  } from "./components-wwd093xg.js";
@@ -1,14 +1,18 @@
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
  GooIndicator2
8
- } from "./components-gvwxswpr.js";
12
+ } from "./components-bxqmbcz2.js";
9
13
  import {
10
14
  FluidHoverHighlight2
11
- } from "./components-95kp19zn.js";
15
+ } from "./components-9b2m90st.js";
12
16
  import {
13
17
  useIcon2
14
18
  } from "./components-jnhpgpfk.js";
@@ -21,22 +25,18 @@ import {
21
25
  import {
22
26
  useControllableState2
23
27
  } from "./components-wwd093xg.js";
24
- import {
25
- useFluidHover2,
26
- useRegisterFluidHoverItem2
27
- } from "./components-7c4a0egq.js";
28
28
  import {
29
29
  WeightLabel2
30
30
  } from "./components-y09nr7fe.js";
31
31
  import {
32
32
  SizeScope2
33
- } from "./components-ffng9rpa.js";
33
+ } from "./components-nz14rwtd.js";
34
34
  import {
35
35
  button_default
36
- } from "./components-31pkxwfz.js";
36
+ } from "./components-ycwhrqe1.js";
37
37
  import {
38
38
  Input2
39
- } from "./components-y07de1qv.js";
39
+ } from "./components-af44r4y9.js";
40
40
 
41
41
  // components/navigation/pagination/index.tsx
42
42
  import { useEffect, useRef, useState } from "react";
@@ -14,6 +14,11 @@ import {
14
14
  * LICENSE.fluid-functionalism in this package.
15
15
  * Local changes: see PORTING.md.
16
16
  */
17
+ function sameRect2(a, b) {
18
+ if (!a || !b)
19
+ return a === b;
20
+ return a.top === b.top && a.left === b.left && a.width === b.width && a.height === b.height;
21
+ }
17
22
  function pickNearest({
18
23
  axis,
19
24
  point,
@@ -75,7 +80,6 @@ function resolveActivator(element) {
75
80
  }
76
81
  return element.querySelector(ACTIVATOR_SELECTOR) ?? element;
77
82
  }
78
- var measurementAttempts = 3;
79
83
  function useFluidHover2(containerRef, options = {}) {
80
84
  const { axis = "y", isItemDisabled, gapClick = true } = options;
81
85
  const gapClickMaxDistance = typeof gapClick === "object" ? gapClick.maxDistance ?? Infinity : Infinity;
@@ -134,13 +138,8 @@ function useFluidHover2(containerRef, options = {}) {
134
138
  return false;
135
139
  const prev = itemRectsRef.current;
136
140
  let changed = prev.length !== rects.length;
137
- for (let i = 0;!changed && i < rects.length; i++) {
138
- const p = prev[i];
139
- const r = rects[i];
140
- if (p === r)
141
- continue;
142
- changed = !p || !r || p.top !== r.top || p.left !== r.left || p.width !== r.width || p.height !== r.height;
143
- }
141
+ for (let i = 0;!changed && i < rects.length; i++)
142
+ changed = !sameRect2(prev[i], rects[i]);
144
143
  if (changed) {
145
144
  itemRectsRef.current = rects;
146
145
  setItemRects(rects);
@@ -150,40 +149,72 @@ function useFluidHover2(containerRef, options = {}) {
150
149
  const measureItems = useCallback(() => {
151
150
  runMeasurement();
152
151
  }, [runMeasurement]);
153
- const scheduleMeasurement = useCallback((attemptsLeft) => {
154
- if (remeasureRafIdRef.current !== null) {
155
- cancelAnimationFrame(remeasureRafIdRef.current);
152
+ const onObserved = useCallback(() => {
153
+ if (runMeasurement())
154
+ setIsMeasured(true);
155
+ }, [runMeasurement]);
156
+ const roRef = useRef(null);
157
+ const observedContainerRef = useRef(null);
158
+ const getRo = useCallback(() => {
159
+ if (roRef.current === null && typeof ResizeObserver !== "undefined") {
160
+ roRef.current = new ResizeObserver(onObserved);
156
161
  }
157
- remeasureRafIdRef.current = requestAnimationFrame(() => {
158
- remeasureRafIdRef.current = null;
159
- if (runMeasurement()) {
160
- setIsMeasured(true);
161
- } else if (attemptsLeft > 1) {
162
- scheduleMeasurement(attemptsLeft - 1);
162
+ return roRef.current;
163
+ }, [onObserved]);
164
+ const queuedRef = useRef(false);
165
+ const scheduleMeasurement = useCallback(() => {
166
+ if (queuedRef.current)
167
+ return;
168
+ queuedRef.current = true;
169
+ queueMicrotask(() => {
170
+ queuedRef.current = false;
171
+ const ro = getRo();
172
+ const container = containerRef.current;
173
+ if (!ro || !container) {
174
+ if (remeasureRafIdRef.current !== null)
175
+ cancelAnimationFrame(remeasureRafIdRef.current);
176
+ remeasureRafIdRef.current = requestAnimationFrame(() => {
177
+ remeasureRafIdRef.current = null;
178
+ onObserved();
179
+ });
180
+ return;
163
181
  }
182
+ if (observedContainerRef.current && observedContainerRef.current !== container) {
183
+ ro.unobserve(observedContainerRef.current);
184
+ }
185
+ observedContainerRef.current = container;
186
+ ro.unobserve(container);
187
+ ro.observe(container, { box: "border-box" });
164
188
  });
165
- }, [runMeasurement]);
189
+ }, [containerRef, getRo, onObserved]);
166
190
  const remeasure = useCallback(() => {
167
191
  setIsMeasured(false);
168
- scheduleMeasurement(measurementAttempts);
169
- }, [scheduleMeasurement]);
170
- const itemRoRef = useRef(null);
171
- const getItemRo = useCallback(() => {
172
- if (itemRoRef.current === null && typeof ResizeObserver !== "undefined") {
173
- itemRoRef.current = new ResizeObserver(() => scheduleMeasurement(measurementAttempts));
174
- }
175
- return itemRoRef.current;
192
+ scheduleMeasurement();
176
193
  }, [scheduleMeasurement]);
194
+ const observedRef = useRef(new Map);
195
+ const track = useCallback((element, by) => {
196
+ const count = (observedRef.current.get(element) ?? 0) + by;
197
+ if (count > 0)
198
+ observedRef.current.set(element, count);
199
+ else
200
+ observedRef.current.delete(element);
201
+ if (by === 1 && count === 1)
202
+ getRo()?.observe(element, { box: "border-box" });
203
+ if (count === 0)
204
+ roRef.current?.unobserve(element);
205
+ }, [getRo]);
177
206
  const registerItem = useCallback((index, element) => {
207
+ const previous = itemsRef.current.get(index);
208
+ if (element && previous === element)
209
+ return;
210
+ if (previous)
211
+ track(previous, -1);
178
212
  if (element) {
179
213
  itemsRef.current.set(index, element);
180
- getItemRo()?.observe(element);
214
+ track(element, 1);
181
215
  if (index === activeIndexRef.current)
182
216
  element.setAttribute(ACTIVE_ATTR, "");
183
217
  } else {
184
- const previous = itemsRef.current.get(index);
185
- if (previous)
186
- itemRoRef.current?.unobserve(previous);
187
218
  previous?.removeAttribute(ACTIVE_ATTR);
188
219
  itemsRef.current.delete(index);
189
220
  if (index === activeIndexRef.current) {
@@ -191,7 +222,7 @@ function useFluidHover2(containerRef, options = {}) {
191
222
  }
192
223
  }
193
224
  remeasure();
194
- }, [remeasure, getItemRo]);
225
+ }, [remeasure, track]);
195
226
  const handleMouseMove = useCallback((e) => {
196
227
  const mouseX = e.clientX;
197
228
  const mouseY = e.clientY;
@@ -260,22 +291,26 @@ function useFluidHover2(containerRef, options = {}) {
260
291
  }, [isItemDisabled, gapClick, gapClickMaxDistance]);
261
292
  useEffect(() => {
262
293
  const container = containerRef.current;
263
- if (!container || typeof ResizeObserver === "undefined")
294
+ const ro = getRo();
295
+ if (!container || !ro)
264
296
  return;
265
- const ro = new ResizeObserver(() => scheduleMeasurement(measurementAttempts));
266
- ro.observe(container);
267
- return () => ro.disconnect();
268
- }, [containerRef, scheduleMeasurement]);
297
+ observedContainerRef.current = container;
298
+ ro.observe(container, { box: "border-box" });
299
+ return () => {
300
+ ro.unobserve(container);
301
+ if (observedContainerRef.current === container)
302
+ observedContainerRef.current = null;
303
+ };
304
+ }, [containerRef, getRo]);
269
305
  useEffect(() => {
270
306
  return () => {
271
- if (rafIdRef.current !== null) {
307
+ if (rafIdRef.current !== null)
272
308
  cancelAnimationFrame(rafIdRef.current);
273
- }
274
- if (remeasureRafIdRef.current !== null) {
309
+ if (remeasureRafIdRef.current !== null)
275
310
  cancelAnimationFrame(remeasureRafIdRef.current);
276
- }
277
- itemRoRef.current?.disconnect();
278
- itemRoRef.current = null;
311
+ roRef.current?.disconnect();
312
+ roRef.current = null;
313
+ observedRef.current.clear();
279
314
  };
280
315
  }, []);
281
316
  return {
@@ -304,4 +339,4 @@ function useRegisterFluidHoverItem2(registerItem, index, ref) {
304
339
  }, [index, registerItem, ref]);
305
340
  }
306
341
 
307
- export { useFluidHover2, useRegisterFluidHoverItem2 };
342
+ export { sameRect2, useFluidHover2, useRegisterFluidHoverItem2 };
@@ -15,11 +15,11 @@ import {
15
15
  columnsPopupClass,
16
16
  ColumnsPanel,
17
17
  PickerInput
18
- } from "./components-qkt4h7x4.js";
18
+ } from "./components-gzve0nkp.js";
19
19
  import {
20
20
  pad,
21
21
  TimeColumns
22
- } from "./components-rts2mggt.js";
22
+ } from "./components-d4gkhy26.js";
23
23
 
24
24
  // components/inputs/date-time/time-picker/index.tsx
25
25
  import { set } from "date-fns";