svelteplot 0.3.3 → 0.3.5-pr-121.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/dist/Mark.svelte +25 -27
  2. package/dist/Mark.svelte.d.ts +87 -17
  3. package/dist/Plot.svelte +1 -2
  4. package/dist/Plot.svelte.d.ts +1 -1
  5. package/dist/constants.d.ts +1 -1
  6. package/dist/core/Facet.svelte +1 -1
  7. package/dist/core/Facet.svelte.d.ts +1 -1
  8. package/dist/core/FacetAxes.svelte +3 -1
  9. package/dist/core/FacetGrid.svelte +1 -1
  10. package/dist/core/FacetGrid.svelte.d.ts +1 -1
  11. package/dist/core/Plot.svelte +1 -1
  12. package/dist/core/Plot.svelte.d.ts +1 -1
  13. package/dist/helpers/autoScales.d.ts +1 -1
  14. package/dist/helpers/autoTicks.d.ts +1 -1
  15. package/dist/helpers/autoTicks.js +1 -1
  16. package/dist/helpers/callWithProps.d.ts +1 -1
  17. package/dist/helpers/colors.d.ts +2 -2
  18. package/dist/helpers/curves.d.ts +1 -1
  19. package/dist/helpers/facets.d.ts +1 -1
  20. package/dist/helpers/getBaseStyles.d.ts +4 -2
  21. package/dist/helpers/getBaseStyles.js +8 -0
  22. package/dist/helpers/group.d.ts +1 -1
  23. package/dist/helpers/index.d.ts +3 -3
  24. package/dist/helpers/isDataRecord.d.ts +1 -1
  25. package/dist/helpers/isRawValue.d.ts +1 -1
  26. package/dist/helpers/projection.d.ts +1 -1
  27. package/dist/helpers/reduce.d.ts +1 -1
  28. package/dist/helpers/regressionLoess.d.ts +1 -1
  29. package/dist/helpers/resolve.d.ts +3 -3
  30. package/dist/helpers/scales.d.ts +2 -2
  31. package/dist/helpers/typeChecks.d.ts +5 -5
  32. package/dist/marks/Area.svelte +14 -17
  33. package/dist/marks/Area.svelte.d.ts +91 -19
  34. package/dist/marks/AreaX.svelte +15 -12
  35. package/dist/marks/AreaX.svelte.d.ts +94 -3
  36. package/dist/marks/AreaY.svelte +15 -15
  37. package/dist/marks/AreaY.svelte.d.ts +94 -3
  38. package/dist/marks/Arrow.svelte +16 -19
  39. package/dist/marks/Arrow.svelte.d.ts +110 -38
  40. package/dist/marks/AxisX.svelte +60 -56
  41. package/dist/marks/AxisX.svelte.d.ts +98 -25
  42. package/dist/marks/AxisY.svelte +73 -54
  43. package/dist/marks/AxisY.svelte.d.ts +100 -27
  44. package/dist/marks/BarX.svelte +28 -30
  45. package/dist/marks/BarX.svelte.d.ts +89 -17
  46. package/dist/marks/BarY.svelte +27 -27
  47. package/dist/marks/BarY.svelte.d.ts +88 -16
  48. package/dist/marks/BollingerX.svelte +21 -16
  49. package/dist/marks/BollingerX.svelte.d.ts +17 -16
  50. package/dist/marks/BollingerY.svelte +21 -16
  51. package/dist/marks/BollingerY.svelte.d.ts +17 -16
  52. package/dist/marks/BoxX.svelte +5 -7
  53. package/dist/marks/BoxX.svelte.d.ts +5 -3
  54. package/dist/marks/BoxY.svelte +13 -16
  55. package/dist/marks/BoxY.svelte.d.ts +41 -28
  56. package/dist/marks/Brush.svelte +27 -30
  57. package/dist/marks/Brush.svelte.d.ts +20 -15
  58. package/dist/marks/BrushX.svelte +9 -7
  59. package/dist/marks/BrushX.svelte.d.ts +5 -2
  60. package/dist/marks/BrushY.svelte +9 -7
  61. package/dist/marks/BrushY.svelte.d.ts +5 -2
  62. package/dist/marks/Cell.svelte +17 -18
  63. package/dist/marks/Cell.svelte.d.ts +80 -8
  64. package/dist/marks/CellX.svelte +12 -8
  65. package/dist/marks/CellX.svelte.d.ts +5 -2
  66. package/dist/marks/CellY.svelte +12 -8
  67. package/dist/marks/CellY.svelte.d.ts +5 -2
  68. package/dist/marks/ColorLegend.svelte +5 -8
  69. package/dist/marks/ColorLegend.svelte.d.ts +2 -2
  70. package/dist/marks/CustomMark.svelte +23 -16
  71. package/dist/marks/CustomMark.svelte.d.ts +17 -14
  72. package/dist/marks/CustomMarkHTML.svelte +20 -18
  73. package/dist/marks/CustomMarkHTML.svelte.d.ts +29 -15
  74. package/dist/marks/DifferenceY.svelte +54 -18
  75. package/dist/marks/DifferenceY.svelte.d.ts +59 -28
  76. package/dist/marks/Dot.svelte +13 -14
  77. package/dist/marks/Dot.svelte.d.ts +84 -12
  78. package/dist/marks/DotX.svelte +9 -9
  79. package/dist/marks/DotX.svelte.d.ts +86 -4
  80. package/dist/marks/DotY.svelte +10 -9
  81. package/dist/marks/DotY.svelte.d.ts +87 -5
  82. package/dist/marks/Frame.svelte +20 -27
  83. package/dist/marks/Frame.svelte.d.ts +24 -10
  84. package/dist/marks/Geo.svelte +22 -15
  85. package/dist/marks/Geo.svelte.d.ts +97 -13
  86. package/dist/marks/Graticule.svelte +16 -19
  87. package/dist/marks/Graticule.svelte.d.ts +3 -3
  88. package/dist/marks/GridX.svelte +5 -8
  89. package/dist/marks/GridX.svelte.d.ts +79 -7
  90. package/dist/marks/GridY.svelte +5 -8
  91. package/dist/marks/GridY.svelte.d.ts +79 -7
  92. package/dist/marks/HTMLTooltip.svelte +9 -14
  93. package/dist/marks/HTMLTooltip.svelte.d.ts +25 -12
  94. package/dist/marks/Line.svelte +24 -29
  95. package/dist/marks/Line.svelte.d.ts +97 -25
  96. package/dist/marks/LineX.svelte +9 -4
  97. package/dist/marks/LineX.svelte.d.ts +99 -3
  98. package/dist/marks/LineY.svelte +11 -5
  99. package/dist/marks/LineY.svelte.d.ts +100 -4
  100. package/dist/marks/Link.svelte +35 -19
  101. package/dist/marks/Link.svelte.d.ts +107 -18
  102. package/dist/marks/Pointer.svelte +13 -18
  103. package/dist/marks/Pointer.svelte.d.ts +34 -21
  104. package/dist/marks/Rect.svelte +19 -19
  105. package/dist/marks/Rect.svelte.d.ts +86 -13
  106. package/dist/marks/RectX.svelte +10 -9
  107. package/dist/marks/RectX.svelte.d.ts +22 -6
  108. package/dist/marks/RectY.svelte +9 -10
  109. package/dist/marks/RectY.svelte.d.ts +22 -6
  110. package/dist/marks/RegressionX.svelte +1 -1
  111. package/dist/marks/RegressionX.svelte.d.ts +1 -1
  112. package/dist/marks/RegressionY.svelte +1 -1
  113. package/dist/marks/RegressionY.svelte.d.ts +1 -1
  114. package/dist/marks/RuleX.svelte +14 -16
  115. package/dist/marks/RuleX.svelte.d.ts +84 -12
  116. package/dist/marks/RuleY.svelte +12 -15
  117. package/dist/marks/RuleY.svelte.d.ts +84 -12
  118. package/dist/marks/Sphere.svelte +6 -7
  119. package/dist/marks/Sphere.svelte.d.ts +3 -2
  120. package/dist/marks/Spike.svelte +17 -9
  121. package/dist/marks/Spike.svelte.d.ts +94 -4
  122. package/dist/marks/SymbolLegend.svelte +1 -1
  123. package/dist/marks/Text.svelte +34 -124
  124. package/dist/marks/Text.svelte.d.ts +101 -20
  125. package/dist/marks/TickX.svelte +12 -13
  126. package/dist/marks/TickX.svelte.d.ts +92 -20
  127. package/dist/marks/TickY.svelte +11 -14
  128. package/dist/marks/TickY.svelte.d.ts +92 -20
  129. package/dist/marks/Vector.svelte +19 -23
  130. package/dist/marks/Vector.svelte.d.ts +93 -21
  131. package/dist/marks/helpers/AreaCanvas.svelte +1 -1
  132. package/dist/marks/helpers/AreaCanvas.svelte.d.ts +1 -1
  133. package/dist/marks/helpers/BaseAxisX.svelte +5 -3
  134. package/dist/marks/helpers/BaseAxisX.svelte.d.ts +1 -1
  135. package/dist/marks/helpers/BaseAxisY.svelte +10 -8
  136. package/dist/marks/helpers/BaseAxisY.svelte.d.ts +3 -1
  137. package/dist/marks/helpers/CanvasLayer.svelte +1 -1
  138. package/dist/marks/helpers/DotCanvas.svelte +1 -1
  139. package/dist/marks/helpers/DotCanvas.svelte.d.ts +1 -1
  140. package/dist/marks/helpers/GeoCanvas.svelte +1 -1
  141. package/dist/marks/helpers/GeoCanvas.svelte.d.ts +1 -1
  142. package/dist/marks/helpers/LineCanvas.svelte +1 -1
  143. package/dist/marks/helpers/LineCanvas.svelte.d.ts +1 -1
  144. package/dist/marks/helpers/LinearGradientX.svelte +1 -1
  145. package/dist/marks/helpers/LinearGradientX.svelte.d.ts +1 -1
  146. package/dist/marks/helpers/LinearGradientY.svelte +1 -1
  147. package/dist/marks/helpers/LinearGradientY.svelte.d.ts +1 -1
  148. package/dist/marks/helpers/MarkerPath.svelte +1 -1
  149. package/dist/marks/helpers/MarkerPath.svelte.d.ts +1 -41
  150. package/dist/marks/helpers/MultilineText.svelte +158 -0
  151. package/dist/marks/helpers/MultilineText.svelte.d.ts +12 -0
  152. package/dist/marks/helpers/RectPath.svelte +29 -26
  153. package/dist/marks/helpers/RectPath.svelte.d.ts +39 -26
  154. package/dist/marks/helpers/Regression.svelte +7 -2
  155. package/dist/marks/helpers/Regression.svelte.d.ts +2 -5
  156. package/dist/marks/helpers/events.d.ts +1 -1
  157. package/dist/transforms/bin.d.ts +2 -2
  158. package/dist/transforms/bollinger.d.ts +2 -67
  159. package/dist/transforms/centroid.d.ts +8 -66
  160. package/dist/transforms/centroid.js +10 -7
  161. package/dist/transforms/filter.d.ts +1 -1
  162. package/dist/transforms/group.d.ts +5 -13
  163. package/dist/transforms/interval.d.ts +3 -123
  164. package/dist/transforms/jitter.d.ts +1 -1
  165. package/dist/transforms/map.d.ts +4 -184
  166. package/dist/transforms/normalize.d.ts +3 -123
  167. package/dist/transforms/recordize.d.ts +1 -1
  168. package/dist/transforms/rename.d.ts +2 -2
  169. package/dist/transforms/select.d.ts +8 -428
  170. package/dist/transforms/shift.d.ts +1 -1
  171. package/dist/transforms/sort.d.ts +4 -243
  172. package/dist/transforms/stack.d.ts +1 -1
  173. package/dist/transforms/window.d.ts +3 -131
  174. package/dist/types/channel.d.ts +11 -0
  175. package/dist/types/channel.js +1 -0
  176. package/dist/types/colorScheme.d.ts +1 -0
  177. package/dist/types/colorScheme.js +1 -0
  178. package/dist/types/data.d.ts +13 -0
  179. package/dist/types/data.js +1 -0
  180. package/dist/types/facet.d.ts +50 -0
  181. package/dist/types/facet.js +1 -0
  182. package/dist/types/index.d.ts +58 -0
  183. package/dist/types/index.js +7 -0
  184. package/dist/types/mark.d.ts +123 -0
  185. package/dist/types/mark.js +1 -0
  186. package/dist/types/plot.d.ts +459 -0
  187. package/dist/types/plot.js +1 -0
  188. package/dist/types/scale.d.ts +143 -0
  189. package/dist/types/scale.js +1 -0
  190. package/dist/types.d.ts +120 -127
  191. package/package.json +125 -120
