expressive-charts 0.12.0 → 1.0.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/index.d.cts CHANGED
@@ -1,5 +1,5 @@
1
- import { $ as interpolateRecord, A as MarkStyle, At as createClock, B as Sample, C as TextSpace, Ct as Easing, D as IconHandle, Dt as Clock, E as Color, Et as linear, F as TextStyle, G as playback, H as PlaybackEvent, I as Icon, J as AnimatedOptions, K as AnimateOptions, L as IconShape, M as Paint, Mt as manualClock, N as PathHandle, O as Layer, Ot as FrameSource, P as TextHandle, Q as interpolatePoint, R as IconSource, S as MarkEffect, St as scaleDuration, T as TransitionEffect, Tt as easeOutCubic, U as PlaybackOptions, V as Playback, W as SeekOptions, X as animated, Y as Interpolator, Z as interpolateNumber, _ as AnyMarkEffect, _t as Timing, a as describe, at as Tween, b as EffectContext, bt as mediaReducedMotion, c as LineSpec, ct as tween, d as Baseline, dt as MotionOptions, et as MarkGeometry, f as ArcSpec, ft as MotionView, g as PresetName, gt as ScalingTable, h as EffectSlots, ht as ScalingRule, i as offset, it as MotionEnv, j as Matrix, jt as defaultClock, k as MarkHandle, kt as ManualClock, l as BarSegmentSpec, lt as Motion, m as EffectSlot, mt as ScalingOverrides, n as samplesAlong, nt as Point, o as ShapeSpec, ot as TweenOptions, p as EffectOption, pt as ReducedMotionSource, q as Animated, r as matrix, rt as Rect, s as PointSpec, st as TweenResult, t as SamplePoint, tt as Outline, u as BarSpec, ut as MotionMode, v as Combined, vt as createMotion, w as TransitionContext, wt as easeInOutCubic, x as GeometryEffect, xt as motion, y as DataEffect, yt as defaultScaling, z as MarkData } from "./index-CmnxlWkB.cjs";
2
- import "./runner-C87v9F_y.cjs";
1
+ import { $ as interpolateRecord, A as MarkStyle, At as createClock, B as Sample, C as TextSpace, Ct as Easing, D as IconHandle, Dt as Clock, E as Color, Et as linear, F as TextStyle, G as playback, H as PlaybackEvent, I as Icon, J as AnimatedOptions, K as AnimateOptions, L as IconShape, M as Paint, Mt as manualClock, N as PathHandle, O as Layer, Ot as FrameSource, P as TextHandle, Q as interpolatePoint, R as IconSource, S as MarkEffect, St as scaleDuration, T as TransitionEffect, Tt as easeOutCubic, U as PlaybackOptions, V as Playback, W as SeekOptions, X as animated, Y as Interpolator, Z as interpolateNumber, _ as AnyMarkEffect, _t as Timing, a as describe, at as Tween, b as EffectContext, bt as mediaReducedMotion, c as LineSpec, ct as tween, d as Baseline, dt as MotionOptions, et as MarkGeometry, f as ArcSpec, ft as MotionView, g as PresetName, gt as ScalingTable, h as EffectSlots, ht as ScalingRule, i as offset, it as MotionEnv, j as Matrix, jt as defaultClock, k as MarkHandle, kt as ManualClock, l as BarSegmentSpec, lt as Motion, m as EffectSlot, mt as ScalingOverrides, n as samplesAlong, nt as Point, o as ShapeSpec, ot as TweenOptions, p as EffectOption, pt as ReducedMotionSource, q as Animated, r as matrix, rt as Rect, s as PointSpec, st as TweenResult, t as SamplePoint, tt as Outline, u as BarSpec, ut as MotionMode, v as Combined, vt as createMotion, w as TransitionContext, wt as easeInOutCubic, x as GeometryEffect, xt as motion, y as DataEffect, yt as defaultScaling, z as MarkData } from "./index-DLdz-1iE.cjs";
2
+ import "./runner-DZP831pq.cjs";
3
3
  interface ColorAssignment {
4
4
  /** The palette slot (1–8) for a key: its pinned slot, or the next free one the first time it's seen. Never reassigned. */
5
5
  slot(key: string): number;
@@ -481,10 +481,21 @@ interface ExpressiveOptions<D> {
481
481
  * other element (`<text>`, `<g>`, `<use>`, `<image>`) throws, naming its tag. Use this for those,
482
482
  * or to say more or other than an element shows: a padded donut's slice as `describe.arc`, which
483
483
  * goes round the donut's centre, or a line by its points.
484
- * Called once per mark, with its first element in document order, in the coordinates of the marks'
485
- * nearest common ancestor. Build it with `describe` and give it the key passed in.
484
+ * Called once per mark, with its row and its first element in document order, as `key` is, and then
485
+ * its key, in the coordinates of the marks' nearest common ancestor. Build it with `describe` and
486
+ * give it the key passed in. Until 0.13.0 the element came first: `(element, datum, key)`.
486
487
  */
487
- readonly geometry?: (element: Element, datum: D, key: string) => MarkGeometry;
488
+ readonly geometry?: (datum: D, element: Element, key: string) => MarkGeometry;
489
+ /**
490
+ * Where the host's own text for a mark is: its boxes, in the marks' px (the coordinates of their
491
+ * nearest common ancestor), as `describe`'s `labelBounds` takes them. They become the mark's
492
+ * `labelBounds`, so an effect's text (`label`, `delta`) keeps clear of them. For marks the adapter
493
+ * reads: with `geometry` the page's own description says where its text is, and this isn't called.
494
+ * Called once per mark on every read, with the row and the element of its first part, as
495
+ * `markLabel`'s row is, so a stack's boxes are given once, for the whole mark. An empty list is a
496
+ * mark with no text. Boxes that aren't finite, or a result that's no list, throw, changing nothing.
497
+ */
498
+ readonly labelBounds?: (datum: D, element: Element) => readonly Rect[];
488
499
  /**
489
500
  * Data effects' samples: values along the mark's walk, `{ t, value, at? }`, with `t` in [0, 1] and
490
501
  * never decreasing, and finite values. Called on every read for each mark, with its row (its first
@@ -557,7 +568,9 @@ interface Attachment<D> {
557
568
  * Call after the host re-renders: re-reads the marks (from `source` if given, and from then on) and
558
569
  * fires enter, update and exit by key. An update means a part's `value` changed, or without `value`
559
570
  * the mark's length; either way, gaining or losing a segment. A mark that only moved follows without
560
- * one. Throws, changing nothing, on marks it can't read.
571
+ * one. A hovered or focused mark with no update keeps its hover effects as they are, following its
572
+ * new geometry: an icon that travelled stays at its end. One with an update plays its hover effects
573
+ * again, once the update's have started. Throws, changing nothing, on marks it can't read.
561
574
  */
562
575
  refresh(source?: MarkSource<D>): void;
563
576
  /**
@@ -893,6 +906,8 @@ interface StyleOptions {
893
906
  readonly injectStyles?: boolean | undefined;
894
907
  }
895
908
  interface MotionSwitchOptions {
909
+ /** The motion the switch shows and sets. Default: the page-wide `motion`. */
910
+ readonly motion?: Motion;
896
911
  /** The group's visible label, which is also its accessible name. Default "Motion". */
897
912
  readonly label?: string;
898
913
  /** Button text by mode. Default "Presentation", "Analysis", "Off". */
@@ -1159,6 +1174,28 @@ interface ThresholdOptions {
1159
1174
  * revealed. Its end state is the same picture, so the colour shows with motion off.
1160
1175
  */
1161
1176
  export declare function threshold(options: ThresholdOptions): DataEffect;
1177
+ interface OutlineOptions {
1178
+ /** A theme token or any CSS colour. Default "text". */
1179
+ readonly color?: Color;
1180
+ /** The stroke's width, px. Default 2. */
1181
+ readonly width?: number;
1182
+ }
1183
+ /**
1184
+ * Strokes the mark's outline in the overlay, unfilled, in `color` at `width`. There's no tween: a
1185
+ * run draws what `end` draws, at once, so nothing moves or fades under the pointer, and reduced
1186
+ * motion and Off show the same picture. On an open shape, a line, it strokes the line.
1187
+ *
1188
+ * The stroke follows `onChange`, so it keeps to a mark that moves, and it's taken away when its run
1189
+ * is cleared: on leave in the hover slot, and with the mark in `decorate`, where it stays.
1190
+ */
1191
+ export declare function outline(options?: OutlineOptions): GeometryEffect;
1192
+ /**
1193
+ * Draws nothing for `duration` base ms, with effect timing, which the motion mode scales as it
1194
+ * scales `drawIn`'s, and then resolves. Cancelled, it resolves at once. Its end state is nothing
1195
+ * drawn, so with motion off it takes no time, and `sequence(wait(750), flash())` is `flash()`'s end
1196
+ * state. A `duration` that isn't a number of 0 or more throws a RangeError.
1197
+ */
1198
+ export declare function wait(duration: number): GeometryEffect;
1162
1199
  /** How two closed outlines' sides are matched. */
1163
1200
  type MorphAlign = "unroll" | "drop";
1164
1201
  interface MorphOptions {
@@ -1333,7 +1370,7 @@ export declare function registerIcons(icons: readonly Icon[]): void;
1333
1370
  * has the same rules. For a CSP that allows no inline styles at all.
1334
1371
  */
1335
1372
  export declare function configure(options: StyleOptions): void;
1336
- export declare const VERSION = "0.12.0";
1373
+ export declare const VERSION = "1.0.0";
1337
1374
  /**
1338
1375
  * A bar chart in `target` (an element or a selector). The axis whose values aren't numbers is the
1339
1376
  * category; `stack` stacks numeric fields; `on` attaches effects by slot.
@@ -1375,8 +1412,8 @@ export declare function fromVegaView<D = Record<string, unknown>>(view: VegaView
1375
1412
  /**
1376
1413
  * The viewer's motion control in `target` (an element or a selector): Presentation, Analysis and Off
1377
1414
  * as buttons with `aria-pressed`, and a note on what the mode does. A click is the viewer's own
1378
- * choice (`motion.chooseMode()`), so it overrides the device's reduced-motion setting. Default: the
1379
- * page-wide `motion`. `persist: "key"` saves the choice in localStorage.
1415
+ * choice (`motion.chooseMode()`), so it overrides the device's reduced-motion setting. `motion` is
1416
+ * the motion it shows and sets, default the page-wide one. `persist: "key"` saves the choice in localStorage.
1380
1417
  */
1381
- export declare function motionSwitch(target: string | Element, motion?: Motion, options?: MotionSwitchOptions): MotionSwitch;
1382
- export { type Accessor, type AnimateOptions, type Animated, type AnimatedOptions, type AnyMarkEffect, type ArcSpec, type Attachment, type BarChart, type BarChartOptions, type BarSegmentSpec, type BarSpec, type Baseline, type Chart, type ChartChange, type ChartLabel, type ChartOptions, type ChartSwitch, type ChartSwitchGuide, type ChartSwitchOptions, type ChartSwitchPaint, type ChartSwitchShowOptions, type ChartSwitchView, type ChartSwitchViewFactory, type ChartSwitchViewName, type ChartSwitchViews, type Clock, type Color, type ColorAssignment, type Combined, type DataEffect, type DataEffectSpec, type DeltaOptions, type DonutChart, type DonutChartOptions, type DrawInOptions, type Easing, type EffectContext, type EffectOption, type EffectSlot, type EffectSlots, type ExpressiveOptions, type FlashOptions, type FrameSource, type Gait, type GaitName, type GaitPose, type GaitState, type GeometryEffect, type GeometryEffectSpec, type HostGuide, type HostLabel, type HostMark, type HostView, type HostViewOptions, type Icon, type IconHandle, type IconShape, type IconSource, type IconSpec, type Interpolator, type KeyOfType, type LabelOptions, type Layer, type LegendEntry, type LegendOptions, type LineChart, type LineChartOptions, type LineSpec, type Link, type LinkOptions, type LinkSource, type ManualClock, type MarkData, type MarkEffect, type MarkEvent, type MarkEvents, type MarkGeometry, type MarkHandle, type MarkSource, type MarkStyle, type MarkSummary, type Matrix, type MorphAlign, type MorphOptions, type Motion, type MotionEnv, type MotionMode, type MotionOptions, type MotionSwitch, type MotionSwitchOptions, type MotionView, type NumericKey, type Outline, type Paint, type PathHandle, type PlayButton, type PlayButtonOptions, type Playback, type PlaybackEvent, type PlaybackOptions, type Point, type PointSpec, type PresetName, type PulseOptions, type Rect, type ReducedMotionSource, type Sample, type SamplePoint, type ScalingOverrides, type ScalingRule, type ScalingTable, type SeekOptions, type ShapeSpec, type SliceSummary, type StaggerOptions, type StepOptions, type StyleOptions, type SvgIconSpec, type TableColumn, type TableOptions, type TextHandle, type TextSpace, type TextStyle, type ThresholdOptions, type Timing, type TraceOptions, type TransitionContext, type TransitionEffect, type TravelOptions, type Tween, type TweenOptions, type TweenResult, type VegaAttachment, type VegaItem, type VegaMark, type VegaOptions, type VegaSample, type VegaViewLike, type WiggleOptions, animated, createClock, createMotion, defaultClock, defaultScaling, describe, easeInOutCubic, easeOutCubic, interpolateNumber, interpolatePoint, interpolateRecord, linear, manualClock, matrix, mediaReducedMotion, motion, offset, playback, samplesAlong, scaleDuration, tween };
1418
+ export declare function motionSwitch(target: string | Element, options?: MotionSwitchOptions): MotionSwitch;
1419
+ export { type Accessor, type AnimateOptions, type Animated, type AnimatedOptions, type AnyMarkEffect, type ArcSpec, type Attachment, type BarChart, type BarChartOptions, type BarSegmentSpec, type BarSpec, type Baseline, type Chart, type ChartChange, type ChartLabel, type ChartOptions, type ChartSwitch, type ChartSwitchGuide, type ChartSwitchOptions, type ChartSwitchPaint, type ChartSwitchShowOptions, type ChartSwitchView, type ChartSwitchViewFactory, type ChartSwitchViewName, type ChartSwitchViews, type Clock, type Color, type ColorAssignment, type Combined, type DataEffect, type DataEffectSpec, type DeltaOptions, type DonutChart, type DonutChartOptions, type DrawInOptions, type Easing, type EffectContext, type EffectOption, type EffectSlot, type EffectSlots, type ExpressiveOptions, type FlashOptions, type FrameSource, type Gait, type GaitName, type GaitPose, type GaitState, type GeometryEffect, type GeometryEffectSpec, type HostGuide, type HostLabel, type HostMark, type HostView, type HostViewOptions, type Icon, type IconHandle, type IconShape, type IconSource, type IconSpec, type Interpolator, type KeyOfType, type LabelOptions, type Layer, type LegendEntry, type LegendOptions, type LineChart, type LineChartOptions, type LineSpec, type Link, type LinkOptions, type LinkSource, type ManualClock, type MarkData, type MarkEffect, type MarkEvent, type MarkEvents, type MarkGeometry, type MarkHandle, type MarkSource, type MarkStyle, type MarkSummary, type Matrix, type MorphAlign, type MorphOptions, type Motion, type MotionEnv, type MotionMode, type MotionOptions, type MotionSwitch, type MotionSwitchOptions, type MotionView, type NumericKey, type Outline, type OutlineOptions, type Paint, type PathHandle, type PlayButton, type PlayButtonOptions, type Playback, type PlaybackEvent, type PlaybackOptions, type Point, type PointSpec, type PresetName, type PulseOptions, type Rect, type ReducedMotionSource, type Sample, type SamplePoint, type ScalingOverrides, type ScalingRule, type ScalingTable, type SeekOptions, type ShapeSpec, type SliceSummary, type StaggerOptions, type StepOptions, type StyleOptions, type SvgIconSpec, type TableColumn, type TableOptions, type TextHandle, type TextSpace, type TextStyle, type ThresholdOptions, type Timing, type TraceOptions, type TransitionContext, type TransitionEffect, type TravelOptions, type Tween, type TweenOptions, type TweenResult, type VegaAttachment, type VegaItem, type VegaMark, type VegaOptions, type VegaSample, type VegaViewLike, type WiggleOptions, animated, createClock, createMotion, defaultClock, defaultScaling, describe, easeInOutCubic, easeOutCubic, interpolateNumber, interpolatePoint, interpolateRecord, linear, manualClock, matrix, mediaReducedMotion, motion, offset, playback, samplesAlong, scaleDuration, tween };
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { A as scaleDuration, B as manualClock, C as ScalingRule, D as defaultScaling, E as createMotion, F as Clock, I as FrameSource, L as ManualClock, M as easeInOutCubic, N as easeOutCubic, O as mediaReducedMotion, P as linear, R as createClock, S as ScalingOverrides, T as Timing, _ as Motion, a as GeometryEffect, b as MotionView, c as TransitionContext, d as Sample, f as MotionEnv, g as tween, h as TweenResult, i as EffectContext, j as Easing, k as motion, l as TransitionEffect, m as TweenOptions, n as Combined, o as MarkEffect, p as Tween, r as DataEffect, s as TextSpace, t as AnyMarkEffect, u as MarkData, v as MotionMode, w as ScalingTable, x as ReducedMotionSource, y as MotionOptions, z as defaultClock } from "./effect-HCWnmB72.js";
2
- import { _ as Rect, a as MarkStyle, c as PathHandle, d as Icon, f as IconShape, g as Point, h as Outline, i as MarkHandle, l as TextHandle, m as MarkGeometry, n as IconHandle, o as Matrix, p as IconSource, r as Layer, s as Paint, t as Color, u as TextStyle } from "./drawing-OmQV-0BB.js";
1
+ import { _ as Rect, a as MarkStyle, c as PathHandle, d as Icon, f as IconShape, g as Point, h as Outline, i as MarkHandle, l as TextHandle, m as MarkGeometry, n as IconHandle, o as Matrix, p as IconSource, r as Layer, s as Paint, t as Color, u as TextStyle } from "./drawing-qGmuUkoL.js";
2
+ import { A as scaleDuration, B as manualClock, C as ScalingRule, D as defaultScaling, E as createMotion, F as Clock, I as FrameSource, L as ManualClock, M as easeInOutCubic, N as easeOutCubic, O as mediaReducedMotion, P as linear, R as createClock, S as ScalingOverrides, T as Timing, _ as Motion, a as GeometryEffect, b as MotionView, c as TransitionContext, d as Sample, f as MotionEnv, g as tween, h as TweenResult, i as EffectContext, j as Easing, k as motion, l as TransitionEffect, m as TweenOptions, n as Combined, o as MarkEffect, p as Tween, r as DataEffect, s as TextSpace, t as AnyMarkEffect, u as MarkData, v as MotionMode, w as ScalingTable, x as ReducedMotionSource, y as MotionOptions, z as defaultClock } from "./effect-GgFkjYSV.js";
3
3
  /** Builds a function that blends `from` into `to` as t goes from 0 to 1. */
4
4
  type Interpolator<T> = (from: T, to: T) => (t: number) => T;
5
5
  /** Exact at both ends, so a finished animation lands on its target. */
@@ -761,10 +761,21 @@ interface ExpressiveOptions<D> {
761
761
  * other element (`<text>`, `<g>`, `<use>`, `<image>`) throws, naming its tag. Use this for those,
762
762
  * or to say more or other than an element shows: a padded donut's slice as `describe.arc`, which
763
763
  * goes round the donut's centre, or a line by its points.
764
- * Called once per mark, with its first element in document order, in the coordinates of the marks'
765
- * nearest common ancestor. Build it with `describe` and give it the key passed in.
764
+ * Called once per mark, with its row and its first element in document order, as `key` is, and then
765
+ * its key, in the coordinates of the marks' nearest common ancestor. Build it with `describe` and
766
+ * give it the key passed in. Until 0.13.0 the element came first: `(element, datum, key)`.
766
767
  */
767
- readonly geometry?: (element: Element, datum: D, key: string) => MarkGeometry;
768
+ readonly geometry?: (datum: D, element: Element, key: string) => MarkGeometry;
769
+ /**
770
+ * Where the host's own text for a mark is: its boxes, in the marks' px (the coordinates of their
771
+ * nearest common ancestor), as `describe`'s `labelBounds` takes them. They become the mark's
772
+ * `labelBounds`, so an effect's text (`label`, `delta`) keeps clear of them. For marks the adapter
773
+ * reads: with `geometry` the page's own description says where its text is, and this isn't called.
774
+ * Called once per mark on every read, with the row and the element of its first part, as
775
+ * `markLabel`'s row is, so a stack's boxes are given once, for the whole mark. An empty list is a
776
+ * mark with no text. Boxes that aren't finite, or a result that's no list, throw, changing nothing.
777
+ */
778
+ readonly labelBounds?: (datum: D, element: Element) => readonly Rect[];
768
779
  /**
769
780
  * Data effects' samples: values along the mark's walk, `{ t, value, at? }`, with `t` in [0, 1] and
770
781
  * never decreasing, and finite values. Called on every read for each mark, with its row (its first
@@ -837,7 +848,9 @@ interface Attachment<D> {
837
848
  * Call after the host re-renders: re-reads the marks (from `source` if given, and from then on) and
838
849
  * fires enter, update and exit by key. An update means a part's `value` changed, or without `value`
839
850
  * the mark's length; either way, gaining or losing a segment. A mark that only moved follows without
840
- * one. Throws, changing nothing, on marks it can't read.
851
+ * one. A hovered or focused mark with no update keeps its hover effects as they are, following its
852
+ * new geometry: an icon that travelled stays at its end. One with an update plays its hover effects
853
+ * again, once the update's have started. Throws, changing nothing, on marks it can't read.
841
854
  */
842
855
  refresh(source?: MarkSource<D>): void;
843
856
  /**
@@ -1173,6 +1186,8 @@ interface StyleOptions {
1173
1186
  readonly injectStyles?: boolean | undefined;
1174
1187
  }
1175
1188
  interface MotionSwitchOptions {
1189
+ /** The motion the switch shows and sets. Default: the page-wide `motion`. */
1190
+ readonly motion?: Motion;
1176
1191
  /** The group's visible label, which is also its accessible name. Default "Motion". */
1177
1192
  readonly label?: string;
1178
1193
  /** Button text by mode. Default "Presentation", "Analysis", "Off". */
@@ -1439,6 +1454,28 @@ interface ThresholdOptions {
1439
1454
  * revealed. Its end state is the same picture, so the colour shows with motion off.
1440
1455
  */
1441
1456
  export declare function threshold(options: ThresholdOptions): DataEffect;
1457
+ interface OutlineOptions {
1458
+ /** A theme token or any CSS colour. Default "text". */
1459
+ readonly color?: Color;
1460
+ /** The stroke's width, px. Default 2. */
1461
+ readonly width?: number;
1462
+ }
1463
+ /**
1464
+ * Strokes the mark's outline in the overlay, unfilled, in `color` at `width`. There's no tween: a
1465
+ * run draws what `end` draws, at once, so nothing moves or fades under the pointer, and reduced
1466
+ * motion and Off show the same picture. On an open shape, a line, it strokes the line.
1467
+ *
1468
+ * The stroke follows `onChange`, so it keeps to a mark that moves, and it's taken away when its run
1469
+ * is cleared: on leave in the hover slot, and with the mark in `decorate`, where it stays.
1470
+ */
1471
+ export declare function outline(options?: OutlineOptions): GeometryEffect;
1472
+ /**
1473
+ * Draws nothing for `duration` base ms, with effect timing, which the motion mode scales as it
1474
+ * scales `drawIn`'s, and then resolves. Cancelled, it resolves at once. Its end state is nothing
1475
+ * drawn, so with motion off it takes no time, and `sequence(wait(750), flash())` is `flash()`'s end
1476
+ * state. A `duration` that isn't a number of 0 or more throws a RangeError.
1477
+ */
1478
+ export declare function wait(duration: number): GeometryEffect;
1442
1479
  /** How two closed outlines' sides are matched. */
1443
1480
  type MorphAlign = "unroll" | "drop";
1444
1481
  interface MorphOptions {
@@ -1613,7 +1650,7 @@ export declare function registerIcons(icons: readonly Icon[]): void;
1613
1650
  * has the same rules. For a CSP that allows no inline styles at all.
1614
1651
  */
1615
1652
  export declare function configure(options: StyleOptions): void;
1616
- export declare const VERSION = "0.12.0";
1653
+ export declare const VERSION = "1.0.0";
1617
1654
  /**
1618
1655
  * A bar chart in `target` (an element or a selector). The axis whose values aren't numbers is the
1619
1656
  * category; `stack` stacks numeric fields; `on` attaches effects by slot.
@@ -1655,8 +1692,8 @@ export declare function fromVegaView<D = Record<string, unknown>>(view: VegaView
1655
1692
  /**
1656
1693
  * The viewer's motion control in `target` (an element or a selector): Presentation, Analysis and Off
1657
1694
  * as buttons with `aria-pressed`, and a note on what the mode does. A click is the viewer's own
1658
- * choice (`motion.chooseMode()`), so it overrides the device's reduced-motion setting. Default: the
1659
- * page-wide `motion`. `persist: "key"` saves the choice in localStorage.
1695
+ * choice (`motion.chooseMode()`), so it overrides the device's reduced-motion setting. `motion` is
1696
+ * the motion it shows and sets, default the page-wide one. `persist: "key"` saves the choice in localStorage.
1660
1697
  */
1661
- export declare function motionSwitch(target: string | Element, motion?: Motion, options?: MotionSwitchOptions): MotionSwitch;
1662
- export { type Accessor, type AnimateOptions, type Animated, type AnimatedOptions, type AnyMarkEffect, type ArcSpec, type Attachment, type BarChart, type BarChartOptions, type BarSegmentSpec, type BarSpec, type Baseline, type Chart, type ChartChange, type ChartLabel, type ChartOptions, type ChartSwitch, type ChartSwitchGuide, type ChartSwitchOptions, type ChartSwitchPaint, type ChartSwitchShowOptions, type ChartSwitchView, type ChartSwitchViewFactory, type ChartSwitchViewName, type ChartSwitchViews, type Clock, type Color, type ColorAssignment, type Combined, type DataEffect, type DataEffectSpec, type DeltaOptions, type DonutChart, type DonutChartOptions, type DrawInOptions, type Easing, type EffectContext, type EffectOption, type EffectSlot, type EffectSlots, type ExpressiveOptions, type FlashOptions, type FrameSource, type Gait, type GaitName, type GaitPose, type GaitState, type GeometryEffect, type GeometryEffectSpec, type HostGuide, type HostLabel, type HostMark, type HostView, type HostViewOptions, type Icon, type IconHandle, type IconShape, type IconSource, type IconSpec, type Interpolator, type KeyOfType, type LabelOptions, type Layer, type LegendEntry, type LegendOptions, type LineChart, type LineChartOptions, type LineSpec, type Link, type LinkOptions, type LinkSource, type ManualClock, type MarkData, type MarkEffect, type MarkEvent, type MarkEvents, type MarkGeometry, type MarkHandle, type MarkSource, type MarkStyle, type MarkSummary, type Matrix, type MorphAlign, type MorphOptions, type Motion, type MotionEnv, type MotionMode, type MotionOptions, type MotionSwitch, type MotionSwitchOptions, type MotionView, type NumericKey, type Outline, type Paint, type PathHandle, type PlayButton, type PlayButtonOptions, type Playback, type PlaybackEvent, type PlaybackOptions, type Point, type PointSpec, type PresetName, type PulseOptions, type Rect, type ReducedMotionSource, type Sample, type SamplePoint, type ScalingOverrides, type ScalingRule, type ScalingTable, type SeekOptions, type ShapeSpec, type SliceSummary, type StaggerOptions, type StepOptions, type StyleOptions, type SvgIconSpec, type TableColumn, type TableOptions, type TextHandle, type TextSpace, type TextStyle, type ThresholdOptions, type Timing, type TraceOptions, type TransitionContext, type TransitionEffect, type TravelOptions, type Tween, type TweenOptions, type TweenResult, type VegaAttachment, type VegaItem, type VegaMark, type VegaOptions, type VegaSample, type VegaViewLike, type WiggleOptions, createClock, createMotion, defaultClock, defaultScaling, easeInOutCubic, easeOutCubic, linear, manualClock, mediaReducedMotion, motion, scaleDuration, tween };
1698
+ export declare function motionSwitch(target: string | Element, options?: MotionSwitchOptions): MotionSwitch;
1699
+ export { type Accessor, type AnimateOptions, type Animated, type AnimatedOptions, type AnyMarkEffect, type ArcSpec, type Attachment, type BarChart, type BarChartOptions, type BarSegmentSpec, type BarSpec, type Baseline, type Chart, type ChartChange, type ChartLabel, type ChartOptions, type ChartSwitch, type ChartSwitchGuide, type ChartSwitchOptions, type ChartSwitchPaint, type ChartSwitchShowOptions, type ChartSwitchView, type ChartSwitchViewFactory, type ChartSwitchViewName, type ChartSwitchViews, type Clock, type Color, type ColorAssignment, type Combined, type DataEffect, type DataEffectSpec, type DeltaOptions, type DonutChart, type DonutChartOptions, type DrawInOptions, type Easing, type EffectContext, type EffectOption, type EffectSlot, type EffectSlots, type ExpressiveOptions, type FlashOptions, type FrameSource, type Gait, type GaitName, type GaitPose, type GaitState, type GeometryEffect, type GeometryEffectSpec, type HostGuide, type HostLabel, type HostMark, type HostView, type HostViewOptions, type Icon, type IconHandle, type IconShape, type IconSource, type IconSpec, type Interpolator, type KeyOfType, type LabelOptions, type Layer, type LegendEntry, type LegendOptions, type LineChart, type LineChartOptions, type LineSpec, type Link, type LinkOptions, type LinkSource, type ManualClock, type MarkData, type MarkEffect, type MarkEvent, type MarkEvents, type MarkGeometry, type MarkHandle, type MarkSource, type MarkStyle, type MarkSummary, type Matrix, type MorphAlign, type MorphOptions, type Motion, type MotionEnv, type MotionMode, type MotionOptions, type MotionSwitch, type MotionSwitchOptions, type MotionView, type NumericKey, type Outline, type OutlineOptions, type Paint, type PathHandle, type PlayButton, type PlayButtonOptions, type Playback, type PlaybackEvent, type PlaybackOptions, type Point, type PointSpec, type PresetName, type PulseOptions, type Rect, type ReducedMotionSource, type Sample, type SamplePoint, type ScalingOverrides, type ScalingRule, type ScalingTable, type SeekOptions, type ShapeSpec, type SliceSummary, type StaggerOptions, type StepOptions, type StyleOptions, type SvgIconSpec, type TableColumn, type TableOptions, type TextHandle, type TextSpace, type TextStyle, type ThresholdOptions, type Timing, type TraceOptions, type TransitionContext, type TransitionEffect, type TravelOptions, type Tween, type TweenOptions, type TweenResult, type VegaAttachment, type VegaItem, type VegaMark, type VegaOptions, type VegaSample, type VegaViewLike, type WiggleOptions, createClock, createMotion, defaultClock, defaultScaling, easeInOutCubic, easeOutCubic, linear, manualClock, mediaReducedMotion, motion, scaleDuration, tween };