react-semaphor 0.1.211 → 0.1.213

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 (28) hide show
  1. package/dist/chunks/{dashboard-controls-CnDq9Uh_.js → dashboard-controls-BcpwRqRu.js} +13 -8
  2. package/dist/chunks/{dashboard-controls-7KpXzAWL.js → dashboard-controls-DG0FT__o.js} +373 -359
  3. package/dist/chunks/{dashboard-json-dqey5VK0.js → dashboard-json-C1b81ShY.js} +1 -1
  4. package/dist/chunks/{dashboard-json-stWvjp2O.js → dashboard-json-F8qwUIWM.js} +1 -1
  5. package/dist/chunks/{dashboard-summary-settings-dialog-DuxhidK1.js → dashboard-summary-settings-dialog-CsjLFOn-.js} +1 -1
  6. package/dist/chunks/{dashboard-summary-settings-dialog-DPEe6XBC.js → dashboard-summary-settings-dialog-yytNDqsJ.js} +1 -1
  7. package/dist/chunks/{edit-dashboard-visual-D_XPr8f8.js → edit-dashboard-visual-B-qAacmt.js} +1 -1
  8. package/dist/chunks/{edit-dashboard-visual-CQAk_UsI.js → edit-dashboard-visual-C-Y0fhBE.js} +2 -2
  9. package/dist/chunks/{editor-action-buttons-D34_GSZu.js → editor-action-buttons-BddCK22U.js} +2 -2
  10. package/dist/chunks/{editor-action-buttons-CH7W6KdH.js → editor-action-buttons-Dr9s7Z0u.js} +1 -1
  11. package/dist/chunks/{index-BfiIPyeS.js → index-irqsC0zR.js} +1 -1
  12. package/dist/chunks/{index-BDS2sWhv.js → index-tdtX3LgC.js} +4 -4
  13. package/dist/chunks/{notification-bell-hijGST9g.js → notification-bell-CRzJdHm5.js} +2 -2
  14. package/dist/chunks/{notification-bell-Cu3qDd9V.js → notification-bell-Ci1RHooZ.js} +137 -135
  15. package/dist/chunks/{resource-management-panel-BvHqslqC.js → resource-management-panel-CaKSsCiq.js} +3 -3
  16. package/dist/chunks/{resource-management-panel-gK3a6OEj.js → resource-management-panel-cwMyqyn1.js} +1 -1
  17. package/dist/chunks/{use-role-aware-display-preferences-a5FH9Y0k.js → use-role-aware-display-preferences-CImfZXy5.js} +1 -1
  18. package/dist/chunks/{use-role-aware-display-preferences-BlR29aKQ.js → use-role-aware-display-preferences-D5eZpiQS.js} +1 -1
  19. package/dist/chunks/{use-visual-utils-ptPsQ3nC.js → use-visual-utils-0xqPjTL6.js} +1 -1
  20. package/dist/chunks/{use-visual-utils-B11AA2fd.js → use-visual-utils-BAVRApHw.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/surfboard/index.cjs +1 -1
  26. package/dist/surfboard/index.js +2 -2
  27. package/dist/types/main.d.ts +3 -1
  28. package/package.json +1 -1
@@ -1,8 +1,8 @@
1
1
  import K, { useState as D, useRef as M, useCallback as k, useEffect as L, useContext as ee } from "react";
2
- import { bS as te, l as z, bM as T, b6 as B, aT as Q, aS as $, bL as Y, aU as ae, m as se, n as re, o as oe, p as ne, q as ie, L as j, cB as le, cH as ce, G as de, B as I, H as _, a1 as P, V as ue, u as V, W as me, Z, cI as he, cJ as H, I as R, bO as pe, c as U, c8 as fe, c9 as ge, ab as ve, cb as be, cc as F, E as xe, cg as we, c7 as ye, Y as Ce, cK as Ne, cL as Ae, cM as De, cp as Ee, cq as Se, cr as Le, cN as Ie, cs as Te, ct as Ue, cu as ke, cv as Ve, cw as Fe, ay as Me, aI as Pe, X as Re, cO as Oe, cP as ze, cQ as Be, ax as q, ad as $e, bN as _e, P as je, s as He, cR as qe, t as Ge } from "./index-BDS2sWhv.js";
3
- import { jsx as t, jsxs as n, Fragment as O } from "react/jsx-runtime";
4
- import { V as Xe, E as We, a as Qe, b as Ye, L as Ze, c as Je, d as Ke, C as et } from "./editor-action-buttons-D34_GSZu.js";
5
- import { a as J } from "./use-visual-utils-ptPsQ3nC.js";
2
+ import { bS as te, l as z, bM as T, b6 as B, aT as Q, aS as $, bL as Y, aU as ae, m as se, n as re, o as oe, p as ne, q as ie, L as j, cB as le, cH as ce, G as de, B as I, H as _, a1 as P, V as ue, u as V, W as me, Z, cI as he, cJ as H, I as R, bO as pe, c as U, c8 as fe, c9 as ge, ab as ve, cb as be, cc as F, E as xe, cg as we, c7 as ye, Y as Ce, cK as Ne, cL as Ae, cM as De, cp as Ee, cq as Se, cr as Le, cN as Ie, cs as Te, ct as Ue, cu as ke, cv as Ve, cw as Fe, ay as Me, aI as Pe, X as Re, cO as Oe, cP as ze, cQ as Be, ax as q, ad as $e, bN as _e, P as je, s as He, cR as qe, t as Ge } from "./index-tdtX3LgC.js";
3
+ import { jsx as t, jsxs as o, Fragment as O } from "react/jsx-runtime";
4
+ import { V as Xe, E as We, a as Qe, b as Ye, L as Ze, c as Je, d as Ke, C as et } from "./editor-action-buttons-BddCK22U.js";
5
+ import { a as J } from "./use-visual-utils-0xqPjTL6.js";
6
6
  import { c as G } from "./date-formatter-Y8Za1ib3.js";
7
7
  /**
8
8
  * @license lucide-react v0.453.0 - ISC
@@ -21,9 +21,9 @@ function nt(e) {
21
21
  return a < rt ? tt : a < ot ? at : st;
22
22
  }
23
23
  function bt() {
24
- const { authToken: e, tokenProps: a } = z(), m = T((h) => h.activeExports), [c, u] = D(
24
+ const { authToken: e, tokenProps: a } = z(), m = T((h) => h.activeExports), [c, d] = D(
25
25
  typeof document < "u" ? !document.hidden : !0
26
- ), d = M(null), l = M(!1), o = M(void 0), f = a == null ? void 0 : a.apiServiceUrl, i = e == null ? void 0 : e.accessToken, g = k(() => {
26
+ ), u = M(null), n = M(!1), l = M(void 0), f = a == null ? void 0 : a.apiServiceUrl, i = e == null ? void 0 : e.accessToken, g = k(() => {
27
27
  const h = T.getState().activeExports;
28
28
  return Array.from(h.values()).filter(
29
29
  (b) => B(b.status)
@@ -32,7 +32,7 @@ function bt() {
32
32
  L(() => {
33
33
  if (typeof document > "u") return;
34
34
  const h = () => {
35
- u(!document.hidden);
35
+ d(!document.hidden);
36
36
  };
37
37
  return document.addEventListener("visibilitychange", h), () => {
38
38
  document.removeEventListener("visibilitychange", h);
@@ -40,12 +40,12 @@ function bt() {
40
40
  }, []);
41
41
  const x = k(async () => {
42
42
  if (!f || !i) {
43
- l.current = !1;
43
+ n.current = !1;
44
44
  return;
45
45
  }
46
46
  const h = g();
47
47
  if (h.length === 0) {
48
- l.current = !1;
48
+ n.current = !1;
49
49
  return;
50
50
  }
51
51
  const b = Date.now(), N = h.filter(
@@ -64,7 +64,7 @@ function bt() {
64
64
  (s) => b - s.startedAt.getTime() <= W
65
65
  );
66
66
  if (p.length === 0) {
67
- l.current = !1;
67
+ n.current = !1;
68
68
  return;
69
69
  }
70
70
  const y = await Promise.allSettled(
@@ -108,39 +108,39 @@ function bt() {
108
108
  (v, E) => E.startedAt < v ? E.startedAt : v,
109
109
  w[0].startedAt
110
110
  ), r = nt(s);
111
- d.current && clearTimeout(d.current), d.current = setTimeout(() => {
111
+ u.current && clearTimeout(u.current), u.current = setTimeout(() => {
112
112
  var v;
113
- (v = o.current) == null || v.call(o);
113
+ (v = l.current) == null || v.call(l);
114
114
  }, r);
115
115
  } else
116
- l.current = !1;
116
+ n.current = !1;
117
117
  }, [f, i, g]);
118
118
  return L(() => {
119
- o.current = x;
119
+ l.current = x;
120
120
  }, [x]), L(() => {
121
121
  var b;
122
- g().length > 0 && c && !l.current && (l.current = !0, (b = o.current) == null || b.call(o));
122
+ g().length > 0 && c && !n.current && (n.current = !0, (b = l.current) == null || b.call(l));
123
123
  }, [m, c, g]), L(() => {
124
124
  var b;
125
125
  const h = g();
126
- c && h.length > 0 && !l.current && (l.current = !0, (b = o.current) == null || b.call(o));
126
+ c && h.length > 0 && !n.current && (n.current = !0, (b = l.current) == null || b.call(l));
127
127
  }, [c, g]), L(() => {
128
- !c && d.current && (clearTimeout(d.current), d.current = null, l.current = !1);
128
+ !c && u.current && (clearTimeout(u.current), u.current = null, n.current = !1);
129
129
  }, [c]), L(() => () => {
130
- d.current && (clearTimeout(d.current), d.current = null);
130
+ u.current && (clearTimeout(u.current), u.current = null);
131
131
  }, []), {
132
- isPolling: l.current,
132
+ isPolling: n.current,
133
133
  isTabVisible: c,
134
134
  inProgressCount: g().length
135
135
  };
136
136
  }
137
137
  function xt() {
138
- const { authToken: e, tokenProps: a } = z(), m = T((o) => o.activeExports), { addExport: c } = Y(), u = M(!1), d = a == null ? void 0 : a.apiServiceUrl, l = e == null ? void 0 : e.accessToken;
138
+ const { authToken: e, tokenProps: a } = z(), m = T((l) => l.activeExports), { addExport: c } = Y(), d = M(!1), u = a == null ? void 0 : a.apiServiceUrl, n = e == null ? void 0 : e.accessToken;
139
139
  L(() => {
140
- if (u.current || !d || !l) return;
140
+ if (d.current || !u || !n) return;
141
141
  (async () => {
142
142
  try {
143
- const { exports: f } = await ae(d, l, {
143
+ const { exports: f } = await ae(u, n, {
144
144
  status: ["pending", "processing", "chunking", "compacting", "completed", "failed"],
145
145
  limit: 20
146
146
  // Limit to recent exports
@@ -151,7 +151,7 @@ function xt() {
151
151
  let x;
152
152
  if (i.status === "completed")
153
153
  try {
154
- x = await $(d, l, i.id);
154
+ x = await $(u, n, i.id);
155
155
  } catch (b) {
156
156
  console.error(
157
157
  `[useExportRecovery] Failed to get download URL for ${i.id}:`,
@@ -176,12 +176,12 @@ function xt() {
176
176
  };
177
177
  c(h);
178
178
  }
179
- u.current = !0;
179
+ d.current = !0;
180
180
  } catch (f) {
181
- console.error("[useExportRecovery] Failed to recover exports:", f), u.current = !0;
181
+ console.error("[useExportRecovery] Failed to recover exports:", f), d.current = !0;
182
182
  }
183
183
  })();
184
- }, [d, l, c, m]);
184
+ }, [u, n, c, m]);
185
185
  }
186
186
  function it(e) {
187
187
  return e.title ? e.title : B(
@@ -193,11 +193,11 @@ function lt({
193
193
  onOpenChange: a,
194
194
  isLibraryVisual: m,
195
195
  currentVisualName: c,
196
- isSaving: u = !1,
197
- destinationMode: d = "both",
198
- onConfirm: l
196
+ isSaving: d = !1,
197
+ destinationMode: u = "both",
198
+ onConfirm: n
199
199
  }) {
200
- const [o, f] = D(
200
+ const [l, f] = D(
201
201
  m && c ? `Copy of ${c}` : c || ""
202
202
  ), [i, g] = D("");
203
203
  K.useEffect(() => {
@@ -205,13 +205,13 @@ function lt({
205
205
  m && c ? `Copy of ${c}` : c || ""
206
206
  ), g(""));
207
207
  }, [e, m, c]);
208
- const x = !!o.trim(), h = d === "local" ? {
208
+ const x = !!l.trim(), h = u === "local" ? {
209
209
  saveToLibrary: !1,
210
210
  saveToCurrentDashboard: !0,
211
211
  badgeType: "local",
212
212
  description: "Creates a local copy on the current dashboard.",
213
213
  actionLabel: "Add to Dashboard (Local)"
214
- } : d === "library" ? {
214
+ } : u === "library" ? {
215
215
  saveToLibrary: !0,
216
216
  saveToCurrentDashboard: !1,
217
217
  badgeType: "library",
@@ -224,16 +224,16 @@ function lt({
224
224
  description: "Creates a new library visual and adds a linked copy to this dashboard.",
225
225
  actionLabel: "Save Copy as Linked Visual"
226
226
  }, b = () => {
227
- !x || u || l({
228
- name: o.trim(),
227
+ !x || d || n({
228
+ name: l.trim(),
229
229
  description: i.trim() || void 0,
230
230
  saveToLibrary: h.saveToLibrary,
231
231
  saveToCurrentDashboard: h.saveToCurrentDashboard
232
232
  });
233
233
  };
234
- return /* @__PURE__ */ t(se, { open: e, onOpenChange: a, children: /* @__PURE__ */ n(re, { className: "sm:max-w-[500px]", children: [
235
- /* @__PURE__ */ n(oe, { children: [
236
- /* @__PURE__ */ n(ne, { className: "flex items-center gap-2", children: [
234
+ return /* @__PURE__ */ t(se, { open: e, onOpenChange: a, children: /* @__PURE__ */ o(re, { className: "sm:max-w-[500px]", children: [
235
+ /* @__PURE__ */ o(oe, { children: [
236
+ /* @__PURE__ */ o(ne, { className: "flex items-center gap-2", children: [
237
237
  /* @__PURE__ */ t("span", { children: "Save Visual As" }),
238
238
  h.badgeType !== "local" && /* @__PURE__ */ t(
239
239
  Xe,
@@ -246,21 +246,21 @@ function lt({
246
246
  ] }),
247
247
  /* @__PURE__ */ t(ie, { children: h.description })
248
248
  ] }),
249
- /* @__PURE__ */ n("div", { className: "grid gap-4 py-4", children: [
250
- /* @__PURE__ */ n("div", { className: "grid gap-2", children: [
249
+ /* @__PURE__ */ o("div", { className: "grid gap-4 py-4", children: [
250
+ /* @__PURE__ */ o("div", { className: "grid gap-2", children: [
251
251
  /* @__PURE__ */ t(j, { htmlFor: "name", children: "Name" }),
252
252
  /* @__PURE__ */ t(
253
253
  le,
254
254
  {
255
255
  id: "name",
256
- value: o,
256
+ value: l,
257
257
  onChange: (N) => f(N.target.value),
258
258
  placeholder: "Enter visual name",
259
- disabled: u
259
+ disabled: d
260
260
  }
261
261
  )
262
262
  ] }),
263
- /* @__PURE__ */ n("div", { className: "grid gap-2", children: [
263
+ /* @__PURE__ */ o("div", { className: "grid gap-2", children: [
264
264
  /* @__PURE__ */ t(j, { htmlFor: "description", children: "Description (optional)" }),
265
265
  /* @__PURE__ */ t(
266
266
  ce,
@@ -270,44 +270,44 @@ function lt({
270
270
  onChange: (N) => g(N.target.value),
271
271
  placeholder: "Enter visual description",
272
272
  rows: 3,
273
- disabled: u
273
+ disabled: d
274
274
  }
275
275
  )
276
276
  ] })
277
277
  ] }),
278
- /* @__PURE__ */ n(de, { children: [
278
+ /* @__PURE__ */ o(de, { children: [
279
279
  /* @__PURE__ */ t(
280
280
  I,
281
281
  {
282
282
  variant: "outline",
283
283
  onClick: () => a(!1),
284
- disabled: u,
284
+ disabled: d,
285
285
  children: "Cancel"
286
286
  }
287
287
  ),
288
- /* @__PURE__ */ n(I, { onClick: b, disabled: !x || u, children: [
289
- u && /* @__PURE__ */ t(_, { className: "mr-2 h-4 w-4 animate-spin" }),
288
+ /* @__PURE__ */ o(I, { onClick: b, disabled: !x || d, children: [
289
+ d && /* @__PURE__ */ t(_, { className: "mr-2 h-4 w-4 animate-spin" }),
290
290
  h.actionLabel
291
291
  ] })
292
292
  ] })
293
293
  ] }) });
294
294
  }
295
295
  function ct() {
296
- const [e, a] = D(!1), [m, c] = D(!1), [u, d] = D(null), l = P((r) => r.frame), o = P((r) => r.card), f = ue(), i = V((r) => r.selectedSheetId), g = V(
296
+ const [e, a] = D(!1), [m, c] = D(!1), [d, u] = D(null), n = P((r) => r.frame), l = P((r) => r.card), f = ue(), i = V((r) => r.selectedSheetId), g = V(
297
297
  (r) => r.actions.setIsDashboardPanelOpen
298
- ), { getUpdatedFrame: x } = J(), { selectVisual: h } = me(), { addFrame: b, setSelectedFrameId: N, setIsVisualEditing: p } = Z(), y = !!(l != null && l.visualId), A = (() => {
298
+ ), { getUpdatedFrame: x } = J(), { selectVisual: h } = me(), { addFrame: b, setSelectedFrameId: N, setIsVisualEditing: p } = Z(), y = !!(n != null && n.visualId), A = (() => {
299
299
  var r, v;
300
- return ((r = l == null ? void 0 : l.cards) == null ? void 0 : r.length) === 1 && ((v = l.cards[0]) != null && v.title) ? l.cards[0].title : f != null && f.title ? f.title : (o == null ? void 0 : o.title) || "Untitled Visual";
300
+ return ((r = n == null ? void 0 : n.cards) == null ? void 0 : r.length) === 1 && ((v = n.cards[0]) != null && v.title) ? n.cards[0].title : f != null && f.title ? f.title : (l == null ? void 0 : l.title) || "Untitled Visual";
301
301
  })(), w = he((r) => {
302
302
  if (r != null && r.id) {
303
- if (h(r), m && u && i) {
303
+ if (h(r), m && d && i) {
304
304
  const v = {
305
- ...u,
305
+ ...d,
306
306
  id: H(),
307
307
  visualId: r.id
308
308
  // Link to the newly created library visual
309
309
  };
310
- b(i, v, "end"), N(v.id), c(!1), d(null), p(!1);
310
+ b(i, v, "end"), N(v.id), c(!1), u(null), p(!1);
311
311
  }
312
312
  g(!0), a(!1);
313
313
  }
@@ -329,7 +329,7 @@ function ct() {
329
329
  }))
330
330
  } : v;
331
331
  if (r.saveToLibrary) {
332
- c(r.saveToCurrentDashboard), d(C);
332
+ c(r.saveToCurrentDashboard), u(C);
333
333
  const S = {
334
334
  title: r.name,
335
335
  description: r.description,
@@ -357,7 +357,7 @@ function ct() {
357
357
  function wt({
358
358
  className: e
359
359
  }) {
360
- const a = P((C) => C.frame), m = pe((C) => C.selectedVisual), c = V((C) => C.selectedFrameId), u = V((C) => C.selectedSheetId), { setIsVisualEditing: d, updateFrame: l } = Z(), [o, f] = D(!1), [i, g] = D("both"), x = !!(a != null && a.visualId || m != null && m.id), h = !!(a != null && a.visualId && c), b = x && !h, {
360
+ const a = P((C) => C.frame), m = pe((C) => C.selectedVisual), c = V((C) => C.selectedFrameId), d = V((C) => C.selectedSheetId), { setIsVisualEditing: u, updateFrame: n } = Z(), [l, f] = D(!1), [i, g] = D("both"), x = !!(a != null && a.visualId || m != null && m.id), h = !!(a != null && a.visualId && c), b = x && !h, {
361
361
  saveAsDialogOpen: N,
362
362
  setSaveAsDialogOpen: p,
363
363
  handleSaveAs: y,
@@ -365,24 +365,24 @@ function wt({
365
365
  currentVisualName: w,
366
366
  isSaving: s
367
367
  } = ct(), { getUpdatedFrame: r } = J(), v = () => {
368
- if (!u) {
368
+ if (!d) {
369
369
  R.error("No sheet selected");
370
370
  return;
371
371
  }
372
- if (o) return;
372
+ if (l) return;
373
373
  f(!0);
374
374
  const S = {
375
375
  ...r(),
376
376
  visualId: void 0
377
377
  };
378
- l(u, S), setTimeout(() => {
379
- f(!1), R.success("Changes applied. Visual is now local to this dashboard"), d(!1);
378
+ n(d, S), setTimeout(() => {
379
+ f(!1), R.success("Changes applied. Visual is now local to this dashboard"), u(!1);
380
380
  }, 300);
381
381
  }, E = (C) => {
382
382
  g(C), p(!0);
383
383
  };
384
- return /* @__PURE__ */ n(O, { children: [
385
- /* @__PURE__ */ n("div", { className: "inline-flex items-center overflow-hidden rounded-md border border-input", children: [
384
+ return /* @__PURE__ */ o(O, { children: [
385
+ /* @__PURE__ */ o("div", { className: "inline-flex items-center overflow-hidden rounded-md border border-input", children: [
386
386
  !x && /* @__PURE__ */ t(
387
387
  We,
388
388
  {
@@ -403,7 +403,7 @@ function wt({
403
403
  className: U(e, "rounded-none border-0")
404
404
  }
405
405
  ),
406
- /* @__PURE__ */ n(fe, { modal: !1, children: [
406
+ /* @__PURE__ */ o(fe, { modal: !1, children: [
407
407
  /* @__PURE__ */ t(ge, { className: "h-8", asChild: !0, children: /* @__PURE__ */ t(
408
408
  I,
409
409
  {
@@ -414,26 +414,26 @@ function wt({
414
414
  "w-8 rounded-none border-0 border-l border-primary-foreground/30 px-2"
415
415
  ),
416
416
  "aria-label": "Open visual save options",
417
- disabled: s || o,
417
+ disabled: s || l,
418
418
  children: /* @__PURE__ */ t(ve, { className: "h-4 w-4" })
419
419
  }
420
420
  ) }),
421
- /* @__PURE__ */ n(be, { align: "end", children: [
422
- h && /* @__PURE__ */ n(O, { children: [
423
- /* @__PURE__ */ n(
421
+ /* @__PURE__ */ o(be, { align: "end", children: [
422
+ h && /* @__PURE__ */ o(O, { children: [
423
+ /* @__PURE__ */ o(
424
424
  F,
425
425
  {
426
426
  onClick: v,
427
- disabled: o,
427
+ disabled: l,
428
428
  children: [
429
429
  /* @__PURE__ */ t(xe, { className: "mr-2 h-4 w-4" }),
430
- o ? "Applying..." : "Apply Locally"
430
+ l ? "Applying..." : "Apply Locally"
431
431
  ]
432
432
  }
433
433
  ),
434
434
  /* @__PURE__ */ t(we, {})
435
435
  ] }),
436
- /* @__PURE__ */ n(
436
+ /* @__PURE__ */ o(
437
437
  F,
438
438
  {
439
439
  onClick: () => E("local"),
@@ -444,7 +444,7 @@ function wt({
444
444
  ]
445
445
  }
446
446
  ),
447
- /* @__PURE__ */ n(
447
+ /* @__PURE__ */ o(
448
448
  F,
449
449
  {
450
450
  onClick: () => E("library"),
@@ -455,7 +455,7 @@ function wt({
455
455
  ]
456
456
  }
457
457
  ),
458
- /* @__PURE__ */ n(
458
+ /* @__PURE__ */ o(
459
459
  F,
460
460
  {
461
461
  onClick: () => E("both"),
@@ -491,14 +491,14 @@ function yt({
491
491
  //labelClassName,
492
492
  switchClassName: a
493
493
  }) {
494
- const m = P((o) => o.isDevMode), c = V((o) => o.isVisualEditing), { setIsDevMode: u } = Ce(), { config: d } = ee(Ne).tokenProps, l = (d == null ? void 0 : d.showAdvancedMode) !== !1;
495
- return !c || !l ? null : /* @__PURE__ */ n("div", { className: U("flex items-center space-x-2", e), children: [
494
+ const m = P((l) => l.isDevMode), c = V((l) => l.isVisualEditing), { setIsDevMode: d } = Ce(), { config: u } = ee(Ne).tokenProps, n = (u == null ? void 0 : u.showAdvancedMode) !== !1;
495
+ return !c || !n ? null : /* @__PURE__ */ o("div", { className: U("flex items-center space-x-2", e), children: [
496
496
  /* @__PURE__ */ t(
497
497
  Ae,
498
498
  {
499
499
  className: U("", a),
500
500
  checked: m,
501
- onCheckedChange: () => u(!m),
501
+ onCheckedChange: () => d(!m),
502
502
  id: "advanced-mode",
503
503
  icon: /* @__PURE__ */ t(De, { className: "h-4 w-4" }),
504
504
  tooltip: "Advanced Mode"
@@ -512,37 +512,37 @@ function Ct({
512
512
  onOpenChange: a,
513
513
  onSave: m,
514
514
  onDiscard: c,
515
- isSaving: u,
516
- title: d = "Unsaved Changes",
517
- description: l = "You have unsaved changes to this dashboard. What would you like to do?",
518
- cancelLabel: o = "Cancel",
515
+ isSaving: d,
516
+ title: u = "Unsaved Changes",
517
+ description: n = "You have unsaved changes to this dashboard. What would you like to do?",
518
+ cancelLabel: l = "Cancel",
519
519
  discardLabel: f = "Discard",
520
520
  saveLabel: i = "Save & Close"
521
521
  }) {
522
522
  return /* @__PURE__ */ t(Ee, { open: e, onOpenChange: (x) => {
523
- !x && u || a(x);
524
- }, children: /* @__PURE__ */ n(Se, { className: "max-w-[520px] border-border/70 p-6", children: [
525
- /* @__PURE__ */ n(Le, { className: "space-y-3", children: [
526
- /* @__PURE__ */ n("div", { className: "flex items-center gap-3", children: [
523
+ !x && d || a(x);
524
+ }, children: /* @__PURE__ */ o(Se, { className: "max-w-[520px] border-border/70 p-6", children: [
525
+ /* @__PURE__ */ o(Le, { className: "space-y-3", children: [
526
+ /* @__PURE__ */ o("div", { className: "flex items-center gap-3", children: [
527
527
  /* @__PURE__ */ t("div", { className: "flex h-9 w-9 items-center justify-center rounded-full bg-amber-50 ring-1 ring-amber-200/70", children: /* @__PURE__ */ t(Ie, { className: "h-[18px] w-[18px] text-amber-600" }) }),
528
- /* @__PURE__ */ t(Te, { className: "text-lg font-semibold tracking-tight", children: d })
528
+ /* @__PURE__ */ t(Te, { className: "text-lg font-semibold tracking-tight", children: u })
529
529
  ] }),
530
- /* @__PURE__ */ t(Ue, { className: "text-sm leading-6 text-muted-foreground", children: l })
530
+ /* @__PURE__ */ t(Ue, { className: "text-sm leading-6 text-muted-foreground", children: n })
531
531
  ] }),
532
- /* @__PURE__ */ n(ke, { className: "mt-2 flex-col gap-1.5 sm:flex-row sm:justify-end", children: [
532
+ /* @__PURE__ */ o(ke, { className: "mt-2 flex-col gap-1.5 sm:flex-row sm:justify-end", children: [
533
533
  /* @__PURE__ */ t(
534
534
  Ve,
535
535
  {
536
- disabled: u,
536
+ disabled: d,
537
537
  className: "order-1 m-0 h-9 border-border/60 px-4 sm:order-1",
538
- children: o
538
+ children: l
539
539
  }
540
540
  ),
541
541
  /* @__PURE__ */ t(
542
542
  "button",
543
543
  {
544
544
  onClick: c,
545
- disabled: u,
545
+ disabled: d,
546
546
  className: "order-2 h-9 rounded-md border border-destructive/30 bg-destructive/10 px-4 text-sm font-medium text-destructive transition-colors hover:bg-destructive/20 disabled:pointer-events-none disabled:opacity-50 sm:order-2",
547
547
  children: f
548
548
  }
@@ -551,9 +551,9 @@ function Ct({
551
551
  Fe,
552
552
  {
553
553
  onClick: m,
554
- disabled: u,
554
+ disabled: d,
555
555
  className: "order-3 m-0 h-9 px-4 sm:order-3",
556
- children: u ? /* @__PURE__ */ n(O, { children: [
556
+ children: d ? /* @__PURE__ */ o(O, { children: [
557
557
  /* @__PURE__ */ t(_, { className: "mr-2 h-4 w-4 animate-spin" }),
558
558
  "Saving..."
559
559
  ] }) : i
@@ -573,9 +573,9 @@ function dt({
573
573
  }) {
574
574
  const m = () => {
575
575
  e.downloadUrl && window.open(e.downloadUrl, "_blank");
576
- }, c = (o) => {
577
- o.stopPropagation(), a == null || a(e.id);
578
- }, u = () => {
576
+ }, c = (l) => {
577
+ l.stopPropagation(), a == null || a(e.id);
578
+ }, d = () => {
579
579
  switch (e.status) {
580
580
  case "completed":
581
581
  return /* @__PURE__ */ t(Be, { className: "mt-0.5 h-5 w-5 shrink-0 text-green-600" });
@@ -584,7 +584,7 @@ function dt({
584
584
  default:
585
585
  return /* @__PURE__ */ t(_, { className: "text-foreground-muted mt-0.5 h-5 w-5 shrink-0 animate-spin" });
586
586
  }
587
- }, d = B(e.status), l = (() => {
587
+ }, u = B(e.status), n = (() => {
588
588
  switch (e.status) {
589
589
  case "pending":
590
590
  return "Queued...";
@@ -598,23 +598,23 @@ function dt({
598
598
  return "Processing...";
599
599
  }
600
600
  })();
601
- return /* @__PURE__ */ n("div", { className: "group p-4 transition-colors hover:bg-muted/50", children: [
602
- /* @__PURE__ */ n("div", { className: "mb-2 flex items-start justify-between gap-3", children: [
603
- /* @__PURE__ */ n("div", { className: "flex min-w-0 flex-1 items-start gap-3", children: [
604
- u(),
605
- /* @__PURE__ */ n("div", { className: "min-w-0 flex-1", children: [
601
+ return /* @__PURE__ */ o("div", { className: "group p-4 transition-colors hover:bg-muted/50", children: [
602
+ /* @__PURE__ */ o("div", { className: "mb-2 flex items-start justify-between gap-3", children: [
603
+ /* @__PURE__ */ o("div", { className: "flex min-w-0 flex-1 items-start gap-3", children: [
604
+ d(),
605
+ /* @__PURE__ */ o("div", { className: "min-w-0 flex-1", children: [
606
606
  /* @__PURE__ */ t("h4", { className: "mb-1 truncate text-sm font-medium", children: e.title }),
607
- e.status === "completed" && /* @__PURE__ */ n("div", { className: "flex items-center gap-2 text-xs text-muted-foreground", children: [
608
- /* @__PURE__ */ n("span", { children: [
607
+ e.status === "completed" && /* @__PURE__ */ o("div", { className: "flex items-center gap-2 text-xs text-muted-foreground", children: [
608
+ /* @__PURE__ */ o("span", { children: [
609
609
  e.totalRows.toLocaleString(),
610
610
  " rows"
611
611
  ] }),
612
- e.fileSize && /* @__PURE__ */ n(O, { children: [
612
+ e.fileSize && /* @__PURE__ */ o(O, { children: [
613
613
  /* @__PURE__ */ t("span", { children: "•" }),
614
614
  /* @__PURE__ */ t("span", { children: Pe(e.fileSize) })
615
615
  ] })
616
616
  ] }),
617
- d && /* @__PURE__ */ t("div", { className: "text-xs text-muted-foreground", children: l }),
617
+ u && /* @__PURE__ */ t("div", { className: "text-xs text-muted-foreground", children: n }),
618
618
  e.status === "failed" && /* @__PURE__ */ t("div", { className: "line-clamp-2 text-xs text-destructive", children: e.error || "Export failed" })
619
619
  ] })
620
620
  ] }),
@@ -630,10 +630,10 @@ function dt({
630
630
  }
631
631
  )
632
632
  ] }),
633
- /* @__PURE__ */ n("div", { className: "ml-8", children: [
634
- e.status === "completed" && /* @__PURE__ */ n("div", { className: "flex items-center justify-between", children: [
633
+ /* @__PURE__ */ o("div", { className: "ml-8", children: [
634
+ e.status === "completed" && /* @__PURE__ */ o("div", { className: "flex items-center justify-between", children: [
635
635
  /* @__PURE__ */ t("span", { className: "text-xs text-muted-foreground", children: G(e.startedAt, { addSuffix: !0 }) }),
636
- e.downloadUrl && /* @__PURE__ */ n(
636
+ e.downloadUrl && /* @__PURE__ */ o(
637
637
  I,
638
638
  {
639
639
  size: "sm",
@@ -647,9 +647,9 @@ function dt({
647
647
  }
648
648
  )
649
649
  ] }),
650
- d && /* @__PURE__ */ n("div", { children: [
650
+ u && /* @__PURE__ */ o("div", { children: [
651
651
  /* @__PURE__ */ t(ze, { value: e.progress, className: "h-1.5" }),
652
- /* @__PURE__ */ n("span", { className: "mt-1 block text-xs text-muted-foreground", children: [
652
+ /* @__PURE__ */ o("span", { className: "mt-1 block text-xs text-muted-foreground", children: [
653
653
  e.progress,
654
654
  "% complete"
655
655
  ] })
@@ -659,14 +659,14 @@ function dt({
659
659
  ] });
660
660
  }
661
661
  function ut() {
662
- const { authToken: e, tokenProps: a } = z(), m = T((p) => p.activeExports), { clearCompleted: c, removeExport: u, updateExport: d } = Y(), [l, o] = D(!1), [f, i] = D(!1), g = Array.from(m.values()).sort(
662
+ const { authToken: e, tokenProps: a } = z(), m = T((p) => p.activeExports), { clearCompleted: c, removeExport: d, updateExport: u } = Y(), [n, l] = D(!1), [f, i] = D(!1), g = Array.from(m.values()).sort(
663
663
  (p, y) => y.startedAt.getTime() - p.startedAt.getTime()
664
664
  ), x = g.some(
665
665
  (p) => p.status === "completed" || p.status === "failed"
666
666
  ), h = k(async () => {
667
667
  const p = a == null ? void 0 : a.apiServiceUrl, y = e == null ? void 0 : e.accessToken;
668
668
  if (!(!p || !y)) {
669
- o(!0);
669
+ l(!0);
670
670
  try {
671
671
  const A = Array.from(m.values());
672
672
  await Promise.all(
@@ -684,7 +684,7 @@ function ut() {
684
684
  } catch (v) {
685
685
  console.error(`Failed to get download URL for ${w.id}:`, v);
686
686
  }
687
- d(w.id, {
687
+ u(w.id, {
688
688
  status: s.status,
689
689
  progress: s.progress,
690
690
  completedChunks: s.completedChunks,
@@ -700,14 +700,14 @@ function ut() {
700
700
  })
701
701
  );
702
702
  } finally {
703
- o(!1);
703
+ l(!1);
704
704
  }
705
705
  }
706
706
  }, [
707
707
  m,
708
708
  e == null ? void 0 : e.accessToken,
709
709
  a == null ? void 0 : a.apiServiceUrl,
710
- d
710
+ u
711
711
  ]), b = k(async () => {
712
712
  const p = a == null ? void 0 : a.apiServiceUrl, y = e == null ? void 0 : e.accessToken;
713
713
  if (!p || !y) {
@@ -722,7 +722,7 @@ function ut() {
722
722
  A.map(async (s) => (await q(p, y, s.id), s.id))
723
723
  );
724
724
  for (const s of w)
725
- s.status === "fulfilled" ? u(s.value) : console.error("Failed to delete export:", s.reason);
725
+ s.status === "fulfilled" ? d(s.value) : console.error("Failed to delete export:", s.reason);
726
726
  } finally {
727
727
  i(!1);
728
728
  }
@@ -731,32 +731,32 @@ function ut() {
731
731
  a == null ? void 0 : a.apiServiceUrl,
732
732
  e == null ? void 0 : e.accessToken,
733
733
  c,
734
- u
734
+ d
735
735
  ]), N = k(
736
736
  async (p) => {
737
737
  const y = a == null ? void 0 : a.apiServiceUrl, A = e == null ? void 0 : e.accessToken;
738
738
  if (y && A)
739
739
  try {
740
- await q(y, A, p), u(p);
740
+ await q(y, A, p), d(p);
741
741
  return;
742
742
  } catch (w) {
743
743
  console.error(`Failed to cancel export ${p}:`, w);
744
744
  }
745
- u(p);
745
+ d(p);
746
746
  },
747
- [a == null ? void 0 : a.apiServiceUrl, e == null ? void 0 : e.accessToken, u]
747
+ [a == null ? void 0 : a.apiServiceUrl, e == null ? void 0 : e.accessToken, d]
748
748
  );
749
- return g.length === 0 ? /* @__PURE__ */ n("div", { className: "p-6 text-center", children: [
749
+ return g.length === 0 ? /* @__PURE__ */ o("div", { className: "p-6 text-center", children: [
750
750
  /* @__PURE__ */ t(X, { className: "mx-auto mb-2 h-8 w-8 text-muted-foreground" }),
751
751
  /* @__PURE__ */ t("p", { className: "text-sm text-muted-foreground", children: "No active exports" }),
752
752
  /* @__PURE__ */ t("p", { className: "mt-1 text-xs text-muted-foreground", children: "Large exports will appear here" })
753
- ] }) : /* @__PURE__ */ n("div", { className: "flex flex-col", children: [
754
- /* @__PURE__ */ n("div", { className: "flex items-center justify-between border-b px-4 py-3", children: [
755
- /* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: [
753
+ ] }) : /* @__PURE__ */ o("div", { className: "flex flex-col", children: [
754
+ /* @__PURE__ */ o("div", { className: "flex items-center justify-between border-b px-4 py-3", children: [
755
+ /* @__PURE__ */ o("div", { className: "flex items-center gap-2", children: [
756
756
  /* @__PURE__ */ t(X, { className: "h-5 w-5 text-muted-foreground" }),
757
757
  /* @__PURE__ */ t("h4", { className: "font-semibold", children: "Exports" })
758
758
  ] }),
759
- /* @__PURE__ */ n("div", { className: "flex items-center gap-1", children: [
759
+ /* @__PURE__ */ o("div", { className: "flex items-center gap-1", children: [
760
760
  /* @__PURE__ */ t(
761
761
  I,
762
762
  {
@@ -764,12 +764,12 @@ function ut() {
764
764
  size: "sm",
765
765
  className: "h-7 w-7 p-0",
766
766
  onClick: h,
767
- disabled: l,
767
+ disabled: n,
768
768
  title: "Refresh status",
769
769
  children: /* @__PURE__ */ t(
770
770
  $e,
771
771
  {
772
- className: `h-4 w-4 ${l ? "animate-spin" : ""}`
772
+ className: `h-4 w-4 ${n ? "animate-spin" : ""}`
773
773
  }
774
774
  )
775
775
  }
@@ -797,25 +797,27 @@ function ut() {
797
797
  )) }) })
798
798
  ] });
799
799
  }
800
- function At() {
801
- const e = T((o) => o.activeExports), a = _e(), m = e.size > 0, c = Array.from(e.values()).some(
802
- (o) => o.status === "completed" || o.status === "failed"
803
- ), d = a > 0 ? a > 9 ? "9+" : String(a) : null;
804
- return /* @__PURE__ */ n(je, { children: [
805
- /* @__PURE__ */ t(He, { asChild: !0, children: /* @__PURE__ */ n(
800
+ function At({
801
+ variant: e
802
+ }) {
803
+ const a = T((f) => f.activeExports), m = _e(), c = a.size > 0, d = Array.from(a.values()).some(
804
+ (f) => f.status === "completed" || f.status === "failed"
805
+ ), n = m > 0 ? m > 9 ? "9+" : String(m) : null;
806
+ return /* @__PURE__ */ o(je, { children: [
807
+ /* @__PURE__ */ t(He, { asChild: !0, children: /* @__PURE__ */ o(
806
808
  I,
807
809
  {
808
- variant: "ghost",
810
+ variant: e ?? "ghost",
809
811
  size: "icon",
810
812
  className: "relative h-8 w-8",
811
813
  "aria-label": "Export notifications",
812
814
  children: [
813
815
  /* @__PURE__ */ t(qe, { className: "h-4 w-4" }),
814
- m && /* @__PURE__ */ t(
816
+ c && /* @__PURE__ */ t(
815
817
  "span",
816
818
  {
817
- 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"}`,
818
- children: d
819
+ className: `absolute flex items-center justify-center rounded-full bg-primary text-primary-foreground ${n ? "-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"}`,
820
+ children: n
819
821
  }
820
822
  )
821
823
  ]