@@ -1,22 +1,94 @@
1
- export type TickYMarkProps = Omit<BaseMarkProps, 'fill' | 'fillOpacity'> & {
2
- data: DataRow[];
3
- /**
4
- * the vertical position; bound to the x scale
5
- */
6
- y?: ChannelAccessor;
7
- /**
8
- * the horizontal position; bound to the x scale, which must be band. If the x channel
9
- * is not specified, the tick will span the full horizontal extent of the frame.
10
- */
11
- x?: ChannelAccessor;
12
- /**
13
- * if ticks are used on a non-bandwidth scale, this will determine the
14
- * length of the tick. Defaults to 10 pixel
15
- */
16
- tickLength?: ConstantAccessor<number>;
17
- };
18
- import type { BaseMarkProps, ChannelAccessor, DataRow, ConstantAccessor } from '../types.js';
1
+ import type { ChannelAccessor, DataRow, ConstantAccessor } from '../types/index.js';
2
+ declare class __sveltets_Render<Datum extends DataRow> {
3
+ props(): Omit<Partial<{
4
+ filter?: ConstantAccessor<boolean, Datum>;
5
+ facet?: "auto" | "include" | "exclude";
6
+ fx: ChannelAccessor<Datum>;
7
+ fy: ChannelAccessor<Datum>;
8
+ dx: ConstantAccessor<number, Datum>;
9
+ dy: ConstantAccessor<number, Datum>;
10
+ fill: ChannelAccessor<Datum>;
11
+ fillOpacity: ConstantAccessor<number, Datum>;
12
+ sort: {
13
+ channel: string;
14
+ order?: "ascending" | "descending";
15
+ } | ((a: import("../types/data").RawValue, b: import("../types/data").RawValue) => number) | ConstantAccessor<import("../types/data").RawValue, Datum>;
16
+ stroke: ChannelAccessor<Datum>;
17
+ strokeWidth: ConstantAccessor<number, Datum>;
18
+ strokeOpacity: ConstantAccessor<number, Datum>;
19
+ strokeLinejoin: ConstantAccessor<import("csstype").Property.StrokeLinejoin, Datum>;
20
+ strokeLinecap: ConstantAccessor<import("csstype").Property.StrokeLinecap, Datum>;
21
+ strokeMiterlimit: ConstantAccessor<number, Datum>;
22
+ opacity: ChannelAccessor<Datum>;
23
+ strokeDasharray: ConstantAccessor<string, Datum>;
24
+ strokeDashoffset: ConstantAccessor<number, Datum>;
25
+ mixBlendMode: ConstantAccessor<import("csstype").Property.MixBlendMode, Datum>;
26
+ clipPath: string;
27
+ imageFilter: ConstantAccessor<string, Datum>;
28
+ shapeRendering: ConstantAccessor<import("csstype").Property.ShapeRendering, Datum>;
29
+ paintOrder: ConstantAccessor<string, Datum>;
30
+ onclick?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
31
+ ondblclick?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
32
+ onmouseup?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
33
+ onmousedown?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
34
+ onmouseenter?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
35
+ onmousemove?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
36
+ onmouseleave?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
37
+ onmouseout?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
38
+ onmouseover?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
39
+ onpointercancel?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
40
+ onpointerdown?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
41
+ onpointerup?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
42
+ onpointerenter?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
43
+ onpointerleave?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
44
+ onpointermove?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
45
+ onpointerover?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
46
+ onpointerout?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
47
+ ondrag?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
48
+ ondrop?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
49
+ ondragstart?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
50
+ ondragenter?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
51
+ ondragleave?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
52
+ ondragover?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
53
+ ondragend?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
54
+ ontouchstart?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
55
+ ontouchmove?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
56
+ ontouchend?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
57
+ ontouchcancel?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
58
+ oncontextmenu?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
59
+ onwheel?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
60
+ class: string | null;
61
+ cursor: ConstantAccessor<import("csstype").Property.Cursor, Datum>;
62
+ }>, "fill" | "fillOpacity"> & {
63
+ data: Datum[];
64
+ /**
65
+ * the vertical position; bound to the x scale
66
+ */
67
+ y?: ChannelAccessor<Datum>;
68
+ /**
69
+ * the horizontal position; bound to the y scale, which must be band. If the y channel
70
+ * is not specified, the tick will span the full vertical extent of the frame.
71
+ */
72
+ x?: ChannelAccessor<Datum>;
73
+ /**
74
+ * if ticks are used on a non-bandwidth scale, this will determine the
75
+ * length of the tick. Defaults to 10 pixel
76
+ */
77
+ tickLength?: ConstantAccessor<number, Datum>;
78
+ };
79
+ events(): {};
80
+ slots(): {};
81
+ bindings(): "";
82
+ exports(): {};
83
+ }
84
+ interface $$IsomorphicComponent {
85
+ new <Datum extends DataRow>(options: import('svelte').ComponentConstructorOptions<ReturnType<__sveltets_Render<Datum>['props']>>): import('svelte').SvelteComponent<ReturnType<__sveltets_Render<Datum>['props']>, ReturnType<__sveltets_Render<Datum>['events']>, ReturnType<__sveltets_Render<Datum>['slots']>> & {
86
+ $$bindings?: ReturnType<__sveltets_Render<Datum>['bindings']>;
87
+ } & ReturnType<__sveltets_Render<Datum>['exports']>;
88
+ <Datum extends DataRow>(internal: unknown, props: ReturnType<__sveltets_Render<Datum>['props']> & {}): ReturnType<__sveltets_Render<Datum>['exports']>;
89
+ z_$$bindings?: ReturnType<__sveltets_Render<any>['bindings']>;
90
+ }
19
91
  /** The TickY mark is useful for showing one-dimensional distributions along the y axis. The x axis must be a band scale. */
