@uwdata/mosaic-spec 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.
- package/LICENSE +47 -0
- package/README.md +1 -1
- package/dist/mosaic-schema.json +201085 -0
- package/dist/src/ast/ASTNode.d.ts +27 -0
- package/dist/src/ast/ASTNode.d.ts.map +1 -0
- package/dist/src/ast/ColumnParamRefNode.d.ts +9 -0
- package/dist/src/ast/ColumnParamRefNode.d.ts.map +1 -0
- package/dist/src/ast/DataNode.d.ts +61 -0
- package/dist/src/ast/DataNode.d.ts.map +1 -0
- package/dist/src/ast/ExpressionNode.d.ts +14 -0
- package/dist/src/ast/ExpressionNode.d.ts.map +1 -0
- package/dist/src/ast/HConcatNode.d.ts +11 -0
- package/dist/src/ast/HConcatNode.d.ts.map +1 -0
- package/dist/src/ast/HSpaceNode.d.ts +12 -0
- package/dist/src/ast/HSpaceNode.d.ts.map +1 -0
- package/dist/src/ast/InputNode.d.ts +9 -0
- package/dist/src/ast/InputNode.d.ts.map +1 -0
- package/dist/src/ast/LiteralNode.d.ts +8 -0
- package/dist/src/ast/LiteralNode.d.ts.map +1 -0
- package/dist/src/ast/OptionsNode.d.ts +11 -0
- package/dist/src/ast/OptionsNode.d.ts.map +1 -0
- package/dist/src/ast/ParamNode.d.ts +9 -0
- package/dist/src/ast/ParamNode.d.ts.map +1 -0
- package/dist/src/ast/ParamRefNode.d.ts +9 -0
- package/dist/src/ast/ParamRefNode.d.ts.map +1 -0
- package/dist/src/ast/PlotAttributeNode.d.ts +19 -0
- package/dist/src/ast/PlotAttributeNode.d.ts.map +1 -0
- package/dist/src/ast/PlotFromNode.d.ts +10 -0
- package/dist/src/ast/PlotFromNode.d.ts.map +1 -0
- package/dist/src/ast/PlotInteractorNode.d.ts +9 -0
- package/dist/src/ast/PlotInteractorNode.d.ts.map +1 -0
- package/dist/src/ast/PlotLegendNode.d.ts +11 -0
- package/dist/src/ast/PlotLegendNode.d.ts.map +1 -0
- package/dist/src/ast/PlotMarkNode.d.ts +11 -0
- package/dist/src/ast/PlotMarkNode.d.ts.map +1 -0
- package/dist/src/ast/PlotNode.d.ts +12 -0
- package/dist/src/ast/PlotNode.d.ts.map +1 -0
- package/dist/src/ast/SelectionNode.d.ts +25 -0
- package/dist/src/ast/SelectionNode.d.ts.map +1 -0
- package/dist/src/ast/SpecNode.d.ts +11 -0
- package/dist/src/ast/SpecNode.d.ts.map +1 -0
- package/dist/src/ast/TransformNode.d.ts +22 -0
- package/dist/src/ast/TransformNode.d.ts.map +1 -0
- package/dist/src/ast/VConcatNode.d.ts +11 -0
- package/dist/src/ast/VConcatNode.d.ts.map +1 -0
- package/dist/src/ast/VSpaceNode.d.ts +12 -0
- package/dist/src/ast/VSpaceNode.d.ts.map +1 -0
- package/dist/src/ast/WindowFrameNode.d.ts +16 -0
- package/dist/src/ast/WindowFrameNode.d.ts.map +1 -0
- package/dist/src/ast-to-dom.d.ts +41 -0
- package/dist/src/ast-to-dom.d.ts.map +1 -0
- package/dist/src/ast-to-esm.d.ts +65 -0
- package/dist/src/ast-to-esm.d.ts.map +1 -0
- package/dist/src/config/components.d.ts +5 -0
- package/dist/src/config/components.d.ts.map +1 -0
- package/dist/src/config/extensions.d.ts +10 -0
- package/dist/src/config/extensions.d.ts.map +1 -0
- package/dist/src/config/inputs.d.ts +6 -0
- package/dist/src/config/inputs.d.ts.map +1 -0
- package/dist/src/config/plots.d.ts +35 -0
- package/dist/src/config/plots.d.ts.map +1 -0
- package/dist/src/config/transforms.d.ts +5 -0
- package/dist/src/config/transforms.d.ts.map +1 -0
- package/dist/src/constants.d.ts +33 -0
- package/dist/src/constants.d.ts.map +1 -0
- package/dist/src/index.d.ts +30 -0
- package/dist/src/index.d.ts.map +1 -0
- package/dist/src/parse-spec.d.ts +112 -0
- package/dist/src/parse-spec.d.ts.map +1 -0
- package/dist/src/spec/CSSStyles.d.ts +4 -0
- package/dist/src/spec/CSSStyles.d.ts.map +1 -0
- package/dist/src/spec/Data.d.ts +166 -0
- package/dist/src/spec/Data.d.ts.map +1 -0
- package/dist/src/spec/Expression.d.ts +28 -0
- package/dist/src/spec/Expression.d.ts.map +1 -0
- package/dist/src/spec/HConcat.d.ts +9 -0
- package/dist/src/spec/HConcat.d.ts.map +1 -0
- package/dist/src/spec/HSpace.d.ts +10 -0
- package/dist/src/spec/HSpace.d.ts.map +1 -0
- package/dist/src/spec/Input.d.ts +213 -0
- package/dist/src/spec/Input.d.ts.map +1 -0
- package/dist/src/spec/Interval.d.ts +59 -0
- package/dist/src/spec/Interval.d.ts.map +1 -0
- package/dist/src/spec/Param.d.ts +64 -0
- package/dist/src/spec/Param.d.ts.map +1 -0
- package/dist/src/spec/Plot.d.ts +15 -0
- package/dist/src/spec/Plot.d.ts.map +1 -0
- package/dist/src/spec/PlotAttribute.d.ts +1535 -0
- package/dist/src/spec/PlotAttribute.d.ts.map +1 -0
- package/dist/src/spec/PlotFrom.d.ts +21 -0
- package/dist/src/spec/PlotFrom.d.ts.map +1 -0
- package/dist/src/spec/PlotInteractor.d.ts +10 -0
- package/dist/src/spec/PlotInteractor.d.ts.map +1 -0
- package/dist/src/spec/PlotLegend.d.ts +69 -0
- package/dist/src/spec/PlotLegend.d.ts.map +1 -0
- package/dist/src/spec/PlotMark.d.ts +29 -0
- package/dist/src/spec/PlotMark.d.ts.map +1 -0
- package/dist/src/spec/PlotTypes.d.ts +294 -0
- package/dist/src/spec/PlotTypes.d.ts.map +1 -0
- package/dist/src/spec/Spec.d.ts +53 -0
- package/dist/src/spec/Spec.d.ts.map +1 -0
- package/dist/src/spec/Transform.d.ts +393 -0
- package/dist/src/spec/Transform.d.ts.map +1 -0
- package/dist/src/spec/VConcat.d.ts +9 -0
- package/dist/src/spec/VConcat.d.ts.map +1 -0
- package/dist/src/spec/VSpace.d.ts +10 -0
- package/dist/src/spec/VSpace.d.ts.map +1 -0
- package/dist/src/spec/interactors/BrushStyles.d.ts +28 -0
- package/dist/src/spec/interactors/BrushStyles.d.ts.map +1 -0
- package/dist/src/spec/interactors/Highlight.d.ts +38 -0
- package/dist/src/spec/interactors/Highlight.d.ts.map +1 -0
- package/dist/src/spec/interactors/Interval1D.d.ts +43 -0
- package/dist/src/spec/interactors/Interval1D.d.ts.map +1 -0
- package/dist/src/spec/interactors/Interval2D.d.ts +48 -0
- package/dist/src/spec/interactors/Interval2D.d.ts.map +1 -0
- package/dist/src/spec/interactors/Nearest.d.ts +45 -0
- package/dist/src/spec/interactors/Nearest.d.ts.map +1 -0
- package/dist/src/spec/interactors/PanZoom.d.ts +59 -0
- package/dist/src/spec/interactors/PanZoom.d.ts.map +1 -0
- package/dist/src/spec/interactors/Region.d.ts +33 -0
- package/dist/src/spec/interactors/Region.d.ts.map +1 -0
- package/dist/src/spec/interactors/Toggle.d.ts +60 -0
- package/dist/src/spec/interactors/Toggle.d.ts.map +1 -0
- package/dist/src/spec/marks/Area.d.ts +140 -0
- package/dist/src/spec/marks/Area.d.ts.map +1 -0
- package/dist/src/spec/marks/Arrow.d.ts +95 -0
- package/dist/src/spec/marks/Arrow.d.ts.map +1 -0
- package/dist/src/spec/marks/Axis.d.ts +282 -0
- package/dist/src/spec/marks/Axis.d.ts.map +1 -0
- package/dist/src/spec/marks/Bar.d.ts +151 -0
- package/dist/src/spec/marks/Bar.d.ts.map +1 -0
- package/dist/src/spec/marks/Cell.d.ts +58 -0
- package/dist/src/spec/marks/Cell.d.ts.map +1 -0
- package/dist/src/spec/marks/Contour.d.ts +24 -0
- package/dist/src/spec/marks/Contour.d.ts.map +1 -0
- package/dist/src/spec/marks/Delaunay.d.ts +87 -0
- package/dist/src/spec/marks/Delaunay.d.ts.map +1 -0
- package/dist/src/spec/marks/DenseLine.d.ts +28 -0
- package/dist/src/spec/marks/DenseLine.d.ts.map +1 -0
- package/dist/src/spec/marks/Density.d.ts +137 -0
- package/dist/src/spec/marks/Density.d.ts.map +1 -0
- package/dist/src/spec/marks/Dot.d.ts +134 -0
- package/dist/src/spec/marks/Dot.d.ts.map +1 -0
- package/dist/src/spec/marks/ErrorBar.d.ts +83 -0
- package/dist/src/spec/marks/ErrorBar.d.ts.map +1 -0
- package/dist/src/spec/marks/Frame.d.ts +22 -0
- package/dist/src/spec/marks/Frame.d.ts.map +1 -0
- package/dist/src/spec/marks/Geo.d.ts +54 -0
- package/dist/src/spec/marks/Geo.d.ts.map +1 -0
- package/dist/src/spec/marks/Hexbin.d.ts +31 -0
- package/dist/src/spec/marks/Hexbin.d.ts.map +1 -0
- package/dist/src/spec/marks/Hexgrid.d.ts +26 -0
- package/dist/src/spec/marks/Hexgrid.d.ts.map +1 -0
- package/dist/src/spec/marks/Image.d.ts +90 -0
- package/dist/src/spec/marks/Image.d.ts.map +1 -0
- package/dist/src/spec/marks/Line.d.ts +83 -0
- package/dist/src/spec/marks/Line.d.ts.map +1 -0
- package/dist/src/spec/marks/Link.d.ts +61 -0
- package/dist/src/spec/marks/Link.d.ts.map +1 -0
- package/dist/src/spec/marks/Marks.d.ts +911 -0
- package/dist/src/spec/marks/Marks.d.ts.map +1 -0
- package/dist/src/spec/marks/Raster.d.ts +125 -0
- package/dist/src/spec/marks/Raster.d.ts.map +1 -0
- package/dist/src/spec/marks/Rect.d.ts +167 -0
- package/dist/src/spec/marks/Rect.d.ts.map +1 -0
- package/dist/src/spec/marks/Regression.d.ts +59 -0
- package/dist/src/spec/marks/Regression.d.ts.map +1 -0
- package/dist/src/spec/marks/Rule.d.ts +101 -0
- package/dist/src/spec/marks/Rule.d.ts.map +1 -0
- package/dist/src/spec/marks/Text.d.ts +111 -0
- package/dist/src/spec/marks/Text.d.ts.map +1 -0
- package/dist/src/spec/marks/Tick.d.ts +62 -0
- package/dist/src/spec/marks/Tick.d.ts.map +1 -0
- package/dist/src/spec/marks/Vector.d.ts +100 -0
- package/dist/src/spec/marks/Vector.d.ts.map +1 -0
- package/dist/src/spec/marks/Waffle.d.ts +59 -0
- package/dist/src/spec/marks/Waffle.d.ts.map +1 -0
- package/dist/src/util.d.ts +13 -0
- package/dist/src/util.d.ts.map +1 -0
- package/package.json +18 -10
- package/tsconfig.json +0 -13
- package/vitest.config.ts +0 -3
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { ChannelValueSpec, InsetOptions, MarkData, MarkOptions, MarkerOptions } from './Marks.js';
|
|
2
|
+
/** Options for the tickX mark. */
|
|
3
|
+
export interface TickXOptions extends MarkOptions, MarkerOptions, Omit<InsetOptions, 'insetLeft' | 'insetRight'> {
|
|
4
|
+
/**
|
|
5
|
+
* The required horizontal position of the tick; a channel typically bound to
|
|
6
|
+
* the *x* scale.
|
|
7
|
+
*/
|
|
8
|
+
x?: ChannelValueSpec;
|
|
9
|
+
/**
|
|
10
|
+
* The optional vertical position of the tick; an ordinal channel typically
|
|
11
|
+
* bound to the *y* scale. If not specified, the tick spans the vertical
|
|
12
|
+
* extent of the frame; otherwise the *y* scale must be a *band* scale.
|
|
13
|
+
*
|
|
14
|
+
* If *y* represents quantitative or temporal values, use a ruleX mark
|
|
15
|
+
* instead.
|
|
16
|
+
*/
|
|
17
|
+
y?: ChannelValueSpec;
|
|
18
|
+
}
|
|
19
|
+
/** Options for the tickY mark. */
|
|
20
|
+
export interface TickYOptions extends MarkOptions, MarkerOptions, Omit<InsetOptions, 'insetTop' | 'insetBottom'> {
|
|
21
|
+
/**
|
|
22
|
+
* The required vertical position of the tick; a channel typically bound to
|
|
23
|
+
* the *y* scale.
|
|
24
|
+
*/
|
|
25
|
+
y?: ChannelValueSpec;
|
|
26
|
+
/**
|
|
27
|
+
* The optional horizontal position of the tick; an ordinal channel typically
|
|
28
|
+
* bound to the *x* scale. If not specified, the tick spans the horizontal
|
|
29
|
+
* extent of the frame; otherwise the *x* scale must be a *band* scale.
|
|
30
|
+
*
|
|
31
|
+
* If *x* represents quantitative or temporal values, use a ruleY mark
|
|
32
|
+
* instead.
|
|
33
|
+
*/
|
|
34
|
+
x?: ChannelValueSpec;
|
|
35
|
+
}
|
|
36
|
+
/** The tickX mark. */
|
|
37
|
+
export interface TickX extends MarkData, TickXOptions {
|
|
38
|
+
/**
|
|
39
|
+
* A horizontally-positioned tickX mark (a vertical line, |). The **x**
|
|
40
|
+
* channel specifies the tick’s horizontal position and defaults to identity,
|
|
41
|
+
* assuming that *data* = [*x₀*, *x₁*, *x₂*, …]; the optional **y** ordinal
|
|
42
|
+
* channel specifies its vertical position.
|
|
43
|
+
*
|
|
44
|
+
* If *y* represents quantitative or temporal values, use a ruleX mark
|
|
45
|
+
* instead.
|
|
46
|
+
*/
|
|
47
|
+
mark: 'tickX';
|
|
48
|
+
}
|
|
49
|
+
/** The tickY mark. */
|
|
50
|
+
export interface TickY extends MarkData, TickYOptions {
|
|
51
|
+
/**
|
|
52
|
+
* A vertically-positioned tickY mark (a horizontal line, —). The **y**
|
|
53
|
+
* channel specifies the tick's vertical position and defaults to identity,
|
|
54
|
+
* assuming that *data* = [*y₀*, *y₁*, *y₂*, …]; the optional **x** ordinal
|
|
55
|
+
* channel specifies its horizontal position.
|
|
56
|
+
*
|
|
57
|
+
* If *x* represents quantitative or temporal values, use a ruleY mark
|
|
58
|
+
* instead.
|
|
59
|
+
*/
|
|
60
|
+
mark: 'tickY';
|
|
61
|
+
}
|
|
62
|
+
//# sourceMappingURL=Tick.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Tick.d.ts","sourceRoot":"","sources":["../../../../src/spec/marks/Tick.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,EAAE,YAAY,EAAE,QAAQ,EAAE,WAAW,EAAE,aAAa,EACrE,MAAM,YAAY,CAAC;AAEpB,kCAAkC;AAClC,MAAM,WAAW,YAAa,SAAQ,WAAW,EAAE,aAAa,EAAE,IAAI,CAAC,YAAY,EAAE,WAAW,GAAG,YAAY,CAAC;IAC9G;;;OAGG;IACH,CAAC,CAAC,EAAE,gBAAgB,CAAC;IAErB;;;;;;;OAOG;IACH,CAAC,CAAC,EAAE,gBAAgB,CAAC;CACtB;AAED,kCAAkC;AAClC,MAAM,WAAW,YAAa,SAAQ,WAAW,EAAE,aAAa,EAAE,IAAI,CAAC,YAAY,EAAE,UAAU,GAAG,aAAa,CAAC;IAC9G;;;OAGG;IACH,CAAC,CAAC,EAAE,gBAAgB,CAAC;IAErB;;;;;;;OAOG;IACH,CAAC,CAAC,EAAE,gBAAgB,CAAC;CACtB;AAED,sBAAsB;AACtB,MAAM,WAAW,KAAM,SAAQ,QAAQ,EAAE,YAAY;IACnD;;;;;;;;OAQG;IACH,IAAI,EAAE,OAAO,CAAC;CACf;AAED,sBAAsB;AACtB,MAAM,WAAW,KAAM,SAAQ,QAAQ,EAAE,YAAY;IACnD;;;;;;;;OAQG;IACH,IAAI,EAAE,OAAO,CAAC;CACf"}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import { ParamRef } from '../Param.js';
|
|
2
|
+
import { FrameAnchor } from '../PlotTypes.js';
|
|
3
|
+
import { ChannelValue, ChannelValueSpec, MarkData, MarkOptions } from './Marks.js';
|
|
4
|
+
/**
|
|
5
|
+
* The built-in vector shape implementations; one of:
|
|
6
|
+
*
|
|
7
|
+
* - *arrow* - a straight line with an open arrowhead at the end (↑)
|
|
8
|
+
* - *spike* - an isosceles triangle with a flat base (▲)
|
|
9
|
+
*/
|
|
10
|
+
export type VectorShapeName = 'arrow' | 'spike';
|
|
11
|
+
/** How to draw a vector: either a named shape or a custom implementation. */
|
|
12
|
+
export type VectorShape = VectorShapeName;
|
|
13
|
+
/** Options for the vector mark. */
|
|
14
|
+
export interface VectorOptions extends MarkOptions {
|
|
15
|
+
/**
|
|
16
|
+
* The horizontal position of the vector’s anchor point; an optional channel
|
|
17
|
+
* bound to the *x* scale. Default depends on the **frameAnchor**.
|
|
18
|
+
*/
|
|
19
|
+
x?: ChannelValueSpec;
|
|
20
|
+
/**
|
|
21
|
+
* The vertical position of the vector’s anchor point; an optional channel
|
|
22
|
+
* bound to the *y* scale. Default depends on the **frameAnchor**.
|
|
23
|
+
*/
|
|
24
|
+
y?: ChannelValueSpec;
|
|
25
|
+
/**
|
|
26
|
+
* The vector shape’s radius, such as half the width of the *arrow*’s head or
|
|
27
|
+
* the *spike*’s base; a constant number in pixels. Defaults to 3.5 pixels.
|
|
28
|
+
*/
|
|
29
|
+
r?: number | ParamRef;
|
|
30
|
+
/**
|
|
31
|
+
* The vector’s length; either an optional channel bound to the *length* scale
|
|
32
|
+
* or a constant number in pixels. Defaults to 12 pixels.
|
|
33
|
+
*/
|
|
34
|
+
length?: ChannelValueSpec;
|
|
35
|
+
/**
|
|
36
|
+
* The vector’s orientation (rotation angle); either a constant number in
|
|
37
|
+
* degrees clockwise, or an optional channel (with no associated scale).
|
|
38
|
+
* Defaults to 0 degrees with the vector pointing up.
|
|
39
|
+
*/
|
|
40
|
+
rotate?: ChannelValue;
|
|
41
|
+
/** The shape of the vector; a constant. Defaults to *arrow*. */
|
|
42
|
+
shape?: VectorShape | ParamRef;
|
|
43
|
+
/**
|
|
44
|
+
* The vector’s position along its orientation relative to its anchor point; a
|
|
45
|
+
* constant. Assuming a default **rotate** angle of 0°, one of:
|
|
46
|
+
*
|
|
47
|
+
* - *start* - from [*x*, *y*] to [*x*, *y* - *l*]
|
|
48
|
+
* - *middle* (default) - from [*x*, *y* + *l* / 2] to [*x*, *y* - *l* / 2]
|
|
49
|
+
* - *end* - from [*x*, *y* + *l*] to [*x*, *y*]
|
|
50
|
+
*
|
|
51
|
+
* where [*x*, *y*] is the vector’s anchor point and *l* is the vector’s
|
|
52
|
+
* (possibly scaled) length in pixels.
|
|
53
|
+
*/
|
|
54
|
+
anchor?: 'start' | 'middle' | 'end' | ParamRef;
|
|
55
|
+
/**
|
|
56
|
+
* The vector’s frame anchor, to default **x** and **y** relative to the
|
|
57
|
+
* frame; a constant representing one of the frame corners (*top-left*,
|
|
58
|
+
* *top-right*, *bottom-right*, *bottom-left*), sides (*top*, *right*,
|
|
59
|
+
* *bottom*, *left*), or *middle* (default). Has no effect if both **x**
|
|
60
|
+
* and **y** are specified.
|
|
61
|
+
*/
|
|
62
|
+
frameAnchor?: FrameAnchor | ParamRef;
|
|
63
|
+
}
|
|
64
|
+
/** The vector mark. */
|
|
65
|
+
export interface Vector extends MarkData, VectorOptions {
|
|
66
|
+
/**
|
|
67
|
+
* A vector mark.
|
|
68
|
+
*
|
|
69
|
+
* If none of **frameAnchor**, **x**, and **y** are specified, then **x** and
|
|
70
|
+
* **y** default to accessors assuming that *data* contains tuples [[*x₀*,
|
|
71
|
+
* *y₀*], [*x₁*, *y₁*], [*x₂*, *y₂*], …]
|
|
72
|
+
*/
|
|
73
|
+
mark: 'vector';
|
|
74
|
+
}
|
|
75
|
+
/** The vectorX mark. */
|
|
76
|
+
export interface VectorX extends MarkData, VectorOptions {
|
|
77
|
+
/**
|
|
78
|
+
* Like vector, but **x** instead defaults to the identity function and **y**
|
|
79
|
+
* defaults to null, assuming that *data* is an array of numbers [*x₀*, *x₁*,
|
|
80
|
+
* *x₂*, …].
|
|
81
|
+
*/
|
|
82
|
+
mark: 'vectorX';
|
|
83
|
+
}
|
|
84
|
+
/** The vectorY mark. */
|
|
85
|
+
export interface VectorY extends MarkData, VectorOptions {
|
|
86
|
+
/**
|
|
87
|
+
* Like vector, but **y** instead defaults to the identity function and **x**
|
|
88
|
+
* defaults to null, assuming that *data* is an array of numbers [*y₀*, *y₁*,
|
|
89
|
+
* *y₂*, …].
|
|
90
|
+
*/
|
|
91
|
+
mark: 'vectorY';
|
|
92
|
+
}
|
|
93
|
+
/** The spike mark. */
|
|
94
|
+
export interface Spike extends MarkData, VectorOptions {
|
|
95
|
+
/**
|
|
96
|
+
* Like vector, but with default *options* suitable for drawing a spike map.
|
|
97
|
+
*/
|
|
98
|
+
mark: 'spike';
|
|
99
|
+
}
|
|
100
|
+
//# sourceMappingURL=Vector.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Vector.d.ts","sourceRoot":"","sources":["../../../../src/spec/marks/Vector.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAEnF;;;;;GAKG;AACH,MAAM,MAAM,eAAe,GAAG,OAAO,GAAG,OAAO,CAAC;AAEhD,6EAA6E;AAC7E,MAAM,MAAM,WAAW,GAAG,eAAe,CAAC;AAE1C,mCAAmC;AACnC,MAAM,WAAW,aAAc,SAAQ,WAAW;IAChD;;;OAGG;IACH,CAAC,CAAC,EAAE,gBAAgB,CAAC;IAErB;;;OAGG;IACH,CAAC,CAAC,EAAE,gBAAgB,CAAC;IAErB;;;OAGG;IACH,CAAC,CAAC,EAAE,MAAM,GAAG,QAAQ,CAAC;IAEtB;;;OAGG;IACH,MAAM,CAAC,EAAE,gBAAgB,CAAC;IAE1B;;;;OAIG;IACH,MAAM,CAAC,EAAE,YAAY,CAAC;IAEtB,gEAAgE;IAChE,KAAK,CAAC,EAAE,WAAW,GAAG,QAAQ,CAAC;IAE/B;;;;;;;;;;OAUG;IACH,MAAM,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,KAAK,GAAG,QAAQ,CAAC;IAE/C;;;;;;OAMG;IACH,WAAW,CAAC,EAAE,WAAW,GAAG,QAAQ,CAAC;CACtC;AAED,uBAAuB;AACvB,MAAM,WAAW,MAAO,SAAQ,QAAQ,EAAE,aAAa;IACrD;;;;;;OAMG;IACH,IAAI,EAAE,QAAQ,CAAC;CAChB;AAED,wBAAwB;AACxB,MAAM,WAAW,OAAQ,SAAQ,QAAQ,EAAE,aAAa;IACtD;;;;OAIG;IACH,IAAI,EAAE,SAAS,CAAC;CACjB;AAED,wBAAwB;AACxB,MAAM,WAAW,OAAQ,SAAQ,QAAQ,EAAE,aAAa;IACtD;;;;OAIG;IACH,IAAI,EAAE,SAAS,CAAC;CACjB;AAED,sBAAsB;AACtB,MAAM,WAAW,KAAM,SAAQ,QAAQ,EAAE,aAAa;IACpD;;OAEG;IACH,IAAI,EAAE,OAAO,CAAC;CACf"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { ParamRef } from '../Param.js';
|
|
2
|
+
import { BarXOptions, BarYOptions } from './Bar.js';
|
|
3
|
+
import { MarkData } from './Marks.js';
|
|
4
|
+
/** Options for the waffleX and waffleY mark. */
|
|
5
|
+
export interface WaffleOptions {
|
|
6
|
+
/** The number of cells per row or column; defaults to undefined for automatic. */
|
|
7
|
+
multiple?: number | ParamRef;
|
|
8
|
+
/** The quantity each cell represents; defaults to 1. */
|
|
9
|
+
unit?: number | ParamRef;
|
|
10
|
+
/** The gap in pixels between cells; defaults to 1. */
|
|
11
|
+
gap?: number | ParamRef;
|
|
12
|
+
/** If true, round to integers to avoid partial cells. */
|
|
13
|
+
round?: boolean | ParamRef;
|
|
14
|
+
}
|
|
15
|
+
/** The waffleX mark. */
|
|
16
|
+
export interface WaffleX extends MarkData, BarXOptions, WaffleOptions {
|
|
17
|
+
/**
|
|
18
|
+
* A horizontal waffle mark. The required *x* values should be quantitative,
|
|
19
|
+
* and the optional *y* values should be ordinal.
|
|
20
|
+
*
|
|
21
|
+
* If neither **x1** nor **x2** nor **interval** is specified, an implicit
|
|
22
|
+
* stackX transform is applied and **x** defaults to the identity function,
|
|
23
|
+
* assuming that *data* = [*x₀*, *x₁*, *x₂*, …]. Otherwise if an **interval**
|
|
24
|
+
* is specified, then **x1** and **x2** are derived from **x**, representing
|
|
25
|
+
* the lower and upper bound of the containing interval, respectively.
|
|
26
|
+
* Otherwise, if only one of **x1** or **x2** is specified, the other
|
|
27
|
+
* defaults to **x**, which defaults to zero.
|
|
28
|
+
*
|
|
29
|
+
* The optional **y** ordinal channel specifies the vertical position; it is
|
|
30
|
+
* typically bound to the *y* scale, which must be a *band* scale. If the
|
|
31
|
+
* **y** channel is not specified, the bar will span the vertical extent of
|
|
32
|
+
* the plot’s frame. Because a waffle represents a discrete number of square
|
|
33
|
+
* cells, it may not use all of the available bandwidth.
|
|
34
|
+
*/
|
|
35
|
+
mark: 'waffleX';
|
|
36
|
+
}
|
|
37
|
+
/** The waffleY mark. */
|
|
38
|
+
export interface WaffleY extends MarkData, BarYOptions, WaffleOptions {
|
|
39
|
+
/**
|
|
40
|
+
* A vertical waffle mark. The required *y* values should be quantitative,
|
|
41
|
+
* and the optional *x* values should be ordinal.
|
|
42
|
+
*
|
|
43
|
+
* If neither **y1** nor **y2** nor **interval** is specified, an implicit
|
|
44
|
+
* stackY transform is applied and **y** defaults to the identity function,
|
|
45
|
+
* assuming that *data* = [*y₀*, *y₁*, *y₂*, …]. Otherwise if an **interval**
|
|
46
|
+
* is specified, then **y1** and **y2** are derived from **y**, representing
|
|
47
|
+
* the lower and upper bound of the containing interval, respectively.
|
|
48
|
+
* Otherwise, if only one of **y1** or **y2** is specified, the other
|
|
49
|
+
* defaults to **y**, which defaults to zero.
|
|
50
|
+
*
|
|
51
|
+
* The optional **x** ordinal channel specifies the horizontal position; it
|
|
52
|
+
* is typically bound to the *x* scale, which must be a *band* scale. If the
|
|
53
|
+
* **x** channel is not specified, the bar will span the horizontal extent of
|
|
54
|
+
* the plot’s frame. Because a waffle represents a discrete number of square
|
|
55
|
+
* cells, it may not use all of the available bandwidth.
|
|
56
|
+
*/
|
|
57
|
+
mark: 'waffleY';
|
|
58
|
+
}
|
|
59
|
+
//# sourceMappingURL=Waffle.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Waffle.d.ts","sourceRoot":"","sources":["../../../../src/spec/marks/Waffle.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC,gDAAgD;AAChD,MAAM,WAAW,aAAa;IAC5B,kFAAkF;IAClF,QAAQ,CAAC,EAAE,MAAM,GAAG,QAAQ,CAAC;IAC7B,wDAAwD;IACxD,IAAI,CAAC,EAAE,MAAM,GAAG,QAAQ,CAAC;IACzB,sDAAsD;IACtD,GAAG,CAAC,EAAE,MAAM,GAAG,QAAQ,CAAC;IACxB,yDAAyD;IACzD,KAAK,CAAC,EAAE,OAAO,GAAG,QAAQ,CAAC;CAC5B;AAED,wBAAwB;AACxB,MAAM,WAAW,OAAQ,SAAQ,QAAQ,EAAE,WAAW,EAAE,aAAa;IACnE;;;;;;;;;;;;;;;;;OAiBG;IACH,IAAI,EAAE,SAAS,CAAC;CACjB;AAED,wBAAwB;AACxB,MAAM,WAAW,OAAQ,SAAQ,QAAQ,EAAE,WAAW,EAAE,aAAa;IACnE;;;;;;;;;;;;;;;;;OAiBG;IACH,IAAI,EAAE,SAAS,CAAC;CACjB"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export function paramRef(value: any): any;
|
|
2
|
+
export function paramStr(value: any): any;
|
|
3
|
+
export function toParamRef(name: any): string;
|
|
4
|
+
export function toArray(value: any): any[];
|
|
5
|
+
export function isArray(value: any): value is any[];
|
|
6
|
+
export function isObject(value: any): boolean;
|
|
7
|
+
export function isNumber(value: any): value is number;
|
|
8
|
+
export function isNumberOrString(value: any): boolean;
|
|
9
|
+
export function isString(value: any): value is string;
|
|
10
|
+
export function isFunction(value: any): boolean;
|
|
11
|
+
export function error(message: any, data: any): void;
|
|
12
|
+
export function isoparse(string: any, fallback: any): any;
|
|
13
|
+
//# sourceMappingURL=util.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"util.d.ts","sourceRoot":"","sources":["../../src/util.js"],"names":[],"mappings":"AAAA,0CAKC;AAED,0CAEC;AAED,8CAEC;AAED,2CAEC;AAED,oDAEC;AAED,8CAEC;AAED,sDAEC;AAED,sDAGC;AAED,sDAEC;AAED,gDAEC;AAED,qDAEC;AAKD,0DAGC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uwdata/mosaic-spec",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.18.0",
|
|
4
4
|
"description": "Declarative specification of Mosaic-powered applications.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"mosaic",
|
|
@@ -16,23 +16,31 @@
|
|
|
16
16
|
"types": "./dist/src/index.d.ts",
|
|
17
17
|
"default": "./src/index.js"
|
|
18
18
|
},
|
|
19
|
+
"files": [
|
|
20
|
+
"dist",
|
|
21
|
+
"!dist/tsconfig.tsbuildinfo",
|
|
22
|
+
"src"
|
|
23
|
+
],
|
|
19
24
|
"repository": {
|
|
20
25
|
"type": "git",
|
|
21
26
|
"url": "https://github.com/uwdata/mosaic.git"
|
|
22
27
|
},
|
|
23
28
|
"scripts": {
|
|
24
|
-
"
|
|
25
|
-
"
|
|
29
|
+
"clean": "rimraf dist && mkdir dist",
|
|
30
|
+
"prebuild": "npm run clean",
|
|
31
|
+
"build": "npm run schema",
|
|
26
32
|
"lint": "eslint src test",
|
|
33
|
+
"preschema": "tsc --build",
|
|
27
34
|
"schema": "ts-json-schema-generator -f tsconfig.json -p src/spec/Spec.ts -t Spec --no-type-check --no-ref-encode --functions hide > dist/mosaic-schema.json",
|
|
28
|
-
"test": "
|
|
29
|
-
"version": "cd
|
|
35
|
+
"test": "npm run schema && vitest run",
|
|
36
|
+
"version": "cd ../../.. && npm run docs:schema",
|
|
30
37
|
"prepublishOnly": "npm run test && npm run lint && npm run build"
|
|
31
38
|
},
|
|
32
39
|
"dependencies": {
|
|
33
|
-
"@uwdata/mosaic-core": "^0.
|
|
34
|
-
"@uwdata/mosaic-sql": "^0.
|
|
35
|
-
"@uwdata/vgplot": "^0.
|
|
36
|
-
"ts-json-schema-generator": "^2.
|
|
37
|
-
}
|
|
40
|
+
"@uwdata/mosaic-core": "^0.18.0",
|
|
41
|
+
"@uwdata/mosaic-sql": "^0.18.0",
|
|
42
|
+
"@uwdata/vgplot": "^0.18.0",
|
|
43
|
+
"ts-json-schema-generator": "^2.4.0"
|
|
44
|
+
},
|
|
45
|
+
"gitHead": "dfb9ded0b0307754e3185ca34cc49a1384fe8455"
|
|
38
46
|
}
|
package/tsconfig.json
DELETED
package/vitest.config.ts
DELETED