@hjmds/design-contracts 1.20.0 → 1.21.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.
Files changed (130) hide show
  1. package/dist/authoring-tools.d.ts +38 -0
  2. package/dist/authoring-tools.d.ts.map +1 -0
  3. package/dist/authoring-tools.js +35 -0
  4. package/dist/authoring-tools.js.map +1 -0
  5. package/dist/behaviors.d.ts +33 -3
  6. package/dist/behaviors.d.ts.map +1 -1
  7. package/dist/behaviors.js +2 -0
  8. package/dist/behaviors.js.map +1 -1
  9. package/dist/calendar.d.ts +9 -1
  10. package/dist/calendar.d.ts.map +1 -1
  11. package/dist/calendar.js +4 -2
  12. package/dist/calendar.js.map +1 -1
  13. package/dist/catalog.d.ts +129 -2
  14. package/dist/catalog.d.ts.map +1 -1
  15. package/dist/catalog.js +6 -2
  16. package/dist/catalog.js.map +1 -1
  17. package/dist/chart.d.ts +398 -0
  18. package/dist/chart.d.ts.map +1 -0
  19. package/dist/chart.js +414 -0
  20. package/dist/chart.js.map +1 -0
  21. package/dist/collection-editing.d.ts +38 -0
  22. package/dist/collection-editing.d.ts.map +1 -0
  23. package/dist/collection-editing.js +53 -0
  24. package/dist/collection-editing.js.map +1 -0
  25. package/dist/communication.d.ts +29 -0
  26. package/dist/communication.d.ts.map +1 -0
  27. package/dist/communication.js +11 -0
  28. package/dist/communication.js.map +1 -0
  29. package/dist/component-definitions.d.ts +1 -0
  30. package/dist/component-definitions.d.ts.map +1 -1
  31. package/dist/component-definitions.js +1 -0
  32. package/dist/component-definitions.js.map +1 -1
  33. package/dist/data-table.d.ts +229 -5
  34. package/dist/data-table.d.ts.map +1 -1
  35. package/dist/data-table.js +242 -6
  36. package/dist/data-table.js.map +1 -1
  37. package/dist/data-workflows.d.ts +70 -0
  38. package/dist/data-workflows.d.ts.map +1 -0
  39. package/dist/data-workflows.js +109 -0
  40. package/dist/data-workflows.js.map +1 -0
  41. package/dist/dataviz.d.ts +7 -6
  42. package/dist/dataviz.d.ts.map +1 -1
  43. package/dist/dataviz.js +7 -6
  44. package/dist/dataviz.js.map +1 -1
  45. package/dist/gooey-navigation.d.ts +7 -0
  46. package/dist/gooey-navigation.d.ts.map +1 -1
  47. package/dist/gooey-navigation.js +10 -0
  48. package/dist/gooey-navigation.js.map +1 -1
  49. package/dist/index.d.ts +1 -0
  50. package/dist/index.d.ts.map +1 -1
  51. package/dist/index.js +1 -0
  52. package/dist/index.js.map +1 -1
  53. package/dist/media-transport.d.ts +16 -0
  54. package/dist/media-transport.d.ts.map +1 -0
  55. package/dist/media-transport.js +17 -0
  56. package/dist/media-transport.js.map +1 -0
  57. package/dist/recipes.d.ts +1 -0
  58. package/dist/recipes.d.ts.map +1 -1
  59. package/dist/recipes.js +1 -0
  60. package/dist/recipes.js.map +1 -1
  61. package/dist/showcase.d.ts.map +1 -1
  62. package/dist/showcase.js +3 -1
  63. package/dist/showcase.js.map +1 -1
  64. package/dist/social-compositions.d.ts +19 -0
  65. package/dist/social-compositions.d.ts.map +1 -0
  66. package/dist/social-compositions.js +33 -0
  67. package/dist/social-compositions.js.map +1 -0
  68. package/dist/streaming-answer.d.ts +18 -0
  69. package/dist/streaming-answer.d.ts.map +1 -0
  70. package/dist/streaming-answer.js +61 -0
  71. package/dist/streaming-answer.js.map +1 -0
  72. package/dist/task-controls.d.ts +31 -0
  73. package/dist/task-controls.d.ts.map +1 -0
  74. package/dist/task-controls.js +25 -0
  75. package/dist/task-controls.js.map +1 -0
  76. package/dist/toggle-feedback.d.ts +22 -0
  77. package/dist/toggle-feedback.d.ts.map +1 -0
  78. package/dist/toggle-feedback.js +32 -0
  79. package/dist/toggle-feedback.js.map +1 -0
  80. package/dist/transfer-task.d.ts +13 -0
  81. package/dist/transfer-task.d.ts.map +1 -0
  82. package/dist/transfer-task.js +13 -0
  83. package/dist/transfer-task.js.map +1 -0
  84. package/dist/version.d.ts +1 -1
  85. package/dist/version.js +1 -1
  86. package/dist/version.js.map +1 -1
  87. package/docs/authoring-tools.md +31 -0
  88. package/docs/calendar.md +3 -1
  89. package/docs/catalog-freeze.json +5 -0
  90. package/docs/chart.md +206 -0
  91. package/docs/collection-editing.md +83 -0
  92. package/docs/communication.md +35 -0
  93. package/docs/data-table.md +56 -6
  94. package/docs/data-workflows.md +26 -0
  95. package/docs/generated/component-maturity.md +6 -5
  96. package/docs/generated/renderer-evidence.json +95 -5
  97. package/docs/generated/renderer-evidence.md +6 -3
  98. package/docs/generated/showcase-manifest.json +66 -3
  99. package/docs/gooey-navigation.md +20 -0
  100. package/docs/library-gap-analysis.md +4 -2
  101. package/docs/media-transport.md +37 -0
  102. package/docs/social-compositions.md +51 -0
  103. package/docs/streaming-answer.md +57 -0
  104. package/docs/task-controls.md +38 -0
  105. package/docs/toggle-feedback.md +56 -0
  106. package/docs/transfer-task.md +33 -0
  107. package/docs/usage/README.md +15 -4
  108. package/docs/usage/components/activity-chip.md +2 -2
  109. package/docs/usage/components/button.md +39 -0
  110. package/docs/usage/components/calendar.md +4 -2
  111. package/docs/usage/components/chart.md +277 -0
  112. package/docs/usage/components/data-table.md +92 -18
  113. package/docs/usage/components/screen-layout.md +3 -1
  114. package/docs/usage/components/tabs.md +25 -0
  115. package/docs/usage/components/toast.md +1 -1
  116. package/docs/usage/compositions/action-feedback.md +18 -2
  117. package/docs/usage/compositions/activity-status.md +2 -2
  118. package/docs/usage/compositions/authoring-tools.md +90 -0
  119. package/docs/usage/compositions/collection-editing.md +110 -0
  120. package/docs/usage/compositions/communication.md +100 -0
  121. package/docs/usage/compositions/data-workflows.md +91 -0
  122. package/docs/usage/compositions/media-transport.md +87 -0
  123. package/docs/usage/compositions/social-compositions.md +91 -0
  124. package/docs/usage/compositions/streaming-answer.md +97 -0
  125. package/docs/usage/compositions/task-controls.md +93 -0
  126. package/docs/usage/compositions/toggle-feedback.md +84 -0
  127. package/docs/usage/compositions/transfer-task.md +86 -0
  128. package/docs/usage/compositions/web-additions.md +2 -2
  129. package/docs/usage/screens/common-shell.md +4 -0
  130. package/package.json +67 -1