20
- declare const TickY: import("svelte").Component<TickYMarkProps, {}, "">;
21
- type TickY = ReturnType<typeof TickY>;
92
+ declare const TickY: $$IsomorphicComponent;
93
+ type TickY<Datum extends DataRow> = InstanceType<typeof TickY<Datum>>;
22
94
  export default TickY;
@@ -3,49 +3,45 @@
3
3
  The vector mark lets you place shapes (like arrows) on your plot.
4
4
  -->
5
5
  <script lang="ts" module>
6
- import type {
7
- PlotContext,
8
- DataRecord,
9
- BaseMarkProps,
10
- ConstantAccessor,
11
- ChannelAccessor,
12
- FacetContext,
13
- PlotDefaults
14
- } from '../types.js';
15
-
16
6
  type D3Path = ReturnType<typeof import('d3-path').path>;
17
-
18
7
  export type ShapeRenderer = {
19
8
  draw(context: D3Path, l: number, r: number): void;
20
9
  };
10
+ </script>
21
11
 
22
- export type VectorMarkProps = BaseMarkProps & {
23
- data: DataRecord[];
24
- x: ChannelAccessor;
25
- y: ChannelAccessor;
12
+ <script lang="ts" generics="Datum extends DataRecord">
13
+ interface VectorMarkProps extends BaseMarkProps<Datum> {
14
+ data: Datum[];
15
+ x: ChannelAccessor<Datum>;
16
+ y: ChannelAccessor<Datum>;
26
17
  r?: number;
27
- length?: ChannelAccessor;
28
- rotate?: ChannelAccessor;
18
+ length?: ChannelAccessor<Datum>;
19
+ rotate?: ChannelAccessor<Datum>;
29
20
  /**
30
21
  * Controls where the vector is anchored in relation to the x, y position.
31
22
  * If set to 'start', the arrow will start at the x, y position. If set to
32
23
  * 'middle', the arrow will be centered at the x, y position. If set to
33
24
  * 'end', the arrow will end at the x, y position.
34
25
  */
35
- anchor: 'start' | 'middle' | 'end';
26
+ anchor?: 'start' | 'middle' | 'end';
36
27
  shape?: 'arrow' | 'spike' | 'arrow-filled' | ShapeRenderer;
37
28
  children?: Snippet;
38
29
  canvas?: boolean;
39
- };
40
- </script>
30
+ }
31
+ import type {
32
+ PlotContext,
33
+ DataRecord,
34
+ BaseMarkProps,
35
+ ChannelAccessor,
36
+ FacetContext,
37
+ PlotDefaults
38
+ } from '../types/index.js';
41
39
 
