@opendata-ai/openchart-core 9.0.0 → 9.2.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 +1596 -47
- package/dist/index.js +1338 -50
- package/dist/index.js.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/styles.css.map +1 -1
- package/package.json +1 -1
- package/schema/chart.schema.json +177 -16
- package/schema/table.schema.json +54 -15
- package/schema/vizspec.schema.json +1749 -55
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
|
-
/**
|
|
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;
|
|
@@ -877,6 +881,8 @@ interface RectMark extends MarkMetadata {
|
|
|
877
881
|
type: 'rect';
|
|
878
882
|
/** Stable identity key for data-update transitions. */
|
|
879
883
|
key?: string;
|
|
884
|
+
/** Grid cell (heatmap, waffle, calendar): enters with a fade, not a baseline wipe. */
|
|
885
|
+
cell?: true;
|
|
880
886
|
/** X position. */
|
|
881
887
|
x: number;
|
|
882
888
|
/** Y position. */
|
|
@@ -936,6 +942,14 @@ interface RectMark extends MarkMetadata {
|
|
|
936
942
|
animationIndex?: number;
|
|
937
943
|
/** Bar orientation for animation direction. Set by the engine based on encoding. */
|
|
938
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;
|
|
939
953
|
/** Stacking group key (e.g. category name). Segments sharing this key animate together. */
|
|
940
954
|
stackGroup?: string;
|
|
941
955
|
/** Position of this segment within its stack group (0, 1, 2...). Set by engine for stacked bars. */
|
|
@@ -1057,6 +1071,8 @@ interface TextMarkLayout extends MarkMetadata {
|
|
|
1057
1071
|
dominantBaseline?: 'auto' | 'hanging' | 'central' | 'text-after-edge';
|
|
1058
1072
|
/** Rotation angle in degrees. */
|
|
1059
1073
|
angle?: number;
|
|
1074
|
+
/** Opacity (0..1), as a playback fade in static output. Omit for fully opaque. */
|
|
1075
|
+
opacity?: number;
|
|
1060
1076
|
/** Original data row. */
|
|
1061
1077
|
data: Record<string, unknown>;
|
|
1062
1078
|
/** Resolved label. */
|
|
@@ -1690,6 +1706,11 @@ interface ResolvedAnimationPhase {
|
|
|
1690
1706
|
* spec — the renderer supplies the default so it can vary by render mode.
|
|
1691
1707
|
*/
|
|
1692
1708
|
maxMarks?: number;
|
|
1709
|
+
/**
|
|
1710
|
+
* When the entrance starts (enter phase only; always set there, default
|
|
1711
|
+
* 'visible'). 'mount' plays at once; 'visible' waits until the chart is seen.
|
|
1712
|
+
*/
|
|
1713
|
+
trigger?: 'visible' | 'mount';
|
|
1693
1714
|
}
|
|
1694
1715
|
/** Resolved animation config. A phase is present iff that phase is enabled. */
|
|
1695
1716
|
interface ResolvedAnimation {
|
|
@@ -2247,8 +2268,11 @@ interface SankeyNodeMark {
|
|
|
2247
2268
|
/** Node label positioned outside the node. */
|
|
2248
2269
|
label: ResolvedLabel;
|
|
2249
2270
|
/**
|
|
2250
|
-
* The node's total flow,
|
|
2251
|
-
*
|
|
2271
|
+
* The node's total flow, in lighter, tabular ink. Present only when the
|
|
2272
|
+
* engine decided it is drawn; renderers draw it whenever it is set. A label
|
|
2273
|
+
* with engine-wrapped `lines` (placed on the flow at narrow widths) takes it
|
|
2274
|
+
* on its own line below the name; any other label takes it after the name on
|
|
2275
|
+
* the last line.
|
|
2252
2276
|
*/
|
|
2253
2277
|
valueLabel?: {
|
|
2254
2278
|
text: string;
|
|
@@ -2573,6 +2597,8 @@ interface GeoMapLayout {
|
|
|
2573
2597
|
/** A resolved bar list row with computed positions and visual properties. */
|
|
2574
2598
|
interface BarListRowMark extends MarkMetadata {
|
|
2575
2599
|
type: 'barlist-row';
|
|
2600
|
+
/** Stable identity for update transitions. */
|
|
2601
|
+
key: string;
|
|
2576
2602
|
/** Full authored label, including text omitted by display truncation. */
|
|
2577
2603
|
fullLabel?: string;
|
|
2578
2604
|
/** Row index (0-based). */
|
|
@@ -2694,6 +2720,14 @@ interface CompileOptions {
|
|
|
2694
2720
|
* - `'grow'`: `height` is the plot budget; the SVG grows by the chrome height.
|
|
2695
2721
|
*/
|
|
2696
2722
|
chromeLayout?: 'subtract' | 'grow';
|
|
2723
|
+
/**
|
|
2724
|
+
* Reserve the annotation-note band for every text annotation up front, even
|
|
2725
|
+
* when none is folded into a numbered note, so an edit that pins a label or
|
|
2726
|
+
* changes which labels fold never changes the figure's height. Edit mode
|
|
2727
|
+
* sets it. Otherwise, while notes grow the SVG (the default), the figure
|
|
2728
|
+
* grows only by the notes it draws. Defaults to false.
|
|
2729
|
+
*/
|
|
2730
|
+
stableNoteBand?: boolean;
|
|
2697
2731
|
/** Theme overrides. */
|
|
2698
2732
|
theme?: ThemeConfig;
|
|
2699
2733
|
/**
|
|
@@ -2750,6 +2784,12 @@ interface CompileOptions {
|
|
|
2750
2784
|
* If not provided, the engine falls back to heuristic estimation.
|
|
2751
2785
|
*/
|
|
2752
2786
|
measureText?: MeasureTextFn;
|
|
2787
|
+
/**
|
|
2788
|
+
* Charts with `encoding.time`: the continuous period index to draw (0 is the
|
|
2789
|
+
* first period, 1.5 halfway between the second and third). Clamped to the
|
|
2790
|
+
* periods present. Defaults to the final period. Ignored without `time`.
|
|
2791
|
+
*/
|
|
2792
|
+
playbackT?: number;
|
|
2753
2793
|
}
|
|
2754
2794
|
/** Extended compile options for table visualizations. */
|
|
2755
2795
|
interface CompileTableOptions extends CompileOptions {
|
|
@@ -3228,6 +3268,12 @@ interface MarkOptions {
|
|
|
3228
3268
|
interpolate?: 'linear' | 'monotone' | 'step' | 'step-before' | 'step-after' | 'basis' | 'cardinal' | 'natural';
|
|
3229
3269
|
/** Explicit orientation override for bar marks. */
|
|
3230
3270
|
orient?: 'horizontal' | 'vertical';
|
|
3271
|
+
/**
|
|
3272
|
+
* Mirror horizontal bars around a shared center axis (a population pyramid).
|
|
3273
|
+
* Only meaningful when `type` is `'bar'`; needs a color field with exactly two
|
|
3274
|
+
* values, the first drawn to the left. Defaults to false.
|
|
3275
|
+
*/
|
|
3276
|
+
mirror?: boolean;
|
|
3231
3277
|
/** Inner radius for arc marks. >0 produces a donut, 0 or omitted produces a pie. */
|
|
3232
3278
|
innerRadius?: number;
|
|
3233
3279
|
/** Outer radius for arc marks. */
|
|
@@ -3447,7 +3493,7 @@ type SharedMarkOptions = Pick<MarkOptions, 'size' | 'filled' | 'opacity' | 'fill
|
|
|
3447
3493
|
*/
|
|
3448
3494
|
type MarkDef = (SharedMarkOptions & {
|
|
3449
3495
|
type: 'bar';
|
|
3450
|
-
} & Pick<MarkOptions, 'orient' | 'cornerRadius'>) | (SharedMarkOptions & {
|
|
3496
|
+
} & Pick<MarkOptions, 'orient' | 'cornerRadius' | 'mirror'>) | (SharedMarkOptions & {
|
|
3451
3497
|
type: 'line';
|
|
3452
3498
|
} & Pick<MarkOptions, 'point' | 'interpolate'>) | (SharedMarkOptions & {
|
|
3453
3499
|
type: 'area';
|
|
@@ -4628,8 +4674,11 @@ interface SeriesStyle {
|
|
|
4628
4674
|
/**
|
|
4629
4675
|
* Named easing presets for entrance animations.
|
|
4630
4676
|
* Uses CSS linear() curves. Named 'ease' (not 'easing') to match Vega convention.
|
|
4677
|
+
* - `smooth` (default): soft ease-out with a gentle start that settles late, no overshoot.
|
|
4678
|
+
* - `snappy`: a fast attack, settling by about half the duration.
|
|
4679
|
+
* - `gentle`: the previous default, a slower ease-out.
|
|
4631
4680
|
*/
|
|
4632
|
-
type AnimationEase = 'smooth' | 'snappy';
|
|
4681
|
+
type AnimationEase = 'smooth' | 'snappy' | 'gentle';
|
|
4633
4682
|
/** Opt-in motion language. */
|
|
4634
4683
|
type AnimationPreset = 'fluid' | 'subtle';
|
|
4635
4684
|
/** Physical spring parameters. Quantitative motion is bounded at critical damping. */
|
|
@@ -4640,7 +4689,10 @@ interface SpringConfig {
|
|
|
4640
4689
|
}
|
|
4641
4690
|
/** Stagger configuration for sequential element reveal. */
|
|
4642
4691
|
interface AnimationStagger {
|
|
4643
|
-
/**
|
|
4692
|
+
/**
|
|
4693
|
+
* Gap between consecutive elements in ms. Default: 80. A ceiling: the whole
|
|
4694
|
+
* stagger spans at most 450ms, so n elements land min(delay, 450 / (n - 1)) apart.
|
|
4695
|
+
*/
|
|
4644
4696
|
delay?: number;
|
|
4645
4697
|
/** Ordering strategy. Default: 'index' (DOM order) */
|
|
4646
4698
|
order?: 'index' | 'value' | 'reverse';
|
|
@@ -4668,13 +4720,28 @@ interface ResponsiveConfig {
|
|
|
4668
4720
|
interface AnimationPhaseConfig {
|
|
4669
4721
|
/** Spring mode. Cannot be combined with duration or ease in this phase. */
|
|
4670
4722
|
spring?: SpringConfig;
|
|
4671
|
-
/** Duration in ms. Default: 500 for
|
|
4723
|
+
/** Duration in ms. Default: 800 for enter, 500 for update, 120 for exit. */
|
|
4672
4724
|
duration?: number;
|
|
4673
|
-
/** Easing preset. Default: 'smooth'. */
|
|
4725
|
+
/** Easing preset. Default: 'smooth' ('gentle' for exit). */
|
|
4674
4726
|
ease?: AnimationEase;
|
|
4675
4727
|
/** Stagger config. true = defaults, false = no stagger. Default: true for enter. */
|
|
4676
4728
|
stagger?: AnimationStagger | boolean;
|
|
4677
4729
|
}
|
|
4730
|
+
/**
|
|
4731
|
+
* Entrance phase config. Adds `trigger` on top of the shared phase options.
|
|
4732
|
+
*/
|
|
4733
|
+
interface EnterPhaseConfig extends AnimationPhaseConfig {
|
|
4734
|
+
/**
|
|
4735
|
+
* When the entrance starts. Default: 'visible'.
|
|
4736
|
+
* - `visible`: hold the from-state until at least 25% of the chart (or 25% of
|
|
4737
|
+
* the viewport's height, for a chart taller than the viewport) is on
|
|
4738
|
+
* screen, then play. A chart already in view at mount plays at once.
|
|
4739
|
+
* - `mount`: play as soon as the chart mounts, scrolled into view or not.
|
|
4740
|
+
*
|
|
4741
|
+
* Ignored by export and server-side rendering, which never animate.
|
|
4742
|
+
*/
|
|
4743
|
+
trigger?: 'visible' | 'mount';
|
|
4744
|
+
}
|
|
4678
4745
|
/**
|
|
4679
4746
|
* Data-update phase config. Adds `maxMarks` on top of the shared phase
|
|
4680
4747
|
* options; the cap is meaningless for enter/exit, which animate via CSS.
|
|
@@ -4682,10 +4749,12 @@ interface AnimationPhaseConfig {
|
|
|
4682
4749
|
interface UpdatePhaseConfig extends AnimationPhaseConfig {
|
|
4683
4750
|
/**
|
|
4684
4751
|
* Maximum mark count that still runs a tweened data-update transition.
|
|
4685
|
-
*
|
|
4686
|
-
*
|
|
4687
|
-
*
|
|
4688
|
-
*
|
|
4752
|
+
* Charts default to 500 (20000 in canvas mark mode); bar lists, tile maps,
|
|
4753
|
+
* sankeys and maps have no cap unless you set one; tables ignore it. Above
|
|
4754
|
+
* the cap the visualization swaps instantly instead, because per-frame SVG
|
|
4755
|
+
* attribute writes on thousands of elements drop frames on low-end devices.
|
|
4756
|
+
* Raise it deliberately when the audience is desktop-heavy and you have
|
|
4757
|
+
* measured the frame budget.
|
|
4689
4758
|
*/
|
|
4690
4759
|
maxMarks?: number;
|
|
4691
4760
|
}
|
|
@@ -4696,19 +4765,23 @@ interface UpdatePhaseConfig extends AnimationPhaseConfig {
|
|
|
4696
4765
|
interface AnimationConfig {
|
|
4697
4766
|
/** Base preset; explicit phase settings take precedence. */
|
|
4698
4767
|
preset?: AnimationPreset;
|
|
4699
|
-
/** Entrance animation when chart first renders. */
|
|
4700
|
-
enter?:
|
|
4768
|
+
/** Entrance animation when chart first renders (by default, once it scrolls into view). */
|
|
4769
|
+
enter?: EnterPhaseConfig | boolean;
|
|
4701
4770
|
/** Transition animation when data updates. */
|
|
4702
4771
|
update?: UpdatePhaseConfig | boolean;
|
|
4703
4772
|
/** Exit animation when marks are removed. */
|
|
4704
4773
|
exit?: AnimationPhaseConfig | boolean;
|
|
4705
|
-
/**
|
|
4774
|
+
/**
|
|
4775
|
+
* Gap in ms between the last mark reaching 90% of its entrance and
|
|
4776
|
+
* annotations starting. Default: 150 (0 under a preset).
|
|
4777
|
+
*/
|
|
4706
4778
|
annotationDelay?: number;
|
|
4707
4779
|
}
|
|
4708
4780
|
/**
|
|
4709
4781
|
* Animation spec property.
|
|
4710
|
-
* - true:
|
|
4711
|
-
* - false
|
|
4782
|
+
* - omitted or true: every phase (enter, update, exit) with its defaults
|
|
4783
|
+
* - false: all motion off
|
|
4784
|
+
* - preset name: that motion language across every phase
|
|
4712
4785
|
* - AnimationConfig: full control via enter/update/exit phases
|
|
4713
4786
|
*/
|
|
4714
4787
|
type AnimationSpec = boolean | AnimationPreset | AnimationConfig;
|
|
@@ -4716,7 +4789,7 @@ type AnimationSpec = boolean | AnimationPreset | AnimationConfig;
|
|
|
4716
4789
|
* Chart display mode.
|
|
4717
4790
|
* - `'full'` (default): standard chart with chrome, axes, legend, padding.
|
|
4718
4791
|
* - `'sparkline'`: minimal inline mini-chart. Strips chrome, axes, legend,
|
|
4719
|
-
* watermark,
|
|
4792
|
+
* watermark, and reduces margins to a tiny safety pad. The mark
|
|
4720
4793
|
* fills the container edge-to-edge. Best with `mark: 'line' | 'area' | 'bar'`.
|
|
4721
4794
|
* Explicit user fields (chrome, legend, encoding.x.axis, etc.) still render
|
|
4722
4795
|
* when set, so users can opt in to specific elements.
|
|
@@ -4803,6 +4876,13 @@ interface LineEncoding<TData extends DataRow = DataRow> extends Encoding<TData>
|
|
|
4803
4876
|
interface BarEncoding<TData extends DataRow = DataRow> extends Encoding<TData> {
|
|
4804
4877
|
x: EncodingChannel<TData>;
|
|
4805
4878
|
y: EncodingChannel<TData>;
|
|
4879
|
+
/**
|
|
4880
|
+
* Playback field. Each distinct value is one period, and the chart animates
|
|
4881
|
+
* through them with the shared `playback` controls. Temporal and
|
|
4882
|
+
* quantitative periods sort by value; ordinal periods follow `sort` or
|
|
4883
|
+
* first-seen order.
|
|
4884
|
+
*/
|
|
4885
|
+
time?: EncodingChannel<TData>;
|
|
4806
4886
|
}
|
|
4807
4887
|
/**
|
|
4808
4888
|
* Encoding for area marks.
|
|
@@ -4821,6 +4901,13 @@ interface AreaEncoding<TData extends DataRow = DataRow> extends Encoding<TData>
|
|
|
4821
4901
|
interface PointEncoding<TData extends DataRow = DataRow> extends Encoding<TData> {
|
|
4822
4902
|
x: EncodingChannel<TData>;
|
|
4823
4903
|
y: EncodingChannel<TData>;
|
|
4904
|
+
/**
|
|
4905
|
+
* Playback field. Each distinct value is one period, and the chart animates
|
|
4906
|
+
* through them with the shared `playback` controls. Temporal and
|
|
4907
|
+
* quantitative periods sort by value; ordinal periods follow `sort` or
|
|
4908
|
+
* first-seen order.
|
|
4909
|
+
*/
|
|
4910
|
+
time?: EncodingChannel<TData>;
|
|
4824
4911
|
}
|
|
4825
4912
|
/**
|
|
4826
4913
|
* Encoding for circle marks (dot plots).
|
|
@@ -4830,6 +4917,13 @@ interface PointEncoding<TData extends DataRow = DataRow> extends Encoding<TData>
|
|
|
4830
4917
|
interface CircleEncoding<TData extends DataRow = DataRow> extends Encoding<TData> {
|
|
4831
4918
|
x: EncodingChannel<TData>;
|
|
4832
4919
|
y: EncodingChannel<TData>;
|
|
4920
|
+
/**
|
|
4921
|
+
* Playback field. Each distinct value is one period, and the chart animates
|
|
4922
|
+
* through them with the shared `playback` controls. Temporal and
|
|
4923
|
+
* quantitative periods sort by value; ordinal periods follow `sort` or
|
|
4924
|
+
* first-seen order.
|
|
4925
|
+
*/
|
|
4926
|
+
time?: EncodingChannel<TData>;
|
|
4833
4927
|
}
|
|
4834
4928
|
/**
|
|
4835
4929
|
* Encoding for lollipop marks.
|
|
@@ -5095,10 +5189,10 @@ interface BaseChartSpec<TData extends DataRow = DataRow> {
|
|
|
5095
5189
|
*/
|
|
5096
5190
|
overrides?: Partial<Record<Breakpoint, ChartSpecOverride>>;
|
|
5097
5191
|
/**
|
|
5098
|
-
*
|
|
5099
|
-
*
|
|
5100
|
-
*
|
|
5101
|
-
*
|
|
5192
|
+
* Motion. On by default: the entrance plays once the visualization scrolls
|
|
5193
|
+
* into view, and data updates animate. Set false to turn all motion off, or
|
|
5194
|
+
* pass an object to configure each phase. Static rendering and exports never
|
|
5195
|
+
* animate, and prefers-reduced-motion always wins.
|
|
5102
5196
|
*/
|
|
5103
5197
|
animation?: AnimationSpec;
|
|
5104
5198
|
/**
|
|
@@ -5153,6 +5247,12 @@ interface BaseChartSpec<TData extends DataRow = DataRow> {
|
|
|
5153
5247
|
* not zIndex.
|
|
5154
5248
|
*/
|
|
5155
5249
|
zIndex?: number;
|
|
5250
|
+
/**
|
|
5251
|
+
* Playback timing, controls and period label for a chart with
|
|
5252
|
+
* `encoding.time` (point, circle and bar marks). Ignored with a warning
|
|
5253
|
+
* when the chart has no time channel.
|
|
5254
|
+
*/
|
|
5255
|
+
playback?: PlaybackConfig;
|
|
5156
5256
|
}
|
|
5157
5257
|
/**
|
|
5158
5258
|
* Chart specification: the primary input for standard chart types.
|
|
@@ -5340,7 +5440,13 @@ interface TableSpec {
|
|
|
5340
5440
|
};
|
|
5341
5441
|
/** Whether the table adapts to container width. Defaults to true. */
|
|
5342
5442
|
responsive?: boolean;
|
|
5343
|
-
/**
|
|
5443
|
+
/**
|
|
5444
|
+
* Motion. On by default: the entrance plays once the visualization scrolls
|
|
5445
|
+
* into view, and data updates animate. Set false to turn all motion off, or
|
|
5446
|
+
* pass an object to configure each phase. Static rendering and exports never
|
|
5447
|
+
* animate, and prefers-reduced-motion always wins. Tables animate their
|
|
5448
|
+
* entrance only; updates re-render instantly.
|
|
5449
|
+
*/
|
|
5344
5450
|
animation?: AnimationSpec;
|
|
5345
5451
|
}
|
|
5346
5452
|
/** Graph node: must have an id, plus arbitrary data fields. */
|
|
@@ -5372,22 +5478,43 @@ interface NodeOverride {
|
|
|
5372
5478
|
/** Force label to always show regardless of zoom/priority. */
|
|
5373
5479
|
alwaysShowLabel?: boolean;
|
|
5374
5480
|
}
|
|
5481
|
+
/** One graph motion phase: a tween (duration + ease) or a spring. */
|
|
5482
|
+
interface GraphPhaseConfig {
|
|
5483
|
+
/** Duration in ms. */
|
|
5484
|
+
duration?: number;
|
|
5485
|
+
/** Easing preset. */
|
|
5486
|
+
ease?: AnimationEase;
|
|
5487
|
+
/** Spring mode. Cannot be combined with duration or ease in this phase. */
|
|
5488
|
+
spring?: SpringConfig;
|
|
5489
|
+
}
|
|
5490
|
+
/** Graph entrance phase: adds the reveal stagger toggle and the trigger. */
|
|
5491
|
+
interface GraphEnterPhaseConfig extends GraphPhaseConfig {
|
|
5492
|
+
/**
|
|
5493
|
+
* Stagger the reveal. Default: true. Graphs order their reveal by layout, so
|
|
5494
|
+
* only on/off applies.
|
|
5495
|
+
*
|
|
5496
|
+
* @deprecated The object form (`{ delay, order }`) is ignored: any value
|
|
5497
|
+
* other than `false` staggers. Use `true` or `false`.
|
|
5498
|
+
*/
|
|
5499
|
+
stagger?: boolean | AnimationStagger;
|
|
5500
|
+
/**
|
|
5501
|
+
* When the entrance starts. Default: 'visible'.
|
|
5502
|
+
* - `visible`: wait until the graph is on screen, then play.
|
|
5503
|
+
* - `mount`: play as soon as the graph mounts.
|
|
5504
|
+
*/
|
|
5505
|
+
trigger?: 'visible' | 'mount';
|
|
5506
|
+
}
|
|
5375
5507
|
/**
|
|
5376
|
-
* Per-phase and per-behavior motion config for a graph.
|
|
5377
|
-
*
|
|
5378
|
-
* DEFAULT-ON semantics (deliberately different from charts, which are opt-in):
|
|
5379
|
-
* omit `animation` → the resolver returns full defaults; `animation: false` →
|
|
5380
|
-
* no choreography (but `layout.warmup` still applies); a per-phase `false`
|
|
5381
|
-
* disables just that phase. Graphs are default-on because physics motion
|
|
5382
|
-
* already exists on load and choreography reduces the chaos.
|
|
5508
|
+
* Per-phase and per-behavior motion config for a graph. A per-phase `false`
|
|
5509
|
+
* disables just that phase.
|
|
5383
5510
|
*/
|
|
5384
5511
|
interface GraphAnimationConfig {
|
|
5385
|
-
/** Node/edge reveal on first render. Default `{ duration: 500, ease: 'smooth', stagger: true }`. */
|
|
5386
|
-
enter?:
|
|
5512
|
+
/** Node/edge reveal on first render. Default `{ duration: 500, ease: 'smooth', stagger: true, trigger: 'visible' }`. */
|
|
5513
|
+
enter?: GraphEnterPhaseConfig | boolean;
|
|
5387
5514
|
/** Data-update enter-fade for newly added marks. Default `{ duration: 300, ease: 'smooth' }`. */
|
|
5388
|
-
update?:
|
|
5515
|
+
update?: GraphPhaseConfig | boolean;
|
|
5389
5516
|
/** Ghost fade-out for removed marks. Default `{ duration: 300, ease: 'smooth' }`. */
|
|
5390
|
-
exit?:
|
|
5517
|
+
exit?: GraphPhaseConfig | boolean;
|
|
5391
5518
|
/** Camera flight easing. Default duration `'auto'` (derived from the zoom distance). */
|
|
5392
5519
|
camera?: {
|
|
5393
5520
|
duration?: number;
|
|
@@ -5401,7 +5528,7 @@ interface GraphAnimationConfig {
|
|
|
5401
5528
|
}
|
|
5402
5529
|
/**
|
|
5403
5530
|
* Graph motion spec.
|
|
5404
|
-
* - omitted → full defaults
|
|
5531
|
+
* - omitted or `true` → full defaults
|
|
5405
5532
|
* - `false` → no choreography (warmup still applies)
|
|
5406
5533
|
* - object → per-phase control
|
|
5407
5534
|
*
|
|
@@ -5476,8 +5603,11 @@ interface GraphSpec {
|
|
|
5476
5603
|
/** Theme configuration overrides. */
|
|
5477
5604
|
theme?: ThemeConfig;
|
|
5478
5605
|
/**
|
|
5479
|
-
* Motion
|
|
5480
|
-
*
|
|
5606
|
+
* Motion. On by default: the entrance plays once the visualization scrolls
|
|
5607
|
+
* into view, and data updates animate. Set false to turn all motion off, or
|
|
5608
|
+
* pass an object to configure each phase. Static rendering and exports never
|
|
5609
|
+
* animate, and prefers-reduced-motion always wins. Layout warmup still runs
|
|
5610
|
+
* when false.
|
|
5481
5611
|
*/
|
|
5482
5612
|
animation?: GraphAnimationSpec;
|
|
5483
5613
|
/** Interaction behavior (hover mode, select-fly, opt-in physics). */
|
|
@@ -5626,7 +5756,12 @@ interface LayerSpec<TData extends DataRow = DataRow> {
|
|
|
5626
5756
|
hiddenSeries?: string[];
|
|
5627
5757
|
/** Endpoint labels column, inherited by child layers that don't set their own. */
|
|
5628
5758
|
endpointLabels?: boolean | EndpointLabelsConfig;
|
|
5629
|
-
/**
|
|
5759
|
+
/**
|
|
5760
|
+
* Motion. On by default: the entrance plays once the visualization scrolls
|
|
5761
|
+
* into view, and data updates animate. Set false to turn all motion off, or
|
|
5762
|
+
* pass an object to configure each phase. Static rendering and exports never
|
|
5763
|
+
* animate, and prefers-reduced-motion always wins.
|
|
5764
|
+
*/
|
|
5630
5765
|
animation?: AnimationSpec;
|
|
5631
5766
|
}
|
|
5632
5767
|
/** Node alignment strategy for sankey layout. */
|
|
@@ -5700,8 +5835,39 @@ interface SankeySpec {
|
|
|
5700
5835
|
theme?: ThemeConfig;
|
|
5701
5836
|
/** Whether to show the OpenData watermark. Defaults to true. */
|
|
5702
5837
|
watermark?: boolean;
|
|
5703
|
-
/**
|
|
5838
|
+
/**
|
|
5839
|
+
* Motion. On by default: the entrance plays once the visualization scrolls
|
|
5840
|
+
* into view, and data updates animate. Set false to turn all motion off, or
|
|
5841
|
+
* pass an object to configure each phase. Static rendering and exports never
|
|
5842
|
+
* animate, and prefers-reduced-motion always wins.
|
|
5843
|
+
*/
|
|
5704
5844
|
animation?: AnimationSpec;
|
|
5845
|
+
/**
|
|
5846
|
+
* Breakpoint-specific settings: `compact` applies under 400px, `medium` from
|
|
5847
|
+
* 400 to 700px. The active block merges over the top-level spec; `chrome`
|
|
5848
|
+
* merges one level deep, every other field replaces its top-level value.
|
|
5849
|
+
* Typical use: fold small flows into "Other" only on phones.
|
|
5850
|
+
*/
|
|
5851
|
+
overrides?: Partial<Record<'compact' | 'medium', SankeySpecOverride>>;
|
|
5852
|
+
}
|
|
5853
|
+
/**
|
|
5854
|
+
* Settings a sankey can change per breakpoint through `SankeySpec.overrides`.
|
|
5855
|
+
* Each field means what it means on `SankeySpec`.
|
|
5856
|
+
*/
|
|
5857
|
+
interface SankeySpecOverride {
|
|
5858
|
+
/** Editorial chrome at this breakpoint, merged over the top-level chrome. */
|
|
5859
|
+
chrome?: Chrome;
|
|
5860
|
+
/** "Other" bucketing at this breakpoint (see `SankeySpec.other`). */
|
|
5861
|
+
other?: number | {
|
|
5862
|
+
threshold: number;
|
|
5863
|
+
label?: string;
|
|
5864
|
+
};
|
|
5865
|
+
/** Node order at this breakpoint (see `SankeySpec.nodeSort`). */
|
|
5866
|
+
nodeSort?: string[];
|
|
5867
|
+
/** Label side at this breakpoint (see `SankeySpec.nodeLabelAlign`). */
|
|
5868
|
+
nodeLabelAlign?: 'auto' | 'left' | 'right';
|
|
5869
|
+
/** Vertical gap between nodes at this breakpoint, in pixels. */
|
|
5870
|
+
nodePadding?: number;
|
|
5705
5871
|
}
|
|
5706
5872
|
/** Encoding channels specific to tile map visualizations. */
|
|
5707
5873
|
interface TileMapEncoding {
|
|
@@ -5717,6 +5883,8 @@ interface TileMapEncoding {
|
|
|
5717
5883
|
color?: EncodingChannel;
|
|
5718
5884
|
/** Tooltip encoding (optional). */
|
|
5719
5885
|
tooltip?: EncodingChannel | EncodingChannel[];
|
|
5886
|
+
/** Playback field (optional). Each distinct value is one period; tiles recolor as the map plays. */
|
|
5887
|
+
time?: EncodingChannel;
|
|
5720
5888
|
}
|
|
5721
5889
|
/** Sequential color palette names available for tile maps. */
|
|
5722
5890
|
type TileMapPalette = 'blue' | 'green' | 'orange' | 'purple' | 'teal';
|
|
@@ -5752,13 +5920,20 @@ interface TileMapSpec {
|
|
|
5752
5920
|
theme?: ThemeConfig;
|
|
5753
5921
|
/** Whether to show the OpenData watermark. Defaults to true. */
|
|
5754
5922
|
watermark?: boolean;
|
|
5755
|
-
/**
|
|
5923
|
+
/**
|
|
5924
|
+
* Motion. On by default: the entrance plays once the visualization scrolls
|
|
5925
|
+
* into view, and data updates animate. Set false to turn all motion off, or
|
|
5926
|
+
* pass an object to configure each phase. Static rendering and exports never
|
|
5927
|
+
* animate, and prefers-reduced-motion always wins.
|
|
5928
|
+
*/
|
|
5756
5929
|
animation?: AnimationSpec;
|
|
5757
5930
|
/**
|
|
5758
5931
|
* d3-format string applied to tile values, legend labels, and tooltips.
|
|
5759
5932
|
* Examples: ".1f" for one decimal, "$,.0f" for currency, "~s" for SI.
|
|
5760
5933
|
*/
|
|
5761
5934
|
valueFormat?: string;
|
|
5935
|
+
/** Playback timing, controls and period label. Applies when `encoding.time` is set. */
|
|
5936
|
+
playback?: PlaybackConfig;
|
|
5762
5937
|
}
|
|
5763
5938
|
/** Supported map projections. */
|
|
5764
5939
|
type GeoMapProjection = 'albersUsa' | 'mercator' | 'equalEarth' | 'identity';
|
|
@@ -5874,6 +6049,8 @@ interface GeoMapEncoding {
|
|
|
5874
6049
|
textPriority?: EncodingChannel;
|
|
5875
6050
|
/** Tooltip encoding (optional). */
|
|
5876
6051
|
tooltip?: EncodingChannel | EncodingChannel[];
|
|
6052
|
+
/** Playback field (optional). Each distinct value is one period; features recolor as the map plays. */
|
|
6053
|
+
time?: EncodingChannel;
|
|
5877
6054
|
}
|
|
5878
6055
|
/** Point/symbol layer rendered above choropleth features. */
|
|
5879
6056
|
interface GeoMapPointsLayer {
|
|
@@ -5898,6 +6075,8 @@ interface GeoMapPointsLayer {
|
|
|
5898
6075
|
key?: EncodingChannel;
|
|
5899
6076
|
/** Fill opacity for point circles. Default 0.65. Range 0-1. */
|
|
5900
6077
|
opacity?: number;
|
|
6078
|
+
/** Playback field (optional). Point size and color follow each period; requires `key`. */
|
|
6079
|
+
time?: EncodingChannel;
|
|
5901
6080
|
}
|
|
5902
6081
|
interface GeoMapSpec {
|
|
5903
6082
|
/** Optional authored measure, unit, provenance, and supplied interval metadata. */
|
|
@@ -5927,8 +6106,15 @@ interface GeoMapSpec {
|
|
|
5927
6106
|
points?: GeoMapPointsLayer;
|
|
5928
6107
|
/** Authored labels with explicit feature, point, or coordinate anchors. */
|
|
5929
6108
|
callouts?: GeoCallout[];
|
|
5930
|
-
/**
|
|
6109
|
+
/**
|
|
6110
|
+
* Motion. On by default: the entrance plays once the visualization scrolls
|
|
6111
|
+
* into view, and data updates animate. Set false to turn all motion off, or
|
|
6112
|
+
* pass an object to configure each phase. Static rendering and exports never
|
|
6113
|
+
* animate, and prefers-reduced-motion always wins.
|
|
6114
|
+
*/
|
|
5931
6115
|
animation?: AnimationSpec;
|
|
6116
|
+
/** Playback timing, controls and period label. Applies when `encoding.time` or `points.time` is set. */
|
|
6117
|
+
playback?: PlaybackConfig;
|
|
5932
6118
|
}
|
|
5933
6119
|
interface BarListSpec {
|
|
5934
6120
|
/** Discriminant: always "barlist". */
|
|
@@ -5965,7 +6151,12 @@ interface BarListSpec {
|
|
|
5965
6151
|
theme?: ThemeConfig;
|
|
5966
6152
|
/** Whether to show the OpenData watermark. Defaults to true. */
|
|
5967
6153
|
watermark?: boolean;
|
|
5968
|
-
/**
|
|
6154
|
+
/**
|
|
6155
|
+
* Motion. On by default: the entrance plays once the visualization scrolls
|
|
6156
|
+
* into view, and data updates animate. Set false to turn all motion off, or
|
|
6157
|
+
* pass an object to configure each phase. Static rendering and exports never
|
|
6158
|
+
* animate, and prefers-reduced-motion always wins.
|
|
6159
|
+
*/
|
|
5969
6160
|
animation?: AnimationSpec;
|
|
5970
6161
|
}
|
|
5971
6162
|
/** Encoding channels for a barlist visualization. */
|
|
@@ -5985,6 +6176,147 @@ interface BarListEncoding {
|
|
|
5985
6176
|
/** Tooltip encoding (optional). */
|
|
5986
6177
|
tooltip?: EncodingChannel | EncodingChannel[];
|
|
5987
6178
|
}
|
|
6179
|
+
/** Placement of the large faint period label behind a playback chart. */
|
|
6180
|
+
type PlaybackPeriodPosition = 'auto' | 'center' | 'top-right' | 'bottom-left';
|
|
6181
|
+
/**
|
|
6182
|
+
* Playback options for charts and maps with a `time` channel. Fields shared
|
|
6183
|
+
* with the race's `race` block have the same names, types and defaults.
|
|
6184
|
+
*/
|
|
6185
|
+
interface PlaybackConfig {
|
|
6186
|
+
/** Total playback duration in milliseconds at 1× speed. Defaults to 700ms per period, clamped to 8000–90000ms. Mutually exclusive with `step`. */
|
|
6187
|
+
duration?: number;
|
|
6188
|
+
/** Duration per period in milliseconds. Omitted by default and mutually exclusive with `duration`. */
|
|
6189
|
+
step?: number;
|
|
6190
|
+
/** Interior gap policy. Defaults to `interpolate`. Use `hold` to carry the previous value or `drop` to leave the value absent. */
|
|
6191
|
+
gaps?: 'interpolate' | 'hold' | 'drop';
|
|
6192
|
+
/** Time to dwell on the final frame in milliseconds. Defaults to 1500. */
|
|
6193
|
+
holdEnd?: number;
|
|
6194
|
+
/** Restart after the final hold. Defaults to false. */
|
|
6195
|
+
loop?: boolean;
|
|
6196
|
+
/** Start when 25% visible (`visible`, the default), immediately (`true`), or on demand (`false`). Reduced motion disables autoplay. */
|
|
6197
|
+
autoplay?: 'visible' | boolean;
|
|
6198
|
+
/** Show play/pause, scrubber, and period readout. Defaults to true. */
|
|
6199
|
+
controls?: boolean;
|
|
6200
|
+
/** Large period label. On by default with automatic placement and the time channel's format. Set false to hide it. */
|
|
6201
|
+
period?: false | {
|
|
6202
|
+
/** Overrides the time channel's format. */
|
|
6203
|
+
format?: string;
|
|
6204
|
+
/** Where the label sits. Defaults to `auto`: centered for point charts, upper right for bars, and the corner that covers the least geography on maps. */
|
|
6205
|
+
position?: PlaybackPeriodPosition;
|
|
6206
|
+
};
|
|
6207
|
+
/** Point marks only: keys whose name is drawn next to the mark for the whole run. */
|
|
6208
|
+
labels?: string[];
|
|
6209
|
+
/** Point marks only: draw past positions as a trail. `true` is every key; an array names keys. Defaults to false. */
|
|
6210
|
+
trails?: boolean | string[];
|
|
6211
|
+
}
|
|
6212
|
+
/** The playback timing fields a race accepts in its top-level `playback` block. */
|
|
6213
|
+
type PlaybackTimingConfig = Pick<PlaybackConfig, 'duration' | 'step' | 'gaps' | 'holdEnd' | 'loop' | 'autoplay' | 'controls' | 'period'>;
|
|
6214
|
+
/** Mark used to draw each frame of a race. */
|
|
6215
|
+
type RaceMarkType = 'bar' | 'line' | 'table';
|
|
6216
|
+
interface RaceBarMarkDef {
|
|
6217
|
+
/** Draw horizontal bars. */
|
|
6218
|
+
type: 'bar';
|
|
6219
|
+
/** Bar corner radius in pixels. Omit to use square corners. */
|
|
6220
|
+
cornerRadius?: number;
|
|
6221
|
+
}
|
|
6222
|
+
interface RaceLineMarkDef {
|
|
6223
|
+
/** Draw a line for each ranked series. */
|
|
6224
|
+
type: 'line';
|
|
6225
|
+
/** Defaults to `reveal`, which expands the x domain to the playhead. `all` shows the full span. */
|
|
6226
|
+
window?: 'reveal' | 'all';
|
|
6227
|
+
}
|
|
6228
|
+
interface RaceTableMarkDef {
|
|
6229
|
+
/** Draw a table of ranked rows. */
|
|
6230
|
+
type: 'table';
|
|
6231
|
+
/** Ordered columns. Defaults to all six in the listed order, with `bar` hidden below 520px. */
|
|
6232
|
+
columns?: RaceTableColumn[];
|
|
6233
|
+
}
|
|
6234
|
+
/** Column in a race table. */
|
|
6235
|
+
type RaceTableColumn = 'rank' | 'change' | 'name' | 'bar' | 'value' | 'share';
|
|
6236
|
+
/** Race mark and its mark-specific options. */
|
|
6237
|
+
type RaceMarkDef = RaceBarMarkDef | RaceLineMarkDef | RaceTableMarkDef;
|
|
6238
|
+
type RaceFieldEncoding<TType extends FieldType = FieldType> = Omit<EncodingChannel, 'type'> & {
|
|
6239
|
+
/** How to interpret the field values. */
|
|
6240
|
+
type?: TType;
|
|
6241
|
+
};
|
|
6242
|
+
/** Field mappings shared by bar, line, and table races. */
|
|
6243
|
+
interface RaceEncoding {
|
|
6244
|
+
/** Playback field. Temporal dates or years and quantitative values sort by value. Ordinal values use a `sort` array, first-seen order, or the reverse of first-seen order with `sort: "descending"`. */
|
|
6245
|
+
time: RaceFieldEncoding<'temporal' | 'ordinal' | 'quantitative'>;
|
|
6246
|
+
/** Stable identity across periods. Also the display name by default. */
|
|
6247
|
+
key: RaceFieldEncoding;
|
|
6248
|
+
/** Numeric field to rank and draw. Defaults to quantitative. */
|
|
6249
|
+
value: RaceFieldEncoding<'quantitative'>;
|
|
6250
|
+
/** Field or constant CSS color. Defaults to coloring by key in order of first appearance in the top N. */
|
|
6251
|
+
color?: RaceFieldEncoding | {
|
|
6252
|
+
value: string;
|
|
6253
|
+
};
|
|
6254
|
+
/** Nominal display label. The last non-null label wins per key. Defaults to the key. */
|
|
6255
|
+
label?: RaceFieldEncoding<'nominal'>;
|
|
6256
|
+
}
|
|
6257
|
+
/** Ranking and playback options for a race. */
|
|
6258
|
+
interface RaceConfig {
|
|
6259
|
+
/** Number of visible slots. Defaults to 10. */
|
|
6260
|
+
top?: number;
|
|
6261
|
+
/** Total playback duration in milliseconds at 1× speed. Defaults to 700ms per period, clamped to 8000–90000ms. Mutually exclusive with `step`. */
|
|
6262
|
+
duration?: number;
|
|
6263
|
+
/** Duration per period in milliseconds. Omitted by default and mutually exclusive with `duration`. */
|
|
6264
|
+
step?: number;
|
|
6265
|
+
/** Reorder duration in milliseconds. Defaults to 400. */
|
|
6266
|
+
swap?: number;
|
|
6267
|
+
/** 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. */
|
|
6268
|
+
rescale?: 'frame' | 'fixed' | {
|
|
6269
|
+
min: number;
|
|
6270
|
+
};
|
|
6271
|
+
/** Interior gap policy. Defaults to `interpolate`. Use `hold` to carry the previous value or `drop` to leave the value absent. */
|
|
6272
|
+
gaps?: 'interpolate' | 'hold' | 'drop';
|
|
6273
|
+
/** Time to dwell on the final frame in milliseconds. Defaults to 1500. */
|
|
6274
|
+
holdEnd?: number;
|
|
6275
|
+
/** Restart after the final hold. Defaults to false. */
|
|
6276
|
+
loop?: boolean;
|
|
6277
|
+
/** Start when 25% visible (`visible`, the default), immediately (`true`), or on demand (`false`). Reduced motion disables autoplay. */
|
|
6278
|
+
autoplay?: 'visible' | boolean;
|
|
6279
|
+
/** Show play/pause, scrubber, and period readout. Defaults to true. */
|
|
6280
|
+
controls?: boolean;
|
|
6281
|
+
/** Large period label. On by default with automatic placement and the time channel's format. Set false to hide it. */
|
|
6282
|
+
period?: false | {
|
|
6283
|
+
/** Overrides the time channel's format. */
|
|
6284
|
+
format?: string;
|
|
6285
|
+
};
|
|
6286
|
+
/** Show the sum of the top N values. Defaults to false. */
|
|
6287
|
+
summary?: 'sum' | false;
|
|
6288
|
+
}
|
|
6289
|
+
/** Animated top-N leaderboard over a sequence of periods. */
|
|
6290
|
+
interface RaceSpec {
|
|
6291
|
+
/** Discriminant, always `race`. */
|
|
6292
|
+
type: 'race';
|
|
6293
|
+
/** One data row per key and period. */
|
|
6294
|
+
data: DataRow[];
|
|
6295
|
+
/** Required bar, line, or table mark. A string uses that mark's default options. */
|
|
6296
|
+
mark: RaceMarkType | RaceMarkDef;
|
|
6297
|
+
/** Maps fields to time, key, value, and optional color and label. */
|
|
6298
|
+
encoding: RaceEncoding;
|
|
6299
|
+
/** Ranking and playback options. Omit to use the race defaults. */
|
|
6300
|
+
race?: RaceConfig;
|
|
6301
|
+
/** Playback timing in the shared form. Setting a field here and in `race` is an error. */
|
|
6302
|
+
playback?: PlaybackTimingConfig;
|
|
6303
|
+
/** Editorial chrome. Omit to draw without authored title, subtitle, or other chrome text. */
|
|
6304
|
+
chrome?: Chrome;
|
|
6305
|
+
/** Theme overrides. Omit to use the default theme. */
|
|
6306
|
+
theme?: ThemeConfig;
|
|
6307
|
+
/** Accessibility overrides. Omit to use generated metadata. */
|
|
6308
|
+
a11y?: A11yConfig;
|
|
6309
|
+
/** Whether to show the OpenData watermark. Defaults to true. */
|
|
6310
|
+
watermark?: boolean;
|
|
6311
|
+
/** Fixed render width in pixels. Defaults to container-driven sizing. */
|
|
6312
|
+
width?: number;
|
|
6313
|
+
/** Fixed render height in pixels. Defaults to container-driven sizing. */
|
|
6314
|
+
height?: number;
|
|
6315
|
+
/** Value label format override. Omit to use the value channel's format or automatic formatting. */
|
|
6316
|
+
labels?: Pick<LabelConfig, 'format'>;
|
|
6317
|
+
/** Set false to disable autoplay and open on the final frame. Playback otherwise follows `race`. */
|
|
6318
|
+
animation?: AnimationSpec;
|
|
6319
|
+
}
|
|
5988
6320
|
/**
|
|
5989
6321
|
* Top-level visualization spec: union discriminated by structural shape.
|
|
5990
6322
|
*
|
|
@@ -5996,6 +6328,7 @@ interface BarListEncoding {
|
|
|
5996
6328
|
* - TileMapSpec: has `type: 'tilemap'`
|
|
5997
6329
|
* - GeoMapSpec: has `type: 'map'`
|
|
5998
6330
|
* - BarListSpec: has `type: 'barlist'`
|
|
6331
|
+
* - RaceSpec: has `type: 'race'`
|
|
5999
6332
|
*
|
|
6000
6333
|
* Election parliament (hemicycle) charts are `ChartSpec` with `mark:
|
|
6001
6334
|
* 'parliament'`, not a separate top-level type: seat data (party + seats)
|
|
@@ -6004,7 +6337,7 @@ interface BarListEncoding {
|
|
|
6004
6337
|
* for free instead of a second bespoke compile path (see
|
|
6005
6338
|
* `packages/engine/src/charts/parliament/`).
|
|
6006
6339
|
*/
|
|
6007
|
-
type VizSpec = ChartSpec | LayerSpec | TableSpec | GraphSpec | SankeySpec | TileMapSpec | GeoMapSpec | BarListSpec;
|
|
6340
|
+
type VizSpec = ChartSpec | LayerSpec | TableSpec | GraphSpec | SankeySpec | TileMapSpec | GeoMapSpec | BarListSpec | RaceSpec;
|
|
6008
6341
|
/**
|
|
6009
6342
|
* Chart spec without runtime data, for persistence/storage.
|
|
6010
6343
|
* Generic: `ChartSpecWithoutData<MyRow>` constrains encoding field names.
|
|
@@ -6024,8 +6357,10 @@ type GeoMapSpecWithoutData = Omit<GeoMapSpec, 'data' | 'points'> & {
|
|
|
6024
6357
|
};
|
|
6025
6358
|
/** BarList spec without runtime data, for persistence/storage. */
|
|
6026
6359
|
type BarListSpecWithoutData = Omit<BarListSpec, 'data'>;
|
|
6360
|
+
/** Race spec without runtime data, for persistence/storage. */
|
|
6361
|
+
type RaceSpecWithoutData = Omit<RaceSpec, 'data'>;
|
|
6027
6362
|
/** Union of data-stripped spec types for persistence/storage. */
|
|
6028
|
-
type StoredVizSpec = ChartSpecWithoutData | TableSpecWithoutData | GraphSpecWithoutData | SankeySpecWithoutData | TileMapSpecWithoutData | GeoMapSpecWithoutData | BarListSpecWithoutData;
|
|
6363
|
+
type StoredVizSpec = ChartSpecWithoutData | TableSpecWithoutData | GraphSpecWithoutData | SankeySpecWithoutData | TileMapSpecWithoutData | GeoMapSpecWithoutData | BarListSpecWithoutData | RaceSpecWithoutData;
|
|
6029
6364
|
/** Logical AND combinator for filter predicates. */
|
|
6030
6365
|
interface LogicalAnd<T> {
|
|
6031
6366
|
and: T[];
|
|
@@ -6290,7 +6625,7 @@ declare function resolveMarkType(mark: MarkType | MarkDef): MarkType;
|
|
|
6290
6625
|
* Extract the full MarkDef from a mark field, filling in defaults for string shorthand.
|
|
6291
6626
|
*/
|
|
6292
6627
|
declare function resolveMarkDef(mark: MarkType | MarkDef): MarkDef;
|
|
6293
|
-
/** Check if a spec
|
|
6628
|
+
/** Check if a spec has a chart mark and is neither a layer nor a race. */
|
|
6294
6629
|
declare function isChartSpec(spec: VizSpec | Record<string, unknown>): spec is ChartSpec;
|
|
6295
6630
|
/** Check if a spec is a LayerSpec (has `layer` array). */
|
|
6296
6631
|
declare function isLayerSpec(spec: VizSpec | Record<string, unknown>): spec is LayerSpec;
|
|
@@ -6304,6 +6639,8 @@ declare function isSankeySpec(spec: VizSpec | Record<string, unknown>): spec is
|
|
|
6304
6639
|
declare function isTileMapSpec(spec: VizSpec | Record<string, unknown>): spec is TileMapSpec;
|
|
6305
6640
|
/** Check if a spec is a BarListSpec. */
|
|
6306
6641
|
declare function isBarListSpec(spec: VizSpec | Record<string, unknown>): spec is BarListSpec;
|
|
6642
|
+
/** Check if a spec is a RaceSpec. */
|
|
6643
|
+
declare function isRaceSpec(spec: unknown): spec is RaceSpec;
|
|
6307
6644
|
/** Check if a spec is a GeoMapSpec. */
|
|
6308
6645
|
declare function isGeoMapSpec(spec: VizSpec | Record<string, unknown>): spec is GeoMapSpec;
|
|
6309
6646
|
/** Check if an annotation is a TextAnnotation. */
|
|
@@ -6510,6 +6847,8 @@ interface EncodingRule {
|
|
|
6510
6847
|
theta?: ChannelRule;
|
|
6511
6848
|
detail: ChannelRule;
|
|
6512
6849
|
description?: ChannelRule;
|
|
6850
|
+
/** Playback period channel. Declared only on marks that support playback. */
|
|
6851
|
+
time?: ChannelRule;
|
|
6513
6852
|
}
|
|
6514
6853
|
/**
|
|
6515
6854
|
* Encoding rules per mark type.
|
|
@@ -6573,6 +6912,290 @@ interface GeoReaderSelection {
|
|
|
6573
6912
|
announcement: string;
|
|
6574
6913
|
}
|
|
6575
6914
|
|
|
6915
|
+
interface RaceItem {
|
|
6916
|
+
key: string;
|
|
6917
|
+
label: string;
|
|
6918
|
+
color: string;
|
|
6919
|
+
value: number;
|
|
6920
|
+
valueLabel: string;
|
|
6921
|
+
rank: number;
|
|
6922
|
+
rankPos: number;
|
|
6923
|
+
opacity: number;
|
|
6924
|
+
change: number;
|
|
6925
|
+
}
|
|
6926
|
+
interface RaceFrame {
|
|
6927
|
+
t: number;
|
|
6928
|
+
period: {
|
|
6929
|
+
index: number;
|
|
6930
|
+
value: string | number;
|
|
6931
|
+
label: string;
|
|
6932
|
+
};
|
|
6933
|
+
items: RaceItem[];
|
|
6934
|
+
domain: [number, number];
|
|
6935
|
+
summary?: {
|
|
6936
|
+
value: number;
|
|
6937
|
+
label: string;
|
|
6938
|
+
};
|
|
6939
|
+
}
|
|
6940
|
+
interface RaceTick {
|
|
6941
|
+
value: number;
|
|
6942
|
+
label: string;
|
|
6943
|
+
opacity: number;
|
|
6944
|
+
position: number;
|
|
6945
|
+
/** Label position when it is offset from the tick or grid line. */
|
|
6946
|
+
labelPosition?: number;
|
|
6947
|
+
/** Additional paint opacity for labels that approach a neighbor. */
|
|
6948
|
+
labelOpacity?: number;
|
|
6949
|
+
}
|
|
6950
|
+
interface RacePlayback {
|
|
6951
|
+
durationMs: number;
|
|
6952
|
+
holdEndMs: number;
|
|
6953
|
+
loop: boolean;
|
|
6954
|
+
autoplay: 'visible' | boolean;
|
|
6955
|
+
controls: boolean;
|
|
6956
|
+
}
|
|
6957
|
+
interface RaceBarStatic {
|
|
6958
|
+
plot: Rect;
|
|
6959
|
+
clip: Rect;
|
|
6960
|
+
nameX: number;
|
|
6961
|
+
rowHeight: number;
|
|
6962
|
+
barHeight: number;
|
|
6963
|
+
cornerRadius: number;
|
|
6964
|
+
top: number;
|
|
6965
|
+
axisY: number;
|
|
6966
|
+
tickFontSize: number;
|
|
6967
|
+
period: {
|
|
6968
|
+
x: number;
|
|
6969
|
+
y: number;
|
|
6970
|
+
fontSize: number;
|
|
6971
|
+
} | null;
|
|
6972
|
+
summary: {
|
|
6973
|
+
x: number;
|
|
6974
|
+
y: number;
|
|
6975
|
+
} | null;
|
|
6976
|
+
}
|
|
6977
|
+
interface RaceBarRow {
|
|
6978
|
+
key: string;
|
|
6979
|
+
color: string;
|
|
6980
|
+
opacity: number;
|
|
6981
|
+
bar: Rect;
|
|
6982
|
+
name: {
|
|
6983
|
+
x: number;
|
|
6984
|
+
y: number;
|
|
6985
|
+
text: string;
|
|
6986
|
+
};
|
|
6987
|
+
value: {
|
|
6988
|
+
x: number;
|
|
6989
|
+
y: number;
|
|
6990
|
+
text: string;
|
|
6991
|
+
anchor: 'start' | 'end';
|
|
6992
|
+
};
|
|
6993
|
+
}
|
|
6994
|
+
interface RaceBarGeometry {
|
|
6995
|
+
mark: 'bar';
|
|
6996
|
+
rows: RaceBarRow[];
|
|
6997
|
+
ticks: RaceTick[];
|
|
6998
|
+
period: {
|
|
6999
|
+
x: number;
|
|
7000
|
+
y: number;
|
|
7001
|
+
fontSize: number;
|
|
7002
|
+
text: string;
|
|
7003
|
+
} | null;
|
|
7004
|
+
summary: {
|
|
7005
|
+
x: number;
|
|
7006
|
+
y: number;
|
|
7007
|
+
text: string;
|
|
7008
|
+
} | null;
|
|
7009
|
+
}
|
|
7010
|
+
interface RaceLineStatic {
|
|
7011
|
+
/** Bounds of the line plot in pixels. */
|
|
7012
|
+
plot: Rect;
|
|
7013
|
+
/** Controls whether the x axis reveals periods as the playhead advances or shows all periods. */
|
|
7014
|
+
window: 'reveal' | 'all';
|
|
7015
|
+
/** Full period-index domain and its pixel range. Reveal mode narrows the domain per frame. */
|
|
7016
|
+
xScale: {
|
|
7017
|
+
/** First and last period indices. */
|
|
7018
|
+
domain: [number, number];
|
|
7019
|
+
/** Left and right x coordinates in pixels. */
|
|
7020
|
+
range: [number, number];
|
|
7021
|
+
};
|
|
7022
|
+
/** Horizontal position of the y axis in pixels. */
|
|
7023
|
+
yAxisX: number;
|
|
7024
|
+
/** Width reserved to the right of the plot for line-end labels, in pixels. */
|
|
7025
|
+
labelGutter: number;
|
|
7026
|
+
/** Whether end labels also display values. */
|
|
7027
|
+
showValues: boolean;
|
|
7028
|
+
/** Font size for axis tick labels in pixels. */
|
|
7029
|
+
tickFontSize: number;
|
|
7030
|
+
/** Visibility and value history for each key that can be drawn. */
|
|
7031
|
+
history: Array<{
|
|
7032
|
+
/** Index into the race matrix. */
|
|
7033
|
+
key: number;
|
|
7034
|
+
/** Contiguous intervals in which the series has a visible head. */
|
|
7035
|
+
runs: Array<{
|
|
7036
|
+
start: number;
|
|
7037
|
+
end: number;
|
|
7038
|
+
peakTime: number;
|
|
7039
|
+
peakOpacity: number;
|
|
7040
|
+
}>;
|
|
7041
|
+
/** Running value bounds at each whole period. */
|
|
7042
|
+
mins: number[];
|
|
7043
|
+
maxes: number[];
|
|
7044
|
+
}>;
|
|
7045
|
+
}
|
|
7046
|
+
interface RaceLineGeometry {
|
|
7047
|
+
/** Identifies line geometry in a race frame. */
|
|
7048
|
+
mark: 'line';
|
|
7049
|
+
/** Series drawn in the current frame. */
|
|
7050
|
+
series: Array<{
|
|
7051
|
+
/** Stable key for the series. */
|
|
7052
|
+
key: string;
|
|
7053
|
+
/** Display color for the line and its name. */
|
|
7054
|
+
color: string;
|
|
7055
|
+
/** Opacity of the series in this frame. */
|
|
7056
|
+
opacity: number;
|
|
7057
|
+
/** Observed points through the current period, plus the interpolated head. Null marks a gap. */
|
|
7058
|
+
points: Array<Point | null>;
|
|
7059
|
+
/** Positioned name and value at the line's head. */
|
|
7060
|
+
endLabel: {
|
|
7061
|
+
/** Horizontal label position in pixels. */
|
|
7062
|
+
x: number;
|
|
7063
|
+
/** Vertical label position in pixels. */
|
|
7064
|
+
y: number;
|
|
7065
|
+
/** Series name to display. */
|
|
7066
|
+
text: string;
|
|
7067
|
+
/** Formatted value at the line's head. */
|
|
7068
|
+
value: string;
|
|
7069
|
+
/** Paint opacity when a crossing crowds the label. Defaults to the series opacity. */
|
|
7070
|
+
opacity?: number;
|
|
7071
|
+
/** Line head to connect to the displaced label. */
|
|
7072
|
+
leader?: Point & {
|
|
7073
|
+
opacity: number;
|
|
7074
|
+
};
|
|
7075
|
+
};
|
|
7076
|
+
}>;
|
|
7077
|
+
/** Period ticks on the horizontal axis. */
|
|
7078
|
+
xTicks: RaceTick[];
|
|
7079
|
+
/** Value ticks on the vertical axis. */
|
|
7080
|
+
yTicks: RaceTick[];
|
|
7081
|
+
/** Y-axis value domain. It can expand as the playhead advances. */
|
|
7082
|
+
domain: [number, number];
|
|
7083
|
+
}
|
|
7084
|
+
/** Display data for a cell in a race table row. */
|
|
7085
|
+
type RaceTableCell = {
|
|
7086
|
+
/** Identifies the rank column. */
|
|
7087
|
+
column: 'rank';
|
|
7088
|
+
/** Displayed rank for the current period. */
|
|
7089
|
+
text: string;
|
|
7090
|
+
} | {
|
|
7091
|
+
/** Identifies the change column. */
|
|
7092
|
+
column: 'change';
|
|
7093
|
+
/** Rank movement since the previous period, or `new` for a key entering the ranking. */
|
|
7094
|
+
direction: 'up' | 'down' | 'same' | 'new';
|
|
7095
|
+
/** Display text for the rank change. */
|
|
7096
|
+
text: string;
|
|
7097
|
+
} | {
|
|
7098
|
+
/** Identifies the name column. */
|
|
7099
|
+
column: 'name';
|
|
7100
|
+
/** Series name to display. */
|
|
7101
|
+
text: string;
|
|
7102
|
+
/** Series color for the chip next to the name. */
|
|
7103
|
+
color: string;
|
|
7104
|
+
} | {
|
|
7105
|
+
/** Identifies the inline bar column. */
|
|
7106
|
+
column: 'bar';
|
|
7107
|
+
/** Left edge of the inline bar in pixels. */
|
|
7108
|
+
x: number;
|
|
7109
|
+
/** Width of the inline bar in pixels. */
|
|
7110
|
+
width: number;
|
|
7111
|
+
/** Fill color of the inline bar. */
|
|
7112
|
+
color: string;
|
|
7113
|
+
} | {
|
|
7114
|
+
/** Identifies the value or share column. */
|
|
7115
|
+
column: 'value' | 'share';
|
|
7116
|
+
/** Formatted value or percentage share, according to the column. */
|
|
7117
|
+
text: string;
|
|
7118
|
+
};
|
|
7119
|
+
interface RaceTableStatic {
|
|
7120
|
+
/** Height of the clipped table body in pixels. */
|
|
7121
|
+
bodyHeight: number;
|
|
7122
|
+
/** Height of each row slot in pixels. */
|
|
7123
|
+
rowHeight: number;
|
|
7124
|
+
/** Height of the header row in pixels. */
|
|
7125
|
+
headerHeight: number;
|
|
7126
|
+
/** Whether the change heading uses a compact glyph. */
|
|
7127
|
+
compactChange: boolean;
|
|
7128
|
+
/** Horizontal padding on each side of a table cell in pixels. */
|
|
7129
|
+
cellPadding: number;
|
|
7130
|
+
/** Font size for table text in pixels. */
|
|
7131
|
+
fontSize: number;
|
|
7132
|
+
/** Columns in display order. */
|
|
7133
|
+
columns: Array<{
|
|
7134
|
+
/** Column identifier shared by the header and row cells. */
|
|
7135
|
+
column: RaceTableColumn;
|
|
7136
|
+
/** Horizontal position of the column in pixels. */
|
|
7137
|
+
x: number;
|
|
7138
|
+
/** Width of the column in pixels. */
|
|
7139
|
+
width: number;
|
|
7140
|
+
}>;
|
|
7141
|
+
/** Header text by column. */
|
|
7142
|
+
labels: Record<RaceTableColumn, string>;
|
|
7143
|
+
}
|
|
7144
|
+
interface RaceTableGeometry {
|
|
7145
|
+
/** Identifies table geometry in a race frame. */
|
|
7146
|
+
mark: 'table';
|
|
7147
|
+
/** Rows in draw order. */
|
|
7148
|
+
rows: Array<{
|
|
7149
|
+
/** Stable key for the row's series. */
|
|
7150
|
+
key: string;
|
|
7151
|
+
/** Vertical row position in pixels. */
|
|
7152
|
+
y: number;
|
|
7153
|
+
/** Opacity of the row in this frame. */
|
|
7154
|
+
opacity: number;
|
|
7155
|
+
/** Zero-based displayed rank, when supplied by the race layout. */
|
|
7156
|
+
rank?: number;
|
|
7157
|
+
/** Whether the row is sliding through the bottom edge of the table. */
|
|
7158
|
+
atEdge?: boolean;
|
|
7159
|
+
/** Vertical adjustment to keep cell content inside the table body. */
|
|
7160
|
+
contentOffset: number;
|
|
7161
|
+
/** Cell data in the static column order. */
|
|
7162
|
+
cells: RaceTableCell[];
|
|
7163
|
+
}>;
|
|
7164
|
+
}
|
|
7165
|
+
type RaceGeometry = RaceBarGeometry | RaceLineGeometry | RaceTableGeometry;
|
|
7166
|
+
interface RaceLayoutBase {
|
|
7167
|
+
width: number;
|
|
7168
|
+
height: number;
|
|
7169
|
+
chrome: ResolvedChrome;
|
|
7170
|
+
theme: ResolvedTheme;
|
|
7171
|
+
a11y: A11yMetadata;
|
|
7172
|
+
watermark: boolean;
|
|
7173
|
+
periods: string[];
|
|
7174
|
+
/** Per-key colors resolved for the active theme. Used by `raceGeometryAt` for mark presentation. */
|
|
7175
|
+
colors: string[];
|
|
7176
|
+
/**
|
|
7177
|
+
* Per-key display labels for `raceGeometryAt`, possibly truncated to fit the gutter.
|
|
7178
|
+
* `raceFrameAt` uses the matrix's full labels for accessibility and export.
|
|
7179
|
+
*/
|
|
7180
|
+
labels: string[];
|
|
7181
|
+
/** Text measurer the layout was computed with; renderers reuse it so chrome wraps identically. */
|
|
7182
|
+
measureText?: MeasureTextFn;
|
|
7183
|
+
playback: RacePlayback;
|
|
7184
|
+
warnings?: CompileWarning[];
|
|
7185
|
+
/** Area below chrome where the mark draws. */
|
|
7186
|
+
area: Rect;
|
|
7187
|
+
}
|
|
7188
|
+
type RaceLayout = (RaceLayoutBase & {
|
|
7189
|
+
mark: 'bar';
|
|
7190
|
+
static: RaceBarStatic;
|
|
7191
|
+
}) | (RaceLayoutBase & {
|
|
7192
|
+
mark: 'line';
|
|
7193
|
+
static: RaceLineStatic;
|
|
7194
|
+
}) | (RaceLayoutBase & {
|
|
7195
|
+
mark: 'table';
|
|
7196
|
+
static: RaceTableStatic;
|
|
7197
|
+
});
|
|
7198
|
+
|
|
6576
7199
|
type ReaderDomainValue = {
|
|
6577
7200
|
kind: 'string';
|
|
6578
7201
|
value: string;
|
|
@@ -6929,6 +7552,16 @@ declare const wire: ThemeConfig;
|
|
|
6929
7552
|
* 5 #3a8a6e oklch(0.576 0.090 167) green
|
|
6930
7553
|
* 6 #8c8680 oklch(0.623 0.011 68) warm gray
|
|
6931
7554
|
* Fills are the same hues one step lighter (L +0.06, chroma -12%).
|
|
7555
|
+
*
|
|
7556
|
+
* Dark mode is the same page after nightfall: the newsprint gives way to an
|
|
7557
|
+
* ink-blue ground, with the same hues lifted to hold their contrast on it.
|
|
7558
|
+
* Palette (dark; checked with the Brettel simulator, nearest simulated pair
|
|
7559
|
+
* 31.6 under deuteranopia against a threshold of 30, every stroke at 5.8:1
|
|
7560
|
+
* or better and every fill at 5.3:1 or better on #12181f):
|
|
7561
|
+
* 1 #5e9fd6 ink blue, lifted 2 #f4655a house red, lifted
|
|
7562
|
+
* 3 #93c2e2 pale blue 4 #e0b267 ochre
|
|
7563
|
+
* 5 #4fb093 green 6 #9aa1a8 gray, cooled
|
|
7564
|
+
* Fills sit a step lighter and quieter than their strokes, as in light mode.
|
|
6932
7565
|
*/
|
|
6933
7566
|
declare const broadsheet: ThemeConfig;
|
|
6934
7567
|
/**
|
|
@@ -7235,7 +7868,7 @@ declare function maxRotatedLabelWidth(tickAngle: number, tickFontSize: number):
|
|
|
7235
7868
|
* Truncate a label with an ellipsis so it fits inside an explicit pixel budget.
|
|
7236
7869
|
* Returns the label unchanged when it already fits.
|
|
7237
7870
|
*
|
|
7238
|
-
* Binary-search on
|
|
7871
|
+
* Binary-search on Unicode code point count against the real measure function, so it
|
|
7239
7872
|
* respects proportional fonts rather than assuming a fixed character width.
|
|
7240
7873
|
*/
|
|
7241
7874
|
declare function truncateToWidth(label: string, budget: number, fontSize: number, fontWeight: number, measure?: (text: string, fontSize: number, fontWeight?: number) => number): string;
|
|
@@ -7665,6 +8298,239 @@ declare function annotationSource(spec: unknown): {
|
|
|
7665
8298
|
path: string;
|
|
7666
8299
|
};
|
|
7667
8300
|
|
|
8301
|
+
interface CurveStop {
|
|
8302
|
+
/** Input progress in [0, 1]. */
|
|
8303
|
+
t: number;
|
|
8304
|
+
/** Output value. May leave [0, 1] (overshoot) unless the curve is monotone. */
|
|
8305
|
+
value: number;
|
|
8306
|
+
}
|
|
8307
|
+
/** Evenly spaced values, or positioned stops with strictly increasing `t`. */
|
|
8308
|
+
type CurveInput = readonly number[] | readonly CurveStop[];
|
|
8309
|
+
declare const CURVE_INPUTS: {
|
|
8310
|
+
/** Decks snap: a fast attack for quick fades and short accents. */
|
|
8311
|
+
readonly snap: readonly CurveStop[];
|
|
8312
|
+
/** Soft ease-out with a gentle start. The sampled source of the default `smooth`. */
|
|
8313
|
+
readonly glide: readonly CurveStop[];
|
|
8314
|
+
/** The default ease: an alias of `glide`, so the default improves with no spec change. */
|
|
8315
|
+
readonly smooth: readonly CurveStop[];
|
|
8316
|
+
/** Today's old `smooth` (a gentle ease-out), kept under its own name. */
|
|
8317
|
+
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];
|
|
8318
|
+
/**
|
|
8319
|
+
* Monotone, non-overshooting ease-out, faster than `snap`. Sampled from
|
|
8320
|
+
* `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
|
|
8321
|
+
* ~0.78 at t=0.1 (snap: ~0.67), 0.951 at 0.2, reaches 0.999 by t~0.45 and
|
|
8322
|
+
* is exactly 1 from t=0.55, so it settles sooner than `snap` or `smooth`.
|
|
8323
|
+
*/
|
|
8324
|
+
readonly snappy: readonly [{
|
|
8325
|
+
readonly t: 0;
|
|
8326
|
+
readonly value: 0;
|
|
8327
|
+
}, {
|
|
8328
|
+
readonly t: 0.02;
|
|
8329
|
+
readonly value: 0.2926;
|
|
8330
|
+
}, {
|
|
8331
|
+
readonly t: 0.04;
|
|
8332
|
+
readonly value: 0.4806;
|
|
8333
|
+
}, {
|
|
8334
|
+
readonly t: 0.06;
|
|
8335
|
+
readonly value: 0.6111;
|
|
8336
|
+
}, {
|
|
8337
|
+
readonly t: 0.08;
|
|
8338
|
+
readonly value: 0.7061;
|
|
8339
|
+
}, {
|
|
8340
|
+
readonly t: 0.1;
|
|
8341
|
+
readonly value: 0.7772;
|
|
8342
|
+
}, {
|
|
8343
|
+
readonly t: 0.12;
|
|
8344
|
+
readonly value: 0.8315;
|
|
8345
|
+
}, {
|
|
8346
|
+
readonly t: 0.14;
|
|
8347
|
+
readonly value: 0.8735;
|
|
8348
|
+
}, {
|
|
8349
|
+
readonly t: 0.16;
|
|
8350
|
+
readonly value: 0.9061;
|
|
8351
|
+
}, {
|
|
8352
|
+
readonly t: 0.18;
|
|
8353
|
+
readonly value: 0.9314;
|
|
8354
|
+
}, {
|
|
8355
|
+
readonly t: 0.2;
|
|
8356
|
+
readonly value: 0.951;
|
|
8357
|
+
}, {
|
|
8358
|
+
readonly t: 0.22;
|
|
8359
|
+
readonly value: 0.966;
|
|
8360
|
+
}, {
|
|
8361
|
+
readonly t: 0.24;
|
|
8362
|
+
readonly value: 0.9773;
|
|
8363
|
+
}, {
|
|
8364
|
+
readonly t: 0.26;
|
|
8365
|
+
readonly value: 0.9855;
|
|
8366
|
+
}, {
|
|
8367
|
+
readonly t: 0.28;
|
|
8368
|
+
readonly value: 0.9913;
|
|
8369
|
+
}, {
|
|
8370
|
+
readonly t: 0.3;
|
|
8371
|
+
readonly value: 0.995;
|
|
8372
|
+
}, {
|
|
8373
|
+
readonly t: 0.35;
|
|
8374
|
+
readonly value: 0.9971;
|
|
8375
|
+
}, {
|
|
8376
|
+
readonly t: 0.4;
|
|
8377
|
+
readonly value: 0.9985;
|
|
8378
|
+
}, {
|
|
8379
|
+
readonly t: 0.45;
|
|
8380
|
+
readonly value: 0.9994;
|
|
8381
|
+
}, {
|
|
8382
|
+
readonly t: 0.5;
|
|
8383
|
+
readonly value: 0.9998;
|
|
8384
|
+
}, {
|
|
8385
|
+
readonly t: 0.55;
|
|
8386
|
+
readonly value: 1;
|
|
8387
|
+
}, {
|
|
8388
|
+
readonly t: 0.6;
|
|
8389
|
+
readonly value: 1;
|
|
8390
|
+
}, {
|
|
8391
|
+
readonly t: 0.8;
|
|
8392
|
+
readonly value: 1;
|
|
8393
|
+
}, {
|
|
8394
|
+
readonly t: 1;
|
|
8395
|
+
readonly value: 1;
|
|
8396
|
+
}];
|
|
8397
|
+
/**
|
|
8398
|
+
* Accent only (annotation markers and the like): Decks
|
|
8399
|
+
* `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
|
|
8400
|
+
* near t=0.35 and settles by ~0.8. NOT monotone, so it is never an authored
|
|
8401
|
+
* ease and never used for value-encoding geometry (use evalValueCurve there).
|
|
8402
|
+
*/
|
|
8403
|
+
readonly punch: readonly [{
|
|
8404
|
+
readonly t: 0;
|
|
8405
|
+
readonly value: 0;
|
|
8406
|
+
}, {
|
|
8407
|
+
readonly t: 0.025;
|
|
8408
|
+
readonly value: 0.1714;
|
|
8409
|
+
}, {
|
|
8410
|
+
readonly t: 0.05;
|
|
8411
|
+
readonly value: 0.3321;
|
|
8412
|
+
}, {
|
|
8413
|
+
readonly t: 0.075;
|
|
8414
|
+
readonly value: 0.4776;
|
|
8415
|
+
}, {
|
|
8416
|
+
readonly t: 0.1;
|
|
8417
|
+
readonly value: 0.605;
|
|
8418
|
+
}, {
|
|
8419
|
+
readonly t: 0.125;
|
|
8420
|
+
readonly value: 0.7132;
|
|
8421
|
+
}, {
|
|
8422
|
+
readonly t: 0.15;
|
|
8423
|
+
readonly value: 0.8029;
|
|
8424
|
+
}, {
|
|
8425
|
+
readonly t: 0.175;
|
|
8426
|
+
readonly value: 0.8757;
|
|
8427
|
+
}, {
|
|
8428
|
+
readonly t: 0.2;
|
|
8429
|
+
readonly value: 0.9336;
|
|
8430
|
+
}, {
|
|
8431
|
+
readonly t: 0.225;
|
|
8432
|
+
readonly value: 0.9787;
|
|
8433
|
+
}, {
|
|
8434
|
+
readonly t: 0.25;
|
|
8435
|
+
readonly value: 1.0127;
|
|
8436
|
+
}, {
|
|
8437
|
+
readonly t: 0.275;
|
|
8438
|
+
readonly value: 1.0373;
|
|
8439
|
+
}, {
|
|
8440
|
+
readonly t: 0.3;
|
|
8441
|
+
readonly value: 1.0539;
|
|
8442
|
+
}, {
|
|
8443
|
+
readonly t: 0.325;
|
|
8444
|
+
readonly value: 1.0636;
|
|
8445
|
+
}, {
|
|
8446
|
+
readonly t: 0.35;
|
|
8447
|
+
readonly value: 1.0673;
|
|
8448
|
+
}, {
|
|
8449
|
+
readonly t: 0.375;
|
|
8450
|
+
readonly value: 1.0659;
|
|
8451
|
+
}, {
|
|
8452
|
+
readonly t: 0.4;
|
|
8453
|
+
readonly value: 1.06;
|
|
8454
|
+
}, {
|
|
8455
|
+
readonly t: 0.425;
|
|
8456
|
+
readonly value: 1.0509;
|
|
8457
|
+
}, {
|
|
8458
|
+
readonly t: 0.45;
|
|
8459
|
+
readonly value: 1.0428;
|
|
8460
|
+
}, {
|
|
8461
|
+
readonly t: 0.475;
|
|
8462
|
+
readonly value: 1.0358;
|
|
8463
|
+
}, {
|
|
8464
|
+
readonly t: 0.5;
|
|
8465
|
+
readonly value: 1.0296;
|
|
8466
|
+
}, {
|
|
8467
|
+
readonly t: 0.55;
|
|
8468
|
+
readonly value: 1.0196;
|
|
8469
|
+
}, {
|
|
8470
|
+
readonly t: 0.6;
|
|
8471
|
+
readonly value: 1.0122;
|
|
8472
|
+
}, {
|
|
8473
|
+
readonly t: 0.65;
|
|
8474
|
+
readonly value: 1.0069;
|
|
8475
|
+
}, {
|
|
8476
|
+
readonly t: 0.7;
|
|
8477
|
+
readonly value: 1.0033;
|
|
8478
|
+
}, {
|
|
8479
|
+
readonly t: 0.75;
|
|
8480
|
+
readonly value: 1.0011;
|
|
8481
|
+
}, {
|
|
8482
|
+
readonly t: 0.8;
|
|
8483
|
+
readonly value: 0.9999;
|
|
8484
|
+
}, {
|
|
8485
|
+
readonly t: 0.85;
|
|
8486
|
+
readonly value: 0.9995;
|
|
8487
|
+
}, {
|
|
8488
|
+
readonly t: 0.9;
|
|
8489
|
+
readonly value: 0.9996;
|
|
8490
|
+
}, {
|
|
8491
|
+
readonly t: 0.95;
|
|
8492
|
+
readonly value: 0.9998;
|
|
8493
|
+
}, {
|
|
8494
|
+
readonly t: 1;
|
|
8495
|
+
readonly value: 1;
|
|
8496
|
+
}];
|
|
8497
|
+
};
|
|
8498
|
+
type CurveName = keyof typeof CURVE_INPUTS;
|
|
8499
|
+
/**
|
|
8500
|
+
* Curves `invertCurve` accepts. Kept as a type so a non-monotone curve is a
|
|
8501
|
+
* compile error; a test pins it to the runtime monotonicity check.
|
|
8502
|
+
*/
|
|
8503
|
+
type MonotoneCurveName = 'snap' | 'glide' | 'smooth' | 'snappy' | 'gentle';
|
|
8504
|
+
/** Names of every registered curve, in registry order. */
|
|
8505
|
+
declare const CURVE_NAMES: readonly CurveName[];
|
|
8506
|
+
/** The curve's stops, for consumers that need the raw data (tests, generators). */
|
|
8507
|
+
declare function curveStops(name: CurveName): readonly CurveStop[];
|
|
8508
|
+
/** Whether a curve is monotone from 0 to 1 (so it can be inverted). */
|
|
8509
|
+
declare function isMonotoneCurve(name: CurveName): boolean;
|
|
8510
|
+
/** Evaluate a curve at t (clamped to [0, 1]), piecewise-linearly like CSS linear(). */
|
|
8511
|
+
declare function evalCurve(name: CurveName, t: number): number;
|
|
8512
|
+
/**
|
|
8513
|
+
* Evaluate a curve for value-encoding geometry: the output is clamped to
|
|
8514
|
+
* [0, 1] and then replaced by its running maximum, so no curve can overshoot
|
|
8515
|
+
* or dip back. On a monotone curve this equals evalCurve.
|
|
8516
|
+
*/
|
|
8517
|
+
declare function evalValueCurve(name: CurveName, t: number): number;
|
|
8518
|
+
/**
|
|
8519
|
+
* The first t at which a monotone curve reaches progress p (clamped to [0, 1]).
|
|
8520
|
+
* Used to place delays at a progress point of a parent's tween.
|
|
8521
|
+
*/
|
|
8522
|
+
declare function invertCurve(name: MonotoneCurveName, p: number): number;
|
|
8523
|
+
/**
|
|
8524
|
+
* Emit a curve as a CSS `linear()` easing. Evenly spaced curves emit bare
|
|
8525
|
+
* values; positioned curves emit `value t%` pairs. With `indent`, each stop goes
|
|
8526
|
+
* on its own line (the tokens.css layout), indented two spaces past `indent`.
|
|
8527
|
+
*/
|
|
8528
|
+
declare function curveToCSSLinear(name: CurveName, options?: {
|
|
8529
|
+
indent?: string;
|
|
8530
|
+
}): string;
|
|
8531
|
+
/** Evaluate a CSS cubic-bezier(x1, y1, x2, y2) at time progress t. */
|
|
8532
|
+
declare function evalCubicBezier(bezier: readonly [number, number, number, number], t: number): number;
|
|
8533
|
+
|
|
7668
8534
|
/** Deterministic, bounded motion shared by rendering and timestamp-based export. */
|
|
7669
8535
|
|
|
7670
8536
|
interface MotionPhase {
|
|
@@ -7689,6 +8555,689 @@ declare function sampleMotion(phase: MotionPhase, elapsedMs: number): MotionSamp
|
|
|
7689
8555
|
/** CSS samples use the same clock and evaluator as SVG, canvas, and export. */
|
|
7690
8556
|
declare function motionCSS(phase: MotionPhase): string;
|
|
7691
8557
|
|
|
8558
|
+
/**
|
|
8559
|
+
* Choreography table: every entrance role, its keyframe, curve, durations and
|
|
8560
|
+
* delay rule, in one place.
|
|
8561
|
+
*
|
|
8562
|
+
* `scripts/generate-motion-css.mjs` emits `styles/keyframes.css`,
|
|
8563
|
+
* `styles/animation.css` and `styles/table-animation.css` from KEYFRAMES and
|
|
8564
|
+
* ENTRANCE_ROLES. GIF export, the canvas entrance and the cleanup timer read
|
|
8565
|
+
* the same data through `entranceTiming`, `entranceEndMs`, `evalRoleEase` and
|
|
8566
|
+
* `evalKeyframes`, so the CSS and the JS paths cannot drift.
|
|
8567
|
+
*
|
|
8568
|
+
* Delays keyed to a parent's tween are progress points ("when the parent
|
|
8569
|
+
* reaches p"), resolved through the parent's actual curve for the phase
|
|
8570
|
+
* (`invertRoleEase`), never a raw fraction of the duration. CSS can't invert a
|
|
8571
|
+
* curve, so renderers stamp the resolved offsets (`entranceAnchorVars`); the
|
|
8572
|
+
* generated CSS falls back to the default `smooth` resolution.
|
|
8573
|
+
*/
|
|
8574
|
+
|
|
8575
|
+
type KeyframeProperty = 'opacity' | 'clip-path' | 'transform' | 'fill' | 'r' | 'fill-opacity';
|
|
8576
|
+
type KeyframeValue = {
|
|
8577
|
+
type: 'number';
|
|
8578
|
+
value: number;
|
|
8579
|
+
}
|
|
8580
|
+
/** clip-path: inset(top right bottom left), each in percent. */
|
|
8581
|
+
| {
|
|
8582
|
+
type: 'inset';
|
|
8583
|
+
top: number;
|
|
8584
|
+
right: number;
|
|
8585
|
+
bottom: number;
|
|
8586
|
+
left: number;
|
|
8587
|
+
} | {
|
|
8588
|
+
type: 'translateY';
|
|
8589
|
+
value: number;
|
|
8590
|
+
unit: 'px' | 'em';
|
|
8591
|
+
} | {
|
|
8592
|
+
type: 'translate';
|
|
8593
|
+
x: number;
|
|
8594
|
+
y: number;
|
|
8595
|
+
} | {
|
|
8596
|
+
type: 'scale';
|
|
8597
|
+
value: number;
|
|
8598
|
+
}
|
|
8599
|
+
/** A value JS cannot interpolate (custom properties); switches discretely. */
|
|
8600
|
+
| {
|
|
8601
|
+
type: 'css';
|
|
8602
|
+
css: string;
|
|
8603
|
+
};
|
|
8604
|
+
interface KeyframeStop {
|
|
8605
|
+
/** Offset in [0, 1] (0 = from, 1 = to). */
|
|
8606
|
+
offset: number;
|
|
8607
|
+
values: Readonly<Partial<Record<KeyframeProperty, KeyframeValue>>>;
|
|
8608
|
+
}
|
|
8609
|
+
interface KeyframeDef {
|
|
8610
|
+
comment: string;
|
|
8611
|
+
stops: readonly KeyframeStop[];
|
|
8612
|
+
}
|
|
8613
|
+
/** Every @keyframes in styles/keyframes.css, in emission order. */
|
|
8614
|
+
declare const KEYFRAMES: {
|
|
8615
|
+
readonly 'oc-enter-bar': {
|
|
8616
|
+
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).";
|
|
8617
|
+
readonly stops: readonly [{
|
|
8618
|
+
readonly offset: 0;
|
|
8619
|
+
readonly values: {
|
|
8620
|
+
readonly 'clip-path': KeyframeValue;
|
|
8621
|
+
};
|
|
8622
|
+
}, {
|
|
8623
|
+
readonly offset: 1;
|
|
8624
|
+
readonly values: {
|
|
8625
|
+
readonly 'clip-path': KeyframeValue;
|
|
8626
|
+
};
|
|
8627
|
+
}];
|
|
8628
|
+
};
|
|
8629
|
+
readonly 'oc-enter-bar-h': {
|
|
8630
|
+
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).";
|
|
8631
|
+
readonly stops: readonly [{
|
|
8632
|
+
readonly offset: 0;
|
|
8633
|
+
readonly values: {
|
|
8634
|
+
readonly 'clip-path': KeyframeValue;
|
|
8635
|
+
};
|
|
8636
|
+
}, {
|
|
8637
|
+
readonly offset: 1;
|
|
8638
|
+
readonly values: {
|
|
8639
|
+
readonly 'clip-path': KeyframeValue;
|
|
8640
|
+
};
|
|
8641
|
+
}];
|
|
8642
|
+
};
|
|
8643
|
+
readonly 'oc-enter-stack': {
|
|
8644
|
+
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.";
|
|
8645
|
+
readonly stops: readonly [{
|
|
8646
|
+
readonly offset: 0;
|
|
8647
|
+
readonly values: {
|
|
8648
|
+
readonly 'clip-path': KeyframeValue;
|
|
8649
|
+
};
|
|
8650
|
+
}, {
|
|
8651
|
+
readonly offset: 1;
|
|
8652
|
+
readonly values: {
|
|
8653
|
+
readonly 'clip-path': KeyframeValue;
|
|
8654
|
+
};
|
|
8655
|
+
}];
|
|
8656
|
+
};
|
|
8657
|
+
readonly 'oc-enter-stack-h': {
|
|
8658
|
+
readonly comment: "Horizontal stack entrance: grows left-to-right, or both ways from the\nbaseline when --oc-stack-from is stamped.";
|
|
8659
|
+
readonly stops: readonly [{
|
|
8660
|
+
readonly offset: 0;
|
|
8661
|
+
readonly values: {
|
|
8662
|
+
readonly 'clip-path': KeyframeValue;
|
|
8663
|
+
};
|
|
8664
|
+
}, {
|
|
8665
|
+
readonly offset: 1;
|
|
8666
|
+
readonly values: {
|
|
8667
|
+
readonly 'clip-path': KeyframeValue;
|
|
8668
|
+
};
|
|
8669
|
+
}];
|
|
8670
|
+
};
|
|
8671
|
+
readonly 'oc-enter-line': {
|
|
8672
|
+
readonly comment: "Line/area entrance: clip-path reveal left-to-right + fade in.\nLines draw in following reading direction with a soft lead-in.";
|
|
8673
|
+
readonly stops: readonly [{
|
|
8674
|
+
readonly offset: 0;
|
|
8675
|
+
readonly values: {
|
|
8676
|
+
readonly 'clip-path': KeyframeValue;
|
|
8677
|
+
readonly opacity: KeyframeValue;
|
|
8678
|
+
};
|
|
8679
|
+
}, {
|
|
8680
|
+
readonly offset: 0.15;
|
|
8681
|
+
readonly values: {
|
|
8682
|
+
readonly opacity: KeyframeValue;
|
|
8683
|
+
};
|
|
8684
|
+
}, {
|
|
8685
|
+
readonly offset: 1;
|
|
8686
|
+
readonly values: {
|
|
8687
|
+
readonly 'clip-path': KeyframeValue;
|
|
8688
|
+
readonly opacity: KeyframeValue;
|
|
8689
|
+
};
|
|
8690
|
+
}];
|
|
8691
|
+
};
|
|
8692
|
+
readonly 'oc-enter-point': {
|
|
8693
|
+
readonly comment: "Point/arc entrance: scale up + fade in from center";
|
|
8694
|
+
readonly stops: readonly [{
|
|
8695
|
+
readonly offset: 0;
|
|
8696
|
+
readonly values: {
|
|
8697
|
+
readonly opacity: KeyframeValue;
|
|
8698
|
+
readonly transform: KeyframeValue;
|
|
8699
|
+
};
|
|
8700
|
+
}, {
|
|
8701
|
+
readonly offset: 1;
|
|
8702
|
+
readonly values: {
|
|
8703
|
+
readonly opacity: KeyframeValue;
|
|
8704
|
+
readonly transform: KeyframeValue;
|
|
8705
|
+
};
|
|
8706
|
+
}];
|
|
8707
|
+
};
|
|
8708
|
+
readonly 'oc-enter-map-fill': {
|
|
8709
|
+
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.";
|
|
8710
|
+
readonly stops: readonly [{
|
|
8711
|
+
readonly offset: 0;
|
|
8712
|
+
readonly values: {
|
|
8713
|
+
readonly fill: KeyframeValue;
|
|
8714
|
+
readonly opacity: KeyframeValue;
|
|
8715
|
+
};
|
|
8716
|
+
}, {
|
|
8717
|
+
readonly offset: 1;
|
|
8718
|
+
readonly values: {
|
|
8719
|
+
readonly fill: KeyframeValue;
|
|
8720
|
+
readonly opacity: KeyframeValue;
|
|
8721
|
+
};
|
|
8722
|
+
}];
|
|
8723
|
+
};
|
|
8724
|
+
readonly 'oc-enter-map-point': {
|
|
8725
|
+
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.";
|
|
8726
|
+
readonly stops: readonly [{
|
|
8727
|
+
readonly offset: 0;
|
|
8728
|
+
readonly values: {
|
|
8729
|
+
readonly opacity: KeyframeValue;
|
|
8730
|
+
readonly transform: KeyframeValue;
|
|
8731
|
+
};
|
|
8732
|
+
}, {
|
|
8733
|
+
readonly offset: 1;
|
|
8734
|
+
readonly values: {
|
|
8735
|
+
readonly opacity: KeyframeValue;
|
|
8736
|
+
readonly transform: KeyframeValue;
|
|
8737
|
+
};
|
|
8738
|
+
}];
|
|
8739
|
+
};
|
|
8740
|
+
readonly 'oc-enter-pop': {
|
|
8741
|
+
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).";
|
|
8742
|
+
readonly stops: readonly [{
|
|
8743
|
+
readonly offset: 0;
|
|
8744
|
+
readonly values: {
|
|
8745
|
+
readonly opacity: KeyframeValue;
|
|
8746
|
+
readonly transform: KeyframeValue;
|
|
8747
|
+
};
|
|
8748
|
+
}, {
|
|
8749
|
+
readonly offset: 1;
|
|
8750
|
+
readonly values: {
|
|
8751
|
+
readonly opacity: KeyframeValue;
|
|
8752
|
+
readonly transform: KeyframeValue;
|
|
8753
|
+
};
|
|
8754
|
+
}];
|
|
8755
|
+
};
|
|
8756
|
+
readonly 'oc-enter-cell': {
|
|
8757
|
+
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).";
|
|
8758
|
+
readonly stops: readonly [{
|
|
8759
|
+
readonly offset: 0;
|
|
8760
|
+
readonly values: {
|
|
8761
|
+
readonly opacity: KeyframeValue;
|
|
8762
|
+
readonly transform: KeyframeValue;
|
|
8763
|
+
};
|
|
8764
|
+
}, {
|
|
8765
|
+
readonly offset: 1;
|
|
8766
|
+
readonly values: {
|
|
8767
|
+
readonly opacity: KeyframeValue;
|
|
8768
|
+
readonly transform: KeyframeValue;
|
|
8769
|
+
};
|
|
8770
|
+
}];
|
|
8771
|
+
};
|
|
8772
|
+
readonly 'oc-enter-arc': {
|
|
8773
|
+
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.";
|
|
8774
|
+
readonly stops: readonly [{
|
|
8775
|
+
readonly offset: 0;
|
|
8776
|
+
readonly values: {
|
|
8777
|
+
readonly opacity: KeyframeValue;
|
|
8778
|
+
readonly transform: KeyframeValue;
|
|
8779
|
+
};
|
|
8780
|
+
}, {
|
|
8781
|
+
readonly offset: 1;
|
|
8782
|
+
readonly values: {
|
|
8783
|
+
readonly opacity: KeyframeValue;
|
|
8784
|
+
readonly transform: KeyframeValue;
|
|
8785
|
+
};
|
|
8786
|
+
}];
|
|
8787
|
+
};
|
|
8788
|
+
readonly 'oc-enter-fade-only': {
|
|
8789
|
+
readonly comment: "Pure opacity fade (no transform). Safe for elements with existing transforms\nlike arc groups that use translate() for positioning.";
|
|
8790
|
+
readonly stops: readonly [{
|
|
8791
|
+
readonly offset: 0;
|
|
8792
|
+
readonly values: {
|
|
8793
|
+
readonly opacity: KeyframeValue;
|
|
8794
|
+
};
|
|
8795
|
+
}, {
|
|
8796
|
+
readonly offset: 1;
|
|
8797
|
+
readonly values: {
|
|
8798
|
+
readonly opacity: KeyframeValue;
|
|
8799
|
+
};
|
|
8800
|
+
}];
|
|
8801
|
+
};
|
|
8802
|
+
readonly 'oc-enter-fade': {
|
|
8803
|
+
readonly comment: "Fade + subtle slide up (table chrome)";
|
|
8804
|
+
readonly stops: readonly [{
|
|
8805
|
+
readonly offset: 0;
|
|
8806
|
+
readonly values: {
|
|
8807
|
+
readonly opacity: KeyframeValue;
|
|
8808
|
+
readonly transform: KeyframeValue;
|
|
8809
|
+
};
|
|
8810
|
+
}, {
|
|
8811
|
+
readonly offset: 1;
|
|
8812
|
+
readonly values: {
|
|
8813
|
+
readonly opacity: KeyframeValue;
|
|
8814
|
+
readonly transform: KeyframeValue;
|
|
8815
|
+
};
|
|
8816
|
+
}];
|
|
8817
|
+
};
|
|
8818
|
+
readonly 'oc-enter-rise': {
|
|
8819
|
+
readonly comment: "Text rise: 0.6em up to rest. Its opacity runs as a separate quick fade.";
|
|
8820
|
+
readonly stops: readonly [{
|
|
8821
|
+
readonly offset: 0;
|
|
8822
|
+
readonly values: {
|
|
8823
|
+
readonly transform: KeyframeValue;
|
|
8824
|
+
};
|
|
8825
|
+
}, {
|
|
8826
|
+
readonly offset: 1;
|
|
8827
|
+
readonly values: {
|
|
8828
|
+
readonly transform: KeyframeValue;
|
|
8829
|
+
};
|
|
8830
|
+
}];
|
|
8831
|
+
};
|
|
8832
|
+
readonly 'oc-enter-slide': {
|
|
8833
|
+
readonly comment: "Row slide: 4px up to rest. Its opacity runs as a separate quick fade.";
|
|
8834
|
+
readonly stops: readonly [{
|
|
8835
|
+
readonly offset: 0;
|
|
8836
|
+
readonly values: {
|
|
8837
|
+
readonly transform: KeyframeValue;
|
|
8838
|
+
};
|
|
8839
|
+
}, {
|
|
8840
|
+
readonly offset: 1;
|
|
8841
|
+
readonly values: {
|
|
8842
|
+
readonly transform: KeyframeValue;
|
|
8843
|
+
};
|
|
8844
|
+
}];
|
|
8845
|
+
};
|
|
8846
|
+
readonly 'oc-table-enter-row': {
|
|
8847
|
+
readonly comment: "Table row entrance: slide up only, no opacity (cells fade independently\nto avoid opacity compounding between row and cell animations)";
|
|
8848
|
+
readonly stops: readonly [{
|
|
8849
|
+
readonly offset: 0;
|
|
8850
|
+
readonly values: {
|
|
8851
|
+
readonly transform: KeyframeValue;
|
|
8852
|
+
};
|
|
8853
|
+
}, {
|
|
8854
|
+
readonly offset: 1;
|
|
8855
|
+
readonly values: {
|
|
8856
|
+
readonly transform: KeyframeValue;
|
|
8857
|
+
};
|
|
8858
|
+
}];
|
|
8859
|
+
};
|
|
8860
|
+
readonly 'oc-table-enter-bar-fill': {
|
|
8861
|
+
readonly comment: "Table bar fill entrance: clip-path grow only, no opacity\n(preserves resting opacity: 0.15 from table.css)";
|
|
8862
|
+
readonly stops: readonly [{
|
|
8863
|
+
readonly offset: 0;
|
|
8864
|
+
readonly values: {
|
|
8865
|
+
readonly 'clip-path': KeyframeValue;
|
|
8866
|
+
};
|
|
8867
|
+
}, {
|
|
8868
|
+
readonly offset: 1;
|
|
8869
|
+
readonly values: {
|
|
8870
|
+
readonly 'clip-path': KeyframeValue;
|
|
8871
|
+
};
|
|
8872
|
+
}];
|
|
8873
|
+
};
|
|
8874
|
+
readonly 'oc-pulse': {
|
|
8875
|
+
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.";
|
|
8876
|
+
readonly stops: readonly [{
|
|
8877
|
+
readonly offset: 0;
|
|
8878
|
+
readonly values: {
|
|
8879
|
+
readonly r: KeyframeValue;
|
|
8880
|
+
readonly 'fill-opacity': KeyframeValue;
|
|
8881
|
+
};
|
|
8882
|
+
}, {
|
|
8883
|
+
readonly offset: 0.45;
|
|
8884
|
+
readonly values: {
|
|
8885
|
+
readonly r: KeyframeValue;
|
|
8886
|
+
readonly 'fill-opacity': KeyframeValue;
|
|
8887
|
+
};
|
|
8888
|
+
}, {
|
|
8889
|
+
readonly offset: 1;
|
|
8890
|
+
readonly values: {
|
|
8891
|
+
readonly r: KeyframeValue;
|
|
8892
|
+
readonly 'fill-opacity': KeyframeValue;
|
|
8893
|
+
};
|
|
8894
|
+
}];
|
|
8895
|
+
};
|
|
8896
|
+
readonly 'oc-tooltip-in': {
|
|
8897
|
+
readonly comment: "Tooltip entrance";
|
|
8898
|
+
readonly stops: readonly [{
|
|
8899
|
+
readonly offset: 0;
|
|
8900
|
+
readonly values: {
|
|
8901
|
+
readonly opacity: KeyframeValue;
|
|
8902
|
+
readonly transform: KeyframeValue;
|
|
8903
|
+
};
|
|
8904
|
+
}, {
|
|
8905
|
+
readonly offset: 1;
|
|
8906
|
+
readonly values: {
|
|
8907
|
+
readonly opacity: KeyframeValue;
|
|
8908
|
+
readonly transform: KeyframeValue;
|
|
8909
|
+
};
|
|
8910
|
+
}];
|
|
8911
|
+
};
|
|
8912
|
+
};
|
|
8913
|
+
type KeyframeName = keyof typeof KEYFRAMES;
|
|
8914
|
+
/** Serialize a keyframe value as CSS. */
|
|
8915
|
+
declare function keyframeValueToCSS(value: KeyframeValue): string;
|
|
8916
|
+
/**
|
|
8917
|
+
* Evaluate a keyframe at time progress t in [0, 1], CSS-style: each property
|
|
8918
|
+
* interpolates between the stops that specify it, and `ease` is applied within
|
|
8919
|
+
* each such segment (the animation-timing-function applies per keyframe
|
|
8920
|
+
* segment, not across the whole animation).
|
|
8921
|
+
*/
|
|
8922
|
+
declare function evalKeyframes(name: KeyframeName, t: number, ease: (progress: number) => number): Partial<Record<KeyframeProperty, KeyframeValue>>;
|
|
8923
|
+
/** Properties a keyframe animates, in first-seen order. */
|
|
8924
|
+
declare function keyframeProperties(name: KeyframeName): KeyframeProperty[];
|
|
8925
|
+
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';
|
|
8926
|
+
/** The easing a role's CSS uses. */
|
|
8927
|
+
type RoleTiming =
|
|
8928
|
+
/** The author's ease: `var(--oc-animation-ease, var(--oc-ease-smooth))` (spring-aware). */
|
|
8929
|
+
{
|
|
8930
|
+
kind: 'author';
|
|
8931
|
+
}
|
|
8932
|
+
/** A registry curve regardless of the author's ease (annotations). */
|
|
8933
|
+
| {
|
|
8934
|
+
kind: 'curve';
|
|
8935
|
+
curve: CurveName;
|
|
8936
|
+
}
|
|
8937
|
+
/** A fixed CSS timing function, with its cubic-bezier control points for JS. */
|
|
8938
|
+
| {
|
|
8939
|
+
kind: 'css';
|
|
8940
|
+
css: string;
|
|
8941
|
+
bezier: readonly [number, number, number, number];
|
|
8942
|
+
};
|
|
8943
|
+
/** Animation duration of a role, from the base duration D. */
|
|
8944
|
+
type DurationRule = {
|
|
8945
|
+
kind: 'base';
|
|
8946
|
+
factor: number;
|
|
8947
|
+
} | {
|
|
8948
|
+
kind: 'fixed';
|
|
8949
|
+
ms: number;
|
|
8950
|
+
};
|
|
8951
|
+
/**
|
|
8952
|
+
* When a role starts, relative to something else's tween. Never a raw
|
|
8953
|
+
* fraction of the duration: a progress point is resolved through the
|
|
8954
|
+
* parent's actual curve, so it means "when the parent has visibly got there"
|
|
8955
|
+
* whichever ease the author picked.
|
|
8956
|
+
*/
|
|
8957
|
+
type DelayAnchor =
|
|
8958
|
+
/**
|
|
8959
|
+
* When the parent role's tween reaches `progress`. The parent is taken at
|
|
8960
|
+
* index 0 (its stagger is the child's own), or at the context's
|
|
8961
|
+
* `lastMarkIndex` with `ofLast` (annotations wait for the last mark).
|
|
8962
|
+
*/
|
|
8963
|
+
{
|
|
8964
|
+
kind: 'progress';
|
|
8965
|
+
progress: number;
|
|
8966
|
+
of: EntranceRole;
|
|
8967
|
+
ofLast?: boolean;
|
|
8968
|
+
}
|
|
8969
|
+
/** A progress point of the map feature sweep: `progress * MAP_SWEEP_BUDGET_MS`. */
|
|
8970
|
+
| {
|
|
8971
|
+
kind: 'sweep';
|
|
8972
|
+
progress: number;
|
|
8973
|
+
};
|
|
8974
|
+
/** How entering elements of a role are spread out by index. */
|
|
8975
|
+
type StaggerRule = 'none'
|
|
8976
|
+
/** `index * --oc-animation-stagger`, index from `--oc-mark-index`. */
|
|
8977
|
+
| 'mark'
|
|
8978
|
+
/** `index * --oc-animation-stagger`, index from `--oc-row-index` (tables). */
|
|
8979
|
+
| 'row'
|
|
8980
|
+
/** `index * --oc-point-stagger` (60ms fallback); the map stamps clampStaggerDelay. */
|
|
8981
|
+
| 'map-point'
|
|
8982
|
+
/** Stamped `--oc-map-delay`; JS: shuffled slot index * map stagger (mapSweepTiming). */
|
|
8983
|
+
| 'map-sweep'
|
|
8984
|
+
/** Stamped `--oc-tile-delay`; JS: the context's delayMs (tilemapTileDelays). */
|
|
8985
|
+
| 'tilemap-tile';
|
|
8986
|
+
interface DelayRule {
|
|
8987
|
+
/** Start at this anchor (omitted = at once), then add the stagger. */
|
|
8988
|
+
after?: DelayAnchor;
|
|
8989
|
+
/** Add `--oc-annotation-delay` (150ms fallback) on top. */
|
|
8990
|
+
plusAnnotationDelay?: boolean;
|
|
8991
|
+
stagger: StaggerRule;
|
|
8992
|
+
}
|
|
8993
|
+
interface EntranceRoleDef {
|
|
8994
|
+
name: EntranceRole;
|
|
8995
|
+
/** Which generated stylesheet and root selector the rule lives under. */
|
|
8996
|
+
scope: 'chart' | 'table';
|
|
8997
|
+
/** Selectors relative to the scope root. */
|
|
8998
|
+
selectors: readonly string[];
|
|
8999
|
+
/**
|
|
9000
|
+
* Which declarations the CSS rule writes. `shorthand` writes the full
|
|
9001
|
+
* `animation` shorthand plus delay; a list writes only those longhands and
|
|
9002
|
+
* inherits the rest from an earlier, less specific role.
|
|
9003
|
+
*/
|
|
9004
|
+
emit: 'shorthand' | readonly ('name' | 'duration' | 'timing' | 'delay')[];
|
|
9005
|
+
keyframe: KeyframeName;
|
|
9006
|
+
/** Bar-family roles play this keyframe when their group is horizontal. */
|
|
9007
|
+
horizontalKeyframe?: KeyframeName;
|
|
9008
|
+
timing: RoleTiming;
|
|
9009
|
+
/** What D is: the phase duration, or the map's capped feature duration. */
|
|
9010
|
+
durationBasis: 'phase' | 'map';
|
|
9011
|
+
duration: DurationRule;
|
|
9012
|
+
/**
|
|
9013
|
+
* A second, quick opacity animation on the same element and delay
|
|
9014
|
+
* (`oc-enter-fade-only` over `ms` on FADE_CURVE), so text is readable almost
|
|
9015
|
+
* at once while its geometry keeps settling. Needs `emit: 'shorthand'`.
|
|
9016
|
+
*/
|
|
9017
|
+
fade?: {
|
|
9018
|
+
ms: number;
|
|
9019
|
+
};
|
|
9020
|
+
delay: DelayRule;
|
|
9021
|
+
/** Descendant selectors whose own animation this role switches off. */
|
|
9022
|
+
suppress?: readonly string[];
|
|
9023
|
+
/** Accent roles (annotation markers and the like) may use overshooting curves such as `punch`. */
|
|
9024
|
+
accent?: boolean;
|
|
9025
|
+
comment?: string;
|
|
9026
|
+
}
|
|
9027
|
+
/** A role row with its derived fields. */
|
|
9028
|
+
interface EntranceRoleRow extends EntranceRoleDef {
|
|
9029
|
+
/** Share of the duration over which non-opacity properties move (0 if none). */
|
|
9030
|
+
geometryFraction: number;
|
|
9031
|
+
/** Share of the duration after which the keyframe's own opacity has settled (0 if none). */
|
|
9032
|
+
opacityFraction: number;
|
|
9033
|
+
/**
|
|
9034
|
+
* Role-scoped custom properties the generated CSS reads first: a full
|
|
9035
|
+
* per-element delay, a duration, and the root-stamped anchor offset
|
|
9036
|
+
* (`after`) that the anchor resolves to for this render's curve.
|
|
9037
|
+
*/
|
|
9038
|
+
vars: {
|
|
9039
|
+
delay: string;
|
|
9040
|
+
duration: string;
|
|
9041
|
+
after: string;
|
|
9042
|
+
};
|
|
9043
|
+
}
|
|
9044
|
+
/** Curve of the quick opacity track on roles with `fade`. */
|
|
9045
|
+
declare const FADE_CURVE: CurveName;
|
|
9046
|
+
/** Line points cascade left to right over this window once their line has drawn. */
|
|
9047
|
+
declare const LINE_POINT_CASCADE_MS = 240;
|
|
9048
|
+
/**
|
|
9049
|
+
* Role-scoped custom property names (`--oc-<role>-delay`, `-dur`, `-after`).
|
|
9050
|
+
* Scoped per role because custom properties inherit: a barlist bar sits inside
|
|
9051
|
+
* its row, a table cell inside its row, a segment inside a stack wrapper.
|
|
9052
|
+
*/
|
|
9053
|
+
declare function roleVars(role: EntranceRole): {
|
|
9054
|
+
delay: string;
|
|
9055
|
+
duration: string;
|
|
9056
|
+
after: string;
|
|
9057
|
+
};
|
|
9058
|
+
/** Every entrance role, in CSS emission order (order matters for the cascade). */
|
|
9059
|
+
declare const ENTRANCE_ROLES: readonly EntranceRoleRow[];
|
|
9060
|
+
declare function entranceRole(role: EntranceRole): EntranceRoleRow;
|
|
9061
|
+
/** Inputs the CSS reads from stamped custom properties. Defaults are the CSS fallbacks. */
|
|
9062
|
+
interface EntranceTimingContext {
|
|
9063
|
+
/** `--oc-animation-stagger`, already clamped (clampStaggerDelay / mapSweepTiming). Default 80. */
|
|
9064
|
+
staggerMs?: number;
|
|
9065
|
+
/** `--oc-annotation-delay`. Default 150. */
|
|
9066
|
+
annotationDelayMs?: number;
|
|
9067
|
+
/** `--oc-point-stagger` for map points (clampStaggerDelay). Default 60. */
|
|
9068
|
+
pointStaggerMs?: number;
|
|
9069
|
+
/** A per-element stamped delay (tilemap tiles: tilemapTileDelays). Default 0. */
|
|
9070
|
+
delayMs?: number;
|
|
9071
|
+
/**
|
|
9072
|
+
* A per-element stamped role delay (`--oc-<role>-delay`, e.g. a line point
|
|
9073
|
+
* keyed on its x). Replaces the whole delay rule, as the CSS does.
|
|
9074
|
+
*/
|
|
9075
|
+
stampedDelayMs?: number;
|
|
9076
|
+
/** Root-stamped anchor offsets (`--oc-<role>-after`), per role. */
|
|
9077
|
+
afterMs?: Partial<Record<EntranceRole, number>>;
|
|
9078
|
+
/** Stagger index of the last mark, for anchors with `ofLast`. Default 0. */
|
|
9079
|
+
lastMarkIndex?: number;
|
|
9080
|
+
}
|
|
9081
|
+
interface EntranceTiming {
|
|
9082
|
+
/** When the element starts, from the entrance start. */
|
|
9083
|
+
delayMs: number;
|
|
9084
|
+
/** The CSS animation-duration of the role's keyframe. */
|
|
9085
|
+
durationMs: number;
|
|
9086
|
+
/** How long non-opacity properties (clip, transform, fill) move; 0 if none. */
|
|
9087
|
+
geometryMs: number;
|
|
9088
|
+
/** How long until opacity settles; 0 if opacity doesn't animate. */
|
|
9089
|
+
opacityMs: number;
|
|
9090
|
+
/** Duration of the separate quick fade track; 0 when the role has none. */
|
|
9091
|
+
fadeMs: number;
|
|
9092
|
+
}
|
|
9093
|
+
/** The base duration D a role's CSS sees as `--oc-animation-duration`. */
|
|
9094
|
+
declare function roleBaseDuration(role: EntranceRole, phase: MotionPhase): number;
|
|
9095
|
+
/**
|
|
9096
|
+
* When the element at `index` of a role has reached `progress` of its own
|
|
9097
|
+
* tween, in ms from the entrance start: its delay plus the first time its
|
|
9098
|
+
* curve reaches that progress.
|
|
9099
|
+
*/
|
|
9100
|
+
declare function progressTimeMs(role: EntranceRole, index: number, phase: MotionPhase, context: EntranceTimingContext, progress: number): number;
|
|
9101
|
+
/**
|
|
9102
|
+
* The index-free part of a role's delay: where its anchor lands for this
|
|
9103
|
+
* phase, in ms. This is what the renderer stamps as `--oc-<role>-after`.
|
|
9104
|
+
*/
|
|
9105
|
+
declare function anchorMs(role: EntranceRole, phase: MotionPhase, context?: EntranceTimingContext): number;
|
|
9106
|
+
/**
|
|
9107
|
+
* Root custom properties for every anchored role in a scope: the anchor
|
|
9108
|
+
* offsets the generated CSS reads (`--oc-<role>-after`), resolved through
|
|
9109
|
+
* this phase's curve. CSS can't invert a curve, so the renderer does it here.
|
|
9110
|
+
*/
|
|
9111
|
+
declare function entranceAnchorVars(phase: MotionPhase, context?: EntranceTimingContext, scope?: 'chart' | 'table'): Record<string, string>;
|
|
9112
|
+
/**
|
|
9113
|
+
* Timing of the element at `index` of a role, in ms, matching what the
|
|
9114
|
+
* generated CSS computes from the stamped custom properties.
|
|
9115
|
+
*/
|
|
9116
|
+
declare function entranceTiming(role: EntranceRole, index: number, phase: MotionPhase, context?: EntranceTimingContext): EntranceTiming;
|
|
9117
|
+
/** How many elements of a role animate, and the extremes that set its end. */
|
|
9118
|
+
interface EntranceRoleExtent {
|
|
9119
|
+
count: number;
|
|
9120
|
+
/** Highest index (default count - 1). */
|
|
9121
|
+
maxIndex?: number;
|
|
9122
|
+
/** Highest stamped delay (tilemap-tile). */
|
|
9123
|
+
maxDelayMs?: number;
|
|
9124
|
+
/** Highest per-element stamped role delay (`--oc-<role>-delay`). */
|
|
9125
|
+
maxStampedDelayMs?: number;
|
|
9126
|
+
/** How many of `count` carry a stamped role delay (default 0). */
|
|
9127
|
+
stampedCount?: number;
|
|
9128
|
+
}
|
|
9129
|
+
interface EntranceEndContext extends Omit<EntranceTimingContext, 'delayMs' | 'stampedDelayMs'> {
|
|
9130
|
+
phase: MotionPhase;
|
|
9131
|
+
/** Elements per role: a count, or an extent. Roles with no elements are skipped. */
|
|
9132
|
+
roles: Partial<Record<EntranceRole, number | EntranceRoleExtent>>;
|
|
9133
|
+
}
|
|
9134
|
+
/**
|
|
9135
|
+
* When the last animated element finishes, in ms from the entrance start: the
|
|
9136
|
+
* max of `delay + duration` (or its fade, if longer) over every role present.
|
|
9137
|
+
* No buffer is added.
|
|
9138
|
+
*/
|
|
9139
|
+
declare function entranceEndMs(context: EntranceEndContext): number;
|
|
9140
|
+
/**
|
|
9141
|
+
* The eased progress a role's CSS timing function gives at time progress t of
|
|
9142
|
+
* one keyframe segment. Author-eased roles follow the phase: a spring is
|
|
9143
|
+
* sampled over the base duration D (as `motionCSS` stamps it), otherwise the
|
|
9144
|
+
* registry curve. Mirrors the CSS, so it can overshoot on a spring.
|
|
9145
|
+
*/
|
|
9146
|
+
declare function evalRoleEase(role: EntranceRole, phase: MotionPhase, t: number): number;
|
|
9147
|
+
/**
|
|
9148
|
+
* The first share of a role's tween at which its eased progress reaches p:
|
|
9149
|
+
* the inverse of `evalRoleEase`. Monotone registry curves invert exactly;
|
|
9150
|
+
* springs and CSS beziers are searched.
|
|
9151
|
+
*/
|
|
9152
|
+
declare function invertRoleEase(role: EntranceRole, phase: MotionPhase, p: number): number;
|
|
9153
|
+
/**
|
|
9154
|
+
* Default exit: a removed mark's ghost fades (and collapses, for rects and
|
|
9155
|
+
* arcs) over 120ms. `gentle` is the fast ease-out here: on a 120ms window
|
|
9156
|
+
* `snap`/`snappy` are ~90% done in under 25ms, which reads as a pop, not a
|
|
9157
|
+
* fade. Exit geometry goes through `sampleMotion`, so it stays in [from, to].
|
|
9158
|
+
*/
|
|
9159
|
+
declare const EXIT_FADE_MS = 120;
|
|
9160
|
+
declare const EXIT_CURVE: "gentle";
|
|
9161
|
+
/** Marks entering during an update start once survivors reach this share of their tween's time. */
|
|
9162
|
+
declare const UPDATE_ENTER_START = 0.4;
|
|
9163
|
+
/** When each track of an update transition runs, in ms from its start. */
|
|
9164
|
+
interface UpdateTimeline {
|
|
9165
|
+
/** Removal ghosts fade over [0, exitMs]. */
|
|
9166
|
+
exitMs: number;
|
|
9167
|
+
/** Survivors (and chrome, labels, color) start moving here. */
|
|
9168
|
+
updateDelayMs: number;
|
|
9169
|
+
/** Entering marks fade in from here... */
|
|
9170
|
+
enterDelayMs: number;
|
|
9171
|
+
/** ...over this long, ending with the survivors. */
|
|
9172
|
+
enterMs: number;
|
|
9173
|
+
/** End of the whole transition. */
|
|
9174
|
+
totalMs: number;
|
|
9175
|
+
}
|
|
9176
|
+
/**
|
|
9177
|
+
* Lay out an update transition. On `snap`, a survivor sliding into a removed
|
|
9178
|
+
* mark's slot touches the ghost within ~25ms (a bar's neighbour covers the
|
|
9179
|
+
* band gap at ~0.4 progress), so no fade short enough to run alongside it
|
|
9180
|
+
* can clear first. When the update removes marks, survivors therefore hold
|
|
9181
|
+
* until the exit has finished, and enters keep their place relative to the
|
|
9182
|
+
* survivors. Without removals there is nothing to clear and nothing waits.
|
|
9183
|
+
*/
|
|
9184
|
+
declare function updateTimeline(update: MotionPhase, exit: MotionPhase, hasRemovals: boolean): UpdateTimeline;
|
|
9185
|
+
|
|
9186
|
+
/**
|
|
9187
|
+
* Stagger strategies: how far apart entering elements start.
|
|
9188
|
+
*
|
|
9189
|
+
* Every renderer's per-index delay formula lives here so the CSS, canvas and
|
|
9190
|
+
* export paths share one copy.
|
|
9191
|
+
*/
|
|
9192
|
+
/** Maximum total stagger time in ms. Keeps the whole sweep inside one beat. */
|
|
9193
|
+
declare const MAX_TOTAL_STAGGER_MS = 450;
|
|
9194
|
+
/**
|
|
9195
|
+
* Gap between consecutive entering elements: the authored delay is a ceiling,
|
|
9196
|
+
* and the whole spread never exceeds MAX_TOTAL_STAGGER_MS, so
|
|
9197
|
+
* `gap = min(delay, 450 / (n - 1))`. Five bars at the default 80ms land 80ms
|
|
9198
|
+
* apart (the cap allows 112.5); forty land 450/39 ms apart. A delay of 0 stays 0, and one element
|
|
9199
|
+
* has no gap.
|
|
9200
|
+
*/
|
|
9201
|
+
declare function clampStaggerDelay(delay: number, elementCount: number): number;
|
|
9202
|
+
/** Spread of grid-cell (heatmap, waffle, calendar) start times, in ms. */
|
|
9203
|
+
declare const CELL_SWEEP_BUDGET_MS = 600;
|
|
9204
|
+
/**
|
|
9205
|
+
* Start times for `count` elements spread evenly over `budgetMs`, then
|
|
9206
|
+
* shuffled with a seeded Fisher-Yates so they fill in no visible pattern.
|
|
9207
|
+
* The same seed always gives the same order.
|
|
9208
|
+
*/
|
|
9209
|
+
declare function shuffledSweepDelays(count: number, budgetMs: number, seed: number): number[];
|
|
9210
|
+
/** Map point stagger fallback used by the CSS when the renderer stamps none. */
|
|
9211
|
+
declare const MAP_POINT_STAGGER_FALLBACK_MS = 60;
|
|
9212
|
+
/** Cap on a single map feature's fill animation, in ms. */
|
|
9213
|
+
declare const MAP_FEATURE_MAX_DURATION_MS = 500;
|
|
9214
|
+
/**
|
|
9215
|
+
* Spread of map feature start times, in ms. A constant (the old 1.2x budget at
|
|
9216
|
+
* a 450ms enter), so a longer enter duration doesn't add waiting to maps.
|
|
9217
|
+
*/
|
|
9218
|
+
declare const MAP_SWEEP_BUDGET_MS = 540;
|
|
9219
|
+
/** The duration the map renderer stamps as `--oc-animation-duration`. */
|
|
9220
|
+
declare function mapFeatureDuration(durationMs: number): number;
|
|
9221
|
+
interface MapSweepTiming {
|
|
9222
|
+
/** Per-feature animation duration (`min(duration, 500)`). */
|
|
9223
|
+
featureDurationMs: number;
|
|
9224
|
+
/** Total spread of feature start times (MAP_SWEEP_BUDGET_MS, 0 in bulk mode). */
|
|
9225
|
+
budgetMs: number;
|
|
9226
|
+
/** Gap between consecutive shuffled feature slots (`budget / (n - 1)`). */
|
|
9227
|
+
staggerMs: number;
|
|
9228
|
+
}
|
|
9229
|
+
/**
|
|
9230
|
+
* Map feature sweep: features start at evenly spaced (then shuffled) slots
|
|
9231
|
+
* across a constant budget. Bulk mode fades the whole group at once, so it
|
|
9232
|
+
* has no budget.
|
|
9233
|
+
*/
|
|
9234
|
+
declare function mapSweepTiming(durationMs: number, featureCount: number, bulk: boolean): MapSweepTiming;
|
|
9235
|
+
/**
|
|
9236
|
+
* Tilemap tile delays: an ~800ms base spread with seeded +-40% jitter so tiles
|
|
9237
|
+
* pop in clusters. `animationIndices[i]` is tile i's animation index.
|
|
9238
|
+
*/
|
|
9239
|
+
declare function tilemapTileDelays(animationIndices: readonly number[]): number[];
|
|
9240
|
+
|
|
7692
9241
|
interface CssTokenDef {
|
|
7693
9242
|
name: string;
|
|
7694
9243
|
light: string;
|
|
@@ -7713,4 +9262,4 @@ declare const CSS_TOKEN_ROOT_SELECTORS: readonly string[];
|
|
|
7713
9262
|
declare const CSS_TOKENS: readonly CssTokenDef[];
|
|
7714
9263
|
declare function cssTokenDefault(name: string, mode: 'light' | 'dark'): string;
|
|
7715
9264
|
|
|
7716
|
-
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 DescriptionEncoding, 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, type ErrorbarEncoding, 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 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 MarkFocusEvent, type MarkMetadata, 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 };
|
|
9265
|
+
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 PlaybackConfig, type PlaybackPeriodPosition, type PlaybackTimingConfig, 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 };
|