@malloy-publisher/sdk 0.4.0 → 0.4.1

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.
@@ -1,4 +1,4 @@
1
- "use strict";var ve=Object.create;var le=Object.defineProperty;var ge=Object.getOwnPropertyDescriptor;var we=Object.getOwnPropertyNames;var ke=Object.getPrototypeOf,Re=Object.prototype.hasOwnProperty;var Ce=(e,r,t,n)=>{if(r&&typeof r=="object"||typeof r=="function")for(let o of we(r))!Re.call(e,o)&&o!==t&&le(e,o,{get:()=>r[o],enumerable:!(n=ge(r,o))||n.enumerable});return e};var G=(e,r,t)=>(t=e!=null?ve(ke(e)):{},Ce(r||!e||!e.__esModule?le(t,"default",{value:e,enumerable:!0}):t,e));const B=require("react/jsx-runtime"),U=require("@mui/material"),p=require("react"),v=require("./DocumentStorageProvider-DGPQEd_l.cjs.js"),X=require("./ServerProvider-Cc489A3f.cjs.js"),g="publisher-drill";function de(e,r){const t=new Set;let n;try{n=e.getMetadata()?.getAllFields()??[]}catch{return t}const o=new Set;for(const a of n)!a||r(a)||a.tag?.tag("hidden")===void 0&&o.add(a.tag?.text("label")??a.name);for(const a of n){if(!a||!r(a))continue;const l=a.tag?.text("label")??a.name;o.has(l)||t.add(l)}return t}function M(e){const r=/^\s*(\d+)/.exec(e.style?.gridColumn??"");return r?r[1]:void 0}function ce(e,r){if(r.size!==0)for(const t of e.querySelectorAll(".malloy-table")){const n=l=>l.closest(".malloy-table")===t,o=new Set;for(const l of t.querySelectorAll(".column-cell.th")){if(!n(l))continue;const s=(l.textContent??"").replace(/\u200b/g,"").trim(),y=M(l);y&&r.has(s)&&o.add(y)}if(o.size===0)continue;const a=new Set;for(const l of t.querySelectorAll(`.${g}[tabindex="0"]`)){if(!n(l))continue;const s=M(l);s&&(a.has(s)?l.tabIndex=-1:a.add(s))}for(const l of t.querySelectorAll(".column-cell.td")){if(!n(l))continue;const s=M(l),y=!l.querySelector(".value-null")&&(l.textContent??"").trim()!=="";if(s&&y&&o.has(s)&&!l.querySelector(".malloy-table")){if(l.classList.add(g),l.tabIndex===0)a.add(s);else{const h=a.has(s);h||a.add(s),l.tabIndex=h?-1:0}l.setAttribute("role","button")}}}}function xe(e){const r=e.closest(".malloy-table"),t=M(e);return!r||!t?[]:Array.from(r.querySelectorAll(`.${g}`)).filter(n=>n.closest(".malloy-table")===r&&M(n)===t)}function ie(e,r){const t=xe(e),n=t.indexOf(e);if(n===-1)return;const o=r==="first"?t[0]:r==="last"?t[t.length-1]:t[Math.min(Math.max(n+r,0),t.length-1)];if(o){for(const a of t)a.tabIndex=a===o?0:-1;return o}}function ue(e){return{background:e.dashboardRoot,tableBackground:e.tableBackground,tableHeaderColor:e.tableHeader,tableBodyColor:e.tableBody,tableBorder:e.border,tablePinnedBackground:e.tableHeaderBackground,tablePinnedBorder:e.pinnedBorder,tableFontSize:`${e.font.size}px`,fontFamily:e.font.family,mapColor:e.mapColor}}function he(e){const{foreground:r,axisFaint:t,font:n}=e,o={background:e.background,font:n.family,title:{color:r,font:n.family},axis:{labelColor:r,titleColor:r,domainColor:t,tickColor:t,gridColor:t,labelFont:n.family,titleFont:n.family},legend:{labelColor:r,titleColor:r,labelFont:n.family,titleFont:n.family},header:{labelColor:r,titleColor:r},range:{category:e.series}};return a=>o}function me(e){if(!e)return;const r=e.tag("theme");if(!r)return;const t={},n=r.tag("palette");if(n){const a={},l=n.textArray("series");l&&l.length>0&&(a.series=l);for(const s of X.PER_MODE_COLOR_KEYS){const y=n.tag(s);if(!y)continue;const h={},k=y.text("light"),E=y.text("dark");k&&(h.light=k),E&&(h.dark=E),Object.keys(h).length>0&&(a[s]=h)}Object.keys(a).length>0&&(t.palette=a)}const o=r.tag("font");if(o){const a={},l=o.text("family");l&&(a.family=l);const s=o.numeric("size");typeof s=="number"&&Number.isFinite(s)&&(a.size=s),Object.keys(a).length>0&&(t.font=a)}return Object.keys(t).length>0?t:void 0}const Ee=async(e,r)=>{if(typeof window>"u")throw new Error("MalloyRenderer can only be used in browser environment");const{MalloyRenderer:t}=await import("@malloydata/render");return new t({onClick:r,vegaConfigOverride:he(e),theme:ue(e),onError:o=>{console.error("Error rendering visualization:",typeof o,o)}}).createViz()};typeof window<"u"&&import("@malloydata/render");async function Se(e){if(!e||typeof e!="object")return;const r=e,t=[...Array.isArray(r.model_annotations)?r.model_annotations:[],...Array.isArray(r.source_annotations)?r.source_annotations:[],...Array.isArray(r.annotations)?r.annotations:[]].map(o=>typeof o?.value=="string"?o.value:void 0).filter(o=>!!o);if(t.length===0)return;let n;try{({parseAnnotation:n}=await import("@malloydata/malloy-tag"))}catch{return}try{const{tag:o}=n(t);return me(o)}catch(o){console.warn("Failed to parse # theme.* annotations; chart will render with the shell theme.",{error:o,lines:t});return}}function Ae(e,r,t){const n=v.buildTableCssVars(r,t);for(const[o,a]of Object.entries(n))e.style.setProperty(o,a)}const De=`
1
+ "use strict";var ve=Object.create;var le=Object.defineProperty;var ge=Object.getOwnPropertyDescriptor;var we=Object.getOwnPropertyNames;var ke=Object.getPrototypeOf,Re=Object.prototype.hasOwnProperty;var Ce=(e,r,t,n)=>{if(r&&typeof r=="object"||typeof r=="function")for(let o of we(r))!Re.call(e,o)&&o!==t&&le(e,o,{get:()=>r[o],enumerable:!(n=ge(r,o))||n.enumerable});return e};var G=(e,r,t)=>(t=e!=null?ve(ke(e)):{},Ce(r||!e||!e.__esModule?le(t,"default",{value:e,enumerable:!0}):t,e));const B=require("react/jsx-runtime"),U=require("@mui/material"),p=require("react"),v=require("./DocumentStorage-CMyLifsz.cjs.js"),X=require("./ServerProvider-Cc489A3f.cjs.js"),g="publisher-drill";function de(e,r){const t=new Set;let n;try{n=e.getMetadata()?.getAllFields()??[]}catch{return t}const o=new Set;for(const a of n)!a||r(a)||a.tag?.tag("hidden")===void 0&&o.add(a.tag?.text("label")??a.name);for(const a of n){if(!a||!r(a))continue;const l=a.tag?.text("label")??a.name;o.has(l)||t.add(l)}return t}function M(e){const r=/^\s*(\d+)/.exec(e.style?.gridColumn??"");return r?r[1]:void 0}function ce(e,r){if(r.size!==0)for(const t of e.querySelectorAll(".malloy-table")){const n=l=>l.closest(".malloy-table")===t,o=new Set;for(const l of t.querySelectorAll(".column-cell.th")){if(!n(l))continue;const s=(l.textContent??"").replace(/\u200b/g,"").trim(),y=M(l);y&&r.has(s)&&o.add(y)}if(o.size===0)continue;const a=new Set;for(const l of t.querySelectorAll(`.${g}[tabindex="0"]`)){if(!n(l))continue;const s=M(l);s&&(a.has(s)?l.tabIndex=-1:a.add(s))}for(const l of t.querySelectorAll(".column-cell.td")){if(!n(l))continue;const s=M(l),y=!l.querySelector(".value-null")&&(l.textContent??"").trim()!=="";if(s&&y&&o.has(s)&&!l.querySelector(".malloy-table")){if(l.classList.add(g),l.tabIndex===0)a.add(s);else{const h=a.has(s);h||a.add(s),l.tabIndex=h?-1:0}l.setAttribute("role","button")}}}}function xe(e){const r=e.closest(".malloy-table"),t=M(e);return!r||!t?[]:Array.from(r.querySelectorAll(`.${g}`)).filter(n=>n.closest(".malloy-table")===r&&M(n)===t)}function ie(e,r){const t=xe(e),n=t.indexOf(e);if(n===-1)return;const o=r==="first"?t[0]:r==="last"?t[t.length-1]:t[Math.min(Math.max(n+r,0),t.length-1)];if(o){for(const a of t)a.tabIndex=a===o?0:-1;return o}}function ue(e){return{background:e.dashboardRoot,tableBackground:e.tableBackground,tableHeaderColor:e.tableHeader,tableBodyColor:e.tableBody,tableBorder:e.border,tablePinnedBackground:e.tableHeaderBackground,tablePinnedBorder:e.pinnedBorder,tableFontSize:`${e.font.size}px`,fontFamily:e.font.family,mapColor:e.mapColor}}function he(e){const{foreground:r,axisFaint:t,font:n}=e,o={background:e.background,font:n.family,title:{color:r,font:n.family},axis:{labelColor:r,titleColor:r,domainColor:t,tickColor:t,gridColor:t,labelFont:n.family,titleFont:n.family},legend:{labelColor:r,titleColor:r,labelFont:n.family,titleFont:n.family},header:{labelColor:r,titleColor:r},range:{category:e.series}};return a=>o}function me(e){if(!e)return;const r=e.tag("theme");if(!r)return;const t={},n=r.tag("palette");if(n){const a={},l=n.textArray("series");l&&l.length>0&&(a.series=l);for(const s of X.PER_MODE_COLOR_KEYS){const y=n.tag(s);if(!y)continue;const h={},k=y.text("light"),E=y.text("dark");k&&(h.light=k),E&&(h.dark=E),Object.keys(h).length>0&&(a[s]=h)}Object.keys(a).length>0&&(t.palette=a)}const o=r.tag("font");if(o){const a={},l=o.text("family");l&&(a.family=l);const s=o.numeric("size");typeof s=="number"&&Number.isFinite(s)&&(a.size=s),Object.keys(a).length>0&&(t.font=a)}return Object.keys(t).length>0?t:void 0}const Ee=async(e,r)=>{if(typeof window>"u")throw new Error("MalloyRenderer can only be used in browser environment");const{MalloyRenderer:t}=await import("@malloydata/render");return new t({onClick:r,vegaConfigOverride:he(e),theme:ue(e),onError:o=>{console.error("Error rendering visualization:",typeof o,o)}}).createViz()};typeof window<"u"&&import("@malloydata/render");async function Se(e){if(!e||typeof e!="object")return;const r=e,t=[...Array.isArray(r.model_annotations)?r.model_annotations:[],...Array.isArray(r.source_annotations)?r.source_annotations:[],...Array.isArray(r.annotations)?r.annotations:[]].map(o=>typeof o?.value=="string"?o.value:void 0).filter(o=>!!o);if(t.length===0)return;let n;try{({parseAnnotation:n}=await import("@malloydata/malloy-tag"))}catch{return}try{const{tag:o}=n(t);return me(o)}catch(o){console.warn("Failed to parse # theme.* annotations; chart will render with the shell theme.",{error:o,lines:t});return}}function Ae(e,r,t){const n=v.buildTableCssVars(r,t);for(const[o,a]of Object.entries(n))e.style.setProperty(o,a)}const De=`
2
2
  /* Card geometry, through the renderer's OWN theme vars rather than over the top
3
3
  of them. It declares --malloy-theme--dashboard-* on .malloy-render itself and
4
4
  passes each through to the --malloy-render--* the card CSS reads, so a value
@@ -112,4 +112,4 @@ div.malloy-render .malloy-dashboard .dashboard-row-header {
112
112
  color: var(--publisher-drill-link) !important;
113
113
  text-decoration: underline;
114
114
  }
115
- `,se="publisher-malloy-renderer-overrides";function Oe(){if(typeof document>"u"||document.getElementById(se))return;const e=document.createElement("style");e.id=se,e.textContent=De,document.head.appendChild(e)}function Te({result:e,height:r,drill:t,onSizeChange:n,onSizing:o}){const a=p.useRef(null),l=p.useRef(t);l.current=t;const s=p.useCallback(c=>{l.current?.onClick(c)},[]),y=t!==void 0,h=p.useRef(!1),k=p.useRef(null),E=p.useRef(0),{theme:Y,layers:J,mode:W}=X.usePublisherTheme(),Q=U.useTheme().shape.borderRadius,Z=p.useMemo(()=>({radius:`${Q}px`,padding:`${v.DASHBOARD_CARD_PADDING_PX}px`}),[Q]);return p.useEffect(()=>()=>{E.current+=1;const c=k.current;c?.viz.remove(),c?.node.remove(),k.current=null},[]),p.useLayoutEffect(()=>{if(!a.current||!e)return;Oe();const c=a.current,fe=E.current+=1;let P=!1;const q=()=>!P&&fe===E.current;let d,m,I=null,V=0,N=null,j=null,$=null,L=null,_=null,z=null,ee=null,re=0,S=null;h.current=!1;let w,A;const H=R=>{if(P||!R.firstElementChild||v.resultSizing(w,A)==="container")return;const F=v.remeasuresAfterReady(w,A);if(h.current&&!F)return;const C=v.measureContentHeight(R,v.contentNodeDepth(w));C>0&&(h.current=!0,n&&C!==re&&(re=C,n(C)));const D=v.contentNode(R,v.contentNodeDepth(w));F&&D&&ee!==D&&(ee=D,z?.disconnect(),z=new ResizeObserver(()=>H(R)),z.observe(D))};return(async()=>{let R;try{R=JSON.parse(e)}catch(f){console.error("Error parsing visualization result:",f);return}const F=await Se(R),C=F?X.resolveTheme([...J,F],W):Y;if(!q())return;try{m=await Ee(C,s)}catch(f){console.error("Failed to create renderer:",f);return}if(!q()){m.remove(),m=void 0;return}const D=k.current;d=document.createElement("div"),d.style.width="100%",d.style.height="100%",Ae(d,C,Z),c.childElementCount>0&&(c.style.position="relative",d.style.position="absolute",d.style.inset="0",d.style.visibility="hidden"),c.appendChild(d);const u=d;L=new MutationObserver(()=>{_&&clearTimeout(_),_=setTimeout(()=>{H(u),h.current&&L?.disconnect()},100)}),L.observe(d,{childList:!0,subtree:!0,attributes:!0});const ye=m;let te=!1;const oe=()=>{if(!(te||!q())){te=!0,S&&(clearTimeout(S),S=null),D?.viz.remove();for(const f of Array.from(c.children))f!==u&&c.removeChild(f);u.style.position="",u.style.inset="",u.style.visibility="",c.style.position="",k.current={viz:ye,node:u},H(u)}};try{m.setResult(R);try{const x=m.getMetadata(),O=x?.getRootField();w=O?.renderAs(),A=O?x?.getPluginsForField(O.key)?.[0]?.sizingStrategy:void 0}catch{w=void 0,A=void 0}o?.(v.resultSizing(w,A)),d.dataset.malloyRenderAs=w??"unknown",d.dataset.malloySizing=v.resultSizing(w,A),m.render(d);const f=l.current;try{if(f){const x=de(m,f.canDrill),O=()=>{try{ce(u,x)}catch(i){console.warn("Drill affordance skipped:",i)}};O();const ne=i=>{const T=i.querySelector(".cell-content")??i,K=T.getBoundingClientRect();T.dispatchEvent(new MouseEvent("click",{bubbles:!0,cancelable:!0,view:T.ownerDocument.defaultView,clientX:Math.round(K.left+K.width/2),clientY:Math.round(K.bottom)}))},ae=i=>i.target?.closest?.(`.${g}`)??null,pe=(i,b)=>{ie(i,b)?.focus()};N=i=>{const b=ae(i);if(!b)return;const T=i.key==="ArrowDown"?1:i.key==="ArrowUp"?-1:i.key==="Home"?"first":i.key==="End"?"last":void 0;if(T!==void 0){i.preventDefault(),pe(b,T);return}i.key==="Enter"?(i.preventDefault(),ne(b)):i.key===" "&&i.preventDefault()},j=i=>{if(i.key!==" ")return;const b=ae(i);b&&(i.preventDefault(),ne(b))},$=i=>{const b=i.target?.closest?.(`.${g}`);b&&ie(b,0)},u.addEventListener("keydown",N),u.addEventListener("keyup",j),u.addEventListener("focusin",$),x.size>0&&typeof MutationObserver<"u"&&(I=new MutationObserver(()=>{cancelAnimationFrame(V),V=requestAnimationFrame(O)}),I.observe(u,{childList:!0,subtree:!0}))}}catch(x){console.warn("Drill affordance skipped:",x)}m.onReady(oe),S=setTimeout(oe,1e4)}catch(f){console.error("Error rendering visualization:",f),L?.disconnect(),z?.disconnect(),I?.disconnect(),m.remove(),m=void 0,u.parentNode===c&&c.removeChild(u)}})(),()=>{P=!0,L?.disconnect(),z?.disconnect(),_&&clearTimeout(_),S&&clearTimeout(S),d&&k.current?.node!==d&&(N&&d.removeEventListener("keydown",N),j&&d.removeEventListener("keyup",j),$&&d.removeEventListener("focusin",$),I?.disconnect(),cancelAnimationFrame(V),m?.remove(),d.parentNode===c&&c.removeChild(d),c.style.position="")}},[e,s,y,n,o,Y,J,W,Z]),B.jsx("div",{ref:a,style:{width:"100%",height:r?`${r}px`:"400px"}})}function be(e){return typeof window>"u"?B.jsx(U.Box,{sx:{width:"100%",height:e.height?`${e.height}px`:"100%",display:"flex",alignItems:"center",justifyContent:"center",color:"text.secondary"},children:"Loading..."}):B.jsx(p.Suspense,{fallback:B.jsx(U.Box,{sx:{width:"100%",height:e.height?`${e.height}px`:"100%",display:"flex",alignItems:"center",justifyContent:"center",color:"text.secondary"},children:"Loading visualization..."}),children:B.jsx(Te,{...e})})}const Le=Object.freeze(Object.defineProperty({__proto__:null,default:be},Symbol.toStringTag,{value:"Module"}));exports.DRILL_CELL_CLASS=g;exports.RenderedResult=be;exports.RenderedResult$1=Le;exports.buildMalloyExplicitTheme=ue;exports.buildVegaThemeOverride=he;exports.drillableFieldNames=de;exports.markDrillableCells=ce;exports.readChartAnnotations=me;
115
+ `,se="publisher-malloy-renderer-overrides";function Oe(){if(typeof document>"u"||document.getElementById(se))return;const e=document.createElement("style");e.id=se,e.textContent=De,document.head.appendChild(e)}function Te({result:e,height:r,drill:t,onSizeChange:n,onSizing:o}){const a=p.useRef(null),l=p.useRef(t);l.current=t;const s=p.useCallback(c=>{l.current?.onClick(c)},[]),y=t!==void 0,h=p.useRef(!1),k=p.useRef(null),E=p.useRef(0),{theme:Y,layers:J,mode:W}=X.usePublisherTheme(),Q=U.useTheme().shape.borderRadius,Z=p.useMemo(()=>({radius:`${Q}px`,padding:`${v.DASHBOARD_CARD_PADDING_PX}px`}),[Q]);return p.useEffect(()=>()=>{E.current+=1;const c=k.current;c?.viz.remove(),c?.node.remove(),k.current=null},[]),p.useLayoutEffect(()=>{if(!a.current||!e)return;Oe();const c=a.current,fe=E.current+=1;let q=!1;const P=()=>!q&&fe===E.current;let d,m,I=null,V=0,N=null,j=null,$=null,L=null,_=null,z=null,ee=null,re=0,S=null;h.current=!1;let w,A;const H=R=>{if(q||!R.firstElementChild||v.resultSizing(w,A)==="container")return;const F=v.remeasuresAfterReady(w,A);if(h.current&&!F)return;const C=v.measureContentHeight(R,v.contentNodeDepth(w));C>0&&(h.current=!0,n&&C!==re&&(re=C,n(C)));const D=v.contentNode(R,v.contentNodeDepth(w));F&&D&&ee!==D&&(ee=D,z?.disconnect(),z=new ResizeObserver(()=>H(R)),z.observe(D))};return(async()=>{let R;try{R=JSON.parse(e)}catch(f){console.error("Error parsing visualization result:",f);return}const F=await Se(R),C=F?X.resolveTheme([...J,F],W):Y;if(!P())return;try{m=await Ee(C,s)}catch(f){console.error("Failed to create renderer:",f);return}if(!P()){m.remove(),m=void 0;return}const D=k.current;d=document.createElement("div"),d.style.width="100%",d.style.height="100%",Ae(d,C,Z),c.childElementCount>0&&(c.style.position="relative",d.style.position="absolute",d.style.inset="0",d.style.visibility="hidden"),c.appendChild(d);const u=d;L=new MutationObserver(()=>{_&&clearTimeout(_),_=setTimeout(()=>{H(u),h.current&&L?.disconnect()},100)}),L.observe(d,{childList:!0,subtree:!0,attributes:!0});const ye=m;let te=!1;const oe=()=>{if(!(te||!P())){te=!0,S&&(clearTimeout(S),S=null),D?.viz.remove();for(const f of Array.from(c.children))f!==u&&c.removeChild(f);u.style.position="",u.style.inset="",u.style.visibility="",c.style.position="",k.current={viz:ye,node:u},H(u)}};try{m.setResult(R);try{const x=m.getMetadata(),O=x?.getRootField();w=O?.renderAs(),A=O?x?.getPluginsForField(O.key)?.[0]?.sizingStrategy:void 0}catch{w=void 0,A=void 0}o?.(v.resultSizing(w,A)),d.dataset.malloyRenderAs=w??"unknown",d.dataset.malloySizing=v.resultSizing(w,A),m.render(d);const f=l.current;try{if(f){const x=de(m,f.canDrill),O=()=>{try{ce(u,x)}catch(i){console.warn("Drill affordance skipped:",i)}};O();const ne=i=>{const T=i.querySelector(".cell-content")??i,K=T.getBoundingClientRect();T.dispatchEvent(new MouseEvent("click",{bubbles:!0,cancelable:!0,view:T.ownerDocument.defaultView,clientX:Math.round(K.left+K.width/2),clientY:Math.round(K.bottom)}))},ae=i=>i.target?.closest?.(`.${g}`)??null,pe=(i,b)=>{ie(i,b)?.focus()};N=i=>{const b=ae(i);if(!b)return;const T=i.key==="ArrowDown"?1:i.key==="ArrowUp"?-1:i.key==="Home"?"first":i.key==="End"?"last":void 0;if(T!==void 0){i.preventDefault(),pe(b,T);return}i.key==="Enter"?(i.preventDefault(),ne(b)):i.key===" "&&i.preventDefault()},j=i=>{if(i.key!==" ")return;const b=ae(i);b&&(i.preventDefault(),ne(b))},$=i=>{const b=i.target?.closest?.(`.${g}`);b&&ie(b,0)},u.addEventListener("keydown",N),u.addEventListener("keyup",j),u.addEventListener("focusin",$),x.size>0&&typeof MutationObserver<"u"&&(I=new MutationObserver(()=>{cancelAnimationFrame(V),V=requestAnimationFrame(O)}),I.observe(u,{childList:!0,subtree:!0}))}}catch(x){console.warn("Drill affordance skipped:",x)}m.onReady(oe),S=setTimeout(oe,1e4)}catch(f){console.error("Error rendering visualization:",f),L?.disconnect(),z?.disconnect(),I?.disconnect(),m.remove(),m=void 0,u.parentNode===c&&c.removeChild(u)}})(),()=>{q=!0,L?.disconnect(),z?.disconnect(),_&&clearTimeout(_),S&&clearTimeout(S),d&&k.current?.node!==d&&(N&&d.removeEventListener("keydown",N),j&&d.removeEventListener("keyup",j),$&&d.removeEventListener("focusin",$),I?.disconnect(),cancelAnimationFrame(V),m?.remove(),d.parentNode===c&&c.removeChild(d),c.style.position="")}},[e,s,y,n,o,Y,J,W,Z]),B.jsx("div",{ref:a,style:{width:"100%",height:r?`${r}px`:"400px"}})}function be(e){return typeof window>"u"?B.jsx(U.Box,{sx:{width:"100%",height:e.height?`${e.height}px`:"100%",display:"flex",alignItems:"center",justifyContent:"center",color:"text.secondary"},children:"Loading..."}):B.jsx(p.Suspense,{fallback:B.jsx(U.Box,{sx:{width:"100%",height:e.height?`${e.height}px`:"100%",display:"flex",alignItems:"center",justifyContent:"center",color:"text.secondary"},children:"Loading visualization..."}),children:B.jsx(Te,{...e})})}const Le=Object.freeze(Object.defineProperty({__proto__:null,default:be},Symbol.toStringTag,{value:"Module"}));exports.DRILL_CELL_CLASS=g;exports.RenderedResult=be;exports.RenderedResult$1=Le;exports.buildMalloyExplicitTheme=ue;exports.buildVegaThemeOverride=he;exports.drillableFieldNames=de;exports.markDrillableCells=ce;exports.readChartAnnotations=me;
@@ -1,7 +1,7 @@
1
1
  import { jsx as L } from "react/jsx-runtime";
2
2
  import { Box as oe, useTheme as ce } from "@mui/material";
3
3
  import { Suspense as ue, useRef as z, useCallback as he, useMemo as me, useEffect as fe, useLayoutEffect as be } from "react";
4
- import { D as ye, r as K, b as pe, a as ve, m as ge, c as we, d as ae } from "./DocumentStorageProvider-CyOJ0hqf.es.js";
4
+ import { D as ye, r as K, b as pe, a as ve, m as ge, c as we, d as ae } from "./DocumentStorage-BiFqO15i.es.js";
5
5
  import { aD as ke, aE as Ce, aF as xe } from "./ServerProvider-BWOEKg0O.es.js";
6
6
  const v = "publisher-drill";
7
7
  function Re(e, r) {