42
- <script lang="ts">
43
40
  import { getContext, type Snippet } from 'svelte';
44
41
  import { pathRound as path } from 'd3-path';
45
42
 
46
43
  import { resolveChannel, resolveProp, resolveStyles } from '../helpers/resolve.js';
47
- import { projectXY } from '../helpers/scales.js';
48
- import { sort } from '../index.js';
44
+ import { sort } from '..';
49
45
  import Mark from '../Mark.svelte';
50
46
  //import DotCanvas from './helpers/DotCanvas.svelte';
51
47
  import { maybeData, testFilter, isValid } from '../helpers/index.js';
@@ -1,28 +1,100 @@
1
- import type { DataRecord, BaseMarkProps, ChannelAccessor } from '../types.js';
2
1
  type D3Path = ReturnType<typeof import('d3-path').path>;
3
2
  export type ShapeRenderer = {
4
3
  draw(context: D3Path, l: number, r: number): void;
5
4
  };
6
- export type VectorMarkProps = BaseMarkProps & {
7
- data: DataRecord[];
8
- x: ChannelAccessor;
9
- y: ChannelAccessor;
10
- r?: number;
11
- length?: ChannelAccessor;
12
- rotate?: ChannelAccessor;
13
- /**
14
- * Controls where the vector is anchored in relation to the x, y position.
15
- * If set to 'start', the arrow will start at the x, y position. If set to
16
- * 'middle', the arrow will be centered at the x, y position. If set to
17
- * 'end', the arrow will end at the x, y position.
18
- */
19
- anchor: 'start' | 'middle' | 'end';
20
- shape?: 'arrow' | 'spike' | 'arrow-filled' | ShapeRenderer;
21
- children?: Snippet;
22
- canvas?: boolean;
23
- };
5
+ import type { DataRecord, ChannelAccessor } from '../types/index.js';
24
6
  import { type Snippet } from 'svelte';
