@opendata-ai/openchart-core 9.0.0 → 9.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +1505 -46
- package/dist/index.js +1332 -47
- 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 +55 -16
- package/schema/table.schema.json +54 -15
- package/schema/vizspec.schema.json +1447 -50
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. */
|
|
@@ -1690,6 +1704,11 @@ interface ResolvedAnimationPhase {
|
|
|
1690
1704
|
* spec — the renderer supplies the default so it can vary by render mode.
|
|
1691
1705
|
*/
|
|
1692
1706
|
maxMarks?: number;
|
|
1707
|
+
/**
|
|
1708
|
+
* When the entrance starts (enter phase only; always set there, default
|
|
1709
|
+
* 'visible'). 'mount' plays at once; 'visible' waits until the chart is seen.
|
|
1710
|
+
*/
|
|
1711
|
+
trigger?: 'visible' | 'mount';
|
|
1693
1712
|
}
|
|
1694
1713
|
/** Resolved animation config. A phase is present iff that phase is enabled. */
|
|
1695
1714
|
interface ResolvedAnimation {
|
|
@@ -2247,8 +2266,11 @@ interface SankeyNodeMark {
|
|
|
2247
2266
|
/** Node label positioned outside the node. */
|
|
2248
2267
|
label: ResolvedLabel;
|
|
2249
2268
|
/**
|
|
2250
|
-
* The node's total flow,
|
|
2251
|
-
*
|
|
2269
|
+
* The node's total flow, in lighter, tabular ink. Present only when the
|
|
2270
|
+
* engine decided it is drawn; renderers draw it whenever it is set. A label
|
|
2271
|
+
* with engine-wrapped `lines` (placed on the flow at narrow widths) takes it
|
|
2272
|
+
* on its own line below the name; any other label takes it after the name on
|
|
2273
|
+
* the last line.
|
|
2252
2274
|
*/
|
|
2253
2275
|
valueLabel?: {
|
|
2254
2276
|
text: string;
|
|
@@ -2573,6 +2595,8 @@ interface GeoMapLayout {
|
|
|
2573
2595
|
/** A resolved bar list row with computed positions and visual properties. */
|
|
2574
2596
|
interface BarListRowMark extends MarkMetadata {
|
|
2575
2597
|
type: 'barlist-row';
|
|
2598
|
+
/** Stable identity for update transitions. */
|
|
2599
|
+
key: string;
|
|
2576
2600
|
/** Full authored label, including text omitted by display truncation. */
|
|
2577
2601
|
fullLabel?: string;
|
|
2578
2602
|
/** Row index (0-based). */
|
|
@@ -2694,6 +2718,14 @@ interface CompileOptions {
|
|
|
2694
2718
|
* - `'grow'`: `height` is the plot budget; the SVG grows by the chrome height.
|
|
2695
2719
|
*/
|
|
2696
2720
|
chromeLayout?: 'subtract' | 'grow';
|
|
2721
|
+
/**
|
|
2722
|
+
* Reserve the annotation-note band for every text annotation up front, even
|
|
2723
|
+
* when none is folded into a numbered note, so an edit that pins a label or
|
|
2724
|
+
* changes which labels fold never changes the figure's height. Edit mode
|
|
2725
|
+
* sets it. Otherwise, while notes grow the SVG (the default), the figure
|
|
2726
|
+
* grows only by the notes it draws. Defaults to false.
|
|
2727
|
+
*/
|
|
2728
|
+
stableNoteBand?: boolean;
|
|
2697
2729
|
/** Theme overrides. */
|
|
2698
2730
|
theme?: ThemeConfig;
|
|
2699
2731
|
/**
|
|
@@ -4628,8 +4660,11 @@ interface SeriesStyle {
|
|
|
4628
4660
|
/**
|
|
4629
4661
|
* Named easing presets for entrance animations.
|
|
4630
4662
|
* Uses CSS linear() curves. Named 'ease' (not 'easing') to match Vega convention.
|
|
4663
|
+
* - `smooth` (default): soft ease-out with a gentle start that settles late, no overshoot.
|
|
4664
|
+
* - `snappy`: a fast attack, settling by about half the duration.
|
|
4665
|
+
* - `gentle`: the previous default, a slower ease-out.
|
|
4631
4666
|
*/
|
|
4632
|
-
type AnimationEase = 'smooth' | 'snappy';
|
|
4667
|
+
type AnimationEase = 'smooth' | 'snappy' | 'gentle';
|
|
4633
4668
|
/** Opt-in motion language. */
|
|
4634
4669
|
type AnimationPreset = 'fluid' | 'subtle';
|
|
4635
4670
|
/** Physical spring parameters. Quantitative motion is bounded at critical damping. */
|
|
@@ -4640,7 +4675,10 @@ interface SpringConfig {
|
|
|
4640
4675
|
}
|
|
4641
4676
|
/** Stagger configuration for sequential element reveal. */
|
|
4642
4677
|
interface AnimationStagger {
|
|
4643
|
-
/**
|
|
4678
|
+
/**
|
|
4679
|
+
* Gap between consecutive elements in ms. Default: 80. A ceiling: the whole
|
|
4680
|
+
* stagger spans at most 450ms, so n elements land min(delay, 450 / (n - 1)) apart.
|
|
4681
|
+
*/
|
|
4644
4682
|
delay?: number;
|
|
4645
4683
|
/** Ordering strategy. Default: 'index' (DOM order) */
|
|
4646
4684
|
order?: 'index' | 'value' | 'reverse';
|
|
@@ -4668,13 +4706,28 @@ interface ResponsiveConfig {
|
|
|
4668
4706
|
interface AnimationPhaseConfig {
|
|
4669
4707
|
/** Spring mode. Cannot be combined with duration or ease in this phase. */
|
|
4670
4708
|
spring?: SpringConfig;
|
|
4671
|
-
/** Duration in ms. Default: 500 for
|
|
4709
|
+
/** Duration in ms. Default: 800 for enter, 500 for update, 120 for exit. */
|
|
4672
4710
|
duration?: number;
|
|
4673
|
-
/** Easing preset. Default: 'smooth'. */
|
|
4711
|
+
/** Easing preset. Default: 'smooth' ('gentle' for exit). */
|
|
4674
4712
|
ease?: AnimationEase;
|
|
4675
4713
|
/** Stagger config. true = defaults, false = no stagger. Default: true for enter. */
|
|
4676
4714
|
stagger?: AnimationStagger | boolean;
|
|
4677
4715
|
}
|
|
4716
|
+
/**
|
|
4717
|
+
* Entrance phase config. Adds `trigger` on top of the shared phase options.
|
|
4718
|
+
*/
|
|
4719
|
+
interface EnterPhaseConfig extends AnimationPhaseConfig {
|
|
4720
|
+
/**
|
|
4721
|
+
* When the entrance starts. Default: 'visible'.
|
|
4722
|
+
* - `visible`: hold the from-state until at least 25% of the chart (or 25% of
|
|
4723
|
+
* the viewport's height, for a chart taller than the viewport) is on
|
|
4724
|
+
* screen, then play. A chart already in view at mount plays at once.
|
|
4725
|
+
* - `mount`: play as soon as the chart mounts, scrolled into view or not.
|
|
4726
|
+
*
|
|
4727
|
+
* Ignored by export and server-side rendering, which never animate.
|
|
4728
|
+
*/
|
|
4729
|
+
trigger?: 'visible' | 'mount';
|
|
4730
|
+
}
|
|
4678
4731
|
/**
|
|
4679
4732
|
* Data-update phase config. Adds `maxMarks` on top of the shared phase
|
|
4680
4733
|
* options; the cap is meaningless for enter/exit, which animate via CSS.
|
|
@@ -4682,10 +4735,12 @@ interface AnimationPhaseConfig {
|
|
|
4682
4735
|
interface UpdatePhaseConfig extends AnimationPhaseConfig {
|
|
4683
4736
|
/**
|
|
4684
4737
|
* Maximum mark count that still runs a tweened data-update transition.
|
|
4685
|
-
*
|
|
4686
|
-
*
|
|
4687
|
-
*
|
|
4688
|
-
*
|
|
4738
|
+
* Charts default to 500 (20000 in canvas mark mode); bar lists, tile maps,
|
|
4739
|
+
* sankeys and maps have no cap unless you set one; tables ignore it. Above
|
|
4740
|
+
* the cap the visualization swaps instantly instead, because per-frame SVG
|
|
4741
|
+
* attribute writes on thousands of elements drop frames on low-end devices.
|
|
4742
|
+
* Raise it deliberately when the audience is desktop-heavy and you have
|
|
4743
|
+
* measured the frame budget.
|
|
4689
4744
|
*/
|
|
4690
4745
|
maxMarks?: number;
|
|
4691
4746
|
}
|
|
@@ -4696,19 +4751,23 @@ interface UpdatePhaseConfig extends AnimationPhaseConfig {
|
|
|
4696
4751
|
interface AnimationConfig {
|
|
4697
4752
|
/** Base preset; explicit phase settings take precedence. */
|
|
4698
4753
|
preset?: AnimationPreset;
|
|
4699
|
-
/** Entrance animation when chart first renders. */
|
|
4700
|
-
enter?:
|
|
4754
|
+
/** Entrance animation when chart first renders (by default, once it scrolls into view). */
|
|
4755
|
+
enter?: EnterPhaseConfig | boolean;
|
|
4701
4756
|
/** Transition animation when data updates. */
|
|
4702
4757
|
update?: UpdatePhaseConfig | boolean;
|
|
4703
4758
|
/** Exit animation when marks are removed. */
|
|
4704
4759
|
exit?: AnimationPhaseConfig | boolean;
|
|
4705
|
-
/**
|
|
4760
|
+
/**
|
|
4761
|
+
* Gap in ms between the last mark reaching 90% of its entrance and
|
|
4762
|
+
* annotations starting. Default: 150 (0 under a preset).
|
|
4763
|
+
*/
|
|
4706
4764
|
annotationDelay?: number;
|
|
4707
4765
|
}
|
|
4708
4766
|
/**
|
|
4709
4767
|
* Animation spec property.
|
|
4710
|
-
* - true:
|
|
4711
|
-
* - false
|
|
4768
|
+
* - omitted or true: every phase (enter, update, exit) with its defaults
|
|
4769
|
+
* - false: all motion off
|
|
4770
|
+
* - preset name: that motion language across every phase
|
|
4712
4771
|
* - AnimationConfig: full control via enter/update/exit phases
|
|
4713
4772
|
*/
|
|
4714
4773
|
type AnimationSpec = boolean | AnimationPreset | AnimationConfig;
|
|
@@ -4716,7 +4775,7 @@ type AnimationSpec = boolean | AnimationPreset | AnimationConfig;
|
|
|
4716
4775
|
* Chart display mode.
|
|
4717
4776
|
* - `'full'` (default): standard chart with chrome, axes, legend, padding.
|
|
4718
4777
|
* - `'sparkline'`: minimal inline mini-chart. Strips chrome, axes, legend,
|
|
4719
|
-
* watermark,
|
|
4778
|
+
* watermark, and reduces margins to a tiny safety pad. The mark
|
|
4720
4779
|
* fills the container edge-to-edge. Best with `mark: 'line' | 'area' | 'bar'`.
|
|
4721
4780
|
* Explicit user fields (chrome, legend, encoding.x.axis, etc.) still render
|
|
4722
4781
|
* when set, so users can opt in to specific elements.
|
|
@@ -5095,10 +5154,10 @@ interface BaseChartSpec<TData extends DataRow = DataRow> {
|
|
|
5095
5154
|
*/
|
|
5096
5155
|
overrides?: Partial<Record<Breakpoint, ChartSpecOverride>>;
|
|
5097
5156
|
/**
|
|
5098
|
-
*
|
|
5099
|
-
*
|
|
5100
|
-
*
|
|
5101
|
-
*
|
|
5157
|
+
* Motion. On by default: the entrance plays once the visualization scrolls
|
|
5158
|
+
* into view, and data updates animate. Set false to turn all motion off, or
|
|
5159
|
+
* pass an object to configure each phase. Static rendering and exports never
|
|
5160
|
+
* animate, and prefers-reduced-motion always wins.
|
|
5102
5161
|
*/
|
|
5103
5162
|
animation?: AnimationSpec;
|
|
5104
5163
|
/**
|
|
@@ -5340,7 +5399,13 @@ interface TableSpec {
|
|
|
5340
5399
|
};
|
|
5341
5400
|
/** Whether the table adapts to container width. Defaults to true. */
|
|
5342
5401
|
responsive?: boolean;
|
|
5343
|
-
/**
|
|
5402
|
+
/**
|
|
5403
|
+
* Motion. On by default: the entrance plays once the visualization scrolls
|
|
5404
|
+
* into view, and data updates animate. Set false to turn all motion off, or
|
|
5405
|
+
* pass an object to configure each phase. Static rendering and exports never
|
|
5406
|
+
* animate, and prefers-reduced-motion always wins. Tables animate their
|
|
5407
|
+
* entrance only; updates re-render instantly.
|
|
5408
|
+
*/
|
|
5344
5409
|
animation?: AnimationSpec;
|
|
5345
5410
|
}
|
|
5346
5411
|
/** Graph node: must have an id, plus arbitrary data fields. */
|
|
@@ -5372,22 +5437,43 @@ interface NodeOverride {
|
|
|
5372
5437
|
/** Force label to always show regardless of zoom/priority. */
|
|
5373
5438
|
alwaysShowLabel?: boolean;
|
|
5374
5439
|
}
|
|
5440
|
+
/** One graph motion phase: a tween (duration + ease) or a spring. */
|
|
5441
|
+
interface GraphPhaseConfig {
|
|
5442
|
+
/** Duration in ms. */
|
|
5443
|
+
duration?: number;
|
|
5444
|
+
/** Easing preset. */
|
|
5445
|
+
ease?: AnimationEase;
|
|
5446
|
+
/** Spring mode. Cannot be combined with duration or ease in this phase. */
|
|
5447
|
+
spring?: SpringConfig;
|
|
5448
|
+
}
|
|
5449
|
+
/** Graph entrance phase: adds the reveal stagger toggle and the trigger. */
|
|
5450
|
+
interface GraphEnterPhaseConfig extends GraphPhaseConfig {
|
|
5451
|
+
/**
|
|
5452
|
+
* Stagger the reveal. Default: true. Graphs order their reveal by layout, so
|
|
5453
|
+
* only on/off applies.
|
|
5454
|
+
*
|
|
5455
|
+
* @deprecated The object form (`{ delay, order }`) is ignored: any value
|
|
5456
|
+
* other than `false` staggers. Use `true` or `false`.
|
|
5457
|
+
*/
|
|
5458
|
+
stagger?: boolean | AnimationStagger;
|
|
5459
|
+
/**
|
|
5460
|
+
* When the entrance starts. Default: 'visible'.
|
|
5461
|
+
* - `visible`: wait until the graph is on screen, then play.
|
|
5462
|
+
* - `mount`: play as soon as the graph mounts.
|
|
5463
|
+
*/
|
|
5464
|
+
trigger?: 'visible' | 'mount';
|
|
5465
|
+
}
|
|
5375
5466
|
/**
|
|
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.
|
|
5467
|
+
* Per-phase and per-behavior motion config for a graph. A per-phase `false`
|
|
5468
|
+
* disables just that phase.
|
|
5383
5469
|
*/
|
|
5384
5470
|
interface GraphAnimationConfig {
|
|
5385
|
-
/** Node/edge reveal on first render. Default `{ duration: 500, ease: 'smooth', stagger: true }`. */
|
|
5386
|
-
enter?:
|
|
5471
|
+
/** Node/edge reveal on first render. Default `{ duration: 500, ease: 'smooth', stagger: true, trigger: 'visible' }`. */
|
|
5472
|
+
enter?: GraphEnterPhaseConfig | boolean;
|
|
5387
5473
|
/** Data-update enter-fade for newly added marks. Default `{ duration: 300, ease: 'smooth' }`. */
|
|
5388
|
-
update?:
|
|
5474
|
+
update?: GraphPhaseConfig | boolean;
|
|
5389
5475
|
/** Ghost fade-out for removed marks. Default `{ duration: 300, ease: 'smooth' }`. */
|
|
5390
|
-
exit?:
|
|
5476
|
+
exit?: GraphPhaseConfig | boolean;
|
|
5391
5477
|
/** Camera flight easing. Default duration `'auto'` (derived from the zoom distance). */
|
|
5392
5478
|
camera?: {
|
|
5393
5479
|
duration?: number;
|
|
@@ -5401,7 +5487,7 @@ interface GraphAnimationConfig {
|
|
|
5401
5487
|
}
|
|
5402
5488
|
/**
|
|
5403
5489
|
* Graph motion spec.
|
|
5404
|
-
* - omitted → full defaults
|
|
5490
|
+
* - omitted or `true` → full defaults
|
|
5405
5491
|
* - `false` → no choreography (warmup still applies)
|
|
5406
5492
|
* - object → per-phase control
|
|
5407
5493
|
*
|
|
@@ -5476,8 +5562,11 @@ interface GraphSpec {
|
|
|
5476
5562
|
/** Theme configuration overrides. */
|
|
5477
5563
|
theme?: ThemeConfig;
|
|
5478
5564
|
/**
|
|
5479
|
-
* Motion
|
|
5480
|
-
*
|
|
5565
|
+
* Motion. On by default: the entrance plays once the visualization scrolls
|
|
5566
|
+
* into view, and data updates animate. Set false to turn all motion off, or
|
|
5567
|
+
* pass an object to configure each phase. Static rendering and exports never
|
|
5568
|
+
* animate, and prefers-reduced-motion always wins. Layout warmup still runs
|
|
5569
|
+
* when false.
|
|
5481
5570
|
*/
|
|
5482
5571
|
animation?: GraphAnimationSpec;
|
|
5483
5572
|
/** Interaction behavior (hover mode, select-fly, opt-in physics). */
|
|
@@ -5626,7 +5715,12 @@ interface LayerSpec<TData extends DataRow = DataRow> {
|
|
|
5626
5715
|
hiddenSeries?: string[];
|
|
5627
5716
|
/** Endpoint labels column, inherited by child layers that don't set their own. */
|
|
5628
5717
|
endpointLabels?: boolean | EndpointLabelsConfig;
|
|
5629
|
-
/**
|
|
5718
|
+
/**
|
|
5719
|
+
* Motion. On by default: the entrance plays once the visualization scrolls
|
|
5720
|
+
* into view, and data updates animate. Set false to turn all motion off, or
|
|
5721
|
+
* pass an object to configure each phase. Static rendering and exports never
|
|
5722
|
+
* animate, and prefers-reduced-motion always wins.
|
|
5723
|
+
*/
|
|
5630
5724
|
animation?: AnimationSpec;
|
|
5631
5725
|
}
|
|
5632
5726
|
/** Node alignment strategy for sankey layout. */
|
|
@@ -5700,8 +5794,39 @@ interface SankeySpec {
|
|
|
5700
5794
|
theme?: ThemeConfig;
|
|
5701
5795
|
/** Whether to show the OpenData watermark. Defaults to true. */
|
|
5702
5796
|
watermark?: boolean;
|
|
5703
|
-
/**
|
|
5797
|
+
/**
|
|
5798
|
+
* Motion. On by default: the entrance plays once the visualization scrolls
|
|
5799
|
+
* into view, and data updates animate. Set false to turn all motion off, or
|
|
5800
|
+
* pass an object to configure each phase. Static rendering and exports never
|
|
5801
|
+
* animate, and prefers-reduced-motion always wins.
|
|
5802
|
+
*/
|
|
5704
5803
|
animation?: AnimationSpec;
|
|
5804
|
+
/**
|
|
5805
|
+
* Breakpoint-specific settings: `compact` applies under 400px, `medium` from
|
|
5806
|
+
* 400 to 700px. The active block merges over the top-level spec; `chrome`
|
|
5807
|
+
* merges one level deep, every other field replaces its top-level value.
|
|
5808
|
+
* Typical use: fold small flows into "Other" only on phones.
|
|
5809
|
+
*/
|
|
5810
|
+
overrides?: Partial<Record<'compact' | 'medium', SankeySpecOverride>>;
|
|
5811
|
+
}
|
|
5812
|
+
/**
|
|
5813
|
+
* Settings a sankey can change per breakpoint through `SankeySpec.overrides`.
|
|
5814
|
+
* Each field means what it means on `SankeySpec`.
|
|
5815
|
+
*/
|
|
5816
|
+
interface SankeySpecOverride {
|
|
5817
|
+
/** Editorial chrome at this breakpoint, merged over the top-level chrome. */
|
|
5818
|
+
chrome?: Chrome;
|
|
5819
|
+
/** "Other" bucketing at this breakpoint (see `SankeySpec.other`). */
|
|
5820
|
+
other?: number | {
|
|
5821
|
+
threshold: number;
|
|
5822
|
+
label?: string;
|
|
5823
|
+
};
|
|
5824
|
+
/** Node order at this breakpoint (see `SankeySpec.nodeSort`). */
|
|
5825
|
+
nodeSort?: string[];
|
|
5826
|
+
/** Label side at this breakpoint (see `SankeySpec.nodeLabelAlign`). */
|
|
5827
|
+
nodeLabelAlign?: 'auto' | 'left' | 'right';
|
|
5828
|
+
/** Vertical gap between nodes at this breakpoint, in pixels. */
|
|
5829
|
+
nodePadding?: number;
|
|
5705
5830
|
}
|
|
5706
5831
|
/** Encoding channels specific to tile map visualizations. */
|
|
5707
5832
|
interface TileMapEncoding {
|
|
@@ -5752,7 +5877,12 @@ interface TileMapSpec {
|
|
|
5752
5877
|
theme?: ThemeConfig;
|
|
5753
5878
|
/** Whether to show the OpenData watermark. Defaults to true. */
|
|
5754
5879
|
watermark?: boolean;
|
|
5755
|
-
/**
|
|
5880
|
+
/**
|
|
5881
|
+
* Motion. On by default: the entrance plays once the visualization scrolls
|
|
5882
|
+
* into view, and data updates animate. Set false to turn all motion off, or
|
|
5883
|
+
* pass an object to configure each phase. Static rendering and exports never
|
|
5884
|
+
* animate, and prefers-reduced-motion always wins.
|
|
5885
|
+
*/
|
|
5756
5886
|
animation?: AnimationSpec;
|
|
5757
5887
|
/**
|
|
5758
5888
|
* d3-format string applied to tile values, legend labels, and tooltips.
|
|
@@ -5927,7 +6057,12 @@ interface GeoMapSpec {
|
|
|
5927
6057
|
points?: GeoMapPointsLayer;
|
|
5928
6058
|
/** Authored labels with explicit feature, point, or coordinate anchors. */
|
|
5929
6059
|
callouts?: GeoCallout[];
|
|
5930
|
-
/**
|
|
6060
|
+
/**
|
|
6061
|
+
* Motion. On by default: the entrance plays once the visualization scrolls
|
|
6062
|
+
* into view, and data updates animate. Set false to turn all motion off, or
|
|
6063
|
+
* pass an object to configure each phase. Static rendering and exports never
|
|
6064
|
+
* animate, and prefers-reduced-motion always wins.
|
|
6065
|
+
*/
|
|
5931
6066
|
animation?: AnimationSpec;
|
|
5932
6067
|
}
|
|
5933
6068
|
interface BarListSpec {
|
|
@@ -5965,7 +6100,12 @@ interface BarListSpec {
|
|
|
5965
6100
|
theme?: ThemeConfig;
|
|
5966
6101
|
/** Whether to show the OpenData watermark. Defaults to true. */
|
|
5967
6102
|
watermark?: boolean;
|
|
5968
|
-
/**
|
|
6103
|
+
/**
|
|
6104
|
+
* Motion. On by default: the entrance plays once the visualization scrolls
|
|
6105
|
+
* into view, and data updates animate. Set false to turn all motion off, or
|
|
6106
|
+
* pass an object to configure each phase. Static rendering and exports never
|
|
6107
|
+
* animate, and prefers-reduced-motion always wins.
|
|
6108
|
+
*/
|
|
5969
6109
|
animation?: AnimationSpec;
|
|
5970
6110
|
}
|
|
5971
6111
|
/** Encoding channels for a barlist visualization. */
|
|
@@ -5985,6 +6125,110 @@ interface BarListEncoding {
|
|
|
5985
6125
|
/** Tooltip encoding (optional). */
|
|
5986
6126
|
tooltip?: EncodingChannel | EncodingChannel[];
|
|
5987
6127
|
}
|
|
6128
|
+
/** Mark used to draw each frame of a race. */
|
|
6129
|
+
type RaceMarkType = 'bar' | 'line' | 'table';
|
|
6130
|
+
interface RaceBarMarkDef {
|
|
6131
|
+
/** Draw horizontal bars. */
|
|
6132
|
+
type: 'bar';
|
|
6133
|
+
/** Bar corner radius in pixels. Omit to use square corners. */
|
|
6134
|
+
cornerRadius?: number;
|
|
6135
|
+
}
|
|
6136
|
+
interface RaceLineMarkDef {
|
|
6137
|
+
/** Draw a line for each ranked series. */
|
|
6138
|
+
type: 'line';
|
|
6139
|
+
/** Defaults to `reveal`, which expands the x domain to the playhead. `all` shows the full span. */
|
|
6140
|
+
window?: 'reveal' | 'all';
|
|
6141
|
+
}
|
|
6142
|
+
interface RaceTableMarkDef {
|
|
6143
|
+
/** Draw a table of ranked rows. */
|
|
6144
|
+
type: 'table';
|
|
6145
|
+
/** Ordered columns. Defaults to all six in the listed order, with `bar` hidden below 520px. */
|
|
6146
|
+
columns?: RaceTableColumn[];
|
|
6147
|
+
}
|
|
6148
|
+
/** Column in a race table. */
|
|
6149
|
+
type RaceTableColumn = 'rank' | 'change' | 'name' | 'bar' | 'value' | 'share';
|
|
6150
|
+
/** Race mark and its mark-specific options. */
|
|
6151
|
+
type RaceMarkDef = RaceBarMarkDef | RaceLineMarkDef | RaceTableMarkDef;
|
|
6152
|
+
type RaceFieldEncoding<TType extends FieldType = FieldType> = Omit<EncodingChannel, 'type'> & {
|
|
6153
|
+
/** How to interpret the field values. */
|
|
6154
|
+
type?: TType;
|
|
6155
|
+
};
|
|
6156
|
+
/** Field mappings shared by bar, line, and table races. */
|
|
6157
|
+
interface RaceEncoding {
|
|
6158
|
+
/** Playback field. Temporal dates or years and quantitative values sort by value. Ordinal values use `sort` or first-seen order. */
|
|
6159
|
+
time: RaceFieldEncoding<'temporal' | 'ordinal' | 'quantitative'>;
|
|
6160
|
+
/** Stable identity across periods. Also the display name by default. */
|
|
6161
|
+
key: RaceFieldEncoding;
|
|
6162
|
+
/** Numeric field to rank and draw. Defaults to quantitative. */
|
|
6163
|
+
value: RaceFieldEncoding<'quantitative'>;
|
|
6164
|
+
/** Field or constant CSS color. Defaults to coloring by key in order of first appearance in the top N. */
|
|
6165
|
+
color?: RaceFieldEncoding | {
|
|
6166
|
+
value: string;
|
|
6167
|
+
};
|
|
6168
|
+
/** Nominal display label. The last non-null label wins per key. Defaults to the key. */
|
|
6169
|
+
label?: RaceFieldEncoding<'nominal'>;
|
|
6170
|
+
}
|
|
6171
|
+
/** Ranking and playback options for a race. */
|
|
6172
|
+
interface RaceConfig {
|
|
6173
|
+
/** Number of visible slots. Defaults to 10. */
|
|
6174
|
+
top?: number;
|
|
6175
|
+
/** Total playback duration in milliseconds at 1× speed. Defaults to 700ms per period, clamped to 8000–90000ms. Mutually exclusive with `step`. */
|
|
6176
|
+
duration?: number;
|
|
6177
|
+
/** Duration per period in milliseconds. Omitted by default and mutually exclusive with `duration`. */
|
|
6178
|
+
step?: number;
|
|
6179
|
+
/** Reorder duration in milliseconds. Defaults to 400. */
|
|
6180
|
+
swap?: number;
|
|
6181
|
+
/** Value domain policy. Defaults to `frame` for the visible items. Use `fixed` for the full run or `{ min }` for a floor on the frame maximum. */
|
|
6182
|
+
rescale?: 'frame' | 'fixed' | {
|
|
6183
|
+
min: number;
|
|
6184
|
+
};
|
|
6185
|
+
/** Interior gap policy. Defaults to `interpolate`. Use `hold` to carry the previous value or `drop` to leave the value absent. */
|
|
6186
|
+
gaps?: 'interpolate' | 'hold' | 'drop';
|
|
6187
|
+
/** Time to dwell on the final frame in milliseconds. Defaults to 1500. */
|
|
6188
|
+
holdEnd?: number;
|
|
6189
|
+
/** Restart after the final hold. Defaults to false. */
|
|
6190
|
+
loop?: boolean;
|
|
6191
|
+
/** Start when 25% visible (`visible`, the default), immediately (`true`), or on demand (`false`). Reduced motion disables autoplay. */
|
|
6192
|
+
autoplay?: 'visible' | boolean;
|
|
6193
|
+
/** Show play/pause, scrubber, and period readout. Defaults to true. */
|
|
6194
|
+
controls?: boolean;
|
|
6195
|
+
/** Large period label. On by default with automatic placement and the time channel's format. Set false to hide it. */
|
|
6196
|
+
period?: false | {
|
|
6197
|
+
/** Overrides the time channel's format. */
|
|
6198
|
+
format?: string;
|
|
6199
|
+
};
|
|
6200
|
+
/** Show the sum of the top N values. Defaults to false. */
|
|
6201
|
+
summary?: 'sum' | false;
|
|
6202
|
+
}
|
|
6203
|
+
/** Animated top-N leaderboard over a sequence of periods. */
|
|
6204
|
+
interface RaceSpec {
|
|
6205
|
+
/** Discriminant, always `race`. */
|
|
6206
|
+
type: 'race';
|
|
6207
|
+
/** One data row per key and period. */
|
|
6208
|
+
data: DataRow[];
|
|
6209
|
+
/** Required bar, line, or table mark. A string uses that mark's default options. */
|
|
6210
|
+
mark: RaceMarkType | RaceMarkDef;
|
|
6211
|
+
/** Maps fields to time, key, value, and optional color and label. */
|
|
6212
|
+
encoding: RaceEncoding;
|
|
6213
|
+
/** Ranking and playback options. Omit to use the race defaults. */
|
|
6214
|
+
race?: RaceConfig;
|
|
6215
|
+
/** Editorial chrome. Omit to draw without authored title, subtitle, or other chrome text. */
|
|
6216
|
+
chrome?: Chrome;
|
|
6217
|
+
/** Theme overrides. Omit to use the default theme. */
|
|
6218
|
+
theme?: ThemeConfig;
|
|
6219
|
+
/** Accessibility overrides. Omit to use generated metadata. */
|
|
6220
|
+
a11y?: A11yConfig;
|
|
6221
|
+
/** Whether to show the OpenData watermark. Defaults to true. */
|
|
6222
|
+
watermark?: boolean;
|
|
6223
|
+
/** Fixed render width in pixels. Defaults to container-driven sizing. */
|
|
6224
|
+
width?: number;
|
|
6225
|
+
/** Fixed render height in pixels. Defaults to container-driven sizing. */
|
|
6226
|
+
height?: number;
|
|
6227
|
+
/** Value label format override. Omit to use the value channel's format or automatic formatting. */
|
|
6228
|
+
labels?: Pick<LabelConfig, 'format'>;
|
|
6229
|
+
/** Set false to disable autoplay and open on the final frame. Playback otherwise follows `race`. */
|
|
6230
|
+
animation?: AnimationSpec;
|
|
6231
|
+
}
|
|
5988
6232
|
/**
|
|
5989
6233
|
* Top-level visualization spec: union discriminated by structural shape.
|
|
5990
6234
|
*
|
|
@@ -5996,6 +6240,7 @@ interface BarListEncoding {
|
|
|
5996
6240
|
* - TileMapSpec: has `type: 'tilemap'`
|
|
5997
6241
|
* - GeoMapSpec: has `type: 'map'`
|
|
5998
6242
|
* - BarListSpec: has `type: 'barlist'`
|
|
6243
|
+
* - RaceSpec: has `type: 'race'`
|
|
5999
6244
|
*
|
|
6000
6245
|
* Election parliament (hemicycle) charts are `ChartSpec` with `mark:
|
|
6001
6246
|
* 'parliament'`, not a separate top-level type: seat data (party + seats)
|
|
@@ -6004,7 +6249,7 @@ interface BarListEncoding {
|
|
|
6004
6249
|
* for free instead of a second bespoke compile path (see
|
|
6005
6250
|
* `packages/engine/src/charts/parliament/`).
|
|
6006
6251
|
*/
|
|
6007
|
-
type VizSpec = ChartSpec | LayerSpec | TableSpec | GraphSpec | SankeySpec | TileMapSpec | GeoMapSpec | BarListSpec;
|
|
6252
|
+
type VizSpec = ChartSpec | LayerSpec | TableSpec | GraphSpec | SankeySpec | TileMapSpec | GeoMapSpec | BarListSpec | RaceSpec;
|
|
6008
6253
|
/**
|
|
6009
6254
|
* Chart spec without runtime data, for persistence/storage.
|
|
6010
6255
|
* Generic: `ChartSpecWithoutData<MyRow>` constrains encoding field names.
|
|
@@ -6024,8 +6269,10 @@ type GeoMapSpecWithoutData = Omit<GeoMapSpec, 'data' | 'points'> & {
|
|
|
6024
6269
|
};
|
|
6025
6270
|
/** BarList spec without runtime data, for persistence/storage. */
|
|
6026
6271
|
type BarListSpecWithoutData = Omit<BarListSpec, 'data'>;
|
|
6272
|
+
/** Race spec without runtime data, for persistence/storage. */
|
|
6273
|
+
type RaceSpecWithoutData = Omit<RaceSpec, 'data'>;
|
|
6027
6274
|
/** Union of data-stripped spec types for persistence/storage. */
|
|
6028
|
-
type StoredVizSpec = ChartSpecWithoutData | TableSpecWithoutData | GraphSpecWithoutData | SankeySpecWithoutData | TileMapSpecWithoutData | GeoMapSpecWithoutData | BarListSpecWithoutData;
|
|
6275
|
+
type StoredVizSpec = ChartSpecWithoutData | TableSpecWithoutData | GraphSpecWithoutData | SankeySpecWithoutData | TileMapSpecWithoutData | GeoMapSpecWithoutData | BarListSpecWithoutData | RaceSpecWithoutData;
|
|
6029
6276
|
/** Logical AND combinator for filter predicates. */
|
|
6030
6277
|
interface LogicalAnd<T> {
|
|
6031
6278
|
and: T[];
|
|
@@ -6290,7 +6537,7 @@ declare function resolveMarkType(mark: MarkType | MarkDef): MarkType;
|
|
|
6290
6537
|
* Extract the full MarkDef from a mark field, filling in defaults for string shorthand.
|
|
6291
6538
|
*/
|
|
6292
6539
|
declare function resolveMarkDef(mark: MarkType | MarkDef): MarkDef;
|
|
6293
|
-
/** Check if a spec
|
|
6540
|
+
/** Check if a spec has a chart mark and is neither a layer nor a race. */
|
|
6294
6541
|
declare function isChartSpec(spec: VizSpec | Record<string, unknown>): spec is ChartSpec;
|
|
6295
6542
|
/** Check if a spec is a LayerSpec (has `layer` array). */
|
|
6296
6543
|
declare function isLayerSpec(spec: VizSpec | Record<string, unknown>): spec is LayerSpec;
|
|
@@ -6304,6 +6551,8 @@ declare function isSankeySpec(spec: VizSpec | Record<string, unknown>): spec is
|
|
|
6304
6551
|
declare function isTileMapSpec(spec: VizSpec | Record<string, unknown>): spec is TileMapSpec;
|
|
6305
6552
|
/** Check if a spec is a BarListSpec. */
|
|
6306
6553
|
declare function isBarListSpec(spec: VizSpec | Record<string, unknown>): spec is BarListSpec;
|
|
6554
|
+
/** Check if a spec is a RaceSpec. */
|
|
6555
|
+
declare function isRaceSpec(spec: unknown): spec is RaceSpec;
|
|
6307
6556
|
/** Check if a spec is a GeoMapSpec. */
|
|
6308
6557
|
declare function isGeoMapSpec(spec: VizSpec | Record<string, unknown>): spec is GeoMapSpec;
|
|
6309
6558
|
/** Check if an annotation is a TextAnnotation. */
|
|
@@ -6573,6 +6822,290 @@ interface GeoReaderSelection {
|
|
|
6573
6822
|
announcement: string;
|
|
6574
6823
|
}
|
|
6575
6824
|
|
|
6825
|
+
interface RaceItem {
|
|
6826
|
+
key: string;
|
|
6827
|
+
label: string;
|
|
6828
|
+
color: string;
|
|
6829
|
+
value: number;
|
|
6830
|
+
valueLabel: string;
|
|
6831
|
+
rank: number;
|
|
6832
|
+
rankPos: number;
|
|
6833
|
+
opacity: number;
|
|
6834
|
+
change: number;
|
|
6835
|
+
}
|
|
6836
|
+
interface RaceFrame {
|
|
6837
|
+
t: number;
|
|
6838
|
+
period: {
|
|
6839
|
+
index: number;
|
|
6840
|
+
value: string | number;
|
|
6841
|
+
label: string;
|
|
6842
|
+
};
|
|
6843
|
+
items: RaceItem[];
|
|
6844
|
+
domain: [number, number];
|
|
6845
|
+
summary?: {
|
|
6846
|
+
value: number;
|
|
6847
|
+
label: string;
|
|
6848
|
+
};
|
|
6849
|
+
}
|
|
6850
|
+
interface RaceTick {
|
|
6851
|
+
value: number;
|
|
6852
|
+
label: string;
|
|
6853
|
+
opacity: number;
|
|
6854
|
+
position: number;
|
|
6855
|
+
/** Label position when it is offset from the tick or grid line. */
|
|
6856
|
+
labelPosition?: number;
|
|
6857
|
+
/** Additional paint opacity for labels that approach a neighbor. */
|
|
6858
|
+
labelOpacity?: number;
|
|
6859
|
+
}
|
|
6860
|
+
interface RacePlayback {
|
|
6861
|
+
durationMs: number;
|
|
6862
|
+
holdEndMs: number;
|
|
6863
|
+
loop: boolean;
|
|
6864
|
+
autoplay: 'visible' | boolean;
|
|
6865
|
+
controls: boolean;
|
|
6866
|
+
}
|
|
6867
|
+
interface RaceBarStatic {
|
|
6868
|
+
plot: Rect;
|
|
6869
|
+
clip: Rect;
|
|
6870
|
+
nameX: number;
|
|
6871
|
+
rowHeight: number;
|
|
6872
|
+
barHeight: number;
|
|
6873
|
+
cornerRadius: number;
|
|
6874
|
+
top: number;
|
|
6875
|
+
axisY: number;
|
|
6876
|
+
tickFontSize: number;
|
|
6877
|
+
period: {
|
|
6878
|
+
x: number;
|
|
6879
|
+
y: number;
|
|
6880
|
+
fontSize: number;
|
|
6881
|
+
} | null;
|
|
6882
|
+
summary: {
|
|
6883
|
+
x: number;
|
|
6884
|
+
y: number;
|
|
6885
|
+
} | null;
|
|
6886
|
+
}
|
|
6887
|
+
interface RaceBarRow {
|
|
6888
|
+
key: string;
|
|
6889
|
+
color: string;
|
|
6890
|
+
opacity: number;
|
|
6891
|
+
bar: Rect;
|
|
6892
|
+
name: {
|
|
6893
|
+
x: number;
|
|
6894
|
+
y: number;
|
|
6895
|
+
text: string;
|
|
6896
|
+
};
|
|
6897
|
+
value: {
|
|
6898
|
+
x: number;
|
|
6899
|
+
y: number;
|
|
6900
|
+
text: string;
|
|
6901
|
+
anchor: 'start' | 'end';
|
|
6902
|
+
};
|
|
6903
|
+
}
|
|
6904
|
+
interface RaceBarGeometry {
|
|
6905
|
+
mark: 'bar';
|
|
6906
|
+
rows: RaceBarRow[];
|
|
6907
|
+
ticks: RaceTick[];
|
|
6908
|
+
period: {
|
|
6909
|
+
x: number;
|
|
6910
|
+
y: number;
|
|
6911
|
+
fontSize: number;
|
|
6912
|
+
text: string;
|
|
6913
|
+
} | null;
|
|
6914
|
+
summary: {
|
|
6915
|
+
x: number;
|
|
6916
|
+
y: number;
|
|
6917
|
+
text: string;
|
|
6918
|
+
} | null;
|
|
6919
|
+
}
|
|
6920
|
+
interface RaceLineStatic {
|
|
6921
|
+
/** Bounds of the line plot in pixels. */
|
|
6922
|
+
plot: Rect;
|
|
6923
|
+
/** Controls whether the x axis reveals periods as the playhead advances or shows all periods. */
|
|
6924
|
+
window: 'reveal' | 'all';
|
|
6925
|
+
/** Full period-index domain and its pixel range. Reveal mode narrows the domain per frame. */
|
|
6926
|
+
xScale: {
|
|
6927
|
+
/** First and last period indices. */
|
|
6928
|
+
domain: [number, number];
|
|
6929
|
+
/** Left and right x coordinates in pixels. */
|
|
6930
|
+
range: [number, number];
|
|
6931
|
+
};
|
|
6932
|
+
/** Horizontal position of the y axis in pixels. */
|
|
6933
|
+
yAxisX: number;
|
|
6934
|
+
/** Width reserved to the right of the plot for line-end labels, in pixels. */
|
|
6935
|
+
labelGutter: number;
|
|
6936
|
+
/** Whether end labels also display values. */
|
|
6937
|
+
showValues: boolean;
|
|
6938
|
+
/** Font size for axis tick labels in pixels. */
|
|
6939
|
+
tickFontSize: number;
|
|
6940
|
+
/** Visibility and value history for each key that can be drawn. */
|
|
6941
|
+
history: Array<{
|
|
6942
|
+
/** Index into the race matrix. */
|
|
6943
|
+
key: number;
|
|
6944
|
+
/** Contiguous intervals in which the series has a visible head. */
|
|
6945
|
+
runs: Array<{
|
|
6946
|
+
start: number;
|
|
6947
|
+
end: number;
|
|
6948
|
+
peakTime: number;
|
|
6949
|
+
peakOpacity: number;
|
|
6950
|
+
}>;
|
|
6951
|
+
/** Running value bounds at each whole period. */
|
|
6952
|
+
mins: number[];
|
|
6953
|
+
maxes: number[];
|
|
6954
|
+
}>;
|
|
6955
|
+
}
|
|
6956
|
+
interface RaceLineGeometry {
|
|
6957
|
+
/** Identifies line geometry in a race frame. */
|
|
6958
|
+
mark: 'line';
|
|
6959
|
+
/** Series drawn in the current frame. */
|
|
6960
|
+
series: Array<{
|
|
6961
|
+
/** Stable key for the series. */
|
|
6962
|
+
key: string;
|
|
6963
|
+
/** Display color for the line and its name. */
|
|
6964
|
+
color: string;
|
|
6965
|
+
/** Opacity of the series in this frame. */
|
|
6966
|
+
opacity: number;
|
|
6967
|
+
/** Observed points through the current period, plus the interpolated head. Null marks a gap. */
|
|
6968
|
+
points: Array<Point | null>;
|
|
6969
|
+
/** Positioned name and value at the line's head. */
|
|
6970
|
+
endLabel: {
|
|
6971
|
+
/** Horizontal label position in pixels. */
|
|
6972
|
+
x: number;
|
|
6973
|
+
/** Vertical label position in pixels. */
|
|
6974
|
+
y: number;
|
|
6975
|
+
/** Series name to display. */
|
|
6976
|
+
text: string;
|
|
6977
|
+
/** Formatted value at the line's head. */
|
|
6978
|
+
value: string;
|
|
6979
|
+
/** Paint opacity when a crossing crowds the label. Defaults to the series opacity. */
|
|
6980
|
+
opacity?: number;
|
|
6981
|
+
/** Line head to connect to the displaced label. */
|
|
6982
|
+
leader?: Point & {
|
|
6983
|
+
opacity: number;
|
|
6984
|
+
};
|
|
6985
|
+
};
|
|
6986
|
+
}>;
|
|
6987
|
+
/** Period ticks on the horizontal axis. */
|
|
6988
|
+
xTicks: RaceTick[];
|
|
6989
|
+
/** Value ticks on the vertical axis. */
|
|
6990
|
+
yTicks: RaceTick[];
|
|
6991
|
+
/** Y-axis value domain. It can expand as the playhead advances. */
|
|
6992
|
+
domain: [number, number];
|
|
6993
|
+
}
|
|
6994
|
+
/** Display data for a cell in a race table row. */
|
|
6995
|
+
type RaceTableCell = {
|
|
6996
|
+
/** Identifies the rank column. */
|
|
6997
|
+
column: 'rank';
|
|
6998
|
+
/** Displayed rank for the current period. */
|
|
6999
|
+
text: string;
|
|
7000
|
+
} | {
|
|
7001
|
+
/** Identifies the change column. */
|
|
7002
|
+
column: 'change';
|
|
7003
|
+
/** Rank movement since the previous period, or `new` for a key entering the ranking. */
|
|
7004
|
+
direction: 'up' | 'down' | 'same' | 'new';
|
|
7005
|
+
/** Display text for the rank change. */
|
|
7006
|
+
text: string;
|
|
7007
|
+
} | {
|
|
7008
|
+
/** Identifies the name column. */
|
|
7009
|
+
column: 'name';
|
|
7010
|
+
/** Series name to display. */
|
|
7011
|
+
text: string;
|
|
7012
|
+
/** Series color for the chip next to the name. */
|
|
7013
|
+
color: string;
|
|
7014
|
+
} | {
|
|
7015
|
+
/** Identifies the inline bar column. */
|
|
7016
|
+
column: 'bar';
|
|
7017
|
+
/** Left edge of the inline bar in pixels. */
|
|
7018
|
+
x: number;
|
|
7019
|
+
/** Width of the inline bar in pixels. */
|
|
7020
|
+
width: number;
|
|
7021
|
+
/** Fill color of the inline bar. */
|
|
7022
|
+
color: string;
|
|
7023
|
+
} | {
|
|
7024
|
+
/** Identifies the value or share column. */
|
|
7025
|
+
column: 'value' | 'share';
|
|
7026
|
+
/** Formatted value or percentage share, according to the column. */
|
|
7027
|
+
text: string;
|
|
7028
|
+
};
|
|
7029
|
+
interface RaceTableStatic {
|
|
7030
|
+
/** Height of the clipped table body in pixels. */
|
|
7031
|
+
bodyHeight: number;
|
|
7032
|
+
/** Height of each row slot in pixels. */
|
|
7033
|
+
rowHeight: number;
|
|
7034
|
+
/** Height of the header row in pixels. */
|
|
7035
|
+
headerHeight: number;
|
|
7036
|
+
/** Whether the change heading uses a compact glyph. */
|
|
7037
|
+
compactChange: boolean;
|
|
7038
|
+
/** Horizontal padding on each side of a table cell in pixels. */
|
|
7039
|
+
cellPadding: number;
|
|
7040
|
+
/** Font size for table text in pixels. */
|
|
7041
|
+
fontSize: number;
|
|
7042
|
+
/** Columns in display order. */
|
|
7043
|
+
columns: Array<{
|
|
7044
|
+
/** Column identifier shared by the header and row cells. */
|
|
7045
|
+
column: RaceTableColumn;
|
|
7046
|
+
/** Horizontal position of the column in pixels. */
|
|
7047
|
+
x: number;
|
|
7048
|
+
/** Width of the column in pixels. */
|
|
7049
|
+
width: number;
|
|
7050
|
+
}>;
|
|
7051
|
+
/** Header text by column. */
|
|
7052
|
+
labels: Record<RaceTableColumn, string>;
|
|
7053
|
+
}
|
|
7054
|
+
interface RaceTableGeometry {
|
|
7055
|
+
/** Identifies table geometry in a race frame. */
|
|
7056
|
+
mark: 'table';
|
|
7057
|
+
/** Rows in draw order. */
|
|
7058
|
+
rows: Array<{
|
|
7059
|
+
/** Stable key for the row's series. */
|
|
7060
|
+
key: string;
|
|
7061
|
+
/** Vertical row position in pixels. */
|
|
7062
|
+
y: number;
|
|
7063
|
+
/** Opacity of the row in this frame. */
|
|
7064
|
+
opacity: number;
|
|
7065
|
+
/** Zero-based displayed rank, when supplied by the race layout. */
|
|
7066
|
+
rank?: number;
|
|
7067
|
+
/** Whether the row is sliding through the bottom edge of the table. */
|
|
7068
|
+
atEdge?: boolean;
|
|
7069
|
+
/** Vertical adjustment to keep cell content inside the table body. */
|
|
7070
|
+
contentOffset: number;
|
|
7071
|
+
/** Cell data in the static column order. */
|
|
7072
|
+
cells: RaceTableCell[];
|
|
7073
|
+
}>;
|
|
7074
|
+
}
|
|
7075
|
+
type RaceGeometry = RaceBarGeometry | RaceLineGeometry | RaceTableGeometry;
|
|
7076
|
+
interface RaceLayoutBase {
|
|
7077
|
+
width: number;
|
|
7078
|
+
height: number;
|
|
7079
|
+
chrome: ResolvedChrome;
|
|
7080
|
+
theme: ResolvedTheme;
|
|
7081
|
+
a11y: A11yMetadata;
|
|
7082
|
+
watermark: boolean;
|
|
7083
|
+
periods: string[];
|
|
7084
|
+
/** Per-key colors resolved for the active theme. Used by `raceGeometryAt` for mark presentation. */
|
|
7085
|
+
colors: string[];
|
|
7086
|
+
/**
|
|
7087
|
+
* Per-key display labels for `raceGeometryAt`, possibly truncated to fit the gutter.
|
|
7088
|
+
* `raceFrameAt` uses the matrix's full labels for accessibility and export.
|
|
7089
|
+
*/
|
|
7090
|
+
labels: string[];
|
|
7091
|
+
/** Text measurer the layout was computed with; renderers reuse it so chrome wraps identically. */
|
|
7092
|
+
measureText?: MeasureTextFn;
|
|
7093
|
+
playback: RacePlayback;
|
|
7094
|
+
warnings?: CompileWarning[];
|
|
7095
|
+
/** Area below chrome where the mark draws. */
|
|
7096
|
+
area: Rect;
|
|
7097
|
+
}
|
|
7098
|
+
type RaceLayout = (RaceLayoutBase & {
|
|
7099
|
+
mark: 'bar';
|
|
7100
|
+
static: RaceBarStatic;
|
|
7101
|
+
}) | (RaceLayoutBase & {
|
|
7102
|
+
mark: 'line';
|
|
7103
|
+
static: RaceLineStatic;
|
|
7104
|
+
}) | (RaceLayoutBase & {
|
|
7105
|
+
mark: 'table';
|
|
7106
|
+
static: RaceTableStatic;
|
|
7107
|
+
});
|
|
7108
|
+
|
|
6576
7109
|
type ReaderDomainValue = {
|
|
6577
7110
|
kind: 'string';
|
|
6578
7111
|
value: string;
|
|
@@ -6929,6 +7462,16 @@ declare const wire: ThemeConfig;
|
|
|
6929
7462
|
* 5 #3a8a6e oklch(0.576 0.090 167) green
|
|
6930
7463
|
* 6 #8c8680 oklch(0.623 0.011 68) warm gray
|
|
6931
7464
|
* Fills are the same hues one step lighter (L +0.06, chroma -12%).
|
|
7465
|
+
*
|
|
7466
|
+
* Dark mode is the same page after nightfall: the newsprint gives way to an
|
|
7467
|
+
* ink-blue ground, with the same hues lifted to hold their contrast on it.
|
|
7468
|
+
* Palette (dark; checked with the Brettel simulator, nearest simulated pair
|
|
7469
|
+
* 31.6 under deuteranopia against a threshold of 30, every stroke at 5.8:1
|
|
7470
|
+
* or better and every fill at 5.3:1 or better on #12181f):
|
|
7471
|
+
* 1 #5e9fd6 ink blue, lifted 2 #f4655a house red, lifted
|
|
7472
|
+
* 3 #93c2e2 pale blue 4 #e0b267 ochre
|
|
7473
|
+
* 5 #4fb093 green 6 #9aa1a8 gray, cooled
|
|
7474
|
+
* Fills sit a step lighter and quieter than their strokes, as in light mode.
|
|
6932
7475
|
*/
|
|
6933
7476
|
declare const broadsheet: ThemeConfig;
|
|
6934
7477
|
/**
|
|
@@ -7235,7 +7778,7 @@ declare function maxRotatedLabelWidth(tickAngle: number, tickFontSize: number):
|
|
|
7235
7778
|
* Truncate a label with an ellipsis so it fits inside an explicit pixel budget.
|
|
7236
7779
|
* Returns the label unchanged when it already fits.
|
|
7237
7780
|
*
|
|
7238
|
-
* Binary-search on
|
|
7781
|
+
* Binary-search on Unicode code point count against the real measure function, so it
|
|
7239
7782
|
* respects proportional fonts rather than assuming a fixed character width.
|
|
7240
7783
|
*/
|
|
7241
7784
|
declare function truncateToWidth(label: string, budget: number, fontSize: number, fontWeight: number, measure?: (text: string, fontSize: number, fontWeight?: number) => number): string;
|
|
@@ -7665,6 +8208,239 @@ declare function annotationSource(spec: unknown): {
|
|
|
7665
8208
|
path: string;
|
|
7666
8209
|
};
|
|
7667
8210
|
|
|
8211
|
+
interface CurveStop {
|
|
8212
|
+
/** Input progress in [0, 1]. */
|
|
8213
|
+
t: number;
|
|
8214
|
+
/** Output value. May leave [0, 1] (overshoot) unless the curve is monotone. */
|
|
8215
|
+
value: number;
|
|
8216
|
+
}
|
|
8217
|
+
/** Evenly spaced values, or positioned stops with strictly increasing `t`. */
|
|
8218
|
+
type CurveInput = readonly number[] | readonly CurveStop[];
|
|
8219
|
+
declare const CURVE_INPUTS: {
|
|
8220
|
+
/** Decks snap: a fast attack for quick fades and short accents. */
|
|
8221
|
+
readonly snap: readonly CurveStop[];
|
|
8222
|
+
/** Soft ease-out with a gentle start. The sampled source of the default `smooth`. */
|
|
8223
|
+
readonly glide: readonly CurveStop[];
|
|
8224
|
+
/** The default ease: an alias of `glide`, so the default improves with no spec change. */
|
|
8225
|
+
readonly smooth: readonly CurveStop[];
|
|
8226
|
+
/** Today's old `smooth` (a gentle ease-out), kept under its own name. */
|
|
8227
|
+
readonly gentle: readonly [0, 0.157, 0.438, 0.64, 0.766, 0.85, 0.906, 0.941, 0.964, 0.978, 0.988, 0.994, 0.998, 1];
|
|
8228
|
+
/**
|
|
8229
|
+
* Monotone, non-overshooting ease-out, faster than `snap`. Sampled from
|
|
8230
|
+
* `M0,0 C0.04,0.75 0.12,0.97 0.3,0.995 C0.4,1 0.5,1 0.6,1` then held at 1: it is
|
|
8231
|
+
* ~0.78 at t=0.1 (snap: ~0.67), 0.951 at 0.2, reaches 0.999 by t~0.45 and
|
|
8232
|
+
* is exactly 1 from t=0.55, so it settles sooner than `snap` or `smooth`.
|
|
8233
|
+
*/
|
|
8234
|
+
readonly snappy: readonly [{
|
|
8235
|
+
readonly t: 0;
|
|
8236
|
+
readonly value: 0;
|
|
8237
|
+
}, {
|
|
8238
|
+
readonly t: 0.02;
|
|
8239
|
+
readonly value: 0.2926;
|
|
8240
|
+
}, {
|
|
8241
|
+
readonly t: 0.04;
|
|
8242
|
+
readonly value: 0.4806;
|
|
8243
|
+
}, {
|
|
8244
|
+
readonly t: 0.06;
|
|
8245
|
+
readonly value: 0.6111;
|
|
8246
|
+
}, {
|
|
8247
|
+
readonly t: 0.08;
|
|
8248
|
+
readonly value: 0.7061;
|
|
8249
|
+
}, {
|
|
8250
|
+
readonly t: 0.1;
|
|
8251
|
+
readonly value: 0.7772;
|
|
8252
|
+
}, {
|
|
8253
|
+
readonly t: 0.12;
|
|
8254
|
+
readonly value: 0.8315;
|
|
8255
|
+
}, {
|
|
8256
|
+
readonly t: 0.14;
|
|
8257
|
+
readonly value: 0.8735;
|
|
8258
|
+
}, {
|
|
8259
|
+
readonly t: 0.16;
|
|
8260
|
+
readonly value: 0.9061;
|
|
8261
|
+
}, {
|
|
8262
|
+
readonly t: 0.18;
|
|
8263
|
+
readonly value: 0.9314;
|
|
8264
|
+
}, {
|
|
8265
|
+
readonly t: 0.2;
|
|
8266
|
+
readonly value: 0.951;
|
|
8267
|
+
}, {
|
|
8268
|
+
readonly t: 0.22;
|
|
8269
|
+
readonly value: 0.966;
|
|
8270
|
+
}, {
|
|
8271
|
+
readonly t: 0.24;
|
|
8272
|
+
readonly value: 0.9773;
|
|
8273
|
+
}, {
|
|
8274
|
+
readonly t: 0.26;
|
|
8275
|
+
readonly value: 0.9855;
|
|
8276
|
+
}, {
|
|
8277
|
+
readonly t: 0.28;
|
|
8278
|
+
readonly value: 0.9913;
|
|
8279
|
+
}, {
|
|
8280
|
+
readonly t: 0.3;
|
|
8281
|
+
readonly value: 0.995;
|
|
8282
|
+
}, {
|
|
8283
|
+
readonly t: 0.35;
|
|
8284
|
+
readonly value: 0.9971;
|
|
8285
|
+
}, {
|
|
8286
|
+
readonly t: 0.4;
|
|
8287
|
+
readonly value: 0.9985;
|
|
8288
|
+
}, {
|
|
8289
|
+
readonly t: 0.45;
|
|
8290
|
+
readonly value: 0.9994;
|
|
8291
|
+
}, {
|
|
8292
|
+
readonly t: 0.5;
|
|
8293
|
+
readonly value: 0.9998;
|
|
8294
|
+
}, {
|
|
8295
|
+
readonly t: 0.55;
|
|
8296
|
+
readonly value: 1;
|
|
8297
|
+
}, {
|
|
8298
|
+
readonly t: 0.6;
|
|
8299
|
+
readonly value: 1;
|
|
8300
|
+
}, {
|
|
8301
|
+
readonly t: 0.8;
|
|
8302
|
+
readonly value: 1;
|
|
8303
|
+
}, {
|
|
8304
|
+
readonly t: 1;
|
|
8305
|
+
readonly value: 1;
|
|
8306
|
+
}];
|
|
8307
|
+
/**
|
|
8308
|
+
* Accent only (annotation markers and the like): Decks
|
|
8309
|
+
* `M0,0 C0.1,0.7 0.18,1.13 0.4,1.06 C0.58,0.99 0.8,1 1,1` overshoots to ~1.067
|
|
8310
|
+
* near t=0.35 and settles by ~0.8. NOT monotone, so it is never an authored
|
|
8311
|
+
* ease and never used for value-encoding geometry (use evalValueCurve there).
|
|
8312
|
+
*/
|
|
8313
|
+
readonly punch: readonly [{
|
|
8314
|
+
readonly t: 0;
|
|
8315
|
+
readonly value: 0;
|
|
8316
|
+
}, {
|
|
8317
|
+
readonly t: 0.025;
|
|
8318
|
+
readonly value: 0.1714;
|
|
8319
|
+
}, {
|
|
8320
|
+
readonly t: 0.05;
|
|
8321
|
+
readonly value: 0.3321;
|
|
8322
|
+
}, {
|
|
8323
|
+
readonly t: 0.075;
|
|
8324
|
+
readonly value: 0.4776;
|
|
8325
|
+
}, {
|
|
8326
|
+
readonly t: 0.1;
|
|
8327
|
+
readonly value: 0.605;
|
|
8328
|
+
}, {
|
|
8329
|
+
readonly t: 0.125;
|
|
8330
|
+
readonly value: 0.7132;
|
|
8331
|
+
}, {
|
|
8332
|
+
readonly t: 0.15;
|
|
8333
|
+
readonly value: 0.8029;
|
|
8334
|
+
}, {
|
|
8335
|
+
readonly t: 0.175;
|
|
8336
|
+
readonly value: 0.8757;
|
|
8337
|
+
}, {
|
|
8338
|
+
readonly t: 0.2;
|
|
8339
|
+
readonly value: 0.9336;
|
|
8340
|
+
}, {
|
|
8341
|
+
readonly t: 0.225;
|
|
8342
|
+
readonly value: 0.9787;
|
|
8343
|
+
}, {
|
|
8344
|
+
readonly t: 0.25;
|
|
8345
|
+
readonly value: 1.0127;
|
|
8346
|
+
}, {
|
|
8347
|
+
readonly t: 0.275;
|
|
8348
|
+
readonly value: 1.0373;
|
|
8349
|
+
}, {
|
|
8350
|
+
readonly t: 0.3;
|
|
8351
|
+
readonly value: 1.0539;
|
|
8352
|
+
}, {
|
|
8353
|
+
readonly t: 0.325;
|
|
8354
|
+
readonly value: 1.0636;
|
|
8355
|
+
}, {
|
|
8356
|
+
readonly t: 0.35;
|
|
8357
|
+
readonly value: 1.0673;
|
|
8358
|
+
}, {
|
|
8359
|
+
readonly t: 0.375;
|
|
8360
|
+
readonly value: 1.0659;
|
|
8361
|
+
}, {
|
|
8362
|
+
readonly t: 0.4;
|
|
8363
|
+
readonly value: 1.06;
|
|
8364
|
+
}, {
|
|
8365
|
+
readonly t: 0.425;
|
|
8366
|
+
readonly value: 1.0509;
|
|
8367
|
+
}, {
|
|
8368
|
+
readonly t: 0.45;
|
|
8369
|
+
readonly value: 1.0428;
|
|
8370
|
+
}, {
|
|
8371
|
+
readonly t: 0.475;
|
|
8372
|
+
readonly value: 1.0358;
|
|
8373
|
+
}, {
|
|
8374
|
+
readonly t: 0.5;
|
|
8375
|
+
readonly value: 1.0296;
|
|
8376
|
+
}, {
|
|
8377
|
+
readonly t: 0.55;
|
|
8378
|
+
readonly value: 1.0196;
|
|
8379
|
+
}, {
|
|
8380
|
+
readonly t: 0.6;
|
|
8381
|
+
readonly value: 1.0122;
|
|
8382
|
+
}, {
|
|
8383
|
+
readonly t: 0.65;
|
|
8384
|
+
readonly value: 1.0069;
|
|
8385
|
+
}, {
|
|
8386
|
+
readonly t: 0.7;
|
|
8387
|
+
readonly value: 1.0033;
|
|
8388
|
+
}, {
|
|
8389
|
+
readonly t: 0.75;
|
|
8390
|
+
readonly value: 1.0011;
|
|
8391
|
+
}, {
|
|
8392
|
+
readonly t: 0.8;
|
|
8393
|
+
readonly value: 0.9999;
|
|
8394
|
+
}, {
|
|
8395
|
+
readonly t: 0.85;
|
|
8396
|
+
readonly value: 0.9995;
|
|
8397
|
+
}, {
|
|
8398
|
+
readonly t: 0.9;
|
|
8399
|
+
readonly value: 0.9996;
|
|
8400
|
+
}, {
|
|
8401
|
+
readonly t: 0.95;
|
|
8402
|
+
readonly value: 0.9998;
|
|
8403
|
+
}, {
|
|
8404
|
+
readonly t: 1;
|
|
8405
|
+
readonly value: 1;
|
|
8406
|
+
}];
|
|
8407
|
+
};
|
|
8408
|
+
type CurveName = keyof typeof CURVE_INPUTS;
|
|
8409
|
+
/**
|
|
8410
|
+
* Curves `invertCurve` accepts. Kept as a type so a non-monotone curve is a
|
|
8411
|
+
* compile error; a test pins it to the runtime monotonicity check.
|
|
8412
|
+
*/
|
|
8413
|
+
type MonotoneCurveName = 'snap' | 'glide' | 'smooth' | 'snappy' | 'gentle';
|
|
8414
|
+
/** Names of every registered curve, in registry order. */
|
|
8415
|
+
declare const CURVE_NAMES: readonly CurveName[];
|
|
8416
|
+
/** The curve's stops, for consumers that need the raw data (tests, generators). */
|
|
8417
|
+
declare function curveStops(name: CurveName): readonly CurveStop[];
|
|
8418
|
+
/** Whether a curve is monotone from 0 to 1 (so it can be inverted). */
|
|
8419
|
+
declare function isMonotoneCurve(name: CurveName): boolean;
|
|
8420
|
+
/** Evaluate a curve at t (clamped to [0, 1]), piecewise-linearly like CSS linear(). */
|
|
8421
|
+
declare function evalCurve(name: CurveName, t: number): number;
|
|
8422
|
+
/**
|
|
8423
|
+
* Evaluate a curve for value-encoding geometry: the output is clamped to
|
|
8424
|
+
* [0, 1] and then replaced by its running maximum, so no curve can overshoot
|
|
8425
|
+
* or dip back. On a monotone curve this equals evalCurve.
|
|
8426
|
+
*/
|
|
8427
|
+
declare function evalValueCurve(name: CurveName, t: number): number;
|
|
8428
|
+
/**
|
|
8429
|
+
* The first t at which a monotone curve reaches progress p (clamped to [0, 1]).
|
|
8430
|
+
* Used to place delays at a progress point of a parent's tween.
|
|
8431
|
+
*/
|
|
8432
|
+
declare function invertCurve(name: MonotoneCurveName, p: number): number;
|
|
8433
|
+
/**
|
|
8434
|
+
* Emit a curve as a CSS `linear()` easing. Evenly spaced curves emit bare
|
|
8435
|
+
* values; positioned curves emit `value t%` pairs. With `indent`, each stop goes
|
|
8436
|
+
* on its own line (the tokens.css layout), indented two spaces past `indent`.
|
|
8437
|
+
*/
|
|
8438
|
+
declare function curveToCSSLinear(name: CurveName, options?: {
|
|
8439
|
+
indent?: string;
|
|
8440
|
+
}): string;
|
|
8441
|
+
/** Evaluate a CSS cubic-bezier(x1, y1, x2, y2) at time progress t. */
|
|
8442
|
+
declare function evalCubicBezier(bezier: readonly [number, number, number, number], t: number): number;
|
|
8443
|
+
|
|
7668
8444
|
/** Deterministic, bounded motion shared by rendering and timestamp-based export. */
|
|
7669
8445
|
|
|
7670
8446
|
interface MotionPhase {
|
|
@@ -7689,6 +8465,689 @@ declare function sampleMotion(phase: MotionPhase, elapsedMs: number): MotionSamp
|
|
|
7689
8465
|
/** CSS samples use the same clock and evaluator as SVG, canvas, and export. */
|
|
7690
8466
|
declare function motionCSS(phase: MotionPhase): string;
|
|
7691
8467
|
|
|
8468
|
+
/**
|
|
8469
|
+
* Choreography table: every entrance role, its keyframe, curve, durations and
|
|
8470
|
+
* delay rule, in one place.
|
|
8471
|
+
*
|
|
8472
|
+
* `scripts/generate-motion-css.mjs` emits `styles/keyframes.css`,
|
|
8473
|
+
* `styles/animation.css` and `styles/table-animation.css` from KEYFRAMES and
|
|
8474
|
+
* ENTRANCE_ROLES. GIF export, the canvas entrance and the cleanup timer read
|
|
8475
|
+
* the same data through `entranceTiming`, `entranceEndMs`, `evalRoleEase` and
|
|
8476
|
+
* `evalKeyframes`, so the CSS and the JS paths cannot drift.
|
|
8477
|
+
*
|
|
8478
|
+
* Delays keyed to a parent's tween are progress points ("when the parent
|
|
8479
|
+
* reaches p"), resolved through the parent's actual curve for the phase
|
|
8480
|
+
* (`invertRoleEase`), never a raw fraction of the duration. CSS can't invert a
|
|
8481
|
+
* curve, so renderers stamp the resolved offsets (`entranceAnchorVars`); the
|
|
8482
|
+
* generated CSS falls back to the default `smooth` resolution.
|
|
8483
|
+
*/
|
|
8484
|
+
|
|
8485
|
+
type KeyframeProperty = 'opacity' | 'clip-path' | 'transform' | 'fill' | 'r' | 'fill-opacity';
|
|
8486
|
+
type KeyframeValue = {
|
|
8487
|
+
type: 'number';
|
|
8488
|
+
value: number;
|
|
8489
|
+
}
|
|
8490
|
+
/** clip-path: inset(top right bottom left), each in percent. */
|
|
8491
|
+
| {
|
|
8492
|
+
type: 'inset';
|
|
8493
|
+
top: number;
|
|
8494
|
+
right: number;
|
|
8495
|
+
bottom: number;
|
|
8496
|
+
left: number;
|
|
8497
|
+
} | {
|
|
8498
|
+
type: 'translateY';
|
|
8499
|
+
value: number;
|
|
8500
|
+
unit: 'px' | 'em';
|
|
8501
|
+
} | {
|
|
8502
|
+
type: 'translate';
|
|
8503
|
+
x: number;
|
|
8504
|
+
y: number;
|
|
8505
|
+
} | {
|
|
8506
|
+
type: 'scale';
|
|
8507
|
+
value: number;
|
|
8508
|
+
}
|
|
8509
|
+
/** A value JS cannot interpolate (custom properties); switches discretely. */
|
|
8510
|
+
| {
|
|
8511
|
+
type: 'css';
|
|
8512
|
+
css: string;
|
|
8513
|
+
};
|
|
8514
|
+
interface KeyframeStop {
|
|
8515
|
+
/** Offset in [0, 1] (0 = from, 1 = to). */
|
|
8516
|
+
offset: number;
|
|
8517
|
+
values: Readonly<Partial<Record<KeyframeProperty, KeyframeValue>>>;
|
|
8518
|
+
}
|
|
8519
|
+
interface KeyframeDef {
|
|
8520
|
+
comment: string;
|
|
8521
|
+
stops: readonly KeyframeStop[];
|
|
8522
|
+
}
|
|
8523
|
+
/** Every @keyframes in styles/keyframes.css, in emission order. */
|
|
8524
|
+
declare const KEYFRAMES: {
|
|
8525
|
+
readonly 'oc-enter-bar': {
|
|
8526
|
+
readonly comment: "Bar entrance: clip-path reveal from the baseline (vertical columns), no fade:\na value mark is solid from its first frame. Grows bottom-to-top unless the\nrenderer stamps --oc-bar-from (a negative column grows top-to-bottom).";
|
|
8527
|
+
readonly stops: readonly [{
|
|
8528
|
+
readonly offset: 0;
|
|
8529
|
+
readonly values: {
|
|
8530
|
+
readonly 'clip-path': KeyframeValue;
|
|
8531
|
+
};
|
|
8532
|
+
}, {
|
|
8533
|
+
readonly offset: 1;
|
|
8534
|
+
readonly values: {
|
|
8535
|
+
readonly 'clip-path': KeyframeValue;
|
|
8536
|
+
};
|
|
8537
|
+
}];
|
|
8538
|
+
};
|
|
8539
|
+
readonly 'oc-enter-bar-h': {
|
|
8540
|
+
readonly comment: "Bar entrance: clip-path reveal from the baseline (horizontal bars), no fade.\nGrows left-to-right unless --oc-bar-from is stamped (negative bars).";
|
|
8541
|
+
readonly stops: readonly [{
|
|
8542
|
+
readonly offset: 0;
|
|
8543
|
+
readonly values: {
|
|
8544
|
+
readonly 'clip-path': KeyframeValue;
|
|
8545
|
+
};
|
|
8546
|
+
}, {
|
|
8547
|
+
readonly offset: 1;
|
|
8548
|
+
readonly values: {
|
|
8549
|
+
readonly 'clip-path': KeyframeValue;
|
|
8550
|
+
};
|
|
8551
|
+
}];
|
|
8552
|
+
};
|
|
8553
|
+
readonly 'oc-enter-stack': {
|
|
8554
|
+
readonly comment: "Stack entrance: one clip over the whole stack, no fade. Grows bottom-to-top\nfrom --oc-stack-from, which the renderer stamps when the baseline is not the\nbottom edge, so the clip starts collapsed on the baseline and grows both\nways from it.";
|
|
8555
|
+
readonly stops: readonly [{
|
|
8556
|
+
readonly offset: 0;
|
|
8557
|
+
readonly values: {
|
|
8558
|
+
readonly 'clip-path': KeyframeValue;
|
|
8559
|
+
};
|
|
8560
|
+
}, {
|
|
8561
|
+
readonly offset: 1;
|
|
8562
|
+
readonly values: {
|
|
8563
|
+
readonly 'clip-path': KeyframeValue;
|
|
8564
|
+
};
|
|
8565
|
+
}];
|
|
8566
|
+
};
|
|
8567
|
+
readonly 'oc-enter-stack-h': {
|
|
8568
|
+
readonly comment: "Horizontal stack entrance: grows left-to-right, or both ways from the\nbaseline when --oc-stack-from is stamped.";
|
|
8569
|
+
readonly stops: readonly [{
|
|
8570
|
+
readonly offset: 0;
|
|
8571
|
+
readonly values: {
|
|
8572
|
+
readonly 'clip-path': KeyframeValue;
|
|
8573
|
+
};
|
|
8574
|
+
}, {
|
|
8575
|
+
readonly offset: 1;
|
|
8576
|
+
readonly values: {
|
|
8577
|
+
readonly 'clip-path': KeyframeValue;
|
|
8578
|
+
};
|
|
8579
|
+
}];
|
|
8580
|
+
};
|
|
8581
|
+
readonly 'oc-enter-line': {
|
|
8582
|
+
readonly comment: "Line/area entrance: clip-path reveal left-to-right + fade in.\nLines draw in following reading direction with a soft lead-in.";
|
|
8583
|
+
readonly stops: readonly [{
|
|
8584
|
+
readonly offset: 0;
|
|
8585
|
+
readonly values: {
|
|
8586
|
+
readonly 'clip-path': KeyframeValue;
|
|
8587
|
+
readonly opacity: KeyframeValue;
|
|
8588
|
+
};
|
|
8589
|
+
}, {
|
|
8590
|
+
readonly offset: 0.15;
|
|
8591
|
+
readonly values: {
|
|
8592
|
+
readonly opacity: KeyframeValue;
|
|
8593
|
+
};
|
|
8594
|
+
}, {
|
|
8595
|
+
readonly offset: 1;
|
|
8596
|
+
readonly values: {
|
|
8597
|
+
readonly 'clip-path': KeyframeValue;
|
|
8598
|
+
readonly opacity: KeyframeValue;
|
|
8599
|
+
};
|
|
8600
|
+
}];
|
|
8601
|
+
};
|
|
8602
|
+
readonly 'oc-enter-point': {
|
|
8603
|
+
readonly comment: "Point/arc entrance: scale up + fade in from center";
|
|
8604
|
+
readonly stops: readonly [{
|
|
8605
|
+
readonly offset: 0;
|
|
8606
|
+
readonly values: {
|
|
8607
|
+
readonly opacity: KeyframeValue;
|
|
8608
|
+
readonly transform: KeyframeValue;
|
|
8609
|
+
};
|
|
8610
|
+
}, {
|
|
8611
|
+
readonly offset: 1;
|
|
8612
|
+
readonly values: {
|
|
8613
|
+
readonly opacity: KeyframeValue;
|
|
8614
|
+
readonly transform: KeyframeValue;
|
|
8615
|
+
};
|
|
8616
|
+
}];
|
|
8617
|
+
};
|
|
8618
|
+
readonly 'oc-enter-map-fill': {
|
|
8619
|
+
readonly comment: "Map feature entrance: fade in while transitioning fill from a neutral base\nto the data-driven color stored in --oc-feature-fill. The target opacity is\n--oc-feature-target-opacity (default 1) so features under a focus dim\nanimate straight to their dimmed rest opacity instead of hitting 1 and then\nsnapping down when the dim is applied post-animation.\nNon-interpolable fills (the url(#pattern) hatch on no-data features) do not\ntransition: the browser holds the neutral and flips to the pattern when the\neased progress passes 50%, so those features fade in rather than\ncross-fade.";
|
|
8620
|
+
readonly stops: readonly [{
|
|
8621
|
+
readonly offset: 0;
|
|
8622
|
+
readonly values: {
|
|
8623
|
+
readonly fill: KeyframeValue;
|
|
8624
|
+
readonly opacity: KeyframeValue;
|
|
8625
|
+
};
|
|
8626
|
+
}, {
|
|
8627
|
+
readonly offset: 1;
|
|
8628
|
+
readonly values: {
|
|
8629
|
+
readonly fill: KeyframeValue;
|
|
8630
|
+
readonly opacity: KeyframeValue;
|
|
8631
|
+
};
|
|
8632
|
+
}];
|
|
8633
|
+
};
|
|
8634
|
+
readonly 'oc-enter-map-point': {
|
|
8635
|
+
readonly comment: "Map point pop-in: gentle scale from 0.75 + fade. Uses transform-origin to\nscale from the circle's own center (cx/cy) rather than the SVG origin.";
|
|
8636
|
+
readonly stops: readonly [{
|
|
8637
|
+
readonly offset: 0;
|
|
8638
|
+
readonly values: {
|
|
8639
|
+
readonly opacity: KeyframeValue;
|
|
8640
|
+
readonly transform: KeyframeValue;
|
|
8641
|
+
};
|
|
8642
|
+
}, {
|
|
8643
|
+
readonly offset: 1;
|
|
8644
|
+
readonly values: {
|
|
8645
|
+
readonly opacity: KeyframeValue;
|
|
8646
|
+
readonly transform: KeyframeValue;
|
|
8647
|
+
};
|
|
8648
|
+
}];
|
|
8649
|
+
};
|
|
8650
|
+
readonly 'oc-enter-pop': {
|
|
8651
|
+
readonly comment: "Line point pop: fade in while scaling up from 0.4. The renderer stamps an\ninline px transform-origin at the point centre, so it grows in place\n(and in GIF frames, which carry no animation CSS).";
|
|
8652
|
+
readonly stops: readonly [{
|
|
8653
|
+
readonly offset: 0;
|
|
8654
|
+
readonly values: {
|
|
8655
|
+
readonly opacity: KeyframeValue;
|
|
8656
|
+
readonly transform: KeyframeValue;
|
|
8657
|
+
};
|
|
8658
|
+
}, {
|
|
8659
|
+
readonly offset: 1;
|
|
8660
|
+
readonly values: {
|
|
8661
|
+
readonly opacity: KeyframeValue;
|
|
8662
|
+
readonly transform: KeyframeValue;
|
|
8663
|
+
};
|
|
8664
|
+
}];
|
|
8665
|
+
};
|
|
8666
|
+
readonly 'oc-enter-cell': {
|
|
8667
|
+
readonly comment: "Grid cell pop: fade in while scaling up from 0.85 about the cell centre\n(inline px transform-origin stamped by the renderer).";
|
|
8668
|
+
readonly stops: readonly [{
|
|
8669
|
+
readonly offset: 0;
|
|
8670
|
+
readonly values: {
|
|
8671
|
+
readonly opacity: KeyframeValue;
|
|
8672
|
+
readonly transform: KeyframeValue;
|
|
8673
|
+
};
|
|
8674
|
+
}, {
|
|
8675
|
+
readonly offset: 1;
|
|
8676
|
+
readonly values: {
|
|
8677
|
+
readonly opacity: KeyframeValue;
|
|
8678
|
+
readonly transform: KeyframeValue;
|
|
8679
|
+
};
|
|
8680
|
+
}];
|
|
8681
|
+
};
|
|
8682
|
+
readonly 'oc-enter-arc': {
|
|
8683
|
+
readonly comment: "Slice growth: fade in while scaling up from 0.94. The slice path is drawn\naround its group's local origin (the group carries translate(cx, cy)), so\nthe default transform-origin of 0 0 is the pie centre.";
|
|
8684
|
+
readonly stops: readonly [{
|
|
8685
|
+
readonly offset: 0;
|
|
8686
|
+
readonly values: {
|
|
8687
|
+
readonly opacity: KeyframeValue;
|
|
8688
|
+
readonly transform: KeyframeValue;
|
|
8689
|
+
};
|
|
8690
|
+
}, {
|
|
8691
|
+
readonly offset: 1;
|
|
8692
|
+
readonly values: {
|
|
8693
|
+
readonly opacity: KeyframeValue;
|
|
8694
|
+
readonly transform: KeyframeValue;
|
|
8695
|
+
};
|
|
8696
|
+
}];
|
|
8697
|
+
};
|
|
8698
|
+
readonly 'oc-enter-fade-only': {
|
|
8699
|
+
readonly comment: "Pure opacity fade (no transform). Safe for elements with existing transforms\nlike arc groups that use translate() for positioning.";
|
|
8700
|
+
readonly stops: readonly [{
|
|
8701
|
+
readonly offset: 0;
|
|
8702
|
+
readonly values: {
|
|
8703
|
+
readonly opacity: KeyframeValue;
|
|
8704
|
+
};
|
|
8705
|
+
}, {
|
|
8706
|
+
readonly offset: 1;
|
|
8707
|
+
readonly values: {
|
|
8708
|
+
readonly opacity: KeyframeValue;
|
|
8709
|
+
};
|
|
8710
|
+
}];
|
|
8711
|
+
};
|
|
8712
|
+
readonly 'oc-enter-fade': {
|
|
8713
|
+
readonly comment: "Fade + subtle slide up (table chrome)";
|
|
8714
|
+
readonly stops: readonly [{
|
|
8715
|
+
readonly offset: 0;
|
|
8716
|
+
readonly values: {
|
|
8717
|
+
readonly opacity: KeyframeValue;
|
|
8718
|
+
readonly transform: KeyframeValue;
|
|
8719
|
+
};
|
|
8720
|
+
}, {
|
|
8721
|
+
readonly offset: 1;
|
|
8722
|
+
readonly values: {
|
|
8723
|
+
readonly opacity: KeyframeValue;
|
|
8724
|
+
readonly transform: KeyframeValue;
|
|
8725
|
+
};
|
|
8726
|
+
}];
|
|
8727
|
+
};
|
|
8728
|
+
readonly 'oc-enter-rise': {
|
|
8729
|
+
readonly comment: "Text rise: 0.6em up to rest. Its opacity runs as a separate quick fade.";
|
|
8730
|
+
readonly stops: readonly [{
|
|
8731
|
+
readonly offset: 0;
|
|
8732
|
+
readonly values: {
|
|
8733
|
+
readonly transform: KeyframeValue;
|
|
8734
|
+
};
|
|
8735
|
+
}, {
|
|
8736
|
+
readonly offset: 1;
|
|
8737
|
+
readonly values: {
|
|
8738
|
+
readonly transform: KeyframeValue;
|
|
8739
|
+
};
|
|
8740
|
+
}];
|
|
8741
|
+
};
|
|
8742
|
+
readonly 'oc-enter-slide': {
|
|
8743
|
+
readonly comment: "Row slide: 4px up to rest. Its opacity runs as a separate quick fade.";
|
|
8744
|
+
readonly stops: readonly [{
|
|
8745
|
+
readonly offset: 0;
|
|
8746
|
+
readonly values: {
|
|
8747
|
+
readonly transform: KeyframeValue;
|
|
8748
|
+
};
|
|
8749
|
+
}, {
|
|
8750
|
+
readonly offset: 1;
|
|
8751
|
+
readonly values: {
|
|
8752
|
+
readonly transform: KeyframeValue;
|
|
8753
|
+
};
|
|
8754
|
+
}];
|
|
8755
|
+
};
|
|
8756
|
+
readonly 'oc-table-enter-row': {
|
|
8757
|
+
readonly comment: "Table row entrance: slide up only, no opacity (cells fade independently\nto avoid opacity compounding between row and cell animations)";
|
|
8758
|
+
readonly stops: readonly [{
|
|
8759
|
+
readonly offset: 0;
|
|
8760
|
+
readonly values: {
|
|
8761
|
+
readonly transform: KeyframeValue;
|
|
8762
|
+
};
|
|
8763
|
+
}, {
|
|
8764
|
+
readonly offset: 1;
|
|
8765
|
+
readonly values: {
|
|
8766
|
+
readonly transform: KeyframeValue;
|
|
8767
|
+
};
|
|
8768
|
+
}];
|
|
8769
|
+
};
|
|
8770
|
+
readonly 'oc-table-enter-bar-fill': {
|
|
8771
|
+
readonly comment: "Table bar fill entrance: clip-path grow only, no opacity\n(preserves resting opacity: 0.15 from table.css)";
|
|
8772
|
+
readonly stops: readonly [{
|
|
8773
|
+
readonly offset: 0;
|
|
8774
|
+
readonly values: {
|
|
8775
|
+
readonly 'clip-path': KeyframeValue;
|
|
8776
|
+
};
|
|
8777
|
+
}, {
|
|
8778
|
+
readonly offset: 1;
|
|
8779
|
+
readonly values: {
|
|
8780
|
+
readonly 'clip-path': KeyframeValue;
|
|
8781
|
+
};
|
|
8782
|
+
}];
|
|
8783
|
+
};
|
|
8784
|
+
readonly 'oc-pulse': {
|
|
8785
|
+
readonly comment: "Live-tile pulse: the terminator dot of a sparkline swells once when new\ndata lands, so a glance at a wall of tiles catches which one just moved.\n`r` is animated as a presentation attribute (SVG geometry properties are\nanimatable in CSS); the fallback is simply no swell.";
|
|
8786
|
+
readonly stops: readonly [{
|
|
8787
|
+
readonly offset: 0;
|
|
8788
|
+
readonly values: {
|
|
8789
|
+
readonly r: KeyframeValue;
|
|
8790
|
+
readonly 'fill-opacity': KeyframeValue;
|
|
8791
|
+
};
|
|
8792
|
+
}, {
|
|
8793
|
+
readonly offset: 0.45;
|
|
8794
|
+
readonly values: {
|
|
8795
|
+
readonly r: KeyframeValue;
|
|
8796
|
+
readonly 'fill-opacity': KeyframeValue;
|
|
8797
|
+
};
|
|
8798
|
+
}, {
|
|
8799
|
+
readonly offset: 1;
|
|
8800
|
+
readonly values: {
|
|
8801
|
+
readonly r: KeyframeValue;
|
|
8802
|
+
readonly 'fill-opacity': KeyframeValue;
|
|
8803
|
+
};
|
|
8804
|
+
}];
|
|
8805
|
+
};
|
|
8806
|
+
readonly 'oc-tooltip-in': {
|
|
8807
|
+
readonly comment: "Tooltip entrance";
|
|
8808
|
+
readonly stops: readonly [{
|
|
8809
|
+
readonly offset: 0;
|
|
8810
|
+
readonly values: {
|
|
8811
|
+
readonly opacity: KeyframeValue;
|
|
8812
|
+
readonly transform: KeyframeValue;
|
|
8813
|
+
};
|
|
8814
|
+
}, {
|
|
8815
|
+
readonly offset: 1;
|
|
8816
|
+
readonly values: {
|
|
8817
|
+
readonly opacity: KeyframeValue;
|
|
8818
|
+
readonly transform: KeyframeValue;
|
|
8819
|
+
};
|
|
8820
|
+
}];
|
|
8821
|
+
};
|
|
8822
|
+
};
|
|
8823
|
+
type KeyframeName = keyof typeof KEYFRAMES;
|
|
8824
|
+
/** Serialize a keyframe value as CSS. */
|
|
8825
|
+
declare function keyframeValueToCSS(value: KeyframeValue): string;
|
|
8826
|
+
/**
|
|
8827
|
+
* Evaluate a keyframe at time progress t in [0, 1], CSS-style: each property
|
|
8828
|
+
* interpolates between the stops that specify it, and `ease` is applied within
|
|
8829
|
+
* each such segment (the animation-timing-function applies per keyframe
|
|
8830
|
+
* segment, not across the whole animation).
|
|
8831
|
+
*/
|
|
8832
|
+
declare function evalKeyframes(name: KeyframeName, t: number, ease: (progress: number) => number): Partial<Record<KeyframeProperty, KeyframeValue>>;
|
|
8833
|
+
/** Properties a keyframe animates, in first-seen order. */
|
|
8834
|
+
declare function keyframeProperties(name: KeyframeName): KeyframeProperty[];
|
|
8835
|
+
type EntranceRole = 'bar' | 'bar-h' | 'cell' | 'stack-reveal' | 'stack-reveal-h' | 'line-area' | 'arc' | 'point' | 'line-point' | 'text' | 'rule' | 'tick' | 'label' | 'arc-label' | 'endpoint-label' | 'annotation' | 'tilemap-tile' | 'map-feature' | 'map-bulk' | 'map-border' | 'map-point' | 'sankey-node' | 'sankey-link' | 'barlist-row' | 'barlist-bar' | 'table-chrome' | 'table-thead' | 'table-row' | 'table-cell' | 'table-heatmap-cell' | 'table-bar-fill' | 'table-sparkline' | 'table-sparkline-dot' | 'table-search-pagination';
|
|
8836
|
+
/** The easing a role's CSS uses. */
|
|
8837
|
+
type RoleTiming =
|
|
8838
|
+
/** The author's ease: `var(--oc-animation-ease, var(--oc-ease-smooth))` (spring-aware). */
|
|
8839
|
+
{
|
|
8840
|
+
kind: 'author';
|
|
8841
|
+
}
|
|
8842
|
+
/** A registry curve regardless of the author's ease (annotations). */
|
|
8843
|
+
| {
|
|
8844
|
+
kind: 'curve';
|
|
8845
|
+
curve: CurveName;
|
|
8846
|
+
}
|
|
8847
|
+
/** A fixed CSS timing function, with its cubic-bezier control points for JS. */
|
|
8848
|
+
| {
|
|
8849
|
+
kind: 'css';
|
|
8850
|
+
css: string;
|
|
8851
|
+
bezier: readonly [number, number, number, number];
|
|
8852
|
+
};
|
|
8853
|
+
/** Animation duration of a role, from the base duration D. */
|
|
8854
|
+
type DurationRule = {
|
|
8855
|
+
kind: 'base';
|
|
8856
|
+
factor: number;
|
|
8857
|
+
} | {
|
|
8858
|
+
kind: 'fixed';
|
|
8859
|
+
ms: number;
|
|
8860
|
+
};
|
|
8861
|
+
/**
|
|
8862
|
+
* When a role starts, relative to something else's tween. Never a raw
|
|
8863
|
+
* fraction of the duration: a progress point is resolved through the
|
|
8864
|
+
* parent's actual curve, so it means "when the parent has visibly got there"
|
|
8865
|
+
* whichever ease the author picked.
|
|
8866
|
+
*/
|
|
8867
|
+
type DelayAnchor =
|
|
8868
|
+
/**
|
|
8869
|
+
* When the parent role's tween reaches `progress`. The parent is taken at
|
|
8870
|
+
* index 0 (its stagger is the child's own), or at the context's
|
|
8871
|
+
* `lastMarkIndex` with `ofLast` (annotations wait for the last mark).
|
|
8872
|
+
*/
|
|
8873
|
+
{
|
|
8874
|
+
kind: 'progress';
|
|
8875
|
+
progress: number;
|
|
8876
|
+
of: EntranceRole;
|
|
8877
|
+
ofLast?: boolean;
|
|
8878
|
+
}
|
|
8879
|
+
/** A progress point of the map feature sweep: `progress * MAP_SWEEP_BUDGET_MS`. */
|
|
8880
|
+
| {
|
|
8881
|
+
kind: 'sweep';
|
|
8882
|
+
progress: number;
|
|
8883
|
+
};
|
|
8884
|
+
/** How entering elements of a role are spread out by index. */
|
|
8885
|
+
type StaggerRule = 'none'
|
|
8886
|
+
/** `index * --oc-animation-stagger`, index from `--oc-mark-index`. */
|
|
8887
|
+
| 'mark'
|
|
8888
|
+
/** `index * --oc-animation-stagger`, index from `--oc-row-index` (tables). */
|
|
8889
|
+
| 'row'
|
|
8890
|
+
/** `index * --oc-point-stagger` (60ms fallback); the map stamps clampStaggerDelay. */
|
|
8891
|
+
| 'map-point'
|
|
8892
|
+
/** Stamped `--oc-map-delay`; JS: shuffled slot index * map stagger (mapSweepTiming). */
|
|
8893
|
+
| 'map-sweep'
|
|
8894
|
+
/** Stamped `--oc-tile-delay`; JS: the context's delayMs (tilemapTileDelays). */
|
|
8895
|
+
| 'tilemap-tile';
|
|
8896
|
+
interface DelayRule {
|
|
8897
|
+
/** Start at this anchor (omitted = at once), then add the stagger. */
|
|
8898
|
+
after?: DelayAnchor;
|
|
8899
|
+
/** Add `--oc-annotation-delay` (150ms fallback) on top. */
|
|
8900
|
+
plusAnnotationDelay?: boolean;
|
|
8901
|
+
stagger: StaggerRule;
|
|
8902
|
+
}
|
|
8903
|
+
interface EntranceRoleDef {
|
|
8904
|
+
name: EntranceRole;
|
|
8905
|
+
/** Which generated stylesheet and root selector the rule lives under. */
|
|
8906
|
+
scope: 'chart' | 'table';
|
|
8907
|
+
/** Selectors relative to the scope root. */
|
|
8908
|
+
selectors: readonly string[];
|
|
8909
|
+
/**
|
|
8910
|
+
* Which declarations the CSS rule writes. `shorthand` writes the full
|
|
8911
|
+
* `animation` shorthand plus delay; a list writes only those longhands and
|
|
8912
|
+
* inherits the rest from an earlier, less specific role.
|
|
8913
|
+
*/
|
|
8914
|
+
emit: 'shorthand' | readonly ('name' | 'duration' | 'timing' | 'delay')[];
|
|
8915
|
+
keyframe: KeyframeName;
|
|
8916
|
+
/** Bar-family roles play this keyframe when their group is horizontal. */
|
|
8917
|
+
horizontalKeyframe?: KeyframeName;
|
|
8918
|
+
timing: RoleTiming;
|
|
8919
|
+
/** What D is: the phase duration, or the map's capped feature duration. */
|
|
8920
|
+
durationBasis: 'phase' | 'map';
|
|
8921
|
+
duration: DurationRule;
|
|
8922
|
+
/**
|
|
8923
|
+
* A second, quick opacity animation on the same element and delay
|
|
8924
|
+
* (`oc-enter-fade-only` over `ms` on FADE_CURVE), so text is readable almost
|
|
8925
|
+
* at once while its geometry keeps settling. Needs `emit: 'shorthand'`.
|
|
8926
|
+
*/
|
|
8927
|
+
fade?: {
|
|
8928
|
+
ms: number;
|
|
8929
|
+
};
|
|
8930
|
+
delay: DelayRule;
|
|
8931
|
+
/** Descendant selectors whose own animation this role switches off. */
|
|
8932
|
+
suppress?: readonly string[];
|
|
8933
|
+
/** Accent roles (annotation markers and the like) may use overshooting curves such as `punch`. */
|
|
8934
|
+
accent?: boolean;
|
|
8935
|
+
comment?: string;
|
|
8936
|
+
}
|
|
8937
|
+
/** A role row with its derived fields. */
|
|
8938
|
+
interface EntranceRoleRow extends EntranceRoleDef {
|
|
8939
|
+
/** Share of the duration over which non-opacity properties move (0 if none). */
|
|
8940
|
+
geometryFraction: number;
|
|
8941
|
+
/** Share of the duration after which the keyframe's own opacity has settled (0 if none). */
|
|
8942
|
+
opacityFraction: number;
|
|
8943
|
+
/**
|
|
8944
|
+
* Role-scoped custom properties the generated CSS reads first: a full
|
|
8945
|
+
* per-element delay, a duration, and the root-stamped anchor offset
|
|
8946
|
+
* (`after`) that the anchor resolves to for this render's curve.
|
|
8947
|
+
*/
|
|
8948
|
+
vars: {
|
|
8949
|
+
delay: string;
|
|
8950
|
+
duration: string;
|
|
8951
|
+
after: string;
|
|
8952
|
+
};
|
|
8953
|
+
}
|
|
8954
|
+
/** Curve of the quick opacity track on roles with `fade`. */
|
|
8955
|
+
declare const FADE_CURVE: CurveName;
|
|
8956
|
+
/** Line points cascade left to right over this window once their line has drawn. */
|
|
8957
|
+
declare const LINE_POINT_CASCADE_MS = 240;
|
|
8958
|
+
/**
|
|
8959
|
+
* Role-scoped custom property names (`--oc-<role>-delay`, `-dur`, `-after`).
|
|
8960
|
+
* Scoped per role because custom properties inherit: a barlist bar sits inside
|
|
8961
|
+
* its row, a table cell inside its row, a segment inside a stack wrapper.
|
|
8962
|
+
*/
|
|
8963
|
+
declare function roleVars(role: EntranceRole): {
|
|
8964
|
+
delay: string;
|
|
8965
|
+
duration: string;
|
|
8966
|
+
after: string;
|
|
8967
|
+
};
|
|
8968
|
+
/** Every entrance role, in CSS emission order (order matters for the cascade). */
|
|
8969
|
+
declare const ENTRANCE_ROLES: readonly EntranceRoleRow[];
|
|
8970
|
+
declare function entranceRole(role: EntranceRole): EntranceRoleRow;
|
|
8971
|
+
/** Inputs the CSS reads from stamped custom properties. Defaults are the CSS fallbacks. */
|
|
8972
|
+
interface EntranceTimingContext {
|
|
8973
|
+
/** `--oc-animation-stagger`, already clamped (clampStaggerDelay / mapSweepTiming). Default 80. */
|
|
8974
|
+
staggerMs?: number;
|
|
8975
|
+
/** `--oc-annotation-delay`. Default 150. */
|
|
8976
|
+
annotationDelayMs?: number;
|
|
8977
|
+
/** `--oc-point-stagger` for map points (clampStaggerDelay). Default 60. */
|
|
8978
|
+
pointStaggerMs?: number;
|
|
8979
|
+
/** A per-element stamped delay (tilemap tiles: tilemapTileDelays). Default 0. */
|
|
8980
|
+
delayMs?: number;
|
|
8981
|
+
/**
|
|
8982
|
+
* A per-element stamped role delay (`--oc-<role>-delay`, e.g. a line point
|
|
8983
|
+
* keyed on its x). Replaces the whole delay rule, as the CSS does.
|
|
8984
|
+
*/
|
|
8985
|
+
stampedDelayMs?: number;
|
|
8986
|
+
/** Root-stamped anchor offsets (`--oc-<role>-after`), per role. */
|
|
8987
|
+
afterMs?: Partial<Record<EntranceRole, number>>;
|
|
8988
|
+
/** Stagger index of the last mark, for anchors with `ofLast`. Default 0. */
|
|
8989
|
+
lastMarkIndex?: number;
|
|
8990
|
+
}
|
|
8991
|
+
interface EntranceTiming {
|
|
8992
|
+
/** When the element starts, from the entrance start. */
|
|
8993
|
+
delayMs: number;
|
|
8994
|
+
/** The CSS animation-duration of the role's keyframe. */
|
|
8995
|
+
durationMs: number;
|
|
8996
|
+
/** How long non-opacity properties (clip, transform, fill) move; 0 if none. */
|
|
8997
|
+
geometryMs: number;
|
|
8998
|
+
/** How long until opacity settles; 0 if opacity doesn't animate. */
|
|
8999
|
+
opacityMs: number;
|
|
9000
|
+
/** Duration of the separate quick fade track; 0 when the role has none. */
|
|
9001
|
+
fadeMs: number;
|
|
9002
|
+
}
|
|
9003
|
+
/** The base duration D a role's CSS sees as `--oc-animation-duration`. */
|
|
9004
|
+
declare function roleBaseDuration(role: EntranceRole, phase: MotionPhase): number;
|
|
9005
|
+
/**
|
|
9006
|
+
* When the element at `index` of a role has reached `progress` of its own
|
|
9007
|
+
* tween, in ms from the entrance start: its delay plus the first time its
|
|
9008
|
+
* curve reaches that progress.
|
|
9009
|
+
*/
|
|
9010
|
+
declare function progressTimeMs(role: EntranceRole, index: number, phase: MotionPhase, context: EntranceTimingContext, progress: number): number;
|
|
9011
|
+
/**
|
|
9012
|
+
* The index-free part of a role's delay: where its anchor lands for this
|
|
9013
|
+
* phase, in ms. This is what the renderer stamps as `--oc-<role>-after`.
|
|
9014
|
+
*/
|
|
9015
|
+
declare function anchorMs(role: EntranceRole, phase: MotionPhase, context?: EntranceTimingContext): number;
|
|
9016
|
+
/**
|
|
9017
|
+
* Root custom properties for every anchored role in a scope: the anchor
|
|
9018
|
+
* offsets the generated CSS reads (`--oc-<role>-after`), resolved through
|
|
9019
|
+
* this phase's curve. CSS can't invert a curve, so the renderer does it here.
|
|
9020
|
+
*/
|
|
9021
|
+
declare function entranceAnchorVars(phase: MotionPhase, context?: EntranceTimingContext, scope?: 'chart' | 'table'): Record<string, string>;
|
|
9022
|
+
/**
|
|
9023
|
+
* Timing of the element at `index` of a role, in ms, matching what the
|
|
9024
|
+
* generated CSS computes from the stamped custom properties.
|
|
9025
|
+
*/
|
|
9026
|
+
declare function entranceTiming(role: EntranceRole, index: number, phase: MotionPhase, context?: EntranceTimingContext): EntranceTiming;
|
|
9027
|
+
/** How many elements of a role animate, and the extremes that set its end. */
|
|
9028
|
+
interface EntranceRoleExtent {
|
|
9029
|
+
count: number;
|
|
9030
|
+
/** Highest index (default count - 1). */
|
|
9031
|
+
maxIndex?: number;
|
|
9032
|
+
/** Highest stamped delay (tilemap-tile). */
|
|
9033
|
+
maxDelayMs?: number;
|
|
9034
|
+
/** Highest per-element stamped role delay (`--oc-<role>-delay`). */
|
|
9035
|
+
maxStampedDelayMs?: number;
|
|
9036
|
+
/** How many of `count` carry a stamped role delay (default 0). */
|
|
9037
|
+
stampedCount?: number;
|
|
9038
|
+
}
|
|
9039
|
+
interface EntranceEndContext extends Omit<EntranceTimingContext, 'delayMs' | 'stampedDelayMs'> {
|
|
9040
|
+
phase: MotionPhase;
|
|
9041
|
+
/** Elements per role: a count, or an extent. Roles with no elements are skipped. */
|
|
9042
|
+
roles: Partial<Record<EntranceRole, number | EntranceRoleExtent>>;
|
|
9043
|
+
}
|
|
9044
|
+
/**
|
|
9045
|
+
* When the last animated element finishes, in ms from the entrance start: the
|
|
9046
|
+
* max of `delay + duration` (or its fade, if longer) over every role present.
|
|
9047
|
+
* No buffer is added.
|
|
9048
|
+
*/
|
|
9049
|
+
declare function entranceEndMs(context: EntranceEndContext): number;
|
|
9050
|
+
/**
|
|
9051
|
+
* The eased progress a role's CSS timing function gives at time progress t of
|
|
9052
|
+
* one keyframe segment. Author-eased roles follow the phase: a spring is
|
|
9053
|
+
* sampled over the base duration D (as `motionCSS` stamps it), otherwise the
|
|
9054
|
+
* registry curve. Mirrors the CSS, so it can overshoot on a spring.
|
|
9055
|
+
*/
|
|
9056
|
+
declare function evalRoleEase(role: EntranceRole, phase: MotionPhase, t: number): number;
|
|
9057
|
+
/**
|
|
9058
|
+
* The first share of a role's tween at which its eased progress reaches p:
|
|
9059
|
+
* the inverse of `evalRoleEase`. Monotone registry curves invert exactly;
|
|
9060
|
+
* springs and CSS beziers are searched.
|
|
9061
|
+
*/
|
|
9062
|
+
declare function invertRoleEase(role: EntranceRole, phase: MotionPhase, p: number): number;
|
|
9063
|
+
/**
|
|
9064
|
+
* Default exit: a removed mark's ghost fades (and collapses, for rects and
|
|
9065
|
+
* arcs) over 120ms. `gentle` is the fast ease-out here: on a 120ms window
|
|
9066
|
+
* `snap`/`snappy` are ~90% done in under 25ms, which reads as a pop, not a
|
|
9067
|
+
* fade. Exit geometry goes through `sampleMotion`, so it stays in [from, to].
|
|
9068
|
+
*/
|
|
9069
|
+
declare const EXIT_FADE_MS = 120;
|
|
9070
|
+
declare const EXIT_CURVE: "gentle";
|
|
9071
|
+
/** Marks entering during an update start once survivors reach this share of their tween's time. */
|
|
9072
|
+
declare const UPDATE_ENTER_START = 0.4;
|
|
9073
|
+
/** When each track of an update transition runs, in ms from its start. */
|
|
9074
|
+
interface UpdateTimeline {
|
|
9075
|
+
/** Removal ghosts fade over [0, exitMs]. */
|
|
9076
|
+
exitMs: number;
|
|
9077
|
+
/** Survivors (and chrome, labels, color) start moving here. */
|
|
9078
|
+
updateDelayMs: number;
|
|
9079
|
+
/** Entering marks fade in from here... */
|
|
9080
|
+
enterDelayMs: number;
|
|
9081
|
+
/** ...over this long, ending with the survivors. */
|
|
9082
|
+
enterMs: number;
|
|
9083
|
+
/** End of the whole transition. */
|
|
9084
|
+
totalMs: number;
|
|
9085
|
+
}
|
|
9086
|
+
/**
|
|
9087
|
+
* Lay out an update transition. On `snap`, a survivor sliding into a removed
|
|
9088
|
+
* mark's slot touches the ghost within ~25ms (a bar's neighbour covers the
|
|
9089
|
+
* band gap at ~0.4 progress), so no fade short enough to run alongside it
|
|
9090
|
+
* can clear first. When the update removes marks, survivors therefore hold
|
|
9091
|
+
* until the exit has finished, and enters keep their place relative to the
|
|
9092
|
+
* survivors. Without removals there is nothing to clear and nothing waits.
|
|
9093
|
+
*/
|
|
9094
|
+
declare function updateTimeline(update: MotionPhase, exit: MotionPhase, hasRemovals: boolean): UpdateTimeline;
|
|
9095
|
+
|
|
9096
|
+
/**
|
|
9097
|
+
* Stagger strategies: how far apart entering elements start.
|
|
9098
|
+
*
|
|
9099
|
+
* Every renderer's per-index delay formula lives here so the CSS, canvas and
|
|
9100
|
+
* export paths share one copy.
|
|
9101
|
+
*/
|
|
9102
|
+
/** Maximum total stagger time in ms. Keeps the whole sweep inside one beat. */
|
|
9103
|
+
declare const MAX_TOTAL_STAGGER_MS = 450;
|
|
9104
|
+
/**
|
|
9105
|
+
* Gap between consecutive entering elements: the authored delay is a ceiling,
|
|
9106
|
+
* and the whole spread never exceeds MAX_TOTAL_STAGGER_MS, so
|
|
9107
|
+
* `gap = min(delay, 450 / (n - 1))`. Five bars at the default 80ms land 80ms
|
|
9108
|
+
* apart (the cap allows 112.5); forty land 450/39 ms apart. A delay of 0 stays 0, and one element
|
|
9109
|
+
* has no gap.
|
|
9110
|
+
*/
|
|
9111
|
+
declare function clampStaggerDelay(delay: number, elementCount: number): number;
|
|
9112
|
+
/** Spread of grid-cell (heatmap, waffle, calendar) start times, in ms. */
|
|
9113
|
+
declare const CELL_SWEEP_BUDGET_MS = 600;
|
|
9114
|
+
/**
|
|
9115
|
+
* Start times for `count` elements spread evenly over `budgetMs`, then
|
|
9116
|
+
* shuffled with a seeded Fisher-Yates so they fill in no visible pattern.
|
|
9117
|
+
* The same seed always gives the same order.
|
|
9118
|
+
*/
|
|
9119
|
+
declare function shuffledSweepDelays(count: number, budgetMs: number, seed: number): number[];
|
|
9120
|
+
/** Map point stagger fallback used by the CSS when the renderer stamps none. */
|
|
9121
|
+
declare const MAP_POINT_STAGGER_FALLBACK_MS = 60;
|
|
9122
|
+
/** Cap on a single map feature's fill animation, in ms. */
|
|
9123
|
+
declare const MAP_FEATURE_MAX_DURATION_MS = 500;
|
|
9124
|
+
/**
|
|
9125
|
+
* Spread of map feature start times, in ms. A constant (the old 1.2x budget at
|
|
9126
|
+
* a 450ms enter), so a longer enter duration doesn't add waiting to maps.
|
|
9127
|
+
*/
|
|
9128
|
+
declare const MAP_SWEEP_BUDGET_MS = 540;
|
|
9129
|
+
/** The duration the map renderer stamps as `--oc-animation-duration`. */
|
|
9130
|
+
declare function mapFeatureDuration(durationMs: number): number;
|
|
9131
|
+
interface MapSweepTiming {
|
|
9132
|
+
/** Per-feature animation duration (`min(duration, 500)`). */
|
|
9133
|
+
featureDurationMs: number;
|
|
9134
|
+
/** Total spread of feature start times (MAP_SWEEP_BUDGET_MS, 0 in bulk mode). */
|
|
9135
|
+
budgetMs: number;
|
|
9136
|
+
/** Gap between consecutive shuffled feature slots (`budget / (n - 1)`). */
|
|
9137
|
+
staggerMs: number;
|
|
9138
|
+
}
|
|
9139
|
+
/**
|
|
9140
|
+
* Map feature sweep: features start at evenly spaced (then shuffled) slots
|
|
9141
|
+
* across a constant budget. Bulk mode fades the whole group at once, so it
|
|
9142
|
+
* has no budget.
|
|
9143
|
+
*/
|
|
9144
|
+
declare function mapSweepTiming(durationMs: number, featureCount: number, bulk: boolean): MapSweepTiming;
|
|
9145
|
+
/**
|
|
9146
|
+
* Tilemap tile delays: an ~800ms base spread with seeded +-40% jitter so tiles
|
|
9147
|
+
* pop in clusters. `animationIndices[i]` is tile i's animation index.
|
|
9148
|
+
*/
|
|
9149
|
+
declare function tilemapTileDelays(animationIndices: readonly number[]): number[];
|
|
9150
|
+
|
|
7692
9151
|
interface CssTokenDef {
|
|
7693
9152
|
name: string;
|
|
7694
9153
|
light: string;
|
|
@@ -7713,4 +9172,4 @@ declare const CSS_TOKEN_ROOT_SELECTORS: readonly string[];
|
|
|
7713
9172
|
declare const CSS_TOKENS: readonly CssTokenDef[];
|
|
7714
9173
|
declare function cssTokenDefault(name: string, mode: 'light' | 'dark'): string;
|
|
7715
9174
|
|
|
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 };
|
|
9175
|
+
export { type A11yConfig, type A11yMetadata, ACHROMATIC_RAMP, AXIS_TITLE_GAP, AXIS_TITLE_OFFSET_COMPACT, AXIS_TITLE_OFFSET_DEFAULT, AXIS_TITLE_TRAILING_PAD, type AggregateOp, type AggregateTransform, type AnimationConfig, type AnimationEase, type AnimationPhaseConfig, type AnimationPreset, type AnimationSpec, type AnimationStagger, type Annotation, type AnnotationAnchor, type AnnotationFootnote, type AnnotationOffset, type AnnotationPosition, type ArcEncoding, type ArcMark, type AreaEncoding, type AreaMark, type AxisConfig, type AxisLabelDensity, type AxisLayout, type AxisTick, BRAND_FONT_SIZE, BRAND_MIN_WIDTH, BRAND_RESERVE_WIDTH, BREAKPOINT_COMPACT_MAX, BREAKPOINT_MEDIUM_MAX, type BarColumnConfig, type BarEncoding, type BarListEncoding, type BarListLayout, type BarListRowMark, type BarListSpec, type BarListSpecWithoutData, type BarTableCell, type BaseLegendLayout, type BeeswarmEncoding, type BinParams, type BinTransform, type Breakpoint, CATEGORICAL_EXTENDED_PALETTE, CATEGORICAL_FILL_PALETTE, CATEGORICAL_FILL_PALETTE_DARK, CATEGORICAL_PALETTE, CATEGORICAL_PALETTE_DARK, CELL_SWEEP_BUDGET_MS, COMPACT_MAX_X_TICKS, COMPACT_WIDTH, CSS_TOKENS, CSS_TOKEN_ROOT_SELECTORS, CURVE_NAMES, type CalculateExpression, type CalculateTransform, type CalendarEncoding, type CategoricalLegendLayout, type CategoricalPalette, type CategoryColorsConfig, type CategoryTableCell, type CellStyle, type ChannelRule, type ChartBuilderOptions, type ChartEventHandlers, type ChartLayout, type ChartSpec, type ChartSpecOverride, type ChartSpecWithoutData, type Chrome, type ChromeDefaults, type ChromeEconomy, type ChromeKey, type ChromeMode, type ChromeText, type ChromeTextStyle, type ChromeThemeOverride, type CircleEncoding, type ColorBlindnessType, type ColumnConfig, type CompileOptions, type CompileTableOptions, type CompileWarning, type CompositionRecommendation, type Condition, type ConditionalValueDef, type ConnectorConfig, type ConnectorType, type ContinuousLegendBin, type ContinuousLegendLayout, type ContinuousLegendTick, type CssTokenDef, type CurveInput, type CurveName, type CurveStop, DEFAULT_THEME, DIVERGING_PALETTES, type DarkMode, type DataRow, type DatasetBinding, type DateGranularity, type DelayAnchor, type DelayRule, type DeltaColumnConfig, type DeltaTableCell, type DensityEncoding, type DensityTransform, type DescriptionEncoding, type DesignDiagnostic, type DesignQuestion, type Display, type DivergingPalette, type DurationRule, ENTRANCE_ROLES, EXIT_CURVE, EXIT_FADE_MS, EXTENDED_OFFSET_STRATEGIES, type EditOp, type EditTransaction, type EditTransactionResult, type ElementRef, type Encoding, type EncodingChannel, type EncodingRule, type EndpointLabelContent, type EndpointLabelEntry, type EndpointLabelsConfig, type EndpointLabelsLayout, type EnterPhaseConfig, type EntranceEndContext, type EntranceRole, type EntranceRoleDef, type EntranceRoleExtent, type EntranceRoleRow, type EntranceTiming, type EntranceTimingContext, type ErrorbarEncoding, FADE_CURVE, FLUID_SPRING, FOOTNOTE_LINE_HEIGHT, type FacetChannel, type FacetLayout, type FacetPanelLayout, type FieldFormatContext, type FieldMetadata, type FieldPredicate, type FieldRef, type FieldType, type FillPatternType, type FilterPredicate, type FilterTransform, type FlagTableCell, type FoldTransform, type FrameConfig, GRAPH_ENCODING_RULES, type GeoAnchor, type GeoCallout, type GeoCalloutNoteSlot, type GeoColorKeyDescriptor, type GeoColorKeyLayout, type GeoDetailLayer, type GeoDetailLayerLayout, type GeoEntityRef, type GeoInset, type GeoLabelAffine, type GeoLabelCandidate, type GeoLabelComponent, type GeoLabelGeometry, type GeoLabelInventoryEntry, type GeoLabelOverlay, type GeoLabelVisibility, type GeoLabelsBundle, type GeoLabelsInput, type GeoMapBorders, type GeoMapEncoding, type GeoMapFeatureMark, type GeoMapFocus, type GeoMapFocusLayout, type GeoMapGeo, type GeoMapLayout, type GeoMapPointMark, type GeoMapPointsLayer, type GeoMapProjection, type GeoMapSpec, type GeoMapSpecWithoutData, type GeoMapZoomConfig, type GeoPlacedLabel, type GeoProjectionContext, type GeoReaderObservation, type GeoReaderSelection, type GeoTextBlock, type GeoViewLayout, type GradientColorStop, type GradientDef, type GradientLegendLayout, type GradientStop, type GraphAnimationConfig, type GraphAnimationSpec, type GraphChannelRule, type GraphEdge, type GraphEdgeLayout, type GraphEncoding, type GraphEncodingChannel, type GraphEnterPhaseConfig, type GraphInteractionConfig, type GraphLayout, type GraphLayoutConfig, type GraphNode, type GraphNodeLayout, type GraphPhaseConfig, type GraphSpec, type GraphSpecWithoutData, type Gridline, HEIGHT_CRAMPED_MAX, HEIGHT_MINIMAL_MAX, HEIGHT_NO_GRID_MAX, HEIGHT_SHORT_MAX, HPAD_COMPACT_FRACTION, HPAD_COMPACT_MIN, type HeatmapColumnConfig, type HeatmapTableCell, type HeightClass, type HistogramEncoding, type ImageColumnConfig, type ImageTableCell, type JoinAggregateTransform, KEYFRAMES, type KeyframeDef, type KeyframeName, type KeyframeProperty, type KeyframeStop, type KeyframeValue, LABEL_GAP_COMPACT, LABEL_GAP_DEFAULT, LINE_POINT_CASCADE_MS, type LabelCandidate, type LabelConfig, type LabelDensity, type LabelMode, type LabelPriority, type LabelSpec, type LayerSpec, type LayoutStrategy, type LegendChannel, type LegendConfig, type LegendEntry, type LegendEntryPosition, type LegendLayout, type LegendPosition, type LineEncoding, type LineMark, type LinearGradient, type LogicalAnd, type LogicalNot, type LogicalOr, type LollipopEncoding, MAP_FEATURE_MAX_DURATION_MS, MAP_POINT_STAGGER_FALLBACK_MS, MAP_SWEEP_BUDGET_MS, MARK_DISPLAY_NAMES, MARK_ENCODING_RULES, MARK_TYPES, MAX_LEFT_LABEL_FRACTION_COMPACT, MAX_LEFT_LABEL_FRACTION_DEFAULT, MAX_LEFT_LABEL_FRACTION_MEDIUM, MAX_LEFT_LABEL_FRACTION_MEDIUM_MAX, MAX_SPRING_DURATION, MAX_SR_TABLE_ROWS, MAX_TOTAL_STAGGER_MS, MOTION_REST_THRESHOLD, type MapSweepTiming, type Margins, type Mark, type MarkAria, type MarkDef, type MarkEvent, type MarkFocusEvent, type MarkMetadata, type MarkType, type MeasureTextFn, type Metric, type MonotoneCurveName, type MotionPhase, type MotionSample, NARROW_VIEWPORT_MAX, type NeutralRamp, type NodeOverride, type NumberFormatter, OFFSET_STRATEGIES, type ObservationIdentity, type OffsetStrategy, type PaginationState, type ParliamentEncoding, type Point, type PointEncoding, type PointMark, type RaceBarGeometry, type RaceBarMarkDef, type RaceBarRow, type RaceBarStatic, type RaceConfig, type RaceEncoding, type RaceFrame, type RaceGeometry, type RaceItem, type RaceLayout, type RaceLineGeometry, type RaceLineMarkDef, type RaceLineStatic, type RaceMarkDef, type RaceMarkType, type RacePlayback, type RaceSpec, type RaceSpecWithoutData, type RaceTableCell, type RaceTableColumn, type RaceTableGeometry, type RaceTableMarkDef, type RaceTableStatic, type RaceTick, type RadialGradient, type RangeAnnotation, type RangeEncoding, type ReaderBindingScope, type ReaderChangeMeta, type ReaderComparisonOperand, type ReaderComparisonResult, type ReaderComparisonScope, type ReaderDomainValue, type ReaderObservation, type ReaderPanelScope, type ReaderSelection, type ReaderSeries, type ReaderSlice, type ReaderSliceIndexOptions, type ReaderSliceMember, type ReaderSliceSelection, type Rect, type RectEncoding, type RectMark, type RefLineAnnotation, type RelativeTimeRef, type ResolveConfig, type ResolveMode, type ResolvedAnimation, type ResolvedAnimationPhase, type ResolvedAnnotation, type ResolvedChrome, type ResolvedChromeElement, type ResolvedChromeRule, type ResolvedColumn, type ResolvedFillPattern, type ResolvedLabel, type ResolvedMetricBar, type ResolvedMetricCell, type ResolvedSeriesSearch, type ResolvedTheme, type ResolvedThemeColors, type ResolvedYouDrawIt, type ResponsiveConfig, type RoleTiming, type RuleMarkLayout, SEQUENTIAL_PALETTES, SUPPORTED_SCHEME_NAMES, type SankeyEncoding, type SankeyLayout, type SankeyLinkColor, type SankeyLinkMark, type SankeyNodeAlign, type SankeyNodeMark, type SankeySpec, type SankeySpecOverride, type SankeySpecWithoutData, type ScaleConfig, type ScaleInvert, type ScaleType, type SequentialPalette, type SeriesSearchConfig, type SeriesStrategy, type SeriesStyle, type SizeLegendCircle, type SizeLegendLayout, type SortByField, type SortState, type SparklineColumnConfig, type SparklineData, type SparklineTableCell, type SpecPatch, type SpringConfig, type StaggerRule, type StoredVizSpec, TICK_LABEL_OFFSET, TICK_LINE_HEIGHT_FACTOR, TOP_PAD_EXTRA_NARROW, type TableBuilderOptions, type TableCell, type TableCellBase, type TableDensity, type TableLayout, type TableRow, type TableSpec, type TableSpecWithoutData, type TableTotalRow, type TextAnnotation, type TextEncoding, type TextMarkLayout, type TextStyle, type TextTableCell, type ThemeChromeDefaults, type ThemeColors, type ThemeConfig, type ThemeFontSizes, type ThemeFontWeights, type ThemeFonts, type ThemeRule, type ThemeSpacing, type TickEncoding, type TickMarkLayout, type TileMapBuilderOptions, type TileMapEncoding, type TileMapLayout, type TileMapPalette, type TileMapSpec, type TileMapSpecWithoutData, type TileMapTileMark, type TimeUnit, type TimeUnitTransform, type TokenValue, type TooltipContent, type TooltipField, type Transform, UPDATE_ENTER_START, type UpdatePhaseConfig, type UpdateTimeline, type ValueDef, type VizSpec, type WaffleEncoding, type WindowFieldDef, type WindowOp, type WindowSortField, type WindowTransform, type XAxisExtentInput, X_AXIS_BAND_HEIGHT, X_AXIS_ROTATED_EXTENT_CAP, X_AXIS_TITLE_BAND, X_AXIS_TITLE_BAND_ROTATED, type YouDrawItConfig, type YouDrawItSample, type YouDrawItYInvert, abbreviateNumber, adaptColorForDarkMode, adaptForLightLineStroke, adaptTheme, anchorMs, annotationSource, applyEditTransaction, areaChart, axisTitleOffset, barChart, broadsheet, buildCompactStepFormatter, buildD3Formatter, buildTemporalFormatter, checkPaletteDistinguishability, clampStaggerDelay, clarity, columnChart, computeChrome, computeFieldFormatContext, computeLabelBounds, computeNoteBandHeight, computeXAxisExtentFromLabels, contrastRatio, cssTokenDefault, curveStops, curveToCSSLinear, dataTable, deepMergeSpec, defaultNumberFormatter, deriveNeutralRamp, detectCollision, donutChart, dotChart, elementRef, encodePointerToken, entranceAnchorVars, entranceEndMs, entranceRole, entranceTiming, essay, estimateTextWidth, evalCubicBezier, evalCurve, evalKeyframes, evalRoleEase, evalValueCurve, findAccessibleColor, formatCurrency, formatDate, formatNumber, formatOrdinal, formatPercent, generateAltText, generateAriaLabels, generateDataTable, getAxisTitleOffset, getBreakpoint, getHeightClass, getLayoutStrategy, getRepresentativeColor, heuristicMeasure, inferFieldType, invertCurve, invertRoleEase, isAxislessMark, isBarListSpec, isChartSpec, isConditionalDef, isEncodingChannel, isGeoMapSpec, isGradientDef, isGraphSpec, isLayerSpec, isMonotoneCurve, isOpaqueColor, isRaceSpec, isRangeAnnotation, isRefLineAnnotation, isSankeySpec, isTableSpec, isTextAnnotation, isTileMapSpec, isValueDef, isYearContext, jsonPointer, keyframeProperties, keyframeValueToCSS, legacyEditorial, lineChart, mapFeatureDuration, mapSweepTiming, maxRotatedLabelWidth, meetsAA, mergeThemeConfig, motionCSS, overlapArea, pickLabelColor, pieChart, progressTimeMs, resolveChromeEconomy, resolveCollisions, resolveMarkDef, resolveMarkType, resolveMeasurer, resolveNumberFormatter, resolveSchemeName, resolveTheme, roleBaseDuration, roleVars, sampleMotion, scatterChart, shuffledSweepDelays, simulateColorBlindness, springDuration, terminal, textAscent, tileMap, tilemapTileDelays, truncateRotatedLabel, truncateToWidth, updateTimeline, wire, wrapText };
|