svelteplot 0.10.2 → 0.10.3-pr-370.1

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 (118) hide show
  1. package/LICENSE.md +1 -1
  2. package/dist/Mark.svelte.d.ts +4 -4
  3. package/dist/constants.d.ts +1 -1
  4. package/dist/helpers/colors.d.ts +8 -11
  5. package/dist/helpers/curves.d.ts +2 -2
  6. package/dist/helpers/facets.d.ts +1 -1
  7. package/dist/helpers/getBaseStyles.d.ts +2 -4
  8. package/dist/helpers/index.d.ts +1 -1
  9. package/dist/helpers/reduce.d.ts +1 -1
  10. package/dist/helpers/scales.d.ts +7 -7
  11. package/dist/helpers/symbols.d.ts +1 -1
  12. package/dist/helpers/time.d.ts +3 -3
  13. package/dist/helpers/typeChecks.d.ts +4 -4
  14. package/dist/marks/Area.svelte.d.ts +5 -4
  15. package/dist/marks/AreaX.svelte.d.ts +4 -4
  16. package/dist/marks/AreaY.svelte.d.ts +4 -4
  17. package/dist/marks/Arrow.svelte.d.ts +5 -4
  18. package/dist/marks/AxisX.svelte +13 -0
  19. package/dist/marks/AxisX.svelte.d.ts +19 -5
  20. package/dist/marks/AxisY.svelte +15 -0
  21. package/dist/marks/AxisY.svelte.d.ts +21 -5
  22. package/dist/marks/BarX.svelte.d.ts +4 -4
  23. package/dist/marks/BarY.svelte.d.ts +5 -4
  24. package/dist/marks/BollingerX.svelte +3 -0
  25. package/dist/marks/BollingerX.svelte.d.ts +2 -77
  26. package/dist/marks/BollingerY.svelte +3 -0
  27. package/dist/marks/BollingerY.svelte.d.ts +2 -77
  28. package/dist/marks/BoxY.svelte +3 -0
  29. package/dist/marks/BoxY.svelte.d.ts +4 -64
  30. package/dist/marks/Brush.svelte +4 -0
  31. package/dist/marks/Brush.svelte.d.ts +5 -64
  32. package/dist/marks/Cell.svelte.d.ts +5 -4
  33. package/dist/marks/CellX.svelte.d.ts +30 -30
  34. package/dist/marks/CellY.svelte.d.ts +30 -30
  35. package/dist/marks/ColorLegend.svelte +1 -0
  36. package/dist/marks/ColorLegend.svelte.d.ts +1 -0
  37. package/dist/marks/CustomMark.svelte +11 -0
  38. package/dist/marks/CustomMark.svelte.d.ts +2 -85
  39. package/dist/marks/CustomMarkHTML.svelte +6 -0
  40. package/dist/marks/CustomMarkHTML.svelte.d.ts +6 -0
  41. package/dist/marks/DifferenceY.svelte +5 -1
  42. package/dist/marks/DifferenceY.svelte.d.ts +8 -64
  43. package/dist/marks/Dot.svelte.d.ts +5 -4
  44. package/dist/marks/DotX.svelte.d.ts +5 -5
  45. package/dist/marks/DotY.svelte.d.ts +5 -5
  46. package/dist/marks/Frame.svelte +11 -0
  47. package/dist/marks/Frame.svelte.d.ts +17 -5
  48. package/dist/marks/Geo.svelte +3 -0
  49. package/dist/marks/Geo.svelte.d.ts +8 -4
  50. package/dist/marks/Graticule.svelte +3 -0
  51. package/dist/marks/Graticule.svelte.d.ts +3 -0
  52. package/dist/marks/GridX.svelte +4 -0
  53. package/dist/marks/GridX.svelte.d.ts +9 -4
  54. package/dist/marks/GridY.svelte +4 -0
  55. package/dist/marks/GridY.svelte.d.ts +9 -4
  56. package/dist/marks/HTMLTooltip.svelte +7 -0
  57. package/dist/marks/HTMLTooltip.svelte.d.ts +7 -0
  58. package/dist/marks/Image.svelte.d.ts +5 -4
  59. package/dist/marks/Line.svelte.d.ts +4 -4
  60. package/dist/marks/LineX.svelte.d.ts +6 -6
  61. package/dist/marks/LineY.svelte.d.ts +6 -6
  62. package/dist/marks/Link.svelte +3 -1
  63. package/dist/marks/Link.svelte.d.ts +8 -4
  64. package/dist/marks/Pointer.svelte +7 -0
  65. package/dist/marks/Pointer.svelte.d.ts +7 -0
  66. package/dist/marks/Rect.svelte.d.ts +5 -4
  67. package/dist/marks/RuleX.svelte.d.ts +5 -4
  68. package/dist/marks/RuleY.svelte.d.ts +5 -4
  69. package/dist/marks/Spike.svelte +6 -0
  70. package/dist/marks/Spike.svelte.d.ts +11 -5
  71. package/dist/marks/Text.svelte.d.ts +9 -8
  72. package/dist/marks/TickX.svelte +2 -0
  73. package/dist/marks/TickX.svelte.d.ts +7 -4
  74. package/dist/marks/TickY.svelte +5 -3
  75. package/dist/marks/TickY.svelte.d.ts +10 -7
  76. package/dist/marks/Trail.svelte +11 -0
  77. package/dist/marks/Trail.svelte.d.ts +12 -64
  78. package/dist/marks/Vector.svelte +9 -0
  79. package/dist/marks/Vector.svelte.d.ts +14 -4
  80. package/dist/marks/WaffleX.svelte +6 -4
  81. package/dist/marks/WaffleX.svelte.d.ts +2 -86
  82. package/dist/marks/WaffleY.svelte +5 -4
  83. package/dist/marks/WaffleY.svelte.d.ts +10 -8
  84. package/dist/marks/helpers/Box.svelte.d.ts +1 -64
  85. package/dist/marks/helpers/MarkerPath.svelte.d.ts +2 -107
  86. package/dist/marks/helpers/Regression.svelte +6 -3
  87. package/dist/marks/helpers/Regression.svelte.d.ts +6 -0
  88. package/dist/transforms/bollinger.d.ts +8 -0
  89. package/dist/transforms/bollinger.js +8 -0
  90. package/dist/transforms/centroid.d.ts +5 -4
  91. package/dist/transforms/centroid.js +4 -0
  92. package/dist/transforms/dodge.d.ts +11 -0
  93. package/dist/transforms/dodge.js +6 -0
  94. package/dist/transforms/interval.d.ts +8 -8
  95. package/dist/transforms/jitter.d.ts +9 -0
  96. package/dist/transforms/jitter.js +9 -0
  97. package/dist/transforms/recordize.d.ts +16 -7
  98. package/dist/transforms/recordize.js +10 -6
  99. package/dist/transforms/rename.d.ts +5 -1
  100. package/dist/transforms/rename.js +4 -0
  101. package/dist/transforms/select.d.ts +36 -28
  102. package/dist/transforms/select.js +8 -0
  103. package/dist/transforms/shift.d.ts +8 -0
  104. package/dist/transforms/shift.js +6 -0
  105. package/dist/transforms/sort.d.ts +18 -19
  106. package/dist/transforms/sort.js +4 -0
  107. package/dist/transforms/stack.d.ts +32 -12
  108. package/dist/transforms/stack.js +14 -0
  109. package/dist/transforms/window.d.ts +13 -136
  110. package/dist/transforms/window.js +6 -0
  111. package/dist/types/channel.d.ts +12 -0
  112. package/dist/types/data.d.ts +13 -0
  113. package/dist/types/facet.d.ts +5 -0
  114. package/dist/types/index.d.ts +18 -0
  115. package/dist/types/mark.d.ts +62 -0
  116. package/dist/types/plot.d.ts +31 -0
  117. package/dist/types/scale.d.ts +98 -0
  118. package/package.json +13 -5
