react-semaphor 0.1.368 → 0.1.369

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 (64) hide show
  1. package/dist/analytics-protocol/index.cjs +1 -1
  2. package/dist/analytics-protocol/index.js +1 -1
  3. package/dist/brand-studio/index.cjs +5 -5
  4. package/dist/brand-studio/index.js +24 -23
  5. package/dist/chunks/{braces-Cc86y9Ov.js → braces-C3-w6xDL.js} +1 -1
  6. package/dist/chunks/{braces-CXvY9MwQ.js → braces-C8QqW4wu.js} +1 -1
  7. package/dist/chunks/{calendar-preferences-dialog-BOFlzOJg.js → calendar-preferences-dialog-6q51A6XC.js} +3 -3
  8. package/dist/chunks/{calendar-preferences-dialog-ZzwfJv2J.js → calendar-preferences-dialog-CUGzkNcE.js} +1 -1
  9. package/dist/chunks/{chevrons-up-down-CUZL1zaU.js → chevrons-up-down-CnCSGY02.js} +1 -1
  10. package/dist/chunks/{chevrons-up-down-qQMadOWA.js → chevrons-up-down-DSvLu4Ye.js} +1 -1
  11. package/dist/chunks/{dashboard-briefing-launcher-9-PCYMjR.js → dashboard-briefing-launcher-BEZnvIla.js} +1 -1
  12. package/dist/chunks/{dashboard-briefing-launcher-D2lBFqAd.js → dashboard-briefing-launcher-ptERmNJr.js} +176 -177
  13. package/dist/chunks/{dashboard-controls-D4bUHAjX.js → dashboard-controls-CGt6_hMf.js} +11 -11
  14. package/dist/chunks/{dashboard-controls-BIk094Ah.js → dashboard-controls-CqKC5oEk.js} +77 -77
  15. package/dist/chunks/{dashboard-json-DImOf512.js → dashboard-json-6SgPm_QW.js} +13 -14
  16. package/dist/chunks/dashboard-json-CYSbOdmE.js +1 -0
  17. package/dist/chunks/{edit-dashboard-visual-DTxkV6Fl.js → edit-dashboard-visual-ByQx_M2i.js} +8 -9
  18. package/dist/chunks/{edit-dashboard-visual-BHKlcqQR.js → edit-dashboard-visual-w6hKbjlw.js} +1 -1
  19. package/dist/chunks/index-BtqYNH_S.js +1361 -0
  20. package/dist/chunks/{index-BVEIk-rB.js → index-CPyEi9gS.js} +72498 -76193
  21. package/dist/chunks/{palette-DPuAc82h.js → palette-D-f4-82S.js} +1 -1
  22. package/dist/chunks/{palette-C1k347Tb.js → palette-DUGktM-M.js} +1 -1
  23. package/dist/chunks/{resource-management-panel-BeHceP2D.js → resource-management-panel-Bf8-3eUf.js} +1 -1
  24. package/dist/chunks/{resource-management-panel-BOfbSf48.js → resource-management-panel-mJ84NxzC.js} +152 -152
  25. package/dist/chunks/save-D3YYinDz.js +6 -0
  26. package/dist/chunks/save-kkBEBeLg.js +21 -0
  27. package/dist/chunks/{switch-xcWLtWs0.js → switch-Dkx2qEOr.js} +758 -776
  28. package/dist/chunks/{switch-C0S63HAv.js → switch-fIkmwzUt.js} +27 -32
  29. package/dist/chunks/{use-create-flow-overlay-state-B5FygfQL.js → use-create-flow-overlay-state-BfoXDDrd.js} +190 -189
  30. package/dist/chunks/use-create-flow-overlay-state-c6rCm36x.js +26 -0
  31. package/dist/chunks/{use-visual-utils-DxDE8S8M.js → use-visual-utils-C_c-aiqi.js} +1 -1
  32. package/dist/chunks/{use-visual-utils-CszWnFBW.js → use-visual-utils-NN0e3fBP.js} +13 -13
  33. package/dist/chunks/validation-Dsf7PydY.js +1 -0
  34. package/dist/chunks/validation-nOPr0mTk.js +803 -0
  35. package/dist/chunks/{validators-L0xEXtjf.js → validators-CVuWOHYv.js} +225 -158
  36. package/dist/chunks/validators-oc8qtP4q.js +1 -0
  37. package/dist/dashboard/index.cjs +1 -1
  38. package/dist/dashboard/index.js +1 -1
  39. package/dist/dashboard-authoring/index.cjs +1 -1
  40. package/dist/dashboard-authoring/index.js +1 -1
  41. package/dist/data-app-builder/index.cjs +51 -1
  42. package/dist/data-app-builder/index.js +3666 -2
  43. package/dist/data-app-sdk/index.cjs +1 -1
  44. package/dist/data-app-sdk/index.js +589 -388
  45. package/dist/data-app-sdk-validation/index.cjs +1 -1
  46. package/dist/data-app-sdk-validation/index.js +4 -4
  47. package/dist/index.cjs +1 -1
  48. package/dist/index.js +14 -14
  49. package/dist/surfboard/index.cjs +1 -1
  50. package/dist/surfboard/index.js +2 -2
  51. package/dist/types/analytics-protocol.d.ts +21 -1
  52. package/dist/types/dashboard-assistant.d.ts +21 -1
  53. package/dist/types/dashboard-authoring.d.ts +11 -1
  54. package/dist/types/data-app-builder.d.ts +11 -1
  55. package/dist/types/data-app-sdk-validation.d.ts +107 -23
  56. package/dist/types/data-app-sdk.d.ts +168 -35
  57. package/dist/types/main.d.ts +11 -1
  58. package/package.json +1 -1
  59. package/dist/chunks/dashboard-json-Bo1kX6W1.js +0 -1
  60. package/dist/chunks/index-HjDeEytV.js +0 -1411
  61. package/dist/chunks/use-create-flow-overlay-state-DOXTbTcQ.js +0 -26
  62. package/dist/chunks/validation-CrUjNWby.js +0 -689
  63. package/dist/chunks/validation-DGl8wnTt.js +0 -1
  64. package/dist/chunks/validators-Dq5X4mp0.js +0 -1