@@ -0,0 +1,398 @@
1
+ /**
2
+ * Chart geometry contract (2026-10-14, user request: "absorb the well-known chart libraries into our
3
+ * system"). Until 1.20 HJM only shipped dataviz *tokens* and delegated drawing to product libraries
4
+ * (see docs/chart.md for the earlier decision). Products then rebuilt the same scrubbing line chart,
5
+ * bars, and stat tables separately (Yajalal's StockChart/RecordTable), so drawing moves into HJM.
6
+ *
7
+ * Everything here is renderer-neutral math: both the Web (SVG DOM) and Native (react-native-svg)
8
+ * renderers receive the same coordinates, paths and accessibility summaries and only paint them.
9
+ * The public shapes were studied from — not copied from — these MIT/ISC libraries:
10
+ * - react-native-wagmi-charts: line + cursor crosshair, price/datetime text driven by the focused index
11
+ * - victory-native (XL): CartesianChart x/y keys, chart press state, rounded bars, domain padding
12
+ * - react-native-gifted-charts: bar/line/pie/radar props (focus on press, stacked bars, donut center)
13
+ * - Recharts: series/category data model, stacking, nice ticks, radar polar grid
14
+ * - d3-shape / d3-scale: monotone-X cubic curve (Fritsch–Carlson) and "nice" tick steps (algorithms
15
+ * re-derived here; no source is vendored)
16
+ */
17
+ export type ChartValue = number | null;
18
+ export type ChartSeries = Readonly<{
19
+ id: string;
20
+ /** Visible legend text and the series' accessible name. Product-localized. */
21
+ label: string;
22
+ /** One value per category; `null` is a missing observation (drawn as a gap, never as zero). */
23
+ values: readonly ChartValue[];
24
+ /** Product-owned series color; renderers fall back to the dataviz series palette by index. */
25
+ color?: string;
26
+ }>;
27
+ export type ChartInsets = Readonly<{
28
+ top: number;
29
+ right: number;
30
+ bottom: number;
31
+ left: number;
32
+ }>;
33
+ export type ChartCurve = "linear" | "monotone" | "step";
34
+ export type ChartOrientation = "vertical" | "horizontal";
35
+ export type ChartBarLayout = "grouped" | "stacked";
36
+ export type ChartPlot = Readonly<{
37
+ index: number;
38
+ seriesIndex: number;
39
+ x: number;
40
+ y: number;
41
+ value: number;
42
+ }>;
43
+ export declare const chartRecipe: {
44
+ readonly heights: {
45
+ readonly sparkline: 28;
46
+ readonly compact: 128;
47
+ readonly regular: 180;
48
+ readonly tall: 240;
49
+ };
50
+ readonly insets: {
51
+ readonly plot: {
52
+ readonly top: 20;
53
+ readonly right: 8;
54
+ readonly bottom: 8;
55
+ readonly left: 8;
56
+ };
57
+ readonly axis: {
58
+ readonly top: 16;
59
+ readonly right: 8;
60
+ readonly bottom: 20;
61
+ readonly left: 36;
62
+ };
63
+ };
64
+ readonly line: {
65
+ readonly strokeWidth: 2.4;
66
+ readonly pointRadius: 4.5;
67
+ readonly focusHaloRadius: 9;
68
+ readonly focusHaloOpacity: 0.25;
69
+ };
70
+ readonly area: {
71
+ readonly topOpacity: 0.32;
72
+ readonly bottomOpacity: 0;
73
+ };
74
+ readonly bar: {
75
+ readonly radius: number;
76
+ readonly maxWidth: 28;
77
+ readonly bandPadding: 0.36;
78
+ readonly groupGap: 2;
79
+ readonly restOpacity: 0.4;
80
+ };
81
+ readonly pie: {
82
+ readonly donutRatio: 0.62;
83
+ readonly padAngle: 0.012;
84
+ readonly minLabelPercent: 4;
85
+ };
86
+ readonly radar: {
87
+ readonly levels: 4;
88
+ readonly strokeWidth: 2;
89
+ readonly fillOpacity: 0.22;
90
+ readonly labelOffset: 12;
91
+ };
92
+ readonly scatter: {
93
+ readonly radius: 5;
94
+ readonly focusRadius: 8;
95
+ };
96
+ readonly sparkline: {
97
+ readonly width: 72;
98
+ readonly height: 28;
99
+ readonly strokeWidth: 1.8;
100
+ readonly padding: 2;
101
+ };
102
+ readonly cursor: {
103
+ readonly strokeWidth: 1;
104
+ readonly dash: readonly [2, 3];
105
+ };
106
+ readonly reference: {
107
+ readonly dash: readonly [2, 4];
108
+ };
109
+ readonly chrome: {
110
+ readonly axisLine: Readonly<{
111
+ source: "theme";
112
+ key: "border";
113
+ alpha?: number;
114
+ }>;
115
+ readonly axisLabel: Readonly<{
116
+ source: "theme";
117
+ key: "textMuted";
118
+ alpha?: number;
119
+ }>;
120
+ readonly gridLine: Readonly<{
121
+ source: "theme";
122
+ key: "border";
123
+ alpha?: number;
124
+ }>;
125
+ readonly legendLabel: Readonly<{
126
+ source: "theme";
127
+ key: "textBody";
128
+ alpha?: number;
129
+ }>;
130
+ readonly tooltipSurface: Readonly<{
131
+ source: "theme";
132
+ key: "surface";
133
+ alpha?: number;
134
+ }>;
135
+ readonly tooltipBorder: Readonly<{
136
+ source: "theme";
137
+ key: "border";
138
+ alpha?: number;
139
+ }>;
140
+ readonly tooltipContent: Readonly<{
141
+ source: "theme";
142
+ key: "textBody";
143
+ alpha?: number;
144
+ }>;
145
+ readonly lineWidth: 1;
146
+ readonly gridWidth: 1;
147
+ readonly labelVariant: "caption";
148
+ readonly legendVariant: "label";
149
+ };
150
+ };
151
+ export declare function validateChartSeries(categories: readonly string[], series: readonly ChartSeries[]): void;
152
+ export declare const isChartNumber: (value: ChartValue | undefined) => value is number;
153
+ /** "Nice" step (1, 2, 2.5, 5 × 10^n) so axis labels read like 0/25/50 rather than 0/23.7/47.4. */
154
+ export declare function niceStep(span: number, count: number): number;
155
+ export declare function niceTicks(min: number, max: number, count?: number): number[];
156
+ export type ChartDomainOptions = Readonly<{
157
+ domain?: readonly [number, number] | undefined;
158
+ includeZero?: boolean | undefined;
159
+ nice?: boolean | undefined;
160
+ padding?: number | undefined;
161
+ }>;
162
+ /**
163
+ * Value domain. Lines zoom to the observed range (stock charts) unless `includeZero`; bars always
164
+ * include zero so heights compare honestly. `padding` widens a flat series so it is not drawn on an edge.
165
+ */
166
+ export declare function resolveChartDomain(values: readonly ChartValue[], { domain, includeZero, nice, padding }?: ChartDomainOptions): readonly [number, number];
167
+ /** Linear scale from value domain to pixel range; `invert` puts the minimum at the top (ranks, ERA). */
168
+ export declare function scaleLinear(domain: readonly [number, number], range: readonly [number, number], invert?: boolean): (value: number) => number;
169
+ export type ChartBand = Readonly<{
170
+ step: number;
171
+ bandwidth: number;
172
+ start(index: number): number;
173
+ center(index: number): number;
174
+ }>;
175
+ export declare function scaleBand(count: number, range: readonly [number, number], padding?: number): ChartBand;
176
+ /** Evenly spaced x positions for line/area categories (first and last on the plot edges). */
177
+ export declare function pointPositions(count: number, range: readonly [number, number]): number[];
178
+ type XY = Readonly<{
179
+ x: number;
180
+ y: number;
181
+ }>;
182
+ export declare function linePath(points: readonly XY[], curve?: ChartCurve): string;
183
+ /** Closed area under a line down to `floor` (or between two edges for stacked areas via `lower`). */
184
+ export declare function areaPath(points: readonly XY[], floor: number, curve?: ChartCurve, lower?: readonly XY[]): string;
185
+ /** Splits a series at missing values: a skipped month is a gap, never an interpolated trend. */
186
+ export declare function splitSegments<T extends {
187
+ value: number;
188
+ } | null>(plots: readonly T[]): Exclude<T, null>[][];
189
+ export type LineGeometryInput = Readonly<{
190
+ categories: readonly string[];
191
+ series: readonly ChartSeries[];
192
+ width: number;
193
+ height: number;
194
+ insets?: ChartInsets;
195
+ invert?: boolean;
196
+ stacked?: boolean;
197
+ } & ChartDomainOptions>;
198
+ export type LineGeometry = Readonly<{
199
+ plot: Readonly<{
200
+ left: number;
201
+ right: number;
202
+ top: number;
203
+ bottom: number;
204
+ }>;
205
+ domain: readonly [number, number];
206
+ ticks: readonly number[];
207
+ xs: readonly number[];
208
+ y(value: number): number;
209
+ /** Per series, per category: the plotted point or null for a gap. */
210
+ plots: readonly (readonly (ChartPlot | null)[])[];
211
+ /** Stacked areas: the lower edge per series (previous cumulative). */
212
+ lower: readonly (readonly (ChartPlot | null)[])[] | null;
213
+ }>;
214
+ export declare function resolveLineGeometry({ categories, series, width, height, insets, invert, stacked, ...domainOptions }: LineGeometryInput): LineGeometry;
215
+ /** Cumulative [lower, upper] per series per category; missing values do not add to the stack. */
216
+ export declare function stackValues(series: readonly ChartSeries[]): (readonly [number, number] | null)[][];
217
+ export type ChartBar = Readonly<{
218
+ index: number;
219
+ seriesIndex: number;
220
+ value: number;
221
+ x: number;
222
+ y: number;
223
+ width: number;
224
+ height: number;
225
+ }>;
226
+ export type BarGeometryInput = Readonly<{
227
+ categories: readonly string[];
228
+ series: readonly ChartSeries[];
229
+ width: number;
230
+ height: number;
231
+ insets?: ChartInsets;
232
+ orientation?: ChartOrientation;
233
+ layout?: ChartBarLayout;
234
+ } & ChartDomainOptions>;
235
+ export type BarGeometry = Readonly<{
236
+ plot: Readonly<{
237
+ left: number;
238
+ right: number;
239
+ top: number;
240
+ bottom: number;
241
+ }>;
242
+ domain: readonly [number, number];
243
+ ticks: readonly number[];
244
+ bars: readonly ChartBar[];
245
+ /** Category band centers along the category axis (x for vertical, y for horizontal). */
246
+ centers: readonly number[];
247
+ value(value: number): number;
248
+ }>;
249
+ export declare function resolveBarGeometry({ categories, series, width, height, insets, orientation, layout, ...domainOptions }: BarGeometryInput): BarGeometry;
250
+ export type PieSlice = Readonly<{
251
+ index: number;
252
+ value: number;
253
+ percent: number;
254
+ startAngle: number;
255
+ endAngle: number;
256
+ path: string;
257
+ centroid: XY;
258
+ }>;
259
+ /** Annular sector from 12 o'clock clockwise. `innerRadius` 0 draws a pie wedge. */
260
+ export declare function arcPath(cx: number, cy: number, outerRadius: number, innerRadius: number, startAngle: number, endAngle: number): string;
261
+ /** Negative and missing values are excluded: a share of a whole cannot be negative. */
262
+ export declare function resolvePieGeometry(values: readonly ChartValue[], { cx, cy, radius: outer, innerRadius, padAngle }: Readonly<{
263
+ cx: number;
264
+ cy: number;
265
+ radius: number;
266
+ innerRadius?: number;
267
+ padAngle?: number;
268
+ }>): PieSlice[];
269
+ export type RadarAxis = Readonly<{
270
+ index: number;
271
+ label: string;
272
+ angle: number;
273
+ end: XY;
274
+ labelAt: XY;
275
+ anchor: "start" | "middle" | "end";
276
+ }>;
277
+ export type RadarGeometry = Readonly<{
278
+ axes: readonly RadarAxis[];
279
+ rings: readonly string[];
280
+ polygons: readonly Readonly<{
281
+ seriesIndex: number;
282
+ path: string;
283
+ points: readonly (XY & {
284
+ index: number;
285
+ value: number | null;
286
+ })[];
287
+ }>[];
288
+ }>;
289
+ /**
290
+ * Radar (spider) chart. All axes share one domain (0..max by default) because the products'
291
+ * ratings are on one 0–100 scale; per-axis scales would make the polygon area meaningless.
292
+ */
293
+ export declare function resolveRadarGeometry({ categories, series, cx, cy, radius: outer, domain, levels, labelOffset }: Readonly<{
294
+ categories: readonly string[];
295
+ series: readonly ChartSeries[];
296
+ cx: number;
297
+ cy: number;
298
+ radius: number;
299
+ domain?: readonly [number, number];
300
+ levels?: number;
301
+ labelOffset?: number;
302
+ }>): RadarGeometry;
303
+ export type ScatterDatum = Readonly<{
304
+ id: string;
305
+ label: string;
306
+ x: number;
307
+ y: number;
308
+ seriesIndex?: number;
309
+ }>;
310
+ export type ScatterGeometry = Readonly<{
311
+ plot: Readonly<{
312
+ left: number;
313
+ right: number;
314
+ top: number;
315
+ bottom: number;
316
+ }>;
317
+ xDomain: readonly [number, number];
318
+ yDomain: readonly [number, number];
319
+ xTicks: readonly number[];
320
+ yTicks: readonly number[];
321
+ points: readonly (ScatterDatum & {
322
+ px: number;
323
+ py: number;
324
+ })[];
325
+ }>;
326
+ export declare function resolveScatterGeometry({ points, width, height, insets, xDomain, yDomain }: Readonly<{
327
+ points: readonly ScatterDatum[];
328
+ width: number;
329
+ height: number;
330
+ insets?: ChartInsets;
331
+ xDomain?: readonly [number, number];
332
+ yDomain?: readonly [number, number];
333
+ }>): ScatterGeometry;
334
+ /** Category index whose x is closest to a pointer x, among categories that have any value. */
335
+ export declare function nearestChartIndex(xs: readonly number[], x: number, available?: readonly number[]): number | null;
336
+ export declare function nearestScatterPoint(points: readonly Readonly<{
337
+ px: number;
338
+ py: number;
339
+ }>[], x: number, y: number, maxDistance?: number): number | null;
340
+ /** Adjustable-role step (VoiceOver swipe, arrow keys) over observed indices only. */
341
+ export declare function stepChartIndex(available: readonly number[], current: number | null, direction: 1 | -1): number | null;
342
+ export declare function observedIndices(series: readonly ChartSeries[]): number[];
343
+ /** Index of the highest and lowest observation of one series (stock-chart high/low markers). */
344
+ export declare function seriesExtremes(values: readonly ChartValue[]): Readonly<{
345
+ max: number;
346
+ min: number;
347
+ }> | null;
348
+ /**
349
+ * Text alternative for an image-like chart: every category's values in order, product-formatted.
350
+ * Products pass localized `format`; HJM never formats numbers into a language itself.
351
+ */
352
+ export declare function describeChart(categories: readonly string[], series: readonly ChartSeries[], format: (value: number) => string, missing: string): string;
353
+ export declare const chartBehavior: {
354
+ readonly controlled: readonly ["focusIndex"];
355
+ readonly inputs: readonly ["categories", "series", "kind", "orientation", "layout", "domain", "invert", "curve"];
356
+ readonly events: readonly ["onFocusChange"];
357
+ readonly configuration: {
358
+ readonly curve: readonly ["linear", "monotone", "step"];
359
+ readonly orientation: readonly ["vertical", "horizontal"];
360
+ readonly layout: readonly ["grouped", "stacked"];
361
+ };
362
+ readonly defaults: {
363
+ readonly curve: "linear";
364
+ readonly orientation: "vertical";
365
+ readonly layout: "grouped";
366
+ };
367
+ readonly stateAxes: {
368
+ readonly value: readonly ["focused", "scrubbing"];
369
+ readonly content: readonly ["idle", "empty"];
370
+ };
371
+ readonly web: {
372
+ readonly roles: readonly ["img", "slider"];
373
+ readonly keyboard: readonly ["ArrowLeft", "ArrowRight", "Home", "End"];
374
+ readonly focus: "native";
375
+ };
376
+ readonly native: {
377
+ readonly roles: readonly ["adjustable", "image"];
378
+ readonly states: readonly [];
379
+ readonly actions: readonly ["increment", "decrement"];
380
+ };
381
+ readonly scenarios: readonly ["missing-values-split-the-line-instead-of-drawing-zero", "bars-and-stacks-always-include-a-zero-baseline", "inverted-scale-puts-the-best-rank-on-top", "scrubbing-reports-the-focused-index-and-releasing-restores-the-latest", "the-focused-point-is-reachable-without-a-drag-via-adjustable-or-arrow-keys", "series-colors-come-from-the-product-or-the-dataviz-palette-never-status-colors", "every-chart-exposes-a-product-formatted-text-alternative", "radar-axes-share-one-domain", "pie-slices-ignore-negative-and-missing-values"];
382
+ };
383
+ /** Excluding a slice changes the denominator; selecting one only emphasizes it (Lucian 097). */
384
+ export declare function resolvePieVisibility(data: readonly Readonly<{
385
+ id: string;
386
+ value: number | null;
387
+ }>[], excludedIds?: readonly string[]): {
388
+ values: (number | null)[];
389
+ total: number;
390
+ includedCount: number;
391
+ observedCount: number;
392
+ };
393
+ export type PieVisibilitySummary = ReturnType<typeof resolvePieVisibility>;
394
+ /** Match both actual polyline vertices before period morphing. Union knots preserve
395
+ * every observation for linear paths; work is bounded by the caller for large data. */
396
+ export declare function prepareChartLineMorph(from: readonly XY[], to: readonly XY[]): ((progress: number) => XY[]) | null;
397
+ export {};
398
+ //# sourceMappingURL=chart.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chart.d.ts","sourceRoot":"","sources":["../src/chart.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;GAeG;AAEH,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,IAAI,CAAC;AAEvC,MAAM,MAAM,WAAW,GAAG,QAAQ,CAAC;IACjC,EAAE,EAAE,MAAM,CAAC;IACX,8EAA8E;IAC9E,KAAK,EAAE,MAAM,CAAC;IACd,+FAA+F;IAC/F,MAAM,EAAE,SAAS,UAAU,EAAE,CAAC;IAC9B,8FAA8F;IAC9F,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC,CAAC;AAEH,MAAM,MAAM,WAAW,GAAG,QAAQ,CAAC;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC,CAAC;AACjG,MAAM,MAAM,UAAU,GAAG,QAAQ,GAAG,UAAU,GAAG,MAAM,CAAC;AACxD,MAAM,MAAM,gBAAgB,GAAG,UAAU,GAAG,YAAY,CAAC;AACzD,MAAM,MAAM,cAAc,GAAG,SAAS,GAAG,SAAS,CAAC;AAEnD,MAAM,MAAM,SAAS,GAAG,QAAQ,CAAC;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,C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