react-semaphor 0.1.205 → 0.1.207

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 (30) hide show
  1. package/dist/chunks/{dashboard-controls-DekrQ0yg.js → dashboard-controls-CwMm9_ki.js} +1 -1
  2. package/dist/chunks/{dashboard-controls-n5_oB_dp.js → dashboard-controls-HlEsqiRq.js} +5 -5
  3. package/dist/chunks/{dashboard-json-VG8uFdaU.js → dashboard-json-CI8wIOzY.js} +1 -1
  4. package/dist/chunks/{dashboard-json-B5YyWsMv.js → dashboard-json-DoYcT7tI.js} +1 -1
  5. package/dist/chunks/{dashboard-summary-settings-dialog-DnfxWTj2.js → dashboard-summary-settings-dialog-eQcHYcAI.js} +1 -1
  6. package/dist/chunks/{dashboard-summary-settings-dialog-B7_fbNYb.js → dashboard-summary-settings-dialog-ioe7ZyFE.js} +1 -1
  7. package/dist/chunks/{edit-dashboard-visual-bl33bktZ.js → edit-dashboard-visual-BotbTTiL.js} +2 -2
  8. package/dist/chunks/{edit-dashboard-visual-BxDQKLvc.js → edit-dashboard-visual-Cl_qfIV_.js} +1 -1
  9. package/dist/chunks/{editor-action-buttons-DngVSXyw.js → editor-action-buttons-B0-mScSZ.js} +2 -2
  10. package/dist/chunks/{editor-action-buttons-BUAzU5tX.js → editor-action-buttons-CcXUQDy4.js} +1 -1
  11. package/dist/chunks/{index-em2ecoK3.js → index-CqOQuBxB.js} +9028 -9078
  12. package/dist/chunks/{index-CtLqMYAL.js → index-plgMsXq1.js} +215 -220
  13. package/dist/chunks/{notification-bell-Ck-SNMez.js → notification-bell-BI-XywDI.js} +271 -272
  14. package/dist/chunks/notification-bell-BSBRPw38.js +11 -0
  15. package/dist/chunks/{resource-management-panel-Ji1DZtnk.js → resource-management-panel-D0q51oXw.js} +1 -1
  16. package/dist/chunks/{resource-management-panel-BGJ4XMn5.js → resource-management-panel-Z8x52dx2.js} +3 -3
  17. package/dist/chunks/{use-role-aware-display-preferences-C0-SK5cT.js → use-role-aware-display-preferences-BWghO18e.js} +1 -1
  18. package/dist/chunks/{use-role-aware-display-preferences-DEkMGyx9.js → use-role-aware-display-preferences-C-m9KEuJ.js} +1 -1
  19. package/dist/chunks/{use-visual-utils-BYBat4tj.js → use-visual-utils-BbVM0bck.js} +1 -1
  20. package/dist/chunks/{use-visual-utils-BLdGPBdR.js → use-visual-utils-DHmGIepC.js} +1 -1
  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 +5 -5
  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 +13 -1
  29. package/package.json +1 -1
  30. package/dist/chunks/notification-bell-BWh1ZNB4.js +0 -11
