@malloy-publisher/sdk 0.0.38 → 0.0.40

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 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("./vendor-Bg9-K32d.cjs"),x=require("./index-BH85bTLt.cjs"),t=require("react");function E({result:i,height:m,isFillElement:f,onSizeChange:l,onDrill:v}){const e=t.useRef(null),[a,h]=t.useState(!1),[R,b]=t.useState(!1),[y,M]=t.useState(!1),s=t.useRef(null),n=t.useRef(null);if(t.useLayoutEffect(()=>{if(e.current&&i&&!R){b(!0),s.current||(s.current=new Promise(r=>{n.current=r}));const o=new x.index_umdExports.MalloyRenderer({onClick:v}).createViz();for(;e.current.firstChild;)e.current.removeChild(e.current.firstChild);const d=new MutationObserver(r=>{for(const c of r)if(c.type==="childList"&&c.addedNodes.length>0&&Array.from(c.addedNodes).some(g=>g.nodeType===Node.ELEMENT_NODE)){d.disconnect(),setTimeout(()=>{h(!0),n.current&&(n.current(),n.current=null,s.current=null)},50);break}});if(e.current){d.observe(e.current,{childList:!0,subtree:!0,characterData:!0});try{o.setResult(JSON.parse(i)),o.render(e.current)}catch(r){console.error("Error rendering visualization:",r),d.disconnect(),h(!0),n.current&&(n.current(),n.current=null,s.current=null)}}}},[i,v,R]),t.useEffect(()=>{h(!1),b(!1),s.current=null,n.current=null},[i]),R&&!a&&s.current)throw s.current;return t.useEffect(()=>{if(!e.current||!a)return;const u=e.current,o=()=>{if(u){const c=u.offsetHeight;c>0?l&&l(c):f&&u.firstChild&&(u.firstChild.offsetHeight==0?f(!0):f(!1))}},d=setTimeout(o,100);let r=null;return y||(r=new MutationObserver(o),r.observe(u,{childList:!0,subtree:!0,attributes:!0})),()=>{clearTimeout(d),r?.disconnect()}},[l,i,f,a]),p.jsxRuntimeExports.jsx("div",{ref:e,style:{width:"100%",height:m?`${m}px`:"100%"}})}exports.default=E;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("./vendor-Bg9-K32d.cjs"),x=require("./index-xo1oaGoD.cjs"),t=require("react");function E({result:i,height:m,isFillElement:f,onSizeChange:l,onDrill:v}){const e=t.useRef(null),[a,h]=t.useState(!1),[R,b]=t.useState(!1),[y,M]=t.useState(!1),s=t.useRef(null),n=t.useRef(null);if(t.useLayoutEffect(()=>{if(e.current&&i&&!R){b(!0),s.current||(s.current=new Promise(r=>{n.current=r}));const o=new x.index_umdExports.MalloyRenderer({onClick:v}).createViz();for(;e.current.firstChild;)e.current.removeChild(e.current.firstChild);const d=new MutationObserver(r=>{for(const c of r)if(c.type==="childList"&&c.addedNodes.length>0&&Array.from(c.addedNodes).some(g=>g.nodeType===Node.ELEMENT_NODE)){d.disconnect(),setTimeout(()=>{h(!0),n.current&&(n.current(),n.current=null,s.current=null)},50);break}});if(e.current){d.observe(e.current,{childList:!0,subtree:!0,characterData:!0});try{o.setResult(JSON.parse(i)),o.render(e.current)}catch(r){console.error("Error rendering visualization:",r),d.disconnect(),h(!0),n.current&&(n.current(),n.current=null,s.current=null)}}}},[i,v,R]),t.useEffect(()=>{h(!1),b(!1),s.current=null,n.current=null},[i]),R&&!a&&s.current)throw s.current;return t.useEffect(()=>{if(!e.current||!a)return;const u=e.current,o=()=>{if(u){const c=u.offsetHeight;c>0?l&&l(c):f&&u.firstChild&&(u.firstChild.offsetHeight==0?f(!0):f(!1))}},d=setTimeout(o,100);let r=null;return y||(r=new MutationObserver(o),r.observe(u,{childList:!0,subtree:!0,attributes:!0})),()=>{clearTimeout(d),r?.disconnect()}},[l,i,f,a]),p.jsxRuntimeExports.jsx("div",{ref:e,style:{width:"100%",height:m?`${m}px`:"100%"}})}exports.default=E;
@@ -1,5 +1,5 @@
1
1
  import { j as C } from "./vendor-BCM56_2K.js";
2
- import { i as E } from "./index-fYVnpzww.js";
2
+ import { i as E } from "./index-DCLrfHfE.js";
3
3
  import { useRef as m, useState as R, useLayoutEffect as M, useEffect as w } from "react";
4
4
  function O({
5
5
  result: c,
@@ -5,7 +5,7 @@ export interface LoadingProps {
5
5
  text?: string;
6
6
  /**
7
7
  * The size of the CircularProgress component
8
- * @default 40
8
+ * @default 20
9
9
  */
10
10
  size?: number | string;
11
11
  /**