laif-ds 0.1.35 → 0.1.36

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 (83) hide show
  1. package/dist/_virtual/index.js +5 -2
  2. package/dist/_virtual/index3.js +2 -7
  3. package/dist/_virtual/index4.js +2 -5
  4. package/dist/_virtual/index5.js +4 -4
  5. package/dist/_virtual/index6.js +5 -2
  6. package/dist/_virtual/index7.js +5 -2
  7. package/dist/_virtual/index8.js +5 -0
  8. package/dist/_virtual/index9.js +5 -0
  9. package/dist/_virtual/use-sync-external-store-shim.development.js +5 -0
  10. package/dist/_virtual/use-sync-external-store-shim.production.js +5 -0
  11. package/dist/components/ui/checkbox.js +12 -12
  12. package/dist/components/ui/gantt/components/Chart/Chart.js +1 -1
  13. package/dist/components/ui/message-input.js +1 -1
  14. package/dist/components/ui/tables/data-cross-table/data-cross-table.js +348 -0
  15. package/dist/components/ui/tables/data-cross-table/edit-controls.js +47 -0
  16. package/dist/components/ui/tables/data-cross-table/editable-input.js +100 -0
  17. package/dist/components/ui/tables/data-cross-table/truncated-text.js +19 -0
  18. package/dist/index.d.ts +29 -3
  19. package/dist/index.js +1 -1
  20. package/dist/node_modules/@floating-ui/core/dist/floating-ui.core.js +126 -122
  21. package/dist/node_modules/@floating-ui/dom/dist/floating-ui.dom.js +10 -6
  22. package/dist/node_modules/@radix-ui/react-accordion/dist/index.js +44 -42
  23. package/dist/node_modules/@radix-ui/react-avatar/dist/index.js +33 -43
  24. package/dist/node_modules/@radix-ui/react-checkbox/dist/index.js +237 -120
  25. package/dist/node_modules/@radix-ui/react-collapsible/dist/index.js +17 -16
  26. package/dist/node_modules/@radix-ui/react-context-menu/dist/index.js +95 -94
  27. package/dist/node_modules/@radix-ui/react-dialog/dist/index.js +20 -19
  28. package/dist/node_modules/@radix-ui/react-dropdown-menu/dist/index.js +3 -3
  29. package/dist/node_modules/@radix-ui/react-hover-card/dist/index.js +14 -13
  30. package/dist/node_modules/@radix-ui/react-menu/dist/index.js +136 -136
  31. package/dist/node_modules/@radix-ui/react-menubar/dist/index.js +70 -68
  32. package/dist/node_modules/@radix-ui/react-navigation-menu/dist/index.js +66 -64
  33. package/dist/node_modules/@radix-ui/react-popover/dist/index.js +10 -9
  34. package/dist/node_modules/@radix-ui/react-presence/dist/index.js +16 -16
  35. package/dist/node_modules/@radix-ui/react-primitive/dist/index.js +11 -10
  36. package/dist/node_modules/@radix-ui/react-radio-group/dist/index.js +161 -146
  37. package/dist/node_modules/@radix-ui/react-roving-focus/dist/index.js +87 -84
  38. package/dist/node_modules/@radix-ui/react-select/dist/index.js +269 -257
  39. package/dist/node_modules/@radix-ui/react-slider/dist/index.js +3 -3
  40. package/dist/node_modules/@radix-ui/react-slot/dist/index.js +29 -28
  41. package/dist/node_modules/@radix-ui/react-switch/dist/index.js +101 -86
  42. package/dist/node_modules/@radix-ui/react-tabs/dist/index.js +23 -22
  43. package/dist/node_modules/@radix-ui/react-toggle/dist/index.js +17 -16
  44. package/dist/node_modules/@radix-ui/react-toggle-group/dist/index.js +25 -23
  45. package/dist/node_modules/@radix-ui/react-tooltip/dist/index.js +77 -76
  46. package/dist/node_modules/@radix-ui/react-use-controllable-state/dist/index.js +43 -21
  47. package/dist/node_modules/@radix-ui/react-use-is-hydrated/dist/index.js +16 -0
  48. package/dist/node_modules/@radix-ui/react-visually-hidden/dist/index.js +18 -18
  49. package/dist/node_modules/@tanstack/react-virtual/dist/esm/index.js +36 -0
  50. package/dist/node_modules/@tanstack/virtual-core/dist/esm/index.js +491 -0
  51. package/dist/node_modules/@tanstack/virtual-core/dist/esm/utils.js +53 -0
  52. package/dist/node_modules/classnames/index.js +1 -1
  53. package/dist/node_modules/hast-util-to-jsx-runtime/lib/index.js +1 -1
  54. package/dist/node_modules/property-information/lib/html.js +9 -9
  55. package/dist/node_modules/react-hook-form/dist/index.esm.js +88 -88
  56. package/dist/node_modules/react-is/index.js +1 -1
  57. package/dist/node_modules/react-resizable-panels/dist/react-resizable-panels.browser.esm.js +830 -801
  58. package/dist/node_modules/recharts/es6/util/ReactUtils.js +1 -1
  59. package/dist/node_modules/remeda/dist/chunk-AIG3BDKO.js +9 -0
  60. package/dist/node_modules/remeda/dist/{chunk-A3PVMI4K.js → chunk-KI5X74E2.js} +1 -1
  61. package/dist/node_modules/style-to-object/cjs/index.js +1 -1
  62. package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js +3 -3
  63. package/dist/node_modules/unified/lib/index.js +1 -1
  64. package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js +68 -0
  65. package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.js +56 -0
  66. package/dist/node_modules/use-sync-external-store/shim/index.js +11 -0
  67. package/dist/styles.css +1 -1
  68. package/package.json +2 -1
  69. package/dist/components/ui/data-cross-table.js +0 -216
  70. package/dist/node_modules/@radix-ui/react-dropdown-menu/node_modules/@radix-ui/react-arrow/dist/index.js +0 -25
  71. package/dist/node_modules/@radix-ui/react-dropdown-menu/node_modules/@radix-ui/react-collection/dist/index.js +0 -49
  72. package/dist/node_modules/@radix-ui/react-dropdown-menu/node_modules/@radix-ui/react-dismissable-layer/dist/index.js +0 -128
  73. package/dist/node_modules/@radix-ui/react-dropdown-menu/node_modules/@radix-ui/react-focus-scope/dist/index.js +0 -138
  74. package/dist/node_modules/@radix-ui/react-dropdown-menu/node_modules/@radix-ui/react-menu/dist/index.js +0 -625
  75. package/dist/node_modules/@radix-ui/react-dropdown-menu/node_modules/@radix-ui/react-popper/dist/index.js +0 -221
  76. package/dist/node_modules/@radix-ui/react-dropdown-menu/node_modules/@radix-ui/react-portal/dist/index.js +0 -17
  77. package/dist/node_modules/@radix-ui/react-dropdown-menu/node_modules/@radix-ui/react-primitive/dist/index.js +0 -37
  78. package/dist/node_modules/@radix-ui/react-dropdown-menu/node_modules/@radix-ui/react-roving-focus/dist/index.js +0 -184
  79. package/dist/node_modules/@radix-ui/react-dropdown-menu/node_modules/@radix-ui/react-use-controllable-state/dist/index.js +0 -55
  80. package/dist/node_modules/@radix-ui/react-slider/node_modules/@radix-ui/react-collection/dist/index.js +0 -49
  81. package/dist/node_modules/@radix-ui/react-slider/node_modules/@radix-ui/react-primitive/dist/index.js +0 -33
  82. package/dist/node_modules/@radix-ui/react-slider/node_modules/@radix-ui/react-use-controllable-state/dist/index.js +0 -55
  83. package/dist/node_modules/remeda/dist/chunk-OAMXQXGR.js +0 -9
