basalt-ui 2.22.0 → 2.24.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/CHANGELOG.md +68 -0
- package/MIGRATING.md +400 -12
- package/agent/agents/basalt-design-reviewer.md +3 -3
- package/agent/skills/basalt-design/SKILL.md +2 -2
- package/agent/skills/basalt-design/references/catalogue.md +22 -19
- package/agent/skills/basalt-design/references/states.md +39 -0
- package/dist/charts/BandStrip.d.ts.map +1 -1
- package/dist/charts/BandStrip.js +51 -5
- package/dist/charts/Bars.d.ts.map +1 -1
- package/dist/charts/Bars.js +19 -3
- package/dist/charts/CartesianChart.d.ts +2 -0
- package/dist/charts/CartesianChart.d.ts.map +1 -1
- package/dist/charts/CartesianChart.js +7 -3
- package/dist/charts/ChartCard.d.ts +1 -1
- package/dist/charts/ChartCard.d.ts.map +1 -1
- package/dist/charts/ChartCard.js +25 -15
- package/dist/charts/Sparkline.d.ts +8 -2
- package/dist/charts/Sparkline.d.ts.map +1 -1
- package/dist/charts/Sparkline.js +95 -15
- package/dist/charts/StackedArea.d.ts.map +1 -1
- package/dist/charts/StackedArea.js +5 -1
- package/dist/charts/band-fold.d.ts +22 -4
- package/dist/charts/band-fold.d.ts.map +1 -1
- package/dist/charts/band-fold.js +10 -2
- package/dist/charts/chart-dates.d.ts +12 -0
- package/dist/charts/chart-dates.d.ts.map +1 -0
- package/dist/charts/chart-dates.js +16 -0
- package/dist/charts/chart-legend.module.css +16 -0
- package/dist/charts/compile.d.ts +10 -0
- package/dist/charts/compile.d.ts.map +1 -1
- package/dist/charts/compile.js +77 -24
- package/dist/charts/date-tick-format.d.ts +5 -5
- package/dist/charts/date-tick-format.d.ts.map +1 -1
- package/dist/charts/date-tick-format.js +3 -7
- package/dist/charts/labels.d.ts +7 -3
- package/dist/charts/labels.d.ts.map +1 -1
- package/dist/charts/labels.js +28 -17
- package/dist/charts/legend.d.ts +0 -6
- package/dist/charts/legend.d.ts.map +1 -1
- package/dist/charts/legend.js +87 -35
- package/dist/charts/ref-label.d.ts +17 -0
- package/dist/charts/ref-label.d.ts.map +1 -1
- package/dist/charts/ref-label.js +13 -1
- package/dist/charts/sparkline.module.css +62 -12
- package/dist/charts/sparkline.module.css.d.ts +1 -0
- package/dist/charts/state.d.ts.map +1 -1
- package/dist/charts/state.js +4 -2
- package/dist/charts/types.d.ts +15 -3
- package/dist/charts/types.d.ts.map +1 -1
- package/dist/cli/shot/capture.d.ts.map +1 -1
- package/dist/cli/shot/capture.js +9 -5
- package/dist/cli/shot/detect.js +8 -5
- package/dist/cli/shot/measure.js +19 -23
- package/dist/cli/shot/playwright.d.ts +8 -0
- package/dist/cli/shot/playwright.d.ts.map +1 -1
- package/dist/cli/shot/playwright.js +5 -1
- package/dist/cli/shot/types.d.ts +2 -0
- package/dist/cli/shot/types.d.ts.map +1 -1
- package/dist/cli/tokens-css.d.ts +5 -7
- package/dist/cli/tokens-css.d.ts.map +1 -1
- package/dist/cli/tokens-css.js +11 -12
- package/dist/dashboard/bar-list.d.ts +6 -1
- package/dist/dashboard/bar-list.d.ts.map +1 -1
- package/dist/dashboard/bar-list.js +8 -0
- package/dist/dashboard/bar-list.module.css +18 -0
- package/dist/dashboard/delta-badge.d.ts.map +1 -1
- package/dist/dashboard/delta-badge.js +2 -2
- package/dist/dashboard/empty-state.d.ts.map +1 -1
- package/dist/dashboard/meter-model.d.ts +55 -21
- package/dist/dashboard/meter-model.d.ts.map +1 -1
- package/dist/dashboard/meter-model.js +98 -17
- package/dist/dashboard/meter-parts.d.ts +9 -2
- package/dist/dashboard/meter-parts.d.ts.map +1 -1
- package/dist/dashboard/meter-parts.js +99 -21
- package/dist/dashboard/meter.d.ts +21 -8
- package/dist/dashboard/meter.d.ts.map +1 -1
- package/dist/dashboard/meter.js +14 -3
- package/dist/dashboard/meter.module.css +57 -2
- package/dist/dashboard/meter.module.css.d.ts +5 -0
- package/dist/dashboard/query-state.d.ts +7 -3
- package/dist/dashboard/query-state.d.ts.map +1 -1
- package/dist/dashboard/query-state.js +15 -7
- package/dist/dashboard/section.d.ts +2 -1
- package/dist/dashboard/section.d.ts.map +1 -1
- package/dist/dashboard/section.module.css +12 -0
- package/dist/dashboard/settings-section.d.ts +1 -1
- package/dist/dashboard/settings-section.d.ts.map +1 -1
- package/dist/dashboard/settings-section.js +3 -3
- package/dist/dashboard/stat-card-parts.js +1 -1
- package/dist/dashboard/stat-card.module.css +43 -10
- package/dist/dashboard/stat-group.module.css +15 -0
- package/dist/dashboard/stat-strip.d.ts +16 -5
- package/dist/dashboard/stat-strip.d.ts.map +1 -1
- package/dist/dashboard/stat-strip.js +100 -74
- package/dist/dashboard/stat-strip.module.css +68 -62
- package/dist/dashboard/stat-strip.module.css.d.ts +1 -0
- package/dist/dashboard/widget-header.d.ts.map +1 -1
- package/dist/dashboard/widget-header.js +19 -1
- package/dist/dashboard/widget-header.module.css +6 -0
- package/dist/guard/index.d.ts +2 -2
- package/dist/guard/index.d.ts.map +1 -1
- package/dist/guard/index.js +1 -17
- package/dist/styles.css +18 -11
- package/dist/table/data-table.js +1 -1
- package/dist/theme/controls.module.css +19 -0
- package/dist/theme/controls.module.css.d.ts +1 -0
- package/dist/theme/index.d.ts.map +1 -1
- package/dist/theme/index.js +12 -7
- package/dist/theme/status-verdict.d.ts.map +1 -1
- package/dist/theme/status-verdict.js +9 -1
- package/dist/tokens/palette.d.ts +7 -10
- package/dist/tokens/palette.d.ts.map +1 -1
- package/dist/tokens/palette.js +7 -10
- package/llms.txt +7 -4
- package/package.json +1 -1
- package/src/charts/BandStrip.tsx +55 -5
- package/src/charts/Bars.tsx +31 -3
- package/src/charts/CartesianChart.tsx +9 -3
- package/src/charts/ChartCard.tsx +32 -19
- package/src/charts/Sparkline.tsx +139 -21
- package/src/charts/StackedArea.tsx +12 -1
- package/src/charts/band-fold.ts +25 -6
- package/src/charts/chart-dates.ts +30 -0
- package/src/charts/chart-legend.module.css +16 -0
- package/src/charts/compile.ts +148 -25
- package/src/charts/date-tick-format.ts +10 -13
- package/src/charts/labels.ts +43 -22
- package/src/charts/legend.tsx +70 -3
- package/src/charts/ref-label.ts +27 -0
- package/src/charts/sparkline.module.css +62 -12
- package/src/charts/sparkline.module.css.d.ts +1 -0
- package/src/charts/state.tsx +7 -4
- package/src/charts/types.ts +13 -3
- package/src/cli/shot/capture.ts +15 -3
- package/src/cli/shot/detect.ts +9 -9
- package/src/cli/shot/measure.ts +27 -27
- package/src/cli/shot/playwright.ts +18 -2
- package/src/cli/shot/types.ts +2 -0
- package/src/cli/tokens-css.ts +18 -20
- package/src/dashboard/bar-list.module.css +18 -0
- package/src/dashboard/bar-list.tsx +29 -0
- package/src/dashboard/delta-badge.tsx +6 -2
- package/src/dashboard/empty-state.tsx +4 -2
- package/src/dashboard/meter-model.ts +181 -47
- package/src/dashboard/meter-parts.tsx +187 -30
- package/src/dashboard/meter.module.css +57 -2
- package/src/dashboard/meter.module.css.d.ts +5 -0
- package/src/dashboard/meter.tsx +33 -10
- package/src/dashboard/query-state.tsx +20 -9
- package/src/dashboard/section.module.css +12 -0
- package/src/dashboard/section.tsx +2 -1
- package/src/dashboard/settings-section.tsx +4 -4
- package/src/dashboard/stat-card-parts.tsx +1 -1
- package/src/dashboard/stat-card.module.css +43 -10
- package/src/dashboard/stat-group.module.css +15 -0
- package/src/dashboard/stat-strip.module.css +68 -62
- package/src/dashboard/stat-strip.module.css.d.ts +1 -0
- package/src/dashboard/stat-strip.tsx +118 -59
- package/src/dashboard/widget-header.module.css +6 -0
- package/src/dashboard/widget-header.tsx +28 -1
- package/src/guard/index.ts +3 -19
- package/src/styles.css +18 -11
- package/src/table/data-table.tsx +1 -1
- package/src/theme/__snapshots__/plain-theme.test.ts.snap +14 -8
- package/src/theme/controls.module.css +19 -0
- package/src/theme/controls.module.css.d.ts +1 -0
- package/src/theme/index.ts +12 -7
- package/src/theme/status-verdict.tsx +5 -1
- package/src/tokens/palette.ts +7 -10
|
@@ -8,8 +8,8 @@ export type MeterSegment = {
|
|
|
8
8
|
label: string;
|
|
9
9
|
color?: string;
|
|
10
10
|
/**
|
|
11
|
-
* `'muted'`: the part takes
|
|
12
|
-
*
|
|
11
|
+
* `'muted'`: the part takes the one flat muted fill every muted part shares, a hairline seam
|
|
12
|
+
* between neighbours (never a lightness step). A `color` wins.
|
|
13
13
|
*/
|
|
14
14
|
tone?: 'muted';
|
|
15
15
|
forecast?: boolean;
|
|
@@ -19,8 +19,8 @@ export type MeterZone = {
|
|
|
19
19
|
to: number;
|
|
20
20
|
label: string;
|
|
21
21
|
/**
|
|
22
|
-
* `'muted'`: the band takes
|
|
23
|
-
*
|
|
22
|
+
* `'muted'`: the band takes the one flat muted fill every muted zone shares, a hairline gap
|
|
23
|
+
* between neighbours (never a lightness step): a non-verdict band is not a value bar. A `color` wins.
|
|
24
24
|
*/
|
|
25
25
|
tone?: 'muted';
|
|
26
26
|
/**
|
|
@@ -30,10 +30,14 @@ export type MeterZone = {
|
|
|
30
30
|
short?: string;
|
|
31
31
|
color?: string;
|
|
32
32
|
};
|
|
33
|
-
/**
|
|
33
|
+
/**
|
|
34
|
+
* A mark on the track at `at` (in the reading's units). A `label` is captioned beside it, above the
|
|
35
|
+
* track; a `caption` sits under the track, centred on the mark and clamped inside the track.
|
|
36
|
+
*/
|
|
34
37
|
export type MeterTick = {
|
|
35
38
|
at: number;
|
|
36
39
|
label?: string;
|
|
40
|
+
caption?: string;
|
|
37
41
|
};
|
|
38
42
|
/** A colour of a `stops` gradient at `at` (in the reading's units); the colour is the consumer's. */
|
|
39
43
|
type MeterStop = {
|
|
@@ -46,27 +50,23 @@ export declare const RAMP_ZONE: {
|
|
|
46
50
|
step: number;
|
|
47
51
|
solo: number;
|
|
48
52
|
};
|
|
49
|
-
export declare const RAMP_PART: {
|
|
50
|
-
lo: number;
|
|
51
|
-
step: number;
|
|
52
|
-
solo: number;
|
|
53
|
-
};
|
|
54
53
|
/** Neighbouring steps stay at least this far apart (the contrast the zone ramp always had), up to `RAMP_MAX`. */
|
|
55
54
|
export declare const RAMP_MIN_STEP = 15;
|
|
56
55
|
export declare const RAMP_MAX = 95;
|
|
57
56
|
/**
|
|
58
57
|
* Step `index` of `count`. The spread is floored at `RAMP_MIN_STEP` per step, so a ramp stays
|
|
59
|
-
* distinguishable by lightness up to six zones
|
|
58
|
+
* distinguishable by lightness up to six zones; past that the last steps clamp at
|
|
60
59
|
* `RAMP_MAX` and merge, which is the cue to group parts.
|
|
61
60
|
*/
|
|
62
61
|
export declare function rampStrength(index: number, count: number, ramp: typeof RAMP_ZONE): number;
|
|
63
|
-
/** A zone's fill: its own colour, else
|
|
62
|
+
/** A zone's fill: its own colour, else the one flat muted fill (`tone="muted"`), else its step of the line ramp. */
|
|
64
63
|
export declare function zoneFill(zone: MeterZone, index: number, count: number): string;
|
|
65
64
|
/** One tick on the track: its percent position and what it says (caption `label`, aria `text`). */
|
|
66
65
|
export type TickMark = {
|
|
67
66
|
key: string;
|
|
68
67
|
pct: number;
|
|
69
68
|
label: string | undefined;
|
|
69
|
+
caption: string | undefined;
|
|
70
70
|
text: string;
|
|
71
71
|
};
|
|
72
72
|
/** A fill on the track, as fractions (0–1) of the span, with the segment it was laid out from. */
|
|
@@ -75,6 +75,8 @@ export type Part = {
|
|
|
75
75
|
readonly size: number;
|
|
76
76
|
readonly color: string | undefined;
|
|
77
77
|
readonly forecast: boolean;
|
|
78
|
+
/** A muted part right after another muted part: a hairline seam keeps the shared fill apart. */
|
|
79
|
+
readonly seam: boolean;
|
|
78
80
|
readonly label: string;
|
|
79
81
|
/** The segment's own (normalised) amount, in the reading's units — what its caption states. */
|
|
80
82
|
readonly amount: number;
|
|
@@ -153,7 +155,7 @@ export type RowLabel = {
|
|
|
153
155
|
box: LabelBox;
|
|
154
156
|
span?: LabelBox;
|
|
155
157
|
holding?: boolean;
|
|
156
|
-
/** A tick at the track's start or end: it
|
|
158
|
+
/** A tick at the track's start or end: it keeps its place over every zone name it would touch. */
|
|
157
159
|
end?: boolean;
|
|
158
160
|
short?: LabelBox;
|
|
159
161
|
};
|
|
@@ -168,11 +170,12 @@ export type RowPlacement = {
|
|
|
168
170
|
/**
|
|
169
171
|
* Which labels of the row show, in input order. The holding zone's name claims its place first (it
|
|
170
172
|
* is the reading's verdict, so it never hides for width: it may spill past its span, shifted inside
|
|
171
|
-
* the row); the other ticks go next
|
|
172
|
-
* when it lies inside the row and its own span and
|
|
173
|
-
* name
|
|
174
|
-
*
|
|
175
|
-
*
|
|
173
|
+
* the row); the other ticks go next, then the end ticks (at the track's start or end: a scale's
|
|
174
|
+
* figures); every other zone name then shows only when it lies inside the row and its own span and
|
|
175
|
+
* clears every label already kept, trying its full name, then its `short` box, then hiding. An end
|
|
176
|
+
* figure hides only when it cannot clear the holding name, an interior tick or the other end. A tick
|
|
177
|
+
* keeps at least `gap` px (one gap step of the host's spacing) from every other label; zone names
|
|
178
|
+
* among themselves only must not touch. A hidden name is still named in the described-by text.
|
|
176
179
|
*/
|
|
177
180
|
export declare function placeRowLabels(labels: readonly RowLabel[], rowWidth: number, gap?: number): RowPlacement;
|
|
178
181
|
/** A zone band as left edge + width in percent, clipped to the track. */
|
|
@@ -209,6 +212,8 @@ export type BarModel = {
|
|
|
209
212
|
zoneLabels: readonly ZoneLabel[];
|
|
210
213
|
ticks: readonly TickMark[];
|
|
211
214
|
markerPct: number | undefined;
|
|
215
|
+
/** Percent where the committed fill ends: the reading caption's anchor. Absent on a marked track. */
|
|
216
|
+
fillEndPct: number | undefined;
|
|
212
217
|
targetPct: number | undefined;
|
|
213
218
|
/** The default start caption (the zone is named on the band, so it is the bare reading); `startCaption` decides whether it shows. */
|
|
214
219
|
startText: string;
|
|
@@ -222,19 +227,48 @@ export declare function startCaptionText(model: BarModel, override: ReactNode |
|
|
|
222
227
|
export declare function modelBar(input: BarInput): BarModel;
|
|
223
228
|
/** The ring's one arc, as a fraction of the circumference. */
|
|
224
229
|
export declare const ringFraction: (reading: number, min: number, max: number) => number;
|
|
225
|
-
/**
|
|
230
|
+
/**
|
|
231
|
+
* One caption on the marks row: its natural width and where it is anchored (`pct`), else its edge.
|
|
232
|
+
* `align` is which edge of the caption sits on the mark (default: its centre). `drop` ranks it for
|
|
233
|
+
* dropping when the row is too narrow: the lowest rank goes first, none never drops.
|
|
234
|
+
*/
|
|
226
235
|
export type MarkItem = {
|
|
227
236
|
width: number;
|
|
228
237
|
pct?: number;
|
|
229
238
|
edge?: 'end';
|
|
239
|
+
align?: 'start' | 'center' | 'end';
|
|
240
|
+
drop?: number;
|
|
230
241
|
};
|
|
231
242
|
/**
|
|
232
243
|
* Where each caption of the marks row starts (px, logical start edge), index-aligned with `items`: an
|
|
233
244
|
* anchored caption is centred on its mark and clamped inside the row, the others sit at the start (or,
|
|
234
|
-
* `edge: 'end'`, the end). `
|
|
235
|
-
*
|
|
245
|
+
* `edge: 'end'`, the end). Two captions closer than `gap` are pushed apart, in order, the least that
|
|
246
|
+
* clears them, so a caption stays as near its mark as the row allows. `null` when nothing is anchored,
|
|
247
|
+
* the row is unmeasured, a caption is wider than the row, or the captions cannot all clear each other
|
|
248
|
+
* inside the row: the row then flows and wraps instead.
|
|
236
249
|
*/
|
|
237
250
|
export declare function placeMarkCaptions(items: readonly MarkItem[], rowWidth: number, gap: number): number[] | null;
|
|
251
|
+
/** The furthest a droppable caption may sit from its own mark (Wave 37 r2's "not far"); past it, it drops. */
|
|
252
|
+
export declare const MAX_CAPTION_SHIFT = 24;
|
|
253
|
+
/**
|
|
254
|
+
* `placeMarkCaptions` with dropping: when the captions cannot all clear each other on one line, the
|
|
255
|
+
* droppable ones go one at a time in `drop` rank order (a caption without a rank never goes) until
|
|
256
|
+
* the rest fit. A droppable caption stays while it sits within `MAX_CAPTION_SHIFT` of its mark and
|
|
257
|
+
* moves no undroppable caption (the reading, the target) further than those move with every droppable
|
|
258
|
+
* one dropped: two undroppables that collide on their own are not a reason to drop anything.
|
|
259
|
+
* `starts[i]` is the start of caption `i`, `undefined` when it dropped; `dropped[i]` marks the drop.
|
|
260
|
+
* `null` when even the undroppable ones do not fit, so the row flows instead.
|
|
261
|
+
*/
|
|
262
|
+
export declare function placeCaptionRow(items: readonly MarkItem[], rowWidth: number, gap: number): {
|
|
263
|
+
starts: (number | undefined)[];
|
|
264
|
+
dropped: boolean[];
|
|
265
|
+
} | null;
|
|
266
|
+
/**
|
|
267
|
+
* How many columns the categorical part captions take when they do not fit under their segments:
|
|
268
|
+
* the most columns whose widest-per-column entries fit the row, with no lone entry on the last row
|
|
269
|
+
* (`n % cols === 1`). All in one row when they fit; one column is always valid.
|
|
270
|
+
*/
|
|
271
|
+
export declare function partColumns(widths: readonly number[], rowWidth: number, gap: number): number;
|
|
238
272
|
/**
|
|
239
273
|
* Whether every categorical part's caption fits under its own segment: left-aligned at the part's
|
|
240
274
|
* start and ending before the next part's start (less `gap`) or the row's end. A zero-width part never fits.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"meter-model.d.ts","sourceRoot":"","sources":["../../src/dashboard/meter-model.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAGtC,MAAM,MAAM,YAAY,GAAG;IACzB,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,CAAC,EAAE,MAAM,CAAA;IACd;;;OAGG;IACH,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB,CAAA;AACD,MAAM,MAAM,SAAS,GAAG;IACtB,IAAI,EAAE,MAAM,CAAA;IACZ,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;IACb;;;OAGG;IACH,IAAI,CAAC,EAAE,OAAO,CAAA;IACd;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,KAAK,CAAC,EAAE,MAAM,CAAA;CACf,CAAA;AACD
|
|
1
|
+
{"version":3,"file":"meter-model.d.ts","sourceRoot":"","sources":["../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MAAM,CAAA;CAAE,EAAE,EACrD,QAAQ,EAAE,MAAM,EAChB,GAAG,EAAE,MAAM,GACV,OAAO,CAQT"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { clamp01, toPct } from "./scale.js";
|
|
2
2
|
const RAMP_ZONE = { lo: 15, step: 45, solo: 40 };
|
|
3
|
-
const
|
|
3
|
+
const MUTED_ZONE = 35;
|
|
4
|
+
const MUTED_PART = 65;
|
|
4
5
|
const RAMP_MIN_STEP = 15;
|
|
5
6
|
const RAMP_MAX = 95;
|
|
6
7
|
function rampStrength(index, count, ramp) {
|
|
@@ -10,8 +11,10 @@ function rampStrength(index, count, ramp) {
|
|
|
10
11
|
function rampFill(base, index, count, ramp) {
|
|
11
12
|
return `color-mix(in srgb, var(--vx-${base}) ${rampStrength(index, count, ramp)}%, transparent)`;
|
|
12
13
|
}
|
|
14
|
+
const mutedFill = (pct) => `color-mix(in srgb, var(--vx-muted) ${pct}%, transparent)`;
|
|
13
15
|
function zoneFill(zone, index, count) {
|
|
14
|
-
|
|
16
|
+
if (zone.color !== void 0) return zone.color;
|
|
17
|
+
return zone.tone === "muted" ? mutedFill(MUTED_ZONE) : rampFill("line", index, count, RAMP_ZONE);
|
|
15
18
|
}
|
|
16
19
|
function tickMarks(ticks, min, max, format) {
|
|
17
20
|
const { span } = spanOf(min, max);
|
|
@@ -21,6 +24,7 @@ function tickMarks(ticks, min, max, format) {
|
|
|
21
24
|
key: String(i),
|
|
22
25
|
pct: toPct((t.at - min) / span),
|
|
23
26
|
label: t.label,
|
|
27
|
+
caption: t.caption,
|
|
24
28
|
text: `${t.label ?? "Tick"} ${format(t.at)}`
|
|
25
29
|
}
|
|
26
30
|
] : []
|
|
@@ -61,20 +65,21 @@ function normalizeSegments(segments) {
|
|
|
61
65
|
function layoutSegments(segments, span) {
|
|
62
66
|
let cursor = 0;
|
|
63
67
|
const isMuted = (s) => s.tone === "muted" && s.color === void 0 && !s.forecast;
|
|
64
|
-
|
|
65
|
-
let muted = 0;
|
|
68
|
+
let prevMuted = false;
|
|
66
69
|
return segments.map((s) => {
|
|
67
70
|
const size = Math.max(0, Math.min(clamp01(s.value / span), 1 - cursor));
|
|
68
71
|
const forecast = s.forecast === true;
|
|
69
72
|
const part = {
|
|
70
73
|
start: cursor,
|
|
71
74
|
size,
|
|
72
|
-
color: forecast ? void 0 : isMuted(s) ?
|
|
75
|
+
color: forecast ? void 0 : isMuted(s) ? mutedFill(MUTED_PART) : s.color,
|
|
73
76
|
forecast,
|
|
77
|
+
seam: isMuted(s) && prevMuted,
|
|
74
78
|
label: s.label,
|
|
75
79
|
amount: s.value
|
|
76
80
|
};
|
|
77
81
|
cursor += size;
|
|
82
|
+
prevMuted = isMuted(s);
|
|
78
83
|
return part;
|
|
79
84
|
});
|
|
80
85
|
}
|
|
@@ -88,7 +93,7 @@ function placeRowLabels(labels, rowWidth, gap = 0) {
|
|
|
88
93
|
const short = labels.map(() => false);
|
|
89
94
|
const shift = labels.map(() => 0);
|
|
90
95
|
const kept = [];
|
|
91
|
-
const rank = (l) => l.holding ? 0 : l.
|
|
96
|
+
const rank = (l) => l.holding ? 0 : l.span ? 3 : l.end ? 2 : 1;
|
|
92
97
|
const order = labels.map((_, i) => i).toSorted((a, b) => rank(labels[a]) - rank(labels[b]));
|
|
93
98
|
const clears = (b, tick) => !kept.some(({ box: k, tick: kTick }) => {
|
|
94
99
|
const pad = tick || kTick ? gap : 0;
|
|
@@ -117,6 +122,11 @@ function placeRowLabels(labels, rowWidth, gap = 0) {
|
|
|
117
122
|
short[i] = useShort;
|
|
118
123
|
kept.push({ box, tick });
|
|
119
124
|
}
|
|
125
|
+
if (short.some(Boolean)) {
|
|
126
|
+
for (const [i, label] of labels.entries()) {
|
|
127
|
+
if (shown[i] && !label.holding && label.short !== void 0) short[i] = true;
|
|
128
|
+
}
|
|
129
|
+
}
|
|
120
130
|
return { shown, short, shift };
|
|
121
131
|
}
|
|
122
132
|
function zoneBand(zone, min, span) {
|
|
@@ -198,6 +208,9 @@ function modelBar(input) {
|
|
|
198
208
|
}),
|
|
199
209
|
ticks,
|
|
200
210
|
markerPct: zoned || striped ? toPct((reading - min) / span) : void 0,
|
|
211
|
+
fillEndPct: zoned || striped ? void 0 : toPct(
|
|
212
|
+
parts.filter((p) => !p.forecast).reduce((end, p) => Math.max(end, p.start + p.size), 0)
|
|
213
|
+
),
|
|
201
214
|
targetPct: target === void 0 ? void 0 : toPct((target - min) / span),
|
|
202
215
|
startText: format(reading),
|
|
203
216
|
endText: endCaptionText(reading, target, format),
|
|
@@ -205,19 +218,85 @@ function modelBar(input) {
|
|
|
205
218
|
};
|
|
206
219
|
}
|
|
207
220
|
const ringFraction = (reading, min, max) => clamp01((reading - min) / spanOf(min, max).span);
|
|
221
|
+
function idealLeft(i, rowWidth) {
|
|
222
|
+
if (i.pct === void 0) return i.edge === "end" ? rowWidth - i.width : 0;
|
|
223
|
+
const at = rowWidth * i.pct / 100;
|
|
224
|
+
const left = i.align === "end" ? at - i.width : i.align === "start" ? at : at - i.width / 2;
|
|
225
|
+
return Math.max(0, Math.min(left, rowWidth - i.width));
|
|
226
|
+
}
|
|
208
227
|
function placeMarkCaptions(items, rowWidth, gap) {
|
|
209
228
|
if (rowWidth <= 0 || !items.some((i) => i.pct !== void 0)) return null;
|
|
210
229
|
if (items.some((i) => i.width > rowWidth)) return null;
|
|
211
|
-
const lefts = items.map((i) =>
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
const
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
}
|
|
220
|
-
|
|
230
|
+
const lefts = items.map((i) => idealLeft(i, rowWidth));
|
|
231
|
+
const markAt = (i) => i.pct ?? (i.edge === "end" ? 100 : 0);
|
|
232
|
+
const order = lefts.map((_, i) => i).toSorted((a, b) => markAt(items[a]) - markAt(items[b]) || a - b);
|
|
233
|
+
const widthOf = (i) => items[i]?.width ?? 0;
|
|
234
|
+
for (const [n, i] of order.entries()) {
|
|
235
|
+
const prev = order[n - 1];
|
|
236
|
+
if (prev !== void 0)
|
|
237
|
+
lefts[i] = Math.max(lefts[i] ?? 0, (lefts[prev] ?? 0) + widthOf(prev) + gap);
|
|
238
|
+
}
|
|
239
|
+
for (const [n, i] of order.toReversed().entries()) {
|
|
240
|
+
const next = order.toReversed()[n - 1];
|
|
241
|
+
const limit = next === void 0 ? rowWidth : (lefts[next] ?? 0) - gap;
|
|
242
|
+
lefts[i] = Math.min(lefts[i] ?? 0, limit - widthOf(i));
|
|
243
|
+
}
|
|
244
|
+
const first = order[0];
|
|
245
|
+
return first !== void 0 && (lefts[first] ?? 0) < -LABEL_SUBPIXEL ? null : lefts;
|
|
246
|
+
}
|
|
247
|
+
const MAX_CAPTION_SHIFT = 24;
|
|
248
|
+
function placeCaptionRow(items, rowWidth, gap) {
|
|
249
|
+
const fixed = items.map((_, i) => i).filter((i) => items[i]?.drop === void 0);
|
|
250
|
+
const baseline = placeMarkCaptions(
|
|
251
|
+
fixed.map((i) => items[i]),
|
|
252
|
+
rowWidth,
|
|
253
|
+
gap
|
|
254
|
+
);
|
|
255
|
+
if (baseline === null) return null;
|
|
256
|
+
const allowed = new Map(
|
|
257
|
+
fixed.map((i, n) => [
|
|
258
|
+
i,
|
|
259
|
+
Math.abs((baseline[n] ?? 0) - idealLeft(items[i], rowWidth)) + LABEL_SUBPIXEL
|
|
260
|
+
])
|
|
261
|
+
);
|
|
262
|
+
const dropped = items.map(() => false);
|
|
263
|
+
const order = items.map((item, i) => ({ rank: item.drop, i })).filter((d) => d.rank !== void 0).toSorted((a, b) => a.rank - b.rank);
|
|
264
|
+
for (let step = 0; step <= order.length; step++) {
|
|
265
|
+
const kept = items.map((_, i) => i).filter((i) => !dropped[i]);
|
|
266
|
+
const lefts = placeMarkCaptions(
|
|
267
|
+
kept.map((i) => items[i]),
|
|
268
|
+
rowWidth,
|
|
269
|
+
gap
|
|
270
|
+
);
|
|
271
|
+
const settled = lefts !== null && (step === order.length || kept.every((i, n) => {
|
|
272
|
+
const item = items[i];
|
|
273
|
+
const moved = Math.abs((lefts[n] ?? 0) - idealLeft(item, rowWidth));
|
|
274
|
+
if (item.drop === void 0) return moved <= (allowed.get(i) ?? 0);
|
|
275
|
+
return item.pct === void 0 || moved <= MAX_CAPTION_SHIFT;
|
|
276
|
+
}));
|
|
277
|
+
if (lefts !== null && settled) {
|
|
278
|
+
const starts = items.map(() => void 0);
|
|
279
|
+
for (const [n, i] of kept.entries()) starts[i] = lefts[n];
|
|
280
|
+
return { starts, dropped };
|
|
281
|
+
}
|
|
282
|
+
const next = order[step];
|
|
283
|
+
if (next === void 0) return null;
|
|
284
|
+
dropped[next.i] = true;
|
|
285
|
+
}
|
|
286
|
+
return null;
|
|
287
|
+
}
|
|
288
|
+
function partColumns(widths, rowWidth, gap) {
|
|
289
|
+
const n = widths.length;
|
|
290
|
+
for (let cols = n; cols > 1; cols--) {
|
|
291
|
+
if (n > cols && n % cols === 1) continue;
|
|
292
|
+
const widest = Array.from(
|
|
293
|
+
{ length: cols },
|
|
294
|
+
(_, c) => Math.max(0, ...widths.filter((_w, i) => i % cols === c))
|
|
295
|
+
);
|
|
296
|
+
const total = widest.reduce((a, b) => a + b, 0) + gap * (cols - 1);
|
|
297
|
+
if (total <= rowWidth + LABEL_SUBPIXEL) return cols;
|
|
298
|
+
}
|
|
299
|
+
return 1;
|
|
221
300
|
}
|
|
222
301
|
function partsFitUnder(parts, rowWidth, gap) {
|
|
223
302
|
if (rowWidth <= 0) return false;
|
|
@@ -230,9 +309,9 @@ function partsFitUnder(parts, rowWidth, gap) {
|
|
|
230
309
|
}
|
|
231
310
|
export {
|
|
232
311
|
LABEL_SUBPIXEL,
|
|
312
|
+
MAX_CAPTION_SHIFT,
|
|
233
313
|
RAMP_MAX,
|
|
234
314
|
RAMP_MIN_STEP,
|
|
235
|
-
RAMP_PART,
|
|
236
315
|
RAMP_ZONE,
|
|
237
316
|
ariaValues,
|
|
238
317
|
findHoldingZone,
|
|
@@ -240,7 +319,9 @@ export {
|
|
|
240
319
|
layoutSegments,
|
|
241
320
|
modelBar,
|
|
242
321
|
normalizeSegments,
|
|
322
|
+
partColumns,
|
|
243
323
|
partsFitUnder,
|
|
324
|
+
placeCaptionRow,
|
|
244
325
|
placeMarkCaptions,
|
|
245
326
|
placeRowLabels,
|
|
246
327
|
rampStrength,
|
|
@@ -6,15 +6,21 @@ export type Shell = {
|
|
|
6
6
|
/** `size="row"`: one text line tall, no caption rows. */
|
|
7
7
|
row: boolean;
|
|
8
8
|
};
|
|
9
|
-
|
|
9
|
+
/**
|
|
10
|
+
* The loaded Meter's footprint at its loaded height: a zoned track keeps the figure row above and the
|
|
11
|
+
* zone-name row below, a plain bar the caption row below, so the card does not jump when data lands.
|
|
12
|
+
*/
|
|
13
|
+
export declare function MeterLoading({ label, ring, zoned, shell, }: {
|
|
10
14
|
label: string;
|
|
11
15
|
ring: boolean;
|
|
16
|
+
zoned: boolean;
|
|
12
17
|
shell: Shell;
|
|
13
18
|
}): import("react").JSX.Element;
|
|
14
19
|
export declare function MeterEmpty(props: {
|
|
15
20
|
label: string;
|
|
16
|
-
text: string;
|
|
21
|
+
text: string | undefined;
|
|
17
22
|
ring: boolean;
|
|
23
|
+
zoned: boolean;
|
|
18
24
|
shell: Shell;
|
|
19
25
|
}): import("react").JSX.Element;
|
|
20
26
|
export declare function MeterRing(props: {
|
|
@@ -49,6 +55,7 @@ export declare function MeterBar(props: {
|
|
|
49
55
|
forecastCaption: string | undefined;
|
|
50
56
|
startCaption: ReactNode;
|
|
51
57
|
endCaption: ReactNode;
|
|
58
|
+
readingAt: 'fill' | 'start' | undefined;
|
|
52
59
|
shell: Shell;
|
|
53
60
|
}): import("react").JSX.Element;
|
|
54
61
|
//# sourceMappingURL=meter-parts.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"meter-parts.d.ts","sourceRoot":"","sources":["../../src/dashboard/meter-parts.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EA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