@malloy-publisher/sdk 0.0.81 → 0.0.82

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.
@@ -8,5 +8,5 @@ interface ModelProps {
8
8
  hideEmbeddingIcons?: boolean;
9
9
  onChange?: (query: QueryExplorerResult) => void;
10
10
  }
11
- export default function Model({ modelPath, expandResults, hideResultIcons, expandEmbeddings, hideEmbeddingIcons, onChange, }: ModelProps): import("react/jsx-runtime").JSX.Element;
11
+ export default function Model({ modelPath, versionId, expandResults, hideResultIcons, expandEmbeddings, hideEmbeddingIcons, onChange, }: ModelProps): import("react/jsx-runtime").JSX.Element;
12
12
  export {};
@@ -0,0 +1,19 @@
1
+ import { QueryExplorerResult } from './SourcesExplorer';
2
+ export interface ModelExplorerProps {
3
+ modelPath: string;
4
+ versionId?: string;
5
+ /** Display options forwarded to ModelCell */
6
+ expandResults?: boolean;
7
+ hideResultIcons?: boolean;
8
+ expandEmbeddings?: boolean;
9
+ hideEmbeddingIcons?: boolean;
10
+ /** Callback when the explorer changes (e.g. when a query is selected). */
11
+ onChange?: (query: QueryExplorerResult) => void;
12
+ }
13
+ /**
14
+ * ModelExplorer renders the main explorer UI for a Malloy model. It shows the
15
+ * selected source (via `SourceExplorerComponent`) along with the list of named
16
+ * queries for that model. This logic was originally embedded inside `Model.tsx`
17
+ * but has been extracted for easier reuse.
18
+ */
19
+ export declare function ModelExplorer({ modelPath, versionId, expandResults, hideResultIcons, expandEmbeddings, hideEmbeddingIcons, onChange, }: ModelExplorerProps): import("react/jsx-runtime").JSX.Element;
@@ -1,4 +1,7 @@
1
1
  export { default as Model } from './Model';
2
+ export { ModelExplorer } from './ModelExplorer';
2
3
  export { SourcesExplorer } from './SourcesExplorer';
3
4
  export { SourceExplorerComponent } from './SourcesExplorer';
4
5
  export type { SourceAndPath } from './SourcesExplorer';
6
+ export { useModelData } from './useModelData';
7
+ export type { ModelExplorerProps } from './ModelExplorer';
@@ -0,0 +1,8 @@
1
+ import { CompiledModel } from '../../client';
2
+ import { UseQueryResult } from '@tanstack/react-query';
3
+ import { ApiError } from '../ApiErrorDisplay';
4
+ /**
5
+ * Custom hook for fetching model data. Combines usePackage context with
6
+ * useQueryWithApiError to fetch a compiled model.
7
+ */
8
+ export declare function useModelData(modelPath: string, versionId?: string): UseQueryResult<CompiledModel, ApiError>;