@@ -12,10 +12,10 @@ import { Primitive as oe } from "../../react-primitive/dist/index.js";
12
12
  import { createSlottable as re } from "../../react-slot/dist/index.js";
13
13
  import { useControllableState as ne } from "../../react-use-controllable-state/dist/index.js";
14
14
  import { Root as se } from "../../react-visually-hidden/dist/index.js";
15
- import { jsx as p, jsxs as ie } from "react/jsx-runtime";
16
- var [_, He] = W("Tooltip", [
15
+ import { jsx as f, jsxs as ie } from "react/jsx-runtime";
16
+ var [A, He] = W("Tooltip", [
17
17
  S
18
- ]), A = S(), F = "TooltipProvider", ae = 700, O = "tooltip.open", [le, k] = _(F), j = (t) => {
18
+ ]), D = S(), j = "TooltipProvider", ae = 700, O = "tooltip.open", [le, k] = A(j), F = (t) => {
19
19
  const {
20
20
  __scopeTooltip: o,
21
21
  delayDuration: e = ae,
@@ -24,9 +24,9 @@ var [_, He] = W("Tooltip", [
24
24
  children: a
25
25
  } = t, l = s.useRef(!0), v = s.useRef(!1), i = s.useRef(0);
26
26
  return s.useEffect(() => {
27
- const d = i.current;
28
- return () => window.clearTimeout(d);
29
- }, []), /* @__PURE__ */ p(
27
+ const p = i.current;
28
+ return () => window.clearTimeout(p);
29
+ }, []), /* @__PURE__ */ f(
30
30
  le,
31
31
  {
32
32
  scope: o,
@@ -42,85 +42,86 @@ var [_, He] = W("Tooltip", [
42
42
  );
43
43
  }, [r]),
44
44
  isPointerInTransitRef: v,
45
- onPointerInTransitChange: s.useCallback((d) => {
46
- v.current = d;
45
+ onPointerInTransitChange: s.useCallback((p) => {
46
+ v.current = p;
47
47
  }, []),
48
48
  disableHoverableContent: n,
49
49
  children: a
50
50
  }
51
51
  );
52
52
  };
53
- j.displayName = F;
54
- var D = "Tooltip", [ce, R] = _(D), B = (t) => {
53
+ F.displayName = j;
54
+ var R = "Tooltip", [ce, _] = A(R), B = (t) => {
55
55
  const {
56
56
  __scopeTooltip: o,
57
57
  children: e,
58
58
  open: r,
59
- defaultOpen: n = !1,
59
+ defaultOpen: n,
60
60
  onOpenChange: a,
61
61
  disableHoverableContent: l,
62
62
  delayDuration: v
63
- } = t, i = k(D, t.__scopeTooltip), d = A(o), [c, f] = s.useState(null), m = z(), u = s.useRef(0), h = l ?? i.disableHoverableContent, C = v ?? i.delayDuration, T = s.useRef(!1), [x = !1, y] = ne({
63
+ } = t, i = k(R, t.__scopeTooltip), p = D(o), [c, d] = s.useState(null), h = z(), u = s.useRef(0), m = l ?? i.disableHoverableContent, y = v ?? i.delayDuration, T = s.useRef(!1), [x, C] = ne({
64
64
  prop: r,
65
- defaultProp: n,
65
+ defaultProp: n ?? !1,
66
66
  onChange: (H) => {
67
67
  H ? (i.onOpen(), document.dispatchEvent(new CustomEvent(O))) : i.onClose(), a == null || a(H);
68
- }
68
+ },
69
+ caller: R
69
70
  }), w = s.useMemo(() => x ? T.current ? "delayed-open" : "instant-open" : "closed", [x]), P = s.useCallback(() => {
70
- window.clearTimeout(u.current), u.current = 0, T.current = !1, y(!0);
71
- }, [y]), E = s.useCallback(() => {
72
- window.clearTimeout(u.current), u.current = 0, y(!1);
73
- }, [y]), I = s.useCallback(() => {
71
+ window.clearTimeout(u.current), u.current = 0, T.current = !1, C(!0);
72
+ }, [C]), E = s.useCallback(() => {
73
+ window.clearTimeout(u.current), u.current = 0, C(!1);
74
+ }, [C]), I = s.useCallback(() => {
74
75
  window.clearTimeout(u.current), u.current = window.setTimeout(() => {
75
- T.current = !0, y(!0), u.current = 0;
76
- }, C);
77
- }, [C, y]);
76
+ T.current = !0, C(!0), u.current = 0;
77
+ }, y);
78
+ }, [y, C]);
78
79
  return s.useEffect(() => () => {
79
80
  u.current && (window.clearTimeout(u.current), u.current = 0);
80
- }, []), /* @__PURE__ */ p(J, { ...d, children: /* @__PURE__ */ p(
81
+ }, []), /* @__PURE__ */ f(J, { ...p, children: /* @__PURE__ */ f(
81
82
  ce,
82
83
  {
83
84
  scope: o,
84
- contentId: m,
85
+ contentId: h,
85
86
  open: x,
86
87
  stateAttribute: w,
87
88
  trigger: c,
88
- onTriggerChange: f,
89
+ onTriggerChange: d,
89
90
  onTriggerEnter: s.useCallback(() => {
90
91
  i.isOpenDelayedRef.current ? I() : P();
91
92
  }, [i.isOpenDelayedRef, I, P]),
92
93
  onTriggerLeave: s.useCallback(() => {
93
- h ? E() : (window.clearTimeout(u.current), u.current = 0);
94
- }, [E, h]),
94
+ m ? E() : (window.clearTimeout(u.current), u.current = 0);
95
+ }, [E, m]),
95
96
  onOpen: P,
96
97
  onClose: E,
97
- disableHoverableContent: h,
98
+ disableHoverableContent: m,
98
99
  children: e
99
100
  }
100
101
  ) });