@@ -1,16 +1,16 @@
1
1
  import { jsx as e, jsxs as n, Fragment as oe } from "react/jsx-runtime";
2
- import { c as He, u as se, G as Ge, a as Z, B as O, f as te, N as be, V as $e, L as ie, a2 as de, X as ke, Z as We, _ as Xe, $ as Ye, a1 as Ze, az as Je } from "./switch-xcWLtWs0.js";
3
- import Qe, { useState as b, useEffect as ee, useRef as qe } from "react";
4
- import { ah as ue, aL as et, aM as tt, aI as ce, aN as nt, aO as at, aP as st, aQ as it, aR as Y, aS as ot, aT as rt, aU as lt, aV as xe, az as he, aW as dt, aX as ct, aY as Ne, aZ as we, a_ as ut, J as ye, A as Ce, a$ as ve, b0 as Se, b1 as Ee, b2 as Ve, b3 as Le, b4 as Ae, b5 as Oe, b6 as Te, b7 as Re, b8 as ht, b9 as pe, ba as pt, y as ae, u as mt, bb as Ue, c as Ie, d as ze, e as Me, f as Pe, g as Fe, bc as ft, o as je, bd as gt, be as De, bf as xt } from "./index-BVEIk-rB.js";
2
+ import { c as _e, u as se, G as ke, a as W, B as O, f as te, M as be, Q as Ge, L as ie, a1 as de, X as qe, Y as Xe, Z as Ye, _ as Qe, a0 as We, ay as Ze } from "./switch-Dkx2qEOr.js";
3
+ import $e, { useState as b, useEffect as ee, useRef as Je } from "react";
4
+ import { ag as ue, b6 as et, b7 as tt, ax as ce, b8 as nt, b9 as at, ba as st, bb as it, bc as Q, aC as ot, bd as rt, be as lt, bf as xe, aX as he, bg as dt, bh as ct, bi as we, bj as Ne, bk as ut, H as ye, z as Ce, bl as ve, an as Se, aq as Ee, ar as Ve, as as Le, at as Ae, au as Oe, av as Te, aw as Re, bm as ht, bn as pe, bo as pt, x as ae, u as mt, bp as Ue, b as Ie, c as Me, d as ze, e as Pe, f as je, bq as ft, n as Fe, br as gt, aH as De, aA as xt } from "./index-CPyEi9gS.js";
5
5
  import "./index-CuHybtft.js";
6
- import { u as Be } from "./use-visual-utils-CszWnFBW.js";
6
+ import { u as Be } from "./use-visual-utils-NN0e3fBP.js";
7
7
  /**
8
8
  * @license lucide-react v0.453.0 - ISC
9
9
  *
10
10
  * This source code is licensed under the ISC license.
11
11
  * See the LICENSE file in the root directory of this source tree.
12
12
  */
