@graphysdk/react-renderer 0.0.1-alpha.20260713101041
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 +0 -0
- package/dist/index.cjs +3 -0
- package/dist/index.css +1 -0
- package/dist/index.d.ts +1113 -0
- package/dist/index.mjs +5852 -0
- package/package.json +96 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,1113 @@
|
|
|
1
|
+
import { AppearanceConfig } from '@graphysdk/viz-engine';
|
|
2
|
+
import { CalloutHitRegion } from '@graphysdk/viz-engine';
|
|
3
|
+
import { CalloutPlacement } from '@graphysdk/viz-engine';
|
|
4
|
+
import { CartesianCoordSystem } from '@graphysdk/viz-engine';
|
|
5
|
+
import { Command } from '@graphysdk/viz-engine';
|
|
6
|
+
import { CompiledLayer } from '@graphysdk/viz-engine';
|
|
7
|
+
import { CompiledLayerFor } from '@graphysdk/viz-engine';
|
|
8
|
+
import { CompiledPanel } from '@graphysdk/viz-engine';
|
|
9
|
+
import { CompiledSpec } from '@graphysdk/viz-engine';
|
|
10
|
+
import { CompilerInput } from '@graphysdk/viz-engine';
|
|
11
|
+
import { Component } from 'react';
|
|
12
|
+
import { ComponentType } from 'react';
|
|
13
|
+
import { CoordSystem } from '@graphysdk/viz-engine';
|
|
14
|
+
import { CreateGraphyBuilderOptions } from '@graphysdk/viz-engine';
|
|
15
|
+
import { CSSProperties } from 'react';
|
|
16
|
+
import { CustomPalettesInput } from '@graphysdk/viz-engine';
|
|
17
|
+
import { Data } from '@graphysdk/viz-engine';
|
|
18
|
+
import { ErrorInfo } from 'react';
|
|
19
|
+
import { FontSpec } from '@graphysdk/viz-engine';
|
|
20
|
+
import { FormattedAxis } from '@graphysdk/viz-engine';
|
|
21
|
+
import { FormattedHeadline } from '@graphysdk/viz-engine';
|
|
22
|
+
import { FormattedLegend } from '@graphysdk/viz-engine';
|
|
23
|
+
import { Geom } from '@graphysdk/viz-engine';
|
|
24
|
+
import { GeomName } from '@graphysdk/viz-engine';
|
|
25
|
+
import { GraphLayout } from '@graphysdk/viz-engine';
|
|
26
|
+
import { GraphTheme } from '@graphysdk/viz-engine';
|
|
27
|
+
import { GraphyBuilder } from '@graphysdk/viz-engine';
|
|
28
|
+
import { HeadlineMeasurer } from '@graphysdk/viz-engine';
|
|
29
|
+
import { HoverHit } from '@graphysdk/viz-engine';
|
|
30
|
+
import { HoverState } from '@graphysdk/viz-engine';
|
|
31
|
+
import { JSX } from 'react/jsx-runtime';
|
|
32
|
+
import { LayoutEdge } from '@graphysdk/viz-engine';
|
|
33
|
+
import { Locale } from '@graphysdk/viz-engine';
|
|
34
|
+
import { MeasuredText } from '@graphysdk/viz-engine';
|
|
35
|
+
import { Observation } from '@graphysdk/viz-engine';
|
|
36
|
+
import { Plugin as Plugin_2 } from '@graphysdk/viz-engine';
|
|
37
|
+
import { PolarCoordSystem } from '@graphysdk/viz-engine';
|
|
38
|
+
import { ReactElement } from 'react';
|
|
39
|
+
import { ReactNode } from 'react';
|
|
40
|
+
import { Rect } from '@graphysdk/viz-engine';
|
|
41
|
+
import { RenderHitTester } from '@graphysdk/viz-engine';
|
|
42
|
+
import { ResolvedHeadlineSize } from '@graphysdk/viz-engine';
|
|
43
|
+
import { SourceContent } from '@graphysdk/viz-engine';
|
|
44
|
+
import { SVGProps } from 'react';
|
|
45
|
+
import { TextContent } from '@graphysdk/viz-engine';
|
|
46
|
+
import { TextMeasurer } from '@graphysdk/viz-engine';
|
|
47
|
+
import { TooltipContent } from '@graphysdk/viz-engine';
|
|
48
|
+
import { VizDiagnostic } from '@graphysdk/viz-engine';
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Props for the AxisLabel slot — the axis title of every axis (e.g. "Revenue"), overridable via
|
|
52
|
+
* `slots.AxisLabel`. `labelRects` are SVG-local, keyed by edge. The tick band is a separate slot — see
|
|
53
|
+
* `AxisTicks`.
|
|
54
|
+
*/
|
|
55
|
+
export declare interface AxisLabelSlotProps {
|
|
56
|
+
formattedAxes: FormattedAxis[];
|
|
57
|
+
labelRects: Partial<Record<LayoutEdge, Rect>>;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* Props for the AxisTicks slot — the tick lines and tick labels of every axis, overridable via
|
|
62
|
+
* `slots.AxisTicks`. `tickRects` are SVG-local, keyed by edge. The axis title is a separate slot — see
|
|
63
|
+
* `AxisLabel`.
|
|
64
|
+
*/
|
|
65
|
+
export declare interface AxisTicksSlotProps {
|
|
66
|
+
formattedAxes: FormattedAxis[];
|
|
67
|
+
tickRects: Partial<Record<LayoutEdge, Rect>>;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* Browser text measurer backed by OffscreenCanvas.
|
|
72
|
+
*
|
|
73
|
+
* Uses the same Canvas `measureText()` API that the rendering engine uses,
|
|
74
|
+
* ensuring measurement/rendering consistency.
|
|
75
|
+
*
|
|
76
|
+
* **Font loading:** Use the async `create()` factory to ensure all declared
|
|
77
|
+
* `@font-face` fonts are loaded before any measurements. This avoids
|
|
78
|
+
* measuring against fallback fonts and caching incorrect widths.
|
|
79
|
+
* The sync constructor is available for controlled environments where font
|
|
80
|
+
* readiness is managed externally (e.g. backend with pre-registered fonts).
|
|
81
|
+
*
|
|
82
|
+
* Includes an emoji correction that compensates for the known discrepancy
|
|
83
|
+
* where Canvas `measureText()` reports wider widths for emoji than the DOM
|
|
84
|
+
* actually renders (Chrome/Firefox at font sizes < ~24px). The correction
|
|
85
|
+
* is computed once per font by comparing Canvas vs DOM measurement of a
|
|
86
|
+
* reference emoji, then cached.
|
|
87
|
+
*/
|
|
88
|
+
export declare class CanvasTextMeasurer implements TextMeasurer {
|
|
89
|
+
private readonly ctx;
|
|
90
|
+
/**
|
|
91
|
+
* Caches the per-font emoji correction factor.
|
|
92
|
+
*/
|
|
93
|
+
private readonly emojiCorrections;
|
|
94
|
+
/**
|
|
95
|
+
* Tracks the last font string set on the context.
|
|
96
|
+
*/
|
|
97
|
+
private currentFont;
|
|
98
|
+
constructor();
|
|
99
|
+
/**
|
|
100
|
+
* Creates a CanvasTextMeasurer after all declared `@font-face` fonts
|
|
101
|
+
* have finished loading. This ensures measurements use the correct font
|
|
102
|
+
* glyphs from the first call, avoiding stale cache entries.
|
|
103
|
+
*
|
|
104
|
+
* Falls back to immediate construction if `document.fonts` is unavailable
|
|
105
|
+
* (e.g. non-browser environment).
|
|
106
|
+
*
|
|
107
|
+
* Note: document.fonts.ready still resolves even if some fonts fail to load.
|
|
108
|
+
*/
|
|
109
|
+
static create(): Promise<CanvasTextMeasurer>;
|
|
110
|
+
measureText(text: string, font: FontSpec): MeasuredText;
|
|
111
|
+
/**
|
|
112
|
+
* Skip redundant `ctx.font` assignments
|
|
113
|
+
* Setting the property triggers CSS font string parsing and font resolution.
|
|
114
|
+
*/
|
|
115
|
+
private setFont;
|
|
116
|
+
/**
|
|
117
|
+
* Computes the per-emoji width correction for a given font.
|
|
118
|
+
* Measures the reference emoji in both Canvas and DOM, caches the difference.
|
|
119
|
+
* Returns 0 if DOM is unavailable or the difference is negligible (< 0.5px).
|
|
120
|
+
*/
|
|
121
|
+
private getEmojiCorrection;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
/**
|
|
125
|
+
* The compiled layer a renderer's handlers receive. A built-in renderer keyed to a `GeomName` gets
|
|
126
|
+
* its param-narrowed `CompiledLayerFor<G>`; a custom renderer (`G = string`) is downstream of
|
|
127
|
+
* serialisation, never sees the plugins array, and reads the base {@link CompiledLayer} dynamically.
|
|
128
|
+
*/
|
|
129
|
+
declare type CompiledLayerOf<G extends GeomName | string> = G extends GeomName ? CompiledLayerFor<G> : CompiledLayer;
|
|
130
|
+
|
|
131
|
+
declare type CoordKind = CoordSystem['type'];
|
|
132
|
+
|
|
133
|
+
/** Maps a coord-kind discriminator to the corresponding `CoordSystem` member. */
|
|
134
|
+
declare type CoordSystemFor<C extends CoordKind> = C extends 'cartesian' ? CartesianCoordSystem : C extends 'polar' ? PolarCoordSystem : never;
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* Ergonomic entry point for a React app: pass `plugins` once and get back a {@link GraphyKit} — the
|
|
138
|
+
* typed builder plus a `GraphProvider` that already carries them. Pure sugar over the primitives
|
|
139
|
+
* (`createGraphyBuilder`, `<GraphProvider plugins>`); use those directly for headless or advanced
|
|
140
|
+
* wiring. The `const` type parameter captures the `plugins` tuple literally, so `kit.geom.<customName>`
|
|
141
|
+
* is typed.
|
|
142
|
+
*/
|
|
143
|
+
export declare function createGraphyKit<const P extends readonly Plugin_2[] = []>(options?: CreateGraphyBuilderOptions<P>): GraphyKit<P>;
|
|
144
|
+
|
|
145
|
+
/** vanilla-extract class that binds the dark token values; set it on any ancestor to flip to dark. */
|
|
146
|
+
export declare const darkTheme: string;
|
|
147
|
+
|
|
148
|
+
/** Default paint for the footer region — caption and source line. */
|
|
149
|
+
export declare const DefaultFooter: ({ ref, footerRect, mode, caption, isCaptionVisible, source, isSourceVisible, }: FooterSlotProps) => JSX.Element | null;
|
|
150
|
+
|
|
151
|
+
/** Default paint for the grid region — panel border and per-tick gridlines, drawn inside the panel rect. */
|
|
152
|
+
export declare const DefaultGrid: ({ axes, panel, panelFrameRect, panelRect }: GridSlotProps) => JSX.Element;
|
|
153
|
+
|
|
154
|
+
/** Default paint for the header region — title and subtitle. */
|
|
155
|
+
export declare const DefaultHeader: ({ ref, headerRect, mode, title, isTitleVisible, subtitle, isSubtitleVisible, }: HeaderSlotProps) => JSX.Element | null;
|
|
156
|
+
|
|
157
|
+
/**
|
|
158
|
+
* Default tooltip body. Paints the box, header, and rows from the formatted {@link content}, and
|
|
159
|
+
* resolves each row's swatch shape off its geom's render contract for the active coord system.
|
|
160
|
+
* Positioning lives in the {@link Tooltip} wrapper, never here.
|
|
161
|
+
*/
|
|
162
|
+
export declare const DefaultTooltip: ({ content }: TooltipSlotProps) => JSX.Element;
|
|
163
|
+
|
|
164
|
+
/**
|
|
165
|
+
* Dual-target renderer binding, keyed on whether the first argument is a compile definition or a built-in
|
|
166
|
+
* geom name:
|
|
167
|
+
*
|
|
168
|
+
* - **Whole new geom** — `defineGeomRenderer(definition, contract)` pairs the render contract with its
|
|
169
|
+
* compile definition, producing a {@link GeomRendererDefinition}. Registering the result registers both
|
|
170
|
+
* sides: the compile definition is reachable at `.definition` and the geom name is read from it, so the
|
|
171
|
+
* two halves cannot drift.
|
|
172
|
+
* - **Render-only override** — `defineGeomRenderer('bar', contract)` rebinds only the paint half of an
|
|
173
|
+
* existing built-in, producing a {@link ResolvedGeomRenderer} that carries no `.definition`. The built-in
|
|
174
|
+
* compile half keeps running (nothing re-seeds the compile registry); only the render registry changes.
|
|
175
|
+
* The name is constrained to {@link GeomName}, so a by-name override of an unknown built-in is a
|
|
176
|
+
* compile-time error. To restyle a *custom* geom, rebind its definition (which you hold) via the first form.
|
|
177
|
+
*/
|
|
178
|
+
export declare function defineGeomRenderer<Definition extends Geom<unknown>>(definition: Definition, contract: GeomRenderContract): GeomRendererDefinition & {
|
|
179
|
+
readonly definition: Definition;
|
|
180
|
+
};
|
|
181
|
+
|
|
182
|
+
export declare function defineGeomRenderer<G extends GeomName>(geom: G, contract: GeomRenderContract): ResolvedGeomRenderer;
|
|
183
|
+
|
|
184
|
+
/** Dev-only compile-cache inspector; render inside a `<GraphProvider>`. See {@link DevToolsPanelProps}. */
|
|
185
|
+
export declare const DevToolsPanel: ({ width, style, className }?: DevToolsPanelProps) => JSX.Element;
|
|
186
|
+
|
|
187
|
+
/**
|
|
188
|
+
* Dev-only panel that visualises the compile cache. Drop it inside a `<GraphProvider>` to see, in
|
|
189
|
+
* real time, which compile stages re-ran vs. hit cache for the most recent dispatch, plus a
|
|
190
|
+
* bounded log of recent compiles and the cumulative hit/miss counters.
|
|
191
|
+
*/
|
|
192
|
+
export declare interface DevToolsPanelProps {
|
|
193
|
+
/** Panel width in pixels. Defaults to 380. */
|
|
194
|
+
width?: number;
|
|
195
|
+
/** Style override merged onto the outer wrapper. */
|
|
196
|
+
style?: CSSProperties;
|
|
197
|
+
/** Class applied to the outer wrapper. */
|
|
198
|
+
className?: string;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
declare const FONT_STYLES: readonly ["normal", "italic", "oblique"];
|
|
202
|
+
|
|
203
|
+
/**
|
|
204
|
+
* A CSS length keeping its unit so measurement can treat it like CSS paint does: em scales with
|
|
205
|
+
* `textScale` (see `emToPx`), px stays absolute.
|
|
206
|
+
*/
|
|
207
|
+
export declare interface FontLength {
|
|
208
|
+
value: number;
|
|
209
|
+
unit: 'px' | 'em';
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
export declare type FontListInput = Array<{
|
|
213
|
+
id: string;
|
|
214
|
+
fontFamily: string;
|
|
215
|
+
}>;
|
|
216
|
+
|
|
217
|
+
export declare type FontStyle = (typeof FONT_STYLES)[number];
|
|
218
|
+
|
|
219
|
+
/**
|
|
220
|
+
* A structured override of a measured font token. Omitted fields keep the token's default (which
|
|
221
|
+
* still cascades from the leaf tokens, e.g. `fontSizeXs`), so `{ weight: 600 }` changes only the
|
|
222
|
+
* weight.
|
|
223
|
+
*/
|
|
224
|
+
export declare interface FontTokenOverride {
|
|
225
|
+
family?: string;
|
|
226
|
+
weight?: number;
|
|
227
|
+
style?: FontStyle;
|
|
228
|
+
size?: FontLength;
|
|
229
|
+
/** Unitless multiplier; sizes HTML line boxes (legend band). Canvas measurement ignores it. */
|
|
230
|
+
lineHeight?: number;
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
/**
|
|
234
|
+
* Props for the Footer slot, overridable via `slots.Footer` on `GraphRenderer`. Caption editing in
|
|
235
|
+
* `editable` mode is internal to this default; an override replacing the region opts out of it.
|
|
236
|
+
*/
|
|
237
|
+
export declare interface FooterSlotProps {
|
|
238
|
+
/** Forward this to the region's outer element — the layout measures the rendered DOM to reserve its space. */
|
|
239
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
240
|
+
footerRect: Rect;
|
|
241
|
+
mode?: GraphMode;
|
|
242
|
+
caption: TextContent | null;
|
|
243
|
+
isCaptionVisible: boolean;
|
|
244
|
+
source: SourceContent | null;
|
|
245
|
+
isSourceVisible: boolean;
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
export declare type GeomHoverCompanionsRendererInput = HoverCompanionsRenderInput;
|
|
249
|
+
|
|
250
|
+
/** Page-relative cursor coordinates the push-path tooltip anchors to. */
|
|
251
|
+
export declare interface GeomHoverCursor {
|
|
252
|
+
clientX: number;
|
|
253
|
+
clientY: number;
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
/**
|
|
257
|
+
* Pushes a hovered observation key into the central hover, or clears this layer's hover with `null`.
|
|
258
|
+
* A non-null key requires a `cursor` — the overlay intercepts the pointer events the cursor-follow
|
|
259
|
+
* tooltip would otherwise read, so the anchor can only come from the geom's own handler. Consumed by
|
|
260
|
+
* {@link InteractiveOverlayApi.pushHover} and returned by `useGeomHover`.
|
|
261
|
+
*/
|
|
262
|
+
export declare interface GeomHoverPush {
|
|
263
|
+
(key: string, cursor: GeomHoverCursor): void;
|
|
264
|
+
(key: null): void;
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
export declare type GeomHoverRendererInput = HoverRenderInput;
|
|
268
|
+
|
|
269
|
+
export declare type GeomOverlayAnchorRendererInput = OverlayAnchorInput;
|
|
270
|
+
|
|
271
|
+
/** An overlay-hosted geom's paint function — receives the guaranteed overlay wiring on `input.overlay`. */
|
|
272
|
+
export declare type GeomOverlayRenderFn<G extends GeomName | string = string, C extends CoordKind = CoordKind> = (input: GeomOverlayRenderInput<G, C>) => ReactNode;
|
|
273
|
+
|
|
274
|
+
/**
|
|
275
|
+
* The input an overlay-hosted render (`{ fn, options: { overlay: true } }`) receives: the standard render
|
|
276
|
+
* input plus a guaranteed {@link InteractiveOverlayApi}. The renderer always supplies it, so the geom's
|
|
277
|
+
* render uses `overlay` unconditionally — it never decides where it is mounted, only what it paints.
|
|
278
|
+
*/
|
|
279
|
+
export declare interface GeomOverlayRenderInput<G extends GeomName | string = string, C extends CoordKind = CoordKind> extends GeomRenderInput<G, C> {
|
|
280
|
+
overlay: InteractiveOverlayApi;
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
/**
|
|
284
|
+
* A geom's `render`: either a plain panel-SVG paint function, or an overlay-hosted one paired with
|
|
285
|
+
* `options` — so a geom that must paint into the interactive overlay declares
|
|
286
|
+
* `{ fn, options: { overlay: true } }` without a second render entry point. The
|
|
287
|
+
* renderer decides where each is mounted; the geom only decides what it paints. `render` is the single
|
|
288
|
+
* paint declaration either way.
|
|
289
|
+
*/
|
|
290
|
+
export declare type GeomRender<G extends GeomName | string = string, C extends CoordKind = CoordKind> = GeomRenderFn<G, C> | {
|
|
291
|
+
fn: GeomOverlayRenderFn<G, C>;
|
|
292
|
+
options: GeomRenderOptions;
|
|
293
|
+
};
|
|
294
|
+
|
|
295
|
+
/**
|
|
296
|
+
* The render side of a geom: everything a single `(geom, coord)` composition needs to render and
|
|
297
|
+
* respond to hover. Generic over the geom name and coord kind, so a built-in renderer parameterised
|
|
298
|
+
* as `GeomRenderContract<'bar', 'cartesian'>` receives param-narrowed inputs (`CompiledLayerFor<'bar'>`,
|
|
299
|
+
* `CartesianCoordSystem`), while the default `<string, CoordKind>` instantiation is the base/custom
|
|
300
|
+
* contract a plugin author writes against. The geom's name, highlight strategy, and `params` type are
|
|
301
|
+
* NOT restated here — they are read off the compile definition this contract is bound to (see
|
|
302
|
+
* {@link defineGeomRenderer}). This is the single declaration of a geom's render contract; the built-in
|
|
303
|
+
* narrow form below and the base/custom form (`geom-renderer.ts`) are both instantiations of it.
|
|
304
|
+
*/
|
|
305
|
+
export declare interface GeomRenderContract<G extends GeomName | string = string, C extends CoordKind = CoordKind> {
|
|
306
|
+
/** The coord system this contract paints under. A geom may bind one contract per coord. */
|
|
307
|
+
coord: C;
|
|
308
|
+
swatchShape?: SwatchShape;
|
|
309
|
+
/**
|
|
310
|
+
* The hover-guide mode this `(geom, coord)` draws when it is the hovered layer (a
|
|
311
|
+
* {@link HoverGuideMode}). Omit it — or contribute `null` — to draw no guide (the geom's mark is its
|
|
312
|
+
* own highlight). A declared mode the composition can't realise draws nothing: a polar bar's `'band'`
|
|
313
|
+
* fills a wedge, but a pie/donut (no category band) resolves to an empty one. `resolveHoverGuideMode`
|
|
314
|
+
* reads the hovered layer's mode to pick the one guide the chart draws.
|
|
315
|
+
*/
|
|
316
|
+
guideMode?: HoverGuideMode | null;
|
|
317
|
+
/**
|
|
318
|
+
* The geom's paint. A plain function paints into the panel SVG; the `{ fn, options: { overlay: true } }`
|
|
319
|
+
* form paints into a screen-aligned portal above the central capture layer for a live/drag-driven geom
|
|
320
|
+
* that owns its pointer events (force-directed), with the wiring on `input.overlay`.
|
|
321
|
+
*/
|
|
322
|
+
render: GeomRender<G, C>;
|
|
323
|
+
renderHover: (input: HoverRenderInput<G, C>) => ReactNode;
|
|
324
|
+
renderHoverCompanions: (input: HoverCompanionsRenderInput<G>) => ReactNode;
|
|
325
|
+
/**
|
|
326
|
+
* Render-side spatial query for a `'render-hit-test'` layer whose geometry is precomputed into the
|
|
327
|
+
* compiled spec (sankey ribbons, treemap tiles, voronoi cells). A
|
|
328
|
+
* **factory**: given the render input it returns the per-cursor {@link RenderHitTester};
|
|
329
|
+
* the renderer memoizes the factory on `layer.data`, so the read runs once per data change and the
|
|
330
|
+
* per-move query allocates nothing. The author writes no hook; the renderer registers the tester on its
|
|
331
|
+
* behalf. The cursor arrives in panel-local `[0,1]` with a top-left origin — the frame the geom paints
|
|
332
|
+
* in. Returns the declared identity key of the observation under the cursor, or `null` for a miss.
|
|
333
|
+
*/
|
|
334
|
+
hitTest?: (input: GeomRenderInput<G, C>) => RenderHitTester;
|
|
335
|
+
/** Panel-space anchor for a matched observation; required when the def highlights via overlay-anchor. */
|
|
336
|
+
getOverlayAnchor?: (input: OverlayAnchorInput<G, C>) => OverlayAnchor | null;
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
/**
|
|
340
|
+
* A render contract paired with the compile definition it paints for. The engine recovers the definition
|
|
341
|
+
* structurally from `.definition` (React-free), and the renderer reads the geom name from the same
|
|
342
|
+
* definition — so the compile and render sides are one declaration consumed twice, never two matched by
|
|
343
|
+
* a string.
|
|
344
|
+
*/
|
|
345
|
+
export declare interface GeomRendererDefinition extends ResolvedGeomRenderer {
|
|
346
|
+
/** The compile definition this renderer paints for. Held by reference — the single source of identity. */
|
|
347
|
+
readonly definition: Geom<unknown>;
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
/** A custom geom render handler's input — the base instantiation of the typed built-in inputs. */
|
|
351
|
+
export declare type GeomRendererInput = GeomRenderInput;
|
|
352
|
+
|
|
353
|
+
/** A geom's panel-SVG paint function — the plain `render` form. */
|
|
354
|
+
export declare type GeomRenderFn<G extends GeomName | string = string, C extends CoordKind = CoordKind> = (input: GeomRenderInput<G, C>) => ReactNode;
|
|
355
|
+
|
|
356
|
+
declare interface GeomRenderInput<G extends GeomName | string = string, C extends CoordKind = CoordKind> {
|
|
357
|
+
layer: CompiledLayerOf<G>;
|
|
358
|
+
coordSystem: CoordSystemFor<C>;
|
|
359
|
+
isAnimated: boolean;
|
|
360
|
+
formattingLocale: Locale;
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
/**
|
|
364
|
+
* Hosting options for an overlay render. The presence of the object form already declares overlay hosting;
|
|
365
|
+
* `overlay: true` makes the call site read explicitly (and leaves room for further hosting options later).
|
|
366
|
+
*/
|
|
367
|
+
export declare interface GeomRenderOptions {
|
|
368
|
+
/**
|
|
369
|
+
* Mount this render's output in a screen-aligned portal above the central capture layer, rather than in
|
|
370
|
+
* the panel SVG — for a live or drag-driven geom that must own its pointer events (force-directed). The
|
|
371
|
+
* renderer then supplies {@link GeomOverlayRenderInput.overlay}.
|
|
372
|
+
*/
|
|
373
|
+
overlay: true;
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
/**
|
|
377
|
+
* The single place a chart surfaces an error in place — instead of unwinding the page to a blank
|
|
378
|
+
* screen. Two failure modes converge here: a non-throwing **compile failure** the host passes via
|
|
379
|
+
* {@link GraphErrorBoundaryProps.forcedErrors}, and a **render-throw** from a renderer component that
|
|
380
|
+
* this boundary catches. Both render the same {@link GraphErrorPanel}, so there is exactly one panel
|
|
381
|
+
* call site rather than one per failure mode.
|
|
382
|
+
*/
|
|
383
|
+
export declare class GraphErrorBoundary extends Component<GraphErrorBoundaryProps, GraphErrorBoundaryState> {
|
|
384
|
+
state: GraphErrorBoundaryState;
|
|
385
|
+
static getDerivedStateFromError(error: Error): GraphErrorBoundaryState;
|
|
386
|
+
componentDidCatch(error: Error, info: ErrorInfo): void;
|
|
387
|
+
componentDidUpdate(prevProps: GraphErrorBoundaryProps): void;
|
|
388
|
+
render(): ReactNode;
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
declare interface GraphErrorBoundaryProps {
|
|
392
|
+
children: ReactNode;
|
|
393
|
+
/**
|
|
394
|
+
* Compile failures to surface in place, rendered through the same panel as a caught render-throw
|
|
395
|
+
* so a chart has one predictable place for its errors.
|
|
396
|
+
*/
|
|
397
|
+
forcedErrors?: VizDiagnostic[] | null;
|
|
398
|
+
/**
|
|
399
|
+
* When any key changes after a caught render-throw, the boundary clears it and
|
|
400
|
+
* retries — so a fixed spec recovers. */
|
|
401
|
+
resetKeys?: readonly unknown[];
|
|
402
|
+
/**
|
|
403
|
+
* Called with a single-element list when a child throws during render
|
|
404
|
+
* (not for `forcedErrors`, which the host already reported).
|
|
405
|
+
*/
|
|
406
|
+
onError?: (errors: VizDiagnostic[]) => void;
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
declare interface GraphErrorBoundaryState {
|
|
410
|
+
caughtDiagnostic: VizDiagnostic | null;
|
|
411
|
+
}
|
|
412
|
+
|
|
413
|
+
/**
|
|
414
|
+
* Shared in-place fallback for a chart that failed to compile or render. Shows each diagnostic's
|
|
415
|
+
* `code`, `message`, and `suggestion` — richer than a bare error message — so an end user can file
|
|
416
|
+
* a useful report and a developer can see what to fix. Theme-independent: it can render before the
|
|
417
|
+
* theme provider mounts.
|
|
418
|
+
*/
|
|
419
|
+
export declare const GraphErrorPanel: ({ errors }: GraphErrorPanelProps) => JSX.Element;
|
|
420
|
+
|
|
421
|
+
declare interface GraphErrorPanelProps {
|
|
422
|
+
/** The compile failure(s). The first headlines; any remaining are listed beneath it. */
|
|
423
|
+
errors: VizDiagnostic[];
|
|
424
|
+
}
|
|
425
|
+
|
|
426
|
+
/**
|
|
427
|
+
* Chart display and interaction mode.
|
|
428
|
+
* - 'readonly': Normal chart display with full interactivity but no editing (default)
|
|
429
|
+
* - 'editable': Chart with inline editing capabilities for labels, titles, etc.
|
|
430
|
+
*/
|
|
431
|
+
export declare type GraphMode = 'readonly' | 'editable';
|
|
432
|
+
|
|
433
|
+
/**
|
|
434
|
+
* Owns the compiled spec for a graph and exposes it via {@link useCompiledSelector}, plus a
|
|
435
|
+
* `dispatch` for applying {@link Command}s. Both failure modes — a non-throwing compile failure and a
|
|
436
|
+
* render-throw from a renderer component — converge on a single {@link GraphErrorBoundary} that shows
|
|
437
|
+
* the error in place, so a broken chart never blanks the page.
|
|
438
|
+
*/
|
|
439
|
+
export declare const GraphProvider: ({ data, input, plugins, formattingLocale, onChange, onError, onWarnings, customPalettes, theme, fontList, themeOverrides: themeOverridesInput, children, }: GraphProviderProps) => JSX.Element;
|
|
440
|
+
|
|
441
|
+
export declare interface GraphProviderProps {
|
|
442
|
+
data: Data;
|
|
443
|
+
input: CompilerInput;
|
|
444
|
+
/**
|
|
445
|
+
* Custom geoms, stats, and transforms (and their render halves) registered for this graph. Seeds
|
|
446
|
+
* the compiler and builds the per-provider render resolver from one array. Construction-time config,
|
|
447
|
+
* frozen at mount — change the registered set by remounting (React `key`); `data`/`input`/`theme`
|
|
448
|
+
* stay reactive.
|
|
449
|
+
*/
|
|
450
|
+
plugins?: readonly Plugin_2[];
|
|
451
|
+
formattingLocale?: Locale;
|
|
452
|
+
onChange?: (next: CompilerInput) => void;
|
|
453
|
+
/** Fires with the compile failure(s) whenever a compile/recompile/dispatch produces errors. */
|
|
454
|
+
onError?: (errors: VizDiagnostic[]) => void;
|
|
455
|
+
/** Fires with any warnings a successful compile produced. */
|
|
456
|
+
onWarnings?: (warnings: VizDiagnostic[]) => void;
|
|
457
|
+
theme?: GraphTheme;
|
|
458
|
+
themeOverrides?: ThemeOverrides;
|
|
459
|
+
customPalettes?: CustomPalettesInput;
|
|
460
|
+
fontList?: FontListInput;
|
|
461
|
+
children: ReactNode;
|
|
462
|
+
}
|
|
463
|
+
|
|
464
|
+
/**
|
|
465
|
+
* Renders the compiled spec held by the surrounding `<GraphProvider>`. The renderer owns
|
|
466
|
+
* layout + DOM — the provider owns the spec and derives the compiled output from it. There's
|
|
467
|
+
* no `config` prop: every consumer must wrap with `<GraphProvider>` so commands can operate
|
|
468
|
+
* on the live spec.
|
|
469
|
+
*/
|
|
470
|
+
export declare const GraphRenderer: ({ slots, sizing, onResize, ...rest }: GraphRendererProps) => JSX.Element;
|
|
471
|
+
|
|
472
|
+
/** Props for {@link GraphRenderer}: container sizing, interaction toggles and per-region slot overrides. */
|
|
473
|
+
export declare interface GraphRendererProps {
|
|
474
|
+
/** Controls how the graph responds to its container size. Defaults to filling the parent container. */
|
|
475
|
+
sizing?: GraphSizing;
|
|
476
|
+
/** Callback invoked when the graph's container is resized. Fires in every sizing mode. */
|
|
477
|
+
onResize?: ResizeObserverOnResize;
|
|
478
|
+
isAnimated?: boolean;
|
|
479
|
+
showTooltips?: boolean;
|
|
480
|
+
mode?: GraphMode;
|
|
481
|
+
/** Per-region component overrides. Unspecified regions render their default. */
|
|
482
|
+
slots?: GraphSlots;
|
|
483
|
+
}
|
|
484
|
+
|
|
485
|
+
/** Controls how the graph claims space in its container. */
|
|
486
|
+
export declare type GraphSizing = {
|
|
487
|
+
mode: 'responsive';
|
|
488
|
+
} | {
|
|
489
|
+
mode: 'fixed';
|
|
490
|
+
width: number;
|
|
491
|
+
height: number;
|
|
492
|
+
} | {
|
|
493
|
+
mode: 'keepAspectRatio';
|
|
494
|
+
intrinsicWidth: number;
|
|
495
|
+
intrinsicHeight: number;
|
|
496
|
+
} | {
|
|
497
|
+
mode: 'keepAspectRatio';
|
|
498
|
+
intrinsicWidth: number;
|
|
499
|
+
aspectRatio: number;
|
|
500
|
+
} | {
|
|
501
|
+
mode: 'keepAspectRatio';
|
|
502
|
+
intrinsicHeight: number;
|
|
503
|
+
aspectRatio: number;
|
|
504
|
+
};
|
|
505
|
+
|
|
506
|
+
/**
|
|
507
|
+
* Region overrides for `GraphRenderer`. A slot replaces how one region paints; the viz-engine `Spec`
|
|
508
|
+
* still owns whether a region exists and what data it receives, and an override gets the same
|
|
509
|
+
* render-ready props as its default.
|
|
510
|
+
*
|
|
511
|
+
* Layout-safe regions (`Header`, `Footer`, `Tooltip`, `Grid`) are bare components — DOM-measured or
|
|
512
|
+
* reserving no edge space. Layout-coupled regions (`AxisTicks`, `AxisLabel`, `Legend`, `Headline`) are
|
|
513
|
+
* {@link SlotOverride}s that also declare their reserved size via `measure`, else paint and the
|
|
514
|
+
* reserved band desync. The tick and title bands are separate slots so overriding one leaves the other
|
|
515
|
+
* on its default.
|
|
516
|
+
*/
|
|
517
|
+
export declare interface GraphSlots {
|
|
518
|
+
Header?: ComponentType<HeaderSlotProps>;
|
|
519
|
+
Footer?: ComponentType<FooterSlotProps>;
|
|
520
|
+
Tooltip?: ComponentType<TooltipSlotProps>;
|
|
521
|
+
Grid?: ComponentType<GridSlotProps>;
|
|
522
|
+
Legend?: SlotOverride<LegendSlotProps, (legend: FormattedLegend, ctx: SlotMeasureContext) => number>;
|
|
523
|
+
Headline?: SlotOverride<HeadlineSlotProps, HeadlineMeasurer>;
|
|
524
|
+
AxisTicks?: SlotOverride<AxisTicksSlotProps, (axis: FormattedAxis, ctx: SlotMeasureContext) => number>;
|
|
525
|
+
AxisLabel?: SlotOverride<AxisLabelSlotProps, (axis: FormattedAxis, ctx: SlotMeasureContext) => number>;
|
|
526
|
+
}
|
|
527
|
+
|
|
528
|
+
/**
|
|
529
|
+
* A plugin-bound authoring kit: the typed `geom`/`stat`/`transform`/`scale`/`coord` factories plus
|
|
530
|
+
* `createSpec`/`pipe`, and a `GraphProvider` pre-bound to the same `plugins` — so what can be written
|
|
531
|
+
* and what can render derive from one array and cannot diverge. Generic over the `plugins` tuple so
|
|
532
|
+
* the typed per-plugin builder methods (`geom.<name>`, …) flow through to the React entry point.
|
|
533
|
+
*/
|
|
534
|
+
export declare interface GraphyKit<P extends readonly Plugin_2[] = readonly Plugin_2[]> extends GraphyBuilder<P> {
|
|
535
|
+
GraphProvider: (props: Omit<GraphProviderProps, 'plugins'>) => ReactElement;
|
|
536
|
+
}
|
|
537
|
+
|
|
538
|
+
/**
|
|
539
|
+
* Props for the Grid slot, overridable via `slots.Grid` on `GraphRenderer`. `panelRect` is in
|
|
540
|
+
* SVG-local coordinates.
|
|
541
|
+
*/
|
|
542
|
+
export declare interface GridSlotProps {
|
|
543
|
+
axes: FormattedAxis[];
|
|
544
|
+
panel: CompiledPanel;
|
|
545
|
+
panelFrameRect: GraphLayout['panelFrame'];
|
|
546
|
+
panelRect: GraphLayout['panel'];
|
|
547
|
+
}
|
|
548
|
+
|
|
549
|
+
/**
|
|
550
|
+
* Props for the Header slot, overridable via `slots.Header` on `GraphRenderer`. Title editing in
|
|
551
|
+
* `editable` mode is internal to this default; an override replacing the region opts out of it.
|
|
552
|
+
*/
|
|
553
|
+
export declare interface HeaderSlotProps {
|
|
554
|
+
/** Forward this to the region's outer element — the layout measures the rendered DOM to reserve its space. */
|
|
555
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
556
|
+
headerRect: Rect;
|
|
557
|
+
mode?: GraphMode;
|
|
558
|
+
title: TextContent | null;
|
|
559
|
+
isTitleVisible: boolean;
|
|
560
|
+
subtitle: TextContent | null;
|
|
561
|
+
isSubtitleVisible: boolean;
|
|
562
|
+
}
|
|
563
|
+
|
|
564
|
+
/** Props for the Headline slot, overridable via `slots.Headline` on `GraphRenderer`. */
|
|
565
|
+
export declare interface HeadlineSlotProps {
|
|
566
|
+
headline: FormattedHeadline;
|
|
567
|
+
rect: Rect;
|
|
568
|
+
resolvedSize: ResolvedHeadlineSize;
|
|
569
|
+
/** Leading strip items to paint; the rest are hidden because they would overflow the band. */
|
|
570
|
+
visibleItemCount: number;
|
|
571
|
+
}
|
|
572
|
+
|
|
573
|
+
declare interface HoverCompanionsRenderInput<G extends GeomName | string = string> {
|
|
574
|
+
layer: CompiledLayerOf<G>;
|
|
575
|
+
primary: HoverHit;
|
|
576
|
+
related: HoverHit[];
|
|
577
|
+
}
|
|
578
|
+
|
|
579
|
+
/**
|
|
580
|
+
* The shape of positional guide the `HoverGuide` draws for a hovered observation, contributed per
|
|
581
|
+
* `(geom, coord)` renderer via `guideMode`:
|
|
582
|
+
*
|
|
583
|
+
* - `'band'` — a rectangle over the hovered category's band on the main axis (bars).
|
|
584
|
+
* - `'crosshair'` — a rule at the hovered value: a straight line under cartesian, a centre-to-rim spoke
|
|
585
|
+
* under polar (line and area).
|
|
586
|
+
*
|
|
587
|
+
* A renderer that omits `guideMode` draws no guide (scatter points). A declared `'band'` still draws
|
|
588
|
+
* nothing where the composition has no category band — a pie/donut resolves to an empty wedge. The chart
|
|
589
|
+
* draws the guide of whichever layer the cursor resolves to, so a combo shows a band over a hovered bar
|
|
590
|
+
* and a crosshair over a hovered line; see `resolveHoverGuideMode`.
|
|
591
|
+
*/
|
|
592
|
+
declare type HoverGuideMode = 'crosshair' | 'band';
|
|
593
|
+
|
|
594
|
+
/**
|
|
595
|
+
* Hosts the hover store + engine for the surrounding `<GraphProvider>`. Subscribes only to the
|
|
596
|
+
* `layers` and `coordSystem` slices of the compiled spec — the engine never reads anything else,
|
|
597
|
+
* so unrelated stage outputs (scales, guides, summarise, visual mapper) cannot trigger a rebuild.
|
|
598
|
+
*/
|
|
599
|
+
export declare const HoverProvider: ({ children }: HoverProviderProps) => JSX.Element;
|
|
600
|
+
|
|
601
|
+
declare interface HoverProviderProps {
|
|
602
|
+
children: ReactNode;
|
|
603
|
+
}
|
|
604
|
+
|
|
605
|
+
declare interface HoverRenderInput<G extends GeomName | string = string, C extends CoordKind = CoordKind> {
|
|
606
|
+
layer: CompiledLayerOf<G>;
|
|
607
|
+
coordSystem: CoordSystemFor<C>;
|
|
608
|
+
primary: HoverHit;
|
|
609
|
+
group: HoverHit[];
|
|
610
|
+
related: HoverHit[];
|
|
611
|
+
panelRect: GraphLayout['panel'];
|
|
612
|
+
}
|
|
613
|
+
|
|
614
|
+
declare interface HoverSlice {
|
|
615
|
+
hover: HoverState;
|
|
616
|
+
/**
|
|
617
|
+
* Box the tooltip anchors against while the pointer is over a pinned callout, in client
|
|
618
|
+
* coordinates. `null` during normal cursor hover, when the tooltip follows the cursor.
|
|
619
|
+
*/
|
|
620
|
+
tooltipAnchor: TooltipAnchor | null;
|
|
621
|
+
/**
|
|
622
|
+
* Mini-bubble hit rects the tracker tests before the geom hit-test. Callout renderers publish
|
|
623
|
+
* their placed rects here so hover detection stays in the single pointer pipeline.
|
|
624
|
+
*/
|
|
625
|
+
calloutHits: CalloutHitRegion[];
|
|
626
|
+
}
|
|
627
|
+
|
|
628
|
+
declare interface HoverStoreActions {
|
|
629
|
+
setHoverState: (next: HoverState) => void;
|
|
630
|
+
setTooltipAnchor: (next: TooltipAnchor | null) => void;
|
|
631
|
+
setCalloutHits: (next: CalloutHitRegion[]) => void;
|
|
632
|
+
}
|
|
633
|
+
|
|
634
|
+
/** State of the hover store: the current {@link HoverState} plus its setter. */
|
|
635
|
+
declare type HoverStoreState = HoverSlice & HoverStoreActions;
|
|
636
|
+
|
|
637
|
+
/**
|
|
638
|
+
* The overlay wiring handed to an overlay-hosted render via {@link GeomOverlayRenderInput.overlay}. The
|
|
639
|
+
* geom writes only its simulation, marks, and drag handlers; the renderer owns the on-screen rect
|
|
640
|
+
* measurement, the portal alignment, and the push wiring.
|
|
641
|
+
*/
|
|
642
|
+
export declare interface InteractiveOverlayApi {
|
|
643
|
+
/** Feeds the hovered observation's identity key into the unified hover store — the push path. */
|
|
644
|
+
pushHover: GeomHoverPush;
|
|
645
|
+
/** The panel's on-screen rect in client pixels, so the overlay can place its marks. */
|
|
646
|
+
panelRect: PanelScreenRect;
|
|
647
|
+
}
|
|
648
|
+
|
|
649
|
+
/** Props for the Legend slot, overridable via `slots.Legend` on `GraphRenderer`. */
|
|
650
|
+
export declare interface LegendSlotProps {
|
|
651
|
+
formattedLegends: FormattedLegend[];
|
|
652
|
+
rects: Partial<Record<LayoutEdge, Rect>>;
|
|
653
|
+
textScale: number;
|
|
654
|
+
}
|
|
655
|
+
|
|
656
|
+
/** Scales the color's HSL lightness up by `amount` (0–1). */
|
|
657
|
+
export declare const lightenCss: (colorString: string, amount: number) => string;
|
|
658
|
+
|
|
659
|
+
/** vanilla-extract class that binds the light token values; the default theme. */
|
|
660
|
+
export declare const lightTheme: string;
|
|
661
|
+
|
|
662
|
+
/**
|
|
663
|
+
* The element font tokens JS measurement reproduces. Overridden structurally
|
|
664
|
+
* ({@link FontTokenOverride}); the CSS variable's shorthand is serialized from the same object
|
|
665
|
+
* measurement reads, so paint and layout move together.
|
|
666
|
+
*/
|
|
667
|
+
export declare type MeasuredFontTokenKey = 'fontDataLabel' | 'fontStackTotal' | 'fontTickLabel' | 'fontAxisLabel' | 'fontLegendLabel' | 'fontGoalLineLabel';
|
|
668
|
+
|
|
669
|
+
/**
|
|
670
|
+
* Anchor point in normalized [0,1] coord-space where a highlight overlay marker
|
|
671
|
+
* should be painted for one observation. Renderer turns [0,1] into pixels.
|
|
672
|
+
*/
|
|
673
|
+
export declare interface OverlayAnchor {
|
|
674
|
+
x: number;
|
|
675
|
+
y: number;
|
|
676
|
+
}
|
|
677
|
+
|
|
678
|
+
declare interface OverlayAnchorInput<G extends GeomName | string = string, C extends CoordKind = CoordKind> {
|
|
679
|
+
layer: CompiledLayerOf<G>;
|
|
680
|
+
coordSystem: CoordSystemFor<C>;
|
|
681
|
+
observation: Observation;
|
|
682
|
+
}
|
|
683
|
+
|
|
684
|
+
/** The panel's on-screen rect in client coordinates — what a fixed-position overlay aligns to. */
|
|
685
|
+
export declare interface PanelScreenRect {
|
|
686
|
+
left: number;
|
|
687
|
+
top: number;
|
|
688
|
+
width: number;
|
|
689
|
+
height: number;
|
|
690
|
+
}
|
|
691
|
+
|
|
692
|
+
export { RenderHitTester }
|
|
693
|
+
|
|
694
|
+
export declare type ResizeObserverOnResize = (state: ResizeObserverState) => void;
|
|
695
|
+
|
|
696
|
+
export declare interface ResizeObserverState {
|
|
697
|
+
width: number;
|
|
698
|
+
height: number;
|
|
699
|
+
/** True until the first ResizeObserver measurement lands. */
|
|
700
|
+
isDefault: boolean;
|
|
701
|
+
}
|
|
702
|
+
|
|
703
|
+
/**
|
|
704
|
+
* A render contract with its resolved geom name attached — the shape the per-provider resolver returns
|
|
705
|
+
* and every render site consumes. Both a built-in `GeomRenderer` and a custom {@link GeomRendererDefinition}
|
|
706
|
+
* conform to it, so the consumers paint built-ins and customs through one type.
|
|
707
|
+
*/
|
|
708
|
+
export declare interface ResolvedGeomRenderer extends GeomRenderContract {
|
|
709
|
+
/** The geom name this renderer paints — the resolver dispatches on it. */
|
|
710
|
+
geom: string;
|
|
711
|
+
}
|
|
712
|
+
|
|
713
|
+
/**
|
|
714
|
+
* Passed as the second argument to a layout-coupled slot's `measure`, so it can size its band from
|
|
715
|
+
* real text metrics — the same Canvas-backed measurer the built-in measurers use — rather than
|
|
716
|
+
* constructing its own. A `measure` whose size is unrelated to text can ignore it.
|
|
717
|
+
*/
|
|
718
|
+
export declare interface SlotMeasureContext {
|
|
719
|
+
/** Measures a string at a given font; returns `{ width, height, ascent, descent }` in CSS pixels. */
|
|
720
|
+
measureText: TextMeasurer['measureText'];
|
|
721
|
+
/** Active text-scale multiplier; multiply an em size by this to get the pixel size to measure at. */
|
|
722
|
+
textScale: number;
|
|
723
|
+
}
|
|
724
|
+
|
|
725
|
+
/**
|
|
726
|
+
* A layout-coupled slot: the region's `render` paired with the `measure` the layout uses to reserve
|
|
727
|
+
* its space. `measure` mirrors the matching `LayoutMeasurer` method, so paint and reserved space can't
|
|
728
|
+
* disagree. Give it a stable reference — a `measure` whose identity changes each render takes effect on
|
|
729
|
+
* the next paint but doesn't retrigger layout.
|
|
730
|
+
*/
|
|
731
|
+
export declare interface SlotOverride<Props, Measure> {
|
|
732
|
+
/** The component that paints the region. */
|
|
733
|
+
render: ComponentType<Props>;
|
|
734
|
+
/**
|
|
735
|
+
* Returns the region's reserved size. Receives the region's formatted data plus a
|
|
736
|
+
* {@link SlotMeasureContext} (`measureText`, `textScale`) for sizing from real text metrics.
|
|
737
|
+
*/
|
|
738
|
+
measure: Measure;
|
|
739
|
+
}
|
|
740
|
+
|
|
741
|
+
/**
|
|
742
|
+
* The vocabulary of legend/tooltip/headline marks the {@link Swatch} can paint. A geom picks the one
|
|
743
|
+
* that best evokes its on-canvas mark via `swatchShape` on its render contract (see
|
|
744
|
+
* {@link GeomRenderContract}); it is a render concern, so the engine never resolves it.
|
|
745
|
+
*
|
|
746
|
+
* - `square` — a filled rect (bars)
|
|
747
|
+
* - `line` — a horizontal stroke (lines)
|
|
748
|
+
* - `area` — a filled region with a stroke accent (areas)
|
|
749
|
+
* - `circle` — a filled dot (points)
|
|
750
|
+
* - `slice` — a pie / donut wedge (polar bars)
|
|
751
|
+
*/
|
|
752
|
+
export declare type SwatchShape = 'square' | 'line' | 'circle' | 'area' | 'slice';
|
|
753
|
+
|
|
754
|
+
/**
|
|
755
|
+
* Creates a font-ready, cached text measurer and shares it with descendants via context.
|
|
756
|
+
* Renders nothing until the measurer resolves, so consumers reading the context always
|
|
757
|
+
* see a non-null value.
|
|
758
|
+
*
|
|
759
|
+
* The measurer is recreated when additional fonts finish loading (e.g. in iframes where
|
|
760
|
+
* `document.fonts.ready` resolves before stylesheets inject their `@font-face` rules).
|
|
761
|
+
* The new instance gets a fresh cache so stale measurements from fallback fonts are
|
|
762
|
+
* discarded.
|
|
763
|
+
*
|
|
764
|
+
* Falls back to `HeuristicTextMeasurer` when `OffscreenCanvas` is unavailable.
|
|
765
|
+
*/
|
|
766
|
+
export declare const TextMeasurerProvider: ({ children, measurer: override }: TextMeasurerProviderProps) => JSX.Element | null;
|
|
767
|
+
|
|
768
|
+
declare interface TextMeasurerProviderProps {
|
|
769
|
+
children: ReactNode;
|
|
770
|
+
/**
|
|
771
|
+
* Optional override. Production callers omit this and the provider creates its own
|
|
772
|
+
* font-ready measurer. Tests pass a synchronous measurer (e.g. `HeuristicTextMeasurer`)
|
|
773
|
+
* to bypass the font-loading round-trip.
|
|
774
|
+
*/
|
|
775
|
+
measurer?: TextMeasurer;
|
|
776
|
+
}
|
|
777
|
+
|
|
778
|
+
/** The name of a single theme token. */
|
|
779
|
+
export declare type ThemeKey = keyof ThemeValues;
|
|
780
|
+
|
|
781
|
+
/**
|
|
782
|
+
* A partial set of token values layered over a base theme — the shape of the `themeOverrides`
|
|
783
|
+
* prop. Measured font tokens take a {@link FontTokenOverride}; every other token takes its CSS
|
|
784
|
+
* string value.
|
|
785
|
+
*/
|
|
786
|
+
export declare type ThemeOverrides = Partial<Omit<ThemeValues, MeasuredFontTokenKey>> & {
|
|
787
|
+
[Key in MeasuredFontTokenKey]?: FontTokenOverride;
|
|
788
|
+
};
|
|
789
|
+
|
|
790
|
+
/** Resolves the base theme plus per-graph `themeOverrides` into token values and publishes them to the subtree. */
|
|
791
|
+
export declare const ThemeProvider: ({ theme, themeOverrides, appearance, children }: ThemeProviderProps) => JSX.Element;
|
|
792
|
+
|
|
793
|
+
declare interface ThemeProviderProps {
|
|
794
|
+
appearance: AppearanceConfig;
|
|
795
|
+
theme: GraphTheme;
|
|
796
|
+
themeOverrides?: ThemeOverrides;
|
|
797
|
+
children: ReactNode;
|
|
798
|
+
}
|
|
799
|
+
|
|
800
|
+
/** Every theme token mapped to its resolved CSS string value. */
|
|
801
|
+
export declare type ThemeValues = Record<keyof typeof vars, string>;
|
|
802
|
+
|
|
803
|
+
/**
|
|
804
|
+
* Where a pinned callout asks the tooltip to anchor: the marker point in client coordinates, plus
|
|
805
|
+
* the direction the mini sits, so the tooltip expands over the mini the way it was placed.
|
|
806
|
+
*/
|
|
807
|
+
declare interface TooltipAnchor {
|
|
808
|
+
x: number;
|
|
809
|
+
y: number;
|
|
810
|
+
placement: CalloutPlacement;
|
|
811
|
+
}
|
|
812
|
+
|
|
813
|
+
export declare interface TooltipSlotProps {
|
|
814
|
+
/** Render-ready tooltip body, already formatted by the viz-engine runtime. */
|
|
815
|
+
content: TooltipContent;
|
|
816
|
+
}
|
|
817
|
+
|
|
818
|
+
/**
|
|
819
|
+
* A nested SVG that establishes a `[0, 1]` unit coordinate space (top-left origin) stretched to fill
|
|
820
|
+
* the geom panel. A layout geom paints its geometry in raw unit coords so paint and hit-test never re-project against each
|
|
821
|
+
* other. `preserveAspectRatio="none"` maps the unit square onto the (usually non-square) panel exactly.
|
|
822
|
+
*/
|
|
823
|
+
export declare const UnitSpaceSvg: ({ children, ...rest }: UnitSpaceSvgProps) => ReactNode;
|
|
824
|
+
|
|
825
|
+
declare interface UnitSpaceSvgProps extends Omit<SVGProps<SVGSVGElement>, 'viewBox' | 'preserveAspectRatio'> {
|
|
826
|
+
children: ReactNode;
|
|
827
|
+
}
|
|
828
|
+
|
|
829
|
+
/**
|
|
830
|
+
* Subscribes to a derived slice of the compiled spec. The subscription only fires when the
|
|
831
|
+
* selector's result changes by reference, so combined with the compiler's per-stage memoization
|
|
832
|
+
* this skips re-renders whenever the selected slice is unchanged.
|
|
833
|
+
*
|
|
834
|
+
* @example
|
|
835
|
+
* ```ts
|
|
836
|
+
* const layers = useCompiledSelector((compiled) => compiled.layers);
|
|
837
|
+
* const xAxis = useCompiledSelector((compiled) => compiled.guides.axes[0]);
|
|
838
|
+
* ```
|
|
839
|
+
*/
|
|
840
|
+
export declare const useCompiledSelector: <Selected>(selector: (compiled: CompiledSpec) => Selected) => Selected;
|
|
841
|
+
|
|
842
|
+
/**
|
|
843
|
+
* Registers a layout geom's render-side hit tester so a `'render-hit-test'` layer inherits central hover
|
|
844
|
+
* and the built-in tooltip — the path `bar` takes — with no pointer overlay of its own. The pull path.
|
|
845
|
+
*
|
|
846
|
+
* The cursor passed to the tester is panel-local `[0, 1]`, top-left origin — the frame the geom paints in.
|
|
847
|
+
*/
|
|
848
|
+
export declare function useGeomHitTest(layerId: string, tester: RenderHitTester): void;
|
|
849
|
+
|
|
850
|
+
/**
|
|
851
|
+
* The push half of the render-hit-test keystone, for a geom whose geometry keeps changing after it is
|
|
852
|
+
* drawn (a live simulation) and so owns its own pointer surface above the central capture layer. The
|
|
853
|
+
* geom's pointer handlers call the returned setter with the hovered observation's `identityKey`; the
|
|
854
|
+
* engine resolves it through the same `byKey` lookup the pull path uses, so the geom inherits the tooltip
|
|
855
|
+
* and `renderHover`. Since the overlay intercepts the pointer events, the tooltip is anchored at the
|
|
856
|
+
* supplied cursor. Pass `null` to clear. Geoms with geometry fixed once drawn use `useGeomHitTest`.
|
|
857
|
+
*
|
|
858
|
+
* Escape hatch: an interactive geom should instead declare an overlay-hosted `render`
|
|
859
|
+
* (`{ fn, options: { overlay: true } }`), which the renderer portals into a screen-aligned overlay and
|
|
860
|
+
* hands a ready `pushHover` via `input.overlay`. Reach for this hook only when that form is not enough.
|
|
861
|
+
*/
|
|
862
|
+
export declare function useGeomHover(layerId: string): GeomHoverPush;
|
|
863
|
+
|
|
864
|
+
/** Returns the dispatcher for applying {@link Command}s to the provider's live spec. */
|
|
865
|
+
export declare const useGraphCommandDispatcher: () => ((command: Command) => void);
|
|
866
|
+
|
|
867
|
+
/**
|
|
868
|
+
* Subscribe to a slice of the hover state from inside a `HoverProvider`.
|
|
869
|
+
*/
|
|
870
|
+
export declare function useHoverState<T>(selector: (state: HoverStoreState) => T): T;
|
|
871
|
+
|
|
872
|
+
/**
|
|
873
|
+
* Tracks the on-screen rect of a panel-filling element so a fixed-position overlay (the push path's drag
|
|
874
|
+
* surface) can sit exactly over the chart in pixel space. Returns a callback `ref` to attach to a
|
|
875
|
+
* panel-sized element and the measured `rect` (`null` until first measured).
|
|
876
|
+
*
|
|
877
|
+
* The element's own size changes go through the shared {@link useResizeObserver} lifecycle; this hook adds
|
|
878
|
+
* the screen-position concerns the observer can't see — viewport scroll/resize move the element's screen
|
|
879
|
+
* position without resizing it. Every trigger is coalesced into at most one `getBoundingClientRect` per
|
|
880
|
+
* animation frame, so a burst of scroll events forces a single reflow rather than one per event. Only a
|
|
881
|
+
* changed rect updates state, so a settled overlay does not re-render every frame.
|
|
882
|
+
*/
|
|
883
|
+
export declare function usePanelScreenRect<T extends Element = SVGRectElement>(): {
|
|
884
|
+
ref: (node: T | null) => void;
|
|
885
|
+
rect: PanelScreenRect | null;
|
|
886
|
+
};
|
|
887
|
+
|
|
888
|
+
/** Returns the {@link TextMeasurer} from context; throws outside a `<TextMeasurerProvider>`. */
|
|
889
|
+
export declare const useTextMeasurer: () => TextMeasurer;
|
|
890
|
+
|
|
891
|
+
/** CSS custom-property references for every theme token; read at paint sites as `vars.tooltipBackground`, etc. */
|
|
892
|
+
export declare const vars: {
|
|
893
|
+
white: `var(--${string})`;
|
|
894
|
+
black: `var(--${string})`;
|
|
895
|
+
transparent: `var(--${string})`;
|
|
896
|
+
grey100: `var(--${string})`;
|
|
897
|
+
grey95: `var(--${string})`;
|
|
898
|
+
grey90: `var(--${string})`;
|
|
899
|
+
grey85: `var(--${string})`;
|
|
900
|
+
grey80: `var(--${string})`;
|
|
901
|
+
grey75: `var(--${string})`;
|
|
902
|
+
grey70: `var(--${string})`;
|
|
903
|
+
grey60: `var(--${string})`;
|
|
904
|
+
grey50: `var(--${string})`;
|
|
905
|
+
grey0: `var(--${string})`;
|
|
906
|
+
greyGradient80: `var(--${string})`;
|
|
907
|
+
green60: `var(--${string})`;
|
|
908
|
+
green50: `var(--${string})`;
|
|
909
|
+
red60: `var(--${string})`;
|
|
910
|
+
red50: `var(--${string})`;
|
|
911
|
+
amber70: `var(--${string})`;
|
|
912
|
+
amber50: `var(--${string})`;
|
|
913
|
+
amber40: `var(--${string})`;
|
|
914
|
+
amber30: `var(--${string})`;
|
|
915
|
+
blue80: `var(--${string})`;
|
|
916
|
+
blue60: `var(--${string})`;
|
|
917
|
+
purple50: `var(--${string})`;
|
|
918
|
+
purple30: `var(--${string})`;
|
|
919
|
+
brand: `var(--${string})`;
|
|
920
|
+
success: `var(--${string})`;
|
|
921
|
+
warning: `var(--${string})`;
|
|
922
|
+
alert: `var(--${string})`;
|
|
923
|
+
textPrimary: `var(--${string})`;
|
|
924
|
+
textSecondary: `var(--${string})`;
|
|
925
|
+
textDisabled: `var(--${string})`;
|
|
926
|
+
iconPrimary: `var(--${string})`;
|
|
927
|
+
iconSecondary: `var(--${string})`;
|
|
928
|
+
iconStickerBackground: `var(--${string})`;
|
|
929
|
+
border100: `var(--${string})`;
|
|
930
|
+
border50: `var(--${string})`;
|
|
931
|
+
border10: `var(--${string})`;
|
|
932
|
+
sunkenBackground: `var(--${string})`;
|
|
933
|
+
defaultBackground: `var(--${string})`;
|
|
934
|
+
raisedBackground: `var(--${string})`;
|
|
935
|
+
overlayBackground: `var(--${string})`;
|
|
936
|
+
overlayBorderGradient: `var(--${string})`;
|
|
937
|
+
graphBackground: `var(--${string})`;
|
|
938
|
+
gridLineColor: `var(--${string})`;
|
|
939
|
+
originLineColor: `var(--${string})`;
|
|
940
|
+
targetLineColor: `var(--${string})`;
|
|
941
|
+
targetLineMarkerColor: `var(--${string})`;
|
|
942
|
+
targetLineLabelTextColor: `var(--${string})`;
|
|
943
|
+
legendBackground: `var(--${string})`;
|
|
944
|
+
legendBorderColor: `var(--${string})`;
|
|
945
|
+
legendFocusOutlineColor: `var(--${string})`;
|
|
946
|
+
legendTextColor: `var(--${string})`;
|
|
947
|
+
dimmedSeriesLabelTextColor: `var(--${string})`;
|
|
948
|
+
dimmedSeriesLabelLineColor: `var(--${string})`;
|
|
949
|
+
trendNegativeColor: `var(--${string})`;
|
|
950
|
+
trendPositiveColor: `var(--${string})`;
|
|
951
|
+
trendNeutralColor: `var(--${string})`;
|
|
952
|
+
defaultAnnotationArrowStroke: `var(--${string})`;
|
|
953
|
+
defaultAnnotationShapeStroke: `var(--${string})`;
|
|
954
|
+
defaultAnnotationShapeFill: `var(--${string})`;
|
|
955
|
+
arrowAnnotationStickerOutlineColor: `var(--${string})`;
|
|
956
|
+
arrowAnnotationStickerOutlineColorInverse: `var(--${string})`;
|
|
957
|
+
annotationFrameBorderColor: `var(--${string})`;
|
|
958
|
+
annotationMenuTriggerIconColor: `var(--${string})`;
|
|
959
|
+
heatmapEmptyTileBackground: `var(--${string})`;
|
|
960
|
+
dataLabelOutsideBackground: `var(--${string})`;
|
|
961
|
+
dataLabelTextColor: `var(--${string})`;
|
|
962
|
+
dataLabelInsideTextColor: `var(--${string})`;
|
|
963
|
+
stackTotalTextColor: `var(--${string})`;
|
|
964
|
+
stackTotalBackground: `var(--${string})`;
|
|
965
|
+
stackTotalStroke: `var(--${string})`;
|
|
966
|
+
graphPadding: `var(--${string})`;
|
|
967
|
+
gridLineWidth: `var(--${string})`;
|
|
968
|
+
gridLineDash: `var(--${string})`;
|
|
969
|
+
gridLineDotted: `var(--${string})`;
|
|
970
|
+
tooltipBorderRadius: `var(--${string})`;
|
|
971
|
+
tooltipBorderWidth: `var(--${string})`;
|
|
972
|
+
tooltipPaddingBlock: `var(--${string})`;
|
|
973
|
+
tooltipPaddingInline: `var(--${string})`;
|
|
974
|
+
tooltipRowGap: `var(--${string})`;
|
|
975
|
+
tooltipShadow: `var(--${string})`;
|
|
976
|
+
tickLabelOffset: `var(--${string})`;
|
|
977
|
+
legendItemGap: `var(--${string})`;
|
|
978
|
+
legendSwatchGap: `var(--${string})`;
|
|
979
|
+
legendSwatchWidth: `var(--${string})`;
|
|
980
|
+
legendSwatchHeight: `var(--${string})`;
|
|
981
|
+
legendPillPaddingInline: `var(--${string})`;
|
|
982
|
+
legendPillPaddingBlock: `var(--${string})`;
|
|
983
|
+
legendPillBorderWidth: `var(--${string})`;
|
|
984
|
+
headlineRowGap: `var(--${string})`;
|
|
985
|
+
headlineItemGap: `var(--${string})`;
|
|
986
|
+
canvasDefault: `var(--${string})`;
|
|
987
|
+
canvasBlue: `var(--${string})`;
|
|
988
|
+
canvasCyan: `var(--${string})`;
|
|
989
|
+
canvasGreen: `var(--${string})`;
|
|
990
|
+
canvasYellow: `var(--${string})`;
|
|
991
|
+
canvasOrange: `var(--${string})`;
|
|
992
|
+
canvasRed: `var(--${string})`;
|
|
993
|
+
canvasPink: `var(--${string})`;
|
|
994
|
+
canvasPurple: `var(--${string})`;
|
|
995
|
+
canvasGray: `var(--${string})`;
|
|
996
|
+
canvasInverse: `var(--${string})`;
|
|
997
|
+
elevationXs: `var(--${string})`;
|
|
998
|
+
elevationSm: `var(--${string})`;
|
|
999
|
+
elevationMd: `var(--${string})`;
|
|
1000
|
+
elevationLg: `var(--${string})`;
|
|
1001
|
+
radiiXs: `var(--${string})`;
|
|
1002
|
+
radiiSm: `var(--${string})`;
|
|
1003
|
+
radiiMd: `var(--${string})`;
|
|
1004
|
+
radiiLg: `var(--${string})`;
|
|
1005
|
+
spaceXxs: `var(--${string})`;
|
|
1006
|
+
spaceXs: `var(--${string})`;
|
|
1007
|
+
spaceSm: `var(--${string})`;
|
|
1008
|
+
spaceMd: `var(--${string})`;
|
|
1009
|
+
spaceLg: `var(--${string})`;
|
|
1010
|
+
spaceXl: `var(--${string})`;
|
|
1011
|
+
zIndexToolbar: `var(--${string})`;
|
|
1012
|
+
zIndexToolbarTooltip: `var(--${string})`;
|
|
1013
|
+
zIndexToolbarPopover: `var(--${string})`;
|
|
1014
|
+
toolbarBackgroundColor: `var(--${string})`;
|
|
1015
|
+
toolbarButtonBackgroundColor: `var(--${string})`;
|
|
1016
|
+
toolbarButtonBackgroundColorHovered: `var(--${string})`;
|
|
1017
|
+
toolbarButtonBackgroundColorSelected: `var(--${string})`;
|
|
1018
|
+
toolbarSeparatorColor: `var(--${string})`;
|
|
1019
|
+
tooltipBackground: `var(--${string})`;
|
|
1020
|
+
tooltipBorderColor: `var(--${string})`;
|
|
1021
|
+
tooltipHeadingTextColor: `var(--${string})`;
|
|
1022
|
+
tooltipLabelTextColor: `var(--${string})`;
|
|
1023
|
+
tooltipValueTextColor: `var(--${string})`;
|
|
1024
|
+
tooltipPrimaryRowColor: `var(--${string})`;
|
|
1025
|
+
hoverGuideLineColor: `var(--${string})`;
|
|
1026
|
+
hoverGuideFillColor: `var(--${string})`;
|
|
1027
|
+
hoveredBarBorderColor: `var(--${string})`;
|
|
1028
|
+
hoveredPointRingColor: `var(--${string})`;
|
|
1029
|
+
pointStrokeColor: `var(--${string})`;
|
|
1030
|
+
stackedBarHoverBorderColor: `var(--${string})`;
|
|
1031
|
+
fontFamilyDefault: `var(--${string})`;
|
|
1032
|
+
fontFamilyHeading: `var(--${string})`;
|
|
1033
|
+
fontWeightRegular: `var(--${string})`;
|
|
1034
|
+
fontWeightMedium: `var(--${string})`;
|
|
1035
|
+
fontWeightSemibold: `var(--${string})`;
|
|
1036
|
+
fontWeightBold: `var(--${string})`;
|
|
1037
|
+
fontWeightExtraBold: `var(--${string})`;
|
|
1038
|
+
fontWeightBlack: `var(--${string})`;
|
|
1039
|
+
textScale: `var(--${string})`;
|
|
1040
|
+
fontSizeXxs: `var(--${string})`;
|
|
1041
|
+
fontSizeXs: `var(--${string})`;
|
|
1042
|
+
fontSizeSm: `var(--${string})`;
|
|
1043
|
+
fontSizeMd: `var(--${string})`;
|
|
1044
|
+
fontSizeLg: `var(--${string})`;
|
|
1045
|
+
fontSizeXl: `var(--${string})`;
|
|
1046
|
+
fontLineHeightXxs: `var(--${string})`;
|
|
1047
|
+
fontLineHeightXs: `var(--${string})`;
|
|
1048
|
+
fontLineHeightSm: `var(--${string})`;
|
|
1049
|
+
fontLineHeightMd: `var(--${string})`;
|
|
1050
|
+
fontLineHeightLg: `var(--${string})`;
|
|
1051
|
+
fontLineHeightXl: `var(--${string})`;
|
|
1052
|
+
fontSizeEditorBody: `var(--${string})`;
|
|
1053
|
+
fontSizeHeadingSm: `var(--${string})`;
|
|
1054
|
+
fontSizeHeadingMd: `var(--${string})`;
|
|
1055
|
+
fontSizeHeadingLg: `var(--${string})`;
|
|
1056
|
+
fontLineHeightEditorBody: `var(--${string})`;
|
|
1057
|
+
fontLineHeightHeadingSm: `var(--${string})`;
|
|
1058
|
+
fontLineHeightHeadingMd: `var(--${string})`;
|
|
1059
|
+
fontLineHeightHeadingLg: `var(--${string})`;
|
|
1060
|
+
fontTickLabel: `var(--${string})`;
|
|
1061
|
+
fontAxisLabel: `var(--${string})`;
|
|
1062
|
+
fontDataLabel: `var(--${string})`;
|
|
1063
|
+
fontStackTotal: `var(--${string})`;
|
|
1064
|
+
fontLegendLabel: `var(--${string})`;
|
|
1065
|
+
fontSeriesLabel: `var(--${string})`;
|
|
1066
|
+
fontTooltipLabel: `var(--${string})`;
|
|
1067
|
+
fontTooltipHeading: `var(--${string})`;
|
|
1068
|
+
fontTooltipFooter: `var(--${string})`;
|
|
1069
|
+
fontJumboTooltipLabel: `var(--${string})`;
|
|
1070
|
+
fontJumboTooltip: `var(--${string})`;
|
|
1071
|
+
fontMiniTooltipLabel: `var(--${string})`;
|
|
1072
|
+
fontMiniTooltipFooter: `var(--${string})`;
|
|
1073
|
+
fontTooltipCaption: `var(--${string})`;
|
|
1074
|
+
fontTooltipCaptionSmall: `var(--${string})`;
|
|
1075
|
+
fontTrendTag: `var(--${string})`;
|
|
1076
|
+
fontTrendTagSmall: `var(--${string})`;
|
|
1077
|
+
fontGoalLineLabel: `var(--${string})`;
|
|
1078
|
+
fontPieLabel: `var(--${string})`;
|
|
1079
|
+
fontPieChartTotal: `var(--${string})`;
|
|
1080
|
+
fontDifferenceArrowSmall: `var(--${string})`;
|
|
1081
|
+
fontDifferenceArrowMedium: `var(--${string})`;
|
|
1082
|
+
fontDifferenceArrowLarge: `var(--${string})`;
|
|
1083
|
+
fontButton: `var(--${string})`;
|
|
1084
|
+
fontInput: `var(--${string})`;
|
|
1085
|
+
fontInputLabel: `var(--${string})`;
|
|
1086
|
+
fontSelectLabel: `var(--${string})`;
|
|
1087
|
+
fontSelectDescription: `var(--${string})`;
|
|
1088
|
+
fontColorSelectLabel: `var(--${string})`;
|
|
1089
|
+
fontMenuTitle: `var(--${string})`;
|
|
1090
|
+
fontMenuGroupTitle: `var(--${string})`;
|
|
1091
|
+
fontMenuItemLabel: `var(--${string})`;
|
|
1092
|
+
fontMenuItemLabelSecondary: `var(--${string})`;
|
|
1093
|
+
fontUITooltip: `var(--${string})`;
|
|
1094
|
+
fontUITooltipSecondary: `var(--${string})`;
|
|
1095
|
+
fontErrorBoundaryTitle: `var(--${string})`;
|
|
1096
|
+
fontErrorBoundaryMessage: `var(--${string})`;
|
|
1097
|
+
fontTableCell: `var(--${string})`;
|
|
1098
|
+
fontTableHeaderCell: `var(--${string})`;
|
|
1099
|
+
fontSourceLabel: `var(--${string})`;
|
|
1100
|
+
fontSourceLink: `var(--${string})`;
|
|
1101
|
+
fontTextEditorH1: `var(--${string})`;
|
|
1102
|
+
fontTextEditorH2: `var(--${string})`;
|
|
1103
|
+
fontTextEditorH3: `var(--${string})`;
|
|
1104
|
+
fontTextEditorH6: `var(--${string})`;
|
|
1105
|
+
fontTextEditorBody: `var(--${string})`;
|
|
1106
|
+
fontTextEditorLink: `var(--${string})`;
|
|
1107
|
+
fontHighlightModeTitle: `var(--${string})`;
|
|
1108
|
+
fontHighlightModeSubtitle: `var(--${string})`;
|
|
1109
|
+
};
|
|
1110
|
+
|
|
1111
|
+
export { VizDiagnostic }
|
|
1112
|
+
|
|
1113
|
+
export { }
|