graphein 0.18.0 → 0.19.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/README.md +18 -0
- package/dist/index.d.ts +567 -50
- package/dist/index.js +5709 -1367
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -609,43 +609,48 @@ interface ThemeColors {
|
|
|
609
609
|
/** Negative / down semantics. */
|
|
610
610
|
negative: string;
|
|
611
611
|
}
|
|
612
|
+
interface ThemeFontSizes {
|
|
613
|
+
tiny: number;
|
|
614
|
+
small: number;
|
|
615
|
+
base: number;
|
|
616
|
+
large: number;
|
|
617
|
+
title: number;
|
|
618
|
+
}
|
|
619
|
+
interface ThemeFontWeights {
|
|
620
|
+
normal: number;
|
|
621
|
+
medium: number;
|
|
622
|
+
bold: number;
|
|
623
|
+
}
|
|
612
624
|
interface ThemeFont {
|
|
613
625
|
family: string;
|
|
614
|
-
size:
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
+
size: ThemeFontSizes;
|
|
627
|
+
weight: ThemeFontWeights;
|
|
628
|
+
}
|
|
629
|
+
interface ThemeSpacing {
|
|
630
|
+
xs: number;
|
|
631
|
+
sm: number;
|
|
632
|
+
md: number;
|
|
633
|
+
lg: number;
|
|
634
|
+
xl: number;
|
|
635
|
+
}
|
|
636
|
+
interface ThemeRadii {
|
|
637
|
+
sm: number;
|
|
638
|
+
md: number;
|
|
639
|
+
lg: number;
|
|
640
|
+
}
|
|
641
|
+
interface ThemeStrokes {
|
|
642
|
+
thin: number;
|
|
643
|
+
base: number;
|
|
644
|
+
thick: number;
|
|
626
645
|
}
|
|
627
646
|
interface ThemeTokens {
|
|
628
647
|
name: string;
|
|
629
648
|
dark: boolean;
|
|
630
649
|
color: ThemeColors;
|
|
631
650
|
font: ThemeFont;
|
|
632
|
-
spacing:
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
md: number;
|
|
636
|
-
lg: number;
|
|
637
|
-
xl: number;
|
|
638
|
-
};
|
|
639
|
-
radius: {
|
|
640
|
-
sm: number;
|
|
641
|
-
md: number;
|
|
642
|
-
lg: number;
|
|
643
|
-
};
|
|
644
|
-
stroke: {
|
|
645
|
-
thin: number;
|
|
646
|
-
base: number;
|
|
647
|
-
thick: number;
|
|
648
|
-
};
|
|
651
|
+
spacing: ThemeSpacing;
|
|
652
|
+
radius: ThemeRadii;
|
|
653
|
+
stroke: ThemeStrokes;
|
|
649
654
|
}
|
|
650
655
|
/** Non-fatal theme resolution warning. */
|
|
651
656
|
interface ThemeWarning {
|
|
@@ -664,7 +669,11 @@ interface ResolvedTheme {
|
|
|
664
669
|
declare const lightTheme: ThemeTokens;
|
|
665
670
|
declare const darkTheme: ThemeTokens;
|
|
666
671
|
declare const themes: Record<string, ThemeTokens>;
|
|
667
|
-
type
|
|
672
|
+
type TokenOverrides<T> = {
|
|
673
|
+
[K in keyof T]?: T[K] extends readonly unknown[] ? T[K] : T[K] extends object ? TokenOverrides<T[K]> : T[K];
|
|
674
|
+
};
|
|
675
|
+
/** Named theme or nested token overrides; unspecified tokens retain their base values. */
|
|
676
|
+
type ThemeInput = string | (TokenOverrides<ThemeTokens> & {
|
|
668
677
|
base?: string;
|
|
669
678
|
});
|
|
670
679
|
/**
|
|
@@ -2360,11 +2369,33 @@ interface LabelRecord {
|
|
|
2360
2369
|
budget?: number;
|
|
2361
2370
|
/** The axis a tick label belongs to. */
|
|
2362
2371
|
axis?: 'x' | 'y';
|
|
2372
|
+
color?: string;
|
|
2373
|
+
opacity?: number;
|
|
2374
|
+
/** Known background behind this label, not a guessed universal theme token. */
|
|
2375
|
+
background?: string;
|
|
2376
|
+
/** JSON Pointer into the effective spec, when the label has a config origin. */
|
|
2377
|
+
path?: string;
|
|
2378
|
+
clip?: Rect;
|
|
2379
|
+
}
|
|
2380
|
+
interface SuppressedLabel {
|
|
2381
|
+
role: LabelRole;
|
|
2382
|
+
reason: 'space' | 'collision' | 'unreadable' | 'static-viewport' | 'frame';
|
|
2383
|
+
/** Identifying text (axes, category names, titles) versus optional value labels. */
|
|
2384
|
+
required: boolean;
|
|
2385
|
+
count: number;
|
|
2386
|
+
example?: string;
|
|
2387
|
+
axis?: 'x' | 'y';
|
|
2388
|
+
path?: string;
|
|
2363
2389
|
}
|
|
2364
2390
|
/** Collects label records for a single render pass. */
|
|
2365
2391
|
declare class LabelLedger {
|
|
2366
2392
|
readonly records: LabelRecord[];
|
|
2393
|
+
readonly suppressed: SuppressedLabel[];
|
|
2367
2394
|
add(record: LabelRecord): void;
|
|
2395
|
+
/** One aggregate per reason/role/path, never an allocation for every omitted tick. */
|
|
2396
|
+
omit(record: Omit<SuppressedLabel, 'count'> & {
|
|
2397
|
+
count?: number;
|
|
2398
|
+
}): void;
|
|
2368
2399
|
clear(): void;
|
|
2369
2400
|
/** Records matching any of `roles`. */
|
|
2370
2401
|
byRole(...roles: LabelRole[]): LabelRecord[];
|
|
@@ -2377,6 +2408,23 @@ declare class LabelLedger {
|
|
|
2377
2408
|
* is treated as best-effort: diagnostics degrade rather than the render failing.
|
|
2378
2409
|
*/
|
|
2379
2410
|
declare function recordLabel(ledger: LabelLedger | undefined, record: LabelRecord): void;
|
|
2411
|
+
/** Record text painted by a native canvas helper that does not use overlay chrome. */
|
|
2412
|
+
declare function recordCanvasLabel(ledger: LabelLedger | undefined, command: CanvasTextCmd, options?: {
|
|
2413
|
+
role?: LabelRole;
|
|
2414
|
+
background?: string;
|
|
2415
|
+
fullText?: string;
|
|
2416
|
+
budget?: number;
|
|
2417
|
+
path?: string;
|
|
2418
|
+
clip?: Rect;
|
|
2419
|
+
}): void;
|
|
2420
|
+
/**
|
|
2421
|
+
* Snapshot already-mounted DOM text; no retained nodes. Missing DOM layout
|
|
2422
|
+
* (e.g. jsdom) returns false rather than inventing measured text geometry.
|
|
2423
|
+
*/
|
|
2424
|
+
declare function recordDomLabels(ledger: LabelLedger | undefined, host: HTMLElement, origin: {
|
|
2425
|
+
x: number;
|
|
2426
|
+
y: number;
|
|
2427
|
+
}, background?: string, role?: LabelRole, path?: string, scrollViewport?: Rect): boolean;
|
|
2380
2428
|
/**
|
|
2381
2429
|
* Shorten `text` so it fits `budget` pixels, reporting whether it had to be cut.
|
|
2382
2430
|
* A missing or non-positive budget means "unconstrained" — the caller had no
|
|
@@ -2399,6 +2447,112 @@ declare function labelBox(o: OverlayTextOpts, font: string): {
|
|
|
2399
2447
|
};
|
|
2400
2448
|
/** True when two boxes overlap by more than `tolerance` pixels on both axes. */
|
|
2401
2449
|
declare function boxesOverlap(a: Rect, b: Rect, tolerance?: number): boolean;
|
|
2450
|
+
/** Test the text rectangles, not just the overlapping envelopes of rotated labels. */
|
|
2451
|
+
declare function labelsOverlap(a: LabelRecord, b: LabelRecord, tolerance?: number): boolean;
|
|
2452
|
+
|
|
2453
|
+
type EvidenceCoverage = 'complete' | 'partial' | 'none';
|
|
2454
|
+
type MarkKind = 'point' | 'line-run' | 'area-region' | 'bar' | 'box' | 'slice' | 'cell' | 'region' | 'node' | 'link' | 'stage' | 'tile' | 'comparison' | 'value' | 'control';
|
|
2455
|
+
type DataRepresentation = 'rows' | 'aggregate' | 'derived' | 'literal' | 'control' | 'unknown';
|
|
2456
|
+
interface LogicalMarkCount {
|
|
2457
|
+
drawn: number;
|
|
2458
|
+
visible: number;
|
|
2459
|
+
}
|
|
2460
|
+
/** An actually painted perimeter that keeps a pale filled mark identifiable. */
|
|
2461
|
+
interface MarkBoundary {
|
|
2462
|
+
color: string;
|
|
2463
|
+
opacity: number;
|
|
2464
|
+
width: number;
|
|
2465
|
+
}
|
|
2466
|
+
/** A bounded sample of actual primary mark paints, not theme palette guesses. */
|
|
2467
|
+
interface PaintEvidence {
|
|
2468
|
+
color: string;
|
|
2469
|
+
opacity: number;
|
|
2470
|
+
/** Supplied nominal backdrop; not a pixel-level analysis of overlapping marks. */
|
|
2471
|
+
background?: string;
|
|
2472
|
+
count: number;
|
|
2473
|
+
/** Intentional cross-highlight dimming is recorded, but not a contrast defect. */
|
|
2474
|
+
intentionalDim?: boolean;
|
|
2475
|
+
boundary?: MarkBoundary;
|
|
2476
|
+
}
|
|
2477
|
+
/**
|
|
2478
|
+
* Lightweight facts from a draw pass. Logical marks are not canvas paint calls:
|
|
2479
|
+
* a box/whisker is one box, a pie category one slice, and a line one finite run.
|
|
2480
|
+
* Points additionally painted on a line count separately; `segments` counts its
|
|
2481
|
+
* adjacent finite observations, not curve tessellation. An area band includes its
|
|
2482
|
+
* boundary stroke; a line's optional fill is decoration, not an extra mark.
|
|
2483
|
+
* A table counts mounted/painted body cells, not rows; a matrix counts resolved
|
|
2484
|
+
* aggregate measure cells (not row headers or missing-value placeholders). Value cards count
|
|
2485
|
+
* one resolved primary value (including a zero readout); dropdown/search/range
|
|
2486
|
+
* count one composite control and lists count their mounted/painted options.
|
|
2487
|
+
* Axes, legends, annotations and trendline decorations are not data marks.
|
|
2488
|
+
*
|
|
2489
|
+
* `visible` means finite positive primitive bounds intersect the renderer's clip
|
|
2490
|
+
* at nonzero opacity. It does not promise unoccluded pixels or distinguishability.
|
|
2491
|
+
* Counts describe the final static pass, not intermediate animation frames.
|
|
2492
|
+
*/
|
|
2493
|
+
interface RenderEvidence {
|
|
2494
|
+
marks: LogicalMarkCount & {
|
|
2495
|
+
byKind: Partial<Record<MarkKind, LogicalMarkCount>>;
|
|
2496
|
+
segments: number;
|
|
2497
|
+
};
|
|
2498
|
+
data: {
|
|
2499
|
+
inputRows: number;
|
|
2500
|
+
representation: DataRepresentation;
|
|
2501
|
+
/** Source rows accounted for, including aggregation; absent if not established. */
|
|
2502
|
+
representedRows?: number;
|
|
2503
|
+
omittedRows?: number;
|
|
2504
|
+
/** Valid observations not individually drawn after draw-side reduction; zero is explicit when established. */
|
|
2505
|
+
reducedRows?: number;
|
|
2506
|
+
/** Rows retained behind an intentional interactive scroll/window, not discarded; zero is explicit when established. */
|
|
2507
|
+
deferredRows?: number;
|
|
2508
|
+
};
|
|
2509
|
+
geometry: {
|
|
2510
|
+
method: 'primitive-bounds';
|
|
2511
|
+
bounds?: Rect;
|
|
2512
|
+
nonFinite: number;
|
|
2513
|
+
clipped: number;
|
|
2514
|
+
};
|
|
2515
|
+
colors: {
|
|
2516
|
+
samples: PaintEvidence[];
|
|
2517
|
+
truncated: boolean;
|
|
2518
|
+
};
|
|
2519
|
+
coverage: {
|
|
2520
|
+
marks: EvidenceCoverage;
|
|
2521
|
+
data: EvidenceCoverage;
|
|
2522
|
+
geometry: EvidenceCoverage;
|
|
2523
|
+
colors: EvidenceCoverage;
|
|
2524
|
+
text: EvidenceCoverage;
|
|
2525
|
+
textContrast: EvidenceCoverage;
|
|
2526
|
+
};
|
|
2527
|
+
labels?: {
|
|
2528
|
+
drawn: number;
|
|
2529
|
+
suppressed: number;
|
|
2530
|
+
requiredSuppressed: number;
|
|
2531
|
+
contrastChecked: number;
|
|
2532
|
+
};
|
|
2533
|
+
}
|
|
2534
|
+
/** Counters and bounded paint styles only: no retained point/shape scene graph. */
|
|
2535
|
+
declare class EvidenceLedger {
|
|
2536
|
+
private value;
|
|
2537
|
+
private paints;
|
|
2538
|
+
private alphas;
|
|
2539
|
+
private boundsOverflow;
|
|
2540
|
+
private viewport;
|
|
2541
|
+
background?: string;
|
|
2542
|
+
reset(size: Size, inputRows?: number, background?: string, clip?: Rect): void;
|
|
2543
|
+
visibleViewport(): Rect;
|
|
2544
|
+
/** Call even on an early empty return, so zero marks is observed, not guessed. */
|
|
2545
|
+
begin(representation?: DataRepresentation): void;
|
|
2546
|
+
/** Only supply source-row accounting when the renderer can establish it. */
|
|
2547
|
+
data(representedRows: number, representation?: DataRepresentation, reducedRows?: number, deferredRows?: number): void;
|
|
2548
|
+
unknownData(representation: DataRepresentation): void;
|
|
2549
|
+
partial(...areas: Array<keyof RenderEvidence['coverage']>): void;
|
|
2550
|
+
/** Record a logical mark at its paint site; positional args avoid per-point objects. */
|
|
2551
|
+
mark(kind: MarkKind, x: number, y: number, width: number, height: number, color?: string, opacity?: number, clip?: Rect, count?: number, background?: string | undefined, intentionalDim?: boolean, boundary?: MarkBoundary): void;
|
|
2552
|
+
segments(count: number): void;
|
|
2553
|
+
private paint;
|
|
2554
|
+
snapshot(): RenderEvidence;
|
|
2555
|
+
}
|
|
2402
2556
|
|
|
2403
2557
|
/**
|
|
2404
2558
|
* A rendering Surface mounted inside a user-provided container. It owns a stack
|
|
@@ -2434,6 +2588,10 @@ declare class Surface {
|
|
|
2434
2588
|
* to detect clipped and colliding text for any chart type, cartesian or not.
|
|
2435
2589
|
*/
|
|
2436
2590
|
readonly labels: LabelLedger;
|
|
2591
|
+
/** Logical marks and bounded geometry/paint counters for the current pass. */
|
|
2592
|
+
readonly evidence: EvidenceLedger;
|
|
2593
|
+
/** DOM visuals may refresh measurements after scrolling or an in-place control change. */
|
|
2594
|
+
collectEvidence?: () => void;
|
|
2437
2595
|
constructor(container: HTMLElement);
|
|
2438
2596
|
resize(width: number, height: number, dpr?: number): void;
|
|
2439
2597
|
/** Clear both canvas layers, empty the HTML overlay, and reset the ledger. */
|
|
@@ -2656,22 +2814,167 @@ interface RegressionFit {
|
|
|
2656
2814
|
*/
|
|
2657
2815
|
declare function linearRegression(xs: readonly number[], ys: readonly number[]): RegressionFit | null;
|
|
2658
2816
|
|
|
2817
|
+
/** The original, compact column profile contract. */
|
|
2659
2818
|
interface ColumnProfile {
|
|
2660
2819
|
field: string;
|
|
2661
|
-
type:
|
|
2820
|
+
type: FieldType;
|
|
2821
|
+
/** Distinct existing grouping keys, including the shared null/undefined/"" key. */
|
|
2662
2822
|
cardinality: number;
|
|
2663
2823
|
}
|
|
2824
|
+
interface NumericEvidence {
|
|
2825
|
+
/** Non-missing values accepted by the existing numeric coercion. */
|
|
2826
|
+
valid: number;
|
|
2827
|
+
/** Non-missing values not accepted by numeric coercion. */
|
|
2828
|
+
invalid: number;
|
|
2829
|
+
numbers: number;
|
|
2830
|
+
numericStrings: number;
|
|
2831
|
+
booleans: number;
|
|
2832
|
+
dates: number;
|
|
2833
|
+
nonFinite: number;
|
|
2834
|
+
negative: number;
|
|
2835
|
+
zero: number;
|
|
2836
|
+
positive: number;
|
|
2837
|
+
range: [number, number] | null;
|
|
2838
|
+
}
|
|
2839
|
+
interface TemporalEvidence {
|
|
2840
|
+
/** Includes numeric epochs and supported date strings, not just inferred dates. */
|
|
2841
|
+
valid: number;
|
|
2842
|
+
invalid: number;
|
|
2843
|
+
dateObjects: number;
|
|
2844
|
+
strings: number;
|
|
2845
|
+
numericEpochs: number;
|
|
2846
|
+
/** Epoch milliseconds; uses the same local-date parsing as rendering. */
|
|
2847
|
+
range: [number, number] | null;
|
|
2848
|
+
}
|
|
2849
|
+
type TypeAmbiguity = 'mixed-types' | 'numeric-identifier' | 'numeric-date' | 'date-order' | 'invalid-temporal';
|
|
2850
|
+
interface DetailedColumnProfile extends ColumnProfile {
|
|
2851
|
+
/** All counts describe inspected rows, not estimates of uninspected rows. */
|
|
2852
|
+
inspectedRows: number;
|
|
2853
|
+
/** Presence counts keys even when their value is null or undefined. */
|
|
2854
|
+
present: number;
|
|
2855
|
+
absent: number;
|
|
2856
|
+
/** Absent, null, undefined, and blank strings (never numeric zero). */
|
|
2857
|
+
missing: number;
|
|
2858
|
+
/** Non-missing values usable under `type`, or the explicitly requested type. */
|
|
2859
|
+
valid: number;
|
|
2860
|
+
invalid: number;
|
|
2861
|
+
/** Objects/arrays are structural containers, not scalar chart values. */
|
|
2862
|
+
structured: number;
|
|
2863
|
+
expectedType?: FieldType;
|
|
2864
|
+
nonMissingCardinality: number;
|
|
2865
|
+
quantitative: NumericEvidence;
|
|
2866
|
+
temporal: TemporalEvidence;
|
|
2867
|
+
/** Counts are exact, but legacy type inference inspects at most 200 values. */
|
|
2868
|
+
inference: {
|
|
2869
|
+
inspectedValues: number;
|
|
2870
|
+
exact: boolean;
|
|
2871
|
+
};
|
|
2872
|
+
ambiguity: TypeAmbiguity[];
|
|
2873
|
+
}
|
|
2874
|
+
interface ProfileField {
|
|
2875
|
+
field: string;
|
|
2876
|
+
/** An explicit encoding type affects validity evidence, never inferred `type`. */
|
|
2877
|
+
type?: FieldType;
|
|
2878
|
+
}
|
|
2879
|
+
interface ProfileEncoding {
|
|
2880
|
+
/** Fields that jointly identify an encoded position, cell, or comparison pair. */
|
|
2881
|
+
keys: readonly (string | ProfileField)[];
|
|
2882
|
+
/** Required values at that position; omitted types use the inferred type. */
|
|
2883
|
+
values?: readonly (string | ProfileField)[];
|
|
2884
|
+
/** Ask about missing combinations of observed keys; never infers a time cadence. */
|
|
2885
|
+
complete?: boolean;
|
|
2886
|
+
}
|
|
2887
|
+
interface ProfileOptions {
|
|
2888
|
+
/** Defaults to all discovered fields, including nested/dotted paths. */
|
|
2889
|
+
fields?: readonly (string | ProfileField)[];
|
|
2890
|
+
/** Optional deterministic, evenly spaced row sample. Default: inspect all rows. */
|
|
2891
|
+
sampleSize?: number;
|
|
2892
|
+
encoding?: ProfileEncoding;
|
|
2893
|
+
}
|
|
2894
|
+
interface DataFinding {
|
|
2895
|
+
code: string;
|
|
2896
|
+
severity: 'info' | 'warning';
|
|
2897
|
+
message: string;
|
|
2898
|
+
fields?: string[];
|
|
2899
|
+
count?: number;
|
|
2900
|
+
/** Meaning-affecting choices are disclosed, never applied by profiling. */
|
|
2901
|
+
requiresDecision: boolean;
|
|
2902
|
+
}
|
|
2903
|
+
interface EncodingProfile {
|
|
2904
|
+
keys: string[];
|
|
2905
|
+
/** Rows with usable key fields, independent of their measure validity. */
|
|
2906
|
+
keyRows: number;
|
|
2907
|
+
/** Distinct observed key combinations, including those with unusable measures. */
|
|
2908
|
+
observedKeys: number;
|
|
2909
|
+
usableRows: number;
|
|
2910
|
+
/** Missing takes precedence over invalid so these row counts are disjoint. */
|
|
2911
|
+
missingRows: number;
|
|
2912
|
+
invalidRows: number;
|
|
2913
|
+
/** Distinct keys with a complete, usable observation. */
|
|
2914
|
+
distinctKeys: number;
|
|
2915
|
+
/** Number of encoded key groups with more than one usable observation. */
|
|
2916
|
+
duplicateKeys: number;
|
|
2917
|
+
/** Additional usable observations beyond the first at each key. */
|
|
2918
|
+
duplicateRows: number;
|
|
2919
|
+
/** Only supplied for exact evidence and an explicit `complete` request. */
|
|
2920
|
+
possibleCombinations?: number;
|
|
2921
|
+
missingCombinations?: number;
|
|
2922
|
+
}
|
|
2923
|
+
interface DatasetProfile {
|
|
2924
|
+
rowCount: number;
|
|
2925
|
+
invalidRows: number;
|
|
2926
|
+
sampling: {
|
|
2927
|
+
mode: 'exact' | 'sampled';
|
|
2928
|
+
inspectedRows: number;
|
|
2929
|
+
totalRows: number;
|
|
2930
|
+
};
|
|
2931
|
+
columns: DetailedColumnProfile[];
|
|
2932
|
+
encoding?: EncodingProfile;
|
|
2933
|
+
findings: DataFinding[];
|
|
2934
|
+
}
|
|
2935
|
+
/**
|
|
2936
|
+
* Inspect data without cleaning, grouping, inferring units, or changing types.
|
|
2937
|
+
* Numeric/date evidence uses the same coercions as rendering. Explicit encoding
|
|
2938
|
+
* keys opt into duplicate/completeness evidence; no grid or cadence is invented.
|
|
2939
|
+
*/
|
|
2940
|
+
declare function profileData(data: readonly Datum[], options?: ProfileOptions): DatasetProfile;
|
|
2941
|
+
/** Backward-compatible column list with additive, detailed evidence. */
|
|
2942
|
+
declare function profileColumns(data: readonly Datum[], options?: ProfileOptions): DetailedColumnProfile[];
|
|
2943
|
+
|
|
2944
|
+
interface RecommendationEvidence {
|
|
2945
|
+
columns: DetailedColumnProfile[];
|
|
2946
|
+
sampling: DatasetProfile['sampling'];
|
|
2947
|
+
encoding?: EncodingProfile;
|
|
2948
|
+
intent?: RecommendOptions['intent'];
|
|
2949
|
+
targetSize?: Size;
|
|
2950
|
+
}
|
|
2664
2951
|
interface RecommendedChart {
|
|
2665
2952
|
spec: ChartSpec;
|
|
2666
2953
|
score: number;
|
|
2667
2954
|
rationale: string;
|
|
2955
|
+
/** A valid candidate can still need an explicit meaning/field decision. */
|
|
2956
|
+
status?: 'ready' | 'needs-decision';
|
|
2957
|
+
findings?: DataFinding[];
|
|
2958
|
+
evidence?: RecommendationEvidence;
|
|
2959
|
+
alternatives?: ChartType[];
|
|
2668
2960
|
}
|
|
2669
2961
|
interface RecommendOptions {
|
|
2670
2962
|
intent?: 'trend' | 'comparison' | 'distribution' | 'relationship' | 'composition';
|
|
2671
2963
|
maxResults?: number;
|
|
2964
|
+
/** Layout guidance only; no data is filtered or grouped to fit this size. */
|
|
2965
|
+
targetSize?: Size;
|
|
2672
2966
|
}
|
|
2673
|
-
|
|
2674
|
-
|
|
2967
|
+
interface RecommendationResult {
|
|
2968
|
+
recommendations: RecommendedChart[];
|
|
2969
|
+
profile: DatasetProfile;
|
|
2970
|
+
findings: DataFinding[];
|
|
2971
|
+
status: 'ready' | 'needs-decision' | 'no-candidate';
|
|
2972
|
+
}
|
|
2973
|
+
/** Return ranked valid candidates, without applying any proposed data decisions. */
|
|
2974
|
+
declare function recommendChart(data: readonly Datum[], opts: RecommendOptions & {
|
|
2975
|
+
detailed: true;
|
|
2976
|
+
}): RecommendationResult;
|
|
2977
|
+
declare function recommendChart(data: readonly Datum[], opts?: RecommendOptions): RecommendedChart[];
|
|
2675
2978
|
|
|
2676
2979
|
/** Environment helpers — safe in both browser and Node (SSR/test). */
|
|
2677
2980
|
declare const isBrowser: boolean;
|
|
@@ -2700,6 +3003,9 @@ interface BackingSize {
|
|
|
2700
3003
|
declare function computeBackingSize(width: number, height: number, dpr: number): BackingSize;
|
|
2701
3004
|
|
|
2702
3005
|
/** Tiny DOM helpers (browser-only). */
|
|
3006
|
+
|
|
3007
|
+
/** Space available to a child, excluding host padding (client dimensions already exclude borders). */
|
|
3008
|
+
declare function measureContentSize(el: HTMLElement): Size;
|
|
2703
3009
|
declare function setStyle(el: HTMLElement, style: Partial<CSSStyleDeclaration>): void;
|
|
2704
3010
|
declare function createDiv(className?: string, style?: Partial<CSSStyleDeclaration>): HTMLDivElement;
|
|
2705
3011
|
/** Absolute-position a layer to fill its positioned parent. */
|
|
@@ -2957,6 +3263,16 @@ interface ValidationError {
|
|
|
2957
3263
|
kind: 'chartType' | 'enum' | 'field' | 'channel';
|
|
2958
3264
|
candidates: string[];
|
|
2959
3265
|
};
|
|
3266
|
+
/** A data/meaning choice, rather than a safe automatic correction. */
|
|
3267
|
+
requiresDecision?: boolean;
|
|
3268
|
+
/** Exact, inspected field counts for data-quality findings. */
|
|
3269
|
+
evidence?: {
|
|
3270
|
+
inspectedRows: number;
|
|
3271
|
+
present: number;
|
|
3272
|
+
missing: number;
|
|
3273
|
+
valid: number;
|
|
3274
|
+
invalid: number;
|
|
3275
|
+
};
|
|
2960
3276
|
}
|
|
2961
3277
|
interface ValidationResult {
|
|
2962
3278
|
valid: boolean;
|
|
@@ -3068,6 +3384,41 @@ interface ResolvedSketch extends RoughStyle {
|
|
|
3068
3384
|
*/
|
|
3069
3385
|
declare function resolveSketch(spec: ChartSpec): ResolvedSketch | null;
|
|
3070
3386
|
|
|
3387
|
+
interface FieldRoleInfo {
|
|
3388
|
+
/** Spec path, including [] for repeated definitions. */
|
|
3389
|
+
path: string;
|
|
3390
|
+
role: 'position' | 'measure' | 'category' | 'series' | 'size' | 'time' | 'target' | 'geography' | 'filter' | 'text';
|
|
3391
|
+
types: FieldType[];
|
|
3392
|
+
required: boolean;
|
|
3393
|
+
}
|
|
3394
|
+
interface DataRequirement {
|
|
3395
|
+
code: string;
|
|
3396
|
+
fields: string[];
|
|
3397
|
+
description: string;
|
|
3398
|
+
}
|
|
3399
|
+
interface CardinalityGuidance {
|
|
3400
|
+
fields: string[];
|
|
3401
|
+
minimum?: number;
|
|
3402
|
+
maximum?: number;
|
|
3403
|
+
recommendedMaximum?: number;
|
|
3404
|
+
unique?: boolean;
|
|
3405
|
+
description: string;
|
|
3406
|
+
}
|
|
3407
|
+
interface AggregationCapability {
|
|
3408
|
+
mode: 'rows' | 'aggregate' | 'bin' | 'distribution' | 'value' | 'pivot' | 'lookup' | 'filter-domain' | 'running-total';
|
|
3409
|
+
by: string[];
|
|
3410
|
+
defaultOp?: string;
|
|
3411
|
+
/** Spec path controlling the operation, only when the renderer consumes it. */
|
|
3412
|
+
operationPath?: string;
|
|
3413
|
+
caveats: string[];
|
|
3414
|
+
}
|
|
3415
|
+
interface ChartCapabilities {
|
|
3416
|
+
fieldRoles: FieldRoleInfo[];
|
|
3417
|
+
requirements: DataRequirement[];
|
|
3418
|
+
cardinality: CardinalityGuidance[];
|
|
3419
|
+
aggregation: AggregationCapability;
|
|
3420
|
+
features: string[];
|
|
3421
|
+
}
|
|
3071
3422
|
/** Agent-facing metadata for one chart family and its starter template. */
|
|
3072
3423
|
interface ChartTypeInfo {
|
|
3073
3424
|
/** The chart type string accepted by {@link starterSpec}. */
|
|
@@ -3078,6 +3429,8 @@ interface ChartTypeInfo {
|
|
|
3078
3429
|
requiredChannels: string[];
|
|
3079
3430
|
/** A minimal valid starter spec for this chart type. */
|
|
3080
3431
|
example: ChartSpec;
|
|
3432
|
+
/** Additive machine-readable authoring guidance, populated by listChartTypes. */
|
|
3433
|
+
capabilities?: ChartCapabilities;
|
|
3081
3434
|
}
|
|
3082
3435
|
/**
|
|
3083
3436
|
* Return a minimal valid starter spec for a chart type, including placeholder
|
|
@@ -3085,10 +3438,12 @@ interface ChartTypeInfo {
|
|
|
3085
3438
|
*/
|
|
3086
3439
|
declare function starterSpec(type: ChartType): ChartSpec;
|
|
3087
3440
|
/**
|
|
3088
|
-
* List every chart type
|
|
3089
|
-
* ready-to-render starter
|
|
3441
|
+
* List every registered chart/slicer type, machine-readable data requirements
|
|
3442
|
+
* and capabilities, and a ready-to-render starter. Guidance never transforms data.
|
|
3090
3443
|
*/
|
|
3091
|
-
declare function listChartTypes(): ChartTypeInfo
|
|
3444
|
+
declare function listChartTypes(): (ChartTypeInfo & {
|
|
3445
|
+
capabilities: ChartCapabilities;
|
|
3446
|
+
})[];
|
|
3092
3447
|
|
|
3093
3448
|
/**
|
|
3094
3449
|
* Number formatting — a pragmatic subset of the d3-format mini-language, enough
|
|
@@ -3113,6 +3468,8 @@ interface NumberFormatSpec {
|
|
|
3113
3468
|
precision?: number;
|
|
3114
3469
|
type?: 'f' | '%' | 's' | 'd' | 'e' | 'g' | '';
|
|
3115
3470
|
}
|
|
3471
|
+
/** Whether a hint uses the supported numeric mini-language rather than date tokens. */
|
|
3472
|
+
declare function isNumberFormat(spec: string): boolean;
|
|
3116
3473
|
declare function parseNumberFormat(spec: string): NumberFormatSpec;
|
|
3117
3474
|
/** Format a number according to a parsed or string spec. */
|
|
3118
3475
|
declare function formatNumber(value: number, spec?: string | NumberFormatSpec): string;
|
|
@@ -3142,6 +3499,8 @@ declare function prettyDate(value: Date | number): string;
|
|
|
3142
3499
|
* strings. When a `%` (date) hint is supplied for such a string we parse it and
|
|
3143
3500
|
* format as a date, so e.g. a table column `{ format: '%b %e, %Y' }` over
|
|
3144
3501
|
* `"2024-05-02"` renders `May 2, 2024` rather than the raw string.
|
|
3502
|
+
* An explicit numeric hint also formats numeric strings; without a hint strings
|
|
3503
|
+
* stay intact, including identifiers with leading zeros.
|
|
3145
3504
|
*/
|
|
3146
3505
|
declare function formatValue(value: unknown, hint?: string): string;
|
|
3147
3506
|
/**
|
|
@@ -3216,6 +3575,10 @@ interface FrameInput {
|
|
|
3216
3575
|
yAxis?: AxisInput;
|
|
3217
3576
|
/** Secondary (right) y-axis for dual-axis combo charts; reserves a right gutter. */
|
|
3218
3577
|
y2Axis?: AxisInput;
|
|
3578
|
+
/** Internal caption spacing for small-multiple panels; normal charts use density defaults. */
|
|
3579
|
+
titleGap?: number;
|
|
3580
|
+
/** Minimum mark extent before dropping chrome; compact sparklines may use less than 24px. */
|
|
3581
|
+
minimumPlotSize?: number;
|
|
3219
3582
|
}
|
|
3220
3583
|
/** Resolved chrome density, derived only from the available layout size. */
|
|
3221
3584
|
type FrameDensity = 'comfortable' | 'compact';
|
|
@@ -3244,6 +3607,8 @@ interface Frame {
|
|
|
3244
3607
|
/** Pixel budget for a left-gutter tick label, capped so one outlier value
|
|
3245
3608
|
* can't consume the plot. Renderers ellipsize to it. */
|
|
3246
3609
|
yLabelMaxWidth: number;
|
|
3610
|
+
/** Matching text budget for a secondary right-hand value axis. */
|
|
3611
|
+
y2LabelMaxWidth?: number;
|
|
3247
3612
|
/** Legend items that did not fit and were dropped from {@link legendItems}. */
|
|
3248
3613
|
legendOverflow: number;
|
|
3249
3614
|
/** Where to draw the "+N more" chip, when {@link legendOverflow} is non-zero. */
|
|
@@ -3439,6 +3804,8 @@ interface CartesianModel {
|
|
|
3439
3804
|
xTicks: Tick[];
|
|
3440
3805
|
yTicks: Tick[];
|
|
3441
3806
|
colorOf(key: string): string;
|
|
3807
|
+
/** Stable first-seen series keys used for palette assignment. */
|
|
3808
|
+
colorDomain?: string[];
|
|
3442
3809
|
/** Hand-drawn render settings, or null for the default clean rendering. */
|
|
3443
3810
|
sketch: ResolvedSketch | null;
|
|
3444
3811
|
/**
|
|
@@ -3462,6 +3829,8 @@ interface CartesianModel {
|
|
|
3462
3829
|
};
|
|
3463
3830
|
}
|
|
3464
3831
|
declare function resolveCurve(curve?: CurveType): Curve;
|
|
3832
|
+
/** Retain category color identity without retaining or changing source rows. */
|
|
3833
|
+
declare function seriesColorDomain(spec: CartesianChartSpec, previous?: readonly string[]): string[];
|
|
3465
3834
|
interface BuildOptions {
|
|
3466
3835
|
width: number;
|
|
3467
3836
|
height: number;
|
|
@@ -3470,6 +3839,11 @@ interface BuildOptions {
|
|
|
3470
3839
|
originY?: number;
|
|
3471
3840
|
/** Shared scale domains/colors, so faceted panels stay directly comparable. */
|
|
3472
3841
|
shared?: SharedScales;
|
|
3842
|
+
/** Previous/unfiltered series keys; explicit color-channel domains take priority. */
|
|
3843
|
+
colorDomain?: readonly string[];
|
|
3844
|
+
/** Caption/mark budgets for compact small-multiple panels. */
|
|
3845
|
+
titleGap?: number;
|
|
3846
|
+
minimumPlotSize?: number;
|
|
3473
3847
|
}
|
|
3474
3848
|
/** Scale state shared across a facet grid so every panel is comparable. */
|
|
3475
3849
|
interface SharedScales {
|
|
@@ -3841,6 +4215,8 @@ interface ComboModel {
|
|
|
3841
4215
|
plot: Rect;
|
|
3842
4216
|
x: XModel;
|
|
3843
4217
|
xTicks: Tick[];
|
|
4218
|
+
/** Full category names wrapped into bounded horizontal lines, parallel to xTicks. */
|
|
4219
|
+
wrappedXLabels?: string[][];
|
|
3844
4220
|
left: ComboAxisModel;
|
|
3845
4221
|
right?: ComboAxisModel;
|
|
3846
4222
|
layers: ComboLayerModel[];
|
|
@@ -3909,6 +4285,7 @@ declare function buildHistogramModel(spec: HistogramSpec, tokens: ThemeTokens, o
|
|
|
3909
4285
|
*/
|
|
3910
4286
|
|
|
3911
4287
|
type ReportSeverity = 'error' | 'warning' | 'info';
|
|
4288
|
+
|
|
3912
4289
|
/** One machine-readable finding about the rendered chart. */
|
|
3913
4290
|
interface RenderDiagnostic {
|
|
3914
4291
|
/** Stable identifier an agent can match/suppress on (e.g. `axis-label-overlap`). */
|
|
@@ -3924,6 +4301,15 @@ interface RenderDiagnostic {
|
|
|
3924
4301
|
fix?: JsonPatchOp[];
|
|
3925
4302
|
/** One-line advisory when there is no unambiguous safe patch. */
|
|
3926
4303
|
hint?: string;
|
|
4304
|
+
/** JSON Pointer into the effective spec (dashboard findings are view-scoped). */
|
|
4305
|
+
path?: string;
|
|
4306
|
+
viewId?: string;
|
|
4307
|
+
/** Eligibility guidance only; fixes are never automatically applied by reporting. */
|
|
4308
|
+
action?: {
|
|
4309
|
+
kind: 'presentation' | 'semantic';
|
|
4310
|
+
safety: 'default-only' | 'requires-review';
|
|
4311
|
+
paths: string[];
|
|
4312
|
+
};
|
|
3927
4313
|
}
|
|
3928
4314
|
/** A post-render, vision-free description of what was drawn. */
|
|
3929
4315
|
interface RenderReport {
|
|
@@ -3932,7 +4318,7 @@ interface RenderReport {
|
|
|
3932
4318
|
size: Size;
|
|
3933
4319
|
/** Plot rectangle (cartesian-derived reports only). */
|
|
3934
4320
|
plot?: Rect;
|
|
3935
|
-
/**
|
|
4321
|
+
/** Legacy bound-row count (or effective data.length); NOT evidence of drawing. */
|
|
3936
4322
|
markCount: number;
|
|
3937
4323
|
/** Number of distinct series. */
|
|
3938
4324
|
seriesCount: number;
|
|
@@ -3947,7 +4333,22 @@ interface RenderReport {
|
|
|
3947
4333
|
* an LLM). Absent for chart types that carry no summarizable trend.
|
|
3948
4334
|
*/
|
|
3949
4335
|
summary?: string;
|
|
4336
|
+
/** Observed logical marks and explicit diagnostic coverage, when available. */
|
|
4337
|
+
evidence?: RenderEvidence;
|
|
4338
|
+
/** Child reports retain their own sizes, evidence and local diagnostic paths. */
|
|
4339
|
+
views?: Array<{
|
|
4340
|
+
id: string;
|
|
4341
|
+
index: number;
|
|
4342
|
+
report: RenderReport;
|
|
4343
|
+
}>;
|
|
4344
|
+
}
|
|
4345
|
+
/** A dashboard has the same facts as a chart report, with its own discriminant. */
|
|
4346
|
+
interface DashboardRenderReport extends Omit<RenderReport, 'type' | 'views'> {
|
|
4347
|
+
type: 'dashboard';
|
|
4348
|
+
views: NonNullable<RenderReport['views']>;
|
|
3950
4349
|
}
|
|
4350
|
+
/** Common report type for APIs that accept either a chart or a dashboard. */
|
|
4351
|
+
type AnyRenderReport = RenderReport | DashboardRenderReport;
|
|
3951
4352
|
/** Inputs for {@link buildRenderReport}. */
|
|
3952
4353
|
interface ReportInput {
|
|
3953
4354
|
type: ChartType;
|
|
@@ -3964,12 +4365,28 @@ interface ReportInput {
|
|
|
3964
4365
|
* chart type, including the non-cartesian ones that have no model.
|
|
3965
4366
|
*/
|
|
3966
4367
|
labels?: LabelRecord[];
|
|
4368
|
+
suppressedLabels?: SuppressedLabel[];
|
|
4369
|
+
evidence?: RenderEvidence;
|
|
3967
4370
|
}
|
|
3968
4371
|
/**
|
|
3969
4372
|
* Build the render report for a freshly-drawn chart. Pure: it reads the
|
|
3970
4373
|
* resolved model + theme, never the canvas bitmap.
|
|
3971
4374
|
*/
|
|
3972
4375
|
declare function buildRenderReport(input: ReportInput): RenderReport;
|
|
4376
|
+
/** Scope child pointers/patches to their original view index, never display order. */
|
|
4377
|
+
declare function scopeViewDiagnostic(diagnostic: RenderDiagnostic, id: string, index: number, type: string): RenderDiagnostic;
|
|
4378
|
+
/** Add counters, but do not conflate repeated row participation across views with unique source rows. */
|
|
4379
|
+
declare function mergeRenderEvidence(items: readonly RenderEvidence[], inputRows?: number): RenderEvidence;
|
|
4380
|
+
/** Browser and headless dashboard reports use identical aggregation and patch scoping. */
|
|
4381
|
+
declare function aggregateDashboardReports(input: {
|
|
4382
|
+
spec: DashboardSpec;
|
|
4383
|
+
size: Size;
|
|
4384
|
+
views: NonNullable<RenderReport['views']>;
|
|
4385
|
+
labels?: LabelRecord[];
|
|
4386
|
+
suppressedLabels?: SuppressedLabel[];
|
|
4387
|
+
chromeMeasured?: boolean;
|
|
4388
|
+
diagnostics?: RenderDiagnostic[];
|
|
4389
|
+
}): DashboardRenderReport;
|
|
3973
4390
|
/** Apply safe render-report JSON Patch fixes to a clone of the spec. Pure: no rendering. */
|
|
3974
4391
|
declare function repairReport(spec: ChartSpec, report: RenderReport): {
|
|
3975
4392
|
spec: ChartSpec;
|
|
@@ -3999,6 +4416,8 @@ declare const FACETABLE_TYPES: ReadonlySet<string>;
|
|
|
3999
4416
|
interface FacetPanel {
|
|
4000
4417
|
value: string;
|
|
4001
4418
|
model: CartesianModel;
|
|
4419
|
+
report?: RenderReport;
|
|
4420
|
+
compactAxes?: Array<'x' | 'y'>;
|
|
4002
4421
|
}
|
|
4003
4422
|
/** The resolved layout of a faceted chart — the header frame plus panel models. */
|
|
4004
4423
|
interface FacetLayout {
|
|
@@ -4010,8 +4429,12 @@ interface FacetLayout {
|
|
|
4010
4429
|
panels: FacetPanel[];
|
|
4011
4430
|
/** Positioned shared legend items (multi-series only). */
|
|
4012
4431
|
legendItems?: PositionedLegendItem[];
|
|
4432
|
+
legendCount?: number;
|
|
4013
4433
|
/** A representative panel model (panels[0]) for token/legend draw. */
|
|
4014
4434
|
repModel: CartesianModel;
|
|
4435
|
+
labels?: LabelRecord[];
|
|
4436
|
+
suppressedLabels?: SuppressedLabel[];
|
|
4437
|
+
evidence?: RenderEvidence;
|
|
4015
4438
|
}
|
|
4016
4439
|
/** True when `spec` declares a usable facet on a facet-eligible cartesian type. */
|
|
4017
4440
|
declare function isFaceted(spec: ChartSpec): boolean;
|
|
@@ -4019,8 +4442,9 @@ declare function isFaceted(spec: ChartSpec): boolean;
|
|
|
4019
4442
|
* Resolve a faceted spec into a grid of panel models sharing one set of scales.
|
|
4020
4443
|
* Returns `null` when there is nothing to facet (no rows / no distinct values),
|
|
4021
4444
|
* so the caller can fall back to the normal single-chart path.
|
|
4445
|
+
* Retained/unfiltered color keys seed the reference model's shared color map.
|
|
4022
4446
|
*/
|
|
4023
|
-
declare function buildFacetModels(spec: ChartSpec, tokens: ThemeTokens, size: Size): FacetLayout | null;
|
|
4447
|
+
declare function buildFacetModels(spec: ChartSpec, tokens: ThemeTokens, size: Size, colorDomain?: readonly string[]): FacetLayout | null;
|
|
4024
4448
|
/**
|
|
4025
4449
|
* Draw a faceted chart onto `surface`: the shared header (overall title + legend)
|
|
4026
4450
|
* then every panel through the full cartesian pipeline. Static — no interaction
|
|
@@ -4059,6 +4483,12 @@ interface HeadlessTarget {
|
|
|
4059
4483
|
width: number;
|
|
4060
4484
|
/** Logical (CSS-pixel) height to draw at. */
|
|
4061
4485
|
height: number;
|
|
4486
|
+
/** Visible clip already applied by a composing caller, in this target's coordinates. */
|
|
4487
|
+
clip?: Rect;
|
|
4488
|
+
/** Shared selection state for composed static views; absent means a private store. */
|
|
4489
|
+
store?: SelectionStore;
|
|
4490
|
+
/** The composing host already provides card chrome (same convention as render options). */
|
|
4491
|
+
frame?: boolean;
|
|
4062
4492
|
}
|
|
4063
4493
|
/**
|
|
4064
4494
|
* Paint `spec` onto `target.marks` (in CSS pixels — the caller sets up any
|
|
@@ -4070,7 +4500,9 @@ interface HeadlessTarget {
|
|
|
4070
4500
|
* DOM-only) kpi, table, matrix, slicers and dashboard, which now paint a static
|
|
4071
4501
|
* canvas snapshot so the whole catalog validates server-side.
|
|
4072
4502
|
*/
|
|
4503
|
+
declare function renderToContext(target: HeadlessTarget, spec: DashboardSpec): DashboardRenderReport;
|
|
4073
4504
|
declare function renderToContext(target: HeadlessTarget, spec: ChartSpec): RenderReport;
|
|
4505
|
+
declare function renderToContext(target: HeadlessTarget, spec: ChartSpec | DashboardSpec): AnyRenderReport;
|
|
4074
4506
|
|
|
4075
4507
|
/**
|
|
4076
4508
|
* Chart runtime: the public `render(container, spec)` entry point.
|
|
@@ -4084,6 +4516,11 @@ declare function renderToContext(target: HeadlessTarget, spec: ChartSpec): Rende
|
|
|
4084
4516
|
type SelectionChangeListener = (name: string, value: SelectionValue | null) => void;
|
|
4085
4517
|
/** Options for {@link render}. */
|
|
4086
4518
|
interface RenderOptions {
|
|
4519
|
+
/**
|
|
4520
|
+
* Paint final frames without entrance/update animation, preserving spec.animation.
|
|
4521
|
+
* Re-read on every draw so a scoped caller can restore this option after a pass.
|
|
4522
|
+
*/
|
|
4523
|
+
synchronous?: boolean;
|
|
4087
4524
|
/**
|
|
4088
4525
|
* A shared selection bus. Pass the same store to multiple `render()` calls to
|
|
4089
4526
|
* link them (cross-highlight / cross-filter). Omit to give the chart its own
|
|
@@ -4283,6 +4720,8 @@ declare function wireViews(views: DashboardView[], interactions: 'auto' | 'none'
|
|
|
4283
4720
|
*/
|
|
4284
4721
|
|
|
4285
4722
|
interface RenderDashboardOptions {
|
|
4723
|
+
/** Forward a dynamically scoped final-frame animation override to every child. */
|
|
4724
|
+
synchronous?: boolean;
|
|
4286
4725
|
/** Share a bus with charts/dashboards outside this one. */
|
|
4287
4726
|
store?: SelectionStore;
|
|
4288
4727
|
/**
|
|
@@ -4306,6 +4745,8 @@ interface DashboardInstance {
|
|
|
4306
4745
|
readonly store: SelectionStore;
|
|
4307
4746
|
/** The mounted chart instances, in view order. */
|
|
4308
4747
|
readonly views: ChartInstance[];
|
|
4748
|
+
/** Aggregate current child diagnostics/evidence, with original view IDs and scoped patches. */
|
|
4749
|
+
report(): DashboardRenderReport;
|
|
4309
4750
|
getSelection(name?: string): SelectionValue | null | Record<string, SelectionValue | null>;
|
|
4310
4751
|
setSelection(name: string, value: SelectionValue | null): void;
|
|
4311
4752
|
clearSelection(name?: string): void;
|
|
@@ -4324,6 +4765,8 @@ type DashboardCell = {
|
|
|
4324
4765
|
w: number;
|
|
4325
4766
|
h: number;
|
|
4326
4767
|
baseCols: number;
|
|
4768
|
+
/** Responsive hidden views do not reserve a grid footprint. */
|
|
4769
|
+
hidden?: boolean;
|
|
4327
4770
|
};
|
|
4328
4771
|
type Cell = DashboardCell;
|
|
4329
4772
|
|
|
@@ -4343,10 +4786,70 @@ declare function defaultSpan(spec: ChartSpec, cols: number): {
|
|
|
4343
4786
|
declare function resolveDashboardLayout(layout?: DashboardLayout): ResolvedLayout;
|
|
4344
4787
|
/** Inherit the dashboard's data/theme/background onto a (wired) view spec. */
|
|
4345
4788
|
declare function inheritInto(spec: ChartSpec, dash: DashboardSpec, tokens: ThemeTokens, suppressTitle?: boolean): ChartSpec;
|
|
4346
|
-
|
|
4789
|
+
interface DashboardPlacementOptions {
|
|
4790
|
+
/** Effective responsive columns; defaults to the full-width `cols`. */
|
|
4791
|
+
columns?: number;
|
|
4792
|
+
/** Grid width for per-view responsive rules. Omit to resolve base placement. */
|
|
4793
|
+
width?: number;
|
|
4794
|
+
}
|
|
4795
|
+
/** Resolve grid positions once for browser and headless, keeping spans distinct from coordinates. */
|
|
4796
|
+
declare function placeViews(views: readonly WiredView[], cols: number, preset: DashboardLayout['preset'], options?: DashboardPlacementOptions): Cell[];
|
|
4347
4797
|
declare function resolveDashboardSections(views: WiredView[], layout: Pick<ResolvedLayout, 'cols' | 'rowHeight' | 'sections'>): SectionPlan[];
|
|
4348
4798
|
declare function renderDashboard(target: HTMLElement | string, spec: DashboardSpec, options?: RenderDashboardOptions): DashboardInstance;
|
|
4349
4799
|
|
|
4800
|
+
/** Opt-in presentation improvement. The budget includes initial and rollback renders. */
|
|
4801
|
+
interface QualityOptions {
|
|
4802
|
+
/** Hard whole-visual render ceiling; default 3. Mutable targets reserve one rollback pass. */
|
|
4803
|
+
maxPasses?: 1 | 2 | 3;
|
|
4804
|
+
}
|
|
4805
|
+
type QualityStopReason = 'no-target' | 'invalid-spec' | 'satisfied' | 'no-actions' | 'blocked' | 'no-progress' | 'repeated-spec' | 'pass-limit' | 'candidate-invalid' | 'candidate-failed' | 'candidate-regressed' | 'render-failed' | 'restore-failed';
|
|
4806
|
+
/** A proposed presentation change and its disposition, never a data repair. */
|
|
4807
|
+
interface QualityAction {
|
|
4808
|
+
diagnostic: string;
|
|
4809
|
+
path?: string;
|
|
4810
|
+
viewId?: string;
|
|
4811
|
+
patches: JsonPatchOp[];
|
|
4812
|
+
reason: string;
|
|
4813
|
+
}
|
|
4814
|
+
interface QualityIteration {
|
|
4815
|
+
/** One-based actual render attempt, including failed and restoration attempts. */
|
|
4816
|
+
pass: number;
|
|
4817
|
+
phase: 'initial' | 'candidate' | 'restore';
|
|
4818
|
+
outcome: 'selected' | 'rejected' | 'failed';
|
|
4819
|
+
/** Changes attempted in this pass; restoration reapplies the selected spec instead. */
|
|
4820
|
+
patches: JsonPatchOp[];
|
|
4821
|
+
report?: AnyRenderReport;
|
|
4822
|
+
error?: string;
|
|
4823
|
+
}
|
|
4824
|
+
/** Evidence and decisions from a bounded loop; no claim of visual perfection. */
|
|
4825
|
+
interface QualityResult {
|
|
4826
|
+
enabled: true;
|
|
4827
|
+
/** False for invalid input, a missing target, or a failed initial render. */
|
|
4828
|
+
evaluated: boolean;
|
|
4829
|
+
maxPasses: 1 | 2 | 3;
|
|
4830
|
+
renderPasses: number;
|
|
4831
|
+
/** The pass that produced the returned frame/report, absent if rendering failed. */
|
|
4832
|
+
selectedPass?: number;
|
|
4833
|
+
stopReason: QualityStopReason;
|
|
4834
|
+
iterations: QualityIteration[];
|
|
4835
|
+
/** Only actions retained in the selected effective spec. */
|
|
4836
|
+
applied: QualityAction[];
|
|
4837
|
+
/** Blocked, ineffective, invalid, failed, or rolled-back actions, with reasons. */
|
|
4838
|
+
rejected: QualityAction[];
|
|
4839
|
+
}
|
|
4840
|
+
|
|
4841
|
+
/**
|
|
4842
|
+
* Headless dashboard composition — `renderDashboardToContext`.
|
|
4843
|
+
*
|
|
4844
|
+
* Lays a dashboard's views out on the same responsive grid as the browser
|
|
4845
|
+
* runtime, then paints each view onto one canvas via {@link renderToContext}
|
|
4846
|
+
* translated into its cell. No DOM: the whole page rasterizes to a single PNG
|
|
4847
|
+
* server-side, and the per-view reports fold into one aggregate {@link RenderReport}.
|
|
4848
|
+
*/
|
|
4849
|
+
|
|
4850
|
+
/** Compose a dashboard spec onto a single canvas context. */
|
|
4851
|
+
declare function renderDashboardToContext(target: HeadlessTarget, spec: DashboardSpec): DashboardRenderReport;
|
|
4852
|
+
|
|
4350
4853
|
/**
|
|
4351
4854
|
* One-call agent drafting loop: validate → repair → render/report → summarize.
|
|
4352
4855
|
*
|
|
@@ -4371,28 +4874,34 @@ interface DraftOptions {
|
|
|
4371
4874
|
* {@link DraftResult.repairs} with its rationale, so nothing is silent.
|
|
4372
4875
|
*/
|
|
4373
4876
|
repairLevel?: 'safe' | 'data';
|
|
4877
|
+
/**
|
|
4878
|
+
* Opt in to presentation-default improvement, with at most three whole-visual
|
|
4879
|
+
* render passes including initial and rollback passes. Never changes data or
|
|
4880
|
+
* explicit settings. Omit (or false) to retain the single-render behavior.
|
|
4881
|
+
*/
|
|
4882
|
+
quality?: boolean | QualityOptions;
|
|
4374
4883
|
/**
|
|
4375
4884
|
* Optional headless 2D canvas target. When provided and the repaired spec is
|
|
4376
|
-
* valid, `draft()` paints
|
|
4377
|
-
*
|
|
4885
|
+
* valid, `draft()` paints the chart or dashboard and returns its corresponding
|
|
4886
|
+
* {@link AnyRenderReport}. This path needs no DOM.
|
|
4378
4887
|
*/
|
|
4379
4888
|
target?: HeadlessTarget;
|
|
4380
4889
|
/**
|
|
4381
4890
|
* Optional browser container or selector. When provided and `target` is
|
|
4382
|
-
* omitted, `draft()` mounts the chart
|
|
4383
|
-
*
|
|
4891
|
+
* omitted, `draft()` mounts the chart or dashboard and returns its report and
|
|
4892
|
+
* the corresponding instance for lifecycle management.
|
|
4384
4893
|
*/
|
|
4385
4894
|
container?: HTMLElement | string;
|
|
4386
4895
|
/** Browser render options forwarded when `container` is used. */
|
|
4387
4896
|
renderOptions?: RenderOptions;
|
|
4388
4897
|
}
|
|
4389
4898
|
/** Result of a {@link draft} validation/repair/render pass. */
|
|
4390
|
-
interface DraftResult {
|
|
4391
|
-
/**
|
|
4899
|
+
interface DraftResult<R extends AnyRenderReport = AnyRenderReport> {
|
|
4900
|
+
/** Selected effective spec after optional authoring repairs and presentation defaults. */
|
|
4392
4901
|
spec: unknown;
|
|
4393
4902
|
/** True when structural validation passed after optional repair. */
|
|
4394
4903
|
valid: boolean;
|
|
4395
|
-
/** True when
|
|
4904
|
+
/** True when a final rendered frame and matching report are available. */
|
|
4396
4905
|
rendered: boolean;
|
|
4397
4906
|
/** JSON Patch operations applied by repair, in order. */
|
|
4398
4907
|
patches: JsonPatchOp[];
|
|
@@ -4403,9 +4912,15 @@ interface DraftResult {
|
|
|
4403
4912
|
/** Advisory validation/lint findings for the returned spec. */
|
|
4404
4913
|
warnings: ValidationError[];
|
|
4405
4914
|
/** Vision-free render diagnostics, present only when rendering happened. */
|
|
4406
|
-
report?:
|
|
4915
|
+
report?: R;
|
|
4407
4916
|
/** Browser chart instance, present only when `container` rendering happened. */
|
|
4408
4917
|
instance?: ChartInstance;
|
|
4918
|
+
/** Browser dashboard instance; separate from `instance` to retain its chart-specific type. */
|
|
4919
|
+
dashboardInstance?: DashboardInstance;
|
|
4920
|
+
/** Bounded presentation decisions and pass history; present only when opted in. */
|
|
4921
|
+
quality?: QualityResult;
|
|
4922
|
+
/** Opt-in rendering failure, when no matching final frame/report could be returned. */
|
|
4923
|
+
renderError?: string;
|
|
4409
4924
|
/** Deterministic alt-text style summary, when the valid spec is summarizable. */
|
|
4410
4925
|
summary?: string;
|
|
4411
4926
|
}
|
|
@@ -4415,13 +4930,15 @@ interface DraftResult {
|
|
|
4415
4930
|
* validation still has errors after repair so invalid specs never reach the
|
|
4416
4931
|
* renderer.
|
|
4417
4932
|
*/
|
|
4418
|
-
declare function draft(spec:
|
|
4933
|
+
declare function draft(spec: DashboardSpec, options?: DraftOptions): DraftResult<DashboardRenderReport>;
|
|
4934
|
+
declare function draft(spec: ChartSpec, options?: DraftOptions): DraftResult<RenderReport>;
|
|
4935
|
+
declare function draft(spec: unknown, options?: DraftOptions): DraftResult;
|
|
4419
4936
|
|
|
4420
4937
|
/**
|
|
4421
4938
|
* graphein — public entry point.
|
|
4422
4939
|
*
|
|
4423
4940
|
* The barrel grows as modules land. Keep exports explicit and tree-shakeable.
|
|
4424
4941
|
*/
|
|
4425
|
-
declare const VERSION = "0.
|
|
4942
|
+
declare const VERSION = "0.19.0";
|
|
4426
4943
|
|
|
4427
|
-
export { type AggOp, type AggregateOp, type AggregateTransform, type AnimateOptions, type AnimationConfig, type AnimationHandle, type Annotation, type AnySpec, type AppliedRepair, type ArcOptions, type AreaOptions, type AreaPoint, type AreaSpec, type AxesConfig, type AxisConfig, type AxisInput, type BackingSize, type BandScale, type BandScaleOptions, type BarSpec, type BaseSlicerSpec, type BaseSpec, type BinLayout, type BinTransform, type BoxSpec, type BuildOptions, type BulletSpec, CARTESIAN_TYPES, CHART_TYPES, type CalculateTransform, type CalendarHeatmapSpec, CanvasLayer, type CanvasPillStyle, type CanvasTextCmd, type CartesianChartSpec, type CartesianInteractionBuilder, type CartesianModel, type CartesianRenderer, type CategoryInsights, type ChartInsights, type ChartInstance, type ChartSpec, type ChartSummary, type ChartType, type ChartTypeInfo, type ChoroplethSpec, type ColorScale, type ColumnProfile, type ComboAxisModel, type ComboLayer, type ComboLayerModel, type ComboMark, type ComboModel, type ComboSide, type ComboSpec, type Comparable, type ConditionalFormat, type ContinuousScale, type ControllerSelect, type Curve, type CurveType, type CustomRenderer, DEFAULT_ENTRANCE_DURATION, DEFAULT_ROUGH_STYLE, DEFAULT_UPDATE_DURATION, DIM_ALPHA, type DashboardCell, type DashboardInstance, type DashboardLayout, type DashboardResponsiveSpan, type DashboardSection, type DashboardSpec, type DashboardView, type DateRangeSlicerSpec, type Datum, type DebugConfig, type DebugSection, type DebugViewDeps, type DebugViewResult, type DecimateOptions, type Dimensions, type DraftOptions, type DraftResult, type DropdownSlicerSpec, type DroppedChrome, type DumbbellSpec, type EasingFunction, type Emphasis, type Encoding, type EntranceContext, ExpressionError, type Extent, FACETABLE_TYPES, FUNCTION_NAMES, type FacetConfig, type FacetLayout, type FacetPanel, type FieldDef, type FieldType, type FieldValue, type FillStyle, type FilterClause, type FilterPredicate, type FilterTransform, type FoldTransform, type Frame, type FrameDensity, type FrameInput, type FunnelSpec, type GaugeSpec, type GeoFeature, type GeoFeatureCollection, type GeoGeometry, type GeoMultiPolygon, type GeoPolygon, type GeoPosition, type GroupedMap, type HachureSegment, type HeadlessTarget, type HeatmapSpec, type HighlightConfig, type HistogramBin, type HistogramBinDatum, type HistogramModel, type HistogramSpec, type Hover, type IconRule, type Insets, type InsightFamily, type InsightOptions, type Inspector, type InspectorOptions, InteractionController, type InteractionLink, type InteractionModel, type Interpolator, type JsonPatchOp, type KpiComparison, type KpiSpec, LabelLedger, type LabelRecord, type LabelRole, type LegendConfig, type LegendHitRegion, type LegendItem, type LegendPosition, type LegendSymbol, type LineOptions, type LineSpec, type LinearScaleOptions, type LintFinding, type ListSlicerSpec, type LiteralPredicate, type LogScaleOptions, MIN_VIABLE_PLOT_SIZE, type MapProjection, type MarkOptions, type MatrixSpec, type MatrixValueDef, NO_PADDING, type NumberFormatSpec, type OKLCH, type OKLab, type OverlayTextOpts, type PathSink, type PieLabels, type PieSpec, type PivotCell, type PivotFlatRow, type PivotHeaderNode, type PivotOptions, type PivotResult, type PivotValueDef, type Point, type PointRef, type PointScale, type PointScaleOptions, type PointSelection, type PositionedLegendItem, type RGBA, type RangeSelection, type RangeSlicerSpec, type RecommendOptions, type RecommendedChart, type Rect, type RegressionFit, type RenderContext, type RenderDashboardOptions, type RenderDiagnostic, type RenderOptions, type RenderReport, type RepairOptions, type RepairResult, type ReportInput, type ReportSeverity, type ResolvedEntrance, type ResolvedSeries, type ResolvedSketch, type ResolvedTheme, type Rng, type RoughContext, RoughPen, type RoughStyle, SKETCH_FONT_FAMILY, SKETCH_FONT_NAME, SLICER_TYPES, SPEC_ATTR, SR_ONLY_STYLE, type SankeySpec, type ScaleConfig, type ScaleType, type ScatterInsights, type ScatterSpec, type SearchSlicerSpec, type SelectConfig, type SelectionChangeListener, type SelectionDef, type SelectionListener, type SelectionParam, type SelectionStore, type SelectionValue, type SeriesInsights, type SetSelection, type SharedScales, type Size, type SketchConfig, type SlicerSpec, type SlicerType, type SlopeSpec, Surface, TICK_SIZE, TIME_UNITS, TRANSFORM_KINDS, TYPE_ATTR, type TableColumn, type TableSpec, type TextMetricsLite, type TextSelection, type ThemeColors, type ThemeFont, type ThemeInput, type ThemeTokens, type ThemeWarning, type Tick, type TimeScaleOptions, type TimeUnit, type TimeUnitTransform, type TitleConfig, type TitleInput, Tooltip, type TooltipConfig, type TooltipContent, type TooltipRow, type Transform, type TreemapSpec, type TrendlineConfig, type UpdateContext, VERSION, type ValidationError, type ValidationResult, type ValueInsights, type ValueRef, type ValueRule, type WaterfallSpec, type WiredView, type XKind, type XModel, type YModel, adaptPaletteForDarkBackground, aggregateValues, analyzeChart, animate, applyA11y, applyAggregate, applyBin, applyCalculate, applyFilter, applyFold, applyPatch, applyPick, applyTimeUnit, applyTransform, applyTransforms, arc, area, assertValidSpec, autoInsightAnnotations, backOut, bandScale, bounceOut, boxesOverlap, buildCartesianInteraction, buildCartesianModel, buildComboModel, buildDataTableFallback, buildFacetModels, buildHistogramModel, buildRenderReport, cartesianInteractionBuilders, cartesianRenderers, categorical, categoricalSchemes, chartTitleText, chartTypeLabel, checkExpression, clamp01, clamp255, compileExpression, compilePredicate, computeBackingSize, computeBins, computeFrame, computeSeriesInsights, contrastRatio, createDiv, createInspector, createRoughPen, createSelectionStore, cubicIn, cubicInOut, cubicOut, curveCatmullRom, curveLinear, curveMonotoneX, curveStep, curveStepAfter, curveStepBefore, customRenderers, darkTheme, decimate, defaultSpan, dependentParams, diverging, divergingColorScale, divergingSchemes, draft, drawAnnotationLabels, drawAnnotations, drawAxesUnderlay, drawDebugCanvas, drawFacet, drawLegend, drawOverlay, drawTitle, drawTrendlineLabels, drawTrendlines, easings, elasticOut, ellipsize, ensureSketchFont, expoInOut, expoOut, facetReport, fillParentStyle, filterRows, fitLabel, fontString, formatCountUp, formatDate, formatNumber, formatValue, getDevicePixelRatio, groupBy, hashString, inferFieldType, inferFieldTypes, inferValueType, inheritInto, interpolateArray, interpolateNumber, interpolateNumberArray, interpolateObject, interpolateOklab, interpolateRgb, isBrowser, isEmptyValue, isFaceted, isParamClause, isSlicerType, keyFields, labelBox, legendSwatchWidth, lightTheme, line, linear, linearRegression, linearScale, linearToSrgb, lintSpec, listChartTypes, literalToValue, logScale, lttbRun, makeMatcher, matchesValue, measureText, monotoneXTangents, mulberry32, niceDomain, oklabToOklch, oklabToRgb, oklchToOklab, ordinalColorScale, overlayTextToCanvasCmd, paintCanvasText, paintLegendSwatch, parseColor, parseNumberFormat, pivot, placeViews, pointScale, polygonHachureLines, prefersReducedMotion, prettyDate, profileColumns, quadIn, quadInOut, quadOut, rampFromStops, readableTextColor, recommendChart, recordLabel, relativeLuminance, render, renderDashboard, renderDebugView, renderToContext, repairReport, repairSpec, resolveCurve, resolveDashboardLayout, resolveDashboardSections, resolveEmphasis, resolveEntrance, resolveFilterValues, resolveInsightOptions, resolveSketch, resolveTheme, resolveThemeChecked, resolveUpdate, resolveValueRef, rgbToOklab, rgbaToCss, rotatePoint, roundedRect, sampleArc, sequential, sequentialColorScale, sequentialSchemes, serializeSpec, setMeasureContext, setStyle, sinInOut, slicerParamName, smartDate, specFields, srgbToLinear, starterSpec, stripData, summarize, summarizeChart, themes, tickIncrement, tickStep, ticks, timeScale, timeTickFormat, timeTicks, toHex, toPointer, tooltipEnabled, truncateTo, validateDashboard, validateSpec, wireViews, withAlpha, withSketchFont };
|
|
4944
|
+
export { type AggOp, type AggregateOp, type AggregateTransform, type AggregationCapability, type AnimateOptions, type AnimationConfig, type AnimationHandle, type Annotation, type AnyRenderReport, type AnySpec, type AppliedRepair, type ArcOptions, type AreaOptions, type AreaPoint, type AreaSpec, type AxesConfig, type AxisConfig, type AxisInput, type BackingSize, type BandScale, type BandScaleOptions, type BarSpec, type BaseSlicerSpec, type BaseSpec, type BinLayout, type BinTransform, type BoxSpec, type BuildOptions, type BulletSpec, CARTESIAN_TYPES, CHART_TYPES, type CalculateTransform, type CalendarHeatmapSpec, CanvasLayer, type CanvasPillStyle, type CanvasTextCmd, type CardinalityGuidance, type CartesianChartSpec, type CartesianInteractionBuilder, type CartesianModel, type CartesianRenderer, type CategoryInsights, type ChartCapabilities, type ChartInsights, type ChartInstance, type ChartSpec, type ChartSummary, type ChartType, type ChartTypeInfo, type ChoroplethSpec, type ColorScale, type ColumnProfile, type ComboAxisModel, type ComboLayer, type ComboLayerModel, type ComboMark, type ComboModel, type ComboSide, type ComboSpec, type Comparable, type ConditionalFormat, type ContinuousScale, type ControllerSelect, type Curve, type CurveType, type CustomRenderer, DEFAULT_ENTRANCE_DURATION, DEFAULT_ROUGH_STYLE, DEFAULT_UPDATE_DURATION, DIM_ALPHA, type DashboardCell, type DashboardInstance, type DashboardLayout, type DashboardPlacementOptions, type DashboardRenderReport, type DashboardResponsiveSpan, type DashboardSection, type DashboardSpec, type DashboardView, type DataFinding, type DataRepresentation, type DataRequirement, type DatasetProfile, type DateRangeSlicerSpec, type Datum, type DebugConfig, type DebugSection, type DebugViewDeps, type DebugViewResult, type DecimateOptions, type DetailedColumnProfile, type Dimensions, type DraftOptions, type DraftResult, type DropdownSlicerSpec, type DroppedChrome, type DumbbellSpec, type EasingFunction, type Emphasis, type Encoding, type EncodingProfile, type EntranceContext, type EvidenceCoverage, ExpressionError, type Extent, FACETABLE_TYPES, FUNCTION_NAMES, type FacetConfig, type FacetLayout, type FacetPanel, type FieldDef, type FieldRoleInfo, type FieldType, type FieldValue, type FillStyle, type FilterClause, type FilterPredicate, type FilterTransform, type FoldTransform, type Frame, type FrameDensity, type FrameInput, type FunnelSpec, type GaugeSpec, type GeoFeature, type GeoFeatureCollection, type GeoGeometry, type GeoMultiPolygon, type GeoPolygon, type GeoPosition, type GroupedMap, type HachureSegment, type HeadlessTarget, type HeatmapSpec, type HighlightConfig, type HistogramBin, type HistogramBinDatum, type HistogramModel, type HistogramSpec, type Hover, type IconRule, type Insets, type InsightFamily, type InsightOptions, type Inspector, type InspectorOptions, InteractionController, type InteractionLink, type InteractionModel, type Interpolator, type JsonPatchOp, type KpiComparison, type KpiSpec, LabelLedger, type LabelRecord, type LabelRole, type LegendConfig, type LegendHitRegion, type LegendItem, type LegendPosition, type LegendSymbol, type LineOptions, type LineSpec, type LinearScaleOptions, type LintFinding, type ListSlicerSpec, type LiteralPredicate, type LogScaleOptions, type LogicalMarkCount, MIN_VIABLE_PLOT_SIZE, type MapProjection, type MarkBoundary, type MarkKind, type MarkOptions, type MatrixSpec, type MatrixValueDef, NO_PADDING, type NumberFormatSpec, type NumericEvidence, type OKLCH, type OKLab, type OverlayTextOpts, type PaintEvidence, type PathSink, type PieLabels, type PieSpec, type PivotCell, type PivotFlatRow, type PivotHeaderNode, type PivotOptions, type PivotResult, type PivotValueDef, type Point, type PointRef, type PointScale, type PointScaleOptions, type PointSelection, type PositionedLegendItem, type ProfileEncoding, type ProfileField, type ProfileOptions, type QualityAction, type QualityIteration, type QualityOptions, type QualityResult, type QualityStopReason, type RGBA, type RangeSelection, type RangeSlicerSpec, type RecommendOptions, type RecommendationEvidence, type RecommendationResult, type RecommendedChart, type Rect, type RegressionFit, type RenderContext, type RenderDashboardOptions, type RenderDiagnostic, type RenderEvidence, type RenderOptions, type RenderReport, type RepairOptions, type RepairResult, type ReportInput, type ReportSeverity, type ResolvedEntrance, type ResolvedSeries, type ResolvedSketch, type ResolvedTheme, type Rng, type RoughContext, RoughPen, type RoughStyle, SKETCH_FONT_FAMILY, SKETCH_FONT_NAME, SLICER_TYPES, SPEC_ATTR, SR_ONLY_STYLE, type SankeySpec, type ScaleConfig, type ScaleType, type ScatterInsights, type ScatterSpec, type SearchSlicerSpec, type SelectConfig, type SelectionChangeListener, type SelectionDef, type SelectionListener, type SelectionParam, type SelectionStore, type SelectionValue, type SeriesInsights, type SetSelection, type SharedScales, type Size, type SketchConfig, type SlicerSpec, type SlicerType, type SlopeSpec, type SuppressedLabel, Surface, TICK_SIZE, TIME_UNITS, TRANSFORM_KINDS, TYPE_ATTR, type TableColumn, type TableSpec, type TemporalEvidence, type TextMetricsLite, type TextSelection, type ThemeColors, type ThemeFont, type ThemeFontSizes, type ThemeFontWeights, type ThemeInput, type ThemeRadii, type ThemeSpacing, type ThemeStrokes, type ThemeTokens, type ThemeWarning, type Tick, type TimeScaleOptions, type TimeUnit, type TimeUnitTransform, type TitleConfig, type TitleInput, Tooltip, type TooltipConfig, type TooltipContent, type TooltipRow, type Transform, type TreemapSpec, type TrendlineConfig, type TypeAmbiguity, type UpdateContext, VERSION, type ValidationError, type ValidationResult, type ValueInsights, type ValueRef, type ValueRule, type WaterfallSpec, type WiredView, type XKind, type XModel, type YModel, adaptPaletteForDarkBackground, aggregateDashboardReports, aggregateValues, analyzeChart, animate, applyA11y, applyAggregate, applyBin, applyCalculate, applyFilter, applyFold, applyPatch, applyPick, applyTimeUnit, applyTransform, applyTransforms, arc, area, assertValidSpec, autoInsightAnnotations, backOut, bandScale, bounceOut, boxesOverlap, buildCartesianInteraction, buildCartesianModel, buildComboModel, buildDataTableFallback, buildFacetModels, buildHistogramModel, buildRenderReport, cartesianInteractionBuilders, cartesianRenderers, categorical, categoricalSchemes, chartTitleText, chartTypeLabel, checkExpression, clamp01, clamp255, compileExpression, compilePredicate, computeBackingSize, computeBins, computeFrame, computeSeriesInsights, contrastRatio, createDiv, createInspector, createRoughPen, createSelectionStore, cubicIn, cubicInOut, cubicOut, curveCatmullRom, curveLinear, curveMonotoneX, curveStep, curveStepAfter, curveStepBefore, customRenderers, darkTheme, decimate, defaultSpan, dependentParams, diverging, divergingColorScale, divergingSchemes, draft, drawAnnotationLabels, drawAnnotations, drawAxesUnderlay, drawDebugCanvas, drawFacet, drawLegend, drawOverlay, drawTitle, drawTrendlineLabels, drawTrendlines, easings, elasticOut, ellipsize, ensureSketchFont, expoInOut, expoOut, facetReport, fillParentStyle, filterRows, fitLabel, fontString, formatCountUp, formatDate, formatNumber, formatValue, getDevicePixelRatio, groupBy, hashString, inferFieldType, inferFieldTypes, inferValueType, inheritInto, interpolateArray, interpolateNumber, interpolateNumberArray, interpolateObject, interpolateOklab, interpolateRgb, isBrowser, isEmptyValue, isFaceted, isNumberFormat, isParamClause, isSlicerType, keyFields, labelBox, labelsOverlap, legendSwatchWidth, lightTheme, line, linear, linearRegression, linearScale, linearToSrgb, lintSpec, listChartTypes, literalToValue, logScale, lttbRun, makeMatcher, matchesValue, measureContentSize, measureText, mergeRenderEvidence, monotoneXTangents, mulberry32, niceDomain, oklabToOklch, oklabToRgb, oklchToOklab, ordinalColorScale, overlayTextToCanvasCmd, paintCanvasText, paintLegendSwatch, parseColor, parseNumberFormat, pivot, placeViews, pointScale, polygonHachureLines, prefersReducedMotion, prettyDate, profileColumns, profileData, quadIn, quadInOut, quadOut, rampFromStops, readableTextColor, recommendChart, recordCanvasLabel, recordDomLabels, recordLabel, relativeLuminance, render, renderDashboard, renderDashboardToContext, renderDebugView, renderToContext, repairReport, repairSpec, resolveCurve, resolveDashboardLayout, resolveDashboardSections, resolveEmphasis, resolveEntrance, resolveFilterValues, resolveInsightOptions, resolveSketch, resolveTheme, resolveThemeChecked, resolveUpdate, resolveValueRef, rgbToOklab, rgbaToCss, rotatePoint, roundedRect, sampleArc, scopeViewDiagnostic, sequential, sequentialColorScale, sequentialSchemes, serializeSpec, seriesColorDomain, setMeasureContext, setStyle, sinInOut, slicerParamName, smartDate, specFields, srgbToLinear, starterSpec, stripData, summarize, summarizeChart, themes, tickIncrement, tickStep, ticks, timeScale, timeTickFormat, timeTicks, toHex, toPointer, tooltipEnabled, truncateTo, validateDashboard, validateSpec, wireViews, withAlpha, withSketchFont };
|