svelteplot 0.7.0-pr-269.0 → 0.7.0-pr-275.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 (52) hide show
  1. package/LICENSE.md +19 -1
  2. package/README.md +1 -1
  3. package/dist/Mark.svelte.d.ts +43 -36
  4. package/dist/marks/Area.svelte.d.ts +11 -4
  5. package/dist/marks/AreaX.svelte.d.ts +11 -4
  6. package/dist/marks/Arrow.svelte.d.ts +42 -35
  7. package/dist/marks/AxisX.svelte.d.ts +15 -8
  8. package/dist/marks/AxisY.svelte.d.ts +14 -7
  9. package/dist/marks/BarX.svelte.d.ts +11 -4
  10. package/dist/marks/BarY.svelte.d.ts +11 -4
  11. package/dist/marks/BollingerX.svelte.d.ts +10 -3
  12. package/dist/marks/BollingerY.svelte.d.ts +10 -3
  13. package/dist/marks/BoxY.svelte.d.ts +16 -9
  14. package/dist/marks/Brush.svelte.d.ts +58 -31
  15. package/dist/marks/Cell.svelte.d.ts +41 -34
  16. package/dist/marks/CustomMark.svelte.d.ts +10 -3
  17. package/dist/marks/CustomMarkHTML.svelte.d.ts +15 -8
  18. package/dist/marks/DifferenceY.svelte.d.ts +17 -10
  19. package/dist/marks/Dot.svelte.d.ts +42 -35
  20. package/dist/marks/DotX.svelte.d.ts +11 -4
  21. package/dist/marks/DotY.svelte.d.ts +11 -4
  22. package/dist/marks/Frame.svelte.d.ts +85 -17
  23. package/dist/marks/Geo.svelte.d.ts +42 -35
  24. package/dist/marks/GridX.svelte.d.ts +12 -5
  25. package/dist/marks/GridY.svelte.d.ts +12 -5
  26. package/dist/marks/HTMLTooltip.svelte.d.ts +14 -7
  27. package/dist/marks/Image.svelte.d.ts +10 -3
  28. package/dist/marks/Line.svelte.d.ts +43 -36
  29. package/dist/marks/LineX.svelte.d.ts +11 -4
  30. package/dist/marks/LineY.svelte.d.ts +11 -4
  31. package/dist/marks/Link.svelte.d.ts +41 -34
  32. package/dist/marks/Pointer.svelte.d.ts +13 -6
  33. package/dist/marks/Rect.svelte.d.ts +11 -4
  34. package/dist/marks/RectX.svelte.d.ts +10 -3
  35. package/dist/marks/RectY.svelte.d.ts +10 -3
  36. package/dist/marks/RuleX.svelte.d.ts +12 -5
  37. package/dist/marks/RuleY.svelte.d.ts +12 -5
  38. package/dist/marks/Spike.svelte.d.ts +11 -4
  39. package/dist/marks/Text.svelte.d.ts +18 -11
  40. package/dist/marks/TickX.svelte.d.ts +11 -4
  41. package/dist/marks/TickY.svelte.d.ts +11 -4
  42. package/dist/marks/Vector.svelte.d.ts +41 -34
  43. package/dist/marks/WaffleX.svelte.d.ts +10 -3
  44. package/dist/marks/WaffleY.svelte.d.ts +10 -3
  45. package/dist/marks/helpers/Anchor.svelte.d.ts +19 -12
  46. package/dist/marks/helpers/MarkerPath.svelte.d.ts +10 -3
  47. package/dist/marks/helpers/RectPath.svelte.d.ts +13 -6
  48. package/dist/marks/helpers/waffle.d.ts +6 -0
  49. package/dist/marks/helpers/waffle.js +6 -38
  50. package/dist/ui/ExamplesPagePreview.svelte +148 -0
  51. package/dist/ui/ExamplesPagePreview.svelte.d.ts +13 -0
  52. package/package.json +16 -15
@@ -1,7 +1,7 @@
1
1
  import { recordizeX } from '../transforms/recordize.js';
2
2
  import type { DataRecord, ConstantAccessor, ChannelAccessor, RawValue } from '../types/index.js';
