@drjoshcsimmons/scl 0.2.1 → 0.2.3

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 (118) hide show
  1. package/dist/components/ui/terminal-textarea/terminal-textarea.d.ts +1 -7
  2. package/dist/components/ui/terminal-textarea/terminal-textarea.d.ts.map +1 -1
  3. package/dist/index100.js +180 -3
  4. package/dist/index101.js +9 -30
  5. package/dist/index102.js +30 -13
  6. package/dist/index103.js +44 -646
  7. package/dist/index104.js +4 -30
  8. package/dist/index105.js +47 -3
  9. package/dist/index106.js +5 -47
  10. package/dist/index107.js +647 -27
  11. package/dist/index108.js +30 -55
  12. package/dist/index109.js +1 -1
  13. package/dist/index11.js +2 -2
  14. package/dist/index110.js +12 -45
  15. package/dist/index111.js +24 -8
  16. package/dist/index112.js +8 -14
  17. package/dist/index113.js +6 -48
  18. package/dist/index114.js +1 -1
  19. package/dist/index115.js +47 -11
  20. package/dist/index116.js +10 -204
  21. package/dist/index117.js +204 -20
  22. package/dist/index118.js +21 -399
  23. package/dist/index119.js +400 -6
  24. package/dist/index12.js +1 -1
  25. package/dist/index120.js +21 -48
  26. package/dist/index121.js +3 -15
  27. package/dist/index122.js +32 -3
  28. package/dist/index123.js +12 -32
  29. package/dist/index124.js +48 -18
  30. package/dist/index125.js +2 -25
  31. package/dist/index126.js +53 -29
  32. package/dist/index127.js +65 -5
  33. package/dist/index128.js +25 -2
  34. package/dist/index129.js +29 -53
  35. package/dist/index13.js +2 -2
  36. package/dist/index130.js +5 -65
  37. package/dist/index136.js +1 -1
  38. package/dist/index137.js +1 -1
  39. package/dist/index14.js +2 -2
  40. package/dist/index141.js +1 -1
  41. package/dist/index15.js +2 -2
  42. package/dist/index17.js +4 -4
  43. package/dist/index18.js +2 -2
  44. package/dist/index20.js +2 -2
  45. package/dist/index21.js +1 -1
  46. package/dist/index22.js +1 -1
  47. package/dist/index23.js +2 -2
  48. package/dist/index24.js +1 -1
  49. package/dist/index25.js +4 -4
  50. package/dist/index26.js +1 -1
  51. package/dist/index27.js +3 -3
  52. package/dist/index29.js +1 -1
  53. package/dist/index31.js +1 -1
  54. package/dist/index33.js +1 -1
  55. package/dist/index34.js +18 -16
  56. package/dist/index36.js +2 -2
  57. package/dist/index37.js +1 -1
  58. package/dist/index4.js +2 -2
  59. package/dist/index45.js +33 -237
  60. package/dist/index46.js +73 -11
  61. package/dist/index47.js +60 -33
  62. package/dist/index48.js +210 -214
  63. package/dist/index49.js +11 -18
  64. package/dist/index5.js +1 -1
  65. package/dist/index50.js +225 -109
  66. package/dist/index51.js +82 -31
  67. package/dist/index52.js +247 -66
  68. package/dist/index53.js +100 -218
  69. package/dist/index54.js +161 -11
  70. package/dist/index55.js +330 -54
  71. package/dist/index56.js +254 -248
  72. package/dist/index57.js +12 -225
  73. package/dist/index58.js +860 -9
  74. package/dist/index59.js +3 -5
  75. package/dist/index6.js +1 -1
  76. package/dist/index60.js +9 -130
  77. package/dist/index61.js +221 -18
  78. package/dist/index62.js +11 -860
  79. package/dist/index63.js +5 -3
  80. package/dist/index64.js +12 -82
  81. package/dist/index65.js +507 -237
  82. package/dist/index66.js +22 -12
  83. package/dist/index67.js +298 -237
  84. package/dist/index68.js +12 -118
  85. package/dist/index69.js +18 -530
  86. package/dist/index7.js +1 -1
  87. package/dist/index70.js +31 -12
  88. package/dist/index71.js +210 -409
  89. package/dist/index72.js +407 -308
  90. package/dist/index73.js +237 -298
  91. package/dist/index74.js +125 -12
  92. package/dist/index75.js +112 -143
  93. package/dist/index76.js +40 -53
  94. package/dist/index77.js +10 -45
  95. package/dist/index78.js +4 -27
  96. package/dist/index79.js +30 -7
  97. package/dist/index8.js +1 -1
  98. package/dist/index80.js +10 -49
  99. package/dist/index81.js +67 -33
  100. package/dist/index82.js +45 -10
  101. package/dist/index83.js +26 -7
  102. package/dist/index84.js +5 -123
  103. package/dist/index85.js +50 -13
  104. package/dist/index86.js +32 -133
  105. package/dist/index87.js +10 -218
  106. package/dist/index88.js +8 -14
  107. package/dist/index89.js +120 -64
  108. package/dist/index9.js +2 -2
  109. package/dist/index90.js +13 -46
  110. package/dist/index91.js +133 -48
  111. package/dist/index92.js +218 -8
  112. package/dist/index93.js +14 -30
  113. package/dist/index94.js +68 -8
  114. package/dist/index95.js +43 -176
  115. package/dist/index96.js +50 -25
  116. package/dist/index97.js +9 -6
  117. package/dist/index99.js +30 -11
  118. package/package.json +1 -1
