@malloydata/render 0.0.284 → 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;
@@ -117099,7 +117099,7 @@ function rv(t, e) {
117099
117099
  const r = fh(e);
117100
117100
  if (r.type === "union") {
117101
117101
  for (const i in r.options)
117102
- if (t[i] !== void 0) {
117102
+ if (t[i] !== void 0 && t[i] !== null) {
117103
117103
  const s = rv(t[i], r.options[i]);
117104
117104
  if (typeof s == "object")
117105
117105
  return {
@@ -129675,7 +129675,15 @@ class urt extends ort.Filter {
129675
129675
  kids: { left: x, right: V.value }
129676
129676
  },
129677
129677
  expressionType: V.expressionType,
129678
- fieldUsage: (0, dm.mergeFieldUsage)(V.fieldUsage, h)
129678
+ fieldUsage: (0, dm.mergeFieldUsage)(V.fieldUsage, h),
129679
+ stableFilter: {
129680
+ kind: "literal_equality",
129681
+ field_reference: {
129682
+ name: A.refString,
129683
+ path: i.list.slice(0, -1).map((K) => K.name)
129684
+ },
129685
+ value: s.getStableLiteral()
129686
+ }
129679
129687
  };
129680
129688
  }
129681
129689
  checkedFilterCondition(e, r) {
@@ -152832,7 +152840,7 @@ function Oht(t) {
152832
152840
  var Fe = {}, SD = {};
152833
152841
  Object.defineProperty(SD, "__esModule", { value: !0 });
152834
152842
  SD.MALLOY_VERSION = void 0;
152835
- SD.MALLOY_VERSION = "0.0.284";
152843
+ SD.MALLOY_VERSION = "0.0.285";
152836
152844
  Object.defineProperty(Fe, "__esModule", { value: !0 });
152837
152845
  Fe.InMemoryModelCache = Fe.CacheManager = Fe.CSVWriter = Fe.JSONWriter = Fe.DataWriter = Fe.DataRecord = Fe.DataArray = Fe.Result = Fe.ExploreMaterializer = Fe.PreparedResultMaterializer = Fe.QueryMaterializer = Fe.ModelMaterializer = Fe.SingleConnectionRuntime = Fe.ConnectionRuntime = Fe.Runtime = Fe.ExploreField = Fe.JoinRelationship = Fe.QueryField = Fe.Query = Fe.StringField = Fe.UnsupportedField = Fe.JSONField = Fe.BooleanField = Fe.NumberField = Fe.TimestampField = Fe.DateField = Fe.TimestampTimeframe = Fe.DateTimeframe = Fe.AtomicField = Fe.AtomicFieldType = Fe.Explore = Fe.SourceRelationship = Fe.FixedConnectionMap = Fe.InMemoryURLReader = Fe.EmptyURLReader = Fe.PreparedResult = Fe.DocumentCompletion = Fe.DocumentSymbol = Fe.DocumentPosition = Fe.DocumentRange = Fe.DocumentTablePath = Fe.Parse = Fe.PreparedQuery = Fe.Model = Fe.MalloyError = Fe.Malloy = void 0;
152838
152846
  const jY = UT, zr = ni, UY = aE, T7 = y2, wht = SD, Fht = E2, Dn = $s, Nht = hd, Lht = Pi, Iht = HE, qY = "internal://internal.malloy";