7
+ declare class __sveltets_Render<Datum extends DataRecord> {
8
+ props(): Partial<{
9
+ filter?: import("../types/index.js").ConstantAccessor<boolean, Datum>;
10
+ facet?: "auto" | "include" | "exclude";
11
+ fx: ChannelAccessor<Datum>;
12
+ fy: ChannelAccessor<Datum>;
13
+ dx: import("../types/index.js").ConstantAccessor<number, Datum>;
14
+ dy: import("../types/index.js").ConstantAccessor<number, Datum>;
15
+ fill: ChannelAccessor<Datum>;
16
+ fillOpacity: import("../types/index.js").ConstantAccessor<number, Datum>;
17
+ sort: {
18
+ channel: string;
19
+ order?: "ascending" | "descending";
20
+ } | ((a: import("../types/data.js").RawValue, b: import("../types/data.js").RawValue) => number) | import("../types/index.js").ConstantAccessor<import("../types/data.js").RawValue, Datum>;
21
+ stroke: ChannelAccessor<Datum>;
22
+ strokeWidth: import("../types/index.js").ConstantAccessor<number, Datum>;
23
+ strokeOpacity: import("../types/index.js").ConstantAccessor<number, Datum>;
24
+ strokeLinejoin: import("../types/index.js").ConstantAccessor<import("csstype").Property.StrokeLinejoin, Datum>;
25
+ strokeLinecap: import("../types/index.js").ConstantAccessor<import("csstype").Property.StrokeLinecap, Datum>;
26
+ strokeMiterlimit: import("../types/index.js").ConstantAccessor<number, Datum>;
27
+ opacity: ChannelAccessor<Datum>;
28
+ strokeDasharray: import("../types/index.js").ConstantAccessor<string, Datum>;
29
+ strokeDashoffset: import("../types/index.js").ConstantAccessor<number, Datum>;
30
+ mixBlendMode: import("../types/index.js").ConstantAccessor<import("csstype").Property.MixBlendMode, Datum>;
31
+ clipPath: string;
32
+ imageFilter: import("../types/index.js").ConstantAccessor<string, Datum>;
33
+ shapeRendering: import("../types/index.js").ConstantAccessor<import("csstype").Property.ShapeRendering, Datum>;
34
+ paintOrder: import("../types/index.js").ConstantAccessor<string, Datum>;
35
+ onclick?: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
36
+ ondblclick?: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
37
+ onmouseup?: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
38
+ onmousedown?: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
39
+ onmouseenter?: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
40
+ onmousemove?: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
41
+ onmouseleave?: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
42
+ onmouseout?: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
43
+ onmouseover?: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
44
+ onpointercancel?: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
45
+ onpointerdown?: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
46
+ onpointerup?: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
47
+ onpointerenter?: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
48
+ onpointerleave?: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
49
+ onpointermove?: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
50
+ onpointerover?: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
51
+ onpointerout?: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
52
+ ondrag?: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
53
+ ondrop?: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
54
+ ondragstart?: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
55
+ ondragenter?: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
56
+ ondragleave?: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
57
+ ondragover?: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
58
+ ondragend?: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
59
+ ontouchstart?: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
60
+ ontouchmove?: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
61
+ ontouchend?: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
62
+ ontouchcancel?: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
63
+ oncontextmenu?: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
64
+ onwheel?: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
65
+ class: string | null;
66
+ cursor: import("../types/index.js").ConstantAccessor<import("csstype").Property.Cursor, Datum>;
67
+ }> & {
68
+ data: Datum[];
69
+ x: ChannelAccessor<Datum>;
70
+ y: ChannelAccessor<Datum>;
71
+ r?: number;
72
+ length?: ChannelAccessor<Datum>;
73
+ rotate?: ChannelAccessor<Datum>;
74
+ /**
75
+ * Controls where the vector is anchored in relation to the x, y position.
76
+ * If set to 'start', the arrow will start at the x, y position. If set to
77
+ * 'middle', the arrow will be centered at the x, y position. If set to
78
+ * 'end', the arrow will end at the x, y position.
79
+ */
80
+ anchor?: "start" | "middle" | "end";
81
+ shape?: "arrow" | "spike" | "arrow-filled" | ShapeRenderer;
82
+ children?: Snippet;
83
+ canvas?: boolean;
84
+ };
85
+ events(): {};
86
+ slots(): {};
87
+ bindings(): "";
88
+ exports(): {};
89
+ }
90
+ interface $$IsomorphicComponent {
91
+ new <Datum extends DataRecord>(options: import('svelte').ComponentConstructorOptions<ReturnType<__sveltets_Render<Datum>['props']>>): import('svelte').SvelteComponent<ReturnType<__sveltets_Render<Datum>['props']>, ReturnType<__sveltets_Render<Datum>['events']>, ReturnType<__sveltets_Render<Datum>['slots']>> & {
92
+ $$bindings?: ReturnType<__sveltets_Render<Datum>['bindings']>;
93
+ } & ReturnType<__sveltets_Render<Datum>['exports']>;
94
+ <Datum extends DataRecord>(internal: unknown, props: ReturnType<__sveltets_Render<Datum>['props']> & {}): ReturnType<__sveltets_Render<Datum>['exports']>;
95
+ z_$$bindings?: ReturnType<__sveltets_Render<any>['bindings']>;
96
+ }
25
97
  /** The vector mark lets you place shapes (like arrows) on your plot. */