@@ -1,8 +1,8 @@
1
- import oe, { useState as A, useRef as L, useCallback as P, useEffect as D, useContext as ie } from "react";
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";
1
+ import oe, { useState as A, useRef as L, useCallback as P, useEffect as S, useContext as ie } from "react";
2
+ import { bI as te, l as R, bC as D, 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 E, H, bA as M, bQ as ve, u as I, 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 Ee, ch as Se, 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-CqOQuBxB.js";
3
3
  import { jsx as t, jsxs as r, Fragment as V } from "react/jsx-runtime";
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";
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-B0-mScSZ.js";
5
+ import { a as ne } from "./use-visual-utils-BbVM0bck.js";
6
6
  import { c as Y } from "./date-formatter-Y8Za1ib3.js";
7
7
  /**
8
8
  * @license lucide-react v0.453.0 - ISC
@@ -32,68 +32,68 @@ function lt(e) {
32
32
  return s < ot ? at : s < it ? rt : nt;
33
33
  }
34
34
  function wt() {
35
- const { authToken: e, tokenProps: s } = R(), d = I((g) => g.activeExports), [n, u] = A(
35
+ const { authToken: e, tokenProps: s } = R(), m = D((f) => f.activeExports), [o, c] = A(
36
36
  typeof document < "u" ? !document.hidden : !0
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
- const g = I.getState().activeExports;
39
- return Array.from(g.values()).filter(
37
+ ), d = L(null), a = L(!1), n = L(void 0), x = s == null ? void 0 : s.apiServiceUrl, u = e == null ? void 0 : e.accessToken, g = P(() => {
38
+ const f = D.getState().activeExports;
39
+ return Array.from(f.values()).filter(
40
40
  (b) => B(b.status)
41
41
  );
42
42
  }, []);
43
- D(() => {
43
+ S(() => {
44
44
  if (typeof document > "u") return;
45
- const g = () => {
46
- u(!document.hidden);
45
+ const f = () => {
46
+ c(!document.hidden);
47
47
  };
48
- return document.addEventListener("visibilitychange", g), () => {
49
- document.removeEventListener("visibilitychange", g);
48
+ return document.addEventListener("visibilitychange", f), () => {
49
+ document.removeEventListener("visibilitychange", f);
50
50
  };
51
51
  }, []);
52
52
  const C = P(async () => {
53
- if (!p || !m) {
54
- o.current = !1;
53
+ if (!x || !u) {
54
+ a.current = !1;
55
55
  return;
56
56
  }
57
- const g = v();
58
- if (g.length === 0) {
59
- o.current = !1;
57
+ const f = g();
58
+ if (f.length === 0) {
59
+ a.current = !1;
60
60
  return;
61
61
  }
62
- const b = Date.now(), y = g.filter(
63
- (c) => b - c.startedAt.getTime() > ee
62
+ const b = Date.now(), y = f.filter(
63
+ (l) => b - l.startedAt.getTime() > ee
64
64
  );
65
65
  if (y.length > 0) {
66
- const { updateExport: c } = I.getState().actions;
66
+ const { updateExport: l } = D.getState().actions;
67
67
  for (const i of y)
68
- c(i.id, {
68
+ l(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
- const f = g.filter(
75
- (c) => b - c.startedAt.getTime() <= ee
74
+ const p = f.filter(
75
+ (l) => b - l.startedAt.getTime() <= ee
76
76
  );
77
- if (f.length === 0) {
78
- o.current = !1;
77
+ if (p.length === 0) {
78
+ a.current = !1;
79
79
  return;
80
80
  }
81
- const x = await Promise.allSettled(
82
- f.map(async (c) => {
81
+ const v = await Promise.allSettled(
82
+ p.map(async (l) => {
83
83
  try {
84
- const i = await se(p, m, c.id);
84
+ const i = await se(x, u, l.id);
85
85
  let w;
86
86
  if (i.status === "completed")
87
87
  try {
88
- w = await $(p, m, c.id);
88
+ w = await $(x, u, l.id);
89
89
  } catch (F) {
90
90
  console.error(
91
- `[useExportPolling] Failed to get download URL for ${c.id}:`,
91
+ `[useExportPolling] Failed to get download URL for ${l.id}:`,
92
92
  F
93
93
  );
94
94
  }
95
95
  return {
96
- id: c.id,
96
+ id: l.id,
97
97
  status: i.status,
98
98
  progress: i.progress,
99
99
  completedChunks: i.completedChunks,
@@ -105,94 +105,94 @@ function wt() {
105
105
  };
106
106
  } catch (i) {
107
107
  return console.error(
108
- `[useExportPolling] Failed to poll export ${c.id}:`,
108
+ `[useExportPolling] Failed to poll export ${l.id}:`,
109
109
  i
110
110
  ), null;
111
111
  }
112
112
  })
113
- ), { updateExport: N } = I.getState().actions;
114
- for (const c of x)
115
- c.status === "fulfilled" && c.value && N(c.value.id, c.value);
116
- const h = v();
113
+ ), { updateExport: N } = D.getState().actions;
114
+ for (const l of v)
115
+ l.status === "fulfilled" && l.value && N(l.value.id, l.value);
116
+ const h = g();
117
117
  if (h.length > 0 && !document.hidden) {
118
- const c = h.reduce(
118
+ const l = h.reduce(
119
119
  (w, F) => F.startedAt < w ? F.startedAt : w,
120
120
  h[0].startedAt
121
- ), i = lt(c);
122
- l.current && clearTimeout(l.current), l.current = setTimeout(() => {
121
+ ), i = lt(l);
122
+ d.current && clearTimeout(d.current), d.current = setTimeout(() => {
123
123
  var w;
124
- (w = a.current) == null || w.call(a);
124
+ (w = n.current) == null || w.call(n);
125
125
  }, i);
126
126
  } else
127
- o.current = !1;
128
- }, [p, m, v]);
129
- return D(() => {
130
- a.current = C;
131
- }, [C]), D(() => {
127
+ a.current = !1;
128
+ }, [x, u, g]);
129
+ return S(() => {
130
+ n.current = C;
131
+ }, [C]), S(() => {
132
132
  var b;
133
- v().length > 0 && n && !o.current && (o.current = !0, (b = a.current) == null || b.call(a));
134
- }, [d, n, v]), D(() => {
133
+ g().length > 0 && o && !a.current && (a.current = !0, (b = n.current) == null || b.call(n));
134
+ }, [m, o, g]), S(() => {
135
135
  var b;
136
- const g = v();
137
- n && g.length > 0 && !o.current && (o.current = !0, (b = a.current) == null || b.call(a));
138
- }, [n, v]), D(() => {
139
- !n && l.current && (clearTimeout(l.current), l.current = null, o.current = !1);
140
- }, [n]), D(() => () => {
141
- l.current && (clearTimeout(l.current), l.current = null);
136
+ const f = g();
137
+ o && f.length > 0 && !a.current && (a.current = !0, (b = n.current) == null || b.call(n));
138
+ }, [o, g]), S(() => {
139
+ !o && d.current && (clearTimeout(d.current), d.current = null, a.current = !1);
140
+ }, [o]), S(() => () => {
141
+ d.current && (clearTimeout(d.current), d.current = null);
142
142
  }, []), {
143
- isPolling: o.current,
144
- isTabVisible: n,
145
- inProgressCount: v().length
143
+ isPolling: a.current,
144
+ isTabVisible: o,
145
+ inProgressCount: g().length
146
146
  };
147
147
  }
148
148
  function Ct() {
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
- D(() => {
151
- if (u.current || !l || !o) return;
149
+ const { authToken: e, tokenProps: s } = R(), m = D((n) => n.activeExports), { addExport: o } = ae(), c = L(!1), d = s == null ? void 0 : s.apiServiceUrl, a = e == null ? void 0 : e.accessToken;
150
+ S(() => {
151
+ if (c.current || !d || !a) return;
152
152
  (async () => {
153
153
  try {
154
- const { exports: p } = await le(l, o, {
154
+ const { exports: x } = await le(d, a, {
155
155
  status: ["pending", "processing", "chunking", "compacting", "completed", "failed"],
156
156
  limit: 20
157
157
  // Limit to recent exports
158
158
  });
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;
159
+ for (const u of x) {
160
+ if (m.has(u.id)) continue;
161
+ const g = u.totalChunks ? Math.round(u.completedChunks / u.totalChunks * 100) : 0;
162
162
  let C;
163
- if (m.status === "completed")
163
+ if (u.status === "completed")
164
164
  try {
165
- C = await $(l, o, m.id);
165
+ C = await $(d, a, u.id);
166
166
  } catch (b) {
167
167
  console.error(
168
- `[useExportRecovery] Failed to get download URL for ${m.id}:`,
168
+ `[useExportRecovery] Failed to get download URL for ${u.id}:`,
169
169
  b
170
170
  );
171
171
  }
172
- const g = {
173
- id: m.id,
174
- status: m.status,
175
- progress: v,
176
- title: ct(m),
177
- totalRows: m.totalRows,
178
- totalChunks: m.totalChunks,
179
- completedChunks: m.completedChunks,
180
- startedAt: new Date(m.createdAt),
172
+ const f = {
173
+ id: u.id,
174
+ status: u.status,
175
+ progress: g,
176
+ title: ct(u),
177
+ totalRows: u.totalRows,
178
+ totalChunks: u.totalChunks,
179
+ completedChunks: u.completedChunks,
180
+ startedAt: new Date(u.createdAt),
181
181
  lastUpdatedAt: /* @__PURE__ */ new Date(),
182
- completedAt: m.completedAt ? new Date(m.completedAt) : void 0,
183
- fileSize: m.fileSize,
184
- error: m.error,
185
- expiresAt: new Date(m.expiresAt),
182
+ completedAt: u.completedAt ? new Date(u.completedAt) : void 0,
183
+ fileSize: u.fileSize,
184
+ error: u.error,
185
+ expiresAt: new Date(u.expiresAt),
186
186
  downloadUrl: C
187
187
  };