package/dist/index54.js CHANGED
@@ -1,13 +1,163 @@
1
- import c from "./index121.js";
2
- /**
3
- * @license lucide-react v0.460.0 - ISC
4
- *
5
- * This source code is licensed under the ISC license.
6
- * See the LICENSE file in the root directory of this source tree.
7
- */
8
- const r = c("Circle", [
9
- ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }]
10
- ]);
1
+ import * as v from "react";
2
+ import { composeEventHandlers as g } from "./index84.js";
3
+ import { createContextScope as x } from "./index81.js";
4
+ import { createRovingFocusGroupScope as C, Root as E, Item as F } from "./index100.js";
5
+ import { Presence as w } from "./index94.js";
6
+ import { Primitive as b } from "./index86.js";
7
+ import { useDirection as D } from "./index88.js";
8
+ import { useControllableState as V } from "./index85.js";
9
+ import { useId as G } from "./index87.js";
10
+ import { jsx as l } from "react/jsx-runtime";
11
+ var p = "Tabs", [L] = x(p, [
12
+ C
13
+ ]), h = C(), [$, T] = L(p), I = v.forwardRef(
14
+ (e, r) => {
15
+ const {
16
+ __scopeTabs: s,
17
+ value: t,
18
+ onValueChange: n,
19
+ defaultValue: c,
20
+ orientation: o = "horizontal",
21
+ dir: d,
22
+ activationMode: f = "automatic",
23
+ ...m
24
+ } = e, i = D(d), [a, u] = V({
25
+ prop: t,
26
+ onChange: n,
27
+ defaultProp: c ?? "",
28
+ caller: p
29
+ });
30
+ return /* @__PURE__ */ l(
31
+ $,
32
+ {
33
+ scope: s,
34
+ baseId: G(),
35
+ value: a,
36
+ onValueChange: u,
37
+ orientation: o,
38
+ dir: i,
39
+ activationMode: f,
40
+ children: /* @__PURE__ */ l(
41
+ b.div,
42
+ {
43
+ dir: i,
44
+ "data-orientation": o,
45
+ ...m,
46
+ ref: r
47
+ }
48
+ )
49
+ }
50
+ );
51
+ }
52
+ );
53
+ I.displayName = p;
54
+ var R = "TabsList", _ = v.forwardRef(
55
+ (e, r) => {
56
+ const { __scopeTabs: s, loop: t = !0, ...n } = e, c = T(R, s), o = h(s);
57
+ return /* @__PURE__ */ l(
58
+ E,
59
+ {
60
+ asChild: !0,
61
+ ...o,
62
+ orientation: c.orientation,
63
+ dir: c.dir,
64
+ loop: t,
65
+ children: /* @__PURE__ */ l(
66
+ b.div,
67
+ {
68
+ role: "tablist",
69
+ "aria-orientation": c.orientation,
70
+ ...n,
71
+ ref: r
72
+ }
73
+ )
74
+ }
75
+ );
76
+ }
77
+ );
78
+ _.displayName = R;
79
+ var y = "TabsTrigger", A = v.forwardRef(
80
+ (e, r) => {
81
+ const { __scopeTabs: s, value: t, disabled: n = !1, ...c } = e, o = T(y, s), d = h(s), f = P(o.baseId, t), m = S(o.baseId, t), i = t === o.value;
82
+ return /* @__PURE__ */ l(
83
+ F,
84
+ {
85
+ asChild: !0,
86
+ ...d,
87
+ focusable: !n,
88
+ active: i,
89
+ children: /* @__PURE__ */ l(
90
+ b.button,
91
+ {
92
+ type: "button",
93
+ role: "tab",
94
+ "aria-selected": i,
95
+ "aria-controls": m,
96
+ "data-state": i ? "active" : "inactive",
97
+ "data-disabled": n ? "" : void 0,
98
+ disabled: n,
99
+ id: f,
100
+ ...c,
101
+ ref: r,
102
+ onMouseDown: g(e.onMouseDown, (a) => {
103
+ !n && a.button === 0 && a.ctrlKey === !1 ? o.onValueChange(t) : a.preventDefault();
104
+ }),
105
+ onKeyDown: g(e.onKeyDown, (a) => {
106
+ [" ", "Enter"].includes(a.key) && o.onValueChange(t);
107
+ }),
108
+ onFocus: g(e.onFocus, () => {
109
+ const a = o.activationMode !== "manual";
110
+ !i && !n && a && o.onValueChange(t);
111
+ })
112
+ }
113
+ )
114
+ }
115
+ );
116
+ }
117
+ );
118
+ A.displayName = y;
119
+ var M = "TabsContent", N = v.forwardRef(
120
+ (e, r) => {
121
+ const { __scopeTabs: s, value: t, forceMount: n, children: c, ...o } = e, d = T(M, s), f = P(d.baseId, t), m = S(d.baseId, t), i = t === d.value, a = v.useRef(i);
122
+ return v.useEffect(() => {
123
+ const u = requestAnimationFrame(() => a.current = !1);
124
+ return () => cancelAnimationFrame(u);
125
+ }, []), /* @__PURE__ */ l(w, { present: n || i, children: ({ present: u }) => /* @__PURE__ */ l(
126
+ b.div,
127
+ {
128
+ "data-state": i ? "active" : "inactive",
129
+ "data-orientation": d.orientation,
130
+ role: "tabpanel",
131
+ "aria-labelledby": f,
132
+ hidden: !u,
133
+ id: m,
134
+ tabIndex: 0,
135
+ ...o,
136
+ ref: r,
137
+ style: {
138
+ ...e.style,
139
+ animationDuration: a.current ? "0s" : void 0
140
+ },
141
+ children: u && c
142
+ }
143
+ ) });
144
+ }
145
+ );
146
+ N.displayName = M;
147
+ function P(e, r) {
148
+ return `${e}-trigger-${r}`;
149
+ }
150
+ function S(e, r) {
151
+ return `${e}-content-${r}`;
152
+ }
153
+ var Q = I, U = _, W = A, X = N;
11
154
  export {
12
- r as default
155
+ X as Content,
156
+ U as List,
157
+ Q as Root,
158
+ I as Tabs,
159
+ N as TabsContent,
160
+ _ as TabsList,
161
+ A as TabsTrigger,
162
+ W as Trigger
13
163
  };
