Skip to content

Commit cdb82d0

Browse files
committed
fix more import declarations
1 parent 9523634 commit cdb82d0

16 files changed

+21
-21
lines changed

src/lib/helpers/autoTimeFormat.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import type { Scale } from '$lib/classes/Scale.svelte.js';
2-
import { isDate } from '$lib/helpers/typeChecks';
1+
import type { PlotScale } from '$lib/types/index.js';
2+
import { isDate } from '$lib/helpers/typeChecks.js';
33

44
const DATE_TIME: Intl.DateTimeFormatOptions = {
55
hour: 'numeric',
@@ -32,9 +32,9 @@ const autoFormatMonthYear = (locale: string) => {
3232
return (date: Date) => format(date).replace(' ', '\n');
3333
};
3434

35-
export default function autoTimeFormat(x: Scale, plotWidth: number, plotLocale: string) {
35+
export default function autoTimeFormat(x: PlotScale, plotWidth: number, plotLocale: string) {
3636
const daysPer100Px =
37-
((toNumber(x.domain[1]) - toNumber(x.domain[0])) / plotWidth / 864e5) * 100;
37+
((toNumber(x.domain[1] as Date) - toNumber(x.domain[0] as Date)) / plotWidth / 864e5) * 100;
3838
const format =
3939
daysPer100Px < 1
4040
? autoFormatDateTime(plotLocale)

src/lib/helpers/group.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { groupFacetsAndZ } from './group';
1+
import { groupFacetsAndZ } from './group.js';
22
import { describe, it, expect } from 'vitest';
33

44
describe('groupFacetsAndZ', () => {

src/lib/helpers/index.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { coalesce, isObject, omit } from './index';
1+
import { coalesce, isObject, omit } from './index.js';
22
import { describe, it, expect } from 'vitest';
33

44
describe('coalesce', () => {

src/lib/marks/Area.svelte

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,9 @@
3737
ChannelAccessor,
3838
ScaledDataRecord,
3939
LinkableMarkProps,
40-
PlotDefaults
40+
PlotDefaults,
41+
RawValue
4142
} from '../types/index.js';
42-
import type { RawValue } from 'svelteplot/types/index.js';
4343
import type { StackOptions } from '$lib/transforms/stack.js';
4444
4545
let markProps: AreaMarkProps = $props();

src/lib/marks/DifferenceY.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
PlotContext,
5454
PlotDefaults
5555
} from 'svelteplot/types/index.js';
56-
import { Line, Area } from '$lib/marks';
56+
import { Line, Area } from '$lib/marks/index.js';
5757
import { randomId, coalesce } from '$lib/helpers/index.js';
5858
import { getContext } from 'svelte';
5959
import { extent, max, min } from 'd3-array';

src/lib/marks/Geo.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
import { geoPath } from 'd3-geo';
3737
import { resolveChannel, resolveProp, resolveStyles } from '$lib/helpers/resolve.js';
3838
import callWithProps from '$lib/helpers/callWithProps.js';
39-
import { sort } from '$lib/transforms';
39+
import { sort } from '$lib/transforms/index.js';
4040
import { addEventHandlers } from './helpers/events.js';
4141
import GeoCanvas from './helpers/GeoCanvas.svelte';
4242
import { recordize } from '$lib/transforms/recordize.js';

src/lib/marks/RectX.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
import { intervalY, stackX, recordizeX } from 'svelteplot';
1212
import type { DataRecord, PlotContext, PlotDefaults } from '../types/index.js';
1313
import { getContext, type ComponentProps } from 'svelte';
14-
import type { StackOptions } from '$lib/transforms/stack';
14+
import type { StackOptions } from '$lib/transforms/stack.js';
1515
1616
let markProps: RectXMarkProps = $props();
1717

src/lib/marks/RectY.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
import { intervalX, stackY, recordizeY } from 'svelteplot';
1010
import type { DataRecord, PlotContext, PlotDefaults } from '../types/index.js';
1111
import { getContext, type ComponentProps } from 'svelte';
12-
import type { StackOptions } from '$lib/transforms/stack';
12+
import type { StackOptions } from '$lib/transforms/stack.js';
1313
1414
let markProps: RectYMarkProps = $props();
1515

src/lib/marks/helpers/Anchor.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<script>
2-
import { resolveProp } from '$lib/helpers/resolve';
2+
import { resolveProp } from '$lib/helpers/resolve.js';
33
44
let { datum = {}, options = {}, children } = $props();
55

src/lib/marks/helpers/AreaCanvas.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
import CanvasLayer from './CanvasLayer.svelte';
1313
import type { Attachment } from 'svelte/attachments';
1414
import { devicePixelRatio } from 'svelte/reactivity/window';
15-
import { resolveColor } from './canvas';
15+
import { resolveColor } from './canvas.js';
1616
1717
let {
1818
mark,

0 commit comments

Comments
 (0)