@malloy-publisher/sdk 0.0.30 → 0.0.31

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.
@@ -0,0 +1,30 @@
1
+ import { j as f } from "./vendor-CYQMs_sd.js";
2
+ import "./index.es.js";
3
+ import { useRef as m, useEffect as i } from "react";
4
+ function p({
5
+ result: t,
6
+ onSizeChange: r
7
+ }) {
8
+ const e = m(null);
9
+ return i(() => {
10
+ e.current && (e.current.malloyResult = JSON.parse(t));
11
+ }, [t]), i(() => {
12
+ if (!e.current || !r) return;
13
+ const s = e.current, u = () => {
14
+ if (s) {
15
+ const n = s.offsetHeight;
16
+ n > 0 && r(n);
17
+ }
18
+ }, c = setTimeout(u, 100), o = new MutationObserver(u);
19
+ return o.observe(s, {
20
+ childList: !0,
21
+ subtree: !0,
22
+ attributes: !0
23
+ }), () => {
24
+ clearTimeout(c), o.disconnect();
25
+ };
26
+ }, [r, t]), /* @__PURE__ */ f.jsx("malloy-render", { ref: e });
27
+ }
28
+ export {
29
+ p as default
30
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("./vendor-DldTUzr7.cjs");require("./index.cjs.js");const s=require("react");function l({result:t,onSizeChange:r}){const e=s.useRef(null);return s.useEffect(()=>{e.current&&(e.current.malloyResult=JSON.parse(t))},[t]),s.useEffect(()=>{if(!e.current||!r)return;const u=e.current,n=()=>{if(u){const c=u.offsetHeight;c>0&&r(c)}},i=setTimeout(n,100),o=new MutationObserver(n);return o.observe(u,{childList:!0,subtree:!0,attributes:!0}),()=>{clearTimeout(i),o.disconnect()}},[r,t]),f.jsxRuntimeExports.jsx("malloy-render",{ref:e})}exports.default=l;
@@ -501,6 +501,12 @@ export interface Query {
501
501
  * @memberof Query
502
502
  */
503
503
  'name'?: string;
504
+ /**
505
+ * Source name.
506
+ * @type {string}
507
+ * @memberof Query
508
+ */
509
+ 'sourceName'?: string;
504
510
  /**
505
511
  * Annotations attached to query.
506
512
  * @type {Array<string>}
@@ -0,0 +1,7 @@
1
+ import { Query } from '../../client/api';
2
+ interface NamedQueryProps {
3
+ modelPath: string;
4
+ namedQueries: Array<Query>;
5
+ }
6
+ export default function NamedQueries({ namedQueries, modelPath, }: NamedQueryProps): import("react/jsx-runtime").JSX.Element;
7
+ export {};
@@ -10,6 +10,7 @@ declare global {
10
10
  }
11
11
  interface RenderedResultProps {
12
12
  result: string;
13
+ onSizeChange?: (height: number) => void;
13
14
  }
14
- export default function RenderedResult({ result }: RenderedResultProps): import("react/jsx-runtime").JSX.Element;
15
+ export default function RenderedResult({ result, onSizeChange, }: RenderedResultProps): import("react/jsx-runtime").JSX.Element;
15
16
  export {};
@@ -0,0 +1,7 @@
1
+ interface ResultContainerProps {
2
+ result: string | undefined;
3
+ minHeight: number;
4
+ maxHeight: number;
5
+ }
6
+ export default function ResultContainer({ result, minHeight, maxHeight, }: ResultContainerProps): import("react/jsx-runtime").JSX.Element;
7
+ export {};
@@ -3,9 +3,9 @@ import { CardOwnProps, Theme, CardContentOwnProps, CardMediaOwnProps } from '@mu
3
3
  import { CommonProps } from '@mui/material/OverridableComponent';
4
4
  import { DetailedHTMLProps, HTMLAttributes } from 'react';
5
5
  import { MUIStyledCommonProps } from '@mui/system';
6
- export declare const StyledCard: StyledComponent< CardOwnProps & CommonProps & Omit< DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "className" | "style" | "classes" | "children" | "sx" | "variant" | "square" | "elevation" | "raised"> & MUIStyledCommonProps<Theme>, {}, {}>;
6
+ export declare const StyledCard: StyledComponent< CardOwnProps & CommonProps & Omit< DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "className" | "style" | "classes" | "children" | "elevation" | "square" | "sx" | "variant" | "raised"> & MUIStyledCommonProps<Theme>, {}, {}>;
7
7
  export declare const StyledCardContent: StyledComponent< CardContentOwnProps & CommonProps & Omit< DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "className" | "style" | "classes" | "children" | "sx"> & MUIStyledCommonProps<Theme>, {}, {}>;
8
- export declare const StyledCardMedia: StyledComponent< CardMediaOwnProps & CommonProps & Omit< DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "className" | "style" | "classes" | "children" | "sx" | "image" | "src"> & MUIStyledCommonProps<Theme>, {}, {}>;
8
+ export declare const StyledCardMedia: StyledComponent< CardMediaOwnProps & CommonProps & Omit< DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "className" | "style" | "classes" | "image" | "children" | "sx" | "src"> & MUIStyledCommonProps<Theme>, {}, {}>;
9
9
  export declare const StyledExplorerPage: StyledComponent<MUIStyledCommonProps<Theme>, DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
10
10
  export declare const StyledExplorerBanner: StyledComponent<MUIStyledCommonProps<Theme>, DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
11
11
  export declare const StyledExplorerContent: StyledComponent<MUIStyledCommonProps<Theme>, DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;