188
- n(g);
188
+ o(f);
189
189
  }
190
- u.current = !0;
191
- } catch (p) {
192
- console.error("[useExportRecovery] Failed to recover exports:", p), u.current = !0;
190
+ c.current = !0;
191
+ } catch (x) {
192
+ console.error("[useExportRecovery] Failed to recover exports:", x), c.current = !0;
193
193
  }
194
194
  })();
195
- }, [l, o, n, d]);
195
+ }, [d, a, o, m]);
196
196
  }
197
197
  function ct(e) {
198
198
  return e.title ? e.title : B(
@@ -202,31 +202,31 @@ function ct(e) {
202
202
  function dt({
203
203
  open: e,
204
204
  onOpenChange: s,
205
- isLibraryVisual: d,
206
- currentVisualName: n,
207
- isSaving: u = !1,
208
- onConfirm: l
205
+ isLibraryVisual: m,
206
+ currentVisualName: o,
207
+ isSaving: c = !1,
208
+ onConfirm: d
209
209
  }) {
210
- const [o, a] = A(
211
- d && n ? `Copy of ${n}` : n || ""
212
- ), [p, m] = A(""), [v, C] = A(!d), [g, b] = A(!0);
210
+ const [a, n] = A(
211
+ m && o ? `Copy of ${o}` : o || ""
212
+ ), [x, u] = A(""), [g, C] = A(!m), [f, b] = A(!0);
213
213
  oe.useEffect(() => {
214
- e && (a(
215
- d && n ? `Copy of ${n}` : n || ""
216
- ), m(""), C(!d), b(!0));
217
- }, [e, d, n]);
214
+ e && (n(
215
+ m && o ? `Copy of ${o}` : o || ""
216
+ ), u(""), C(!m), b(!0));
217
+ }, [e, m, o]);
218
218
  const y = () => {
219
- o.trim() && (!v && !g || l({
220
- name: o.trim(),
221
- description: p.trim() || void 0,
222
- saveToLibrary: v,
223
- saveToCurrentDashboard: g
219
+ a.trim() && (!g && !f || d({
220
+ name: a.trim(),
221
+ description: x.trim() || void 0,
222
+ saveToLibrary: g,
223
+ saveToCurrentDashboard: f
224
224
  }));
225
- }, f = o.trim() && (v || g);
225
+ }, p = a.trim() && (g || f);
226
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: d ? "Create a copy of this visual with a new name" : "Save this visual to make it reusable" })
229
+ /* @__PURE__ */ t(he, { children: m ? "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: [
@@ -235,10 +235,10 @@ function dt({
235
235
  pe,
236
236
  {
237
237
  id: "name",
238
- value: o,
239
- onChange: (x) => a(x.target.value),
238
+ value: a,
239
+ onChange: (v) => n(v.target.value),
240
240
  placeholder: "Enter visual name",
241
- disabled: u
241
+ disabled: c
242
242
  }
243
243
  )
244
244
  ] }),
@@ -248,11 +248,11 @@ function dt({
248
248
  fe,
249
249
  {
250
250
  id: "description",
251
- value: p,
252
- onChange: (x) => m(x.target.value),
251
+ value: x,
252
+ onChange: (v) => u(v.target.value),
253
253
  placeholder: "Enter visual description",
254
254
  rows: 3,
255
- disabled: u
255
+ disabled: c
256
256
  }
257
257
  )
258
258
  ] }),
