@uwdata/mosaic-spec 0.17.0 → 0.19.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 (191) hide show
  1. package/LICENSE +47 -0
  2. package/README.md +1 -1
  3. package/dist/mosaic-schema.json +201110 -0
  4. package/dist/src/ast/ASTNode.d.ts +27 -0
  5. package/dist/src/ast/ASTNode.d.ts.map +1 -0
  6. package/dist/src/ast/ColumnParamRefNode.d.ts +9 -0
  7. package/dist/src/ast/ColumnParamRefNode.d.ts.map +1 -0
  8. package/dist/src/ast/DataNode.d.ts +61 -0
  9. package/dist/src/ast/DataNode.d.ts.map +1 -0
  10. package/dist/src/ast/ExpressionNode.d.ts +14 -0
  11. package/dist/src/ast/ExpressionNode.d.ts.map +1 -0
  12. package/dist/src/ast/HConcatNode.d.ts +11 -0
  13. package/dist/src/ast/HConcatNode.d.ts.map +1 -0
  14. package/dist/src/ast/HSpaceNode.d.ts +12 -0
  15. package/dist/src/ast/HSpaceNode.d.ts.map +1 -0
  16. package/dist/src/ast/InputNode.d.ts +9 -0
  17. package/dist/src/ast/InputNode.d.ts.map +1 -0
  18. package/dist/src/ast/LiteralNode.d.ts +8 -0
  19. package/dist/src/ast/LiteralNode.d.ts.map +1 -0
  20. package/dist/src/ast/OptionsNode.d.ts +11 -0
  21. package/dist/src/ast/OptionsNode.d.ts.map +1 -0
  22. package/dist/src/ast/ParamNode.d.ts +9 -0
  23. package/dist/src/ast/ParamNode.d.ts.map +1 -0
  24. package/dist/src/ast/ParamRefNode.d.ts +9 -0
  25. package/dist/src/ast/ParamRefNode.d.ts.map +1 -0
  26. package/dist/src/ast/PlotAttributeNode.d.ts +19 -0
  27. package/dist/src/ast/PlotAttributeNode.d.ts.map +1 -0
  28. package/dist/src/ast/PlotFromNode.d.ts +10 -0
  29. package/dist/src/ast/PlotFromNode.d.ts.map +1 -0
  30. package/dist/src/ast/PlotInteractorNode.d.ts +9 -0
  31. package/dist/src/ast/PlotInteractorNode.d.ts.map +1 -0
  32. package/dist/src/ast/PlotLegendNode.d.ts +11 -0
  33. package/dist/src/ast/PlotLegendNode.d.ts.map +1 -0
  34. package/dist/src/ast/PlotMarkNode.d.ts +11 -0
  35. package/dist/src/ast/PlotMarkNode.d.ts.map +1 -0
  36. package/dist/src/ast/PlotNode.d.ts +12 -0
  37. package/dist/src/ast/PlotNode.d.ts.map +1 -0
  38. package/dist/src/ast/SelectionNode.d.ts +25 -0
  39. package/dist/src/ast/SelectionNode.d.ts.map +1 -0
  40. package/dist/src/ast/SpecNode.d.ts +11 -0
  41. package/dist/src/ast/SpecNode.d.ts.map +1 -0
  42. package/dist/src/ast/TransformNode.d.ts +22 -0
  43. package/dist/src/ast/TransformNode.d.ts.map +1 -0
  44. package/dist/src/ast/VConcatNode.d.ts +11 -0
  45. package/dist/src/ast/VConcatNode.d.ts.map +1 -0
  46. package/dist/src/ast/VSpaceNode.d.ts +12 -0
  47. package/dist/src/ast/VSpaceNode.d.ts.map +1 -0
  48. package/dist/src/ast/WindowFrameNode.d.ts +16 -0
  49. package/dist/src/ast/WindowFrameNode.d.ts.map +1 -0
  50. package/dist/src/ast-to-dom.d.ts +41 -0
  51. package/dist/src/ast-to-dom.d.ts.map +1 -0
  52. package/dist/src/ast-to-esm.d.ts +65 -0
  53. package/dist/src/ast-to-esm.d.ts.map +1 -0
  54. package/dist/src/config/components.d.ts +5 -0
  55. package/dist/src/config/components.d.ts.map +1 -0
  56. package/dist/src/config/extensions.d.ts +10 -0
  57. package/dist/src/config/extensions.d.ts.map +1 -0
  58. package/dist/src/config/inputs.d.ts +6 -0
  59. package/dist/src/config/inputs.d.ts.map +1 -0
  60. package/dist/src/config/plots.d.ts +35 -0
  61. package/dist/src/config/plots.d.ts.map +1 -0
  62. package/dist/src/config/transforms.d.ts +5 -0
  63. package/dist/src/config/transforms.d.ts.map +1 -0
  64. package/dist/src/constants.d.ts +33 -0
  65. package/dist/src/constants.d.ts.map +1 -0
  66. package/dist/src/index.d.ts +30 -0
  67. package/dist/src/index.d.ts.map +1 -0
  68. package/dist/src/parse-spec.d.ts +112 -0
  69. package/dist/src/parse-spec.d.ts.map +1 -0
  70. package/dist/src/spec/CSSStyles.d.ts +4 -0
  71. package/dist/src/spec/CSSStyles.d.ts.map +1 -0
  72. package/dist/src/spec/Data.d.ts +166 -0
  73. package/dist/src/spec/Data.d.ts.map +1 -0
  74. package/dist/src/spec/Expression.d.ts +28 -0
  75. package/dist/src/spec/Expression.d.ts.map +1 -0
  76. package/dist/src/spec/HConcat.d.ts +9 -0
  77. package/dist/src/spec/HConcat.d.ts.map +1 -0
  78. package/dist/src/spec/HSpace.d.ts +10 -0
  79. package/dist/src/spec/HSpace.d.ts.map +1 -0
  80. package/dist/src/spec/Input.d.ts +218 -0
  81. package/dist/src/spec/Input.d.ts.map +1 -0
  82. package/dist/src/spec/Interval.d.ts +59 -0
  83. package/dist/src/spec/Interval.d.ts.map +1 -0
  84. package/dist/src/spec/Param.d.ts +64 -0
  85. package/dist/src/spec/Param.d.ts.map +1 -0
  86. package/dist/src/spec/Plot.d.ts +15 -0
  87. package/dist/src/spec/Plot.d.ts.map +1 -0
  88. package/dist/src/spec/PlotAttribute.d.ts +1535 -0
  89. package/dist/src/spec/PlotAttribute.d.ts.map +1 -0
  90. package/dist/src/spec/PlotFrom.d.ts +21 -0
  91. package/dist/src/spec/PlotFrom.d.ts.map +1 -0
  92. package/dist/src/spec/PlotInteractor.d.ts +10 -0
  93. package/dist/src/spec/PlotInteractor.d.ts.map +1 -0
  94. package/dist/src/spec/PlotLegend.d.ts +69 -0
  95. package/dist/src/spec/PlotLegend.d.ts.map +1 -0
  96. package/dist/src/spec/PlotMark.d.ts +29 -0
  97. package/dist/src/spec/PlotMark.d.ts.map +1 -0
  98. package/dist/src/spec/PlotTypes.d.ts +294 -0
  99. package/dist/src/spec/PlotTypes.d.ts.map +1 -0
  100. package/dist/src/spec/Spec.d.ts +53 -0
  101. package/dist/src/spec/Spec.d.ts.map +1 -0
  102. package/dist/src/spec/Transform.d.ts +393 -0
  103. package/dist/src/spec/Transform.d.ts.map +1 -0
  104. package/dist/src/spec/VConcat.d.ts +9 -0
  105. package/dist/src/spec/VConcat.d.ts.map +1 -0
  106. package/dist/src/spec/VSpace.d.ts +10 -0
  107. package/dist/src/spec/VSpace.d.ts.map +1 -0
  108. package/dist/src/spec/interactors/BrushStyles.d.ts +28 -0
  109. package/dist/src/spec/interactors/BrushStyles.d.ts.map +1 -0
  110. package/dist/src/spec/interactors/Highlight.d.ts +38 -0
  111. package/dist/src/spec/interactors/Highlight.d.ts.map +1 -0
  112. package/dist/src/spec/interactors/Interval1D.d.ts +43 -0
  113. package/dist/src/spec/interactors/Interval1D.d.ts.map +1 -0
  114. package/dist/src/spec/interactors/Interval2D.d.ts +48 -0
  115. package/dist/src/spec/interactors/Interval2D.d.ts.map +1 -0
  116. package/dist/src/spec/interactors/Nearest.d.ts +45 -0
  117. package/dist/src/spec/interactors/Nearest.d.ts.map +1 -0
  118. package/dist/src/spec/interactors/PanZoom.d.ts +59 -0
  119. package/dist/src/spec/interactors/PanZoom.d.ts.map +1 -0
  120. package/dist/src/spec/interactors/Region.d.ts +33 -0
  121. package/dist/src/spec/interactors/Region.d.ts.map +1 -0
  122. package/dist/src/spec/interactors/Toggle.d.ts +60 -0
  123. package/dist/src/spec/interactors/Toggle.d.ts.map +1 -0
  124. package/dist/src/spec/marks/Area.d.ts +140 -0
  125. package/dist/src/spec/marks/Area.d.ts.map +1 -0
  126. package/dist/src/spec/marks/Arrow.d.ts +95 -0
  127. package/dist/src/spec/marks/Arrow.d.ts.map +1 -0
  128. package/dist/src/spec/marks/Axis.d.ts +282 -0
  129. package/dist/src/spec/marks/Axis.d.ts.map +1 -0
  130. package/dist/src/spec/marks/Bar.d.ts +151 -0
  131. package/dist/src/spec/marks/Bar.d.ts.map +1 -0
  132. package/dist/src/spec/marks/Cell.d.ts +58 -0
  133. package/dist/src/spec/marks/Cell.d.ts.map +1 -0
  134. package/dist/src/spec/marks/Contour.d.ts +24 -0
  135. package/dist/src/spec/marks/Contour.d.ts.map +1 -0
  136. package/dist/src/spec/marks/Delaunay.d.ts +87 -0
  137. package/dist/src/spec/marks/Delaunay.d.ts.map +1 -0
  138. package/dist/src/spec/marks/DenseLine.d.ts +28 -0
  139. package/dist/src/spec/marks/DenseLine.d.ts.map +1 -0
  140. package/dist/src/spec/marks/Density.d.ts +137 -0
  141. package/dist/src/spec/marks/Density.d.ts.map +1 -0
  142. package/dist/src/spec/marks/Dot.d.ts +134 -0
  143. package/dist/src/spec/marks/Dot.d.ts.map +1 -0
  144. package/dist/src/spec/marks/ErrorBar.d.ts +83 -0
  145. package/dist/src/spec/marks/ErrorBar.d.ts.map +1 -0
  146. package/dist/src/spec/marks/Frame.d.ts +22 -0
  147. package/dist/src/spec/marks/Frame.d.ts.map +1 -0
  148. package/dist/src/spec/marks/Geo.d.ts +54 -0
  149. package/dist/src/spec/marks/Geo.d.ts.map +1 -0
  150. package/dist/src/spec/marks/Hexbin.d.ts +31 -0
  151. package/dist/src/spec/marks/Hexbin.d.ts.map +1 -0
  152. package/dist/src/spec/marks/Hexgrid.d.ts +26 -0
  153. package/dist/src/spec/marks/Hexgrid.d.ts.map +1 -0
  154. package/dist/src/spec/marks/Image.d.ts +90 -0
  155. package/dist/src/spec/marks/Image.d.ts.map +1 -0
  156. package/dist/src/spec/marks/Line.d.ts +83 -0
  157. package/dist/src/spec/marks/Line.d.ts.map +1 -0
  158. package/dist/src/spec/marks/Link.d.ts +61 -0
  159. package/dist/src/spec/marks/Link.d.ts.map +1 -0
  160. package/dist/src/spec/marks/Marks.d.ts +911 -0
  161. package/dist/src/spec/marks/Marks.d.ts.map +1 -0
  162. package/dist/src/spec/marks/Raster.d.ts +125 -0
  163. package/dist/src/spec/marks/Raster.d.ts.map +1 -0
  164. package/dist/src/spec/marks/Rect.d.ts +167 -0
  165. package/dist/src/spec/marks/Rect.d.ts.map +1 -0
  166. package/dist/src/spec/marks/Regression.d.ts +59 -0
  167. package/dist/src/spec/marks/Regression.d.ts.map +1 -0
  168. package/dist/src/spec/marks/Rule.d.ts +101 -0
  169. package/dist/src/spec/marks/Rule.d.ts.map +1 -0
  170. package/dist/src/spec/marks/Text.d.ts +111 -0
  171. package/dist/src/spec/marks/Text.d.ts.map +1 -0
  172. package/dist/src/spec/marks/Tick.d.ts +62 -0
  173. package/dist/src/spec/marks/Tick.d.ts.map +1 -0
  174. package/dist/src/spec/marks/Vector.d.ts +100 -0
  175. package/dist/src/spec/marks/Vector.d.ts.map +1 -0
  176. package/dist/src/spec/marks/Waffle.d.ts +59 -0
  177. package/dist/src/spec/marks/Waffle.d.ts.map +1 -0
  178. package/dist/src/util.d.ts +13 -0
  179. package/dist/src/util.d.ts.map +1 -0
  180. package/package.json +18 -10
  181. package/src/spec/Data.ts +2 -2
  182. package/src/spec/Expression.ts +1 -1
  183. package/src/spec/Input.ts +6 -1
  184. package/src/spec/Spec.ts +1 -1
  185. package/src/spec/Transform.ts +3 -3
  186. package/src/spec/interactors/Interval1D.ts +1 -1
  187. package/src/spec/interactors/Interval2D.ts +1 -1
  188. package/src/spec/interactors/Toggle.ts +5 -5
  189. package/src/spec/marks/ErrorBar.ts +2 -2
  190. package/tsconfig.json +0 -13
  191. package/vitest.config.ts +0 -3
