react-semaphor 0.1.179 → 0.1.180

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-CeT5saB7.js → dashboard-controls-Baw7eUyM.js} +3 -3
  2. package/dist/chunks/{dashboard-controls-O2Vl2SaH.js → dashboard-controls-CS3pAVZi.js} +339 -337
  3. package/dist/chunks/{dashboard-json--jGkpREU.js → dashboard-json-ClalWYi4.js} +1 -1
  4. package/dist/chunks/{dashboard-json-d1qZ8OYo.js → dashboard-json-Cz4bNnCC.js} +1 -1
  5. package/dist/chunks/{edit-dashboard-visual-ViDNkE8Q.js → edit-dashboard-visual-BMElXt-n.js} +30 -35
  6. package/dist/chunks/{edit-dashboard-visual-BsP87bZV.js → edit-dashboard-visual-DFJ5FJ7y.js} +11 -22
  7. package/dist/chunks/editor-action-buttons-DVWnnC_r.js +11 -0
  8. package/dist/chunks/{editor-action-buttons-F4_UU-Mk.js → editor-action-buttons-MtNYw1Bb.js} +57 -45
  9. package/dist/chunks/{index-v6ayK5K2.js → index-CAeKp6K8.js} +22589 -22037
  10. package/dist/chunks/{index-CFWw2cJ5.js → index-CfPKTeUk.js} +232 -227
  11. package/dist/chunks/notification-bell-2dZI5OV0.js +21 -0
  12. package/dist/chunks/notification-bell-YZ8VqdwA.js +870 -0
  13. package/dist/chunks/{resource-management-panel-Cn1aOr6L.js → resource-management-panel-Buhi-kvP.js} +1 -1
  14. package/dist/chunks/{resource-management-panel-CApVr9Vd.js → resource-management-panel-pxL28GXq.js} +133 -133
  15. package/dist/chunks/{use-role-aware-display-preferences-C-N0-Iik.js → use-role-aware-display-preferences-B_i2f9tn.js} +1 -1
  16. package/dist/chunks/{use-role-aware-display-preferences-Bxp6i8c7.js → use-role-aware-display-preferences-JljRcjrP.js} +1 -1
  17. package/dist/chunks/{use-visual-utils-D9lMGeVv.js → use-visual-utils-D3HjbsKO.js} +38 -38
  18. package/dist/chunks/{use-visual-utils-D19qzwzI.js → use-visual-utils-DPEHcmFT.js} +1 -1
  19. package/dist/dashboard/index.cjs +1 -1
  20. package/dist/dashboard/index.js +1 -1
  21. package/dist/index.cjs +1 -6
  22. package/dist/index.js +133 -126
  23. package/dist/style.css +1 -1
  24. package/dist/surfboard/index.cjs +1 -1
  25. package/dist/surfboard/index.js +1 -1
  26. package/dist/types/main.d.ts +262 -0
  27. package/package.json +1 -1
  28. package/dist/chunks/editor-action-buttons-DseT424l.js +0 -6
  29. package/dist/chunks/schedule-dashboard-B4KUKLfW.js +0 -416
  30. package/dist/chunks/schedule-dashboard-vvFw8B1E.js +0 -6
@@ -1,15 +1,15 @@
1
1
  import { jsx as e, jsxs as a, Fragment as ge } from "react/jsx-runtime";
2
- import { l as $e, u as me, n as Qe, aB as re, b9 as Xe, ba as Ze, c as X, bb as ke, aS as et, aT as tt, B as _, aU as st, aV as at, aW as W, bc as pe, L as oe, bd as nt, be as it, bf as rt, bg as ve, bh as De, bi as ot, bj as lt, K as dt, bk as ye, e as le, bl as Se, bm as Ve, bn as ct, _ as Ee, V as Le, bo as Ae, a_ as Te, a$ as Oe, b0 as Re, b2 as Pe, b3 as Ue, b4 as Ie, b5 as je, b6 as Me, bp as ut, bq as ht, br as Fe, bs as Be, bt as ze, bu as mt, bv as He, bw as pt, R as ne, aA as ft, bx as _e, by as gt, bz as Dt, aF as xt, aG as Nt, aH as bt, aI as wt, aJ as vt, aK as Ce, aL as fe, aO as Ct, bA as yt, bB as St, bC as Vt, bD as Et } from "./index-v6ayK5K2.js";
2
+ import { aF as Ze, u as me, au as $e, aO as re, aS as Je, aT as Qe, c as J, aU as ke, aV as et, aW as tt, B as _, aX as st, aY as at, aZ as W, a_ as pe, aG as oe, a$ as nt, b0 as it, b1 as rt, b2 as ve, b3 as De, b4 as ot, b5 as lt, I as dt, b6 as ye, e as le, b7 as Se, b8 as Ee, b9 as ct, L as Ve, R as Le, ba as Ae, bb as Te, bc as Oe, bd as Re, be as Pe, bf as Ue, bg as Ie, bh as je, bi as Fe, bj as ut, bk as ht, bl as Me, bm as ze, bn as Be, bo as mt, bp as He, bq as pt, A as ne, aN as ft, br as _e, bs as gt, bt as Dt, bu as xt, bv as bt, bw as Nt, bx as wt, by as vt, bz as Ce, bA as fe, bB as Ct, bC as yt, bD as St, bE as Et, bF as Vt } from "./index-CAeKp6K8.js";
3
3
  import Lt, { useRef as At, useEffect as ie, useState as x } from "react";
