@uwdata/mosaic-plot 0.17.0 → 0.18.0

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.
Files changed (117) hide show
  1. package/LICENSE +47 -0
  2. package/README.md +1 -1
  3. package/dist/src/index.d.ts +25 -0
  4. package/dist/src/index.d.ts.map +1 -0
  5. package/dist/src/interactors/Highlight.d.ts +15 -0
  6. package/dist/src/interactors/Highlight.d.ts.map +1 -0
  7. package/dist/src/interactors/Interval1D.d.ts +32 -0
  8. package/dist/src/interactors/Interval1D.d.ts.map +1 -0
  9. package/dist/src/interactors/Interval2D.d.ts +33 -0
  10. package/dist/src/interactors/Interval2D.d.ts.map +1 -0
  11. package/dist/src/interactors/Nearest.d.ts +26 -0
  12. package/dist/src/interactors/Nearest.d.ts.map +1 -0
  13. package/dist/src/interactors/PanZoom.d.ts +34 -0
  14. package/dist/src/interactors/PanZoom.d.ts.map +1 -0
  15. package/dist/src/interactors/Region.d.ts +36 -0
  16. package/dist/src/interactors/Region.d.ts.map +1 -0
  17. package/dist/src/interactors/Toggle.d.ts +22 -0
  18. package/dist/src/interactors/Toggle.d.ts.map +1 -0
  19. package/dist/src/interactors/util/brush.d.ts +5 -0
  20. package/dist/src/interactors/util/brush.d.ts.map +1 -0
  21. package/dist/src/interactors/util/close-to.d.ts +2 -0
  22. package/dist/src/interactors/util/close-to.d.ts.map +1 -0
  23. package/dist/src/interactors/util/get-datum.d.ts +9 -0
  24. package/dist/src/interactors/util/get-datum.d.ts.map +1 -0
  25. package/dist/src/interactors/util/get-field.d.ts +6 -0
  26. package/dist/src/interactors/util/get-field.d.ts.map +1 -0
  27. package/dist/src/interactors/util/intersect.d.ts +12 -0
  28. package/dist/src/interactors/util/intersect.d.ts.map +1 -0
  29. package/dist/src/interactors/util/invert.d.ts +2 -0
  30. package/dist/src/interactors/util/invert.d.ts.map +1 -0
  31. package/dist/src/interactors/util/neq.d.ts +3 -0
  32. package/dist/src/interactors/util/neq.d.ts.map +1 -0
  33. package/dist/src/interactors/util/parse-path.d.ts +9 -0
  34. package/dist/src/interactors/util/parse-path.d.ts.map +1 -0
  35. package/dist/src/interactors/util/patchScreenCTM.d.ts +10 -0
  36. package/dist/src/interactors/util/patchScreenCTM.d.ts.map +1 -0
  37. package/dist/src/interactors/util/sanitize-styles.d.ts +2 -0
  38. package/dist/src/interactors/util/sanitize-styles.d.ts.map +1 -0
  39. package/dist/src/interactors/util/to-kebab-case.d.ts +2 -0
  40. package/dist/src/interactors/util/to-kebab-case.d.ts.map +1 -0
  41. package/dist/src/legend.d.ts +16 -0
  42. package/dist/src/legend.d.ts.map +1 -0
  43. package/dist/src/marks/ConnectedMark.d.ts +6 -0
  44. package/dist/src/marks/ConnectedMark.d.ts.map +1 -0
  45. package/dist/src/marks/ContourMark.d.ts +15 -0
  46. package/dist/src/marks/ContourMark.d.ts.map +1 -0
  47. package/dist/src/marks/DenseLineMark.d.ts +6 -0
  48. package/dist/src/marks/DenseLineMark.d.ts.map +1 -0
  49. package/dist/src/marks/Density1DMark.d.ts +34 -0
  50. package/dist/src/marks/Density1DMark.d.ts.map +1 -0
  51. package/dist/src/marks/Density2DMark.d.ts +13 -0
  52. package/dist/src/marks/Density2DMark.d.ts.map +1 -0
  53. package/dist/src/marks/ErrorBarMark.d.ts +11 -0
  54. package/dist/src/marks/ErrorBarMark.d.ts.map +1 -0
  55. package/dist/src/marks/GeoMark.d.ts +6 -0
  56. package/dist/src/marks/GeoMark.d.ts.map +1 -0
  57. package/dist/src/marks/Grid2DMark.d.ts +48 -0
  58. package/dist/src/marks/Grid2DMark.d.ts.map +1 -0
  59. package/dist/src/marks/HexbinMark.d.ts +8 -0
  60. package/dist/src/marks/HexbinMark.d.ts.map +1 -0
  61. package/dist/src/marks/Mark.d.ts +78 -0
  62. package/dist/src/marks/Mark.d.ts.map +1 -0
  63. package/dist/src/marks/RasterMark.d.ts +62 -0
  64. package/dist/src/marks/RasterMark.d.ts.map +1 -0
  65. package/dist/src/marks/RasterTileMark.d.ts +32 -0
  66. package/dist/src/marks/RasterTileMark.d.ts.map +1 -0
  67. package/dist/src/marks/RegressionMark.d.ts +52 -0
  68. package/dist/src/marks/RegressionMark.d.ts.map +1 -0
  69. package/dist/src/marks/util/bin-expr.d.ts +9 -0
  70. package/dist/src/marks/util/bin-expr.d.ts.map +1 -0
  71. package/dist/src/marks/util/channel-scale.d.ts +2 -0
  72. package/dist/src/marks/util/channel-scale.d.ts.map +1 -0
  73. package/dist/src/marks/util/density.d.ts +13 -0
  74. package/dist/src/marks/util/density.d.ts.map +1 -0
  75. package/dist/src/marks/util/extent.d.ts +12 -0
  76. package/dist/src/marks/util/extent.d.ts.map +1 -0
  77. package/dist/src/marks/util/grid.d.ts +62 -0
  78. package/dist/src/marks/util/grid.d.ts.map +1 -0
  79. package/dist/src/marks/util/handle-param.d.ts +8 -0
  80. package/dist/src/marks/util/handle-param.d.ts.map +1 -0
  81. package/dist/src/marks/util/is-color.d.ts +2 -0
  82. package/dist/src/marks/util/is-color.d.ts.map +1 -0
  83. package/dist/src/marks/util/is-constant-option.d.ts +2 -0
  84. package/dist/src/marks/util/is-constant-option.d.ts.map +1 -0
  85. package/dist/src/marks/util/is-symbol.d.ts +2 -0
  86. package/dist/src/marks/util/is-symbol.d.ts.map +1 -0
  87. package/dist/src/marks/util/permute.d.ts +3 -0
  88. package/dist/src/marks/util/permute.d.ts.map +1 -0
  89. package/dist/src/marks/util/raster.d.ts +7 -0
  90. package/dist/src/marks/util/raster.d.ts.map +1 -0
  91. package/dist/src/marks/util/stats.d.ts +44 -0
  92. package/dist/src/marks/util/stats.d.ts.map +1 -0
  93. package/dist/src/plot-attributes.d.ts +3 -0
  94. package/dist/src/plot-attributes.d.ts.map +1 -0
  95. package/dist/src/plot-renderer.d.ts +3 -0
  96. package/dist/src/plot-renderer.d.ts.map +1 -0
  97. package/dist/src/plot.d.ts +70 -0
  98. package/dist/src/plot.d.ts.map +1 -0
  99. package/dist/src/symbols.d.ts +4 -0
  100. package/dist/src/symbols.d.ts.map +1 -0
  101. package/dist/src/transforms/bin.d.ts +22 -0
  102. package/dist/src/transforms/bin.d.ts.map +1 -0
  103. package/package.json +14 -7
  104. package/src/interactors/Nearest.js +3 -1
  105. package/src/interactors/PanZoom.js +2 -1
  106. package/src/interactors/Toggle.js +2 -1
  107. package/src/marks/Density1DMark.js +2 -0
  108. package/src/marks/Density2DMark.js +1 -0
  109. package/src/marks/ErrorBarMark.js +1 -0
  110. package/src/marks/GeoMark.js +1 -0
  111. package/src/marks/Grid2DMark.js +1 -0
  112. package/src/marks/Mark.js +2 -1
  113. package/src/marks/RasterMark.js +1 -0
  114. package/src/marks/RasterTileMark.js +1 -0
  115. package/src/plot.js +3 -3
  116. package/tsconfig.json +0 -9
  117. package/vitest.config.ts +0 -3
