svelteplot 0.14.2-pr-551.2 → 0.14.2-pr-552.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.
- package/dist/core/FacetGrid.svelte +1 -1
- package/dist/core/Plot.svelte +3 -3
- package/dist/helpers/reduce.js +1 -1
- package/dist/helpers/scales.js +1 -1
- package/dist/hooks/plotDefaults.d.ts +1 -1
- package/dist/hooks/usePlot.svelte.d.ts +2 -2
- package/dist/marks/Area.svelte +1 -1
- package/dist/marks/Area.svelte.d.ts +1 -1
- package/dist/marks/Arrow.svelte +2 -2
- package/dist/marks/Arrow.svelte.d.ts +1 -1
- package/dist/marks/AxisX.svelte +1 -1
- package/dist/marks/AxisX.svelte.d.ts +1 -1
- package/dist/marks/AxisY.svelte +1 -1
- package/dist/marks/AxisY.svelte.d.ts +1 -1
- package/dist/marks/BarX.svelte +2 -2
- package/dist/marks/BarX.svelte.d.ts +1 -1
- package/dist/marks/BarY.svelte +1 -1
- package/dist/marks/BarY.svelte.d.ts +1 -1
- package/dist/marks/BollingerX.svelte +1 -1
- package/dist/marks/BollingerX.svelte.d.ts +1 -1
- package/dist/marks/BollingerY.svelte +1 -1
- package/dist/marks/BollingerY.svelte.d.ts +1 -1
- package/dist/marks/BoxY.svelte +1 -1
- package/dist/marks/BoxY.svelte.d.ts +1 -1
- package/dist/marks/Brush.svelte +2 -2
- package/dist/marks/Brush.svelte.d.ts +1 -1
- package/dist/marks/Cell.svelte +1 -1
- package/dist/marks/Cell.svelte.d.ts +1 -1
- package/dist/marks/CellX.svelte +1 -1
- package/dist/marks/CellX.svelte.d.ts +1 -1
- package/dist/marks/CellY.svelte +1 -1
- package/dist/marks/CellY.svelte.d.ts +1 -1
- package/dist/marks/ColorLegend.svelte +2 -2
- package/dist/marks/CustomMark.svelte +2 -2
- package/dist/marks/CustomMark.svelte.d.ts +1 -1
- package/dist/marks/CustomMarkHTML.svelte +1 -1
- package/dist/marks/DelaunayLink.svelte +1 -1
- package/dist/marks/DelaunayLink.svelte.d.ts +1 -1
- package/dist/marks/DelaunayMesh.svelte +1 -1
- package/dist/marks/DelaunayMesh.svelte.d.ts +1 -1
- package/dist/marks/DifferenceY.svelte +2 -2
- package/dist/marks/DifferenceY.svelte.d.ts +1 -1
- package/dist/marks/Dot.svelte +2 -2
- package/dist/marks/Dot.svelte.d.ts +1 -1
- package/dist/marks/Frame.svelte +2 -2
- package/dist/marks/Frame.svelte.d.ts +1 -1
- package/dist/marks/Geo.svelte +1 -1
- package/dist/marks/Geo.svelte.d.ts +1 -1
- package/dist/marks/GridX.svelte +1 -1
- package/dist/marks/GridX.svelte.d.ts +1 -1
- package/dist/marks/GridY.svelte +1 -1
- package/dist/marks/GridY.svelte.d.ts +1 -1
- package/dist/marks/HTMLTooltip.svelte +2 -2
- package/dist/marks/Hexgrid.svelte +92 -0
- package/dist/marks/Hexgrid.svelte.d.ts +23 -0
- package/dist/marks/Hull.svelte +1 -1
- package/dist/marks/Hull.svelte.d.ts +1 -1
- package/dist/marks/Image.svelte +4 -4
- package/dist/marks/Image.svelte.d.ts +1 -1
- package/dist/marks/Line.svelte +2 -2
- package/dist/marks/Line.svelte.d.ts +1 -1
- package/dist/marks/LineX.svelte +1 -1
- package/dist/marks/LineX.svelte.d.ts +1 -1
- package/dist/marks/LineY.svelte +1 -1
- package/dist/marks/LineY.svelte.d.ts +1 -1
- package/dist/marks/Link.svelte +3 -3
- package/dist/marks/Link.svelte.d.ts +1 -1
- package/dist/marks/Pointer.svelte +3 -3
- package/dist/marks/Rect.svelte +2 -2
- package/dist/marks/Rect.svelte.d.ts +1 -1
- package/dist/marks/RectX.svelte +1 -1
- package/dist/marks/RectX.svelte.d.ts +1 -1
- package/dist/marks/RectY.svelte +1 -1
- package/dist/marks/RectY.svelte.d.ts +1 -1
- package/dist/marks/RegressionX.svelte +1 -1
- package/dist/marks/RegressionY.svelte +1 -1
- package/dist/marks/RuleX.svelte +1 -1
- package/dist/marks/RuleX.svelte.d.ts +1 -1
- package/dist/marks/RuleY.svelte +2 -2
- package/dist/marks/RuleY.svelte.d.ts +1 -1
- package/dist/marks/SymbolLegend.svelte +1 -1
- package/dist/marks/Text.svelte +1 -1
- package/dist/marks/Text.svelte.d.ts +1 -1
- package/dist/marks/TickX.svelte +1 -1
- package/dist/marks/TickX.svelte.d.ts +1 -1
- package/dist/marks/TickY.svelte +1 -1
- package/dist/marks/TickY.svelte.d.ts +1 -1
- package/dist/marks/Trail.svelte +4 -4
- package/dist/marks/Trail.svelte.d.ts +1 -1
- package/dist/marks/Vector.svelte +2 -2
- package/dist/marks/Vector.svelte.d.ts +1 -1
- package/dist/marks/Voronoi.svelte +1 -1
- package/dist/marks/Voronoi.svelte.d.ts +1 -1
- package/dist/marks/VoronoiMesh.svelte +1 -1
- package/dist/marks/VoronoiMesh.svelte.d.ts +1 -1
- package/dist/marks/WaffleX.svelte +7 -7
- package/dist/marks/WaffleX.svelte.d.ts +1 -1
- package/dist/marks/WaffleY.svelte +4 -4
- package/dist/marks/WaffleY.svelte.d.ts +1 -1
- package/dist/marks/helpers/Anchor.svelte +1 -1
- package/dist/marks/helpers/Anchor.svelte.d.ts +1 -1
- package/dist/marks/helpers/AreaCanvas.svelte +2 -2
- package/dist/marks/helpers/AreaCanvas.svelte.d.ts +1 -1
- package/dist/marks/helpers/ArrowCanvas.svelte +2 -2
- package/dist/marks/helpers/ArrowCanvas.svelte.d.ts +1 -1
- package/dist/marks/helpers/BaseAxisX.svelte +5 -5
- package/dist/marks/helpers/BaseAxisX.svelte.d.ts +2 -2
- package/dist/marks/helpers/Box.svelte +2 -2
- package/dist/marks/helpers/Box.svelte.d.ts +1 -1
- package/dist/marks/helpers/CanvasLayer.svelte +1 -1
- package/dist/marks/helpers/DensityCanvas.svelte +2 -2
- package/dist/marks/helpers/DensityCanvas.svelte.d.ts +1 -1
- package/dist/marks/helpers/DotCanvas.svelte +2 -2
- package/dist/marks/helpers/DotCanvas.svelte.d.ts +1 -1
- package/dist/marks/helpers/GeoCanvas.svelte +2 -2
- package/dist/marks/helpers/GeoCanvas.svelte.d.ts +1 -1
- package/dist/marks/helpers/GeoPathCanvas.svelte +2 -2
- package/dist/marks/helpers/GeoPathCanvas.svelte.d.ts +1 -1
- package/dist/marks/helpers/GeoPathGroup.svelte +1 -1
- package/dist/marks/helpers/GeoPathGroup.svelte.d.ts +1 -1
- package/dist/marks/helpers/ImageCanvas.svelte +2 -2
- package/dist/marks/helpers/ImageCanvas.svelte.d.ts +1 -1
- package/dist/marks/helpers/LineCanvas.svelte +2 -2
- package/dist/marks/helpers/LineCanvas.svelte.d.ts +1 -1
- package/dist/marks/helpers/LinearGradientX.svelte +1 -1
- package/dist/marks/helpers/LinearGradientY.svelte +1 -1
- package/dist/marks/helpers/LinkCanvas.svelte +2 -2
- package/dist/marks/helpers/LinkCanvas.svelte.d.ts +1 -1
- package/dist/marks/helpers/Marker.svelte +1 -1
- package/dist/marks/helpers/MarkerPath.svelte +2 -2
- package/dist/marks/helpers/MarkerPath.svelte.d.ts +1 -1
- package/dist/marks/helpers/MultilineText.svelte +5 -5
- package/dist/marks/helpers/MultilineText.svelte.d.ts +1 -1
- package/dist/marks/helpers/PathGroup.svelte +1 -1
- package/dist/marks/helpers/PathGroup.svelte.d.ts +1 -1
- package/dist/marks/helpers/PathItems.svelte +1 -1
- package/dist/marks/helpers/PathItems.svelte.d.ts +1 -1
- package/dist/marks/helpers/RectCanvas.svelte +4 -4
- package/dist/marks/helpers/RectCanvas.svelte.d.ts +1 -1
- package/dist/marks/helpers/RectPath.svelte +6 -6
- package/dist/marks/helpers/RectPath.svelte.d.ts +3 -3
- package/dist/marks/helpers/Regression.svelte +2 -2
- package/dist/marks/helpers/Regression.svelte.d.ts +1 -1
- package/dist/marks/helpers/RuleCanvas.svelte +2 -2
- package/dist/marks/helpers/RuleCanvas.svelte.d.ts +1 -1
- package/dist/marks/helpers/TextCanvas.svelte +4 -4
- package/dist/marks/helpers/TextCanvas.svelte.d.ts +1 -1
- package/dist/marks/helpers/TickCanvas.svelte +2 -2
- package/dist/marks/helpers/TickCanvas.svelte.d.ts +1 -1
- package/dist/marks/helpers/TrailCanvas.svelte +2 -2
- package/dist/marks/helpers/TrailCanvas.svelte.d.ts +1 -1
- package/dist/marks/helpers/VectorCanvas.svelte +2 -2
- package/dist/marks/helpers/VectorCanvas.svelte.d.ts +1 -1
- package/dist/marks/helpers/canvas.js +1 -1
- package/dist/marks/helpers/waffle.d.ts +2 -2
- package/dist/marks/helpers/waffle.js +1 -1
- package/dist/marks/index.d.ts +1 -0
- package/dist/marks/index.js +1 -0
- package/dist/transforms/bin.js +1 -1
- package/dist/transforms/dodge.d.ts +1 -1
- package/dist/transforms/dodge.js +1 -1
- package/dist/transforms/hexbin.d.ts +37 -0
- package/dist/transforms/hexbin.js +109 -0
- package/dist/transforms/index.d.ts +1 -0
- package/dist/transforms/index.js +1 -0
- package/dist/transforms/stack.js +2 -2
- package/dist/types/mark.d.ts +2 -2
- package/dist/types/plot.d.ts +4 -4
- package/package.json +1 -1
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
import { scaleBand } from 'd3-scale';
|
|
10
10
|
import Facet from './Facet.svelte';
|
|
11
11
|
import { getEmptyFacets } from '../helpers/facets.js';
|
|
12
|
-
import { usePlot } from '
|
|
12
|
+
import { usePlot } from '../hooks/usePlot.svelte.js';
|
|
13
13
|
|
|
14
14
|
const { updateDimensions } = getContext<PlotContext>('svelteplot');
|
|
15
15
|
// we need the plot context for the overall width & height
|
package/dist/core/Plot.svelte
CHANGED
|
@@ -31,9 +31,9 @@
|
|
|
31
31
|
import mergeDeep from '../helpers/mergeDeep.js';
|
|
32
32
|
import { computeScales, normalizeScaleFn, projectXY } from '../helpers/scales.js';
|
|
33
33
|
import { CHANNEL_SCALE, SCALES } from '../constants.js';
|
|
34
|
-
import { getPlotDefaults, setPlotDefaults } from '
|
|
35
|
-
import { maybeNumber } from '
|
|
36
|
-
import { setPlot, usePlot } from '
|
|
34
|
+
import { getPlotDefaults, setPlotDefaults } from '../hooks/plotDefaults.js';
|
|
35
|
+
import { maybeNumber } from '../helpers/index.js';
|
|
36
|
+
import { setPlot, usePlot } from '../hooks/usePlot.svelte.js';
|
|
37
37
|
|
|
38
38
|
// automatic margins can be applied by the marks, registered
|
|
39
39
|
// with their respective unique identifier as keys
|
package/dist/helpers/reduce.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { min, max, mode, sum, mean, median, variance, deviation, quantile } from 'd3-array';
|
|
2
2
|
import { resolveChannel } from './resolve.js';
|
|
3
3
|
import { POSITION_CHANNELS } from './index.js';
|
|
4
|
-
import { ORIGINAL_NAME_KEYS } from '
|
|
4
|
+
import { ORIGINAL_NAME_KEYS } from '../constants.js';
|
|
5
5
|
const niceReduceNames = {
|
|
6
6
|
count: 'Frequency',
|
|
7
7
|
deviation: 'Standard Deviation',
|
package/dist/helpers/scales.js
CHANGED
|
@@ -6,7 +6,7 @@ import { resolveProp, toChannelOption } from './resolve.js';
|
|
|
6
6
|
import isDataRecord from './isDataRecord.js';
|
|
7
7
|
import { createProjection } from './projection.js';
|
|
8
8
|
import { maybeInterval } from './autoTicks.js';
|
|
9
|
-
import { IS_SORTED } from '
|
|
9
|
+
import { IS_SORTED } from '../transforms/sort.js';
|
|
10
10
|
export function normalizeScaleFn(fn) {
|
|
11
11
|
const out = fn;
|
|
12
12
|
out.range ||= () => [];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { PlotDefaults } from '
|
|
1
|
+
import type { PlotDefaults } from '../types/index.js';
|
|
2
2
|
/** sets default options for all Plot components in this component tree, merging with any existing defaults from parent contexts */
|
|
3
3
|
export declare function setPlotDefaults(plotDefaults: Partial<PlotDefaults>): void;
|
|
4
4
|
/** retrieves the current plot defaults from the Svelte context, or an empty object if none have been set */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { ResolvedPlotOptions } from '
|
|
2
|
-
import type { PlotScales, PlotState as TPlotState } from '
|
|
1
|
+
import type { ResolvedPlotOptions } from '../types/plot.js';
|
|
2
|
+
import type { PlotScales, PlotState as TPlotState } from '../types/index.js';
|
|
3
3
|
/**
|
|
4
4
|
* internal state representation of a Plot, using Svelte 5 runes for reactivity
|
|
5
5
|
*/
|
package/dist/marks/Area.svelte
CHANGED
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
import type { StackOptions } from '../transforms/stack.js';
|
|
54
54
|
import { addEventHandlers } from './helpers/events.js';
|
|
55
55
|
import { getPlotDefaults } from '../hooks/plotDefaults.js';
|
|
56
|
-
import { usePlot } from '
|
|
56
|
+
import { usePlot } from '../hooks/usePlot.svelte.js';
|
|
57
57
|
|
|
58
58
|
let markProps: AreaMarkProps = $props();
|
|
59
59
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type Area, type CurveFactory } from 'd3-shape';
|
|
2
2
|
import type { CurveName, DataRecord, ConstantAccessor, ChannelAccessor, LinkableMarkProps, RawValue } from '../types/index.js';
|
|
3
3
|
import type { StackOptions } from '../transforms/stack.js';
|
|
4
|
-
import { usePlot } from '
|
|
4
|
+
import { usePlot } from '../hooks/usePlot.svelte.js';
|
|
5
5
|
declare function $$render<Datum extends DataRecord>(): {
|
|
6
6
|
props: Partial<{
|
|
7
7
|
filter: ConstantAccessor<boolean, Datum>;
|
package/dist/marks/Arrow.svelte
CHANGED
|
@@ -67,9 +67,9 @@
|
|
|
67
67
|
import ArrowCanvas from './helpers/ArrowCanvas.svelte';
|
|
68
68
|
import GroupMultiple from './helpers/GroupMultiple.svelte';
|
|
69
69
|
import { sort } from '../transforms/sort.js';
|
|
70
|
-
import { indexData } from '
|
|
70
|
+
import { indexData } from '../transforms/recordize.js';
|
|
71
71
|
import { getPlotDefaults } from '../hooks/plotDefaults.js';
|
|
72
|
-
import { usePlot } from '
|
|
72
|
+
import { usePlot } from '../hooks/usePlot.svelte.js';
|
|
73
73
|
|
|
74
74
|
let markProps: ArrowMarkProps = $props();
|
|
75
75
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { DataRecord, ConstantAccessor, ChannelAccessor, RawValue } from '../types/index.js';
|
|
2
2
|
import { type SweepOption } from '../helpers/arrowPath.js';
|
|
3
|
-
import { indexData } from '
|
|
3
|
+
import { indexData } from '../transforms/recordize.js';
|
|
4
4
|
declare function $$render<Datum = DataRecord | GeoJSON.GeoJsonObject>(): {
|
|
5
5
|
props: Omit<Partial<{
|
|
6
6
|
filter: ConstantAccessor<boolean, Datum>;
|
package/dist/marks/AxisX.svelte
CHANGED
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
import { resolveScaledStyles } from '../helpers/resolve.js';
|
|
23
23
|
import { getPlotDefaults } from '../hooks/plotDefaults.js';
|
|
24
24
|
import { extent } from 'd3-array';
|
|
25
|
-
import { usePlot } from '
|
|
25
|
+
import { usePlot } from '../hooks/usePlot.svelte.js';
|
|
26
26
|
|
|
27
27
|
interface AxisXMarkProps extends Omit<
|
|
28
28
|
BaseMarkProps<Datum>,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { RawValue, ConstantAccessor, TickFormatFunction } from '../types/index.js';
|
|
2
2
|
import type * as CSS from 'csstype';
|
|
3
|
-
import { usePlot } from '
|
|
3
|
+
import { usePlot } from '../hooks/usePlot.svelte.js';
|
|
4
4
|
declare function $$render<Datum extends RawValue>(): {
|
|
5
5
|
props: Omit<Partial<{
|
|
6
6
|
filter: ConstantAccessor<boolean, Datum>;
|
package/dist/marks/AxisY.svelte
CHANGED
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
import { resolveScaledStyles } from '../helpers/resolve.js';
|
|
22
22
|
import { getPlotDefaults } from '../hooks/plotDefaults.js';
|
|
23
23
|
import { extent } from 'd3-array';
|
|
24
|
-
import { usePlot } from '
|
|
24
|
+
import { usePlot } from '../hooks/usePlot.svelte.js';
|
|
25
25
|
|
|
26
26
|
interface AxisYMarkProps extends Omit<
|
|
27
27
|
BaseMarkProps<Datum>,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { RawValue, ConstantAccessor, TickFormatFunction } from '../types/index.js';
|
|
2
|
-
import { usePlot } from '
|
|
2
|
+
import { usePlot } from '../hooks/usePlot.svelte.js';
|
|
3
3
|
declare function $$render<Datum extends RawValue>(): {
|
|
4
4
|
props: Omit<Partial<{
|
|
5
5
|
filter: ConstantAccessor<boolean, Datum>;
|
package/dist/marks/BarX.svelte
CHANGED
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
import { stackX, recordizeX, intervalX, sort } from '../index.js';
|
|
28
28
|
|
|
29
29
|
import type { StackOptions } from '../transforms/stack.js';
|
|
30
|
-
import type { DataRow } from '
|
|
30
|
+
import type { DataRow } from '../types/index.js';
|
|
31
31
|
import GroupMultiple from './helpers/GroupMultiple.svelte';
|
|
32
32
|
import RectPath from './helpers/RectPath.svelte';
|
|
33
33
|
import RectCanvas from './helpers/RectCanvas.svelte';
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
LinkableMarkProps
|
|
40
40
|
} from '../types/index.js';
|
|
41
41
|
import { getPlotDefaults } from '../hooks/plotDefaults.js';
|
|
42
|
-
import { usePlot } from '
|
|
42
|
+
import { usePlot } from '../hooks/usePlot.svelte.js';
|
|
43
43
|
|
|
44
44
|
const DEFAULTS = {
|
|
45
45
|
fill: 'currentColor',
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { StackOptions } from '../transforms/stack.js';
|
|
2
|
-
import type { DataRow } from '
|
|
2
|
+
import type { DataRow } from '../types/index.js';
|
|
3
3
|
import type { BaseRectMarkProps, ChannelAccessor, LinkableMarkProps } from '../types/index.js';
|
|
4
4
|
declare function $$render<Datum extends DataRow>(): {
|
|
5
5
|
props: Partial<{
|
package/dist/marks/BarY.svelte
CHANGED
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
LinkableMarkProps
|
|
40
40
|
} from '../types/index.js';
|
|
41
41
|
import { getPlotDefaults } from '../hooks/plotDefaults.js';
|
|
42
|
-
import { usePlot } from '
|
|
42
|
+
import { usePlot } from '../hooks/usePlot.svelte.js';
|
|
43
43
|
|
|
44
44
|
const plot = usePlot();
|
|
45
45
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { StackOptions } from '../transforms/stack.js';
|
|
2
2
|
import type { BaseRectMarkProps, ChannelAccessor, DataRow, LinkableMarkProps } from '../types/index.js';
|
|
3
|
-
import { usePlot } from '
|
|
3
|
+
import { usePlot } from '../hooks/usePlot.svelte.js';
|
|
4
4
|
declare function $$render<Datum extends DataRow>(): {
|
|
5
5
|
props: Partial<{
|
|
6
6
|
filter: import("../types/index.js").ConstantAccessor<boolean, Datum>;
|
package/dist/marks/BoxY.svelte
CHANGED
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
}
|
|
51
51
|
import { getPlotDefaults } from '../hooks/plotDefaults.js';
|
|
52
52
|
import Box from './helpers/Box.svelte';
|
|
53
|
-
import type { BaseMarkProps, ChannelAccessor, DataRecord, RawValue } from '
|
|
53
|
+
import type { BaseMarkProps, ChannelAccessor, DataRecord, RawValue } from '../types/index.js';
|
|
54
54
|
|
|
55
55
|
let markProps: BoxYMarkProps = $props();
|
|
56
56
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ChannelAccessor, DataRecord, RawValue } from '
|
|
1
|
+
import type { ChannelAccessor, DataRecord, RawValue } from '../types/index.js';
|
|
2
2
|
declare function $$render<Datum extends DataRecord>(): {
|
|
3
3
|
props: Pick<BaseMarkProps<Datum>, "fill" | "stroke" | "fx" | "fy" | "class"> & {
|
|
4
4
|
/** the input data array */
|
package/dist/marks/Brush.svelte
CHANGED
|
@@ -48,11 +48,11 @@
|
|
|
48
48
|
}
|
|
49
49
|
import { getContext, untrack } from 'svelte';
|
|
50
50
|
import Rect from './Rect.svelte';
|
|
51
|
-
import type { BaseMarkProps, DataRecord } from '
|
|
51
|
+
import type { BaseMarkProps, DataRecord } from '../types/index.js';
|
|
52
52
|
import { clientToLayerCoordinates } from './helpers/events.js';
|
|
53
53
|
import Frame from './Frame.svelte';
|
|
54
54
|
import { getPlotDefaults } from '../hooks/plotDefaults.js';
|
|
55
|
-
import { usePlot } from '
|
|
55
|
+
import { usePlot } from '../hooks/usePlot.svelte.js';
|
|
56
56
|
|
|
57
57
|
let { brush: brushExternal = $bindable({ enabled: false }), ...markProps }: BrushMarkProps =
|
|
58
58
|
$props();
|
|
@@ -5,7 +5,7 @@ export type Brush = {
|
|
|
5
5
|
y2?: number | Date;
|
|
6
6
|
enabled: boolean;
|
|
7
7
|
};
|
|
8
|
-
import type { DataRecord } from '
|
|
8
|
+
import type { DataRecord } from '../types/index.js';
|
|
9
9
|
declare function $$render<Datum extends DataRecord>(): {
|
|
10
10
|
props: Pick<BaseMarkProps<Datum>, "stroke" | "strokeOpacity" | "strokeDasharray" | "strokeLinejoin" | "strokeLinecap" | "cursor" | "strokeWidth" | "strokeMiterlimit" | "strokeDashoffset"> & {
|
|
11
11
|
/** the brush state object (bindable); contains x1, x2, y1, y2, and enabled */
|
package/dist/marks/Cell.svelte
CHANGED
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
import RectPath from './helpers/RectPath.svelte';
|
|
33
33
|
import RectCanvas from './helpers/RectCanvas.svelte';
|
|
34
34
|
import { getPlotDefaults } from '../hooks/plotDefaults.js';
|
|
35
|
-
import { usePlot } from '
|
|
35
|
+
import { usePlot } from '../hooks/usePlot.svelte.js';
|
|
36
36
|
|
|
37
37
|
let markProps: CellMarkProps = $props();
|
|
38
38
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { DataRecord, BaseRectMarkProps, ChannelAccessor, LinkableMarkProps } from '../types/index.js';
|
|
2
|
-
import { usePlot } from '
|
|
2
|
+
import { usePlot } from '../hooks/usePlot.svelte.js';
|
|
3
3
|
declare function $$render<Datum extends DataRecord>(): {
|
|
4
4
|
props: Partial<{
|
|
5
5
|
filter: import("../types/index.js").ConstantAccessor<boolean, Datum>;
|
package/dist/marks/CellX.svelte
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
import Cell from './Cell.svelte';
|
|
7
7
|
import { recordizeY } from '../index.js';
|
|
8
8
|
import type { ComponentProps } from 'svelte';
|
|
9
|
-
import type { DataRow, TransformArgsRow } from '
|
|
9
|
+
import type { DataRow, TransformArgsRow } from '../types/index.js';
|
|
10
10
|
|
|
11
11
|
interface CellXMarkProps extends Omit<ComponentProps<typeof Cell>, 'y' | 'data'> {
|
|
12
12
|
/** the input data array */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { DataRow } from '
|
|
1
|
+
import type { DataRow } from '../types/index.js';
|
|
2
2
|
declare function $$render<Datum extends DataRow>(): {
|
|
3
3
|
props: Omit<Partial<{
|
|
4
4
|
filter: import("../types/index.js").ConstantAccessor<boolean, Record<string | symbol, import("../types/index.js").RawValue>>;
|
package/dist/marks/CellY.svelte
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
import Cell from './Cell.svelte';
|
|
7
7
|
import { recordizeX } from '../index.js';
|
|
8
8
|
import type { ComponentProps } from 'svelte';
|
|
9
|
-
import type { DataRow, TransformArgsRow } from '
|
|
9
|
+
import type { DataRow, TransformArgsRow } from '../types/index.js';
|
|
10
10
|
|
|
11
11
|
interface CellYMarkProps extends Omit<ComponentProps<typeof Cell>, 'x' | 'data'> {
|
|
12
12
|
/** the input data array */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { DataRow } from '
|
|
1
|
+
import type { DataRow } from '../types/index.js';
|
|
2
2
|
declare function $$render<Datum extends DataRow>(): {
|
|
3
3
|
props: Omit<Partial<{
|
|
4
4
|
filter: import("../types/index.js").ConstantAccessor<boolean, Record<string | symbol, import("../types/index.js").RawValue>>;
|
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
import { range as d3Range, extent } from 'd3-array';
|
|
11
11
|
import { maybeSymbol } from '../helpers/symbols.js';
|
|
12
12
|
|
|
13
|
-
import { getPlotDefaults } from '
|
|
14
|
-
import { usePlot } from '
|
|
13
|
+
import { getPlotDefaults } from '../hooks/plotDefaults.js';
|
|
14
|
+
import { usePlot } from '../hooks/usePlot.svelte.js';
|
|
15
15
|
|
|
16
16
|
let { class: className = null }: ColorLegendMarkProps = $props();
|
|
17
17
|
|
|
@@ -35,11 +35,11 @@
|
|
|
35
35
|
ScaledDataRecord,
|
|
36
36
|
UsedScales,
|
|
37
37
|
ScaledChannelName
|
|
38
|
-
} from '
|
|
38
|
+
} from '../types/index.js';
|
|
39
39
|
import type { Snippet } from 'svelte';
|
|
40
40
|
import { sort } from '../index.js';
|
|
41
41
|
|
|
42
|
-
import Mark from '
|
|
42
|
+
import Mark from '../Mark.svelte';
|
|
43
43
|
|
|
44
44
|
let { data = [{} as Datum], mark, marks, ...options }: CustomMarkProps = $props();
|
|
45
45
|
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
}
|
|
32
32
|
import { type Snippet } from 'svelte';
|
|
33
33
|
import type { ChannelAccessor, ConstantAccessor, DataRecord } from '../types/index.js';
|
|
34
|
-
import { usePlot } from '
|
|
34
|
+
import { usePlot } from '../hooks/usePlot.svelte.js';
|
|
35
35
|
|
|
36
36
|
import { resolveChannel } from '../helpers/resolve.js';
|
|
37
37
|
import { projectX, projectY, projectXY } from '../helpers/scales.js';
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
import { sort } from '../index.js';
|
|
31
31
|
import Mark from '../Mark.svelte';
|
|
32
32
|
import PathItems from './helpers/PathItems.svelte';
|
|
33
|
-
import { usePlot } from '
|
|
33
|
+
import { usePlot } from '../hooks/usePlot.svelte.js';
|
|
34
34
|
import { getPlotDefaults } from '../hooks/plotDefaults.js';
|
|
35
35
|
import { SvelteSet } from 'svelte/reactivity';
|
|
36
36
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { DataRecord, ChannelAccessor, LinkableMarkProps } from '../types/index.js';
|
|
2
|
-
import { usePlot } from '
|
|
2
|
+
import { usePlot } from '../hooks/usePlot.svelte.js';
|
|
3
3
|
declare function $$render<Datum = DataRecord>(): {
|
|
4
4
|
props: Partial<{
|
|
5
5
|
filter: import("../types/index.js").ConstantAccessor<boolean, Datum>;
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
import { recordizeXY } from '../transforms/recordize.js';
|
|
28
28
|
import Mark from '../Mark.svelte';
|
|
29
29
|
import PathGroup from './helpers/PathGroup.svelte';
|
|
30
|
-
import { usePlot } from '
|
|
30
|
+
import { usePlot } from '../hooks/usePlot.svelte.js';
|
|
31
31
|
import { getPlotDefaults } from '../hooks/plotDefaults.js';
|
|
32
32
|
|
|
33
33
|
const DEFAULTS = {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { DataRecord, ChannelAccessor } from '../types/index.js';
|
|
2
|
-
import { usePlot } from '
|
|
2
|
+
import { usePlot } from '../hooks/usePlot.svelte.js';
|
|
3
3
|
declare function $$render<Datum = DataRecord>(): {
|
|
4
4
|
props: Partial<{
|
|
5
5
|
filter: import("../types/index.js").ConstantAccessor<boolean, Datum>;
|
|
@@ -55,14 +55,14 @@
|
|
|
55
55
|
ConstantAccessor,
|
|
56
56
|
CurveName,
|
|
57
57
|
DataRecord
|
|
58
|
-
} from '
|
|
58
|
+
} from '../types/index.js';
|
|
59
59
|
import { Line, Area } from './index.js';
|
|
60
60
|
import { randomId, coalesce } from '../helpers/index.js';
|
|
61
61
|
import { extent, max, min } from 'd3-array';
|
|
62
62
|
import { resolveChannel } from '../helpers/resolve.js';
|
|
63
63
|
import type { CurveFactory } from 'd3-shape';
|
|
64
64
|
import { getPlotDefaults } from '../hooks/plotDefaults.js';
|
|
65
|
-
import { usePlot } from '
|
|
65
|
+
import { usePlot } from '../hooks/usePlot.svelte.js';
|
|
66
66
|
|
|
67
67
|
const plot = usePlot();
|
|
68
68
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ChannelAccessor, ConstantAccessor, CurveName, DataRecord } from '
|
|
1
|
+
import type { ChannelAccessor, ConstantAccessor, CurveName, DataRecord } from '../types/index.js';
|
|
2
2
|
import type { CurveFactory } from 'd3-shape';
|
|
3
3
|
declare function $$render<Datum extends DataRecord>(): {
|
|
4
4
|
props: Omit<BaseMarkProps<Datum>, "fill" | "fillOpacity"> & {
|
package/dist/marks/Dot.svelte
CHANGED
|
@@ -38,8 +38,8 @@
|
|
|
38
38
|
import { addEventHandlers } from './helpers/events.js';
|
|
39
39
|
import Anchor from './helpers/Anchor.svelte';
|
|
40
40
|
import { getPlotDefaults } from '../hooks/plotDefaults.js';
|
|
41
|
-
import { isOrdinalScale } from '
|
|
42
|
-
import { usePlot } from '
|
|
41
|
+
import { isOrdinalScale } from '../helpers/scales.js';
|
|
42
|
+
import { usePlot } from '../hooks/usePlot.svelte.js';
|
|
43
43
|
|
|
44
44
|
const DEFAULTS = {
|
|
45
45
|
...getPlotDefaults().dot
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type Snippet } from 'svelte';
|
|
2
2
|
import type { DataRecord, ConstantAccessor, ChannelAccessor, LinkableMarkProps } from '../types/index.js';
|
|
3
|
-
import { isOrdinalScale } from '
|
|
3
|
+
import { isOrdinalScale } from '../helpers/scales.js';
|
|
4
4
|
declare function $$render<Datum = DataRecord | GeoJSON.GeoJsonObject>(): {
|
|
5
5
|
props: Partial<{
|
|
6
6
|
filter: ConstantAccessor<boolean, Datum>;
|
package/dist/marks/Frame.svelte
CHANGED
|
@@ -40,9 +40,9 @@
|
|
|
40
40
|
} from '../types/index.js';
|
|
41
41
|
import type { BaseMarkProps } from '../types/index.js';
|
|
42
42
|
import RectPath from './helpers/RectPath.svelte';
|
|
43
|
-
import { resolveProp } from '
|
|
43
|
+
import { resolveProp } from '../helpers/resolve.js';
|
|
44
44
|
import { getPlotDefaults } from '../hooks/plotDefaults.js';
|
|
45
|
-
import { usePlot } from '
|
|
45
|
+
import { usePlot } from '../hooks/usePlot.svelte.js';
|
|
46
46
|
|
|
47
47
|
let markProps: FrameMarkProps = $props();
|
|
48
48
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { BaseRectMarkProps, LinkableMarkProps, DataRecord } from '../types/index.js';
|
|
2
|
-
import { resolveProp } from '
|
|
2
|
+
import { resolveProp } from '../helpers/resolve.js';
|
|
3
3
|
declare function $$render<Datum extends DataRecord>(): {
|
|
4
4
|
props: Omit<Partial<{
|
|
5
5
|
filter: import("../types/index.js").ConstantAccessor<boolean, Datum>;
|
package/dist/marks/Geo.svelte
CHANGED
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
import { GEOJSON_PREFER_STROKE } from '../helpers/index.js';
|
|
45
45
|
import Anchor from './helpers/Anchor.svelte';
|
|
46
46
|
import { getPlotDefaults } from '../hooks/plotDefaults.js';
|
|
47
|
-
import { usePlot } from '
|
|
47
|
+
import { usePlot } from '../hooks/usePlot.svelte.js';
|
|
48
48
|
import GroupMultiple from './helpers/GroupMultiple.svelte';
|
|
49
49
|
|
|
50
50
|
const plot = usePlot();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { DataRecord, ConstantAccessor, LinkableMarkProps, ChannelAccessor } from '../types/index.js';
|
|
2
|
-
import { usePlot } from '
|
|
2
|
+
import { usePlot } from '../hooks/usePlot.svelte.js';
|
|
3
3
|
declare function $$render<Datum = DataRecord | GeoJSON.GeoJsonObject>(): {
|
|
4
4
|
props: Partial<{
|
|
5
5
|
filter: ConstantAccessor<boolean, Datum>;
|
package/dist/marks/GridX.svelte
CHANGED
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
import isDataRecord from '../helpers/isDataRecord.js';
|
|
28
28
|
import { INDEX } from '../constants.js';
|
|
29
29
|
import { getPlotDefaults } from '../hooks/plotDefaults.js';
|
|
30
|
-
import { usePlot } from '
|
|
30
|
+
import { usePlot } from '../hooks/usePlot.svelte.js';
|
|
31
31
|
|
|
32
32
|
let markProps: GridXMarkProps = $props();
|
|
33
33
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { RawValue, ChannelAccessor } from '../types/index.js';
|
|
2
|
-
import { usePlot } from '
|
|
2
|
+
import { usePlot } from '../hooks/usePlot.svelte.js';
|
|
3
3
|
declare function $$render<Datum = RawValue>(): {
|
|
4
4
|
props: Omit<Partial<{
|
|
5
5
|
filter: import("../types/index.js").ConstantAccessor<boolean, Datum>;
|
package/dist/marks/GridY.svelte
CHANGED
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
import { testFilter } from '../helpers/index.js';
|
|
26
26
|
import { RAW_VALUE } from '../transforms/recordize.js';
|
|
27
27
|
import { getPlotDefaults } from '../hooks/plotDefaults.js';
|
|
28
|
-
import { usePlot } from '
|
|
28
|
+
import { usePlot } from '../hooks/usePlot.svelte.js';
|
|
29
29
|
|
|
30
30
|
let markProps: GridYMarkProps = $props();
|
|
31
31
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { RawValue, ChannelAccessor } from '../types/index.js';
|
|
2
|
-
import { usePlot } from '
|
|
2
|
+
import { usePlot } from '../hooks/usePlot.svelte.js';
|
|
3
3
|
declare function $$render<Datum = RawValue>(): {
|
|
4
4
|
props: Omit<Partial<{
|
|
5
5
|
filter: import("../types/index.js").ConstantAccessor<boolean, Datum>;
|
|
@@ -21,12 +21,12 @@
|
|
|
21
21
|
}
|
|
22
22
|
import { type Snippet } from 'svelte';
|
|
23
23
|
import type { ChannelAccessor, DataRow } from '../types/index.js';
|
|
24
|
-
import { usePlot } from '
|
|
24
|
+
import { usePlot } from '../hooks/usePlot.svelte.js';
|
|
25
25
|
|
|
26
26
|
import { resolveChannel } from '../helpers/resolve.js';
|
|
27
27
|
import { quadtree } from 'd3-quadtree';
|
|
28
28
|
import { projectX, projectY } from '../helpers/scales.js';
|
|
29
|
-
import { groupFacetsAndZ } from '
|
|
29
|
+
import { groupFacetsAndZ } from '../helpers/group.js';
|
|
30
30
|
import { detectFacet, facetKey } from '../helpers/facets.js';
|
|
31
31
|
import { SvelteMap } from 'svelte/reactivity';
|
|
32
32
|
|