package/dist/index55.js CHANGED
@@ -1,62 +1,338 @@
1
- import * as o from "react";
2
- import { composeRefs as S } from "./index78.js";
3
- import { jsx as y } from "react/jsx-runtime";
4
- var E = Symbol.for("react.lazy"), p = o[" use ".trim().toString()];
5
- function g(t) {
6
- return typeof t == "object" && t !== null && "then" in t;
7
- }
8
- function d(t) {
9
- return t != null && typeof t == "object" && "$$typeof" in t && t.$$typeof === E && "_payload" in t && g(t._payload);
10
- }
11
- // @__NO_SIDE_EFFECTS__
12
- function C(t) {
13
- const n = /* @__PURE__ */ R(t), i = o.forwardRef((e, r) => {
14
- let { children: l, ...a } = e;
15
- d(l) && typeof p == "function" && (l = p(l._payload));
16
- const s = o.Children.toArray(l), f = s.find(b);
17
- if (f) {
18
- const c = f.props.children, m = s.map((u) => u === f ? o.Children.count(c) > 1 ? o.Children.only(null) : o.isValidElement(c) ? c.props.children : null : u);
19
- return /* @__PURE__ */ y(n, { ...a, ref: r, children: o.isValidElement(c) ? o.cloneElement(c, void 0, m) : null });
1
+ import * as s from "react";
2
+ import { composeEventHandlers as g } from "./index84.js";
3
+ import { useComposedRefs as N } from "./index83.js";
4
+ import { createContextScope as K } from "./index81.js";
5
+ import { DismissableLayer as W } from "./index89.js";
6
+ import { useId as $ } from "./index87.js";
7
+ import { createPopperScope as S, Root as z, Anchor as J, Content as Q, Arrow as Z } from "./index92.js";
8
+ import { Portal as ee } from "./index93.js";
9
+ import { Presence as G } from "./index94.js";
10
+ import { Primitive as te } from "./index86.js";
11
+ import { createSlottable as oe } from "./index101.js";
12
+ import { useControllableState as re } from "./index85.js";
13
+ import { Root as ne } from "./index102.js";
14
+ import { jsx as f, jsxs as se } from "react/jsx-runtime";
15
+ var [D] = K("Tooltip", [
16
+ S
17
+ ]), O = S(), j = "TooltipProvider", ie = 700, L = "tooltip.open", [ae, k] = D(j), F = (t) => {
18
+ const {
19
+ __scopeTooltip: o,
20
+ delayDuration: e = ie,
21
+ skipDelayDuration: r = 300,
22
+ disableHoverableContent: n = !1,
23
+ children: a
24
+ } = t, l = s.useRef(!0), v = s.useRef(!1), i = s.useRef(0);
25
+ return s.useEffect(() => {
26
+ const p = i.current;
27
+ return () => window.clearTimeout(p);
28
+ }, []), /* @__PURE__ */ f(
29
+ ae,
30
+ {
31
+ scope: o,
32
+ isOpenDelayedRef: l,
33
+ delayDuration: e,
34
+ onOpen: s.useCallback(() => {
35
+ window.clearTimeout(i.current), l.current = !1;
36
+ }, []),
37
+ onClose: s.useCallback(() => {
38
+ window.clearTimeout(i.current), i.current = window.setTimeout(
39
+ () => l.current = !0,
40
+ r
41
+ );
42
+ }, [r]),
43
+ isPointerInTransitRef: v,
44
+ onPointerInTransitChange: s.useCallback((p) => {
45
+ v.current = p;
46
+ }, []),
47
+ disableHoverableContent: n,
48
+ children: a
20
49
  }
21
- return /* @__PURE__ */ y(n, { ...a, ref: r, children: l });
22
- });
23
- return i.displayName = `${t}.Slot`, i;
24
- }
25
- var V = /* @__PURE__ */ C("Slot");
26
- // @__NO_SIDE_EFFECTS__
27
- function R(t) {
28
- const n = o.forwardRef((i, e) => {
29
- let { children: r, ...l } = i;
30
- if (d(r) && typeof p == "function" && (r = p(r._payload)), o.isValidElement(r)) {
31
- const a = P(r), s = h(l, r.props);
32
- return r.type !== o.Fragment && (s.ref = e ? S(e, a) : a), o.cloneElement(r, s);
50
+ );
51
+ };
52
+ F.displayName = j;
53
+ var R = "Tooltip", [le, _] = D(R), B = (t) => {
54
+ const {
55
+ __scopeTooltip: o,
56
+ children: e,
57
+ open: r,
58
+ defaultOpen: n,
59
+ onOpenChange: a,
60
+ disableHoverableContent: l,
61
+ delayDuration: v
62
+ } = t, i = k(R, t.__scopeTooltip), p = O(o), [c, d] = s.useState(null), h = $(), u = s.useRef(0), m = l ?? i.disableHoverableContent, y = v ?? i.delayDuration, T = s.useRef(!1), [x, C] = re({
63
+ prop: r,
64
+ defaultProp: n ?? !1,
65
+ onChange: (H) => {
66
+ H ? (i.onOpen(), document.dispatchEvent(new CustomEvent(L))) : i.onClose(), a == null || a(H);
67
+ },
68
+ caller: R
69
+ }), 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, C(!0);
71
+ }, [C]), E = s.useCallback(() => {
72
+ window.clearTimeout(u.current), u.current = 0, C(!1);
73
+ }, [C]), I = s.useCallback(() => {
74
+ window.clearTimeout(u.current), u.current = window.setTimeout(() => {
75
+ T.current = !0, C(!0), u.current = 0;
76
+ }, y);
77
+ }, [y, C]);
78
+ return s.useEffect(() => () => {
79
+ u.current && (window.clearTimeout(u.current), u.current = 0);
80
+ }, []), /* @__PURE__ */ f(z, { ...p, children: /* @__PURE__ */ f(
81
+ le,
82
+ {
83
+ scope: o,
84
+ contentId: h,
85
+ open: x,
86
+ stateAttribute: w,
87
+ trigger: c,
88
+ onTriggerChange: d,
89
+ onTriggerEnter: s.useCallback(() => {
90
+ i.isOpenDelayedRef.current ? I() : P();
91
+ }, [i.isOpenDelayedRef, I, P]),
92
+ onTriggerLeave: s.useCallback(() => {
93
+ m ? E() : (window.clearTimeout(u.current), u.current = 0);
94
+ }, [E, m]),
95
+ onOpen: P,
96
+ onClose: E,
97
+ disableHoverableContent: m,
98
+ children: e
33
99
  }
34
- return o.Children.count(r) > 1 ? o.Children.only(null) : null;
35
- });
36
- return n.displayName = `${t}.SlotClone`, n;
100
+ ) });
101
+ };
102
+ B.displayName = R;
103
+ var A = "TooltipTrigger", U = s.forwardRef(
104
+ (t, o) => {
105
+ const { __scopeTooltip: e, ...r } = t, n = _(A, e), a = k(A, e), l = O(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, []);
106
+ return s.useEffect(() => () => document.removeEventListener("pointerup", d), [d]), /* @__PURE__ */ f(J, { asChild: !0, ...l, children: /* @__PURE__ */ f(
107
+ te.button,
108
+ {
109
+ "aria-describedby": n.open ? n.contentId : void 0,
110
+ "data-state": n.stateAttribute,
111
+ ...r,
112
+ ref: i,
113
+ onPointerMove: g(t.onPointerMove, (h) => {
114
+ h.pointerType !== "touch" && !c.current && !a.isPointerInTransitRef.current && (n.onTriggerEnter(), c.current = !0);
115
+ }),
116
+ onPointerLeave: g(t.onPointerLeave, () => {
117
+ n.onTriggerLeave(), c.current = !1;
118
+ }),
119
+ onPointerDown: g(t.onPointerDown, () => {
120
+ n.open && n.onClose(), p.current = !0, document.addEventListener("pointerup", d, { once: !0 });
121
+ }),
122
+ onFocus: g(t.onFocus, () => {
123
+ p.current || n.onOpen();
124
+ }),
125
+ onBlur: g(t.onBlur, n.onClose),
126
+ onClick: g(t.onClick, n.onClose)
127
+ }
128
+ ) });
129
+ }
130
+ );
131
+ U.displayName = A;
132
+ var M = "TooltipPortal", [ce, ue] = D(M, {
133
+ forceMount: void 0
134
+ }), V = (t) => {
135
+ const { __scopeTooltip: o, forceMount: e, children: r, container: n } = t, a = _(M, o);
136
+ return /* @__PURE__ */ f(ce, { scope: o, forceMount: e, children: /* @__PURE__ */ f(G, { present: e || a.open, children: /* @__PURE__ */ f(ee, { asChild: !0, container: n, children: r }) }) });
137
+ };
138
+ V.displayName = M;
139
+ var b = "TooltipContent", Y = s.forwardRef(
140
+ (t, o) => {
141
+ const e = ue(b, t.__scopeTooltip), { forceMount: r = e.forceMount, side: n = "top", ...a } = t, l = _(b, t.__scopeTooltip);
142
+ return /* @__PURE__ */ f(G, { present: r || l.open, children: l.disableHoverableContent ? /* @__PURE__ */ f(q, { side: n, ...a, ref: o }) : /* @__PURE__ */ f(pe, { side: n, ...a, ref: o }) });
143
+ }
144
+ ), pe = s.forwardRef((t, o) => {
145
+ 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(() => {
146
+ v(null), d(!1);
147
+ }, [d]), u = s.useCallback(
148
+ (m, y) => {
149
+ 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]);
150
+ v(E), d(!0);
151
+ },
152
+ [d]
153
+ );
154
+ return s.useEffect(() => () => h(), [h]), s.useEffect(() => {
155
+ if (i && c) {
156
+ const m = (T) => u(T, c), y = (T) => u(T, i);
157
+ return i.addEventListener("pointerleave", m), c.addEventListener("pointerleave", y), () => {
158
+ i.removeEventListener("pointerleave", m), c.removeEventListener("pointerleave", y);
159
+ };
160
+ }
161
+ }, [i, c, u, h]), s.useEffect(() => {
162
+ if (l) {
163
+ const m = (y) => {
164
+ 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);
165
+ C ? h() : w && (h(), p());
166
+ };
167
+ return document.addEventListener("pointermove", m), () => document.removeEventListener("pointermove", m);
168
+ }
169
+ }, [i, c, l, p, h]), /* @__PURE__ */ f(q, { ...t, ref: a });
170
+ }), [de, fe] = D(R, { isInside: !1 }), ve = oe("TooltipContent"), q = s.forwardRef(
171
+ (t, o) => {
172
+ const {
173
+ __scopeTooltip: e,
174
+ children: r,
175
+ "aria-label": n,
176
+ onEscapeKeyDown: a,
177
+ onPointerDownOutside: l,
178
+ ...v
179
+ } = t, i = _(b, e), p = O(e), { onClose: c } = i;
180
+ return s.useEffect(() => (document.addEventListener(L, c), () => document.removeEventListener(L, c)), [c]), s.useEffect(() => {
181
+ if (i.trigger) {
182
+ const d = (h) => {
183
+ const u = h.target;
184
+ u != null && u.contains(i.trigger) && c();
185
+ };
186
+ return window.addEventListener("scroll", d, { capture: !0 }), () => window.removeEventListener("scroll", d, { capture: !0 });
187
+ }
188
+ }, [i.trigger, c]), /* @__PURE__ */ f(
189
+ W,
190
+ {
191
+ asChild: !0,
192
+ disableOutsidePointerEvents: !1,
193
+ onEscapeKeyDown: a,
194
+ onPointerDownOutside: l,
195
+ onFocusOutside: (d) => d.preventDefault(),
196
+ onDismiss: c,
197
+ children: /* @__PURE__ */ se(
198
+ Q,
199
+ {
200
+ "data-state": i.stateAttribute,
201
+ ...p,
202
+ ...v,
203
+ ref: o,
204
+ style: {
205
+ ...v.style,
206
+ "--radix-tooltip-content-transform-origin": "var(--radix-popper-transform-origin)",
207
+ "--radix-tooltip-content-available-width": "var(--radix-popper-available-width)",
208
+ "--radix-tooltip-content-available-height": "var(--radix-popper-available-height)",
209
+ "--radix-tooltip-trigger-width": "var(--radix-popper-anchor-width)",
210
+ "--radix-tooltip-trigger-height": "var(--radix-popper-anchor-height)"
211
+ },
212
+ children: [
213
+ /* @__PURE__ */ f(ve, { children: r }),
214
+ /* @__PURE__ */ f(de, { scope: e, isInside: !0, children: /* @__PURE__ */ f(ne, { id: i.contentId, role: "tooltip", children: n || r }) })
215
+ ]
216
+ }
217
+ )
218
+ }
219
+ );
220
+ }
221
+ );
222
+ Y.displayName = b;
223
+ var X = "TooltipArrow", he = s.forwardRef(
224
+ (t, o) => {
225
+ const { __scopeTooltip: e, ...r } = t, n = O(e);
226
+ return fe(
227
+ X,
228
+ e
229
+ ).isInside ? null : /* @__PURE__ */ f(Z, { ...n, ...r, ref: o });
230
+ }
231
+ );
232
+ he.displayName = X;
233
+ function me(t, o) {
234
+ const e = Math.abs(o.top - t.y), r = Math.abs(o.bottom - t.y), n = Math.abs(o.right - t.x), a = Math.abs(o.left - t.x);
235
+ switch (Math.min(e, r, n, a)) {
236
+ case a:
237
+ return "left";
238
+ case n:
239
+ return "right";
240
+ case e:
241
+ return "top";
242
+ case r:
243
+ return "bottom";
244
+ default:
245
+ throw new Error("unreachable");
246
+ }
247
+ }
248
+ function Te(t, o, e = 5) {
249
+ const r = [];
250
+ switch (o) {
251
+ case "top":
252
+ r.push(
253
+ { x: t.x - e, y: t.y + e },
254
+ { x: t.x + e, y: t.y + e }
255
+ );
256
+ break;
257
+ case "bottom":
258
+ r.push(
259
+ { x: t.x - e, y: t.y - e },
260
+ { x: t.x + e, y: t.y - e }
261
+ );
262
+ break;
263
+ case "left":
264
+ r.push(
265
+ { x: t.x + e, y: t.y - e },
266
+ { x: t.x + e, y: t.y + e }
267
+ );
268
+ break;
269
+ case "right":
270
+ r.push(
271
+ { x: t.x - e, y: t.y - e },
272
+ { x: t.x - e, y: t.y + e }
273
+ );
274
+ break;
275
+ }
276
+ return r;
277
+ }
278
+ function ye(t) {
279
+ const { top: o, right: e, bottom: r, left: n } = t;
280
+ return [
281
+ { x: n, y: o },
282
+ { x: e, y: o },
283
+ { x: e, y: r },
284
+ { x: n, y: r }
285
+ ];
37
286
  }
