svelteplot 0.5.3 → 0.6.0-pr-257.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 (57) hide show
  1. package/dist/Mark.svelte.d.ts +5 -4
  2. package/dist/helpers/colors.d.ts +1 -1
  3. package/dist/helpers/index.d.ts +2 -2
  4. package/dist/helpers/scales.d.ts +2 -2
  5. package/dist/helpers/typeChecks.d.ts +4 -4
  6. package/dist/marks/Area.svelte.d.ts +5 -4
  7. package/dist/marks/AreaX.svelte.d.ts +6 -5
  8. package/dist/marks/Arrow.svelte.d.ts +5 -4
  9. package/dist/marks/AxisX.svelte.d.ts +6 -5
  10. package/dist/marks/AxisY.svelte.d.ts +6 -5
  11. package/dist/marks/BarX.svelte.d.ts +5 -4
  12. package/dist/marks/BarY.svelte.d.ts +5 -4
  13. package/dist/marks/BollingerX.svelte.d.ts +2 -76
  14. package/dist/marks/BollingerY.svelte.d.ts +2 -76
  15. package/dist/marks/BoxY.svelte.d.ts +6 -68
  16. package/dist/marks/Cell.svelte.d.ts +5 -4
  17. package/dist/marks/CustomMark.svelte +9 -3
  18. package/dist/marks/CustomMark.svelte.d.ts +2 -83
  19. package/dist/marks/CustomMarkHTML.svelte.d.ts +1 -1
  20. package/dist/marks/DifferenceY.svelte.d.ts +7 -69
  21. package/dist/marks/Dot.svelte.d.ts +5 -4
  22. package/dist/marks/DotX.svelte.d.ts +6 -5
  23. package/dist/marks/DotY.svelte.d.ts +6 -5
  24. package/dist/marks/Geo.svelte.d.ts +5 -4
  25. package/dist/marks/GridX.svelte.d.ts +5 -4
  26. package/dist/marks/GridY.svelte.d.ts +5 -4
  27. package/dist/marks/Image.svelte +76 -0
  28. package/dist/marks/Image.svelte.d.ts +19 -0
  29. package/dist/marks/Line.svelte +2 -2
  30. package/dist/marks/Line.svelte.d.ts +6 -5
  31. package/dist/marks/LineX.svelte.d.ts +7 -6
  32. package/dist/marks/LineY.svelte.d.ts +7 -6
  33. package/dist/marks/Link.svelte.d.ts +5 -4
  34. package/dist/marks/Rect.svelte.d.ts +5 -4
  35. package/dist/marks/RuleX.svelte.d.ts +5 -4
  36. package/dist/marks/RuleY.svelte.d.ts +5 -4
  37. package/dist/marks/Spike.svelte.d.ts +6 -5
  38. package/dist/marks/Text.svelte.d.ts +7 -6
  39. package/dist/marks/TickX.svelte.d.ts +5 -4
  40. package/dist/marks/TickY.svelte.d.ts +5 -4
  41. package/dist/marks/Vector.svelte.d.ts +5 -4
  42. package/dist/marks/helpers/Anchor.svelte +16 -2
  43. package/dist/marks/helpers/Anchor.svelte.d.ts +28 -14
  44. package/dist/marks/helpers/MarkerPath.svelte.d.ts +2 -164
  45. package/dist/marks/helpers/RectPath.svelte.d.ts +3 -65
  46. package/dist/marks/index.d.ts +1 -0
  47. package/dist/marks/index.js +1 -0
  48. package/dist/transforms/bollinger.d.ts +1 -69
  49. package/dist/transforms/group.d.ts +4 -12
  50. package/dist/transforms/interval.d.ts +2 -128
  51. package/dist/transforms/recordize.d.ts +1 -4
  52. package/dist/transforms/select.d.ts +7 -448
  53. package/dist/transforms/sort.d.ts +3 -251
  54. package/dist/transforms/stack.d.ts +3 -23
  55. package/dist/transforms/window.d.ts +2 -134
  56. package/dist/types/plot.d.ts +5 -1
  57. package/package.json +129 -128
@@ -1,4 +1,5 @@
1
1
  import { type Snippet } from 'svelte';
2
+ import { CHANNEL_SCALE } from './constants.js';
2
3
  import type { ScaledChannelName, MarkType, DataRecord, ChannelAccessor, ScaleName, RawValue, ScaledDataRecord, ScaleType } from './types/index.js';
3
4
  import { getUsedScales } from './helpers/scales.js';
