@silverpoint/core 0.3.0 → 0.7.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/catalog.d.ts +97 -0
- package/dist/catalog.js +8004 -0
- package/dist/catalog.js.map +1 -0
- package/dist/{chunk-I6BAZ7MJ.js → chunk-46QELMCG.js} +41 -236
- package/dist/chunk-46QELMCG.js.map +1 -0
- package/dist/chunk-5MP3BLZK.js +48 -0
- package/dist/chunk-5MP3BLZK.js.map +1 -0
- package/dist/chunk-6YFO7OP3.js +84 -0
- package/dist/chunk-6YFO7OP3.js.map +1 -0
- package/dist/chunk-ANJSW5JX.js +93 -0
- package/dist/chunk-ANJSW5JX.js.map +1 -0
- package/dist/chunk-E5CC2NNQ.js +172 -0
- package/dist/chunk-E5CC2NNQ.js.map +1 -0
- package/dist/chunk-G7N4X5XD.js +12 -0
- package/dist/chunk-G7N4X5XD.js.map +1 -0
- package/dist/chunk-KFBSQH5G.js +34 -0
- package/dist/chunk-KFBSQH5G.js.map +1 -0
- package/dist/chunk-NI7B6UEO.js +24 -0
- package/dist/chunk-NI7B6UEO.js.map +1 -0
- package/dist/chunk-WYFRHI4S.js +179 -0
- package/dist/chunk-WYFRHI4S.js.map +1 -0
- package/dist/contrast-siWF_R5o.d.ts +30 -0
- package/dist/dashboard-demos.d.ts +2 -2
- package/dist/index.d.ts +16 -60
- package/dist/index.js +34 -179
- package/dist/index.js.map +1 -1
- package/dist/model-DVVt59AB.d.ts +53 -0
- package/dist/palettes.d.ts +29 -0
- package/dist/palettes.js +79 -0
- package/dist/palettes.js.map +1 -0
- package/dist/{props-3G1XYd-r.d.ts → props-BZ9CcrGv.d.ts} +394 -2
- package/dist/timeline.d.ts +90 -0
- package/dist/timeline.js +125 -0
- package/dist/timeline.js.map +1 -0
- package/dist/{types-CbVMKvyQ.d.ts → types-BT3Xm7fP.d.ts} +3 -1
- package/dist/types-D5ys35fF.d.ts +576 -0
- package/dist/types-DHBJ0PzV.d.ts +57 -0
- package/dist/ui-demos.d.ts +14 -3
- package/dist/ui-demos.js +163 -1
- package/dist/ui-demos.js.map +1 -1
- package/dist/ui.d.ts +346 -325
- package/dist/ui.js +933 -118
- package/dist/ui.js.map +1 -1
- package/dist/view-DteS9glE.d.ts +82 -0
- package/package.json +19 -1
- package/dist/chunk-I6BAZ7MJ.js.map +0 -1
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { m as CommonChartProps, am as Ground, G as Geometry } from './props-BZ9CcrGv.js';
|
|
2
|
+
|
|
3
|
+
/** Tabular alternative of a chart's data, already formatted (REQ-121). */
|
|
4
|
+
interface DataTable {
|
|
5
|
+
readonly caption: string;
|
|
6
|
+
readonly columns: readonly string[];
|
|
7
|
+
readonly rows: readonly (readonly string[])[];
|
|
8
|
+
}
|
|
9
|
+
/** What a recipe needs beyond the props: the resolved environment. */
|
|
10
|
+
interface RecipeContext {
|
|
11
|
+
/** Resolved instance id. */
|
|
12
|
+
readonly id: string;
|
|
13
|
+
/** Resolved container width in px; `undefined` while it has not been measured. */
|
|
14
|
+
readonly width: number | undefined;
|
|
15
|
+
readonly locale: string;
|
|
16
|
+
readonly emptyState: Ground['emptyState'];
|
|
17
|
+
readonly domainPadding: number;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Everything an adapter renders: the geometry plus the accessible layer. Adapters translate
|
|
21
|
+
* it into nodes and compute nothing (Art. 2).
|
|
22
|
+
*/
|
|
23
|
+
interface ChartModel {
|
|
24
|
+
readonly chart: string;
|
|
25
|
+
readonly id: string;
|
|
26
|
+
/** `deferred` while the container has no usable size (REQ-009). */
|
|
27
|
+
readonly status: 'ready' | 'deferred';
|
|
28
|
+
readonly geometry: Geometry;
|
|
29
|
+
readonly chrome: 'card' | 'bare';
|
|
30
|
+
/** Accessible name (REQ-120). */
|
|
31
|
+
readonly name: string;
|
|
32
|
+
/** Description summarising the series (REQ-120). */
|
|
33
|
+
readonly description: string;
|
|
34
|
+
readonly ids: Readonly<{
|
|
35
|
+
title: string;
|
|
36
|
+
desc: string;
|
|
37
|
+
table: string;
|
|
38
|
+
}>;
|
|
39
|
+
readonly table: DataTable;
|
|
40
|
+
readonly dataTable: 'visible' | 'hidden' | 'none';
|
|
41
|
+
}
|
|
42
|
+
/** A chart: its display name and the pure function from props to model. */
|
|
43
|
+
interface ChartRecipe<P extends CommonChartProps> {
|
|
44
|
+
readonly name: string;
|
|
45
|
+
build(props: P, context: RecipeContext): ChartModel;
|
|
46
|
+
}
|
|
47
|
+
/** Imperative handle every adapter exposes, deliberately minimal (API Spec §8.1). */
|
|
48
|
+
interface ChartHandle {
|
|
49
|
+
getGeometry(): Geometry;
|
|
50
|
+
toSVGString(): string;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export type { ChartRecipe as C, DataTable as D, RecipeContext as R, ChartModel as a, ChartHandle as b };
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { au as Palette } from './props-BZ9CcrGv.js';
|
|
2
|
+
export { aD as PALETTE_PROPERTIES, aE as nestProvider, aF as paletteStyle, aG as resolvePalette } from './props-BZ9CcrGv.js';
|
|
3
|
+
export { a as PALETTE_PAIRS, P as PaletteFinding, c as checkPalette, b as contrastRatio } from './contrast-siWF_R5o.js';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* The palette presets (REQ-463, Data Model §2.26): named after historical drawing media, each
|
|
7
|
+
* passing every pair of Data Model §3.9 (REQ-464, verified by the contrast gate). A subpath of its
|
|
8
|
+
* own, with the palette API (resolution, declarations, contrast), so the main entry stays inside its
|
|
9
|
+
* 45 kB budget (REQ-164) and an application ships only the presets it imports.
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
/** The silverpoint ground's own inks on cream: what a chart draws with no palette. */
|
|
13
|
+
declare const silverpoint: Palette;
|
|
14
|
+
/** Red chalk, as in Leonardo's and Andrea del Sarto's studies. */
|
|
15
|
+
declare const sanguine: Palette;
|
|
16
|
+
/** Sepia wash and bistre. */
|
|
17
|
+
declare const sepia: Palette;
|
|
18
|
+
/** Iron-gall ink: the blue-black of manuscripts. */
|
|
19
|
+
declare const ironGall: Palette;
|
|
20
|
+
/** Verdigris, the copper green of illuminators. */
|
|
21
|
+
declare const verdigris: Palette;
|
|
22
|
+
/** Indigo, the dyers' and printers' blue. */
|
|
23
|
+
declare const indigo: Palette;
|
|
24
|
+
/** The six presets by name. */
|
|
25
|
+
declare const PALETTES: Readonly<Record<string, Palette>>;
|
|
26
|
+
/** Written out, not `Object.keys(PALETTES)`: a call the bundler cannot drop would keep every preset. */
|
|
27
|
+
declare const PALETTE_NAMES: readonly string[];
|
|
28
|
+
|
|
29
|
+
export { PALETTES, PALETTE_NAMES, Palette, indigo, ironGall, sanguine, sepia, silverpoint, verdigris };
|
package/dist/palettes.js
ADDED
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
export { PALETTE_PAIRS, PALETTE_PROPERTIES, checkPalette, contrastRatio, nestProvider, paletteStyle, resolvePalette } from './chunk-ANJSW5JX.js';
|
|
2
|
+
import './chunk-5MP3BLZK.js';
|
|
3
|
+
import './chunk-WYFRHI4S.js';
|
|
4
|
+
|
|
5
|
+
// src/palettes.ts
|
|
6
|
+
var preset = (palette) => Object.freeze({ ...palette });
|
|
7
|
+
var silverpoint = /* @__PURE__ */ preset({
|
|
8
|
+
substrate: "#EDE7DA",
|
|
9
|
+
ink: "#5A5E65",
|
|
10
|
+
inkSecondary: "#685C4D",
|
|
11
|
+
heighten: "#FFFFFF",
|
|
12
|
+
rule: "#737A82",
|
|
13
|
+
grid: "#737A82",
|
|
14
|
+
text: "#3F4348",
|
|
15
|
+
textMuted: "#5A5E65"
|
|
16
|
+
});
|
|
17
|
+
var sanguine = /* @__PURE__ */ preset({
|
|
18
|
+
substrate: "#F2E8DC",
|
|
19
|
+
ink: "#8A3A24",
|
|
20
|
+
inkSecondary: "#6A4A3A",
|
|
21
|
+
heighten: "#FFFFFF",
|
|
22
|
+
rule: "#9A6450",
|
|
23
|
+
grid: "#9A6450",
|
|
24
|
+
text: "#4A2216",
|
|
25
|
+
textMuted: "#7A3E2C"
|
|
26
|
+
});
|
|
27
|
+
var sepia = /* @__PURE__ */ preset({
|
|
28
|
+
substrate: "#F0E6D2",
|
|
29
|
+
ink: "#6B4C2C",
|
|
30
|
+
inkSecondary: "#5A5148",
|
|
31
|
+
heighten: "#FFFFFF",
|
|
32
|
+
rule: "#8A6E52",
|
|
33
|
+
grid: "#8A6E52",
|
|
34
|
+
text: "#3B2A18",
|
|
35
|
+
textMuted: "#6B4C2C"
|
|
36
|
+
});
|
|
37
|
+
var ironGall = /* @__PURE__ */ preset({
|
|
38
|
+
substrate: "#EEEAE0",
|
|
39
|
+
ink: "#3C4858",
|
|
40
|
+
inkSecondary: "#6A4E36",
|
|
41
|
+
heighten: "#FFFFFF",
|
|
42
|
+
rule: "#6C7584",
|
|
43
|
+
grid: "#6C7584",
|
|
44
|
+
text: "#232B36",
|
|
45
|
+
textMuted: "#4A5566"
|
|
46
|
+
});
|
|
47
|
+
var verdigris = /* @__PURE__ */ preset({
|
|
48
|
+
substrate: "#E7EDE6",
|
|
49
|
+
ink: "#2C6355",
|
|
50
|
+
inkSecondary: "#65563F",
|
|
51
|
+
heighten: "#FFFFFF",
|
|
52
|
+
rule: "#5C7B71",
|
|
53
|
+
grid: "#5C7B71",
|
|
54
|
+
text: "#1F3D36",
|
|
55
|
+
textMuted: "#3E6A5E"
|
|
56
|
+
});
|
|
57
|
+
var indigo = /* @__PURE__ */ preset({
|
|
58
|
+
substrate: "#E9EAF1",
|
|
59
|
+
ink: "#3A4884",
|
|
60
|
+
inkSecondary: "#675641",
|
|
61
|
+
heighten: "#FFFFFF",
|
|
62
|
+
rule: "#68709A",
|
|
63
|
+
grid: "#68709A",
|
|
64
|
+
text: "#232C52",
|
|
65
|
+
textMuted: "#4A5590"
|
|
66
|
+
});
|
|
67
|
+
var PALETTES = /* @__PURE__ */ Object.freeze({
|
|
68
|
+
silverpoint,
|
|
69
|
+
sanguine,
|
|
70
|
+
sepia,
|
|
71
|
+
ironGall,
|
|
72
|
+
verdigris,
|
|
73
|
+
indigo
|
|
74
|
+
});
|
|
75
|
+
var PALETTE_NAMES = /* @__PURE__ */ Object.freeze(["silverpoint", "sanguine", "sepia", "ironGall", "verdigris", "indigo"]);
|
|
76
|
+
|
|
77
|
+
export { PALETTES, PALETTE_NAMES, indigo, ironGall, sanguine, sepia, silverpoint, verdigris };
|
|
78
|
+
//# sourceMappingURL=palettes.js.map
|
|
79
|
+
//# sourceMappingURL=palettes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/palettes.ts"],"names":[],"mappings":";;;;;AAWA,IAAM,MAAA,GAAS,CAAC,OAAA,KAAuD,MAAA,CAAO,OAAO,EAAE,GAAG,SAAS,CAAA;AAG5F,IAAM,8BAA8B,MAAA,CAAO;AAAA,EAChD,SAAA,EAAW,SAAA;AAAA,EACX,GAAA,EAAK,SAAA;AAAA,EACL,YAAA,EAAc,SAAA;AAAA,EACd,QAAA,EAAU,SAAA;AAAA,EACV,IAAA,EAAM,SAAA;AAAA,EACN,IAAA,EAAM,SAAA;AAAA,EACN,IAAA,EAAM,SAAA;AAAA,EACN,SAAA,EAAW;AACb,CAAC;AAGM,IAAM,2BAA2B,MAAA,CAAO;AAAA,EAC7C,SAAA,EAAW,SAAA;AAAA,EACX,GAAA,EAAK,SAAA;AAAA,EACL,YAAA,EAAc,SAAA;AAAA,EACd,QAAA,EAAU,SAAA;AAAA,EACV,IAAA,EAAM,SAAA;AAAA,EACN,IAAA,EAAM,SAAA;AAAA,EACN,IAAA,EAAM,SAAA;AAAA,EACN,SAAA,EAAW;AACb,CAAC;AAGM,IAAM,wBAAwB,MAAA,CAAO;AAAA,EAC1C,SAAA,EAAW,SAAA;AAAA,EACX,GAAA,EAAK,SAAA;AAAA,EACL,YAAA,EAAc,SAAA;AAAA,EACd,QAAA,EAAU,SAAA;AAAA,EACV,IAAA,EAAM,SAAA;AAAA,EACN,IAAA,EAAM,SAAA;AAAA,EACN,IAAA,EAAM,SAAA;AAAA,EACN,SAAA,EAAW;AACb,CAAC;AAGM,IAAM,2BAA2B,MAAA,CAAO;AAAA,EAC7C,SAAA,EAAW,SAAA;AAAA,EACX,GAAA,EAAK,SAAA;AAAA,EACL,YAAA,EAAc,SAAA;AAAA,EACd,QAAA,EAAU,SAAA;AAAA,EACV,IAAA,EAAM,SAAA;AAAA,EACN,IAAA,EAAM,SAAA;AAAA,EACN,IAAA,EAAM,SAAA;AAAA,EACN,SAAA,EAAW;AACb,CAAC;AAGM,IAAM,4BAA4B,MAAA,CAAO;AAAA,EAC9C,SAAA,EAAW,SAAA;AAAA,EACX,GAAA,EAAK,SAAA;AAAA,EACL,YAAA,EAAc,SAAA;AAAA,EACd,QAAA,EAAU,SAAA;AAAA,EACV,IAAA,EAAM,SAAA;AAAA,EACN,IAAA,EAAM,SAAA;AAAA,EACN,IAAA,EAAM,SAAA;AAAA,EACN,SAAA,EAAW;AACb,CAAC;AAGM,IAAM,yBAAyB,MAAA,CAAO;AAAA,EAC3C,SAAA,EAAW,SAAA;AAAA,EACX,GAAA,EAAK,SAAA;AAAA,EACL,YAAA,EAAc,SAAA;AAAA,EACd,QAAA,EAAU,SAAA;AAAA,EACV,IAAA,EAAM,SAAA;AAAA,EACN,IAAA,EAAM,SAAA;AAAA,EACN,IAAA,EAAM,SAAA;AAAA,EACN,SAAA,EAAW;AACb,CAAC;AAGM,IAAM,QAAA,0BAAqE,MAAA,CAAO;AAAA,EACvF,WAAA;AAAA,EACA,QAAA;AAAA,EACA,KAAA;AAAA,EACA,QAAA;AAAA,EACA,SAAA;AAAA,EACA;AACF,CAAC;AAGM,IAAM,aAAA,mBAAmD,MAAA,CAAO,MAAA,CAAO,CAAC,aAAA,EAAe,YAAY,OAAA,EAAS,UAAA,EAAY,WAAA,EAAa,QAAQ,CAAC","file":"palettes.js","sourcesContent":["/**\n * The palette presets (REQ-463, Data Model §2.26): named after historical drawing media, each\n * passing every pair of Data Model §3.9 (REQ-464, verified by the contrast gate). A subpath of its\n * own, with the palette API (resolution, declarations, contrast), so the main entry stays inside its\n * 45 kB budget (REQ-164) and an application ships only the presets it imports.\n */\nimport type { Palette } from './palette/palette';\n\nexport { nestProvider, PALETTE_PROPERTIES, paletteStyle, resolvePalette } from './palette/palette';\nexport { checkPalette, contrastRatio, PALETTE_PAIRS, type PaletteFinding } from './palette/contrast';\n\nconst preset = (palette: Required<Omit<Palette, 'focus'>>): Palette => Object.freeze({ ...palette });\n\n/** The silverpoint ground's own inks on cream: what a chart draws with no palette. */\nexport const silverpoint = /* @__PURE__ */ preset({\n substrate: '#EDE7DA',\n ink: '#5A5E65',\n inkSecondary: '#685C4D',\n heighten: '#FFFFFF',\n rule: '#737A82',\n grid: '#737A82',\n text: '#3F4348',\n textMuted: '#5A5E65',\n});\n\n/** Red chalk, as in Leonardo's and Andrea del Sarto's studies. */\nexport const sanguine = /* @__PURE__ */ preset({\n substrate: '#F2E8DC',\n ink: '#8A3A24',\n inkSecondary: '#6A4A3A',\n heighten: '#FFFFFF',\n rule: '#9A6450',\n grid: '#9A6450',\n text: '#4A2216',\n textMuted: '#7A3E2C',\n});\n\n/** Sepia wash and bistre. */\nexport const sepia = /* @__PURE__ */ preset({\n substrate: '#F0E6D2',\n ink: '#6B4C2C',\n inkSecondary: '#5A5148',\n heighten: '#FFFFFF',\n rule: '#8A6E52',\n grid: '#8A6E52',\n text: '#3B2A18',\n textMuted: '#6B4C2C',\n});\n\n/** Iron-gall ink: the blue-black of manuscripts. */\nexport const ironGall = /* @__PURE__ */ preset({\n substrate: '#EEEAE0',\n ink: '#3C4858',\n inkSecondary: '#6A4E36',\n heighten: '#FFFFFF',\n rule: '#6C7584',\n grid: '#6C7584',\n text: '#232B36',\n textMuted: '#4A5566',\n});\n\n/** Verdigris, the copper green of illuminators. */\nexport const verdigris = /* @__PURE__ */ preset({\n substrate: '#E7EDE6',\n ink: '#2C6355',\n inkSecondary: '#65563F',\n heighten: '#FFFFFF',\n rule: '#5C7B71',\n grid: '#5C7B71',\n text: '#1F3D36',\n textMuted: '#3E6A5E',\n});\n\n/** Indigo, the dyers' and printers' blue. */\nexport const indigo = /* @__PURE__ */ preset({\n substrate: '#E9EAF1',\n ink: '#3A4884',\n inkSecondary: '#675641',\n heighten: '#FFFFFF',\n rule: '#68709A',\n grid: '#68709A',\n text: '#232C52',\n textMuted: '#4A5590',\n});\n\n/** The six presets by name. */\nexport const PALETTES: Readonly<Record<string, Palette>> = /* @__PURE__ */ Object.freeze({\n silverpoint,\n sanguine,\n sepia,\n ironGall,\n verdigris,\n indigo,\n});\n\n/** Written out, not `Object.keys(PALETTES)`: a call the bundler cannot drop would keep every preset. */\nexport const PALETTE_NAMES: readonly string[] = /* @__PURE__ */ Object.freeze(['silverpoint', 'sanguine', 'sepia', 'ironGall', 'verdigris', 'indigo']);\n\nexport type { Palette } from './palette/palette';\n"]}
|
|
@@ -85,6 +85,23 @@ interface HitArea {
|
|
|
85
85
|
column: number;
|
|
86
86
|
row: number;
|
|
87
87
|
}>;
|
|
88
|
+
/**
|
|
89
|
+
* The item's place in a hierarchy, when the chart draws one; `order` is the depth-first
|
|
90
|
+
* pre-order (REQ-438).
|
|
91
|
+
*/
|
|
92
|
+
readonly node?: Readonly<{
|
|
93
|
+
id: string;
|
|
94
|
+
parent: string | null;
|
|
95
|
+
depth: number;
|
|
96
|
+
order: number;
|
|
97
|
+
}>;
|
|
98
|
+
/**
|
|
99
|
+
* Where each navigation key moves from this item, as an index into `hitAreas`, for a chart with
|
|
100
|
+
* its own keyboard model (a tree, REQ-438). When the first item has them, the keys follow them
|
|
101
|
+
* and nothing else; a key without a move stays. Computed in the core with the layout, so a chart
|
|
102
|
+
* without such a model carries none of its code (REQ-444).
|
|
103
|
+
*/
|
|
104
|
+
readonly moves?: Readonly<Partial<Record<string, number>>>;
|
|
88
105
|
}
|
|
89
106
|
/**
|
|
90
107
|
* A hatch tile shared by every shape of one tonal level (REQ-029).
|
|
@@ -183,6 +200,10 @@ interface UiTokens {
|
|
|
183
200
|
disabled: ToneStep;
|
|
184
201
|
alertError: ToneStep;
|
|
185
202
|
}>;
|
|
203
|
+
/** Tonal level of the hatched backdrop behind a modal overlay; unhatched (weight grounds, precision) it is the opaque substrate. Default `2` (REQ-499). */
|
|
204
|
+
readonly backdrop?: ToneStep;
|
|
205
|
+
/** Level of a table's striped and hovered rows. Default `1` (REQ-475). */
|
|
206
|
+
readonly rowTone?: ToneStep;
|
|
186
207
|
}
|
|
187
208
|
/** Name of a registered ground. */
|
|
188
209
|
type GroundName = 'silverpoint' | (string & {});
|
|
@@ -225,11 +246,53 @@ interface Ground {
|
|
|
225
246
|
/** Name of a registered ground, or a complete ground. */
|
|
226
247
|
type GroundRef = GroundName | Ground;
|
|
227
248
|
|
|
249
|
+
/**
|
|
250
|
+
* The colours of one ground's inks, for one element or one section (REQ-460, Data Model §2.26).
|
|
251
|
+
* Every field is optional: an unset field keeps the ground's own. Values are any CSS colour;
|
|
252
|
+
* `checkPalette` can only measure hex values.
|
|
253
|
+
*/
|
|
254
|
+
interface Palette {
|
|
255
|
+
/** The prepared ground the drawing sits on. */
|
|
256
|
+
readonly substrate?: string;
|
|
257
|
+
/** The main series and the frames of UI components. */
|
|
258
|
+
readonly ink?: string;
|
|
259
|
+
/** The second series and the hatch of tones. */
|
|
260
|
+
readonly inkSecondary?: string;
|
|
261
|
+
/** White heightening on the live value (always outlined with `ink`). */
|
|
262
|
+
readonly heighten?: string;
|
|
263
|
+
/** Rules and baselines. */
|
|
264
|
+
readonly rule?: string;
|
|
265
|
+
/** Grid lines. */
|
|
266
|
+
readonly grid?: string;
|
|
267
|
+
/** Large figures and primary labels. */
|
|
268
|
+
readonly text?: string;
|
|
269
|
+
/** Axis labels and secondary text. */
|
|
270
|
+
readonly textMuted?: string;
|
|
271
|
+
/** Focus ring of UI components; `ink` by default. */
|
|
272
|
+
readonly focus?: string;
|
|
273
|
+
}
|
|
274
|
+
/** Field → custom property, in the order of every emitted declaration (REQ-461). */
|
|
275
|
+
declare const PALETTE_PROPERTIES: Readonly<Record<keyof Palette, `--sp-${string}`>>;
|
|
276
|
+
/**
|
|
277
|
+
* The palettes of an element's layers merged field by field, a later layer winning: call it as
|
|
278
|
+
* `resolvePalette(provider, cell, element)` (REQ-462). Unknown fields and unsafe values are dropped
|
|
279
|
+
* with `SP024`; a weak hex pair is kept and warned `SP023` (REQ-466, REQ-467).
|
|
280
|
+
*/
|
|
281
|
+
declare function resolvePalette(...layers: readonly (Palette | undefined)[]): Palette | undefined;
|
|
282
|
+
/** `--sp-ink:#8A3A24;--sp-text:#4A2216`: a palette's declarations, in PALETTE_PROPERTIES order; '' for none (REQ-461). */
|
|
283
|
+
declare function paletteStyle(palette: Palette | undefined): string;
|
|
284
|
+
/**
|
|
285
|
+
* A provider inside another (REQ-462): the inner one's set fields win, the rest is the outer's, and
|
|
286
|
+
* the palettes merge field by field, so a nested provider re-colours a section and keeps the rest.
|
|
287
|
+
*/
|
|
288
|
+
declare function nestProvider(outer: ProviderConfig | undefined, own: ProviderConfig): ProviderConfig;
|
|
289
|
+
|
|
228
290
|
/** Props present in every chart, identical in React and Angular (REQ-094). */
|
|
229
291
|
interface CommonChartProps {
|
|
230
292
|
/**
|
|
231
293
|
* Rows to draw. If omitted, the demo dataset is rendered (REQ-093): accessor props (`…Key`,
|
|
232
|
-
* `keys`, `names`) are ignored, every other
|
|
294
|
+
* `keys`, `names`, `levels`, `axis`, `dimensions`, `period`, `nodes`) are ignored, every other
|
|
295
|
+
* prop applies.
|
|
233
296
|
*/
|
|
234
297
|
data?: readonly Datum[];
|
|
235
298
|
/** Style ground. Defaults to the app provider's, or `silverpoint`. */
|
|
@@ -238,6 +301,11 @@ interface CommonChartProps {
|
|
|
238
301
|
substrate?: SubstrateName;
|
|
239
302
|
/** `ink` by default; `precision` disables inking (REQ-021). */
|
|
240
303
|
mode?: InkMode;
|
|
304
|
+
/**
|
|
305
|
+
* Colours over the ground's, field by field, written on the root's `style` (REQ-461). Merged over
|
|
306
|
+
* the dashboard's and the provider's (REQ-462); presets are on `@silverpoint/core/palettes`.
|
|
307
|
+
*/
|
|
308
|
+
palette?: Palette;
|
|
241
309
|
/** Seed. If omitted, it is derived from `id` stably (REQ-003). */
|
|
242
310
|
seed?: Seed;
|
|
243
311
|
/** Stable identifier. If omitted, it is generated deterministically. */
|
|
@@ -286,6 +354,8 @@ interface ProviderConfig {
|
|
|
286
354
|
substrate?: SubstrateName;
|
|
287
355
|
mode?: InkMode;
|
|
288
356
|
locale?: string;
|
|
357
|
+
/** Colours for every chart and component below, under their own and their dashboard's (REQ-462). */
|
|
358
|
+
palette?: Palette;
|
|
289
359
|
}
|
|
290
360
|
/** `BulletChart` (REQ-069): one bar per target, with a marker at the target. Values in 0-100. */
|
|
291
361
|
interface BulletChartProps extends CommonChartProps {
|
|
@@ -601,5 +671,327 @@ interface VolvelleChartProps extends CommonChartProps {
|
|
|
601
671
|
*/
|
|
602
672
|
indexValue?: string;
|
|
603
673
|
}
|
|
674
|
+
/** Bars as columns or rows, as `BarChart` has them. */
|
|
675
|
+
type ChartOrientation = 'columns' | 'rows';
|
|
676
|
+
/** `HistogramChart` (REQ-400): raw observations binned in the core (Data Model §2.15). */
|
|
677
|
+
interface HistogramChartProps extends CommonChartProps {
|
|
678
|
+
/** Ignored without `data`. */
|
|
679
|
+
valueKey?: Accessor<number | null | undefined>;
|
|
680
|
+
/**
|
|
681
|
+
* A number asks for that many equal-width bins over the niced extent; an array gives the
|
|
682
|
+
* thresholds, increasing. Freedman–Diaconis by default, Sturges when the IQR is 0 (REQ-432).
|
|
683
|
+
*/
|
|
684
|
+
bins?: number | readonly number[];
|
|
685
|
+
/** Turns the counts into a running total. */
|
|
686
|
+
cumulative?: boolean;
|
|
687
|
+
orientation?: ChartOrientation;
|
|
688
|
+
}
|
|
689
|
+
/** `EcdfChart` (REQ-401): the empirical cumulative distribution as a step function. */
|
|
690
|
+
interface EcdfChartProps extends CommonChartProps {
|
|
691
|
+
/** Ignored without `data`. */
|
|
692
|
+
valueKey?: Accessor<number | null | undefined>;
|
|
693
|
+
/** Two groups at most are drawn. Ignored without `data`. */
|
|
694
|
+
groupKey?: Accessor<string | null | undefined>;
|
|
695
|
+
/** Quantiles, in 0-1, drawn as rules. */
|
|
696
|
+
markers?: readonly number[];
|
|
697
|
+
}
|
|
698
|
+
/** `BoxPlotChart` (REQ-402): quartiles, median, Tukey whiskers and outliers per group. */
|
|
699
|
+
interface BoxPlotChartProps extends CommonChartProps {
|
|
700
|
+
/** Ignored without `data`. */
|
|
701
|
+
valueKey?: Accessor<number | null | undefined>;
|
|
702
|
+
/** Ignored without `data`. */
|
|
703
|
+
groupKey?: Accessor<string | null | undefined>;
|
|
704
|
+
/** Whisker reach as a multiple of the IQR; 1.5 by default (REQ-432). */
|
|
705
|
+
whisker?: number;
|
|
706
|
+
/** Draws the observations past the whiskers; `true` by default. */
|
|
707
|
+
outliers?: boolean;
|
|
708
|
+
orientation?: ChartOrientation;
|
|
709
|
+
}
|
|
710
|
+
/** `ViolinChart` (REQ-403): a mirrored kernel density per group, quartiles marked inside. */
|
|
711
|
+
interface ViolinChartProps extends CommonChartProps {
|
|
712
|
+
/** Ignored without `data`. */
|
|
713
|
+
valueKey?: Accessor<number | null | undefined>;
|
|
714
|
+
/** Ignored without `data`. */
|
|
715
|
+
groupKey?: Accessor<string | null | undefined>;
|
|
716
|
+
/** Kernel bandwidth in data units, shared by every group; Silverman's rule by default. */
|
|
717
|
+
bandwidth?: number;
|
|
718
|
+
/** Marks the quartiles inside each violin; `true` by default. */
|
|
719
|
+
quartiles?: boolean;
|
|
720
|
+
orientation?: ChartOrientation;
|
|
721
|
+
}
|
|
722
|
+
/** `RidgelineChart` (REQ-404): a kernel density per group on overlapping baselines. */
|
|
723
|
+
interface RidgelineChartProps extends CommonChartProps {
|
|
724
|
+
/** Ignored without `data`. */
|
|
725
|
+
valueKey?: Accessor<number | null | undefined>;
|
|
726
|
+
/** The group of an observation; one ridge per group. Ignored without `data`. */
|
|
727
|
+
groupKey: Accessor<string | null | undefined>;
|
|
728
|
+
/** Kernel bandwidth in data units, shared by every group; Silverman's rule by default. */
|
|
729
|
+
bandwidth?: number;
|
|
730
|
+
/** How far a ridge reaches into the one behind it, 0-1; 0.5 by default. */
|
|
731
|
+
overlap?: number;
|
|
732
|
+
}
|
|
733
|
+
/** `BeeswarmChart` (REQ-405): one point per observation, packed without overlap. */
|
|
734
|
+
interface BeeswarmChartProps extends CommonChartProps {
|
|
735
|
+
/** Ignored without `data`. */
|
|
736
|
+
valueKey?: Accessor<number | null | undefined>;
|
|
737
|
+
/** Ignored without `data`. */
|
|
738
|
+
groupKey?: Accessor<string | null | undefined>;
|
|
739
|
+
/** Names the point in the readout and the table. Ignored without `data`. */
|
|
740
|
+
labelKey?: Accessor<string | null | undefined>;
|
|
741
|
+
/** Point radius in px; 3 by default. */
|
|
742
|
+
radius?: number;
|
|
743
|
+
}
|
|
744
|
+
/** `LollipopChart` (REQ-406): a stem from the baseline and a head at the value (Data Model §2.1). */
|
|
745
|
+
interface LollipopChartProps extends CommonChartProps {
|
|
746
|
+
/** Ignored without `data`. */
|
|
747
|
+
xKey?: Accessor<string | number>;
|
|
748
|
+
/** Ignored without `data`. */
|
|
749
|
+
valueKey?: Accessor<number | null | undefined>;
|
|
750
|
+
orientation?: ChartOrientation;
|
|
751
|
+
/** Order of the categories; `none` keeps the data order. */
|
|
752
|
+
sort?: 'none' | 'ascending' | 'descending';
|
|
753
|
+
}
|
|
754
|
+
/** `DumbbellChart` (REQ-407): two values per category joined by a segment (Data Model §2.16). */
|
|
755
|
+
interface DumbbellChartProps extends CommonChartProps {
|
|
756
|
+
/** Ignored without `data`. */
|
|
757
|
+
labelKey?: Accessor<string>;
|
|
758
|
+
/** Ignored without `data`. */
|
|
759
|
+
startKey?: Accessor<number | null | undefined>;
|
|
760
|
+
/** Ignored without `data`. */
|
|
761
|
+
endKey?: Accessor<number | null | undefined>;
|
|
762
|
+
/** Titles of the two values; `['start', 'end']` by default. Ignored without `data`. */
|
|
763
|
+
names?: readonly [string, string];
|
|
764
|
+
/** `arrow` encodes the direction from the first value to the second. */
|
|
765
|
+
endMarker?: 'dot' | 'arrow';
|
|
766
|
+
/** `rows` by default: long category names read across. */
|
|
767
|
+
orientation?: ChartOrientation;
|
|
768
|
+
}
|
|
769
|
+
/** `SlopeChart` (REQ-408): two period axes, one segment per category (Data Model §2.16). */
|
|
770
|
+
interface SlopeChartProps extends CommonChartProps {
|
|
771
|
+
/** Ignored without `data`. */
|
|
772
|
+
labelKey?: Accessor<string>;
|
|
773
|
+
/** Ignored without `data`. */
|
|
774
|
+
startKey?: Accessor<number | null | undefined>;
|
|
775
|
+
/** Ignored without `data`. */
|
|
776
|
+
endKey?: Accessor<number | null | undefined>;
|
|
777
|
+
/** Titles of the two periods; `['start', 'end']` by default. Ignored without `data`. */
|
|
778
|
+
names?: readonly [string, string];
|
|
779
|
+
}
|
|
780
|
+
/** `BumpChart` (REQ-409): the rank of each series at each x, computed in the core (Data Model §2.17). */
|
|
781
|
+
interface BumpChartProps extends CommonChartProps {
|
|
782
|
+
/** Ignored without `data`. */
|
|
783
|
+
xKey?: Accessor<string | number>;
|
|
784
|
+
/** Ignored without `data`. */
|
|
785
|
+
seriesKey?: Accessor<string>;
|
|
786
|
+
/** Ignored without `data`. */
|
|
787
|
+
valueKey?: Accessor<number | null | undefined>;
|
|
788
|
+
/** `descending` gives rank 1 to the highest value (the default). */
|
|
789
|
+
order?: 'descending' | 'ascending';
|
|
790
|
+
/** Series drawn, the best-ranked first; all by default. */
|
|
791
|
+
series?: number;
|
|
792
|
+
}
|
|
793
|
+
/** `ErrorBarChart` (REQ-410): a point estimate with its interval (Data Model §2.18). */
|
|
794
|
+
interface ErrorBarChartProps extends CommonChartProps {
|
|
795
|
+
/** Ignored without `data`. */
|
|
796
|
+
labelKey?: Accessor<string>;
|
|
797
|
+
/** Ignored without `data`. */
|
|
798
|
+
estimateKey?: Accessor<number | null | undefined>;
|
|
799
|
+
/** Ignored without `data`. */
|
|
800
|
+
lowKey?: Accessor<number | null | undefined>;
|
|
801
|
+
/** Ignored without `data`. */
|
|
802
|
+
highKey?: Accessor<number | null | undefined>;
|
|
803
|
+
/** A reference value drawn as a dotted rule. */
|
|
804
|
+
reference?: number;
|
|
805
|
+
/** `rows` by default, as a forest plot reads. */
|
|
806
|
+
orientation?: ChartOrientation;
|
|
807
|
+
}
|
|
808
|
+
/** `IntervalChart` (REQ-411): floating bars from start to end on lanes (Data Model §2.19). */
|
|
809
|
+
interface IntervalChartProps extends CommonChartProps {
|
|
810
|
+
/** Ignored without `data`. */
|
|
811
|
+
laneKey?: Accessor<string>;
|
|
812
|
+
/** Ignored without `data`. */
|
|
813
|
+
startKey?: Accessor<number | string | null | undefined>;
|
|
814
|
+
/** Ignored without `data`. */
|
|
815
|
+
endKey?: Accessor<number | string | null | undefined>;
|
|
816
|
+
/** Ignored without `data`. */
|
|
817
|
+
labelKey?: Accessor<string | null | undefined>;
|
|
818
|
+
/** `date` reads ISO `YYYY-MM-DD` days in UTC; `number` by default. Ignored without `data`. */
|
|
819
|
+
axis?: 'number' | 'date';
|
|
820
|
+
}
|
|
821
|
+
/** `DivergingBarChart` (REQ-412): ordered levels stacked on both sides of a neutral centre (Data Model §2.20). */
|
|
822
|
+
interface DivergingBarChartProps extends CommonChartProps {
|
|
823
|
+
/** Ignored without `data`. */
|
|
824
|
+
labelKey?: Accessor<string>;
|
|
825
|
+
/** The level columns, most negative first. Ignored without `data`. */
|
|
826
|
+
levels: readonly string[];
|
|
827
|
+
/** Index of the neutral level, split across the centre; `null` for none. The middle one by default. */
|
|
828
|
+
neutral?: number | null;
|
|
829
|
+
/** Normalises each row to 100 %; `true` by default. */
|
|
830
|
+
percent?: boolean;
|
|
831
|
+
}
|
|
832
|
+
/** `ConnectedScatterChart` (REQ-413): an ordered path through x-y points (Data Model §2.21). */
|
|
833
|
+
interface ConnectedScatterChartProps extends CommonChartProps {
|
|
834
|
+
/** Ignored without `data`. */
|
|
835
|
+
xKey?: Accessor<number | null | undefined>;
|
|
836
|
+
/** Ignored without `data`. */
|
|
837
|
+
yKey?: Accessor<number | null | undefined>;
|
|
838
|
+
/** Ignored without `data`. */
|
|
839
|
+
labelKey?: Accessor<string | null | undefined>;
|
|
840
|
+
/** Draws direction marks along the path; `true` by default. */
|
|
841
|
+
arrows?: boolean;
|
|
842
|
+
}
|
|
843
|
+
/** `WaffleChart` (REQ-414): a unit grid filled in reading order by category (Data Model §2.2). */
|
|
844
|
+
interface WaffleChartProps extends CommonChartProps {
|
|
845
|
+
/** Ignored without `data`. */
|
|
846
|
+
nameKey?: Accessor<string | number>;
|
|
847
|
+
/** Ignored without `data`. */
|
|
848
|
+
valueKey?: Accessor<number | null | undefined>;
|
|
849
|
+
/** Cells in the grid; 100 by default. */
|
|
850
|
+
cells?: number;
|
|
851
|
+
/** Cells per row; 10 by default. */
|
|
852
|
+
columns?: number;
|
|
853
|
+
}
|
|
854
|
+
/** `MarimekkoChart` (REQ-415): column width ∝ total, segment height ∝ share (Data Model §2.22). */
|
|
855
|
+
interface MarimekkoChartProps extends CommonChartProps {
|
|
856
|
+
/** Ignored without `data`. */
|
|
857
|
+
columnKey?: Accessor<string>;
|
|
858
|
+
/** Ignored without `data`. */
|
|
859
|
+
segmentKey?: Accessor<string>;
|
|
860
|
+
/** Ignored without `data`. */
|
|
861
|
+
valueKey?: Accessor<number | null | undefined>;
|
|
862
|
+
}
|
|
863
|
+
/** Props shared by the hierarchy charts (Data Model §2.23). */
|
|
864
|
+
interface HierarchyChartProps extends CommonChartProps {
|
|
865
|
+
/** Ignored without `data`. */
|
|
866
|
+
idKey?: Accessor<string>;
|
|
867
|
+
/** `null` for the root. Ignored without `data`. */
|
|
868
|
+
parentKey?: Accessor<string | null | undefined>;
|
|
869
|
+
/** Ignored without `data`. */
|
|
870
|
+
labelKey?: Accessor<string | null | undefined>;
|
|
871
|
+
}
|
|
872
|
+
/** `SquarifiedTreemap` (REQ-416): a hierarchy laid out by the squarified algorithm. */
|
|
873
|
+
interface SquarifiedTreemapProps extends HierarchyChartProps {
|
|
874
|
+
/** Read on leaves; an internal node is the sum of its children. Ignored without `data`. */
|
|
875
|
+
valueKey?: Accessor<number | null | undefined>;
|
|
876
|
+
/** Levels drawn below the root; all by default. */
|
|
877
|
+
depth?: number;
|
|
878
|
+
/** The node drawn as root, controlled (REQ-439); the data root by default. */
|
|
879
|
+
rootId?: string | null;
|
|
880
|
+
}
|
|
881
|
+
/** `SunburstChart` (REQ-417): a hierarchy as concentric rings of arcs. */
|
|
882
|
+
interface SunburstChartProps extends HierarchyChartProps {
|
|
883
|
+
/** Read on leaves; an internal node is the sum of its children. Ignored without `data`. */
|
|
884
|
+
valueKey?: Accessor<number | null | undefined>;
|
|
885
|
+
/** Rings drawn below the root; all by default. */
|
|
886
|
+
depth?: number;
|
|
887
|
+
/** The node drawn as root, controlled (REQ-439); the data root by default. */
|
|
888
|
+
rootId?: string | null;
|
|
889
|
+
}
|
|
890
|
+
/** `TreeChart` (REQ-418): a tidy node-link tree. */
|
|
891
|
+
interface TreeChartProps extends HierarchyChartProps {
|
|
892
|
+
/** Ignored without `data`. */
|
|
893
|
+
valueKey?: Accessor<number | null | undefined>;
|
|
894
|
+
orientation?: 'horizontal' | 'vertical';
|
|
895
|
+
}
|
|
896
|
+
/** `ParallelCoordinatesChart` (REQ-419): one axis per dimension, one polyline per row (Data Model §2.20). */
|
|
897
|
+
interface ParallelCoordinatesChartProps extends CommonChartProps {
|
|
898
|
+
/** Ignored without `data`. */
|
|
899
|
+
labelKey?: Accessor<string | null | undefined>;
|
|
900
|
+
/** The dimension columns, in axis order. Ignored without `data`. */
|
|
901
|
+
dimensions: readonly string[];
|
|
902
|
+
/** Axis domains by dimension; derived from the data when omitted (REQ-097). */
|
|
903
|
+
domains?: Readonly<Record<string, readonly [number, number]>>;
|
|
904
|
+
}
|
|
905
|
+
/** `PolarLineChart` (REQ-420): a line over angle × radius (Data Model §2.21). */
|
|
906
|
+
interface PolarLineChartProps extends CommonChartProps {
|
|
907
|
+
/** In the units of `period`. Ignored without `data`. */
|
|
908
|
+
angleKey?: Accessor<number | null | undefined>;
|
|
909
|
+
/** The radius, `≥ 0`. Ignored without `data`. */
|
|
910
|
+
valueKey?: Accessor<number | null | undefined>;
|
|
911
|
+
/** One turn, in the units of the angle; when set, the line closes. Ignored without `data`. */
|
|
912
|
+
period?: number;
|
|
913
|
+
/** Where the angle 0 sits, in degrees clockwise from 12 o'clock; 0 by default. */
|
|
914
|
+
startAngle?: number;
|
|
915
|
+
}
|
|
916
|
+
/** `PolarScatterChart` (REQ-421): points over angle × radius (Data Model §2.21). */
|
|
917
|
+
interface PolarScatterChartProps extends CommonChartProps {
|
|
918
|
+
/** In the units of `period`. Ignored without `data`. */
|
|
919
|
+
angleKey?: Accessor<number | null | undefined>;
|
|
920
|
+
/** The radius, `≥ 0`. Ignored without `data`. */
|
|
921
|
+
radiusKey?: Accessor<number | null | undefined>;
|
|
922
|
+
/** Ignored without `data`. */
|
|
923
|
+
sizeKey?: Accessor<number | null | undefined>;
|
|
924
|
+
/** One turn, in the units of the angle; 360 by default. Ignored without `data`. */
|
|
925
|
+
period?: number;
|
|
926
|
+
}
|
|
927
|
+
/** `DensityBinChart` (REQ-422): x-y points binned in two dimensions (Data Model §2.24). */
|
|
928
|
+
interface DensityBinChartProps extends CommonChartProps {
|
|
929
|
+
/** Ignored without `data`. */
|
|
930
|
+
xKey?: Accessor<number | null | undefined>;
|
|
931
|
+
/** Ignored without `data`. */
|
|
932
|
+
yKey?: Accessor<number | null | undefined>;
|
|
933
|
+
binShape?: 'hexagon' | 'rect';
|
|
934
|
+
/** Bin size in px; 14 by default. */
|
|
935
|
+
binSize?: number;
|
|
936
|
+
}
|
|
937
|
+
/** `ContourChart` (REQ-423): iso-lines and filled bands of a density or a grid (Data Model §2.24). */
|
|
938
|
+
interface ContourChartProps extends CommonChartProps {
|
|
939
|
+
/** `points` estimates a density from a point cloud; `grid` reads a regular grid of values. */
|
|
940
|
+
source?: 'points' | 'grid';
|
|
941
|
+
/** Ignored without `data`. */
|
|
942
|
+
xKey?: Accessor<number | null | undefined>;
|
|
943
|
+
/** Ignored without `data`. */
|
|
944
|
+
yKey?: Accessor<number | null | undefined>;
|
|
945
|
+
/** The grid value (`source: 'grid'`). Ignored without `data`. */
|
|
946
|
+
valueKey?: Accessor<number | null | undefined>;
|
|
947
|
+
/** A count of levels, or the thresholds, increasing: in the grid's values, or as shares of the density's peak. Ignored without `data`. */
|
|
948
|
+
levels?: number | readonly number[];
|
|
949
|
+
/** Fills the bands between levels; `true` by default. */
|
|
950
|
+
filled?: boolean;
|
|
951
|
+
}
|
|
952
|
+
/** `DelaunayChart` (REQ-424): the triangulation of x-y points, or its Voronoi cells (Data Model §2.24). */
|
|
953
|
+
interface DelaunayChartProps extends CommonChartProps {
|
|
954
|
+
/** Ignored without `data`. */
|
|
955
|
+
xKey?: Accessor<number | null | undefined>;
|
|
956
|
+
/** Ignored without `data`. */
|
|
957
|
+
yKey?: Accessor<number | null | undefined>;
|
|
958
|
+
/** Ignored without `data`. */
|
|
959
|
+
labelKey?: Accessor<string | null | undefined>;
|
|
960
|
+
mesh?: 'delaunay' | 'voronoi';
|
|
961
|
+
}
|
|
962
|
+
/** `VectorFieldChart` (REQ-425): an arrow per grid point (Data Model §2.24). */
|
|
963
|
+
interface VectorFieldChartProps extends CommonChartProps {
|
|
964
|
+
/** Ignored without `data`. */
|
|
965
|
+
xKey?: Accessor<number | null | undefined>;
|
|
966
|
+
/** Ignored without `data`. */
|
|
967
|
+
yKey?: Accessor<number | null | undefined>;
|
|
968
|
+
/** Ignored without `data`. */
|
|
969
|
+
uKey?: Accessor<number | null | undefined>;
|
|
970
|
+
/** Ignored without `data`. */
|
|
971
|
+
vKey?: Accessor<number | null | undefined>;
|
|
972
|
+
/** Arrow length per unit of magnitude; fitted to the grid by default. */
|
|
973
|
+
scale?: number;
|
|
974
|
+
}
|
|
975
|
+
/** A node of a `NetworkChart`; with finite `x` and `y` on every node, no layout runs (REQ-436). */
|
|
976
|
+
interface NetworkNode {
|
|
977
|
+
readonly id: string;
|
|
978
|
+
readonly label?: string;
|
|
979
|
+
readonly group?: string;
|
|
980
|
+
readonly x?: number;
|
|
981
|
+
readonly y?: number;
|
|
982
|
+
}
|
|
983
|
+
/** `NetworkChart` (REQ-426): a node-link graph laid out deterministically (Data Model §2.7, §2.24). */
|
|
984
|
+
interface NetworkChartProps extends CommonChartProps {
|
|
985
|
+
/** Ignored without `data`. */
|
|
986
|
+
sourceKey?: Accessor<string>;
|
|
987
|
+
/** Ignored without `data`. */
|
|
988
|
+
targetKey?: Accessor<string>;
|
|
989
|
+
/** 1 by default. Ignored without `data`. */
|
|
990
|
+
valueKey?: Accessor<number | null | undefined>;
|
|
991
|
+
/** The nodes, as data; the distinct ends of the links by default. Ignored without `data`. */
|
|
992
|
+
nodes?: readonly NetworkNode[];
|
|
993
|
+
/** Layout iterations; 300 by default. */
|
|
994
|
+
iterations?: number;
|
|
995
|
+
}
|
|
604
996
|
|
|
605
|
-
export type
|
|
997
|
+
export { type ComposedChartProps as $, type ActiveItem as A, type BoxPlotChartProps as B, type ConnectedScatterChartProps as C, type DumbbellChartProps as D, type EcdfChartProps as E, type PyramidChartProps as F, type Geometry as G, type HistogramChartProps as H, type IntervalChartProps as I, type HeatmapChartProps as J, type TreemapChartProps as K, type LollipopChartProps as L, type MarimekkoChartProps as M, type NetworkChartProps as N, type SankeyChartProps as O, type ParallelCoordinatesChartProps as P, type ActivityGridProps as Q, type RidgelineChartProps as R, type SlopeChartProps as S, type TreeChartProps as T, type StepChartProps as U, type ViolinChartProps as V, type WaffleChartProps as W, type SparklineRowsProps as X, type KpiCardProps as Y, type BarChartProps as Z, type StackedBarChartProps as _, type BeeswarmChartProps as a, type WaterfallChartProps as a0, type FunnelChartProps as a1, type DonutChartProps as a2, type RadarChartProps as a3, type PolarBarChartProps as a4, type CoxcombChartProps as a5, type RadialArcGroupProps as a6, type RadialRingsProps as a7, type GaugeArcProps as a8, type MeterChartProps as a9, type ToneSpec as aA, type UiTokens as aB, type WeightToneSpec as aC, PALETTE_PROPERTIES as aD, nestProvider as aE, paletteStyle as aF, resolvePalette as aG, type WindRoseProps as aa, type ChordRingProps as ab, type OrbitChartProps as ac, type VolvelleChartProps as ad, type CandlestickChartProps as ae, type AreaChartProps as af, type RangeBandChartProps as ag, type StreamChartProps as ah, type ScatterChartProps as ai, type BubbleChartProps as aj, type Accessor as ak, type ChartOrientation as al, type Ground as am, type GroundName as an, type HatchToneSpec as ao, type HitArea as ap, type InkOptions as aq, type LabelKind as ar, type LineCurve as as, type NetworkNode as at, type Palette as au, type StrokePart as av, type StrokeRole as aw, type Tile as ax, type TonalRamp as ay, type ToneLevel as az, type BumpChartProps as b, type ErrorBarChartProps as c, type DivergingBarChartProps as d, type SquarifiedTreemapProps as e, type SunburstChartProps as f, type PolarLineChartProps as g, type PolarScatterChartProps as h, type DensityBinChartProps as i, type ContourChartProps as j, type DelaunayChartProps as k, type VectorFieldChartProps as l, type CommonChartProps as m, type Seed as n, type Stroke as o, type StrokePaint as p, type InkMode as q, type TextLabel as r, type Inker as s, type GroundRef as t, type SubstrateName as u, type ProviderConfig as v, type LineChartProps as w, type Datum as x, type Rect as y, type BulletChartProps as z };
|