react-semaphor 0.1.203 → 0.1.205

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 (34) hide show
  1. package/dist/chunks/dashboard-controls-DekrQ0yg.js +42 -0
  2. package/dist/chunks/dashboard-controls-n5_oB_dp.js +1584 -0
  3. package/dist/chunks/{dashboard-json-Cwh8kbV9.js → dashboard-json-B5YyWsMv.js} +5 -5
  4. package/dist/chunks/{dashboard-json-Dh8csIFq.js → dashboard-json-VG8uFdaU.js} +1 -1
  5. package/dist/chunks/{dashboard-summary-settings-dialog-_3iUVFkC.js → dashboard-summary-settings-dialog-B7_fbNYb.js} +1 -1
  6. package/dist/chunks/{dashboard-summary-settings-dialog-BL4vn4lZ.js → dashboard-summary-settings-dialog-DnfxWTj2.js} +55 -55
  7. package/dist/chunks/{edit-dashboard-visual-RiCeBX0X.js → edit-dashboard-visual-BxDQKLvc.js} +9 -9
  8. package/dist/chunks/{edit-dashboard-visual-DEc3lB9j.js → edit-dashboard-visual-bl33bktZ.js} +928 -914
  9. package/dist/chunks/{editor-action-buttons-BfLWRprW.js → editor-action-buttons-BUAzU5tX.js} +1 -1
  10. package/dist/chunks/{editor-action-buttons-DovtyKKL.js → editor-action-buttons-DngVSXyw.js} +65 -65
  11. package/dist/chunks/index-CtLqMYAL.js +1109 -0
  12. package/dist/chunks/{index-DaQXz6Oi.js → index-em2ecoK3.js} +33535 -29709
  13. package/dist/chunks/notification-bell-BWh1ZNB4.js +11 -0
  14. package/dist/chunks/{notification-bell-Cn3-W-S3.js → notification-bell-Ck-SNMez.js} +232 -233
  15. package/dist/chunks/{resource-management-panel-qsbMXn91.js → resource-management-panel-BGJ4XMn5.js} +188 -188
  16. package/dist/chunks/{resource-management-panel-DBnpAHFb.js → resource-management-panel-Ji1DZtnk.js} +1 -1
  17. package/dist/chunks/{use-role-aware-display-preferences-B22nZN2c.js → use-role-aware-display-preferences-C0-SK5cT.js} +1 -1
  18. package/dist/chunks/{use-role-aware-display-preferences-CnipXO4k.js → use-role-aware-display-preferences-DEkMGyx9.js} +1 -1
  19. package/dist/chunks/{use-visual-utils-JlfPxiXq.js → use-visual-utils-BLdGPBdR.js} +1 -1
  20. package/dist/chunks/{use-visual-utils-B9X7-yfe.js → use-visual-utils-BYBat4tj.js} +28 -28
  21. package/dist/dashboard/index.cjs +1 -1
  22. package/dist/dashboard/index.js +1 -1
  23. package/dist/index.cjs +1 -1
  24. package/dist/index.js +258 -173
  25. package/dist/style.css +1 -1
  26. package/dist/surfboard/index.cjs +1 -1
  27. package/dist/surfboard/index.js +2 -2
  28. package/dist/types/main.d.ts +813 -2
  29. package/dist/types/types.d.ts +222 -0
  30. package/package.json +2 -1
  31. package/dist/chunks/dashboard-controls-D5VrI40y.js +0 -42
  32. package/dist/chunks/dashboard-controls-p7I_UrIz.js +0 -1661
  33. package/dist/chunks/index-CpnMO9b6.js +0 -1087
  34. package/dist/chunks/notification-bell-DsJcuxld.js +0 -11
@@ -1,16 +1,16 @@
1
1
  import oe, { useState as A, useRef as L, useCallback as P, useEffect as D, useContext as ie } from "react";
2
- import { b3 as te, aK as R, a5 as I, aH as B, aD as ae, aE as $, a6 as se, aC as le, aL as ce, aM as de, aN as ue, aO as me, aP as he, aS as O, bX as pe, c0 as fe, c1 as H, aV as ge, B as E, aW as _, az as M, bb as ve, u as S, bf as xe, ax as re, c2 as be, c3 as j, aX as U, A as we, c4 as Ce, c as T, bm as X, bn as q, bo as G, bp as W, bq as J, aA as Ne, c5 as ye, c6 as Ae, c7 as Ee, bE as Se, bF as De, bG as Ie, c8 as ke, bH as Ue, bI as Te, bJ as Fe, bK as Pe, bL as Me, Y as Ve, I as Le, c9 as ze, ca as Oe, aJ as Re, X as Be, cb as $e, cc as _e, cd as He, aF as K, R as je, a8 as Xe, P as qe, p as Ge, ce as We, r as Je } from "./index-DaQXz6Oi.js";
2
+ import { bI as te, l as R, bC as I, aW as B, aH as se, aG as $, bB as ae, aI as le, m as ce, n as de, o as ue, p as me, q as he, L as O, cA as pe, cF as fe, cG as _, G as ge, B as S, H, bA as M, bQ as ve, u as E, bU as xe, bs as re, cH as be, cI as j, I as U, bE as we, cJ as Ce, c as T, b$ as G, c0 as q, c1 as X, c2 as Q, c3 as W, by as Ne, cK as ye, cL as Ae, cM as Se, ch as Ee, ci as De, cj as Ie, cN as ke, ck as Ue, cl as Te, cm as Fe, cn as Pe, co as Me, am as Ve, a2 as Le, cO as ze, cP as Oe, aw as Re, X as Be, cQ as $e, cR as He, cS as _e, al as J, a3 as je, bD as Ge, P as qe, s as Xe, cT as Qe, t as We } from "./index-em2ecoK3.js";
3
3
  import { jsx as t, jsxs as r, Fragment as V } from "react/jsx-runtime";
4
- import { E as Ke, V as Ye, a as Qe, b as Ze, S as Y, c as et, C as tt } from "./editor-action-buttons-DovtyKKL.js";
5
- import { a as ne } from "./use-visual-utils-B9X7-yfe.js";
6
- import { c as Q } from "./date-formatter-Y8Za1ib3.js";
4
+ import { E as Je, V as Ke, a as Ye, b as Ze, S as K, c as et, C as tt } from "./editor-action-buttons-DngVSXyw.js";
5
+ import { a as ne } from "./use-visual-utils-BYBat4tj.js";
6
+ import { c as Y } from "./date-formatter-Y8Za1ib3.js";
7
7
  /**
8
8
  * @license lucide-react v0.453.0 - ISC
9
9
  *
10
10
  * This source code is licensed under the ISC license.
11
11
  * See the LICENSE file in the root directory of this source tree.
12
12
  */