4
5
  declare class __sveltets_Render<Datum extends DataRecord> {
@@ -9,14 +10,14 @@ declare class __sveltets_Render<Datum extends DataRecord> {
9
10
  fy: ChannelAccessor<Datum>;
10
11
  dx: import("./types/index.js").ConstantAccessor<number, Datum>;
11
12
  dy: import("./types/index.js").ConstantAccessor<number, Datum>;
12
- dodgeX: import("./transforms/dodge.js").DodgeXOptions;
13
- dodgeY: import("./transforms/dodge.js").DodgeYOptions;
13
+ dodgeX: CHANNEL_SCALE;
14
+ dodgeY: CHANNEL_SCALE;
14
15
  fill: ChannelAccessor<Datum>;
15
16
  fillOpacity: import("./types/index.js").ConstantAccessor<number, Datum>;
16
- sort: ((a: RawValue, b: RawValue) => number) | {
17
+ sort: {
17
18
  channel: string;
18
19
  order?: "ascending" | "descending";
19
- } | import("./types/index.js").ConstantAccessor<RawValue, Datum>;
20
+ } | ((a: RawValue, b: RawValue) => number) | import("./types/index.js").ConstantAccessor<RawValue, Datum>;
20
21
  stroke: ChannelAccessor<Datum>;
21
22
  strokeWidth: import("./types/index.js").ConstantAccessor<number, Datum>;
22
23
  strokeOpacity: import("./types/index.js").ConstantAccessor<number, Datum>;
@@ -6,7 +6,7 @@ type SchemeGetter = (n: number) => readonly string[];
6
6
  export declare function isOrdinalScheme(scheme: ColorScheme): boolean;
7
7
  export declare function ordinalScheme(scheme: string): SchemeGetter | undefined;
8
8
  export declare function ordinalRange(scheme: string, length: number): readonly string[] | undefined;
9
- export declare function maybeBooleanRange(domain: boolean[], scheme?: string): unknown[] | undefined;
9
+ export declare function maybeBooleanRange(domain: boolean[], scheme?: string): any[] | undefined;
10
10
  export declare function isQuantitativeScheme(scheme: string): boolean;
11
11
  export declare function quantitativeScheme(scheme: string): typeof interpolateBrBG | undefined;
12
12
  export declare function isDivergingScheme(scheme: string): boolean;
@@ -3,8 +3,8 @@ import type { Snippet } from 'svelte';
3
3
  /**
4
4
  * Returns first argument that is not null or undefined
5
5
  */
6
- export declare function coalesce(...args: (RawValue | undefined | null)[]): string | number | boolean | symbol | object | null;
7
- export declare function testFilter<T>(datum: T, options: Channels<T>): true | T | null;
6
+ export declare function coalesce(...args: (RawValue | undefined | null)[]): any;
7
+ export declare function testFilter<T>(datum: T, options: Channels<T>): any;
8
8
  export declare function randomId(): string;
9
9
  export declare function isSnippet(value: unknown): value is Snippet;
10
10
  export declare function isValid(value: RawValue | undefined): value is number | Date | string;
@@ -15,7 +15,7 @@ export declare function createScale<T extends ScaleOptions>(name: ScaleName, sca
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
21
  skip: Map<ScaledChannelName, Set<symbol>>;
@@ -40,4 +40,4 @@ export declare function looksLikeANumber(input: string | number): boolean;
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";
@@ -1,10 +1,10 @@
1
1
  import type { RawValue } from '../types/index.js';
2
- export declare function isBooleanOrNull(v: RawValue): v is boolean;
2
+ export declare function isBooleanOrNull(v: RawValue): boolean;
3
3
  export declare function isDate(v: RawValue): v is Date;
4
- export declare function isDateOrNull(v: RawValue | null | undefined): v is Date | null | undefined;
4
+ export declare function isDateOrNull(v: RawValue | null | undefined): boolean;
5
5
  export declare function isNumberOrNull(v: RawValue | null | undefined): boolean;
6
6
  export declare function isNumberOrNullOrNaN(v: RawValue | null | undefined): boolean;
7
- export declare function isStringOrNull(v: RawValue | null | undefined): v is string | null | undefined;
7
+ export declare function isStringOrNull(v: RawValue | null | undefined): boolean;
8
8
  export declare function isSymbolOrNull(v: RawValue | null | undefined): boolean;
9
- export declare function isColorOrNull(v: RawValue | null | undefined): boolean;
9
+ export declare function isColorOrNull(v: RawValue | null | undefined): any;
10
10
  export declare function isOpacityOrNull(v: RawValue): boolean;
@@ -1,4 +1,5 @@
1
1
  import { type CurveFactory } from 'd3-shape';
2
+ import callWithProps from '../helpers/callWithProps.js';
2
3
  import type { CurveName, DataRecord, ConstantAccessor, ChannelAccessor, LinkableMarkProps, RawValue } from '../types/index.js';
3
4
  import type { StackOptions } from '../transforms/stack.js';
4
5
  declare class __sveltets_Render<Datum extends DataRecord> {
@@ -9,14 +10,14 @@ declare class __sveltets_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: callWithProps;
14
+ dodgeY: callWithProps;
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>;
@@ -1,3 +1,4 @@
1
+ import { renameChannels } from '../transforms/rename.js';
1
2
  import type { ChannelAccessor, DataRow } from '../types/index.js';
2
3
  declare class __sveltets_Render<Datum extends DataRow> {
3
4
  props(): Omit<Partial<{
@@ -7,14 +8,14 @@ declare class __sveltets_Render<Datum extends DataRow> {
7
8
  fy: ChannelAccessor<Record<string | symbol, import("../types/data").RawValue>>;
8
9
  dx: import("../types/index.js").ConstantAccessor<number, Record<string | symbol, import("../types/data").RawValue>>;
9
10
  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;
11
+ dodgeX: renameChannels;
12
+ dodgeY: renameChannels;
12
13
  fill: ChannelAccessor<Record<string | symbol, import("../types/data").RawValue>>;
13
14
  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) | {
15
+ sort: {
15
16
  channel: string;
16
17
  order?: "ascending" | "descending";
17
- } | import("../types/index.js").ConstantAccessor<import("../types/data").RawValue, Record<string | symbol, import("../types/data").RawValue>>;
18
+ } | ((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
19
  stroke: ChannelAccessor<Record<string | symbol, import("../types/data").RawValue>>;
19
20
  strokeWidth: import("../types/index.js").ConstantAccessor<number, Record<string | symbol, import("../types/data").RawValue>>;
20
21
  strokeOpacity: import("../types/index.js").ConstantAccessor<number, Record<string | symbol, import("../types/data").RawValue>>;
@@ -74,7 +75,7 @@ declare class __sveltets_Render<Datum extends DataRow> {
74
75
  sort?: import("../types/index.js").ConstantAccessor<import("../types/data").RawValue> | {
75
76
  channel: "stroke" | "fill";
76
77
  };
77
- stack?: Partial<import("../transforms/stack.js").StackOptions>;
78
+ stack?: Partial<renameChannels>;
78
79
  canvas?: boolean;
79
80
  areaClass?: import("../types/index.js").ConstantAccessor<string, Record<string | symbol, import("../types/data").RawValue>>;
80
81
  }, "y1" | "y2"> & {
@@ -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 { replaceChannels } from '../transforms/rename.js';
3
4
  declare class __sveltets_Render<Datum extends DataRecord> {
4
5
  props(): Omit<Partial<{
5
6
  filter: ConstantAccessor<boolean, Datum>;
@@ -8,14 +9,14 @@ declare class __sveltets_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: replaceChannels;
13
+ dodgeY: replaceChannels;
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>;
@@ -1,5 +1,6 @@
1
1
  import type { RawValue, ConstantAccessor } from '../types/index.js';
2
2
  import type * as CSS from 'csstype';
3
+ import autoTimeFormat from '../helpers/autoTimeFormat.js';
3
4
  declare class __sveltets_Render<Datum extends RawValue> {
4
5
  props(): Omit<Partial<{
5
6
  filter: ConstantAccessor<boolean, Datum>;
@@ -8,14 +9,14 @@ declare class __sveltets_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: autoTimeFormat;
13
+ dodgeY: autoTimeFormat;
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>;
@@ -63,7 +64,7 @@ declare class __sveltets_Render<Datum extends RawValue> {
63
64
  class: string;
64
65
  style: string;
65
66
  cursor: ConstantAccessor<CSS.Property.Cursor, Datum>;
66
- }>, "fillOpacity" | "paintOrder" | "href" | "target" | "title"> & {
67
+ }>, "fillOpacity" | "href" | "target" | "title" | "paintOrder"> & {
67
68
  data?: Datum[] | undefined;
68
69
  automatic?: boolean;
69
70
  title?: string | false | null;
@@ -1,4 +1,5 @@
1
1
  import type { RawValue, ConstantAccessor } from '../types/index.js';
2
+ import autoTimeFormat from '../helpers/autoTimeFormat.js';
2
3
  declare class __sveltets_Render<Datum extends RawValue> {
3
4
  props(): Omit<Partial<{
4
5
  filter: ConstantAccessor<boolean, Datum>;
@@ -7,14 +8,14 @@ declare class __sveltets_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: autoTimeFormat;
12
+ dodgeY: autoTimeFormat;
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>;
@@ -62,7 +63,7 @@ declare class __sveltets_Render<Datum extends RawValue> {
62
63
  class: string;
63
64
  style: string;
64
65
  cursor: ConstantAccessor<import("csstype").Property.Cursor, Datum>;
65
- }>, "fillOpacity" | "paintOrder" | "href" | "target" | "title"> & {
66
+ }>, "fillOpacity" | "href" | "target" | "title" | "paintOrder"> & {
66
67
  data?: Datum[] | undefined;
67
68
  automatic?: boolean;
68
69
  title?: string | false | null;
@@ -1,3 +1,4 @@
1
+ import { stackX } from '../index.js';
1
2
  import type { StackOptions } from '../transforms/stack.js';
2
3
  import type { DataRow } from '../types/index.js';
3
4
  import type { BaseRectMarkProps, ChannelAccessor, LinkableMarkProps } from '../types/index.js';
@@ -9,14 +10,14 @@ declare class __sveltets_Render<Datum extends DataRow> {
9
10
  fy: ChannelAccessor<Datum>;
10
11
  dx: import("../types/index.js").ConstantAccessor<number, Datum>;
11
12
  dy: import("../types/index.js").ConstantAccessor<number, Datum>;
12
- dodgeX: import("../transforms/dodge").DodgeXOptions;
13
- dodgeY: import("../transforms/dodge").DodgeYOptions;
13
+ dodgeX: stackX;
14
+ dodgeY: stackX;
14
15
  fill: ChannelAccessor<Datum>;
15
16
  fillOpacity: import("../types/index.js").ConstantAccessor<number, Datum>;
16
- sort: ((a: import("../types/index.js").RawValue, b: import("../types/index.js").RawValue) => number) | {
17
+ sort: {
17
18
  channel: string;
18
19
  order?: "ascending" | "descending";
19
- } | import("../types/index.js").ConstantAccessor<import("../types/index.js").RawValue, Datum>;
20
+ } | ((a: import("../types/data").RawValue, b: import("../types/data").RawValue) => number) | import("../types/index.js").ConstantAccessor<import("../types/data").RawValue, Datum>;
20
21
  stroke: ChannelAccessor<Datum>;
21
22
  strokeWidth: import("../types/index.js").ConstantAccessor<number, Datum>;
22
23
  strokeOpacity: import("../types/index.js").ConstantAccessor<number, Datum>;
@@ -1,3 +1,4 @@
1
+ import { intervalY } from '../index.js';
1
2
  import type { StackOptions } from '../transforms/stack.js';
2
3
  import type { BaseRectMarkProps, ChannelAccessor, DataRow, LinkableMarkProps } from '../types/index.js';
3
4
  declare class __sveltets_Render<Datum extends DataRow> {
@@ -8,14 +9,14 @@ declare class __sveltets_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: intervalY;
13
+ dodgeY: intervalY;
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>;
@@ -1,80 +1,6 @@
1
- import type { ChannelAccessor, DataRecord } from '../types/index.js';
1
+ import type { DataRecord } from '../types/index.js';
2
2
  declare class __sveltets_Render<Datum extends DataRecord> {
3
- props(): Partial<{
4
- filter: import("../types/index.js").ConstantAccessor<boolean, Datum>;
5
- facet: "auto" | "include" | "exclude";
6
- fx: ChannelAccessor<Datum>;
7
- fy: ChannelAccessor<Datum>;
8
- dx: import("../types/index.js").ConstantAccessor<number, Datum>;
9
- dy: import("../types/index.js").ConstantAccessor<number, Datum>;
10
- dodgeX: import("../transforms/dodge").DodgeXOptions;
11
- dodgeY: import("../transforms/dodge").DodgeYOptions;
12
- fill: ChannelAccessor<Datum>;
13
- fillOpacity: import("../types/index.js").ConstantAccessor<number, Datum>;
14
- sort: ((a: import("../types/index.js").RawValue, b: import("../types/index.js").RawValue) => number) | {
15
- channel: string;
16
- order?: "ascending" | "descending";
17
- } | import("../types/index.js").ConstantAccessor<import("../types/index.js").RawValue, Datum>;
18
- stroke: ChannelAccessor<Datum>;
19
- strokeWidth: import("../types/index.js").ConstantAccessor<number, Datum>;
20
- strokeOpacity: import("../types/index.js").ConstantAccessor<number, Datum>;
21
- strokeLinejoin: import("../types/index.js").ConstantAccessor<import("csstype").Property.StrokeLinejoin, Datum>;
22
- strokeLinecap: import("../types/index.js").ConstantAccessor<import("csstype").Property.StrokeLinecap, Datum>;
23
- strokeMiterlimit: import("../types/index.js").ConstantAccessor<number, Datum>;
24
- opacity: ChannelAccessor<Datum>;
25
- strokeDasharray: import("../types/index.js").ConstantAccessor<string, Datum>;
26
- strokeDashoffset: import("../types/index.js").ConstantAccessor<number, Datum>;
27
- mixBlendMode: import("../types/index.js").ConstantAccessor<import("csstype").Property.MixBlendMode, Datum>;
28
- clipPath: string;
29
- imageFilter: import("../types/index.js").ConstantAccessor<string, Datum>;
30
- shapeRendering: import("../types/index.js").ConstantAccessor<import("csstype").Property.ShapeRendering, Datum>;
31
- paintOrder: import("../types/index.js").ConstantAccessor<string, Datum>;
32
- onclick: import("svelte/elements").MouseEventHandler<SVGPathElement>;
33
- ondblclick: import("svelte/elements").MouseEventHandler<SVGPathElement>;
34
- onmouseup: import("svelte/elements").MouseEventHandler<SVGPathElement>;
35
- onmousedown: import("svelte/elements").MouseEventHandler<SVGPathElement>;
36
- onmouseenter: import("svelte/elements").MouseEventHandler<SVGPathElement>;
37
- onmousemove: import("svelte/elements").MouseEventHandler<SVGPathElement>;
38
- onmouseleave: import("svelte/elements").MouseEventHandler<SVGPathElement>;
39
- onmouseout: import("svelte/elements").MouseEventHandler<SVGPathElement>;
40
- onmouseover: import("svelte/elements").MouseEventHandler<SVGPathElement>;
41
- onpointercancel: import("svelte/elements").MouseEventHandler<SVGPathElement>;
42
- onpointerdown: import("svelte/elements").MouseEventHandler<SVGPathElement>;
43
- onpointerup: import("svelte/elements").MouseEventHandler<SVGPathElement>;
44
- onpointerenter: import("svelte/elements").MouseEventHandler<SVGPathElement>;
45
- onpointerleave: import("svelte/elements").MouseEventHandler<SVGPathElement>;
46
- onpointermove: import("svelte/elements").MouseEventHandler<SVGPathElement>;
47
- onpointerover: import("svelte/elements").MouseEventHandler<SVGPathElement>;
48
- onpointerout: import("svelte/elements").MouseEventHandler<SVGPathElement>;
49
- ondrag: import("svelte/elements").MouseEventHandler<SVGPathElement>;
50
- ondrop: import("svelte/elements").MouseEventHandler<SVGPathElement>;
51
- ondragstart: import("svelte/elements").MouseEventHandler<SVGPathElement>;
52
- ondragenter: import("svelte/elements").MouseEventHandler<SVGPathElement>;
53
- ondragleave: import("svelte/elements").MouseEventHandler<SVGPathElement>;
54
- ondragover: import("svelte/elements").MouseEventHandler<SVGPathElement>;
55
- ondragend: import("svelte/elements").MouseEventHandler<SVGPathElement>;
56
- ontouchstart: import("svelte/elements").MouseEventHandler<SVGPathElement>;
57
- ontouchmove: import("svelte/elements").MouseEventHandler<SVGPathElement>;
58
- ontouchend: import("svelte/elements").MouseEventHandler<SVGPathElement>;
59
- ontouchcancel: import("svelte/elements").MouseEventHandler<SVGPathElement>;
60
- oncontextmenu: import("svelte/elements").MouseEventHandler<SVGPathElement>;
61
- onwheel: import("svelte/elements").MouseEventHandler<SVGPathElement>;
62
- class: string;
63
- style: string;
64
- cursor: import("../types/index.js").ConstantAccessor<import("csstype").Property.Cursor, Datum>;
65
- }> & {
66
- data: Datum[];
67
- x?: ChannelAccessor<Datum>;
68
- y?: ChannelAccessor<Datum>;
69
- /**
70
- * the window size (the window transform's k option), an integer; defaults to 20
71
- */
72
- n?: number;
73
- /**
74
- * the band radius, a number representing a multiple of standard deviations; defaults to 2
75
- */
76
- k?: number;
77
- };
3
+ props(): any;
78
4
  events(): {};
79
5
  slots(): {};
80
6
  bindings(): "";
@@ -1,80 +1,6 @@
1
- import type { ChannelAccessor, DataRecord } from '../types/index.js';
1
+ import type { DataRecord } from '../types/index.js';
2
2
  declare class __sveltets_Render<Datum extends DataRecord> {
3
- props(): Partial<{
4
- filter: import("../types/index.js").ConstantAccessor<boolean, Datum>;
5
- facet: "auto" | "include" | "exclude";
6
- fx: ChannelAccessor<Datum>;
7
- fy: ChannelAccessor<Datum>;
8
- dx: import("../types/index.js").ConstantAccessor<number, Datum>;
9
- dy: import("../types/index.js").ConstantAccessor<number, Datum>;
10
- dodgeX: import("../transforms/dodge").DodgeXOptions;
11
- dodgeY: import("../transforms/dodge").DodgeYOptions;
12
- fill: ChannelAccessor<Datum>;
13
- fillOpacity: import("../types/index.js").ConstantAccessor<number, Datum>;
14
- sort: ((a: import("../types/index.js").RawValue, b: import("../types/index.js").RawValue) => number) | {
15
- channel: string;
16
- order?: "ascending" | "descending";
17
- } | import("../types/index.js").ConstantAccessor<import("../types/index.js").RawValue, Datum>;
18
- stroke: ChannelAccessor<Datum>;
19
- strokeWidth: import("../types/index.js").ConstantAccessor<number, Datum>;
20
- strokeOpacity: import("../types/index.js").ConstantAccessor<number, Datum>;
21
- strokeLinejoin: import("../types/index.js").ConstantAccessor<import("csstype").Property.StrokeLinejoin, Datum>;
22
- strokeLinecap: import("../types/index.js").ConstantAccessor<import("csstype").Property.StrokeLinecap, Datum>;
23
- strokeMiterlimit: import("../types/index.js").ConstantAccessor<number, Datum>;
24
- opacity: ChannelAccessor<Datum>;
25
- strokeDasharray: import("../types/index.js").ConstantAccessor<string, Datum>;
26
- strokeDashoffset: import("../types/index.js").ConstantAccessor<number, Datum>;
27
- mixBlendMode: import("../types/index.js").ConstantAccessor<import("csstype").Property.MixBlendMode, Datum>;
28
- clipPath: string;
29
- imageFilter: import("../types/index.js").ConstantAccessor<string, Datum>;
30
- shapeRendering: import("../types/index.js").ConstantAccessor<import("csstype").Property.ShapeRendering, Datum>;
31
- paintOrder: import("../types/index.js").ConstantAccessor<string, Datum>;
32
- onclick: import("svelte/elements").MouseEventHandler<SVGPathElement>;
33
- ondblclick: import("svelte/elements").MouseEventHandler<SVGPathElement>;
34
- onmouseup: import("svelte/elements").MouseEventHandler<SVGPathElement>;
35
- onmousedown: import("svelte/elements").MouseEventHandler<SVGPathElement>;
36
- onmouseenter: import("svelte/elements").MouseEventHandler<SVGPathElement>;
37
- onmousemove: import("svelte/elements").MouseEventHandler<SVGPathElement>;
38
- onmouseleave: import("svelte/elements").MouseEventHandler<SVGPathElement>;
39
- onmouseout: import("svelte/elements").MouseEventHandler<SVGPathElement>;
40
- onmouseover: import("svelte/elements").MouseEventHandler<SVGPathElement>;
41
- onpointercancel: import("svelte/elements").MouseEventHandler<SVGPathElement>;
42
- onpointerdown: import("svelte/elements").MouseEventHandler<SVGPathElement>;
43
- onpointerup: import("svelte/elements").MouseEventHandler<SVGPathElement>;
44
- onpointerenter: import("svelte/elements").MouseEventHandler<SVGPathElement>;
45
- onpointerleave: import("svelte/elements").MouseEventHandler<SVGPathElement>;
46
- onpointermove: import("svelte/elements").MouseEventHandler<SVGPathElement>;
47
- onpointerover: import("svelte/elements").MouseEventHandler<SVGPathElement>;
48
- onpointerout: import("svelte/elements").MouseEventHandler<SVGPathElement>;
49
- ondrag: import("svelte/elements").MouseEventHandler<SVGPathElement>;
50
- ondrop: import("svelte/elements").MouseEventHandler<SVGPathElement>;
51
- ondragstart: import("svelte/elements").MouseEventHandler<SVGPathElement>;
52
- ondragenter: import("svelte/elements").MouseEventHandler<SVGPathElement>;
53
- ondragleave: import("svelte/elements").MouseEventHandler<SVGPathElement>;
54
- ondragover: import("svelte/elements").MouseEventHandler<SVGPathElement>;
55
- ondragend: import("svelte/elements").MouseEventHandler<SVGPathElement>;
56
- ontouchstart: import("svelte/elements").MouseEventHandler<SVGPathElement>;
57
- ontouchmove: import("svelte/elements").MouseEventHandler<SVGPathElement>;
58
- ontouchend: import("svelte/elements").MouseEventHandler<SVGPathElement>;
59
- ontouchcancel: import("svelte/elements").MouseEventHandler<SVGPathElement>;
60
- oncontextmenu: import("svelte/elements").MouseEventHandler<SVGPathElement>;
61
- onwheel: import("svelte/elements").MouseEventHandler<SVGPathElement>;
62
- class: string;
63
- style: string;
64
- cursor: import("../types/index.js").ConstantAccessor<import("csstype").Property.Cursor, Datum>;
65
- }> & {
66
- data: Datum[];
67
- x?: ChannelAccessor<Datum>;
68
- y?: ChannelAccessor<Datum>;
69
- /**
70
- * the window size (the window transform's k option), an integer; defaults to 20
71
- */
72
- n?: number;
73
- /**
74
- * the band radius, a number representing a multiple of standard deviations; defaults to 2
75
- */
76
- k?: number;
77
- };
3
+ props(): any;
78
4
  events(): {};
79
5
  slots(): {};
80
6
  bindings(): "";
@@ -1,91 +1,29 @@
1
1
  import type { ChannelAccessor, DataRecord } from '../types';
2
2
  declare class __sveltets_Render<Datum extends DataRecord> {
3
- props(): Pick<Partial<{
4
- filter: import("../types").ConstantAccessor<boolean, Datum>;
5
- facet: "auto" | "include" | "exclude";
6
- fx: ChannelAccessor<Datum>;
7
- fy: ChannelAccessor<Datum>;
8
- dx: import("../types").ConstantAccessor<number, Datum>;
9
- dy: import("../types").ConstantAccessor<number, Datum>;
10
- dodgeX: import("../transforms/dodge").DodgeXOptions;
11
- dodgeY: import("../transforms/dodge").DodgeYOptions;
12
- fill: ChannelAccessor<Datum>;
13
- fillOpacity: import("../types").ConstantAccessor<number, Datum>;
14
- sort: ((a: import("../types").RawValue, b: import("../types").RawValue) => number) | {
15
- channel: string;
16
- order?: "ascending" | "descending";
17
- } | import("../types").ConstantAccessor<import("../types").RawValue, Datum>;
18
- stroke: ChannelAccessor<Datum>;
19
- strokeWidth: import("../types").ConstantAccessor<number, Datum>;
20
- strokeOpacity: import("../types").ConstantAccessor<number, Datum>;
21
- strokeLinejoin: import("../types").ConstantAccessor<import("csstype").Property.StrokeLinejoin, Datum>;
22
- strokeLinecap: import("../types").ConstantAccessor<import("csstype").Property.StrokeLinecap, Datum>;
23
- strokeMiterlimit: import("../types").ConstantAccessor<number, Datum>;
24
- opacity: ChannelAccessor<Datum>;
25
- strokeDasharray: import("../types").ConstantAccessor<string, Datum>;
26
- strokeDashoffset: import("../types").ConstantAccessor<number, Datum>;
27
- mixBlendMode: import("../types").ConstantAccessor<import("csstype").Property.MixBlendMode, Datum>;
28
- clipPath: string;
29
- imageFilter: import("../types").ConstantAccessor<string, Datum>;
30
- shapeRendering: import("../types").ConstantAccessor<import("csstype").Property.ShapeRendering, Datum>;
31
- paintOrder: import("../types").ConstantAccessor<string, Datum>;
32
- onclick: import("svelte/elements").MouseEventHandler<SVGPathElement>;
33
- ondblclick: import("svelte/elements").MouseEventHandler<SVGPathElement>;
34
- onmouseup: import("svelte/elements").MouseEventHandler<SVGPathElement>;
35
- onmousedown: import("svelte/elements").MouseEventHandler<SVGPathElement>;
36
- onmouseenter: import("svelte/elements").MouseEventHandler<SVGPathElement>;
37
- onmousemove: import("svelte/elements").MouseEventHandler<SVGPathElement>;
38
- onmouseleave: import("svelte/elements").MouseEventHandler<SVGPathElement>;
39
- onmouseout: import("svelte/elements").MouseEventHandler<SVGPathElement>;
40
- onmouseover: import("svelte/elements").MouseEventHandler<SVGPathElement>;
41
- onpointercancel: import("svelte/elements").MouseEventHandler<SVGPathElement>;
42
- onpointerdown: import("svelte/elements").MouseEventHandler<SVGPathElement>;
43
- onpointerup: import("svelte/elements").MouseEventHandler<SVGPathElement>;
44
- onpointerenter: import("svelte/elements").MouseEventHandler<SVGPathElement>;
45
- onpointerleave: import("svelte/elements").MouseEventHandler<SVGPathElement>;
46
- onpointermove: import("svelte/elements").MouseEventHandler<SVGPathElement>;
47
- onpointerover: import("svelte/elements").MouseEventHandler<SVGPathElement>;
48
- onpointerout: import("svelte/elements").MouseEventHandler<SVGPathElement>;
49
- ondrag: import("svelte/elements").MouseEventHandler<SVGPathElement>;
50
- ondrop: import("svelte/elements").MouseEventHandler<SVGPathElement>;
51
- ondragstart: import("svelte/elements").MouseEventHandler<SVGPathElement>;
52
- ondragenter: import("svelte/elements").MouseEventHandler<SVGPathElement>;
53
- ondragleave: import("svelte/elements").MouseEventHandler<SVGPathElement>;
54
- ondragover: import("svelte/elements").MouseEventHandler<SVGPathElement>;
55
- ondragend: import("svelte/elements").MouseEventHandler<SVGPathElement>;
56
- ontouchstart: import("svelte/elements").MouseEventHandler<SVGPathElement>;
57
- ontouchmove: import("svelte/elements").MouseEventHandler<SVGPathElement>;
58
- ontouchend: import("svelte/elements").MouseEventHandler<SVGPathElement>;
59
- ontouchcancel: import("svelte/elements").MouseEventHandler<SVGPathElement>;
60
- oncontextmenu: import("svelte/elements").MouseEventHandler<SVGPathElement>;
61
- onwheel: import("svelte/elements").MouseEventHandler<SVGPathElement>;
62
- class: string;
63
- style: string;
64
- cursor: import("../types").ConstantAccessor<import("csstype").Property.Cursor, Datum>;
65
- }>, "fx" | "fy" | "fill" | "stroke" | "class"> & {
3
+ props(): Pick<BaseMarkProps<Datum_1>, "fill" | "stroke" | "fx" | "fy" | "class"> & {
66
4
  data: Datum[];
67
5
  x: ChannelAccessor;
68
6
  y: ChannelAccessor;
69
7
  /**
70
8
  * Options for the rule marks that represent the min/max range
71
9
  */
72
- rule: Record<string, ChannelAccessor<Datum>>;
10
+ rule: Record<string, ChannelAccessor<Datum_1>>;
73
11
  /**
74
12
  * Options for the bar marks that represent the IQR range
75
13
  */
76
- bar: Record<string, ChannelAccessor<Datum>>;
14
+ bar: Record<string, ChannelAccessor<Datum_1>>;
77
15
  /**
78
16
  * Options for the tick marks that represent the median
79
17
  */
80
- tickMedian: boolean | Record<string, ChannelAccessor<Datum>>;
18
+ tickMedian: Record<string, ChannelAccessor<Datum_1>> | boolean;
81
19
  /**
82
20
  * Options for the tick marks that represent the min/max range
83
21
  */
84
- tickMinMax: boolean | Record<string, ChannelAccessor<Datum>>;
22
+ tickMinMax: Record<string, ChannelAccessor<Datum_1>> | boolean;
85
23
  /**
86
24
  * Options for the dot marks that represent the outliers
87
25
  */
88
- dot: Record<string, ChannelAccessor<Datum>>;
26
+ dot: Record<string, ChannelAccessor<Datum_1>>;
89
27
  };
90
28
  events(): {};
91
29
  slots(): {};
@@ -1,4 +1,5 @@
1
1
  import type { DataRecord, BaseRectMarkProps, ChannelAccessor, LinkableMarkProps } from '../types/index.js';
2
+ import { recordizeY } from '../index.js';
2
3
  declare class __sveltets_Render<Datum extends DataRecord> {
3
4
  props(): Partial<{
4
5
  filter: import("../types/index.js").ConstantAccessor<boolean, Datum>;
@@ -7,14 +8,14 @@ declare class __sveltets_Render<Datum extends DataRecord> {
7
8
  fy: ChannelAccessor<Datum>;
8
9
  dx: import("../types/index.js").ConstantAccessor<number, Datum>;
9
10
  dy: import("../types/index.js").ConstantAccessor<number, Datum>;
10
- dodgeX: import("../transforms/dodge.js").DodgeXOptions;
11
- dodgeY: import("../transforms/dodge.js").DodgeYOptions;
11
+ dodgeX: recordizeY;
12
+ dodgeY: recordizeY;
12
13
  fill: ChannelAccessor<Datum>;
13
14
  fillOpacity: import("../types/index.js").ConstantAccessor<number, Datum>;
14
- sort: ((a: import("../types/data.js").RawValue, b: import("../types/data.js").RawValue) => number) | {
15
+ sort: {
15
16
  channel: string;
16
17
  order?: "ascending" | "descending";
17
- } | import("../types/index.js").ConstantAccessor<import("../types/data.js").RawValue, Datum>;
18
+ } | ((a: import("../types/data.js").RawValue, b: import("../types/data.js").RawValue) => number) | import("../types/index.js").ConstantAccessor<import("../types/data.js").RawValue, Datum>;
18
19
  stroke: ChannelAccessor<Datum>;
19
20
  strokeWidth: import("../types/index.js").ConstantAccessor<number, Datum>;
20
21
  strokeOpacity: import("../types/index.js").ConstantAccessor<number, Datum>;
@@ -5,6 +5,7 @@
5
5
  <script lang="ts" generics="Datum extends DataRecord">
6
6
  interface CustomMarkProps extends BaseMarkProps<Datum> {
7
7
  data?: Datum[];
8
+ type?: string;
8
9
  x?: ChannelAccessor<Datum>;
9
10
  x1?: ChannelAccessor<Datum>;
10
11
  x2?: ChannelAccessor<Datum>;
@@ -18,7 +19,6 @@
18
19
  marks?: Snippet<[{ records: ScaledDataRecord<Datum>[]; usedScales: UsedScales }]>;
19
20
  }
20
21
 
21
- import { getContext } from 'svelte';
22
22
  import type {
23
23
  PlotContext,
24
24
  DataRecord,
@@ -33,7 +33,13 @@
33
33
 
34
34
  import Mark from '../Mark.svelte';
35
35
 
36
- let { data = [{} as Datum], mark, marks, ...options }: CustomMarkProps = $props();
36
+ let {
37
+ data = [{} as Datum],
38
+ mark,
39
+ type = 'custom',
40
+ marks,
41
+ ...options
42
+ }: CustomMarkProps = $props();
37
43
 
38
44
  const args = $derived(sort({ data, ...options })) as CustomMarkProps;
39
45
 
@@ -53,7 +59,7 @@
53
59
  ];
54
60
  </script>
55
61
 
56
- <Mark type="custom" required={[]} channels={channels.filter((d) => !!options[d])} {...args}>
62
+ <Mark {type} required={[]} channels={channels.filter((d) => !!options[d])} {...args}>
57
63
  {#snippet children({ scaledData, usedScales })}
58
64
  {#if marks}
59
65
  {@render marks({ records: scaledData.filter((d) => d.valid), usedScales })}