4
- import { a as Ke } from "./use-visual-utils-D9lMGeVv.js";
5
- import { u as Tt } from "./use-role-aware-display-preferences-C-N0-Iik.js";
4
+ import { a as Ge } from "./use-visual-utils-D3HjbsKO.js";
5
+ import { u as Tt } from "./use-role-aware-display-preferences-B_i2f9tn.js";
6
6
  /**
7
7
  * @license lucide-react v0.453.0 - ISC
8
8
  *
9
9
  * This source code is licensed under the ISC license.
10
10
  * See the LICENSE file in the root directory of this source tree.
11
11
  */
12
- const Ot = $e("FolderOpen", [
12
+ const Ot = Ze("FolderOpen", [
13
13
  [
14
14
  "path",
15
15
  {
@@ -30,7 +30,7 @@ function Rt(t, f = {}) {
30
30
  };
31
31
  }, [t, h, r]), o;
32
32
  }
33
- function Ge() {
33
+ function Ke() {
34
34
  return /* @__PURE__ */ e("div", { className: "space-y-1 px-2 py-2", children: [...Array(5)].map((t, f) => /* @__PURE__ */ a(
35
35
  "div",
36
36
  {
@@ -47,7 +47,7 @@ function Ge() {
47
47
  )) });
48
48
  }
49
49
  const Pt = (t) => {
50
- const f = me((o) => o.isVisualEditing), h = me((o) => o.selectedFrameId), r = Qe((o) => o.frame);
50
+ const f = me((o) => o.isVisualEditing), h = me((o) => o.selectedFrameId), r = $e((o) => o.frame);
51
51
  return !!(f && h && (r == null ? void 0 : r.visualId) === t);
52
52
  };
53
53
  function Ut({
@@ -60,15 +60,15 @@ function Ut({
60
60
  onDeleteClick: D,
61
61
  onDuplicateVisual: i,
62
62
  // onTogglePrivacy,
63
- onShareVisual: N,
63
+ onShareVisual: b,
64
64
  formatDate: y
65
65
  }) {
66
66
  var T, S, P, v;
67
- const { selectVisual: d } = re(), c = Xe(t.id), m = Pt(t.id), { isConsoleMode: V } = Ze(), E = Lt.useRef(null), [w, C] = x(!1), [L, A] = x(!1);
67
+ const { selectVisual: d } = re(), c = Je(t.id), m = Pt(t.id), { isConsoleMode: E } = Qe(), V = Lt.useRef(null), [w, C] = x(!1), [L, A] = x(!1);
68
68
  ie(() => {
69
69
  h ? (C(!0), A(!0)) : L && (C(!1), A(!1));
70
70
  }, [h, L]), ie(() => {
71
- m && E.current && E.current.scrollIntoView({
71
+ m && V.current && V.current.scrollIntoView({
72
72
  behavior: "smooth",
73
73
  block: "center"
74
74
  });
@@ -79,8 +79,8 @@ function Ut({
79
79
  return /* @__PURE__ */ a(
80
80
  "div",
81
81
  {
82
- ref: E,
83
- className: X(
82
+ ref: V,
83
+ className: J(
84
84
  "group flex cursor-pointer items-start gap-3 rounded-md px-2 py-2 transition-colors hover:bg-muted",
85
85
  m ? "bg-purple-500/10" : c && "bg-muted/80"
86
86
  ),
@@ -175,7 +175,7 @@ function Ut({
175
175
  W,
176
176
  {
177
177
  onClick: (p) => {
178
- p.stopPropagation(), N(t);
178
+ p.stopPropagation(), b(t);
179
179
  },
180
180
  children: [
181
181
  /* @__PURE__ */ e(rt, { className: "mr-2 h-3 w-3" }),
@@ -201,7 +201,7 @@ function Ut({
201
201
  ] }),
202
202
  /* @__PURE__ */ e(ve, {}),
203
203
  /* @__PURE__ */ a("div", { className: "space-y-1 px-2 py-2 text-xs text-slate-500 dark:text-slate-400", children: [
204
- (((S = t.ownership.createdBy) == null ? void 0 : S.type) === "tenant" || ((P = t.ownership.createdBy) == null ? void 0 : P.type) === "organization" && V) && /* @__PURE__ */ a("div", { className: "flex items-center gap-1", children: [
204
+ (((S = t.ownership.createdBy) == null ? void 0 : S.type) === "tenant" || ((P = t.ownership.createdBy) == null ? void 0 : P.type) === "organization" && E) && /* @__PURE__ */ a("div", { className: "flex items-center gap-1", children: [
205
205
  /* @__PURE__ */ e(ot, { className: "h-3 w-3" }),
206
206
  /* @__PURE__ */ e("span", { children: ((v = t.ownership.createdBy) == null ? void 0 : v.name) || "Unknown" })
207
207
  ] }),
@@ -241,9 +241,9 @@ function Ut({
241
241
  function It({ searchQuery: t }) {
242
242
  const [f, h] = x(!1), [r, o] = x(
243
243
  null
244
- ), [g, D] = x(!1), [i, N] = x(null), [y, d] = x(null), [c, m] = x(
244
+ ), [g, D] = x(!1), [i, b] = x(null), [y, d] = x(null), [c, m] = x(
245
245
  null
246
- ), { selectVisual: V } = re(), { handleEditLibraryVisual: E, handleAddLibraryVisual: w } = Ke(), {
246
+ ), { selectVisual: E } = re(), { handleEditLibraryVisual: V, handleAddLibraryVisual: w } = Ge(), {
247
247
  resources: C,
248
248
  isLoading: L,
249
249
  isError: A,
@@ -253,23 +253,23 @@ function It({ searchQuery: t }) {
253
253
  duplicateResource: P,
254
254
  isDeleting: v,
255
255
  isDuplicating: p,
256
- isUpdating: B
256
+ isUpdating: z
257
257
  } = ye(() => {
258
- D(!1), N(null);
258
+ D(!1), b(null);
259
259
  });
260
260
  le();
261
- const Z = C.filter(
261
+ const Q = C.filter(
262
262
  (n) => {
263
263
  var O, l;
264
264
  return ((O = n == null ? void 0 : n.title) == null ? void 0 : O.toLowerCase().includes(t.toLowerCase())) || ((l = n == null ? void 0 : n.description) == null ? void 0 : l.toLowerCase().includes(t.toLowerCase()));
265
265
  }
266
- ), M = (n) => new Date(n).toLocaleDateString("en-US", {
266
+ ), F = (n) => new Date(n).toLocaleDateString("en-US", {
267
267
  month: "short",
268
268
  day: "numeric",
269
269
  year: "numeric"
270
- }), q = (n) => {
271
- N(n), D(!0);
272
- }, K = () => {
270
+ }), Y = (n) => {
271
+ b(n), D(!0);
272
+ }, G = () => {
273
273
  i && S(i.id);
274
274
  }, {
275
275
  startUpdating: k,
@@ -277,39 +277,39 @@ function It({ searchQuery: t }) {
277
277
  isUpdating: ee
278
278
  } = Se(), te = (n, O, l) => {
279
279
  var ae;
280
- const Y = Object.fromEntries(
280
+ const X = Object.fromEntries(
281
281
  Object.entries(O).filter(([, I]) => I !== void 0)
282
282
  );
283
- if (Object.keys(Y).length === 0) {
283
+ if (Object.keys(X).length === 0) {
284
284
  (ae = l == null ? void 0 : l.onSuccess) == null || ae.call(l);
285
285
  return;
286
286
  }
287
- const $ = Object.keys(Y), Q = $.length === 1 ? $[0] : void 0;
288
- k(n, Q), T(
287
+ const Z = Object.keys(X), $ = Z.length === 1 ? Z[0] : void 0;
288
+ k(n, $), T(
289
289
  {
290
290
  resourceId: n,
291
- data: Y
291
+ data: X
292
292
  },
293
293
  {
294
294
  onSuccess: () => {
295
295
  var I;
296
- R(n, Q), (I = l == null ? void 0 : l.onSuccess) == null || I.call(l);
296
+ R(n, $), (I = l == null ? void 0 : l.onSuccess) == null || I.call(l);
297
297
  },
298
298
  onError: () => {
299
299
  var I;
300
- R(n, Q), (I = l == null ? void 0 : l.onError) == null || I.call(l);
300
+ R(n, $), (I = l == null ? void 0 : l.onError) == null || I.call(l);
301
301
  }
302
302
  }
303
303
  );
304
- }, z = (n) => {
304
+ }, B = (n) => {
305
305
  d(n), P(n, {
306
306
  onSettled: () => d(null)
307
307
  });
308
- }, F = (n) => {
309
- E(n);
310
- }, G = (n) => {
308
+ }, M = (n) => {
309
+ V(n);
310
+ }, K = (n) => {
311
311
  w(n);
312
- }, b = (n) => {
312
+ }, N = (n) => {
313
313
  const O = C.find((l) => l.id === n);
314
314
  O && T({
315
315
  resourceId: n,
@@ -317,7 +317,7 @@ function It({ searchQuery: t }) {
317
317
  isPrivate: !O.isPrivate
318
318
  }
319
319
  });
320
- }, J = (n) => {
320
+ }, q = (n) => {
321
321
  o(n), h(!0);
322
322
  }, se = (n) => {
323
323
  m(n);
@@ -336,7 +336,7 @@ function It({ searchQuery: t }) {
336
336
  }
337
337
  });
338
338
  };
339
- return L ? /* @__PURE__ */ e(Ge, {}) : A ? /* @__PURE__ */ e(Ve, { className: "w-full flex-1 pr-2", children: /* @__PURE__ */ a("div", { className: "py-8 text-center text-muted-foreground", children: [
339
+ return L ? /* @__PURE__ */ e(Ke, {}) : A ? /* @__PURE__ */ e(Ee, { className: "w-full flex-1 pr-2", children: /* @__PURE__ */ a("div", { className: "py-8 text-center text-muted-foreground", children: [
340
340
  /* @__PURE__ */ e("p", { className: "text-sm text-destructive", children: "Failed to load visuals" }),
341
341
  /* @__PURE__ */ e(
342
342
  _,
@@ -349,29 +349,29 @@ function It({ searchQuery: t }) {
349
349
  }
350
350
  )
351
351
  ] }) }) : /* @__PURE__ */ a("div", { className: "flex h-full flex-1 flex-col", children: [
352
- /* @__PURE__ */ e("div", { className: "flex flex-1 basis-0 flex-col gap-3 overflow-y-auto", children: Z.length === 0 ? /* @__PURE__ */ a("div", { className: "py-8 text-center", children: [
352
+ /* @__PURE__ */ e("div", { className: "flex flex-1 basis-0 flex-col gap-3 overflow-y-auto", children: Q.length === 0 ? /* @__PURE__ */ a("div", { className: "py-8 text-center", children: [
353
353
  /* @__PURE__ */ e("div", { className: "mb-3", children: /* @__PURE__ */ e(ct, { className: "mx-auto h-12 w-12 text-muted-foreground/50" }) }),
354
354
  /* @__PURE__ */ e("h3", { className: "mb-1 font-medium text-foreground", children: t ? "No visuals found" : "No visuals yet" }),
355
355
  /* @__PURE__ */ e("p", { className: "text-sm text-muted-foreground", children: t ? "Try adjusting your search" : 'Click "Create" above to add your first visual' })
356
- ] }) : Z.map((n) => /* @__PURE__ */ e(
356
+ ] }) : Q.map((n) => /* @__PURE__ */ e(
357
357
  Ut,
358
358
  {
359
359
  visual: n,
360
- onAddVisual: G,
361
- onOpenVisual: F,
360
+ onAddVisual: K,
361
+ onOpenVisual: M,
362
362
  onEditDetails: se,
363
- onDeleteClick: q,
364
- onDuplicateVisual: z,
365
- onTogglePrivacy: b,
366
- onShareVisual: J,
363
+ onDeleteClick: Y,
364
+ onDuplicateVisual: B,
365
+ onTogglePrivacy: N,
366
+ onShareVisual: q,
367
367
  isDeleting: v,
368
368
  isDuplicating: y === n.id,
369
- formatDate: M
369
+ formatDate: F
370
370
  },
371
371
  n.id
372
372
  )) }),
373
373
  f && r && /* @__PURE__ */ e(
374
- Ee,
374
+ Ve,
375
375
  {
376
376
  resource: r,
377
377
  resourceType: Le.VISUAL,
@@ -397,7 +397,7 @@ function It({ searchQuery: t }) {
397
397
  {
398
398
  open: g,
399
399
  onOpenChange: (n) => {
400
- !n && v || (D(n), n || N(null));
400
+ !n && v || (D(n), n || b(null));
401
401
  },
402
402
  children: /* @__PURE__ */ a(Oe, { children: [
403
403
  /* @__PURE__ */ a(Re, { children: [
@@ -411,10 +411,10 @@ function It({ searchQuery: t }) {
411
411
  /* @__PURE__ */ a(Ie, { children: [
412
412
  /* @__PURE__ */ e(je, { disabled: v, children: "Cancel" }),
413
413
  /* @__PURE__ */ a(
414
- Me,
414
+ Fe,
415
415
  {
416
416
  onClick: (n) => {
417
- n.preventDefault(), n.stopPropagation(), K();
417
+ n.preventDefault(), n.stopPropagation(), G();
418
418
  },
419
419
  className: "bg-destructive text-destructive-foreground hover:bg-destructive/90",
420
420
  disabled: v,
@@ -439,27 +439,27 @@ function jt({
439
439
  onEditDetails: g,
440
440
  onDeleteClick: D,
441
441
  onDuplicateDashboard: i,
442
- onShareDashboard: N,
442
+ onShareDashboard: b,
443
443
  formatDate: y,
444
444
  onDashboardItemClick: d
445
445
  }) {
446
446
  var T, S;
447
- const { selectDashboard: c } = re(), m = ut(t.id), { userContext: V, isLoading: E } = le(), { mutate: w } = ht(), C = ((T = V == null ? void 0 : V.permissions) == null ? void 0 : T.canEdit) ?? !1, L = E || !C, A = () => {
447
+ const { selectDashboard: c } = re(), m = ut(t.id), { userContext: E, isLoading: V } = le(), { mutate: w } = ht(), C = ((T = E == null ? void 0 : E.permissions) == null ? void 0 : T.canEdit) ?? !1, L = V || !C, A = () => {
448
448
  c(t), o(t.id), d == null || d(t.id);
449
449
  }, j = (P) => {
450
450
  P.stopPropagation(), w({ dashboardId: r ? null : t.id });
451
451
  };
452
- return /* @__PURE__ */ e(Fe, { children: /* @__PURE__ */ a(
452
+ return /* @__PURE__ */ e(Me, { children: /* @__PURE__ */ a(
453
453
  "div",
454
454
  {
455
- className: X(
455
+ className: J(
456
456
  "group flex cursor-pointer items-start gap-3 rounded-md px-2 py-2 transition-colors hover:bg-muted",
457
457
  m && "bg-muted/80"
458
458
  ),
459
459
  onClick: A,
460
460
  children: [
461
- /* @__PURE__ */ a(Be, { children: [
462
- /* @__PURE__ */ e(ze, { asChild: !0, children: /* @__PURE__ */ e(
461
+ /* @__PURE__ */ a(ze, { children: [
462
+ /* @__PURE__ */ e(Be, { asChild: !0, children: /* @__PURE__ */ e(
463
463
  "button",
464
464
  {
465
465
  onClick: j,
@@ -467,7 +467,7 @@ function jt({
467
467
  children: /* @__PURE__ */ e(
468
468
  mt,
469
469
  {
470
- className: X(
470
+ className: J(
471
471
  "h-4 w-4 transition-colors",
472
472
  r ? "fill-yellow-400 text-yellow-400" : "text-muted-foreground/40 hover:text-yellow-400"
473
473
  )
@@ -506,7 +506,7 @@ function jt({
506
506
  onEditDetails: g,
507
507
  onDeleteClick: D,
508
508
  onDuplicateDashboard: i,
509
- onShareDashboard: N,
509
+ onShareDashboard: b,
510
510
  formatDate: y
511
511
  }
512
512
  ) })
@@ -516,17 +516,17 @@ function jt({
516
516
  t.id
517
517
  ) });
518
518
  }
519
- function Mt({ onRetry: t }) {
520
- return /* @__PURE__ */ e(Ve, { className: "w-full flex-1 pr-2", children: /* @__PURE__ */ a("div", { className: "py-8 text-center text-muted-foreground", children: [
519
+ function Ft({ onRetry: t }) {
520
+ return /* @__PURE__ */ e(Ee, { className: "w-full flex-1 pr-2", children: /* @__PURE__ */ a("div", { className: "py-8 text-center text-muted-foreground", children: [
521
521
  /* @__PURE__ */ e("p", { className: "text-sm text-destructive", children: "Failed to load dashboards" }),
522
522
  /* @__PURE__ */ e(_, { variant: "outline", size: "sm", className: "mt-2", onClick: t, children: "Retry" })
523
523
  ] }) });
524
524
  }
525
- function Ft(t) {
526
- var xe, Ne;
527
- const { searchQuery: f, onLoadDashboard: h, onEditDashboard: r, onDashboardItemClick: o } = t, [g, D] = x(!1), [i, N] = x(
525
+ function Mt(t) {
526
+ var xe, be;
527
+ const { searchQuery: f, onLoadDashboard: h, onEditDashboard: r, onDashboardItemClick: o } = t, [g, D] = x(!1), [i, b] = x(
528
528
  null
529
- ), [y, d] = x(!1), [c, m] = x(null), [V, E] = x(null), [w, C] = x(null), L = ne(
529
+ ), [y, d] = x(!1), [c, m] = x(null), [E, V] = x(null), [w, C] = x(null), L = ne(
530
530
  (s) => s.lastSelectedDashboard
531
531
  ), A = ne(
532
532
  (s) => s.selectedDashboard
@@ -539,11 +539,11 @@ function Ft(t) {
539
539
  const {
540
540
  resources: v,
541
541
  isLoading: p,
542
- isError: B,
543
- isFetching: Z,
544
- updateResource: M,
545
- deleteResource: q,
546
- duplicateResource: K,
542
+ isError: z,
543
+ isFetching: Q,
544
+ updateResource: F,
545
+ deleteResource: Y,
546
+ duplicateResource: G,
547
547
  isUpdating: k,
548
548
  isDeleting: R,
549
549
  isDuplicating: ee,
@@ -552,7 +552,7 @@ function Ft(t) {
552
552
  d(!1);
553
553
  const s = c == null ? void 0 : c.id;
554
554
  m(null), (A == null ? void 0 : A.id) === s && (!(S != null && S.dashboard_id) && !P ? T() : L && L.id !== s && j(L));
555
- }), { currentUser: z, userContext: F } = le(), G = ((xe = F == null ? void 0 : F.permissions) == null ? void 0 : xe.canCreateDashboard) ?? !1, { data: b } = gt(), J = ((Ne = b == null ? void 0 : b.preference) == null ? void 0 : Ne.defaultDashboardId) || null, se = v.filter(
555
+ }), { currentUser: B, userContext: M } = le(), K = ((xe = M == null ? void 0 : M.permissions) == null ? void 0 : xe.canCreateDashboard) ?? !1, { data: N } = gt(), q = ((be = N == null ? void 0 : N.preference) == null ? void 0 : be.defaultDashboardId) || null, se = v.filter(
556
556
  (s) => {
557
557
  var U, u;
558
558
  return ((U = s == null ? void 0 : s.title) == null ? void 0 : U.toLowerCase().includes(f.toLowerCase())) || ((u = s == null ? void 0 : s.description) == null ? void 0 : u.toLowerCase().includes(f.toLowerCase()));
@@ -566,15 +566,15 @@ function Ft(t) {
566
566
  }, n = (s) => {
567
567
  m(s), d(!0);
568
568
  }, O = () => {
569
- c && q(c.id);
569
+ c && Y(c.id);
570
570
  }, l = (s) => {
571
- E(s), K(s, {
572
- onSettled: () => E(null)
571
+ V(s), G(s, {
572
+ onSettled: () => V(null)
573
573
  });
574
574
  }, {
575
- startUpdating: Y,
576
- stopUpdating: $,
577
- isUpdating: Q
575
+ startUpdating: X,
576
+ stopUpdating: Z,
577
+ isUpdating: $
578
578
  } = Se(), ae = (s, U, u) => {
579
579
  var we;
580
580
  const ue = Object.fromEntries(
@@ -584,8 +584,8 @@ function Ft(t) {
584
584
  (we = u == null ? void 0 : u.onSuccess) == null || we.call(u);
585
585
  return;
586
586
  }
587
- const be = Object.keys(ue), he = be.length === 1 ? be[0] : void 0;
588
- Y(s, he), M(
587
+ const Ne = Object.keys(ue), he = Ne.length === 1 ? Ne[0] : void 0;
588
+ X(s, he), F(
589
589
  {
590
590
  resourceId: s,
591
591
  data: ue
@@ -593,11 +593,11 @@ function Ft(t) {
593
593
  {
594
594
  onSuccess: () => {
595
595
  var H;
596
- $(s, he), (H = u == null ? void 0 : u.onSuccess) == null || H.call(u);
596
+ Z(s, he), (H = u == null ? void 0 : u.onSuccess) == null || H.call(u);
597
597
  },
598
598
  onError: () => {
599
599
  var H;
600
- $(s, he), (H = u == null ? void 0 : u.onError) == null || H.call(u);
600
+ Z(s, he), (H = u == null ? void 0 : u.onError) == null || H.call(u);
601
601
  }
602
602
  }
603
603
  );
@@ -605,19 +605,19 @@ function Ft(t) {
605
605
  const U = v.find(
606
606
  (u) => u.id === s
607
607
  );
608
- U && M({
608
+ U && F({
609
609
  resourceId: s,
610
610
  data: {
611
611
  isPrivate: !U.isPrivate
612
612
  }
613
613
  });
614
614
  }, We = (s) => {
615
- N(s), z == null || z.type, D(!0);
616
- }, qe = (s) => {
615
+ b(s), B == null || B.type, D(!0);
616
+ }, Ye = (s) => {
617
617
  r == null || r(s.id), C(s);
618
- }, Je = () => {
618
+ }, qe = () => {
619
619
  C(null);
620
- }, Ye = ({
620
+ }, Xe = ({
621
621
  title: s,
622
622
  description: U
623
623
  }) => {
@@ -630,20 +630,20 @@ function Ft(t) {
630
630
  }
631
631
  });
632
632
  };
633
- return p ? /* @__PURE__ */ e(Ge, {}) : B ? /* @__PURE__ */ e(Mt, { onRetry: () => window.location.reload() }) : /* @__PURE__ */ a("div", { className: "flex h-full flex-1 flex-col", children: [
633
+ return p ? /* @__PURE__ */ e(Ke, {}) : z ? /* @__PURE__ */ e(Ft, { onRetry: () => window.location.reload() }) : /* @__PURE__ */ a("div", { className: "flex h-full flex-1 flex-col", children: [
634
634
  /* @__PURE__ */ e("div", { className: "flex flex-1 basis-0 flex-col gap-3 overflow-y-auto", children: se.length === 0 ? /* @__PURE__ */ a("div", { className: "py-8 text-center", children: [
635
635
  /* @__PURE__ */ e("div", { className: "mb-3", children: /* @__PURE__ */ e(Dt, { className: "mx-auto h-12 w-12 text-muted-foreground/50" }) }),
636
636
  /* @__PURE__ */ e("h3", { className: "mb-1 font-medium text-foreground", children: f ? "No dashboards found" : "No dashboards yet" }),
637
- /* @__PURE__ */ e("p", { className: "text-sm text-muted-foreground", children: f ? "Try adjusting your search" : G ? 'Click "Create" above to add your first dashboard' : "No dashboards have been shared with you yet" })
637
+ /* @__PURE__ */ e("p", { className: "text-sm text-muted-foreground", children: f ? "Try adjusting your search" : K ? 'Click "Create" above to add your first dashboard' : "No dashboards have been shared with you yet" })
638
638
  ] }) : se.map((s) => /* @__PURE__ */ e(
639
639
  jt,
640
640
  {
641
641
  dashboard: s,
642
642
  isDeleting: R,
643
- isDuplicating: V === s.id,
644
- isDefault: s.id === J,
643
+ isDuplicating: E === s.id,
644
+ isDefault: s.id === q,
645
645
  onLoadDashboard: ce,
646
- onEditDetails: qe,
646
+ onEditDetails: Ye,
647
647
  onDeleteClick: n,
648
648
  onDuplicateDashboard: l,
649
649
  onTogglePrivacy: I,
@@ -654,12 +654,12 @@ function Ft(t) {
654
654
  s.id
655
655
  )) }),
656
656
  g && i && /* @__PURE__ */ e(
657
- Ee,
657
+ Ve,
658
658
  {
659
659
  resource: i,
660
660
  resourceType: Le.DASHBOARD,
661
661
  onClose: () => {
662
- D(!1), N(null);
662
+ D(!1), b(null);
663
663
  }
664
664
  }
665
665
  ),
@@ -682,7 +682,7 @@ function Ft(t) {
682
682
  /* @__PURE__ */ a(Ie, { children: [
683
683
  /* @__PURE__ */ e(je, { disabled: R, children: "Cancel" }),
684
684
  /* @__PURE__ */ a(
685
- Me,
685
+ Fe,
686
686
  {
687
687
  onClick: (s) => {
688
688
  s.preventDefault(), s.stopPropagation(), O();
@@ -706,14 +706,14 @@ function Ft(t) {
706
706
  resourceLabel: "Dashboard",
707
707
  initialTitle: w.title || "",
708
708
  initialDescription: w.description || "",
709
- onClose: Je,
710
- onSave: Ye,
711
- isSaving: Q(w.id)
709
+ onClose: qe,
710
+ onSave: Xe,
711
+ isSaving: $(w.id)
712
712
  }
713
713
  )
714
714
  ] });
715
715
  }
716
- function Bt({
716
+ function zt({
717
717
  open: t,
718
718
  onOpenChange: f,
719
719
  onSubmit: h,
@@ -723,13 +723,13 @@ function Bt({
723
723
  ie(() => {
724
724
  t || (g(""), i(""));
725
725
  }, [t]);
726
- const N = () => {
726
+ const b = () => {
727
727
  o.trim() && h({ title: o, description: D });
728
728
  }, y = (d) => {
729
729
  f(d);
730
730
  };
731
- return /* @__PURE__ */ e(xt, { open: t, onOpenChange: y, children: /* @__PURE__ */ a(Nt, { children: [
732
- /* @__PURE__ */ a(bt, { children: [
731
+ return /* @__PURE__ */ e(xt, { open: t, onOpenChange: y, children: /* @__PURE__ */ a(bt, { children: [
732
+ /* @__PURE__ */ a(Nt, { children: [
733
733
  /* @__PURE__ */ e(wt, { children: "Create New Visual" }),
734
734
  /* @__PURE__ */ e(vt, { children: "Add a new visual to your library. You can configure it after creation." })
735
735
  ] }),
@@ -745,7 +745,7 @@ function Bt({
745
745
  onChange: (d) => g(d.target.value),
746
746
  disabled: r,
747
747
  onKeyDown: (d) => {
748
- d.key === "Enter" && !d.shiftKey && (d.preventDefault(), N());
748
+ d.key === "Enter" && !d.shiftKey && (d.preventDefault(), b());
749
749
  }
750
750
  }
751
751
  )
@@ -777,7 +777,7 @@ function Bt({
777
777
  /* @__PURE__ */ e(
778
778
  _,
779
779
  {
780
- onClick: N,
780
+ onClick: b,
781
781
  disabled: !o.trim() || r,
782
782
  children: r ? /* @__PURE__ */ a(ge, { children: [
783
783
  /* @__PURE__ */ e(oe, { className: "mr-2 h-4 w-4 animate-spin" }),
@@ -795,37 +795,37 @@ function Wt({
795
795
  onDashboardItemClick: r,
796
796
  variant: o = "inline"
797
797
  }) {
798
- var F, G;
798
+ var M, K;
799
799
  const g = me(
800
- (b) => b.isDashboardEditing
801
- ), [D, i] = x(!1), [N, y] = x(""), [d, c] = x(!1), { currentUser: m, userContext: V } = le(), E = ((F = V == null ? void 0 : V.permissions) == null ? void 0 : F.canCreateDashboard) ?? !1, { onCreateSuccess: w } = yt({
800
+ (N) => N.isDashboardEditing
801
+ ), [D, i] = x(!1), [b, y] = x(""), [d, c] = x(!1), { currentUser: m, userContext: E } = le(), V = ((M = E == null ? void 0 : E.permissions) == null ? void 0 : M.canCreateDashboard) ?? !1, { onCreateSuccess: w } = yt({
802
802
  onDashboardSelect: r
803
- }), { selectVisual: C } = re(), { handleEditLibraryVisual: L } = Ke(), {
803
+ }), { selectVisual: C } = re(), { handleEditLibraryVisual: L } = Ge(), {
804
804
  createResource: A,
805
805
  isCreating: j,
806
806
  refetch: T
807
807
  } = _e(), { createResource: S, isCreating: P } = ye(
808
808
  void 0,
809
809
  // onDeleteSuccess (not needed here)
810
- (b) => {
811
- i(!1), b && (C(b), L(b));
810
+ (N) => {
811
+ i(!1), N && (C(N), L(N));
812
812
  }
813
- ), v = o === "overlay", p = ((m == null ? void 0 : m.name) ?? "").trim(), B = ((m == null ? void 0 : m.email) ?? "").trim(), M = p && p.toLowerCase() !== "undefined" ? p : B || "Current user", q = ((G = M.charAt(0)) == null ? void 0 : G.toUpperCase()) || "?", K = B && B.toLowerCase() !== "undefined" ? B : "", k = Rt(f, {
813
+ ), v = o === "overlay", p = ((m == null ? void 0 : m.name) ?? "").trim(), z = ((m == null ? void 0 : m.email) ?? "").trim(), F = p && p.toLowerCase() !== "undefined" ? p : z || "Current user", Y = ((K = F.charAt(0)) == null ? void 0 : K.toUpperCase()) || "?", G = z && z.toLowerCase() !== "undefined" ? z : "", k = Rt(f, {
814
814
  enabled: t && v
815
- }), R = X(
815
+ }), R = J(
816
816
  "flex h-full flex-col border-r bg-background",
817
- v ? X(
817
+ v ? J(
818
818
  "absolute inset-y-0 left-0 z-[51] w-60 shadow-lg transition-transform duration-300 ease-in-out",
819
819
  t ? "translate-x-0" : "pointer-events-none -translate-x-full"
820
820
  ) : "w-full max-w-[17rem] min-w-[11rem] overflow-hidden shadow-sm",
821
821
  h
822
- ), ee = (b) => {
823
- }, te = (b) => {
824
- console.log("Editing dashboard:", b);
825
- }, z = (b) => {
826
- A(b, {
827
- onSuccess: (J) => {
828
- i(!1), w(J, T);
822
+ ), ee = (N) => {
823
+ }, te = (N) => {
824
+ console.log("Editing dashboard:", N);
825
+ }, B = (N) => {
826
+ A(N, {
827
+ onSuccess: (q) => {
828
+ i(!1), w(q, T);
829
829
  }
830
830
  });
831
831
  };
@@ -844,7 +844,7 @@ function Wt({
844
844
  children: /* @__PURE__ */ e(St, { className: "h-3.5 w-3.5" })
845
845
  }
846
846
  ),
847
- (g || E) && /* @__PURE__ */ e(
847
+ (g || V) && /* @__PURE__ */ e(
848
848
  _,
849
849
  {
850
850
  size: "sm",
@@ -860,38 +860,38 @@ function Wt({
860
860
  fe,
861
861
  {
862
862
  placeholder: "Search...",
863
- value: N,
864
- onChange: (b) => y(b.target.value),
863
+ value: b,
864
+ onChange: (N) => y(N.target.value),
865
865
  className: "h-8 border-muted-foreground/20 bg-background text-sm focus-visible:border-muted-foreground/40 focus-visible:ring-0 focus-visible:ring-offset-0",
866
866
  autoFocus: !0
867
867
  }
868
868
  ) })
869
869
  ] }),
870
- /* @__PURE__ */ e("div", { className: "flex flex-1 flex-col overflow-auto px-2 py-2", children: g ? /* @__PURE__ */ e(It, { searchQuery: N }) : /* @__PURE__ */ e(
871
- Ft,
870
+ /* @__PURE__ */ e("div", { className: "flex flex-1 flex-col overflow-auto px-2 py-2", children: g ? /* @__PURE__ */ e(It, { searchQuery: b }) : /* @__PURE__ */ e(
871
+ Mt,
872
872
  {
873
- searchQuery: N,
873
+ searchQuery: b,
874
874
  onLoadDashboard: ee,
875
875
  onEditDashboard: te,
876
876
  onDashboardItemClick: r
877
877
  }
878
878
  ) }),
879
- m && /* @__PURE__ */ e(Fe, { children: /* @__PURE__ */ e("div", { className: "border-t border-border px-4 py-2", children: /* @__PURE__ */ a("div", { className: "flex items-center gap-2", children: [
880
- /* @__PURE__ */ a(Be, { children: [
881
- /* @__PURE__ */ e(ze, { asChild: !0, children: /* @__PURE__ */ e("div", { className: "flex h-6 w-6 cursor-default items-center justify-center rounded-full bg-primary/10", children: /* @__PURE__ */ e("span", { className: "text-xs font-medium text-primary", children: q }) }) }),
879
+ m && /* @__PURE__ */ e(Me, { children: /* @__PURE__ */ e("div", { className: "border-t border-border px-4 py-2", children: /* @__PURE__ */ a("div", { className: "flex items-center gap-2", children: [
880
+ /* @__PURE__ */ a(ze, { children: [
881
+ /* @__PURE__ */ e(Be, { asChild: !0, children: /* @__PURE__ */ e("div", { className: "flex h-6 w-6 cursor-default items-center justify-center rounded-full bg-primary/10", children: /* @__PURE__ */ e("span", { className: "text-xs font-medium text-primary", children: Y }) }) }),
882
882
  /* @__PURE__ */ e(He, { side: "top", className: "max-w-xs", children: /* @__PURE__ */ a("div", { className: "space-y-1", children: [
883
- /* @__PURE__ */ e("div", { className: "font-medium", children: M }),
884
- K && /* @__PURE__ */ e("div", { className: "text-xs text-muted-foreground", children: K }),
883
+ /* @__PURE__ */ e("div", { className: "font-medium", children: F }),
884
+ G && /* @__PURE__ */ e("div", { className: "text-xs text-muted-foreground", children: G }),
885
885
  m.role && /* @__PURE__ */ a("div", { className: "text-xs text-muted-foreground", children: [
886
886
  "Role: ",
887
- Vt(m.role.replace(/_/g, " "))
887
+ Et(m.role.replace(/_/g, " "))
888
888
  ] })
889
889
  ] }) })
890
890
  ] }),
891
- /* @__PURE__ */ e("span", { className: "truncate text-xs text-muted-foreground", children: M })
891
+ /* @__PURE__ */ e("span", { className: "truncate text-xs text-muted-foreground", children: F })
892
892
  ] }) }) }),
893
893
  g ? /* @__PURE__ */ e(
894
- Bt,
894
+ zt,
895
895
  {
896
896
  open: D,
897
897
  onOpenChange: i,
@@ -899,11 +899,11 @@ function Wt({
899
899
  isCreating: P
900
900
  }
901
901
  ) : /* @__PURE__ */ e(
902
- Et,
902
+ Vt,
903
903
  {
904
904
  open: D,
905
905
  onOpenChange: i,
906
- onSubmit: z,
906
+ onSubmit: B,
907
907
  isCreating: j
908
908
  }
909
909
  )