svelteplot 0.9.0-pr-313.2 → 0.9.0-pr-315.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.
package/README.md CHANGED
@@ -46,4 +46,3 @@ pnpm vi:report
46
46
  ```
47
47
 
48
48
  To see the differences side by side you can open http://localhost:5173/\_\_vr/report.html
49
-
@@ -12,8 +12,8 @@ export declare function normdev(p: number): number | false;
12
12
  export declare function confidenceInterval(data: {
13
13
  x: number;
14
14
  y: number;
15
- }[], predict: any, confidenceLevel: number): (x: any) => {
16
- x: any;
15
+ }[], predict: (x: number) => number, confidenceLevel: number): (x: number) => {
16
+ x: number;
17
17
  left: number;
18
- right: any;
18
+ right: number;
19
19
  };
@@ -2,12 +2,13 @@
2
2
  Creates a horizontal dot plot with x values along a single y position
3
3
  -->
4
4
  <script lang="ts" generics="Datum extends DataRow">
5
- interface DotXMarkProps extends Omit<ComponentProps<typeof Dot>, 'y' | 'data'> {
5
+ interface DotXMarkProps extends Omit<ComponentProps<typeof Dot>, 'y' | 'x' | 'data'> {
6
6
  data: Datum[];
7
+ x?: ChannelAccessor<Datum>;
7
8
  }
8
9
  import Dot from './Dot.svelte';
9
10
  import { recordizeX } from '../index.js';
10
- import type { DataRow } from '../types/index.js';
11
+ import type { ChannelAccessor, DataRow } from '../types/index.js';
11
12
  import type { ComponentProps } from 'svelte';
12
13
 
13
14
  let { data = [{} as Datum], ...options }: DotXMarkProps = $props();
@@ -1,28 +1,28 @@
1
1
  import { recordizeX } from '../index.js';
2
- import type { DataRow } from '../types/index.js';
2
+ import type { ChannelAccessor, DataRow } from '../types/index.js';
3
3
  declare function $$render<Datum extends DataRow>(): {
4
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
- fx: import("../types/channel").ChannelAccessor<Record<string | symbol, import("../types/data").RawValue>>;
8
- fy: import("../types/channel").ChannelAccessor<Record<string | symbol, import("../types/data").RawValue>>;
7
+ fx: ChannelAccessor<Record<string | symbol, import("../types/data").RawValue>>;
8
+ fy: ChannelAccessor<Record<string | symbol, import("../types/data").RawValue>>;
9
9
  dx: import("../types/index.js").ConstantAccessor<number, Record<string | symbol, import("../types/data").RawValue>>;
10
10
  dy: import("../types/index.js").ConstantAccessor<number, Record<string | symbol, import("../types/data").RawValue>>;
11
11
  dodgeX: recordizeX;
12
12
  dodgeY: recordizeX;
13
- fill: import("../types/channel").ChannelAccessor<Record<string | symbol, import("../types/data").RawValue>>;
13
+ fill: ChannelAccessor<Record<string | symbol, import("../types/data").RawValue>>;
14
14
  fillOpacity: import("../types/index.js").ConstantAccessor<number, Record<string | symbol, import("../types/data").RawValue>>;
15
15
  sort: {
16
16
  channel: string;
17
17
  order?: "ascending" | "descending";
18
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>>;
19
- stroke: import("../types/channel").ChannelAccessor<Record<string | symbol, import("../types/data").RawValue>>;
19
+ stroke: ChannelAccessor<Record<string | symbol, import("../types/data").RawValue>>;
20
20
  strokeWidth: import("../types/index.js").ConstantAccessor<number, Record<string | symbol, import("../types/data").RawValue>>;
21
21
  strokeOpacity: import("../types/index.js").ConstantAccessor<number, Record<string | symbol, import("../types/data").RawValue>>;
22
22
  strokeLinejoin: import("../types/index.js").ConstantAccessor<import("csstype").Property.StrokeLinejoin, Record<string | symbol, import("../types/data").RawValue>>;
23
23
  strokeLinecap: import("../types/index.js").ConstantAccessor<import("csstype").Property.StrokeLinecap, Record<string | symbol, import("../types/data").RawValue>>;
24
24
  strokeMiterlimit: import("../types/index.js").ConstantAccessor<number, Record<string | symbol, import("../types/data").RawValue>>;
25
- opacity: import("../types/channel").ChannelAccessor<Record<string | symbol, import("../types/data").RawValue>>;
25
+ opacity: ChannelAccessor<Record<string | symbol, import("../types/data").RawValue>>;
26
26
  strokeDasharray: import("../types/index.js").ConstantAccessor<string, Record<string | symbol, import("../types/data").RawValue>>;
27
27
  strokeDashoffset: import("../types/index.js").ConstantAccessor<number, Record<string | symbol, import("../types/data").RawValue>>;
28
28
  mixBlendMode: import("../types/index.js").ConstantAccessor<import("csstype").Property.MixBlendMode, Record<string | symbol, import("../types/data").RawValue>>;
@@ -66,14 +66,15 @@ declare function $$render<Datum extends DataRow>(): {
66
66
  cursor: import("../types/index.js").ConstantAccessor<import("csstype").Property.Cursor, Record<string | symbol, import("../types/data").RawValue>>;
67
67
  }> & import("../types/mark").LinkableMarkProps<Record<string | symbol, import("../types/data").RawValue>> & {
68
68
  data: Record<string | symbol, import("../types/data").RawValue>[];
69
- x: import("../types/channel").ChannelAccessor<Record<string | symbol, import("../types/data").RawValue>>;
70
- y: import("../types/channel").ChannelAccessor<Record<string | symbol, import("../types/data").RawValue>>;
71
- r?: import("../types/channel").ChannelAccessor<Record<string | symbol, import("../types/data").RawValue>>;
72
- symbol?: import("../types/channel").ChannelAccessor<Record<string | symbol, import("../types/data").RawValue>> | import("svelte").Snippet<[number, string]>;
69
+ x: ChannelAccessor<Record<string | symbol, import("../types/data").RawValue>>;
70
+ y: ChannelAccessor<Record<string | symbol, import("../types/data").RawValue>>;
71
+ r?: ChannelAccessor<Record<string | symbol, import("../types/data").RawValue>>;
72
+ symbol?: ChannelAccessor<Record<string | symbol, import("../types/data").RawValue>> | import("svelte").Snippet<[number, string]>;
73
73
  canvas?: boolean;
74
74
  dotClass?: import("../types/index.js").ConstantAccessor<string, Record<string | symbol, import("../types/data").RawValue>>;
75
- }, "y" | "data"> & {
75
+ }, "x" | "y" | "data"> & {
76
76
  data: Datum[];
77
+ x?: ChannelAccessor<Datum>;
77
78
  };
78
79
  exports: {};
79
80
  bindings: "";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "svelteplot",
3
- "version": "0.9.0-pr-313.2",
3
+ "version": "0.9.0-pr-315.1",
4
4
  "license": "ISC",
5
5
  "author": {
6
6
  "name": "Gregor Aisch",