13
- const at = te("CirclePlus", [
13
+ const st = te("CirclePlus", [
14
14
  ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
15
15
  ["path", { d: "M8 12h8", key: "1wcyev" }],
16
16
  ["path", { d: "M12 8v8", key: "napkw2" }]
@@ -26,15 +26,15 @@ const Z = te("FileDown", [
26
26
  ["path", { d: "M14 2v4a2 2 0 0 0 2 2h4", key: "tnqrlb" }],
27
27
  ["path", { d: "M12 18v-6", key: "17g6i2" }],
28
28
  ["path", { d: "m9 15 3 3 3-3", key: "1npd3o" }]
29
- ]), st = 1e4, rt = 15e3, nt = 3e4, ot = 3e4, it = 12e4, ee = 2 * 60 * 60 * 1e3;
29
+ ]), at = 1e4, rt = 15e3, nt = 3e4, ot = 3e4, it = 12e4, ee = 2 * 60 * 60 * 1e3;
30
30
  function lt(e) {
31
- const a = Date.now() - e.getTime();
32
- return a < ot ? st : a < it ? rt : nt;
31
+ const s = Date.now() - e.getTime();
32
+ return s < ot ? at : s < it ? rt : nt;
33
33
  }
34
34
  function wt() {
35
- const { authToken: e, tokenProps: a } = R(), c = I((g) => g.activeExports), [n, m] = A(
35
+ const { authToken: e, tokenProps: s } = R(), d = I((g) => g.activeExports), [n, u] = A(
36
36
  typeof document < "u" ? !document.hidden : !0
37
- ), l = L(null), o = L(!1), s = L(void 0), h = a == null ? void 0 : a.apiServiceUrl, d = e == null ? void 0 : e.accessToken, v = P(() => {
37
+ ), l = L(null), o = L(!1), a = L(void 0), p = s == null ? void 0 : s.apiServiceUrl, m = e == null ? void 0 : e.accessToken, v = P(() => {
38
38
  const g = I.getState().activeExports;
39
39
  return Array.from(g.values()).filter(
40
40
  (b) => B(b.status)
@@ -43,14 +43,14 @@ function wt() {
43
43
  D(() => {
44
44
  if (typeof document > "u") return;
45
45
  const g = () => {
46
- m(!document.hidden);
46
+ u(!document.hidden);
47
47
  };
48
48
  return document.addEventListener("visibilitychange", g), () => {
49
49
  document.removeEventListener("visibilitychange", g);
50
50
  };
51
51
  }, []);
52
52
  const C = P(async () => {
53
- if (!h || !d) {
53
+ if (!p || !m) {
54
54
  o.current = !1;
55
55
  return;
56
56
  }
@@ -60,40 +60,40 @@ function wt() {
60
60
  return;
61
61
  }
62
62
  const b = Date.now(), y = g.filter(
63
- (p) => b - p.startedAt.getTime() > ee
63
+ (c) => b - c.startedAt.getTime() > ee
64
64
  );
65
65
  if (y.length > 0) {
66
- const { updateExport: p } = I.getState().actions;
66
+ const { updateExport: c } = I.getState().actions;
67
67
  for (const i of y)
68
- p(i.id, {
68
+ c(i.id, {
69
69
  status: "failed",
70
70
  error: "Export timed out. Please try again or contact support.",
71
71
  lastUpdatedAt: /* @__PURE__ */ new Date()
72
72
  });
73
73
  }
74
74
  const f = g.filter(
75
- (p) => b - p.startedAt.getTime() <= ee
75
+ (c) => b - c.startedAt.getTime() <= ee
76
76
  );
77
77
  if (f.length === 0) {
78
78
  o.current = !1;
79
79
  return;
80
80
  }
81
81
  const x = await Promise.allSettled(
82
- f.map(async (p) => {
82
+ f.map(async (c) => {
83
83
  try {
84
- const i = await ae(h, d, p.id);
84
+ const i = await se(p, m, c.id);
85
85
  let w;
86
86
  if (i.status === "completed")
87
87
  try {
88
- w = await $(h, d, p.id);
88
+ w = await $(p, m, c.id);
89
89
  } catch (F) {
90
90
  console.error(
91
- `[useExportPolling] Failed to get download URL for ${p.id}:`,
91
+ `[useExportPolling] Failed to get download URL for ${c.id}:`,
92
92
  F
93
93
  );
94
94
  }
95
95
  return {
96
- id: p.id,
96
+ id: c.id,
97
97
  status: i.status,
98
98
  progress: i.progress,
99
99
  completedChunks: i.completedChunks,
@@ -105,36 +105,36 @@ function wt() {
105
105
  };
106
106
  } catch (i) {
107
107
  return console.error(
108
- `[useExportPolling] Failed to poll export ${p.id}:`,
108
+ `[useExportPolling] Failed to poll export ${c.id}:`,
109
109
  i
110
110
  ), null;
111
111
  }
112
112
  })
113
113
  ), { updateExport: N } = I.getState().actions;
114
- for (const p of x)
115
- p.status === "fulfilled" && p.value && N(p.value.id, p.value);
116
- const u = v();
117
- if (u.length > 0 && !document.hidden) {
118
- const p = u.reduce(
114
+ for (const c of x)
115
+ c.status === "fulfilled" && c.value && N(c.value.id, c.value);
116
+ const h = v();
117
+ if (h.length > 0 && !document.hidden) {
118
+ const c = h.reduce(
119
119
  (w, F) => F.startedAt < w ? F.startedAt : w,
120
- u[0].startedAt
121
- ), i = lt(p);
120
+ h[0].startedAt
121
+ ), i = lt(c);
122
122
  l.current && clearTimeout(l.current), l.current = setTimeout(() => {
123
123
  var w;
124
- (w = s.current) == null || w.call(s);
124
+ (w = a.current) == null || w.call(a);
125
125
  }, i);
126
126
  } else
127
127
  o.current = !1;
128
- }, [h, d, v]);
128
+ }, [p, m, v]);
129
129
  return D(() => {
130
- s.current = C;
130
+ a.current = C;
131
131
  }, [C]), D(() => {
132
132
  var b;
133
- v().length > 0 && n && !o.current && (o.current = !0, (b = s.current) == null || b.call(s));
134
- }, [c, n, v]), D(() => {
133
+ v().length > 0 && n && !o.current && (o.current = !0, (b = a.current) == null || b.call(a));
134
+ }, [d, n, v]), D(() => {
135
135
  var b;
136
136
  const g = v();
137
- n && g.length > 0 && !o.current && (o.current = !0, (b = s.current) == null || b.call(s));
137
+ n && g.length > 0 && !o.current && (o.current = !0, (b = a.current) == null || b.call(a));
138
138
  }, [n, v]), D(() => {
139
139
  !n && l.current && (clearTimeout(l.current), l.current = null, o.current = !1);
140
140
  }, [n]), D(() => () => {
@@ -146,53 +146,53 @@ function wt() {
146
146
  };
147
147
  }
148
148
  function Ct() {
149
- const { authToken: e, tokenProps: a } = R(), c = I((s) => s.activeExports), { addExport: n } = se(), m = L(!1), l = a == null ? void 0 : a.apiServiceUrl, o = e == null ? void 0 : e.accessToken;
149
+ const { authToken: e, tokenProps: s } = R(), d = I((a) => a.activeExports), { addExport: n } = ae(), u = L(!1), l = s == null ? void 0 : s.apiServiceUrl, o = e == null ? void 0 : e.accessToken;
150
150
  D(() => {
151
- if (m.current || !l || !o) return;
151
+ if (u.current || !l || !o) return;
152
152
  (async () => {
153
153
  try {
154
- const { exports: h } = await le(l, o, {
154
+ const { exports: p } = await le(l, o, {
155
155
  status: ["pending", "processing", "chunking", "compacting", "completed", "failed"],
156
156
  limit: 20
157
157
  // Limit to recent exports
158
158
  });
159
- for (const d of h) {
160
- if (c.has(d.id)) continue;
161
- const v = d.totalChunks ? Math.round(d.completedChunks / d.totalChunks * 100) : 0;
159
+ for (const m of p) {
160
+ if (d.has(m.id)) continue;
161
+ const v = m.totalChunks ? Math.round(m.completedChunks / m.totalChunks * 100) : 0;
162
162
  let C;
163
- if (d.status === "completed")
163
+ if (m.status === "completed")
164
164
  try {
165
- C = await $(l, o, d.id);
165
+ C = await $(l, o, m.id);
166
166
  } catch (b) {
167
167
  console.error(
168
- `[useExportRecovery] Failed to get download URL for ${d.id}:`,
168
+ `[useExportRecovery] Failed to get download URL for ${m.id}:`,
169
169
  b
170
170
  );
171
171
  }
172
172
  const g = {
173
- id: d.id,
174
- status: d.status,
173
+ id: m.id,
174
+ status: m.status,
175
175
  progress: v,
176
- title: ct(d),
177
- totalRows: d.totalRows,
178
- totalChunks: d.totalChunks,
179
- completedChunks: d.completedChunks,
180
- startedAt: new Date(d.createdAt),
176
+ title: ct(m),
177
+ totalRows: m.totalRows,
178
+ totalChunks: m.totalChunks,
179
+ completedChunks: m.completedChunks,
180
+ startedAt: new Date(m.createdAt),
181
181
  lastUpdatedAt: /* @__PURE__ */ new Date(),
182
- completedAt: d.completedAt ? new Date(d.completedAt) : void 0,
183
- fileSize: d.fileSize,
184
- error: d.error,
185
- expiresAt: new Date(d.expiresAt),
182
+ completedAt: m.completedAt ? new Date(m.completedAt) : void 0,
183
+ fileSize: m.fileSize,
184
+ error: m.error,
185
+ expiresAt: new Date(m.expiresAt),
186
186
  downloadUrl: C
187
187
  };
188
188
  n(g);
189
189
  }
190
- m.current = !0;
191
- } catch (h) {
192
- console.error("[useExportRecovery] Failed to recover exports:", h), m.current = !0;
190
+ u.current = !0;
191
+ } catch (p) {
192
+ console.error("[useExportRecovery] Failed to recover exports:", p), u.current = !0;
193
193
  }
194
194
  })();
195
- }, [l, o, n, c]);
195
+ }, [l, o, n, d]);
196
196
  }
197
197
  function ct(e) {
198
198
  return e.title ? e.title : B(
@@ -201,32 +201,32 @@ function ct(e) {
201
201
  }
202
202
  function dt({
203
203
  open: e,
204
- onOpenChange: a,
205
- isLibraryVisual: c,
204
+ onOpenChange: s,
205
+ isLibraryVisual: d,
206
206
  currentVisualName: n,
207
- isSaving: m = !1,
207
+ isSaving: u = !1,
208
208
  onConfirm: l
209
209
  }) {
210
- const [o, s] = A(
211
- c && n ? `Copy of ${n}` : n || ""
212
- ), [h, d] = A(""), [v, C] = A(!c), [g, b] = A(!0);
210
+ const [o, a] = A(
211
+ d && n ? `Copy of ${n}` : n || ""
212
+ ), [p, m] = A(""), [v, C] = A(!d), [g, b] = A(!0);
213
213
  oe.useEffect(() => {
214
- e && (s(
215
- c && n ? `Copy of ${n}` : n || ""
216
- ), d(""), C(!c), b(!0));
217
- }, [e, c, n]);
214
+ e && (a(
215
+ d && n ? `Copy of ${n}` : n || ""
216
+ ), m(""), C(!d), b(!0));
217
+ }, [e, d, n]);
218
218
  const y = () => {
219
219
  o.trim() && (!v && !g || l({
220
220
  name: o.trim(),
221
- description: h.trim() || void 0,
221
+ description: p.trim() || void 0,
222
222
  saveToLibrary: v,
223
223
  saveToCurrentDashboard: g
224
224
  }));
225
225
  }, f = o.trim() && (v || g);
226
- return /* @__PURE__ */ t(ce, { open: e, onOpenChange: a, children: /* @__PURE__ */ r(de, { className: "sm:max-w-[425px]", children: [
226
+ return /* @__PURE__ */ t(ce, { open: e, onOpenChange: s, children: /* @__PURE__ */ r(de, { className: "sm:max-w-[425px]", children: [
227
227
  /* @__PURE__ */ r(ue, { children: [
228
228
  /* @__PURE__ */ t(me, { children: "Save Visual As" }),
229
- /* @__PURE__ */ t(he, { children: c ? "Create a copy of this visual with a new name" : "Save this visual to make it reusable" })
229
+ /* @__PURE__ */ t(he, { children: d ? "Create a copy of this visual with a new name" : "Save this visual to make it reusable" })
230
230
  ] }),
231
231
  /* @__PURE__ */ r("div", { className: "grid gap-4 py-4", children: [
232
232
  /* @__PURE__ */ r("div", { className: "grid gap-2", children: [
@@ -236,9 +236,9 @@ function dt({
236
236
  {
237
237
  id: "name",
238
238
  value: o,
239
- onChange: (x) => s(x.target.value),
239
+ onChange: (x) => a(x.target.value),
240
240
  placeholder: "Enter visual name",
241
- disabled: m
241
+ disabled: u
242
242
  }
243
243
  )
244
244
  ] }),
@@ -248,11 +248,11 @@ function dt({
248
248
  fe,
249
249
  {
250
250
  id: "description",
251
- value: h,
252
- onChange: (x) => d(x.target.value),
251
+ value: p,
252
+ onChange: (x) => m(x.target.value),
253
253
  placeholder: "Enter visual description",
254
254
  rows: 3,
255
- disabled: m
255
+ disabled: u
256
256
  }
257
257
  )
258
258
  ] }),
@@ -261,12 +261,12 @@ function dt({
261
261
  /* @__PURE__ */ r("div", { className: "space-y-2", children: [
262
262
  /* @__PURE__ */ r("div", { className: "flex items-center space-x-2", children: [
263
263
  /* @__PURE__ */ t(
264
- H,
264
+ _,
265
265
  {
266
266
  id: "save-to-dashboard",
267
267
  checked: g,
268
268
  onCheckedChange: (x) => b(!!x),
269
- disabled: m
269
+ disabled: u
270
270
  }
271
271
  ),
272
272
  /* @__PURE__ */ r(
@@ -276,19 +276,19 @@ function dt({
276
276
  className: "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",
277
277
  children: [
278
278
  "Current Dashboard",
279
- /* @__PURE__ */ t("span", { className: "ml-2 text-xs text-muted-foreground", children: c ? "(add copy to this dashboard)" : "(keep as local visual)" })
279
+ /* @__PURE__ */ t("span", { className: "ml-2 text-xs text-muted-foreground", children: d ? "(add copy to this dashboard)" : "(keep as local visual)" })
280
280
  ]
281
281
  }
282
282
  )
283
283
  ] }),
284
284
  /* @__PURE__ */ r("div", { className: "flex items-center space-x-2", children: [
285
285
  /* @__PURE__ */ t(
286
- H,
286
+ _,
287
287
  {
288
288
  id: "save-to-library",
289
289
  checked: v,
290
290
  onCheckedChange: (x) => C(!!x),
291
- disabled: m
291
+ disabled: u
292
292
  }
293
293
  ),
294
294
  /* @__PURE__ */ r(
@@ -298,7 +298,7 @@ function dt({
298
298
  className: "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",
299
299
  children: [
300
300
  "Visual Library",
301
- /* @__PURE__ */ t("span", { className: "ml-2 text-xs text-muted-foreground", children: c ? "(save as new reusable visual)" : "(make available to all dashboards)" })
301
+ /* @__PURE__ */ t("span", { className: "ml-2 text-xs text-muted-foreground", children: d ? "(save as new reusable visual)" : "(make available to all dashboards)" })
302
302
  ]
303
303
  }
304
304
  )
@@ -309,46 +309,46 @@ function dt({
309
309
  ] }),
310
310
  /* @__PURE__ */ r(ge, { children: [
311
311
  /* @__PURE__ */ t(
312
- E,
312
+ S,
313
313
  {
314
314
  variant: "outline",
315
- onClick: () => a(!1),
316
- disabled: m,
315
+ onClick: () => s(!1),
316
+ disabled: u,
317
317
  children: "Cancel"
318
318
  }
319
319
  ),
320
- /* @__PURE__ */ r(E, { onClick: y, disabled: !f || m, children: [
321
- m && /* @__PURE__ */ t(_, { className: "mr-2 h-4 w-4 animate-spin" }),
322
- m ? "Saving..." : "Save"
320
+ /* @__PURE__ */ r(S, { onClick: y, disabled: !f || u, children: [
321
+ u && /* @__PURE__ */ t(H, { className: "mr-2 h-4 w-4 animate-spin" }),
322
+ u ? "Saving..." : "Save"
323
323
  ] })
324
324
  ] })
325
325
  ] }) });
326
326
  }
327
327
  function ut() {
328
- const [e, a] = A(!1), [c, n] = A(!1), [m, l] = A(null), o = M((i) => i.frame), s = M((i) => i.card), h = ve(), d = S((i) => i.selectedSheetId), v = S(
328
+ const [e, s] = A(!1), [d, n] = A(!1), [u, l] = A(null), o = M((i) => i.frame), a = M((i) => i.card), p = ve(), m = E((i) => i.selectedSheetId), v = E(
329
329
  (i) => i.actions.setIsDashboardPanelOpen
330
330
  ), { getUpdatedFrame: C } = ne(), { selectVisual: g } = xe(), { addFrame: b, setSelectedFrameId: y, setIsVisualEditing: f } = re(), x = !!(o != null && o.visualId), N = (() => {
331
331
  var i, w;
332
- return ((i = o == null ? void 0 : o.cards) == null ? void 0 : i.length) === 1 && ((w = o.cards[0]) != null && w.title) ? o.cards[0].title : h != null && h.title ? h.title : (s == null ? void 0 : s.title) || "Untitled Visual";
333
- })(), u = be((i) => {
332
+ return ((i = o == null ? void 0 : o.cards) == null ? void 0 : i.length) === 1 && ((w = o.cards[0]) != null && w.title) ? o.cards[0].title : p != null && p.title ? p.title : (a == null ? void 0 : a.title) || "Untitled Visual";
333
+ })(), h = be((i) => {
334
334
  if (i != null && i.id) {
335
- if (g(i), c && m && d) {
335
+ if (g(i), d && u && m) {
336
336
  const w = {
337
- ...m,
337
+ ...u,
338
338
  id: j(),
339
339
  visualId: i.id
340
340
  // Link to the newly created library visual
341
341
  };
342
- b(d, w, "end"), y(w.id), n(!1), l(null), f(!1);
342
+ b(m, w, "end"), y(w.id), n(!1), l(null), f(!1);
343
343
  }
344
- v(!0), a(!1);
344
+ v(!0), s(!1);
345
345
  }
346
346
  });
347
347
  return {
348
348
  saveAsDialogOpen: e,
349
- setSaveAsDialogOpen: a,
349
+ setSaveAsDialogOpen: s,
350
350
  handleSaveAs: async (i) => {
351
- if (!d) {
351
+ if (!m) {
352
352
  U.error("No sheet selected");
353
353
  return;
354
354
  }
@@ -369,7 +369,7 @@ function ut() {
369
369
  // Card title synced for single-card frames
370
370
  isPrivate: !1
371
371
  };
372
- u.mutate(k);
372
+ h.mutate(k);
373
373
  } else if (i.saveToCurrentDashboard) {
374
374
  const k = {
375
375
  ...z,
@@ -378,18 +378,18 @@ function ut() {
378
378
  visualId: void 0
379
379
  // Explicitly no visualId for local visuals
380
380
  };
381
- b(d, k, "end"), y(k.id), U.success("Visual saved to dashboard"), a(!1), f(!1);
381
+ b(m, k, "end"), y(k.id), U.success("Visual saved to dashboard"), s(!1), f(!1);
382
382
  }
383
383
  },
384
384
  isLibraryVisual: x,
385
385
  currentVisualName: N,
386
- isSaving: u.isPending
386
+ isSaving: h.isPending
387
387
  };
388
388
  }
389
389
  function Nt({
390
390
  className: e
391
391
  }) {
392
- const a = M((u) => u.frame), c = M((u) => u.card), n = we((u) => u.selectedVisual), m = S((u) => u.selectedFrameId), l = S((u) => u.selectedSheetId), { setIsVisualEditing: o } = re(), s = !!(a != null && a.visualId || n != null && n.id), h = !!(a != null && a.visualId && m), d = s && !h, {
392
+ const s = M((h) => h.frame), d = M((h) => h.card), n = we((h) => h.selectedVisual), u = E((h) => h.selectedFrameId), l = E((h) => h.selectedSheetId), { setIsVisualEditing: o } = re(), a = !!(s != null && s.visualId || n != null && n.id), p = !!(s != null && s.visualId && u), m = a && !p, {
393
393
  saveAsDialogOpen: v,
394
394
  setSaveAsDialogOpen: C,
395
395
  handleSaveAs: g,
@@ -405,64 +405,64 @@ function Nt({
405
405
  U.error("No visual selected");
406
406
  return;
407
407
  }
408
- const u = await x(n);
409
- u.success ? (U.success("Visual added to dashboard"), o(!1)) : U.error(u.error || "Failed to add visual to dashboard");
408
+ const h = await x(n);
409
+ h.success ? (U.success("Visual added to dashboard"), o(!1)) : U.error(h.error || "Failed to add visual to dashboard");
410
410
  };
411
411
  return /* @__PURE__ */ r(V, { children: [
412
- !s && /* @__PURE__ */ t(Ke, { className: e, variant: "default" }),
413
- s && /* @__PURE__ */ r(V, { children: [
414
- h && /* @__PURE__ */ t(Ye, { className: e }),
415
- d && l && c && (c.sql || Ce(c.config)) && /* @__PURE__ */ r(
416
- E,
412
+ !a && /* @__PURE__ */ t(Je, { className: e, variant: "default" }),
413
+ a && /* @__PURE__ */ r(V, { children: [
414
+ p && /* @__PURE__ */ t(Ke, { className: e }),
415
+ m && l && d && (d.sql || Ce(d.config)) && /* @__PURE__ */ r(
416
+ S,
417
417
  {
418
418
  onClick: N,
419
419
  className: T(e),
420
420
  size: "sm",
421
421
  variant: "outline",
422
422
  children: [
423
- /* @__PURE__ */ t(at, { className: "mr-2 size-4 font-bold" }),
423
+ /* @__PURE__ */ t(st, { className: "mr-2 size-4 font-bold" }),
424
424
  "Add to Dashboard"
425
425
  ]
426
426
  }
427
427
  ),
428
- d && /* @__PURE__ */ t(Qe, { className: e, variant: "default" }),
429
- h && /* @__PURE__ */ t(Ze, { className: e }),
430
- /* @__PURE__ */ r(X, { modal: !1, children: [
428
+ m && /* @__PURE__ */ t(Ye, { className: e, variant: "default" }),
429
+ p && /* @__PURE__ */ t(Ze, { className: e }),
430
+ /* @__PURE__ */ r(G, { modal: !1, children: [
431
431
  /* @__PURE__ */ t(q, { asChild: !0, children: /* @__PURE__ */ t(
432
- E,
432
+ S,
433
433
  {
434
434
  variant: "outline",
435
435
  size: "sm",
436
436
  className: T(e, "w-8 p-0"),
437
- children: /* @__PURE__ */ t(G, { className: "h-4 w-4" })
437
+ children: /* @__PURE__ */ t(X, { className: "h-4 w-4" })
438
438
  }
439
439
  ) }),
440
- /* @__PURE__ */ t(W, { align: "end", children: /* @__PURE__ */ r(
441
- J,
440
+ /* @__PURE__ */ t(Q, { align: "end", children: /* @__PURE__ */ r(
441
+ W,
442
442
  {
443
- onClick: (u) => {
444
- u.stopPropagation(), C(!0);
443
+ onClick: (h) => {
444
+ h.stopPropagation(), C(!0);
445
445
  },
446
446
  children: [
447
- /* @__PURE__ */ t(Y, { className: "mr-2 h-4 w-4" }),
447
+ /* @__PURE__ */ t(K, { className: "mr-2 h-4 w-4" }),
448
448
  "Save As..."
449
449
  ]
450
450
  }
451
451
  ) })
452
452
  ] })
453
453
  ] }),
454
- !s && /* @__PURE__ */ r(X, { modal: !1, children: [
454
+ !a && /* @__PURE__ */ r(G, { modal: !1, children: [
455
455
  /* @__PURE__ */ t(q, { asChild: !0, children: /* @__PURE__ */ t(
456
- E,
456
+ S,
457
457
  {
458
458
  variant: "outline",
459
459
  size: "sm",
460
460
  className: T(e, "w-8 p-0"),
461
- children: /* @__PURE__ */ t(G, { className: "h-4 w-4" })
461
+ children: /* @__PURE__ */ t(X, { className: "h-4 w-4" })
462
462
  }
463
463
  ) }),
464
- /* @__PURE__ */ t(W, { align: "end", children: /* @__PURE__ */ r(J, { onClick: () => C(!0), children: [
465
- /* @__PURE__ */ t(Y, { className: "mr-2 h-4 w-4" }),
464
+ /* @__PURE__ */ t(Q, { align: "end", children: /* @__PURE__ */ r(W, { onClick: () => C(!0), children: [
465
+ /* @__PURE__ */ t(K, { className: "mr-2 h-4 w-4" }),
466
466
  "Save As..."
467
467
  ] }) })
468
468
  ] }),
@@ -471,8 +471,8 @@ function Nt({
471
471
  dt,
472
472
  {
473
473
  open: v,
474
- onOpenChange: (u) => {
475
- f || C(u);
474
+ onOpenChange: (h) => {
475
+ f || C(h);
476
476
  },
477
477
  isLibraryVisual: b,
478
478
  currentVisualName: y,
@@ -485,18 +485,18 @@ function Nt({
485
485
  function yt({
486
486
  className: e,
487
487
  //labelClassName,
488
- switchClassName: a
488
+ switchClassName: s
489
489
  }) {
490
- const c = M((s) => s.isDevMode), n = S((s) => s.isVisualEditing), { setIsDevMode: m } = Ne(), { config: l } = ie(ye).tokenProps, o = (l == null ? void 0 : l.showAdvancedMode) !== !1;
490
+ const d = M((a) => a.isDevMode), n = E((a) => a.isVisualEditing), { setIsDevMode: u } = Ne(), { config: l } = ie(ye).tokenProps, o = (l == null ? void 0 : l.showAdvancedMode) !== !1;
491
491
  return !n || !o ? null : /* @__PURE__ */ r("div", { className: T("flex items-center space-x-2", e), children: [
492
492
  /* @__PURE__ */ t(
493
493
  Ae,
494
494
  {
495
- className: T("", a),
496
- checked: c,
497
- onCheckedChange: () => m(!c),
495
+ className: T("", s),
496
+ checked: d,
497
+ onCheckedChange: () => u(!d),
498
498
  id: "advanced-mode",
499
- icon: /* @__PURE__ */ t(Ee, { className: "h-4 w-4" }),
499
+ icon: /* @__PURE__ */ t(Se, { className: "h-4 w-4" }),
500
500
  tooltip: "Advanced Mode"
501
501
  }
502
502
  ),
@@ -505,13 +505,13 @@ function yt({
505
505
  }
506
506
  function At({
507
507
  open: e,
508
- onOpenChange: a,
509
- onSave: c,
508
+ onOpenChange: s,
509
+ onSave: d,
510
510
  onDiscard: n,
511
- isSaving: m
511
+ isSaving: u
512
512
  }) {
513
- return /* @__PURE__ */ t(Se, { open: e, onOpenChange: (o) => {
514
- !o && m || a(o);
513
+ return /* @__PURE__ */ t(Ee, { open: e, onOpenChange: (o) => {
514
+ !o && u || s(o);
515
515
  }, children: /* @__PURE__ */ r(De, { className: "max-w-md", children: [
516
516
  /* @__PURE__ */ r(Ie, { children: [
517
517
  /* @__PURE__ */ r("div", { className: "flex items-center gap-3", children: [
@@ -524,7 +524,7 @@ function At({
524
524
  /* @__PURE__ */ t(
525
525
  Pe,
526
526
  {
527
- disabled: m,
527
+ disabled: u,
528
528
  className: "order-1 m-0 border-border/50 sm:order-1",
529
529
  children: "Cancel"
530
530
  }
@@ -533,7 +533,7 @@ function At({
533
533
  "button",
534
534
  {
535
535
  onClick: n,
536
- disabled: m,
536
+ disabled: u,
537
537
  className: "order-2 rounded-md border border-destructive/20 bg-destructive/10 px-4 py-2 text-sm font-medium text-destructive transition-colors hover:bg-destructive/20 disabled:pointer-events-none disabled:opacity-50 sm:order-2",
538
538
  children: "Discard"
539
539
  }
@@ -541,11 +541,11 @@ function At({
541
541
  /* @__PURE__ */ t(
542
542
  Me,
543
543
  {
544
- onClick: c,
545
- disabled: m,
544
+ onClick: d,
545
+ disabled: u,
546
546
  className: "order-3 m-0 bg-primary text-primary-foreground hover:bg-primary/90 sm:order-3",
547
- children: m ? /* @__PURE__ */ r(V, { children: [
548
- /* @__PURE__ */ t(_, { className: "mr-2 h-4 w-4 animate-spin" }),
547
+ children: u ? /* @__PURE__ */ r(V, { children: [
548
+ /* @__PURE__ */ t(H, { className: "mr-2 h-4 w-4 animate-spin" }),
549
549
  "Saving..."
550
550
  ] }) : "Save & Close"
551
551
  }
@@ -553,61 +553,61 @@ function At({
553
553
  ] })
554
554
  ] }) });
555
555
  }
556
- function Et(e, a, c, n) {
556
+ function St(e, s, d, n) {
557
557
  D(() => {
558
- e && !c && a && n(Ve(a));
559
- }, [e, c, a, n]);
558
+ e && !d && s && n(Ve(s));
559
+ }, [e, d, s, n]);
560
560
  }
561
- function St({
561
+ function Et({
562
562
  triggerButtonClassName: e
563
563
  }) {
564
- const [a, c] = A(!1), n = S((s) => {
565
- var h;
566
- return (h = s.dashboard) == null ? void 0 : h.id;
567
- }), m = S((s) => {
568
- var h;
569
- return (h = s.dashboard) == null ? void 0 : h.title;
570
- }), l = S((s) => {
571
- var h;
572
- return (h = s.dashboard) == null ? void 0 : h.sheets;
573
- }), o = S((s) => s.selectedSheetId);
574
- return l == null || l.find((s) => s.id === o), n ? /* @__PURE__ */ r(V, { children: [
564
+ const [s, d] = A(!1), n = E((a) => {
565
+ var p;
566
+ return (p = a.dashboard) == null ? void 0 : p.id;
567
+ }), u = E((a) => {
568
+ var p;
569
+ return (p = a.dashboard) == null ? void 0 : p.title;
570
+ }), l = E((a) => {
571
+ var p;
572
+ return (p = a.dashboard) == null ? void 0 : p.sheets;
573
+ }), o = E((a) => a.selectedSheetId);
574
+ return l == null || l.find((a) => a.id === o), n ? /* @__PURE__ */ r(V, { children: [
575
575
  /* @__PURE__ */ t(
576
576
  Le,
577
577
  {
578
578
  tooltip: "Schedule Dashboard",
579
579
  className: T("h-7 p-2", e),
580
- onClick: () => c(!0),
580
+ onClick: () => d(!0),
581
581
  children: /* @__PURE__ */ t(ze, { className: "size-4" })
582
582
  }
583
583
  ),
584
584
  /* @__PURE__ */ t(
585
585
  Oe,
586
586
  {
587
- open: a,
588
- onOpenChange: c,
587
+ open: s,
588
+ onOpenChange: d,
589
589
  dashboardId: n,
590
- dashboardName: m
590
+ dashboardName: u
591
591
  }
592
592
  )
593
593
  ] }) : null;
594
594
  }
595
595
  function mt({
596
596
  export: e,
597
- onRemove: a
597
+ onRemove: s
598
598
  }) {
599
- const c = () => {
599
+ const d = () => {
600
600
  e.downloadUrl && window.open(e.downloadUrl, "_blank");
601
- }, n = (s) => {
602
- s.stopPropagation(), a == null || a(e.id);
603
- }, m = () => {
601
+ }, n = (a) => {
602
+ a.stopPropagation(), s == null || s(e.id);
603
+ }, u = () => {
604
604
  switch (e.status) {
605
605
  case "completed":
606
- return /* @__PURE__ */ t(He, { className: "mt-0.5 h-5 w-5 shrink-0 text-green-600" });
606
+ return /* @__PURE__ */ t(_e, { className: "mt-0.5 h-5 w-5 shrink-0 text-green-600" });
607
607
  case "failed":
608
608
  return /* @__PURE__ */ t(tt, { className: "mt-0.5 h-5 w-5 shrink-0 text-destructive" });
609
609
  default:
610
- return /* @__PURE__ */ t(_, { className: "text-foreground-muted mt-0.5 h-5 w-5 shrink-0 animate-spin" });
610
+ return /* @__PURE__ */ t(H, { className: "text-foreground-muted mt-0.5 h-5 w-5 shrink-0 animate-spin" });
611
611
  }
612
612
  }, l = B(e.status), o = (() => {
613
613
  switch (e.status) {
@@ -626,7 +626,7 @@ function mt({
626
626
  return /* @__PURE__ */ r("div", { className: "group p-4 transition-colors hover:bg-muted/50", children: [
627
627
  /* @__PURE__ */ r("div", { className: "mb-2 flex items-start justify-between gap-3", children: [
628
628
  /* @__PURE__ */ r("div", { className: "flex min-w-0 flex-1 items-start gap-3", children: [
629
- m(),
629
+ u(),
630
630
  /* @__PURE__ */ r("div", { className: "min-w-0 flex-1", children: [
631
631
  /* @__PURE__ */ t("h4", { className: "mb-1 truncate text-sm font-medium", children: e.title }),
632
632
  e.status === "completed" && /* @__PURE__ */ r("div", { className: "flex items-center gap-2 text-xs text-muted-foreground", children: [
@@ -644,7 +644,7 @@ function mt({
644
644
  ] })
645
645
  ] }),
646
646
  /* @__PURE__ */ t(
647
- E,
647
+ S,
648
648
  {
649
649
  variant: "ghost",
650
650
  size: "icon",
@@ -657,14 +657,14 @@ function mt({
657
657
  ] }),
658
658
  /* @__PURE__ */ r("div", { className: "ml-8", children: [
659
659
  e.status === "completed" && /* @__PURE__ */ r("div", { className: "flex items-center justify-between", children: [
660
- /* @__PURE__ */ t("span", { className: "text-xs text-muted-foreground", children: Q(e.startedAt, { addSuffix: !0 }) }),
660
+ /* @__PURE__ */ t("span", { className: "text-xs text-muted-foreground", children: Y(e.startedAt, { addSuffix: !0 }) }),
661
661
  e.downloadUrl && /* @__PURE__ */ r(
662
- E,
662
+ S,
663
663
  {
664
664
  size: "sm",
665
665
  variant: "outline",
666
666
  className: "h-8 bg-transparent",
667
- onClick: c,
667
+ onClick: d,
668
668
  children: [
669
669
  /* @__PURE__ */ t($e, { className: "mr-1.5 h-3.5 w-3.5" }),
670
670
  "Download"
@@ -673,104 +673,103 @@ function mt({
673
673
  )
674
674
  ] }),
675
675
  l && /* @__PURE__ */ r("div", { children: [
676
- /* @__PURE__ */ t(_e, { value: e.progress, className: "h-1.5" }),
676
+ /* @__PURE__ */ t(He, { value: e.progress, className: "h-1.5" }),
677
677
  /* @__PURE__ */ r("span", { className: "mt-1 block text-xs text-muted-foreground", children: [
678
678
  e.progress,
679
679
  "% complete"
680
680
  ] })
681
681
  ] }),
682
- e.status === "failed" && /* @__PURE__ */ t("span", { className: "text-xs text-muted-foreground", children: Q(e.startedAt, { addSuffix: !0 }) })
682
+ e.status === "failed" && /* @__PURE__ */ t("span", { className: "text-xs text-muted-foreground", children: Y(e.startedAt, { addSuffix: !0 }) })
683
683
  ] })
684
684
  ] });
685
685
  }
686
686
  function ht() {
687
- const { authToken: e, tokenProps: a } = R(), c = I((f) => f.activeExports), { clearCompleted: n, removeExport: m, updateExport: l } = se(), [o, s] = A(!1), [h, d] = A(!1), v = Array.from(c.values()).sort(
687
+ const { authToken: e, tokenProps: s } = R(), d = I((f) => f.activeExports), { clearCompleted: n, removeExport: u, updateExport: l } = ae(), [o, a] = A(!1), [p, m] = A(!1), v = Array.from(d.values()).sort(
688
688
  (f, x) => x.startedAt.getTime() - f.startedAt.getTime()
689
689
  ), C = v.some(
690
690
  (f) => f.status === "completed" || f.status === "failed"
691
691
  ), g = P(async () => {
692
- const f = a == null ? void 0 : a.apiServiceUrl, x = e == null ? void 0 : e.accessToken;
692
+ const f = s == null ? void 0 : s.apiServiceUrl, x = e == null ? void 0 : e.accessToken;
693
693
  if (!(!f || !x)) {
694
- s(!0);
694
+ a(!0);
695
695
  try {
696
- const N = Array.from(c.values());
696
+ const N = Array.from(d.values());
697
697
  await Promise.all(
698
- N.map(async (u) => {
698
+ N.map(async (h) => {
699
699
  try {
700
- const p = await ae(f, x, u.id);
700
+ const c = await se(f, x, h.id);
701
701
  let i;
702
- if (p.status === "completed")
702
+ if (c.status === "completed")
703
703
  try {
704
704
  i = await $(
705
705
  f,
706
706
  x,
707
- u.id
707
+ h.id
708
708
  );
709
709
  } catch (w) {
710
- console.error(`Failed to get download URL for ${u.id}:`, w);
710
+ console.error(`Failed to get download URL for ${h.id}:`, w);
711
711
  }
712
- l(u.id, {
713
- status: p.status,
714
- progress: p.progress,
715
- completedChunks: p.completedChunks,
716
- completedAt: p.completedAt ? new Date(p.completedAt) : void 0,
712
+ l(h.id, {
713
+ status: c.status,
714
+ progress: c.progress,
715
+ completedChunks: c.completedChunks,
716
+ completedAt: c.completedAt ? new Date(c.completedAt) : void 0,
717
717
  lastUpdatedAt: /* @__PURE__ */ new Date(),
718
- fileSize: p.fileSize,
719
- error: p.error,
718
+ fileSize: c.fileSize,
719
+ error: c.error,
720
720
  downloadUrl: i
721
721
  });
722
- } catch (p) {
723
- console.error(`Failed to refresh export ${u.id}:`, p);
722
+ } catch (c) {
723
+ console.error(`Failed to refresh export ${h.id}:`, c);
724
724
  }
725
725
  })
726
726
  );
727
727
  } finally {
728
- s(!1);
728
+ a(!1);
729
729
  }
730
730
  }
731
731
  }, [
732
- c,
732
+ d,
733
733
  e == null ? void 0 : e.accessToken,
734
- a == null ? void 0 : a.apiServiceUrl,
734
+ s == null ? void 0 : s.apiServiceUrl,
735
735
  l
736
736
  ]), b = P(async () => {
737
- const f = a == null ? void 0 : a.apiServiceUrl, x = e == null ? void 0 : e.accessToken;
737
+ const f = s == null ? void 0 : s.apiServiceUrl, x = e == null ? void 0 : e.accessToken;
738
738
  if (!f || !x) {
739
739
  n();
740
740
  return;
741
741
  }
742
- d(!0);
742
+ m(!0);
743
743
  try {
744
744
  const N = v.filter(
745
- (u) => u.status === "completed" || u.status === "failed"
745
+ (c) => c.status === "completed" || c.status === "failed"
746
+ ), h = await Promise.allSettled(
747
+ N.map(async (c) => (await J(f, x, c.id), c.id))
746
748
  );
747
- await Promise.all(
748
- N.map(
749
- (u) => K(f, x, u.id).catch(
750
- (p) => console.error(`Failed to delete export ${u.id}:`, p)
751
- )
752
- )
753
- ), n();
749
+ for (const c of h)
750
+ c.status === "fulfilled" ? u(c.value) : console.error("Failed to delete export:", c.reason);
754
751
  } finally {
755
- d(!1);
752
+ m(!1);
756
753
  }
757
754
  }, [
758
755
  v,
759
- a == null ? void 0 : a.apiServiceUrl,
756
+ s == null ? void 0 : s.apiServiceUrl,
760
757
  e == null ? void 0 : e.accessToken,
761
- n
758
+ n,
759
+ u
762
760
  ]), y = P(
763
761
  async (f) => {
764
- const x = a == null ? void 0 : a.apiServiceUrl, N = e == null ? void 0 : e.accessToken;
762
+ const x = s == null ? void 0 : s.apiServiceUrl, N = e == null ? void 0 : e.accessToken;
765
763
  if (x && N)
766
764
  try {
767
- await K(x, N, f);
768
- } catch (u) {
769
- console.error(`Failed to cancel export ${f}:`, u);
765
+ await J(x, N, f), u(f);
766
+ return;
767
+ } catch (h) {
768
+ console.error(`Failed to cancel export ${f}:`, h);
770
769
  }
771
- m(f);
770
+ u(f);
772
771
  },
773
- [a == null ? void 0 : a.apiServiceUrl, e == null ? void 0 : e.accessToken, m]
772
+ [s == null ? void 0 : s.apiServiceUrl, e == null ? void 0 : e.accessToken, u]
774
773
  );
775
774
  return v.length === 0 ? /* @__PURE__ */ r("div", { className: "p-6 text-center", children: [
776
775
  /* @__PURE__ */ t(Z, { className: "mx-auto mb-2 h-8 w-8 text-muted-foreground" }),
@@ -784,7 +783,7 @@ function ht() {
784
783
  ] }),
785
784
  /* @__PURE__ */ r("div", { className: "flex items-center gap-1", children: [
786
785
  /* @__PURE__ */ t(
787
- E,
786
+ S,
788
787
  {
789
788
  variant: "ghost",
790
789
  size: "sm",
@@ -801,14 +800,14 @@ function ht() {
801
800
  }
802
801
  ),
803
802
  C && /* @__PURE__ */ t(
804
- E,
803
+ S,
805
804
  {
806
805
  variant: "ghost",
807
806
  size: "sm",
808
807
  className: "h-7 px-2 text-sm",
809
808
  onClick: b,
810
- disabled: h,
811
- children: h ? "Clearing..." : "Clear all"
809
+ disabled: p,
810
+ children: p ? "Clearing..." : "Clear all"
812
811
  }
813
812
  )
814
813
  ] })
@@ -824,20 +823,20 @@ function ht() {
824
823
  ] });
825
824
  }
826
825
  function Dt() {
827
- const e = I((s) => s.activeExports), a = Xe(), c = e.size > 0, n = Array.from(e.values()).some(
828
- (s) => s.status === "completed" || s.status === "failed"
829
- ), l = a > 0 ? a > 9 ? "9+" : String(a) : null;
826
+ const e = I((a) => a.activeExports), s = Ge(), d = e.size > 0, n = Array.from(e.values()).some(
827
+ (a) => a.status === "completed" || a.status === "failed"
828
+ ), l = s > 0 ? s > 9 ? "9+" : String(s) : null;
830
829
  return /* @__PURE__ */ r(qe, { children: [
831
- /* @__PURE__ */ t(Ge, { asChild: !0, children: /* @__PURE__ */ r(
832
- E,
830
+ /* @__PURE__ */ t(Xe, { asChild: !0, children: /* @__PURE__ */ r(
831
+ S,
833
832
  {
834
833
  variant: "ghost",
835
834
  size: "icon",
836
835
  className: "relative h-8 w-8",
837
836
  "aria-label": "Export notifications",
838
837
  children: [
839
- /* @__PURE__ */ t(We, { className: "h-4 w-4" }),
840
- c && /* @__PURE__ */ t(
838
+ /* @__PURE__ */ t(Qe, { className: "h-4 w-4" }),
839
+ d && /* @__PURE__ */ t(
841
840
  "span",
842
841
  {
843
842
  className: `absolute flex items-center justify-center rounded-full bg-primary text-primary-foreground ${l ? "-right-0.5 -top-0.5 h-4 min-w-4 px-0.5 text-[10px] font-semibold" : "right-0.5 top-0.5 h-2 w-2"}`,
@@ -847,18 +846,18 @@ function Dt() {
847
846
  ]
848
847
  }
849
848
  ) }),
850
- /* @__PURE__ */ t(Je, { className: "w-80 p-0", align: "end", sideOffset: 8, children: /* @__PURE__ */ t(ht, {}) })
849
+ /* @__PURE__ */ t(We, { className: "w-80 p-0", align: "end", sideOffset: 8, children: /* @__PURE__ */ t(ht, {}) })
851
850
  ] });
852
851
  }
853
852
  export {
854
853
  yt as A,
855
- ht as E,
854
+ mt as E,
856
855
  Dt as N,
857
- St as S,
856
+ Et as S,
858
857
  At as U,
859
858
  Nt as V,
860
- mt as a,
859
+ ht as a,
861
860
  Ct as b,
862
- Et as c,
861
+ St as c,
863
862
  wt as u
864
863
  };