@malloy-publisher/sdk 0.0.31 → 0.0.33
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-Bvw1-OOH.cjs → RenderedResult-B9Gth8IY.cjs} +1 -1
- package/dist/{RenderedResult-BSo_9A4J.js → RenderedResult-Drg_uJPZ.js} +1 -1
- package/dist/components/Home/Home.d.ts +1 -1
- package/dist/components/Package/Connections.d.ts +1 -1
- package/dist/components/Package/FileTreeView.d.ts +2 -1
- package/dist/components/Package/Models.d.ts +1 -1
- package/dist/components/Package/Notebooks.d.ts +1 -1
- package/dist/components/Package/Package.d.ts +1 -1
- package/dist/components/Project/Packages.d.ts +1 -1
- package/dist/components/Project/Project.d.ts +1 -1
- package/dist/components/click_helper.d.ts +8 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/index.cjs.js +329 -324
- package/dist/index.es.js +1299 -1273
- package/dist/{vendor-DldTUzr7.cjs → vendor-BH1c2Hhy.cjs} +164 -182
- package/dist/{vendor-CYQMs_sd.js → vendor-DfRellEl.js} +15811 -18411
- package/package.json +4 -4
- package/src/components/Home/Home.tsx +4 -2
- package/src/components/MutableNotebook/MutableCell.tsx +3 -1
- package/src/components/MutableNotebook/MutableNotebook.tsx +5 -5
- package/src/components/Notebook/NotebookCell.tsx +39 -26
- package/src/components/Package/Connections.tsx +1 -1
- package/src/components/Package/FileTreeView.tsx +6 -6
- package/src/components/Package/Models.tsx +1 -1
- package/src/components/Package/Notebooks.tsx +1 -1
- package/src/components/Package/Package.tsx +2 -2
- package/src/components/Project/Packages.tsx +4 -8
- package/src/components/Project/Project.tsx +1 -1
- package/src/components/RenderedResult/ResultContainer.tsx +13 -21
- package/src/components/click_helper.ts +37 -0
- package/src/components/highlighter.ts +1 -1
- package/src/components/index.ts +1 -0
- package/vite.config.ts +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("./vendor-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("./vendor-BH1c2Hhy.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;
|
|
@@ -2,7 +2,7 @@ interface ConnectionsProps {
|
|
|
2
2
|
server?: string;
|
|
3
3
|
projectName: string;
|
|
4
4
|
accessToken: string;
|
|
5
|
-
navigate: (to: string) => void;
|
|
5
|
+
navigate: (to: string, event?: React.MouseEvent) => void;
|
|
6
6
|
}
|
|
7
7
|
export default function Connections(connectionProps: ConnectionsProps): import("react/jsx-runtime").JSX.Element;
|
|
8
8
|
export {};
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { Database, Model } from '../../client';
|
|
2
|
+
import * as React from "react";
|
|
2
3
|
interface FiieTreeViewProps {
|
|
3
4
|
items: Model[] | Database[];
|
|
4
5
|
defaultExpandedItems: string[];
|
|
5
|
-
navigate?: (to: string) => void;
|
|
6
|
+
navigate?: (to: string, event?: React.MouseEvent) => void;
|
|
6
7
|
}
|
|
7
8
|
export declare function FileTreeView({ items, defaultExpandedItems, navigate, }: FiieTreeViewProps): import("react/jsx-runtime").JSX.Element;
|
|
8
9
|
export {};
|
|
@@ -3,7 +3,7 @@ interface ModelsProps {
|
|
|
3
3
|
projectName: string;
|
|
4
4
|
packageName: string;
|
|
5
5
|
versionId?: string;
|
|
6
|
-
navigate: (to: string) => void;
|
|
6
|
+
navigate: (to: string, event?: React.MouseEvent) => void;
|
|
7
7
|
accessToken?: string;
|
|
8
8
|
}
|
|
9
9
|
export default function Models({ server, projectName, packageName, versionId, navigate, accessToken, }: ModelsProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -3,7 +3,7 @@ interface ModelsProps {
|
|
|
3
3
|
projectName: string;
|
|
4
4
|
packageName: string;
|
|
5
5
|
versionId?: string;
|
|
6
|
-
navigate: (to: string) => void;
|
|
6
|
+
navigate: (to: string, event?: React.MouseEvent) => void;
|
|
7
7
|
accessToken?: string;
|
|
8
8
|
}
|
|
9
9
|
export default function Notebooks({ server, projectName, packageName, versionId, navigate, accessToken, }: ModelsProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -3,7 +3,7 @@ interface PackageProps {
|
|
|
3
3
|
projectName: string;
|
|
4
4
|
packageName: string;
|
|
5
5
|
versionId?: string;
|
|
6
|
-
navigate?: (to: string) => void;
|
|
6
|
+
navigate?: (to: string, event?: React.MouseEvent) => void;
|
|
7
7
|
accessToken?: string;
|
|
8
8
|
}
|
|
9
9
|
export default function Package({ server, projectName, packageName, versionId, navigate, accessToken, }: PackageProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
interface ProjectProps {
|
|
2
2
|
server?: string;
|
|
3
3
|
projectName: string;
|
|
4
|
-
navigate
|
|
4
|
+
navigate: (to: string, event?: React.MouseEvent) => void;
|
|
5
5
|
accessToken?: string;
|
|
6
6
|
}
|
|
7
7
|
export default function Project({ server, projectName, navigate, accessToken, }: ProjectProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
interface ProjectProps {
|
|
2
2
|
server?: string;
|
|
3
3
|
projectName: string;
|
|
4
|
-
navigate
|
|
4
|
+
navigate: (to: string, event?: React.MouseEvent) => void;
|
|
5
5
|
accessToken?: string;
|
|
6
6
|
}
|
|
7
7
|
export default function Project({ server, projectName, navigate, accessToken, }: ProjectProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { MouseEvent } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Custom hook that returns a function for handling clicks with proper modifier key support.
|
|
4
|
+
* The returned function handles CMD/Ctrl clicks to open in new tabs, regular clicks for navigation.
|
|
5
|
+
*
|
|
6
|
+
* @returns A function that takes a relative URL and either navigates or opens in new tab
|
|
7
|
+
*/
|
|
8
|
+
export declare function useRouterClickHandler(): (to: string, event?: MouseEvent) => void;
|