@malloydata/render 0.0.283 → 0.0.285

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,6 +1,8 @@
1
1
  import type { ChartProps } from './chart';
2
+ import type { VegaChartProps } from '../types';
2
3
  type ChartDevToolProps = {
3
4
  onClose: () => void;
5
+ chartProps: VegaChartProps;
4
6
  } & ChartProps;
5
7
  export default function ChartDevTool(props: ChartDevToolProps): import("solid-js").JSX.Element;
6
8
  export {};
@@ -1,3 +1,4 @@
1
+ import type { VegaChartProps } from '../types';
1
2
  import type { Runtime, View } from 'vega';
2
3
  import type { RepeatedRecordCell } from '../../data_tree';
3
4
  export type ChartProps = {
@@ -7,3 +8,10 @@ export type ChartProps = {
7
8
  onView?: (view: View) => void;
8
9
  };
9
10
  export declare function Chart(props: ChartProps): import("solid-js").JSX.Element;
11
+ export declare function ChartInner(props: {
12
+ data: RepeatedRecordCell;
13
+ runtime: Runtime;
14
+ chartProps: VegaChartProps;
15
+ devMode?: boolean;
16
+ onView?: (view: View) => void;
17
+ }): import("solid-js").JSX.Element;
@@ -0,0 +1,3 @@
1
+ export declare function ErrorMessage(props: {
2
+ message: string;
3
+ }): import("solid-js").JSX.Element;
@@ -7,9 +7,13 @@ export default function registerWebComponent({ customElements, HTMLElement, }: {
7
7
  prototype: HTMLElement;
8
8
  } | undefined;
9
9
  }): void;
10
+ type MalloyRenderApi = {
11
+ renderAs?: string;
12
+ };
10
13
  declare global {
11
14
  interface HTMLElementTagNameMap {
12
- 'malloy-render': HTMLElement & MalloyRenderProps;
15
+ 'malloy-render': HTMLElement & MalloyRenderProps & MalloyRenderApi;
13
16
  'malloy-modal': HTMLElement & MalloyModalWCProps;
14
17
  }
15
18
  }
19
+ export {};
@@ -2,7 +2,7 @@ import type { Tag } from '@malloydata/malloy-tag';
2
2
  import type { VegaChartProps, VegaConfigHandler } from './types';
3
3
  import type { ResultStore } from './result-store/result-store';
4
4
  import type { Runtime } from 'vega';
5
- import type { RootCell } from '../data_tree';
5
+ import { type RootCell } from '../data_tree';
6
6
  export type GetResultMetadataOptions = {
7
7
  getVegaConfigOverride?: VegaConfigHandler;
8
8
  parentSize: {
@@ -11,8 +11,9 @@ export type GetResultMetadataOptions = {
11
11
  };
12
12
  };
13
13
  export interface FieldVegaInfo {
14
- runtime: Runtime;
15
- props: VegaChartProps;
14
+ runtime: Runtime | null;
15
+ props: VegaChartProps | null;
16
+ error: Error | null;
16
17
  }
17
18
  export interface RenderMetadata {
18
19
  store: ResultStore;
@@ -22,6 +23,7 @@ export interface RenderMetadata {
22
23
  width: number;
23
24
  height: number;
24
25
  };
26
+ renderAs: string;
25
27
  }
26
28
  export declare function getResultMetadata(root: RootCell, options?: GetResultMetadataOptions): RenderMetadata;
27
29
  export declare function shouldRenderChartAs(tag: Tag): string | undefined;