@uwdata/mosaic-spec 0.21.1 → 0.22.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.
- package/dist/src/ast/ASTNode.js +37 -0
- package/dist/src/ast/ASTNode.js.map +1 -0
- package/dist/src/ast/ColumnParamRefNode.js +18 -0
- package/dist/src/ast/ColumnParamRefNode.js.map +1 -0
- package/dist/src/ast/DataNode.js +255 -0
- package/dist/src/ast/DataNode.js.map +1 -0
- package/dist/src/ast/ExpressionNode.js +52 -0
- package/dist/src/ast/ExpressionNode.js.map +1 -0
- package/dist/src/ast/HConcatNode.js +24 -0
- package/dist/src/ast/HConcatNode.js.map +1 -0
- package/dist/src/ast/HSpaceNode.js +21 -0
- package/dist/src/ast/HSpaceNode.js.map +1 -0
- package/dist/src/ast/InputNode.js +29 -0
- package/dist/src/ast/InputNode.js.map +1 -0
- package/dist/src/ast/LiteralNode.js +18 -0
- package/dist/src/ast/LiteralNode.js.map +1 -0
- package/dist/src/ast/OptionsNode.js +45 -0
- package/dist/src/ast/OptionsNode.js.map +1 -0
- package/dist/src/ast/ParamNode.js +50 -0
- package/dist/src/ast/ParamNode.js.map +1 -0
- package/dist/src/ast/ParamRefNode.js +19 -0
- package/dist/src/ast/ParamRefNode.js.map +1 -0
- package/dist/src/ast/PlotAttributeNode.js +43 -0
- package/dist/src/ast/PlotAttributeNode.js.map +1 -0
- package/dist/src/ast/PlotFromNode.js +38 -0
- package/dist/src/ast/PlotFromNode.js.map +1 -0
- package/dist/src/ast/PlotInteractorNode.js +29 -0
- package/dist/src/ast/PlotInteractorNode.js.map +1 -0
- package/dist/src/ast/PlotLegendNode.js +31 -0
- package/dist/src/ast/PlotLegendNode.js.map +1 -0
- package/dist/src/ast/PlotMarkNode.js +68 -0
- package/dist/src/ast/PlotMarkNode.js.map +1 -0
- package/dist/src/ast/PlotNode.js +55 -0
- package/dist/src/ast/PlotNode.js.map +1 -0
- package/dist/src/ast/SelectionNode.js +52 -0
- package/dist/src/ast/SelectionNode.js.map +1 -0
- package/dist/src/ast/SpecNode.js +43 -0
- package/dist/src/ast/SpecNode.js.map +1 -0
- package/dist/src/ast/TransformNode.js +129 -0
- package/dist/src/ast/TransformNode.js.map +1 -0
- package/dist/src/ast/VConcatNode.js +24 -0
- package/dist/src/ast/VConcatNode.js.map +1 -0
- package/dist/src/ast/VSpaceNode.js +21 -0
- package/dist/src/ast/VSpaceNode.js.map +1 -0
- package/dist/src/ast/WindowFrameNode.js +54 -0
- package/dist/src/ast/WindowFrameNode.js.map +1 -0
- package/dist/src/ast-to-dom.js +68 -0
- package/dist/src/ast-to-dom.js.map +1 -0
- package/dist/src/ast-to-esm.js +180 -0
- package/dist/src/ast-to-esm.js.map +1 -0
- package/dist/src/config/components.js +25 -0
- package/dist/src/config/components.js.map +1 -0
- package/dist/src/config/extensions.js +21 -0
- package/dist/src/config/extensions.js.map +1 -0
- package/dist/src/config/inputs.js +14 -0
- package/dist/src/config/inputs.js.map +1 -0
- package/dist/src/config/plots.js +48 -0
- package/dist/src/config/plots.js.map +1 -0
- package/dist/src/config/transforms.js +57 -0
- package/dist/src/config/transforms.js.map +1 -0
- package/dist/src/constants.js +44 -0
- package/dist/src/constants.js.map +1 -0
- package/dist/src/index.d.ts +5 -8
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +26 -0
- package/dist/src/index.js.map +1 -0
- package/dist/src/parse-spec.js +148 -0
- package/dist/src/parse-spec.js.map +1 -0
- package/dist/src/spec/CSSStyles.js +2 -0
- package/dist/src/spec/CSSStyles.js.map +1 -0
- package/dist/src/spec/Data.js +2 -0
- package/dist/src/spec/Data.js.map +1 -0
- package/dist/src/spec/Expression.js +2 -0
- package/dist/src/spec/Expression.js.map +1 -0
- package/dist/src/spec/HConcat.js +2 -0
- package/dist/src/spec/HConcat.js.map +1 -0
- package/dist/src/spec/HSpace.js +2 -0
- package/dist/src/spec/HSpace.js.map +1 -0
- package/dist/src/spec/Input.js +2 -0
- package/dist/src/spec/Input.js.map +1 -0
- package/dist/src/spec/Interval.js +2 -0
- package/dist/src/spec/Interval.js.map +1 -0
- package/dist/src/spec/Param.js +2 -0
- package/dist/src/spec/Param.js.map +1 -0
- package/dist/src/spec/Plot.js +2 -0
- package/dist/src/spec/Plot.js.map +1 -0
- package/dist/src/spec/PlotAttribute.js +2 -0
- package/dist/src/spec/PlotAttribute.js.map +1 -0
- package/dist/src/spec/PlotFrom.js +2 -0
- package/dist/src/spec/PlotFrom.js.map +1 -0
- package/dist/src/spec/PlotInteractor.js +2 -0
- package/dist/src/spec/PlotInteractor.js.map +1 -0
- package/dist/src/spec/PlotLegend.js +2 -0
- package/dist/src/spec/PlotLegend.js.map +1 -0
- package/dist/src/spec/PlotMark.js +2 -0
- package/dist/src/spec/PlotMark.js.map +1 -0
- package/dist/src/spec/PlotTypes.js +2 -0
- package/dist/src/spec/PlotTypes.js.map +1 -0
- package/dist/src/spec/Spec.js +2 -0
- package/dist/src/spec/Spec.js.map +1 -0
- package/dist/src/spec/Transform.js +2 -0
- package/dist/src/spec/Transform.js.map +1 -0
- package/dist/src/spec/VConcat.js +2 -0
- package/dist/src/spec/VConcat.js.map +1 -0
- package/dist/src/spec/VSpace.js +2 -0
- package/dist/src/spec/VSpace.js.map +1 -0
- package/dist/src/spec/index.d.ts +22 -0
- package/dist/src/spec/index.d.ts.map +1 -0
- package/dist/src/spec/index.js +2 -0
- package/dist/src/spec/index.js.map +1 -0
- package/dist/src/spec/interactors/BrushStyles.js +2 -0
- package/dist/src/spec/interactors/BrushStyles.js.map +1 -0
- package/dist/src/spec/interactors/Highlight.js +2 -0
- package/dist/src/spec/interactors/Highlight.js.map +1 -0
- package/dist/src/spec/interactors/Interval1D.js +2 -0
- package/dist/src/spec/interactors/Interval1D.js.map +1 -0
- package/dist/src/spec/interactors/Interval2D.js +2 -0
- package/dist/src/spec/interactors/Interval2D.js.map +1 -0
- package/dist/src/spec/interactors/Nearest.js +2 -0
- package/dist/src/spec/interactors/Nearest.js.map +1 -0
- package/dist/src/spec/interactors/PanZoom.js +2 -0
- package/dist/src/spec/interactors/PanZoom.js.map +1 -0
- package/dist/src/spec/interactors/Region.js +2 -0
- package/dist/src/spec/interactors/Region.js.map +1 -0
- package/dist/src/spec/interactors/Toggle.js +2 -0
- package/dist/src/spec/interactors/Toggle.js.map +1 -0
- package/dist/src/spec/interactors/index.d.ts +9 -0
- package/dist/src/spec/interactors/index.d.ts.map +1 -0
- package/dist/src/spec/interactors/index.js +2 -0
- package/dist/src/spec/interactors/index.js.map +1 -0
- package/dist/src/spec/marks/Area.js +2 -0
- package/dist/src/spec/marks/Area.js.map +1 -0
- package/dist/src/spec/marks/Arrow.js +2 -0
- package/dist/src/spec/marks/Arrow.js.map +1 -0
- package/dist/src/spec/marks/Axis.js +2 -0
- package/dist/src/spec/marks/Axis.js.map +1 -0
- package/dist/src/spec/marks/Bar.js +2 -0
- package/dist/src/spec/marks/Bar.js.map +1 -0
- package/dist/src/spec/marks/Cell.js +2 -0
- package/dist/src/spec/marks/Cell.js.map +1 -0
- package/dist/src/spec/marks/Contour.js +2 -0
- package/dist/src/spec/marks/Contour.js.map +1 -0
- package/dist/src/spec/marks/Delaunay.js +2 -0
- package/dist/src/spec/marks/Delaunay.js.map +1 -0
- package/dist/src/spec/marks/DenseLine.js +2 -0
- package/dist/src/spec/marks/DenseLine.js.map +1 -0
- package/dist/src/spec/marks/Density.js +2 -0
- package/dist/src/spec/marks/Density.js.map +1 -0
- package/dist/src/spec/marks/Dot.js +2 -0
- package/dist/src/spec/marks/Dot.js.map +1 -0
- package/dist/src/spec/marks/ErrorBar.js +2 -0
- package/dist/src/spec/marks/ErrorBar.js.map +1 -0
- package/dist/src/spec/marks/Frame.js +2 -0
- package/dist/src/spec/marks/Frame.js.map +1 -0
- package/dist/src/spec/marks/Geo.js +2 -0
- package/dist/src/spec/marks/Geo.js.map +1 -0
- package/dist/src/spec/marks/Hexbin.js +2 -0
- package/dist/src/spec/marks/Hexbin.js.map +1 -0
- package/dist/src/spec/marks/Hexgrid.js +2 -0
- package/dist/src/spec/marks/Hexgrid.js.map +1 -0
- package/dist/src/spec/marks/Image.js +2 -0
- package/dist/src/spec/marks/Image.js.map +1 -0
- package/dist/src/spec/marks/Line.js +2 -0
- package/dist/src/spec/marks/Line.js.map +1 -0
- package/dist/src/spec/marks/Link.js +2 -0
- package/dist/src/spec/marks/Link.js.map +1 -0
- package/dist/src/spec/marks/Marks.js +2 -0
- package/dist/src/spec/marks/Marks.js.map +1 -0
- package/dist/src/spec/marks/Raster.js +2 -0
- package/dist/src/spec/marks/Raster.js.map +1 -0
- package/dist/src/spec/marks/Rect.js +2 -0
- package/dist/src/spec/marks/Rect.js.map +1 -0
- package/dist/src/spec/marks/Regression.js +2 -0
- package/dist/src/spec/marks/Regression.js.map +1 -0
- package/dist/src/spec/marks/Rule.js +2 -0
- package/dist/src/spec/marks/Rule.js.map +1 -0
- package/dist/src/spec/marks/Text.js +2 -0
- package/dist/src/spec/marks/Text.js.map +1 -0
- package/dist/src/spec/marks/Tick.js +2 -0
- package/dist/src/spec/marks/Tick.js.map +1 -0
- package/dist/src/spec/marks/Vector.js +2 -0
- package/dist/src/spec/marks/Vector.js.map +1 -0
- package/dist/src/spec/marks/Waffle.js +2 -0
- package/dist/src/spec/marks/Waffle.js.map +1 -0
- package/dist/src/spec/marks/index.d.ts +28 -0
- package/dist/src/spec/marks/index.d.ts.map +1 -0
- package/dist/src/spec/marks/index.js +2 -0
- package/dist/src/spec/marks/index.js.map +1 -0
- package/dist/src/util.js +45 -0
- package/dist/src/util.js.map +1 -0
- package/package.json +7 -7
- package/src/constants.js +32 -32
- package/src/index.ts +39 -0
- package/src/spec/index.ts +25 -0
- package/src/spec/interactors/index.ts +8 -0
- package/src/spec/marks/index.ts +27 -0
- package/src/index.js +0 -40
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Regression.js","sourceRoot":"","sources":["../../../../src/spec/marks/Regression.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Rule.js","sourceRoot":"","sources":["../../../../src/spec/marks/Rule.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Text.js","sourceRoot":"","sources":["../../../../src/spec/marks/Text.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Tick.js","sourceRoot":"","sources":["../../../../src/spec/marks/Tick.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Vector.js","sourceRoot":"","sources":["../../../../src/spec/marks/Vector.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Waffle.js","sourceRoot":"","sources":["../../../../src/spec/marks/Waffle.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export type * from "./Area.js";
|
|
2
|
+
export type * from "./Arrow.js";
|
|
3
|
+
export type * from "./Axis.js";
|
|
4
|
+
export type * from "./Bar.js";
|
|
5
|
+
export type * from "./Cell.js";
|
|
6
|
+
export type * from "./Contour.js";
|
|
7
|
+
export type * from "./Delaunay.js";
|
|
8
|
+
export type * from "./DenseLine.js";
|
|
9
|
+
export type * from "./Density.js";
|
|
10
|
+
export type * from "./Dot.js";
|
|
11
|
+
export type * from "./ErrorBar.js";
|
|
12
|
+
export type * from "./Frame.js";
|
|
13
|
+
export type * from "./Geo.js";
|
|
14
|
+
export type * from "./Hexbin.js";
|
|
15
|
+
export type * from "./Hexgrid.js";
|
|
16
|
+
export type * from "./Image.js";
|
|
17
|
+
export type * from "./Line.js";
|
|
18
|
+
export type * from "./Link.js";
|
|
19
|
+
export type * from "./Marks.js";
|
|
20
|
+
export type * from "./Raster.js";
|
|
21
|
+
export type * from "./Rect.js";
|
|
22
|
+
export type * from "./Regression.js";
|
|
23
|
+
export type * from "./Rule.js";
|
|
24
|
+
export type * from "./Text.js";
|
|
25
|
+
export type * from "./Tick.js";
|
|
26
|
+
export type * from "./Vector.js";
|
|
27
|
+
export type * from "./Waffle.js";
|
|
28
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/spec/marks/index.ts"],"names":[],"mappings":"AAAA,mBAAmB,WAAW,CAAC;AAC/B,mBAAmB,YAAY,CAAC;AAChC,mBAAmB,WAAW,CAAC;AAC/B,mBAAmB,UAAU,CAAC;AAC9B,mBAAmB,WAAW,CAAC;AAC/B,mBAAmB,cAAc,CAAC;AAClC,mBAAmB,eAAe,CAAC;AACnC,mBAAmB,gBAAgB,CAAC;AACpC,mBAAmB,cAAc,CAAC;AAClC,mBAAmB,UAAU,CAAC;AAC9B,mBAAmB,eAAe,CAAC;AACnC,mBAAmB,YAAY,CAAC;AAChC,mBAAmB,UAAU,CAAC;AAC9B,mBAAmB,aAAa,CAAC;AACjC,mBAAmB,cAAc,CAAC;AAClC,mBAAmB,YAAY,CAAC;AAChC,mBAAmB,WAAW,CAAC;AAC/B,mBAAmB,WAAW,CAAC;AAC/B,mBAAmB,YAAY,CAAC;AAChC,mBAAmB,aAAa,CAAC;AACjC,mBAAmB,WAAW,CAAC;AAC/B,mBAAmB,iBAAiB,CAAC;AACrC,mBAAmB,WAAW,CAAC;AAC/B,mBAAmB,WAAW,CAAC;AAC/B,mBAAmB,WAAW,CAAC;AAC/B,mBAAmB,aAAa,CAAC;AACjC,mBAAmB,aAAa,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/spec/marks/index.ts"],"names":[],"mappings":""}
|
package/dist/src/util.js
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
export function paramRef(value) {
|
|
2
|
+
const type = typeof value;
|
|
3
|
+
return type === 'object' ? value?.param
|
|
4
|
+
: type === 'string' ? paramStr(value)
|
|
5
|
+
: null;
|
|
6
|
+
}
|
|
7
|
+
export function paramStr(value) {
|
|
8
|
+
return value?.[0] === '$' ? value.slice(1) : null;
|
|
9
|
+
}
|
|
10
|
+
export function toParamRef(name) {
|
|
11
|
+
return `$${name}`;
|
|
12
|
+
}
|
|
13
|
+
export function toArray(value) {
|
|
14
|
+
return [value].flat();
|
|
15
|
+
}
|
|
16
|
+
export function isArray(value) {
|
|
17
|
+
return Array.isArray(value);
|
|
18
|
+
}
|
|
19
|
+
export function isObject(value) {
|
|
20
|
+
return value !== null && typeof value === 'object' && !isArray(value);
|
|
21
|
+
}
|
|
22
|
+
export function isNumber(value) {
|
|
23
|
+
return typeof value === 'number';
|
|
24
|
+
}
|
|
25
|
+
export function isNumberOrString(value) {
|
|
26
|
+
const t = typeof value;
|
|
27
|
+
return t === 'number' || t === 'string';
|
|
28
|
+
}
|
|
29
|
+
export function isString(value) {
|
|
30
|
+
return typeof value === 'string';
|
|
31
|
+
}
|
|
32
|
+
export function isFunction(value) {
|
|
33
|
+
return typeof value === 'function';
|
|
34
|
+
}
|
|
35
|
+
export function error(message, data) {
|
|
36
|
+
throw Object.assign(Error(message), { data });
|
|
37
|
+
}
|
|
38
|
+
const re = /^(?:[-+]\d{2})?\d{4}(?:-\d{2}(?:-\d{2})?)?(?:T\d{2}:\d{2}(?::\d{2}(?:\.\d{3})?)?(?:Z|[-+]\d{2}:?\d{2})?)?$/;
|
|
39
|
+
// adapted from https://github.com/mbostock/isoformat/
|
|
40
|
+
export function isoparse(string, fallback) {
|
|
41
|
+
if (!re.test(string += ''))
|
|
42
|
+
return fallback;
|
|
43
|
+
return new Date(string);
|
|
44
|
+
}
|
|
45
|
+
//# sourceMappingURL=util.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"util.js","sourceRoot":"","sources":["../../src/util.js"],"names":[],"mappings":"AAAA,MAAM,UAAU,QAAQ,CAAC,KAAK;IAC5B,MAAM,IAAI,GAAG,OAAO,KAAK,CAAC;IAC1B,OAAO,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,EAAE,KAAK;QACrC,CAAC,CAAC,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC;YACrC,CAAC,CAAC,IAAI,CAAC;AACX,CAAC;AAED,MAAM,UAAU,QAAQ,CAAC,KAAK;IAC5B,OAAO,KAAK,EAAE,CAAC,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;AACpD,CAAC;AAED,MAAM,UAAU,UAAU,CAAC,IAAI;IAC7B,OAAO,IAAI,IAAI,EAAE,CAAC;AACpB,CAAC;AAED,MAAM,UAAU,OAAO,CAAC,KAAK;IAC3B,OAAO,CAAC,KAAK,CAAC,CAAC,IAAI,EAAE,CAAC;AACxB,CAAC;AAED,MAAM,UAAU,OAAO,CAAC,KAAK;IAC3B,OAAO,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;AAC9B,CAAC;AAED,MAAM,UAAU,QAAQ,CAAC,KAAK;IAC5B,OAAO,KAAK,KAAK,IAAI,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;AACxE,CAAC;AAED,MAAM,UAAU,QAAQ,CAAC,KAAK;IAC5B,OAAO,OAAO,KAAK,KAAK,QAAQ,CAAC;AACnC,CAAC;AAED,MAAM,UAAU,gBAAgB,CAAC,KAAK;IACpC,MAAM,CAAC,GAAG,OAAO,KAAK,CAAC;IACvB,OAAO,CAAC,KAAK,QAAQ,IAAI,CAAC,KAAK,QAAQ,CAAC;AAC1C,CAAC;AAED,MAAM,UAAU,QAAQ,CAAC,KAAK;IAC5B,OAAO,OAAO,KAAK,KAAK,QAAQ,CAAC;AACnC,CAAC;AAED,MAAM,UAAU,UAAU,CAAC,KAAK;IAC9B,OAAO,OAAO,KAAK,KAAK,UAAU,CAAC;AACrC,CAAC;AAED,MAAM,UAAU,KAAK,CAAC,OAAO,EAAE,IAAI;IACjC,MAAM,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC;AAChD,CAAC;AAED,MAAM,EAAE,GAAG,4GAA4G,CAAC;AAExH,sDAAsD;AACtD,MAAM,UAAU,QAAQ,CAAC,MAAM,EAAE,QAAQ;IACvC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,MAAM,IAAI,EAAE,CAAC;QAAE,OAAO,QAAQ,CAAC;IAC5C,OAAO,IAAI,IAAI,CAAC,MAAM,CAAC,CAAC;AAC1B,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uwdata/mosaic-spec",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.22.0",
|
|
4
4
|
"description": "Declarative specification of Mosaic-powered applications.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"mosaic",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"type": "module",
|
|
15
15
|
"exports": {
|
|
16
16
|
"types": "./dist/src/index.d.ts",
|
|
17
|
-
"default": "./src/index.js"
|
|
17
|
+
"default": "./dist/src/index.js"
|
|
18
18
|
},
|
|
19
19
|
"files": [
|
|
20
20
|
"dist",
|
|
@@ -37,10 +37,10 @@
|
|
|
37
37
|
"prepublishOnly": "npm run test && npm run lint && npm run build"
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@uwdata/mosaic-core": "^0.
|
|
41
|
-
"@uwdata/mosaic-sql": "^0.
|
|
42
|
-
"@uwdata/vgplot": "^0.
|
|
43
|
-
"ts-json-schema-generator": "^2.
|
|
40
|
+
"@uwdata/mosaic-core": "^0.22.0",
|
|
41
|
+
"@uwdata/mosaic-sql": "^0.22.0",
|
|
42
|
+
"@uwdata/vgplot": "^0.22.0",
|
|
43
|
+
"ts-json-schema-generator": "^2.9.0"
|
|
44
44
|
},
|
|
45
|
-
"gitHead": "
|
|
45
|
+
"gitHead": "98e09fca9a7b58c51a46eca56e2c159dc4e544fb"
|
|
46
46
|
}
|
package/src/constants.js
CHANGED
|
@@ -1,53 +1,53 @@
|
|
|
1
1
|
// top-level spec
|
|
2
|
-
export const SPEC =
|
|
2
|
+
export const SPEC = "spec";
|
|
3
3
|
|
|
4
4
|
// literal values
|
|
5
|
-
export const LITERAL =
|
|
5
|
+
export const LITERAL = "literal";
|
|
6
6
|
|
|
7
7
|
// dataset identifier
|
|
8
|
-
export const DATAREF =
|
|
8
|
+
export const DATAREF = "dataref";
|
|
9
9
|
|
|
10
10
|
// options object
|
|
11
|
-
export const OPTIONS =
|
|
11
|
+
export const OPTIONS = "options";
|
|
12
12
|
|
|
13
13
|
// params and selections
|
|
14
|
-
export const SELECTION =
|
|
15
|
-
export const PARAMREF =
|
|
16
|
-
export const COLUMPARAMREF =
|
|
17
|
-
export const PARAM =
|
|
18
|
-
export const INCLUDE =
|
|
14
|
+
export const SELECTION = "selection";
|
|
15
|
+
export const PARAMREF = "paramref";
|
|
16
|
+
export const COLUMPARAMREF = "columnparamref";
|
|
17
|
+
export const PARAM = "param";
|
|
18
|
+
export const INCLUDE = "include";
|
|
19
19
|
|
|
20
20
|
// param and selection types
|
|
21
|
-
export const SELECT =
|
|
22
|
-
export const VALUE =
|
|
23
|
-
export const CROSSFILTER =
|
|
24
|
-
export const INTERSECT =
|
|
25
|
-
export const UNION =
|
|
26
|
-
export const SINGLE =
|
|
21
|
+
export const SELECT = "select";
|
|
22
|
+
export const VALUE = "value";
|
|
23
|
+
export const CROSSFILTER = "crossfilter";
|
|
24
|
+
export const INTERSECT = "intersect";
|
|
25
|
+
export const UNION = "union";
|
|
26
|
+
export const SINGLE = "single";
|
|
27
27
|
|
|
28
28
|
// data definitions
|
|
29
|
-
export const DATA =
|
|
29
|
+
export const DATA = "data";
|
|
30
30
|
|
|
31
31
|
// sql expressions
|
|
32
|
-
export const EXPRESSION =
|
|
33
|
-
export const SQL =
|
|
32
|
+
export const EXPRESSION = "expression";
|
|
33
|
+
export const SQL = "sql";
|
|
34
34
|
|
|
35
35
|
// inputs
|
|
36
|
-
export const INPUT =
|
|
36
|
+
export const INPUT = "input";
|
|
37
37
|
|
|
38
38
|
// layout
|
|
39
|
-
export const HCONCAT =
|
|
40
|
-
export const VCONCAT =
|
|
41
|
-
export const HSPACE =
|
|
42
|
-
export const VSPACE =
|
|
39
|
+
export const HCONCAT = "hconcat";
|
|
40
|
+
export const VCONCAT = "vconcat";
|
|
41
|
+
export const HSPACE = "hspace";
|
|
42
|
+
export const VSPACE = "vspace";
|
|
43
43
|
|
|
44
44
|
// vgplot
|
|
45
|
-
export const MARK =
|
|
46
|
-
export const FROM =
|
|
47
|
-
export const PLOT =
|
|
48
|
-
export const LEGEND =
|
|
49
|
-
export const ATTRIBUTE =
|
|
50
|
-
export const TRANSFORM =
|
|
51
|
-
export const WINDOW_FRAME =
|
|
52
|
-
export const INTERACTOR =
|
|
53
|
-
export const FIXED =
|
|
45
|
+
export const MARK = "mark";
|
|
46
|
+
export const FROM = "from";
|
|
47
|
+
export const PLOT = "plot";
|
|
48
|
+
export const LEGEND = "legend";
|
|
49
|
+
export const ATTRIBUTE = "attribute";
|
|
50
|
+
export const TRANSFORM = "transform";
|
|
51
|
+
export const WINDOW_FRAME = "windowframe";
|
|
52
|
+
export const INTERACTOR = "interactor";
|
|
53
|
+
export const FIXED = "Fixed";
|
package/src/index.ts
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
export { astToDOM, InstantiateContext } from "./ast-to-dom.js";
|
|
2
|
+
export { astToESM, CodegenContext } from "./ast-to-esm.js";
|
|
3
|
+
export { parseSpec } from "./parse-spec.js";
|
|
4
|
+
|
|
5
|
+
export * from "./constants.js";
|
|
6
|
+
export { ASTNode } from "./ast/ASTNode.js";
|
|
7
|
+
export {
|
|
8
|
+
DataNode,
|
|
9
|
+
QueryDataNode,
|
|
10
|
+
TableDataNode,
|
|
11
|
+
FileDataNode,
|
|
12
|
+
CSVDataNode,
|
|
13
|
+
JSONDataNode,
|
|
14
|
+
ParquetDataNode,
|
|
15
|
+
SpatialDataNode,
|
|
16
|
+
LiteralJSONDataNode,
|
|
17
|
+
} from "./ast/DataNode.js";
|
|
18
|
+
export { ExpressionNode } from "./ast/ExpressionNode.js";
|
|
19
|
+
export { HConcatNode } from "./ast/HConcatNode.js";
|
|
20
|
+
export { HSpaceNode } from "./ast/HSpaceNode.js";
|
|
21
|
+
export { InputNode } from "./ast/InputNode.js";
|
|
22
|
+
export { LiteralNode } from "./ast/LiteralNode.js";
|
|
23
|
+
export { OptionsNode } from "./ast/OptionsNode.js";
|
|
24
|
+
export { ParamNode } from "./ast/ParamNode.js";
|
|
25
|
+
export { ParamRefNode } from "./ast/ParamRefNode.js";
|
|
26
|
+
export { PlotAttributeNode, PlotFixedNode } from "./ast/PlotAttributeNode.js";
|
|
27
|
+
export { PlotFromNode } from "./ast/PlotFromNode.js";
|
|
28
|
+
export { PlotInteractorNode } from "./ast/PlotInteractorNode.js";
|
|
29
|
+
export { PlotLegendNode } from "./ast/PlotLegendNode.js";
|
|
30
|
+
export { PlotMarkNode } from "./ast/PlotMarkNode.js";
|
|
31
|
+
export { PlotNode } from "./ast/PlotNode.js";
|
|
32
|
+
export { SelectionNode } from "./ast/SelectionNode.js";
|
|
33
|
+
export { SpecNode } from "./ast/SpecNode.js";
|
|
34
|
+
export { TransformNode } from "./ast/TransformNode.js";
|
|
35
|
+
export { VConcatNode } from "./ast/VConcatNode.js";
|
|
36
|
+
export { VSpaceNode } from "./ast/VSpaceNode.js";
|
|
37
|
+
|
|
38
|
+
// Spec types
|
|
39
|
+
export type * from "./spec/index.js";
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export type * from "./CSSStyles.js";
|
|
2
|
+
export type * from "./Data.js";
|
|
3
|
+
export type * from "./Expression.js";
|
|
4
|
+
export type * from "./HConcat.js";
|
|
5
|
+
export type * from "./HSpace.js";
|
|
6
|
+
export type * from "./Input.js";
|
|
7
|
+
export type * from "./Interval.js";
|
|
8
|
+
export type * from "./Param.js";
|
|
9
|
+
export type * from "./Plot.js";
|
|
10
|
+
export type * from "./PlotAttribute.js";
|
|
11
|
+
export type * from "./PlotFrom.js";
|
|
12
|
+
export type * from "./PlotInteractor.js";
|
|
13
|
+
export type * from "./PlotLegend.js";
|
|
14
|
+
export type * from "./PlotMark.js";
|
|
15
|
+
export type * from "./PlotTypes.js";
|
|
16
|
+
export type * from "./Spec.js";
|
|
17
|
+
export type * from "./Transform.js";
|
|
18
|
+
export type * from "./VConcat.js";
|
|
19
|
+
export type * from "./VSpace.js";
|
|
20
|
+
|
|
21
|
+
// Marks
|
|
22
|
+
export type * from "./marks/index.js";
|
|
23
|
+
|
|
24
|
+
// Interactors
|
|
25
|
+
export type * from "./interactors/index.js";
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export type * from "./BrushStyles.js";
|
|
2
|
+
export type * from "./Highlight.js";
|
|
3
|
+
export type * from "./Interval1D.js";
|
|
4
|
+
export type * from "./Interval2D.js";
|
|
5
|
+
export type * from "./Nearest.js";
|
|
6
|
+
export type * from "./PanZoom.js";
|
|
7
|
+
export type * from "./Region.js";
|
|
8
|
+
export type * from "./Toggle.js";
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export type * from "./Area.js";
|
|
2
|
+
export type * from "./Arrow.js";
|
|
3
|
+
export type * from "./Axis.js";
|
|
4
|
+
export type * from "./Bar.js";
|
|
5
|
+
export type * from "./Cell.js";
|
|
6
|
+
export type * from "./Contour.js";
|
|
7
|
+
export type * from "./Delaunay.js";
|
|
8
|
+
export type * from "./DenseLine.js";
|
|
9
|
+
export type * from "./Density.js";
|
|
10
|
+
export type * from "./Dot.js";
|
|
11
|
+
export type * from "./ErrorBar.js";
|
|
12
|
+
export type * from "./Frame.js";
|
|
13
|
+
export type * from "./Geo.js";
|
|
14
|
+
export type * from "./Hexbin.js";
|
|
15
|
+
export type * from "./Hexgrid.js";
|
|
16
|
+
export type * from "./Image.js";
|
|
17
|
+
export type * from "./Line.js";
|
|
18
|
+
export type * from "./Link.js";
|
|
19
|
+
export type * from "./Marks.js";
|
|
20
|
+
export type * from "./Raster.js";
|
|
21
|
+
export type * from "./Rect.js";
|
|
22
|
+
export type * from "./Regression.js";
|
|
23
|
+
export type * from "./Rule.js";
|
|
24
|
+
export type * from "./Text.js";
|
|
25
|
+
export type * from "./Tick.js";
|
|
26
|
+
export type * from "./Vector.js";
|
|
27
|
+
export type * from "./Waffle.js";
|
package/src/index.js
DELETED
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @typedef {import('./spec/Spec.js').Spec} Spec A Mosaic declarative specification.
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
export { astToDOM, InstantiateContext } from './ast-to-dom.js';
|
|
6
|
-
export { astToESM, CodegenContext } from './ast-to-esm.js';
|
|
7
|
-
export { parseSpec } from './parse-spec.js';
|
|
8
|
-
|
|
9
|
-
export * from './constants.js';
|
|
10
|
-
export { ASTNode } from './ast/ASTNode.js';
|
|
11
|
-
export {
|
|
12
|
-
DataNode,
|
|
13
|
-
QueryDataNode,
|
|
14
|
-
TableDataNode,
|
|
15
|
-
FileDataNode,
|
|
16
|
-
CSVDataNode,
|
|
17
|
-
JSONDataNode,
|
|
18
|
-
ParquetDataNode,
|
|
19
|
-
SpatialDataNode,
|
|
20
|
-
LiteralJSONDataNode
|
|
21
|
-
} from './ast/DataNode.js';
|
|
22
|
-
export { ExpressionNode } from './ast/ExpressionNode.js';
|
|
23
|
-
export { HConcatNode } from './ast/HConcatNode.js';
|
|
24
|
-
export { HSpaceNode } from './ast/HSpaceNode.js';
|
|
25
|
-
export { InputNode } from './ast/InputNode.js';
|
|
26
|
-
export { LiteralNode } from './ast/LiteralNode.js';
|
|
27
|
-
export { OptionsNode } from './ast/OptionsNode.js';
|
|
28
|
-
export { ParamNode } from './ast/ParamNode.js';
|
|
29
|
-
export { ParamRefNode } from './ast/ParamRefNode.js';
|
|
30
|
-
export { PlotAttributeNode, PlotFixedNode } from './ast/PlotAttributeNode.js';
|
|
31
|
-
export { PlotFromNode } from './ast/PlotFromNode.js';
|
|
32
|
-
export { PlotInteractorNode } from './ast/PlotInteractorNode.js';
|
|
33
|
-
export { PlotLegendNode } from './ast/PlotLegendNode.js';
|
|
34
|
-
export { PlotMarkNode } from './ast/PlotMarkNode.js';
|
|
35
|
-
export { PlotNode } from './ast/PlotNode.js';
|
|
36
|
-
export { SelectionNode } from './ast/SelectionNode.js';
|
|
37
|
-
export { SpecNode } from './ast/SpecNode.js';
|
|
38
|
-
export { TransformNode } from './ast/TransformNode.js';
|
|
39
|
-
export { VConcatNode } from './ast/VConcatNode.js';
|
|
40
|
-
export { VSpaceNode } from './ast/VSpaceNode.js';
|