101
102
  };
102
- B.displayName = D;
103
+ B.displayName = R;
103
104
  var L = "TooltipTrigger", U = s.forwardRef(
104
105
  (t, o) => {
105
- const { __scopeTooltip: e, ...r } = t, n = R(L, e), a = k(L, e), l = A(e), v = s.useRef(null), i = N(o, v, n.onTriggerChange), d = s.useRef(!1), c = s.useRef(!1), f = s.useCallback(() => d.current = !1, []);
106
- return s.useEffect(() => () => document.removeEventListener("pointerup", f), [f]), /* @__PURE__ */ p(Q, { asChild: !0, ...l, children: /* @__PURE__ */ p(
106
+ const { __scopeTooltip: e, ...r } = t, n = _(L, e), a = k(L, e), l = D(e), v = s.useRef(null), i = N(o, v, n.onTriggerChange), p = s.useRef(!1), c = s.useRef(!1), d = s.useCallback(() => p.current = !1, []);
107
+ return s.useEffect(() => () => document.removeEventListener("pointerup", d), [d]), /* @__PURE__ */ f(Q, { asChild: !0, ...l, children: /* @__PURE__ */ f(
107
108
  oe.button,
108
109
  {
109
110
  "aria-describedby": n.open ? n.contentId : void 0,
110
111
  "data-state": n.stateAttribute,
111
112
  ...r,
112
113
  ref: i,
113
- onPointerMove: g(t.onPointerMove, (m) => {
114
- m.pointerType !== "touch" && !c.current && !a.isPointerInTransitRef.current && (n.onTriggerEnter(), c.current = !0);
114
+ onPointerMove: g(t.onPointerMove, (h) => {
115
+ h.pointerType !== "touch" && !c.current && !a.isPointerInTransitRef.current && (n.onTriggerEnter(), c.current = !0);
115
116
  }),
116
117
  onPointerLeave: g(t.onPointerLeave, () => {
117
118
  n.onTriggerLeave(), c.current = !1;
118
119
  }),
119
120
  onPointerDown: g(t.onPointerDown, () => {
120
- n.open && n.onClose(), d.current = !0, document.addEventListener("pointerup", f, { once: !0 });
121
+ n.open && n.onClose(), p.current = !0, document.addEventListener("pointerup", d, { once: !0 });
121
122
  }),
122
123
  onFocus: g(t.onFocus, () => {
123
- d.current || n.onOpen();
124
+ p.current || n.onOpen();
124
125
  }),
125
126
  onBlur: g(t.onBlur, n.onClose),
126
127
  onClick: g(t.onClick, n.onClose)
@@ -129,45 +130,45 @@ var L = "TooltipTrigger", U = s.forwardRef(
129
130
  }
130
131
  );
131
132
  U.displayName = L;
132
- var M = "TooltipPortal", [ue, pe] = _(M, {
133
+ var M = "TooltipPortal", [ue, pe] = A(M, {
133
134
  forceMount: void 0
134
135
  }), V = (t) => {
135
- const { __scopeTooltip: o, forceMount: e, children: r, container: n } = t, a = R(M, o);
136
- return /* @__PURE__ */ p(ue, { scope: o, forceMount: e, children: /* @__PURE__ */ p(G, { present: e || a.open, children: /* @__PURE__ */ p(te, { asChild: !0, container: n, children: r }) }) });
136
+ const { __scopeTooltip: o, forceMount: e, children: r, container: n } = t, a = _(M, o);
137
+ return /* @__PURE__ */ f(ue, { scope: o, forceMount: e, children: /* @__PURE__ */ f(G, { present: e || a.open, children: /* @__PURE__ */ f(te, { asChild: !0, container: n, children: r }) }) });
137
138
  };
138
139
  V.displayName = M;
139
140
  var b = "TooltipContent", Y = s.forwardRef(
140
141
  (t, o) => {
141
- const e = pe(b, t.__scopeTooltip), { forceMount: r = e.forceMount, side: n = "top", ...a } = t, l = R(b, t.__scopeTooltip);
142
- return /* @__PURE__ */ p(G, { present: r || l.open, children: l.disableHoverableContent ? /* @__PURE__ */ p(q, { side: n, ...a, ref: o }) : /* @__PURE__ */ p(de, { side: n, ...a, ref: o }) });
142
+ const e = pe(b, t.__scopeTooltip), { forceMount: r = e.forceMount, side: n = "top", ...a } = t, l = _(b, t.__scopeTooltip);
143
+ return /* @__PURE__ */ f(G, { present: r || l.open, children: l.disableHoverableContent ? /* @__PURE__ */ f(q, { side: n, ...a, ref: o }) : /* @__PURE__ */ f(de, { side: n, ...a, ref: o }) });
143
144
  }
144
145
  ), de = s.forwardRef((t, o) => {
145
- const e = R(b, t.__scopeTooltip), r = k(b, t.__scopeTooltip), n = s.useRef(null), a = N(o, n), [l, v] = s.useState(null), { trigger: i, onClose: d } = e, c = n.current, { onPointerInTransitChange: f } = r, m = s.useCallback(() => {
146
- v(null), f(!1);
147
- }, [f]), u = s.useCallback(
148
- (h, C) => {
149
- const T = h.currentTarget, x = { x: h.clientX, y: h.clientY }, y = me(x, T.getBoundingClientRect()), w = Te(x, y), P = Ce(C.getBoundingClientRect()), E = xe([...w, ...P]);
150
- v(E), f(!0);
146
+ const e = _(b, t.__scopeTooltip), r = k(b, t.__scopeTooltip), n = s.useRef(null), a = N(o, n), [l, v] = s.useState(null), { trigger: i, onClose: p } = e, c = n.current, { onPointerInTransitChange: d } = r, h = s.useCallback(() => {
147
+ v(null), d(!1);
148
+ }, [d]), u = s.useCallback(
149
+ (m, y) => {
150
+ const T = m.currentTarget, x = { x: m.clientX, y: m.clientY }, C = me(x, T.getBoundingClientRect()), w = Te(x, C), P = ye(y.getBoundingClientRect()), E = xe([...w, ...P]);
151
+ v(E), d(!0);
151
152
  },
152
- [f]
153
+ [d]
153
154
  );
154
- return s.useEffect(() => () => m(), [m]), s.useEffect(() => {
155
+ return s.useEffect(() => () => h(), [h]), s.useEffect(() => {
155
156
  if (i && c) {
156
- const h = (T) => u(T, c), C = (T) => u(T, i);
157
- return i.addEventListener("pointerleave", h), c.addEventListener("pointerleave", C), () => {
158
- i.removeEventListener("pointerleave", h), c.removeEventListener("pointerleave", C);
157
+ const m = (T) => u(T, c), y = (T) => u(T, i);
158
+ return i.addEventListener("pointerleave", m), c.addEventListener("pointerleave", y), () => {
159
+ i.removeEventListener("pointerleave", m), c.removeEventListener("pointerleave", y);
159
160
  };
160
161
  }
161
- }, [i, c, u, m]), s.useEffect(() => {
162
+ }, [i, c, u, h]), s.useEffect(() => {
162
163
  if (l) {
163
- const h = (C) => {
164
- const T = C.target, x = { x: C.clientX, y: C.clientY }, y = (i == null ? void 0 : i.contains(T)) || (c == null ? void 0 : c.contains(T)), w = !ye(x, l);
165
- y ? m() : w && (m(), d());
164
+ const m = (y) => {
165
+ const T = y.target, x = { x: y.clientX, y: y.clientY }, C = (i == null ? void 0 : i.contains(T)) || (c == null ? void 0 : c.contains(T)), w = !Ce(x, l);
166
+ C ? h() : w && (h(), p());
166
167
  };
167
- return document.addEventListener("pointermove", h), () => document.removeEventListener("pointermove", h);
168
+ return document.addEventListener("pointermove", m), () => document.removeEventListener("pointermove", m);
168
169
  }
169
- }, [i, c, l, d, m]), /* @__PURE__ */ p(q, { ...t, ref: a });
170
- }), [fe, ve] = _(D, { isInside: !1 }), he = re("TooltipContent"), q = s.forwardRef(
170
+ }, [i, c, l, p, h]), /* @__PURE__ */ f(q, { ...t, ref: a });
171
+ }), [fe, ve] = A(R, { isInside: !1 }), he = re("TooltipContent"), q = s.forwardRef(
171
172
  (t, o) => {
172
173
  const {
173
174
  __scopeTooltip: e,
@@ -176,29 +177,29 @@ var b = "TooltipContent", Y = s.forwardRef(
176
177
  onEscapeKeyDown: a,
177
178
  onPointerDownOutside: l,
178
179
  ...v
179
- } = t, i = R(b, e), d = A(e), { onClose: c } = i;
180
+ } = t, i = _(b, e), p = D(e), { onClose: c } = i;
180
181
  return s.useEffect(() => (document.addEventListener(O, c), () => document.removeEventListener(O, c)), [c]), s.useEffect(() => {
181
182
  if (i.trigger) {
182
- const f = (m) => {
183
- const u = m.target;
183
+ const d = (h) => {
184
+ const u = h.target;
184
185
  u != null && u.contains(i.trigger) && c();
185
186
  };
186
- return window.addEventListener("scroll", f, { capture: !0 }), () => window.removeEventListener("scroll", f, { capture: !0 });
187
+ return window.addEventListener("scroll", d, { capture: !0 }), () => window.removeEventListener("scroll", d, { capture: !0 });
187
188
  }
188
- }, [i.trigger, c]), /* @__PURE__ */ p(
189
+ }, [i.trigger, c]), /* @__PURE__ */ f(
189
190
  $,
190
191
  {
191
192
  asChild: !0,
192
193
  disableOutsidePointerEvents: !1,
193
194
  onEscapeKeyDown: a,
194
195
  onPointerDownOutside: l,
195
- onFocusOutside: (f) => f.preventDefault(),
196
+ onFocusOutside: (d) => d.preventDefault(),
196
197
  onDismiss: c,
197
198
  children: /* @__PURE__ */ ie(
198
199
  ee,
199
200
  {
200
201
  "data-state": i.stateAttribute,
201
- ...d,
202
+ ...p,
202
203
  ...v,
203
204
  ref: o,
204
205
  style: {
@@ -210,8 +211,8 @@ var b = "TooltipContent", Y = s.forwardRef(
210
211
  "--radix-tooltip-trigger-height": "var(--radix-popper-anchor-height)"
211
212
  },
212
213
  children: [
213
- /* @__PURE__ */ p(he, { children: r }),
214
- /* @__PURE__ */ p(fe, { scope: e, isInside: !0, children: /* @__PURE__ */ p(se, { id: i.contentId, role: "tooltip", children: n || r }) })
214
+ /* @__PURE__ */ f(he, { children: r }),
215
+ /* @__PURE__ */ f(fe, { scope: e, isInside: !0, children: /* @__PURE__ */ f(se, { id: i.contentId, role: "tooltip", children: n || r }) })
215
216
  ]
216
217
  }
217
218
  )
@@ -222,11 +223,11 @@ var b = "TooltipContent", Y = s.forwardRef(
222
223
  Y.displayName = b;
223
224
  var X = "TooltipArrow", K = s.forwardRef(
224
225
  (t, o) => {
225
- const { __scopeTooltip: e, ...r } = t, n = A(e);
226
+ const { __scopeTooltip: e, ...r } = t, n = D(e);
226
227
  return ve(
227
228
  X,
228
229
  e
229
- ).isInside ? null : /* @__PURE__ */ p(Z, { ...n, ...r, ref: o });
230
+ ).isInside ? null : /* @__PURE__ */ f(Z, { ...n, ...r, ref: o });
230
231
  }
231
232
  );
232
233
  K.displayName = X;
@@ -275,7 +276,7 @@ function Te(t, o, e = 5) {
275
276
  }
276
277
  return r;
277
278
  }
278
- function Ce(t) {
279
+ function ye(t) {
279
280
  const { top: o, right: e, bottom: r, left: n } = t;
280
281
  return [
281
282
  { x: n, y: o },
@@ -284,12 +285,12 @@ function Ce(t) {
284
285
  { x: n, y: r }
285
286
  ];
286
287
  }
287
- function ye(t, o) {
288
+ function Ce(t, o) {
288
289
  const { x: e, y: r } = t;
289
290
  let n = !1;
290
291
  for (let a = 0, l = o.length - 1; a < o.length; l = a++) {
291
- const v = o[a].x, i = o[a].y, d = o[l].x, c = o[l].y;
292
- i > r != c > r && e < (d - v) * (r - i) / (c - i) + v && (n = !n);
292
+ const v = o[a], i = o[l], p = v.x, c = v.y, d = i.x, h = i.y;
293
+ c > r != h > r && e < (d - p) * (r - c) / (h - c) + p && (n = !n);
293
294
  }
294
295
  return n;
295
296
  }
@@ -322,18 +323,18 @@ function ge(t) {
322
323
  }
323
324
  return e.pop(), o.length === 1 && e.length === 1 && o[0].x === e[0].x && o[0].y === e[0].y ? o : o.concat(e);
324
325
  }
325
- var Ne = j, Se = B, Ge = U, Fe = V, je = Y, Be = K;
326
+ var Ne = F, Se = B, Ge = U, je = V, Fe = Y, Be = K;
326
327
  export {
327
328
  Be as Arrow,
328
- je as Content,
329
- Fe as Portal,
329
+ Fe as Content,
330
+ je as Portal,
330
331
  Ne as Provider,
331
332
  Se as Root,
332
333
  B as Tooltip,
333
334
  K as TooltipArrow,
334
335
  Y as TooltipContent,
335
336
  V as TooltipPortal,
336
- j as TooltipProvider,
337
+ F as TooltipProvider,
337
338
  U as TooltipTrigger,
338
339
  Ge as Trigger,
339
340
  He as createTooltipScope
@@ -1,33 +1,55 @@
1
1
  "use client";
2
- import * as l from "react";
3
- import { useCallbackRef as f } from "../../react-use-callback-ref/dist/index.js";
4
- function R({
2
+ import * as n from "react";
3
+ import { useLayoutEffect as v } from "../../react-use-layout-effect/dist/index.js";
4
+ var E = n[" useInsertionEffect ".trim().toString()] || v;
5
+ function y({
5
6
  prop: t,
6
- defaultProp: r,
7
- onChange: s = () => {
8
- }
7
+ defaultProp: u,
8
+ onChange: e = () => {
9
+ },
10
+ caller: i
9
11
  }) {
10
- const [e, n] = v({ defaultProp: r, onChange: s }), o = t !== void 0, i = o ? t : e, u = f(s), d = l.useCallback(
11
- (c) => {
12
- if (o) {
13
- const a = typeof c == "function" ? c(t) : c;
14
- a !== t && u(a);
12
+ const [l, o, r] = w({
13
+ defaultProp: u,
14
+ onChange: e
15
+ }), c = t !== void 0, a = c ? t : l;
16
+ {
17
+ const s = n.useRef(t !== void 0);
18
+ n.useEffect(() => {
19
+ const f = s.current;
20
+ f !== c && console.warn(
21
+ `${i} is changing from ${f ? "controlled" : "uncontrolled"} to ${c ? "controlled" : "uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`
22
+ ), s.current = c;
23
+ }, [c, i]);
24
+ }
25
+ const m = n.useCallback(
26
+ (s) => {
27
+ var f;
28
+ if (c) {
29
+ const d = R(s) ? s(t) : s;
30
+ d !== t && ((f = r.current) == null || f.call(r, d));
15
31
  } else
16
- n(c);
32
+ o(s);
17
33
  },
18
- [o, t, n, u]
34
+ [c, t, o, r]
19
35
  );
20
- return [i, d];
36
+ return [a, m];
21
37
  }
22
- function v({
38
+ function w({
23
39
  defaultProp: t,
24
- onChange: r
40
+ onChange: u
25
41
  }) {
26
- const s = l.useState(t), [e] = s, n = l.useRef(e), o = f(r);
27
- return l.useEffect(() => {
28
- n.current !== e && (o(e), n.current = e);
29
- }, [e, n, o]), s;
42
+ const [e, i] = n.useState(t), l = n.useRef(e), o = n.useRef(u);
43
+ return E(() => {
44
+ o.current = u;
45
+ }, [u]), n.useEffect(() => {
46
+ var r;
47
+ l.current !== e && ((r = o.current) == null || r.call(o, e), l.current = e);
48
+ }, [e, l]), [e, i, o];
49
+ }
50
+ function R(t) {
51
+ return typeof t == "function";
30
52
  }
31
53
  export {
32
- R as useControllableState
54
+ y as useControllableState
33
55
  };
@@ -0,0 +1,16 @@
1
+ "use client";
2
+ import { s as e } from "../../../../_virtual/index.js";
3
+ function s() {
4
+ return e.useSyncExternalStore(
5
+ r,
6
+ () => !0,
7
+ () => !1
8
+ );
9
+ }
10
+ function r() {
11
+ return () => {
12
+ };
13
+ }
14
+ export {
15
+ s as useIsHydrated
16
+ };
@@ -2,32 +2,32 @@
2
2
  import * as a from "react";
3
3
  import { Primitive as o } from "../../react-primitive/dist/index.js";
4
4
  import { jsx as t } from "react/jsx-runtime";
5
- var d = "VisuallyHidden", e = a.forwardRef(
5
+ var d = Object.freeze({
6
+ // See: https://github.com/twbs/bootstrap/blob/main/scss/mixins/_visually-hidden.scss
7
+ position: "absolute",
8
+ border: 0,
9
+ width: 1,
10
+ height: 1,
11
+ padding: 0,
12
+ margin: -1,
13
+ overflow: "hidden",
14
+ clip: "rect(0, 0, 0, 0)",
15
+ whiteSpace: "nowrap",
16
+ wordWrap: "normal"
17
+ }), l = "VisuallyHidden", e = a.forwardRef(
6
18
  (r, i) => /* @__PURE__ */ t(
7
19
  o.span,
8
20
  {
9
21
  ...r,
10
22
  ref: i,
11
- style: {
12
- // See: https://github.com/twbs/bootstrap/blob/main/scss/mixins/_visually-hidden.scss
13
- position: "absolute",
14
- border: 0,
15
- width: 1,
16
- height: 1,
17
- padding: 0,
18
- margin: -1,
19
- overflow: "hidden",
20
- clip: "rect(0, 0, 0, 0)",
21
- whiteSpace: "nowrap",
22
- wordWrap: "normal",
23
- ...r.style
24
- }
23
+ style: { ...d, ...r.style }
25
24
  }
26
25
  )
27
26
  );
28
- e.displayName = d;
29
- var m = e;
27
+ e.displayName = l;
28
+ var p = e;
30
29
  export {
31
- m as Root,
30
+ p as Root,
31
+ d as VISUALLY_HIDDEN_STYLES,
32
32
  e as VisuallyHidden
33
33
  };
@@ -0,0 +1,36 @@
1
+ "use client";
2
+ import * as r from "react";
3
+ import { flushSync as c } from "react-dom";
4
+ import { Virtualizer as f, elementScroll as i, observeElementOffset as m, observeElementRect as d } from "../../../virtual-core/dist/esm/index.js";
5
+ import { defaultKeyExtractor as R, defaultRangeExtractor as g, measureElement as z } from "../../../virtual-core/dist/esm/index.js";
6
+ const l = typeof document < "u" ? r.useLayoutEffect : r.useEffect;
7
+ function p(e) {
8
+ const n = r.useReducer(() => ({}), {})[1], o = {
9
+ ...e,
10
+ onChange: (a, u) => {
11
+ var s;
12
+ u ? c(n) : n(), (s = e.onChange) == null || s.call(e, a, u);
13
+ }
14
+ }, [t] = r.useState(
15
+ () => new f(o)
16
+ );
17
+ return t.setOptions(o), l(() => t._didMount(), []), l(() => t._willUpdate()), t;
18
+ }
19
+ function h(e) {
20
+ return p({
21
+ observeElementRect: d,
22
+ observeElementOffset: m,
23
+ scrollToFn: i,
24
+ ...e
25
+ });
26
+ }
27
+ export {
28
+ f as Virtualizer,
29
+ R as defaultKeyExtractor,
30
+ g as defaultRangeExtractor,
31
+ i as elementScroll,
32
+ z as measureElement,
33
+ m as observeElementOffset,
34
+ d as observeElementRect,
35
+ h as useVirtualizer
36
+ };