@arcadeai/design-system 6.0.1 → 7.2.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 (37) hide show
  1. package/dist/components/index.js +38 -35
  2. package/dist/components/ui/blocks/demo.js +1 -1
  3. package/dist/components/ui/index.js +38 -35
  4. package/dist/components/ui/molecules/index.d.ts +6 -2
  5. package/dist/components/ui/molecules/index.d.ts.map +1 -1
  6. package/dist/components/ui/molecules/index.js +28 -26
  7. package/dist/components/ui/molecules/mcp-server-picker/header-checkbox-toggle.d.ts +16 -0
  8. package/dist/components/ui/molecules/mcp-server-picker/header-checkbox-toggle.d.ts.map +1 -0
  9. package/dist/components/ui/molecules/mcp-server-picker/header-checkbox-toggle.js +41 -0
  10. package/dist/components/ui/molecules/mcp-server-picker/requirement-list-item.d.ts +19 -0
  11. package/dist/components/ui/molecules/mcp-server-picker/requirement-list-item.d.ts.map +1 -0
  12. package/dist/components/ui/molecules/mcp-server-picker/requirement-list-item.js +47 -0
  13. package/dist/components/ui/molecules/mcp-server-picker/review-count-chip.d.ts +2 -4
  14. package/dist/components/ui/molecules/mcp-server-picker/review-count-chip.d.ts.map +1 -1
  15. package/dist/components/ui/molecules/mcp-server-picker/review-count-chip.js +22 -17
  16. package/dist/components/ui/molecules/mcp-server-picker/view-tabs.d.ts +24 -0
  17. package/dist/components/ui/molecules/mcp-server-picker/view-tabs.d.ts.map +1 -0
  18. package/dist/components/ui/molecules/mcp-server-picker/view-tabs.js +41 -0
  19. package/dist/components/ui/molecules/undo-toast.d.ts +23 -0
  20. package/dist/components/ui/molecules/undo-toast.d.ts.map +1 -1
  21. package/dist/components/ui/molecules/undo-toast.js +2 -2
  22. package/dist/components/ui/organisms/index.d.ts +2 -0
  23. package/dist/components/ui/organisms/index.d.ts.map +1 -1
  24. package/dist/components/ui/organisms/index.js +4 -3
  25. package/dist/components/ui/organisms/mcp-requirements-dialog.d.ts +26 -0
  26. package/dist/components/ui/organisms/mcp-requirements-dialog.d.ts.map +1 -0
  27. package/dist/components/ui/organisms/mcp-requirements-dialog.js +84 -0
  28. package/dist/main.js +44 -41
  29. package/dist/metadata/index.js +4 -4
  30. package/dist/metadata/utils.d.ts +6 -0
  31. package/dist/metadata/utils.d.ts.map +1 -1
  32. package/dist/metadata/utils.js +6 -6
  33. package/dist/{undo-toast-Cf4T6ToX.js → undo-toast-BXx_B4Ak.js} +235 -220
  34. package/package.json +1 -1
  35. package/dist/components/ui/molecules/mcp-server-picker/search-scope-tabs.d.ts +0 -18
  36. package/dist/components/ui/molecules/mcp-server-picker/search-scope-tabs.d.ts.map +0 -1
  37. package/dist/components/ui/molecules/mcp-server-picker/search-scope-tabs.js +0 -31
@@ -13,32 +13,32 @@ import { cn as p } from "./lib/utils.js";
13
13
  import { E as m, T as h, m as g, o as _, t as v, u as y } from "./ReactStore-C3H8e2ha.js";
14
14
  import { n as b, t as x } from "./useTimeout-B0afjWAz.js";
15
15
  import { n as S, r as C, t as w } from "./shadowDom-BACsbimN.js";
16
- import { u as ee } from "./shim-BX-2V17R.js";
17
- import { t as T } from "./visuallyHidden-Cq5CW65k.js";
16
+ import { u as T } from "./shim-BX-2V17R.js";
17
+ import { t as ee } from "./visuallyHidden-Cq5CW65k.js";
18
18
  import { t as te } from "./inertValue-BhczR0H5.js";
19
19
  import { t as E } from "./FloatingPortalLite-D5nFwFgJ.js";
20
20
  import * as D from "react";
21
- import { useCallback as O } from "react";
22
- import { jsx as k, jsxs as A } from "react/jsx-runtime";
23
- import * as ne from "react-dom";
21
+ import { useCallback as O, useEffect as k, useRef as ne } from "react";
22
+ import { jsx as A, jsxs as j } from "react/jsx-runtime";
23
+ import * as M from "react-dom";
24
24
  import { X as re } from "lucide-react";
25
25
  //#region ../../node_modules/.bun/@base-ui+react@1.6.0+df7f6a806acd27ca/node_modules/@base-ui/react/toast/provider/ToastProviderContext.mjs
26
- var j = /*#__PURE__*/ D.createContext(void 0);
27
- process.env.NODE_ENV !== "production" && (j.displayName = "ToastContext");
26
+ var N = /*#__PURE__*/ D.createContext(void 0);
27
+ process.env.NODE_ENV !== "production" && (N.displayName = "ToastContext");
28
28
  function ie() {
29
- let e = D.useContext(j);
29
+ let e = D.useContext(N);
30
30
  if (!e) throw Error(process.env.NODE_ENV === "production" ? r(73) : "Base UI: useToastManager must be used within <Toast.Provider>.");
31
31
  return e;
32
32
  }
33
33
  //#endregion
34
34
  //#region ../../node_modules/.bun/@base-ui+utils@0.3.1+fce4ea6354698f9c/node_modules/@base-ui/utils/generateId.mjs
