@opendata-ai/openchart-core 9.0.0-rc.2 → 9.1.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.ts CHANGED
@@ -619,7 +619,11 @@ interface ResolvedChrome {
619
619
  attributionLayout?: 'inline' | 'stacked';
620
620
  /** Annotation footnotes generated by auto-thinning. Rendered as a numbered list above the source line. */
621
621
  footnotes?: AnnotationFootnote[];
622
- /** Reserved annotation-note and series-summary band, independent of the current demoted set. */
622
+ /**
623
+ * Annotation-note and series-summary band. Under `chromeLayout: 'subtract'` or
624
+ * `stableNoteBand` it is the reserve for every source, independent of the
625
+ * current demoted set; otherwise it holds the notes actually drawn.
626
+ */
623
627
  noteBandHeight?: number;
624
628
  /** Height added by the engine in grow mode; hosts must not add it again. */
625
629
  grownHeight?: number;
@@ -755,7 +759,15 @@ interface MarkAria {
755
759
  * Line mark: a series of connected points.
756
760
  * Used by line charts and area chart boundaries.
757
761
  */
758
- interface LineMark {
762
+ /** Provenance for data shapes. Decorative marks omit this metadata. */
763
+ interface MarkMetadata {
764
+ markType?: MarkType;
765
+ /** Sanitized field suffixes; series retain only fields constant across their rows. */
766
+ identity?: Record<string, string>;
767
+ /** Authored encoding.description, distinct from generated aria labels and aria.description. */
768
+ authoredDescription?: string;
769
+ }
770
+ interface LineMark extends MarkMetadata {
759
771
  type: 'line';
760
772
  /** Stable identity key for data-update transitions. */
761
773
  key?: string;
@@ -804,7 +816,7 @@ interface LineMark {
804
816
  * Area mark: a filled region bounded by a top line and a baseline.
805
817
  * Used by area charts.
806
818
  */
807
- interface AreaMark {
819
+ interface AreaMark extends MarkMetadata {
808
820
  type: 'area';
809
821
  /** Stable identity key for data-update transitions. */
810
822
  key?: string;
@@ -865,10 +877,12 @@ interface AreaMark {
865
877
  * Rect mark: a rectangle.
866
878
  * Used by bar charts, column charts, and heatmap cells.
867
879
  */
868
- interface RectMark {
880
+ interface RectMark extends MarkMetadata {
869
881
  type: 'rect';
870
882
  /** Stable identity key for data-update transitions. */
871
883
  key?: string;
884
+ /** Grid cell (heatmap, waffle, calendar): enters with a fade, not a baseline wipe. */
885
+ cell?: true;
872
886
  /** X position. */
873
887
  x: number;
874
888
  /** Y position. */
@@ -928,6 +942,14 @@ interface RectMark {
928
942
  animationIndex?: number;
929
943
  /** Bar orientation for animation direction. Set by the engine based on encoding. */
930
944
  orient?: 'horizontal' | 'vertical';
945
+ /**
946
+ * Pixel position of the value-axis baseline the bar grows from: an x for
947
+ * horizontal bars, a y for vertical columns. It is the zero line, or the
948
+ * domain minimum when the domain excludes zero; stacked segments carry their
949
+ * stack's baseline. Set by the bar and column charts, so the entrance can
950
+ * reveal a bar from its baseline and ride its value label on the tip.
951
+ */
952
+ baseline?: number;
931
953
  /** Stacking group key (e.g. category name). Segments sharing this key animate together. */
932
954
  stackGroup?: string;
933
955
  /** Position of this segment within its stack group (0, 1, 2...). Set by engine for stacked bars. */
@@ -939,7 +961,7 @@ interface RectMark {
939
961
  * Arc mark: a pie/donut slice.
940
962
  * Used by pie and donut charts.
941
963
  */
942
- interface ArcMark {
964
+ interface ArcMark extends MarkMetadata {
943
965
  type: 'arc';
944
966
  /** SVG path string for the arc. */
945
967
  path: string;
@@ -980,7 +1002,7 @@ interface ArcMark {
980
1002
  * Point mark: a circle or dot.
981
1003
  * Used by scatter/bubble charts and dot plots.
982
1004
  */
983
- interface PointMark {
1005
+ interface PointMark extends MarkMetadata {
984
1006
  type: 'point';
985
1007
  /** Stable identity key for data-update transitions. */
986
1008
  key?: string;
@@ -1018,7 +1040,7 @@ interface PointMark {
1018
1040
  * Text mark: data-positioned text label.
1019
1041
  * Used by text charts for showing values directly at data coordinates.
1020
1042
  */
1021
- interface TextMarkLayout {
1043
+ interface TextMarkLayout extends MarkMetadata {
1022
1044
  type: 'textMark';
1023
1045
  /** Stable identity key for data-update transitions. */
1024
1046
  key?: string;
@@ -1064,7 +1086,7 @@ interface TextMarkLayout {
1064
1086
  * Rule mark: a line segment between two points.
1065
1087
  * Used for reference lines rendered as data marks.
1066
1088
  */
1067
- interface RuleMarkLayout {
1089
+ interface RuleMarkLayout extends MarkMetadata {
1068
1090
  type: 'rule';
1069
1091
  /** Stable identity key for data-update transitions. */
1070
1092
  key?: string;
@@ -1104,7 +1126,7 @@ interface RuleMarkLayout {
1104
1126
  * Tick mark: a short line segment at a data coordinate.
1105
1127
  * Used for strip plots and rug plots.
1106
1128
  */
1107
- interface TickMarkLayout {
1129
+ interface TickMarkLayout extends MarkMetadata {
1108
1130
  type: 'tick';
1109
1131
  /** Stable identity key for data-update transitions. */
1110
1132
  key?: string;
@@ -1682,6 +1704,11 @@ interface ResolvedAnimationPhase {
1682
1704
  * spec — the renderer supplies the default so it can vary by render mode.
1683
1705
  */
1684
1706
  maxMarks?: number;
1707
+ /**
1708
+ * When the entrance starts (enter phase only; always set there, default
1709
+ * 'visible'). 'mount' plays at once; 'visible' waits until the chart is seen.
1710
+ */
1711
+ trigger?: 'visible' | 'mount';
1685
1712
  }
1686
1713
  /** Resolved animation config. A phase is present iff that phase is enabled. */
1687
1714
  interface ResolvedAnimation {
@@ -2239,8 +2266,11 @@ interface SankeyNodeMark {
2239
2266
  /** Node label positioned outside the node. */
2240
2267
  label: ResolvedLabel;
2241
2268
  /**
2242
- * The node's total flow, rendered as a tspan after the name in lighter,
2243
- * tabular ink. Renderers append it to the label's last line.
2269
+ * The node's total flow, in lighter, tabular ink. Present only when the
2270
+ * engine decided it is drawn; renderers draw it whenever it is set. A label
2271
+ * with engine-wrapped `lines` (placed on the flow at narrow widths) takes it
2272
+ * on its own line below the name; any other label takes it after the name on
2273
+ * the last line.
2244
2274
  */
2245
2275
  valueLabel?: {
2246
2276
  text: string;
@@ -2563,8 +2593,12 @@ interface GeoMapLayout {
2563
2593
  focus: GeoMapFocusLayout | null;
2564
2594
  }
2565
2595
  /** A resolved bar list row with computed positions and visual properties. */
2566
- interface BarListRowMark {
2596
+ interface BarListRowMark extends MarkMetadata {
2567
2597
  type: 'barlist-row';
2598
+ /** Stable identity for update transitions. */
2599
+ key: string;
2600
+ /** Full authored label, including text omitted by display truncation. */
2601
+ fullLabel?: string;
2568
2602
  /** Row index (0-based). */
2569
2603
  index: number;
2570
2604
  /** Row top y position. */
@@ -2618,6 +2652,27 @@ interface BarListLayout {
2618
2652
  chrome: ResolvedChrome;
2619
2653
  /** Resolved row marks with positions, colors, and labels. */
2620
2654
  rows: BarListRowMark[];
2655
+ /** Measured group headers and separators. */
2656
+ groups?: Array<{
2657
+ key: string;
2658
+ label: ResolvedLabel;
2659
+ separator?: {
2660
+ x1: number;
2661
+ y: number;
2662
+ x2: number;
2663
+ };
2664
+ }>;
2665
+ /** Value-axis reference rules, in SVG coordinates. */
2666
+ referenceLines?: Array<{
2667
+ x: number;
2668
+ y1: number;
2669
+ y2: number;
2670
+ stroke: string;
2671
+ strokeWidth: number;
2672
+ strokeDasharray?: string;
2673
+ label?: ResolvedLabel;
2674
+ }>;
2675
+ warnings?: CompileWarning[];
2621
2676
  /** Tooltip content descriptors keyed by row index. */
2622
2677
  tooltipDescriptors: Map<string, TooltipContent>;
2623
2678
  /** Accessibility metadata. */
@@ -2663,6 +2718,14 @@ interface CompileOptions {
2663
2718
  * - `'grow'`: `height` is the plot budget; the SVG grows by the chrome height.
2664
2719
  */
2665
2720
  chromeLayout?: 'subtract' | 'grow';
2721
+ /**
2722
+ * Reserve the annotation-note band for every text annotation up front, even
2723
+ * when none is folded into a numbered note, so an edit that pins a label or
2724
+ * changes which labels fold never changes the figure's height. Edit mode
2725
+ * sets it. Otherwise, while notes grow the SVG (the default), the figure
2726
+ * grows only by the notes it draws. Defaults to false.
2727
+ */
2728
+ stableNoteBand?: boolean;
2666
2729
  /** Theme overrides. */
2667
2730
  theme?: ThemeConfig;
2668
2731
  /**
@@ -3084,7 +3147,7 @@ interface ColumnConfig {
3084
3147
  * - 'density': kernel density estimate drawn as a filled curve; sugar for an
3085
3148
  * area over a density transform
3086
3149
  */
3087
- type MarkType = 'bar' | 'line' | 'area' | 'point' | 'circle' | 'arc' | 'text' | 'rule' | 'tick' | 'rect' | 'lollipop' | 'beeswarm' | 'range' | 'waffle' | 'calendar' | 'parliament' | 'histogram' | 'density';
3150
+ type MarkType = 'bar' | 'line' | 'area' | 'point' | 'circle' | 'arc' | 'text' | 'rule' | 'tick' | 'rect' | 'lollipop' | 'beeswarm' | 'range' | 'errorbar' | 'waffle' | 'calendar' | 'parliament' | 'histogram' | 'density';
3088
3151
  /** A single color stop in a gradient definition. */
3089
3152
  interface GradientStop {
3090
3153
  /** Position along the gradient, 0 to 1. */
@@ -3177,6 +3240,8 @@ interface TrendlineConfig {
3177
3240
  interface MarkOptions {
3178
3241
  /** The mark type. */
3179
3242
  type: MarkType;
3243
+ /** Draw decorative end caps on an explicit interval; default false. */
3244
+ ticks?: boolean;
3180
3245
  /**
3181
3246
  * Show point markers on line/area marks.
3182
3247
  * - true: filled circles at each data point
@@ -3437,6 +3502,8 @@ type MarkDef = (SharedMarkOptions & {
3437
3502
  }) | (SharedMarkOptions & {
3438
3503
  type: 'beeswarm';
3439
3504
  }) | (SharedMarkOptions & {
3505
+ type: 'errorbar';
3506
+ } & Pick<MarkOptions, 'ticks'>) | (SharedMarkOptions & {
3440
3507
  type: 'range';
3441
3508
  } & Pick<MarkOptions, 'style' | 'colorByDirection'>) | (SharedMarkOptions & {
3442
3509
  type: 'waffle';
@@ -3609,6 +3676,8 @@ interface EncodingChannel<TData extends DataRow = DataRow> {
3609
3676
  * - ordinal: ordered categories (scale: ordinal)
3610
3677
  */
3611
3678
  type: FieldType;
3679
+ /** Temporal bar position interval; numbers are milliseconds. Bar marks only. */
3680
+ interval?: 'day' | 'week' | 'month' | 'quarter' | 'year' | number;
3612
3681
  /** Optional aggregate to apply before encoding. */
3613
3682
  aggregate?: AggregateOp;
3614
3683
  /**
@@ -3741,7 +3810,13 @@ interface FacetChannel<TData extends DataRow = DataRow> {
3741
3810
  * @template TData - Propagated from ChartSpec<TData>. Constrains `field` in
3742
3811
  * every channel to `keyof TData & string` when a typed data row is provided.
3743
3812
  */
3813
+ /** Authored mark text, kept verbatim for strings and formatted for numeric fields. */
3814
+ type DescriptionEncoding<TData extends DataRow = DataRow> = (Pick<EncodingChannel<TData>, 'field'> & Partial<Pick<EncodingChannel<TData>, 'type' | 'format'>>) | {
3815
+ value: string;
3816
+ };
3744
3817
  interface Encoding<TData extends DataRow = DataRow> {
3818
+ /** Accessible mark description; static output exposes it as a native title. */
3819
+ description?: DescriptionEncoding<TData>;
3745
3820
  /**
3746
3821
  * Horizontal position channel. Required for: bar, line, area, point, tick, rect, lollipop.
3747
3822
  * Maps a field to the x-axis. Use `type: 'temporal'` for dates, `'nominal'` for categories,
@@ -4250,13 +4325,13 @@ interface ThemeConfig {
4250
4325
  * or an object for full control over categorical, sequential, diverging, etc.
4251
4326
  */
4252
4327
  colors?: string[] | {
4253
- /** Categorical stroke palette for nominal data (array of CSS color strings). */
4254
- categorical?: string[];
4328
+ /** Categorical stroke palette: CSS colors or explicit light/dark pairs. */
4329
+ categorical?: TokenValue[];
4255
4330
  /**
4256
4331
  * Categorical palette for area-filling marks (bar, area, arc, waffle,
4257
4332
  * calendar, rect). Defaults to `categorical` when only that is set.
4258
4333
  */
4259
- categoricalFill?: string[];
4334
+ categoricalFill?: TokenValue[];
4260
4335
  /** Hairline color for axis lines and separators. Accepts a TokenValue for light/dark pairs. */
4261
4336
  hairline?: TokenValue;
4262
4337
  /** Sequential palettes keyed by name. Each is an array of color stops. */
@@ -4409,6 +4484,8 @@ interface ThemeConfig {
4409
4484
  type LabelDensity = 'all' | 'auto' | 'endpoints' | 'none';
4410
4485
  /** Label display configuration for chart data labels. */
4411
4486
  interface LabelConfig {
4487
+ /** Compose category/series names and formatted values; default value only. */
4488
+ content?: EndpointLabelContent;
4412
4489
  /** Placement for bar/column values. Column is only supported for simple horizontal bars. */
4413
4490
  placement?: 'adaptive' | 'inside' | 'outside' | 'column';
4414
4491
  /** How many labels to show. Defaults to 'auto'. */
@@ -4583,8 +4660,11 @@ interface SeriesStyle {
4583
4660
  /**
4584
4661
  * Named easing presets for entrance animations.
4585
4662
  * Uses CSS linear() curves. Named 'ease' (not 'easing') to match Vega convention.
4663
+ * - `smooth` (default): soft ease-out with a gentle start that settles late, no overshoot.
4664
+ * - `snappy`: a fast attack, settling by about half the duration.
4665
+ * - `gentle`: the previous default, a slower ease-out.
4586
4666
  */
4587
- type AnimationEase = 'smooth' | 'snappy';
4667
+ type AnimationEase = 'smooth' | 'snappy' | 'gentle';
4588
4668
  /** Opt-in motion language. */
4589
4669
  type AnimationPreset = 'fluid' | 'subtle';
4590
4670
  /** Physical spring parameters. Quantitative motion is bounded at critical damping. */
@@ -4595,7 +4675,10 @@ interface SpringConfig {
4595
4675
  }
4596
4676
  /** Stagger configuration for sequential element reveal. */
4597
4677
  interface AnimationStagger {
4598
- /** Delay between each element in ms. Default: 80 */
4678
+ /**
4679
+ * Gap between consecutive elements in ms. Default: 80. A ceiling: the whole
4680
+ * stagger spans at most 450ms, so n elements land min(delay, 450 / (n - 1)) apart.
4681
+ */
4599
4682
  delay?: number;
4600
4683
  /** Ordering strategy. Default: 'index' (DOM order) */
4601
4684
  order?: 'index' | 'value' | 'reverse';
@@ -4623,13 +4706,28 @@ interface ResponsiveConfig {
4623
4706
  interface AnimationPhaseConfig {
4624
4707
  /** Spring mode. Cannot be combined with duration or ease in this phase. */
4625
4708
  spring?: SpringConfig;
4626
- /** Duration in ms. Default: 500 for enter. */
4709
+ /** Duration in ms. Default: 800 for enter, 500 for update, 120 for exit. */
4627
4710
  duration?: number;
4628
- /** Easing preset. Default: 'smooth'. */
4711
+ /** Easing preset. Default: 'smooth' ('gentle' for exit). */
4629
4712
  ease?: AnimationEase;
4630
4713
  /** Stagger config. true = defaults, false = no stagger. Default: true for enter. */
4631
4714
  stagger?: AnimationStagger | boolean;
4632
4715
  }
4716
+ /**
4717
+ * Entrance phase config. Adds `trigger` on top of the shared phase options.
4718
+ */
4719
+ interface EnterPhaseConfig extends AnimationPhaseConfig {
4720
+ /**
4721
+ * When the entrance starts. Default: 'visible'.
4722
+ * - `visible`: hold the from-state until at least 25% of the chart (or 25% of
4723
+ * the viewport's height, for a chart taller than the viewport) is on
4724
+ * screen, then play. A chart already in view at mount plays at once.
4725
+ * - `mount`: play as soon as the chart mounts, scrolled into view or not.
4726
+ *
4727
+ * Ignored by export and server-side rendering, which never animate.
4728
+ */
4729
+ trigger?: 'visible' | 'mount';
4730
+ }
4633
4731
  /**
4634
4732
  * Data-update phase config. Adds `maxMarks` on top of the shared phase
4635
4733
  * options; the cap is meaningless for enter/exit, which animate via CSS.
@@ -4637,10 +4735,12 @@ interface AnimationPhaseConfig {
4637
4735
  interface UpdatePhaseConfig extends AnimationPhaseConfig {
4638
4736
  /**
4639
4737
  * Maximum mark count that still runs a tweened data-update transition.
4640
- * Default: 500. Above the cap the chart swaps instantly instead, because
4641
- * per-frame SVG attribute writes on thousands of elements drop frames on
4642
- * low-end devices. Raise it deliberately when the audience is desktop-heavy
4643
- * and you have measured the frame budget.
4738
+ * Charts default to 500 (20000 in canvas mark mode); bar lists, tile maps,
4739
+ * sankeys and maps have no cap unless you set one; tables ignore it. Above
4740
+ * the cap the visualization swaps instantly instead, because per-frame SVG
4741
+ * attribute writes on thousands of elements drop frames on low-end devices.
4742
+ * Raise it deliberately when the audience is desktop-heavy and you have
4743
+ * measured the frame budget.
4644
4744
  */
4645
4745
  maxMarks?: number;
4646
4746
  }
@@ -4651,19 +4751,23 @@ interface UpdatePhaseConfig extends AnimationPhaseConfig {
4651
4751
  interface AnimationConfig {
4652
4752
  /** Base preset; explicit phase settings take precedence. */
4653
4753
  preset?: AnimationPreset;
4654
- /** Entrance animation when chart first renders. */
4655
- enter?: AnimationPhaseConfig | boolean;
4754
+ /** Entrance animation when chart first renders (by default, once it scrolls into view). */
4755
+ enter?: EnterPhaseConfig | boolean;
4656
4756
  /** Transition animation when data updates. */
4657
4757
  update?: UpdatePhaseConfig | boolean;
4658
4758
  /** Exit animation when marks are removed. */
4659
4759
  exit?: AnimationPhaseConfig | boolean;
4660
- /** Delay before annotations animate in (ms after marks). Default: 200. */
4760
+ /**
4761
+ * Gap in ms between the last mark reaching 90% of its entrance and
4762
+ * annotations starting. Default: 150 (0 under a preset).
4763
+ */
4661
4764
  annotationDelay?: number;
4662
4765
  }
4663
4766
  /**
4664
4767
  * Animation spec property.
4665
- * - true: enable entrance animation with sensible defaults
4666
- * - false/omitted: no animation (current behavior)
4768
+ * - omitted or true: every phase (enter, update, exit) with its defaults
4769
+ * - false: all motion off
4770
+ * - preset name: that motion language across every phase
4667
4771
  * - AnimationConfig: full control via enter/update/exit phases
4668
4772
  */
4669
4773
  type AnimationSpec = boolean | AnimationPreset | AnimationConfig;
@@ -4671,7 +4775,7 @@ type AnimationSpec = boolean | AnimationPreset | AnimationConfig;
4671
4775
  * Chart display mode.
4672
4776
  * - `'full'` (default): standard chart with chrome, axes, legend, padding.
4673
4777
  * - `'sparkline'`: minimal inline mini-chart. Strips chrome, axes, legend,
4674
- * watermark, animation, and reduces margins to a tiny safety pad. The mark
4778
+ * watermark, and reduces margins to a tiny safety pad. The mark
4675
4779
  * fills the container edge-to-edge. Best with `mark: 'line' | 'area' | 'bar'`.
4676
4780
  * Explicit user fields (chrome, legend, encoding.x.axis, etc.) still render
4677
4781
  * when set, so users can opt in to specific elements.
@@ -4814,6 +4918,11 @@ interface BeeswarmEncoding<TData extends DataRow = DataRow> extends Encoding<TDa
4814
4918
  * - Vertical: `x` nominal/ordinal category, `y` quantitative start,
4815
4919
  * `y2` quantitative end.
4816
4920
  */
4921
+ /** Explicit interval bounds; runtime validation requires exactly one of x2/y2. */
4922
+ interface ErrorbarEncoding<TData extends DataRow = DataRow> extends Encoding<TData> {
4923
+ x: EncodingChannel<TData>;
4924
+ y: EncodingChannel<TData>;
4925
+ }
4817
4926
  interface RangeEncoding<TData extends DataRow = DataRow> extends Encoding<TData> {
4818
4927
  x: EncodingChannel<TData>;
4819
4928
  y: EncodingChannel<TData>;
@@ -4908,6 +5017,8 @@ interface A11yConfig {
4908
5017
  * are present.
4909
5018
  */
4910
5019
  description?: string;
5020
+ /** Render the hidden screen-reader data table. Defaults to true; navigation stays enabled. */
5021
+ table?: boolean;
4911
5022
  /**
4912
5023
  * Hide the chart from assistive technology entirely (`aria-hidden`).
4913
5024
  * Use only when the chart is decorative or the surrounding content
@@ -4922,7 +5033,14 @@ interface A11yConfig {
4922
5033
  *
4923
5034
  * @internal
4924
5035
  */
5036
+ /** Fixed horizontal figure gutters in CSS pixels. */
5037
+ interface FrameConfig {
5038
+ left?: number;
5039
+ right?: number;
5040
+ }
4925
5041
  interface BaseChartSpec<TData extends DataRow = DataRow> {
5042
+ /** Fixed horizontal plot gutters. */
5043
+ frame?: FrameConfig;
4926
5044
  /** Optional authored measure, unit, provenance, and supplied interval metadata. */
4927
5045
  fields?: Record<string, FieldMetadata>;
4928
5046
  /**
@@ -5036,10 +5154,10 @@ interface BaseChartSpec<TData extends DataRow = DataRow> {
5036
5154
  */
5037
5155
  overrides?: Partial<Record<Breakpoint, ChartSpecOverride>>;
5038
5156
  /**
5039
- * Animation configuration.
5040
- * - true: enable entrance animation with sensible defaults
5041
- * - false/omitted: no animation (current behavior)
5042
- * - AnimationConfig: full control via enter/update/exit phases
5157
+ * Motion. On by default: the entrance plays once the visualization scrolls
5158
+ * into view, and data updates animate. Set false to turn all motion off, or
5159
+ * pass an object to configure each phase. Static rendering and exports never
5160
+ * animate, and prefers-reduced-motion always wins.
5043
5161
  */
5044
5162
  animation?: AnimationSpec;
5045
5163
  /**
@@ -5131,6 +5249,11 @@ interface BaseChartSpec<TData extends DataRow = DataRow> {
5131
5249
  * };
5132
5250
  */
5133
5251
  type ChartSpec<TData extends DataRow = DataRow> = (BaseChartSpec<TData> & {
5252
+ mark: 'errorbar' | Extract<MarkDef, {
5253
+ type: 'errorbar';
5254
+ }>;
5255
+ encoding: ErrorbarEncoding<TData>;
5256
+ }) | (BaseChartSpec<TData> & {
5134
5257
  mark: 'arc' | Extract<MarkDef, {
5135
5258
  type: 'arc';
5136
5259
  }>;
@@ -5276,7 +5399,13 @@ interface TableSpec {
5276
5399
  };
5277
5400
  /** Whether the table adapts to container width. Defaults to true. */
5278
5401
  responsive?: boolean;
5279
- /** Animation configuration for entrance animations. */
5402
+ /**
5403
+ * Motion. On by default: the entrance plays once the visualization scrolls
5404
+ * into view, and data updates animate. Set false to turn all motion off, or
5405
+ * pass an object to configure each phase. Static rendering and exports never
5406
+ * animate, and prefers-reduced-motion always wins. Tables animate their
5407
+ * entrance only; updates re-render instantly.
5408
+ */
5280
5409
  animation?: AnimationSpec;
5281
5410
  }
5282
5411
  /** Graph node: must have an id, plus arbitrary data fields. */
@@ -5308,22 +5437,43 @@ interface NodeOverride {
5308
5437
  /** Force label to always show regardless of zoom/priority. */
5309
5438
  alwaysShowLabel?: boolean;
5310
5439
  }
5440
+ /** One graph motion phase: a tween (duration + ease) or a spring. */
5441
+ interface GraphPhaseConfig {
5442
+ /** Duration in ms. */
5443
+ duration?: number;
5444
+ /** Easing preset. */
5445
+ ease?: AnimationEase;
5446
+ /** Spring mode. Cannot be combined with duration or ease in this phase. */
5447
+ spring?: SpringConfig;
5448
+ }
5449
+ /** Graph entrance phase: adds the reveal stagger toggle and the trigger. */
5450
+ interface GraphEnterPhaseConfig extends GraphPhaseConfig {
5451
+ /**
5452
+ * Stagger the reveal. Default: true. Graphs order their reveal by layout, so
5453
+ * only on/off applies.
5454
+ *
5455
+ * @deprecated The object form (`{ delay, order }`) is ignored: any value
5456
+ * other than `false` staggers. Use `true` or `false`.
5457
+ */
5458
+ stagger?: boolean | AnimationStagger;
5459
+ /**
5460
+ * When the entrance starts. Default: 'visible'.
5461
+ * - `visible`: wait until the graph is on screen, then play.
5462
+ * - `mount`: play as soon as the graph mounts.
5463
+ */
5464
+ trigger?: 'visible' | 'mount';
5465
+ }
5311
5466
  /**
5312
- * Per-phase and per-behavior motion config for a graph.
5313
- *
5314
- * DEFAULT-ON semantics (deliberately different from charts, which are opt-in):
5315
- * omit `animation` → the resolver returns full defaults; `animation: false` →
5316
- * no choreography (but `layout.warmup` still applies); a per-phase `false`
5317
- * disables just that phase. Graphs are default-on because physics motion
5318
- * already exists on load and choreography reduces the chaos.
5467
+ * Per-phase and per-behavior motion config for a graph. A per-phase `false`
5468
+ * disables just that phase.
5319
5469
  */
5320
5470
  interface GraphAnimationConfig {
5321
- /** Node/edge reveal on first render. Default `{ duration: 500, ease: 'smooth', stagger: true }`. */
5322
- enter?: AnimationPhaseConfig | boolean;
5471
+ /** Node/edge reveal on first render. Default `{ duration: 500, ease: 'smooth', stagger: true, trigger: 'visible' }`. */
5472
+ enter?: GraphEnterPhaseConfig | boolean;
5323
5473
  /** Data-update enter-fade for newly added marks. Default `{ duration: 300, ease: 'smooth' }`. */
5324
- update?: AnimationPhaseConfig | boolean;
5474
+ update?: GraphPhaseConfig | boolean;
5325
5475
  /** Ghost fade-out for removed marks. Default `{ duration: 300, ease: 'smooth' }`. */
5326
- exit?: AnimationPhaseConfig | boolean;
5476
+ exit?: GraphPhaseConfig | boolean;
5327
5477
  /** Camera flight easing. Default duration `'auto'` (derived from the zoom distance). */
5328
5478
  camera?: {
5329
5479
  duration?: number;
@@ -5337,7 +5487,7 @@ interface GraphAnimationConfig {
5337
5487
  }
5338
5488
  /**
5339
5489
  * Graph motion spec.
5340
- * - omitted → full defaults (default-ON)
5490
+ * - omitted or `true` → full defaults
5341
5491
  * - `false` → no choreography (warmup still applies)
5342
5492
  * - object → per-phase control
5343
5493
  *
@@ -5412,8 +5562,11 @@ interface GraphSpec {
5412
5562
  /** Theme configuration overrides. */
5413
5563
  theme?: ThemeConfig;
5414
5564
  /**
5415
- * Motion configuration. DEFAULT-ON: omit for full defaults, `false` to opt
5416
- * out of choreography (layout warmup still applies).
5565
+ * Motion. On by default: the entrance plays once the visualization scrolls
5566
+ * into view, and data updates animate. Set false to turn all motion off, or
5567
+ * pass an object to configure each phase. Static rendering and exports never
5568
+ * animate, and prefers-reduced-motion always wins. Layout warmup still runs
5569
+ * when false.
5417
5570
  */
5418
5571
  animation?: GraphAnimationSpec;
5419
5572
  /** Interaction behavior (hover mode, select-fly, opt-in physics). */
@@ -5495,6 +5648,12 @@ interface ResolveConfig {
5495
5648
  * `DataRow`) — children can be independently typed.
5496
5649
  */
5497
5650
  interface LayerSpec<TData extends DataRow = DataRow> {
5651
+ /** Display defaults shared by every leaf. */
5652
+ display?: Display;
5653
+ /** Figure accessibility; hidden cells omit the image role. */
5654
+ a11y?: A11yConfig;
5655
+ /** Fixed horizontal plot gutters shared by the figure. */
5656
+ frame?: FrameConfig;
5498
5657
  /** Array of child layers (ChartSpec or nested LayerSpec). */
5499
5658
  layer: (ChartSpec<TData> | LayerSpec<TData>)[];
5500
5659
  /** Shared data inherited by children without their own data. */
@@ -5556,7 +5715,12 @@ interface LayerSpec<TData extends DataRow = DataRow> {
5556
5715
  hiddenSeries?: string[];
5557
5716
  /** Endpoint labels column, inherited by child layers that don't set their own. */
5558
5717
  endpointLabels?: boolean | EndpointLabelsConfig;
5559
- /** Animation configuration. */
5718
+ /**
5719
+ * Motion. On by default: the entrance plays once the visualization scrolls
5720
+ * into view, and data updates animate. Set false to turn all motion off, or
5721
+ * pass an object to configure each phase. Static rendering and exports never
5722
+ * animate, and prefers-reduced-motion always wins.
5723
+ */
5560
5724
  animation?: AnimationSpec;
5561
5725
  }
5562
5726
  /** Node alignment strategy for sankey layout. */
@@ -5630,8 +5794,39 @@ interface SankeySpec {
5630
5794
  theme?: ThemeConfig;
5631
5795
  /** Whether to show the OpenData watermark. Defaults to true. */
5632
5796
  watermark?: boolean;
5633
- /** Animation configuration for entrance animations. */
5797
+ /**
5798
+ * Motion. On by default: the entrance plays once the visualization scrolls
5799
+ * into view, and data updates animate. Set false to turn all motion off, or
5800
+ * pass an object to configure each phase. Static rendering and exports never
5801
+ * animate, and prefers-reduced-motion always wins.
5802
+ */
5634
5803
  animation?: AnimationSpec;
5804
+ /**
5805
+ * Breakpoint-specific settings: `compact` applies under 400px, `medium` from
5806
+ * 400 to 700px. The active block merges over the top-level spec; `chrome`
5807
+ * merges one level deep, every other field replaces its top-level value.
5808
+ * Typical use: fold small flows into "Other" only on phones.
5809
+ */
5810
+ overrides?: Partial<Record<'compact' | 'medium', SankeySpecOverride>>;
5811
+ }
5812
+ /**
5813
+ * Settings a sankey can change per breakpoint through `SankeySpec.overrides`.
5814
+ * Each field means what it means on `SankeySpec`.
5815
+ */
5816
+ interface SankeySpecOverride {
5817
+ /** Editorial chrome at this breakpoint, merged over the top-level chrome. */
5818
+ chrome?: Chrome;
5819
+ /** "Other" bucketing at this breakpoint (see `SankeySpec.other`). */
5820
+ other?: number | {
5821
+ threshold: number;
5822
+ label?: string;
5823
+ };
5824
+ /** Node order at this breakpoint (see `SankeySpec.nodeSort`). */
5825
+ nodeSort?: string[];
5826
+ /** Label side at this breakpoint (see `SankeySpec.nodeLabelAlign`). */
5827
+ nodeLabelAlign?: 'auto' | 'left' | 'right';
5828
+ /** Vertical gap between nodes at this breakpoint, in pixels. */
5829
+ nodePadding?: number;
5635
5830
  }
5636
5831
  /** Encoding channels specific to tile map visualizations. */
5637
5832
  interface TileMapEncoding {
@@ -5682,7 +5877,12 @@ interface TileMapSpec {
5682
5877
  theme?: ThemeConfig;
5683
5878
  /** Whether to show the OpenData watermark. Defaults to true. */
5684
5879
  watermark?: boolean;
5685
- /** Animation configuration for entrance animations. */
5880
+ /**
5881
+ * Motion. On by default: the entrance plays once the visualization scrolls
5882
+ * into view, and data updates animate. Set false to turn all motion off, or
5883
+ * pass an object to configure each phase. Static rendering and exports never
5884
+ * animate, and prefers-reduced-motion always wins.
5885
+ */
5686
5886
  animation?: AnimationSpec;
5687
5887
  /**
5688
5888
  * d3-format string applied to tile values, legend labels, and tooltips.
@@ -5857,7 +6057,12 @@ interface GeoMapSpec {
5857
6057
  points?: GeoMapPointsLayer;
5858
6058
  /** Authored labels with explicit feature, point, or coordinate anchors. */
5859
6059
  callouts?: GeoCallout[];
5860
- /** Animation configuration for entrance animations. */
6060
+ /**
6061
+ * Motion. On by default: the entrance plays once the visualization scrolls
6062
+ * into view, and data updates animate. Set false to turn all motion off, or
6063
+ * pass an object to configure each phase. Static rendering and exports never
6064
+ * animate, and prefers-reduced-motion always wins.
6065
+ */
5861
6066
  animation?: AnimationSpec;
5862
6067
  }
5863
6068
  interface BarListSpec {
@@ -5870,6 +6075,19 @@ interface BarListSpec {
5870
6075
  data: DataRow[];
5871
6076
  /** Encoding channels mapping data fields to visual properties. */
5872
6077
  encoding: BarListEncoding;
6078
+ /** Ordering within each first-seen group. Default descending; null preserves input order. */
6079
+ sort?: 'descending' | 'ascending' | null;
6080
+ /** Auto height fits every admitted row and its group headers. */
6081
+ height?: number | 'auto';
6082
+ /** Vertical value reference lines. */
6083
+ annotations?: Array<Omit<RefLineAnnotation, 'x' | 'y'> & {
6084
+ x: number;
6085
+ y?: never;
6086
+ }>;
6087
+ /** Value label formatting. */
6088
+ labels?: Pick<LabelConfig, 'format' | 'prefix' | 'suffix'>;
6089
+ /** Accessible figure name and visibility. */
6090
+ a11y?: A11yConfig;
5873
6091
  /** Bar height in pixels. Defaults to 6. */
5874
6092
  barHeight?: number;
5875
6093
  /** Corner radius: number in px or "pill" for fully rounded ends. Defaults to "pill". */
@@ -5882,11 +6100,20 @@ interface BarListSpec {
5882
6100
  theme?: ThemeConfig;
5883
6101
  /** Whether to show the OpenData watermark. Defaults to true. */
5884
6102
  watermark?: boolean;
5885
- /** Animation configuration for entrance animations. */
6103
+ /**
6104
+ * Motion. On by default: the entrance plays once the visualization scrolls
6105
+ * into view, and data updates animate. Set false to turn all motion off, or
6106
+ * pass an object to configure each phase. Static rendering and exports never
6107
+ * animate, and prefers-reduced-motion always wins.
6108
+ */
5886
6109
  animation?: AnimationSpec;
5887
6110
  }
5888
6111
  /** Encoding channels for a barlist visualization. */
5889
6112
  interface BarListEncoding {
6113
+ /** Authored row description. */
6114
+ description?: DescriptionEncoding;
6115
+ /** Nominal group labels, retained in first-seen order. */
6116
+ group?: EncodingChannel;
5890
6117
  /** Label field (required, nominal). The category name for each row. */
5891
6118
  label: EncodingChannel;
5892
6119
  /** Value field (required, quantitative). The numeric value that drives bar width. */
@@ -5898,6 +6125,110 @@ interface BarListEncoding {
5898
6125
  /** Tooltip encoding (optional). */
5899
6126
  tooltip?: EncodingChannel | EncodingChannel[];
5900
6127
  }
6128
+ /** Mark used to draw each frame of a race. */
6129
+ type RaceMarkType = 'bar' | 'line' | 'table';
6130
+ interface RaceBarMarkDef {
6131
+ /** Draw horizontal bars. */
6132
+ type: 'bar';
6133
+ /** Bar corner radius in pixels. Omit to use square corners. */
6134
+ cornerRadius?: number;
6135
+ }
6136
+ interface RaceLineMarkDef {
6137
+ /** Draw a line for each ranked series. */
6138
+ type: 'line';
6139
+ /** Defaults to `reveal`, which expands the x domain to the playhead. `all` shows the full span. */
6140
+ window?: 'reveal' | 'all';
6141
+ }
6142
+ interface RaceTableMarkDef {
6143
+ /** Draw a table of ranked rows. */
6144
+ type: 'table';
6145
+ /** Ordered columns. Defaults to all six in the listed order, with `bar` hidden below 520px. */
6146
+ columns?: RaceTableColumn[];
6147
+ }
6148
+ /** Column in a race table. */
6149
+ type RaceTableColumn = 'rank' | 'change' | 'name' | 'bar' | 'value' | 'share';
6150
+ /** Race mark and its mark-specific options. */
6151
+ type RaceMarkDef = RaceBarMarkDef | RaceLineMarkDef | RaceTableMarkDef;
6152
+ type RaceFieldEncoding<TType extends FieldType = FieldType> = Omit<EncodingChannel, 'type'> & {
6153
+ /** How to interpret the field values. */
6154
+ type?: TType;
6155
+ };
6156
+ /** Field mappings shared by bar, line, and table races. */
6157
+ interface RaceEncoding {
6158
+ /** Playback field. Temporal dates or years and quantitative values sort by value. Ordinal values use `sort` or first-seen order. */
6159
+ time: RaceFieldEncoding<'temporal' | 'ordinal' | 'quantitative'>;
6160
+ /** Stable identity across periods. Also the display name by default. */
6161
+ key: RaceFieldEncoding;
6162
+ /** Numeric field to rank and draw. Defaults to quantitative. */
6163
+ value: RaceFieldEncoding<'quantitative'>;
6164
+ /** Field or constant CSS color. Defaults to coloring by key in order of first appearance in the top N. */
6165
+ color?: RaceFieldEncoding | {
6166
+ value: string;
6167
+ };
6168
+ /** Nominal display label. The last non-null label wins per key. Defaults to the key. */
6169
+ label?: RaceFieldEncoding<'nominal'>;
6170
+ }
6171
+ /** Ranking and playback options for a race. */
6172
+ interface RaceConfig {
6173
+ /** Number of visible slots. Defaults to 10. */
6174
+ top?: number;
6175
+ /** Total playback duration in milliseconds at 1× speed. Defaults to 700ms per period, clamped to 8000–90000ms. Mutually exclusive with `step`. */
6176
+ duration?: number;
6177
+ /** Duration per period in milliseconds. Omitted by default and mutually exclusive with `duration`. */
6178
+ step?: number;
6179
+ /** Reorder duration in milliseconds. Defaults to 400. */
6180
+ swap?: number;
6181
+ /** Value domain policy. Defaults to `frame` for the visible items. Use `fixed` for the full run or `{ min }` for a floor on the frame maximum. */
6182
+ rescale?: 'frame' | 'fixed' | {
6183
+ min: number;
6184
+ };
6185
+ /** Interior gap policy. Defaults to `interpolate`. Use `hold` to carry the previous value or `drop` to leave the value absent. */
6186
+ gaps?: 'interpolate' | 'hold' | 'drop';
6187
+ /** Time to dwell on the final frame in milliseconds. Defaults to 1500. */
6188
+ holdEnd?: number;
6189
+ /** Restart after the final hold. Defaults to false. */
6190
+ loop?: boolean;
6191
+ /** Start when 25% visible (`visible`, the default), immediately (`true`), or on demand (`false`). Reduced motion disables autoplay. */
6192
+ autoplay?: 'visible' | boolean;
6193
+ /** Show play/pause, scrubber, and period readout. Defaults to true. */
6194
+ controls?: boolean;
6195
+ /** Large period label. On by default with automatic placement and the time channel's format. Set false to hide it. */
6196
+ period?: false | {
6197
+ /** Overrides the time channel's format. */
6198
+ format?: string;
6199
+ };
6200
+ /** Show the sum of the top N values. Defaults to false. */
6201
+ summary?: 'sum' | false;
6202
+ }
6203
+ /** Animated top-N leaderboard over a sequence of periods. */
6204
+ interface RaceSpec {
6205
+ /** Discriminant, always `race`. */
6206
+ type: 'race';
6207
+ /** One data row per key and period. */
6208
+ data: DataRow[];
6209
+ /** Required bar, line, or table mark. A string uses that mark's default options. */
6210
+ mark: RaceMarkType | RaceMarkDef;
6211
+ /** Maps fields to time, key, value, and optional color and label. */
6212
+ encoding: RaceEncoding;
6213
+ /** Ranking and playback options. Omit to use the race defaults. */
6214
+ race?: RaceConfig;
6215
+ /** Editorial chrome. Omit to draw without authored title, subtitle, or other chrome text. */
6216
+ chrome?: Chrome;
6217
+ /** Theme overrides. Omit to use the default theme. */
6218
+ theme?: ThemeConfig;
6219
+ /** Accessibility overrides. Omit to use generated metadata. */
6220
+ a11y?: A11yConfig;
6221
+ /** Whether to show the OpenData watermark. Defaults to true. */
6222
+ watermark?: boolean;
6223
+ /** Fixed render width in pixels. Defaults to container-driven sizing. */
6224
+ width?: number;
6225
+ /** Fixed render height in pixels. Defaults to container-driven sizing. */
6226
+ height?: number;
6227
+ /** Value label format override. Omit to use the value channel's format or automatic formatting. */
6228
+ labels?: Pick<LabelConfig, 'format'>;
6229
+ /** Set false to disable autoplay and open on the final frame. Playback otherwise follows `race`. */
6230
+ animation?: AnimationSpec;
6231
+ }
5901
6232
  /**
5902
6233
  * Top-level visualization spec: union discriminated by structural shape.
5903
6234
  *
@@ -5909,6 +6240,7 @@ interface BarListEncoding {
5909
6240
  * - TileMapSpec: has `type: 'tilemap'`
5910
6241
  * - GeoMapSpec: has `type: 'map'`
5911
6242
  * - BarListSpec: has `type: 'barlist'`
6243
+ * - RaceSpec: has `type: 'race'`
5912
6244
  *
5913
6245
  * Election parliament (hemicycle) charts are `ChartSpec` with `mark:
5914
6246
  * 'parliament'`, not a separate top-level type: seat data (party + seats)
@@ -5917,7 +6249,7 @@ interface BarListEncoding {
5917
6249
  * for free instead of a second bespoke compile path (see
5918
6250
  * `packages/engine/src/charts/parliament/`).
5919
6251
  */
5920
- type VizSpec = ChartSpec | LayerSpec | TableSpec | GraphSpec | SankeySpec | TileMapSpec | GeoMapSpec | BarListSpec;
6252
+ type VizSpec = ChartSpec | LayerSpec | TableSpec | GraphSpec | SankeySpec | TileMapSpec | GeoMapSpec | BarListSpec | RaceSpec;
5921
6253
  /**
5922
6254
  * Chart spec without runtime data, for persistence/storage.
5923
6255
  * Generic: `ChartSpecWithoutData<MyRow>` constrains encoding field names.
@@ -5937,8 +6269,10 @@ type GeoMapSpecWithoutData = Omit<GeoMapSpec, 'data' | 'points'> & {
5937
6269
  };
5938
6270
  /** BarList spec without runtime data, for persistence/storage. */
5939
6271
  type BarListSpecWithoutData = Omit<BarListSpec, 'data'>;
6272
+ /** Race spec without runtime data, for persistence/storage. */
6273
+ type RaceSpecWithoutData = Omit<RaceSpec, 'data'>;
5940
6274
  /** Union of data-stripped spec types for persistence/storage. */
5941
- type StoredVizSpec = ChartSpecWithoutData | TableSpecWithoutData | GraphSpecWithoutData | SankeySpecWithoutData | TileMapSpecWithoutData | GeoMapSpecWithoutData | BarListSpecWithoutData;
6275
+ type StoredVizSpec = ChartSpecWithoutData | TableSpecWithoutData | GraphSpecWithoutData | SankeySpecWithoutData | TileMapSpecWithoutData | GeoMapSpecWithoutData | BarListSpecWithoutData | RaceSpecWithoutData;
5942
6276
  /** Logical AND combinator for filter predicates. */
5943
6277
  interface LogicalAnd<T> {
5944
6278
  and: T[];
@@ -6203,7 +6537,7 @@ declare function resolveMarkType(mark: MarkType | MarkDef): MarkType;
6203
6537
  * Extract the full MarkDef from a mark field, filling in defaults for string shorthand.
6204
6538
  */
6205
6539
  declare function resolveMarkDef(mark: MarkType | MarkDef): MarkDef;
6206
- /** Check if a spec is a ChartSpec (has `mark` field, not a layer/table/graph). */
6540
+ /** Check if a spec has a chart mark and is neither a layer nor a race. */
6207
6541
  declare function isChartSpec(spec: VizSpec | Record<string, unknown>): spec is ChartSpec;
6208
6542
  /** Check if a spec is a LayerSpec (has `layer` array). */
6209
6543
  declare function isLayerSpec(spec: VizSpec | Record<string, unknown>): spec is LayerSpec;
@@ -6217,6 +6551,8 @@ declare function isSankeySpec(spec: VizSpec | Record<string, unknown>): spec is
6217
6551
  declare function isTileMapSpec(spec: VizSpec | Record<string, unknown>): spec is TileMapSpec;
6218
6552
  /** Check if a spec is a BarListSpec. */
6219
6553
  declare function isBarListSpec(spec: VizSpec | Record<string, unknown>): spec is BarListSpec;
6554
+ /** Check if a spec is a RaceSpec. */
6555
+ declare function isRaceSpec(spec: unknown): spec is RaceSpec;
6220
6556
  /** Check if a spec is a GeoMapSpec. */
6221
6557
  declare function isGeoMapSpec(spec: VizSpec | Record<string, unknown>): spec is GeoMapSpec;
6222
6558
  /** Check if an annotation is a TextAnnotation. */
@@ -6316,6 +6652,15 @@ interface MarkEvent {
6316
6652
  /** The raw browser MouseEvent. */
6317
6653
  event: MouseEvent;
6318
6654
  }
6655
+ /** A data mark reached through keyboard navigation. */
6656
+ interface MarkFocusEvent {
6657
+ datum: DataRow;
6658
+ series?: string;
6659
+ key: string;
6660
+ description?: string;
6661
+ element: SVGElement;
6662
+ event: FocusEvent | KeyboardEvent;
6663
+ }
6319
6664
  /**
6320
6665
  * Event handler callbacks for chart interactions.
6321
6666
  *
@@ -6327,6 +6672,8 @@ interface ChartEventHandlers {
6327
6672
  onMarkClick?: (event: MarkEvent) => void;
6328
6673
  /** Called when the mouse enters a data mark. */
6329
6674
  onMarkHover?: (event: MarkEvent) => void;
6675
+ /** Called when keyboard focus reaches a different data mark. */
6676
+ onMarkFocus?: (event: MarkFocusEvent) => void;
6330
6677
  /** Called when the mouse leaves a data mark. */
6331
6678
  onMarkLeave?: () => void;
6332
6679
  /** Called when a legend entry is toggled (clicked to show/hide a series). */
@@ -6411,6 +6758,7 @@ interface EncodingRule {
6411
6758
  tooltip?: ChannelRule;
6412
6759
  theta?: ChannelRule;
6413
6760
  detail: ChannelRule;
6761
+ description?: ChannelRule;
6414
6762
  }
6415
6763
  /**
6416
6764
  * Encoding rules per mark type.
@@ -6474,6 +6822,290 @@ interface GeoReaderSelection {
6474
6822
  announcement: string;
6475
6823
  }
6476
6824
 
6825
+ interface RaceItem {
6826
+ key: string;
6827
+ label: string;
6828
+ color: string;
6829
+ value: number;
6830
+ valueLabel: string;
6831
+ rank: number;
6832
+ rankPos: number;
6833
+ opacity: number;
6834
+ change: number;
6835
+ }
6836
+ interface RaceFrame {
6837
+ t: number;
6838
+ period: {
6839
+ index: number;
6840
+ value: string | number;
6841
+ label: string;
6842
+ };
6843
+ items: RaceItem[];
6844
+ domain: [number, number];
6845
+ summary?: {
6846
+ value: number;
6847
+ label: string;
6848
+ };
6849
+ }
6850
+ interface RaceTick {
6851
+ value: number;
6852
+ label: string;
6853
+ opacity: number;
6854
+ position: number;
6855
+ /** Label position when it is offset from the tick or grid line. */
6856
+ labelPosition?: number;
6857
+ /** Additional paint opacity for labels that approach a neighbor. */
6858
+ labelOpacity?: number;
6859
+ }
6860
+ interface RacePlayback {
6861
+ durationMs: number;
6862
+ holdEndMs: number;
6863
+ loop: boolean;
6864
+ autoplay: 'visible' | boolean;
6865
+ controls: boolean;
6866
+ }
6867
+ interface RaceBarStatic {
6868
+ plot: Rect;
6869
+ clip: Rect;
6870
+ nameX: number;
6871
+ rowHeight: number;
6872
+ barHeight: number;
6873
+ cornerRadius: number;
6874
+ top: number;
6875
+ axisY: number;
6876
+ tickFontSize: number;
6877
+ period: {
6878
+ x: number;
6879
+ y: number;
6880
+ fontSize: number;
6881
+ } | null;
6882
+ summary: {
6883
+ x: number;
6884
+ y: number;
6885
+ } | null;
6886
+ }
6887
+ interface RaceBarRow {
6888
+ key: string;
6889
+ color: string;
6890
+ opacity: number;
6891
+ bar: Rect;
6892
+ name: {
6893
+ x: number;
6894
+ y: number;
6895
+ text: string;
6896
+ };
6897
+ value: {
6898
+ x: number;
6899
+ y: number;
6900
+ text: string;
6901
+ anchor: 'start' | 'end';
6902
+ };
6903
+ }
6904
+ interface RaceBarGeometry {
6905
+ mark: 'bar';
6906
+ rows: RaceBarRow[];
6907
+ ticks: RaceTick[];
6908
+ period: {
6909
+ x: number;
6910
+ y: number;
6911
+ fontSize: number;
6912
+ text: string;
6913
+ } | null;
6914
+ summary: {
6915
+ x: number;
6916
+ y: number;
6917
+ text: string;
6918
+ } | null;
6919
+ }
6920
+ interface RaceLineStatic {
6921
+ /** Bounds of the line plot in pixels. */
6922
+ plot: Rect;
6923
+ /** Controls whether the x axis reveals periods as the playhead advances or shows all periods. */
6924
+ window: 'reveal' | 'all';
6925
+ /** Full period-index domain and its pixel range. Reveal mode narrows the domain per frame. */
6926
+ xScale: {
6927
+ /** First and last period indices. */
6928
+ domain: [number, number];
6929
+ /** Left and right x coordinates in pixels. */
6930
+ range: [number, number];
6931
+ };
6932
+ /** Horizontal position of the y axis in pixels. */
6933
+ yAxisX: number;
6934
+ /** Width reserved to the right of the plot for line-end labels, in pixels. */
6935
+ labelGutter: number;
6936
+ /** Whether end labels also display values. */
6937
+ showValues: boolean;
6938
+ /** Font size for axis tick labels in pixels. */
6939
+ tickFontSize: number;
6940
+ /** Visibility and value history for each key that can be drawn. */
6941
+ history: Array<{
6942
+ /** Index into the race matrix. */
6943
+ key: number;
6944
+ /** Contiguous intervals in which the series has a visible head. */
6945
+ runs: Array<{
6946
+ start: number;
6947
+ end: number;
6948
+ peakTime: number;
6949
+ peakOpacity: number;
6950
+ }>;
6951
+ /** Running value bounds at each whole period. */
6952
+ mins: number[];
6953
+ maxes: number[];
6954
+ }>;
6955
+ }
6956
+ interface RaceLineGeometry {
6957
+ /** Identifies line geometry in a race frame. */
6958
+ mark: 'line';
6959
+ /** Series drawn in the current frame. */
6960
+ series: Array<{
6961
+ /** Stable key for the series. */
6962
+ key: string;
6963
+ /** Display color for the line and its name. */
6964
+ color: string;
6965
+ /** Opacity of the series in this frame. */
6966
+ opacity: number;
6967
+ /** Observed points through the current period, plus the interpolated head. Null marks a gap. */
6968
+ points: Array<Point | null>;
6969
+ /** Positioned name and value at the line's head. */
6970
+ endLabel: {
6971
+ /** Horizontal label position in pixels. */
6972
+ x: number;
6973
+ /** Vertical label position in pixels. */
6974
+ y: number;
6975
+ /** Series name to display. */
6976
+ text: string;
6977
+ /** Formatted value at the line's head. */
6978
+ value: string;
6979
+ /** Paint opacity when a crossing crowds the label. Defaults to the series opacity. */
6980
+ opacity?: number;
6981
+ /** Line head to connect to the displaced label. */
6982
+ leader?: Point & {
6983
+ opacity: number;
6984
+ };
6985
+ };
6986
+ }>;
6987
+ /** Period ticks on the horizontal axis. */
6988
+ xTicks: RaceTick[];
6989
+ /** Value ticks on the vertical axis. */
6990
+ yTicks: RaceTick[];
6991
+ /** Y-axis value domain. It can expand as the playhead advances. */
6992
+ domain: [number, number];
6993
+ }
6994
+ /** Display data for a cell in a race table row. */
6995
+ type RaceTableCell = {
6996
+ /** Identifies the rank column. */
6997
+ column: 'rank';
6998
+ /** Displayed rank for the current period. */
6999
+ text: string;
7000
+ } | {
7001
+ /** Identifies the change column. */
7002
+ column: 'change';
7003
+ /** Rank movement since the previous period, or `new` for a key entering the ranking. */
7004
+ direction: 'up' | 'down' | 'same' | 'new';
7005
+ /** Display text for the rank change. */
7006
+ text: string;
7007
+ } | {
7008
+ /** Identifies the name column. */
7009
+ column: 'name';
7010
+ /** Series name to display. */
7011
+ text: string;
7012
+ /** Series color for the chip next to the name. */
7013
+ color: string;
7014
+ } | {
7015
+ /** Identifies the inline bar column. */
7016
+ column: 'bar';
7017
+ /** Left edge of the inline bar in pixels. */
7018
+ x: number;
7019
+ /** Width of the inline bar in pixels. */
7020
+ width: number;
7021
+ /** Fill color of the inline bar. */
7022
+ color: string;
7023
+ } | {
7024
+ /** Identifies the value or share column. */
7025
+ column: 'value' | 'share';
7026
+ /** Formatted value or percentage share, according to the column. */
7027
+ text: string;
7028
+ };
7029
+ interface RaceTableStatic {
7030
+ /** Height of the clipped table body in pixels. */
7031
+ bodyHeight: number;
7032
+ /** Height of each row slot in pixels. */
7033
+ rowHeight: number;
7034
+ /** Height of the header row in pixels. */
7035
+ headerHeight: number;
7036
+ /** Whether the change heading uses a compact glyph. */
7037
+ compactChange: boolean;
7038
+ /** Horizontal padding on each side of a table cell in pixels. */
7039
+ cellPadding: number;
7040
+ /** Font size for table text in pixels. */
7041
+ fontSize: number;
7042
+ /** Columns in display order. */
7043
+ columns: Array<{
7044
+ /** Column identifier shared by the header and row cells. */
7045
+ column: RaceTableColumn;
7046
+ /** Horizontal position of the column in pixels. */
7047
+ x: number;
7048
+ /** Width of the column in pixels. */
7049
+ width: number;
7050
+ }>;
7051
+ /** Header text by column. */
7052
+ labels: Record<RaceTableColumn, string>;
7053
+ }
7054
+ interface RaceTableGeometry {
7055
+ /** Identifies table geometry in a race frame. */
7056
+ mark: 'table';
7057
+ /** Rows in draw order. */
7058
+ rows: Array<{
7059
+ /** Stable key for the row's series. */
7060
+ key: string;
7061
+ /** Vertical row position in pixels. */
7062
+ y: number;
7063
+ /** Opacity of the row in this frame. */
7064
+ opacity: number;
7065
+ /** Zero-based displayed rank, when supplied by the race layout. */
7066
+ rank?: number;
7067
+ /** Whether the row is sliding through the bottom edge of the table. */
7068
+ atEdge?: boolean;
7069
+ /** Vertical adjustment to keep cell content inside the table body. */
7070
+ contentOffset: number;
7071
+ /** Cell data in the static column order. */
7072
+ cells: RaceTableCell[];
7073
+ }>;
7074
+ }
7075
+ type RaceGeometry = RaceBarGeometry | RaceLineGeometry | RaceTableGeometry;
7076
+ interface RaceLayoutBase {
7077
+ width: number;
7078
+ height: number;
7079
+ chrome: ResolvedChrome;
7080
+ theme: ResolvedTheme;
7081
+ a11y: A11yMetadata;
7082
+ watermark: boolean;
7083
+ periods: string[];
7084
+ /** Per-key colors resolved for the active theme. Used by `raceGeometryAt` for mark presentation. */
7085
+ colors: string[];
7086
+ /**
7087
+ * Per-key display labels for `raceGeometryAt`, possibly truncated to fit the gutter.
7088
+ * `raceFrameAt` uses the matrix's full labels for accessibility and export.
7089
+ */
7090
+ labels: string[];
7091
+ /** Text measurer the layout was computed with; renderers reuse it so chrome wraps identically. */
7092
+ measureText?: MeasureTextFn;
7093
+ playback: RacePlayback;
7094
+ warnings?: CompileWarning[];
7095
+ /** Area below chrome where the mark draws. */
7096
+ area: Rect;
7097
+ }
7098
+ type RaceLayout = (RaceLayoutBase & {
7099
+ mark: 'bar';
7100
+ static: RaceBarStatic;
7101
+ }) | (RaceLayoutBase & {
7102
+ mark: 'line';
7103
+ static: RaceLineStatic;
7104
+ }) | (RaceLayoutBase & {
7105
+ mark: 'table';
7106
+ static: RaceTableStatic;
7107
+ });
7108
+
6477
7109
  type ReaderDomainValue = {
6478
7110
  kind: 'string';
6479
7111
  value: string;
@@ -6639,7 +7271,8 @@ declare function findAccessibleColor(baseColor: string, bg: string, targetRatio?
6639
7271
  * Color palettes for @opendata-ai.
6640
7272
  *
6641
7273
  * Categorical palette leads with cyan and uses an OKLCH-balanced multi-hue
6642
- * ramp tuned to L≈0.70, C≈0.13–0.15. Hex values are precomputed sRGB
7274
+ * ramp with light-mode contrast of at least 3:1 on white and near-white.
7275
+ * Hex values are precomputed sRGB
6643
7276
  * (rather than raw `oklch()` strings) because raw OKLCH strings parse
6644
7277
  * unreliably through d3-color and the dark-mode adapter's hsl-based
6645
7278
  * binary search. Source OKLCH values are documented inline so the ramp
@@ -6674,13 +7307,14 @@ declare const ACHROMATIC_RAMP: {
6674
7307
  * Quiet ordered editorial categorical palette: six hues, cyan in slot 1.
6675
7308
  *
6676
7309
  * Construction rules (the contract; the hexes below are output, not input):
6677
- * - Hue order cyan 208 -> ochre 70 -> blue 262 -> rose 350 -> green 155 ->
7310
+ * - Hue order cyan 216 -> ochre 70 -> blue 262 -> rose 350 -> green 155 ->
6678
7311
  * violet 300, so every adjacent pair including the wrap is >= 80° apart.
6679
7312
  * - Lightness varies rather than matching: colour-vision deficiency
6680
7313
  * collapses hue and only lightness survives, so a matched-lightness ramp
6681
7314
  * fails the repo's own Brettel simulator on ochre/rose and blue/violet.
6682
- * - Strokes carry more chroma than fills; a fill is the same hue one step
6683
- * lighter and quieter, so a bar or slice never shouts as loud as a line.
7315
+ * - Fills use equal or lower chroma and equal or higher lightness than
7316
+ * strokes (within sRGB rounding), while clearing 3:1 on near-white.
7317
+ * Cyan uses reduced chroma to remain in gamut at its darker lightness.
6684
7318
  * - Dark variants raise L and trim chroma instead of reusing the light hexes.
6685
7319
  *
6686
7320
  * Hex values are precomputed sRGB via the Ottosson OKLab -> linear sRGB ->
@@ -6692,15 +7326,16 @@ declare const ACHROMATIC_RAMP: {
6692
7326
  * minDistance 30 for deuteranopia and protanopia — see
6693
7327
  * `colors/__tests__/palette-a11y.test.ts`, which is the guard on any change.
6694
7328
  */
6695
- declare const CATEGORICAL_PALETTE: readonly ["#06b6d4", "#e29e47", "#4170cb", "#b2417f", "#3ca368", "#a584dc"];
7329
+ declare const CATEGORICAL_PALETTE: readonly ["#0a879e", "#bf7e1f", "#4170cb", "#b2417f", "#3ca368", "#9c7bd2"];
6696
7330
  /**
6697
- * Fill counterparts of {@link CATEGORICAL_PALETTE}: same hues, ~0.03 lighter
6698
- * and ~0.03 lower chroma. Used for area-filling marks (bar, area, arc,
7331
+ * Fill counterparts of {@link CATEGORICAL_PALETTE}: the same hue families,
7332
+ * with equal or lower chroma and equal or higher lightness (within rounding).
7333
+ * Used for area-filling marks (bar, area, arc,
6699
7334
  * waffle, calendar, rect) so large blocks of colour read quieter than the
6700
7335
  * strokes of a line chart drawn beside them.
6701
7336
  */
6702
- declare const CATEGORICAL_FILL_PALETTE: readonly ["#51bccc", "#dda96b", "#587fc8", "#bf6291", "#62ab7d", "#ae96da"];
6703
- /** Dark-mode stroke palette: L raised ~0.10, chroma trimmed. */
7337
+ declare const CATEGORICAL_FILL_PALETTE: readonly ["#1390a0", "#b58245", "#587fc8", "#bf6291", "#57a072", "#9981c3"];
7338
+ /** Dark-mode stroke palette: raised lightness, with chroma tuned per hue. */
6704
7339
  declare const CATEGORICAL_PALETTE_DARK: readonly ["#22d3ee", "#f9be78", "#6591e1", "#d771a4", "#6ebf8c", "#bca1ed"];
6705
7340
  /** Dark-mode fill palette: the dark strokes one step quieter. */
6706
7341
  declare const CATEGORICAL_FILL_PALETTE_DARK: readonly ["#72cedc", "#f3c898", "#7698d6", "#d281a8", "#82ba95", "#c2afe7"];
@@ -6827,6 +7462,16 @@ declare const wire: ThemeConfig;
6827
7462
  * 5 #3a8a6e oklch(0.576 0.090 167) green
6828
7463
  * 6 #8c8680 oklch(0.623 0.011 68) warm gray
6829
7464
  * Fills are the same hues one step lighter (L +0.06, chroma -12%).
7465
+ *
7466
+ * Dark mode is the same page after nightfall: the newsprint gives way to an
7467
+ * ink-blue ground, with the same hues lifted to hold their contrast on it.
7468
+ * Palette (dark; checked with the Brettel simulator, nearest simulated pair
7469
+ * 31.6 under deuteranopia against a threshold of 30, every stroke at 5.8:1
7470
+ * or better and every fill at 5.3:1 or better on #12181f):
7471
+ * 1 #5e9fd6 ink blue, lifted 2 #f4655a house red, lifted
7472
+ * 3 #93c2e2 pale blue 4 #e0b267 ochre
7473
+ * 5 #4fb093 green 6 #9aa1a8 gray, cooled
7474
+ * Fills sit a step lighter and quieter than their strokes, as in light mode.
6830
7475
  */
6831
7476
  declare const broadsheet: ThemeConfig;
6832
7477
  /**
@@ -7133,7 +7778,7 @@ declare function maxRotatedLabelWidth(tickAngle: number, tickFontSize: number):
7133
7778
  * Truncate a label with an ellipsis so it fits inside an explicit pixel budget.
7134
7779
  * Returns the label unchanged when it already fits.
7135
7780
  *
7136
- * Binary-search on character count against the real measure function, so it
7781
+ * Binary-search on Unicode code point count against the real measure function, so it
7137
7782
  * respects proportional fonts rather than assuming a fixed character width.
7138
7783
  */
7139
7784
  declare function truncateToWidth(label: string, budget: number, fontSize: number, fontWeight: number, measure?: (text: string, fontSize: number, fontWeight?: number) => number): string;
@@ -7563,6 +8208,239 @@ declare function annotationSource(spec: unknown): {
7563
8208
  path: string;
7564
8209
  };
7565
8210
 
8211
+ interface CurveStop {
8212
+ /** Input progress in [0, 1]. */
8213
+ t: number;
8214
+ /** Output value. May leave [0, 1] (overshoot) unless the curve is monotone. */
8215
+ value: number;
8216
+ }
8217
+ /** Evenly spaced values, or positioned stops with strictly increasing `t`. */
8218
+ type CurveInput = readonly number[] | readonly CurveStop[];
8219
+ declare const CURVE_INPUTS: {
8220
+ /** Decks snap: a fast attack for quick fades and short accents. */
8221
+ readonly snap: readonly CurveStop[];
8222
+ /** Soft ease-out with a gentle start. The sampled source of the default `smooth`. */
8223
+ readonly glide: readonly CurveStop[];
8224
+ /** The default ease: an alias of `glide`, so the default improves with no spec change. */
8225
+ readonly smooth: readonly CurveStop[];
8226
+ /** Today's old `smooth` (a gentle ease-out), kept under its own name. */
8227
+ readonly gentle: readonly [0, 0.157, 0.438, 0.64, 0.766, 0.85, 0.906, 0.941, 0.964, 0.978, 0.988, 0.994, 0.998, 1];
8228
+ /**
8229
+ * Monotone, non-overshooting ease-out, faster than `snap`. Sampled from
8230
+ * `M0,0 C0.04,0.75 0.12,0.97 0.3,0.995 C0.4,1 0.5,1 0.6,1` then held at 1: it is
8231
+ * ~0.78 at t=0.1 (snap: ~0.67), 0.951 at 0.2, reaches 0.999 by t~0.45 and
8232
+ * is exactly 1 from t=0.55, so it settles sooner than `snap` or `smooth`.
8233
+ */
8234
+ readonly snappy: readonly [{
8235
+ readonly t: 0;
8236
+ readonly value: 0;
8237
+ }, {
8238
+ readonly t: 0.02;
8239
+ readonly value: 0.2926;
8240
+ }, {
8241
+ readonly t: 0.04;
8242
+ readonly value: 0.4806;
8243
+ }, {
8244
+ readonly t: 0.06;
8245
+ readonly value: 0.6111;
8246
+ }, {
8247
+ readonly t: 0.08;
8248
+ readonly value: 0.7061;
8249
+ }, {
8250
+ readonly t: 0.1;
8251
+ readonly value: 0.7772;
8252
+ }, {
8253
+ readonly t: 0.12;
8254
+ readonly value: 0.8315;
8255
+ }, {
8256
+ readonly t: 0.14;
8257
+ readonly value: 0.8735;
8258
+ }, {
8259
+ readonly t: 0.16;
8260
+ readonly value: 0.9061;
8261
+ }, {
8262
+ readonly t: 0.18;
8263
+ readonly value: 0.9314;
8264
+ }, {
8265
+ readonly t: 0.2;
8266
+ readonly value: 0.951;
8267
+ }, {
8268
+ readonly t: 0.22;
8269
+ readonly value: 0.966;
8270
+ }, {
8271
+ readonly t: 0.24;
8272
+ readonly value: 0.9773;
8273
+ }, {
8274
+ readonly t: 0.26;
8275
+ readonly value: 0.9855;
8276
+ }, {
8277
+ readonly t: 0.28;
8278
+ readonly value: 0.9913;
8279
+ }, {
8280
+ readonly t: 0.3;
8281
+ readonly value: 0.995;
8282
+ }, {
8283
+ readonly t: 0.35;
8284
+ readonly value: 0.9971;
8285
+ }, {
8286
+ readonly t: 0.4;
8287
+ readonly value: 0.9985;
8288
+ }, {
8289
+ readonly t: 0.45;
8290
+ readonly value: 0.9994;
8291
+ }, {
8292
+ readonly t: 0.5;
8293
+ readonly value: 0.9998;
8294
+ }, {
8295
+ readonly t: 0.55;
8296
+ readonly value: 1;
8297
+ }, {
8298
+ readonly t: 0.6;
8299
+ readonly value: 1;
8300
+ }, {
8301
+ readonly t: 0.8;
8302
+ readonly value: 1;
8303
+ }, {
8304
+ readonly t: 1;
8305
+ readonly value: 1;
8306
+ }];
8307
+ /**
8308
+ * Accent only (annotation markers and the like): Decks
8309
+ * `M0,0 C0.1,0.7 0.18,1.13 0.4,1.06 C0.58,0.99 0.8,1 1,1` overshoots to ~1.067
8310
+ * near t=0.35 and settles by ~0.8. NOT monotone, so it is never an authored
8311
+ * ease and never used for value-encoding geometry (use evalValueCurve there).
8312
+ */
8313
+ readonly punch: readonly [{
8314
+ readonly t: 0;
8315
+ readonly value: 0;
8316
+ }, {
8317
+ readonly t: 0.025;
8318
+ readonly value: 0.1714;
8319
+ }, {
8320
+ readonly t: 0.05;
8321
+ readonly value: 0.3321;
8322
+ }, {
8323
+ readonly t: 0.075;
8324
+ readonly value: 0.4776;
8325
+ }, {
8326
+ readonly t: 0.1;
8327
+ readonly value: 0.605;
8328
+ }, {
8329
+ readonly t: 0.125;
8330
+ readonly value: 0.7132;
8331
+ }, {
8332
+ readonly t: 0.15;
8333
+ readonly value: 0.8029;
8334
+ }, {
8335
+ readonly t: 0.175;
8336
+ readonly value: 0.8757;
8337
+ }, {
8338
+ readonly t: 0.2;
8339
+ readonly value: 0.9336;
8340
+ }, {
8341
+ readonly t: 0.225;
8342
+ readonly value: 0.9787;
8343
+ }, {
8344
+ readonly t: 0.25;
8345
+ readonly value: 1.0127;
8346
+ }, {
8347
+ readonly t: 0.275;
8348
+ readonly value: 1.0373;
8349
+ }, {
8350
+ readonly t: 0.3;
8351
+ readonly value: 1.0539;
8352
+ }, {
8353
+ readonly t: 0.325;
8354
+ readonly value: 1.0636;
8355
+ }, {
8356
+ readonly t: 0.35;
8357
+ readonly value: 1.0673;
8358
+ }, {
8359
+ readonly t: 0.375;
8360
+ readonly value: 1.0659;
8361
+ }, {
8362
+ readonly t: 0.4;
8363
+ readonly value: 1.06;
8364
+ }, {
8365
+ readonly t: 0.425;
8366
+ readonly value: 1.0509;
8367
+ }, {
8368
+ readonly t: 0.45;
8369
+ readonly value: 1.0428;
8370
+ }, {
8371
+ readonly t: 0.475;
8372
+ readonly value: 1.0358;
8373
+ }, {
8374
+ readonly t: 0.5;
8375
+ readonly value: 1.0296;
8376
+ }, {
8377
+ readonly t: 0.55;
8378
+ readonly value: 1.0196;
8379
+ }, {
8380
+ readonly t: 0.6;
8381
+ readonly value: 1.0122;
8382
+ }, {
8383
+ readonly t: 0.65;
8384
+ readonly value: 1.0069;
8385
+ }, {
8386
+ readonly t: 0.7;
8387
+ readonly value: 1.0033;
8388
+ }, {
8389
+ readonly t: 0.75;
8390
+ readonly value: 1.0011;
8391
+ }, {
8392
+ readonly t: 0.8;
8393
+ readonly value: 0.9999;
8394
+ }, {
8395
+ readonly t: 0.85;
8396
+ readonly value: 0.9995;
8397
+ }, {
8398
+ readonly t: 0.9;
8399
+ readonly value: 0.9996;
8400
+ }, {
8401
+ readonly t: 0.95;
8402
+ readonly value: 0.9998;
8403
+ }, {
8404
+ readonly t: 1;
8405
+ readonly value: 1;
8406
+ }];
8407
+ };
8408
+ type CurveName = keyof typeof CURVE_INPUTS;
8409
+ /**
8410
+ * Curves `invertCurve` accepts. Kept as a type so a non-monotone curve is a
8411
+ * compile error; a test pins it to the runtime monotonicity check.
8412
+ */
8413
+ type MonotoneCurveName = 'snap' | 'glide' | 'smooth' | 'snappy' | 'gentle';
8414
+ /** Names of every registered curve, in registry order. */
8415
+ declare const CURVE_NAMES: readonly CurveName[];
8416
+ /** The curve's stops, for consumers that need the raw data (tests, generators). */
8417
+ declare function curveStops(name: CurveName): readonly CurveStop[];
8418
+ /** Whether a curve is monotone from 0 to 1 (so it can be inverted). */
8419
+ declare function isMonotoneCurve(name: CurveName): boolean;
8420
+ /** Evaluate a curve at t (clamped to [0, 1]), piecewise-linearly like CSS linear(). */
8421
+ declare function evalCurve(name: CurveName, t: number): number;
8422
+ /**
8423
+ * Evaluate a curve for value-encoding geometry: the output is clamped to
8424
+ * [0, 1] and then replaced by its running maximum, so no curve can overshoot
8425
+ * or dip back. On a monotone curve this equals evalCurve.
8426
+ */
8427
+ declare function evalValueCurve(name: CurveName, t: number): number;
8428
+ /**
8429
+ * The first t at which a monotone curve reaches progress p (clamped to [0, 1]).
8430
+ * Used to place delays at a progress point of a parent's tween.
8431
+ */
8432
+ declare function invertCurve(name: MonotoneCurveName, p: number): number;
8433
+ /**
8434
+ * Emit a curve as a CSS `linear()` easing. Evenly spaced curves emit bare
8435
+ * values; positioned curves emit `value t%` pairs. With `indent`, each stop goes
8436
+ * on its own line (the tokens.css layout), indented two spaces past `indent`.
8437
+ */
8438
+ declare function curveToCSSLinear(name: CurveName, options?: {
8439
+ indent?: string;
8440
+ }): string;
8441
+ /** Evaluate a CSS cubic-bezier(x1, y1, x2, y2) at time progress t. */
8442
+ declare function evalCubicBezier(bezier: readonly [number, number, number, number], t: number): number;
8443
+
7566
8444
  /** Deterministic, bounded motion shared by rendering and timestamp-based export. */
7567
8445
 
7568
8446
  interface MotionPhase {
@@ -7587,6 +8465,689 @@ declare function sampleMotion(phase: MotionPhase, elapsedMs: number): MotionSamp
7587
8465
  /** CSS samples use the same clock and evaluator as SVG, canvas, and export. */
7588
8466
  declare function motionCSS(phase: MotionPhase): string;
7589
8467
 
8468
+ /**
8469
+ * Choreography table: every entrance role, its keyframe, curve, durations and
8470
+ * delay rule, in one place.
8471
+ *
8472
+ * `scripts/generate-motion-css.mjs` emits `styles/keyframes.css`,
8473
+ * `styles/animation.css` and `styles/table-animation.css` from KEYFRAMES and
8474
+ * ENTRANCE_ROLES. GIF export, the canvas entrance and the cleanup timer read
8475
+ * the same data through `entranceTiming`, `entranceEndMs`, `evalRoleEase` and
8476
+ * `evalKeyframes`, so the CSS and the JS paths cannot drift.
8477
+ *
8478
+ * Delays keyed to a parent's tween are progress points ("when the parent
8479
+ * reaches p"), resolved through the parent's actual curve for the phase
8480
+ * (`invertRoleEase`), never a raw fraction of the duration. CSS can't invert a
8481
+ * curve, so renderers stamp the resolved offsets (`entranceAnchorVars`); the
8482
+ * generated CSS falls back to the default `smooth` resolution.
8483
+ */
8484
+
8485
+ type KeyframeProperty = 'opacity' | 'clip-path' | 'transform' | 'fill' | 'r' | 'fill-opacity';
8486
+ type KeyframeValue = {
8487
+ type: 'number';
8488
+ value: number;
8489
+ }
8490
+ /** clip-path: inset(top right bottom left), each in percent. */
8491
+ | {
8492
+ type: 'inset';
8493
+ top: number;
8494
+ right: number;
8495
+ bottom: number;
8496
+ left: number;
8497
+ } | {
8498
+ type: 'translateY';
8499
+ value: number;
8500
+ unit: 'px' | 'em';
8501
+ } | {
8502
+ type: 'translate';
8503
+ x: number;
8504
+ y: number;
8505
+ } | {
8506
+ type: 'scale';
8507
+ value: number;
8508
+ }
8509
+ /** A value JS cannot interpolate (custom properties); switches discretely. */
8510
+ | {
8511
+ type: 'css';
8512
+ css: string;
8513
+ };
8514
+ interface KeyframeStop {
8515
+ /** Offset in [0, 1] (0 = from, 1 = to). */
8516
+ offset: number;
8517
+ values: Readonly<Partial<Record<KeyframeProperty, KeyframeValue>>>;
8518
+ }
8519
+ interface KeyframeDef {
8520
+ comment: string;
8521
+ stops: readonly KeyframeStop[];
8522
+ }
8523
+ /** Every @keyframes in styles/keyframes.css, in emission order. */
8524
+ declare const KEYFRAMES: {
8525
+ readonly 'oc-enter-bar': {
8526
+ readonly comment: "Bar entrance: clip-path reveal from the baseline (vertical columns), no fade:\na value mark is solid from its first frame. Grows bottom-to-top unless the\nrenderer stamps --oc-bar-from (a negative column grows top-to-bottom).";
8527
+ readonly stops: readonly [{
8528
+ readonly offset: 0;
8529
+ readonly values: {
8530
+ readonly 'clip-path': KeyframeValue;
8531
+ };
8532
+ }, {
8533
+ readonly offset: 1;
8534
+ readonly values: {
8535
+ readonly 'clip-path': KeyframeValue;
8536
+ };
8537
+ }];
8538
+ };
8539
+ readonly 'oc-enter-bar-h': {
8540
+ readonly comment: "Bar entrance: clip-path reveal from the baseline (horizontal bars), no fade.\nGrows left-to-right unless --oc-bar-from is stamped (negative bars).";
8541
+ readonly stops: readonly [{
8542
+ readonly offset: 0;
8543
+ readonly values: {
8544
+ readonly 'clip-path': KeyframeValue;
8545
+ };
8546
+ }, {
8547
+ readonly offset: 1;
8548
+ readonly values: {
8549
+ readonly 'clip-path': KeyframeValue;
8550
+ };
8551
+ }];
8552
+ };
8553
+ readonly 'oc-enter-stack': {
8554
+ readonly comment: "Stack entrance: one clip over the whole stack, no fade. Grows bottom-to-top\nfrom --oc-stack-from, which the renderer stamps when the baseline is not the\nbottom edge, so the clip starts collapsed on the baseline and grows both\nways from it.";
8555
+ readonly stops: readonly [{
8556
+ readonly offset: 0;
8557
+ readonly values: {
8558
+ readonly 'clip-path': KeyframeValue;
8559
+ };
8560
+ }, {
8561
+ readonly offset: 1;
8562
+ readonly values: {
8563
+ readonly 'clip-path': KeyframeValue;
8564
+ };
8565
+ }];
8566
+ };
8567
+ readonly 'oc-enter-stack-h': {
8568
+ readonly comment: "Horizontal stack entrance: grows left-to-right, or both ways from the\nbaseline when --oc-stack-from is stamped.";
8569
+ readonly stops: readonly [{
8570
+ readonly offset: 0;
8571
+ readonly values: {
8572
+ readonly 'clip-path': KeyframeValue;
8573
+ };
8574
+ }, {
8575
+ readonly offset: 1;
8576
+ readonly values: {
8577
+ readonly 'clip-path': KeyframeValue;
8578
+ };
8579
+ }];
8580
+ };
8581
+ readonly 'oc-enter-line': {
8582
+ readonly comment: "Line/area entrance: clip-path reveal left-to-right + fade in.\nLines draw in following reading direction with a soft lead-in.";
8583
+ readonly stops: readonly [{
8584
+ readonly offset: 0;
8585
+ readonly values: {
8586
+ readonly 'clip-path': KeyframeValue;
8587
+ readonly opacity: KeyframeValue;
8588
+ };
8589
+ }, {
8590
+ readonly offset: 0.15;
8591
+ readonly values: {
8592
+ readonly opacity: KeyframeValue;
8593
+ };
8594
+ }, {
8595
+ readonly offset: 1;
8596
+ readonly values: {
8597
+ readonly 'clip-path': KeyframeValue;
8598
+ readonly opacity: KeyframeValue;
8599
+ };
8600
+ }];
8601
+ };
8602
+ readonly 'oc-enter-point': {
8603
+ readonly comment: "Point/arc entrance: scale up + fade in from center";
8604
+ readonly stops: readonly [{
8605
+ readonly offset: 0;
8606
+ readonly values: {
8607
+ readonly opacity: KeyframeValue;
8608
+ readonly transform: KeyframeValue;
8609
+ };
8610
+ }, {
8611
+ readonly offset: 1;
8612
+ readonly values: {
8613
+ readonly opacity: KeyframeValue;
8614
+ readonly transform: KeyframeValue;
8615
+ };
8616
+ }];
8617
+ };
8618
+ readonly 'oc-enter-map-fill': {
8619
+ readonly comment: "Map feature entrance: fade in while transitioning fill from a neutral base\nto the data-driven color stored in --oc-feature-fill. The target opacity is\n--oc-feature-target-opacity (default 1) so features under a focus dim\nanimate straight to their dimmed rest opacity instead of hitting 1 and then\nsnapping down when the dim is applied post-animation.\nNon-interpolable fills (the url(#pattern) hatch on no-data features) do not\ntransition: the browser holds the neutral and flips to the pattern when the\neased progress passes 50%, so those features fade in rather than\ncross-fade.";
8620
+ readonly stops: readonly [{
8621
+ readonly offset: 0;
8622
+ readonly values: {
8623
+ readonly fill: KeyframeValue;
8624
+ readonly opacity: KeyframeValue;
8625
+ };
8626
+ }, {
8627
+ readonly offset: 1;
8628
+ readonly values: {
8629
+ readonly fill: KeyframeValue;
8630
+ readonly opacity: KeyframeValue;
8631
+ };
8632
+ }];
8633
+ };
8634
+ readonly 'oc-enter-map-point': {
8635
+ readonly comment: "Map point pop-in: gentle scale from 0.75 + fade. Uses transform-origin to\nscale from the circle's own center (cx/cy) rather than the SVG origin.";
8636
+ readonly stops: readonly [{
8637
+ readonly offset: 0;
8638
+ readonly values: {
8639
+ readonly opacity: KeyframeValue;
8640
+ readonly transform: KeyframeValue;
8641
+ };
8642
+ }, {
8643
+ readonly offset: 1;
8644
+ readonly values: {
8645
+ readonly opacity: KeyframeValue;
8646
+ readonly transform: KeyframeValue;
8647
+ };
8648
+ }];
8649
+ };
8650
+ readonly 'oc-enter-pop': {
8651
+ readonly comment: "Line point pop: fade in while scaling up from 0.4. The renderer stamps an\ninline px transform-origin at the point centre, so it grows in place\n(and in GIF frames, which carry no animation CSS).";
8652
+ readonly stops: readonly [{
8653
+ readonly offset: 0;
8654
+ readonly values: {
8655
+ readonly opacity: KeyframeValue;
8656
+ readonly transform: KeyframeValue;
8657
+ };
8658
+ }, {
8659
+ readonly offset: 1;
8660
+ readonly values: {
8661
+ readonly opacity: KeyframeValue;
8662
+ readonly transform: KeyframeValue;
8663
+ };
8664
+ }];
8665
+ };
8666
+ readonly 'oc-enter-cell': {
8667
+ readonly comment: "Grid cell pop: fade in while scaling up from 0.85 about the cell centre\n(inline px transform-origin stamped by the renderer).";
8668
+ readonly stops: readonly [{
8669
+ readonly offset: 0;
8670
+ readonly values: {
8671
+ readonly opacity: KeyframeValue;
8672
+ readonly transform: KeyframeValue;
8673
+ };
8674
+ }, {
8675
+ readonly offset: 1;
8676
+ readonly values: {
8677
+ readonly opacity: KeyframeValue;
8678
+ readonly transform: KeyframeValue;
8679
+ };
8680
+ }];
8681
+ };
8682
+ readonly 'oc-enter-arc': {
8683
+ readonly comment: "Slice growth: fade in while scaling up from 0.94. The slice path is drawn\naround its group's local origin (the group carries translate(cx, cy)), so\nthe default transform-origin of 0 0 is the pie centre.";
8684
+ readonly stops: readonly [{
8685
+ readonly offset: 0;
8686
+ readonly values: {
8687
+ readonly opacity: KeyframeValue;
8688
+ readonly transform: KeyframeValue;
8689
+ };
8690
+ }, {
8691
+ readonly offset: 1;
8692
+ readonly values: {
8693
+ readonly opacity: KeyframeValue;
8694
+ readonly transform: KeyframeValue;
8695
+ };
8696
+ }];
8697
+ };
8698
+ readonly 'oc-enter-fade-only': {
8699
+ readonly comment: "Pure opacity fade (no transform). Safe for elements with existing transforms\nlike arc groups that use translate() for positioning.";
8700
+ readonly stops: readonly [{
8701
+ readonly offset: 0;
8702
+ readonly values: {
8703
+ readonly opacity: KeyframeValue;
8704
+ };
8705
+ }, {
8706
+ readonly offset: 1;
8707
+ readonly values: {
8708
+ readonly opacity: KeyframeValue;
8709
+ };
8710
+ }];
8711
+ };
8712
+ readonly 'oc-enter-fade': {
8713
+ readonly comment: "Fade + subtle slide up (table chrome)";
8714
+ readonly stops: readonly [{
8715
+ readonly offset: 0;
8716
+ readonly values: {
8717
+ readonly opacity: KeyframeValue;
8718
+ readonly transform: KeyframeValue;
8719
+ };
8720
+ }, {
8721
+ readonly offset: 1;
8722
+ readonly values: {
8723
+ readonly opacity: KeyframeValue;
8724
+ readonly transform: KeyframeValue;
8725
+ };
8726
+ }];
8727
+ };
8728
+ readonly 'oc-enter-rise': {
8729
+ readonly comment: "Text rise: 0.6em up to rest. Its opacity runs as a separate quick fade.";
8730
+ readonly stops: readonly [{
8731
+ readonly offset: 0;
8732
+ readonly values: {
8733
+ readonly transform: KeyframeValue;
8734
+ };
8735
+ }, {
8736
+ readonly offset: 1;
8737
+ readonly values: {
8738
+ readonly transform: KeyframeValue;
8739
+ };
8740
+ }];
8741
+ };
8742
+ readonly 'oc-enter-slide': {
8743
+ readonly comment: "Row slide: 4px up to rest. Its opacity runs as a separate quick fade.";
8744
+ readonly stops: readonly [{
8745
+ readonly offset: 0;
8746
+ readonly values: {
8747
+ readonly transform: KeyframeValue;
8748
+ };
8749
+ }, {
8750
+ readonly offset: 1;
8751
+ readonly values: {
8752
+ readonly transform: KeyframeValue;
8753
+ };
8754
+ }];
8755
+ };
8756
+ readonly 'oc-table-enter-row': {
8757
+ readonly comment: "Table row entrance: slide up only, no opacity (cells fade independently\nto avoid opacity compounding between row and cell animations)";
8758
+ readonly stops: readonly [{
8759
+ readonly offset: 0;
8760
+ readonly values: {
8761
+ readonly transform: KeyframeValue;
8762
+ };
8763
+ }, {
8764
+ readonly offset: 1;
8765
+ readonly values: {
8766
+ readonly transform: KeyframeValue;
8767
+ };
8768
+ }];
8769
+ };
8770
+ readonly 'oc-table-enter-bar-fill': {
8771
+ readonly comment: "Table bar fill entrance: clip-path grow only, no opacity\n(preserves resting opacity: 0.15 from table.css)";
8772
+ readonly stops: readonly [{
8773
+ readonly offset: 0;
8774
+ readonly values: {
8775
+ readonly 'clip-path': KeyframeValue;
8776
+ };
8777
+ }, {
8778
+ readonly offset: 1;
8779
+ readonly values: {
8780
+ readonly 'clip-path': KeyframeValue;
8781
+ };
8782
+ }];
8783
+ };
8784
+ readonly 'oc-pulse': {
8785
+ readonly comment: "Live-tile pulse: the terminator dot of a sparkline swells once when new\ndata lands, so a glance at a wall of tiles catches which one just moved.\n`r` is animated as a presentation attribute (SVG geometry properties are\nanimatable in CSS); the fallback is simply no swell.";
8786
+ readonly stops: readonly [{
8787
+ readonly offset: 0;
8788
+ readonly values: {
8789
+ readonly r: KeyframeValue;
8790
+ readonly 'fill-opacity': KeyframeValue;
8791
+ };
8792
+ }, {
8793
+ readonly offset: 0.45;
8794
+ readonly values: {
8795
+ readonly r: KeyframeValue;
8796
+ readonly 'fill-opacity': KeyframeValue;
8797
+ };
8798
+ }, {
8799
+ readonly offset: 1;
8800
+ readonly values: {
8801
+ readonly r: KeyframeValue;
8802
+ readonly 'fill-opacity': KeyframeValue;
8803
+ };
8804
+ }];
8805
+ };
8806
+ readonly 'oc-tooltip-in': {
8807
+ readonly comment: "Tooltip entrance";
8808
+ readonly stops: readonly [{
8809
+ readonly offset: 0;
8810
+ readonly values: {
8811
+ readonly opacity: KeyframeValue;
8812
+ readonly transform: KeyframeValue;
8813
+ };
8814
+ }, {
8815
+ readonly offset: 1;
8816
+ readonly values: {
8817
+ readonly opacity: KeyframeValue;
8818
+ readonly transform: KeyframeValue;
8819
+ };
8820
+ }];
8821
+ };
8822
+ };
8823
+ type KeyframeName = keyof typeof KEYFRAMES;
8824
+ /** Serialize a keyframe value as CSS. */
8825
+ declare function keyframeValueToCSS(value: KeyframeValue): string;
8826
+ /**
8827
+ * Evaluate a keyframe at time progress t in [0, 1], CSS-style: each property
8828
+ * interpolates between the stops that specify it, and `ease` is applied within
8829
+ * each such segment (the animation-timing-function applies per keyframe
8830
+ * segment, not across the whole animation).
8831
+ */
8832
+ declare function evalKeyframes(name: KeyframeName, t: number, ease: (progress: number) => number): Partial<Record<KeyframeProperty, KeyframeValue>>;
8833
+ /** Properties a keyframe animates, in first-seen order. */
8834
+ declare function keyframeProperties(name: KeyframeName): KeyframeProperty[];
8835
+ type EntranceRole = 'bar' | 'bar-h' | 'cell' | 'stack-reveal' | 'stack-reveal-h' | 'line-area' | 'arc' | 'point' | 'line-point' | 'text' | 'rule' | 'tick' | 'label' | 'arc-label' | 'endpoint-label' | 'annotation' | 'tilemap-tile' | 'map-feature' | 'map-bulk' | 'map-border' | 'map-point' | 'sankey-node' | 'sankey-link' | 'barlist-row' | 'barlist-bar' | 'table-chrome' | 'table-thead' | 'table-row' | 'table-cell' | 'table-heatmap-cell' | 'table-bar-fill' | 'table-sparkline' | 'table-sparkline-dot' | 'table-search-pagination';
8836
+ /** The easing a role's CSS uses. */
8837
+ type RoleTiming =
8838
+ /** The author's ease: `var(--oc-animation-ease, var(--oc-ease-smooth))` (spring-aware). */
8839
+ {
8840
+ kind: 'author';
8841
+ }
8842
+ /** A registry curve regardless of the author's ease (annotations). */
8843
+ | {
8844
+ kind: 'curve';
8845
+ curve: CurveName;
8846
+ }
8847
+ /** A fixed CSS timing function, with its cubic-bezier control points for JS. */
8848
+ | {
8849
+ kind: 'css';
8850
+ css: string;
8851
+ bezier: readonly [number, number, number, number];
8852
+ };
8853
+ /** Animation duration of a role, from the base duration D. */
8854
+ type DurationRule = {
8855
+ kind: 'base';
8856
+ factor: number;
8857
+ } | {
8858
+ kind: 'fixed';
8859
+ ms: number;
8860
+ };
8861
+ /**
8862
+ * When a role starts, relative to something else's tween. Never a raw
8863
+ * fraction of the duration: a progress point is resolved through the
8864
+ * parent's actual curve, so it means "when the parent has visibly got there"
8865
+ * whichever ease the author picked.
8866
+ */
8867
+ type DelayAnchor =
8868
+ /**
8869
+ * When the parent role's tween reaches `progress`. The parent is taken at
8870
+ * index 0 (its stagger is the child's own), or at the context's
8871
+ * `lastMarkIndex` with `ofLast` (annotations wait for the last mark).
8872
+ */
8873
+ {
8874
+ kind: 'progress';
8875
+ progress: number;
8876
+ of: EntranceRole;
8877
+ ofLast?: boolean;
8878
+ }
8879
+ /** A progress point of the map feature sweep: `progress * MAP_SWEEP_BUDGET_MS`. */
8880
+ | {
8881
+ kind: 'sweep';
8882
+ progress: number;
8883
+ };
8884
+ /** How entering elements of a role are spread out by index. */
8885
+ type StaggerRule = 'none'
8886
+ /** `index * --oc-animation-stagger`, index from `--oc-mark-index`. */
8887
+ | 'mark'
8888
+ /** `index * --oc-animation-stagger`, index from `--oc-row-index` (tables). */
8889
+ | 'row'
8890
+ /** `index * --oc-point-stagger` (60ms fallback); the map stamps clampStaggerDelay. */
8891
+ | 'map-point'
8892
+ /** Stamped `--oc-map-delay`; JS: shuffled slot index * map stagger (mapSweepTiming). */
8893
+ | 'map-sweep'
8894
+ /** Stamped `--oc-tile-delay`; JS: the context's delayMs (tilemapTileDelays). */
8895
+ | 'tilemap-tile';
8896
+ interface DelayRule {
8897
+ /** Start at this anchor (omitted = at once), then add the stagger. */
8898
+ after?: DelayAnchor;
8899
+ /** Add `--oc-annotation-delay` (150ms fallback) on top. */
8900
+ plusAnnotationDelay?: boolean;
8901
+ stagger: StaggerRule;
8902
+ }
8903
+ interface EntranceRoleDef {
8904
+ name: EntranceRole;
8905
+ /** Which generated stylesheet and root selector the rule lives under. */
8906
+ scope: 'chart' | 'table';
8907
+ /** Selectors relative to the scope root. */
8908
+ selectors: readonly string[];
8909
+ /**
8910
+ * Which declarations the CSS rule writes. `shorthand` writes the full
8911
+ * `animation` shorthand plus delay; a list writes only those longhands and
8912
+ * inherits the rest from an earlier, less specific role.
8913
+ */
8914
+ emit: 'shorthand' | readonly ('name' | 'duration' | 'timing' | 'delay')[];
8915
+ keyframe: KeyframeName;
8916
+ /** Bar-family roles play this keyframe when their group is horizontal. */
8917
+ horizontalKeyframe?: KeyframeName;
8918
+ timing: RoleTiming;
8919
+ /** What D is: the phase duration, or the map's capped feature duration. */
8920
+ durationBasis: 'phase' | 'map';
8921
+ duration: DurationRule;
8922
+ /**
8923
+ * A second, quick opacity animation on the same element and delay
8924
+ * (`oc-enter-fade-only` over `ms` on FADE_CURVE), so text is readable almost
8925
+ * at once while its geometry keeps settling. Needs `emit: 'shorthand'`.
8926
+ */
8927
+ fade?: {
8928
+ ms: number;
8929
+ };
8930
+ delay: DelayRule;
8931
+ /** Descendant selectors whose own animation this role switches off. */
8932
+ suppress?: readonly string[];
8933
+ /** Accent roles (annotation markers and the like) may use overshooting curves such as `punch`. */
8934
+ accent?: boolean;
8935
+ comment?: string;
8936
+ }
8937
+ /** A role row with its derived fields. */
8938
+ interface EntranceRoleRow extends EntranceRoleDef {
8939
+ /** Share of the duration over which non-opacity properties move (0 if none). */
8940
+ geometryFraction: number;
8941
+ /** Share of the duration after which the keyframe's own opacity has settled (0 if none). */
8942
+ opacityFraction: number;
8943
+ /**
8944
+ * Role-scoped custom properties the generated CSS reads first: a full
8945
+ * per-element delay, a duration, and the root-stamped anchor offset
8946
+ * (`after`) that the anchor resolves to for this render's curve.
8947
+ */
8948
+ vars: {
8949
+ delay: string;
8950
+ duration: string;
8951
+ after: string;
8952
+ };
8953
+ }
8954
+ /** Curve of the quick opacity track on roles with `fade`. */
8955
+ declare const FADE_CURVE: CurveName;
8956
+ /** Line points cascade left to right over this window once their line has drawn. */
8957
+ declare const LINE_POINT_CASCADE_MS = 240;
8958
+ /**
8959
+ * Role-scoped custom property names (`--oc-<role>-delay`, `-dur`, `-after`).
8960
+ * Scoped per role because custom properties inherit: a barlist bar sits inside
8961
+ * its row, a table cell inside its row, a segment inside a stack wrapper.
8962
+ */
8963
+ declare function roleVars(role: EntranceRole): {
8964
+ delay: string;
8965
+ duration: string;
8966
+ after: string;
8967
+ };
8968
+ /** Every entrance role, in CSS emission order (order matters for the cascade). */
8969
+ declare const ENTRANCE_ROLES: readonly EntranceRoleRow[];
8970
+ declare function entranceRole(role: EntranceRole): EntranceRoleRow;
8971
+ /** Inputs the CSS reads from stamped custom properties. Defaults are the CSS fallbacks. */
8972
+ interface EntranceTimingContext {
8973
+ /** `--oc-animation-stagger`, already clamped (clampStaggerDelay / mapSweepTiming). Default 80. */
8974
+ staggerMs?: number;
8975
+ /** `--oc-annotation-delay`. Default 150. */
8976
+ annotationDelayMs?: number;
8977
+ /** `--oc-point-stagger` for map points (clampStaggerDelay). Default 60. */
8978
+ pointStaggerMs?: number;
8979
+ /** A per-element stamped delay (tilemap tiles: tilemapTileDelays). Default 0. */
8980
+ delayMs?: number;
8981
+ /**
8982
+ * A per-element stamped role delay (`--oc-<role>-delay`, e.g. a line point
8983
+ * keyed on its x). Replaces the whole delay rule, as the CSS does.
8984
+ */
8985
+ stampedDelayMs?: number;
8986
+ /** Root-stamped anchor offsets (`--oc-<role>-after`), per role. */
8987
+ afterMs?: Partial<Record<EntranceRole, number>>;
8988
+ /** Stagger index of the last mark, for anchors with `ofLast`. Default 0. */
8989
+ lastMarkIndex?: number;
8990
+ }
8991
+ interface EntranceTiming {
8992
+ /** When the element starts, from the entrance start. */
8993
+ delayMs: number;
8994
+ /** The CSS animation-duration of the role's keyframe. */
8995
+ durationMs: number;
8996
+ /** How long non-opacity properties (clip, transform, fill) move; 0 if none. */
8997
+ geometryMs: number;
8998
+ /** How long until opacity settles; 0 if opacity doesn't animate. */
8999
+ opacityMs: number;
9000
+ /** Duration of the separate quick fade track; 0 when the role has none. */
9001
+ fadeMs: number;
9002
+ }
9003
+ /** The base duration D a role's CSS sees as `--oc-animation-duration`. */
9004
+ declare function roleBaseDuration(role: EntranceRole, phase: MotionPhase): number;
9005
+ /**
9006
+ * When the element at `index` of a role has reached `progress` of its own
9007
+ * tween, in ms from the entrance start: its delay plus the first time its
9008
+ * curve reaches that progress.
9009
+ */
9010
+ declare function progressTimeMs(role: EntranceRole, index: number, phase: MotionPhase, context: EntranceTimingContext, progress: number): number;
9011
+ /**
9012
+ * The index-free part of a role's delay: where its anchor lands for this
9013
+ * phase, in ms. This is what the renderer stamps as `--oc-<role>-after`.
9014
+ */
9015
+ declare function anchorMs(role: EntranceRole, phase: MotionPhase, context?: EntranceTimingContext): number;
9016
+ /**
9017
+ * Root custom properties for every anchored role in a scope: the anchor
9018
+ * offsets the generated CSS reads (`--oc-<role>-after`), resolved through
9019
+ * this phase's curve. CSS can't invert a curve, so the renderer does it here.
9020
+ */
9021
+ declare function entranceAnchorVars(phase: MotionPhase, context?: EntranceTimingContext, scope?: 'chart' | 'table'): Record<string, string>;
9022
+ /**
9023
+ * Timing of the element at `index` of a role, in ms, matching what the
9024
+ * generated CSS computes from the stamped custom properties.
9025
+ */
9026
+ declare function entranceTiming(role: EntranceRole, index: number, phase: MotionPhase, context?: EntranceTimingContext): EntranceTiming;
9027
+ /** How many elements of a role animate, and the extremes that set its end. */
9028
+ interface EntranceRoleExtent {
9029
+ count: number;
9030
+ /** Highest index (default count - 1). */
9031
+ maxIndex?: number;
9032
+ /** Highest stamped delay (tilemap-tile). */
9033
+ maxDelayMs?: number;
9034
+ /** Highest per-element stamped role delay (`--oc-<role>-delay`). */
9035
+ maxStampedDelayMs?: number;
9036
+ /** How many of `count` carry a stamped role delay (default 0). */
9037
+ stampedCount?: number;
9038
+ }
9039
+ interface EntranceEndContext extends Omit<EntranceTimingContext, 'delayMs' | 'stampedDelayMs'> {
9040
+ phase: MotionPhase;
9041
+ /** Elements per role: a count, or an extent. Roles with no elements are skipped. */
9042
+ roles: Partial<Record<EntranceRole, number | EntranceRoleExtent>>;
9043
+ }
9044
+ /**
9045
+ * When the last animated element finishes, in ms from the entrance start: the
9046
+ * max of `delay + duration` (or its fade, if longer) over every role present.
9047
+ * No buffer is added.
9048
+ */
9049
+ declare function entranceEndMs(context: EntranceEndContext): number;
9050
+ /**
9051
+ * The eased progress a role's CSS timing function gives at time progress t of
9052
+ * one keyframe segment. Author-eased roles follow the phase: a spring is
9053
+ * sampled over the base duration D (as `motionCSS` stamps it), otherwise the
9054
+ * registry curve. Mirrors the CSS, so it can overshoot on a spring.
9055
+ */
9056
+ declare function evalRoleEase(role: EntranceRole, phase: MotionPhase, t: number): number;
9057
+ /**
9058
+ * The first share of a role's tween at which its eased progress reaches p:
9059
+ * the inverse of `evalRoleEase`. Monotone registry curves invert exactly;
9060
+ * springs and CSS beziers are searched.
9061
+ */
9062
+ declare function invertRoleEase(role: EntranceRole, phase: MotionPhase, p: number): number;
9063
+ /**
9064
+ * Default exit: a removed mark's ghost fades (and collapses, for rects and
9065
+ * arcs) over 120ms. `gentle` is the fast ease-out here: on a 120ms window
9066
+ * `snap`/`snappy` are ~90% done in under 25ms, which reads as a pop, not a
9067
+ * fade. Exit geometry goes through `sampleMotion`, so it stays in [from, to].
9068
+ */
9069
+ declare const EXIT_FADE_MS = 120;
9070
+ declare const EXIT_CURVE: "gentle";
9071
+ /** Marks entering during an update start once survivors reach this share of their tween's time. */
9072
+ declare const UPDATE_ENTER_START = 0.4;
9073
+ /** When each track of an update transition runs, in ms from its start. */
9074
+ interface UpdateTimeline {
9075
+ /** Removal ghosts fade over [0, exitMs]. */
9076
+ exitMs: number;
9077
+ /** Survivors (and chrome, labels, color) start moving here. */
9078
+ updateDelayMs: number;
9079
+ /** Entering marks fade in from here... */
9080
+ enterDelayMs: number;
9081
+ /** ...over this long, ending with the survivors. */
9082
+ enterMs: number;
9083
+ /** End of the whole transition. */
9084
+ totalMs: number;
9085
+ }
9086
+ /**
9087
+ * Lay out an update transition. On `snap`, a survivor sliding into a removed
9088
+ * mark's slot touches the ghost within ~25ms (a bar's neighbour covers the
9089
+ * band gap at ~0.4 progress), so no fade short enough to run alongside it
9090
+ * can clear first. When the update removes marks, survivors therefore hold
9091
+ * until the exit has finished, and enters keep their place relative to the
9092
+ * survivors. Without removals there is nothing to clear and nothing waits.
9093
+ */
9094
+ declare function updateTimeline(update: MotionPhase, exit: MotionPhase, hasRemovals: boolean): UpdateTimeline;
9095
+
9096
+ /**
9097
+ * Stagger strategies: how far apart entering elements start.
9098
+ *
9099
+ * Every renderer's per-index delay formula lives here so the CSS, canvas and
9100
+ * export paths share one copy.
9101
+ */
9102
+ /** Maximum total stagger time in ms. Keeps the whole sweep inside one beat. */
9103
+ declare const MAX_TOTAL_STAGGER_MS = 450;
9104
+ /**
9105
+ * Gap between consecutive entering elements: the authored delay is a ceiling,
9106
+ * and the whole spread never exceeds MAX_TOTAL_STAGGER_MS, so
9107
+ * `gap = min(delay, 450 / (n - 1))`. Five bars at the default 80ms land 80ms
9108
+ * apart (the cap allows 112.5); forty land 450/39 ms apart. A delay of 0 stays 0, and one element
9109
+ * has no gap.
9110
+ */
9111
+ declare function clampStaggerDelay(delay: number, elementCount: number): number;
9112
+ /** Spread of grid-cell (heatmap, waffle, calendar) start times, in ms. */
9113
+ declare const CELL_SWEEP_BUDGET_MS = 600;
9114
+ /**
9115
+ * Start times for `count` elements spread evenly over `budgetMs`, then
9116
+ * shuffled with a seeded Fisher-Yates so they fill in no visible pattern.
9117
+ * The same seed always gives the same order.
9118
+ */
9119
+ declare function shuffledSweepDelays(count: number, budgetMs: number, seed: number): number[];
9120
+ /** Map point stagger fallback used by the CSS when the renderer stamps none. */
9121
+ declare const MAP_POINT_STAGGER_FALLBACK_MS = 60;
9122
+ /** Cap on a single map feature's fill animation, in ms. */
9123
+ declare const MAP_FEATURE_MAX_DURATION_MS = 500;
9124
+ /**
9125
+ * Spread of map feature start times, in ms. A constant (the old 1.2x budget at
9126
+ * a 450ms enter), so a longer enter duration doesn't add waiting to maps.
9127
+ */
9128
+ declare const MAP_SWEEP_BUDGET_MS = 540;
9129
+ /** The duration the map renderer stamps as `--oc-animation-duration`. */
9130
+ declare function mapFeatureDuration(durationMs: number): number;
9131
+ interface MapSweepTiming {
9132
+ /** Per-feature animation duration (`min(duration, 500)`). */
9133
+ featureDurationMs: number;
9134
+ /** Total spread of feature start times (MAP_SWEEP_BUDGET_MS, 0 in bulk mode). */
9135
+ budgetMs: number;
9136
+ /** Gap between consecutive shuffled feature slots (`budget / (n - 1)`). */
9137
+ staggerMs: number;
9138
+ }
9139
+ /**
9140
+ * Map feature sweep: features start at evenly spaced (then shuffled) slots
9141
+ * across a constant budget. Bulk mode fades the whole group at once, so it
9142
+ * has no budget.
9143
+ */
9144
+ declare function mapSweepTiming(durationMs: number, featureCount: number, bulk: boolean): MapSweepTiming;
9145
+ /**
9146
+ * Tilemap tile delays: an ~800ms base spread with seeded +-40% jitter so tiles
9147
+ * pop in clusters. `animationIndices[i]` is tile i's animation index.
9148
+ */
9149
+ declare function tilemapTileDelays(animationIndices: readonly number[]): number[];
9150
+
7590
9151
  interface CssTokenDef {
7591
9152
  name: string;
7592
9153
  light: string;
@@ -7611,4 +9172,4 @@ declare const CSS_TOKEN_ROOT_SELECTORS: readonly string[];
7611
9172
  declare const CSS_TOKENS: readonly CssTokenDef[];
7612
9173
  declare function cssTokenDefault(name: string, mode: 'light' | 'dark'): string;
7613
9174
 
7614
- export { type A11yConfig, type A11yMetadata, ACHROMATIC_RAMP, AXIS_TITLE_GAP, AXIS_TITLE_OFFSET_COMPACT, AXIS_TITLE_OFFSET_DEFAULT, AXIS_TITLE_TRAILING_PAD, type AggregateOp, type AggregateTransform, type AnimationConfig, type AnimationEase, type AnimationPhaseConfig, type AnimationPreset, type AnimationSpec, type AnimationStagger, type Annotation, type AnnotationAnchor, type AnnotationFootnote, type AnnotationOffset, type AnnotationPosition, type ArcEncoding, type ArcMark, type AreaEncoding, type AreaMark, type AxisConfig, type AxisLabelDensity, type AxisLayout, type AxisTick, BRAND_FONT_SIZE, BRAND_MIN_WIDTH, BRAND_RESERVE_WIDTH, BREAKPOINT_COMPACT_MAX, BREAKPOINT_MEDIUM_MAX, type BarColumnConfig, type BarEncoding, type BarListEncoding, type BarListLayout, type BarListRowMark, type BarListSpec, type BarListSpecWithoutData, type BarTableCell, type BaseLegendLayout, type BeeswarmEncoding, type BinParams, type BinTransform, type Breakpoint, CATEGORICAL_EXTENDED_PALETTE, CATEGORICAL_FILL_PALETTE, CATEGORICAL_FILL_PALETTE_DARK, CATEGORICAL_PALETTE, CATEGORICAL_PALETTE_DARK, COMPACT_MAX_X_TICKS, COMPACT_WIDTH, CSS_TOKENS, CSS_TOKEN_ROOT_SELECTORS, type CalculateExpression, type CalculateTransform, type CalendarEncoding, type CategoricalLegendLayout, type CategoricalPalette, type CategoryColorsConfig, type CategoryTableCell, type CellStyle, type ChannelRule, type ChartBuilderOptions, type ChartEventHandlers, type ChartLayout, type ChartSpec, type ChartSpecOverride, type ChartSpecWithoutData, type Chrome, type ChromeDefaults, type ChromeEconomy, type ChromeKey, type ChromeMode, type ChromeText, type ChromeTextStyle, type ChromeThemeOverride, type CircleEncoding, type ColorBlindnessType, type ColumnConfig, type CompileOptions, type CompileTableOptions, type CompileWarning, type CompositionRecommendation, type Condition, type ConditionalValueDef, type ConnectorConfig, type ConnectorType, type ContinuousLegendBin, type ContinuousLegendLayout, type ContinuousLegendTick, type CssTokenDef, DEFAULT_THEME, DIVERGING_PALETTES, type DarkMode, type DataRow, type DatasetBinding, type DateGranularity, type DeltaColumnConfig, type DeltaTableCell, type DensityEncoding, type DensityTransform, type DesignDiagnostic, type DesignQuestion, type Display, type DivergingPalette, EXTENDED_OFFSET_STRATEGIES, type EditOp, type EditTransaction, type EditTransactionResult, type ElementRef, type Encoding, type EncodingChannel, type EncodingRule, type EndpointLabelContent, type EndpointLabelEntry, type EndpointLabelsConfig, type EndpointLabelsLayout, FLUID_SPRING, FOOTNOTE_LINE_HEIGHT, type FacetChannel, type FacetLayout, type FacetPanelLayout, type FieldFormatContext, type FieldMetadata, type FieldPredicate, type FieldRef, type FieldType, type FillPatternType, type FilterPredicate, type FilterTransform, type FlagTableCell, type FoldTransform, GRAPH_ENCODING_RULES, type GeoAnchor, type GeoCallout, type GeoCalloutNoteSlot, type GeoColorKeyDescriptor, type GeoColorKeyLayout, type GeoDetailLayer, type GeoDetailLayerLayout, type GeoEntityRef, type GeoInset, type GeoLabelAffine, type GeoLabelCandidate, type GeoLabelComponent, type GeoLabelGeometry, type GeoLabelInventoryEntry, type GeoLabelOverlay, type GeoLabelVisibility, type GeoLabelsBundle, type GeoLabelsInput, type GeoMapBorders, type GeoMapEncoding, type GeoMapFeatureMark, type GeoMapFocus, type GeoMapFocusLayout, type GeoMapGeo, type GeoMapLayout, type GeoMapPointMark, type GeoMapPointsLayer, type GeoMapProjection, type GeoMapSpec, type GeoMapSpecWithoutData, type GeoMapZoomConfig, type GeoPlacedLabel, type GeoProjectionContext, type GeoReaderObservation, type GeoReaderSelection, type GeoTextBlock, type GeoViewLayout, type GradientColorStop, type GradientDef, type GradientLegendLayout, type GradientStop, type GraphAnimationConfig, type GraphAnimationSpec, type GraphChannelRule, type GraphEdge, type GraphEdgeLayout, type GraphEncoding, type GraphEncodingChannel, type GraphInteractionConfig, type GraphLayout, type GraphLayoutConfig, type GraphNode, type GraphNodeLayout, type GraphSpec, type GraphSpecWithoutData, type Gridline, HEIGHT_CRAMPED_MAX, HEIGHT_MINIMAL_MAX, HEIGHT_NO_GRID_MAX, HEIGHT_SHORT_MAX, HPAD_COMPACT_FRACTION, HPAD_COMPACT_MIN, type HeatmapColumnConfig, type HeatmapTableCell, type HeightClass, type HistogramEncoding, type ImageColumnConfig, type ImageTableCell, type JoinAggregateTransform, LABEL_GAP_COMPACT, LABEL_GAP_DEFAULT, type LabelCandidate, type LabelConfig, type LabelDensity, type LabelMode, type LabelPriority, type LabelSpec, type LayerSpec, type LayoutStrategy, type LegendChannel, type LegendConfig, type LegendEntry, type LegendEntryPosition, type LegendLayout, type LegendPosition, type LineEncoding, type LineMark, type LinearGradient, type LogicalAnd, type LogicalNot, type LogicalOr, type LollipopEncoding, MARK_DISPLAY_NAMES, MARK_ENCODING_RULES, MARK_TYPES, MAX_LEFT_LABEL_FRACTION_COMPACT, MAX_LEFT_LABEL_FRACTION_DEFAULT, MAX_LEFT_LABEL_FRACTION_MEDIUM, MAX_LEFT_LABEL_FRACTION_MEDIUM_MAX, MAX_SPRING_DURATION, MAX_SR_TABLE_ROWS, MOTION_REST_THRESHOLD, type Margins, type Mark, type MarkAria, type MarkDef, type MarkEvent, type MarkType, type MeasureTextFn, type Metric, type MotionPhase, type MotionSample, NARROW_VIEWPORT_MAX, type NeutralRamp, type NodeOverride, type NumberFormatter, OFFSET_STRATEGIES, type ObservationIdentity, type OffsetStrategy, type PaginationState, type ParliamentEncoding, type Point, type PointEncoding, type PointMark, type RadialGradient, type RangeAnnotation, type RangeEncoding, type ReaderBindingScope, type ReaderChangeMeta, type ReaderComparisonOperand, type ReaderComparisonResult, type ReaderComparisonScope, type ReaderDomainValue, type ReaderObservation, type ReaderPanelScope, type ReaderSelection, type ReaderSeries, type ReaderSlice, type ReaderSliceIndexOptions, type ReaderSliceMember, type ReaderSliceSelection, type Rect, type RectEncoding, type RectMark, type RefLineAnnotation, type RelativeTimeRef, type ResolveConfig, type ResolveMode, type ResolvedAnimation, type ResolvedAnimationPhase, type ResolvedAnnotation, type ResolvedChrome, type ResolvedChromeElement, type ResolvedChromeRule, type ResolvedColumn, type ResolvedFillPattern, type ResolvedLabel, type ResolvedMetricBar, type ResolvedMetricCell, type ResolvedSeriesSearch, type ResolvedTheme, type ResolvedThemeColors, type ResolvedYouDrawIt, type ResponsiveConfig, type RuleMarkLayout, SEQUENTIAL_PALETTES, SUPPORTED_SCHEME_NAMES, type SankeyEncoding, type SankeyLayout, type SankeyLinkColor, type SankeyLinkMark, type SankeyNodeAlign, type SankeyNodeMark, type SankeySpec, type SankeySpecWithoutData, type ScaleConfig, type ScaleInvert, type ScaleType, type SequentialPalette, type SeriesSearchConfig, type SeriesStrategy, type SeriesStyle, type SizeLegendCircle, type SizeLegendLayout, type SortByField, type SortState, type SparklineColumnConfig, type SparklineData, type SparklineTableCell, type SpecPatch, type SpringConfig, type StoredVizSpec, TICK_LABEL_OFFSET, TICK_LINE_HEIGHT_FACTOR, TOP_PAD_EXTRA_NARROW, type TableBuilderOptions, type TableCell, type TableCellBase, type TableDensity, type TableLayout, type TableRow, type TableSpec, type TableSpecWithoutData, type TableTotalRow, type TextAnnotation, type TextEncoding, type TextMarkLayout, type TextStyle, type TextTableCell, type ThemeChromeDefaults, type ThemeColors, type ThemeConfig, type ThemeFontSizes, type ThemeFontWeights, type ThemeFonts, type ThemeRule, type ThemeSpacing, type TickEncoding, type TickMarkLayout, type TileMapBuilderOptions, type TileMapEncoding, type TileMapLayout, type TileMapPalette, type TileMapSpec, type TileMapSpecWithoutData, type TileMapTileMark, type TimeUnit, type TimeUnitTransform, type TokenValue, type TooltipContent, type TooltipField, type Transform, type UpdatePhaseConfig, type ValueDef, type VizSpec, type WaffleEncoding, type WindowFieldDef, type WindowOp, type WindowSortField, type WindowTransform, type XAxisExtentInput, X_AXIS_BAND_HEIGHT, X_AXIS_ROTATED_EXTENT_CAP, X_AXIS_TITLE_BAND, X_AXIS_TITLE_BAND_ROTATED, type YouDrawItConfig, type YouDrawItSample, type YouDrawItYInvert, abbreviateNumber, adaptColorForDarkMode, adaptForLightLineStroke, adaptTheme, annotationSource, applyEditTransaction, areaChart, axisTitleOffset, barChart, broadsheet, buildCompactStepFormatter, buildD3Formatter, buildTemporalFormatter, checkPaletteDistinguishability, clarity, columnChart, computeChrome, computeFieldFormatContext, computeLabelBounds, computeNoteBandHeight, computeXAxisExtentFromLabels, contrastRatio, cssTokenDefault, dataTable, deepMergeSpec, defaultNumberFormatter, deriveNeutralRamp, detectCollision, donutChart, dotChart, elementRef, encodePointerToken, essay, estimateTextWidth, findAccessibleColor, formatCurrency, formatDate, formatNumber, formatOrdinal, formatPercent, generateAltText, generateAriaLabels, generateDataTable, getAxisTitleOffset, getBreakpoint, getHeightClass, getLayoutStrategy, getRepresentativeColor, heuristicMeasure, inferFieldType, isAxislessMark, isBarListSpec, isChartSpec, isConditionalDef, isEncodingChannel, isGeoMapSpec, isGradientDef, isGraphSpec, isLayerSpec, isOpaqueColor, isRangeAnnotation, isRefLineAnnotation, isSankeySpec, isTableSpec, isTextAnnotation, isTileMapSpec, isValueDef, isYearContext, jsonPointer, legacyEditorial, lineChart, maxRotatedLabelWidth, meetsAA, mergeThemeConfig, motionCSS, overlapArea, pickLabelColor, pieChart, resolveChromeEconomy, resolveCollisions, resolveMarkDef, resolveMarkType, resolveMeasurer, resolveNumberFormatter, resolveSchemeName, resolveTheme, sampleMotion, scatterChart, simulateColorBlindness, springDuration, terminal, textAscent, tileMap, truncateRotatedLabel, truncateToWidth, wire, wrapText };
9175
+ export { type A11yConfig, type A11yMetadata, ACHROMATIC_RAMP, AXIS_TITLE_GAP, AXIS_TITLE_OFFSET_COMPACT, AXIS_TITLE_OFFSET_DEFAULT, AXIS_TITLE_TRAILING_PAD, type AggregateOp, type AggregateTransform, type AnimationConfig, type AnimationEase, type AnimationPhaseConfig, type AnimationPreset, type AnimationSpec, type AnimationStagger, type Annotation, type AnnotationAnchor, type AnnotationFootnote, type AnnotationOffset, type AnnotationPosition, type ArcEncoding, type ArcMark, type AreaEncoding, type AreaMark, type AxisConfig, type AxisLabelDensity, type AxisLayout, type AxisTick, BRAND_FONT_SIZE, BRAND_MIN_WIDTH, BRAND_RESERVE_WIDTH, BREAKPOINT_COMPACT_MAX, BREAKPOINT_MEDIUM_MAX, type BarColumnConfig, type BarEncoding, type BarListEncoding, type BarListLayout, type BarListRowMark, type BarListSpec, type BarListSpecWithoutData, type BarTableCell, type BaseLegendLayout, type BeeswarmEncoding, type BinParams, type BinTransform, type Breakpoint, CATEGORICAL_EXTENDED_PALETTE, CATEGORICAL_FILL_PALETTE, CATEGORICAL_FILL_PALETTE_DARK, CATEGORICAL_PALETTE, CATEGORICAL_PALETTE_DARK, CELL_SWEEP_BUDGET_MS, COMPACT_MAX_X_TICKS, COMPACT_WIDTH, CSS_TOKENS, CSS_TOKEN_ROOT_SELECTORS, CURVE_NAMES, type CalculateExpression, type CalculateTransform, type CalendarEncoding, type CategoricalLegendLayout, type CategoricalPalette, type CategoryColorsConfig, type CategoryTableCell, type CellStyle, type ChannelRule, type ChartBuilderOptions, type ChartEventHandlers, type ChartLayout, type ChartSpec, type ChartSpecOverride, type ChartSpecWithoutData, type Chrome, type ChromeDefaults, type ChromeEconomy, type ChromeKey, type ChromeMode, type ChromeText, type ChromeTextStyle, type ChromeThemeOverride, type CircleEncoding, type ColorBlindnessType, type ColumnConfig, type CompileOptions, type CompileTableOptions, type CompileWarning, type CompositionRecommendation, type Condition, type ConditionalValueDef, type ConnectorConfig, type ConnectorType, type ContinuousLegendBin, type ContinuousLegendLayout, type ContinuousLegendTick, type CssTokenDef, type CurveInput, type CurveName, type CurveStop, DEFAULT_THEME, DIVERGING_PALETTES, type DarkMode, type DataRow, type DatasetBinding, type DateGranularity, type DelayAnchor, type DelayRule, type DeltaColumnConfig, type DeltaTableCell, type DensityEncoding, type DensityTransform, type DescriptionEncoding, type DesignDiagnostic, type DesignQuestion, type Display, type DivergingPalette, type DurationRule, ENTRANCE_ROLES, EXIT_CURVE, EXIT_FADE_MS, EXTENDED_OFFSET_STRATEGIES, type EditOp, type EditTransaction, type EditTransactionResult, type ElementRef, type Encoding, type EncodingChannel, type EncodingRule, type EndpointLabelContent, type EndpointLabelEntry, type EndpointLabelsConfig, type EndpointLabelsLayout, type EnterPhaseConfig, type EntranceEndContext, type EntranceRole, type EntranceRoleDef, type EntranceRoleExtent, type EntranceRoleRow, type EntranceTiming, type EntranceTimingContext, type ErrorbarEncoding, FADE_CURVE, FLUID_SPRING, FOOTNOTE_LINE_HEIGHT, type FacetChannel, type FacetLayout, type FacetPanelLayout, type FieldFormatContext, type FieldMetadata, type FieldPredicate, type FieldRef, type FieldType, type FillPatternType, type FilterPredicate, type FilterTransform, type FlagTableCell, type FoldTransform, type FrameConfig, GRAPH_ENCODING_RULES, type GeoAnchor, type GeoCallout, type GeoCalloutNoteSlot, type GeoColorKeyDescriptor, type GeoColorKeyLayout, type GeoDetailLayer, type GeoDetailLayerLayout, type GeoEntityRef, type GeoInset, type GeoLabelAffine, type GeoLabelCandidate, type GeoLabelComponent, type GeoLabelGeometry, type GeoLabelInventoryEntry, type GeoLabelOverlay, type GeoLabelVisibility, type GeoLabelsBundle, type GeoLabelsInput, type GeoMapBorders, type GeoMapEncoding, type GeoMapFeatureMark, type GeoMapFocus, type GeoMapFocusLayout, type GeoMapGeo, type GeoMapLayout, type GeoMapPointMark, type GeoMapPointsLayer, type GeoMapProjection, type GeoMapSpec, type GeoMapSpecWithoutData, type GeoMapZoomConfig, type GeoPlacedLabel, type GeoProjectionContext, type GeoReaderObservation, type GeoReaderSelection, type GeoTextBlock, type GeoViewLayout, type GradientColorStop, type GradientDef, type GradientLegendLayout, type GradientStop, type GraphAnimationConfig, type GraphAnimationSpec, type GraphChannelRule, type GraphEdge, type GraphEdgeLayout, type GraphEncoding, type GraphEncodingChannel, type GraphEnterPhaseConfig, type GraphInteractionConfig, type GraphLayout, type GraphLayoutConfig, type GraphNode, type GraphNodeLayout, type GraphPhaseConfig, type GraphSpec, type GraphSpecWithoutData, type Gridline, HEIGHT_CRAMPED_MAX, HEIGHT_MINIMAL_MAX, HEIGHT_NO_GRID_MAX, HEIGHT_SHORT_MAX, HPAD_COMPACT_FRACTION, HPAD_COMPACT_MIN, type HeatmapColumnConfig, type HeatmapTableCell, type HeightClass, type HistogramEncoding, type ImageColumnConfig, type ImageTableCell, type JoinAggregateTransform, KEYFRAMES, type KeyframeDef, type KeyframeName, type KeyframeProperty, type KeyframeStop, type KeyframeValue, LABEL_GAP_COMPACT, LABEL_GAP_DEFAULT, LINE_POINT_CASCADE_MS, type LabelCandidate, type LabelConfig, type LabelDensity, type LabelMode, type LabelPriority, type LabelSpec, type LayerSpec, type LayoutStrategy, type LegendChannel, type LegendConfig, type LegendEntry, type LegendEntryPosition, type LegendLayout, type LegendPosition, type LineEncoding, type LineMark, type LinearGradient, type LogicalAnd, type LogicalNot, type LogicalOr, type LollipopEncoding, MAP_FEATURE_MAX_DURATION_MS, MAP_POINT_STAGGER_FALLBACK_MS, MAP_SWEEP_BUDGET_MS, MARK_DISPLAY_NAMES, MARK_ENCODING_RULES, MARK_TYPES, MAX_LEFT_LABEL_FRACTION_COMPACT, MAX_LEFT_LABEL_FRACTION_DEFAULT, MAX_LEFT_LABEL_FRACTION_MEDIUM, MAX_LEFT_LABEL_FRACTION_MEDIUM_MAX, MAX_SPRING_DURATION, MAX_SR_TABLE_ROWS, MAX_TOTAL_STAGGER_MS, MOTION_REST_THRESHOLD, type MapSweepTiming, type Margins, type Mark, type MarkAria, type MarkDef, type MarkEvent, type MarkFocusEvent, type MarkMetadata, type MarkType, type MeasureTextFn, type Metric, type MonotoneCurveName, type MotionPhase, type MotionSample, NARROW_VIEWPORT_MAX, type NeutralRamp, type NodeOverride, type NumberFormatter, OFFSET_STRATEGIES, type ObservationIdentity, type OffsetStrategy, type PaginationState, type ParliamentEncoding, type Point, type PointEncoding, type PointMark, type RaceBarGeometry, type RaceBarMarkDef, type RaceBarRow, type RaceBarStatic, type RaceConfig, type RaceEncoding, type RaceFrame, type RaceGeometry, type RaceItem, type RaceLayout, type RaceLineGeometry, type RaceLineMarkDef, type RaceLineStatic, type RaceMarkDef, type RaceMarkType, type RacePlayback, type RaceSpec, type RaceSpecWithoutData, type RaceTableCell, type RaceTableColumn, type RaceTableGeometry, type RaceTableMarkDef, type RaceTableStatic, type RaceTick, type RadialGradient, type RangeAnnotation, type RangeEncoding, type ReaderBindingScope, type ReaderChangeMeta, type ReaderComparisonOperand, type ReaderComparisonResult, type ReaderComparisonScope, type ReaderDomainValue, type ReaderObservation, type ReaderPanelScope, type ReaderSelection, type ReaderSeries, type ReaderSlice, type ReaderSliceIndexOptions, type ReaderSliceMember, type ReaderSliceSelection, type Rect, type RectEncoding, type RectMark, type RefLineAnnotation, type RelativeTimeRef, type ResolveConfig, type ResolveMode, type ResolvedAnimation, type ResolvedAnimationPhase, type ResolvedAnnotation, type ResolvedChrome, type ResolvedChromeElement, type ResolvedChromeRule, type ResolvedColumn, type ResolvedFillPattern, type ResolvedLabel, type ResolvedMetricBar, type ResolvedMetricCell, type ResolvedSeriesSearch, type ResolvedTheme, type ResolvedThemeColors, type ResolvedYouDrawIt, type ResponsiveConfig, type RoleTiming, type RuleMarkLayout, SEQUENTIAL_PALETTES, SUPPORTED_SCHEME_NAMES, type SankeyEncoding, type SankeyLayout, type SankeyLinkColor, type SankeyLinkMark, type SankeyNodeAlign, type SankeyNodeMark, type SankeySpec, type SankeySpecOverride, type SankeySpecWithoutData, type ScaleConfig, type ScaleInvert, type ScaleType, type SequentialPalette, type SeriesSearchConfig, type SeriesStrategy, type SeriesStyle, type SizeLegendCircle, type SizeLegendLayout, type SortByField, type SortState, type SparklineColumnConfig, type SparklineData, type SparklineTableCell, type SpecPatch, type SpringConfig, type StaggerRule, type StoredVizSpec, TICK_LABEL_OFFSET, TICK_LINE_HEIGHT_FACTOR, TOP_PAD_EXTRA_NARROW, type TableBuilderOptions, type TableCell, type TableCellBase, type TableDensity, type TableLayout, type TableRow, type TableSpec, type TableSpecWithoutData, type TableTotalRow, type TextAnnotation, type TextEncoding, type TextMarkLayout, type TextStyle, type TextTableCell, type ThemeChromeDefaults, type ThemeColors, type ThemeConfig, type ThemeFontSizes, type ThemeFontWeights, type ThemeFonts, type ThemeRule, type ThemeSpacing, type TickEncoding, type TickMarkLayout, type TileMapBuilderOptions, type TileMapEncoding, type TileMapLayout, type TileMapPalette, type TileMapSpec, type TileMapSpecWithoutData, type TileMapTileMark, type TimeUnit, type TimeUnitTransform, type TokenValue, type TooltipContent, type TooltipField, type Transform, UPDATE_ENTER_START, type UpdatePhaseConfig, type UpdateTimeline, type ValueDef, type VizSpec, type WaffleEncoding, type WindowFieldDef, type WindowOp, type WindowSortField, type WindowTransform, type XAxisExtentInput, X_AXIS_BAND_HEIGHT, X_AXIS_ROTATED_EXTENT_CAP, X_AXIS_TITLE_BAND, X_AXIS_TITLE_BAND_ROTATED, type YouDrawItConfig, type YouDrawItSample, type YouDrawItYInvert, abbreviateNumber, adaptColorForDarkMode, adaptForLightLineStroke, adaptTheme, anchorMs, annotationSource, applyEditTransaction, areaChart, axisTitleOffset, barChart, broadsheet, buildCompactStepFormatter, buildD3Formatter, buildTemporalFormatter, checkPaletteDistinguishability, clampStaggerDelay, clarity, columnChart, computeChrome, computeFieldFormatContext, computeLabelBounds, computeNoteBandHeight, computeXAxisExtentFromLabels, contrastRatio, cssTokenDefault, curveStops, curveToCSSLinear, dataTable, deepMergeSpec, defaultNumberFormatter, deriveNeutralRamp, detectCollision, donutChart, dotChart, elementRef, encodePointerToken, entranceAnchorVars, entranceEndMs, entranceRole, entranceTiming, essay, estimateTextWidth, evalCubicBezier, evalCurve, evalKeyframes, evalRoleEase, evalValueCurve, findAccessibleColor, formatCurrency, formatDate, formatNumber, formatOrdinal, formatPercent, generateAltText, generateAriaLabels, generateDataTable, getAxisTitleOffset, getBreakpoint, getHeightClass, getLayoutStrategy, getRepresentativeColor, heuristicMeasure, inferFieldType, invertCurve, invertRoleEase, isAxislessMark, isBarListSpec, isChartSpec, isConditionalDef, isEncodingChannel, isGeoMapSpec, isGradientDef, isGraphSpec, isLayerSpec, isMonotoneCurve, isOpaqueColor, isRaceSpec, isRangeAnnotation, isRefLineAnnotation, isSankeySpec, isTableSpec, isTextAnnotation, isTileMapSpec, isValueDef, isYearContext, jsonPointer, keyframeProperties, keyframeValueToCSS, legacyEditorial, lineChart, mapFeatureDuration, mapSweepTiming, maxRotatedLabelWidth, meetsAA, mergeThemeConfig, motionCSS, overlapArea, pickLabelColor, pieChart, progressTimeMs, resolveChromeEconomy, resolveCollisions, resolveMarkDef, resolveMarkType, resolveMeasurer, resolveNumberFormatter, resolveSchemeName, resolveTheme, roleBaseDuration, roleVars, sampleMotion, scatterChart, shuffledSweepDelays, simulateColorBlindness, springDuration, terminal, textAscent, tileMap, tilemapTileDelays, truncateRotatedLabel, truncateToWidth, updateTimeline, wire, wrapText };