react-semaphor 0.1.301 → 0.1.302

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 (66) hide show
  1. package/dist/appearance/index.cjs +1 -0
  2. package/dist/appearance/index.js +9 -0
  3. package/dist/brand-studio/index.cjs +21 -0
  4. package/dist/brand-studio/index.js +1512 -0
  5. package/dist/chunks/{braces-BwK7fWd_.js → braces-CpOcaBNm.js} +1 -1
  6. package/dist/chunks/{braces-Bhqo4iW1.js → braces-TYclg8Hl.js} +1 -1
  7. package/dist/chunks/dashboard-controls-BkuB9TQX.js +47 -0
  8. package/dist/chunks/dashboard-controls-CZuC_QjN.js +2227 -0
  9. package/dist/chunks/dashboard-filter-controls-button-2I1ltWQ9.js +11 -0
  10. package/dist/chunks/{dashboard-filter-controls-button-DjALRkvg.js → dashboard-filter-controls-button-kfb_T18o.js} +205 -216
  11. package/dist/chunks/dashboard-json-C3v6rBdp.js +1 -0
  12. package/dist/chunks/{dashboard-json-D-zIG46N.js → dashboard-json-Df6v2Jem.js} +14 -12
  13. package/dist/chunks/dashboard-summary-settings-dialog-BBALEHJQ.js +1 -0
  14. package/dist/chunks/{dashboard-summary-settings-dialog-D-F1eEJI.js → dashboard-summary-settings-dialog-DKAaWq-G.js} +64 -63
  15. package/dist/chunks/date-formatter-D9Bvw5Qk.js +1 -0
  16. package/dist/chunks/date-formatter-DyIOb6uC.js +333 -0
  17. package/dist/chunks/edit-dashboard-visual-CGBYahAK.js +183 -0
  18. package/dist/chunks/{edit-dashboard-visual-BjflrL8w.js → edit-dashboard-visual-D8L0cl_U.js} +6691 -6679
  19. package/dist/chunks/{index-DDA12yqV.js → index-BmoR3VQT.js} +48608 -66300
  20. package/dist/chunks/index-Cxb9UUro.js +4 -0
  21. package/dist/chunks/index-D7KJindZ.js +1 -0
  22. package/dist/chunks/index-DFOb_6HB.js +1657 -0
  23. package/dist/chunks/index-eM6MU4q_.js +1361 -0
  24. package/dist/chunks/index-uRJmUpof.js +2555 -0
  25. package/dist/chunks/palette-326-dgn0.js +6 -0
  26. package/dist/chunks/palette-jd7xiGTg.js +23 -0
  27. package/dist/chunks/{resource-management-panel-B2558XA1.js → resource-management-panel-C_c-BwrC.js} +116 -115
  28. package/dist/chunks/resource-management-panel-DrcEEARD.js +6 -0
  29. package/dist/chunks/rotate-ccw-BugHcM1w.js +6 -0
  30. package/dist/chunks/rotate-ccw-yFwqBFJZ.js +14 -0
  31. package/dist/chunks/save-CaybXtdd.js +6 -0
  32. package/dist/chunks/save-DU0FXUlM.js +21 -0
  33. package/dist/chunks/switch-AmoR1YIA.js +163 -0
  34. package/dist/chunks/switch-CZtMtqEj.js +19725 -0
  35. package/dist/chunks/{use-create-flow-overlay-state-BUw_JtLs.js → use-create-flow-overlay-state-84Xe8VrP.js} +396 -412
  36. package/dist/chunks/use-create-flow-overlay-state-CiKVJGWF.js +16 -0
  37. package/dist/chunks/use-visual-utils-lp5DfmvL.js +1 -0
  38. package/dist/chunks/{use-visual-utils-C45OxsOf.js → use-visual-utils-z3ifg6Fd.js} +54 -53
  39. package/dist/dashboard/index.cjs +1 -1
  40. package/dist/dashboard/index.js +1 -1
  41. package/dist/format-utils/index.cjs +1 -1
  42. package/dist/format-utils/index.js +2 -2
  43. package/dist/index.cjs +1 -1
  44. package/dist/index.js +210 -207
  45. package/dist/style.css +1 -1
  46. package/dist/surfboard/index.cjs +1 -1
  47. package/dist/surfboard/index.js +2 -2
  48. package/dist/types/appearance.d.ts +176 -0
  49. package/dist/types/brand-studio.d.ts +245 -0
  50. package/dist/types/dashboard.d.ts +134 -0
  51. package/dist/types/main.d.ts +141 -1
  52. package/dist/types/surfboard.d.ts +134 -0
  53. package/dist/types/types.d.ts +139 -0
  54. package/package.json +13 -1
  55. package/dist/chunks/dashboard-controls-BIRiWCUK.js +0 -47
  56. package/dist/chunks/dashboard-controls-DIlnYo96.js +0 -2219
  57. package/dist/chunks/dashboard-filter-controls-button-CK1-mKQh.js +0 -11
  58. package/dist/chunks/dashboard-json-DK4mQ1gS.js +0 -1
  59. package/dist/chunks/dashboard-summary-settings-dialog-DSxNqxFI.js +0 -1
  60. package/dist/chunks/date-formatter-CqXdM6JO.js +0 -1
  61. package/dist/chunks/date-formatter-vkCj9Ct-.js +0 -1982
  62. package/dist/chunks/edit-dashboard-visual-DCsrtJr_.js +0 -193
  63. package/dist/chunks/index-8GnvL1_L.js +0 -1523
  64. package/dist/chunks/resource-management-panel-CKp4_aem.js +0 -6
  65. package/dist/chunks/use-create-flow-overlay-state-CWcCdPbC.js +0 -21
  66. package/dist/chunks/use-visual-utils-DyaThRzf.js +0 -1