@@ -264,9 +264,9 @@ function dt({
264
264
  _,
265
265
  {
266
266
  id: "save-to-dashboard",
267
- checked: g,
268
- onCheckedChange: (x) => b(!!x),
269
- disabled: u
267
+ checked: f,
268
+ onCheckedChange: (v) => b(!!v),
269
+ disabled: c
270
270
  }
271
271
  ),
272
272
  /* @__PURE__ */ r(
@@ -276,7 +276,7 @@ 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: d ? "(add copy to this dashboard)" : "(keep as local visual)" })
279
+ /* @__PURE__ */ t("span", { className: "ml-2 text-xs text-muted-foreground", children: m ? "(add copy to this dashboard)" : "(keep as local visual)" })
280
280
  ]
281
281
  }
282
282
  )
@@ -286,9 +286,9 @@ function dt({
286
286
  _,
287
287
  {
288
288
  id: "save-to-library",
289
- checked: v,
290
- onCheckedChange: (x) => C(!!x),
291
- disabled: u
289
+ checked: g,
290
+ onCheckedChange: (v) => C(!!v),
291
+ disabled: c
292
292
  }
293
293
  ),
294
294
  /* @__PURE__ */ r(
@@ -298,57 +298,57 @@ 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: d ? "(save as new reusable visual)" : "(make available to all dashboards)" })
301
+ /* @__PURE__ */ t("span", { className: "ml-2 text-xs text-muted-foreground", children: m ? "(save as new reusable visual)" : "(make available to all dashboards)" })
302
302
  ]
303
303
  }
304
304
  )
305
305
  ] })
306
306
  ] }),
307
- !v && !g && /* @__PURE__ */ t("p", { className: "text-sm text-destructive", children: "Please select at least one destination" })
307
+ !g && !f && /* @__PURE__ */ t("p", { className: "text-sm text-destructive", children: "Please select at least one destination" })
308
308
  ] })
309
309
  ] }),
310
310
  /* @__PURE__ */ r(ge, { children: [
311
311
  /* @__PURE__ */ t(
312
- S,
312
+ E,
313
313
  {
314
314
  variant: "outline",
315
315
  onClick: () => s(!1),
316
- disabled: u,
316
+ disabled: c,
317
317
  children: "Cancel"
318
318
  }
319
319
  ),
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"
320
+ /* @__PURE__ */ r(E, { onClick: y, disabled: !p || c, children: [
321
+ c && /* @__PURE__ */ t(H, { className: "mr-2 h-4 w-4 animate-spin" }),
322
+ c ? "Saving..." : "Save"
323
323
  ] })
324
324
  ] })
325
325
  ] }) });
326
326
  }
