basalt-ui 2.25.0 → 2.27.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 +57 -0
- package/MIGRATING.md +227 -19
- package/configs/oxlint-basalt.json +1 -1
- package/configs/oxlint-plugin.js +3 -9
- package/configs/oxlint-plugin.test.ts +6 -0
- package/dist/charts/Bars.d.ts.map +1 -1
- package/dist/charts/Bars.js +37 -1
- package/dist/charts/ChartCard.d.ts +13 -5
- package/dist/charts/ChartCard.d.ts.map +1 -1
- package/dist/charts/ChartCard.js +12 -2
- package/dist/charts/Sparkline.d.ts.map +1 -1
- package/dist/charts/Sparkline.js +106 -10
- package/dist/charts/chart-box.module.css +123 -5
- package/dist/charts/chart-box.module.css.d.ts +3 -0
- package/dist/charts/chart-card.module.css +34 -0
- package/dist/charts/chart-card.module.css.d.ts +2 -0
- package/dist/charts/chart-legend.module.css +1 -16
- package/dist/charts/compile.d.ts +20 -0
- package/dist/charts/compile.d.ts.map +1 -1
- package/dist/charts/compile.js +99 -3
- package/dist/charts/legend.d.ts.map +1 -1
- package/dist/charts/legend.js +54 -71
- package/dist/charts/sparkline.module.css +13 -9
- package/dist/charts/state.d.ts +7 -0
- package/dist/charts/state.d.ts.map +1 -1
- package/dist/charts/state.js +17 -1
- package/dist/cli/shot/capture.d.ts +32 -3
- package/dist/cli/shot/capture.d.ts.map +1 -1
- package/dist/cli/shot/capture.js +17 -7
- package/dist/dashboard/meter-model.d.ts +19 -3
- package/dist/dashboard/meter-model.d.ts.map +1 -1
- package/dist/dashboard/meter-model.js +155 -13
- package/dist/dashboard/meter-parts.d.ts +4 -7
- package/dist/dashboard/meter-parts.d.ts.map +1 -1
- package/dist/dashboard/meter-parts.js +130 -90
- package/dist/dashboard/meter.d.ts +1 -1
- package/dist/dashboard/meter.d.ts.map +1 -1
- package/dist/dashboard/meter.js +10 -7
- package/dist/dashboard/meter.module.css +55 -13
- package/dist/dashboard/meter.module.css.d.ts +1 -2
- package/dist/dashboard/section.d.ts +1 -2
- package/dist/dashboard/section.d.ts.map +1 -1
- package/dist/dashboard/section.module.css +8 -7
- package/dist/dashboard/stat-card.module.css +17 -0
- package/dist/dashboard/stat-strip.d.ts +9 -1
- package/dist/dashboard/stat-strip.d.ts.map +1 -1
- package/dist/dashboard/stat-strip.js +121 -27
- package/dist/dashboard/stat-strip.module.css +51 -3
- package/dist/dashboard/stat-strip.module.css.d.ts +4 -0
- package/dist/dashboard/visual-slot.d.ts +4 -0
- package/dist/dashboard/visual-slot.d.ts.map +1 -1
- package/dist/dashboard/visual-slot.js +2 -0
- package/dist/dashboard/widget-header.module.css +9 -0
- package/llms.txt +3 -2
- package/package.json +1 -1
- package/src/charts/Bars.tsx +50 -2
- package/src/charts/ChartCard.tsx +32 -5
- package/src/charts/Sparkline.tsx +166 -13
- package/src/charts/chart-box.module.css +123 -5
- package/src/charts/chart-box.module.css.d.ts +3 -0
- package/src/charts/chart-card.module.css +34 -0
- package/src/charts/chart-card.module.css.d.ts +2 -0
- package/src/charts/chart-legend.module.css +1 -16
- package/src/charts/compile.ts +153 -3
- package/src/charts/legend.tsx +33 -49
- package/src/charts/sparkline.module.css +13 -9
- package/src/charts/state.tsx +43 -1
- package/src/cli/shot/capture.ts +25 -9
- package/src/dashboard/meter-model.ts +248 -22
- package/src/dashboard/meter-parts.tsx +124 -69
- package/src/dashboard/meter.module.css +55 -13
- package/src/dashboard/meter.module.css.d.ts +1 -2
- package/src/dashboard/meter.tsx +22 -9
- package/src/dashboard/section.module.css +8 -7
- package/src/dashboard/section.tsx +1 -2
- package/src/dashboard/stat-card.module.css +17 -0
- package/src/dashboard/stat-strip.module.css +51 -3
- package/src/dashboard/stat-strip.module.css.d.ts +4 -0
- package/src/dashboard/stat-strip.tsx +162 -33
- package/src/dashboard/visual-slot.ts +5 -0
- package/src/dashboard/widget-header.module.css +9 -0
package/dist/charts/legend.js
CHANGED
|
@@ -4,10 +4,10 @@ import { VX } from "../tokens/index.js";
|
|
|
4
4
|
import classes from "./chart-legend.module.css";
|
|
5
5
|
const ROLE_ORDER = ["series", "overlay", "reference"];
|
|
6
6
|
const DOTS_GAP = 30;
|
|
7
|
-
const
|
|
7
|
+
const byReferenceLast = (a, b) => Number(a.role === "reference") - Number(b.role === "reference");
|
|
8
8
|
function legendEntries(series, groups) {
|
|
9
9
|
const entries = series.filter((s) => s.legend !== false);
|
|
10
|
-
if (!groups) return entries.length ? [entries.toSorted(
|
|
10
|
+
if (!groups) return entries.length ? [entries.toSorted(byReferenceLast)] : [];
|
|
11
11
|
return ROLE_ORDER.map((role) => entries.filter((s) => (s.role ?? "series") === role)).filter(
|
|
12
12
|
(g) => g.length > 0
|
|
13
13
|
);
|
|
@@ -54,11 +54,17 @@ const buttonStyle = {
|
|
|
54
54
|
border: "1px solid transparent",
|
|
55
55
|
display: "inline-flex",
|
|
56
56
|
alignItems: "center",
|
|
57
|
+
// An entry never wraps inside itself (a threshold stays with its name) and never outgrows the row:
|
|
58
|
+
// the label ellipsizes at the row's width (`labelStyle`), its full name in `title`.
|
|
59
|
+
whiteSpace: "nowrap",
|
|
60
|
+
maxWidth: "100%",
|
|
61
|
+
minWidth: 0,
|
|
57
62
|
gap: 6,
|
|
58
63
|
cursor: "pointer",
|
|
59
64
|
borderRadius: VX.radiusCtrl
|
|
60
65
|
};
|
|
61
|
-
const noteStyle = { color: VX.axis };
|
|
66
|
+
const noteStyle = { color: VX.axis, flex: "none" };
|
|
67
|
+
const labelStyle = { minWidth: 0, overflow: "hidden", textOverflow: "ellipsis" };
|
|
62
68
|
const swatchFill = (s) => s.colorNegative ? `linear-gradient(90deg, ${s.color} 50%, ${s.colorNegative} 50%)` : s.color;
|
|
63
69
|
const LINE_SWATCH = {
|
|
64
70
|
compact: { width: 14, dash: "4 3" },
|
|
@@ -116,35 +122,10 @@ function Swatch({ s, mode }) {
|
|
|
116
122
|
}
|
|
117
123
|
);
|
|
118
124
|
}
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
overflow: "hidden",
|
|
124
|
-
clipPath: "inset(50%)",
|
|
125
|
-
whiteSpace: "nowrap"
|
|
126
|
-
};
|
|
127
|
-
function foldLegend(row) {
|
|
128
|
-
const items = [...row.querySelectorAll("[data-legend-key]")];
|
|
129
|
-
const more = row.querySelector("[data-legend-more]");
|
|
130
|
-
for (const it of items) it.removeAttribute("data-legend-folded");
|
|
131
|
-
more?.setAttribute("hidden", "");
|
|
132
|
-
if (more === null || getComputedStyle(row).flexWrap !== "nowrap") return;
|
|
133
|
-
const display = items;
|
|
134
|
-
const folded = [];
|
|
135
|
-
while (row.scrollWidth > row.clientWidth + 0.5 && folded.length < display.length - 1) {
|
|
136
|
-
const last = display[display.length - 1 - folded.length];
|
|
137
|
-
if (last === void 0) break;
|
|
138
|
-
last.setAttribute("data-legend-folded", "");
|
|
139
|
-
folded.push(last);
|
|
140
|
-
more.removeAttribute("hidden");
|
|
141
|
-
const names = folded.map((f) => f.textContent).join(", ");
|
|
142
|
-
more.textContent = `+${folded.length}`;
|
|
143
|
-
more.title = names;
|
|
144
|
-
const hiddenNames = document.createElement("span");
|
|
145
|
-
hiddenNames.textContent = `: ${names}`;
|
|
146
|
-
Object.assign(hiddenNames.style, VISUALLY_HIDDEN);
|
|
147
|
-
more.append(hiddenNames);
|
|
125
|
+
function titleClipped(row) {
|
|
126
|
+
for (const label of row.querySelectorAll("[data-legend-label]")) {
|
|
127
|
+
if (label.scrollWidth > label.clientWidth + 0.5) label.title = label.textContent ?? "";
|
|
128
|
+
else label.removeAttribute("title");
|
|
148
129
|
}
|
|
149
130
|
}
|
|
150
131
|
function ChartLegend(props) {
|
|
@@ -152,18 +133,23 @@ function ChartLegend(props) {
|
|
|
152
133
|
const auto = props.mode === "auto";
|
|
153
134
|
const signature = props.series.map((s) => s.key).join("|");
|
|
154
135
|
useLayoutEffect(() => {
|
|
155
|
-
if (auto && rowRef.current !== null)
|
|
136
|
+
if (auto && rowRef.current !== null) titleClipped(rowRef.current);
|
|
156
137
|
}, [auto, signature]);
|
|
157
138
|
useEffect(() => {
|
|
158
139
|
const row = rowRef.current;
|
|
159
140
|
if (!auto || row === null || typeof ResizeObserver === "undefined") return;
|
|
160
|
-
const observer = new ResizeObserver(() =>
|
|
141
|
+
const observer = new ResizeObserver(() => titleClipped(row));
|
|
161
142
|
observer.observe(row);
|
|
162
|
-
|
|
143
|
+
let live = true;
|
|
144
|
+
void document.fonts?.ready?.then(() => live && titleClipped(row));
|
|
145
|
+
return () => {
|
|
146
|
+
live = false;
|
|
147
|
+
observer.disconnect();
|
|
148
|
+
};
|
|
163
149
|
}, [auto, signature]);
|
|
164
150
|
const groups = legendEntries(props.series, props.groups);
|
|
165
151
|
if (groups.length === 0) return null;
|
|
166
|
-
return /* @__PURE__ */
|
|
152
|
+
return /* @__PURE__ */ jsx(
|
|
167
153
|
"fieldset",
|
|
168
154
|
{
|
|
169
155
|
ref: rowRef,
|
|
@@ -173,52 +159,49 @@ function ChartLegend(props) {
|
|
|
173
159
|
...auto && { className: classes.auto },
|
|
174
160
|
...auto && props.hideAtWide && { "data-hide-wide": "" },
|
|
175
161
|
style: rowLayout(props.mode, props.concealed === true),
|
|
176
|
-
children: [
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
if (!props.toggle)
|
|
188
|
-
return /* @__PURE__ */ jsx(
|
|
189
|
-
"span",
|
|
190
|
-
{
|
|
191
|
-
"data-legend-key": s.key,
|
|
192
|
-
"data-legend-role": s.role ?? "series",
|
|
193
|
-
style: itemStyle,
|
|
194
|
-
onMouseEnter: () => props.onHighlight(s.key),
|
|
195
|
-
onMouseLeave: () => props.onHighlight(null),
|
|
196
|
-
children: content
|
|
197
|
-
},
|
|
198
|
-
s.key
|
|
199
|
-
);
|
|
162
|
+
children: groups.map((group, gi) => [
|
|
163
|
+
gi > 0 && /* @__PURE__ */ jsx("span", { "aria-hidden": true, style: dividerStyle }, `divider-${gi}`),
|
|
164
|
+
...group.map((s) => {
|
|
165
|
+
const off = props.hidden.has(s.key);
|
|
166
|
+
const content = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
167
|
+
/* @__PURE__ */ jsx(Swatch, { s, mode: props.mode }),
|
|
168
|
+
/* @__PURE__ */ jsx("span", { style: labelStyle, "data-legend-label": "", children: s.label }),
|
|
169
|
+
s.note !== void 0 && /* @__PURE__ */ jsx("span", { style: noteStyle, children: s.note })
|
|
170
|
+
] });
|
|
171
|
+
const itemStyle = { ...buttonStyle, opacity: off ? 0.4 : 1 };
|
|
172
|
+
if (!props.toggle)
|
|
200
173
|
return /* @__PURE__ */ jsx(
|
|
201
|
-
"
|
|
174
|
+
"span",
|
|
202
175
|
{
|
|
203
|
-
type: "button",
|
|
204
176
|
"data-legend-key": s.key,
|
|
205
177
|
"data-legend-role": s.role ?? "series",
|
|
206
|
-
"data-basalt-hit": "",
|
|
207
|
-
"aria-pressed": !off,
|
|
208
178
|
style: itemStyle,
|
|
209
|
-
onClick: () => props.onToggle(s.key),
|
|
210
179
|
onMouseEnter: () => props.onHighlight(s.key),
|
|
211
180
|
onMouseLeave: () => props.onHighlight(null),
|
|
212
|
-
onFocus: () => props.onHighlight(s.key),
|
|
213
|
-
onBlur: () => props.onHighlight(null),
|
|
214
181
|
children: content
|
|
215
182
|
},
|
|
216
183
|
s.key
|
|
217
184
|
);
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
185
|
+
return /* @__PURE__ */ jsx(
|
|
186
|
+
"button",
|
|
187
|
+
{
|
|
188
|
+
type: "button",
|
|
189
|
+
"data-legend-key": s.key,
|
|
190
|
+
"data-legend-role": s.role ?? "series",
|
|
191
|
+
"data-basalt-hit": "",
|
|
192
|
+
"aria-pressed": !off,
|
|
193
|
+
style: itemStyle,
|
|
194
|
+
onClick: () => props.onToggle(s.key),
|
|
195
|
+
onMouseEnter: () => props.onHighlight(s.key),
|
|
196
|
+
onMouseLeave: () => props.onHighlight(null),
|
|
197
|
+
onFocus: () => props.onHighlight(s.key),
|
|
198
|
+
onBlur: () => props.onHighlight(null),
|
|
199
|
+
children: content
|
|
200
|
+
},
|
|
201
|
+
s.key
|
|
202
|
+
);
|
|
203
|
+
})
|
|
204
|
+
])
|
|
222
205
|
}
|
|
223
206
|
);
|
|
224
207
|
}
|
|
@@ -31,7 +31,13 @@
|
|
|
31
31
|
text-overflow: ellipsis;
|
|
32
32
|
white-space: nowrap;
|
|
33
33
|
pointer-events: none;
|
|
34
|
-
|
|
34
|
+
/* Opaque in both schemes: `--vx-tooltip-bg` is translucent in dark, and a footer under the chip
|
|
35
|
+
* would ghost through it, so the tint is layered over the elevated surface. */
|
|
36
|
+
background: linear-gradient(
|
|
37
|
+
var(--basalt-tooltip-surface, var(--vx-tooltip-bg)),
|
|
38
|
+
var(--basalt-tooltip-surface, var(--vx-tooltip-bg))
|
|
39
|
+
)
|
|
40
|
+
var(--vx-surface-elevated);
|
|
35
41
|
border: 1px solid var(--vx-tooltip-border);
|
|
36
42
|
border-radius: var(--vx-radius-ctrl);
|
|
37
43
|
}
|
|
@@ -54,19 +60,17 @@
|
|
|
54
60
|
white-space: pre;
|
|
55
61
|
}
|
|
56
62
|
|
|
57
|
-
/* A readout that overflows its box first
|
|
63
|
+
/* A readout that overflows its box first shrinks its padding. The separator and the air round it
|
|
64
|
+
* never drop. */
|
|
58
65
|
.readout[data-tight] {
|
|
59
66
|
padding-inline: 2px;
|
|
60
67
|
}
|
|
61
68
|
|
|
62
|
-
.readout[data-tight] .sep {
|
|
63
|
-
letter-spacing: -0.15em;
|
|
64
|
-
word-spacing: -0.25em;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
69
|
/* A readout that still overflows stacks (set in `Sparkline.tsx`): the date on its own line, wrapped
|
|
68
|
-
* not clipped. It sits INSIDE the plot
|
|
69
|
-
*
|
|
70
|
+
* not clipped. It sits INSIDE the plot (the lift-0 placement), hosted or bare: a hosted chip grown
|
|
71
|
+
* past the host's one reserved line would cover the figure's delta or qualifier above. A hosted
|
|
72
|
+
* line's chip is then placed by `Sparkline.tsx` where the plotted line is not (`top`/`margin-left`
|
|
73
|
+
* inline); `top: 0` is the fallback. */
|
|
70
74
|
.readout[data-stacked] {
|
|
71
75
|
block-size: auto;
|
|
72
76
|
max-height: none;
|
package/dist/charts/state.d.ts
CHANGED
|
@@ -7,6 +7,11 @@ import type { ChartBoxHeight } from './box.js';
|
|
|
7
7
|
import type { ChartState } from './types.js';
|
|
8
8
|
export type ResolvedChartState = 'pending' | 'error' | 'empty' | null;
|
|
9
9
|
export declare function resolveChartState(state: ChartState | undefined): ResolvedChartState;
|
|
10
|
+
/**
|
|
11
|
+
* The shape a pending plot draws: `'bars'` (default), `'line'` for a line or area chart, or a bar
|
|
12
|
+
* count when the loaded chart's data length is known (a 6-month chart loads 6 bars).
|
|
13
|
+
*/
|
|
14
|
+
export type PlotGhostShape = 'bars' | 'line' | number;
|
|
10
15
|
/** Fills the same {@link ChartBox} the chart will, so a pending, failed or empty chart (and a
|
|
11
16
|
* `<Suspense>` fallback built from one) occupies the final chart's height. */
|
|
12
17
|
export declare function ChartPlaceholder(props: {
|
|
@@ -25,5 +30,7 @@ export declare function ChartPlaceholder(props: {
|
|
|
25
30
|
compact?: boolean;
|
|
26
31
|
/** Error only: what failed to load, "Could not load {noun}". Default: no noun. */
|
|
27
32
|
noun?: string;
|
|
33
|
+
/** Pending only: the ghost's shape. Default `'bars'`. */
|
|
34
|
+
ghost?: PlotGhostShape;
|
|
28
35
|
}): ReactElement | null;
|
|
29
36
|
//# sourceMappingURL=state.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"state.d.ts","sourceRoot":"","sources":["../../src/charts/state.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,KAAK,EAAiB,YAAY,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"state.d.ts","sourceRoot":"","sources":["../../src/charts/state.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,KAAK,EAAiB,YAAY,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAMnE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAA;AAC3C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AAEzC,MAAM,MAAM,kBAAkB,GAAG,SAAS,GAAG,OAAO,GAAG,OAAO,GAAG,IAAI,CAAA;AAErE,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,UAAU,GAAG,SAAS,GAAG,kBAAkB,CAMnF;AAsBD;;;GAGG;AACH,MAAM,MAAM,cAAc,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,CAAA;AAiErD;8EAC8E;AAC9E,wBAAgB,gBAAgB,CAAC,KAAK,EAAE;IACtC,KAAK,EAAE,UAAU,GAAG,SAAS,CAAA;IAC7B;0GACsG;IACtG,MAAM,CAAC,EAAE,cAAc,GAAG,SAAS,CAAA;IACnC,8EAA8E;IAC9E,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;IACpB,8DAA8D;IAC9D,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,8DAA8D;IAC9D,MAAM,CAAC,EAAE,SAAS,CAAA;IAClB;2DACuD;IACvD,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,kFAAkF;IAClF,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,yDAAyD;IACzD,KAAK,CAAC,EAAE,cAAc,CAAA;CACvB,GAAG,YAAY,GAAG,IAAI,CAgEtB"}
|
package/dist/charts/state.js
CHANGED
|
@@ -3,6 +3,7 @@ import { toErrorMessage } from "../common/errors.js";
|
|
|
3
3
|
import { RetryButton } from "../common/retry-button.js";
|
|
4
4
|
import { VX } from "../tokens/index.js";
|
|
5
5
|
import { ChartBox, growClass, stateClass } from "./box.js";
|
|
6
|
+
import boxClasses from "./chart-box.module.css";
|
|
6
7
|
function resolveChartState(state) {
|
|
7
8
|
if (!state) return null;
|
|
8
9
|
if (state.pending) return "pending";
|
|
@@ -25,6 +26,21 @@ const pendingStyle = {
|
|
|
25
26
|
borderRadius: VX.radiusCtrl,
|
|
26
27
|
background: `linear-gradient(90deg, transparent, ${VX.surface.subtle}, transparent)`
|
|
27
28
|
};
|
|
29
|
+
const GHOST_BARS = [38, 52, 44, 66, 58, 74, 62, 48];
|
|
30
|
+
const GHOST_LINE = "0,30 12,26 25,28 38,18 50,22 62,12 75,16 88,8 100,12";
|
|
31
|
+
function PlotGhost({ shape = "bars" }) {
|
|
32
|
+
if (shape === "line")
|
|
33
|
+
return /* @__PURE__ */ jsx("div", { "aria-hidden": "true", "data-basalt-plot-ghost": "line", className: boxClasses.ghost, children: /* @__PURE__ */ jsx("svg", { viewBox: "0 0 100 40", preserveAspectRatio: "none", className: boxClasses.ghostLine, children: /* @__PURE__ */ jsx("polyline", { points: GHOST_LINE, vectorEffect: "non-scaling-stroke" }) }) });
|
|
34
|
+
const count = typeof shape === "number" ? Math.max(1, Math.min(Math.floor(shape), 60)) : GHOST_BARS.length;
|
|
35
|
+
return /* @__PURE__ */ jsx("div", { "aria-hidden": "true", "data-basalt-plot-ghost": "bars", className: boxClasses.ghost, children: Array.from({ length: count }, (_, i) => /* @__PURE__ */ jsx(
|
|
36
|
+
"span",
|
|
37
|
+
{
|
|
38
|
+
className: boxClasses.ghostBar,
|
|
39
|
+
style: { height: `${GHOST_BARS[i % GHOST_BARS.length]}%` }
|
|
40
|
+
},
|
|
41
|
+
i
|
|
42
|
+
)) });
|
|
43
|
+
}
|
|
28
44
|
const dotStyle = {
|
|
29
45
|
display: "inline-block",
|
|
30
46
|
flex: "none",
|
|
@@ -67,7 +83,7 @@ function ChartPlaceholder(props) {
|
|
|
67
83
|
);
|
|
68
84
|
if (kind === "pending")
|
|
69
85
|
return fit(
|
|
70
|
-
/* @__PURE__ */ jsx("output", { "aria-label": "Loading chart", "aria-busy": "true", className: stateClass, style })
|
|
86
|
+
/* @__PURE__ */ jsx("output", { "aria-label": "Loading chart", "aria-busy": "true", className: stateClass, style, children: !props.compact && /* @__PURE__ */ jsx(PlotGhost, { ...props.ghost !== void 0 && { shape: props.ghost } }) })
|
|
71
87
|
);
|
|
72
88
|
const label = kind === "error" ? toErrorMessage(props.state?.error, "The request failed.") : emptyLabel(props.state);
|
|
73
89
|
const body = props.compact ? /* @__PURE__ */ jsx("span", { "aria-hidden": "true", children: "\u2014" }) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Pair } from './real-data.js';
|
|
2
|
-
import type { Box, PwBrowser, PwContext, PwLocator } from './playwright.js';
|
|
2
|
+
import type { Box, PwBrowser, PwContext, PwLocator, PwPage } from './playwright.js';
|
|
3
3
|
import type { AnchorMetrics, Measurement, Scale, Scheme, ShotRecord, ShotState, Viewport } from './types.js';
|
|
4
4
|
export type CaptureInput = {
|
|
5
5
|
browser: PwBrowser;
|
|
@@ -19,12 +19,41 @@ export type CaptureInput = {
|
|
|
19
19
|
measure?: (anchor: PwLocator) => Promise<Measurement>;
|
|
20
20
|
log: (line: string) => void;
|
|
21
21
|
};
|
|
22
|
+
type PageFacts = {
|
|
23
|
+
anchors: string[];
|
|
24
|
+
declared: string[];
|
|
25
|
+
/** Anchors that hold a basalt state surface (ChartCard, StatCard, a chart state). */
|
|
26
|
+
stateful?: string[];
|
|
27
|
+
/** Anchor → the URL states it declares itself absent in (`data-shot-absent="empty error"`). */
|
|
28
|
+
absent?: Record<string, string[]>;
|
|
29
|
+
};
|
|
30
|
+
/** Everything one page visit shares: where the records go and what was already measured. */
|
|
31
|
+
type Ctx = {
|
|
32
|
+
page: PwPage;
|
|
33
|
+
input: CaptureInput;
|
|
34
|
+
route: string;
|
|
35
|
+
scheme: Scheme;
|
|
36
|
+
viewport: Viewport;
|
|
37
|
+
/** The viewport's current height: a tall anchor grows it for one shot. */
|
|
38
|
+
height: number;
|
|
39
|
+
facts: PageFacts;
|
|
40
|
+
anchors: AnchorMetrics[];
|
|
41
|
+
shots: ShotRecord[];
|
|
42
|
+
measured: Set<string>;
|
|
43
|
+
/** What the last visit showed to be wrong about the data itself: a failed seed, a 401/403, no API answer. */
|
|
44
|
+
problems: string[];
|
|
45
|
+
/** Read on the first page of a context that loads. */
|
|
46
|
+
scale?: Steps | undefined;
|
|
47
|
+
scaleError?: string | undefined;
|
|
48
|
+
};
|
|
22
49
|
/** `<route>-<hash>__<name>-<hash>__…`: the hash of the RAW text keeps `/a/b` and `/a-b` apart. */
|
|
23
50
|
export declare const fileName: (route: string, name: string, scheme: Scheme, viewport: Viewport, state: ShotState) => string;
|
|
24
51
|
/** The state URL: the query goes before any `#fragment`. */
|
|
25
52
|
export declare function withParam(route: string, state: ShotState): string;
|
|
26
|
-
/** The rect union of `boxes`, grown by `margin` and clamped to the viewport (`tall`: its current height). */
|
|
27
|
-
export declare function unionClip(boxes: readonly Box[], margin: number, viewport: Viewport, tall?: number): Box;
|
|
53
|
+
/** The rect union of `boxes`, grown by `margin` and clamped to the viewport (`tall`: its current height); null when nothing of it is inside. */
|
|
54
|
+
export declare function unionClip(boxes: readonly Box[], margin: number, viewport: Viewport, tall?: number): Box | null;
|
|
55
|
+
/** A clip of `targets` re-measured against the live page height (`c.height` goes stale after a reflow); an empty clip is retried once after a frame, then fails. */
|
|
56
|
+
export declare function snapClip(c: Ctx, path: string, targets: readonly PwLocator[]): Promise<void>;
|
|
28
57
|
/** Runs in the page: numbers every Card, Paper and table in DOM order, tagging those over 120×60 px as anchors. */
|
|
29
58
|
export declare function tagAutoAnchors(): void;
|
|
30
59
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"capture.d.ts","sourceRoot":"","sources":["../../../src/cli/shot/capture.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA;AAGvC,OAA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;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,SAAS,CAyD1D;AAED,sHAAsH;AACtH,wBAAgB,UAAU,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,EAAE,SAAS,GAAG,KAAK,CAY5D;AAyED,qHAAqH;AACrH,wBAAsB,WAAW,CAAC,CAAC,SAAS,SAAS,EACnD,OAAO,EAAE,SAAS,CAAC,CAAC,CAAC,EACrB,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,QAAQ,EAClB,MAAM,GAAE,SAAS,IAAI,EAAO,EAC5B,MAAM,SAAK,GACV,OAAO,CAAC,CAAC,CAAC,CAaZ;AAID,kGAAkG;AAClG,eAAO,MAAM,SAAS,GAAI,OAAO,MAAM,EAAE,MAAM,MAAM,KAAG,MAC2B,CAAA;AAsDnF,wBAAsB,OAAO,CAAC,KAAK,EAAE,YAAY,GAAG,OAAO,CAAC;IAC1D,OAAO,EAAE,aAAa,EAAE,CAAA;IACxB,KAAK,EAAE,UAAU,EAAE,CAAA;IACnB,KAAK,EAAE,KAAK,EAAE,CAAA;IACd,UAAU,CAAC,EAAE,MAAM,CAAA;CACpB,CAAC,CAmDD"}
|
package/dist/cli/shot/capture.js
CHANGED
|
@@ -54,7 +54,7 @@ function unionClip(boxes, margin, viewport, tall) {
|
|
|
54
54
|
const top = Math.max(0, Math.min(...boxes.map((b) => b.y)) - margin);
|
|
55
55
|
const right = Math.min(width, Math.max(...boxes.map((b) => b.x + b.width)) + margin);
|
|
56
56
|
const bottom = Math.min(height, Math.max(...boxes.map((b) => b.y + b.height)) + margin);
|
|
57
|
-
return { x: left, y: top, width:
|
|
57
|
+
return right <= left || bottom <= top ? null : { x: left, y: top, width: right - left, height: bottom - top };
|
|
58
58
|
}
|
|
59
59
|
const snap = (target, path, extra = {}) => target.screenshot({
|
|
60
60
|
path,
|
|
@@ -63,6 +63,16 @@ const snap = (target, path, extra = {}) => target.screenshot({
|
|
|
63
63
|
timeout: SHOT_TIMEOUT_MS,
|
|
64
64
|
...extra
|
|
65
65
|
});
|
|
66
|
+
async function snapClip(c, path, targets) {
|
|
67
|
+
for (let retry = true; ; retry = false) {
|
|
68
|
+
const live = await c.page.evaluate("window.innerHeight");
|
|
69
|
+
const boxes = (await Promise.all(targets.map((t) => t.boundingBox()))).filter((b) => b !== null);
|
|
70
|
+
const clip = boxes.length === targets.length && unionClip(boxes, FOCUS_MARGIN_PX, c.viewport, live);
|
|
71
|
+
if (clip) return void await snap(c.page, path, { clip });
|
|
72
|
+
if (!retry) throw new Error("Clipped area is either empty or outside the resulting image");
|
|
73
|
+
await c.page.evaluate(FRAMES);
|
|
74
|
+
}
|
|
75
|
+
}
|
|
66
76
|
function record(c, { name, state, status, file, note, stateful }) {
|
|
67
77
|
const { route, scheme, viewport } = c;
|
|
68
78
|
c.shots.push({
|
|
@@ -331,8 +341,9 @@ async function hoverTrigger(target) {
|
|
|
331
341
|
const position = at && box ? { x: at.x * box.width, y: at.y * box.height } : void 0;
|
|
332
342
|
await target.hover({ timeout: HOVER_TIMEOUT_MS, ...position && { position } });
|
|
333
343
|
}
|
|
344
|
+
const tipOf = (c, describedBy) => c.page.locator(visibleTooltip(describedBy)).first();
|
|
334
345
|
async function openTooltipBox(c, describedBy, timeout = TIP_PROBE_MS) {
|
|
335
|
-
const tip = c
|
|
346
|
+
const tip = tipOf(c, describedBy);
|
|
336
347
|
try {
|
|
337
348
|
await tip.waitFor({ state: "visible", timeout });
|
|
338
349
|
} catch {
|
|
@@ -361,7 +372,7 @@ async function captureHover(c, name) {
|
|
|
361
372
|
const describedBy = idOf(await target.evaluate(describedByOf));
|
|
362
373
|
const [box, tip] = [await settledBox(anchor), await openTooltipBox(c, describedBy)];
|
|
363
374
|
if (!box || !tip) return void await snap(anchor, path);
|
|
364
|
-
await
|
|
375
|
+
await snapClip(c, path, [anchor, tipOf(c, describedBy)]);
|
|
365
376
|
});
|
|
366
377
|
await c.page.mouse.move(0, 0);
|
|
367
378
|
}
|
|
@@ -400,9 +411,7 @@ async function captureFocus(c, name) {
|
|
|
400
411
|
)
|
|
401
412
|
);
|
|
402
413
|
const tip = await openTooltipBox(c, focused);
|
|
403
|
-
await
|
|
404
|
-
clip: unionClip(tip ? [box, tip] : [box], FOCUS_MARGIN_PX, c.viewport, c.height)
|
|
405
|
-
});
|
|
414
|
+
await snapClip(c, path, tip ? [anchor, tipOf(c, focused)] : [anchor]);
|
|
406
415
|
});
|
|
407
416
|
await c.page.evaluate("document.activeElement?.blur()");
|
|
408
417
|
}
|
|
@@ -420,7 +429,7 @@ async function captureTooltip(c, name) {
|
|
|
420
429
|
if (!t) throw new Error('no visible [role="tooltip"] after hover');
|
|
421
430
|
const a = await settledBox(anchor);
|
|
422
431
|
if (!a) throw new Error("tooltip or anchor has no box");
|
|
423
|
-
await
|
|
432
|
+
await snapClip(c, path, [anchor, tipOf(c, describedBy)]);
|
|
424
433
|
});
|
|
425
434
|
await c.page.mouse.move(0, 0);
|
|
426
435
|
}
|
|
@@ -719,6 +728,7 @@ export {
|
|
|
719
728
|
revealInPage,
|
|
720
729
|
sheetName,
|
|
721
730
|
showChrome,
|
|
731
|
+
snapClip,
|
|
722
732
|
tagAutoAnchors,
|
|
723
733
|
tooltipSelector,
|
|
724
734
|
unionClip,
|
|
@@ -157,6 +157,11 @@ export type RowLabel = {
|
|
|
157
157
|
holding?: boolean;
|
|
158
158
|
/** A tick at the track's start or end: it keeps its place over every zone name it would touch. */
|
|
159
159
|
end?: boolean;
|
|
160
|
+
/**
|
|
161
|
+
* The scale's own start figure (not a consumer tick): D38's caption order drops it before anything
|
|
162
|
+
* wraps, so it never takes the second row; it hides when the first row cannot hold it.
|
|
163
|
+
*/
|
|
164
|
+
figure?: boolean;
|
|
160
165
|
short?: LabelBox;
|
|
161
166
|
};
|
|
162
167
|
/** The placement of the row's labels, index-aligned with the input. */
|
|
@@ -166,16 +171,25 @@ export type RowPlacement = {
|
|
|
166
171
|
short: boolean[];
|
|
167
172
|
/** Pixels a shown label moves along the row's physical x axis to stay inside it (0 unless clamped). */
|
|
168
173
|
shift: number[];
|
|
174
|
+
/** Index-aligned: the row a shown label stands on, 0 the first, 1 the second (staggered under it). */
|
|
175
|
+
row: (0 | 1)[];
|
|
169
176
|
};
|
|
170
177
|
/**
|
|
171
178
|
* Which labels of the row show, in input order. The holding zone's name claims its place first (it
|
|
172
179
|
* is the reading's verdict, so it never hides for width: it may spill past its span, shifted inside
|
|
173
180
|
* the row); the other ticks go next, then the end ticks (at the track's start or end: a scale's
|
|
174
181
|
* 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.
|
|
182
|
+
* clears every label already kept, trying its full name, then its `short` box, then hiding. A name
|
|
183
|
+
* that does not fit its span borrows room: its neighbours (the holding name too) slide away, each
|
|
184
|
+
* keeping its CENTRE inside its own span (it may overhang a span edge by up to half its width).
|
|
185
|
+
* Order per name: full on row one, full on row two, `short` on row one, `short` on row two, hidden;
|
|
186
|
+
* on an equal count of shown labels the full-name layout wins over the `short` one. An end
|
|
176
187
|
* 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
|
|
178
|
-
*
|
|
188
|
+
* keeps at least `gap` px (one gap step of the host's spacing) from every other label, and so does
|
|
189
|
+
* a zone name from its neighbour. No zone name and no tick label is lost for width: one that cannot
|
|
190
|
+
* hold its place on the first row stands on a second row directly under it (centred on its span or
|
|
191
|
+
* mark, clamped inside the row, keeping the same gap), and only hides when neither row can hold it.
|
|
192
|
+
* A hidden label is still named in the described-by text.
|
|
179
193
|
*/
|
|
180
194
|
export declare function placeRowLabels(labels: readonly RowLabel[], rowWidth: number, gap?: number): RowPlacement;
|
|
181
195
|
/** A zone band as left edge + width in percent, clipped to the track. */
|
|
@@ -202,6 +216,8 @@ export type BarModel = {
|
|
|
202
216
|
parts: readonly Part[];
|
|
203
217
|
/** Percent where the first forecast part starts; absent when the forecast opens the track. */
|
|
204
218
|
boundaryPct: number | undefined;
|
|
219
|
+
/** Where the forecast part ends (clamped to the track): the forecast caption ends here. */
|
|
220
|
+
forecastEndPct: number | undefined;
|
|
205
221
|
forecastText: string | null;
|
|
206
222
|
captionMode: CaptionMode;
|
|
207
223
|
/** Only in `parts` mode: one caption per part, in order. Empty otherwise. */
|
|
@@ -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;;;GAGG;AACH,MAAM,MAAM,SAAS,GAAG;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAA;CAAE,CAAA;AAExE,qGAAqG;AACrG,KAAK,SAAS,GAAG;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAA;AAE9C,wGAAwG;AACxG,eAAO,MAAM,SAAS;;;;CAAiC,CAAA;AAIvD,iHAAiH;AACjH,eAAO,MAAM,a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