26
- declare const Vector: import("svelte").Component<VectorMarkProps, {}, "">;
27
- type Vector = ReturnType<typeof Vector>;
98
+ declare const Vector: $$IsomorphicComponent;
99
+ type Vector<Datum extends DataRecord> = InstanceType<typeof Vector<Datum>>;
28
100
  export default Vector;
@@ -5,7 +5,7 @@
5
5
  PlotContext,
6
6
  ScaledDataRecord,
7
7
  UsedScales
8
- } from '../../types.js';
8
+ } from '../../types/index.js';
9
9
  import { resolveProp, resolveScaledStyleProps } from '../../helpers/resolve.js';
10
10
  import { getContext } from 'svelte';
11
11
  import { type Area } from 'd3-shape';
@@ -1,4 +1,4 @@
1
- import type { Mark, BaseMarkProps, ScaledDataRecord, UsedScales } from '../../types.js';
1
+ import type { Mark, BaseMarkProps, ScaledDataRecord, UsedScales } from '../../types/index.js';
2
2
  import { type Area } from 'd3-shape';
3
3
  type $$ComponentProps = {
4
4
  mark: Mark<BaseMarkProps>;
@@ -10,7 +10,7 @@
10
10
  PlotState,
11
11
  RawValue,
12
12
  ScaleType
13
- } from '../../types.js';
13
+ } from '../../types/index.js';
14
14
  import { resolveProp, resolveStyles } from '../../helpers/resolve.js';
15
15
  import { max } from 'd3-array';
16
16
  import { randomId, testFilter } from '../../helpers/index.js';
@@ -160,7 +160,8 @@
160
160
  tick,
161
161
  options,
162
162
  'stroke',
163
- { x: true }
163
+ { x: true },
164
+ true
164
165
  )}
165
166
  <line
166
167
  style={tickLineStyle}
