react-semaphor 0.1.108 → 0.1.110

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 (24) hide show
  1. package/dist/chunks/{dashboard-controls-CkYh7hMt.js → dashboard-controls-BYAphgOD.js} +3 -3
  2. package/dist/chunks/{dashboard-controls-Z0m8aOge.js → dashboard-controls-cLWit6bH.js} +1 -1
  3. package/dist/chunks/{dashboard-json-EVMN6Gfi.js → dashboard-json-BFFNgT76.js} +1 -1
  4. package/dist/chunks/{dashboard-json-B7MLQI42.js → dashboard-json-DqxQUnfm.js} +1 -1
  5. package/dist/chunks/{edit-dashboard-visual-DlRlHPDz.js → edit-dashboard-visual-CbwhVEin.js} +1 -1
  6. package/dist/chunks/{edit-dashboard-visual-CwGS1DvW.js → edit-dashboard-visual-_unvQdbT.js} +3 -3
  7. package/dist/chunks/{editor-action-buttons-cIbxuMTj.js → editor-action-buttons-1iAFRYvs.js} +1 -1
  8. package/dist/chunks/{editor-action-buttons-BdhKxYg-.js → editor-action-buttons-XRl_GLPH.js} +2 -2
  9. package/dist/chunks/{index-DBC-sSEX.js → index-D4GRKodP.js} +2 -2
  10. package/dist/chunks/{index-BXryLh06.js → index-Dbjhjr4S.js} +2577 -2552
  11. package/dist/chunks/{resource-management-panel-CRSm24Px.js → resource-management-panel-CsMaAMxK.js} +1 -1
  12. package/dist/chunks/{resource-management-panel-CtwDeLmD.js → resource-management-panel-cdW-DFtz.js} +2 -2
  13. package/dist/chunks/{schedule-dashboard-BVTN-29R.js → schedule-dashboard-Dkma2RUp.js} +3 -3
  14. package/dist/chunks/{schedule-dashboard-D8iJX8Iz.js → schedule-dashboard-kWXZiUDD.js} +1 -1
  15. package/dist/chunks/{use-visual-utils-CYPIb5Iu.js → use-visual-utils-BF9XvM4A.js} +1 -1
  16. package/dist/chunks/{use-visual-utils-BvYqu1Ay.js → use-visual-utils-BhQcVYo4.js} +1 -1
  17. package/dist/dashboard/index.cjs +1 -1
  18. package/dist/dashboard/index.js +1 -1
  19. package/dist/index.cjs +1 -1
  20. package/dist/index.js +4 -4
  21. package/dist/style.css +1 -1
  22. package/dist/surfboard/index.cjs +1 -1
  23. package/dist/surfboard/index.js +1 -1
  24. 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-DBC-sSEX.js"),m=require("react"),ae=require("./use-visual-utils-BvYqu1Ay.js"),le=require("./use-click-outside-B9T3lmcw.js");/**
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),s=require("./index-D4GRKodP.js"),m=require("react"),ae=require("./use-visual-utils-BhQcVYo4.js"),le=require("./use-click-outside-B9T3lmcw.js");/**
2
2
  * @license lucide-react v0.453.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1,7 +1,7 @@
1
1
  import { jsx as e, jsxs as t, Fragment as ve } from "react/jsx-runtime";
2
- import { b as Ce, aM as pe, u as de, aa as Ge, ak as J, aN as Ke, aO as We, aP as ye, c as q, aQ as Se, aR as ce, B as j, aS as xe, aC as Ye, aD as qe, aT as Qe, aF as Xe, aG as G, aU as ue, ac as k, aV as Ze, aW as be, aX as fe, aY as $e, aZ as Je, I as ke, a_ as Ve, a$ as ee, b0 as Ee, b1 as et, v as Le, R as Te, b2 as Oe, b3 as Ae, b4 as Pe, b5 as Ue, b6 as Re, b7 as Ie, b8 as Me, b9 as je, ba as Fe, bb as tt, bc as st, bd as at, aA as $, aj as nt, be as it, bf as ze, bg as rt, ao as ot, ap as lt, aq as dt, ar as ct, as as ut, at as we, au as he, ax as ht, bh as mt, bi as pt, bj as ft, bk as gt, bl as Dt, bm as Nt, bn as xt, bo as bt } from "./index-BXryLh06.js";
2
+ import { b as Ce, aM as pe, u as de, aa as Ge, ak as J, aN as Ke, aO as We, aP as ye, c as q, aQ as Se, aR as ce, B as j, aS as xe, aC as Ye, aD as qe, aT as Qe, aF as Xe, aG as G, aU as ue, ac as k, aV as Ze, aW as be, aX as fe, aY as $e, aZ as Je, I as ke, a_ as Ve, a$ as ee, b0 as Ee, b1 as et, v as Le, R as Te, b2 as Oe, b3 as Ae, b4 as Pe, b5 as Ue, b6 as Re, b7 as Ie, b8 as Me, b9 as je, ba as Fe, bb as tt, bc as st, bd as at, aA as $, aj as nt, be as it, bf as ze, bg as rt, ao as ot, ap as lt, aq as dt, ar as ct, as as ut, at as we, au as he, ax as ht, bh as mt, bi as pt, bj as ft, bk as gt, bl as Dt, bm as Nt, bn as xt, bo as bt } from "./index-Dbjhjr4S.js";
3
3
  import wt, { useState as D, useEffect as me } from "react";
4
- import { a as Be } from "./use-visual-utils-CYPIb5Iu.js";
4
+ import { a as Be } from "./use-visual-utils-BF9XvM4A.js";
5
5
  import { u as vt } from "./use-click-outside-CMeO_QFI.js";
6
6
  /**
7
7
  * @license lucide-react v0.453.0 - ISC
@@ -1,8 +1,8 @@
1
1
  import { jsx as e, jsxs as r, Fragment as E } from "react/jsx-runtime";
2
- import { b as W, ao as _, ap as $, aq as G, ar as J, as as K, at as M, au as R, av as X, aw as T, ax as Q, B as k, ac as Y, aa as N, ae as Z, u as g, ak as ee, a8 as q, ay as ae, az as B, ah as w, aA as se, aB as te, c as y, aC as O, aD as P, aE as L, aF as z, aG as j, ab as ne, aH as de, aI as le, aJ as re, I as ie, aK as oe, aL as ce } from "./index-BXryLh06.js";
3
- import { E as he, V as ue, a as me, b as ve, S as U, c as pe } from "./editor-action-buttons-BdhKxYg-.js";
2
+ import { b as W, ao as _, ap as $, aq as G, ar as J, as as K, at as M, au as R, av as X, aw as T, ax as Q, B as k, ac as Y, aa as N, ae as Z, u as g, ak as ee, a8 as q, ay as ae, az as B, ah as w, aA as se, aB as te, c as y, aC as O, aD as P, aE as L, aF as z, aG as j, ab as ne, aH as de, aI as le, aJ as re, I as ie, aK as oe, aL as ce } from "./index-Dbjhjr4S.js";
3
+ import { E as he, V as ue, a as me, b as ve, S as U, c as pe } from "./editor-action-buttons-XRl_GLPH.js";
4
4
  import fe, { useState as C, useContext as be } from "react";
5
- import { a as H } from "./use-visual-utils-CYPIb5Iu.js";
5
+ import { a as H } from "./use-visual-utils-BF9XvM4A.js";
6
6
  /**
7
7
  * @license lucide-react v0.453.0 - ISC
8
8
  *
@@ -1,4 +1,4 @@
1
- "use strict";const s=require("react/jsx-runtime"),e=require("./index-DBC-sSEX.js"),f=require("./editor-action-buttons-cIbxuMTj.js"),p=require("react"),y=require("./use-visual-utils-BvYqu1Ay.js");/**
1
+ "use strict";const s=require("react/jsx-runtime"),e=require("./index-D4GRKodP.js"),f=require("./editor-action-buttons-1iAFRYvs.js"),p=require("react"),y=require("./use-visual-utils-BhQcVYo4.js");/**
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
- import { ai as G, aj as z, ad as Y, ae as J, ak as K, ab as _, a8 as X, u as U, al as Z, am as q, ah as v, an as ee, aa as h } from "./index-BXryLh06.js";
1
+ import { ai as G, aj as z, ad as Y, ae as J, ak as K, ab as _, a8 as X, u as U, al as Z, am as q, ah as v, an as ee, aa as h } from "./index-Dbjhjr4S.js";
2
2
  import { useState as T, useEffect as te, useCallback as V } from "react";
3
3
  function re(e) {
4
4
  const a = e.toUpperCase().indexOf("WHERE"), r = e.toUpperCase().indexOf("GROUP BY"), t = e.toUpperCase().indexOf("LIMIT"), i = e.toUpperCase().indexOf("ORDER BY");
@@ -1 +1 @@
1
- "use strict";const o=require("./index-DBC-sSEX.js"),b=require("react");function _(e){const a=e.toUpperCase().indexOf("WHERE"),r=e.toUpperCase().indexOf("GROUP BY"),t=e.toUpperCase().indexOf("LIMIT"),d=e.toUpperCase().indexOf("ORDER BY");let c=e.length;if(d!==-1&&(c=d),t!==-1&&t<c&&(c=t),a!==-1){const n=e.substring(0,a),s=e.substring(a);return`${n} {{ filters | where }} AND ${s.substring(6)}`}else if(r!==-1){const n=e.substring(0,r),s=e.substring(r);return`${n} {{ filters | where }} ${s}`}else{const n=e.substring(0,c),s=e.substring(c);return console.log("beforeClause",n),console.log("afterClause",s),s?`${n} {{ filters | where }} ${s}`:`${n.replace(/;$/,"")} {{ filters | where }}`}}function B(e){const[a,r]=b.useState(null),[t,d]=b.useState(null),c=o.useEnsureReactGlobals();return b.useEffect(()=>{if(!e||e.trim()===""){r(null),d(null);return}if(!c)return;(async()=>{try{if(!e.startsWith("http://")&&!e.startsWith("https://"))throw new Error(`Invalid URL format: ${e}`);try{new URL(e)}catch{throw new Error(`Invalid URL: ${e}`)}const l=`${e.endsWith("/")?e:`${e}/`}index.js`;try{if(!(await fetch(l,{method:"HEAD"})).ok)throw new Error(`Module not found at ${l}`)}catch{}const m=await import(l);if(typeof m.useChartStore!="function")throw new Error("useChartStore is not a function");r(()=>m.useChartStore),d(null)}catch(s){const l=s instanceof Error?s.message:"Unknown error";console.error("Failed to load remote chart store:",l),d(l),r(null)}})()},[e,c]),a}function H(e,a){if(e.length===0)return"";if(a){const r=e.find(t=>t.id===a);if(r){const t=r.tabTitle;if(t=="All__Header")return e[0].id;if(t&&t.endsWith("__Header")){const c=t.split("__")[0],n=e.find(s=>s.tabTitle===c);return n?n.id:e[0].id}return a}}return e[0].id}async function j(e,a,r,t){if(!a||!r)throw new Error("Missing auth token or visual ID");const d=["resource-by-id","visual",r],c=t.getQueryData(d);if(c)return console.log("Using cached visual data for:",r),{data:c,fromCache:!0};console.log("Fetching visual data from network for:",r);const n=o.ue.loading("Loading visual...",{position:"top-center"});try{const s=await fetch(`${e}/management/v1/visuals/${r}`,{headers:{Authorization:`Bearer ${a}`}});if(!s.ok)throw new Error("Failed to load visual");const l=await s.json();return t.setQueryData(d,l),o.ue.dismiss(n),{data:l,fromCache:!1}}catch(s){throw o.ue.dismiss(n),s}}function T(e){if(typeof e=="string")return JSON.parse(e);if(typeof e=="object")return e;throw new Error("Invalid frame object format")}function Q(e,a){var c,n;const r=(e==null?void 0:e.frameObject)??((c=e==null?void 0:e.visual)==null?void 0:c.frameObject);if(!r)return!1;const t=T(r);if(!(t!=null&&t.cards)||t.cards.length===0)return!1;const d=(n=t.cards)==null?void 0:n.find(s=>s.id===t.activeCardId);return d?(o.setupEditorWithCard({...a,frame:t,card:d,visualId:(e==null?void 0:e.id)||t.visualId}),!0):!1}function G(){var g;const{setCardSql:e}=o.useEditorActions(),a=o.useEditorStore(i=>i.frame),r=o.useEditorStore(i=>i.card),t=B(((g=r.customCardPreferences)==null?void 0:g.url)||""),d=o.useEditorStore(i=>i.selectedSchemaName),c=o.useEditorStore(i=>i.selectedDatamodelId),n=o.useEditorStore(i=>i.selectedDatabaseName),s=o.useEditorStore(i=>i.selectedTableName),l=o.useEditorStore(i=>i.selectedConnectionId),m=o.useEditorStore(i=>i.isShowingVisual),f=r.sql;return{getUpdatedFrame:b.useCallback(()=>{var E;let i=f;f&&!f.includes("{{")&&(i=_(f),e(i));const C=(E=t==null?void 0:t.getState())==null?void 0:E.settings,U={...r,dataSource:r.dataSource||{mode:"directSource"},lastSelectedSchema:d,lastSelectedDatamodelId:c,lastSelectedDatabase:n,lastSelectedTable:s,connectionId:l,sql:i,customCfg:m?r.customCfg:null,preferences:r.preferences,...C&&{customCardPreferences:{...r.customCardPreferences,settings:C}}},w=a.cards.map(S=>S.id===r.id?U:S);return{...a,cards:w,activeCardId:H(w,a.activeCardId)}},[r,a,m,d,c,n,s,l,e,t,f])}}function z(){const{authToken:e,tokenProps:a}=o.useSemaphorContext(),r=o.useQueryClient(),t=o.useSelectedVisual(),{selectVisual:d}=o.useManagementActions(),{setFrame:c,setCard:n,setIsDevMode:s,setActiveTabCardId:l,updateDataSource:m,setQueryResultColumns:f,setSelectedConnectionId:V,setSelectedDatabaseName:g,setSelectedSchemaName:i,setSelectedTableName:C,setSelectedDatamodelId:U,setFilterValues:w,setApplyFilters:E}=o.useEditorActions(),{setIsDashboardEditing:S,setIsVisualEditing:$,setSelectedFrameId:v,clearSelectedFrameId:A,addFrame:N,setIsDashboardPanelOpen:R}=o.useDashboardActions(),I=o.useDashboardStore(u=>u.selectedSheetId),D=o.useDashboardStore(u=>u.selectedFrameId),O=o.useDashboardStore(u=>u.dashboard),x=o.useDashboardStore(u=>u.filterValues),y=o.useVisualById((t==null?void 0:t.id)||"",{enabled:!!(t!=null&&t.id)&&!!(e!=null&&e.accessToken)}),M=b.useCallback(async u=>{try{d(u),A();const{data:p,fromCache:h}=await j(a.apiServiceUrl,(e==null?void 0:e.accessToken)||"",u.id,r);if(!Q(p,{setFrame:c,setCard:n,setIsDevMode:s,setActiveTabCardId:l,updateDataSource:m,setQueryResultColumns:f,setSelectedConnectionId:V,setSelectedDatabaseName:g,setSelectedSchemaName:i,setSelectedTableName:C,setSelectedDatamodelId:U,setFilterValues:w,setApplyFilters:E,setIsDashboardEditing:S,setIsVisualEditing:$,dashboard:O,selectedSheetId:I,selectedFrameId:D,filterValues:x}))throw new Error("Failed to setup editor with visual data");return{success:!0,fromCache:h}}catch(p){return console.error("Error editing visual:",p),{success:!1,error:"Failed to load visual for editing"}}},[e==null?void 0:e.accessToken,a.apiServiceUrl,r,d,c,n,S,$,s,l,m,f,V,g,i,C,U,w,E,A,O,I,D,x]),k=b.useCallback(async u=>{var p;try{if(d(u),!I)return{success:!1,error:"No sheet selected. Please select a sheet first."};const{data:h,fromCache:W}=await j(a.apiServiceUrl,(e==null?void 0:e.accessToken)||"",u.id,r),L=(h==null?void 0:h.frameObject)??((p=h==null?void 0:h.visual)==null?void 0:p.frameObject);if(!L)return{success:!1,error:"Visual has no frame data"};const F=T(L);if(!(F!=null&&F.cards)||F.cards.length===0)return{success:!1,error:"Visual frame is malformed"};const P={...o.cloneFrameWithNewIds(F),visualId:u.id};return N(I,P,"end"),S(!0),v(P.id),R(!1),{success:!0,fromCache:W}}catch(h){return console.error("Error adding visual:",h),{success:!1,error:"Failed to add visual to dashboard"}}},[e==null?void 0:e.accessToken,a.apiServiceUrl,r,d,I,N,S,v,R]);return{visual:y.data,isLoading:y.isLoading,isError:y.isError,error:y.error,handleEditLibraryVisual:M,handleAddLibraryVisual:k,getUpdatedFrame:G().getUpdatedFrame,refetch:y.refetch}}exports.useRemoteChartStore=B;exports.useVisualUtils=z;
1
+ "use strict";const o=require("./index-D4GRKodP.js"),b=require("react");function _(e){const a=e.toUpperCase().indexOf("WHERE"),r=e.toUpperCase().indexOf("GROUP BY"),t=e.toUpperCase().indexOf("LIMIT"),d=e.toUpperCase().indexOf("ORDER BY");let c=e.length;if(d!==-1&&(c=d),t!==-1&&t<c&&(c=t),a!==-1){const n=e.substring(0,a),s=e.substring(a);return`${n} {{ filters | where }} AND ${s.substring(6)}`}else if(r!==-1){const n=e.substring(0,r),s=e.substring(r);return`${n} {{ filters | where }} ${s}`}else{const n=e.substring(0,c),s=e.substring(c);return console.log("beforeClause",n),console.log("afterClause",s),s?`${n} {{ filters | where }} ${s}`:`${n.replace(/;$/,"")} {{ filters | where }}`}}function B(e){const[a,r]=b.useState(null),[t,d]=b.useState(null),c=o.useEnsureReactGlobals();return b.useEffect(()=>{if(!e||e.trim()===""){r(null),d(null);return}if(!c)return;(async()=>{try{if(!e.startsWith("http://")&&!e.startsWith("https://"))throw new Error(`Invalid URL format: ${e}`);try{new URL(e)}catch{throw new Error(`Invalid URL: ${e}`)}const l=`${e.endsWith("/")?e:`${e}/`}index.js`;try{if(!(await fetch(l,{method:"HEAD"})).ok)throw new Error(`Module not found at ${l}`)}catch{}const m=await import(l);if(typeof m.useChartStore!="function")throw new Error("useChartStore is not a function");r(()=>m.useChartStore),d(null)}catch(s){const l=s instanceof Error?s.message:"Unknown error";console.error("Failed to load remote chart store:",l),d(l),r(null)}})()},[e,c]),a}function H(e,a){if(e.length===0)return"";if(a){const r=e.find(t=>t.id===a);if(r){const t=r.tabTitle;if(t=="All__Header")return e[0].id;if(t&&t.endsWith("__Header")){const c=t.split("__")[0],n=e.find(s=>s.tabTitle===c);return n?n.id:e[0].id}return a}}return e[0].id}async function j(e,a,r,t){if(!a||!r)throw new Error("Missing auth token or visual ID");const d=["resource-by-id","visual",r],c=t.getQueryData(d);if(c)return console.log("Using cached visual data for:",r),{data:c,fromCache:!0};console.log("Fetching visual data from network for:",r);const n=o.ue.loading("Loading visual...",{position:"top-center"});try{const s=await fetch(`${e}/management/v1/visuals/${r}`,{headers:{Authorization:`Bearer ${a}`}});if(!s.ok)throw new Error("Failed to load visual");const l=await s.json();return t.setQueryData(d,l),o.ue.dismiss(n),{data:l,fromCache:!1}}catch(s){throw o.ue.dismiss(n),s}}function T(e){if(typeof e=="string")return JSON.parse(e);if(typeof e=="object")return e;throw new Error("Invalid frame object format")}function Q(e,a){var c,n;const r=(e==null?void 0:e.frameObject)??((c=e==null?void 0:e.visual)==null?void 0:c.frameObject);if(!r)return!1;const t=T(r);if(!(t!=null&&t.cards)||t.cards.length===0)return!1;const d=(n=t.cards)==null?void 0:n.find(s=>s.id===t.activeCardId);return d?(o.setupEditorWithCard({...a,frame:t,card:d,visualId:(e==null?void 0:e.id)||t.visualId}),!0):!1}function G(){var g;const{setCardSql:e}=o.useEditorActions(),a=o.useEditorStore(i=>i.frame),r=o.useEditorStore(i=>i.card),t=B(((g=r.customCardPreferences)==null?void 0:g.url)||""),d=o.useEditorStore(i=>i.selectedSchemaName),c=o.useEditorStore(i=>i.selectedDatamodelId),n=o.useEditorStore(i=>i.selectedDatabaseName),s=o.useEditorStore(i=>i.selectedTableName),l=o.useEditorStore(i=>i.selectedConnectionId),m=o.useEditorStore(i=>i.isShowingVisual),f=r.sql;return{getUpdatedFrame:b.useCallback(()=>{var E;let i=f;f&&!f.includes("{{")&&(i=_(f),e(i));const C=(E=t==null?void 0:t.getState())==null?void 0:E.settings,U={...r,dataSource:r.dataSource||{mode:"directSource"},lastSelectedSchema:d,lastSelectedDatamodelId:c,lastSelectedDatabase:n,lastSelectedTable:s,connectionId:l,sql:i,customCfg:m?r.customCfg:null,preferences:r.preferences,...C&&{customCardPreferences:{...r.customCardPreferences,settings:C}}},w=a.cards.map(S=>S.id===r.id?U:S);return{...a,cards:w,activeCardId:H(w,a.activeCardId)}},[r,a,m,d,c,n,s,l,e,t,f])}}function z(){const{authToken:e,tokenProps:a}=o.useSemaphorContext(),r=o.useQueryClient(),t=o.useSelectedVisual(),{selectVisual:d}=o.useManagementActions(),{setFrame:c,setCard:n,setIsDevMode:s,setActiveTabCardId:l,updateDataSource:m,setQueryResultColumns:f,setSelectedConnectionId:V,setSelectedDatabaseName:g,setSelectedSchemaName:i,setSelectedTableName:C,setSelectedDatamodelId:U,setFilterValues:w,setApplyFilters:E}=o.useEditorActions(),{setIsDashboardEditing:S,setIsVisualEditing:$,setSelectedFrameId:v,clearSelectedFrameId:A,addFrame:N,setIsDashboardPanelOpen:R}=o.useDashboardActions(),I=o.useDashboardStore(u=>u.selectedSheetId),D=o.useDashboardStore(u=>u.selectedFrameId),O=o.useDashboardStore(u=>u.dashboard),x=o.useDashboardStore(u=>u.filterValues),y=o.useVisualById((t==null?void 0:t.id)||"",{enabled:!!(t!=null&&t.id)&&!!(e!=null&&e.accessToken)}),M=b.useCallback(async u=>{try{d(u),A();const{data:p,fromCache:h}=await j(a.apiServiceUrl,(e==null?void 0:e.accessToken)||"",u.id,r);if(!Q(p,{setFrame:c,setCard:n,setIsDevMode:s,setActiveTabCardId:l,updateDataSource:m,setQueryResultColumns:f,setSelectedConnectionId:V,setSelectedDatabaseName:g,setSelectedSchemaName:i,setSelectedTableName:C,setSelectedDatamodelId:U,setFilterValues:w,setApplyFilters:E,setIsDashboardEditing:S,setIsVisualEditing:$,dashboard:O,selectedSheetId:I,selectedFrameId:D,filterValues:x}))throw new Error("Failed to setup editor with visual data");return{success:!0,fromCache:h}}catch(p){return console.error("Error editing visual:",p),{success:!1,error:"Failed to load visual for editing"}}},[e==null?void 0:e.accessToken,a.apiServiceUrl,r,d,c,n,S,$,s,l,m,f,V,g,i,C,U,w,E,A,O,I,D,x]),k=b.useCallback(async u=>{var p;try{if(d(u),!I)return{success:!1,error:"No sheet selected. Please select a sheet first."};const{data:h,fromCache:W}=await j(a.apiServiceUrl,(e==null?void 0:e.accessToken)||"",u.id,r),L=(h==null?void 0:h.frameObject)??((p=h==null?void 0:h.visual)==null?void 0:p.frameObject);if(!L)return{success:!1,error:"Visual has no frame data"};const F=T(L);if(!(F!=null&&F.cards)||F.cards.length===0)return{success:!1,error:"Visual frame is malformed"};const P={...o.cloneFrameWithNewIds(F),visualId:u.id};return N(I,P,"end"),S(!0),v(P.id),R(!1),{success:!0,fromCache:W}}catch(h){return console.error("Error adding visual:",h),{success:!1,error:"Failed to add visual to dashboard"}}},[e==null?void 0:e.accessToken,a.apiServiceUrl,r,d,I,N,S,v,R]);return{visual:y.data,isLoading:y.isLoading,isError:y.isError,error:y.error,handleEditLibraryVisual:M,handleAddLibraryVisual:k,getUpdatedFrame:G().getUpdatedFrame,refetch:y.refetch}}exports.useRemoteChartStore=B;exports.useVisualUtils=z;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../chunks/index-DBC-sSEX.js"),r=require("../types/index.cjs");exports.Dashboard=e.Dashboard;exports.EMPTY_SELECTION=r.EMPTY_SELECTION;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../chunks/index-D4GRKodP.js"),r=require("../types/index.cjs");exports.Dashboard=e.Dashboard;exports.EMPTY_SELECTION=r.EMPTY_SELECTION;
@@ -1,4 +1,4 @@
1
- import { D as a } from "../chunks/index-BXryLh06.js";
1
+ import { D as a } from "../chunks/index-Dbjhjr4S.js";
2
2
  import { EMPTY_SELECTION as e } from "../types/index.js";
3
3
  export {
4
4
  a as Dashboard,
package/dist/index.cjs CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./chunks/index-DBC-sSEX.js"),j=require("./types/index.cjs"),a=require("react/jsx-runtime"),g=require("react"),E=require("./chunks/resource-management-panel-CRSm24Px.js"),h=require("./chunks/schedule-dashboard-D8iJX8Iz.js");require("react-dom");function N(t){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const n in t)if(n!=="default"){const i=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(r,n,i.get?i:{enumerable:!0,get:()=>t[n]})}}return r.default=t,Object.freeze(r)}const p=N(g);/**
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./chunks/index-D4GRKodP.js"),j=require("./types/index.cjs"),a=require("react/jsx-runtime"),g=require("react"),E=require("./chunks/resource-management-panel-CsMaAMxK.js"),h=require("./chunks/schedule-dashboard-kWXZiUDD.js");require("react-dom");function N(t){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const n in t)if(n!=="default"){const i=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(r,n,i.get?i:{enumerable:!0,get:()=>t[n]})}}return r.default=t,Object.freeze(r)}const p=N(g);/**
2
2
  * @license lucide-react v0.453.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
package/dist/index.js CHANGED
@@ -1,11 +1,11 @@
1
- import { b as S, E as D, F as w, S as P, U as M, e as k, C as A, u as F, f as g, g as L, P as R, h as I, B as V, c as v, i as _, j as W, k as B, l as j, I as q, m as O, n as z, o as G, p as H, q as Q } from "./chunks/index-BXryLh06.js";
2
- import { G as oa, H as ta, D as na, x as ia, M as la, R as da, t as ca, t as ua, v as ha, a as pa, a9 as fa, Y as ma, z as Ca, N as va, _ as ya, Z as ba, a1 as ga, a2 as Da, W as xa, y as Ea, V as Na, K as Ta, L as Sa, J as wa, $ as Pa, T as Ma, Q as ka, O as Aa, a3 as Fa, a0 as La, w as Ra, a5 as Ia, a7 as Va, a6 as _a, a8 as Wa, A as Ba, r as ja, ab as qa, a4 as Oa, aa as za, s as Ga } from "./chunks/index-BXryLh06.js";
1
+ import { b as S, E as D, F as w, S as P, U as M, e as k, C as A, u as F, f as g, g as L, P as R, h as I, B as V, c as v, i as _, j as W, k as B, l as j, I as q, m as O, n as z, o as G, p as H, q as Q } from "./chunks/index-Dbjhjr4S.js";
2
+ import { G as oa, H as ta, D as na, x as ia, M as la, R as da, t as ca, t as ua, v as ha, a as pa, a9 as fa, Y as ma, z as Ca, N as va, _ as ya, Z as ba, a1 as ga, a2 as Da, W as xa, y as Ea, V as Na, K as Ta, L as Sa, J as wa, $ as Pa, T as Ma, Q as ka, O as Aa, a3 as Fa, a0 as La, w as Ra, a5 as Ia, a7 as Va, a6 as _a, a8 as Wa, A as Ba, r as ja, ab as qa, a4 as Oa, aa as za, s as Ga } from "./chunks/index-Dbjhjr4S.js";
3
3
  import { EMPTY_SELECTION as Qa } from "./types/index.js";
4
4
  import { jsx as a, jsxs as l } from "react/jsx-runtime";
5
5
  import * as p from "react";
6
6
  import { useMemo as U } from "react";
7
- import { ResourceManagementPanel as Ka } from "./chunks/resource-management-panel-CtwDeLmD.js";
8
- import { A as $a, S as Ja, V as Xa, c as Za, g as ae } from "./chunks/schedule-dashboard-BVTN-29R.js";
7
+ import { ResourceManagementPanel as Ka } from "./chunks/resource-management-panel-cdW-DFtz.js";
8
+ import { A as $a, S as Ja, V as Xa, c as Za, g as ae } from "./chunks/schedule-dashboard-Dkma2RUp.js";
9
9
  import "react-dom";
10
10
  /**
11
11
  * @license lucide-react v0.453.0 - ISC