@@ -1,7 +1,8 @@
1
1
  import { jsx as e, jsxs as n, Fragment as le } from "react/jsx-runtime";
2
- import { c as je, u as ne, W as Fe, N as de, cE as ze, cF as Be, b as Q, B as I, cx as ie, cG as He, cH as Ke, cI as _e, cJ as We, cK as J, x as se, cL as Xe, cM as Ye, cN as Ge, cO as fe, cl as ce, cP as $e, cQ as Je, cR as we, cS as Ne, cT as be, cU as Qe, ao as ye, ak as Ce, cV as ve, cW as Se, cX as Ee, cY as Ve, cZ as Le, c_ as Ae, c$ as Oe, d0 as Re, d1 as Te, d2 as Ze, d3 as ue, d4 as qe, ai as te, d as ke, d5 as Ue, d6 as et, e as tt, f as nt, g as at, h as st, i as ot, L as ge, I as xe, w as rt, d7 as it, d8 as De, X as lt, d9 as dt, bV as ct, bW as ut, bX as ht, bY as pt, da as mt, db as ft } from "./index-DDA12yqV.js";
3
- import gt, { useRef as xt, useEffect as ae, useState as w } from "react";
4
- import { u as Ie } from "./use-visual-utils-C45OxsOf.js";
2
+ import { c as je, u as ne, n as Fe, a as Z, B as I, f as se, s as be, w as ze, L as fe, I as ge, X as Be, z as He, A as Ke, D as _e, F as We, af as Ye } from "./switch-CZtMtqEj.js";
3
+ import Xe, { useRef as $e, useEffect as ae, useState as b } from "react";
4
+ import { v as de, bL as Ge, bM as Qe, bE as ie, bN as Ze, bO as qe, bP as Je, bQ as ke, bR as Q, bS as et, bT as tt, bU as nt, bV as xe, bs as ce, bW as at, bX as st, bY as we, bZ as Ne, b_ as ot, a0 as ye, Y as Ce, b$ as ve, c0 as Se, c1 as Ee, c2 as Ve, c3 as Le, c4 as Ae, c5 as Oe, c6 as Re, c7 as Te, c8 as rt, c9 as ue, ca as it, W as te, u as lt, cb as Ue, b as dt, c as ct, d as ut, e as ht, f as pt, o as mt, cc as ft, cd as De, ce as gt, cf as xt } from "./index-BmoR3VQT.js";
5
+ import { u as Ie } from "./use-visual-utils-z3ifg6Fd.js";
5
6
  /**
6
7
  * @license lucide-react v0.453.0 - ISC
7
8
  *
@@ -17,11 +18,11 @@ const Dt = je("FolderOpen", [
17
18
  }
18
19
  ]
19
20
  ]);
20
- function wt(t, m = {}) {
21
- const { enabled: p = !0, eventType: l = "mousedown" } = m, i = xt(null);
21
+ function bt(t, m = {}) {
22
+ const { enabled: p = !0, eventType: l = "mousedown" } = m, i = $e(null);
22
23
  return ae(() => {
23
- const h = (N) => {
24
- const o = N.target;
24
+ const h = (w) => {
25
+ const o = w.target;
25
26
  i.current && i.current.contains(o) || o instanceof Element && (o.closest("[data-radix-popper-content-wrapper]") || o.closest("[data-radix-select-content]") || o.closest("[data-radix-popover-content]") || o.closest("[data-radix-dropdown-menu-content]") || o.closest("[data-radix-tooltip-content]") || o.closest('[role="listbox"]') || o.closest('[role="option"]') || o.closest('[role="combobox"]')) || o instanceof Element && o.hasAttribute("data-radix-") || t();
26
27
  };
27
28
  return p && document.addEventListener(l, h), () => {
@@ -45,24 +46,24 @@ function Me() {
45
46
  m
46
47
  )) });
47
48
  }
48
- const Nt = (t) => {
49
+ const wt = (t) => {
49
50
  const m = ne((i) => i.isVisualEditing), p = ne((i) => i.selectedFrameId), l = Fe((i) => i.frame);
50
51
  return !!(m && p && (l == null ? void 0 : l.visualId) === t);
51
52
  };
52
- function bt({
53
+ function Nt({
53
54
  visual: t,
54
55
  isDeleting: m,
55
56
  isDuplicating: p,
56
57
  onAddVisual: l,
57
58
  onOpenVisual: i,
58
59
  onEditDetails: h,
59
- onDeleteClick: N,
60
+ onDeleteClick: w,
60
61
  onDuplicateVisual: o,
61
- onShareVisual: b,
62
+ onShareVisual: N,
62
63
  formatDate: y
63
64
  }) {
64
65
  var M, U, j, F;
65
- const { selectVisual: f } = de(), d = ze(t.id), u = Nt(t.id), A = ne((r) => r.isVisualEditing), { isConsoleMode: T } = Be(), x = gt.useRef(null), [S, E] = w(!1), [V, O] = w(!1);
66
+ const { selectVisual: f } = de(), d = Ge(t.id), u = wt(t.id), A = ne((r) => r.isVisualEditing), { isConsoleMode: T } = Qe(), x = Xe.useRef(null), [S, E] = b(!1), [V, O] = b(!1);
66
67
  ae(() => {
67
68
  p ? (E(!0), O(!0)) : V && (E(!1), O(!1));
68
69
  }, [p, V]), ae(() => {
@@ -80,7 +81,7 @@ function bt({
80
81
  "div",
81
82
  {
82
83
  ref: x,
83
- className: Q(
84
+ className: Z(
84
85
  "group flex cursor-pointer items-start gap-1 rounded-[5px] px-2 py-1.5 transition-colors hover:bg-muted/50 focus-within:bg-muted/50",
85
86
  u ? "bg-muted ring-1 ring-inset ring-foreground/20" : d && "bg-muted"
86
87
  ),
@@ -116,7 +117,7 @@ function bt({
116
117
  /* @__PURE__ */ e(
117
118
  "div",
118
119
  {
119
- className: Q(
120
+ className: Z(
120
121
  "flex shrink-0 items-center transition-opacity",
121
122
  d || u || S ? "pointer-events-auto opacity-100" : "pointer-events-none opacity-0 group-hover:pointer-events-auto group-hover:opacity-100 group-focus-within:pointer-events-auto group-focus-within:opacity-100"
122
123
  ),
@@ -140,30 +141,30 @@ function bt({
140
141
  }
141
142
  ),
142
143
  /* @__PURE__ */ n(
143
- He,
144
+ Ze,
144
145
  {
145
146
  modal: !1,
146
147
  open: S,
147
148
  onOpenChange: E,
148
149
  children: [
149
- /* @__PURE__ */ e(Ke, { asChild: !0, children: /* @__PURE__ */ e(
150
+ /* @__PURE__ */ e(qe, { asChild: !0, children: /* @__PURE__ */ e(
150
151
  I,
151
152
  {
152
153
  size: "xs",
153
154
  variant: "ghost",
154
155
  className: "h-full w-7 rounded-none border-0 border-l border-border/60 px-0 shadow-none hover:bg-accent/50",
155
156
  "aria-label": "Open visual actions",
156
- children: /* @__PURE__ */ e(_e, { className: "h-3.5 w-3.5" })
157
+ children: /* @__PURE__ */ e(Je, { className: "h-3.5 w-3.5" })
157
158
  }
158
159
  ) }),
159
160
  /* @__PURE__ */ n(
160
- We,
161
+ ke,
161
162
  {
162
163
  align: "end",
163
164
  className: "z-[51] w-44 rounded-[6px] border border-border/60 p-1 shadow-sm",
164
165
  children: [
165
166
  /* @__PURE__ */ n(
166
- J,
167
+ Q,
167
168
  {
168
169
  onClick: (r) => {
169
170
  r.stopPropagation(), l(t);
@@ -176,7 +177,7 @@ function bt({
176
177
  }
177
178
  ),
178
179
  /* @__PURE__ */ n(
179
- J,
180
+ Q,
180
181
  {
181
182
  onClick: (r) => {
182
183
  r.stopPropagation(), i == null || i(t);
@@ -188,49 +189,49 @@ function bt({
188
189
  }
189
190
  ),
190
191
  /* @__PURE__ */ n(
191
- J,
192
+ Q,
192
193
  {
193
194
  onClick: (r) => {
194
195
  r.preventDefault(), r.stopPropagation(), o(t.id);
195
196
  },
196
197
  disabled: p,
197
198
  children: [
198
- p ? /* @__PURE__ */ e(se, { className: "h-3.5 w-3.5 animate-spin" }) : /* @__PURE__ */ e(Xe, { className: "h-3.5 w-3.5" }),
199
+ p ? /* @__PURE__ */ e(se, { className: "h-3.5 w-3.5 animate-spin" }) : /* @__PURE__ */ e(et, { className: "h-3.5 w-3.5" }),
199
200
  p ? "Duplicating…" : "Duplicate"
200
201
  ]
201
202
  }
202
203
  ),
203
204
  t.ownership.isOwner && /* @__PURE__ */ n(le, { children: [
204
205
  /* @__PURE__ */ n(
205
- J,
206
+ Q,
206
207
  {
207
208
  onClick: (r) => {
208
209
  r.stopPropagation(), h == null || h(t);
209
210
  },
210
211
  children: [
211
- /* @__PURE__ */ e(Ye, { className: "h-3.5 w-3.5" }),
212
+ /* @__PURE__ */ e(tt, { className: "h-3.5 w-3.5" }),
212
213
  "Edit details"
213
214
  ]
214
215
  }
215
216
  ),
216
217
  /* @__PURE__ */ n(
217
- J,
218
+ Q,
218
219
  {
219
220
  onClick: (r) => {
220
- r.stopPropagation(), b(t);
221
+ r.stopPropagation(), N(t);
221
222
  },
222
223
  children: [
223
- /* @__PURE__ */ e(Ge, { className: "h-3.5 w-3.5" }),
224
+ /* @__PURE__ */ e(nt, { className: "h-3.5 w-3.5" }),
224
225
  "Share"
225
226
  ]
226
227
  }
227
228
  ),
228
- /* @__PURE__ */ e(fe, {}),
229
+ /* @__PURE__ */ e(xe, {}),
229
230
  /* @__PURE__ */ n(
230
- J,
231
+ Q,
231
232
  {
232
233
  onClick: (r) => {
233
- r.stopPropagation(), N(t);
234
+ r.stopPropagation(), w(t);
234
235
  },
235
236
  className: "text-destructive focus:bg-destructive/10 focus:text-destructive",
236
237
  disabled: m,
@@ -241,14 +242,14 @@ function bt({
241
242
  }
242
243
  )
243
244
  ] }),
244
- /* @__PURE__ */ e(fe, {}),
245
+ /* @__PURE__ */ e(xe, {}),
245
246
  /* @__PURE__ */ n("div", { className: "space-y-1 px-2 py-1.5 text-[11px] text-muted-foreground", children: [
246
247
  (((U = t.ownership.createdBy) == null ? void 0 : U.type) === "tenant" || ((j = t.ownership.createdBy) == null ? void 0 : j.type) === "organization" && T) && /* @__PURE__ */ n("div", { className: "flex items-center gap-1.5", children: [
247
- /* @__PURE__ */ e($e, { className: "h-3 w-3" }),
248
+ /* @__PURE__ */ e(at, { className: "h-3 w-3" }),
248
249
  /* @__PURE__ */ e("span", { children: ((F = t.ownership.createdBy) == null ? void 0 : F.name) || "Unknown" })
249
250
  ] }),
250
251
  /* @__PURE__ */ n("div", { className: "flex items-center gap-1.5", children: [
251
- /* @__PURE__ */ e(Je, { className: "h-3 w-3" }),
252
+ /* @__PURE__ */ e(st, { className: "h-3 w-3" }),
252
253
  /* @__PURE__ */ e("span", { children: y(t.lastModified) })
253
254
  ] })
254
255
  ] })
@@ -266,9 +267,9 @@ function bt({
266
267
  );
267
268
  }
268
269
  function yt({ searchQuery: t }) {
269
- const [m, p] = w(!1), [l, i] = w(
270
+ const [m, p] = b(!1), [l, i] = b(
270
271
  null
271
- ), [h, N] = w(!1), [o, b] = w(null), [y, f] = w(null), [d, u] = w(
272
+ ), [h, w] = b(!1), [o, N] = b(null), [y, f] = b(null), [d, u] = b(
272
273
  null
273
274
  ), { handleEditLibraryVisual: A, handleAddLibraryVisual: T } = Ie(), {
274
275
  resources: x,
@@ -279,7 +280,7 @@ function yt({ searchQuery: t }) {
279
280
  duplicateResource: C,
280
281
  isDeleting: v
281
282
  } = we(() => {
282
- N(!1), b(null);
283
+ w(!1), N(null);
283
284
  }), M = x.filter(
284
285
  (s) => {
285
286
  var R, c;
@@ -290,12 +291,12 @@ function yt({ searchQuery: t }) {
290
291
  day: "numeric",
291
292
  year: "numeric"
292
293
  }), j = (s) => {
293
- b(s), N(!0);
294
+ N(s), w(!0);
294
295
  }, F = () => {
295
296
  o && O(o.id);
296
297
  }, {
297
298
  startUpdating: r,
298
- stopUpdating: X,
299
+ stopUpdating: Y,
299
300
  isUpdating: B
300
301
  } = Ne(), L = (s, R, c) => {
301
302
  var ee;
@@ -315,27 +316,27 @@ function yt({ searchQuery: t }) {
315
316
  {
316
317
  onSuccess: () => {
317
318
  var P;
318
- X(s, K), (P = c == null ? void 0 : c.onSuccess) == null || P.call(c);
319
+ Y(s, K), (P = c == null ? void 0 : c.onSuccess) == null || P.call(c);
319
320
  },
320
321
  onError: () => {
321
322
  var P;
322
- X(s, K), (P = c == null ? void 0 : c.onError) == null || P.call(c);
323
+ Y(s, K), (P = c == null ? void 0 : c.onError) == null || P.call(c);
323
324
  }
324
325
  }
325
326
  );
326
- }, Y = (s) => {
327
+ }, X = (s) => {
327
328
  f(s), C(s, {
328
329
  onSettled: () => f(null)
329
330
  });
330
331
  }, H = (s) => {
331
332
  A(s);
332
- }, G = (s) => {
333
- T(s);
334
333
  }, $ = (s) => {
334
+ T(s);
335
+ }, G = (s) => {
335
336
  i(s), p(!0);
336
- }, Z = (s) => {
337
+ }, q = (s) => {
337
338
  u(s);
338
- }, q = () => {
339
+ }, J = () => {
339
340
  u(null);
340
341
  }, k = ({
341
342
  title: s,
@@ -363,19 +364,19 @@ function yt({ searchQuery: t }) {
363
364
  )
364
365
  ] }) }) : /* @__PURE__ */ n("div", { className: "flex h-full flex-1 flex-col", children: [
365
366
  /* @__PURE__ */ e("div", { className: "flex flex-1 basis-0 flex-col gap-0.5 overflow-y-auto", children: M.length === 0 ? /* @__PURE__ */ n("div", { className: "flex flex-col items-center gap-1.5 px-4 py-10 text-center", children: [
366
- /* @__PURE__ */ e(Qe, { className: "h-5 w-5 text-muted-foreground/60" }),
367
+ /* @__PURE__ */ e(ot, { className: "h-5 w-5 text-muted-foreground/60" }),
367
368
  /* @__PURE__ */ e("h3", { className: "text-[13px] font-medium text-foreground", children: t ? "No visuals found" : "No visuals yet" }),
368
369
  /* @__PURE__ */ e("p", { className: "text-[12px] text-muted-foreground", children: t ? "Try adjusting your search." : 'Click "New" above to add your first visual.' })
369
370
  ] }) : M.map((s) => /* @__PURE__ */ e(
370
- bt,
371
+ Nt,
371
372
  {
372
373
  visual: s,
373
- onAddVisual: G,
374
+ onAddVisual: $,
374
375
  onOpenVisual: H,
375
- onEditDetails: Z,
376
+ onEditDetails: q,
376
377
  onDeleteClick: j,
377
- onDuplicateVisual: Y,
378
- onShareVisual: $,
378
+ onDuplicateVisual: X,
379
+ onShareVisual: G,
379
380
  isDeleting: v,
380
381
  isDuplicating: y === s.id,
381
382
  formatDate: U
@@ -399,7 +400,7 @@ function yt({ searchQuery: t }) {
399
400
  resourceLabel: "Visual",
400
401
  initialTitle: d.title || "",
401
402
  initialDescription: d.description || "",
402
- onClose: q,
403
+ onClose: J,
403
404
  onSave: k,
404
405
  isSaving: B(d.id)
405
406
  }
@@ -409,7 +410,7 @@ function yt({ searchQuery: t }) {
409
410
  {
410
411
  open: h,
411
412
  onOpenChange: (s) => {
412
- !s && v || (N(s), s || b(null));
413
+ !s && v || (w(s), s || N(null));
413
414
  },
414
415
  children: /* @__PURE__ */ n(Ee, { children: [
415
416
  /* @__PURE__ */ n(Ve, { children: [
@@ -448,13 +449,13 @@ function Ct({
448
449
  onLoadDashboard: l,
449
450
  onEditDetails: i,
450
451
  onDeleteClick: h,
451
- onDuplicateDashboard: N,
452
+ onDuplicateDashboard: w,
452
453
  onShareDashboard: o,
453
- formatDate: b,
454
+ formatDate: N,
454
455
  onDashboardItemClick: y
455
456
  }) {
456
457
  var V, O;
457
- const { selectDashboard: f } = de(), d = Ze(t.id), { userContext: u, isLoading: A } = ue(), T = ((V = u == null ? void 0 : u.permissions) == null ? void 0 : V.canEdit) ?? !1, x = A || !T, S = () => {
458
+ const { selectDashboard: f } = de(), d = rt(t.id), { userContext: u, isLoading: A } = ue(), T = ((V = u == null ? void 0 : u.permissions) == null ? void 0 : V.canEdit) ?? !1, x = A || !T, S = () => {
458
459
  f(t), l(t.id), y == null || y(t.id);
459
460
  }, E = (C) => {
460
461
  C.currentTarget === C.target && (C.key === "Enter" || C.key === " ") && (C.preventDefault(), S());
@@ -462,7 +463,7 @@ function Ct({
462
463
  return /* @__PURE__ */ n(
463
464
  "div",
464
465
  {
465
- className: Q(
466
+ className: Z(
466
467
  "group flex cursor-pointer items-start gap-1 rounded-[5px] px-2 py-1.5 transition-colors hover:bg-muted/50 focus-within:bg-muted/50",
467
468
  d && "bg-muted"
468
469
  ),
@@ -498,12 +499,12 @@ function Ct({
498
499
  /* @__PURE__ */ e(
499
500
  "div",
500
501
  {
501
- className: Q(
502
+ className: Z(
502
503
  "shrink-0 transition-opacity",
503
504
  d ? "opacity-100" : "opacity-0 group-hover:opacity-100 group-focus-within:opacity-100"
504
505
  ),
505
506
  children: /* @__PURE__ */ e(
506
- qe,
507
+ it,
507
508
  {
508
509
  dashboard: t,
509
510
  isDeleting: m,
@@ -511,9 +512,9 @@ function Ct({
511
512
  shouldHideActions: x,
512
513
  onEditDetails: i,
513
514
  onDeleteClick: h,
514
- onDuplicateDashboard: N,
515
+ onDuplicateDashboard: w,
515
516
  onShareDashboard: o,
516
- formatDate: b
517
+ formatDate: N
517
518
  }
518
519
  )
519
520
  }
@@ -530,9 +531,9 @@ function vt({ onRetry: t }) {
530
531
  }
531
532
  function St(t) {
532
533
  var he;
533
- const { searchQuery: m, onLoadDashboard: p, onEditDashboard: l, onDashboardItemClick: i } = t, [h, N] = w(!1), [o, b] = w(
534
+ const { searchQuery: m, onLoadDashboard: p, onEditDashboard: l, onDashboardItemClick: i } = t, [h, w] = b(!1), [o, N] = b(
534
535
  null
535
- ), [y, f] = w(!1), [d, u] = w(null), [A, T] = w(null), [x, S] = w(null), E = te(
536
+ ), [y, f] = b(!1), [d, u] = b(null), [A, T] = b(null), [x, S] = b(null), E = te(
536
537
  (a) => a.lastSelectedDashboard
537
538
  ), V = te(
538
539
  (a) => a.selectedDashboard
@@ -540,33 +541,33 @@ function St(t) {
540
541
  (a) => a.actions.selectDashboard
541
542
  ), C = te(
542
543
  (a) => a.actions.clearSelectedDashboard
543
- ), { tokenProps: v, id: M } = ke(), {
544
+ ), { tokenProps: v, id: M } = lt(), {
544
545
  resources: U,
545
546
  isLoading: j,
546
547
  isError: F,
547
548
  updateResource: r,
548
- deleteResource: X,
549
+ deleteResource: Y,
549
550
  duplicateResource: B,
550
551
  isDeleting: L
551
552
  } = Ue(() => {
552
553
  f(!1);
553
554
  const a = d == null ? void 0 : d.id;
554
555
  u(null), (V == null ? void 0 : V.id) === a && (!(v != null && v.dashboard_id) && !M ? C() : E && E.id !== a && O(E));
555
- }), { userContext: Y } = ue(), H = ((he = Y == null ? void 0 : Y.permissions) == null ? void 0 : he.canCreateDashboard) ?? !1, G = U.filter(
556
+ }), { userContext: X } = ue(), H = ((he = X == null ? void 0 : X.permissions) == null ? void 0 : he.canCreateDashboard) ?? !1, $ = U.filter(
556
557
  (a) => {
557
558
  var _, g;
558
559
  return ((_ = a == null ? void 0 : a.title) == null ? void 0 : _.toLowerCase().includes(m.toLowerCase())) || ((g = a == null ? void 0 : a.description) == null ? void 0 : g.toLowerCase().includes(m.toLowerCase()));
559
560
  }
560
- ), $ = (a) => new Date(a).toLocaleDateString("en-US", {
561
+ ), G = (a) => new Date(a).toLocaleDateString("en-US", {
561
562
  month: "short",
562
563
  day: "numeric",
563
564
  year: "numeric"
564
- }), Z = (a) => {
565
+ }), q = (a) => {
565
566
  p == null || p(a);
566
- }, q = (a) => {
567
+ }, J = (a) => {
567
568
  u(a), f(!0);
568
569
  }, k = () => {
569
- d && X(d.id);
570
+ d && Y(d.id);
570
571
  }, s = (a) => {
571
572
  T(a), B(a, {
572
573
  onSettled: () => T(null)
@@ -602,7 +603,7 @@ function St(t) {
602
603
  }
603
604
  );
604
605
  }, K = (a) => {
605
- b(a), N(!0);
606
+ N(a), w(!0);
606
607
  }, ee = (a) => {
607
608
  l == null || l(a.id), S(a);
608
609
  }, P = () => {
@@ -621,22 +622,22 @@ function St(t) {
621
622
  });
622
623
  };
623
624
  return j ? /* @__PURE__ */ e(Me, {}) : F ? /* @__PURE__ */ e(vt, { onRetry: () => window.location.reload() }) : /* @__PURE__ */ n("div", { className: "flex h-full flex-1 flex-col", children: [
624
- /* @__PURE__ */ e("div", { className: "flex flex-1 basis-0 flex-col gap-0.5 overflow-y-auto", children: G.length === 0 ? /* @__PURE__ */ n("div", { className: "flex flex-col items-center gap-1.5 px-4 py-10 text-center", children: [
625
- /* @__PURE__ */ e(et, { className: "h-5 w-5 text-muted-foreground/60" }),
625
+ /* @__PURE__ */ e("div", { className: "flex flex-1 basis-0 flex-col gap-0.5 overflow-y-auto", children: $.length === 0 ? /* @__PURE__ */ n("div", { className: "flex flex-col items-center gap-1.5 px-4 py-10 text-center", children: [
626
+ /* @__PURE__ */ e(ze, { className: "h-5 w-5 text-muted-foreground/60" }),
626
627
  /* @__PURE__ */ e("h3", { className: "text-[13px] font-medium text-foreground", children: m ? "No dashboards found" : "No dashboards yet" }),
627
628
  /* @__PURE__ */ e("p", { className: "text-[12px] text-muted-foreground", children: m ? "Try adjusting your search." : H ? 'Click "New" above to add your first dashboard.' : "No dashboards have been shared with you yet." })
628
- ] }) : G.map((a) => /* @__PURE__ */ e(
629
+ ] }) : $.map((a) => /* @__PURE__ */ e(
629
630
  Ct,
630
631
  {
631
632
  dashboard: a,
632
633
  isDeleting: L,
633
634
  isDuplicating: A === a.id,
634
- onLoadDashboard: Z,
635
+ onLoadDashboard: q,
635
636
  onEditDetails: ee,
636
- onDeleteClick: q,
637
+ onDeleteClick: J,
637
638
  onDuplicateDashboard: s,
638
639
  onShareDashboard: K,
639
- formatDate: $,
640
+ formatDate: G,
640
641
  onDashboardItemClick: i
641
642
  },
642
643
  a.id
@@ -647,7 +648,7 @@ function St(t) {
647
648
  resource: o,
648
649
  resourceType: Ce.DASHBOARD,
649
650
  onClose: () => {
650
- N(!1), b(null);
651
+ w(!1), N(null);
651
652
  }
652
653
  }
653
654
  ),
@@ -706,25 +707,25 @@ function Et({
706
707
  onSubmit: p,
707
708
  isCreating: l
708
709
  }) {
709
- const [i, h] = w(""), [N, o] = w("");
710
+ const [i, h] = b(""), [w, o] = b("");
710
711
  ae(() => {
711
712
  t || (h(""), o(""));
712
713
  }, [t]);
713
- const b = () => {
714
- i.trim() && p({ title: i, description: N });
714
+ const N = () => {
715
+ i.trim() && p({ title: i, description: w });
715
716
  }, y = (f) => {
716
717
  m(f);
717
718
  };
718
- return /* @__PURE__ */ e(tt, { open: t, onOpenChange: y, children: /* @__PURE__ */ n(nt, { children: [
719
- /* @__PURE__ */ n(at, { children: [
720
- /* @__PURE__ */ e(st, { children: "Create New Visual" }),
721
- /* @__PURE__ */ e(ot, { children: "Add a new visual to your library. You can configure it after creation." })
719
+ return /* @__PURE__ */ e(dt, { open: t, onOpenChange: y, children: /* @__PURE__ */ n(ct, { children: [
720
+ /* @__PURE__ */ n(ut, { children: [
721
+ /* @__PURE__ */ e(ht, { children: "Create New Visual" }),
722
+ /* @__PURE__ */ e(pt, { children: "Add a new visual to your library. You can configure it after creation." })
722
723
  ] }),
723
724
  /* @__PURE__ */ n("div", { className: "space-y-4 py-4", children: [
724
725
  /* @__PURE__ */ n("div", { className: "space-y-2", children: [
725
- /* @__PURE__ */ e(ge, { htmlFor: "title", children: "Visual Title" }),
726
+ /* @__PURE__ */ e(fe, { htmlFor: "title", children: "Visual Title" }),
726
727
  /* @__PURE__ */ e(
727
- xe,
728
+ ge,
728
729
  {
729
730
  id: "title",
730
731
  placeholder: "Enter visual title...",
@@ -732,26 +733,26 @@ function Et({
732
733
  onChange: (f) => h(f.target.value),
733
734
  disabled: l,
734
735
  onKeyDown: (f) => {
735
- f.key === "Enter" && !f.shiftKey && (f.preventDefault(), b());
736
+ f.key === "Enter" && !f.shiftKey && (f.preventDefault(), N());
736
737
  }
737
738
  }
738
739
  )
739
740
  ] }),
740
741
  /* @__PURE__ */ n("div", { className: "space-y-2", children: [
741
- /* @__PURE__ */ e(ge, { htmlFor: "description", children: "Description (optional)" }),
742
+ /* @__PURE__ */ e(fe, { htmlFor: "description", children: "Description (optional)" }),
742
743
  /* @__PURE__ */ e(
743
- xe,
744
+ ge,
744
745
  {
745
746
  id: "description",
746
747
  placeholder: "Enter visual description...",
747
- value: N,
748
+ value: w,
748
749
  onChange: (f) => o(f.target.value),
749
750
  disabled: l
750
751
  }
751
752
  )
752
753
  ] })
753
754
  ] }),
754
- /* @__PURE__ */ n(rt, { children: [
755
+ /* @__PURE__ */ n(mt, { children: [
755
756
  /* @__PURE__ */ e(
756
757
  I,
757
758
  {
@@ -764,7 +765,7 @@ function Et({
764
765
  /* @__PURE__ */ e(
765
766
  I,
766
767
  {
767
- onClick: b,
768
+ onClick: N,
768
769
  disabled: !i.trim() || l,
769
770
  children: l ? /* @__PURE__ */ n(le, { children: [
770
771
  /* @__PURE__ */ e(se, { className: "mr-2 h-4 w-4 animate-spin" }),
@@ -775,7 +776,7 @@ function Et({
775
776
  ] })
776
777
  ] }) });
777
778
  }
778
- function Rt({
779
+ function Tt({
779
780
  isOpen: t,
780
781
  onClose: m,
781
782
  className: p,
@@ -785,7 +786,7 @@ function Rt({
785
786
  var c, z;
786
787
  const h = ne(
787
788
  (D) => D.isDashboardEditing
788
- ), [N, o] = w(!1), [b, y] = w(""), [f, d] = w(!1), { currentUser: u, userContext: A } = ue(), T = ((c = A == null ? void 0 : A.permissions) == null ? void 0 : c.canCreateDashboard) ?? !1, { onCreateSuccess: x } = it({
789
+ ), [w, o] = b(!1), [N, y] = b(""), [f, d] = b(!1), { currentUser: u, userContext: A } = ue(), T = ((c = A == null ? void 0 : A.permissions) == null ? void 0 : c.canCreateDashboard) ?? !1, { onCreateSuccess: x } = ft({
789
790
  onDashboardSelect: l
790
791
  }), { selectVisual: S } = de(), { handleEditLibraryVisual: E } = Ie(), {
791
792
  createResource: V,
@@ -797,11 +798,11 @@ function Rt({
797
798
  (D) => {
798
799
  o(!1), D && (S(D), E(D));
799
800
  }
800
- ), U = i === "overlay", j = h ? "New Visual" : "New", F = h ? "New Visual" : "New Dashboard", r = h ? "Search visuals..." : "Search dashboards...", X = h ? "Collapse visuals panel" : "Collapse dashboard panel", B = ((u == null ? void 0 : u.name) ?? "").trim(), L = ((u == null ? void 0 : u.email) ?? "").trim(), H = B && B.toLowerCase() !== "undefined" ? B : L || "Current user", G = ((z = H.charAt(0)) == null ? void 0 : z.toUpperCase()) || "?", $ = L && L.toLowerCase() !== "undefined" ? L : "", Z = wt(m, {
801
+ ), U = i === "overlay", j = h ? "New Visual" : "New", F = h ? "New Visual" : "New Dashboard", r = h ? "Search visuals..." : "Search dashboards...", Y = h ? "Collapse visuals panel" : "Collapse dashboard panel", B = ((u == null ? void 0 : u.name) ?? "").trim(), L = ((u == null ? void 0 : u.email) ?? "").trim(), H = B && B.toLowerCase() !== "undefined" ? B : L || "Current user", $ = ((z = H.charAt(0)) == null ? void 0 : z.toUpperCase()) || "?", G = L && L.toLowerCase() !== "undefined" ? L : "", q = bt(m, {
801
802
  enabled: t && U
802
- }), q = Q(
803
+ }), J = Z(
803
804
  "flex h-full flex-col border-r border-border/60 bg-background",
804
- U ? Q(
805
+ U ? Z(
805
806
  "absolute inset-y-0 left-0 z-[51] w-60 overflow-hidden shadow-lg transition-transform duration-300 ease-in-out",
806
807
  t ? "translate-x-0" : "pointer-events-none -translate-x-full"
807
808
  ) : "w-full max-w-[17rem] min-w-[11rem] overflow-hidden",
@@ -816,14 +817,14 @@ function Rt({
816
817
  }
817
818
  });
818
819
  };
819
- return /* @__PURE__ */ e(le, { children: (!U || t) && /* @__PURE__ */ n("div", { ref: Z, className: q, children: [
820
+ return /* @__PURE__ */ e(le, { children: (!U || t) && /* @__PURE__ */ n("div", { ref: q, className: J, children: [
820
821
  /* @__PURE__ */ e("div", { className: "border-b border-border/60 bg-background", children: f ? /* @__PURE__ */ n("div", { className: "flex h-10 items-center gap-1 px-3", children: [
821
822
  /* @__PURE__ */ e(De, { className: "h-3.5 w-3.5 shrink-0 text-muted-foreground" }),
822
823
  /* @__PURE__ */ e(
823
824
  "input",
824
825
  {
825
826
  autoFocus: !0,
826
- value: b,
827
+ value: N,
827
828
  onChange: (D) => y(D.target.value),
828
829
  onKeyDown: (D) => {
829
830
  D.key === "Escape" && (y(""), d(!1));
@@ -843,7 +844,7 @@ function Rt({
843
844
  y(""), d(!1);
844
845
  },
845
846
  "aria-label": "Close search",
846
- children: /* @__PURE__ */ e(lt, { className: "h-3.5 w-3.5" })
847
+ children: /* @__PURE__ */ e(Be, { className: "h-3.5 w-3.5" })
847
848
  }
848
849
  )
849
850
  ] }) : /* @__PURE__ */ n("div", { className: "flex h-10 items-center justify-between gap-2 px-3", children: [
@@ -880,48 +881,48 @@ function Rt({
880
881
  variant: "ghost",
881
882
  className: "w-7 px-0 text-muted-foreground hover:text-foreground",
882
883
  onClick: m,
883
- "aria-label": X,
884
- children: /* @__PURE__ */ e(dt, { className: "h-3.5 w-3.5" })
884
+ "aria-label": Y,
885
+ children: /* @__PURE__ */ e(gt, { className: "h-3.5 w-3.5" })
885
886
  }
886
887
  )
887
888
  ] })
888
889
  ] }) }),
889
- /* @__PURE__ */ e("div", { className: "flex flex-1 flex-col overflow-auto px-1.5 py-2", children: h ? /* @__PURE__ */ e(yt, { searchQuery: b }) : /* @__PURE__ */ e(
890
+ /* @__PURE__ */ e("div", { className: "flex flex-1 flex-col overflow-auto px-1.5 py-2", children: h ? /* @__PURE__ */ e(yt, { searchQuery: N }) : /* @__PURE__ */ e(
890
891
  St,
891
892
  {
892
- searchQuery: b,
893
+ searchQuery: N,
893
894
  onLoadDashboard: k,
894
895
  onEditDashboard: s,
895
896
  onDashboardItemClick: l
896
897
  }
897
898
  ) }),
898
- u && /* @__PURE__ */ e(ct, { children: /* @__PURE__ */ e("div", { className: "border-t border-border/60 px-3 py-2", children: /* @__PURE__ */ n(ut, { children: [
899
- /* @__PURE__ */ e(ht, { asChild: !0, children: /* @__PURE__ */ n("div", { className: "flex cursor-default items-center gap-2", children: [
900
- /* @__PURE__ */ e("div", { className: "flex h-6 w-6 shrink-0 items-center justify-center rounded-full bg-muted text-[10px] font-medium text-muted-foreground", children: G }),
899
+ u && /* @__PURE__ */ e(He, { children: /* @__PURE__ */ e("div", { className: "border-t border-border/60 px-3 py-2", children: /* @__PURE__ */ n(Ke, { children: [
900
+ /* @__PURE__ */ e(_e, { asChild: !0, children: /* @__PURE__ */ n("div", { className: "flex cursor-default items-center gap-2", children: [
901
+ /* @__PURE__ */ e("div", { className: "flex h-6 w-6 shrink-0 items-center justify-center rounded-full bg-muted text-[10px] font-medium text-muted-foreground", children: $ }),
901
902
  /* @__PURE__ */ e("span", { className: "truncate text-[12px] text-muted-foreground", children: H })
902
903
  ] }) }),
903
- /* @__PURE__ */ e(pt, { side: "top", className: "max-w-xs", children: /* @__PURE__ */ n("div", { className: "space-y-0.5", children: [
904
+ /* @__PURE__ */ e(We, { side: "top", className: "max-w-xs", children: /* @__PURE__ */ n("div", { className: "space-y-0.5", children: [
904
905
  /* @__PURE__ */ e("div", { className: "font-medium", children: H }),
905
- $ && /* @__PURE__ */ e("div", { className: "text-[11px] opacity-80", children: $ }),
906
+ G && /* @__PURE__ */ e("div", { className: "text-[11px] opacity-80", children: G }),
906
907
  u.role && /* @__PURE__ */ n("div", { className: "text-[11px] opacity-80", children: [
907
908
  "Role:",
908
909
  " ",
909
- mt(u.role.replace(/_/g, " "))
910
+ Ye(u.role.replace(/_/g, " "))
910
911
  ] })
911
912
  ] }) })
912
913
  ] }) }) }),
913
914
  h ? /* @__PURE__ */ e(
914
915
  Et,
915
916
  {
916
- open: N,
917
+ open: w,
917
918
  onOpenChange: o,
918
919
  onSubmit: v,
919
920
  isCreating: M
920
921
  }
921
922
  ) : /* @__PURE__ */ e(
922
- ft,
923
+ xt,
923
924
  {
924
- open: N,
925
+ open: w,
925
926
  onOpenChange: o,
926
927
  onSubmit: R,
927
928
  isCreating: O
@@ -930,5 +931,5 @@ function Rt({
930
931
  ] }) });
931
932
  }
932
933
  export {
933
- Rt as ResourceManagementPanel
934
+ Tt as ResourceManagementPanel
934
935
  };