@malloy-publisher/sdk 0.0.36 → 0.0.37
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.
- package/dist/{RenderedResult-DphykkT6.cjs → RenderedResult-ChKXzRBq.cjs} +1 -1
- package/dist/{RenderedResult-BlNz8j4d.js → RenderedResult-DkEsDzXb.js} +2 -2
- package/dist/components/Model/SourcesExplorer.d.ts +2 -2
- package/dist/components/MutableNotebook/EditableMalloyCell.d.ts +3 -3
- package/dist/components/MutableNotebook/MutableCell.d.ts +3 -4
- package/dist/components/MutableNotebook/MutableNotebook.d.ts +2 -1
- package/dist/{index-nKbldp0y.cjs → index-7mmEVMId.cjs} +314 -314
- package/dist/{index-DvGSfdDD.js → index-DdtGkJIk.js} +25143 -25072
- package/dist/index.cjs.js +1 -1
- package/dist/index.es.js +1 -1
- package/dist/{vendor-C8UD-eyK.js → vendor-C6w9JpPA.js} +16199 -19097
- package/dist/{vendor-BH1c2Hhy.cjs → vendor-DAoHVNwq.cjs} +140 -241
- package/package.json +1 -1
- package/src/components/Model/NamedQueries.tsx +13 -13
- package/src/components/Model/SourcesExplorer.tsx +21 -41
- package/src/components/MutableNotebook/EditableMalloyCell.tsx +4 -22
- package/src/components/MutableNotebook/ModelPicker.tsx +31 -52
- package/src/components/MutableNotebook/MutableCell.tsx +229 -137
- package/src/components/MutableNotebook/MutableNotebook.tsx +102 -62
- package/src/components/Package/Package.tsx +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./vendor-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./vendor-DAoHVNwq.cjs"),m=require("./index-7mmEVMId.cjs"),n=require("react");function v({result:r,height:c,isFillElement:i,onSizeChange:s,onDrill:f}){const e=n.useRef(null);n.useEffect(()=>{if(e.current){const t=l.createViz();for(;e.current.firstChild;)e.current.removeChild(e.current.firstChild);t.setResult(JSON.parse(r)),t.render(e.current)}},[r,e]),n.useEffect(()=>{if(!e.current)return;const t=e.current,u=()=>{if(t){const d=t.offsetHeight;d>0?s&&s(d):i&&t.firstChild&&(t.firstChild.offsetHeight==0?i(!0):i(!1))}},h=setTimeout(u,100),o=new MutationObserver(u);return o.observe(t,{childList:!0,subtree:!0,attributes:!0}),()=>{clearTimeout(h),o.disconnect()}},[s,r]);const l=new m.index_umdExports.MalloyRenderer({onClick:f});return a.jsxRuntimeExports.jsx("div",{ref:e,style:{width:"100%",height:c?`${c}px`:"100%"}})}exports.default=v;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { j as m } from "./vendor-
|
|
2
|
-
import { i as a } from "./index-
|
|
1
|
+
import { j as m } from "./vendor-C6w9JpPA.js";
|
|
2
|
+
import { i as a } from "./index-DdtGkJIk.js";
|
|
3
3
|
import { useRef as p, useEffect as f } from "react";
|
|
4
4
|
function w({
|
|
5
5
|
result: r,
|
|
@@ -7,7 +7,7 @@ export interface SourceExplorerProps {
|
|
|
7
7
|
sourceAndPaths: SourceAndPath[];
|
|
8
8
|
existingQuery?: QueryExplorerResult;
|
|
9
9
|
existingSourceName?: string;
|
|
10
|
-
|
|
10
|
+
onChange?: (query: QueryExplorerResult) => void;
|
|
11
11
|
}
|
|
12
12
|
/**
|
|
13
13
|
* Component for Exploring a set of sources.
|
|
@@ -16,7 +16,7 @@ export interface SourceExplorerProps {
|
|
|
16
16
|
* It is expected that multiple sourceInfo entries will correspond to the same
|
|
17
17
|
* model path.
|
|
18
18
|
*/
|
|
19
|
-
export declare function SourcesExplorer({ sourceAndPaths,
|
|
19
|
+
export declare function SourcesExplorer({ sourceAndPaths, existingQuery, existingSourceName, onChange, }: SourceExplorerProps): import("react/jsx-runtime").JSX.Element;
|
|
20
20
|
interface SourceExplorerComponentProps {
|
|
21
21
|
sourceAndPath: SourceAndPath;
|
|
22
22
|
existingQuery?: QueryExplorerResult;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { SourceAndPath } from '../Model';
|
|
2
|
+
import { QueryExplorerResult } from '../Model/SourcesExplorer';
|
|
2
3
|
import { NotebookCellValue } from '../NotebookManager';
|
|
3
4
|
interface EditableMalloyCellProps {
|
|
4
5
|
cell: NotebookCellValue;
|
|
5
6
|
sourceAndPaths: SourceAndPath[];
|
|
6
|
-
|
|
7
|
-
onClose: () => void;
|
|
7
|
+
onChange: (query: QueryExplorerResult) => void;
|
|
8
8
|
}
|
|
9
|
-
export declare function EditableMalloyCell({ cell, sourceAndPaths,
|
|
9
|
+
export declare function EditableMalloyCell({ cell, sourceAndPaths, onChange, }: EditableMalloyCellProps): import("react/jsx-runtime").JSX.Element;
|
|
10
10
|
export {};
|
|
@@ -1,18 +1,17 @@
|
|
|
1
|
-
import { default as React } from 'react';
|
|
2
|
-
import { NotebookCellValue } from '../NotebookManager';
|
|
3
1
|
import { SourceAndPath } from '../Model/SourcesExplorer';
|
|
2
|
+
import { NotebookCellValue } from '../NotebookManager';
|
|
4
3
|
interface NotebookCellProps {
|
|
5
4
|
cell: NotebookCellValue;
|
|
6
5
|
expandCodeCell?: boolean;
|
|
7
6
|
expandEmbedding?: boolean;
|
|
7
|
+
hideEmbeddingIcons?: boolean;
|
|
8
8
|
editingMalloy?: boolean;
|
|
9
9
|
editingMarkdown?: boolean;
|
|
10
10
|
sourceAndPaths: SourceAndPath[];
|
|
11
|
-
newCell: React.ReactNode;
|
|
12
11
|
onCellChange: (cell: NotebookCellValue) => void;
|
|
13
12
|
onClose: () => void;
|
|
14
13
|
onEdit: () => void;
|
|
15
14
|
onDelete: () => void;
|
|
16
15
|
}
|
|
17
|
-
export declare function MutableCell({ cell, expandCodeCell, expandEmbedding, editingMalloy, editingMarkdown, sourceAndPaths,
|
|
16
|
+
export declare function MutableCell({ cell, expandCodeCell, expandEmbedding, hideEmbeddingIcons, editingMalloy, editingMarkdown, sourceAndPaths, onCellChange, onClose, onEdit, onDelete, }: NotebookCellProps): import("react/jsx-runtime").JSX.Element;
|
|
18
17
|
export {};
|
|
@@ -2,6 +2,7 @@ interface MutableNotebookProps {
|
|
|
2
2
|
notebookPath?: string;
|
|
3
3
|
expandCodeCells?: boolean;
|
|
4
4
|
expandEmbeddings?: boolean;
|
|
5
|
+
hideEmbeddingIcons?: boolean;
|
|
5
6
|
}
|
|
6
|
-
export default function MutableNotebook({ notebookPath, expandCodeCells, expandEmbeddings, }: MutableNotebookProps): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export default function MutableNotebook({ notebookPath, expandCodeCells, expandEmbeddings, hideEmbeddingIcons, }: MutableNotebookProps): import("react/jsx-runtime").JSX.Element;
|
|
7
8
|
export {};
|