@@ -185,7 +186,8 @@
185
186
  stroke: null
186
187
  },
187
188
  'fill',
188
- { x: true }
189
+ { x: true },
190
+ true
189
191
  )}
190
192
  <text
191
193
  bind:this={tickTextElements[t]}
@@ -1,4 +1,4 @@
1
- import type { ChannelAccessor, ConstantAccessor, PlotState, RawValue, ScaleType } from '../../types.js';
1
+ import type { ChannelAccessor, ConstantAccessor, PlotState, RawValue, ScaleType } from '../../types/index.js';
2
2
  type BaseAxisXProps = {
3
3
  scaleFn: (d: RawValue) => number;
4
4
  scaleType: ScaleType;
@@ -9,7 +9,7 @@
9
9
  PlotState,
10
10
  RawValue,
11
11
  ScaleType
12
- } from '../../types.js';
12
+ } from '../../types/index.js';
13
13
 
14
14
  type BaseAxisYProps = {
15
15
  scaleFn: (d: RawValue) => number;
@@ -21,12 +21,14 @@
21
21
  tickSize: number;
22
22
  tickPadding: number;
23
23
  tickFontSize: ConstantAccessor<number>;
24
+ tickClass: ConstantAccessor<number>;
24
25
  marginLeft: number;
25
26
  width: number;
26
27
  title: string | null;
27
28
  options: {
28
29
  dx: ConstantAccessor<number>;
29
30
  dy: ConstantAccessor<number>;
31
+ textAnchor: 'start' | 'middle' | 'end';
30
32
  };
31
33
  plot: PlotState;
32
34
  text: boolean | null;
@@ -93,6 +95,8 @@
93
95
  // generate id used for registering margins
94
96
  const id = randomId();
95
97
 
98
+ $inspect({ options });
99
+
96
100
  const { autoMarginLeft, autoMarginRight, autoMarginTop } =
97
101
  getContext<AutoMarginStores>('svelteplot/autoMargins');
98
102
 
@@ -129,7 +133,7 @@
129
133
  untrack(() => [$autoMarginTop]);
130
134
  if (title) {
131
135
  // add margin top to make some space for title
132
- $autoMarginTop.set(id, 20);
136
+ $autoMarginTop.set(id, 27);
133
137
  } else {
134
138
  // no need for extra margin top
135
139
  $autoMarginTop.delete(id);
@@ -160,7 +164,8 @@
160
164
  stroke: null
161
165
  },
162
166
  'fill',
163
- { y: true }
167
+ { y: true },
168
+ true
164
169
  )}
165
170
  <g
166
171
  class="tick {tickClass_ || ''}"
@@ -173,7 +178,8 @@
173
178
  tick,
174
179
  options,
175
180
  'stroke',
176
- { y: true }
181
+ { y: true },
182
+ true
177
183
  )}
178
184
  <line
179
185
  style={tickLineStyle}
@@ -199,10 +205,6 @@
199
205
  stroke: currentColor;
200
206
  }
201
207
  text {
202
- opacity: 0.8;
203
208
  fill: currentColor;
204
209
  }
205
- text.is-left {
206
- text-anchor: end;
207
- }
208
210
  </style>
@@ -1,4 +1,4 @@
1
- import type { ConstantAccessor, PlotState, RawValue, ScaleType } from '../../types.js';
1
+ import type { ConstantAccessor, PlotState, RawValue, ScaleType } from '../../types/index.js';
2
2
  type BaseAxisYProps = {
3
3
  scaleFn: (d: RawValue) => number;
4
4
  scaleType: ScaleType;
@@ -9,12 +9,14 @@ type BaseAxisYProps = {
9
9
  tickSize: number;
10
10
  tickPadding: number;
11
11
  tickFontSize: ConstantAccessor<number>;
12
+ tickClass: ConstantAccessor<number>;
12
13
  marginLeft: number;
13
14
  width: number;
14
15
  title: string | null;
15
16
  options: {
16
17
  dx: ConstantAccessor<number>;
17
18
  dy: ConstantAccessor<number>;
19
+ textAnchor: 'start' | 'middle' | 'end';
18
20
  };
19
21
  plot: PlotState;
20
22
  text: boolean | null;
@@ -1,6 +1,6 @@
1
1
  <script lang="ts">
2
2
  import { getContext } from 'svelte';
3
- import type { PlotContext } from '../../types';
3
+ import type { PlotContext } from '../..';
4
4
  import { devicePixelRatio } from 'svelte/reactivity/window';
5
5
  import { MediaQuery } from 'svelte/reactivity';
6
6
  import type { Attachment } from 'svelte/attachments';
@@ -5,7 +5,7 @@
5
5
  BaseMarkProps,
6
6
  ScaledDataRecord,
7
7
  PlotContext
8
- } from '../../types.js';
8
+ } from '../../types/index.js';
9
9
  import { resolveProp } from '../../helpers/resolve.js';
10
10
  import { maybeSymbol } from '../../helpers/symbols.js';
11
11
  import { symbol as d3Symbol } from 'd3-shape';