13
- const Dt = He("FolderOpen", [
13
+ const Dt = _e("FolderOpen", [
14
14
  [
15
15
  "path",
16
16
  {
@@ -19,7 +19,7 @@ const Dt = He("FolderOpen", [
19
19
  }
20
20
  ]
21
21
  ]);
22
- function Ke() {
22
+ function He() {
23
23
  return /* @__PURE__ */ e("div", { className: "space-y-1.5 py-1", children: [...Array(5)].map((t, f) => /* @__PURE__ */ n(
24
24
  "div",
25
25
  {
@@ -36,10 +36,10 @@ function Ke() {
36
36
  )) });
37
37
  }
38
38
  const bt = (t) => {
39
- const f = se((o) => o.isVisualEditing), m = se((o) => o.selectedFrameId), r = Ge((o) => o.frame);
39
+ const f = se((o) => o.isVisualEditing), m = se((o) => o.selectedFrameId), r = ke((o) => o.frame);
40
40
  return !!(f && m && (r == null ? void 0 : r.visualId) === t);
41
41
  };
42
- function Nt({
42
+ function wt({
43
43
  visual: t,
44
44
  isDeleting: f,
45
45
  isDuplicating: m,
@@ -49,14 +49,14 @@ function Nt({
49
49
  onDeleteClick: x,
50
50
  onDuplicateVisual: i,
51
51
  onShareVisual: D,
52
- formatDate: N
52
+ formatDate: w
53
53
  }) {
54
- var z, I, P, F;
55
- const { selectVisual: l } = ue(), c = et(t.id), p = bt(t.id), A = se((d) => d.isVisualEditing), { isConsoleMode: U } = tt(), w = Qe.useRef(null), [S, E] = b(!1), [V, T] = b(!1);
54
+ var M, I, P, j;
55
+ const { selectVisual: l } = ue(), c = et(t.id), p = bt(t.id), A = se((d) => d.isVisualEditing), { isConsoleMode: U } = tt(), N = $e.useRef(null), [S, E] = b(!1), [V, T] = b(!1);
56
56
  ee(() => {
57
57
  m ? (E(!0), T(!0)) : V && (E(!1), T(!1));
58
58
  }, [m, V]), ee(() => {
59
- p && w.current && w.current.scrollIntoView({
59
+ p && N.current && N.current.scrollIntoView({
60
60
  behavior: "smooth",
61
61
  block: "center"
62
62
  });
@@ -69,8 +69,8 @@ function Nt({
69
69
  return /* @__PURE__ */ n(
70
70
  "div",
71
71
  {
72
- ref: w,
73
- className: Z(
72
+ ref: N,
73
+ className: W(
74
74
  "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",
75
75
  p ? "bg-muted ring-1 ring-inset ring-foreground/20" : c && "bg-muted"
76
76
  ),
@@ -97,7 +97,7 @@ function Nt({
97
97
  {
98
98
  className: "truncate text-[11px] leading-4 text-muted-foreground",
99
99
  title: t.description || "No description",
100
- children: (z = t.description) != null && z.trim() ? t.description : "No description"
100
+ children: (M = t.description) != null && M.trim() ? t.description : "No description"
101
101
  }
102
102
  )
103
103
  ]
@@ -106,7 +106,7 @@ function Nt({
106
106
  /* @__PURE__ */ e(
107
107
  "div",
108
108
  {
109
- className: Z(
109
+ className: W(
110
110
  "flex shrink-0 items-center transition-opacity",
111
111
  c || p || 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"
112
112
  ),
@@ -153,7 +153,7 @@ function Nt({
153
153
  className: "z-[51] w-44 rounded-[6px] border border-border/60 p-1 shadow-sm",
154
154
  children: [
155
155
  /* @__PURE__ */ n(
156
- Y,
156
+ Q,
157
157
  {
158
158
  onClick: (d) => {
159
159
  d.stopPropagation(), r(t);
@@ -166,7 +166,7 @@ function Nt({
166
166
  }
167
167
  ),
168
168
  /* @__PURE__ */ n(
169
- Y,
169
+ Q,
170
170
  {
171
171
  onClick: (d) => {
172
172
  d.stopPropagation(), o == null || o(t);
@@ -178,7 +178,7 @@ function Nt({
178
178
  }
179
179
  ),
180
180
  /* @__PURE__ */ n(
181
- Y,
181
+ Q,
182
182
  {
183
183
  onClick: (d) => {
184
184
  d.preventDefault(), d.stopPropagation(), i(t.id);
@@ -192,7 +192,7 @@ function Nt({
192
192
  ),
193
193
  t.ownership.isOwner && /* @__PURE__ */ n(oe, { children: [
194
194
  /* @__PURE__ */ n(
195
- Y,
195
+ Q,
196
196
  {
197
197
  onClick: (d) => {
198
198
  d.stopPropagation(), h == null || h(t);
@@ -204,7 +204,7 @@ function Nt({
204
204
  }
205
205
  ),
206
206
  /* @__PURE__ */ n(
207
- Y,
207
+ Q,
208
208
  {
209
209
  onClick: (d) => {
210
210
  d.stopPropagation(), D(t);
@@ -217,7 +217,7 @@ function Nt({
217
217
  ),
218
218
  /* @__PURE__ */ e(xe, {}),
219
219
  /* @__PURE__ */ n(
220
- Y,
220
+ Q,
221
221
  {
222
222
  onClick: (d) => {
223
223
  d.stopPropagation(), x(t);
@@ -235,11 +235,11 @@ function Nt({
235
235
  /* @__PURE__ */ n("div", { className: "space-y-1 px-2 py-1.5 text-[11px] text-muted-foreground", children: [
236
236
  (((I = t.ownership.createdBy) == null ? void 0 : I.type) === "tenant" || ((P = t.ownership.createdBy) == null ? void 0 : P.type) === "organization" && U) && /* @__PURE__ */ n("div", { className: "flex items-center gap-1.5", children: [
237
237
  /* @__PURE__ */ e(dt, { className: "h-3 w-3" }),
238
- /* @__PURE__ */ e("span", { children: ((F = t.ownership.createdBy) == null ? void 0 : F.name) || "Unknown" })
238
+ /* @__PURE__ */ e("span", { children: ((j = t.ownership.createdBy) == null ? void 0 : j.name) || "Unknown" })
239
239
  ] }),
240
240
  /* @__PURE__ */ n("div", { className: "flex items-center gap-1.5", children: [
241
241
  /* @__PURE__ */ e(ct, { className: "h-3 w-3" }),
242
- /* @__PURE__ */ e("span", { children: N(t.lastModified) })
242
+ /* @__PURE__ */ e("span", { children: w(t.lastModified) })
243
243
  ] })
244
244
  ] })
245
245
  ]
@@ -255,22 +255,22 @@ function Nt({
255
255
  }
256
256
  );
257
257
  }
258
- function wt({ searchQuery: t }) {
258
+ function Nt({ searchQuery: t }) {
259
259
  const [f, m] = b(!1), [r, o] = b(
260
260
  null
261
- ), [h, x] = b(!1), [i, D] = b(null), [N, l] = b(null), [c, p] = b(
261
+ ), [h, x] = b(!1), [i, D] = b(null), [w, l] = b(null), [c, p] = b(
262
262
  null
263
263
  ), { handleEditLibraryVisual: A, handleAddLibraryVisual: U } = Be(), {
264
- resources: w,
264
+ resources: N,
265
265
  isLoading: S,
266
266
  isError: E,
267
267
  updateResource: V,
268
268
  deleteResource: T,
269
269
  duplicateResource: C,
270
270
  isDeleting: v
271
- } = Ne(() => {
271
+ } = we(() => {
272
272
  x(!1), D(null);
273
- }), z = w.filter(
273
+ }), M = N.filter(
274
274
  (s) => {
275
275
  var R, u;
276
276
  return ((R = s == null ? void 0 : s.title) == null ? void 0 : R.toLowerCase().includes(t.toLowerCase())) || ((u = s == null ? void 0 : s.description) == null ? void 0 : u.toLowerCase().includes(t.toLowerCase()));
@@ -281,53 +281,53 @@ function wt({ searchQuery: t }) {
281
281
  year: "numeric"
282
282
  }), P = (s) => {
283
283
  D(s), x(!0);
284
- }, F = () => {
284
+ }, j = () => {
285
285
  i && T(i.id);
286
286
  }, {
287
287
  startUpdating: d,
288
- stopUpdating: $,
288
+ stopUpdating: G,
289
289
  isUpdating: B
290
- } = we(), L = (s, R, u) => {
290
+ } = Ne(), L = (s, R, u) => {
291
291
  var ne;
292
- const j = Object.fromEntries(
293
- Object.entries(R).filter(([, M]) => M !== void 0)
292
+ const F = Object.fromEntries(
293
+ Object.entries(R).filter(([, z]) => z !== void 0)
294
294
  );
295
- if (Object.keys(j).length === 0) {
295
+ if (Object.keys(F).length === 0) {
296
296
  (ne = u == null ? void 0 : u.onSuccess) == null || ne.call(u);
297
297
  return;
298
298
  }
299
- const y = Object.keys(j), _ = y.length === 1 ? y[0] : void 0;
300
- d(s, _), V(
299
+ const y = Object.keys(F), K = y.length === 1 ? y[0] : void 0;
300
+ d(s, K), V(
301
301
  {
302
302
  resourceId: s,
303
- data: j
303
+ data: F
304
304
  },
305
305
  {
306
306
  onSuccess: () => {
307
- var M;
308
- $(s, _), (M = u == null ? void 0 : u.onSuccess) == null || M.call(u);
307
+ var z;
308
+ G(s, K), (z = u == null ? void 0 : u.onSuccess) == null || z.call(u);
309
309
  },
310
310
  onError: () => {
311
- var M;
312
- $(s, _), (M = u == null ? void 0 : u.onError) == null || M.call(u);
311
+ var z;
312
+ G(s, K), (z = u == null ? void 0 : u.onError) == null || z.call(u);
313
313
  }
314
314
  }
315
315
  );
316
- }, k = (s) => {
316
+ }, q = (s) => {
317
317
  l(s), C(s, {
318
318
  onSettled: () => l(null)
319
319
  });
320
- }, K = (s) => {
320
+ }, H = (s) => {
321
321
  A(s);
322
- }, W = (s) => {
323
- U(s);
324
322
  }, X = (s) => {
323
+ U(s);
324
+ }, Y = (s) => {
325
325
  o(s), m(!0);
326
- }, J = (s) => {
326
+ }, Z = (s) => {
327
327
  p(s);
328
- }, Q = () => {
328
+ }, $ = () => {
329
329
  p(null);
330
- }, q = ({
330
+ }, J = ({
331
331
  title: s,
332
332
  description: R
333
333
  }) => {
@@ -340,7 +340,7 @@ function wt({ searchQuery: t }) {
340
340
  }
341
341
  });
342
342
  };
343
- return S ? /* @__PURE__ */ e(Ke, {}) : E ? /* @__PURE__ */ e(be, { className: "w-full flex-1 pr-2", children: /* @__PURE__ */ n("div", { className: "flex flex-col items-center gap-1.5 px-4 py-10 text-center", children: [
343
+ return S ? /* @__PURE__ */ e(He, {}) : E ? /* @__PURE__ */ e(be, { className: "w-full flex-1 pr-2", children: /* @__PURE__ */ n("div", { className: "flex flex-col items-center gap-1.5 px-4 py-10 text-center", children: [
344
344
  /* @__PURE__ */ e("p", { className: "text-[12px] text-destructive", children: "Failed to load visuals" }),
345
345
  /* @__PURE__ */ e(
346
346
  O,
@@ -352,22 +352,22 @@ function wt({ searchQuery: t }) {
352
352
  }
353
353
  )
354
354
  ] }) }) : /* @__PURE__ */ n("div", { className: "flex h-full flex-1 flex-col", children: [
355
- /* @__PURE__ */ e("div", { className: "flex flex-1 basis-0 flex-col gap-0.5 overflow-y-auto", children: z.length === 0 ? /* @__PURE__ */ n("div", { className: "flex flex-col items-center gap-1.5 px-4 py-10 text-center", children: [
355
+ /* @__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: [
356
356
  /* @__PURE__ */ e(ut, { className: "h-5 w-5 text-muted-foreground/60" }),
357
357
  /* @__PURE__ */ e("h3", { className: "text-[13px] font-medium text-foreground", children: t ? "No visuals found" : "No visuals yet" }),
358
358
  /* @__PURE__ */ e("p", { className: "text-[12px] text-muted-foreground", children: t ? "Try adjusting your search." : 'Click "New" above to add your first visual.' })
359
- ] }) : z.map((s) => /* @__PURE__ */ e(
360
- Nt,
359
+ ] }) : M.map((s) => /* @__PURE__ */ e(
360
+ wt,
361
361
  {
362
362
  visual: s,
363
- onAddVisual: W,
364
- onOpenVisual: K,
365
- onEditDetails: J,
363
+ onAddVisual: X,
364
+ onOpenVisual: H,
365
+ onEditDetails: Z,
366
366
  onDeleteClick: P,
367
- onDuplicateVisual: k,
368
- onShareVisual: X,
367
+ onDuplicateVisual: q,
368
+ onShareVisual: Y,
369
369
  isDeleting: v,
370
- isDuplicating: N === s.id,
370
+ isDuplicating: w === s.id,
371
371
  formatDate: I
372
372
  },
373
373
  s.id
@@ -389,8 +389,8 @@ function wt({ searchQuery: t }) {
389
389
  resourceLabel: "Visual",
390
390
  initialTitle: c.title || "",
391
391
  initialDescription: c.description || "",
392
- onClose: Q,
393
- onSave: q,
392
+ onClose: $,
393
+ onSave: J,
394
394
  isSaving: B(c.id)
395
395
  }
396
396
  ),
@@ -416,7 +416,7 @@ function wt({ searchQuery: t }) {
416
416
  Re,
417
417
  {
418
418
  onClick: (s) => {
419
- s.preventDefault(), s.stopPropagation(), F();
419
+ s.preventDefault(), s.stopPropagation(), j();
420
420
  },
421
421
  disabled: v,
422
422
  children: [
@@ -441,18 +441,18 @@ function yt({
441
441
  onDuplicateDashboard: x,
442
442
  onShareDashboard: i,
443
443
  formatDate: D,
444
- onDashboardItemClick: N
444
+ onDashboardItemClick: w
445
445
  }) {
446
446
  var V, T;
447
- const { selectDashboard: l } = ue(), c = ht(t.id), { userContext: p, isLoading: A } = pe(), U = ((V = p == null ? void 0 : p.permissions) == null ? void 0 : V.canEdit) ?? !1, w = A || !U, S = () => {
448
- l(t), r(t.id), N == null || N(t.id);
447
+ const { selectDashboard: l } = ue(), c = ht(t.id), { userContext: p, isLoading: A } = pe(), U = ((V = p == null ? void 0 : p.permissions) == null ? void 0 : V.canEdit) ?? !1, N = A || !U, S = () => {
448
+ l(t), r(t.id), w == null || w(t.id);
449
449
  }, E = (C) => {
450
450
  C.currentTarget === C.target && (C.key === "Enter" || C.key === " ") && (C.preventDefault(), S());
451
451
  };
452
452
  return /* @__PURE__ */ n(
453
453
  "div",
454
454
  {
455
- className: Z(
455
+ className: W(
456
456
  "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",
457
457
  c && "bg-muted"
458
458
  ),
@@ -488,7 +488,7 @@ function yt({
488
488
  /* @__PURE__ */ e(
489
489
  "div",
490
490
  {
491
- className: Z(
491
+ className: W(
492
492
  "shrink-0 transition-opacity",
493
493
  c ? "opacity-100" : "opacity-0 group-hover:opacity-100 group-focus-within:opacity-100"
494
494
  ),
@@ -498,7 +498,7 @@ function yt({
498
498
  dashboard: t,
499
499
  isDeleting: f,
500
500
  isDuplicating: m,
501
- shouldHideActions: w,
501
+ shouldHideActions: N,
502
502
  onEditDetails: o,
503
503
  onDeleteClick: h,
504
504
  onDuplicateDashboard: x,
@@ -522,7 +522,7 @@ function vt(t) {
522
522
  var me;
523
523
  const { searchQuery: f, onLoadDashboard: m, onEditDashboard: r, onDashboardItemClick: o } = t, [h, x] = b(!1), [i, D] = b(
524
524
  null
525
- ), [N, l] = b(!1), [c, p] = b(null), [A, U] = b(null), [w, S] = b(null), E = ae(
525
+ ), [w, l] = b(!1), [c, p] = b(null), [A, U] = b(null), [N, S] = b(null), E = ae(
526
526
  (a) => a.lastSelectedDashboard
527
527
  ), V = ae(
528
528
  (a) => a.selectedDashboard
@@ -530,33 +530,33 @@ function vt(t) {
530
530
  (a) => a.actions.selectDashboard
531
531
  ), C = ae(
532
532
  (a) => a.actions.clearSelectedDashboard
533
- ), { tokenProps: v, id: z } = mt(), {
533
+ ), { tokenProps: v, id: M } = mt(), {
534
534
  resources: I,
535
535
  isLoading: P,
536
- isError: F,
536
+ isError: j,
537
537
  updateResource: d,
538
- deleteResource: $,
538
+ deleteResource: G,
539
539
  duplicateResource: B,
540
540
  isDeleting: L
541
541
  } = Ue(() => {
542
542
  l(!1);
543
543
  const a = c == null ? void 0 : c.id;
544
- p(null), (V == null ? void 0 : V.id) === a && (!(v != null && v.dashboard_id) && !z ? C() : E && E.id !== a && T(E));
545
- }), { userContext: k } = pe(), K = ((me = k == null ? void 0 : k.permissions) == null ? void 0 : me.canCreateDashboard) ?? !1, W = I.filter(
544
+ p(null), (V == null ? void 0 : V.id) === a && (!(v != null && v.dashboard_id) && !M ? C() : E && E.id !== a && T(E));
545
+ }), { userContext: q } = pe(), H = ((me = q == null ? void 0 : q.permissions) == null ? void 0 : me.canCreateDashboard) ?? !1, X = I.filter(
546
546
  (a) => {
547
- var H, g;
548
- return ((H = a == null ? void 0 : a.title) == null ? void 0 : H.toLowerCase().includes(f.toLowerCase())) || ((g = a == null ? void 0 : a.description) == null ? void 0 : g.toLowerCase().includes(f.toLowerCase()));
547
+ var _, g;
548
+ return ((_ = a == null ? void 0 : a.title) == null ? void 0 : _.toLowerCase().includes(f.toLowerCase())) || ((g = a == null ? void 0 : a.description) == null ? void 0 : g.toLowerCase().includes(f.toLowerCase()));
549
549
  }
550
- ), X = (a) => new Date(a).toLocaleDateString("en-US", {
550
+ ), Y = (a) => new Date(a).toLocaleDateString("en-US", {
551
551
  month: "short",
552
552
  day: "numeric",
553
553
  year: "numeric"
554
- }), J = (a) => {
554
+ }), Z = (a) => {
555
555
  m == null || m(a);
556
- }, Q = (a) => {
556
+ }, $ = (a) => {
557
557
  p(a), l(!0);
558
- }, q = () => {
559
- c && $(c.id);
558
+ }, J = () => {
559
+ c && G(c.id);
560
560
  }, s = (a) => {
561
561
  U(a), B(a, {
562
562
  onSettled: () => U(null)
@@ -564,11 +564,11 @@ function vt(t) {
564
564
  }, {
565
565
  startUpdating: R,
566
566
  stopUpdating: u,
567
- isUpdating: j
568
- } = we(), y = (a, H, g) => {
567
+ isUpdating: F
568
+ } = Ne(), y = (a, _, g) => {
569
569
  var ge;
570
570
  const re = Object.fromEntries(
571
- Object.entries(H).filter(([, G]) => G !== void 0)
571
+ Object.entries(_).filter(([, k]) => k !== void 0)
572
572
  );
573
573
  if (Object.keys(re).length === 0) {
574
574
  (ge = g == null ? void 0 : g.onSuccess) == null || ge.call(g);
@@ -582,51 +582,51 @@ function vt(t) {
582
582
  },
583
583
  {
584
584
  onSuccess: () => {
585
- var G;
586
- u(a, le), (G = g == null ? void 0 : g.onSuccess) == null || G.call(g);
585
+ var k;
586
+ u(a, le), (k = g == null ? void 0 : g.onSuccess) == null || k.call(g);
587
587
  },
588
588
  onError: () => {
589
- var G;
590
- u(a, le), (G = g == null ? void 0 : g.onError) == null || G.call(g);
589
+ var k;
590
+ u(a, le), (k = g == null ? void 0 : g.onError) == null || k.call(g);
591
591
  }
592
592
  }
593
593
  );
594
- }, _ = (a) => {
594
+ }, K = (a) => {
595
595
  D(a), x(!0);
596
596
  }, ne = (a) => {
597
597
  r == null || r(a.id), S(a);
598
- }, M = () => {
598
+ }, z = () => {
599
599
  S(null);
600
- }, _e = ({
600
+ }, Ke = ({
601
601
  title: a,
602
- description: H
602
+ description: _
603
603
  }) => {
604
- if (!w)
604
+ if (!N)
605
605
  return;
606
606
  const g = {};
607
- a !== w.title && (g.title = a), (w.description || "") !== H && (g.description = H), y(w.id, g, {
607
+ a !== N.title && (g.title = a), (N.description || "") !== _ && (g.description = _), y(N.id, g, {
608
608
  onSuccess: () => {
609
609
  S(null);
610
610
  }
611
611
  });
612
612
  };
613
- return P ? /* @__PURE__ */ e(Ke, {}) : F ? /* @__PURE__ */ e(Ct, { onRetry: () => window.location.reload() }) : /* @__PURE__ */ n("div", { className: "flex h-full flex-1 flex-col", children: [
614
- /* @__PURE__ */ e("div", { className: "flex flex-1 basis-0 flex-col gap-0.5 overflow-y-auto", children: W.length === 0 ? /* @__PURE__ */ n("div", { className: "flex flex-col items-center gap-1.5 px-4 py-10 text-center", children: [
615
- /* @__PURE__ */ e($e, { className: "h-5 w-5 text-muted-foreground/60" }),
613
+ return P ? /* @__PURE__ */ e(He, {}) : j ? /* @__PURE__ */ e(Ct, { onRetry: () => window.location.reload() }) : /* @__PURE__ */ n("div", { className: "flex h-full flex-1 flex-col", children: [
614
+ /* @__PURE__ */ e("div", { className: "flex flex-1 basis-0 flex-col gap-0.5 overflow-y-auto", children: X.length === 0 ? /* @__PURE__ */ n("div", { className: "flex flex-col items-center gap-1.5 px-4 py-10 text-center", children: [
615
+ /* @__PURE__ */ e(Ge, { className: "h-5 w-5 text-muted-foreground/60" }),
616
616
  /* @__PURE__ */ e("h3", { className: "text-[13px] font-medium text-foreground", children: f ? "No dashboards found" : "No dashboards yet" }),
617
- /* @__PURE__ */ e("p", { className: "text-[12px] text-muted-foreground", children: f ? "Try adjusting your search." : K ? 'Click "New" above to add your first dashboard.' : "No dashboards have been shared with you yet." })
618
- ] }) : W.map((a) => /* @__PURE__ */ e(
617
+ /* @__PURE__ */ e("p", { className: "text-[12px] text-muted-foreground", children: f ? "Try adjusting your search." : H ? 'Click "New" above to add your first dashboard.' : "No dashboards have been shared with you yet." })
618
+ ] }) : X.map((a) => /* @__PURE__ */ e(
619
619
  yt,
620
620
  {
621
621
  dashboard: a,
622
622
  isDeleting: L,
623
623
  isDuplicating: A === a.id,
624
- onLoadDashboard: J,
624
+ onLoadDashboard: Z,
625
625
  onEditDetails: ne,
626
- onDeleteClick: Q,
626
+ onDeleteClick: $,
627
627
  onDuplicateDashboard: s,
628
- onShareDashboard: _,
629
- formatDate: X,
628
+ onShareDashboard: K,
629
+ formatDate: Y,
630
630
  onDashboardItemClick: o
631
631
  },
632
632
  a.id
@@ -644,7 +644,7 @@ function vt(t) {
644
644
  /* @__PURE__ */ e(
645
645
  Se,
646
646
  {
647
- open: N,
647
+ open: w,
648
648
  onOpenChange: (a) => {
649
649
  !a && L || (l(a), a || p(null));
650
650
  },
@@ -663,7 +663,7 @@ function vt(t) {
663
663
  Re,
664
664
  {
665
665
  onClick: (a) => {
666
- a.preventDefault(), a.stopPropagation(), q();
666
+ a.preventDefault(), a.stopPropagation(), J();
667
667
  },
668
668
  disabled: L,
669
669
  children: [
@@ -676,22 +676,22 @@ function vt(t) {
676
676
  ] })
677
677
  }
678
678
  ),
679
- w && /* @__PURE__ */ e(
679
+ N && /* @__PURE__ */ e(
680
680
  ve,
681
681
  {
682
- open: !!w,
682
+ open: !!N,
683
683
  resourceLabel: "Dashboard",
684
- initialTitle: w.title || "",
685
- initialDescription: w.description || "",
686
- onClose: M,
687
- onSave: _e,
688
- isSaving: j(w.id)
684
+ initialTitle: N.title || "",
685
+ initialDescription: N.description || "",
686
+ onClose: z,
687
+ onSave: Ke,
688
+ isSaving: F(N.id)
689
689
  }
690
690
  )
691
691
  ] });
692
692
  }
693
693
  function St(t, f = {}) {
694
- const { enabled: m = !0, eventType: r = "mousedown" } = f, o = qe(null);
694
+ const { enabled: m = !0, eventType: r = "mousedown" } = f, o = Je(null);
695
695
  return ee(() => {
696
696
  const h = (x) => {
697
697
  const i = x.target;
@@ -714,13 +714,13 @@ function Et({
714
714
  }, [t]);
715
715
  const D = () => {
716
716
  o.trim() && m({ title: o, description: x });
717
- }, N = (l) => {
717
+ }, w = (l) => {
718
718
  f(l);
719
719
  };
720
- return /* @__PURE__ */ e(Ie, { open: t, onOpenChange: N, children: /* @__PURE__ */ n(ze, { className: "sm:max-w-[480px]", children: [
721
- /* @__PURE__ */ n(Me, { children: [
720
+ return /* @__PURE__ */ e(Ie, { open: t, onOpenChange: w, children: /* @__PURE__ */ n(Me, { className: "sm:max-w-[480px]", children: [
721
+ /* @__PURE__ */ n(ze, { children: [
722
722
  /* @__PURE__ */ e(Pe, { className: "text-[15px]", children: "New dashboard" }),
723
- /* @__PURE__ */ e(Fe, { className: "text-[13px]", children: "Give it a name and an optional description." })
723
+ /* @__PURE__ */ e(je, { className: "text-[13px]", children: "Give it a name and an optional description." })
724
724
  ] }),
725
725
  /* @__PURE__ */ n("div", { className: "space-y-3", children: [
726
726
  /* @__PURE__ */ n("div", { className: "flex flex-col gap-1.5", children: [
@@ -756,14 +756,14 @@ function Et({
756
756
  )
757
757
  ] })
758
758
  ] }),
759
- /* @__PURE__ */ n(je, { className: "gap-1.5", children: [
759
+ /* @__PURE__ */ n(Fe, { className: "gap-1.5", children: [
760
760
  /* @__PURE__ */ e(
761
761
  O,
762
762
  {
763
763
  type: "button",
764
764
  variant: "outline",
765
765
  size: "xs",
766
- onClick: () => N(!1),
766
+ onClick: () => w(!1),
767
767
  disabled: r,
768
768
  children: "Cancel"
769
769
  }
@@ -796,13 +796,13 @@ function Vt({
796
796
  }, [t]);
797
797
  const D = () => {
798
798
  o.trim() && m({ title: o, description: x });
799
- }, N = (l) => {
799
+ }, w = (l) => {
800
800
  f(l);
801
801
  };
802
- return /* @__PURE__ */ e(Ie, { open: t, onOpenChange: N, children: /* @__PURE__ */ n(ze, { children: [
803
- /* @__PURE__ */ n(Me, { children: [
802
+ return /* @__PURE__ */ e(Ie, { open: t, onOpenChange: w, children: /* @__PURE__ */ n(Me, { children: [
803
+ /* @__PURE__ */ n(ze, { children: [
804
804
  /* @__PURE__ */ e(Pe, { children: "Create New Visual" }),
805
- /* @__PURE__ */ e(Fe, { children: "Add a new visual to your library. You can configure it after creation." })
805
+ /* @__PURE__ */ e(je, { children: "Add a new visual to your library. You can configure it after creation." })
806
806
  ] }),
807
807
  /* @__PURE__ */ n("div", { className: "space-y-4 py-4", children: [
808
808
  /* @__PURE__ */ n("div", { className: "space-y-2", children: [
@@ -835,12 +835,12 @@ function Vt({
835
835
  )
836
836
  ] })
837
837
  ] }),
838
- /* @__PURE__ */ n(je, { children: [
838
+ /* @__PURE__ */ n(Fe, { children: [
839
839
  /* @__PURE__ */ e(
840
840
  O,
841
841
  {
842
842
  variant: "outline",
843
- onClick: () => N(!1),
843
+ onClick: () => w(!1),
844
844
  disabled: r,
845
845
  children: "Cancel"
846
846
  }
@@ -866,41 +866,41 @@ function It({
866
866
  onDashboardItemClick: r,
867
867
  variant: o = "inline"
868
868
  }) {
869
- var u, j;
869
+ var u, F;
870
870
  const h = se(
871
871
  (y) => y.isDashboardEditing
872
- ), [x, i] = b(!1), [D, N] = b(""), [l, c] = b(!1), { currentUser: p, userContext: A } = pe(), U = ((u = A == null ? void 0 : A.permissions) == null ? void 0 : u.canCreateDashboard) ?? !1, { onCreateSuccess: w } = gt({
872
+ ), [x, i] = b(!1), [D, w] = b(""), [l, c] = b(!1), { currentUser: p, userContext: A } = pe(), U = ((u = A == null ? void 0 : A.permissions) == null ? void 0 : u.canCreateDashboard) ?? !1, { onCreateSuccess: N } = gt({
873
873
  onDashboardSelect: r
874
874
  }), { selectVisual: S } = ue(), { handleEditLibraryVisual: E } = Be(), {
875
875
  createResource: V,
876
876
  isCreating: T,
877
877
  refetch: C
878
- } = Ue(), { createResource: v, isCreating: z } = Ne(
878
+ } = Ue(), { createResource: v, isCreating: M } = we(
879
879
  void 0,
880
880
  // onDeleteSuccess (not needed here)
881
881
  (y) => {
882
882
  i(!1), y && (S(y), E(y));
883
883
  }
884
- ), I = o === "overlay", P = h ? "New Visual" : "New", F = h ? "New Visual" : "New Dashboard", d = h ? "Search visuals..." : "Search dashboards...", $ = h ? "Collapse visuals panel" : "Collapse dashboard panel", B = ((p == null ? void 0 : p.name) ?? "").trim(), L = ((p == null ? void 0 : p.email) ?? "").trim(), K = B && B.toLowerCase() !== "undefined" ? B : L || "Current user", W = ((j = K.charAt(0)) == null ? void 0 : j.toUpperCase()) || "?", X = L && L.toLowerCase() !== "undefined" ? L : "", J = St(f, {
884
+ ), I = o === "overlay", P = h ? "New Visual" : "New", j = h ? "New Visual" : "New Dashboard", d = h ? "Search visuals..." : "Search dashboards...", G = h ? "Collapse visuals panel" : "Collapse dashboard panel", B = ((p == null ? void 0 : p.name) ?? "").trim(), L = ((p == null ? void 0 : p.email) ?? "").trim(), H = B && B.toLowerCase() !== "undefined" ? B : L || "Current user", X = ((F = H.charAt(0)) == null ? void 0 : F.toUpperCase()) || "?", Y = L && L.toLowerCase() !== "undefined" ? L : "", Z = St(f, {
885
885
  enabled: t && I
886
- }), Q = Z(
886
+ }), $ = W(
887
887
  "flex h-full flex-col border-r border-border/60 bg-background",
888
- I ? Z(
888
+ I ? W(
889
889
  "absolute inset-y-0 left-0 z-[51] w-60 overflow-hidden shadow-lg transition-transform duration-300 ease-in-out",
890
890
  t ? "translate-x-0" : "pointer-events-none -translate-x-full"
891
891
  ) : "w-full max-w-[17rem] min-w-[11rem] overflow-hidden",
892
892
  m
893
- ), q = (y) => {
893
+ ), J = (y) => {
894
894
  }, s = (y) => {
895
895
  console.log("Editing dashboard:", y);
896
896
  }, R = (y) => {
897
897
  V(y, {
898
- onSuccess: (_) => {
899
- i(!1), w(_, C);
898
+ onSuccess: (K) => {
899
+ i(!1), N(K, C);
900
900
  }
901
901
  });
902
902
  };
903
- return /* @__PURE__ */ e(oe, { children: (!I || t) && /* @__PURE__ */ n("div", { ref: J, className: Q, children: [
903
+ return /* @__PURE__ */ e(oe, { children: (!I || t) && /* @__PURE__ */ n("div", { ref: Z, className: $, children: [
904
904
  /* @__PURE__ */ e("div", { className: "border-b border-border/60 bg-background", children: l ? /* @__PURE__ */ n("div", { className: "flex h-10 items-center gap-1 px-3", children: [
905
905
  /* @__PURE__ */ e(De, { className: "h-3.5 w-3.5 shrink-0 text-muted-foreground" }),
906
906
  /* @__PURE__ */ e(
@@ -908,9 +908,9 @@ function It({
908
908
  {
909
909
  autoFocus: !0,
910
910
  value: D,
911
- onChange: (y) => N(y.target.value),
911
+ onChange: (y) => w(y.target.value),
912
912
  onKeyDown: (y) => {
913
- y.key === "Escape" && (N(""), c(!1));
913
+ y.key === "Escape" && (w(""), c(!1));
914
914
  },
915
915
  placeholder: d,
916
916
  className: "h-7 min-w-0 flex-1 bg-transparent text-[13px] text-foreground placeholder:text-muted-foreground focus:outline-none",
@@ -924,10 +924,10 @@ function It({
924
924
  variant: "ghost",
925
925
  className: "w-7 shrink-0 px-0 text-muted-foreground hover:text-foreground",
926
926
  onClick: () => {
927
- N(""), c(!1);
927
+ w(""), c(!1);
928
928
  },
929
929
  "aria-label": "Close search",
930
- children: /* @__PURE__ */ e(ke, { className: "h-3.5 w-3.5" })
930
+ children: /* @__PURE__ */ e(qe, { className: "h-3.5 w-3.5" })
931
931
  }
932
932
  )
933
933
  ] }) : /* @__PURE__ */ n("div", { className: "flex h-10 items-center justify-between gap-2 px-3", children: [
@@ -950,7 +950,7 @@ function It({
950
950
  size: "xs",
951
951
  variant: "outline",
952
952
  onClick: () => i(!0),
953
- "aria-label": F,
953
+ "aria-label": j,
954
954
  children: [
955
955
  /* @__PURE__ */ e(ce, { className: "h-3.5 w-3.5" }),
956
956
  P
@@ -964,33 +964,33 @@ function It({
964
964
  variant: "ghost",
965
965
  className: "w-7 px-0 text-muted-foreground hover:text-foreground",
966
966
  onClick: f,
967
- "aria-label": $,
967
+ "aria-label": G,
968
968
  children: /* @__PURE__ */ e(xt, { className: "h-3.5 w-3.5" })
969
969
  }
970
970
  )
971
971
  ] })
972
972
  ] }) }),
973
- /* @__PURE__ */ e("div", { className: "flex flex-1 flex-col overflow-auto px-1.5 py-2", children: h ? /* @__PURE__ */ e(wt, { searchQuery: D }) : /* @__PURE__ */ e(
973
+ /* @__PURE__ */ e("div", { className: "flex flex-1 flex-col overflow-auto px-1.5 py-2", children: h ? /* @__PURE__ */ e(Nt, { searchQuery: D }) : /* @__PURE__ */ e(
974
974
  vt,
975
975
  {
976
976
  searchQuery: D,
977
- onLoadDashboard: q,
977
+ onLoadDashboard: J,
978
978
  onEditDashboard: s,
979
979
  onDashboardItemClick: r
980
980
  }
981
981
  ) }),
982
- p && /* @__PURE__ */ e(We, { children: /* @__PURE__ */ e("div", { className: "border-t border-border/60 px-3 py-2", children: /* @__PURE__ */ n(Xe, { children: [
983
- /* @__PURE__ */ e(Ye, { asChild: !0, children: /* @__PURE__ */ n("div", { className: "flex cursor-default items-center gap-2", children: [
984
- /* @__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: W }),
985
- /* @__PURE__ */ e("span", { className: "truncate text-[12px] text-muted-foreground", children: K })
982
+ p && /* @__PURE__ */ e(Xe, { children: /* @__PURE__ */ e("div", { className: "border-t border-border/60 px-3 py-2", children: /* @__PURE__ */ n(Ye, { children: [
983
+ /* @__PURE__ */ e(Qe, { asChild: !0, children: /* @__PURE__ */ n("div", { className: "flex cursor-default items-center gap-2", children: [
984
+ /* @__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: X }),
985
+ /* @__PURE__ */ e("span", { className: "truncate text-[12px] text-muted-foreground", children: H })
986
986
  ] }) }),
987
- /* @__PURE__ */ e(Ze, { side: "top", className: "max-w-xs", children: /* @__PURE__ */ n("div", { className: "space-y-0.5", children: [
988
- /* @__PURE__ */ e("div", { className: "font-medium", children: K }),
989
- X && /* @__PURE__ */ e("div", { className: "text-[11px] opacity-80", children: X }),
987
+ /* @__PURE__ */ e(We, { side: "top", className: "max-w-xs", children: /* @__PURE__ */ n("div", { className: "space-y-0.5", children: [
988
+ /* @__PURE__ */ e("div", { className: "font-medium", children: H }),
989
+ Y && /* @__PURE__ */ e("div", { className: "text-[11px] opacity-80", children: Y }),
990
990
  p.role && /* @__PURE__ */ n("div", { className: "text-[11px] opacity-80", children: [
991
991
  "Role:",
992
992
  " ",
993
- Je(p.role.replace(/_/g, " "))
993
+ Ze(p.role.replace(/_/g, " "))
994
994
  ] })
995
995
  ] }) })
996
996
  ] }) }) }),
@@ -1000,7 +1000,7 @@ function It({
1000
1000
  open: x,
1001
1001
  onOpenChange: i,
1002
1002
  onSubmit: v,
1003
- isCreating: z
1003
+ isCreating: M
1004
1004
  }
1005
1005
  ) : /* @__PURE__ */ e(
1006
1006
  Et,