@@ -0,0 +1,59 @@
1
+ import { ParamRef } from '../Param.js';
2
+ /** Options for pan/zoom interactors. */
3
+ export interface PanZoomOptions {
4
+ /**
5
+ * The output selection for the `x` domain.
6
+ * A clause of the form `field BETWEEN x1 AND x2` is added for the
7
+ * current pan/zom interval [x1, x2].
8
+ */
9
+ x?: ParamRef;
10
+ /**
11
+ * The output selection for the `y` domain.
12
+ * A clause of the form `field BETWEEN y1 AND y2` is added for the
13
+ * current pan/zom interval [y1, y2].
14
+ */
15
+ y?: ParamRef;
16
+ /**
17
+ * The name of the field (database column) over which the `x`-component
18
+ * of the pan/zoom interval should be defined. If unspecified, the `x`
19
+ * channel field of the first valid prior mark definition is used.
20
+ */
21
+ xfield?: string;
22
+ /**
23
+ * The name of the field (database column) over which the `y`-component
24
+ * of the pan/zoom interval should be defined. If unspecified, the `y`
25
+ * channel field of the first valid prior mark definition is used.
26
+ */
27
+ yfield?: string;
28
+ }
29
+ /** A pan interactor. */
30
+ export interface Pan extends PanZoomOptions {
31
+ /** Pan a plot along both the `x` and `y` scales. */
32
+ select: 'pan';
33
+ }
34
+ /** A panX interactor. */
35
+ export interface PanX extends PanZoomOptions {
36
+ /** Pan a plot along the `x` scale only. */
37
+ select: 'panX';
38
+ }
39
+ /** A panY interactor. */
40
+ export interface PanY extends PanZoomOptions {
41
+ /** Pan a plot along the `y` scale only. */
42
+ select: 'panY';
43
+ }
44
+ /** A panZoom interactor. */
45
+ export interface PanZoom extends PanZoomOptions {
46
+ /** Pan and zoom a plot along both the `x` and `y` scales. */
47
+ select: 'panZoom';
48
+ }
49
+ /** A panZoomX interactor. */
50
+ export interface PanZoomX extends PanZoomOptions {
51
+ /** Pan and zoom a plot along the `x` scale only. */
52
+ select: 'panZoomX';
53
+ }
54
+ /** A panZoomY interactor. */
55
+ export interface PanZoomY extends PanZoomOptions {
56
+ /** Pan and zoom a plot along the `y` scale only. */
57
+ select: 'panZoomY';
58
+ }
59
+ //# sourceMappingURL=PanZoom.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PanZoom.d.ts","sourceRoot":"","sources":["../../../../src/spec/interactors/PanZoom.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAEvC,wCAAwC;AACxC,MAAM,WAAW,cAAc;IAC7B;;;;OAIG;IACH,CAAC,CAAC,EAAE,QAAQ,CAAC;IACb;;;;OAIG;IACH,CAAC,CAAC,EAAE,QAAQ,CAAC;IACb;;;;OAIG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;;OAIG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,wBAAwB;AACxB,MAAM,WAAW,GAAI,SAAQ,cAAc;IACzC,oDAAoD;IACpD,MAAM,EAAE,KAAK,CAAC;CACf;AAED,yBAAyB;AACzB,MAAM,WAAW,IAAK,SAAQ,cAAc;IAC1C,2CAA2C;IAC3C,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,yBAAyB;AACzB,MAAM,WAAW,IAAK,SAAQ,cAAc;IAC1C,2CAA2C;IAC3C,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,4BAA4B;AAC5B,MAAM,WAAW,OAAQ,SAAQ,cAAc;IAC7C,6DAA6D;IAC7D,MAAM,EAAE,SAAS,CAAC;CACnB;AAED,6BAA6B;AAC7B,MAAM,WAAW,QAAS,SAAQ,cAAc;IAC9C,oDAAoD;IACpD,MAAM,EAAE,UAAU,CAAC;CACpB;AAED,6BAA6B;AAC7B,MAAM,WAAW,QAAS,SAAQ,cAAc;IAC9C,oDAAoD;IACpD,MAAM,EAAE,UAAU,CAAC;CACpB"}
@@ -0,0 +1,33 @@
1
+ import { ParamRef } from '../Param.js';
2
+ import { BrushStyles } from './BrushStyles.js';
3
+ /** Options for region interactors. */
4
+ export interface RegionOptions {
5
+ /**
6
+ * The output selection. A clause of the form
7
+ * `(field = value1) OR (field = value2) ...`
8
+ * is added for the currently selected values.
9
+ */
10
+ as: ParamRef;
11
+ /**
12
+ * The encoding channels over which to select values.
13
+ * For a selected mark, selection clauses will cover
14
+ * the backing data fields for each channel.
15
+ */
16
+ channels: string[];
17
+ /**
18
+ * A flag indicating if peer (sibling) marks are excluded when
19
+ * cross-filtering (default `true`). If set, peer marks will not be
20
+ * filtered by this interactor's selection in cross-filtering setups.
21
+ */
22
+ peers?: boolean;
23
+ /**
24
+ * CSS styles for the brush (SVG `rect`) element.
25
+ */
26
+ brush?: BrushStyles;
27
+ }
28
+ /** A rectangular region interactor. */
29
+ export interface Region extends RegionOptions {
30
+ /** Select aspects of individual marks within a 2D range. */
31
+ select: 'region';
32
+ }
33
+ //# sourceMappingURL=Region.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Region.d.ts","sourceRoot":"","sources":["../../../../src/spec/interactors/Region.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAE/C,sCAAsC;AACtC,MAAM,WAAW,aAAa;IAC5B;;;;OAIG;IACH,EAAE,EAAE,QAAQ,CAAC;IACb;;;;OAIG;IACH,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB;;;;OAIG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB;;OAEG;IACH,KAAK,CAAC,EAAE,WAAW,CAAC;CACrB;AAED,uCAAuC;AACvC,MAAM,WAAW,MAAO,SAAQ,aAAa;IAC3C,4DAA4D;IAC5D,MAAM,EAAE,QAAQ,CAAC;CAClB"}
@@ -0,0 +1,60 @@
1
+ import { ParamRef } from '../Param.js';
2
+ /** Options for toggle interactors. */
3
+ export interface ToggleOptions {
4
+ /**
5
+ * The output selection. A clause of the form
6
+ * `(field = value1) OR (field = value2) ...`
7
+ * is added for the currently selected values.
8
+ */
9
+ as: ParamRef;
10
+ /**
11
+ * A flag indicating if peer (sibling) marks are excluded when
12
+ * cross-filtering (default `true`). If set, peer marks will not be
13
+ * filtered by this interactor's selection in cross-filtering setups.
14
+ */
15
+ peers?: boolean;
16
+ }
17
+ /** A toggle interactor. */
18
+ export interface Toggle extends ToggleOptions {
19
+ /** Select individual values. */
20
+ select: 'toggle';
21
+ /**
22
+ * The encoding channels over which to select values.
23
+ * For a selected mark, selection clauses will cover
24
+ * the backing data fields for each channel.
25
+ */
26
+ channels: string[];
27
+ }
28
+ /** A toggleX interactor. */
29
+ export interface ToggleX extends ToggleOptions {
30
+ /**
31
+ * Select individual values in the `x` scale domain.
32
+ * Clicking or touching a mark toggles its selection status.
33
+ */
34
+ select: 'toggleX';
35
+ }
36
+ /** A toggleY interactor. */
37
+ export interface ToggleY extends ToggleOptions {
38
+ /**
39
+ * Select individual values in the `y` scale domain.
40
+ * Clicking or touching a mark toggles its selection status.
41
+ */
42
+ select: 'toggleY';
43
+ }
44
+ /** A toggleZ interactor. */
45
+ export interface ToggleZ extends ToggleOptions {
46
+ /**
47
+ * Select individual values in the `z` scale domain.
48
+ * Clicking or touching a mark toggles its selection status.
49
+ */
50
+ select: 'toggleZ';
51
+ }
52
+ /** A toggleColor interactor. */
53
+ export interface ToggleColor extends ToggleOptions {
54
+ /**
55
+ * Select individual values in the `color` scale domain.
56
+ * Clicking or touching a mark toggles its selection status.
57
+ */
58
+ select: 'toggleColor';
59
+ }
60
+ //# sourceMappingURL=Toggle.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Toggle.d.ts","sourceRoot":"","sources":["../../../../src/spec/interactors/Toggle.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAEvC,sCAAsC;AACtC,MAAM,WAAW,aAAa;IAC5B;;;;OAIG;IACH,EAAE,EAAE,QAAQ,CAAC;IACb;;;;OAIG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED,2BAA2B;AAC3B,MAAM,WAAW,MAAO,SAAQ,aAAa;IAC3C,gCAAgC;IAChC,MAAM,EAAE,QAAQ,CAAC;IACjB;;;;OAIG;IACH,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB;AAED,4BAA4B;AAC5B,MAAM,WAAW,OAAQ,SAAQ,aAAa;IAC5C;;;OAGG;IACH,MAAM,EAAE,SAAS,CAAC;CACnB;AAED,4BAA4B;AAC5B,MAAM,WAAW,OAAQ,SAAQ,aAAa;IAC5C;;;OAGG;IACH,MAAM,EAAE,SAAS,CAAC;CACnB;AAED,4BAA4B;AAC5B,MAAM,WAAW,OAAQ,SAAQ,aAAa;IAC5C;;;OAGG;IACH,MAAM,EAAE,SAAS,CAAC;CACnB;AAED,gCAAgC;AAChC,MAAM,WAAW,WAAY,SAAQ,aAAa;IAChD;;;OAGG;IACH,MAAM,EAAE,aAAa,CAAC;CACvB"}
@@ -0,0 +1,140 @@
1
+ import { ChannelValue, ChannelValueSpec, CurveOptions, MarkData, MarkOptions, StackOptions } from './Marks.js';
2
+ /** Options for the area, areaX, and areaY marks. */
3
+ export interface AreaOptions extends MarkOptions, StackOptions, CurveOptions {
4
+ /**
5
+ * The required primary (starting, often left) horizontal position channel,
6
+ * representing the area’s baseline, typically bound to the *x* scale. For
7
+ * areaX, setting this option disables the implicit stackX transform.
8
+ */
9
+ x1?: ChannelValueSpec;
10
+ /**
11
+ * The optional secondary (ending, often right) horizontal position channel,
12
+ * representing the area’s topline, typically bound to the *x* scale; if not
13
+ * specified, **x1** is used. For areaX, setting this option disables the
14
+ * implicit stackX transform.
15
+ */
16
+ x2?: ChannelValueSpec;
17
+ /**
18
+ * The required primary (starting, often bottom) vertical position channel,
19
+ * representing the area’s baseline, typically bound to the *y* scale. For
20
+ * areaY, setting this option disables the implicit stackY transform.
21
+ */
22
+ y1?: ChannelValueSpec;
23
+ /**
24
+ * The optional secondary (ending, often top) vertical position channel,
25
+ * representing the area’s topline, typically bound to the *y* scale; if not
26
+ * specified, **y1** is used. For areaY, setting this option disables the
27
+ * implicit stackY transform.
28
+ */
29
+ y2?: ChannelValueSpec;
30
+ /**
31
+ * An optional ordinal channel for grouping data into (possibly stacked)
32
+ * series to be drawn as separate areas; defaults to **fill** if a channel, or
33
+ * **stroke** if a channel.
34
+ */
35
+ z?: ChannelValue;
36
+ }
37
+ /** Options for the areaX mark. */
38
+ export interface AreaXOptions extends Omit<AreaOptions, 'y1' | 'y2'> {
39
+ /**
40
+ * The horizontal position (or length) channel, typically bound to the *x*
41
+ * scale.
42
+ *
43
+ * If neither **x1** nor **x2** is specified, an implicit stackX transform is
44
+ * applied and **x** defaults to the identity function, assuming that *data* =
45
+ * [*x₀*, *x₁*, *x₂*, …]. Otherwise, if only one of **x1** or **x2** is
46
+ * specified, the other defaults to **x**, which defaults to zero.
47
+ */
48
+ x?: ChannelValueSpec;
49
+ /**
50
+ * The vertical position channel, typically bound to the *y* scale; defaults
51
+ * to the zero-based index of the data [0, 1, 2, …].
52
+ */
53
+ y?: ChannelValueSpec;
54
+ }
55
+ /** Options for the areaY mark. */
56
+ export interface AreaYOptions extends Omit<AreaOptions, 'x1' | 'x2'> {
57
+ /**
58
+ * The horizontal position channel, typically bound to the *x* scale; defaults
59
+ * to the zero-based index of the data [0, 1, 2, …].
60
+ */
61
+ x?: ChannelValueSpec;
62
+ /**
63
+ * The vertical position (or length) channel, typically bound to the *y*
64
+ * scale.
65
+ *
66
+ * If neither **y1** nor **y2** is specified, an implicit stackY transform is
67
+ * applied and **y** defaults to the identity function, assuming that *data* =
68
+ * [*y₀*, *y₁*, *y₂*, …]. Otherwise, if only one of **y1** or **y2** is
69
+ * specified, the other defaults to **y**, which defaults to zero.
70
+ */
71
+ y?: ChannelValueSpec;
72
+ }
73
+ /** The area mark. */
74
+ export interface Area extends MarkData, AreaOptions {
75
+ /**
76
+ * An area mark. The area mark is rarely used directly; it is only needed
77
+ * when the baseline and topline have neither *x* nor *y* values in common.
78
+ * Use areaY for a horizontal orientation where the baseline and topline
79
+ * share *x* values, or areaX for a vertical orientation where the baseline
80
+ * and topline share *y* values.
81
+ */
82
+ mark: 'area';
83
+ }
84
+ /** The areaX mark. */
85
+ export interface AreaX extends MarkData, AreaXOptions {
86
+ /**
87
+ * A vertically-oriented area mark, where the baseline and topline share
88
+ * **y** values, as in a time-series area chart where time goes up↑.
89
+ *
90
+ * If neither **x1** nor **x2** is specified, an implicit stackX transform is
91
+ * applied and **x** defaults to the identity function, assuming that *data* =
92
+ * [*x₀*, *x₁*, *x₂*, …]. Otherwise, if only one of **x1** or **x2** is
93
+ * specified, the other defaults to **x**, which defaults to zero.
94
+ *
95
+ * If an **interval** is specified, **y** values are binned accordingly,
96
+ * allowing zeroes for empty bins instead of interpolating across gaps. This is
97
+ * recommended to “regularize” sampled data; for example, if your data
98
+ * represents timestamped observations and you expect one observation per day,
99
+ * use *day* as the **interval**.
100
+ *
101
+ * Variable aesthetic channels are supported: if the **fill** is defined as a
102
+ * channel, the area will be broken into contiguous overlapping sections when
103
+ * the fill color changes; the fill color will apply to the interval spanning
104
+ * the current data point and the following data point. This behavior also
105
+ * applies to the **fillOpacity**, **stroke**, **strokeOpacity**,
106
+ * **strokeWidth**, **opacity**, **href**, **title**, and **ariaLabel**
107
+ * channels. When any of these channels are used, setting an explicit **z**
108
+ * channel (possibly to null) is strongly recommended.
109
+ */
110
+ mark: 'areaX';
111
+ }
112
+ /** The areaY mark. */
113
+ export interface AreaY extends MarkData, AreaYOptions {
114
+ /**
115
+ * A horizontally-oriented area mark, where the baseline and topline share
116
+ * **x** values, as in a time-series area chart where time goes right→.
117
+ *
118
+ * If neither **y1** nor **y2** is specified, an implicit stackY transform is
119
+ * applied and **y** defaults to the identity function, assuming that *data* =
120
+ * [*y₀*, *y₁*, *y₂*, …]. Otherwise, if only one of **y1** or **y2** is
121
+ * specified, the other defaults to **y**, which defaults to zero.
122
+ *
123
+ * If an **interval** is specified, **x** values are binned accordingly,
124
+ * allowing zeroes for empty bins instead of interpolating across gaps. This is
125
+ * recommended to “regularize” sampled data; for example, if your data
126
+ * represents timestamped observations and you expect one observation per day,
127
+ * use *day* as the **interval**.
128
+ *
129
+ * Variable aesthetic channels are supported: if the **fill** is defined as a
130
+ * channel, the area will be broken into contiguous overlapping sections when
131
+ * the fill color changes; the fill color will apply to the interval spanning
132
+ * the current data point and the following data point. This behavior also
133
+ * applies to the **fillOpacity**, **stroke**, **strokeOpacity**,
134
+ * **strokeWidth**, **opacity**, **href**, **title**, and **ariaLabel**
135
+ * channels. When any of these channels are used, setting an explicit **z**
136
+ * channel (possibly to null) is strongly recommended.
137
+ */
138
+ mark: 'areaY';
139
+ }
140
+ //# sourceMappingURL=Area.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Area.d.ts","sourceRoot":"","sources":["../../../../src/spec/marks/Area.ts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;;;;;;;;;;;;OAuBG;IACH,IAAI,EAAE,OAAO,CAAC;CACf"}
@@ -0,0 +1,95 @@
1
+ import { ParamRef } from '../Param.js';
2
+ import { ChannelValueSpec, MarkData, MarkOptions } from './Marks.js';
3
+ /** Options for the arrow mark. */
4
+ export interface ArrowOptions extends MarkOptions {
5
+ /**
6
+ * The horizontal position, for vertical arrows; typically bound to the *x*
7
+ * scale; shorthand for setting defaults for both **x1** and **x2**.
8
+ */
9
+ x?: ChannelValueSpec;
10
+ /**
11
+ * The vertical position, for horizontal arrows; typically bound to the *y*
12
+ * scale; shorthand for setting defaults for both **y1** and **y2**.
13
+ */
14
+ y?: ChannelValueSpec;
15
+ /**
16
+ * The starting horizontal position; typically bound to the *x* scale; also
17
+ * sets a default for **x2**.
18
+ */
19
+ x1?: ChannelValueSpec;
20
+ /**
21
+ * The starting vertical position; typically bound to the *y* scale; also
22
+ * sets a default for **y2**.
23
+ */
24
+ y1?: ChannelValueSpec;
25
+ /**
26
+ * The ending horizontal position; typically bound to the *x* scale; also
27
+ * sets a default for **x1**.
28
+ */
29
+ x2?: ChannelValueSpec;
30
+ /**
31
+ * The ending vertical position; typically bound to the *y* scale; also sets
32
+ * a default for **y1**.
33
+ */
34
+ y2?: ChannelValueSpec;
35
+ /**
36
+ * The angle, a constant in degrees, between the straight line intersecting
37
+ * the arrow’s two control points and the outgoing tangent direction of the
38
+ * arrow from the start point. The angle must be within ±90°; a positive
39
+ * angle will produce a clockwise curve, while a negative angle will produce
40
+ * a counterclockwise curve; zero (the default) will produce a straight line.
41
+ * Use true for 22.5°.
42
+ */
43
+ bend?: number | boolean | ParamRef;
44
+ /**
45
+ * How pointy the arrowhead is, in degrees; a constant typically between 0°
46
+ * and 180°, and defaults to 60°.
47
+ */
48
+ headAngle?: number | ParamRef;
49
+ /**
50
+ * The size of the arrowhead relative to the **strokeWidth**; a constant.
51
+ * Assuming the default of stroke width 1.5px, this is the length of the
52
+ * arrowhead’s side in pixels.
53
+ */
54
+ headLength?: number | ParamRef;
55
+ /**
56
+ * Shorthand to set the same default for **insetStart** and **insetEnd**.
57
+ */
58
+ inset?: number | ParamRef;
59
+ /**
60
+ * The starting inset, a constant in pixels; defaults to 0. A positive inset
61
+ * shortens the arrow by moving the starting point towards the endpoint
62
+ * point, while a negative inset extends it by moving the starting point in
63
+ * the opposite direction. A positive starting inset may be useful if the
64
+ * arrow emerges from a dot.
65
+ */
66
+ insetStart?: number | ParamRef;
67
+ /**
68
+ * The ending inset, a constant in pixels; defaults to 0. A positive inset
69
+ * shortens the arrow by moving the ending point towards the starting point,
70
+ * while a negative inset extends it by moving the ending point in the
71
+ * opposite direction. A positive ending inset may be useful if the arrow
72
+ * points to a dot.
73
+ */
74
+ insetEnd?: number | ParamRef;
75
+ /**
76
+ * The sweep order; defaults to 1 indicating a positive (clockwise) bend
77
+ * angle; -1 indicates a negative (anticlockwise) bend angle; 0 effectively
78
+ * clears the bend angle. If set to *-x*, the bend angle is flipped when the
79
+ * ending point is to the left of the starting point — ensuring all arrows
80
+ * bulge up (down if bend is negative); if set to *-y*, the bend angle is
81
+ * flipped when the ending point is above the starting point — ensuring all
82
+ * arrows bulge right (left if bend is negative); the sign is negated for
83
+ * *+x* and *+y*.
84
+ */
85
+ sweep?: number | '+x' | '-x' | '+y' | '-y' | ParamRef;
86
+ }
87
+ /** The arrow mark. */
88
+ export interface Arrow extends MarkData, ArrowOptions {
89
+ /**
90
+ * An arrow mark, drawing (possibly swoopy) arrows connecting pairs of
91
+ * points.
92
+ */
93
+ mark: 'arrow';
94
+ }
95
+ //# sourceMappingURL=Arrow.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Arrow.d.ts","sourceRoot":"","sources":["../../../../src/spec/marks/Arrow.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,gBAAgB,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAErE,kCAAkC;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