@@ -1,4 +1,4 @@
1
- import type { PlotState, Mark, BaseMarkProps, ScaledDataRecord } from '../../types.js';
1
+ import type { PlotState, Mark, BaseMarkProps, ScaledDataRecord } from '../../types/index.js';
2
2
  type $$ComponentProps = {
3
3
  mark: Mark<BaseMarkProps>;
4
4
  plot: PlotState;
@@ -5,7 +5,7 @@
5
5
  PlotContext,
6
6
  ScaledDataRecord,
7
7
  UsedScales
8
- } from '../../types.js';
8
+ } from '../../types/index.js';
9
9
  import { CSS_VAR } from '../../constants.js';
10
10
  import { resolveProp, resolveScaledStyleProps } from '../../helpers/resolve.js';
11
11
  import { getContext } from 'svelte';
@@ -1,4 +1,4 @@
1
- import type { Mark, BaseMarkProps, ScaledDataRecord, UsedScales } from '../../types.js';
1
+ import type { Mark, BaseMarkProps, ScaledDataRecord, UsedScales } from '../../types/index.js';
2
2
  import { type GeoPath } from 'd3-geo';
3
3
  type $$ComponentProps = {
4
4
  mark: Mark<BaseMarkProps>;
@@ -5,7 +5,7 @@
5
5
  PlotContext,
6
6
  ScaledDataRecord,
7
7
  UsedScales
8
- } from '../../types.js';
8
+ } from '../../types/index.js';
9
9
  import { resolveProp, resolveScaledStyleProps } from '../../helpers/resolve.js';
10
10
  import { getContext } from 'svelte';
11
11
  import { type Line } from 'd3-shape';
@@ -1,4 +1,4 @@
1
- import type { Mark, BaseMarkProps, ScaledDataRecord, UsedScales } from '../../types.js';
1
+ import type { Mark, BaseMarkProps, ScaledDataRecord, UsedScales } from '../../types/index.js';
2
2
  import { type Line } from 'd3-shape';
3
3
  type $$ComponentProps = {
4
4
  mark: Mark<BaseMarkProps>;
@@ -1,6 +1,6 @@
1
1
  <script lang="ts">
2
2
  import { getContext } from 'svelte';
3
- import type { PlotContext, RawValue } from '../../types';
3
+ import type { PlotContext, RawValue } from '../..';
4
4
 
5
5
  let {
6
6
  id,
@@ -1,4 +1,4 @@
1
- import type { RawValue } from '../../types';
1
+ import type { RawValue } from '../..';
2
2
  type $$ComponentProps = {
3
3
  id: string;
4
4
  stops: {
@@ -1,6 +1,6 @@
1
1
  <script lang="ts">
2
2
  import { getContext } from 'svelte';
3
- import type { PlotContext, RawValue } from '../../types';
3
+ import type { PlotContext, RawValue } from '../..';
4
4
 
5
5
  let {
6
6
  id,
@@ -1,4 +1,4 @@
1
- import type { RawValue } from '../../types';
1
+ import type { RawValue } from '../..';
2
2
  type $$ComponentProps = {
3
3
  id: string;
4
4
  stops: {
@@ -13,7 +13,7 @@
13
13
  Mark,
14
14
  PlotContext,
15
15
  PlotScales
16
- } from '../../types.js';
16
+ } from '../../types/index.js';
17
17
  import { addEventHandlers } from './events.js';
18
18
  import { getContext } from 'svelte';
19
19
 
@@ -1,44 +1,4 @@
1
- import { type MarkerShape } from './Marker.svelte';
2
- import type { BaseMarkProps, ConstantAccessor, DataRecord, Mark, PlotScales } from '../../types.js';
3
- type MarkerPathProps = BaseMarkProps & {
4
- /**
5
- * the datum associated with this path, usually the first
6
- * element of the data array group
7
- */
8
- datum: DataRecord;
9
- /**
10
- * the marker shape to use at the start of the path, defaults to
11
- * circle
12
- */
13
- markerStart?: boolean | MarkerShape;
14
- /**
15
- * the marker shape to use at the middle of the path, defaults to circle
16
- */
17
- markerMid?: boolean | MarkerShape;
18
- /**
19
- * the marker shape to use at the end of the path, defaults to circle
20
- */
21
- markerEnd?: boolean | MarkerShape;
22
- /**
23
- * shorthand for setting all markers
24
- */
25
- marker?: boolean | MarkerShape;
26
- /**
27
- * path string
28
- */
29
- d: string;
30
- style: string;
31
- startOffset: string;
32
- textStyle: string;
33
- textStyleClass?: string | null;
34
- text: string;
35
- transform: string;
36
- color: string;
37
- strokeWidth: ConstantAccessor<number>;
38
- mark: Mark<BaseMarkProps>;
39
- scales: PlotScales;
40
- };
41
1
  /** Helper component for paths with markers and optional text along the path. */
42
- declare const MarkerPath: import("svelte").Component<MarkerPathProps, {}, "">;
2
+ declare const MarkerPath: import("svelte").Component<any, {}, "">;
43
3
  type MarkerPath = ReturnType<typeof MarkerPath>;
44
4
  export default MarkerPath;