Skip to content

Commit

Permalink
Update @layerstack/* packages and remove deep imports (ex. `@layers…
Browse files Browse the repository at this point in the history
…tack/utils/array`)
  • Loading branch information
techniq committed Nov 21, 2024
1 parent 4359402 commit 9621a4e
Show file tree
Hide file tree
Showing 11 changed files with 253 additions and 73 deletions.
5 changes: 5 additions & 0 deletions .changeset/pink-dingos-nail.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'layerchart': patch
---

Update `@layerstack/*` packages and remove deep imports (ex. `@layerstack/utils/array`)
8 changes: 4 additions & 4 deletions packages/layerchart/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,10 @@
},
"type": "module",
"dependencies": {
"@layerstack/svelte-actions": "^0.0.7",
"@layerstack/svelte-stores": "^0.0.6",
"@layerstack/tailwind": "^0.0.9",
"@layerstack/utils": "^0.0.5",
"@layerstack/svelte-actions": "^0.0.8",
"@layerstack/svelte-stores": "^0.0.8",
"@layerstack/tailwind": "^0.0.10",
"@layerstack/utils": "^0.0.6",
"d3-array": "^3.2.4",
"d3-color": "^3.1.0",
"d3-delaunay": "^6.0.4",
Expand Down
2 changes: 1 addition & 1 deletion packages/layerchart/src/lib/components/Bar.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import { createDimensionGetter } from '../utils/rect.js';
import { isScaleBand } from '../utils/scales.js';
import { accessor, type Accessor } from '../utils/common.js';
import { greatestAbs } from '@layerstack/utils/array';
import { greatestAbs } from '@layerstack/utils';
const { x: xContext, y: yContext, xScale } = chartContext();
Expand Down
2 changes: 1 addition & 1 deletion packages/layerchart/src/lib/components/Highlight.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import { type ComponentProps } from 'svelte';
import { max, min } from 'd3-array';
import { pointRadial, type Series, type SeriesPoint } from 'd3-shape';
import { notNull } from '@layerstack/utils/typeGuards';
import { notNull } from '@layerstack/utils';
import { cls } from '@layerstack/tailwind';
import { chartContext } from './ChartContext.svelte';
Expand Down
2 changes: 1 addition & 1 deletion packages/layerchart/src/lib/components/Points.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import type { Readable } from 'svelte/store';
import { extent } from 'd3-array';
import { pointRadial } from 'd3-shape';
import { notNull } from '@layerstack/utils/typeGuards';
import { notNull } from '@layerstack/utils';
import { chartContext } from './ChartContext.svelte';
import Circle from './Circle.svelte';
Expand Down
2 changes: 0 additions & 2 deletions packages/layerchart/src/lib/docs/Preview.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
import { Button, CopyButton, Dialog, Toggle, Tooltip } from 'svelte-ux';
import { cls } from '@layerstack/tailwind';
import { entries, fromEntries } from '@layerstack/utils';
import { isLiteralObject } from '@layerstack/utils/object';
import Code from './Code.svelte';
import Json from './Json.svelte';
Expand Down
2 changes: 1 addition & 1 deletion packages/layerchart/src/lib/utils/scales.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { tweened, spring } from 'svelte/motion';

import { type MotionOptions, motionStore } from '$lib/stores/motionStore.js';
import { scaleBand, type ScaleBand } from 'd3-scale';
import { unique } from '@layerstack/utils/array';
import { unique } from '@layerstack/utils';

export interface AnyScale<Domain = any, Range = any, Input = Domain, Output = any> {
(value: Input): Output;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@
import { Area, Axis, Bars, Chart, Highlight, Points, Svg, Tooltip } from 'layerchart';
import { Button, Duration, Field, Menu, MenuField, PeriodType, Toggle } from 'svelte-ux';
import { formatDate } from '@layerstack/utils';
import { flatten } from '@layerstack/utils/array';
import { flatten, formatDate } from '@layerstack/utils';
import Preview from '$lib/docs/Preview.svelte';
import TooltipControls from './TooltipControls.svelte';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
import Preview from '$lib/docs/Preview.svelte';
import Blockquote from '$lib/docs/Blockquote.svelte';
import { createDateSeries, longData } from '$lib/utils/genData.js';
import { unique } from '@layerstack/utils/array';
import { unique } from '@layerstack/utils';
const data = createDateSeries({
count: 10,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,11 @@
} from 'layerchart';
import { Field, ToggleGroup, ToggleOption, Toggle, Switch } from 'svelte-ux';
import { format, PeriodType } from '@layerstack/utils';
import { format, PeriodType, unique } from '@layerstack/utils';
import Preview from '$lib/docs/Preview.svelte';
import Blockquote from '$lib/docs/Blockquote.svelte';
import { createDateSeries, longData } from '$lib/utils/genData.js';
import { unique } from '@layerstack/utils/array';
const data = createDateSeries({
count: 30,
Expand Down
Loading

0 comments on commit 9621a4e

Please sign in to comment.