react-semaphor 0.1.163 → 0.1.165

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 (25) hide show
  1. package/dist/chunks/{dashboard-controls-lOO1Kawo.js → dashboard-controls-BA7vyPHM.js} +104 -104
  2. package/dist/chunks/{dashboard-controls-ChqSrjnv.js → dashboard-controls-CEnWdjuE.js} +1 -1
  3. package/dist/chunks/{dashboard-export-dialog-BVBiNvo4.js → dashboard-export-dialog-9nJsWzgJ.js} +1 -1
  4. package/dist/chunks/{dashboard-export-dialog-h5owxj4H.js → dashboard-export-dialog-CEVJnrSj.js} +42 -42
  5. package/dist/chunks/{dashboard-json-Bp8U1SuM.js → dashboard-json-B4UTFvyR.js} +1 -1
  6. package/dist/chunks/{dashboard-json-D4Apm_Z0.js → dashboard-json-C8YFsFVt.js} +1 -1
  7. package/dist/chunks/{edit-dashboard-visual-BGY-Nj8j.js → edit-dashboard-visual-BMBiT_V_.js} +2 -2
  8. package/dist/chunks/{edit-dashboard-visual-ItNwbDeL.js → edit-dashboard-visual-DKqjPVRM.js} +467 -467
  9. package/dist/chunks/{editor-action-buttons-D91jaw9J.js → editor-action-buttons-De18jUjn.js} +2 -2
  10. package/dist/chunks/{editor-action-buttons-B2mhU48J.js → editor-action-buttons-xrbSWcSm.js} +1 -1
  11. package/dist/chunks/{index-BZpXKhl2.js → index-5dE6RqWv.js} +13528 -13412
  12. package/dist/chunks/{index-CM3-W6qg.js → index-odiH0LJA.js} +229 -224
  13. package/dist/chunks/{resource-management-panel-B_pm6Dv6.js → resource-management-panel-CK-wL4Jy.js} +1 -1
  14. package/dist/chunks/{resource-management-panel-CG1NjRIJ.js → resource-management-panel-CjWRsuif.js} +124 -124
  15. package/dist/chunks/{use-role-aware-display-preferences-DLpbW937.js → use-role-aware-display-preferences-Bj_-I3oD.js} +1 -1
  16. package/dist/chunks/{use-role-aware-display-preferences-VBz5V4SH.js → use-role-aware-display-preferences-Cm7hg_Us.js} +1 -1
  17. package/dist/chunks/{use-visual-utils-CRbrMwuR.js → use-visual-utils-Du173Ucu.js} +1 -1
  18. package/dist/chunks/{use-visual-utils-B1rNqRXZ.js → use-visual-utils-DwnVUHSd.js} +12 -12
  19. package/dist/dashboard/index.cjs +1 -1
  20. package/dist/dashboard/index.js +1 -1
  21. package/dist/index.cjs +2 -2
  22. package/dist/index.js +111 -108
  23. package/dist/surfboard/index.cjs +1 -1
  24. package/dist/surfboard/index.js +1 -1
  25. package/package.json +1 -1
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),s=require("./index-CM3-W6qg.js"),f=require("react");require("react-dom");const G=require("./dashboard-export-dialog-BVBiNvo4.js"),$e=require("./use-role-aware-display-preferences-DLpbW937.js"),he=require("./editor-action-buttons-B2mhU48J.js");function ze(t){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const a in t)if(a!=="default"){const r=Object.getOwnPropertyDescriptor(t,a);Object.defineProperty(n,a,r.get?r:{enumerable:!0,get:()=>t[a]})}}return n.default=t,Object.freeze(n)}const w=ze(f);/**
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),s=require("./index-odiH0LJA.js"),f=require("react");require("react-dom");const G=require("./dashboard-export-dialog-9nJsWzgJ.js"),$e=require("./use-role-aware-display-preferences-Bj_-I3oD.js"),he=require("./editor-action-buttons-xrbSWcSm.js");function ze(t){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const a in t)if(a!=="default"){const r=Object.getOwnPropertyDescriptor(t,a);Object.defineProperty(n,a,r.get?r:{enumerable:!0,get:()=>t[a]})}}return n.default=t,Object.freeze(n)}const w=ze(f);/**
2
2
  * @license lucide-react v0.453.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1,4 +1,4 @@
1
- "use strict";const e=require("react/jsx-runtime"),s=require("./index-CM3-W6qg.js"),w=require("./editor-action-buttons-B2mhU48J.js"),x=require("react"),F=require("./use-visual-utils-CRbrMwuR.js");/**
1
+ "use strict";const e=require("react/jsx-runtime"),s=require("./index-odiH0LJA.js"),w=require("./editor-action-buttons-xrbSWcSm.js"),x=require("react"),F=require("./use-visual-utils-Du173Ucu.js");/**
2
2
  * @license lucide-react v0.453.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1,15 +1,15 @@
1
1
  import { jsx as e, jsxs as a, Fragment as F } from "react/jsx-runtime";
2
- import { l as X, aD as $, aE as H, aF as W, aG as _, aH as q, aI as A, aJ as Y, aK as Z, aL as V, aM as J, B as P, L as T, n as E, q as ee, u as b, az as ae, o as K, aN as se, aO as O, t as v, Q as te, aP as re, c as I, aQ as B, aR as L, aS as z, aT as U, aU as G, m as oe, aV as le, aW as ne, aX as de, aY as ie, aZ as ce, a_ as he, a$ as ue, b0 as me, b1 as pe, b2 as fe, b3 as ve, b4 as ge, a4 as be, J as Ce, b5 as we, b6 as xe, ay as De, b7 as ye, b8 as R, b9 as Ne, ba as Se, bb as Ae, bc as Pe, bd as Fe, be as ke, a6 as Ie } from "./index-BZpXKhl2.js";
3
- import { E as Ee, V as Me, a as Ve, b as Te, S as j, c as Oe } from "./editor-action-buttons-D91jaw9J.js";
2
+ import { l as J, aE as $, aF as H, aG as K, aH as W, aI as _, aJ as A, aK as Q, aL as Z, aM as V, aN as q, B as P, L as T, n as E, q as ee, u as b, aA as ae, o as X, aO as se, aP as O, t as v, R as te, aQ as re, c as I, aR as B, aS as L, aT as z, aU as U, aV as G, m as oe, aW as le, aX as ne, aY as de, aZ as ie, a_ as ce, a$ as he, b0 as ue, b1 as me, b2 as pe, b3 as fe, b4 as ve, b5 as ge, a5 as be, K as Ce, b6 as we, b7 as xe, az as De, b8 as Ne, b9 as R, ba as ye, bb as Se, bc as Ae, bd as Pe, be as Fe, bf as ke, a7 as Ie } from "./index-5dE6RqWv.js";
3
+ import { E as Ee, V as Me, a as Ve, b as Te, S as j, c as Oe } from "./editor-action-buttons-De18jUjn.js";
4
4
  import Be, { useState as C, useContext as Le, useEffect as ze } from "react";
5
- import { a as Q } from "./use-visual-utils-B1rNqRXZ.js";
5
+ import { a as Y } from "./use-visual-utils-DwnVUHSd.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 Ue = X("CirclePlus", [
12
+ const Ue = J("CirclePlus", [
13
13
  ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
14
14
  ["path", { d: "M8 12h8", key: "1wcyev" }],
15
15
  ["path", { d: "M12 8v8", key: "napkw2" }]
@@ -24,11 +24,11 @@ function Ge({
24
24
  }) {
25
25
  const [s, l] = C(
26
26
  r && o ? `Copy of ${o}` : o || ""
27
- ), [n, f] = C(""), [g, w] = C(!r), [p, N] = C(!0);
27
+ ), [n, f] = C(""), [g, w] = C(!r), [p, y] = C(!0);
28
28
  Be.useEffect(() => {
29
29
  c && (l(
30
30
  r && o ? `Copy of ${o}` : o || ""
31
- ), f(""), w(!r), N(!0));
31
+ ), f(""), w(!r), y(!0));
32
32
  }, [c, r, o]);
33
33
  const x = () => {
34
34
  s.trim() && (!g && !p || m({
@@ -39,15 +39,15 @@ function Ge({
39
39
  }));
40
40
  }, D = s.trim() && (g || p);
41
41
  return /* @__PURE__ */ e($, { open: c, onOpenChange: i, children: /* @__PURE__ */ a(H, { className: "sm:max-w-[425px]", children: [
42
- /* @__PURE__ */ a(W, { children: [
43
- /* @__PURE__ */ e(_, { children: "Save Visual As" }),
44
- /* @__PURE__ */ e(q, { children: r ? "Create a copy of this visual with a new name" : "Save this visual to make it reusable" })
42
+ /* @__PURE__ */ a(K, { children: [
43
+ /* @__PURE__ */ e(W, { children: "Save Visual As" }),
44
+ /* @__PURE__ */ e(_, { children: r ? "Create a copy of this visual with a new name" : "Save this visual to make it reusable" })
45
45
  ] }),
46
46
  /* @__PURE__ */ a("div", { className: "grid gap-4 py-4", children: [
47
47
  /* @__PURE__ */ a("div", { className: "grid gap-2", children: [
48
48
  /* @__PURE__ */ e(A, { htmlFor: "name", children: "Name" }),
49
49
  /* @__PURE__ */ e(
50
- Y,
50
+ Q,
51
51
  {
52
52
  id: "name",
53
53
  value: s,
@@ -80,7 +80,7 @@ function Ge({
80
80
  {
81
81
  id: "save-to-dashboard",
82
82
  checked: p,
83
- onCheckedChange: (t) => N(!!t),
83
+ onCheckedChange: (t) => y(!!t),
84
84
  disabled: d
85
85
  }
86
86
  ),
@@ -122,7 +122,7 @@ function Ge({
122
122
  !g && !p && /* @__PURE__ */ e("p", { className: "text-sm text-destructive", children: "Please select at least one destination" })
123
123
  ] })
124
124
  ] }),
125
- /* @__PURE__ */ a(J, { children: [
125
+ /* @__PURE__ */ a(q, { children: [
126
126
  /* @__PURE__ */ e(
127
127
  P,
128
128
  {
@@ -142,19 +142,19 @@ function Ge({
142
142
  function Re() {
143
143
  const [c, i] = C(!1), [r, o] = C(!1), [d, m] = C(null), s = E((u) => u.frame), l = E((u) => u.card), n = ee(), f = b((u) => u.selectedSheetId), g = b(
144
144
  (u) => u.actions.setIsDashboardPanelOpen
145
- ), { getUpdatedFrame: w } = Q(), { selectVisual: p } = ae(), { addFrame: N, setSelectedFrameId: x, setIsVisualEditing: D } = K(), t = !!(s != null && s.visualId), S = (() => {
146
- var u, y;
147
- return ((u = s == null ? void 0 : s.cards) == null ? void 0 : u.length) === 1 && ((y = s.cards[0]) != null && y.title) ? s.cards[0].title : n != null && n.title ? n.title : (l == null ? void 0 : l.title) || "Untitled Visual";
145
+ ), { getUpdatedFrame: w } = Y(), { selectVisual: p } = ae(), { addFrame: y, setSelectedFrameId: x, setIsVisualEditing: D } = X(), t = !!(s != null && s.visualId), S = (() => {
146
+ var u, N;
147
+ return ((u = s == null ? void 0 : s.cards) == null ? void 0 : u.length) === 1 && ((N = s.cards[0]) != null && N.title) ? s.cards[0].title : n != null && n.title ? n.title : (l == null ? void 0 : l.title) || "Untitled Visual";
148
148
  })(), h = se((u) => {
149
149
  if (u != null && u.id) {
150
150
  if (p(u), r && d && f) {
151
- const y = {
151
+ const N = {
152
152
  ...d,
153
153
  id: O(),
154
154
  visualId: u.id
155
155
  // Link to the newly created library visual
156
156
  };
157
- N(f, y, "end"), x(y.id), o(!1), m(null), D(!1);
157
+ y(f, N, "end"), x(N.id), o(!1), m(null), D(!1);
158
158
  }
159
159
  g(!0), i(!1);
160
160
  }
@@ -167,14 +167,14 @@ function Re() {
167
167
  v.error("No sheet selected");
168
168
  return;
169
169
  }
170
- const y = w(), M = y.cards.length === 1 ? {
171
- ...y,
172
- cards: y.cards.map((k) => ({
170
+ const N = w(), M = N.cards.length === 1 ? {
171
+ ...N,
172
+ cards: N.cards.map((k) => ({
173
173
  ...k,
174
174
  title: u.name
175
175
  // Use visual name as card title
176
176
  }))
177
- } : y;
177
+ } : N;
178
178
  if (u.saveToLibrary) {
179
179
  o(u.saveToCurrentDashboard), m(M);
180
180
  const k = {
@@ -193,7 +193,7 @@ function Re() {
193
193
  visualId: void 0
194
194
  // Explicitly no visualId for local visuals
195
195
  };
196
- N(f, k, "end"), x(k.id), v.success("Visual saved to dashboard"), i(!1), D(!1);
196
+ y(f, k, "end"), x(k.id), v.success("Visual saved to dashboard"), i(!1), D(!1);
197
197
  }
198
198
  },
199
199
  isLibraryVisual: t,
@@ -201,17 +201,17 @@ function Re() {
201
201
  isSaving: h.isPending
202
202
  };
203
203
  }
204
- function Ke({
204
+ function Xe({
205
205
  className: c
206
206
  }) {
207
- const i = E((h) => h.frame), r = E((h) => h.card), o = te((h) => h.selectedVisual), d = b((h) => h.selectedFrameId), m = b((h) => h.selectedSheetId), { setIsVisualEditing: s } = K(), l = !!(i != null && i.visualId || o != null && o.id), n = !!(i != null && i.visualId && d), f = l && !n, {
207
+ const i = E((h) => h.frame), r = E((h) => h.card), o = te((h) => h.selectedVisual), d = b((h) => h.selectedFrameId), m = b((h) => h.selectedSheetId), { setIsVisualEditing: s } = X(), l = !!(i != null && i.visualId || o != null && o.id), n = !!(i != null && i.visualId && d), f = l && !n, {
208
208
  saveAsDialogOpen: g,
209
209
  setSaveAsDialogOpen: w,
210
210
  handleSaveAs: p,
211
- isLibraryVisual: N,
211
+ isLibraryVisual: y,
212
212
  currentVisualName: x,
213
213
  isSaving: D
214
- } = Re(), { handleAddLibraryVisual: t } = Q(), S = async () => {
214
+ } = Re(), { handleAddLibraryVisual: t } = Y(), S = async () => {
215
215
  if (!m) {
216
216
  v.error("No dashboard sheet selected");
217
217
  return;
@@ -289,7 +289,7 @@ function Ke({
289
289
  onOpenChange: (h) => {
290
290
  D || w(h);
291
291
  },
292
- isLibraryVisual: N,
292
+ isLibraryVisual: y,
293
293
  currentVisualName: x,
294
294
  isSaving: D,
295
295
  onConfirm: p
@@ -297,7 +297,7 @@ function Ke({
297
297
  )
298
298
  ] });
299
299
  }
300
- function Qe({
300
+ function Ye({
301
301
  className: c,
302
302
  //labelClassName,
303
303
  switchClassName: i
@@ -318,7 +318,7 @@ function Qe({
318
318
  /* @__PURE__ */ e("label", { htmlFor: "advanced-mode", className: "sr-only", children: "Advanced Mode" })
319
319
  ] });
320
320
  }
321
- function Xe({
321
+ function Je({
322
322
  open: c,
323
323
  onOpenChange: i,
324
324
  onSave: r,
@@ -368,7 +368,7 @@ function Xe({
368
368
  ] })
369
369
  ] }) });
370
370
  }
371
- function Ye(c, i, r, o) {
371
+ function Qe(c, i, r, o) {
372
372
  ze(() => {
373
373
  c && !r && i && o(be(i));
374
374
  }, [c, r, i, o]);
@@ -418,7 +418,7 @@ function ea({
418
418
  }), n = b((t) => {
419
419
  var S;
420
420
  return (S = t.dashboard) == null ? void 0 : S.sheets;
421
- }), f = b((t) => t.selectedSheetId), { authToken: g, tokenProps: w } = De(), p = n == null ? void 0 : n.find((t) => t.id === f), N = ((n == null ? void 0 : n.length) || 0) > 1, x = () => {
421
+ }), f = b((t) => t.selectedSheetId), { authToken: g, tokenProps: w } = De(), p = n == null ? void 0 : n.find((t) => t.id === f), y = ((n == null ? void 0 : n.length) || 0) > 1, x = () => {
422
422
  l({
423
423
  sheetSelection: "current",
424
424
  protectPdf: !1,
@@ -464,16 +464,16 @@ function ea({
464
464
  i(!0);
465
465
  },
466
466
  children: /* @__PURE__ */ a(H, { className: "sm:max-w-[425px]", children: [
467
- /* @__PURE__ */ a(W, { children: [
468
- /* @__PURE__ */ e(_, { children: "Export Dashboard" }),
469
- /* @__PURE__ */ e(q, { children: "Export your dashboard as a PDF document." })
467
+ /* @__PURE__ */ a(K, { children: [
468
+ /* @__PURE__ */ e(W, { children: "Export Dashboard" }),
469
+ /* @__PURE__ */ e(_, { children: "Export your dashboard as a PDF document." })
470
470
  ] }),
471
471
  /* @__PURE__ */ a("div", { className: "space-y-4 py-4", children: [
472
- N && /* @__PURE__ */ a(F, { children: [
472
+ y && /* @__PURE__ */ a(F, { children: [
473
473
  /* @__PURE__ */ a("div", { className: "space-y-3", children: [
474
474
  /* @__PURE__ */ e(A, { children: "Export Scope" }),
475
475
  /* @__PURE__ */ a(
476
- ye,
476
+ Ne,
477
477
  {
478
478
  value: s.sheetSelection,
479
479
  onValueChange: (t) => l({
@@ -515,7 +515,7 @@ function ea({
515
515
  }
516
516
  )
517
517
  ] }),
518
- /* @__PURE__ */ e(Ne, {})
518
+ /* @__PURE__ */ e(ye, {})
519
519
  ] }),
520
520
  /* @__PURE__ */ a("div", { className: "space-y-3", children: [
521
521
  /* @__PURE__ */ a("div", { className: "flex items-center space-x-2", children: [
@@ -578,7 +578,7 @@ function ea({
578
578
  ] })
579
579
  ] })
580
580
  ] }),
581
- /* @__PURE__ */ a(J, { children: [
581
+ /* @__PURE__ */ a(q, { children: [
582
582
  /* @__PURE__ */ e(P, { variant: "outline", onClick: x, disabled: d, children: "Cancel" }),
583
583
  /* @__PURE__ */ e(P, { onClick: D, disabled: d, children: d ? /* @__PURE__ */ a(F, { children: [
584
584
  /* @__PURE__ */ e(T, { className: "mr-2 h-4 w-4 animate-spin" }),
@@ -593,10 +593,10 @@ function ea({
593
593
  );
594
594
  }
595
595
  export {
596
- Qe as A,
596
+ Ye as A,
597
597
  ea as D,
598
598
  Ze as S,
599
- Xe as U,
600
- Ke as V,
601
- Ye as u
599
+ Je as U,
600
+ Xe as V,
601
+ Qe as u
602
602
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),a=require("./index-CM3-W6qg.js");require("react");require("react-dom");function i(){const o=a.useDashboardStore(e=>e.dashboard),r=a.useDashboardStore(e=>e.actions.setDashboard),t=a.useDashboardStore(e=>e.showDashboardJSON),n=a.useDashboardStore(e=>e.actions.setShowDashboardJSON);return s.jsxs("div",{className:a.cn("relative p-2",{hidden:!t}),children:[s.jsxs(a.Button,{variant:"secondary",size:"sm",className:"absolute right-2 top-2 z-10 h-8",onClick:()=>n(!1),children:[s.jsx(a.X,{className:"mr-2 h-4 w-4"}),"Close"]}),s.jsx(a.de,{onChange:e=>{if(e)try{JSON.parse(e),r(JSON.parse(e))}catch{}},defaultLanguage:"json",className:"h-[550px] overflow-y-auto",value:JSON.stringify(o,null,2),options:{minimap:{enabled:!1},glyphMargin:!1,wordWrap:"on",scrollbar:{verticalScrollbarSize:0,horizontalScrollbarSize:0},fontSize:12,renderLineHighlight:"none"}})]})}exports.default=i;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),a=require("./index-odiH0LJA.js");require("react");require("react-dom");function i(){const o=a.useDashboardStore(e=>e.dashboard),r=a.useDashboardStore(e=>e.actions.setDashboard),t=a.useDashboardStore(e=>e.showDashboardJSON),n=a.useDashboardStore(e=>e.actions.setShowDashboardJSON);return s.jsxs("div",{className:a.cn("relative p-2",{hidden:!t}),children:[s.jsxs(a.Button,{variant:"secondary",size:"sm",className:"absolute right-2 top-2 z-10 h-8",onClick:()=>n(!1),children:[s.jsx(a.X,{className:"mr-2 h-4 w-4"}),"Close"]}),s.jsx(a.de,{onChange:e=>{if(e)try{JSON.parse(e),r(JSON.parse(e))}catch{}},defaultLanguage:"json",className:"h-[550px] overflow-y-auto",value:JSON.stringify(o,null,2),options:{minimap:{enabled:!1},glyphMargin:!1,wordWrap:"on",scrollbar:{verticalScrollbarSize:0,horizontalScrollbarSize:0},fontSize:12,renderLineHighlight:"none"}})]})}exports.default=i;
@@ -1,5 +1,5 @@
1
1
  import { jsxs as o, jsx as r } from "react/jsx-runtime";
2
- import { u as s, c as l, B as h, X as d, d as c } from "./index-BZpXKhl2.js";
2
+ import { u as s, c as l, B as h, X as d, d as c } from "./index-5dE6RqWv.js";
3
3
  import "react";
4
4
  import "react-dom";
5
5
  function N() {