svelteplot 0.3.5-pr-121.4 → 0.3.5-pr-121.6

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.
@@ -1,2 +1,2 @@
1
- import type { Scale } from '../classes/Scale.svelte.js';
2
- export default function autoTimeFormat(x: Scale, plotWidth: number, plotLocale: string): (date: Date) => string[];
1
+ import type { PlotScale } from '../types/index.js';
2
+ export default function autoTimeFormat(x: PlotScale, plotWidth: number, plotLocale: string): (date: Date) => string[];
@@ -1,4 +1,4 @@
1
- import { isDate } from './typeChecks';
1
+ import { isDate } from './typeChecks.js';
2
2
  const DATE_TIME = {
3
3
  hour: 'numeric',
4
4
  minute: 'numeric',
@@ -37,9 +37,9 @@
37
37
  ChannelAccessor,
38
38
  ScaledDataRecord,
39
39
  LinkableMarkProps,
40
- PlotDefaults
40
+ PlotDefaults,
41
+ RawValue
41
42
  } from '../types/index.js';
42
- import type { RawValue } from '../types/index.js';
43
43
  import type { StackOptions } from '../transforms/stack.js';
44
44
 
45
45
  let markProps: AreaMarkProps = $props();
@@ -1,6 +1,5 @@
1
1
  import { type CurveFactory } from 'd3-shape';
2
- import type { CurveName, DataRecord, ConstantAccessor, ChannelAccessor, LinkableMarkProps } from '../types/index.js';
3
- import type { RawValue } from '../types/index.js';
2
+ import type { CurveName, DataRecord, ConstantAccessor, ChannelAccessor, LinkableMarkProps, RawValue } from '../types/index.js';
4
3
  import type { StackOptions } from '../transforms/stack.js';