3
- declare class __sveltets_Render<Datum = DataRecord | RawValue> {
4
- props(): Omit<Partial<{
3
+ declare function $$render<Datum = DataRecord | RawValue>(): {
4
+ props: Omit<Partial<{
5
5
  filter: ConstantAccessor<boolean, Datum>;
6
6
  facet: "auto" | "include" | "exclude";
7
7
  fx: ChannelAccessor<Datum>;
@@ -64,7 +64,7 @@ declare class __sveltets_Render<Datum = DataRecord | RawValue> {
64
64
  style: string;
65
65
  cursor: ConstantAccessor<import("csstype").Property.Cursor, Datum>;
66
66
  }>, "fill" | "fillOpacity"> & {
67
- data?: Datum[] | undefined;
67
+ data?: Datum[];
68
68
  x?: ChannelAccessor<Datum>;
69
69
  y1?: ChannelAccessor<Datum>;
70
70
  y2?: ChannelAccessor<Datum>;
@@ -72,8 +72,15 @@ declare class __sveltets_Render<Datum = DataRecord | RawValue> {
72
72
  insetTop?: ConstantAccessor<number, Datum>;
73
73
  insetBottom?: ConstantAccessor<number, Datum>;
74
74
  };
75
- events(): {};
76
- slots(): {};
75
+ exports: {};
76
+ bindings: "";
77
+ slots: {};
78
+ events: {};
79
+ };
80
+ declare class __sveltets_Render<Datum = DataRecord | RawValue> {
81
+ props(): ReturnType<typeof $$render<Datum>>['props'];
82
+ events(): ReturnType<typeof $$render<Datum>>['events'];
83
+ slots(): ReturnType<typeof $$render<Datum>>['slots'];
77
84
  bindings(): "";
78
85
  exports(): {};
79
86
  }
@@ -1,7 +1,7 @@
1
1
  import { recordizeY } from '../transforms/recordize.js';
2
2
  import type { DataRecord, ConstantAccessor, ChannelAccessor } from '../types/index.js';
3
- declare class __sveltets_Render<Datum = DataRecord> {
4
- props(): Omit<Partial<{
3
+ declare function $$render<Datum = DataRecord>(): {
4
+ props: Omit<Partial<{
5
5
  filter: ConstantAccessor<boolean, Datum>;
6
6
  facet: "auto" | "include" | "exclude";
7
7
  fx: ChannelAccessor<Datum>;
@@ -64,7 +64,7 @@ declare class __sveltets_Render<Datum = DataRecord> {
64
64
  style: string;
65
65
  cursor: ConstantAccessor<import("csstype").Property.Cursor, Datum>;
66
66
  }>, "fill" | "fillOpacity"> & {
67
- data?: Datum[] | undefined;
67
+ data?: Datum[];
68
68
  y?: ChannelAccessor<Datum>;
69
69
  x1?: ChannelAccessor<Datum>;
70
70
  x2?: ChannelAccessor<Datum>;
@@ -72,8 +72,15 @@ declare class __sveltets_Render<Datum = DataRecord> {
72
72
  insetLeft?: ConstantAccessor<number, Datum>;
73
73
  insetRight?: ConstantAccessor<number, Datum>;
74
74
  };
75
- events(): {};
76
- slots(): {};
75
+ exports: {};
76
+ bindings: "";
77
+ slots: {};
78
+ events: {};
79
+ };
80
+ declare class __sveltets_Render<Datum = DataRecord> {
81
+ props(): ReturnType<typeof $$render<Datum>>['props'];
82
+ events(): ReturnType<typeof $$render<Datum>>['events'];
83
+ slots(): ReturnType<typeof $$render<Datum>>['slots'];
77
84
  bindings(): "";
78
85
  exports(): {};
79
86
  }
@@ -1,7 +1,7 @@
1
1
  import type { ChannelAccessor, DataRecord } from '../types/index.js';
2
2
  import { getPlotDefaults } from '../hooks/plotDefaults.js';
3
- declare class __sveltets_Render<Datum extends DataRecord> {
4
- props(): Omit<Partial<{
3
+ declare function $$render<Datum extends DataRecord>(): {
4
+ props: Omit<Partial<{
5
5
  filter: import("../types/index.js").ConstantAccessor<boolean, Record<string | symbol, import("../types/data").RawValue>>;
6
6
  facet: "auto" | "include" | "exclude";
7
7
  fx: ChannelAccessor<Record<string | symbol, import("../types/data").RawValue>>;
@@ -82,8 +82,15 @@ declare class __sveltets_Render<Datum extends DataRecord> {
82
82
  length?: ChannelAccessor<Datum>;
83
83
  rotate?: ChannelAccessor<Datum>;
84
84
  };
85
- events(): {};
86
- slots(): {};
85
+ exports: {};
86
+ bindings: "";
87
+ slots: {};
88
+ events: {};
89
+ };
90
+ declare class __sveltets_Render<Datum extends DataRecord> {
91
+ props(): ReturnType<typeof $$render<Datum>>['props'];
92
+ events(): ReturnType<typeof $$render<Datum>>['events'];
93
+ slots(): ReturnType<typeof $$render<Datum>>['slots'];
87
94
  bindings(): "";
88
95
  exports(): {};
89
96
  }
@@ -2,8 +2,8 @@ import type * as CSS from 'csstype';
2
2
  import { type Snippet } from 'svelte';
3
3
  import type { DataRecord, ConstantAccessor, ChannelAccessor, LinkableMarkProps } from '../types/index.js';
4
4
  import { sort } from '../index.js';
5
- declare class __sveltets_Render<Datum extends DataRecord> {
6
- props(): Partial<{
5
+ declare function $$render<Datum extends DataRecord>(): {
6
+ props: Partial<{
7
7
  filter: ConstantAccessor<boolean, Datum>;
8
8
  facet: "auto" | "include" | "exclude";
9
9
  fx: ChannelAccessor<Datum>;
@@ -66,24 +66,24 @@ declare class __sveltets_Render<Datum extends DataRecord> {
66
66
  style: string;
67
67
  cursor: ConstantAccessor<CSS.Property.Cursor, Datum>;
68
68
  }> & LinkableMarkProps<Datum> & {
69
- data?: Datum[] | undefined;
69
+ data?: Datum[];
70
70
  x?: ChannelAccessor<Datum>;
71
71
  y?: ChannelAccessor<Datum>;
72
72
  children?: Snippet;
73
- text: ConstantAccessor<string | false | null | undefined, Datum>;
73
+ text: ConstantAccessor<string | null | false | undefined, Datum>;
74
74
  title?: ConstantAccessor<string, Datum>;
75
75
  /**
76
76
  * the font size of the text
77
77
  */
78
78
  fontFamily?: ConstantAccessor<CSS.Property.FontFamily, Datum>;
79
- fontSize?: ConstantAccessor<number | "-moz-initial" | "inherit" | "initial" | "revert" | "revert-layer" | "unset" | (string & {}) | "small" | "math" | "large" | "medium" | "x-large" | "x-small" | "xx-large" | "xx-small" | "xxx-large" | "larger" | "smaller", Datum>;
79
+ fontSize?: ConstantAccessor<CSS.Property.FontSize | number, Datum>;
80
80
  fontWeight?: ConstantAccessor<CSS.Property.FontWeight, Datum>;
81
81
  fontStyle?: ConstantAccessor<CSS.Property.FontStyle, Datum>;
82
82
  fontVariant?: ConstantAccessor<CSS.Property.FontVariant, Datum>;
83
- letterSpacing?: ConstantAccessor<CSS.Property.LetterSpacing<0 | (string & {})>, Datum>;
84
- wordSpacing?: ConstantAccessor<CSS.Property.WordSpacing<0 | (string & {})>, Datum>;
83
+ letterSpacing?: ConstantAccessor<CSS.Property.LetterSpacing, Datum>;
84
+ wordSpacing?: ConstantAccessor<CSS.Property.WordSpacing, Datum>;
85
85
  textTransform?: ConstantAccessor<CSS.Property.TextTransform, Datum>;
86
- textDecoration?: ConstantAccessor<CSS.Property.TextDecoration<0 | (string & {})>, Datum>;
86
+ textDecoration?: ConstantAccessor<CSS.Property.TextDecoration, Datum>;
87
87
  /**
88
88
  * the horizontal text anchor; start, end, or middle
89
89
  */
@@ -101,14 +101,21 @@ declare class __sveltets_Render<Datum extends DataRecord> {
101
101
  * @default 1.2
102
102
  */
103
103
  lineHeight?: ConstantAccessor<number, Datum>;
104
- frameAnchor?: ConstantAccessor<"bottom" | "top" | "left" | "right" | "middle" | "top-left" | "bottom-left" | "top-right" | "bottom-right", Datum>;
104
+ frameAnchor?: ConstantAccessor<"bottom" | "top" | "left" | "right" | "top-left" | "bottom-left" | "top-right" | "bottom-right" | "middle", Datum>;
105
105
  /**
106
106
  * rotate text by angle in degrees
107
107
  */
108
108
  rotate?: ConstantAccessor<number, Datum>;
109
109
  };
110
- events(): {};
111
- slots(): {};
110
+ exports: {};
111
+ bindings: "";
112
+ slots: {};
113
+ events: {};
114
+ };
115
+ declare class __sveltets_Render<Datum extends DataRecord> {
116
+ props(): ReturnType<typeof $$render<Datum>>['props'];
117
+ events(): ReturnType<typeof $$render<Datum>>['events'];
118
+ slots(): ReturnType<typeof $$render<Datum>>['slots'];
112
119
  bindings(): "";
113
120
  exports(): {};
114
121
  }
@@ -1,7 +1,7 @@
1
1
  import type { ChannelAccessor, DataRow, ConstantAccessor } from '../types/index.js';
2
2
  import { recordizeX } from '../index.js';
3
- declare class __sveltets_Render<Datum extends DataRow> {
4
- props(): Omit<Partial<{
3
+ declare function $$render<Datum extends DataRow>(): {
4
+ props: Omit<Partial<{
5
5
  filter: ConstantAccessor<boolean, Datum>;
6
6
  facet: "auto" | "include" | "exclude";
7
7
  fx: ChannelAccessor<Datum>;
@@ -80,8 +80,15 @@ declare class __sveltets_Render<Datum extends DataRow> {
80
80
  */
81
81
  tickLength?: ConstantAccessor<number, Datum>;
82
82
  };
83
- events(): {};
84
- slots(): {};
83
+ exports: {};
84
+ bindings: "";
85
+ slots: {};
86
+ events: {};
87
+ };
88
+ declare class __sveltets_Render<Datum extends DataRow> {
89
+ props(): ReturnType<typeof $$render<Datum>>['props'];
90
+ events(): ReturnType<typeof $$render<Datum>>['events'];
91
+ slots(): ReturnType<typeof $$render<Datum>>['slots'];
85
92
  bindings(): "";
86
93
  exports(): {};
87
94
  }
@@ -1,7 +1,7 @@
1
1
  import type { ChannelAccessor, DataRow, ConstantAccessor } from '../types/index.js';
2
2
  import { recordizeY } from '../index.js';
3
- declare class __sveltets_Render<Datum extends DataRow> {
4
- props(): Omit<Partial<{
3
+ declare function $$render<Datum extends DataRow>(): {
4
+ props: Omit<Partial<{
5
5
  filter: ConstantAccessor<boolean, Datum>;
6
6
  facet: "auto" | "include" | "exclude";
7
7
  fx: ChannelAccessor<Datum>;
@@ -80,8 +80,15 @@ declare class __sveltets_Render<Datum extends DataRow> {
80
80
  */
81
81
  tickLength?: ConstantAccessor<number, Datum>;
82
82
  };
83
- events(): {};
84
- slots(): {};
83
+ exports: {};
84
+ bindings: "";
85
+ slots: {};
86
+ events: {};
87
+ };
88
+ declare class __sveltets_Render<Datum extends DataRow> {
89
+ props(): ReturnType<typeof $$render<Datum>>['props'];
90
+ events(): ReturnType<typeof $$render<Datum>>['events'];
91
+ slots(): ReturnType<typeof $$render<Datum>>['slots'];
85
92
  bindings(): "";
86
93
  exports(): {};
87
94
  }
@@ -5,8 +5,8 @@ export type ShapeRenderer = {
5
5
  import type { DataRecord, ChannelAccessor } from '../types/index.js';
6
6
  import { type Snippet } from 'svelte';
7
7
  import { sort } from '../index.js';
8
- declare class __sveltets_Render<Datum extends DataRecord> {
9
- props(): Partial<{
8
+ declare function $$render<Datum extends DataRecord>(): {
9
+ props: Partial<{
10
10
  filter: import("../types/index.js").ConstantAccessor<boolean, Datum>;
11
11
  facet: "auto" | "include" | "exclude";
12
12
  fx: ChannelAccessor<Datum>;
@@ -35,36 +35,36 @@ declare class __sveltets_Render<Datum extends DataRecord> {
35
35
  imageFilter: import("../types/index.js").ConstantAccessor<string, Datum>;
36
36
  shapeRendering: import("../types/index.js").ConstantAccessor<import("csstype").Property.ShapeRendering, Datum>;
37
37
  paintOrder: import("../types/index.js").ConstantAccessor<string, Datum>;
38
- onclick: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
39
- ondblclick: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
40
- onmouseup: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
41
- onmousedown: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
42
- onmouseenter: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
43
- onmousemove: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
44
- onmouseleave: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
45
- onmouseout: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
46
- onmouseover: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
47
- onpointercancel: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
48
- onpointerdown: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
49
- onpointerup: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
50
- onpointerenter: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
51
- onpointerleave: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
52
- onpointermove: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
53
- onpointerover: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
54
- onpointerout: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
55
- ondrag: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
56
- ondrop: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
57
- ondragstart: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
58
- ondragenter: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
59
- ondragleave: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
60
- ondragover: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
61
- ondragend: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
62
- ontouchstart: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
63
- ontouchmove: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
64
- ontouchend: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
65
- ontouchcancel: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
66
- oncontextmenu: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
67
- onwheel: import("svelte/elements.js").MouseEventHandler<SVGPathElement>;
38
+ onclick: import("svelte/elements").MouseEventHandler<SVGPathElement>;
39
+ ondblclick: import("svelte/elements").MouseEventHandler<SVGPathElement>;
40
+ onmouseup: import("svelte/elements").MouseEventHandler<SVGPathElement>;
41
+ onmousedown: import("svelte/elements").MouseEventHandler<SVGPathElement>;
42
+ onmouseenter: import("svelte/elements").MouseEventHandler<SVGPathElement>;
43
+ onmousemove: import("svelte/elements").MouseEventHandler<SVGPathElement>;
44
+ onmouseleave: import("svelte/elements").MouseEventHandler<SVGPathElement>;
45
+ onmouseout: import("svelte/elements").MouseEventHandler<SVGPathElement>;
46
+ onmouseover: import("svelte/elements").MouseEventHandler<SVGPathElement>;
47
+ onpointercancel: import("svelte/elements").MouseEventHandler<SVGPathElement>;
48
+ onpointerdown: import("svelte/elements").MouseEventHandler<SVGPathElement>;
49
+ onpointerup: import("svelte/elements").MouseEventHandler<SVGPathElement>;
50
+ onpointerenter: import("svelte/elements").MouseEventHandler<SVGPathElement>;
51
+ onpointerleave: import("svelte/elements").MouseEventHandler<SVGPathElement>;
52
+ onpointermove: import("svelte/elements").MouseEventHandler<SVGPathElement>;
53
+ onpointerover: import("svelte/elements").MouseEventHandler<SVGPathElement>;
54
+ onpointerout: import("svelte/elements").MouseEventHandler<SVGPathElement>;
55
+ ondrag: import("svelte/elements").MouseEventHandler<SVGPathElement>;
56
+ ondrop: import("svelte/elements").MouseEventHandler<SVGPathElement>;
57
+ ondragstart: import("svelte/elements").MouseEventHandler<SVGPathElement>;
58
+ ondragenter: import("svelte/elements").MouseEventHandler<SVGPathElement>;
59
+ ondragleave: import("svelte/elements").MouseEventHandler<SVGPathElement>;
60
+ ondragover: import("svelte/elements").MouseEventHandler<SVGPathElement>;
61
+ ondragend: import("svelte/elements").MouseEventHandler<SVGPathElement>;
62
+ ontouchstart: import("svelte/elements").MouseEventHandler<SVGPathElement>;
63
+ ontouchmove: import("svelte/elements").MouseEventHandler<SVGPathElement>;
64
+ ontouchend: import("svelte/elements").MouseEventHandler<SVGPathElement>;
65
+ ontouchcancel: import("svelte/elements").MouseEventHandler<SVGPathElement>;
66
+ oncontextmenu: import("svelte/elements").MouseEventHandler<SVGPathElement>;
67
+ onwheel: import("svelte/elements").MouseEventHandler<SVGPathElement>;
68
68
  class: string;
69
69
  style: string;
70
70
  cursor: import("../types/index.js").ConstantAccessor<import("csstype").Property.Cursor, Datum>;
@@ -86,8 +86,15 @@ declare class __sveltets_Render<Datum extends DataRecord> {
86
86
  children?: Snippet;
87
87
  canvas?: boolean;
88
88
  };
89
- events(): {};
90
- slots(): {};
89
+ exports: {};
90
+ bindings: "";
91
+ slots: {};
92
+ events: {};
93
+ };
94
+ declare class __sveltets_Render<Datum extends DataRecord> {
95
+ props(): ReturnType<typeof $$render<Datum>>['props'];
96
+ events(): ReturnType<typeof $$render<Datum>>['events'];
97
+ slots(): ReturnType<typeof $$render<Datum>>['slots'];
91
98
  bindings(): "";
92
99
  exports(): {};
93
100
  }
@@ -1,8 +1,15 @@
1
1
  import type { DataRecord } from '../types';
2
+ declare function $$render<Datum extends DataRecord>(): {
3
+ props: any;
4
+ exports: {};
5
+ bindings: "";
6
+ slots: {};
7
+ events: {};
8
+ };
2
9
  declare class __sveltets_Render<Datum extends DataRecord> {
3
- props(): any;
4
- events(): {};
5
- slots(): {};
10
+ props(): ReturnType<typeof $$render<Datum>>['props'];
11
+ events(): ReturnType<typeof $$render<Datum>>['events'];
12
+ slots(): ReturnType<typeof $$render<Datum>>['slots'];
6
13
  bindings(): "";
7
14
  exports(): {};
8
15
  }
@@ -1,8 +1,15 @@
1
1
  import type { DataRecord } from '../types';
2
+ declare function $$render<Datum extends DataRecord>(): {
3
+ props: any;
4
+ exports: {};
5
+ bindings: "";
6
+ slots: {};
7
+ events: {};
8
+ };
2
9
  declare class __sveltets_Render<Datum extends DataRecord> {
3
- props(): any;
4
- events(): {};
5
- slots(): {};
10
+ props(): ReturnType<typeof $$render<Datum>>['props'];
11
+ events(): ReturnType<typeof $$render<Datum>>['events'];
12
+ slots(): ReturnType<typeof $$render<Datum>>['slots'];
6
13
  bindings(): "";
7
14
  exports(): {};
8
15
  }
@@ -1,19 +1,26 @@
1
1
  import type { ConstantAccessor } from '../../types';
2
- declare class __sveltets_Render<Datum extends Record<string, any>> {
3
- props(): {
4
- datum?: Datum | undefined;
2
+ declare function $$render<Datum extends Record<string, any>>(): {
3
+ props: {
4
+ datum?: Datum;
5
5
  options?: {
6
+ href?: ConstantAccessor<string, Datum>;
7
+ target?: ConstantAccessor<string, Datum>;
8
+ rel?: ConstantAccessor<string, Datum>;
9
+ type?: ConstantAccessor<string, Datum>;
10
+ download?: ConstantAccessor<string, Datum>;
6
11
  [key: string]: any;
7
- href?: ConstantAccessor<string, Datum_1>;
8
- target?: ConstantAccessor<string, Datum_1>;
9
- rel?: ConstantAccessor<string, Datum_1>;
10
- type?: ConstantAccessor<string, Datum_1>;
11
- download?: ConstantAccessor<string, Datum_1>;
12
- } | undefined;
13
- children?: (() => any) | undefined;
12
+ };
13
+ children?: () => any;
14
14
  };
15
- events(): {};
16
- slots(): {};
15
+ exports: {};
16
+ bindings: "";
17
+ slots: {};
18
+ events: {};
19
+ };
20
+ declare class __sveltets_Render<Datum extends Record<string, any>> {
21
+ props(): ReturnType<typeof $$render<Datum>>['props'];
22
+ events(): ReturnType<typeof $$render<Datum>>['events'];
23
+ slots(): ReturnType<typeof $$render<Datum>>['slots'];
17
24
  bindings(): "";
18
25
  exports(): {};
19
26
  }
@@ -1,8 +1,15 @@
1
1
  import type { DataRecord } from '../../types/index.js';
2
+ declare function $$render<Datum extends DataRecord>(): {
3
+ props: any;
4
+ exports: {};
5
+ bindings: "";
6
+ slots: {};
7
+ events: {};
8
+ };
2
9
  declare class __sveltets_Render<Datum extends DataRecord> {
3
- props(): any;
4
- events(): {};
5
- slots(): {};
10
+ props(): ReturnType<typeof $$render<Datum>>['props'];
11
+ events(): ReturnType<typeof $$render<Datum>>['events'];
12
+ slots(): ReturnType<typeof $$render<Datum>>['slots'];
6
13
  bindings(): "";
7
14
  exports(): {};
8
15
  }
@@ -1,15 +1,15 @@
1
1
  import type { BaseMarkProps, BaseRectMarkProps } from '../../types/mark.js';
2
2
  import type { DataRecord, ScaledDataRecord } from '../../types/data.js';
3
3
  import type { UsedScales } from '../../types/index.js';
4
- declare class __sveltets_Render<Datum extends DataRecord> {
5
- props(): {
6
- datum: ScaledDataRecord<Datum_1>;
4
+ declare function $$render<Datum extends DataRecord>(): {
5
+ props: {
6
+ datum: ScaledDataRecord<Datum>;
7
7
  class: string | null;
8
8
  x: number;
9
9
  y: number;
10
10
  width: number;
11
11
  height: number;
12
- options: BaseRectMarkProps<Datum_1> & BaseMarkProps<Datum_1>;
12
+ options: BaseRectMarkProps<Datum> & BaseMarkProps<Datum>;
13
13
  /**
14
14
  * By default, the `inset` property is applied to all four insets. Mark components
15
15
  * can tweak this behavior for insetTop and insetBottom by setting the
@@ -25,8 +25,15 @@ declare class __sveltets_Render<Datum extends DataRecord> {
25
25
  usedScales: UsedScales;
26
26
  fallbackStyle?: "fill" | "stroke";
27
27
  };
28
- events(): {};
29
- slots(): {};
28
+ exports: {};
29
+ bindings: "";
30
+ slots: {};
31
+ events: {};
32
+ };
33
+ declare class __sveltets_Render<Datum extends DataRecord> {
34
+ props(): ReturnType<typeof $$render<Datum>>['props'];
35
+ events(): ReturnType<typeof $$render<Datum>>['events'];
36
+ slots(): ReturnType<typeof $$render<Datum>>['slots'];
30
37
  bindings(): "";
31
38
  exports(): {};
32
39
  }
@@ -1,3 +1,9 @@
1
+ /**
2
+ * This implementation is based on the waffle chart implementation in Observable Plot!
3
+ * https://github.com/observablehq/plot/blob/main/src/marks/waffle.js
4
+ *
5
+ * Kept the comments from the original implementation for clarity.
6
+ */
1
7
  import type { Snippet } from 'svelte';
2
8
  import type { StackOptions } from '../../transforms/stack';
3
9
  import type { BorderRadius, ConstantAccessor, PlotScales, ScaledDataRecord } from '../../types';
@@ -1,41 +1,9 @@
1
- // A waffle is approximately a rectangular shape, but may have one or two corner
2
- // cuts if the starting or ending value is not an even multiple of the number of
3
- // columns (the width of the waffle in cells). We can represent any waffle by
4
- // 8 points; below is a waffle of five columns representing the interval 2–11:
5
- //
6
- // 1-0
7
- // |•7-------6
8
- // |• • • • •|
9
- // 2---3• • •|
10
- // 4-----5
11
- //
12
- // Note that points 0 and 1 always have the same y-value, points 1 and 2 have
13
- // the same x-value, and so on, so we don’t need to materialize the x- and y-
14
- // values of all points. Also note that we can’t use the already-projected y-
15
- // values because these assume that y-values are distributed linearly along y
16
- // rather than wrapping around in columns.
17
- //
18
- // The corner points may be coincident. If the ending value is an even multiple
19
- // of the number of columns, say representing the interval 2–10, then points 6,
20
- // 7, and 0 are the same.
21
- //
22
- // 1-----0/7/6
23
- // |• • • • •|
24
- // 2---3• • •|
25
- // 4-----5
26
- //
27
- // Likewise if the starting value is an even multiple, say representing the
28
- // interval 0–10, points 2–4 are coincident.
29
- //
30
- // 1-----0/7/6
31
- // |• • • • •|
32
- // |• • • • •|
33
- // 4/3/2-----5
34
- //
35
- // Waffles can also represent fractional intervals (e.g., 2.4–10.1). These
36
- // require additional corner cuts, so the implementation below generates a few
37
- // more points.
38
- //
1
+ /**
2
+ * This implementation is based on the waffle chart implementation in Observable Plot!
3
+ * https://github.com/observablehq/plot/blob/main/src/marks/waffle.js
4
+ *
5
+ * Kept the comments from the original implementation for clarity.
6
+ */
39
7
  import { getPatternId } from '../../helpers/getBaseStyles';
40
8
  export function wafflePolygon(y, options, scales) {
41
9
  const x = y === 'y' ? 'x' : 'y';