package/LICENSE.md CHANGED
@@ -1,4 +1,4 @@
1
- Copyright 2024-2025, Gregor Aisch
1
+ Copyright 2024-2026, Gregor Aisch
2
2
 
3
3
  Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.
4
4
 
@@ -9,14 +9,14 @@ declare function $$render<Datum extends DataRecord>(): {
9
9
  fy: ChannelAccessor<Datum>;
10
10
  dx: import("./types/index.js").ConstantAccessor<number, Datum>;
11
11
  dy: import("./types/index.js").ConstantAccessor<number, Datum>;
12
- dodgeX: import("./transforms/dodge.js").DodgeXOptions;
13
- dodgeY: import("./transforms/dodge.js").DodgeYOptions;
12
+ dodgeX: DodgeXOptions;
13
+ dodgeY: DodgeYOptions;
14
14
  fill: ChannelAccessor<Datum>;
15
15
  fillOpacity: import("./types/index.js").ConstantAccessor<number, Datum>;
16
- sort: ((a: RawValue, b: RawValue) => number) | {
16
+ sort: {
17
17
  channel: string;
18
18
  order?: "ascending" | "descending";
19
- } | import("./types/index.js").ConstantAccessor<RawValue, Datum>;
19
+ } | ((a: RawValue, b: RawValue) => number) | import("./types/index.js").ConstantAccessor<RawValue, Datum>;
20
20
  stroke: ChannelAccessor<Datum>;
21
21
  strokeWidth: import("./types/index.js").ConstantAccessor<number, Datum>;
22
22
  strokeOpacity: import("./types/index.js").ConstantAccessor<number, Datum>;
@@ -13,6 +13,6 @@ export declare const CSS_COLOR_MIX: RegExp;
13
13
  export declare const CSS_COLOR_CONTRAST: RegExp;
14
14
  export declare const CSS_RGBA: RegExp;
15
15
  export declare const CSS_URL: RegExp;
16
- export declare const INDEX: unique symbol;
16
+ export declare const INDEX: any;
17
17
  export declare const PI: number;
18
18
  export declare const TAU: number;
@@ -1,13 +1,10 @@
1
- import { interpolateBrBG } from 'd3-scale-chromatic';
2
1
  import type { ColorScheme } from '../types/index.js';
3
- export declare const categoricalSchemes: Map<string, readonly string[]>;
4
- export declare function isCategoricalScheme(scheme: string): boolean;
5
- type SchemeGetter = (n: number) => readonly string[];
2
+ export declare const categoricalSchemes: any;
3
+ export declare function isCategoricalScheme(scheme: string): any;
6
4
  export declare function isOrdinalScheme(scheme: ColorScheme): boolean;
7
- export declare function ordinalScheme(scheme: ColorScheme | string): SchemeGetter;
8
- export declare function ordinalRange(scheme: ColorScheme | string, length: number): readonly string[];
9
- export declare function maybeBooleanRange(domain: boolean[], scheme?: ColorScheme | string): unknown[] | undefined;
10
- export declare function isQuantitativeScheme(scheme: string): boolean;
11
- export declare function quantitativeScheme(scheme: ColorScheme | string): typeof interpolateBrBG | undefined;
12
- export declare function isDivergingScheme(scheme: string): boolean;
13
- export {};
5
+ export declare function ordinalScheme(scheme: ColorScheme | string): any;
6
+ export declare function ordinalRange(scheme: ColorScheme | string, length: number): any;
7
+ export declare function maybeBooleanRange(domain: boolean[], scheme?: ColorScheme | string): any[] | undefined;
8
+ export declare function isQuantitativeScheme(scheme: string): any;
9
+ export declare function quantitativeScheme(scheme: ColorScheme | string): any;
10
+ export declare function isDivergingScheme(scheme: string): any;
@@ -1,3 +1,3 @@
1
1
  import type { CurveName } from '../types/index.js';
2
- import { type CurveFactory, type CurveBundleFactory } from 'd3-shape';
3
- export declare function maybeCurve(curve: (CurveName | CurveFactory) | undefined, tension: number): CurveFactory | CurveBundleFactory;
2
+ import { type CurveFactory } from 'd3-shape';
3
+ export declare function maybeCurve(curve: (CurveName | CurveFactory) | undefined, tension: number): any;
@@ -9,4 +9,4 @@ import type { GenericMarkOptions, Mark, RawValue } from '../types/index.js';
9
9
  * @param fyValues y facet domain
10
10
  * @returns
11
11
  */
12
- export declare function getEmptyFacets(marks: Mark<GenericMarkOptions>[], fxValues: RawValue[], fyValues: RawValue[]): Map<RawValue, Map<RawValue, boolean>>;
12
+ export declare function getEmptyFacets(marks: Mark<GenericMarkOptions>[], fxValues: RawValue[], fyValues: RawValue[]): any;
@@ -1,8 +1,6 @@
1
1
  import type { Channels } from '../types/index.js';
2
- export declare function getBaseStylesObject<T>(datum: T, props: Partial<Channels<T>>): {
3
- [k: string]: string | number;
4
- };
5
- export default function <T>(datum: T, props: Partial<Channels<T>>): string;
2
+ export declare function getBaseStylesObject<T>(datum: T, props: Partial<Channels<T>>): any;
3
+ export default function <T>(datum: T, props: Partial<Channels<T>>): any;
6
4
  export declare function maybeToPixel(cssKey: string, value: string | number): string | number;
7
5
  export declare function maybeFromPixel(value: string | number): string | number;
8
6
  export declare function maybeFromRem(value: string | number, rootFontSize?: number): string | number;
@@ -15,4 +15,4 @@ export declare const POSITION_CHANNELS: Set<ChannelName>;
15
15
  export declare function parseInset(inset: number | string, width: number): number;
16
16
  export declare function omit<T extends {}, K extends keyof T>(obj: T, ...keys: K[]): Omit<T, K>;
17
17
  export declare function identity<T>(x: T): T;
18
- export declare const GEOJSON_PREFER_STROKE: Set<string>;
18
+ export declare const GEOJSON_PREFER_STROKE: any;
@@ -4,7 +4,7 @@ type ReducerOption = ReducerName | ReducerFunc;
4
4
  type Digit = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9;
5
5
  export type ReducerPercentile = (`p${Digit}${Digit}` & Record<never, never>) | 'p25' | 'p50' | 'p75';
6
6
  export type ReducerName = 'count' | 'deviation' | 'difference' | 'first' | 'last' | 'max' | 'mean' | 'median' | 'min' | 'mode' | 'ratio' | 'sum' | 'variance' | ReducerPercentile;
7
- export declare const Reducer: Record<ReducerName, ReducerFunc>;
7
+ export declare const Reducer: any;
8
8
  export declare function mayberReducer(r: ReducerOption): ReducerFunc;
9
9
  export declare function reduceOutputs(newDatum: DataRecord, data: DataRecord[], options: Record<ChannelName, ReducerOption>, outputs: Iterable<ChannelName>, channels: Channels, newChannels: Channels): void;
10
10
  export {};
@@ -1,4 +1,4 @@
1
- import type { ChannelAccessor, GenericMarkOptions, Mark, MarkType, PlotDefaults, PlotOptions, PlotScales, PlotState, RawValue, ScaleName, ScaleOptions, ScaleType, ScaledChannelName, UsedScales } from '../types/index.js';
1
+ import type { GenericMarkOptions, Mark, MarkType, PlotDefaults, PlotOptions, PlotScales, PlotState, RawValue, ScaleName, ScaleOptions, ScaleType, UsedScales } from '../types/index.js';
2
2
  /**
3
3
  * compute the plot scales
4
4
  */
@@ -8,19 +8,19 @@ export declare function createScale<T extends ScaleOptions>(name: ScaleName, sca
8
8
  domain: number[];
9
9
  range: number[];
10
10
  fn: (() => string) | (() => number);
11
- skip: Map<any, any>;
11
+ skip: any;
12
12
  isDummy: boolean;
13
13
  manualActiveMarks?: undefined;
14
14
  uniqueScaleProps?: undefined;
15
15
  autoTitle?: undefined;
16
16
  } | {
17
17
  type: ScaleType;
18
- domain: RawValue[] | [undefined, undefined];
18
+ domain: any;
19
19
  range: any;
20
20
  fn: any;
21
- skip: Map<ScaledChannelName, Set<symbol>>;
21
+ skip: any;
22
22
  manualActiveMarks: number;
23
- uniqueScaleProps: Set<ChannelAccessor>;
23
+ uniqueScaleProps: any;
24
24
  autoTitle: string | null;
25
25
  isDummy?: undefined;
26
26
  };
@@ -36,8 +36,8 @@ export declare function inferScaleType(name: ScaleName, dataValues: RawValue[],
36
36
  * not. That's what this function is used for.
37
37
  */
38
38
  export declare function getUsedScales(plot: PlotState, options: GenericMarkOptions, mark: Mark<GenericMarkOptions>): UsedScales;
39
- export declare function looksLikeANumber(input: string | number): boolean;
39
+ export declare function looksLikeANumber(input: string | number): any;
40
40
  export declare function projectXY(scales: PlotScales, x: RawValue, y: RawValue, useXScale?: boolean, useYScale?: boolean): [number, number];
41
41
  export declare function projectX(channel: 'x' | 'x1' | 'x2', scales: PlotScales, value: RawValue): number;
42
42
  export declare function projectY(channel: 'y' | 'y1' | 'y2', scales: PlotScales, value: RawValue): number;
43
- export declare function isOrdinalScale(scaleType: ScaleType): scaleType is "ordinal" | "point" | "band" | "categorical" | "threshold";
43
+ export declare function isOrdinalScale(scaleType: ScaleType): scaleType is "point" | "ordinal" | "band" | "categorical" | "threshold";
@@ -3,5 +3,5 @@ export declare const sqrt3: number;
3
3
  export declare const sqrt4_3: number;
4
4
  type BuiltinSymbol = 'asterisk' | 'circle' | 'cross' | 'diamond' | 'diamond2' | 'hexagon' | 'plus' | 'square' | 'square2' | 'star' | 'times' | 'triangle' | 'triangle2' | 'wye';
5
5
  export declare function isSymbol(value: any): value is SymbolType | BuiltinSymbol;
6
- export declare function maybeSymbol(symbol: SymbolType | string): SymbolType;
6
+ export declare function maybeSymbol(symbol: SymbolType | string): any;
7
7
  export {};
@@ -1,6 +1,6 @@
1
- export declare const durations: Map<string, number>;
2
- export declare const intervalDuration: unique symbol;
3
- export declare const intervalType: unique symbol;
1
+ export declare const durations: any;
2
+ export declare const intervalDuration: any;
3
+ export declare const intervalType: any;
4
4
  export declare function parseTimeInterval(input: string): [string, number];
5
5
  export declare function maybeTimeInterval(input: string): any;
6
6
  export declare function maybeUtcInterval(input: string): any;
@@ -2,9 +2,9 @@ import type { RawValue } from '../types/index.js';
2
2
  export declare function isBooleanOrNull(v: RawValue): v is boolean | null;
3
3
  export declare function isDate(v: RawValue): v is Date;
4
4
  export declare function isDateOrNull(v: RawValue | null | undefined): v is Date | null | undefined;
5
- export declare function isNumberOrNull(v: RawValue | null | undefined): boolean;
6
- export declare function isNumberOrNullOrNaN(v: RawValue | null | undefined): boolean;
5
+ export declare function isNumberOrNull(v: RawValue | null | undefined): any;
6
+ export declare function isNumberOrNullOrNaN(v: RawValue | null | undefined): any;
7
7
  export declare function isStringOrNull(v: RawValue | null | undefined): v is string | null | undefined;
8
- export declare function isSymbolOrNull(v: RawValue | null | undefined): v is ("square" | "circle" | "asterisk" | "cross" | "diamond" | "diamond2" | "hexagon" | "plus" | "square2" | "star" | "times" | "triangle" | "triangle2" | "wye") | import("d3-shape").SymbolType | null | undefined;
8
+ export declare function isSymbolOrNull(v: RawValue | null | undefined): v is ("circle" | "square" | "asterisk" | "cross" | "diamond" | "diamond2" | "hexagon" | "plus" | "square2" | "star" | "times" | "triangle" | "triangle2" | "wye") | import("d3-shape").SymbolType | null | undefined;
9
9
  export declare function isColorOrNull(v: RawValue | null | undefined): boolean;
10
- export declare function isOpacityOrNull(v: RawValue): boolean;
10
+ export declare function isOpacityOrNull(v: RawValue): any;
@@ -1,6 +1,7 @@
1
1
  import { type CurveFactory } from 'd3-shape';
2
2
  import type { CurveName, DataRecord, ConstantAccessor, ChannelAccessor, LinkableMarkProps, RawValue } from '../types/index.js';
3
3
  import type { StackOptions } from '../transforms/stack.js';
4
+ import { usePlot } from '../hooks/usePlot.svelte.js';
4
5
  declare function $$render<Datum extends DataRecord>(): {
5
6
  props: Partial<{
6
7
  filter: ConstantAccessor<boolean, Datum>;
@@ -9,14 +10,14 @@ declare function $$render<Datum extends DataRecord>(): {
9
10
  fy: ChannelAccessor<Datum>;
10
11
  dx: ConstantAccessor<number, Datum>;
11
12
  dy: ConstantAccessor<number, Datum>;
12
- dodgeX: import("../transforms/dodge").DodgeXOptions;
13
- dodgeY: import("../transforms/dodge").DodgeYOptions;
13
+ dodgeX: usePlot;
14
+ dodgeY: usePlot;
14
15
  fill: ChannelAccessor<Datum>;
15
16
  fillOpacity: ConstantAccessor<number, Datum>;
16
- sort: ((a: RawValue, b: RawValue) => number) | {
17
+ sort: {
17
18
  channel: string;
18
19
  order?: "ascending" | "descending";
19
- } | ConstantAccessor<RawValue, Datum>;
20
+ } | ((a: RawValue, b: RawValue) => number) | ConstantAccessor<RawValue, Datum>;
20
21
  stroke: ChannelAccessor<Datum>;
21
22
  strokeWidth: ConstantAccessor<number, Datum>;
22
23
  strokeOpacity: ConstantAccessor<number, Datum>;
@@ -7,14 +7,14 @@ declare function $$render<Datum extends DataRow>(): {
7
7
  fy: ChannelAccessor<Record<string | symbol, import("../types/data").RawValue>>;
8
8
  dx: import("../types/index.js").ConstantAccessor<number, Record<string | symbol, import("../types/data").RawValue>>;
9
9
  dy: import("../types/index.js").ConstantAccessor<number, Record<string | symbol, import("../types/data").RawValue>>;
10
- dodgeX: import("../transforms/dodge").DodgeXOptions;
11
- dodgeY: import("../transforms/dodge").DodgeYOptions;
10
+ dodgeX: DodgeXOptions;
11
+ dodgeY: DodgeYOptions;
12
12
  fill: ChannelAccessor<Record<string | symbol, import("../types/data").RawValue>>;
13
13
  fillOpacity: import("../types/index.js").ConstantAccessor<number, Record<string | symbol, import("../types/data").RawValue>>;
14
- sort: ((a: import("../types/data").RawValue, b: import("../types/data").RawValue) => number) | {
14
+ sort: {
15
15
  channel: string;
16
16
  order?: "ascending" | "descending";
17
- } | import("../types/index.js").ConstantAccessor<import("../types/data").RawValue, Record<string | symbol, import("../types/data").RawValue>>;
17
+ } | ((a: import("../types/data").RawValue, b: import("../types/data").RawValue) => number) | import("../types/index.js").ConstantAccessor<import("../types/data").RawValue, Record<string | symbol, import("../types/data").RawValue>>;
18
18
  stroke: ChannelAccessor<Record<string | symbol, import("../types/data").RawValue>>;
19
19
  strokeWidth: import("../types/index.js").ConstantAccessor<number, Record<string | symbol, import("../types/data").RawValue>>;
20
20
  strokeOpacity: import("../types/index.js").ConstantAccessor<number, Record<string | symbol, import("../types/data").RawValue>>;
@@ -7,14 +7,14 @@ declare function $$render<Datum extends DataRow>(): {
7
7
  fy: ChannelAccessor<Record<string | symbol, import("../types/data").RawValue>>;
8
8
  dx: import("../types/index.js").ConstantAccessor<number, Record<string | symbol, import("../types/data").RawValue>>;
9
9
  dy: import("../types/index.js").ConstantAccessor<number, Record<string | symbol, import("../types/data").RawValue>>;
10
- dodgeX: import("../transforms/dodge").DodgeXOptions;
11
- dodgeY: import("../transforms/dodge").DodgeYOptions;
10
+ dodgeX: DodgeXOptions;
11
+ dodgeY: DodgeYOptions;
12
12
  fill: ChannelAccessor<Record<string | symbol, import("../types/data").RawValue>>;
13
13
  fillOpacity: import("../types/index.js").ConstantAccessor<number, Record<string | symbol, import("../types/data").RawValue>>;
14
- sort: ((a: import("../types/data").RawValue, b: import("../types/data").RawValue) => number) | {
14
+ sort: {
15
15
  channel: string;
16
16
  order?: "ascending" | "descending";
17
- } | import("../types/index.js").ConstantAccessor<import("../types/data").RawValue, Record<string | symbol, import("../types/data").RawValue>>;
17
+ } | ((a: import("../types/data").RawValue, b: import("../types/data").RawValue) => number) | import("../types/index.js").ConstantAccessor<import("../types/data").RawValue, Record<string | symbol, import("../types/data").RawValue>>;
18
18
  stroke: ChannelAccessor<Record<string | symbol, import("../types/data").RawValue>>;
19
19
  strokeWidth: import("../types/index.js").ConstantAccessor<number, Record<string | symbol, import("../types/data").RawValue>>;
20
20
  strokeOpacity: import("../types/index.js").ConstantAccessor<number, Record<string | symbol, import("../types/data").RawValue>>;
@@ -1,5 +1,6 @@
1
1
  import type { DataRecord, ConstantAccessor, ChannelAccessor, RawValue } from '../types/index.js';
2
2
  import { type SweepOption } from '../helpers/arrowPath.js';
3
+ import { indexData } from '../transforms/recordize.js';
3
4
  declare function $$render<Datum extends DataRecord>(): {
4
5
  props: Omit<Partial<{
5
6
  filter: ConstantAccessor<boolean, Datum>;
@@ -8,14 +9,14 @@ declare function $$render<Datum extends DataRecord>(): {
8
9
  fy: ChannelAccessor<Datum>;
9
10
  dx: ConstantAccessor<number, Datum>;
10
11
  dy: ConstantAccessor<number, Datum>;
11
- dodgeX: import("../transforms/dodge.js").DodgeXOptions;
12
- dodgeY: import("../transforms/dodge.js").DodgeYOptions;
12
+ dodgeX: indexData;
13
+ dodgeY: indexData;
13
14
  fill: ChannelAccessor<Datum>;
14
15
  fillOpacity: ConstantAccessor<number, Datum>;
15
- sort: ((a: RawValue, b: RawValue) => number) | {
16
+ sort: {
16
17
  channel: string;
17
18
  order?: "ascending" | "descending";
18
- } | ConstantAccessor<RawValue, Datum>;
19
+ } | ((a: RawValue, b: RawValue) => number) | ConstantAccessor<RawValue, Datum>;
19
20
  stroke: ChannelAccessor<Datum>;
20
21
  strokeWidth: ConstantAccessor<number, Datum>;
21
22
  strokeOpacity: ConstantAccessor<number, Datum>;
@@ -24,22 +24,35 @@
24
24
  BaseMarkProps<Datum>,
25
25
  'fillOpacity' | 'paintOrder' | 'title' | 'href' | 'target'
26
26
  > {
27
+ /** custom tick values to display on the axis */
27
28
  data?: Datum[];
29
+ /** whether this axis was automatically added by the Plot component */
28
30
  automatic?: boolean;
31
+ /** the axis title label; set to false or null to hide */
29
32
  title?: string | false | null;
33
+ /** which edge of the plot the axis appears on */
30
34
  anchor?: 'top' | 'bottom';
35
+ /** the interval between ticks, e.g. "day", "month", or a number */
31
36
  interval?: string | number;
37
+ /** controls which facet edge displays this axis */
32
38
  facetAnchor?: 'auto' | 'top-empty' | 'bottom-empty' | 'top' | 'bottom';
39
+ /** horizontal alignment of the axis title */
33
40
  labelAnchor?: 'auto' | 'left' | 'center' | 'right';
41
+ /** the length of tick marks in pixels */
34
42
  tickSize?: number;
43
+ /** font size for tick labels */
35
44
  tickFontSize?: ConstantAccessor<number, Datum>;
45
+ /** font size for the axis title */
36
46
  titleFontSize?: number;
47
+ /** spacing between tick marks and tick labels in pixels */
37
48
  tickPadding?: number;
49
+ /** formatter for tick labels; can be "auto", an Intl format options object, or a custom function */
38
50
  tickFormat?:
39
51
  | 'auto'
40
52
  | Intl.DateTimeFormatOptions
41
53
  | Intl.NumberFormatOptions
42
54
  | ((d: RawValue, i: number) => string);
55
+ /** CSS class applied to each tick label */
43
56
  tickClass?: ConstantAccessor<string, Datum>;
44
57
  /** ticks is a shorthand for defining data, tickCount or interval */
45
58
  ticks?: number | string | Datum[];
@@ -1,5 +1,6 @@
1
1
  import type { RawValue, ConstantAccessor } from '../types/index.js';
2
2
  import type * as CSS from 'csstype';
3
+ import { usePlot } from '../hooks/usePlot.svelte.js';
3
4
  declare function $$render<Datum extends RawValue>(): {
4
5
  props: Omit<Partial<{
5
6
  filter: ConstantAccessor<boolean, Datum>;
@@ -8,14 +9,14 @@ declare function $$render<Datum extends RawValue>(): {
8
9
  fy: import("../types/channel").ChannelAccessor<Datum>;
9
10
  dx: ConstantAccessor<number, Datum>;
10
11
  dy: ConstantAccessor<number, Datum>;
11
- dodgeX: import("../transforms/dodge").DodgeXOptions;
12
- dodgeY: import("../transforms/dodge").DodgeYOptions;
12
+ dodgeX: usePlot;
13
+ dodgeY: usePlot;
13
14
  fill: import("../types/channel").ChannelAccessor<Datum>;
14
15
  fillOpacity: ConstantAccessor<number, Datum>;
15
- sort: ((a: RawValue, b: RawValue) => number) | {
16
+ sort: {
16
17
  channel: string;
17
18
  order?: "ascending" | "descending";
18
- } | ConstantAccessor<RawValue, Datum>;
19
+ } | ((a: RawValue, b: RawValue) => number) | ConstantAccessor<RawValue, Datum>;
19
20
  stroke: import("../types/channel").ChannelAccessor<Datum>;
20
21
  strokeWidth: ConstantAccessor<number, Datum>;
21
22
  strokeOpacity: ConstantAccessor<number, Datum>;
@@ -64,19 +65,32 @@ declare function $$render<Datum extends RawValue>(): {
64
65
  class: string;
65
66
  style: string;
66
67
  cursor: ConstantAccessor<CSS.Property.Cursor, Datum>;
67
- }>, "fillOpacity" | "paintOrder" | "href" | "target" | "title"> & {
68
+ }>, "fillOpacity" | "href" | "target" | "title" | "paintOrder"> & {
69
+ /** custom tick values to display on the axis */
68
70
  data?: Datum[];
71
+ /** whether this axis was automatically added by the Plot component */
69
72
  automatic?: boolean;
73
+ /** the axis title label; set to false or null to hide */
70
74
  title?: string | false | null;
75
+ /** which edge of the plot the axis appears on */
71
76
  anchor?: "top" | "bottom";
77
+ /** the interval between ticks, e.g. "day", "month", or a number */
72
78
  interval?: string | number;
79
+ /** controls which facet edge displays this axis */
73
80
  facetAnchor?: "auto" | "top-empty" | "bottom-empty" | "top" | "bottom";
81
+ /** horizontal alignment of the axis title */
74
82
  labelAnchor?: "auto" | "left" | "center" | "right";
83
+ /** the length of tick marks in pixels */
75
84
  tickSize?: number;
85
+ /** font size for tick labels */
76
86
  tickFontSize?: ConstantAccessor<number, Datum>;
87
+ /** font size for the axis title */
77
88
  titleFontSize?: number;
89
+ /** spacing between tick marks and tick labels in pixels */
78
90
  tickPadding?: number;
91
+ /** formatter for tick labels; can be "auto", an Intl format options object, or a custom function */
79
92
  tickFormat?: "auto" | Intl.DateTimeFormatOptions | Intl.NumberFormatOptions | ((d: RawValue, i: number) => string);
93
+ /** CSS class applied to each tick label */
80
94
  tickClass?: ConstantAccessor<string, Datum>;
81
95
  /** ticks is a shorthand for defining data, tickCount or interval */
82
96
  ticks?: number | string | Datum[];
@@ -23,24 +23,39 @@
23
23
  BaseMarkProps<Datum>,
24
24
  'fillOpacity' | 'paintOrder' | 'title' | 'href' | 'target'
25
25
  > {
26
+ /** custom tick values to display on the axis */
26
27
  data?: Datum[];
28
+ /** whether this axis was automatically added by the Plot component */
27
29
  automatic?: boolean;
30
+ /** the axis title label; set to false or null to hide */
28
31
  title?: string | false | null;
32
+ /** which edge of the plot the axis appears on */
29
33
  anchor?: 'left' | 'right';
34
+ /** controls which facet edge displays this axis */
30
35
  facetAnchor?: 'auto' | 'left' | 'right' | 'left-empty' | 'right-empty';
36
+ /** vertical alignment of tick labels relative to the tick position */
31
37
  lineAnchor?: 'top' | 'center' | 'bottom';
38
+ /** the interval between ticks, e.g. "day", "month", or a number */
32
39
  interval?: string | number;
40
+ /** horizontal alignment of the axis title */
33
41
  labelAnchor?: 'auto' | 'left' | 'center' | 'right';
42
+ /** text anchor for tick labels */
34
43
  textAnchor?: 'auto' | 'start' | 'middle' | 'end';
44
+ /** the length of tick marks in pixels */
35
45
  tickSize?: number;
46
+ /** font size for tick labels */
36
47
  tickFontSize?: ConstantAccessor<number, Datum>;
48
+ /** font size for the axis title */
37
49
  titleFontSize?: number;
50
+ /** spacing between tick marks and tick labels in pixels */
38
51
  tickPadding?: number;
52
+ /** formatter for tick labels; can be "auto", an Intl format options object, or a custom function */
39
53
  tickFormat?:
40
54
  | 'auto'
41
55
  | Intl.DateTimeFormatOptions
42
56
  | Intl.NumberFormatOptions
43
57
  | ((d: RawValue) => string);
58
+ /** CSS class applied to each tick label */
44
59
  tickClass?: ConstantAccessor<string, Datum>;
45
60
  /** ticks is a shorthand for defining data, tickCount or interval */
46
61
  ticks?: number | string | Datum[];
@@ -1,4 +1,5 @@
1
1
  import type { RawValue, ConstantAccessor } from '../types/index.js';
2
+ import { usePlot } from '../hooks/usePlot.svelte.js';
2
3
  declare function $$render<Datum extends RawValue>(): {
3
4
  props: Omit<Partial<{
4
5
  filter: ConstantAccessor<boolean, Datum>;
@@ -7,14 +8,14 @@ declare function $$render<Datum extends RawValue>(): {
7
8
  fy: import("../types/channel").ChannelAccessor<Datum>;
8
9
  dx: ConstantAccessor<number, Datum>;
9
10
  dy: ConstantAccessor<number, Datum>;
10
- dodgeX: import("../transforms/dodge").DodgeXOptions;
11
- dodgeY: import("../transforms/dodge").DodgeYOptions;
11
+ dodgeX: usePlot;
12
+ dodgeY: usePlot;
12
13
  fill: import("../types/channel").ChannelAccessor<Datum>;
13
14
  fillOpacity: ConstantAccessor<number, Datum>;
14
- sort: ((a: RawValue, b: RawValue) => number) | {
15
+ sort: {
15
16
  channel: string;
16
17
  order?: "ascending" | "descending";
17
- } | ConstantAccessor<RawValue, Datum>;
18
+ } | ((a: RawValue, b: RawValue) => number) | ConstantAccessor<RawValue, Datum>;
18
19
  stroke: import("../types/channel").ChannelAccessor<Datum>;
19
20
  strokeWidth: ConstantAccessor<number, Datum>;
20
21
  strokeOpacity: ConstantAccessor<number, Datum>;
@@ -63,21 +64,36 @@ declare function $$render<Datum extends RawValue>(): {
63
64
  class: string;
64
65
  style: string;
65
66
  cursor: ConstantAccessor<import("csstype").Property.Cursor, Datum>;
66
- }>, "fillOpacity" | "paintOrder" | "href" | "target" | "title"> & {
67
+ }>, "fillOpacity" | "href" | "target" | "title" | "paintOrder"> & {
68
+ /** custom tick values to display on the axis */
67
69
  data?: Datum[];
70
+ /** whether this axis was automatically added by the Plot component */
68
71
  automatic?: boolean;
72
+ /** the axis title label; set to false or null to hide */
69
73
  title?: string | false | null;
74
+ /** which edge of the plot the axis appears on */
70
75
  anchor?: "left" | "right";
76
+ /** controls which facet edge displays this axis */
71
77
  facetAnchor?: "auto" | "left" | "right" | "left-empty" | "right-empty";
78
+ /** vertical alignment of tick labels relative to the tick position */
72
79
  lineAnchor?: "top" | "center" | "bottom";
80
+ /** the interval between ticks, e.g. "day", "month", or a number */
73
81
  interval?: string | number;
82
+ /** horizontal alignment of the axis title */
74
83
  labelAnchor?: "auto" | "left" | "center" | "right";
84
+ /** text anchor for tick labels */
75
85
  textAnchor?: "auto" | "start" | "middle" | "end";
86
+ /** the length of tick marks in pixels */
76
87
  tickSize?: number;
88
+ /** font size for tick labels */
77
89
  tickFontSize?: ConstantAccessor<number, Datum>;
90
+ /** font size for the axis title */
78
91
  titleFontSize?: number;
92
+ /** spacing between tick marks and tick labels in pixels */
79
93
  tickPadding?: number;
94
+ /** formatter for tick labels; can be "auto", an Intl format options object, or a custom function */
80
95
  tickFormat?: "auto" | Intl.DateTimeFormatOptions | Intl.NumberFormatOptions | ((d: RawValue) => string);
96
+ /** CSS class applied to each tick label */
81
97
  tickClass?: ConstantAccessor<string, Datum>;
82
98
  /** ticks is a shorthand for defining data, tickCount or interval */
83
99
  ticks?: number | string | Datum[];
@@ -9,14 +9,14 @@ declare function $$render<Datum extends DataRow>(): {
9
9
  fy: ChannelAccessor<Datum>;
10
10
  dx: import("../types/index.js").ConstantAccessor<number, Datum>;
11
11
  dy: import("../types/index.js").ConstantAccessor<number, Datum>;
12
- dodgeX: import("../transforms/dodge").DodgeXOptions;
13
- dodgeY: import("../transforms/dodge").DodgeYOptions;
12
+ dodgeX: DataRow;
13
+ dodgeY: DataRow;
14
14
  fill: ChannelAccessor<Datum>;
15
15
  fillOpacity: import("../types/index.js").ConstantAccessor<number, Datum>;
16
- sort: ((a: import("../types/index.js").RawValue, b: import("../types/index.js").RawValue) => number) | {
16
+ sort: {
17
17
  channel: string;
18
18
  order?: "ascending" | "descending";
19
- } | import("../types/index.js").ConstantAccessor<import("../types/index.js").RawValue, Datum>;
19
+ } | ((a: import("../types/data").RawValue, b: import("../types/data").RawValue) => number) | import("../types/index.js").ConstantAccessor<import("../types/data").RawValue, Datum>;
20
20
  stroke: ChannelAccessor<Datum>;
21
21
  strokeWidth: import("../types/index.js").ConstantAccessor<number, Datum>;
22
22
  strokeOpacity: import("../types/index.js").ConstantAccessor<number, Datum>;
@@ -1,5 +1,6 @@
1
1
  import type { StackOptions } from '../transforms/stack.js';
2
2
  import type { BaseRectMarkProps, ChannelAccessor, DataRow, LinkableMarkProps } from '../types/index.js';
3
+ import { usePlot } from '../hooks/usePlot.svelte.js';
3
4
  declare function $$render<Datum extends DataRow>(): {
4
5
  props: Partial<{
5
6
  filter: import("../types/index.js").ConstantAccessor<boolean, Datum>;
@@ -8,14 +9,14 @@ declare function $$render<Datum extends DataRow>(): {
8
9
  fy: ChannelAccessor<Datum>;
9
10
  dx: import("../types/index.js").ConstantAccessor<number, Datum>;
10
11
  dy: import("../types/index.js").ConstantAccessor<number, Datum>;
11
- dodgeX: import("../transforms/dodge").DodgeXOptions;
12
- dodgeY: import("../transforms/dodge").DodgeYOptions;
12
+ dodgeX: usePlot;
13
+ dodgeY: usePlot;
13
14
  fill: ChannelAccessor<Datum>;
14
15
  fillOpacity: import("../types/index.js").ConstantAccessor<number, Datum>;
15
- sort: ((a: import("../types/data").RawValue, b: import("../types/data").RawValue) => number) | {
16
+ sort: {
16
17
  channel: string;
17
18
  order?: "ascending" | "descending";
18
- } | import("../types/index.js").ConstantAccessor<import("../types/data").RawValue, Datum>;
19
+ } | ((a: import("../types/data").RawValue, b: import("../types/data").RawValue) => number) | import("../types/index.js").ConstantAccessor<import("../types/data").RawValue, Datum>;
19
20
  stroke: ChannelAccessor<Datum>;
20
21
  strokeWidth: import("../types/index.js").ConstantAccessor<number, Datum>;
21
22
  strokeOpacity: import("../types/index.js").ConstantAccessor<number, Datum>;
@@ -13,8 +13,11 @@
13
13
  import { pick } from 'es-toolkit';
14
14
 
15
15
  interface BollingerXMarkProps extends BaseMarkProps<Datum> {
16
+ /** the input data array */
16
17
  data: Datum[];
18
+ /** the horizontal position channel; the dependent variable for the moving average */
17
19
  x?: ChannelAccessor<Datum>;
20
+ /** the vertical position channel; used for grouping */
18
21
  y?: ChannelAccessor<Datum>;
19
22
  /**
20
23
  * the window size (the window transform's k option), an integer; defaults to 20