5
4
  declare class __sveltets_Render<Datum extends DataRecord> {
6
5
  props(): Partial<{
@@ -15,7 +14,7 @@ declare class __sveltets_Render<Datum extends DataRecord> {
15
14
  sort: {
16
15
  channel: string;
17
16
  order?: "ascending" | "descending";
18
- } | ((a: import("../types/data").RawValue, b: import("../types/data").RawValue) => number) | ConstantAccessor<import("../types/data").RawValue, Datum>;
17
+ } | ((a: RawValue, b: RawValue) => number) | ConstantAccessor<RawValue, Datum>;
19
18
  stroke: ChannelAccessor<Datum>;
20
19
  strokeWidth: ConstantAccessor<number, Datum>;
21
20
  strokeOpacity: ConstantAccessor<number, Datum>;
@@ -69,7 +69,7 @@ declare class __sveltets_Render<Datum extends DataRow> {
69
69
  z?: ChannelAccessor<import("../types/data").DataRecord>;
70
70
  curve?: import("../types/index.js").CurveName | import("d3-shape").CurveFactory;
71
71
  tension?: number;
72
- sort?: import("../types/index.js").ConstantAccessor<renameChannels> | {
72
+ sort?: import("../types/index.js").ConstantAccessor<import("../types/data").RawValue> | {
73
73
  channel: "stroke" | "fill";
74
74
  };
75
75
  stack?: Partial<renameChannels>;
@@ -69,7 +69,7 @@ declare class __sveltets_Render<Datum extends DataRow> {
69
69
  z?: ChannelAccessor<import("../types/data").DataRecord>;
70
70
  curve?: import("../types/index.js").CurveName | import("d3-shape").CurveFactory;
71
71
  tension?: number;
72
- sort?: import("../types/index.js").ConstantAccessor<renameChannels> | {
72
+ sort?: import("../types/index.js").ConstantAccessor<import("../types/data").RawValue> | {
73
73
  channel: "stroke" | "fill";
74
74
  };
75
75
  stack?: Partial<renameChannels>;
@@ -53,7 +53,7 @@
53
53
  PlotContext,
54
54
  PlotDefaults
55
55
  } from '../types/index.js';
56
- import { Line, Area } from './';
56
+ import { Line, Area } from './index.js';
57
57
  import { randomId, coalesce } from '../helpers/index.js';
58
58
  import { getContext } from 'svelte';
59
59
  import { extent, max, min } from 'd3-array';
@@ -36,7 +36,7 @@
36
36
  import { geoPath } from 'd3-geo';
37
37
  import { resolveChannel, resolveProp, resolveStyles } from '../helpers/resolve.js';
38
38
  import callWithProps from '../helpers/callWithProps.js';
39
- import { sort } from '../transforms';
39
+ import { sort } from '../transforms/index.js';
40
40
  import { addEventHandlers } from './helpers/events.js';
41
41
  import GeoCanvas from './helpers/GeoCanvas.svelte';
42
42
  import { recordize } from '../transforms/recordize.js';
@@ -11,7 +11,7 @@
11
11
  import { intervalY, stackX, recordizeX } from '..';
12
12
  import type { DataRecord, PlotContext, PlotDefaults } from '../types/index.js';
13
13
  import { getContext, type ComponentProps } from 'svelte';
14
- import type { StackOptions } from '../transforms/stack';
14
+ import type { StackOptions } from '../transforms/stack.js';
15
15
 
16
16
  let markProps: RectXMarkProps = $props();
17
17
 
@@ -1,7 +1,7 @@
1
1
  import Rect from './Rect.svelte';
2
2
  import type { DataRecord } from '../types/index.js';
3
3
  import { type ComponentProps } from 'svelte';
4
- import type { StackOptions } from '../transforms/stack';
4
+ import type { StackOptions } from '../transforms/stack.js';
5
5
  interface RectXMarkProps extends Omit<ComponentProps<typeof Rect>, 'y'> {
6
6
  stack?: Partial<StackOptions>;
7
7
  }
@@ -9,7 +9,7 @@
9
9
  import { intervalX, stackY, recordizeY } from '..';
10
10
  import type { DataRecord, PlotContext, PlotDefaults } from '../types/index.js';
11
11
  import { getContext, type ComponentProps } from 'svelte';
12
- import type { StackOptions } from '../transforms/stack';
12
+ import type { StackOptions } from '../transforms/stack.js';
13
13
 
14
14
  let markProps: RectYMarkProps = $props();
15
15
 
@@ -1,7 +1,7 @@
1
1
  import Rect from './Rect.svelte';
2
2
  import type { DataRecord } from '../types/index.js';
3
3
  import { type ComponentProps } from 'svelte';
4
- import type { StackOptions } from '../transforms/stack';
4
+ import type { StackOptions } from '../transforms/stack.js';
5
5
  interface RectYMarkProps extends Omit<ComponentProps<typeof Rect>, 'y'> {
6
6
  stack?: Partial<StackOptions>;
7
7
  }
@@ -1,5 +1,5 @@
1
1
  <script>
2
- import { resolveProp } from '../../helpers/resolve';
2
+ import { resolveProp } from '../../helpers/resolve.js';
3
3
 
4
4
  let { datum = {}, options = {}, children } = $props();
5
5
 
@@ -12,7 +12,7 @@
12
12
  import CanvasLayer from './CanvasLayer.svelte';
13
13
  import type { Attachment } from 'svelte/attachments';
14
14
  import { devicePixelRatio } from 'svelte/reactivity/window';
15
- import { resolveColor } from './canvas';
15
+ import { resolveColor } from './canvas.js';
16
16
 
17
17
  let {
18
18
  mark,
@@ -13,7 +13,7 @@
13
13
  import CanvasLayer from './CanvasLayer.svelte';
14
14
  import { getContext } from 'svelte';
15
15
  import { devicePixelRatio } from 'svelte/reactivity/window';
16
- import { resolveColor } from './canvas';
16
+ import { resolveColor } from './canvas.js';
17
17
 
18
18
  const { getPlotState } = getContext<PlotContext>('svelteplot');
19
19
  const plot = $derived(getPlotState());
@@ -12,7 +12,7 @@
12
12
  import CanvasLayer from './CanvasLayer.svelte';
13
13
  import type { Attachment } from 'svelte/attachments';
14
14
  import { devicePixelRatio } from 'svelte/reactivity/window';
15
- import { resolveColor } from './canvas';
15
+ import { resolveColor } from './canvas.js';
16
16
 
17
17
  let {
18
18
  mark,
@@ -37,7 +37,7 @@ Helper component for rendering rectangular marks in SVG
37
37
  PlotContext,
38
38
  DataRecord
39
39
  } from '../..';
40
- import { addEventHandlers } from './events';
40
+ import { addEventHandlers } from './events.js';
41
41
  import { getContext } from 'svelte';
42
42
  import Anchor from './Anchor.svelte';
43
43
 
@@ -47,7 +47,7 @@
47
47
  import { resolveChannel } from '../../helpers/resolve.js';
48
48
  import { confidenceInterval } from '../../helpers/math.js';
49
49
  import callWithProps from '../../helpers/callWithProps.js';
50
- import { isDate } from '../../helpers/typeChecks';
50
+ import { isDate } from '../../helpers/typeChecks.js';
51
51
 
52
52
  const regressions = new Map<RegressionType, typeof regressionLinear>([
53
53
  ['linear', regressionLinear],
@@ -1,9 +1,9 @@
1
1
  import type { ComponentProps } from 'svelte';
2
2
  import type { ColorScheme } from './colorScheme.js';
3
3
  import type { GeoProjection } from 'd3-geo';
4
- import type { ChannelAccessor, ChannelName, ColorScaleOptions, DataRecord, LegendScaleOptions, PlotScales, ScaleOptions, XScaleOptions, YScaleOptions } from '.';
4
+ import type { ChannelAccessor, ChannelName, ColorScaleOptions, DataRecord, LegendScaleOptions, PlotScales, ScaleOptions, XScaleOptions, YScaleOptions } from './index.js';
5
5
  import type { Snippet } from 'svelte';
6
- import type { Area, AreaX, AreaY, Arrow, AxisX, AxisY, BarX, BarY, BoxX, BoxY, Brush, BrushX, BrushY, Cell, DifferenceY, Dot, Frame, Geo, Graticule, GridX, GridY, Line, Link, Pointer, Rect, RectX, RectY, RuleX, RuleY, Sphere, Spike, Text, TickX, TickY, Vector } from '../marks';
6
+ import type { Area, AreaX, AreaY, Arrow, AxisX, AxisY, BarX, BarY, BoxX, BoxY, Brush, BrushX, BrushY, Cell, DifferenceY, Dot, Frame, Geo, Graticule, GridX, GridY, Line, Link, Pointer, Rect, RectX, RectY, RuleX, RuleY, Sphere, Spike, Text, TickX, TickY, Vector } from '../marks/index.js';
7
7
  export type PlotState = {
8
8
  width: number;
9
9
  height: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "svelteplot",
3
- "version": "0.3.5-pr-121.4",
3
+ "version": "0.3.5-pr-121.6",
4
4
  "license": "ISC",
5
5
  "author": {
6
6
  "name": "Gregor Aisch",
@@ -19,7 +19,8 @@
19
19
  "prepack": "npx svelte-package",
20
20
  "release-next": "npm version prerelease --preid next && npm publish && git push && git push --tags && sleep 1 && npm dist-tag add svelteplot@$(npm view . version) next",
21
21
  "docs": "npm run build && cd build && rsync --recursive . vis4.net:svelteplot/alpha0/",
22
- "screenshots": "node screenshot-examples.js"
22
+ "screenshots": "node screenshot-examples.js",
23
+ "check-js-extensions": "node scripts/check-js-extensions.js src"
23
24
  },
24
25
  "exports": {
25
26
  ".": {