38
- var _ = Symbol("radix.slottable");
39
- function b(t) {
40
- return o.isValidElement(t) && typeof t.type == "function" && "__radixId" in t.type && t.type.__radixId === _;
287
+ function Ce(t, o) {
288
+ const { x: e, y: r } = t;
289
+ let n = !1;
290
+ for (let a = 0, l = o.length - 1; a < o.length; l = a++) {
291
+ const v = o[a], i = o[l], p = v.x, c = v.y, d = i.x, h = i.y;
292
+ c > r != h > r && e < (d - p) * (r - c) / (h - c) + p && (n = !n);
293
+ }
294
+ return n;
41
295
  }
42
- function h(t, n) {
43
- const i = { ...n };
44
- for (const e in n) {
45
- const r = t[e], l = n[e];
46
- /^on[A-Z]/.test(e) ? r && l ? i[e] = (...s) => {
47
- const f = l(...s);
48
- return r(...s), f;
49
- } : r && (i[e] = r) : e === "style" ? i[e] = { ...r, ...l } : e === "className" && (i[e] = [r, l].filter(Boolean).join(" "));
50
- }
51
- return { ...t, ...i };
296
+ function xe(t) {
297
+ const o = t.slice();
298
+ return o.sort((e, r) => e.x < r.x ? -1 : e.x > r.x ? 1 : e.y < r.y ? -1 : e.y > r.y ? 1 : 0), ge(o);
52
299
  }
53
- function P(t) {
54
- var e, r;
55
- let n = (e = Object.getOwnPropertyDescriptor(t.props, "ref")) == null ? void 0 : e.get, i = n && "isReactWarning" in n && n.isReactWarning;
56
- return i ? t.ref : (n = (r = Object.getOwnPropertyDescriptor(t, "ref")) == null ? void 0 : r.get, i = n && "isReactWarning" in n && n.isReactWarning, i ? t.props.ref : t.props.ref || t.ref);
300
+ function ge(t) {
301
+ if (t.length <= 1) return t.slice();
302
+ const o = [];
303
+ for (let r = 0; r < t.length; r++) {
304
+ const n = t[r];
305
+ for (; o.length >= 2; ) {
306
+ const a = o[o.length - 1], l = o[o.length - 2];
307
+ if ((a.x - l.x) * (n.y - l.y) >= (a.y - l.y) * (n.x - l.x)) o.pop();
308
+ else break;
309
+ }
310
+ o.push(n);
311
+ }
312
+ o.pop();
313
+ const e = [];
314
+ for (let r = t.length - 1; r >= 0; r--) {
315
+ const n = t[r];
316
+ for (; e.length >= 2; ) {
317
+ const a = e[e.length - 1], l = e[e.length - 2];
318
+ if ((a.x - l.x) * (n.y - l.y) >= (a.y - l.y) * (n.x - l.x)) e.pop();
319
+ else break;
320
+ }
321
+ e.push(n);
322
+ }
323
+ 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);
57
324
  }
325
+ var He = F, Ne = B, Se = U, Ge = V, je = Y;
58
326
  export {
59
- V as Root,
60
- V as Slot,
61
- C as createSlot
327
+ je as Content,
328
+ Ge as Portal,
329
+ He as Provider,
330
+ Ne as Root,
331
+ B as Tooltip,
332
+ he as TooltipArrow,
333
+ Y as TooltipContent,
334
+ V as TooltipPortal,
335
+ F as TooltipProvider,
336
+ U as TooltipTrigger,
337
+ Se as Trigger
62
338
  };