@spear-ai/spectral 1.4.5 → 1.4.6

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.
package/dist/Tooltip.js CHANGED
@@ -1,93 +1,94 @@
1
1
  "use client";
2
2
  import "./styles/main.css";
3
- import { jsx as u, jsxs as H } from "react/jsx-runtime";
3
+ import { jsx as d, jsxs as S } from "react/jsx-runtime";
4
4
  import * as a from "react";
5
- import { c as K, u as W, a as S, P as J, b as C, f as Q } from "./index-BhufZRa2.js";
6
- import { P as Z, D as ee } from "./index-B2oBi8ng.js";
7
- import { u as te } from "./index-CVSxKOPp.js";
8
- import { c as G, R as oe, a as re, A as ne, C as ae } from "./index-NzygPVvJ.js";
9
- import { P as j } from "./index-6Abv_Flm.js";
10
- import { R as se } from "./index-CGALWSq_.js";
11
- import { cn as ie } from "./utils/twUtils.js";
12
- var [O] = K("Tooltip", [
13
- G
14
- ]), D = G(), F = "TooltipProvider", le = 700, A = "tooltip.open", [ce, k] = O(F), z = (e) => {
5
+ import { c as J, u as Q, a as G, P as Z, b as T, f as ee } from "./index-BhufZRa2.js";
6
+ import { P as te, D as oe } from "./index-B2oBi8ng.js";
7
+ import { u as re } from "./index-CVSxKOPp.js";
8
+ import { c as j, R as ne, a as ae, A as se, C as ie } from "./index-NzygPVvJ.js";
9
+ import { P as V } from "./index-6Abv_Flm.js";
10
+ import { R as le } from "./index-CGALWSq_.js";
11
+ import { cn as H } from "./utils/twUtils.js";
12
+ import { c as F } from "./index-D29mdTf5.js";
13
+ var [O] = J("Tooltip", [
14
+ j
15
+ ]), A = j(), z = "TooltipProvider", ce = 700, D = "tooltip.open", [de, k] = O(z), $ = (e) => {
15
16
  const {
16
17
  __scopeTooltip: o,
17
- delayDuration: t = le,
18
+ delayDuration: t = ce,
18
19
  skipDelayDuration: r = 300,
19
20
  disableHoverableContent: n = !1,
20
21
  children: l
21
- } = e, i = a.useRef(!0), v = a.useRef(!1), s = a.useRef(0);
22
+ } = e, s = a.useRef(!0), v = a.useRef(!1), i = a.useRef(0);
22
23
  return a.useEffect(() => {
23
- const d = s.current;
24
- return () => window.clearTimeout(d);
25
- }, []), /* @__PURE__ */ u(
26
- ce,
24
+ const p = i.current;
25
+ return () => window.clearTimeout(p);
26
+ }, []), /* @__PURE__ */ d(
27
+ de,
27
28
  {
28
29
  scope: o,
29
- isOpenDelayedRef: i,
30
+ isOpenDelayedRef: s,
30
31
  delayDuration: t,
31
32
  onOpen: a.useCallback(() => {
32
- window.clearTimeout(s.current), i.current = !1;
33
+ window.clearTimeout(i.current), s.current = !1;
33
34
  }, []),
34
35
  onClose: a.useCallback(() => {
35
- window.clearTimeout(s.current), s.current = window.setTimeout(
36
- () => i.current = !0,
36
+ window.clearTimeout(i.current), i.current = window.setTimeout(
37
+ () => s.current = !0,
37
38
  r
38
39
  );
39
40
  }, [r]),
40
41
  isPointerInTransitRef: v,
41
- onPointerInTransitChange: a.useCallback((d) => {
42
- v.current = d;
42
+ onPointerInTransitChange: a.useCallback((p) => {
43
+ v.current = p;
43
44
  }, []),
44
45
  disableHoverableContent: n,
45
46
  children: l
46
47
  }
47
48
  );
48
49
  };
49
- z.displayName = F;
50
- var R = "Tooltip", [ue, _] = O(R), $ = (e) => {
50
+ $.displayName = z;
51
+ var R = "Tooltip", [ue, _] = O(R), B = (e) => {
51
52
  const {
52
53
  __scopeTooltip: o,
53
54
  children: t,
54
55
  open: r,
55
56
  defaultOpen: n,
56
57
  onOpenChange: l,
57
- disableHoverableContent: i,
58
+ disableHoverableContent: s,
58
59
  delayDuration: v
59
- } = e, s = k(R, e.__scopeTooltip), d = D(o), [c, f] = a.useState(null), h = te(), p = a.useRef(0), m = i ?? s.disableHoverableContent, T = v ?? s.delayDuration, g = a.useRef(!1), [y, x] = W({
60
+ } = e, i = k(R, e.__scopeTooltip), p = A(o), [c, f] = a.useState(null), h = re(), u = a.useRef(0), m = s ?? i.disableHoverableContent, x = v ?? i.delayDuration, g = a.useRef(!1), [b, y] = Q({
60
61
  prop: r,
61
62
  defaultProp: n ?? !1,
62
- onChange: (N) => {
63
- N ? (s.onOpen(), document.dispatchEvent(new CustomEvent(A))) : s.onClose(), l?.(N);
63
+ onChange: (I) => {
64
+ I ? (i.onOpen(), document.dispatchEvent(new CustomEvent(D))) : i.onClose(), l?.(I);
64
65
  },
65
66
  caller: R
66
- }), w = a.useMemo(() => y ? g.current ? "delayed-open" : "instant-open" : "closed", [y]), P = a.useCallback(() => {
67
- window.clearTimeout(p.current), p.current = 0, g.current = !1, x(!0);
68
- }, [x]), E = a.useCallback(() => {
69
- window.clearTimeout(p.current), p.current = 0, x(!1);
70
- }, [x]), I = a.useCallback(() => {
71
- window.clearTimeout(p.current), p.current = window.setTimeout(() => {
72
- g.current = !0, x(!0), p.current = 0;
73
- }, T);
74
- }, [T, x]);
67
+ }), w = a.useMemo(() => b ? g.current ? "delayed-open" : "instant-open" : "closed", [b]), P = a.useCallback(() => {
68
+ window.clearTimeout(u.current), u.current = 0, g.current = !1, y(!0);
69
+ }, [y]), E = a.useCallback(() => {
70
+ window.clearTimeout(u.current), u.current = 0, y(!1);
71
+ }, [y]), N = a.useCallback(() => {
72
+ window.clearTimeout(u.current), u.current = window.setTimeout(() => {
73
+ g.current = !0, y(!0), u.current = 0;
74
+ }, x);
75
+ }, [x, y]);
75
76
  return a.useEffect(() => () => {
76
- p.current && (window.clearTimeout(p.current), p.current = 0);
77
- }, []), /* @__PURE__ */ u(oe, { ...d, children: /* @__PURE__ */ u(
77
+ u.current && (window.clearTimeout(u.current), u.current = 0);
78
+ }, []), /* @__PURE__ */ d(ne, { ...p, children: /* @__PURE__ */ d(
78
79
  ue,
79
80
  {
80
81
  scope: o,
81
82
  contentId: h,
82
- open: y,
83
+ open: b,
83
84
  stateAttribute: w,
84
85
  trigger: c,
85
86
  onTriggerChange: f,
86
87
  onTriggerEnter: a.useCallback(() => {
87
- s.isOpenDelayedRef.current ? I() : P();
88
- }, [s.isOpenDelayedRef, I, P]),
88
+ i.isOpenDelayedRef.current ? N() : P();
89
+ }, [i.isOpenDelayedRef, N, P]),
89
90
  onTriggerLeave: a.useCallback(() => {
90
- m ? E() : (window.clearTimeout(p.current), p.current = 0);
91
+ m ? E() : (window.clearTimeout(u.current), u.current = 0);
91
92
  }, [E, m]),
92
93
  onOpen: P,
93
94
  onClose: E,
@@ -96,105 +97,105 @@ var R = "Tooltip", [ue, _] = O(R), $ = (e) => {
96
97
  }
97
98
  ) });
98
99
  };
99
- $.displayName = R;
100
- var L = "TooltipTrigger", B = a.forwardRef(
100
+ B.displayName = R;
101
+ var L = "TooltipTrigger", U = a.forwardRef(
101
102
  (e, o) => {
102
- const { __scopeTooltip: t, ...r } = e, n = _(L, t), l = k(L, t), i = D(t), v = a.useRef(null), s = S(o, v, n.onTriggerChange), d = a.useRef(!1), c = a.useRef(!1), f = a.useCallback(() => d.current = !1, []);
103
- return a.useEffect(() => () => document.removeEventListener("pointerup", f), [f]), /* @__PURE__ */ u(ne, { asChild: !0, ...i, children: /* @__PURE__ */ u(
104
- J.button,
103
+ const { __scopeTooltip: t, ...r } = e, n = _(L, t), l = k(L, t), s = A(t), v = a.useRef(null), i = G(o, v, n.onTriggerChange), p = a.useRef(!1), c = a.useRef(!1), f = a.useCallback(() => p.current = !1, []);
104
+ return a.useEffect(() => () => document.removeEventListener("pointerup", f), [f]), /* @__PURE__ */ d(se, { asChild: !0, ...s, children: /* @__PURE__ */ d(
105
+ Z.button,
105
106
  {
106
107
  "aria-describedby": n.open ? n.contentId : void 0,
107
108
  "data-state": n.stateAttribute,
108
109
  ...r,
109
- ref: s,
110
- onPointerMove: C(e.onPointerMove, (h) => {
110
+ ref: i,
111
+ onPointerMove: T(e.onPointerMove, (h) => {
111
112
  h.pointerType !== "touch" && !c.current && !l.isPointerInTransitRef.current && (n.onTriggerEnter(), c.current = !0);
112
113
  }),
113
- onPointerLeave: C(e.onPointerLeave, () => {
114
+ onPointerLeave: T(e.onPointerLeave, () => {
114
115
  n.onTriggerLeave(), c.current = !1;
115
116
  }),
116
- onPointerDown: C(e.onPointerDown, () => {
117
- n.open && n.onClose(), d.current = !0, document.addEventListener("pointerup", f, { once: !0 });
117
+ onPointerDown: T(e.onPointerDown, () => {
118
+ n.open && n.onClose(), p.current = !0, document.addEventListener("pointerup", f, { once: !0 });
118
119
  }),
119
- onFocus: C(e.onFocus, () => {
120
- d.current || n.onOpen();
120
+ onFocus: T(e.onFocus, () => {
121
+ p.current || n.onOpen();
121
122
  }),
122
- onBlur: C(e.onBlur, n.onClose),
123
- onClick: C(e.onClick, n.onClose)
123
+ onBlur: T(e.onBlur, n.onClose),
124
+ onClick: T(e.onClick, n.onClose)
124
125
  }
125
126
  ) });
126
127
  }
127
128
  );
128
- B.displayName = L;
129
- var M = "TooltipPortal", [pe, de] = O(M, {
129
+ U.displayName = L;
130
+ var M = "TooltipPortal", [pe, fe] = O(M, {
130
131
  forceMount: void 0
131
- }), U = (e) => {
132
+ }), Y = (e) => {
132
133
  const { __scopeTooltip: o, forceMount: t, children: r, container: n } = e, l = _(M, o);
133
- return /* @__PURE__ */ u(pe, { scope: o, forceMount: t, children: /* @__PURE__ */ u(j, { present: t || l.open, children: /* @__PURE__ */ u(Z, { asChild: !0, container: n, children: r }) }) });
134
+ return /* @__PURE__ */ d(pe, { scope: o, forceMount: t, children: /* @__PURE__ */ d(V, { present: t || l.open, children: /* @__PURE__ */ d(te, { asChild: !0, container: n, children: r }) }) });
134
135
  };
135
- U.displayName = M;
136
- var b = "TooltipContent", V = a.forwardRef(
136
+ Y.displayName = M;
137
+ var C = "TooltipContent", q = a.forwardRef(
137
138
  (e, o) => {
138
- const t = de(b, e.__scopeTooltip), { forceMount: r = t.forceMount, side: n = "top", ...l } = e, i = _(b, e.__scopeTooltip);
139
- return /* @__PURE__ */ u(j, { present: r || i.open, children: i.disableHoverableContent ? /* @__PURE__ */ u(Y, { side: n, ...l, ref: o }) : /* @__PURE__ */ u(fe, { side: n, ...l, ref: o }) });
139
+ const t = fe(C, e.__scopeTooltip), { forceMount: r = t.forceMount, side: n = "top", ...l } = e, s = _(C, e.__scopeTooltip);
140
+ return /* @__PURE__ */ d(V, { present: r || s.open, children: s.disableHoverableContent ? /* @__PURE__ */ d(X, { side: n, ...l, ref: o }) : /* @__PURE__ */ d(ve, { side: n, ...l, ref: o }) });
140
141
  }
141
- ), fe = a.forwardRef((e, o) => {
142
- const t = _(b, e.__scopeTooltip), r = k(b, e.__scopeTooltip), n = a.useRef(null), l = S(o, n), [i, v] = a.useState(null), { trigger: s, onClose: d } = t, c = n.current, { onPointerInTransitChange: f } = r, h = a.useCallback(() => {
142
+ ), ve = a.forwardRef((e, o) => {
143
+ const t = _(C, e.__scopeTooltip), r = k(C, e.__scopeTooltip), n = a.useRef(null), l = G(o, n), [s, v] = a.useState(null), { trigger: i, onClose: p } = t, c = n.current, { onPointerInTransitChange: f } = r, h = a.useCallback(() => {
143
144
  v(null), f(!1);
144
- }, [f]), p = a.useCallback(
145
- (m, T) => {
146
- const g = m.currentTarget, y = { x: m.clientX, y: m.clientY }, x = ge(y, g.getBoundingClientRect()), w = Te(y, x), P = xe(T.getBoundingClientRect()), E = Ce([...w, ...P]);
145
+ }, [f]), u = a.useCallback(
146
+ (m, x) => {
147
+ const g = m.currentTarget, b = { x: m.clientX, y: m.clientY }, y = xe(b, g.getBoundingClientRect()), w = ye(b, y), P = be(x.getBoundingClientRect()), E = Ce([...w, ...P]);
147
148
  v(E), f(!0);
148
149
  },
149
150
  [f]
150
151
  );
151
152
  return a.useEffect(() => () => h(), [h]), a.useEffect(() => {
152
- if (s && c) {
153
- const m = (g) => p(g, c), T = (g) => p(g, s);
154
- return s.addEventListener("pointerleave", m), c.addEventListener("pointerleave", T), () => {
155
- s.removeEventListener("pointerleave", m), c.removeEventListener("pointerleave", T);
153
+ if (i && c) {
154
+ const m = (g) => u(g, c), x = (g) => u(g, i);
155
+ return i.addEventListener("pointerleave", m), c.addEventListener("pointerleave", x), () => {
156
+ i.removeEventListener("pointerleave", m), c.removeEventListener("pointerleave", x);
156
157
  };
157
158
  }
158
- }, [s, c, p, h]), a.useEffect(() => {
159
- if (i) {
160
- const m = (T) => {
161
- const g = T.target, y = { x: T.clientX, y: T.clientY }, x = s?.contains(g) || c?.contains(g), w = !ye(y, i);
162
- x ? h() : w && (h(), d());
159
+ }, [i, c, u, h]), a.useEffect(() => {
160
+ if (s) {
161
+ const m = (x) => {
162
+ const g = x.target, b = { x: x.clientX, y: x.clientY }, y = i?.contains(g) || c?.contains(g), w = !Te(b, s);
163
+ y ? h() : w && (h(), p());
163
164
  };
164
165
  return document.addEventListener("pointermove", m), () => document.removeEventListener("pointermove", m);
165
166
  }
166
- }, [s, c, i, d, h]), /* @__PURE__ */ u(Y, { ...e, ref: l });
167
- }), [ve, he] = O(R, { isInside: !1 }), me = Q("TooltipContent"), Y = a.forwardRef(
167
+ }, [i, c, s, p, h]), /* @__PURE__ */ d(X, { ...e, ref: l });
168
+ }), [he, me] = O(R, { isInside: !1 }), ge = ee("TooltipContent"), X = a.forwardRef(
168
169
  (e, o) => {
169
170
  const {
170
171
  __scopeTooltip: t,
171
172
  children: r,
172
173
  "aria-label": n,
173
174
  onEscapeKeyDown: l,
174
- onPointerDownOutside: i,
175
+ onPointerDownOutside: s,
175
176
  ...v
176
- } = e, s = _(b, t), d = D(t), { onClose: c } = s;
177
- return a.useEffect(() => (document.addEventListener(A, c), () => document.removeEventListener(A, c)), [c]), a.useEffect(() => {
178
- if (s.trigger) {
177
+ } = e, i = _(C, t), p = A(t), { onClose: c } = i;
178
+ return a.useEffect(() => (document.addEventListener(D, c), () => document.removeEventListener(D, c)), [c]), a.useEffect(() => {
179
+ if (i.trigger) {
179
180
  const f = (h) => {
180
- h.target?.contains(s.trigger) && c();
181
+ h.target?.contains(i.trigger) && c();
181
182
  };
182
183
  return window.addEventListener("scroll", f, { capture: !0 }), () => window.removeEventListener("scroll", f, { capture: !0 });
183
184
  }
184
- }, [s.trigger, c]), /* @__PURE__ */ u(
185
- ee,
185
+ }, [i.trigger, c]), /* @__PURE__ */ d(
186
+ oe,
186
187
  {
187
188
  asChild: !0,
188
189
  disableOutsidePointerEvents: !1,
189
190
  onEscapeKeyDown: l,
190
- onPointerDownOutside: i,
191
+ onPointerDownOutside: s,
191
192
  onFocusOutside: (f) => f.preventDefault(),
192
193
  onDismiss: c,
193
- children: /* @__PURE__ */ H(
194
- ae,
194
+ children: /* @__PURE__ */ S(
195
+ ie,
195
196
  {
196
- "data-state": s.stateAttribute,
197
- ...d,
197
+ "data-state": i.stateAttribute,
198
+ ...p,
198
199
  ...v,
199
200
  ref: o,
200
201
  style: {
@@ -206,8 +207,8 @@ var b = "TooltipContent", V = a.forwardRef(
206
207
  "--radix-tooltip-trigger-height": "var(--radix-popper-anchor-height)"
207
208
  },
208
209
  children: [
209
- /* @__PURE__ */ u(me, { children: r }),
210
- /* @__PURE__ */ u(ve, { scope: t, isInside: !0, children: /* @__PURE__ */ u(se, { id: s.contentId, role: "tooltip", children: n || r }) })
210
+ /* @__PURE__ */ d(ge, { children: r }),
211
+ /* @__PURE__ */ d(he, { scope: t, isInside: !0, children: /* @__PURE__ */ d(le, { id: i.contentId, role: "tooltip", children: n || r }) })
211
212
  ]
212
213
  }
213
214
  )
@@ -215,18 +216,18 @@ var b = "TooltipContent", V = a.forwardRef(
215
216
  );
216
217
  }
217
218
  );
218
- V.displayName = b;
219
- var q = "TooltipArrow", X = a.forwardRef(
219
+ q.displayName = C;
220
+ var K = "TooltipArrow", W = a.forwardRef(
220
221
  (e, o) => {
221
- const { __scopeTooltip: t, ...r } = e, n = D(t);
222
- return he(
223
- q,
222
+ const { __scopeTooltip: t, ...r } = e, n = A(t);
223
+ return me(
224
+ K,
224
225
  t
225
- ).isInside ? null : /* @__PURE__ */ u(re, { ...n, ...r, ref: o });
226
+ ).isInside ? null : /* @__PURE__ */ d(ae, { ...n, ...r, ref: o });
226
227
  }
227
228
  );
228
- X.displayName = q;
229
- function ge(e, o) {
229
+ W.displayName = K;
230
+ function xe(e, o) {
230
231
  const t = Math.abs(o.top - e.y), r = Math.abs(o.bottom - e.y), n = Math.abs(o.right - e.x), l = Math.abs(o.left - e.x);
231
232
  switch (Math.min(t, r, n, l)) {
232
233
  case l:
@@ -241,7 +242,7 @@ function ge(e, o) {
241
242
  throw new Error("unreachable");
242
243
  }
243
244
  }
244
- function Te(e, o, t = 5) {
245
+ function ye(e, o, t = 5) {
245
246
  const r = [];
246
247
  switch (o) {
247
248
  case "top":
@@ -271,7 +272,7 @@ function Te(e, o, t = 5) {
271
272
  }
272
273
  return r;
273
274
  }
274
- function xe(e) {
275
+ function be(e) {
275
276
  const { top: o, right: t, bottom: r, left: n } = e;
276
277
  return [
277
278
  { x: n, y: o },
@@ -280,27 +281,27 @@ function xe(e) {
280
281
  { x: n, y: r }
281
282
  ];
282
283
  }
283
- function ye(e, o) {
284
+ function Te(e, o) {
284
285
  const { x: t, y: r } = e;
285
286
  let n = !1;
286
- for (let l = 0, i = o.length - 1; l < o.length; i = l++) {
287
- const v = o[l], s = o[i], d = v.x, c = v.y, f = s.x, h = s.y;
288
- c > r != h > r && t < (f - d) * (r - c) / (h - c) + d && (n = !n);
287
+ for (let l = 0, s = o.length - 1; l < o.length; s = l++) {
288
+ const v = o[l], i = o[s], p = v.x, c = v.y, f = i.x, h = i.y;
289
+ c > r != h > r && t < (f - p) * (r - c) / (h - c) + p && (n = !n);
289
290
  }
290
291
  return n;
291
292
  }
292
293
  function Ce(e) {
293
294
  const o = e.slice();
294
- return o.sort((t, r) => t.x < r.x ? -1 : t.x > r.x ? 1 : t.y < r.y ? -1 : t.y > r.y ? 1 : 0), be(o);
295
+ return o.sort((t, r) => t.x < r.x ? -1 : t.x > r.x ? 1 : t.y < r.y ? -1 : t.y > r.y ? 1 : 0), we(o);
295
296
  }
296
- function be(e) {
297
+ function we(e) {
297
298
  if (e.length <= 1) return e.slice();
298
299
  const o = [];
299
300
  for (let r = 0; r < e.length; r++) {
300
301
  const n = e[r];
301
302
  for (; o.length >= 2; ) {
302
- const l = o[o.length - 1], i = o[o.length - 2];
303
- if ((l.x - i.x) * (n.y - i.y) >= (l.y - i.y) * (n.x - i.x)) o.pop();
303
+ const l = o[o.length - 1], s = o[o.length - 2];
304
+ if ((l.x - s.x) * (n.y - s.y) >= (l.y - s.y) * (n.x - s.x)) o.pop();
304
305
  else break;
305
306
  }
306
307
  o.push(n);
@@ -310,45 +311,57 @@ function be(e) {
310
311
  for (let r = e.length - 1; r >= 0; r--) {
311
312
  const n = e[r];
312
313
  for (; t.length >= 2; ) {
313
- const l = t[t.length - 1], i = t[t.length - 2];
314
- if ((l.x - i.x) * (n.y - i.y) >= (l.y - i.y) * (n.x - i.x)) t.pop();
314
+ const l = t[t.length - 1], s = t[t.length - 2];
315
+ if ((l.x - s.x) * (n.y - s.y) >= (l.y - s.y) * (n.x - s.x)) t.pop();
315
316
  else break;
316
317
  }
317
318
  t.push(n);
318
319
  }
319
320
  return t.pop(), o.length === 1 && t.length === 1 && o[0].x === t[0].x && o[0].y === t[0].y ? o : o.concat(t);
320
321
  }
321
- var we = z, Pe = $, Ee = B, Re = U, _e = V, Oe = X;
322
- const De = ({ delayDuration: e = 0, ...o }) => /* @__PURE__ */ u(we, { "data-slot": "tooltip-provider", delayDuration: e, ...o }), Ge = ({ ...e }) => /* @__PURE__ */ u(De, { children: /* @__PURE__ */ u(Pe, { "data-slot": "tooltip", "data-testid": "spectral-tooltip", ...e }) }), je = ({ ...e }) => /* @__PURE__ */ u(Ee, { "data-slot": "tooltip-trigger", "data-testid": "spectral-tooltip-trigger", ...e }), Fe = ({
322
+ var Pe = $, Ee = B, Re = U, _e = Y, Oe = q, Ae = W;
323
+ const De = ({ delayDuration: e = 0, ...o }) => /* @__PURE__ */ d(Pe, { "data-slot": "tooltip-provider", delayDuration: e, ...o }), ze = ({ ...e }) => /* @__PURE__ */ d(De, { children: /* @__PURE__ */ d(Ee, { "data-slot": "tooltip", "data-testid": "spectral-tooltip", ...e }) }), $e = ({ asChild: e, children: o, ...t }) => /* @__PURE__ */ d(Re, { asChild: e, "data-slot": "tooltip-trigger", "data-testid": "spectral-tooltip-trigger", className: "w-fit", ...t, children: o }), Le = F(
324
+ `pointer-events-auto z-50 w-fit rounded-md px-3 py-1.5 text-xs shadow-lg will-change-transform outline-none select-none data-[state=open]:animate-in data-[state=open]:fade-in-0
325
+ data-[state=open]:zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2
326
+ data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2`,
327
+ {
328
+ variants: {
329
+ variant: {
330
+ default: "bg-tooltip-bg text-text-primary",
331
+ outline: "bg-tooltip-bg text-text-primary border-2 border-solid border-white"
332
+ }
333
+ },
334
+ defaultVariants: {
335
+ variant: "default"
336
+ }
337
+ }
338
+ ), ke = F("z-50 size-2.5 rotate-45 rounded-[2px]", {
339
+ variants: {
340
+ variant: {
341
+ default: "bg-tooltip-arrow fill-tooltip-arrow data-[side=top]:-translate-y-[5.8px] data-[side=bottom]:-translate-y-[5.8px] data-[side=left]:-translate-y-[5.8px] data-[side=right]:-translate-y-[5.8px]",
342
+ outline: `bg-tooltip-arrow fill-tooltip-arrow border-2 border-solid border-white data-[side=top]:border-t-0 data-[side=top]:border-l-0 data-[side=bottom]:border-t-0 data-[side=bottom]:border-l-0
343
+ data-[side=left]:border-l-0 data-[side=left]:border-t-0 data-[side=right]:border-l-0 data-[side=right]:border-t-0 data-[side=top]:-translate-y-[3.7px]
344
+ data-[side=bottom]:-translate-y-[3.85px] data-[side=left]:-translate-y-[3.7px] data-[side=right]:-translate-y-[3.7px]`
345
+ }
346
+ },
347
+ defaultVariants: {
348
+ variant: "default"
349
+ }
350
+ }), Be = ({
323
351
  children: e,
324
352
  className: o,
325
353
  showArrow: t = !1,
326
354
  sideOffset: r = 0,
327
- ...n
328
- }) => /* @__PURE__ */ u(Re, { "data-slot": "tooltip-portal", "data-testid": "spectral-tooltip-portal", children: /* @__PURE__ */ H(
329
- _e,
330
- {
331
- className: ie(
332
- "bg-tooltip-bg text-text-primary pointer-events-auto z-50 w-fit rounded-md px-3 py-1.5 text-xs shadow-lg will-change-transform outline-none select-none",
333
- "data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95",
334
- "data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95",
335
- "data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2",
336
- "data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
337
- o
338
- ),
339
- "data-slot": "tooltip-content",
340
- "data-testid": "spectral-tooltip-content",
341
- sideOffset: r,
342
- ...n,
343
- children: [
344
- e,
345
- t && /* @__PURE__ */ u(Oe, { className: "bg-tooltip-arrow fill-tooltip-arrow z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]" })
346
- ]
347
- }
348
- ) });
355
+ variant: n = "default",
356
+ side: l,
357
+ ...s
358
+ }) => /* @__PURE__ */ d(_e, { "data-slot": "tooltip-portal", "data-testid": "spectral-tooltip-portal", children: /* @__PURE__ */ S(Oe, { className: H(Le({ variant: n }), o), "data-slot": "tooltip-content", "data-testid": "spectral-tooltip-content", sideOffset: r, side: l, ...s, children: [
359
+ e,
360
+ t && /* @__PURE__ */ d(Ae, { height: 8, className: H(ke({ variant: n })) })
361
+ ] }) });
349
362
  export {
350
- Ge as Tooltip,
351
- Fe as TooltipContent,
363
+ ze as Tooltip,
364
+ Be as TooltipContent,
352
365
  De as TooltipProvider,
353
- je as TooltipTrigger
366
+ $e as TooltipTrigger
354
367
  };
@@ -1,10 +1,4 @@
1
1
  import { forwardRef as l, createElement as n } from "react";
2
- /**
3
- * @license lucide-react v0.546.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
2
  const w = (t) => t.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), h = (t) => t.replace(
9
3
  /^([A-Z])|[\s-_]+(\w)/g,
10
4
  (e, r, o) => o ? o.toUpperCase() : r.toLowerCase()
@@ -16,12 +10,6 @@ const w = (t) => t.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), h = (t)
16
10
  if (e.startsWith("aria-") || e === "role" || e === "title")
17
11
  return !0;
18
12
  };
19
- /**
20
- * @license lucide-react v0.546.0 - ISC
21
- *
22
- * This source code is licensed under the ISC license.
23
- * See the LICENSE file in the root directory of this source tree.
24
- */
25
13
  var g = {
26
14
  xmlns: "http://www.w3.org/2000/svg",
27
15
  width: 24,
@@ -33,12 +21,6 @@ var g = {
33
21
  strokeLinecap: "round",
34
22
  strokeLinejoin: "round"
35
23
  };
36
- /**
37
- * @license lucide-react v0.546.0 - ISC
38
- *
39
- * This source code is licensed under the ISC license.
40
- * See the LICENSE file in the root directory of this source tree.
41
- */
42
24
  const A = l(
43
25
  ({
44
26
  color: t = "currentColor",
@@ -68,12 +50,6 @@ const A = l(
68
50
  ]
69
51
  )
70
52
  );
71
- /**
72
- * @license lucide-react v0.546.0 - ISC
73
- *
74
- * This source code is licensed under the ISC license.
75
- * See the LICENSE file in the root directory of this source tree.
76
- */
77
53
  const k = (t, e) => {
78
54
  const r = l(
79
55
  ({ className: o, ...s }, a) => n(A, {
package/dist/main.js CHANGED
@@ -5,15 +5,6 @@ import kT from "./App.js";
5
5
  import O2, { StrictMode as IT } from "react";
6
6
  import M2 from "react-dom";
7
7
  var _g = { exports: {} }, np = {}, Hg = { exports: {} }, cS = {};
8
- /**
9
- * @license React
10
- * scheduler.production.js
11
- *
12
- * Copyright (c) Meta Platforms, Inc. and affiliates.
13
- *
14
- * This source code is licensed under the MIT license found in the
15
- * LICENSE file in the root directory of this source tree.
16
- */
17
8
  var S2;
18
9
  function PT() {
19
10
  return S2 || (S2 = 1, (function(J) {
@@ -235,15 +226,6 @@ function PT() {
235
226
  })(cS)), cS;
236
227
  }
237
228
  var iS = {};
238
- /**
239
- * @license React
240
- * scheduler.development.js
241
- *
242
- * Copyright (c) Meta Platforms, Inc. and affiliates.
243
- *
244
- * This source code is licensed under the MIT license found in the
245
- * LICENSE file in the root directory of this source tree.
246
- */
247
229
  var b2;
248
230
  function t3() {
249
231
  return b2 || (b2 = 1, (function(J) {
@@ -471,15 +453,6 @@ var T2;
471
453
  function R2() {
472
454
  return T2 || (T2 = 1, process.env.NODE_ENV === "production" ? Hg.exports = PT() : Hg.exports = t3()), Hg.exports;
473
455
  }
474
- /**
475
- * @license React
476
- * react-dom-client.production.js
477
- *
478
- * Copyright (c) Meta Platforms, Inc. and affiliates.
479
- *
480
- * This source code is licensed under the MIT license found in the
481
- * LICENSE file in the root directory of this source tree.
482
- */
483
456
  var E2;
484
457
  function e3() {
485
458
  if (E2) return np;
@@ -10254,15 +10227,6 @@ Error generating stack: ` + i.message + `
10254
10227
  }, np.version = "19.2.0", np;
10255
10228
  }
10256
10229
  var up = {};
10257
- /**
10258
- * @license React
10259
- * react-dom-client.development.js
10260
- *
10261
- * Copyright (c) Meta Platforms, Inc. and affiliates.
10262
- *
10263
- * This source code is licensed under the MIT license found in the
10264
- * LICENSE file in the root directory of this source tree.
10265
- */
10266
10230
  var A2;
10267
10231
  function l3() {
10268
10232
  return A2 || (A2 = 1, process.env.NODE_ENV !== "production" && (function() {
@@ -40,24 +40,24 @@
40
40
  --horizon-color-secondary-900: oklch(40.44% 0.07 227.13);
41
41
  --horizon-color-secondary-950: oklch(30.82% 0.06 228.09);
42
42
 
43
- --horizon-color-level-zero: oklch(24.79% 0.0058 271.18);
44
- --horizon-color-level-one: oklch(27.28% 0.0097 268.32);
45
- --horizon-color-level-two: oklch(30.73% 0.0106 253.99);
46
- --horizon-color-level-three: oklch(32.71% 0.0104 253.98);
47
- --horizon-color-level-four: oklch(35.77% 0.0088 248.07);
48
- --horizon-color-level-five: oklch(38.75% 0.0073 242.06);
43
+ --horizon-color-level-zero: oklch(23.78% 0 0);
44
+ --horizon-color-level-one: oklch(26.94% 0 0);
45
+ --horizon-color-level-two: oklch(29.93% 0 0);
46
+ --horizon-color-level-three: oklch(32.89% 0 0);
47
+ --horizon-color-level-four: oklch(35.71% 0 0);
48
+ --horizon-color-level-five: oklch(38.62% 0 0);
49
49
 
50
50
  --horizon-color-success-50: oklch(99% 0.1049 144);
51
51
  --horizon-color-success-100: oklch(94% 0.1649 144);
52
52
  --horizon-color-success-200: oklch(92% 0.2424 144);
53
53
  --horizon-color-success-300: oklch(82% 0.2424 144);
54
- --horizon-color-success-400: oklch(72% 0.2424 144);
55
- --horizon-color-success-500: oklch(62% 0.2424 144);
54
+ --horizon-color-success-400: oklch(76% 0.2424 144);
55
+ --horizon-color-success-500: oklch(66% 0.2424 144);
56
56
 
57
57
  --horizon-color-warning-50: oklch(94% 0.0442 56.91);
58
58
  --horizon-color-warning-100: oklch(91% 0.095 52.355);
59
59
  --horizon-color-warning-200: oklch(84.9% 0.144 52.438);
60
- --horizon-color-warning-300: oklch(76.9% 0.178 52.325);
60
+ --horizon-color-warning-300: oklch(75% 0.2036 56.91);
61
61
  --horizon-color-warning-400: oklch(71.06% 0.19 46.76);
62
62
  --horizon-color-warning-500: oklch(70.5% 0.213 47.604);
63
63