327
327
  function ut() {
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(
328
+ const [e, s] = A(!1), [m, o] = A(!1), [c, d] = A(null), a = M((i) => i.frame), n = M((i) => i.card), x = ve(), u = I((i) => i.selectedSheetId), g = I(
329
329
  (i) => i.actions.setIsDashboardPanelOpen
330
- ), { getUpdatedFrame: C } = ne(), { selectVisual: g } = xe(), { addFrame: b, setSelectedFrameId: y, setIsVisualEditing: f } = re(), x = !!(o != null && o.visualId), N = (() => {
330
+ ), { getUpdatedFrame: C } = ne(), { selectVisual: f } = xe(), { addFrame: b, setSelectedFrameId: y, setIsVisualEditing: p } = re(), v = !!(a != null && a.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 : p != null && p.title ? p.title : (a == null ? void 0 : a.title) || "Untitled Visual";
332
+ return ((i = a == null ? void 0 : a.cards) == null ? void 0 : i.length) === 1 && ((w = a.cards[0]) != null && w.title) ? a.cards[0].title : x != null && x.title ? x.title : (n == null ? void 0 : n.title) || "Untitled Visual";
333
333
  })(), h = be((i) => {
334
334
  if (i != null && i.id) {
335
- if (g(i), d && u && m) {
335
+ if (f(i), m && c && u) {
336
336
  const w = {
337
- ...u,
337
+ ...c,
338
338
  id: j(),
339
339
  visualId: i.id
340
340
  // Link to the newly created library visual
341
341
  };
342
- b(m, w, "end"), y(w.id), n(!1), l(null), f(!1);
342
+ b(u, w, "end"), y(w.id), o(!1), d(null), p(!1);
343
343
  }
344
- v(!0), s(!1);
344
+ g(!0), s(!1);
345
345
  }
346
346
  });
347
347
  return {
348
348
  saveAsDialogOpen: e,
349
349
  setSaveAsDialogOpen: s,
350
350
  handleSaveAs: async (i) => {
351
- if (!m) {
351
+ if (!u) {
352
352
  U.error("No sheet selected");
353
353
  return;
354
354
  }
@@ -361,7 +361,7 @@ function ut() {
361
361
  }))
362
362
  } : w;
363
363
  if (i.saveToLibrary) {
364
- n(i.saveToCurrentDashboard), l(z);
364
+ o(i.saveToCurrentDashboard), d(z);
365
365
  const k = {
366
366
  title: i.name,
367
367
  description: i.description,
@@ -378,10 +378,10 @@ function ut() {
378
378
  visualId: void 0
379
379
  // Explicitly no visualId for local visuals
380
380
  };
381
- b(m, k, "end"), y(k.id), U.success("Visual saved to dashboard"), s(!1), f(!1);
381
+ b(u, k, "end"), y(k.id), U.success("Visual saved to dashboard"), s(!1), p(!1);
382
382
  }
383
383
  },
384
- isLibraryVisual: x,
384
+ isLibraryVisual: v,
385
385
  currentVisualName: N,
386
386
  isSaving: h.isPending
387
387
  };
@@ -389,31 +389,31 @@ function ut() {
389
389
  function Nt({
390
390
  className: e
391
391
  }) {
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
- saveAsDialogOpen: v,
392
+ const s = M((h) => h.frame), m = M((h) => h.card), o = we((h) => h.selectedVisual), c = I((h) => h.selectedFrameId), d = I((h) => h.selectedSheetId), { setIsVisualEditing: a } = re(), n = !!(s != null && s.visualId || o != null && o.id), x = !!(s != null && s.visualId && c), u = n && !x, {
393
+ saveAsDialogOpen: g,
394
394
  setSaveAsDialogOpen: C,
395
- handleSaveAs: g,
395
+ handleSaveAs: f,
396
396
  isLibraryVisual: b,
397
397
  currentVisualName: y,
398
- isSaving: f
399
- } = ut(), { handleAddLibraryVisual: x } = ne(), N = async () => {
400
- if (!l) {
398
+ isSaving: p
399
+ } = ut(), { handleAddLibraryVisual: v } = ne(), N = async () => {
400
+ if (!d) {
401
401
  U.error("No dashboard sheet selected");
402
402
  return;
403
403
  }
404
- if (!n) {
404
+ if (!o) {
405
405
  U.error("No visual selected");
406
406
  return;
407
407
  }
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");
408
+ const h = await v(o);
409
+ h.success ? (U.success("Visual added to dashboard"), a(!1)) : U.error(h.error || "Failed to add visual to dashboard");
410
410
  };
411
411
  return /* @__PURE__ */ r(V, { children: [
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,
412
+ !n && /* @__PURE__ */ t(Je, { className: e, variant: "default" }),
413
+ n && /* @__PURE__ */ r(V, { children: [
414
+ x && /* @__PURE__ */ t(Ke, { className: e }),
415
+ u && d && m && (m.sql || Ce(m.config)) && /* @__PURE__ */ r(
416
+ E,
417
417
  {
418
418
  onClick: N,
419
419
  className: T(e),
@@ -425,11 +425,11 @@ function Nt({
425
425
  ]
426
426
  }
427
427
  ),
428
- m && /* @__PURE__ */ t(Ye, { className: e, variant: "default" }),
429
- p && /* @__PURE__ */ t(Ze, { className: e }),
428
+ u && /* @__PURE__ */ t(Ye, { className: e, variant: "default" }),
429
+ x && /* @__PURE__ */ t(Ze, { className: e }),
430
430
  /* @__PURE__ */ r(G, { modal: !1, children: [
431
431
  /* @__PURE__ */ t(q, { asChild: !0, children: /* @__PURE__ */ t(
432
- S,
432
+ E,
433
433
  {
434
434
  variant: "outline",
435
435
  size: "sm",
@@ -451,9 +451,9 @@ function Nt({
451
451
  ) })
452
452
  ] })
453
453
  ] }),
454
- !a && /* @__PURE__ */ r(G, { modal: !1, children: [
454
+ !n && /* @__PURE__ */ r(G, { modal: !1, children: [
455
455
  /* @__PURE__ */ t(q, { asChild: !0, children: /* @__PURE__ */ t(
456
- S,
456
+ E,
457
457
  {
458
458
  variant: "outline",
459
459
  size: "sm",
@@ -470,14 +470,14 @@ function Nt({
470
470
  /* @__PURE__ */ t(
471
471
  dt,
472
472
  {
473
- open: v,
473
+ open: g,
474
474
  onOpenChange: (h) => {
475
- f || C(h);
475
+ p || C(h);
476
476
  },
477
477
  isLibraryVisual: b,
478
478
  currentVisualName: y,
479
- isSaving: f,
480
- onConfirm: g
479
+ isSaving: p,
480
+ onConfirm: f
481
481
  }
482
482
  )
483
483
  ] });
@@ -487,16 +487,16 @@ function yt({
487
487
  //labelClassName,
488
488
  switchClassName: s
489
489
  }) {
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
- return !n || !o ? null : /* @__PURE__ */ r("div", { className: T("flex items-center space-x-2", e), children: [
490
+ const m = M((n) => n.isDevMode), o = I((n) => n.isVisualEditing), { setIsDevMode: c } = Ne(), { config: d } = ie(ye).tokenProps, a = (d == null ? void 0 : d.showAdvancedMode) !== !1;
491
+ return !o || !a ? null : /* @__PURE__ */ r("div", { className: T("flex items-center space-x-2", e), children: [
492
492
  /* @__PURE__ */ t(
493
493
  Ae,
494
494
  {
495
495
  className: T("", s),
496
- checked: d,
497
- onCheckedChange: () => u(!d),
496
+ checked: m,
497
+ onCheckedChange: () => c(!m),
498
498
  id: "advanced-mode",
499
- icon: /* @__PURE__ */ t(Se, { className: "h-4 w-4" }),
499
+ icon: /* @__PURE__ */ t(Ee, { className: "h-4 w-4" }),
500
500
  tooltip: "Advanced Mode"
501
501
  }
502
502
  ),
@@ -506,12 +506,12 @@ function yt({
506
506
  function At({
507
507
  open: e,
508
508
  onOpenChange: s,
509
- onSave: d,
510
- onDiscard: n,
511
- isSaving: u
509
+ onSave: m,
510
+ onDiscard: o,
511
+ isSaving: c
512
512
  }) {
513
- return /* @__PURE__ */ t(Ee, { open: e, onOpenChange: (o) => {
514
- !o && u || s(o);
513
+ return /* @__PURE__ */ t(Se, { open: e, onOpenChange: (a) => {
514
+ !a && c || s(a);
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: u,
527
+ disabled: c,
528
528
  className: "order-1 m-0 border-border/50 sm:order-1",
529
529
  children: "Cancel"
530
530
  }
@@ -532,8 +532,8 @@ function At({
532
532
  /* @__PURE__ */ t(
533
533
  "button",
534
534
  {
535
- onClick: n,
536
- disabled: u,
535
+ onClick: o,
536
+ disabled: c,
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,10 +541,10 @@ function At({
541
541
  /* @__PURE__ */ t(
542
542
  Me,
543
543
  {
544
- onClick: d,
545
- disabled: u,
544
+ onClick: m,
545
+ disabled: c,
546
546
  className: "order-3 m-0 bg-primary text-primary-foreground hover:bg-primary/90 sm:order-3",
547
- children: u ? /* @__PURE__ */ r(V, { children: [
547
+ children: c ? /* @__PURE__ */ r(V, { children: [
548
548
  /* @__PURE__ */ t(H, { className: "mr-2 h-4 w-4 animate-spin" }),
549
549
  "Saving..."
550
550
  ] }) : "Save & Close"
@@ -553,41 +553,40 @@ function At({
553
553
  ] })
554
554
  ] }) });
555
555
  }
556
- function St(e, s, d, n) {
557
- D(() => {
558
- e && !d && s && n(Ve(s));
559
- }, [e, d, s, n]);
556
+ function Et(e, s, m, o) {
557
+ S(() => {
558
+ e && !m && s && o(Ve(s));
559
+ }, [e, m, s, o]);
560
560
  }
561
- function Et({
562
- triggerButtonClassName: e
561
+ function St({
562
+ triggerButtonClassName: e,
563
+ variant: s = "ghost"
563
564
  }) {
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: [
565
+ const [m, o] = A(!1), c = I((a) => {
566
+ var n;
567
+ return (n = a.dashboard) == null ? void 0 : n.id;
568
+ }), d = I((a) => {
569
+ var n;
570
+ return (n = a.dashboard) == null ? void 0 : n.title;
571
+ });
572
+ return c ? /* @__PURE__ */ r(V, { children: [
575
573
  /* @__PURE__ */ t(
576
574
  Le,
577
575
  {
578
576
  tooltip: "Schedule Dashboard",
579
577
  className: T("h-7 p-2", e),
580
- onClick: () => d(!0),
578
+ buttonProps: { variant: s },
579
+ onClick: () => o(!0),
581
580
  children: /* @__PURE__ */ t(ze, { className: "size-4" })
582
581
  }
583
582
  ),
584
583
  /* @__PURE__ */ t(
585
584
  Oe,
586
585
  {
587
- open: s,
588
- onOpenChange: d,
589
- dashboardId: n,
590
- dashboardName: u
586
+ open: m,
587
+ onOpenChange: o,
588
+ dashboardId: c,
589
+ dashboardName: d
591
590
  }
592
591
  )
593
592
  ] }) : null;
@@ -596,11 +595,11 @@ function mt({
596
595
  export: e,
597
596
  onRemove: s
598
597
  }) {
599
- const d = () => {
598
+ const m = () => {
600
599
  e.downloadUrl && window.open(e.downloadUrl, "_blank");
601
- }, n = (a) => {
602
- a.stopPropagation(), s == null || s(e.id);
603
- }, u = () => {
600
+ }, o = (n) => {
601
+ n.stopPropagation(), s == null || s(e.id);
602
+ }, c = () => {
604
603
  switch (e.status) {
605
604
  case "completed":
606
605
  return /* @__PURE__ */ t(_e, { className: "mt-0.5 h-5 w-5 shrink-0 text-green-600" });
@@ -609,7 +608,7 @@ function mt({
609
608
  default:
610
609
  return /* @__PURE__ */ t(H, { className: "text-foreground-muted mt-0.5 h-5 w-5 shrink-0 animate-spin" });
611
610
  }
612
- }, l = B(e.status), o = (() => {
611
+ }, d = B(e.status), a = (() => {
613
612
  switch (e.status) {
614
613
  case "pending":
615
614
  return "Queued...";
@@ -626,7 +625,7 @@ function mt({
626
625
  return /* @__PURE__ */ r("div", { className: "group p-4 transition-colors hover:bg-muted/50", children: [
627
626
  /* @__PURE__ */ r("div", { className: "mb-2 flex items-start justify-between gap-3", children: [
628
627
  /* @__PURE__ */ r("div", { className: "flex min-w-0 flex-1 items-start gap-3", children: [
629
- u(),
628
+ c(),
630
629
  /* @__PURE__ */ r("div", { className: "min-w-0 flex-1", children: [
631
630
  /* @__PURE__ */ t("h4", { className: "mb-1 truncate text-sm font-medium", children: e.title }),
632
631
  e.status === "completed" && /* @__PURE__ */ r("div", { className: "flex items-center gap-2 text-xs text-muted-foreground", children: [
@@ -639,17 +638,17 @@ function mt({
639
638
  /* @__PURE__ */ t("span", { children: Re(e.fileSize) })
640
639
  ] })
641
640
  ] }),
642
- l && /* @__PURE__ */ t("div", { className: "text-xs text-muted-foreground", children: o }),
641
+ d && /* @__PURE__ */ t("div", { className: "text-xs text-muted-foreground", children: a }),
643
642
  e.status === "failed" && /* @__PURE__ */ t("div", { className: "line-clamp-2 text-xs text-destructive", children: e.error || "Export failed" })
644
643
  ] })
645
644
  ] }),
646
645
  /* @__PURE__ */ t(
647
- S,
646
+ E,
648
647
  {
649
648
  variant: "ghost",
650
649
  size: "icon",
651
650
  className: "h-6 w-6 shrink-0 opacity-0 transition-opacity group-hover:opacity-100",
652
- onClick: n,
651
+ onClick: o,
653
652
  "aria-label": "Remove notification",
654
653
  children: /* @__PURE__ */ t(Be, { className: "h-4 w-4" })
655
654
  }
@@ -659,12 +658,12 @@ function mt({
659
658
  e.status === "completed" && /* @__PURE__ */ r("div", { className: "flex items-center justify-between", children: [
660
659
  /* @__PURE__ */ t("span", { className: "text-xs text-muted-foreground", children: Y(e.startedAt, { addSuffix: !0 }) }),
661
660
  e.downloadUrl && /* @__PURE__ */ r(
662
- S,
661
+ E,
663
662
  {
664
663
  size: "sm",
665
664
  variant: "outline",
666
665
  className: "h-8 bg-transparent",
667
- onClick: d,
666
+ onClick: m,
668
667
  children: [
669
668
  /* @__PURE__ */ t($e, { className: "mr-1.5 h-3.5 w-3.5" }),
670
669
  "Download"
@@ -672,7 +671,7 @@ function mt({
672
671
  }
673
672
  )
674
673
  ] }),
675
- l && /* @__PURE__ */ r("div", { children: [
674
+ d && /* @__PURE__ */ r("div", { children: [
676
675
  /* @__PURE__ */ t(He, { value: e.progress, className: "h-1.5" }),
677
676
  /* @__PURE__ */ r("span", { className: "mt-1 block text-xs text-muted-foreground", children: [
678
677
  e.progress,
@@ -684,94 +683,94 @@ function mt({
684
683
  ] });
685
684
  }
686
685
  function ht() {
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
- (f, x) => x.startedAt.getTime() - f.startedAt.getTime()
689
- ), C = v.some(
690
- (f) => f.status === "completed" || f.status === "failed"
691
- ), g = P(async () => {
692
- const f = s == null ? void 0 : s.apiServiceUrl, x = e == null ? void 0 : e.accessToken;
693
- if (!(!f || !x)) {
694
- a(!0);
686
+ const { authToken: e, tokenProps: s } = R(), m = D((p) => p.activeExports), { clearCompleted: o, removeExport: c, updateExport: d } = ae(), [a, n] = A(!1), [x, u] = A(!1), g = Array.from(m.values()).sort(
687
+ (p, v) => v.startedAt.getTime() - p.startedAt.getTime()
688
+ ), C = g.some(
689
+ (p) => p.status === "completed" || p.status === "failed"
690
+ ), f = P(async () => {
691
+ const p = s == null ? void 0 : s.apiServiceUrl, v = e == null ? void 0 : e.accessToken;
692
+ if (!(!p || !v)) {
693
+ n(!0);
695
694
  try {
696
- const N = Array.from(d.values());
695
+ const N = Array.from(m.values());
697
696
  await Promise.all(
698
697
  N.map(async (h) => {
699
698
  try {
700
- const c = await se(f, x, h.id);
699
+ const l = await se(p, v, h.id);
701
700
  let i;
702
- if (c.status === "completed")
701
+ if (l.status === "completed")
703
702
  try {
704
703
  i = await $(
705
- f,
706
- x,
704
+ p,
705
+ v,
707
706
  h.id
708
707
  );
709
708
  } catch (w) {
710
709
  console.error(`Failed to get download URL for ${h.id}:`, w);
711
710
  }
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,
711
+ d(h.id, {
712
+ status: l.status,
713
+ progress: l.progress,
714
+ completedChunks: l.completedChunks,
715
+ completedAt: l.completedAt ? new Date(l.completedAt) : void 0,
717
716
  lastUpdatedAt: /* @__PURE__ */ new Date(),
718
- fileSize: c.fileSize,
719
- error: c.error,
717
+ fileSize: l.fileSize,
718
+ error: l.error,
720
719
  downloadUrl: i
721
720
  });
722
- } catch (c) {
723
- console.error(`Failed to refresh export ${h.id}:`, c);
721
+ } catch (l) {
722
+ console.error(`Failed to refresh export ${h.id}:`, l);
724
723
  }
725
724
  })
726
725
  );
727
726
  } finally {
728
- a(!1);
727
+ n(!1);
729
728
  }
730
729
  }
731
730
  }, [
732
- d,
731
+ m,
733
732
  e == null ? void 0 : e.accessToken,
734
733
  s == null ? void 0 : s.apiServiceUrl,
735
- l
734
+ d
736
735
  ]), b = P(async () => {
737
- const f = s == null ? void 0 : s.apiServiceUrl, x = e == null ? void 0 : e.accessToken;
738
- if (!f || !x) {
739
- n();
736
+ const p = s == null ? void 0 : s.apiServiceUrl, v = e == null ? void 0 : e.accessToken;
737
+ if (!p || !v) {
738
+ o();
740
739
  return;
741
740
  }
742
- m(!0);
741
+ u(!0);
743
742
  try {
744
- const N = v.filter(
745
- (c) => c.status === "completed" || c.status === "failed"
743
+ const N = g.filter(
744
+ (l) => l.status === "completed" || l.status === "failed"
746
745
  ), h = await Promise.allSettled(
747
- N.map(async (c) => (await J(f, x, c.id), c.id))
746
+ N.map(async (l) => (await J(p, v, l.id), l.id))
748
747
  );
749
- for (const c of h)
750
- c.status === "fulfilled" ? u(c.value) : console.error("Failed to delete export:", c.reason);
748
+ for (const l of h)
749
+ l.status === "fulfilled" ? c(l.value) : console.error("Failed to delete export:", l.reason);
751
750
  } finally {
752
- m(!1);
751
+ u(!1);
753
752
  }
754
753
  }, [
755
- v,
754
+ g,
756
755
  s == null ? void 0 : s.apiServiceUrl,
757
756
  e == null ? void 0 : e.accessToken,
758
- n,
759
- u
757
+ o,
758
+ c
760
759
  ]), y = P(
761
- async (f) => {
762
- const x = s == null ? void 0 : s.apiServiceUrl, N = e == null ? void 0 : e.accessToken;
763
- if (x && N)
760
+ async (p) => {
761
+ const v = s == null ? void 0 : s.apiServiceUrl, N = e == null ? void 0 : e.accessToken;
762
+ if (v && N)
764
763
  try {
765
- await J(x, N, f), u(f);
764
+ await J(v, N, p), c(p);
766
765
  return;
767
766
  } catch (h) {
768
- console.error(`Failed to cancel export ${f}:`, h);
767
+ console.error(`Failed to cancel export ${p}:`, h);
769
768
  }
770
- u(f);
769
+ c(p);
771
770
  },
772
- [s == null ? void 0 : s.apiServiceUrl, e == null ? void 0 : e.accessToken, u]
771
+ [s == null ? void 0 : s.apiServiceUrl, e == null ? void 0 : e.accessToken, c]
773
772
  );
774
- return v.length === 0 ? /* @__PURE__ */ r("div", { className: "p-6 text-center", children: [
773
+ return g.length === 0 ? /* @__PURE__ */ r("div", { className: "p-6 text-center", children: [
775
774
  /* @__PURE__ */ t(Z, { className: "mx-auto mb-2 h-8 w-8 text-muted-foreground" }),
776
775
  /* @__PURE__ */ t("p", { className: "text-sm text-muted-foreground", children: "No active exports" }),
777
776
  /* @__PURE__ */ t("p", { className: "mt-1 text-xs text-muted-foreground", children: "Large exports will appear here" })
@@ -783,52 +782,52 @@ function ht() {
783
782
  ] }),
784
783
  /* @__PURE__ */ r("div", { className: "flex items-center gap-1", children: [
785
784
  /* @__PURE__ */ t(
786
- S,
785
+ E,
787
786
  {
788
787
  variant: "ghost",
789
788
  size: "sm",
790
789
  className: "h-7 w-7 p-0",
791
- onClick: g,
792
- disabled: o,
790
+ onClick: f,
791
+ disabled: a,
793
792
  title: "Refresh status",
794
793
  children: /* @__PURE__ */ t(
795
794
  je,
796
795
  {
797
- className: `h-4 w-4 ${o ? "animate-spin" : ""}`
796
+ className: `h-4 w-4 ${a ? "animate-spin" : ""}`
798
797
  }
799
798
  )
800
799
  }
801
800
  ),
802
801
  C && /* @__PURE__ */ t(
803
- S,
802
+ E,
804
803
  {
805
804
  variant: "ghost",
806
805
  size: "sm",
807
806
  className: "h-7 px-2 text-sm",
808
807
  onClick: b,
809
- disabled: p,
810
- children: p ? "Clearing..." : "Clear all"
808
+ disabled: x,
809
+ children: x ? "Clearing..." : "Clear all"
811
810
  }
812
811
  )
813
812
  ] })
814
813
  ] }),
815
- /* @__PURE__ */ t("div", { className: "max-h-[350px] overflow-y-auto", children: /* @__PURE__ */ t("div", { className: "divide-y", children: v.map((f) => /* @__PURE__ */ t(
814
+ /* @__PURE__ */ t("div", { className: "max-h-[350px] overflow-y-auto", children: /* @__PURE__ */ t("div", { className: "divide-y", children: g.map((p) => /* @__PURE__ */ t(
816
815
  mt,
817
816
  {
818
- export: f,
817
+ export: p,
819
818
  onRemove: y
820
819
  },
821
- f.id
820
+ p.id
822
821
  )) }) })
823
822
  ] });
824
823
  }
825
824
  function Dt() {
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;
825
+ const e = D((n) => n.activeExports), s = Ge(), m = e.size > 0, o = Array.from(e.values()).some(
826
+ (n) => n.status === "completed" || n.status === "failed"
827
+ ), d = s > 0 ? s > 9 ? "9+" : String(s) : null;
829
828
  return /* @__PURE__ */ r(qe, { children: [
830
829
  /* @__PURE__ */ t(Xe, { asChild: !0, children: /* @__PURE__ */ r(
831
- S,
830
+ E,
832
831
  {
833
832
  variant: "ghost",
834
833
  size: "icon",
@@ -836,11 +835,11 @@ function Dt() {
836
835
  "aria-label": "Export notifications",
837
836
  children: [
838
837
  /* @__PURE__ */ t(Qe, { className: "h-4 w-4" }),
839
- d && /* @__PURE__ */ t(
838
+ m && /* @__PURE__ */ t(
840
839
  "span",
841
840
  {
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"}`,
843
- children: l
841
+ className: `absolute flex items-center justify-center rounded-full bg-primary text-primary-foreground ${d ? "-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"}`,
842
+ children: d
844
843
  }
845
844
  )
846
845
  ]
@@ -853,11 +852,11 @@ export {
853
852
  yt as A,
854
853
  mt as E,
855
854
  Dt as N,
856
- Et as S,
855
+ St as S,
857
856
  At as U,
858
857
  Nt as V,
859
858
  ht as a,
860
859
  Ct as b,
861
- St as c,
860
+ Et as c,
862
861
  wt as u
863
862
  };