35
- var ae = 0;
36
- function M(e) {
37
- return ae += 1, `${e}-${Math.random().toString(36).slice(2, 6)}-${ae}`;
35
+ var P = 0;
36
+ function F(e) {
37
+ return P += 1, `${e}-${Math.random().toString(36).slice(2, 6)}-${P}`;
38
38
  }
39
39
  //#endregion
40
40
  //#region ../../node_modules/.bun/@base-ui+react@1.6.0+df7f6a806acd27ca/node_modules/@base-ui/react/toast/utils/resolvePromiseOptions.mjs
41
- function N(e, t) {
41
+ function I(e, t) {
42
42
  if (typeof e == "string") return { description: e };
43
43
  if (typeof e == "function") {
44
44
  let n = e(t);
@@ -48,7 +48,7 @@ function N(e, t) {
48
48
  }
49
49
  //#endregion
50
50
  //#region ../../node_modules/.bun/@base-ui+react@1.6.0+df7f6a806acd27ca/node_modules/@base-ui/react/toast/store.mjs
51
- function P(e) {
51
+ function L(e) {
52
52
  let t = /* @__PURE__ */ new Map(), n = 0, r = 0;
53
53
  return e.forEach((e, i) => {
54
54
  let a = e.transitionStatus === "ending";
@@ -60,7 +60,7 @@ function P(e) {
60
60
  }), r += e.height || 0, a || (n += 1);
61
61
  }), t;
62
62
  }
63
- function F(e, t) {
63
+ function R(e, t) {
64
64
  let n = 0;
65
65
  return e.map((e) => {
66
66
  if (e.transitionStatus === "ending") return e;
@@ -71,26 +71,26 @@ function F(e, t) {
71
71
  };
72
72
  });
73
73
  }
74
- var I = (e) => e.toastMetadata, L = {
74
+ var z = (e) => e.toastMetadata, B = {
75
75
  toasts: _((e) => e.toasts),
76
76
  isEmpty: _((e) => e.toasts.length === 0),
77
- toast: _(I, (e, t) => e.get(t)?.value),
78
- toastIndex: _(I, (e, t) => e.get(t)?.domIndex ?? -1),
79
- toastOffsetY: _(I, (e, t) => e.get(t)?.offsetY ?? 0),
80
- toastVisibleIndex: _(I, (e, t) => e.get(t)?.visibleIndex ?? -1),
77
+ toast: _(z, (e, t) => e.get(t)?.value),
78
+ toastIndex: _(z, (e, t) => e.get(t)?.domIndex ?? -1),
79
+ toastOffsetY: _(z, (e, t) => e.get(t)?.offsetY ?? 0),
80
+ toastVisibleIndex: _(z, (e, t) => e.get(t)?.visibleIndex ?? -1),
81
81
  hovering: _((e) => e.hovering),
82
82
  focused: _((e) => e.focused),
83
83
  expanded: _((e) => e.hovering || e.focused),
84
84
  expandedOrOutOfFocus: _((e) => e.hovering || e.focused || !e.isWindowFocused),
85
85
  prevFocusElement: _((e) => e.prevFocusElement)
86
- }, R = class extends v {
86
+ }, V = class extends v {
87
87
  timers = /* @__PURE__ */ new Map();
88
88
  areTimersPaused = !1;
89
89
  constructor(e) {
90
90
  super({
91
91
  ...e,
92
- toastMetadata: P(e.toasts)
93
- }, {}, L);
92
+ toastMetadata: L(e.toasts)
93
+ }, {}, B);
94
94
  }
95
95
  setFocused(e) {
96
96
  this.set("focused", e);
@@ -115,8 +115,8 @@ var I = (e) => e.toastMetadata, L = {
115
115
  limit: e.limit
116
116
  };
117
117
  if (t) {
118
- let t = F(this.state.toasts, e.limit);
119
- n.toasts = t, n.toastMetadata = P(t);
118
+ let t = R(this.state.toasts, e.limit);
119
+ n.toasts = t, n.toastMetadata = L(t);
120
120
  }
121
121
  this.update(n);
122
122
  }
@@ -126,7 +126,7 @@ var I = (e) => e.toastMetadata, L = {
126
126
  }), this.timers.clear();
127
127
  };
128
128
  removeToast(e, t = {}) {
129
- let n = L.toastIndex(this.state, e);
129
+ let n = B.toastIndex(this.state, e);
130
130
  if (n === -1) return;
131
131
  let r = this.state.toasts[n];
132
132
  t.skipOnRemove || r?.onRemove?.();
@@ -134,9 +134,9 @@ var I = (e) => e.toastMetadata, L = {
134
134
  i.splice(n, 1), this.setToasts(i);
135
135
  }
136
136
  addToast = (e) => {
137
- let { timeout: t, limit: n } = this.state, r = e.id || M("toast");
137
+ let { timeout: t, limit: n } = this.state, r = e.id || F("toast");
138
138
  if (e.id) {
139
- let t = L.toast(this.state, e.id);
139
+ let t = B.toast(this.state, e.id);
140
140
  if (t) if (t.transitionStatus === "ending") this.removeToast(e.id, { skipOnRemove: !0 });
141
141
  else {
142
142
  let { id: t, transitionStatus: n, ...r } = e;
@@ -152,15 +152,15 @@ var I = (e) => e.toastMetadata, L = {
152
152
  updateKey: 0,
153
153
  transitionStatus: "starting"
154
154
  }, a = [i, ...this.state.toasts];
155
- this.setToasts(F(a, n));
155
+ this.setToasts(R(a, n));
156
156
  let o = i.timeout ?? t;
157
- return i.type !== "loading" && o > 0 && this.scheduleTimer(r, o, () => this.closeToast(r)), L.expandedOrOutOfFocus(this.state) && this.pauseTimers(), r;
157
+ return i.type !== "loading" && o > 0 && this.scheduleTimer(r, o, () => this.closeToast(r)), B.expandedOrOutOfFocus(this.state) && this.pauseTimers(), r;
158
158
  };
159
159
  updateToast = (e, t) => {
160
160
  this.updateToastInternal(e, t, { markUpdated: !0 });
161
161
  };
162
162
  updateToastInternal = (e, t, n = {}) => {
163
- let { timeout: r, toasts: i } = this.state, a = L.toast(this.state, e) ?? null;
163
+ let { timeout: r, toasts: i } = this.state, a = B.toast(this.state, e) ?? null;
164
164
  if (!a || a.transitionStatus === "ending") return;
165
165
  let o = {
166
166
  ...a,
@@ -173,41 +173,41 @@ var I = (e) => e.toastMetadata, L = {
173
173
  this.clearTimer(e);
174
174
  return;
175
175
  }
176
- u && (!d || f || l || p || n.resetTimer) && (this.clearTimer(e), this.scheduleTimer(e, s, () => this.closeToast(e)), L.expandedOrOutOfFocus(this.state) && this.pauseTimers());
176
+ u && (!d || f || l || p || n.resetTimer) && (this.clearTimer(e), this.scheduleTimer(e, s, () => this.closeToast(e)), B.expandedOrOutOfFocus(this.state) && this.pauseTimers());
177
177
  };
178
178
  closeToast = (e) => {
179
179
  let t = e === void 0, { limit: n, toasts: r } = this.state, i;
180
180
  if (t) i = r, this.clearTimers();
181
181
  else {
182
- let t = L.toast(this.state, e);
182
+ let t = B.toast(this.state, e);
183
183
  if (!t) return;
184
184
  i = [t], this.clearTimer(e);
185
185
  }
186
- let a = F(r.map((n) => t || n.id === e ? {
186
+ let a = R(r.map((n) => t || n.id === e ? {
187
187
  ...n,
188
188
  transitionStatus: "ending",
189
189
  height: 0
190
190
  } : n), n), o = {
191
191
  toasts: a,
192
- toastMetadata: P(a)
192
+ toastMetadata: L(a)
193
193
  };
194
194
  a.some((e) => e.transitionStatus !== "ending") || (o.hovering = !1, o.focused = !1), this.update(o), i.forEach((e) => {
195
195
  e.transitionStatus !== "ending" && e.onClose?.();
196
196
  }), this.handleFocusManagement(e);
197
197
  };
198
198
  promiseToast = (e, t) => {
199
- let n = N(t.loading), r = this.addToast({
199
+ let n = I(t.loading), r = this.addToast({
200
200
  ...n,
201
201
  type: "loading"
202
202
  }), i = e.then((e) => {
203
- let n = N(t.success, e);
203
+ let n = I(t.success, e);
204
204
  return this.updateToast(r, {
205
205
  ...n,
206
206
  type: "success",
207
207
  timeout: n.timeout
208
208
  }), e;
209
209
  }).catch((e) => {
210
- let n = N(t.error, e);
210
+ let n = I(t.error, e);
211
211
  return this.updateToast(r, {
212
212
  ...n,
213
213
  type: "error",
@@ -244,7 +244,7 @@ var I = (e) => e.toastMetadata, L = {
244
244
  }));
245
245
  };
246
246
  scheduleTimer(e, t, n) {
247
- let r = Date.now(), i = !L.expandedOrOutOfFocus(this.state), a = i ? x.create() : void 0;
247
+ let r = Date.now(), i = !B.expandedOrOutOfFocus(this.state), a = i ? x.create() : void 0;
248
248
  a?.start(t, () => {
249
249
  this.handleTimerFired(e), n();
250
250
  }), this.timers.set(e, {
@@ -272,18 +272,18 @@ var I = (e) => e.toastMetadata, L = {
272
272
  setToasts(e) {
273
273
  let t = {
274
274
  toasts: e,
275
- toastMetadata: P(e)
275
+ toastMetadata: L(e)
276
276
  };
277
277
  e.length === 0 && (t.hovering = !1, t.focused = !1), this.update(t);
278
278
  }
279
279
  handleFocusManagement(e) {
280
280
  let t = w(f(this.state.viewport));
281
- if (!this.state.viewport || !S(this.state.viewport, t) || !ee(t)) return;
281
+ if (!this.state.viewport || !S(this.state.viewport, t) || !T(t)) return;
282
282
  if (e === void 0) {
283
283
  this.restoreFocusToPrevElement();
284
284
  return;
285
285
  }
286
- let n = L.toasts(this.state), r = L.toastIndex(this.state, e), i = null, a = r + 1;
286
+ let n = B.toasts(this.state), r = B.toastIndex(this.state, e), i = null, a = r + 1;
287
287
  for (; a < n.length;) {
288
288
  if (n[a].transitionStatus !== "ending") {
289
289
  i = n[a];
@@ -300,8 +300,8 @@ var I = (e) => e.toastMetadata, L = {
300
300
  }
301
301
  i ? i.ref?.current?.focus() : this.restoreFocusToPrevElement();
302
302
  }
303
- }, z = function(n) {
304
- let { children: r, timeout: i = 5e3, limit: a = 3, toastManager: s } = n, c = t(() => new R({
303
+ }, H = function(n) {
304
+ let { children: r, timeout: i = 5e3, limit: a = 3, toastManager: s } = n, c = t(() => new V({
305
305
  timeout: i,
306
306
  limit: a,
307
307
  viewport: null,
@@ -325,18 +325,18 @@ var I = (e) => e.toastMetadata, L = {
325
325
  c,
326
326
  i,
327
327
  a
328
- ]), /*#__PURE__*/ k(j.Provider, {
328
+ ]), /*#__PURE__*/ A(N.Provider, {
329
329
  value: c,
330
330
  children: r
331
331
  });
332
332
  };
333
- process.env.NODE_ENV !== "production" && (z.displayName = "ToastProvider");
333
+ process.env.NODE_ENV !== "production" && (H.displayName = "ToastProvider");
334
334
  //#endregion
335
335
  //#region ../../node_modules/.bun/@base-ui+react@1.6.0+df7f6a806acd27ca/node_modules/@base-ui/react/toast/viewport/ToastViewportCssVars.mjs
336
- var B = /*#__PURE__*/ function(e) {
336
+ var ae = /*#__PURE__*/ function(e) {
337
337
  return e.frontmostHeight = "--toast-frontmost-height", e;
338
- }({}), V = /*#__PURE__*/ D.forwardRef(function(e, t) {
339
- let { render: r, className: i, style: a, children: o, ...s } = e, c = ie(), u = b(), p = D.useRef(!1), g = D.useRef(!1), _ = D.useRef(!1), v = c.useState("isEmpty"), y = c.useState("toasts"), x = c.useState("focused"), te = c.useState("expanded"), E = c.useState("prevFocusElement"), O = y[0]?.height ?? 0, ne = D.useMemo(() => y.some((e) => e.transitionStatus === "ending"), [y]), re = D.useMemo(() => y.filter((e) => e.priority === "high"), [y]);
338
+ }({}), U = /*#__PURE__*/ D.forwardRef(function(e, t) {
339
+ let { render: r, className: i, style: a, children: o, ...s } = e, c = ie(), u = b(), p = D.useRef(!1), g = D.useRef(!1), _ = D.useRef(!1), v = c.useState("isEmpty"), y = c.useState("toasts"), x = c.useState("focused"), te = c.useState("expanded"), E = c.useState("prevFocusElement"), O = y[0]?.height ?? 0, k = D.useMemo(() => y.some((e) => e.transitionStatus === "ending"), [y]), ne = D.useMemo(() => y.filter((e) => e.priority === "high"), [y]);
340
340
  D.useEffect(() => {
341
341
  let e = c.state.viewport;
342
342
  if (!e) return;
@@ -354,7 +354,7 @@ var B = /*#__PURE__*/ function(e) {
354
354
  function r(n) {
355
355
  if (n.relatedTarget) return;
356
356
  let r = C(n), i = w(f(e));
357
- (r === t || !S(e, r) || !ee(i)) && c.resumeTimers(), u.start(0, () => c.setIsWindowFocused(!0));
357
+ (r === t || !S(e, r) || !T(i)) && c.resumeTimers(), u.start(0, () => c.setIsWindowFocused(!0));
358
358
  }
359
359
  return m(d(t, "blur", n, !0), d(t, "focus", r, !0));
360
360
  }, [
@@ -365,44 +365,44 @@ var B = /*#__PURE__*/ function(e) {
365
365
  let e = c.state.viewport;
366
366
  if (!(!e || v)) return d(f(e), "pointerdown", c.handleDocumentPointerDown, !0);
367
367
  }, [v, c]);
368
- function j(e) {
368
+ function M(e) {
369
369
  let t = c.state.viewport;
370
370
  if (t) if (p.current = !0, e.relatedTarget === t) {
371
371
  let e = y.find((e) => e.transitionStatus !== "ending" && !e.limited);
372
372
  e ? e.ref?.current?.focus() : c.restoreFocusToPrevElement();
373
373
  } else c.restoreFocusToPrevElement();
374
374
  }
375
- function ae(e) {
375
+ function re(e) {
376
376
  e.key === "Tab" && e.shiftKey && C(e.nativeEvent) === c.state.viewport && (e.preventDefault(), c.restoreFocusToPrevElement(), c.resumeTimers());
377
377
  }
378
- function M() {
378
+ function N() {
379
379
  c.state.toasts.some((e) => e.transitionStatus === "ending") || _.current || !g.current || (c.state.isWindowFocused && c.resumeTimers(), c.setHovering(!1), g.current = !1);
380
380
  }
381
- D.useEffect(M, [ne, c]);
382
- function N() {
381
+ D.useEffect(N, [k, c]);
382
+ function P() {
383
383
  c.pauseTimers(), c.setHovering(!0), g.current = !1;
384
384
  }
385
- function P() {
385
+ function F() {
386
386
  c.state.isWindowFocused && c.resumeTimers();
387
387
  }
388
- function F() {
389
- c.state.toasts.some((e) => e.transitionStatus === "ending") || _.current ? g.current = !0 : (P(), c.setHovering(!1));
388
+ function I() {
389
+ c.state.toasts.some((e) => e.transitionStatus === "ending") || _.current ? g.current = !0 : (F(), c.setHovering(!1));
390
390
  }
391
- function I(e) {
391
+ function L(e) {
392
392
  e.pointerType === "touch" && (_.current = !0);
393
393
  }
394
- function L(e) {
395
- e.pointerType === "touch" && (_.current = !1, M());
394
+ function R(e) {
395
+ e.pointerType === "touch" && (_.current = !1, N());
396
396
  }
397
- function R() {
397
+ function z() {
398
398
  if (p.current) {
399
399
  p.current = !1;
400
400
  return;
401
401
  }
402
- x || ee(w(f(c.state.viewport))) && (c.setFocused(!0), c.pauseTimers());
402
+ x || T(w(f(c.state.viewport))) && (c.setFocused(!0), c.pauseTimers());
403
403
  }
404
- function z(e) {
405
- !x || S(c.state.viewport, e.relatedTarget) || (c.setFocused(!1), P());
404
+ function B(e) {
405
+ !x || S(c.state.viewport, e.relatedTarget) || (c.setFocused(!1), F());
406
406
  }
407
407
  let V = {
408
408
  tabIndex: -1,
@@ -411,56 +411,56 @@ var B = /*#__PURE__*/ function(e) {
411
411
  "aria-atomic": !1,
412
412
  "aria-relevant": "additions text",
413
413
  "aria-label": "Notifications",
414
- onMouseEnter: N,
415
- onMouseMove: N,
416
- onMouseLeave: F,
417
- onFocus: R,
418
- onBlur: z,
419
- onKeyDown: ae,
420
- onClick: R,
421
- onPointerDown: I,
422
- onPointerUp: L,
423
- onPointerCancel: L
424
- }, oe = { expanded: te }, H = n("div", e, {
414
+ onMouseEnter: P,
415
+ onMouseMove: P,
416
+ onMouseLeave: I,
417
+ onFocus: z,
418
+ onBlur: B,
419
+ onKeyDown: re,
420
+ onClick: z,
421
+ onPointerDown: L,
422
+ onPointerUp: R,
423
+ onPointerCancel: R
424
+ }, H = { expanded: te }, U = n("div", e, {
425
425
  ref: [t, c.setViewport],
426
- state: oe,
426
+ state: H,
427
427
  props: [
428
428
  V,
429
- { style: { [B.frontmostHeight]: O ? `${O}px` : void 0 } },
429
+ { style: { [ae.frontmostHeight]: O ? `${O}px` : void 0 } },
430
430
  s,
431
- { children: /*#__PURE__*/ A(D.Fragment, { children: [
432
- !v && E && /*#__PURE__*/ k(h, { onFocus: j }),
431
+ { children: /*#__PURE__*/ j(D.Fragment, { children: [
432
+ !v && E && /*#__PURE__*/ A(h, { onFocus: M }),
433
433
  o,
434
- !v && E && /*#__PURE__*/ k(h, { onFocus: j })
434
+ !v && E && /*#__PURE__*/ A(h, { onFocus: M })
435
435
  ] }) }
436
436
  ]
437
437
  });
438
- return /*#__PURE__*/ A(D.Fragment, { children: [
439
- !v && E && /*#__PURE__*/ k(h, { onFocus: j }),
440
- H,
441
- !x && re.length > 0 && /*#__PURE__*/ k("div", {
442
- style: T,
443
- children: re.map((e) => /*#__PURE__*/ A("div", {
438
+ return /*#__PURE__*/ j(D.Fragment, { children: [
439
+ !v && E && /*#__PURE__*/ A(h, { onFocus: M }),
440
+ U,
441
+ !x && ne.length > 0 && /*#__PURE__*/ A("div", {
442
+ style: ee,
443
+ children: ne.map((e) => /*#__PURE__*/ j("div", {
444
444
  role: "alert",
445
445
  "aria-atomic": !0,
446
- children: [/*#__PURE__*/ k("div", { children: e.title }), /*#__PURE__*/ k("div", { children: e.description })]
446
+ children: [/*#__PURE__*/ A("div", { children: e.title }), /*#__PURE__*/ A("div", { children: e.description })]
447
447
  }, e.id))
448
448
  })
449
449
  ] });
450
450
  });
451
- process.env.NODE_ENV !== "production" && (V.displayName = "ToastViewport");
451
+ process.env.NODE_ENV !== "production" && (U.displayName = "ToastViewport");
452
452
  //#endregion
453
453
  //#region ../../node_modules/.bun/@base-ui+react@1.6.0+df7f6a806acd27ca/node_modules/@base-ui/react/toast/root/ToastRootContext.mjs
454
454
  var oe = /*#__PURE__*/ D.createContext(void 0);
455
455
  process.env.NODE_ENV !== "production" && (oe.displayName = "ToastRootContext");
456
- function H() {
456
+ function W() {
457
457
  let e = D.useContext(oe);
458
458
  if (!e) throw Error(process.env.NODE_ENV === "production" ? r(66) : "Base UI: ToastRootContext is missing. Toast parts must be used within <Toast.Root>.");
459
459
  return e;
460
460
  }
461
461
  //#endregion
462
462
  //#region ../../node_modules/.bun/@base-ui+react@1.6.0+df7f6a806acd27ca/node_modules/@base-ui/react/toast/root/ToastRootCssVars.mjs
463
- var U = /*#__PURE__*/ function(e) {
463
+ var G = /*#__PURE__*/ function(e) {
464
464
  return e.index = "--toast-index", e.offsetY = "--toast-offset-y", e.height = "--toast-height", e.swipeMovementX = "--toast-swipe-movement-x", e.swipeMovementY = "--toast-swipe-movement-y", e;
465
465
  }({});
466
466
  //#endregion
@@ -496,39 +496,39 @@ var le = {
496
496
  swipeDirection(e) {
497
497
  return e ? { "data-swipe-direction": e } : null;
498
498
  }
499
- }, ue = 40, de = 10, W = .5, fe = 1, pe = `${y},${g}`, G = /*#__PURE__*/ D.forwardRef(function(t, r) {
499
+ }, ue = 40, de = 10, K = .5, fe = 1, pe = `${y},${g}`, me = /*#__PURE__*/ D.forwardRef(function(t, r) {
500
500
  let { toast: a, render: o, className: s, swipeDirection: l = ["down", "right"], style: u, ...p } = t, m = a.positionerProps?.anchor !== void 0, h = [];
501
501
  m || (h = Array.isArray(l) ? l : [l]);
502
- let g = h.length > 0, _ = ie(), [v, y] = D.useState(void 0), [b, x] = D.useState(!1), [ee, T] = D.useState(!1), [E, O] = D.useState(!1), [A, re] = D.useState({
502
+ let g = h.length > 0, _ = ie(), [v, y] = D.useState(void 0), [b, x] = D.useState(!1), [T, ee] = D.useState(!1), [E, O] = D.useState(!1), [k, ne] = D.useState({
503
503
  x: 0,
504
504
  y: 0
505
- }), [j, ae] = D.useState({
505
+ }), [j, re] = D.useState({
506
506
  x: 0,
507
507
  y: 0,
508
508
  scale: 1
509
- }), [M, N] = D.useState(), [P, F] = D.useState(), [I, L] = D.useState(null), R = D.useRef(null), z = D.useRef({
509
+ }), [N, P] = D.useState(), [F, I] = D.useState(), [L, R] = D.useState(null), z = D.useRef(null), B = D.useRef({
510
510
  x: 0,
511
511
  y: 0
512
- }), B = D.useRef({
512
+ }), V = D.useRef({
513
513
  x: 0,
514
514
  y: 0,
515
515
  scale: 1
516
- }), V = D.useRef(void 0), H = D.useRef(0), G = D.useRef(!1), K = D.useRef({
516
+ }), H = D.useRef(void 0), ae = D.useRef(0), U = D.useRef(!1), W = D.useRef({
517
517
  x: 0,
518
518
  y: 0
519
- }), q = D.useRef(!1), J = D.useRef({
519
+ }), me = D.useRef(!1), he = D.useRef({
520
520
  x: 0,
521
521
  y: 0
522
- }), Y = D.useRef(null), X = D.useRef(null), me = _.useState("toastIndex", a.id), Z = _.useState("toastVisibleIndex", a.id), he = _.useState("toastOffsetY", a.id), ge = _.useState("focused"), _e = _.useState("expanded");
522
+ }), q = D.useRef(null), J = D.useRef(null), ge = _.useState("toastIndex", a.id), Y = _.useState("toastVisibleIndex", a.id), _e = _.useState("toastOffsetY", a.id), X = _.useState("focused"), ve = _.useState("expanded");
523
523
  c({
524
524
  open: a.transitionStatus !== "ending",
525
- ref: R,
525
+ ref: z,
526
526
  onComplete() {
527
527
  a.transitionStatus === "ending" && _.removeToast(a.id);
528
528
  }
529
529
  });
530
- let Q = i((e = !1) => {
531
- let t = R.current;
530
+ let Z = i((e = !1) => {
531
+ let t = z.current;
532
532
  if (!t) return;
533
533
  let n = t.style.height;
534
534
  t.style.height = "auto";
@@ -536,39 +536,39 @@ var le = {
536
536
  t.style.height = n;
537
537
  function i() {
538
538
  _.updateToastInternal(a.id, {
539
- ref: R,
539
+ ref: z,
540
540
  height: r,
541
541
  ...a.transitionStatus === "starting" ? { transitionStatus: void 0 } : {}
542
542
  });
543
543
  }
544
- e ? ne.flushSync(i) : i();
544
+ e ? M.flushSync(i) : i();
545
545
  });
546
- e(Q, [Q]);
547
- function ve(e) {
548
- J.current = e, re(e);
546
+ e(Z, [Z]);
547
+ function Q(e) {
548
+ he.current = e, ne(e);
549
549
  }
550
550
  e(() => () => {
551
- X.current?.abort();
551
+ J.current?.abort();
552
552
  }, []);
553
553
  function ye(e, t) {
554
554
  let n = e, r = t;
555
- return !h.includes("left") && !h.includes("right") ? n = e > 0 ? e ** W : -(Math.abs(e) ** W) : (!h.includes("right") && e > 0 && (n = e ** W), !h.includes("left") && e < 0 && (n = -(Math.abs(e) ** W))), !h.includes("up") && !h.includes("down") ? r = t > 0 ? t ** W : -(Math.abs(t) ** W) : (!h.includes("down") && t > 0 && (r = t ** W), !h.includes("up") && t < 0 && (r = -(Math.abs(t) ** W))), {
555
+ return !h.includes("left") && !h.includes("right") ? n = e > 0 ? e ** K : -(Math.abs(e) ** K) : (!h.includes("right") && e > 0 && (n = e ** K), !h.includes("left") && e < 0 && (n = -(Math.abs(e) ** K))), !h.includes("up") && !h.includes("down") ? r = t > 0 ? t ** K : -(Math.abs(t) ** K) : (!h.includes("down") && t > 0 && (r = t ** K), !h.includes("up") && t < 0 && (r = -(Math.abs(t) ** K))), {
556
556
  x: n,
557
557
  y: r
558
558
  };
559
559
  }
560
- let be = i((e) => {
561
- if (e.pointerId !== Y.current) return;
562
- Y.current = null, X.current?.abort(), X.current = null, x(!1), T(!1), L(null);
563
- let t = B.current;
564
- if (e.type === "pointercancel" || G.current) {
565
- ve({
560
+ let $ = i((e) => {
561
+ if (e.pointerId !== q.current) return;
562
+ q.current = null, J.current?.abort(), J.current = null, x(!1), ee(!1), R(null);
563
+ let t = V.current;
564
+ if (e.type === "pointercancel" || U.current) {
565
+ Q({
566
566
  x: t.x,
567
567
  y: t.y
568
568
  }), y(void 0);
569
569
  return;
570
570
  }
571
- let n = !1, r = J.current, i = r.x - t.x, o = r.y - t.y, s;
571
+ let n = !1, r = he.current, i = r.x - t.x, o = r.y - t.y, s;
572
572
  for (let e of h) {
573
573
  switch (e) {
574
574
  case "right":
@@ -587,160 +587,160 @@ var le = {
587
587
  }
588
588
  if (n) break;
589
589
  }
590
- n ? (y(s), O(!0), _.closeToast(a.id)) : (ve({
590
+ n ? (y(s), O(!0), _.closeToast(a.id)) : (Q({
591
591
  x: t.x,
592
592
  y: t.y
593
593
  }), y(void 0));
594
594
  });
595
- function xe(e) {
595
+ function be(e) {
596
596
  if (e.button !== 0) return;
597
597
  e.pointerType === "touch" && _.pauseTimers();
598
598
  let t = C(e.nativeEvent);
599
599
  if (t && t.closest(`button,a,input,textarea,[role="button"],${pe}`)) return;
600
- if (G.current = !1, V.current = void 0, H.current = 0, Y.current = e.pointerId, z.current = {
600
+ if (U.current = !1, H.current = void 0, ae.current = 0, q.current = e.pointerId, B.current = {
601
601
  x: e.clientX,
602
602
  y: e.clientY
603
- }, K.current = z.current, R.current) {
604
- let e = ce(R.current);
605
- B.current = e, ae(e), ve({
603
+ }, W.current = B.current, z.current) {
604
+ let e = ce(z.current);
605
+ V.current = e, re(e), Q({
606
606
  x: e.x,
607
607
  y: e.y
608
608
  });
609
609
  }
610
- _.setHovering(!0), x(!0), T(!1), L(null), q.current = !0;
611
- let n = R.current;
610
+ _.setHovering(!0), x(!0), ee(!1), R(null), me.current = !0;
611
+ let n = z.current;
612
612
  if (n) {
613
- X.current?.abort();
613
+ J.current?.abort();
614
614
  let t = new AbortController();
615
- X.current = t;
615
+ J.current = t;
616
616
  let r = f(n);
617
- r.addEventListener("pointerup", be, { signal: t.signal }), r.addEventListener("pointercancel", be, { signal: t.signal }), n.setPointerCapture?.(e.pointerId);
617
+ r.addEventListener("pointerup", $, { signal: t.signal }), r.addEventListener("pointercancel", $, { signal: t.signal }), n.setPointerCapture?.(e.pointerId);
618
618
  }
619
619
  }
620
- function Se(e) {
621
- if (e.pointerId !== Y.current) return;
622
- e.preventDefault(), q.current &&= (z.current = {
620
+ function xe(e) {
621
+ if (e.pointerId !== q.current) return;
622
+ e.preventDefault(), me.current &&= (B.current = {
623
623
  x: e.clientX,
624
624
  y: e.clientY
625
625
  }, !1);
626
626
  let { clientY: t, clientX: n, movementX: r, movementY: i } = e;
627
- (i < 0 && t > K.current.y || i > 0 && t < K.current.y) && (K.current = {
628
- x: K.current.x,
627
+ (i < 0 && t > W.current.y || i > 0 && t < W.current.y) && (W.current = {
628
+ x: W.current.x,
629
629
  y: t
630
- }), (r < 0 && n > K.current.x || r > 0 && n < K.current.x) && (K.current = {
630
+ }), (r < 0 && n > W.current.x || r > 0 && n < W.current.x) && (W.current = {
631
631
  x: n,
632
- y: K.current.y
632
+ y: W.current.y
633
633
  });
634
- let a = n - z.current.x, o = t - z.current.y, s = t - K.current.y, c = n - K.current.x;
635
- if (!ee && Math.sqrt(a * a + o * o) >= fe && (T(!0), I === null)) {
634
+ let a = n - B.current.x, o = t - B.current.y, s = t - W.current.y, c = n - W.current.x;
635
+ if (!T && Math.sqrt(a * a + o * o) >= fe && (ee(!0), L === null)) {
636
636
  let e = h.includes("left") || h.includes("right"), t = h.includes("up") || h.includes("down");
637
- e && t && L(Math.abs(a) > Math.abs(o) ? "horizontal" : "vertical");
637
+ e && t && R(Math.abs(a) > Math.abs(o) ? "horizontal" : "vertical");
638
638
  }
639
639
  let l;
640
- if (!V.current) I === "vertical" ? o > 0 ? l = "down" : o < 0 && (l = "up") : I === "horizontal" ? a > 0 ? l = "right" : a < 0 && (l = "left") : l = Math.abs(a) >= Math.abs(o) ? a > 0 ? "right" : "left" : o > 0 ? "down" : "up", l && h.includes(l) && (V.current = l, H.current = se(l, a, o), y(l));
640
+ if (!H.current) L === "vertical" ? o > 0 ? l = "down" : o < 0 && (l = "up") : L === "horizontal" ? a > 0 ? l = "right" : a < 0 && (l = "left") : l = Math.abs(a) >= Math.abs(o) ? a > 0 ? "right" : "left" : o > 0 ? "down" : "up", l && h.includes(l) && (H.current = l, ae.current = se(l, a, o), y(l));
641
641
  else {
642
- let e = V.current, t = se(e, c, s);
643
- t > ue ? (G.current = !1, y(e)) : !(h.includes("left") && h.includes("right")) && !(h.includes("up") && h.includes("down")) && H.current - t >= de && (G.current = !0);
642
+ let e = H.current, t = se(e, c, s);
643
+ t > ue ? (U.current = !1, y(e)) : !(h.includes("left") && h.includes("right")) && !(h.includes("up") && h.includes("down")) && ae.current - t >= de && (U.current = !0);
644
644
  }
645
- let u = ye(a, o), d = B.current.x, f = B.current.y;
646
- I === "horizontal" ? (h.includes("left") || h.includes("right")) && (d += u.x) : (I === "vertical" || (h.includes("left") || h.includes("right")) && (d += u.x), (h.includes("up") || h.includes("down")) && (f += u.y)), ve({
645
+ let u = ye(a, o), d = V.current.x, f = V.current.y;
646
+ L === "horizontal" ? (h.includes("left") || h.includes("right")) && (d += u.x) : (L === "vertical" || (h.includes("left") || h.includes("right")) && (d += u.x), (h.includes("up") || h.includes("down")) && (f += u.y)), Q({
647
647
  x: d,
648
648
  y: f
649
649
  });
650
650
  }
651
- function Ce(e) {
651
+ function Se(e) {
652
652
  if (e.key === "Escape") {
653
- if (!R.current || !S(R.current, w(f(R.current)))) return;
653
+ if (!z.current || !S(z.current, w(f(z.current)))) return;
654
654
  _.closeToast(a.id);
655
655
  }
656
656
  }
657
657
  D.useEffect(() => {
658
658
  if (!g) return;
659
- let e = R.current;
659
+ let e = z.current;
660
660
  if (!e) return;
661
661
  function t(t) {
662
- Y.current === null || !S(e, C(t)) || t.preventDefault();
662
+ q.current === null || !S(e, C(t)) || t.preventDefault();
663
663
  }
664
664
  return d(e, "touchmove", t, { passive: !1 });
665
665
  }, [g]);
666
- function we() {
667
- if (!b && A.x === j.x && A.y === j.y && !E) return {
668
- [U.swipeMovementX]: "0px",
669
- [U.swipeMovementY]: "0px"
666
+ function Ce() {
667
+ if (!b && k.x === j.x && k.y === j.y && !E) return {
668
+ [G.swipeMovementX]: "0px",
669
+ [G.swipeMovementY]: "0px"
670
670
  };
671
- let e = A.x - j.x, t = A.y - j.y;
671
+ let e = k.x - j.x, t = k.y - j.y;
672
672
  return {
673
673
  transition: b ? "none" : void 0,
674
- transform: b ? `translateX(${A.x}px) translateY(${A.y}px) scale(${j.scale})` : void 0,
675
- [U.swipeMovementX]: `${e}px`,
676
- [U.swipeMovementY]: `${t}px`
674
+ transform: b ? `translateX(${k.x}px) translateY(${k.y}px) scale(${j.scale})` : void 0,
675
+ [G.swipeMovementX]: `${e}px`,
676
+ [G.swipeMovementY]: `${t}px`
677
677
  };
678
678
  }
679
- let Te = a.priority === "high", Ee = {
680
- role: Te ? "alertdialog" : "dialog",
679
+ let we = a.priority === "high", Te = {
680
+ role: we ? "alertdialog" : "dialog",
681
681
  tabIndex: 0,
682
682
  "aria-modal": !1,
683
- "aria-labelledby": M,
684
- "aria-describedby": P,
685
- "aria-hidden": Te && !ge ? !0 : void 0,
686
- onPointerDown: g ? xe : void 0,
687
- onPointerMove: g ? Se : void 0,
688
- onPointerUp: g ? be : void 0,
689
- onPointerCancel: g ? be : void 0,
690
- onKeyDown: Ce,
683
+ "aria-labelledby": N,
684
+ "aria-describedby": F,
685
+ "aria-hidden": we && !X ? !0 : void 0,
686
+ onPointerDown: g ? be : void 0,
687
+ onPointerMove: g ? xe : void 0,
688
+ onPointerUp: g ? $ : void 0,
689
+ onPointerCancel: g ? $ : void 0,
690
+ onKeyDown: Se,
691
691
  inert: te(a.limited),
692
692
  style: {
693
- ...we(),
694
- [U.index]: a.transitionStatus === "ending" ? me : Z,
695
- [U.offsetY]: `${he}px`,
696
- [U.height]: a.height ? `${a.height}px` : void 0
693
+ ...Ce(),
694
+ [G.index]: a.transitionStatus === "ending" ? ge : Y,
695
+ [G.offsetY]: `${_e}px`,
696
+ [G.height]: a.height ? `${a.height}px` : void 0
697
697
  }
698
- }, $ = D.useMemo(() => ({
699
- rootRef: R,
698
+ }, Ee = D.useMemo(() => ({
699
+ rootRef: z,
700
700
  toast: a,
701
- titleId: M,
702
- setTitleId: N,
703
- descriptionId: P,
704
- setDescriptionId: F,
701
+ titleId: N,
702
+ setTitleId: P,
703
+ descriptionId: F,
704
+ setDescriptionId: I,
705
705
  swiping: b,
706
706
  swipeDirection: v,
707
- recalculateHeight: Q,
708
- index: me,
709
- visibleIndex: Z,
710
- expanded: _e
707
+ recalculateHeight: Z,
708
+ index: ge,
709
+ visibleIndex: Y,
710
+ expanded: ve
711
711
  }), [
712
712
  a,
713
- M,
714
- P,
713
+ N,
714
+ F,
715
715
  b,
716
716
  v,
717
- Q,
718
- me,
719
717
  Z,
720
- _e
718
+ ge,
719
+ Y,
720
+ ve
721
721
  ]), De = {
722
722
  transitionStatus: a.transitionStatus,
723
- expanded: _e,
723
+ expanded: ve,
724
724
  limited: a.limited || !1,
725
725
  type: a.type,
726
- swiping: $.swiping,
727
- swipeDirection: $.swipeDirection
726
+ swiping: Ee.swiping,
727
+ swipeDirection: Ee.swipeDirection
728
728
  }, Oe = n("div", t, {
729
- ref: [r, $.rootRef],
729
+ ref: [r, Ee.rootRef],
730
730
  state: De,
731
731
  stateAttributesMapping: le,
732
- props: [Ee, p]
732
+ props: [Te, p]
733
733
  });
734
- return /*#__PURE__*/ k(oe.Provider, {
735
- value: $,
734
+ return /*#__PURE__*/ A(oe.Provider, {
735
+ value: Ee,
736
736
  children: Oe
737
737
  });
738
738
  });
739
- process.env.NODE_ENV !== "production" && (G.displayName = "ToastRoot");
739
+ process.env.NODE_ENV !== "production" && (me.displayName = "ToastRoot");
740
740
  //#endregion
741
741
  //#region ../../node_modules/.bun/@base-ui+react@1.6.0+df7f6a806acd27ca/node_modules/@base-ui/react/toast/title/ToastTitle.mjs
742
- var K = /*#__PURE__*/ D.forwardRef(function(t, r) {
743
- let { render: i, className: o, style: s, id: c, children: l, ...u } = t, { toast: d, setTitleId: f } = H(), p = l ?? d.title, m = !!p, h = a(c);
742
+ var he = /*#__PURE__*/ D.forwardRef(function(t, r) {
743
+ let { render: i, className: o, style: s, id: c, children: l, ...u } = t, { toast: d, setTitleId: f } = W(), p = l ?? d.title, m = !!p, h = a(c);
744
744
  e(() => {
745
745
  if (m) return f(h), () => {
746
746
  f(void 0);
@@ -761,11 +761,11 @@ var K = /*#__PURE__*/ D.forwardRef(function(t, r) {
761
761
  });
762
762
  return m ? g : null;
763
763
  });
764
- process.env.NODE_ENV !== "production" && (K.displayName = "ToastTitle");
764
+ process.env.NODE_ENV !== "production" && (he.displayName = "ToastTitle");
765
765
  //#endregion
766
766
  //#region ../../node_modules/.bun/@base-ui+react@1.6.0+df7f6a806acd27ca/node_modules/@base-ui/react/toast/close/ToastClose.mjs
767
767
  var q = /*#__PURE__*/ D.forwardRef(function(e, t) {
768
- let { render: r, className: i, style: a, disabled: o, nativeButton: s = !0, ...c } = e, l = ie(), { toast: d } = H(), f = l.useState("expanded"), [p, m] = D.useState(!1), { getButtonProps: h, buttonRef: g } = u({
768
+ let { render: r, className: i, style: a, disabled: o, nativeButton: s = !0, ...c } = e, l = ie(), { toast: d } = W(), f = l.useState("expanded"), [p, m] = D.useState(!1), { getButtonProps: h, buttonRef: g } = u({
769
769
  disabled: o,
770
770
  native: s
771
771
  }), _ = { type: d.type };
@@ -794,7 +794,7 @@ process.env.NODE_ENV !== "production" && (q.displayName = "ToastClose");
794
794
  //#endregion
795
795
  //#region ../../node_modules/.bun/@base-ui+react@1.6.0+df7f6a806acd27ca/node_modules/@base-ui/react/toast/action/ToastAction.mjs
796
796
  var J = /*#__PURE__*/ D.forwardRef(function(e, t) {
797
- let { render: r, className: i, style: a, disabled: o, nativeButton: s = !0, ...c } = e, { toast: l } = H(), d = l.actionProps?.children ?? c.children, f = !!d, { getButtonProps: p, buttonRef: m } = u({
797
+ let { render: r, className: i, style: a, disabled: o, nativeButton: s = !0, ...c } = e, { toast: l } = W(), d = l.actionProps?.children ?? c.children, f = !!d, { getButtonProps: p, buttonRef: m } = u({
798
798
  disabled: o,
799
799
  native: s
800
800
  }), h = { type: l.type }, g = n("button", e, {
@@ -812,11 +812,11 @@ var J = /*#__PURE__*/ D.forwardRef(function(e, t) {
812
812
  process.env.NODE_ENV !== "production" && (J.displayName = "ToastAction");
813
813
  //#endregion
814
814
  //#region ../../node_modules/.bun/@base-ui+react@1.6.0+df7f6a806acd27ca/node_modules/@base-ui/react/toast/portal/ToastPortal.mjs
815
- var Y = E;
815
+ var ge = E;
816
816
  //#endregion
817
817
  //#region ../../node_modules/.bun/@base-ui+react@1.6.0+df7f6a806acd27ca/node_modules/@base-ui/react/toast/useToastManager.mjs
818
- function X() {
819
- let e = D.useContext(j);
818
+ function Y() {
819
+ let e = D.useContext(N);
820
820
  if (!e) throw Error(process.env.NODE_ENV === "production" ? r(73) : "Base UI: useToastManager must be used within <Toast.Provider>.");
821
821
  let t = e.useState("toasts");
822
822
  return D.useMemo(() => ({
@@ -829,39 +829,39 @@ function X() {
829
829
  }
830
830
  //#endregion
831
831
  //#region lib/components/ui/molecules/undo-toast.tsx
832
- var me = 4e3, Z = "mcp-undo-toast";
833
- function he({ children: e, container: t, className: n, dismissMs: r = me }) {
834
- return /* @__PURE__ */ A(z, {
832
+ var _e = 4e3, X = "mcp-undo-toast";
833
+ function ve({ children: e, container: t, className: n, dismissMs: r = _e }) {
834
+ return /* @__PURE__ */ j(H, {
835
835
  limit: 1,
836
836
  timeout: r,
837
- children: [e, /* @__PURE__ */ k(Y, {
837
+ children: [e, /* @__PURE__ */ A(ge, {
838
838
  container: t ?? void 0,
839
- children: /* @__PURE__ */ k(V, {
839
+ children: /* @__PURE__ */ A(U, {
840
840
  className: p("pointer-events-none absolute inset-x-0 bottom-3 z-20 flex justify-center px-3", n),
841
- children: /* @__PURE__ */ k(ge, { dismissMs: r })
841
+ children: /* @__PURE__ */ A(Z, { dismissMs: r })
842
842
  })
843
843
  })]
844
844
  });
845
845
  }
846
- function ge({ dismissMs: e }) {
847
- let { toasts: t } = X();
846
+ function Z({ dismissMs: e }) {
847
+ let { toasts: t } = Y();
848
848
  return t.map((t) => {
849
849
  let n = t.data?.icon;
850
- return /* @__PURE__ */ A(G, {
850
+ return /* @__PURE__ */ j(me, {
851
851
  className: p("group pointer-events-auto relative flex w-fit max-w-full origin-bottom items-center gap-3 overflow-hidden rounded-lg bg-popover py-2 pr-2 pl-3 text-popover-foreground shadow-[var(--shadow-card-hover)] ring-1 ring-foreground/20 transition-all duration-[var(--duration-slow)] ease-[var(--ease-smooth)] data-[ending-style]:translate-y-2 data-[starting-style]:translate-y-2 data-[ending-style]:scale-[0.96] data-[starting-style]:scale-[0.96] data-[ending-style]:opacity-0 data-[starting-style]:opacity-0 motion-reduce:transition-none dark:bg-[color-mix(in_srgb,var(--foreground)_8%,var(--popover))] dark:shadow-md dark:ring-foreground/15"),
852
852
  toast: t,
853
853
  children: [
854
- /* @__PURE__ */ A("span", {
854
+ /* @__PURE__ */ j("span", {
855
855
  className: "flex min-w-0 items-center gap-2 text-sm",
856
- children: [n, /* @__PURE__ */ k(K, { className: "truncate font-medium" })]
856
+ children: [n, /* @__PURE__ */ A(he, { className: "truncate font-medium" })]
857
857
  }),
858
- /* @__PURE__ */ k(J, { className: "ds-focus-in shrink-0 cursor-pointer rounded-md bg-primary/20 px-2.5 py-1 font-semibold text-brand-text text-sm transition-colors hover:bg-primary hover:text-primary-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/60 active:bg-primary/90 active:text-primary-foreground dark:text-primary dark:active:text-primary-foreground dark:hover:text-primary-foreground" }),
859
- /* @__PURE__ */ k(q, {
858
+ /* @__PURE__ */ A(J, { className: "ds-focus-in shrink-0 cursor-pointer rounded-md bg-primary/20 px-2.5 py-1 font-semibold text-brand-text text-sm transition-colors hover:bg-primary hover:text-primary-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/60 active:bg-primary/90 active:text-primary-foreground dark:text-primary dark:active:text-primary-foreground dark:hover:text-primary-foreground" }),
859
+ /* @__PURE__ */ A(q, {
860
860
  "aria-label": "Dismiss",
861
861
  className: "inline-flex size-6 shrink-0 cursor-pointer items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-foreground/10 hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/60",
862
- children: /* @__PURE__ */ k(re, { className: "size-3.5" })
862
+ children: /* @__PURE__ */ A(re, { className: "size-3.5" })
863
863
  }),
864
- /* @__PURE__ */ k("span", {
864
+ /* @__PURE__ */ A("span", {
865
865
  "aria-hidden": !0,
866
866
  className: "pointer-events-none absolute inset-x-0 bottom-0 h-0.5 origin-left bg-primary/40 [animation-fill-mode:forwards] [animation-name:ds-undo-countdown] [animation-timing-function:linear] motion-reduce:hidden dark:bg-primary/50 group-focus-within:[animation-play-state:paused] group-hover:[animation-play-state:paused]",
867
867
  style: { animationDuration: `${t.timeout ?? e}ms` }
@@ -870,29 +870,44 @@ function ge({ dismissMs: e }) {
870
870
  }, t.id);
871
871
  });
872
872
  }
873
- function _e() {
874
- let { add: e, close: t } = X();
873
+ function Q() {
874
+ let { add: e, close: t } = Y();
875
875
  return {
876
876
  show: O(({ message: n, icon: r, actionLabel: i = "Undo", onUndo: a, onDismiss: o, dismissMs: s }) => {
877
877
  let c = !1;
878
878
  return e({
879
- id: Z,
879
+ id: X,
880
880
  title: n,
881
881
  data: { icon: r },
882
882
  timeout: s,
883
883
  actionProps: {
884
884
  children: i,
885
885
  onClick: () => {
886
- a(), c = !0, t(Z);
886
+ a(), c = !0, t(X);
887
887
  }
888
888
  },
889
889
  onClose: () => {
890
890
  c || o?.();
891
891
  }
892
- }), Z;
892
+ }), X;
893
893
  }, [e, t]),
894
- dismiss: O(() => t(Z), [t])
894
+ dismiss: O(() => t(X), [t])
895
895
  };
896
896
  }
897
+ function ye({ revision: e = 0, ...t }) {
898
+ let { show: n, dismiss: r } = Q(), i = ne(t);
899
+ return i.current = t, k(() => {
900
+ let { onUndo: e, onDismiss: t, ...r } = i.current;
901
+ n({
902
+ ...r,
903
+ onUndo: () => i.current.onUndo(),
904
+ onDismiss: () => i.current.onDismiss?.()
905
+ });
906
+ }, [e, n]), k(() => () => r(), [r]), null;
907
+ }
908
+ function $() {
909
+ let { toasts: e } = Y();
910
+ return e.length > 0;
911
+ }
897
912
  //#endregion
898
- export { _e as n, he as t };
913
+ export { $ as i, ve as n, Q as r, ye as t };