@@ -0,0 +1,48 @@
1
+ export const DENSITY: "density";
2
+ export class Grid2DMark extends Mark {
3
+ constructor(type: any, source: any, options: any);
4
+ densityMap: {};
5
+ /** @type {number} */
6
+ bandwidth: number;
7
+ /** @type {string} */
8
+ interpolate: string;
9
+ /** @type {number} */
10
+ pixelSize: number;
11
+ /** @type {number} */
12
+ pad: number;
13
+ /** @type {number|undefined} */
14
+ width: number | undefined;
15
+ /** @type {number|undefined} */
16
+ height: number | undefined;
17
+ query(filter?: any[]): import("@uwdata/mosaic-sql").SelectQuery;
18
+ extentX: any;
19
+ extentY: any;
20
+ bins: [number, number];
21
+ groupby: string[];
22
+ aggr: string[];
23
+ /**
24
+ * @returns {[number, number]} The bin dimensions.
25
+ */
26
+ binDimensions(): [number, number];
27
+ queryResult(data: any): this;
28
+ grids0: {
29
+ numRows: number;
30
+ columns: {
31
+ [key: string]: Arrayish;
32
+ };
33
+ };
34
+ convolve(): this;
35
+ grids: {
36
+ numRows: number;
37
+ columns: {
38
+ [key: string]: Arrayish;
39
+ };
40
+ } | {
41
+ numRows: number;
42
+ columns: {
43
+ [x: string]: import("./util/grid.js").Arrayish | Uint8Array<ArrayBuffer> | Int8Array<ArrayBuffer> | Uint8ClampedArray<ArrayBuffer> | Int16Array<ArrayBuffer> | Uint16Array<ArrayBuffer> | Int32Array<ArrayBuffer> | Uint32Array<ArrayBuffer> | Float32Array<ArrayBuffer> | Float64Array<ArrayBuffer>;
44
+ };
45
+ };
46
+ }
47
+ import { Mark } from './Mark.js';
48
+ //# sourceMappingURL=Grid2DMark.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Grid2DMark.d.ts","sourceRoot":"","sources":["../../../src/marks/Grid2DMark.js"],"names":[],"mappings":"AAYA,sBAAuB,SAAS,CAAC;AAEjC;IACE,kDA6CC;IAhCC,eAA4B;IAE5B,qBAAqB;IACrB,WADW,MAAM,CAIf;IAEF,qBAAqB;IACrB,aADW,MAAM,CAGf;IAEF,qBAAqB;IACrB,WADW,MAAM,CAGf;IAEF,qBAAqB;IACrB,KADW,MAAM,CAGf;IAEF,+BAA+B;IAC/B,OADW,MAAM,GAAC,SAAS,CAGzB;IAEF,+BAA+B;IAC/B,QADW,MAAM,GAAC,SAAS,CAGzB;IAoBJ,gEAiEC;IA/DkB,aAAoC;IACpC,aAAoC;IACpC,uBAAgC;IAejC,SADL,MAAM,EAAE,CACc;IAoBpB,eAAgC;IA4B/C;;OAEG;IACH,iBAFa,CAAC,MAAM,EAAE,MAAM,CAAC,CAQ5B;IAED,6BAOC;IAFC;;;;;MAAmF;IAIrF,iBAqCC;IAjCC;;;;;;;;;;MAAmB;CAkCtB;qBAlMoB,WAAW"}
@@ -0,0 +1,8 @@
1
+ export class HexbinMark extends Mark {
2
+ constructor(source: any, options: any);
3
+ /** @type {number} */
4
+ binWidth: number;
5
+ query(filter?: any[]): import("@uwdata/mosaic-sql").SelectQuery;
6
+ }
7
+ import { Mark } from './Mark.js';
8
+ //# sourceMappingURL=HexbinMark.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"HexbinMark.d.ts","sourceRoot":"","sources":["../../../src/marks/HexbinMark.js"],"names":[],"mappings":"AAMA;IACE,uCAQC;IAJC,qBAAqB;IACrB,UADW,MAAM,CAGf;IASJ,gEA8FC;CACF;qBAnHoB,WAAW"}
@@ -0,0 +1,78 @@
1
+ /**
2
+ * Helper method for setting a channel option in a Plot specification.
3
+ * Checks if a constant value or a data field is needed.
4
+ * Also avoids misinterpretation of data values as color names.
5
+ * @param {*} c a visual encoding channel spec
6
+ * @param {object} columns named data column arrays
7
+ * @returns the Plot channel option
8
+ */
9
+ export function channelOption(c: any, columns: object): any;
10
+ /**
11
+ * Default query construction for a mark.
12
+ * Tracks aggregates by checking fields for an aggregate flag.
13
+ * If aggregates are found, groups by all non-aggregate fields.
14
+ * @param {*} channels array of visual encoding channel specs.
15
+ * @param {*} table the table to query.
16
+ * @param {*} skip an optional array of channels to skip.
17
+ * Mark subclasses can skip channels that require special handling.
18
+ * @returns {SelectQuery} a Query instance
19
+ */
20
+ export function markQuery(channels: any, table: any, skip?: any): SelectQuery;
21
+ /**
22
+ * Generate an array of Plot mark specifications.
23
+ * @returns {object[]}
24
+ */
25
+ export function markPlotSpec(type: any, detail: any, channels: any, data: any, options?: {}): object[];
26
+ export function isDataArray(source: any): source is any[];
27
+ export class Mark extends MosaicClient {
28
+ constructor(type: any, source: any, encodings: any, reqs?: {});
29
+ type: any;
30
+ reqs: {};
31
+ source: any;
32
+ channels: any[];
33
+ detail: Set<any>;
34
+ params: Set<any>;
35
+ data: {
36
+ numRows: number;
37
+ columns: Record<string, unknown[] | Int8Array<ArrayBufferLike> | Uint8Array<ArrayBufferLike> | Uint8ClampedArray<ArrayBufferLike> | Int16Array<ArrayBufferLike> | Uint16Array<ArrayBufferLike> | Int32Array<ArrayBufferLike> | Uint32Array<ArrayBufferLike> | Float32Array<ArrayBufferLike> | Float64Array<ArrayBufferLike>>;
38
+ } | {
39
+ numRows: number;
40
+ values: unknown[] | Int8Array<ArrayBufferLike> | Uint8Array<ArrayBufferLike> | Uint8ClampedArray<ArrayBufferLike> | Int16Array<ArrayBufferLike> | Uint16Array<ArrayBufferLike> | Int32Array<ArrayBufferLike> | Uint32Array<ArrayBufferLike> | Float32Array<ArrayBufferLike> | Float64Array<ArrayBufferLike>;
41
+ };
42
+ /**
43
+ * @param {import('../plot.js').Plot} plot The plot.
44
+ * @param {number} index
45
+ */
46
+ setPlot(plot: import("../plot.js").Plot, index: number): void;
47
+ plot: import("../plot.js").Plot;
48
+ index: number;
49
+ sourceTable(): any;
50
+ hasOwnData(): boolean;
51
+ hasFieldInfo(): boolean;
52
+ channel(channel: any): any;
53
+ channelField(channel: any, { exact }?: {
54
+ exact?: boolean;
55
+ }): any;
56
+ prepare(): Promise<any>;
57
+ _fieldInfo: boolean;
58
+ /**
59
+ * Return a query specifying the data needed by this Mark client.
60
+ * @param {*} [filter] The filtering criteria to apply in the query.
61
+ * @returns {*} The client query
62
+ */
63
+ query(filter?: any): any;
64
+ queryPending(): this;
65
+ /**
66
+ * Provide query result data to the mark.
67
+ */
68
+ queryResult(data: any): this;
69
+ update(): Promise<void>;
70
+ /**
71
+ * Generate an array of Plot mark specifications.
72
+ * @returns {object[]}
73
+ */
74
+ plotSpecs(): object[];
75
+ }
76
+ import type { SelectQuery } from '@uwdata/mosaic-sql';
77
+ import { MosaicClient } from '@uwdata/mosaic-core';
78
+ //# sourceMappingURL=Mark.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Mark.d.ts","sourceRoot":"","sources":["../../../src/marks/Mark.js"],"names":[],"mappings":"AAgMA;;;;;;;GAOG;AACH,iCAJW,GAAC,WACD,MAAM,OAWhB;AAED;;;;;;;;;GASG;AACH,oCANW,GAAC,SACD,GAAC,SACD,GAAC,GAEC,WAAW,CA6BvB;AAGD;;;GAGG;AACH,8FAFa,MAAM,EAAE,CAmBpB;AAvPM,0DAAmD;AAE1D;IACE,+DA6DC;IA3DC,UAAgB;IAChB,SAAgB;IAChB,YAAoB;IAEH,gBAAkB;IACpB,iBAAqB;IACrB,iBAAqB;IAGlC;;;;;;MAAiC;IAoDrC;;;OAGG;IACH,cAHW,OAAO,YAAY,EAAE,IAAI,SACzB,MAAM,QAOhB;IAJC,gCAAgB;IAChB,cAAkB;IAKpB,mBAGC;IAED,sBAEC;IAED,wBAEC;IAED,2BAEC;IAED;;YAKC;IAED,wBA4BC;IADC,oBAAsB;IAGxB;;;;OAIG;IACH,eAHW,GAAC,GACC,GAAC,CAKb;IAED,qBAGC;IAED;;OAEG;IACH,6BAGC;IAED,wBAEC;IAED;;;OAGG;IACH,aAFa,MAAM,EAAE,CAKpB;CACF;iCA9LgC,oBAAoB;6BACgB,qBAAqB"}
@@ -0,0 +1,62 @@
1
+ /**
2
+ * Utility method to generate color and alpha encoding helpers.
3
+ * The returned methods can write directly to a pixel raster.
4
+ * @param {RasterMark} mark
5
+ */
6
+ export function rasterEncoding(mark: RasterMark): {
7
+ alphaProp: any;
8
+ colorProp: any;
9
+ alpha: (data: any, w: any, h: any, grid: any) => void;
10
+ color: (data: any, w: any, h: any, grid: any) => void;
11
+ };
12
+ /**
13
+ * Retrieve canvas image data for a 2D raster bitmap.
14
+ * The resulting data is cached in the mark.image property.
15
+ * If the canvas dimensions change, a new canvas is created.
16
+ * @param {RasterMark} mark The mark instance
17
+ * @param {number} w The canvas width.
18
+ * @param {number} h The canvas height.
19
+ * @returns An object with a canvas, context, image data, and dimensions.
20
+ */
21
+ export function imageData(mark: RasterMark, w: number, h: number): any;
22
+ /**
23
+ * Raster image mark. Data is binned to a grid based on the x and y options.
24
+ * The grid cells are then colored to form an image.
25
+ * The raster grid size defaults to the pixel width/height of the
26
+ * plot. The pixelSize option (default 1) changes the grid cell to pixel
27
+ * ratio. For example, a pixelSize of 0.5 will create a larger raster
28
+ * for higher resolution images on retina displays. The width and height
29
+ * options set the grid dimensions directly, overriding other options.
30
+ * The raster grid can optionally be smoothed (blurred) by setting
31
+ * the bandwidth option.
32
+ */
33
+ export class RasterMark extends Grid2DMark {
34
+ constructor(source: any, options: any);
35
+ image: any;
36
+ setPlot(plot: any, index: any): void;
37
+ convolve(): this;
38
+ rasterize(): this;
39
+ plotSpecs(): {
40
+ type: any;
41
+ data: {
42
+ length: number;
43
+ };
44
+ options: {
45
+ src: any;
46
+ width: number;
47
+ height: number;
48
+ preserveAspectRatio: string;
49
+ imageRendering: any;
50
+ frameAnchor: string;
51
+ };
52
+ }[];
53
+ }
54
+ /**
55
+ * Density heatmap image.
56
+ * This is just a raster mark with default options for
57
+ * accurate binning and smoothing for density estimation.
58
+ */
59
+ export class HeatmapMark extends RasterMark {
60
+ }
61
+ import { Grid2DMark } from './Grid2DMark.js';
62
+ //# sourceMappingURL=RasterMark.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RasterMark.d.ts","sourceRoot":"","sources":["../../../src/marks/RasterMark.js"],"names":[],"mappings":"AAqGA;;;;GAIG;AACH,qCAFW,UAAU;;;;;EA6CpB;AAsHD;;;;;;;;GAQG;AACH,gCALW,UAAU,KACV,MAAM,KACN,MAAM,OAWhB;AAnRD;;;;;;;;;;GAUG;AACH;IACE,uCAGC;IADC,WAAiB;IAGnB,qCAIC;IAED,iBAEC;IAED,kBAgCC;IAED;;;;;;;;;;;;;QAYC;CACF;AAED;;;;GAIG;AACH;CASC;2BA7FmC,iBAAiB"}
@@ -0,0 +1,32 @@
1
+ export class RasterTileMark extends Grid2DMark {
2
+ constructor(source: any, options: any);
3
+ image: any;
4
+ origin: any;
5
+ tileX: any;
6
+ tileY: any;
7
+ setPlot(plot: any, index: any): void;
8
+ requestQuery(): Promise<void>;
9
+ query(filter?: any[]): any;
10
+ _filter: any[];
11
+ tileQuery(extent: any): any;
12
+ requestTiles(): Promise<void>;
13
+ prefetch: import("@uwdata/mosaic-core").QueryResult<unknown>[];
14
+ convolve(): this;
15
+ rasterize(): this;
16
+ plotSpecs(): {
17
+ type: any;
18
+ data: {
19
+ length: number;
20
+ };
21
+ options: {
22
+ src: any;
23
+ width: number;
24
+ height: number;
25
+ preserveAspectRatio: string;
26
+ imageRendering: any;
27
+ frameAnchor: string;
28
+ };
29
+ }[];
30
+ }
31
+ import { Grid2DMark } from './Grid2DMark.js';
32
+ //# sourceMappingURL=RasterTileMark.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RasterTileMark.d.ts","sourceRoot":"","sources":["../../../src/marks/RasterTileMark.js"],"names":[],"mappings":"AASA;IACE,uCASC;IANC,WAAiB;IAGjB,YAAoB;IACpB,WAA4C;IAC5C,WAA4C;IAG9C,qCAIC;IAED,8BAEC;IAED,2BAIC;IAHC,eAAqB;IAKvB,4BA6DC;IAED,8BAiEC;IAZC,+DAEC;IAYH,iBAEC;IAED,kBAgCC;IAED;;;;;;;;;;;;;QAYC;CACF;2BApN0B,iBAAiB"}
@@ -0,0 +1,52 @@
1
+ export class RegressionMark extends Mark {
2
+ constructor(source: any, options: any);
3
+ /** @type {number} */
4
+ ci: number;
5
+ /** @type {number} */
6
+ precision: number;
7
+ query(filter?: any[]): import("@uwdata/mosaic-sql").SelectQuery;
8
+ queryResult(data: any): this;
9
+ modelFit: {
10
+ numRows: number;
11
+ columns: Record<string, unknown[] | Int8Array<ArrayBufferLike> | Uint8Array<ArrayBufferLike> | Uint8ClampedArray<ArrayBufferLike> | Int16Array<ArrayBufferLike> | Uint16Array<ArrayBufferLike> | Int32Array<ArrayBufferLike> | Uint32Array<ArrayBufferLike> | Float32Array<ArrayBufferLike> | Float64Array<ArrayBufferLike>>;
12
+ } | {
13
+ numRows: number;
14
+ values: unknown[] | Int8Array<ArrayBufferLike> | Uint8Array<ArrayBufferLike> | Uint8ClampedArray<ArrayBufferLike> | Int16Array<ArrayBufferLike> | Uint16Array<ArrayBufferLike> | Int32Array<ArrayBufferLike> | Uint32Array<ArrayBufferLike> | Float32Array<ArrayBufferLike> | Float64Array<ArrayBufferLike>;
15
+ };
16
+ lineData: {
17
+ numRows: any;
18
+ columns: any;
19
+ };
20
+ confidenceBand(): this;
21
+ areaData: {
22
+ numRows: number;
23
+ columns: {
24
+ x: any[];
25
+ y1: any[];
26
+ y2: any[];
27
+ };
28
+ };
29
+ plotSpecs(): ({
30
+ type: string;
31
+ data: {
32
+ length: number;
33
+ };
34
+ options: {
35
+ x: any;
36
+ y1: any;
37
+ y2: any;
38
+ fillOpacity: number;
39
+ };
40
+ } | {
41
+ type: string;
42
+ data: {
43
+ length: any;
44
+ };
45
+ options: {
46
+ x: any;
47
+ y: any;
48
+ };
49
+ })[];
50
+ }
51
+ import { Mark } from './Mark.js';
52
+ //# sourceMappingURL=RegressionMark.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RegressionMark.d.ts","sourceRoot":"","sources":["../../../src/marks/RegressionMark.js"],"names":[],"mappings":"AAWA;IACE,uCAeC;IATC,qBAAqB;IACrB,IADW,MAAM,CAGf;IAEF,qBAAqB;IACrB,WADW,MAAM,CAGf;IAGJ,gEAqBC;IAED,6BAQC;IAPC;;;;;;MAAmC;IAGnC;;;MAAyC;IAM3C,uBAMC;IAFC;;;;;;;MAAsE;IAIxE;;;;;;;;;;;;;;;;;;;;SAqCC;CACF;qBApGmC,WAAW"}
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Generates a SQL expression for 1D pixel-level binning.
3
+ * Adjusts for scale transformations (log, sqrt, ...).
4
+ * Returns a [binExpression, field] array, where field is the
5
+ * input value being binned. Often the field is just a column
6
+ * name. For time data, fields are mapped to millisecond timestamps.
7
+ */
8
+ export function binExpr(mark: any, channel: any, n: any, extent: any, pad: number, expr: any): any[];
9
+ //# sourceMappingURL=bin-expr.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bin-expr.d.ts","sourceRoot":"","sources":["../../../../src/marks/util/bin-expr.js"],"names":[],"mappings":"AAGA;;;;;;GAMG;AACH,qGAcC"}
@@ -0,0 +1,2 @@
1
+ export function channelScale(mark: any, channel: any): import("@uwdata/mosaic-sql").Scale<any>;
2
+ //# sourceMappingURL=channel-scale.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"channel-scale.d.ts","sourceRoot":"","sources":["../../../../src/marks/util/channel-scale.js"],"names":[],"mappings":"AAEA,+FAuBC"}
@@ -0,0 +1,13 @@
1
+ export function dericheConfig(sigma: any, negative?: boolean): {
2
+ sigma: any;
3
+ negative: boolean;
4
+ a: Float64Array<ArrayBuffer>;
5
+ b_causal: Float64Array<ArrayBuffer>;
6
+ b_anticausal: Float64Array<ArrayBuffer>;
7
+ sum_causal: number;
8
+ sum_anticausal: number;
9
+ };
10
+ export function dericheConv2d(cx: any, cy: any, grid: any, [nx, ny]: [any, any]): Float64Array<any>;
11
+ export function dericheConv1d(c: any, src: any, N: any, stride?: number, y_causal?: Float64Array<any>, y_anticausal?: Float64Array<any>, h?: Float64Array<ArrayBuffer>, d?: Float64Array<any>, init?: typeof dericheInitZeroPad): Float64Array<any>;
12
+ export function dericheInitZeroPad(dest: any, src: any, N: any, stride: any, b: any, p: any, a: any, q: any, sum: any, h: any, sigma: any, tol?: number): void;
13
+ //# sourceMappingURL=density.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"density.d.ts","sourceRoot":"","sources":["../../../../src/marks/util/density.js"],"names":[],"mappings":"AAKA;;;;;;;;EA8BC;AA2DD,oGAoBC;AAED,oPA2EC;AAED,+JAmDC"}
@@ -0,0 +1,12 @@
1
+ export function plotExtent(mark: any, filter: any, channel: any, domainAttr: any, niceAttr: any): any;
2
+ export function extentX(mark: any, filter: any): any;
3
+ export function extentY(mark: any, filter: any): any;
4
+ export function filteredExtent(filter: any, column: any): undefined[];
5
+ export namespace xext {
6
+ let x: string[];
7
+ }
8
+ export namespace yext {
9
+ let y: string[];
10
+ }
11
+ export namespace xyext { }
12
+ //# sourceMappingURL=extent.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"extent.d.ts","sourceRoot":"","sources":["../../../../src/marks/util/extent.js"],"names":[],"mappings":"AAQA,sGAgBC;AAED,qDAEC;AAED,qDAEC;AAED,sEAgBC"}
@@ -0,0 +1,62 @@
1
+ /**
2
+ * @typedef {Array | Int8Array | Uint8Array | Uint8ClampedArray
3
+ * | Int16Array | Uint16Array | Int32Array | Uint32Array
4
+ * | Float32Array | Float64Array
5
+ * } Arrayish - an Array or TypedArray
6
+ */
7
+ /**
8
+ * Generate a new array with designated size and type.
9
+ * @param {number} size The size of the array
10
+ * @param {Arrayish} [proto] A prototype object of the desired array type.
11
+ * This may be a typed array or standard array (the default).
12
+ * @returns {Arrayish} The generated array.
13
+ */
14
+ export function array(size: number, proto?: Arrayish): Arrayish;
15
+ /**
16
+ * Create a 1D grid for the given sample values
17
+ * @param {number} size The grid size.
18
+ * @param {Arrayish} index The grid indices for sample points.
19
+ * @param {Arrayish} value The sample point values.
20
+ * @param {Record<string,Arrayish>} columns Named column arrays with groupby values.
21
+ * @param {string[]} groupby The names of columns to group by.
22
+ * @returns {{
23
+ * numRows: number;
24
+ * columns: { [key:string]: Arrayish }
25
+ * }} Named column arrays of generated grid values.
26
+ */
27
+ export function grid1d(size: number, index: Arrayish, value: Arrayish, columns: Record<string, Arrayish>, groupby: string[]): {
28
+ numRows: number;
29
+ columns: {
30
+ [key: string]: Arrayish;
31
+ };
32
+ };
33
+ /**
34
+ * Create a 2D grid for the given sample values.
35
+ * Can handle multiple grids and groupby values per output row.
36
+ * @param {number} w The grid width.
37
+ * @param {number} h The grid height.
38
+ * @param {Arrayish} index The grid indices for sample points.
39
+ * An index value is an integer of the form (y * w + x).
40
+ * @param {Record<string,Arrayish>} columns Named column arrays with sample point values.
41
+ * @param {string[]} aggregates The names of aggregate columns to grid.
42
+ * @param {string[]} groupby The names of additional columns to group by.
43
+ * @param {function} [interpolate] A grid interpolation function.
44
+ * By default sample values are directly copied to output grid arrays.
45
+ * @returns {{
46
+ * numRows: number;
47
+ * columns: { [key:string]: Arrayish }
48
+ * }} Named column arrays of generated grid values.
49
+ */
50
+ export function grid2d(w: number, h: number, index: Arrayish, columns: Record<string, Arrayish>, aggregates: string[], groupby: string[], interpolate?: Function): {
51
+ numRows: number;
52
+ columns: {
53
+ [key: string]: Arrayish;
54
+ };
55
+ };
56
+ export function gridDomainContinuous(grids: any): number[];
57
+ export function gridDomainDiscrete(grids: any): any[];
58
+ /**
59
+ * - an Array or TypedArray
60
+ */
61
+ export type Arrayish = any[] | Int8Array | Uint8Array | Uint8ClampedArray | Int16Array | Uint16Array | Int32Array | Uint32Array | Float32Array | Float64Array;
62
+ //# sourceMappingURL=grid.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"grid.d.ts","sourceRoot":"","sources":["../../../../src/marks/util/grid.js"],"names":[],"mappings":"AAEA;;;;;GAKG;AAEH;;;;;;GAMG;AACH,4BALW,MAAM,UACN,QAAQ,GAEN,QAAQ,CAKpB;AAED;;;;;;;;;;;GAWG;AACH,6BAVW,MAAM,SACN,QAAQ,SACR,QAAQ,WACR,MAAM,CAAC,MAAM,EAAC,QAAQ,CAAC,WACvB,MAAM,EAAE,GACN;IACT,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE;QAAE,CAAC,GAAG,EAAC,MAAM,GAAG,QAAQ,CAAA;KAAE,CAAA;CACnC,CAiCH;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,0BAdW,MAAM,KACN,MAAM,SACN,QAAQ,WAER,MAAM,CAAC,MAAM,EAAC,QAAQ,CAAC,cACvB,MAAM,EAAE,WACR,MAAM,EAAE,2BAGN;IACT,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE;QAAE,CAAC,GAAG,EAAC,MAAM,GAAG,QAAQ,CAAA;KAAE,CAAA;CACnC,CAkDH;AAED,2DAWC;AAED,sDAUC;;;;uBAzJY,QAAQ,SAAS,GAAG,UAAU,GAAG,iBAAiB,GACzD,UAAU,GAAG,WAAW,GAAG,UAAU,GAAG,WAAW,GACnD,YAAY,GAAG,YAAY"}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Utility to check if a value is a Param, and if so, bind a listener.
3
+ * @param {*} value A potentially Param-typed value.
4
+ * @param {(value: *) => Promise|void} update Update callback
5
+ * @returns the input value or (if a Param) the current Param value.
6
+ */
7
+ export function handleParam(value: any, update: (value: any) => Promise<any> | void): any;
8
+ //# sourceMappingURL=handle-param.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"handle-param.d.ts","sourceRoot":"","sources":["../../../../src/marks/util/handle-param.js"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH,mCAJW,GAAC,UACD,CAAC,KAAK,EAAE,GAAC,KAAK,eAAQ,IAAI,OAOpC"}
@@ -0,0 +1,2 @@
1
+ export function isColor(value: any): any;
2
+ //# sourceMappingURL=is-color.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"is-color.d.ts","sourceRoot":"","sources":["../../../../src/marks/util/is-color.js"],"names":[],"mappings":"AAUA,yCAUC"}
@@ -0,0 +1,2 @@
1
+ export function isConstantOption(value: any): boolean;
2
+ //# sourceMappingURL=is-constant-option.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"is-constant-option.d.ts","sourceRoot":"","sources":["../../../../src/marks/util/is-constant-option.js"],"names":[],"mappings":"AAyCA,sDAEC"}
@@ -0,0 +1,2 @@
1
+ export function isSymbol(value: any): boolean;
2
+ //# sourceMappingURL=is-symbol.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"is-symbol.d.ts","sourceRoot":"","sources":["../../../../src/marks/util/is-symbol.js"],"names":[],"mappings":"AAiBA,8CAEC"}
@@ -0,0 +1,3 @@
1
+ export function indices(length: any): number[];
2
+ export function permute(data: any, order: any): number[];
3
+ //# sourceMappingURL=permute.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"permute.d.ts","sourceRoot":"","sources":["../../../../src/marks/util/permute.js"],"names":[],"mappings":"AAAA,+CAEC;AAED,yDAKC"}
@@ -0,0 +1,7 @@
1
+ export function createCanvas(w: any, h: any): HTMLCanvasElement;
2
+ export function alphaConstant(v?: number): (data: any, w: any, h: any) => void;
3
+ export function alphaScheme(scale: any): (data: any, w: any, h: any, grid: any) => void;
4
+ export function colorConstant(v?: {}): (data: any, w: any, h: any) => void;
5
+ export function colorCategory(scale: any): (data: any, w: any, h: any, grid: any) => void;
6
+ export function colorScheme(size: any, scale: any, frac: any): (data: any, w: any, h: any, grid: any) => void;
7
+ //# sourceMappingURL=raster.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"raster.d.ts","sourceRoot":"","sources":["../../../../src/marks/util/raster.js"],"names":[],"mappings":"AAEA,gEAQC;AAED,4CAIU,SAAI,EAAE,MAAC,EAAE,MAAC,UAOnB;AAED,0CAIU,SAAI,EAAE,MAAC,EAAE,MAAC,EAAE,SAAI,UAOzB;AAED,wCAKU,SAAI,EAAE,MAAC,EAAE,MAAC,UAUnB;AAED,4CAoBU,SAAI,EAAE,MAAC,EAAE,MAAC,EAAE,SAAI,UAyBzB;AAED,gEAiBU,SAAI,EAAE,MAAC,EAAE,MAAC,EAAE,SAAI,UAWzB"}
@@ -0,0 +1,44 @@
1
+ /**
2
+ * ibetainv function
3
+ * @param {number} p
4
+ * @param {number} a
5
+ * @param {number} b
6
+ * @returns {number}
7
+ */
8
+ export function ibetainv(p: number, a: number, b: number): number;
9
+ /**
10
+ * ibeta function
11
+ * @param {number} x
12
+ * @param {number} a
13
+ * @param {number} b
14
+ * @returns {number}
15
+ */
16
+ export function ibeta(x: number, a: number, b: number): number;
17
+ /**
18
+ * betacf function
19
+ * @param {number} x
20
+ * @param {number} a
21
+ * @param {number} b
22
+ * @returns {number}
23
+ */
24
+ export function betacf(x: number, a: number, b: number): number;
25
+ /**
26
+ * gammaln function
27
+ * @param {number} x
28
+ * @returns {number}
29
+ */
30
+ export function gammaln(x: number): number;
31
+ /**
32
+ * qt function
33
+ * @param {number} p
34
+ * @param {number} dof
35
+ * @returns {number}
36
+ */
37
+ export function qt(p: number, dof: number): number;
38
+ /**
39
+ * Approximate inverse error function.
40
+ * @param {number} x
41
+ * @returns {number}
42
+ */
43
+ export function erfinv(x: number): number;
44
+ //# sourceMappingURL=stats.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stats.d.ts","sourceRoot":"","sources":["../../../../src/marks/util/stats.js"],"names":[],"mappings":"AAsBA;;;;;;GAMG;AACH,4BALW,MAAM,KACN,MAAM,KACN,MAAM,GACJ,MAAM,CAwClB;AAED;;;;;;GAMG;AACH,yBALW,MAAM,KACN,MAAM,KACN,MAAM,GACJ,MAAM,CAYlB;AAED;;;;;;GAMG;AACH,0BALW,MAAM,KACN,MAAM,KACN,MAAM,GACJ,MAAM,CAwClB;AAED;;;;GAIG;AACH,2BAHW,MAAM,GACJ,MAAM,CAclB;AAED;;;;;GAKG;AACH,sBAJW,MAAM,OACN,MAAM,GACJ,MAAM,CAMlB;AAED;;;;GAIG;AACH,0BAHW,MAAM,GACJ,MAAM,CAmFlB"}
@@ -0,0 +1,3 @@
1
+ export function setAttributes(attributes: any, spec: any, symbols: any): void;
2
+ export const attributeMap: Map<string, string>;
3
+ //# sourceMappingURL=plot-attributes.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plot-attributes.d.ts","sourceRoot":"","sources":["../../src/plot-attributes.js"],"names":[],"mappings":"AAgOA,8EAcC;AA9OD,+CAmNG"}
@@ -0,0 +1,3 @@
1
+ export function plotRenderer(plot: any): Promise<(SVGSVGElement | HTMLElement) & Plot.Plot>;
2
+ import * as Plot from '@observablehq/plot';
3
+ //# sourceMappingURL=plot-renderer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plot-renderer.d.ts","sourceRoot":"","sources":["../../src/plot-renderer.js"],"names":[],"mappings":"AA0BA,4FAyCC;sBAnEqB,oBAAoB"}
@@ -0,0 +1,70 @@
1
+ export class Plot {
2
+ /**
3
+ * @param {HTMLElement} [element]
4
+ */
5
+ constructor(element?: HTMLElement);
6
+ /** @type {Record<string, any>} */
7
+ attributes: Record<string, any>;
8
+ listeners: Map<any, any>;
9
+ interactors: any[];
10
+ /** @type {{ legend: import('./legend.js').Legend, include: boolean }[]} */
11
+ legends: {
12
+ legend: import("./legend.js").Legend;
13
+ include: boolean;
14
+ }[];
15
+ /** @type {import('./marks/Mark.js').Mark[]} */
16
+ marks: import("./marks/Mark.js").Mark[];
17
+ /** @type {Set<import('./marks/Mark.js').Mark> | null} */
18
+ markset: Set<import("./marks/Mark.js").Mark> | null;
19
+ /** @type {Map<import('@uwdata/mosaic-core').Param, import('./marks/Mark.js').Mark[]>} */
20
+ params: Map<import("@uwdata/mosaic-core").Param<any>, import("./marks/Mark.js").Mark[]>;
21
+ /** @type {Synchronizer} */
22
+ synch: Synchronizer;
23
+ /** @type {HTMLElement} */
24
+ element: HTMLElement;
25
+ margins(): {
26
+ left: any;
27
+ top: any;
28
+ bottom: any;
29
+ right: any;
30
+ };
31
+ innerWidth(): number;
32
+ innerHeight(defaultValue?: number): number;
33
+ pending(mark: any): void;
34
+ update(mark: any): Promise<void>;
35
+ pendingRender: boolean;
36
+ render(): Promise<void>;
37
+ /**
38
+ * @param {string} name The attribute to return.
39
+ * @returns {*} The value of the attribute.
40
+ */
41
+ getAttribute(name: string): any;
42
+ /**
43
+ * @param {string} name The name of the attribute to set.
44
+ * @param {*} value The value to set.
45
+ * @param {{silent: boolean}} [options] Options for setting the attribute.
46
+ * @returns {boolean} whether the value changed.
47
+ */
48
+ setAttribute(name: string, value: any, options?: {
49
+ silent: boolean;
50
+ }): boolean;
51
+ /**
52
+ * @param {string} name The attribute name.
53
+ * @param {*} callback The function to call when the attribute changes.
54
+ * @returns {this}
55
+ */
56
+ addAttributeListener(name: string, callback: any): this;
57
+ /**
58
+ * @param {string} name The attribute name.
59
+ * @param {*} callback The function to call when the attribute changes.
60
+ * @returns {void}
61
+ */
62
+ removeAttributeListener(name: string, callback: any): void;
63
+ addParams(mark: any, paramSet: any): void;
64
+ addMark(mark: any): this;
65
+ get markSet(): Set<import("./marks/Mark.js").Mark>;
66
+ addInteractor(sel: any): this;
67
+ addLegend(legend: any, include?: boolean): void;
68
+ }
69
+ import { Synchronizer } from '@uwdata/mosaic-core';
70
+ //# sourceMappingURL=plot.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plot.d.ts","sourceRoot":"","sources":["../../src/plot.js"],"names":[],"mappings":"AAWA;IACE;;OAEG;IACH,sBAFW,WAAW,EAuBrB;IApBC,kCAAkC;IAClC,YADW,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CACa;IAC3C,yBAAqB;IACrB,mBAAqB;IACrB,2EAA2E;IAC3E,SADW;QAAE,MAAM,EAAE,OAAO,aAAa,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,OAAO,CAAA;KAAE,EAAE,CACtD;IACjB,+CAA+C;IAC/C,OADW,OAAO,iBAAiB,EAAE,IAAI,EAAE,CAC5B;IACf,yDAAyD;IACzD,SADW,GAAG,CAAC,OAAO,iBAAiB,EAAE,IAAI,CAAC,GAAG,IAAI,CAClC;IACnB,yFAAyF;IACzF,QADW,GAAG,CAAC,wCAAmC,EAAE,OAAO,iBAAiB,EAAE,IAAI,EAAE,CAAC,CAChE;IACrB,2BAA2B;IAC3B,OADW,YAAY,CACQ;IAE/B,0BAA0B;IAC1B,SADW,WAAW,CACiC;IAMzD;;;;;MAOC;IAED,qBAGC;IAED,2CASC;IAED,yBAEC;IAED,iCAMC;IAJG,uBAAyB;IAM7B,wBASC;IAED;;;OAGG;IACH,mBAHW,MAAM,GACJ,GAAC,CAIb;IAED;;;;;OAKG;IACH,mBALW,MAAM,SACN,GAAC,YACD;QAAC,MAAM,EAAE,OAAO,CAAA;KAAC,GACf,OAAO,CAenB;IAED;;;;OAIG;IACH,2BAJW,MAAM,YACN,GAAC,GACC,IAAI,CAOhB;IAED;;;;OAIG;IACH,8BAJW,MAAM,YACN,GAAC,GACC,IAAI,CAIhB;IAED,0CAcC;IAED,yBAKC;IAED,mDAEC;IAED,8BAGC;IAED,gDAGC;CACF;6BA5KsC,qBAAqB"}
@@ -0,0 +1,4 @@
1
+ export const Fixed: unique symbol;
2
+ export const Transient: unique symbol;
3
+ export const Transform: unique symbol;
4
+ //# sourceMappingURL=symbols.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"symbols.d.ts","sourceRoot":"","sources":["../../src/symbols.js"],"names":[],"mappings":"AAAA,kCAAqC;AACrC,sCAA6C;AAC7C,sCAA6C"}