@malloydata/render 0.0.165-dev240813215510 → 0.0.165-dev240813215606

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,4 +1,4 @@
1
- import { DataColumn, Field, Tag } from '@malloydata/malloy';
1
+ import { DataColumn, Explore, Field, Tag } from '@malloydata/malloy';
2
2
  import { RenderResultMetadata } from './types';
3
3
  export type RendererProps = {
4
4
  field: Field;
@@ -7,6 +7,7 @@ export type RendererProps = {
7
7
  tag: Tag;
8
8
  customProps?: Record<string, Record<string, unknown>>;
9
9
  };
10
+ export declare function shouldRenderAs(f: Field | Explore, tagOverride?: Tag): "table" | "dashboard" | "image" | "list" | "scatter_chart" | "line_chart" | "segment_map" | "shape_map" | "cell" | "link" | "chart";
10
11
  export declare function applyRenderer(props: RendererProps): {
11
12
  renderAs: string;
12
13
  renderValue: import("solid-js").JSX.Element;
@@ -0,0 +1,5 @@
1
+ import { DataArray } from '@malloydata/malloy';
2
+ export declare function LegacyChart(props: {
3
+ data: DataArray;
4
+ type: string;
5
+ }): import("solid-js").JSX.Element;
@@ -1,6 +1,8 @@
1
1
  import { Explore, ExploreField } from '@malloydata/malloy';
2
2
  import { PlotSpec } from './plot-spec';
3
3
  import { RenderResultMetadata, VegaChartProps } from '../types';
4
+ export declare const grayMedium = "#727883";
5
+ export declare const gridGray = "#E5E7EB";
4
6
  export declare function plotToVega(plotSpec: PlotSpec, options: {
5
7
  field: Explore | ExploreField;
6
8
  metadata: RenderResultMetadata;
@@ -30,4 +30,5 @@ export interface RenderResultMetadata {
30
30
  getData: (cell: DataColumn) => QueryData;
31
31
  modelTag: Tag;
32
32
  resultTag: Tag;
33
+ rootField: Field | Explore;
33
34
  }
@@ -1,10 +1,9 @@
1
- import { Explore, Field, Tag } from '@malloydata/malloy';
1
+ import { Explore, Field } from '@malloydata/malloy';
2
2
  export declare function isLastChild(f: Field | Explore): boolean;
3
3
  export declare function isFirstChild(f: Field | Explore): boolean;
4
4
  export declare function valueIsNumber(f: Field, v: unknown): v is number;
5
5
  export declare function valueIsString(f: Field, s: unknown): s is string;
6
6
  export declare function getTextWidth(text: string, font: string, canvasToUse?: HTMLCanvasElement): number;
7
7
  export declare function clamp(s: number, e: number, v: number): number;
8
- export declare function shouldRenderAs(f: Field | Explore, tagOverride?: Tag): "table" | "dashboard" | "image" | "list" | "cell" | "link" | "chart";
9
8
  export declare function getFieldKey(f: Field | Explore): string;
10
9
  export declare function getRangeSize(range: [number, number]): number;