executable-stories-react 0.9.0 → 0.10.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/dist/index.cjs +525 -333
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +45 -1
- package/dist/index.d.ts +45 -1
- package/dist/index.js +518 -333
- package/dist/index.js.map +1 -1
- package/dist/interactive.cjs +597 -419
- package/dist/interactive.cjs.map +1 -1
- package/dist/interactive.js +597 -419
- package/dist/interactive.js.map +1 -1
- package/dist/report-island.global.js +28 -28
- package/dist/ssr.cjs +477 -299
- package/dist/ssr.cjs.map +1 -1
- package/dist/ssr.js +477 -299
- package/dist/ssr.js.map +1 -1
- package/dist/tailwind.css +1 -1
- package/package.json +1 -1
package/dist/interactive.js
CHANGED
|
@@ -26,63 +26,6 @@ import { useMemo } from "react";
|
|
|
26
26
|
import { createContext } from "react";
|
|
27
27
|
var ReportContext = createContext(null);
|
|
28
28
|
|
|
29
|
-
// src/context/ReportRoot.tsx
|
|
30
|
-
import { jsx } from "react/jsx-runtime";
|
|
31
|
-
var EMPTY_CUSTOM = {};
|
|
32
|
-
var EMPTY_RENDERERS = {};
|
|
33
|
-
function ReportRoot({
|
|
34
|
-
report,
|
|
35
|
-
customRenderers,
|
|
36
|
-
renderers,
|
|
37
|
-
children
|
|
38
|
-
}) {
|
|
39
|
-
const value = useMemo(
|
|
40
|
-
() => ({
|
|
41
|
-
report,
|
|
42
|
-
customRenderers: customRenderers ?? EMPTY_CUSTOM,
|
|
43
|
-
renderers: renderers ?? EMPTY_RENDERERS
|
|
44
|
-
}),
|
|
45
|
-
[report, customRenderers, renderers]
|
|
46
|
-
);
|
|
47
|
-
return /* @__PURE__ */ jsx(ReportContext.Provider, { value, children });
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
// src/hooks/useReport.ts
|
|
51
|
-
import { useContext } from "react";
|
|
52
|
-
function useReport() {
|
|
53
|
-
const ctx = useContext(ReportContext);
|
|
54
|
-
if (!ctx) {
|
|
55
|
-
throw new Error(
|
|
56
|
-
"useReport must be used inside <ReportRoot> or <Report>. Wrap your tree with one of those."
|
|
57
|
-
);
|
|
58
|
-
}
|
|
59
|
-
return ctx.report;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
// ../executable-stories-core/dist/utils/duration.js
|
|
63
|
-
function formatDuration(ms) {
|
|
64
|
-
if (ms < 1e3) {
|
|
65
|
-
return `${Math.round(ms)} ms`;
|
|
66
|
-
}
|
|
67
|
-
if (ms < 6e4) {
|
|
68
|
-
return `${(ms / 1e3).toFixed(2)} s`;
|
|
69
|
-
}
|
|
70
|
-
const minutes = Math.floor(ms / 6e4);
|
|
71
|
-
const seconds = Math.floor(ms % 6e4 / 1e3);
|
|
72
|
-
if (minutes < 60) {
|
|
73
|
-
return seconds > 0 ? `${minutes}m ${seconds}s` : `${minutes}m`;
|
|
74
|
-
}
|
|
75
|
-
const hours = Math.floor(minutes / 60);
|
|
76
|
-
const remainingMinutes = minutes % 60;
|
|
77
|
-
return `${hours}h ${remainingMinutes}m`;
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
// src/components/doc/DocNote.tsx
|
|
81
|
-
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
82
|
-
function DocNote({ entry }) {
|
|
83
|
-
return /* @__PURE__ */ jsx2("p", { className: "my-2 text-sm text-muted-foreground", children: entry.text });
|
|
84
|
-
}
|
|
85
|
-
|
|
86
29
|
// src/components/ui/badge.tsx
|
|
87
30
|
import "react";
|
|
88
31
|
import { cva } from "class-variance-authority";
|
|
@@ -141,14 +84,249 @@ function Badge({
|
|
|
141
84
|
});
|
|
142
85
|
}
|
|
143
86
|
|
|
144
|
-
// src/components/doc/
|
|
87
|
+
// src/components/doc/NarrativeBlocks.tsx
|
|
88
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
89
|
+
var FILE_TREE_TYPE = "file-tree";
|
|
90
|
+
var DATA_MODEL_TYPE = "data-model";
|
|
91
|
+
function isChangeKind(value) {
|
|
92
|
+
return value === "added" || value === "modified" || value === "removed" || value === "renamed";
|
|
93
|
+
}
|
|
94
|
+
function isRecord(value) {
|
|
95
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
96
|
+
}
|
|
97
|
+
function str(value) {
|
|
98
|
+
return typeof value === "string" && value !== "" ? value : void 0;
|
|
99
|
+
}
|
|
100
|
+
function AuthoredMarker({ authored }) {
|
|
101
|
+
if (authored !== "agent") return null;
|
|
102
|
+
return /* @__PURE__ */ jsx(Badge, { variant: "outline", className: "border-border text-[10px] text-muted-foreground", children: "AI-authored, not verified by a run" });
|
|
103
|
+
}
|
|
104
|
+
function BlockFrame({
|
|
105
|
+
title,
|
|
106
|
+
authored,
|
|
107
|
+
children
|
|
108
|
+
}) {
|
|
109
|
+
return /* @__PURE__ */ jsxs("figure", { className: "my-3", children: [
|
|
110
|
+
title || authored === "agent" ? /* @__PURE__ */ jsxs("figcaption", { className: "mb-1.5 flex flex-wrap items-center gap-2", children: [
|
|
111
|
+
title ? /* @__PURE__ */ jsx("span", { className: "text-xs font-medium text-muted-foreground", children: title }) : null,
|
|
112
|
+
/* @__PURE__ */ jsx(AuthoredMarker, { authored })
|
|
113
|
+
] }) : null,
|
|
114
|
+
children
|
|
115
|
+
] });
|
|
116
|
+
}
|
|
117
|
+
function ChangeBadge({ change }) {
|
|
118
|
+
return /* @__PURE__ */ jsx(Badge, { variant: "tag", className: "text-[10px]", children: change });
|
|
119
|
+
}
|
|
120
|
+
function parseFileTree(data) {
|
|
121
|
+
if (!isRecord(data) || !Array.isArray(data.files)) return void 0;
|
|
122
|
+
const files = [];
|
|
123
|
+
for (const raw of data.files) {
|
|
124
|
+
if (typeof raw === "string") {
|
|
125
|
+
if (raw) files.push({ path: raw });
|
|
126
|
+
continue;
|
|
127
|
+
}
|
|
128
|
+
if (!isRecord(raw)) continue;
|
|
129
|
+
const path = str(raw.path);
|
|
130
|
+
if (!path) continue;
|
|
131
|
+
files.push({
|
|
132
|
+
path,
|
|
133
|
+
change: isChangeKind(raw.change) ? raw.change : void 0,
|
|
134
|
+
note: str(raw.note)
|
|
135
|
+
});
|
|
136
|
+
}
|
|
137
|
+
if (files.length === 0) return void 0;
|
|
138
|
+
return { title: str(data.title), authored: str(data.authored), files };
|
|
139
|
+
}
|
|
140
|
+
function buildTree(files) {
|
|
141
|
+
const root = { name: "", children: /* @__PURE__ */ new Map() };
|
|
142
|
+
for (const file of files) {
|
|
143
|
+
const segments = file.path.split("/").filter(Boolean);
|
|
144
|
+
let node = root;
|
|
145
|
+
segments.forEach((segment, index) => {
|
|
146
|
+
let child = node.children.get(segment);
|
|
147
|
+
if (!child) {
|
|
148
|
+
child = { name: segment, children: /* @__PURE__ */ new Map() };
|
|
149
|
+
node.children.set(segment, child);
|
|
150
|
+
}
|
|
151
|
+
if (index === segments.length - 1) child.file = file;
|
|
152
|
+
node = child;
|
|
153
|
+
});
|
|
154
|
+
}
|
|
155
|
+
return root;
|
|
156
|
+
}
|
|
157
|
+
function sortedChildren(node) {
|
|
158
|
+
return [...node.children.values()].sort((a, b) => {
|
|
159
|
+
const aDir = a.children.size > 0;
|
|
160
|
+
const bDir = b.children.size > 0;
|
|
161
|
+
if (aDir !== bDir) return aDir ? -1 : 1;
|
|
162
|
+
return a.name.localeCompare(b.name);
|
|
163
|
+
});
|
|
164
|
+
}
|
|
165
|
+
function TreeBranch({ node, depth }) {
|
|
166
|
+
const children = sortedChildren(node);
|
|
167
|
+
return /* @__PURE__ */ jsx("ul", { className: cn("space-y-0.5", depth > 0 && "ml-3 border-l border-border/60 pl-3"), children: children.map((child) => {
|
|
168
|
+
const isDir = child.children.size > 0;
|
|
169
|
+
return /* @__PURE__ */ jsxs("li", { children: [
|
|
170
|
+
/* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-baseline gap-2", children: [
|
|
171
|
+
/* @__PURE__ */ jsx(
|
|
172
|
+
"span",
|
|
173
|
+
{
|
|
174
|
+
className: cn(
|
|
175
|
+
"font-mono text-xs",
|
|
176
|
+
isDir ? "text-muted-foreground" : "text-foreground"
|
|
177
|
+
),
|
|
178
|
+
children: isDir ? `${child.name}/` : child.name
|
|
179
|
+
}
|
|
180
|
+
),
|
|
181
|
+
child.file?.change ? /* @__PURE__ */ jsx(ChangeBadge, { change: child.file.change }) : null,
|
|
182
|
+
child.file?.note ? /* @__PURE__ */ jsx("span", { className: "text-xs text-muted-foreground", children: child.file.note }) : null
|
|
183
|
+
] }),
|
|
184
|
+
isDir ? /* @__PURE__ */ jsx(TreeBranch, { node: child, depth: depth + 1 }) : null
|
|
185
|
+
] }, child.name);
|
|
186
|
+
}) });
|
|
187
|
+
}
|
|
188
|
+
function FileTreeBlock({ entry }) {
|
|
189
|
+
const data = parseFileTree(entry.data);
|
|
190
|
+
if (!data) return /* @__PURE__ */ jsx(UnreadableBlock, { entry });
|
|
191
|
+
return /* @__PURE__ */ jsx(BlockFrame, { title: data.title ?? "Files changed", authored: data.authored, children: /* @__PURE__ */ jsx("div", { tabIndex: 0, className: "overflow-x-auto rounded-md border border-border bg-card p-3", children: /* @__PURE__ */ jsx(TreeBranch, { node: buildTree(data.files), depth: 0 }) }) });
|
|
192
|
+
}
|
|
193
|
+
function parseDataModel(data) {
|
|
194
|
+
if (!isRecord(data) || !Array.isArray(data.fields)) return void 0;
|
|
195
|
+
const fields = [];
|
|
196
|
+
for (const raw of data.fields) {
|
|
197
|
+
if (!isRecord(raw)) continue;
|
|
198
|
+
const name = str(raw.name);
|
|
199
|
+
if (!name) continue;
|
|
200
|
+
fields.push({
|
|
201
|
+
name,
|
|
202
|
+
type: str(raw.type),
|
|
203
|
+
note: str(raw.note),
|
|
204
|
+
change: isChangeKind(raw.change) ? raw.change : void 0
|
|
205
|
+
});
|
|
206
|
+
}
|
|
207
|
+
if (fields.length === 0) return void 0;
|
|
208
|
+
return {
|
|
209
|
+
title: str(data.title),
|
|
210
|
+
authored: str(data.authored),
|
|
211
|
+
name: str(data.name),
|
|
212
|
+
fields
|
|
213
|
+
};
|
|
214
|
+
}
|
|
215
|
+
function DataModelBlock({ entry }) {
|
|
216
|
+
const data = parseDataModel(entry.data);
|
|
217
|
+
if (!data) return /* @__PURE__ */ jsx(UnreadableBlock, { entry });
|
|
218
|
+
const hasNotes = data.fields.some((f) => f.note);
|
|
219
|
+
return /* @__PURE__ */ jsx(BlockFrame, { title: data.title ?? data.name ?? "Data model", authored: data.authored, children: /* @__PURE__ */ jsx("div", { tabIndex: 0, className: "overflow-x-auto rounded-md border border-border", children: /* @__PURE__ */ jsxs("table", { className: "w-full border-collapse text-sm", children: [
|
|
220
|
+
/* @__PURE__ */ jsx("thead", { children: /* @__PURE__ */ jsxs("tr", { className: "bg-muted/50", children: [
|
|
221
|
+
/* @__PURE__ */ jsx("th", { scope: "col", className: "border-b border-border px-3 py-2 text-left font-semibold", children: "Field" }),
|
|
222
|
+
/* @__PURE__ */ jsx("th", { scope: "col", className: "border-b border-border px-3 py-2 text-left font-semibold", children: "Type" }),
|
|
223
|
+
hasNotes ? /* @__PURE__ */ jsx("th", { scope: "col", className: "border-b border-border px-3 py-2 text-left font-semibold", children: "Note" }) : null
|
|
224
|
+
] }) }),
|
|
225
|
+
/* @__PURE__ */ jsx("tbody", { children: data.fields.map((field) => /* @__PURE__ */ jsxs("tr", { children: [
|
|
226
|
+
/* @__PURE__ */ jsx("td", { className: "border-b border-border px-3 py-2", children: /* @__PURE__ */ jsxs("span", { className: "flex flex-wrap items-center gap-2", children: [
|
|
227
|
+
/* @__PURE__ */ jsx("span", { className: "font-mono text-xs text-foreground", children: field.name }),
|
|
228
|
+
field.change ? /* @__PURE__ */ jsx(ChangeBadge, { change: field.change }) : null
|
|
229
|
+
] }) }),
|
|
230
|
+
/* @__PURE__ */ jsx("td", { className: "border-b border-border px-3 py-2 font-mono text-xs text-muted-foreground", children: field.type ?? "" }),
|
|
231
|
+
hasNotes ? /* @__PURE__ */ jsx("td", { className: "border-b border-border px-3 py-2 text-foreground", children: field.note ?? "" }) : null
|
|
232
|
+
] }, field.name)) })
|
|
233
|
+
] }) }) });
|
|
234
|
+
}
|
|
235
|
+
function UnreadableBlock({ entry }) {
|
|
236
|
+
return /* @__PURE__ */ jsxs("div", { className: "my-2", "data-type": entry.type, children: [
|
|
237
|
+
/* @__PURE__ */ jsxs("p", { className: "mb-1 text-xs font-medium text-muted-foreground", children: [
|
|
238
|
+
entry.type,
|
|
239
|
+
" (unrecognised shape)"
|
|
240
|
+
] }),
|
|
241
|
+
/* @__PURE__ */ jsx(
|
|
242
|
+
"pre",
|
|
243
|
+
{
|
|
244
|
+
tabIndex: 0,
|
|
245
|
+
className: "overflow-x-auto rounded-md bg-muted p-3 font-mono text-xs text-foreground",
|
|
246
|
+
children: safeStringify(entry.data)
|
|
247
|
+
}
|
|
248
|
+
)
|
|
249
|
+
] });
|
|
250
|
+
}
|
|
251
|
+
function safeStringify(value) {
|
|
252
|
+
try {
|
|
253
|
+
return JSON.stringify(value, null, 2);
|
|
254
|
+
} catch {
|
|
255
|
+
return String(value);
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
var narrativeBlockRenderers = {
|
|
259
|
+
[FILE_TREE_TYPE]: (entry) => /* @__PURE__ */ jsx(FileTreeBlock, { entry }),
|
|
260
|
+
[DATA_MODEL_TYPE]: (entry) => /* @__PURE__ */ jsx(DataModelBlock, { entry })
|
|
261
|
+
};
|
|
262
|
+
|
|
263
|
+
// src/context/ReportRoot.tsx
|
|
264
|
+
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
265
|
+
var EMPTY_RENDERERS = {};
|
|
266
|
+
function ReportRoot({
|
|
267
|
+
report,
|
|
268
|
+
customRenderers,
|
|
269
|
+
renderers,
|
|
270
|
+
children
|
|
271
|
+
}) {
|
|
272
|
+
const value = useMemo(
|
|
273
|
+
() => ({
|
|
274
|
+
report,
|
|
275
|
+
// Narrative blocks render everywhere the report does (static SSR, the
|
|
276
|
+
// island, Astro) without every host wiring them up. A host renderer for
|
|
277
|
+
// the same type still wins.
|
|
278
|
+
customRenderers: { ...narrativeBlockRenderers, ...customRenderers },
|
|
279
|
+
renderers: renderers ?? EMPTY_RENDERERS
|
|
280
|
+
}),
|
|
281
|
+
[report, customRenderers, renderers]
|
|
282
|
+
);
|
|
283
|
+
return /* @__PURE__ */ jsx2(ReportContext.Provider, { value, children });
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
// src/hooks/useReport.ts
|
|
287
|
+
import { useContext } from "react";
|
|
288
|
+
function useReport() {
|
|
289
|
+
const ctx = useContext(ReportContext);
|
|
290
|
+
if (!ctx) {
|
|
291
|
+
throw new Error(
|
|
292
|
+
"useReport must be used inside <ReportRoot> or <Report>. Wrap your tree with one of those."
|
|
293
|
+
);
|
|
294
|
+
}
|
|
295
|
+
return ctx.report;
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
// ../executable-stories-core/dist/utils/duration.js
|
|
299
|
+
function formatDuration(ms) {
|
|
300
|
+
if (ms < 1e3) {
|
|
301
|
+
return `${Math.round(ms)} ms`;
|
|
302
|
+
}
|
|
303
|
+
if (ms < 6e4) {
|
|
304
|
+
return `${(ms / 1e3).toFixed(2)} s`;
|
|
305
|
+
}
|
|
306
|
+
const minutes = Math.floor(ms / 6e4);
|
|
307
|
+
const seconds = Math.floor(ms % 6e4 / 1e3);
|
|
308
|
+
if (minutes < 60) {
|
|
309
|
+
return seconds > 0 ? `${minutes}m ${seconds}s` : `${minutes}m`;
|
|
310
|
+
}
|
|
311
|
+
const hours = Math.floor(minutes / 60);
|
|
312
|
+
const remainingMinutes = minutes % 60;
|
|
313
|
+
return `${hours}h ${remainingMinutes}m`;
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
// src/components/doc/DocNote.tsx
|
|
145
317
|
import { jsx as jsx3 } from "react/jsx-runtime";
|
|
318
|
+
function DocNote({ entry }) {
|
|
319
|
+
return /* @__PURE__ */ jsx3("p", { className: "my-2 text-sm text-muted-foreground", children: entry.text });
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
// src/components/doc/DocTag.tsx
|
|
323
|
+
import { jsx as jsx4 } from "react/jsx-runtime";
|
|
146
324
|
function DocTag({ entry }) {
|
|
147
|
-
return /* @__PURE__ */
|
|
325
|
+
return /* @__PURE__ */ jsx4("ul", { className: "my-2 flex flex-wrap gap-1.5", "aria-label": "Tags", children: entry.names.map((n) => /* @__PURE__ */ jsx4("li", { children: /* @__PURE__ */ jsx4(Badge, { variant: "tag", children: n }) }, n)) });
|
|
148
326
|
}
|
|
149
327
|
|
|
150
328
|
// src/components/doc/DocKv.tsx
|
|
151
|
-
import { jsx as
|
|
329
|
+
import { jsx as jsx5, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
152
330
|
function formatValue(value) {
|
|
153
331
|
if (value === null) return "null";
|
|
154
332
|
if (typeof value === "string") return value;
|
|
@@ -160,19 +338,19 @@ function formatValue(value) {
|
|
|
160
338
|
}
|
|
161
339
|
}
|
|
162
340
|
function DocKv({ entry }) {
|
|
163
|
-
return /* @__PURE__ */
|
|
164
|
-
/* @__PURE__ */
|
|
165
|
-
/* @__PURE__ */
|
|
341
|
+
return /* @__PURE__ */ jsxs2("dl", { className: "my-2 flex flex-wrap items-baseline gap-x-2 text-sm", children: [
|
|
342
|
+
/* @__PURE__ */ jsx5("dt", { className: "font-semibold text-muted-foreground", children: entry.label }),
|
|
343
|
+
/* @__PURE__ */ jsx5("dd", { className: "font-mono text-foreground", children: formatValue(entry.value) })
|
|
166
344
|
] });
|
|
167
345
|
}
|
|
168
346
|
|
|
169
347
|
// src/hooks/useRenderers.ts
|
|
170
348
|
import { useContext as useContext2 } from "react";
|
|
171
|
-
var
|
|
349
|
+
var EMPTY_CUSTOM = {};
|
|
172
350
|
var EMPTY_RENDERERS2 = {};
|
|
173
351
|
function useCustomRenderers() {
|
|
174
352
|
const ctx = useContext2(ReportContext);
|
|
175
|
-
return ctx?.customRenderers ??
|
|
353
|
+
return ctx?.customRenderers ?? EMPTY_CUSTOM;
|
|
176
354
|
}
|
|
177
355
|
function useBuiltinRenderers() {
|
|
178
356
|
const ctx = useContext2(ReportContext);
|
|
@@ -180,37 +358,37 @@ function useBuiltinRenderers() {
|
|
|
180
358
|
}
|
|
181
359
|
|
|
182
360
|
// src/components/doc/DocCode.tsx
|
|
183
|
-
import { Fragment, jsx as
|
|
361
|
+
import { Fragment, jsx as jsx6, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
184
362
|
function CodeFigure({ label, children }) {
|
|
185
|
-
return /* @__PURE__ */
|
|
186
|
-
label ? /* @__PURE__ */
|
|
187
|
-
/* @__PURE__ */
|
|
363
|
+
return /* @__PURE__ */ jsxs3("figure", { className: "my-3", children: [
|
|
364
|
+
label ? /* @__PURE__ */ jsx6("figcaption", { className: "mb-1.5 text-xs font-medium text-muted-foreground", children: label }) : null,
|
|
365
|
+
/* @__PURE__ */ jsx6("pre", { tabIndex: 0, className: "overflow-x-auto rounded-md bg-muted p-3", children })
|
|
188
366
|
] });
|
|
189
367
|
}
|
|
190
368
|
function DocCode({ entry }) {
|
|
191
369
|
const renderers = useBuiltinRenderers();
|
|
192
370
|
if (renderers.code) {
|
|
193
|
-
return /* @__PURE__ */
|
|
371
|
+
return /* @__PURE__ */ jsx6(Fragment, { children: renderers.code(entry) });
|
|
194
372
|
}
|
|
195
|
-
return /* @__PURE__ */
|
|
373
|
+
return /* @__PURE__ */ jsx6(CodeFigure, { label: entry.label, children: /* @__PURE__ */ jsx6("code", { className: cn("font-mono text-xs", entry.lang && `language-${entry.lang}`), children: entry.content }) });
|
|
196
374
|
}
|
|
197
375
|
|
|
198
376
|
// src/components/doc/DocTable.tsx
|
|
199
|
-
import { jsx as
|
|
377
|
+
import { jsx as jsx7, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
200
378
|
function DocTable({ entry }) {
|
|
201
|
-
return /* @__PURE__ */
|
|
202
|
-
entry.label ? /* @__PURE__ */
|
|
203
|
-
/* @__PURE__ */
|
|
204
|
-
/* @__PURE__ */
|
|
205
|
-
/* @__PURE__ */
|
|
379
|
+
return /* @__PURE__ */ jsxs4("figure", { className: "my-3", children: [
|
|
380
|
+
entry.label ? /* @__PURE__ */ jsx7("figcaption", { className: "mb-1.5 text-xs font-medium text-muted-foreground", children: entry.label }) : null,
|
|
381
|
+
/* @__PURE__ */ jsx7("div", { tabIndex: 0, className: "overflow-x-auto rounded-md border border-border", children: /* @__PURE__ */ jsxs4("table", { className: "w-full border-collapse text-sm", children: [
|
|
382
|
+
/* @__PURE__ */ jsx7("thead", { children: /* @__PURE__ */ jsx7("tr", { className: "bg-muted/50", children: entry.columns.map((c) => /* @__PURE__ */ jsx7("th", { scope: "col", className: "border-b border-border px-3 py-2 text-left font-semibold", children: c }, c)) }) }),
|
|
383
|
+
/* @__PURE__ */ jsx7("tbody", { children: entry.rows.map((row, i) => /* @__PURE__ */ jsx7("tr", { children: row.map((cell2, j) => /* @__PURE__ */ jsx7("td", { className: "border-b border-border px-3 py-2 text-foreground", children: cell2 }, j)) }, i)) })
|
|
206
384
|
] }) })
|
|
207
385
|
] });
|
|
208
386
|
}
|
|
209
387
|
|
|
210
388
|
// src/components/doc/DocLink.tsx
|
|
211
|
-
import { jsx as
|
|
389
|
+
import { jsx as jsx8 } from "react/jsx-runtime";
|
|
212
390
|
function DocLink({ entry }) {
|
|
213
|
-
return /* @__PURE__ */
|
|
391
|
+
return /* @__PURE__ */ jsx8(
|
|
214
392
|
"a",
|
|
215
393
|
{
|
|
216
394
|
className: "text-sm font-medium text-primary underline underline-offset-2 hover:no-underline",
|
|
@@ -244,7 +422,7 @@ function isLocalFsPath(value) {
|
|
|
244
422
|
}
|
|
245
423
|
|
|
246
424
|
// src/components/doc/DocSection.tsx
|
|
247
|
-
import { Fragment as Fragment2, jsx as
|
|
425
|
+
import { Fragment as Fragment2, jsx as jsx9, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
248
426
|
function neutralizeUrl(value) {
|
|
249
427
|
return safeUrl(value) ?? "#";
|
|
250
428
|
}
|
|
@@ -255,12 +433,12 @@ function safeMarkdownHtml(markdown) {
|
|
|
255
433
|
function DocSection({ entry }) {
|
|
256
434
|
const renderers = useBuiltinRenderers();
|
|
257
435
|
if (renderers.section) {
|
|
258
|
-
return /* @__PURE__ */
|
|
436
|
+
return /* @__PURE__ */ jsx9(Fragment2, { children: renderers.section(entry) });
|
|
259
437
|
}
|
|
260
438
|
const html = safeMarkdownHtml(entry.markdown);
|
|
261
|
-
return /* @__PURE__ */
|
|
262
|
-
entry.title ? /* @__PURE__ */
|
|
263
|
-
/* @__PURE__ */
|
|
439
|
+
return /* @__PURE__ */ jsxs5("section", { className: "my-3 text-sm", "aria-label": entry.title, children: [
|
|
440
|
+
entry.title ? /* @__PURE__ */ jsx9("h4", { className: "mb-1 font-semibold text-foreground", children: entry.title }) : null,
|
|
441
|
+
/* @__PURE__ */ jsx9(
|
|
264
442
|
"div",
|
|
265
443
|
{
|
|
266
444
|
className: "es-doc-prose prose prose-sm max-w-none",
|
|
@@ -271,11 +449,11 @@ function DocSection({ entry }) {
|
|
|
271
449
|
}
|
|
272
450
|
|
|
273
451
|
// src/components/doc/DocMermaid.tsx
|
|
274
|
-
import { Fragment as Fragment3, jsx as
|
|
452
|
+
import { Fragment as Fragment3, jsx as jsx10, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
275
453
|
function MermaidSource({ entry, ref }) {
|
|
276
|
-
return /* @__PURE__ */
|
|
277
|
-
entry.title ? /* @__PURE__ */
|
|
278
|
-
/* @__PURE__ */
|
|
454
|
+
return /* @__PURE__ */ jsxs6("figure", { ref, className: "my-3", "aria-label": entry.title ?? "Diagram", children: [
|
|
455
|
+
entry.title ? /* @__PURE__ */ jsx10("figcaption", { className: "mb-1.5 text-xs font-medium text-muted-foreground", children: entry.title }) : null,
|
|
456
|
+
/* @__PURE__ */ jsx10(
|
|
279
457
|
"pre",
|
|
280
458
|
{
|
|
281
459
|
"data-mermaid": true,
|
|
@@ -289,24 +467,24 @@ function MermaidSource({ entry, ref }) {
|
|
|
289
467
|
function DocMermaid({ entry }) {
|
|
290
468
|
const renderers = useBuiltinRenderers();
|
|
291
469
|
if (renderers.mermaid) {
|
|
292
|
-
return /* @__PURE__ */
|
|
470
|
+
return /* @__PURE__ */ jsx10(Fragment3, { children: renderers.mermaid(entry) });
|
|
293
471
|
}
|
|
294
|
-
return /* @__PURE__ */
|
|
472
|
+
return /* @__PURE__ */ jsx10(MermaidSource, { entry });
|
|
295
473
|
}
|
|
296
474
|
|
|
297
475
|
// src/components/doc/DocScreenshot.tsx
|
|
298
|
-
import { jsx as
|
|
476
|
+
import { jsx as jsx11, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
299
477
|
function DocScreenshot({ entry }) {
|
|
300
478
|
const src = isLocalFsPath(entry.path) ? void 0 : safeImageUrl(entry.path);
|
|
301
479
|
if (!src) {
|
|
302
|
-
return /* @__PURE__ */
|
|
303
|
-
/* @__PURE__ */
|
|
304
|
-
/* @__PURE__ */
|
|
305
|
-
entry.alt ? /* @__PURE__ */
|
|
480
|
+
return /* @__PURE__ */ jsxs7("figure", { className: "my-3 rounded-md border border-dashed border-border p-3 text-sm text-muted-foreground", children: [
|
|
481
|
+
/* @__PURE__ */ jsx11("div", { className: "font-medium", children: "Screenshot unavailable" }),
|
|
482
|
+
/* @__PURE__ */ jsx11("div", { className: "mt-1 break-all font-mono text-xs", children: entry.path }),
|
|
483
|
+
entry.alt ? /* @__PURE__ */ jsx11("figcaption", { className: "mt-1.5 text-xs", children: entry.alt }) : null
|
|
306
484
|
] });
|
|
307
485
|
}
|
|
308
|
-
return /* @__PURE__ */
|
|
309
|
-
/* @__PURE__ */
|
|
486
|
+
return /* @__PURE__ */ jsxs7("figure", { className: "my-3", children: [
|
|
487
|
+
/* @__PURE__ */ jsx11(
|
|
310
488
|
"img",
|
|
311
489
|
{
|
|
312
490
|
src,
|
|
@@ -315,24 +493,24 @@ function DocScreenshot({ entry }) {
|
|
|
315
493
|
className: "max-w-full rounded-md border border-border"
|
|
316
494
|
}
|
|
317
495
|
),
|
|
318
|
-
entry.alt ? /* @__PURE__ */
|
|
496
|
+
entry.alt ? /* @__PURE__ */ jsx11("figcaption", { className: "mt-1.5 text-xs text-muted-foreground", children: entry.alt }) : null
|
|
319
497
|
] });
|
|
320
498
|
}
|
|
321
499
|
|
|
322
500
|
// src/components/doc/DocVideo.tsx
|
|
323
|
-
import { jsx as
|
|
501
|
+
import { jsx as jsx12, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
324
502
|
function DocVideo({ entry }) {
|
|
325
503
|
if (isLocalFsPath(entry.path)) {
|
|
326
|
-
return /* @__PURE__ */
|
|
327
|
-
/* @__PURE__ */
|
|
328
|
-
/* @__PURE__ */
|
|
329
|
-
entry.caption ? /* @__PURE__ */
|
|
504
|
+
return /* @__PURE__ */ jsxs8("figure", { className: "my-3 rounded-md border border-dashed border-border p-3 text-sm text-muted-foreground", children: [
|
|
505
|
+
/* @__PURE__ */ jsx12("div", { className: "font-medium", children: "Video unavailable" }),
|
|
506
|
+
/* @__PURE__ */ jsx12("div", { className: "mt-1 break-all font-mono text-xs", children: entry.path }),
|
|
507
|
+
entry.caption ? /* @__PURE__ */ jsx12("figcaption", { className: "mt-1.5 text-xs", children: entry.caption }) : null
|
|
330
508
|
] });
|
|
331
509
|
}
|
|
332
510
|
const src = safeUrl(entry.path);
|
|
333
511
|
const poster = safeUrl(entry.poster);
|
|
334
|
-
return /* @__PURE__ */
|
|
335
|
-
/* @__PURE__ */
|
|
512
|
+
return /* @__PURE__ */ jsxs8("figure", { className: "my-3", children: [
|
|
513
|
+
/* @__PURE__ */ jsx12(
|
|
336
514
|
"video",
|
|
337
515
|
{
|
|
338
516
|
controls: true,
|
|
@@ -342,21 +520,21 @@ function DocVideo({ entry }) {
|
|
|
342
520
|
className: "max-w-full rounded-md border border-border"
|
|
343
521
|
}
|
|
344
522
|
),
|
|
345
|
-
entry.caption ? /* @__PURE__ */
|
|
523
|
+
entry.caption ? /* @__PURE__ */ jsx12("figcaption", { className: "mt-1 text-xs text-muted-foreground", children: entry.caption }) : null
|
|
346
524
|
] });
|
|
347
525
|
}
|
|
348
526
|
|
|
349
527
|
// src/components/doc/DocHtml.tsx
|
|
350
|
-
import { jsx as
|
|
528
|
+
import { jsx as jsx13, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
351
529
|
function DocHtml({ entry }) {
|
|
352
530
|
const height = typeof entry.height === "number" ? `${entry.height}px` : entry.height ?? "400px";
|
|
353
531
|
const title = entry.title ?? "Embedded HTML";
|
|
354
532
|
const safeHref = safeUrl(entry.url ?? entry.path);
|
|
355
533
|
const frameProps = entry.content !== void 0 ? { srcDoc: entry.content } : { src: safeHref ?? "" };
|
|
356
|
-
return /* @__PURE__ */
|
|
357
|
-
/* @__PURE__ */
|
|
358
|
-
/* @__PURE__ */
|
|
359
|
-
safeHref ? /* @__PURE__ */
|
|
534
|
+
return /* @__PURE__ */ jsxs9("figure", { className: "my-3 overflow-hidden rounded-md border border-border", children: [
|
|
535
|
+
/* @__PURE__ */ jsxs9("figcaption", { className: "flex items-center justify-between border-b border-border bg-muted/40 px-3 py-1.5 text-xs font-medium text-muted-foreground", children: [
|
|
536
|
+
/* @__PURE__ */ jsx13("span", { children: entry.title ?? "HTML" }),
|
|
537
|
+
safeHref ? /* @__PURE__ */ jsx13(
|
|
360
538
|
"a",
|
|
361
539
|
{
|
|
362
540
|
href: safeHref,
|
|
@@ -369,7 +547,7 @@ function DocHtml({ entry }) {
|
|
|
369
547
|
}
|
|
370
548
|
) : null
|
|
371
549
|
] }),
|
|
372
|
-
/* @__PURE__ */
|
|
550
|
+
/* @__PURE__ */ jsx13(
|
|
373
551
|
"iframe",
|
|
374
552
|
{
|
|
375
553
|
...frameProps,
|
|
@@ -384,7 +562,7 @@ function DocHtml({ entry }) {
|
|
|
384
562
|
}
|
|
385
563
|
|
|
386
564
|
// src/components/doc/DocState.tsx
|
|
387
|
-
import { jsx as
|
|
565
|
+
import { jsx as jsx14 } from "react/jsx-runtime";
|
|
388
566
|
function DocState({ entry }) {
|
|
389
567
|
let json;
|
|
390
568
|
try {
|
|
@@ -392,23 +570,23 @@ function DocState({ entry }) {
|
|
|
392
570
|
} catch {
|
|
393
571
|
json = String(entry.value);
|
|
394
572
|
}
|
|
395
|
-
return /* @__PURE__ */
|
|
573
|
+
return /* @__PURE__ */ jsx14(CodeFigure, { label: entry.label ?? "State", children: /* @__PURE__ */ jsx14("code", { className: "font-mono text-xs language-json", children: json }) });
|
|
396
574
|
}
|
|
397
575
|
|
|
398
576
|
// src/components/doc/DocCustom.tsx
|
|
399
|
-
import { Fragment as Fragment4, jsx as
|
|
577
|
+
import { Fragment as Fragment4, jsx as jsx15, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
400
578
|
function DocCustom({ entry }) {
|
|
401
579
|
const renderers = useCustomRenderers();
|
|
402
580
|
const renderer = renderers[entry.type];
|
|
403
581
|
if (renderer) {
|
|
404
|
-
return /* @__PURE__ */
|
|
582
|
+
return /* @__PURE__ */ jsx15(Fragment4, { children: renderer(entry) });
|
|
405
583
|
}
|
|
406
|
-
return /* @__PURE__ */
|
|
407
|
-
/* @__PURE__ */
|
|
408
|
-
/* @__PURE__ */
|
|
584
|
+
return /* @__PURE__ */ jsxs10("div", { className: "my-2", "data-type": entry.type, children: [
|
|
585
|
+
/* @__PURE__ */ jsx15("p", { className: "mb-1 text-xs font-medium text-muted-foreground", children: entry.type }),
|
|
586
|
+
/* @__PURE__ */ jsx15("pre", { tabIndex: 0, className: "overflow-x-auto rounded-md bg-muted p-3 font-mono text-xs text-foreground", children: safeStringify2(entry.data) })
|
|
409
587
|
] });
|
|
410
588
|
}
|
|
411
|
-
function
|
|
589
|
+
function safeStringify2(value) {
|
|
412
590
|
try {
|
|
413
591
|
return JSON.stringify(value, null, 2);
|
|
414
592
|
} catch {
|
|
@@ -417,47 +595,47 @@ function safeStringify(value) {
|
|
|
417
595
|
}
|
|
418
596
|
|
|
419
597
|
// src/components/doc/DocEntry.tsx
|
|
420
|
-
import { jsx as
|
|
598
|
+
import { jsx as jsx16 } from "react/jsx-runtime";
|
|
421
599
|
function DocEntry({ entry }) {
|
|
422
600
|
switch (entry.kind) {
|
|
423
601
|
case "note":
|
|
424
|
-
return /* @__PURE__ */
|
|
602
|
+
return /* @__PURE__ */ jsx16(DocNote, { entry });
|
|
425
603
|
case "tag":
|
|
426
|
-
return /* @__PURE__ */
|
|
604
|
+
return /* @__PURE__ */ jsx16(DocTag, { entry });
|
|
427
605
|
case "kv":
|
|
428
|
-
return /* @__PURE__ */
|
|
606
|
+
return /* @__PURE__ */ jsx16(DocKv, { entry });
|
|
429
607
|
case "code":
|
|
430
|
-
return /* @__PURE__ */
|
|
608
|
+
return /* @__PURE__ */ jsx16(DocCode, { entry });
|
|
431
609
|
case "table":
|
|
432
|
-
return /* @__PURE__ */
|
|
610
|
+
return /* @__PURE__ */ jsx16(DocTable, { entry });
|
|
433
611
|
case "link":
|
|
434
|
-
return /* @__PURE__ */
|
|
612
|
+
return /* @__PURE__ */ jsx16(DocLink, { entry });
|
|
435
613
|
case "section":
|
|
436
|
-
return /* @__PURE__ */
|
|
614
|
+
return /* @__PURE__ */ jsx16(DocSection, { entry });
|
|
437
615
|
case "mermaid":
|
|
438
|
-
return /* @__PURE__ */
|
|
616
|
+
return /* @__PURE__ */ jsx16(DocMermaid, { entry });
|
|
439
617
|
case "screenshot":
|
|
440
|
-
return /* @__PURE__ */
|
|
618
|
+
return /* @__PURE__ */ jsx16(DocScreenshot, { entry });
|
|
441
619
|
case "video":
|
|
442
|
-
return /* @__PURE__ */
|
|
620
|
+
return /* @__PURE__ */ jsx16(DocVideo, { entry });
|
|
443
621
|
case "html":
|
|
444
|
-
return /* @__PURE__ */
|
|
622
|
+
return /* @__PURE__ */ jsx16(DocHtml, { entry });
|
|
445
623
|
case "state":
|
|
446
|
-
return /* @__PURE__ */
|
|
624
|
+
return /* @__PURE__ */ jsx16(DocState, { entry });
|
|
447
625
|
case "custom":
|
|
448
|
-
return /* @__PURE__ */
|
|
626
|
+
return /* @__PURE__ */ jsx16(DocCustom, { entry });
|
|
449
627
|
}
|
|
450
628
|
}
|
|
451
629
|
|
|
452
630
|
// src/components/ReportDocEntries.tsx
|
|
453
|
-
import { Fragment as Fragment5, jsx as
|
|
631
|
+
import { Fragment as Fragment5, jsx as jsx17 } from "react/jsx-runtime";
|
|
454
632
|
function ReportDocEntries({ entries }) {
|
|
455
633
|
if (entries.length === 0) return null;
|
|
456
|
-
return /* @__PURE__ */
|
|
634
|
+
return /* @__PURE__ */ jsx17(Fragment5, { children: entries.map((entry, i) => /* @__PURE__ */ jsx17(DocEntry, { entry }, i)) });
|
|
457
635
|
}
|
|
458
636
|
|
|
459
637
|
// src/lib/step-params.tsx
|
|
460
|
-
import { jsx as
|
|
638
|
+
import { jsx as jsx18 } from "react/jsx-runtime";
|
|
461
639
|
var STEP_PARAM_PATTERN = /"[^"]*"|(?<![\w.-])\d+(?:\.\d+)?(?![\w.-])/g;
|
|
462
640
|
function highlightStepParams(text) {
|
|
463
641
|
const matches = Array.from(text.matchAll(STEP_PARAM_PATTERN));
|
|
@@ -469,7 +647,7 @@ function highlightStepParams(text) {
|
|
|
469
647
|
const end = start + match[0].length;
|
|
470
648
|
if (start > lastIndex) nodes.push(text.slice(lastIndex, start));
|
|
471
649
|
nodes.push(
|
|
472
|
-
/* @__PURE__ */
|
|
650
|
+
/* @__PURE__ */ jsx18("span", { className: "font-medium text-step-param italic", children: match[0] }, i)
|
|
473
651
|
);
|
|
474
652
|
lastIndex = end;
|
|
475
653
|
});
|
|
@@ -478,7 +656,7 @@ function highlightStepParams(text) {
|
|
|
478
656
|
}
|
|
479
657
|
|
|
480
658
|
// src/components/ReportSteps.tsx
|
|
481
|
-
import { jsx as
|
|
659
|
+
import { jsx as jsx19, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
482
660
|
var STEP_GLYPH = {
|
|
483
661
|
passed: "\u2713",
|
|
484
662
|
failed: "\u2717",
|
|
@@ -493,21 +671,21 @@ var STEP_GLYPH_COLOR = {
|
|
|
493
671
|
};
|
|
494
672
|
function ReportSteps({ scenario }) {
|
|
495
673
|
if (scenario.steps.length === 0) return null;
|
|
496
|
-
return /* @__PURE__ */
|
|
674
|
+
return /* @__PURE__ */ jsx19("ol", { "data-slot": "steps", className: "flex flex-col", children: scenario.steps.map((step) => /* @__PURE__ */ jsx19(ReportStepItem, { step }, step.id)) });
|
|
497
675
|
}
|
|
498
676
|
function ReportStepItem({ step }) {
|
|
499
677
|
const kw = step.keyword.toLowerCase();
|
|
500
678
|
const continuation = kw === "and" || kw === "but";
|
|
501
|
-
return /* @__PURE__ */
|
|
679
|
+
return /* @__PURE__ */ jsxs11(
|
|
502
680
|
"li",
|
|
503
681
|
{
|
|
504
682
|
id: step.id,
|
|
505
683
|
"data-status": step.status,
|
|
506
684
|
className: cn("py-1.5 text-[0.8125rem] leading-normal", continuation && "pl-5"),
|
|
507
685
|
children: [
|
|
508
|
-
/* @__PURE__ */
|
|
509
|
-
/* @__PURE__ */
|
|
510
|
-
/* @__PURE__ */
|
|
686
|
+
/* @__PURE__ */ jsxs11("div", { className: "flex items-baseline gap-2", children: [
|
|
687
|
+
/* @__PURE__ */ jsx19("span", { "aria-hidden": true, className: cn("w-4 shrink-0 text-center text-xs", STEP_GLYPH_COLOR[step.status]), children: STEP_GLYPH[step.status] ?? "\u25CB" }),
|
|
688
|
+
/* @__PURE__ */ jsx19(
|
|
511
689
|
"span",
|
|
512
690
|
{
|
|
513
691
|
className: cn(
|
|
@@ -517,10 +695,10 @@ function ReportStepItem({ step }) {
|
|
|
517
695
|
children: step.keyword
|
|
518
696
|
}
|
|
519
697
|
),
|
|
520
|
-
/* @__PURE__ */
|
|
521
|
-
step.durationMs > 0 ? /* @__PURE__ */
|
|
698
|
+
/* @__PURE__ */ jsx19("span", { className: "flex-1 text-foreground", children: highlightStepParams(step.text) }),
|
|
699
|
+
step.durationMs > 0 ? /* @__PURE__ */ jsx19("span", { className: "shrink-0 whitespace-nowrap font-mono text-[0.6875rem] text-muted-foreground", children: formatDuration(step.durationMs) }) : null
|
|
522
700
|
] }),
|
|
523
|
-
step.errorMessage ? /* @__PURE__ */
|
|
701
|
+
step.errorMessage ? /* @__PURE__ */ jsx19(
|
|
524
702
|
"pre",
|
|
525
703
|
{
|
|
526
704
|
role: "alert",
|
|
@@ -528,7 +706,7 @@ function ReportStepItem({ step }) {
|
|
|
528
706
|
children: step.errorMessage
|
|
529
707
|
}
|
|
530
708
|
) : null,
|
|
531
|
-
step.docEntries.length > 0 ? /* @__PURE__ */
|
|
709
|
+
step.docEntries.length > 0 ? /* @__PURE__ */ jsx19("div", { "data-es-docs": true, className: "mt-2 ml-6", children: /* @__PURE__ */ jsx19(ReportDocEntries, { entries: step.docEntries }) }) : null
|
|
532
710
|
]
|
|
533
711
|
}
|
|
534
712
|
);
|
|
@@ -653,7 +831,7 @@ function extractStoryboardFrames(scenario) {
|
|
|
653
831
|
}
|
|
654
832
|
|
|
655
833
|
// src/components/ReportStoryboard.tsx
|
|
656
|
-
import { jsx as
|
|
834
|
+
import { jsx as jsx20, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
657
835
|
var FRAME_GLYPH = {
|
|
658
836
|
passed: "\u2713",
|
|
659
837
|
failed: "\u2717",
|
|
@@ -669,32 +847,32 @@ var FRAME_GLYPH_COLOR = {
|
|
|
669
847
|
function ReportStoryboard({ scenario }) {
|
|
670
848
|
const frames = extractStoryboardFrames(scenario);
|
|
671
849
|
if (frames.length < 2) return null;
|
|
672
|
-
return /* @__PURE__ */
|
|
673
|
-
/* @__PURE__ */
|
|
674
|
-
/* @__PURE__ */
|
|
850
|
+
return /* @__PURE__ */ jsxs12("section", { "data-slot": "storyboard", "aria-label": "Storyboard", className: "mb-3", children: [
|
|
851
|
+
/* @__PURE__ */ jsx20("h4", { className: "mb-1.5 text-xs font-semibold tracking-wide text-muted-foreground uppercase", children: "Storyboard" }),
|
|
852
|
+
/* @__PURE__ */ jsx20("ol", { className: "flex items-start gap-3 overflow-x-auto pb-2", children: frames.map((frame) => /* @__PURE__ */ jsx20(StoryboardFrameItem, { frame }, frame.stepId)) })
|
|
675
853
|
] });
|
|
676
854
|
}
|
|
677
855
|
function StoryboardFrameItem({ frame }) {
|
|
678
856
|
const label = `${frame.keyword} ${frame.text}`;
|
|
679
857
|
const hasStates = frame.states.length > 0;
|
|
680
|
-
const caption = /* @__PURE__ */
|
|
681
|
-
/* @__PURE__ */
|
|
682
|
-
/* @__PURE__ */
|
|
683
|
-
/* @__PURE__ */
|
|
858
|
+
const caption = /* @__PURE__ */ jsxs12("p", { className: "mt-1 flex items-baseline gap-1.5 text-[0.6875rem] leading-snug", children: [
|
|
859
|
+
/* @__PURE__ */ jsx20("span", { "aria-hidden": true, className: cn("shrink-0", FRAME_GLYPH_COLOR[frame.status]), children: FRAME_GLYPH[frame.status] ?? "\u25CB" }),
|
|
860
|
+
/* @__PURE__ */ jsxs12("span", { className: "min-w-0", children: [
|
|
861
|
+
/* @__PURE__ */ jsx20("span", { className: "font-mono font-semibold text-keyword", children: frame.keyword }),
|
|
684
862
|
" ",
|
|
685
|
-
/* @__PURE__ */
|
|
863
|
+
/* @__PURE__ */ jsx20("span", { className: "text-muted-foreground", children: frame.screenshot?.alt ?? frame.text })
|
|
686
864
|
] })
|
|
687
865
|
] });
|
|
688
866
|
return (
|
|
689
867
|
// State cards need room for diff rows; screenshot-only frames keep the
|
|
690
868
|
// original narrow film-cell width (and DOM) unchanged.
|
|
691
|
-
/* @__PURE__ */
|
|
692
|
-
frame.screenshot ? /* @__PURE__ */
|
|
693
|
-
hasStates ? /* @__PURE__ */
|
|
869
|
+
/* @__PURE__ */ jsxs12("li", { className: cn("shrink-0", hasStates ? "w-64" : "w-40"), children: [
|
|
870
|
+
frame.screenshot ? /* @__PURE__ */ jsx20(FrameScreenshot, { frame, label }) : null,
|
|
871
|
+
hasStates ? /* @__PURE__ */ jsx20("div", { className: cn("flex flex-col gap-1.5", frame.screenshot && "mt-1.5"), children: frame.states.map((card, i) => /* @__PURE__ */ jsx20(StateCardView, { card }, card.label ?? i)) }) : null,
|
|
694
872
|
frame.screenshot ? caption : (
|
|
695
873
|
// No screenshot means no image anchor, so the caption carries the
|
|
696
874
|
// jump-to-step link instead.
|
|
697
|
-
/* @__PURE__ */
|
|
875
|
+
/* @__PURE__ */ jsx20("a", { href: `#${frame.stepId}`, "aria-label": `Jump to step: ${label}`, className: "block hover:underline", children: caption })
|
|
698
876
|
)
|
|
699
877
|
] })
|
|
700
878
|
);
|
|
@@ -702,13 +880,13 @@ function StoryboardFrameItem({ frame }) {
|
|
|
702
880
|
function FrameScreenshot({ frame, label }) {
|
|
703
881
|
const path = frame.screenshot?.path ?? "";
|
|
704
882
|
const src = isLocalFsPath(path) ? void 0 : safeImageUrl(path);
|
|
705
|
-
return /* @__PURE__ */
|
|
883
|
+
return /* @__PURE__ */ jsx20(
|
|
706
884
|
"a",
|
|
707
885
|
{
|
|
708
886
|
href: `#${frame.stepId}`,
|
|
709
887
|
"aria-label": `Jump to step: ${label}`,
|
|
710
888
|
className: "block overflow-hidden rounded-md border border-border transition-colors hover:border-ring",
|
|
711
|
-
children: src ? /* @__PURE__ */
|
|
889
|
+
children: src ? /* @__PURE__ */ jsx20(
|
|
712
890
|
"img",
|
|
713
891
|
{
|
|
714
892
|
src,
|
|
@@ -716,7 +894,7 @@ function FrameScreenshot({ frame, label }) {
|
|
|
716
894
|
loading: "lazy",
|
|
717
895
|
className: "h-24 w-full bg-muted object-cover object-top"
|
|
718
896
|
}
|
|
719
|
-
) : /* @__PURE__ */
|
|
897
|
+
) : /* @__PURE__ */ jsx20("span", { className: "flex h-24 w-full items-center justify-center border-b border-dashed border-border bg-muted px-2 text-center text-[0.6875rem] text-muted-foreground", children: "Screenshot unavailable" })
|
|
720
898
|
}
|
|
721
899
|
);
|
|
722
900
|
}
|
|
@@ -735,12 +913,12 @@ function prettyJson(value) {
|
|
|
735
913
|
function StateCardView({ card }) {
|
|
736
914
|
const json = prettyJson(card.value);
|
|
737
915
|
const firstCapture = card.changes === void 0;
|
|
738
|
-
return /* @__PURE__ */
|
|
739
|
-
/* @__PURE__ */
|
|
740
|
-
/* @__PURE__ */
|
|
741
|
-
firstCapture ? /* @__PURE__ */
|
|
916
|
+
return /* @__PURE__ */ jsxs12("div", { "data-slot": "state-card", className: "rounded-md border border-border bg-card p-2", children: [
|
|
917
|
+
/* @__PURE__ */ jsxs12("p", { className: "flex flex-wrap items-baseline gap-1.5", children: [
|
|
918
|
+
/* @__PURE__ */ jsx20("span", { className: "inline-flex rounded-full border border-border px-1.5 font-mono text-[0.625rem] font-medium text-muted-foreground", children: card.label ?? "State" }),
|
|
919
|
+
firstCapture ? /* @__PURE__ */ jsx20("span", { className: "text-[0.625rem] text-muted-foreground italic", children: "first capture" }) : null
|
|
742
920
|
] }),
|
|
743
|
-
!firstCapture && (card.changes && card.changes.length > 0 ? /* @__PURE__ */
|
|
921
|
+
!firstCapture && (card.changes && card.changes.length > 0 ? /* @__PURE__ */ jsx20("ul", { className: "mt-1.5 flex flex-col gap-0.5", children: card.changes.map((change, i) => /* @__PURE__ */ jsx20(
|
|
744
922
|
"li",
|
|
745
923
|
{
|
|
746
924
|
className: cn(
|
|
@@ -750,15 +928,15 @@ function StateCardView({ card }) {
|
|
|
750
928
|
children: summarizeStateChanges([change])[0]
|
|
751
929
|
},
|
|
752
930
|
i
|
|
753
|
-
)) }) : /* @__PURE__ */
|
|
754
|
-
/* @__PURE__ */
|
|
931
|
+
)) }) : /* @__PURE__ */ jsx20("p", { className: "mt-1.5 text-[0.625rem] text-muted-foreground", children: "No changes" })),
|
|
932
|
+
/* @__PURE__ */ jsxs12(
|
|
755
933
|
"details",
|
|
756
934
|
{
|
|
757
935
|
open: firstCapture && json.length <= 240,
|
|
758
936
|
className: cn(firstCapture ? "mt-1.5" : "mt-1"),
|
|
759
937
|
children: [
|
|
760
|
-
/* @__PURE__ */
|
|
761
|
-
/* @__PURE__ */
|
|
938
|
+
/* @__PURE__ */ jsx20("summary", { className: "cursor-pointer text-[0.625rem] text-muted-foreground hover:text-foreground", children: "Snapshot" }),
|
|
939
|
+
/* @__PURE__ */ jsx20("pre", { tabIndex: 0, className: "mt-1 max-h-48 overflow-auto rounded-sm bg-muted p-1.5 font-mono text-[0.625rem] leading-snug", children: json })
|
|
762
940
|
]
|
|
763
941
|
}
|
|
764
942
|
)
|
|
@@ -766,17 +944,17 @@ function StateCardView({ card }) {
|
|
|
766
944
|
}
|
|
767
945
|
|
|
768
946
|
// src/components/ReportAttachments.tsx
|
|
769
|
-
import { Fragment as Fragment6, jsx as
|
|
947
|
+
import { Fragment as Fragment6, jsx as jsx21, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
770
948
|
function ReportAttachments({ attachments }) {
|
|
771
949
|
if (attachments.length === 0) return null;
|
|
772
950
|
return (
|
|
773
951
|
// role="group" (not a labelled <section>) so multiple scenarios' attachment
|
|
774
952
|
// blocks don't create duplicate "Attachments" region landmarks.
|
|
775
|
-
/* @__PURE__ */
|
|
953
|
+
/* @__PURE__ */ jsx21("div", { role: "group", "aria-label": "Attachments", className: "mt-3 flex flex-col gap-2", children: attachments.map((att, i) => {
|
|
776
954
|
const dataUri = att.contentEncoding === "BASE64" ? `data:${att.mediaType};base64,${att.body}` : `data:${att.mediaType},${encodeURIComponent(att.body)}`;
|
|
777
955
|
const isImage = att.mediaType.startsWith("image/");
|
|
778
|
-
return /* @__PURE__ */
|
|
779
|
-
/* @__PURE__ */
|
|
956
|
+
return /* @__PURE__ */ jsx21("figure", { className: "m-0", children: isImage ? /* @__PURE__ */ jsxs13(Fragment6, { children: [
|
|
957
|
+
/* @__PURE__ */ jsx21(
|
|
780
958
|
"img",
|
|
781
959
|
{
|
|
782
960
|
src: dataUri,
|
|
@@ -785,8 +963,8 @@ function ReportAttachments({ attachments }) {
|
|
|
785
963
|
className: "max-w-full rounded-md border border-border"
|
|
786
964
|
}
|
|
787
965
|
),
|
|
788
|
-
/* @__PURE__ */
|
|
789
|
-
] }) : /* @__PURE__ */
|
|
966
|
+
/* @__PURE__ */ jsx21("figcaption", { className: "mt-1 text-xs text-muted-foreground", children: att.name })
|
|
967
|
+
] }) : /* @__PURE__ */ jsxs13(
|
|
790
968
|
"a",
|
|
791
969
|
{
|
|
792
970
|
href: dataUri,
|
|
@@ -795,7 +973,7 @@ function ReportAttachments({ attachments }) {
|
|
|
795
973
|
children: [
|
|
796
974
|
att.name,
|
|
797
975
|
" ",
|
|
798
|
-
/* @__PURE__ */
|
|
976
|
+
/* @__PURE__ */ jsxs13("span", { className: "text-muted-foreground", children: [
|
|
799
977
|
"(",
|
|
800
978
|
att.mediaType,
|
|
801
979
|
")"
|
|
@@ -883,7 +1061,7 @@ function traceWindow(rows) {
|
|
|
883
1061
|
}
|
|
884
1062
|
|
|
885
1063
|
// src/components/ReportTrace.tsx
|
|
886
|
-
import { jsx as
|
|
1064
|
+
import { jsx as jsx22, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
887
1065
|
var BAR_COLOR = {
|
|
888
1066
|
ok: "bg-pass",
|
|
889
1067
|
error: "bg-fail",
|
|
@@ -894,8 +1072,8 @@ function ReportTrace({ spans }) {
|
|
|
894
1072
|
const rows = toTraceRows(spans);
|
|
895
1073
|
if (rows.length === 0) return null;
|
|
896
1074
|
const { minStartMs, totalMs } = traceWindow(rows);
|
|
897
|
-
return /* @__PURE__ */
|
|
898
|
-
/* @__PURE__ */
|
|
1075
|
+
return /* @__PURE__ */ jsxs14("details", { className: "mt-3 rounded-md border border-border bg-muted/30", children: [
|
|
1076
|
+
/* @__PURE__ */ jsxs14("summary", { className: "cursor-pointer px-3 py-2 text-xs font-medium text-muted-foreground", children: [
|
|
899
1077
|
"Trace (",
|
|
900
1078
|
rows.length,
|
|
901
1079
|
" span",
|
|
@@ -904,11 +1082,11 @@ function ReportTrace({ spans }) {
|
|
|
904
1082
|
formatDuration(totalMs),
|
|
905
1083
|
")"
|
|
906
1084
|
] }),
|
|
907
|
-
/* @__PURE__ */
|
|
1085
|
+
/* @__PURE__ */ jsx22("ul", { className: "flex flex-col gap-0.5 px-3 pb-3 font-mono text-[0.6875rem]", children: rows.map((row, i) => {
|
|
908
1086
|
const leftPct = (row.startTimeMs - minStartMs) / totalMs * 100;
|
|
909
1087
|
const widthPct = Math.max(row.durationMs / totalMs * 100, 0.5);
|
|
910
|
-
return /* @__PURE__ */
|
|
911
|
-
/* @__PURE__ */
|
|
1088
|
+
return /* @__PURE__ */ jsxs14("li", { className: "flex items-center gap-2", children: [
|
|
1089
|
+
/* @__PURE__ */ jsx22(
|
|
912
1090
|
"span",
|
|
913
1091
|
{
|
|
914
1092
|
className: "min-w-0 flex-1 truncate text-foreground",
|
|
@@ -917,14 +1095,14 @@ function ReportTrace({ spans }) {
|
|
|
917
1095
|
children: row.name
|
|
918
1096
|
}
|
|
919
1097
|
),
|
|
920
|
-
/* @__PURE__ */
|
|
1098
|
+
/* @__PURE__ */ jsx22("span", { className: "relative h-3 w-1/2 shrink-0 overflow-hidden rounded-sm bg-border/40", children: /* @__PURE__ */ jsx22(
|
|
921
1099
|
"span",
|
|
922
1100
|
{
|
|
923
1101
|
className: cn("absolute top-0 h-full rounded-sm", BAR_COLOR[row.status]),
|
|
924
1102
|
style: { left: `${leftPct}%`, width: `${widthPct}%` }
|
|
925
1103
|
}
|
|
926
1104
|
) }),
|
|
927
|
-
/* @__PURE__ */
|
|
1105
|
+
/* @__PURE__ */ jsx22("span", { className: "w-16 shrink-0 text-right text-muted-foreground", children: formatDuration(row.durationMs) })
|
|
928
1106
|
] }, `${row.spanId}-${i}`);
|
|
929
1107
|
}) })
|
|
930
1108
|
] });
|
|
@@ -993,7 +1171,7 @@ function diffSinceLastRun(history, scenarios) {
|
|
|
993
1171
|
}
|
|
994
1172
|
|
|
995
1173
|
// src/components/ScenarioRunHistory.tsx
|
|
996
|
-
import { Fragment as Fragment7, jsx as
|
|
1174
|
+
import { Fragment as Fragment7, jsx as jsx23, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
997
1175
|
var MAX_DOTS = 10;
|
|
998
1176
|
var DOT_COLOR = {
|
|
999
1177
|
passed: "bg-pass",
|
|
@@ -1013,16 +1191,16 @@ function ScenarioRunHistory({ scenarioId }) {
|
|
|
1013
1191
|
const recent = entries.slice(-MAX_DOTS);
|
|
1014
1192
|
const flaky = flakinessOf(recent) === "flaky";
|
|
1015
1193
|
const summary = flaky ? `${describeRunHistory(recent)} \xB7 Flaky` : describeRunHistory(recent);
|
|
1016
|
-
return /* @__PURE__ */
|
|
1017
|
-
flaky ? /* @__PURE__ */
|
|
1018
|
-
/* @__PURE__ */
|
|
1194
|
+
return /* @__PURE__ */ jsxs15(Fragment7, { children: [
|
|
1195
|
+
flaky ? /* @__PURE__ */ jsx23(Badge, { variant: "pending", "aria-label": "Flaky: status flips between recent runs", title: summary, children: "Flaky" }) : null,
|
|
1196
|
+
/* @__PURE__ */ jsx23(
|
|
1019
1197
|
"span",
|
|
1020
1198
|
{
|
|
1021
1199
|
role: "img",
|
|
1022
1200
|
"aria-label": `Run history: ${summary}`,
|
|
1023
1201
|
title: summary,
|
|
1024
1202
|
className: "flex shrink-0 items-center gap-[3px]",
|
|
1025
|
-
children: recent.map((e, i) => /* @__PURE__ */
|
|
1203
|
+
children: recent.map((e, i) => /* @__PURE__ */ jsx23(
|
|
1026
1204
|
"span",
|
|
1027
1205
|
{
|
|
1028
1206
|
"aria-hidden": true,
|
|
@@ -1251,9 +1429,9 @@ function scenarioPermalink(scenario) {
|
|
|
1251
1429
|
|
|
1252
1430
|
// src/components/ui/card.tsx
|
|
1253
1431
|
import "react";
|
|
1254
|
-
import { jsx as
|
|
1432
|
+
import { jsx as jsx24 } from "react/jsx-runtime";
|
|
1255
1433
|
function Card({ className, ...props }) {
|
|
1256
|
-
return /* @__PURE__ */
|
|
1434
|
+
return /* @__PURE__ */ jsx24(
|
|
1257
1435
|
"div",
|
|
1258
1436
|
{
|
|
1259
1437
|
"data-slot": "card",
|
|
@@ -1266,7 +1444,7 @@ function Card({ className, ...props }) {
|
|
|
1266
1444
|
);
|
|
1267
1445
|
}
|
|
1268
1446
|
function CardHeader({ className, ...props }) {
|
|
1269
|
-
return /* @__PURE__ */
|
|
1447
|
+
return /* @__PURE__ */ jsx24(
|
|
1270
1448
|
"div",
|
|
1271
1449
|
{
|
|
1272
1450
|
"data-slot": "card-header",
|
|
@@ -1279,7 +1457,7 @@ function CardHeader({ className, ...props }) {
|
|
|
1279
1457
|
);
|
|
1280
1458
|
}
|
|
1281
1459
|
function CardContent({ className, ...props }) {
|
|
1282
|
-
return /* @__PURE__ */
|
|
1460
|
+
return /* @__PURE__ */ jsx24(
|
|
1283
1461
|
"div",
|
|
1284
1462
|
{
|
|
1285
1463
|
"data-slot": "card-content",
|
|
@@ -1293,13 +1471,13 @@ function CardContent({ className, ...props }) {
|
|
|
1293
1471
|
import "react";
|
|
1294
1472
|
import { Menu as MenuPrimitive } from "@base-ui/react/menu";
|
|
1295
1473
|
import { CheckIcon } from "lucide-react";
|
|
1296
|
-
import { jsx as
|
|
1474
|
+
import { jsx as jsx25, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
1297
1475
|
var itemClasses = "relative flex cursor-pointer items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 [&_svg:not([class*='text-'])]:text-muted-foreground";
|
|
1298
1476
|
function DropdownMenu(props) {
|
|
1299
|
-
return /* @__PURE__ */
|
|
1477
|
+
return /* @__PURE__ */ jsx25(MenuPrimitive.Root, { "data-slot": "dropdown-menu", ...props });
|
|
1300
1478
|
}
|
|
1301
1479
|
function DropdownMenuTrigger(props) {
|
|
1302
|
-
return /* @__PURE__ */
|
|
1480
|
+
return /* @__PURE__ */ jsx25(MenuPrimitive.Trigger, { "data-slot": "dropdown-menu-trigger", ...props });
|
|
1303
1481
|
}
|
|
1304
1482
|
function DropdownMenuContent({
|
|
1305
1483
|
className,
|
|
@@ -1307,14 +1485,14 @@ function DropdownMenuContent({
|
|
|
1307
1485
|
sideOffset = 4,
|
|
1308
1486
|
...props
|
|
1309
1487
|
}) {
|
|
1310
|
-
return /* @__PURE__ */
|
|
1488
|
+
return /* @__PURE__ */ jsx25(MenuPrimitive.Portal, { children: /* @__PURE__ */ jsx25(
|
|
1311
1489
|
MenuPrimitive.Positioner,
|
|
1312
1490
|
{
|
|
1313
1491
|
"data-slot": "dropdown-menu-positioner",
|
|
1314
1492
|
className: "z-50",
|
|
1315
1493
|
align,
|
|
1316
1494
|
sideOffset,
|
|
1317
|
-
children: /* @__PURE__ */
|
|
1495
|
+
children: /* @__PURE__ */ jsx25(
|
|
1318
1496
|
MenuPrimitive.Popup,
|
|
1319
1497
|
{
|
|
1320
1498
|
"data-slot": "dropdown-menu-content",
|
|
@@ -1332,7 +1510,7 @@ function DropdownMenuItem({
|
|
|
1332
1510
|
className,
|
|
1333
1511
|
...props
|
|
1334
1512
|
}) {
|
|
1335
|
-
return /* @__PURE__ */
|
|
1513
|
+
return /* @__PURE__ */ jsx25(
|
|
1336
1514
|
MenuPrimitive.Item,
|
|
1337
1515
|
{
|
|
1338
1516
|
"data-slot": "dropdown-menu-item",
|
|
@@ -1344,7 +1522,7 @@ function DropdownMenuItem({
|
|
|
1344
1522
|
|
|
1345
1523
|
// src/components/ReportScenario.tsx
|
|
1346
1524
|
import { LinkIcon, FileTextIcon, SparklesIcon, MoreHorizontalIcon } from "lucide-react";
|
|
1347
|
-
import { jsx as
|
|
1525
|
+
import { jsx as jsx26, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
1348
1526
|
var STATUS_META = {
|
|
1349
1527
|
passed: { label: "Passed", glyph: "\u2713", glyphColor: "text-pass", badgeVariant: "passed", showPill: false },
|
|
1350
1528
|
failed: { label: "Failed", glyph: "\u2717", glyphColor: "text-fail", badgeVariant: "failed", showPill: true },
|
|
@@ -1360,7 +1538,7 @@ function ReportScenario({ scenario, hideTitle = false }) {
|
|
|
1360
1538
|
const collapsible = collapse !== null && !hideTitle;
|
|
1361
1539
|
const collapsed = collapsible ? collapse.isCollapsed(scenario.id) : false;
|
|
1362
1540
|
const actions = useScenarioActions();
|
|
1363
|
-
return /* @__PURE__ */
|
|
1541
|
+
return /* @__PURE__ */ jsxs17(
|
|
1364
1542
|
Card,
|
|
1365
1543
|
{
|
|
1366
1544
|
id: scenario.id,
|
|
@@ -1368,10 +1546,10 @@ function ReportScenario({ scenario, hideTitle = false }) {
|
|
|
1368
1546
|
...hideTitle ? { "aria-label": `${scenario.title}, ${label}` } : { "aria-labelledby": titleId },
|
|
1369
1547
|
className: "gap-0 py-0",
|
|
1370
1548
|
children: [
|
|
1371
|
-
/* @__PURE__ */
|
|
1372
|
-
/* @__PURE__ */
|
|
1373
|
-
hideTitle ? null : /* @__PURE__ */
|
|
1374
|
-
collapsible ? /* @__PURE__ */
|
|
1549
|
+
/* @__PURE__ */ jsxs17(CardHeader, { className: "px-4 py-3", children: [
|
|
1550
|
+
/* @__PURE__ */ jsxs17("div", { className: cn("flex items-start gap-4", hideTitle ? "justify-end" : "justify-between"), children: [
|
|
1551
|
+
hideTitle ? null : /* @__PURE__ */ jsxs17("h3", { id: titleId, className: "flex items-center gap-2 text-sm font-medium text-foreground", children: [
|
|
1552
|
+
collapsible ? /* @__PURE__ */ jsx26(
|
|
1375
1553
|
"button",
|
|
1376
1554
|
{
|
|
1377
1555
|
type: "button",
|
|
@@ -1380,49 +1558,49 @@ function ReportScenario({ scenario, hideTitle = false }) {
|
|
|
1380
1558
|
"aria-controls": bodyId,
|
|
1381
1559
|
"aria-label": `Toggle ${scenario.title}`,
|
|
1382
1560
|
className: "shrink-0 cursor-pointer text-muted-foreground hover:text-foreground",
|
|
1383
|
-
children: /* @__PURE__ */
|
|
1561
|
+
children: /* @__PURE__ */ jsx26("span", { "aria-hidden": true, className: cn("inline-block text-xs transition-transform", !collapsed && "rotate-90"), children: "\u25B8" })
|
|
1384
1562
|
}
|
|
1385
1563
|
) : null,
|
|
1386
|
-
/* @__PURE__ */
|
|
1387
|
-
/* @__PURE__ */
|
|
1564
|
+
/* @__PURE__ */ jsx26("span", { "aria-hidden": true, className: cn("text-sm leading-none", meta.glyphColor), children: meta.glyph }),
|
|
1565
|
+
/* @__PURE__ */ jsx26("span", { children: scenario.title })
|
|
1388
1566
|
] }),
|
|
1389
|
-
/* @__PURE__ */
|
|
1390
|
-
/* @__PURE__ */
|
|
1391
|
-
scenario.durationMs > 0 ? /* @__PURE__ */
|
|
1392
|
-
meta.showPill ? /* @__PURE__ */
|
|
1393
|
-
actions ? /* @__PURE__ */
|
|
1394
|
-
/* @__PURE__ */
|
|
1567
|
+
/* @__PURE__ */ jsxs17("div", { className: "flex shrink-0 items-center gap-2", children: [
|
|
1568
|
+
/* @__PURE__ */ jsx26(ScenarioRunHistory, { scenarioId: scenario.id }),
|
|
1569
|
+
scenario.durationMs > 0 ? /* @__PURE__ */ jsx26("span", { className: "whitespace-nowrap font-mono text-[0.6875rem] text-muted-foreground", children: formatDuration(scenario.durationMs) }) : null,
|
|
1570
|
+
meta.showPill ? /* @__PURE__ */ jsx26(Badge, { variant: meta.badgeVariant, "aria-label": `Status: ${label}`, children: label }) : /* @__PURE__ */ jsx26("span", { className: "sr-only", children: `Status: ${label}` }),
|
|
1571
|
+
actions ? /* @__PURE__ */ jsxs17(DropdownMenu, { children: [
|
|
1572
|
+
/* @__PURE__ */ jsx26(
|
|
1395
1573
|
DropdownMenuTrigger,
|
|
1396
1574
|
{
|
|
1397
1575
|
"aria-label": `Actions for ${scenario.title}`,
|
|
1398
1576
|
className: "cursor-pointer rounded p-1 text-muted-foreground hover:bg-muted hover:text-foreground [&_svg]:size-4",
|
|
1399
|
-
children: /* @__PURE__ */
|
|
1577
|
+
children: /* @__PURE__ */ jsx26(MoreHorizontalIcon, { "aria-hidden": true })
|
|
1400
1578
|
}
|
|
1401
1579
|
),
|
|
1402
|
-
/* @__PURE__ */
|
|
1403
|
-
/* @__PURE__ */
|
|
1404
|
-
/* @__PURE__ */
|
|
1580
|
+
/* @__PURE__ */ jsxs17(DropdownMenuContent, { align: "end", children: [
|
|
1581
|
+
/* @__PURE__ */ jsxs17(DropdownMenuItem, { onClick: () => actions.copyLink(scenario), children: [
|
|
1582
|
+
/* @__PURE__ */ jsx26(LinkIcon, {}),
|
|
1405
1583
|
" Copy link"
|
|
1406
1584
|
] }),
|
|
1407
|
-
/* @__PURE__ */
|
|
1408
|
-
/* @__PURE__ */
|
|
1585
|
+
/* @__PURE__ */ jsxs17(DropdownMenuItem, { onClick: () => actions.copyMarkdown(scenario), children: [
|
|
1586
|
+
/* @__PURE__ */ jsx26(FileTextIcon, {}),
|
|
1409
1587
|
" Copy as Markdown"
|
|
1410
1588
|
] }),
|
|
1411
|
-
/* @__PURE__ */
|
|
1412
|
-
/* @__PURE__ */
|
|
1589
|
+
/* @__PURE__ */ jsxs17(DropdownMenuItem, { onClick: () => actions.copyPrompt(scenario), children: [
|
|
1590
|
+
/* @__PURE__ */ jsx26(SparklesIcon, {}),
|
|
1413
1591
|
" Explain with AI"
|
|
1414
1592
|
] })
|
|
1415
1593
|
] })
|
|
1416
1594
|
] }) : null
|
|
1417
1595
|
] })
|
|
1418
1596
|
] }),
|
|
1419
|
-
scenario.tags.length > 0 || (scenario.tickets?.length ?? 0) > 0 ? /* @__PURE__ */
|
|
1420
|
-
scenario.tags.map((t) => /* @__PURE__ */
|
|
1421
|
-
(scenario.tickets ?? []).map((ticket) => /* @__PURE__ */
|
|
1597
|
+
scenario.tags.length > 0 || (scenario.tickets?.length ?? 0) > 0 ? /* @__PURE__ */ jsxs17("ul", { "aria-label": "Tags and tickets", className: "flex flex-wrap gap-1.5", children: [
|
|
1598
|
+
scenario.tags.map((t) => /* @__PURE__ */ jsx26("li", { children: /* @__PURE__ */ jsx26(Badge, { variant: "tag", children: t }) }, `tag-${t}`)),
|
|
1599
|
+
(scenario.tickets ?? []).map((ticket) => /* @__PURE__ */ jsx26("li", { children: ticket.url ? /* @__PURE__ */ jsx26("a", { href: ticket.url, target: "_blank", rel: "noreferrer noopener", children: /* @__PURE__ */ jsx26(Badge, { variant: "outline", children: ticket.id }) }) : /* @__PURE__ */ jsx26(Badge, { variant: "outline", children: ticket.id }) }, `ticket-${ticket.id}`))
|
|
1422
1600
|
] }) : null
|
|
1423
1601
|
] }),
|
|
1424
|
-
/* @__PURE__ */
|
|
1425
|
-
scenario.errorMessage ? /* @__PURE__ */
|
|
1602
|
+
/* @__PURE__ */ jsxs17(CardContent, { id: bodyId, hidden: collapsed, className: "px-4 pt-0 pb-4", children: [
|
|
1603
|
+
scenario.errorMessage ? /* @__PURE__ */ jsx26(
|
|
1426
1604
|
"pre",
|
|
1427
1605
|
{
|
|
1428
1606
|
role: "alert",
|
|
@@ -1430,11 +1608,11 @@ function ReportScenario({ scenario, hideTitle = false }) {
|
|
|
1430
1608
|
children: scenario.errorMessage
|
|
1431
1609
|
}
|
|
1432
1610
|
) : null,
|
|
1433
|
-
/* @__PURE__ */
|
|
1434
|
-
/* @__PURE__ */
|
|
1435
|
-
scenario.docEntries.length > 0 ? /* @__PURE__ */
|
|
1436
|
-
/* @__PURE__ */
|
|
1437
|
-
/* @__PURE__ */
|
|
1611
|
+
/* @__PURE__ */ jsx26(ReportStoryboard, { scenario }),
|
|
1612
|
+
/* @__PURE__ */ jsx26(ReportSteps, { scenario }),
|
|
1613
|
+
scenario.docEntries.length > 0 ? /* @__PURE__ */ jsx26("div", { "data-es-docs": true, className: "mt-3", children: /* @__PURE__ */ jsx26(ReportDocEntries, { entries: scenario.docEntries }) }) : null,
|
|
1614
|
+
/* @__PURE__ */ jsx26(ReportAttachments, { attachments: scenario.attachments }),
|
|
1615
|
+
/* @__PURE__ */ jsx26(ReportTrace, { spans: scenario.otelSpans })
|
|
1438
1616
|
] })
|
|
1439
1617
|
]
|
|
1440
1618
|
}
|
|
@@ -1442,13 +1620,13 @@ function ReportScenario({ scenario, hideTitle = false }) {
|
|
|
1442
1620
|
}
|
|
1443
1621
|
|
|
1444
1622
|
// src/components/ReportScenarioList.tsx
|
|
1445
|
-
import { Fragment as Fragment8, jsx as
|
|
1623
|
+
import { Fragment as Fragment8, jsx as jsx27 } from "react/jsx-runtime";
|
|
1446
1624
|
function ReportScenarioList({ feature }) {
|
|
1447
|
-
return /* @__PURE__ */
|
|
1625
|
+
return /* @__PURE__ */ jsx27(Fragment8, { children: feature.scenarios.map((scenario) => /* @__PURE__ */ jsx27(ReportScenario, { scenario }, scenario.id)) });
|
|
1448
1626
|
}
|
|
1449
1627
|
|
|
1450
1628
|
// src/components/ReportFeature.tsx
|
|
1451
|
-
import { Fragment as Fragment9, jsx as
|
|
1629
|
+
import { Fragment as Fragment9, jsx as jsx28, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
1452
1630
|
function ReportFeature({ feature }) {
|
|
1453
1631
|
const titleId = `${feature.id}-title`;
|
|
1454
1632
|
const bodyId = `${feature.id}-body`;
|
|
@@ -1459,7 +1637,7 @@ function ReportFeature({ feature }) {
|
|
|
1459
1637
|
return (
|
|
1460
1638
|
// Suite = a section heading + a divider, NOT another bordered card. Drops a
|
|
1461
1639
|
// layer of nesting so the scenario cards below read as the primary unit.
|
|
1462
|
-
/* @__PURE__ */
|
|
1640
|
+
/* @__PURE__ */ jsxs18(
|
|
1463
1641
|
"section",
|
|
1464
1642
|
{
|
|
1465
1643
|
id: feature.id,
|
|
@@ -1467,9 +1645,9 @@ function ReportFeature({ feature }) {
|
|
|
1467
1645
|
"aria-labelledby": titleId,
|
|
1468
1646
|
className: "flex flex-col gap-3",
|
|
1469
1647
|
children: [
|
|
1470
|
-
/* @__PURE__ */
|
|
1471
|
-
/* @__PURE__ */
|
|
1472
|
-
/* @__PURE__ */
|
|
1648
|
+
/* @__PURE__ */ jsxs18("div", { className: "flex items-end justify-between gap-4 border-b border-border pb-2", children: [
|
|
1649
|
+
/* @__PURE__ */ jsxs18("div", { className: "min-w-0", children: [
|
|
1650
|
+
/* @__PURE__ */ jsx28("h2", { id: titleId, className: "text-base font-semibold tracking-tight text-foreground", children: collapse ? /* @__PURE__ */ jsxs18(
|
|
1473
1651
|
"button",
|
|
1474
1652
|
{
|
|
1475
1653
|
type: "button",
|
|
@@ -1478,31 +1656,31 @@ function ReportFeature({ feature }) {
|
|
|
1478
1656
|
"aria-controls": bodyId,
|
|
1479
1657
|
className: "flex w-full cursor-pointer items-center gap-2 text-left hover:text-foreground/80",
|
|
1480
1658
|
children: [
|
|
1481
|
-
/* @__PURE__ */
|
|
1482
|
-
/* @__PURE__ */
|
|
1659
|
+
/* @__PURE__ */ jsx28("span", { "aria-hidden": true, className: cn("shrink-0 text-xs text-muted-foreground transition-transform", !collapsed && "rotate-90"), children: "\u25B8" }),
|
|
1660
|
+
/* @__PURE__ */ jsx28("span", { className: "truncate", children: feature.title })
|
|
1483
1661
|
]
|
|
1484
1662
|
}
|
|
1485
1663
|
) : feature.title }),
|
|
1486
|
-
/* @__PURE__ */
|
|
1664
|
+
/* @__PURE__ */ jsx28("p", { className: cn("mt-0.5 truncate font-mono text-xs text-muted-foreground", collapse && "pl-5"), children: feature.sourceFile })
|
|
1487
1665
|
] }),
|
|
1488
|
-
/* @__PURE__ */
|
|
1666
|
+
/* @__PURE__ */ jsxs18(
|
|
1489
1667
|
"p",
|
|
1490
1668
|
{
|
|
1491
1669
|
className: "flex shrink-0 items-center gap-1.5 text-xs text-muted-foreground",
|
|
1492
1670
|
"aria-label": `${s.passed} passed, ${s.failed} failed, ${skipped} skipped`,
|
|
1493
1671
|
children: [
|
|
1494
|
-
/* @__PURE__ */
|
|
1672
|
+
/* @__PURE__ */ jsxs18("span", { children: [
|
|
1495
1673
|
s.passed,
|
|
1496
1674
|
" passed"
|
|
1497
1675
|
] }),
|
|
1498
|
-
/* @__PURE__ */
|
|
1499
|
-
/* @__PURE__ */
|
|
1676
|
+
/* @__PURE__ */ jsx28("span", { "aria-hidden": true, children: "\xB7" }),
|
|
1677
|
+
/* @__PURE__ */ jsxs18("span", { className: cn(s.failed > 0 && "font-medium text-fail"), children: [
|
|
1500
1678
|
s.failed,
|
|
1501
1679
|
" failed"
|
|
1502
1680
|
] }),
|
|
1503
|
-
skipped > 0 ? /* @__PURE__ */
|
|
1504
|
-
/* @__PURE__ */
|
|
1505
|
-
/* @__PURE__ */
|
|
1681
|
+
skipped > 0 ? /* @__PURE__ */ jsxs18(Fragment9, { children: [
|
|
1682
|
+
/* @__PURE__ */ jsx28("span", { "aria-hidden": true, children: "\xB7" }),
|
|
1683
|
+
/* @__PURE__ */ jsxs18("span", { children: [
|
|
1506
1684
|
skipped,
|
|
1507
1685
|
" skipped"
|
|
1508
1686
|
] })
|
|
@@ -1511,7 +1689,7 @@ function ReportFeature({ feature }) {
|
|
|
1511
1689
|
}
|
|
1512
1690
|
)
|
|
1513
1691
|
] }),
|
|
1514
|
-
/* @__PURE__ */
|
|
1692
|
+
/* @__PURE__ */ jsx28("div", { id: bodyId, hidden: collapsed, className: "flex flex-col gap-3", children: /* @__PURE__ */ jsx28(ReportScenarioList, { feature }) })
|
|
1515
1693
|
]
|
|
1516
1694
|
}
|
|
1517
1695
|
)
|
|
@@ -1519,17 +1697,17 @@ function ReportFeature({ feature }) {
|
|
|
1519
1697
|
}
|
|
1520
1698
|
|
|
1521
1699
|
// src/components/ReportFeatureList.tsx
|
|
1522
|
-
import { jsx as
|
|
1700
|
+
import { jsx as jsx29 } from "react/jsx-runtime";
|
|
1523
1701
|
function ReportFeatureList() {
|
|
1524
1702
|
const report = useReport();
|
|
1525
|
-
return /* @__PURE__ */
|
|
1703
|
+
return /* @__PURE__ */ jsx29("div", { className: "flex flex-col gap-8", children: report.features.map((feature) => /* @__PURE__ */ jsx29(ReportFeature, { feature }, feature.id)) });
|
|
1526
1704
|
}
|
|
1527
1705
|
|
|
1528
1706
|
// src/components/ui/empty.tsx
|
|
1529
1707
|
import { cva as cva2 } from "class-variance-authority";
|
|
1530
|
-
import { jsx as
|
|
1708
|
+
import { jsx as jsx30 } from "react/jsx-runtime";
|
|
1531
1709
|
function Empty({ className, ...props }) {
|
|
1532
|
-
return /* @__PURE__ */
|
|
1710
|
+
return /* @__PURE__ */ jsx30(
|
|
1533
1711
|
"div",
|
|
1534
1712
|
{
|
|
1535
1713
|
"data-slot": "empty",
|
|
@@ -1542,7 +1720,7 @@ function Empty({ className, ...props }) {
|
|
|
1542
1720
|
);
|
|
1543
1721
|
}
|
|
1544
1722
|
function EmptyHeader({ className, ...props }) {
|
|
1545
|
-
return /* @__PURE__ */
|
|
1723
|
+
return /* @__PURE__ */ jsx30(
|
|
1546
1724
|
"div",
|
|
1547
1725
|
{
|
|
1548
1726
|
"data-slot": "empty-header",
|
|
@@ -1569,7 +1747,7 @@ var emptyMediaVariants = cva2(
|
|
|
1569
1747
|
}
|
|
1570
1748
|
);
|
|
1571
1749
|
function EmptyTitle({ className, ...props }) {
|
|
1572
|
-
return /* @__PURE__ */
|
|
1750
|
+
return /* @__PURE__ */ jsx30(
|
|
1573
1751
|
"div",
|
|
1574
1752
|
{
|
|
1575
1753
|
"data-slot": "empty-title",
|
|
@@ -1580,16 +1758,16 @@ function EmptyTitle({ className, ...props }) {
|
|
|
1580
1758
|
}
|
|
1581
1759
|
|
|
1582
1760
|
// src/components/ReportEmpty.tsx
|
|
1583
|
-
import { jsx as
|
|
1761
|
+
import { jsx as jsx31 } from "react/jsx-runtime";
|
|
1584
1762
|
function ReportEmpty({ message }) {
|
|
1585
|
-
return /* @__PURE__ */
|
|
1763
|
+
return /* @__PURE__ */ jsx31(Empty, { "aria-live": "polite", className: "border", children: /* @__PURE__ */ jsx31(EmptyHeader, { children: /* @__PURE__ */ jsx31(EmptyTitle, { children: message ?? "No scenarios in this report." }) }) });
|
|
1586
1764
|
}
|
|
1587
1765
|
|
|
1588
1766
|
// src/components/ReportSummary.tsx
|
|
1589
|
-
import { jsx as
|
|
1767
|
+
import { jsx as jsx32, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
1590
1768
|
function ReportSummary({ className }) {
|
|
1591
1769
|
const report = useReport();
|
|
1592
|
-
return /* @__PURE__ */
|
|
1770
|
+
return /* @__PURE__ */ jsx32(
|
|
1593
1771
|
ReportSummaryView,
|
|
1594
1772
|
{
|
|
1595
1773
|
summary: report.summary,
|
|
@@ -1615,7 +1793,7 @@ function ReportSummaryView({ summary, className, ariaLabel }) {
|
|
|
1615
1793
|
if (summary.pending > 0) {
|
|
1616
1794
|
cards.push({ status: "pending", label: "Pending", value: summary.pending });
|
|
1617
1795
|
}
|
|
1618
|
-
return /* @__PURE__ */
|
|
1796
|
+
return /* @__PURE__ */ jsx32(
|
|
1619
1797
|
"dl",
|
|
1620
1798
|
{
|
|
1621
1799
|
className: cn(
|
|
@@ -1628,17 +1806,17 @@ function ReportSummaryView({ summary, className, ariaLabel }) {
|
|
|
1628
1806
|
"aria-label": ariaLabel,
|
|
1629
1807
|
children: cards.map((c) => {
|
|
1630
1808
|
const tone = TONE[c.status];
|
|
1631
|
-
return /* @__PURE__ */
|
|
1809
|
+
return /* @__PURE__ */ jsxs19(
|
|
1632
1810
|
"div",
|
|
1633
1811
|
{
|
|
1634
1812
|
"data-status": c.status,
|
|
1635
1813
|
className: "rounded-lg border bg-card px-4 py-3",
|
|
1636
1814
|
children: [
|
|
1637
|
-
/* @__PURE__ */
|
|
1638
|
-
/* @__PURE__ */
|
|
1815
|
+
/* @__PURE__ */ jsxs19("dt", { className: "flex items-center gap-1.5 font-mono text-[11px] font-medium uppercase tracking-wider text-muted-foreground", children: [
|
|
1816
|
+
/* @__PURE__ */ jsx32("span", { className: cn("size-1.5 shrink-0 rounded-full", tone.dot), "aria-hidden": "true" }),
|
|
1639
1817
|
c.label
|
|
1640
1818
|
] }),
|
|
1641
|
-
/* @__PURE__ */
|
|
1819
|
+
/* @__PURE__ */ jsx32("dd", { className: cn("mt-2 text-3xl font-semibold leading-none tracking-tight tabular-nums", tone.num), children: c.value })
|
|
1642
1820
|
]
|
|
1643
1821
|
},
|
|
1644
1822
|
c.status
|
|
@@ -1698,7 +1876,7 @@ function prUrl(ci) {
|
|
|
1698
1876
|
}
|
|
1699
1877
|
|
|
1700
1878
|
// src/components/ReportMeta.tsx
|
|
1701
|
-
import { jsx as
|
|
1879
|
+
import { jsx as jsx33, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
1702
1880
|
function ReportMeta() {
|
|
1703
1881
|
const report = useReport();
|
|
1704
1882
|
const items = [];
|
|
@@ -1721,13 +1899,13 @@ function ReportMeta() {
|
|
|
1721
1899
|
const short = sha.slice(0, 8);
|
|
1722
1900
|
items.push({
|
|
1723
1901
|
label: "Commit",
|
|
1724
|
-
value: url ? /* @__PURE__ */
|
|
1902
|
+
value: url ? /* @__PURE__ */ jsx33("a", { href: url, target: "_blank", rel: "noreferrer noopener", className: linkClass, children: short }) : short
|
|
1725
1903
|
});
|
|
1726
1904
|
}
|
|
1727
1905
|
if (report.ci) {
|
|
1728
1906
|
items.push({
|
|
1729
1907
|
label: "CI",
|
|
1730
|
-
value: report.ci.url ? /* @__PURE__ */
|
|
1908
|
+
value: report.ci.url ? /* @__PURE__ */ jsxs20("a", { href: report.ci.url, target: "_blank", rel: "noreferrer noopener", className: linkClass, children: [
|
|
1731
1909
|
ciDisplayName(report.ci.name),
|
|
1732
1910
|
report.ci.buildNumber ? ` #${report.ci.buildNumber}` : ""
|
|
1733
1911
|
] }) : `${ciDisplayName(report.ci.name)}${report.ci.buildNumber ? ` #${report.ci.buildNumber}` : ""}`
|
|
@@ -1738,7 +1916,7 @@ function ReportMeta() {
|
|
|
1738
1916
|
const label = `#${report.ci.prNumber}`;
|
|
1739
1917
|
items.push({
|
|
1740
1918
|
label: "PR",
|
|
1741
|
-
value: url ? /* @__PURE__ */
|
|
1919
|
+
value: url ? /* @__PURE__ */ jsx33("a", { href: url, target: "_blank", rel: "noreferrer noopener", className: linkClass, children: label }) : label
|
|
1742
1920
|
});
|
|
1743
1921
|
}
|
|
1744
1922
|
if (items.length === 0) return null;
|
|
@@ -1746,50 +1924,50 @@ function ReportMeta() {
|
|
|
1746
1924
|
// Run metadata is useful but secondary to "what failed" — tuck it into a
|
|
1747
1925
|
// collapsed disclosure so it doesn't push the result down. Native <details>
|
|
1748
1926
|
// so it works with no JS (the SSR/no-hydration report still toggles).
|
|
1749
|
-
/* @__PURE__ */
|
|
1750
|
-
/* @__PURE__ */
|
|
1751
|
-
/* @__PURE__ */
|
|
1927
|
+
/* @__PURE__ */ jsxs20("details", { "data-es-meta-card": true, className: "es-run-details group rounded-lg border border-border bg-card text-xs", children: [
|
|
1928
|
+
/* @__PURE__ */ jsxs20("summary", { className: "flex cursor-pointer list-none select-none items-center gap-1.5 px-4 py-2 font-medium text-muted-foreground [&::-webkit-details-marker]:hidden", children: [
|
|
1929
|
+
/* @__PURE__ */ jsx33("span", { "aria-hidden": true, className: "text-xs transition-transform group-open:rotate-90", children: "\u25B8" }),
|
|
1752
1930
|
"Run details"
|
|
1753
1931
|
] }),
|
|
1754
|
-
/* @__PURE__ */
|
|
1755
|
-
/* @__PURE__ */
|
|
1756
|
-
/* @__PURE__ */
|
|
1932
|
+
/* @__PURE__ */ jsx33("dl", { className: "flex flex-wrap gap-x-5 gap-y-2 border-t border-border px-4 py-3 text-muted-foreground", "aria-label": "Run metadata", children: items.map((item) => /* @__PURE__ */ jsxs20("div", { className: "flex items-baseline gap-1.5", children: [
|
|
1933
|
+
/* @__PURE__ */ jsx33("dt", { className: "font-medium", children: item.label }),
|
|
1934
|
+
/* @__PURE__ */ jsx33("dd", { className: "font-mono text-foreground", children: item.value })
|
|
1757
1935
|
] }, item.label)) })
|
|
1758
1936
|
] })
|
|
1759
1937
|
);
|
|
1760
1938
|
}
|
|
1761
1939
|
|
|
1762
1940
|
// src/components/ReportSchemaError.tsx
|
|
1763
|
-
import { jsx as
|
|
1941
|
+
import { jsx as jsx34, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
1764
1942
|
function ReportSchemaError({ error }) {
|
|
1765
|
-
return /* @__PURE__ */
|
|
1766
|
-
/* @__PURE__ */
|
|
1767
|
-
/* @__PURE__ */
|
|
1768
|
-
error.code === "SCHEMA_VERSION_MISMATCH" ? /* @__PURE__ */
|
|
1943
|
+
return /* @__PURE__ */ jsxs21("section", { className: "es-schema-error", role: "alert", "aria-live": "assertive", children: [
|
|
1944
|
+
/* @__PURE__ */ jsx34("p", { children: /* @__PURE__ */ jsx34("strong", { children: "Report could not be displayed." }) }),
|
|
1945
|
+
/* @__PURE__ */ jsx34("p", { children: error.message }),
|
|
1946
|
+
error.code === "SCHEMA_VERSION_MISMATCH" ? /* @__PURE__ */ jsxs21("p", { children: [
|
|
1769
1947
|
"The report bundle is newer than this version of ",
|
|
1770
|
-
/* @__PURE__ */
|
|
1948
|
+
/* @__PURE__ */ jsx34("code", { children: "executable-stories-react" }),
|
|
1771
1949
|
". Upgrade the package, or regenerate the report with an older formatters CLI."
|
|
1772
1950
|
] }) : null,
|
|
1773
|
-
error.issues && error.issues.length > 0 ? /* @__PURE__ */
|
|
1774
|
-
/* @__PURE__ */
|
|
1951
|
+
error.issues && error.issues.length > 0 ? /* @__PURE__ */ jsxs21("details", { children: [
|
|
1952
|
+
/* @__PURE__ */ jsxs21("summary", { children: [
|
|
1775
1953
|
error.issues.length,
|
|
1776
1954
|
" validation issue",
|
|
1777
1955
|
error.issues.length === 1 ? "" : "s"
|
|
1778
1956
|
] }),
|
|
1779
|
-
/* @__PURE__ */
|
|
1957
|
+
/* @__PURE__ */ jsx34("pre", { children: error.issues.slice(0, 20).map((i) => `${i.path}: ${i.message}`).join("\n") })
|
|
1780
1958
|
] }) : null
|
|
1781
1959
|
] });
|
|
1782
1960
|
}
|
|
1783
1961
|
|
|
1784
1962
|
// src/components/ReportShell.tsx
|
|
1785
|
-
import { Fragment as Fragment10, jsx as
|
|
1963
|
+
import { Fragment as Fragment10, jsx as jsx35, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
1786
1964
|
function ReportErrorShell({
|
|
1787
1965
|
error,
|
|
1788
1966
|
className,
|
|
1789
1967
|
title,
|
|
1790
1968
|
dataTheme
|
|
1791
1969
|
}) {
|
|
1792
|
-
return /* @__PURE__ */
|
|
1970
|
+
return /* @__PURE__ */ jsx35("main", { className: cn("es-report", className), "aria-label": title ?? "Test report", "data-theme": dataTheme, children: /* @__PURE__ */ jsx35(ReportSchemaError, { error }) });
|
|
1793
1971
|
}
|
|
1794
1972
|
|
|
1795
1973
|
// src/interactive/ReportInteractive.tsx
|
|
@@ -1798,12 +1976,12 @@ import { Monitor, Moon, Sun } from "lucide-react";
|
|
|
1798
1976
|
// src/components/ui/switch.tsx
|
|
1799
1977
|
import "react";
|
|
1800
1978
|
import { Switch as SwitchPrimitive } from "@base-ui/react/switch";
|
|
1801
|
-
import { jsx as
|
|
1979
|
+
import { jsx as jsx36 } from "react/jsx-runtime";
|
|
1802
1980
|
function Switch({
|
|
1803
1981
|
className,
|
|
1804
1982
|
...props
|
|
1805
1983
|
}) {
|
|
1806
|
-
return /* @__PURE__ */
|
|
1984
|
+
return /* @__PURE__ */ jsx36(
|
|
1807
1985
|
SwitchPrimitive.Root,
|
|
1808
1986
|
{
|
|
1809
1987
|
"data-slot": "switch",
|
|
@@ -1812,7 +1990,7 @@ function Switch({
|
|
|
1812
1990
|
className
|
|
1813
1991
|
),
|
|
1814
1992
|
...props,
|
|
1815
|
-
children: /* @__PURE__ */
|
|
1993
|
+
children: /* @__PURE__ */ jsx36(
|
|
1816
1994
|
SwitchPrimitive.Thumb,
|
|
1817
1995
|
{
|
|
1818
1996
|
"data-slot": "switch-thumb",
|
|
@@ -1828,7 +2006,7 @@ import * as React5 from "react";
|
|
|
1828
2006
|
import { ToggleGroup as ToggleGroupPrimitive } from "@base-ui/react/toggle-group";
|
|
1829
2007
|
import { Toggle as TogglePrimitive } from "@base-ui/react/toggle";
|
|
1830
2008
|
import { cva as cva3 } from "class-variance-authority";
|
|
1831
|
-
import { jsx as
|
|
2009
|
+
import { jsx as jsx37 } from "react/jsx-runtime";
|
|
1832
2010
|
var toggleItemVariants = cva3(
|
|
1833
2011
|
"inline-flex items-center justify-center gap-1.5 rounded-md font-medium whitespace-nowrap text-muted-foreground transition-[color,background-color,box-shadow] outline-none hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 data-[pressed]:bg-background data-[pressed]:text-foreground data-[pressed]:shadow-sm [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
1834
2012
|
{
|
|
@@ -1850,13 +2028,13 @@ function ToggleGroup({
|
|
|
1850
2028
|
children,
|
|
1851
2029
|
...props
|
|
1852
2030
|
}) {
|
|
1853
|
-
return /* @__PURE__ */
|
|
2031
|
+
return /* @__PURE__ */ jsx37(
|
|
1854
2032
|
ToggleGroupPrimitive,
|
|
1855
2033
|
{
|
|
1856
2034
|
"data-slot": "toggle-group",
|
|
1857
2035
|
className: cn("flex w-fit items-center gap-0.5 rounded-lg bg-muted p-0.5", className),
|
|
1858
2036
|
...props,
|
|
1859
|
-
children: /* @__PURE__ */
|
|
2037
|
+
children: /* @__PURE__ */ jsx37(ToggleGroupContext.Provider, { value: { size }, children })
|
|
1860
2038
|
}
|
|
1861
2039
|
);
|
|
1862
2040
|
}
|
|
@@ -1867,7 +2045,7 @@ function ToggleGroupItem({
|
|
|
1867
2045
|
...props
|
|
1868
2046
|
}) {
|
|
1869
2047
|
const context = React5.useContext(ToggleGroupContext);
|
|
1870
|
-
return /* @__PURE__ */
|
|
2048
|
+
return /* @__PURE__ */ jsx37(
|
|
1871
2049
|
TogglePrimitive,
|
|
1872
2050
|
{
|
|
1873
2051
|
"data-slot": "toggle-group-item",
|
|
@@ -1887,9 +2065,9 @@ import { Search } from "lucide-react";
|
|
|
1887
2065
|
|
|
1888
2066
|
// src/components/ui/input.tsx
|
|
1889
2067
|
import "react";
|
|
1890
|
-
import { jsx as
|
|
2068
|
+
import { jsx as jsx38 } from "react/jsx-runtime";
|
|
1891
2069
|
function Input({ className, type, ...props }) {
|
|
1892
|
-
return /* @__PURE__ */
|
|
2070
|
+
return /* @__PURE__ */ jsx38(
|
|
1893
2071
|
"input",
|
|
1894
2072
|
{
|
|
1895
2073
|
type,
|
|
@@ -1906,7 +2084,7 @@ function Input({ className, type, ...props }) {
|
|
|
1906
2084
|
}
|
|
1907
2085
|
|
|
1908
2086
|
// src/interactive/ReportSearch.tsx
|
|
1909
|
-
import { jsx as
|
|
2087
|
+
import { jsx as jsx39, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
1910
2088
|
var ReportSearch = forwardRef(
|
|
1911
2089
|
function ReportSearch2(props, ref) {
|
|
1912
2090
|
const {
|
|
@@ -1928,17 +2106,17 @@ var ReportSearch = forwardRef(
|
|
|
1928
2106
|
e.preventDefault();
|
|
1929
2107
|
}
|
|
1930
2108
|
}
|
|
1931
|
-
return /* @__PURE__ */
|
|
1932
|
-
/* @__PURE__ */
|
|
1933
|
-
/* @__PURE__ */
|
|
1934
|
-
/* @__PURE__ */
|
|
2109
|
+
return /* @__PURE__ */ jsxs23("div", { className: cn("es-search flex flex-col gap-1", className), children: [
|
|
2110
|
+
/* @__PURE__ */ jsx39("label", { htmlFor: inputId, className: "sr-only", children: "Search" }),
|
|
2111
|
+
/* @__PURE__ */ jsxs23("div", { className: "relative w-full sm:w-72", children: [
|
|
2112
|
+
/* @__PURE__ */ jsx39(
|
|
1935
2113
|
Search,
|
|
1936
2114
|
{
|
|
1937
2115
|
"aria-hidden": true,
|
|
1938
2116
|
className: "pointer-events-none absolute top-1/2 left-2.5 size-4 -translate-y-1/2 text-muted-foreground"
|
|
1939
2117
|
}
|
|
1940
2118
|
),
|
|
1941
|
-
/* @__PURE__ */
|
|
2119
|
+
/* @__PURE__ */ jsx39(
|
|
1942
2120
|
Input,
|
|
1943
2121
|
{
|
|
1944
2122
|
ref,
|
|
@@ -1955,7 +2133,7 @@ var ReportSearch = forwardRef(
|
|
|
1955
2133
|
}
|
|
1956
2134
|
)
|
|
1957
2135
|
] }),
|
|
1958
|
-
showCounts ? /* @__PURE__ */
|
|
2136
|
+
showCounts ? /* @__PURE__ */ jsxs23(
|
|
1959
2137
|
"span",
|
|
1960
2138
|
{
|
|
1961
2139
|
className: "text-xs tabular-nums text-muted-foreground",
|
|
@@ -2044,7 +2222,7 @@ function scrollToScenarioId(scenarioId, options = {}) {
|
|
|
2044
2222
|
}
|
|
2045
2223
|
|
|
2046
2224
|
// src/interactive/ReportFailureBanner.tsx
|
|
2047
|
-
import { jsx as
|
|
2225
|
+
import { jsx as jsx40, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
2048
2226
|
function ReportFailureBanner({ failures }) {
|
|
2049
2227
|
const first = failures[0];
|
|
2050
2228
|
const jumpToFirst = useCallback2(() => {
|
|
@@ -2052,7 +2230,7 @@ function ReportFailureBanner({ failures }) {
|
|
|
2052
2230
|
scrollToScenarioId(first.scenarioId);
|
|
2053
2231
|
}, [first]);
|
|
2054
2232
|
if (failures.length === 0) return null;
|
|
2055
|
-
return /* @__PURE__ */
|
|
2233
|
+
return /* @__PURE__ */ jsxs24(
|
|
2056
2234
|
"div",
|
|
2057
2235
|
{
|
|
2058
2236
|
className: "es-failure-banner",
|
|
@@ -2060,13 +2238,13 @@ function ReportFailureBanner({ failures }) {
|
|
|
2060
2238
|
"aria-live": "polite",
|
|
2061
2239
|
"aria-label": "Failure summary",
|
|
2062
2240
|
children: [
|
|
2063
|
-
/* @__PURE__ */
|
|
2064
|
-
/* @__PURE__ */
|
|
2241
|
+
/* @__PURE__ */ jsxs24("span", { className: "es-failure-banner-text", children: [
|
|
2242
|
+
/* @__PURE__ */ jsx40("strong", { children: failures.length }),
|
|
2065
2243
|
" ",
|
|
2066
2244
|
"failure",
|
|
2067
2245
|
failures.length === 1 ? "" : "s"
|
|
2068
2246
|
] }),
|
|
2069
|
-
/* @__PURE__ */
|
|
2247
|
+
/* @__PURE__ */ jsx40(
|
|
2070
2248
|
"button",
|
|
2071
2249
|
{
|
|
2072
2250
|
type: "button",
|
|
@@ -2083,7 +2261,7 @@ function ReportFailureBanner({ failures }) {
|
|
|
2083
2261
|
|
|
2084
2262
|
// src/interactive/ReportFreshness.tsx
|
|
2085
2263
|
import { useEffect, useState as useState2 } from "react";
|
|
2086
|
-
import { Fragment as Fragment11, jsx as
|
|
2264
|
+
import { Fragment as Fragment11, jsx as jsx41, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
2087
2265
|
function ReportFreshness({ lastRunMs, ciUrl, staleAfterDays, nowMs }) {
|
|
2088
2266
|
const [now, setNow] = useState2(nowMs);
|
|
2089
2267
|
useEffect(() => {
|
|
@@ -2091,7 +2269,7 @@ function ReportFreshness({ lastRunMs, ciUrl, staleAfterDays, nowMs }) {
|
|
|
2091
2269
|
}, [nowMs]);
|
|
2092
2270
|
if (lastRunMs === void 0 || now === void 0) return null;
|
|
2093
2271
|
const age = formatRelativeAge(lastRunMs, now);
|
|
2094
|
-
const runLink = ciUrl ? /* @__PURE__ */
|
|
2272
|
+
const runLink = ciUrl ? /* @__PURE__ */ jsx41(
|
|
2095
2273
|
"a",
|
|
2096
2274
|
{
|
|
2097
2275
|
href: ciUrl,
|
|
@@ -2102,9 +2280,9 @@ function ReportFreshness({ lastRunMs, ciUrl, staleAfterDays, nowMs }) {
|
|
|
2102
2280
|
}
|
|
2103
2281
|
) : null;
|
|
2104
2282
|
if (isReportStale(lastRunMs, staleAfterDays, now)) {
|
|
2105
|
-
return /* @__PURE__ */
|
|
2106
|
-
/* @__PURE__ */
|
|
2107
|
-
/* @__PURE__ */
|
|
2283
|
+
return /* @__PURE__ */ jsxs25("div", { className: "es-stale-banner", role: "status", "aria-label": "Report freshness", children: [
|
|
2284
|
+
/* @__PURE__ */ jsxs25("span", { children: [
|
|
2285
|
+
/* @__PURE__ */ jsxs25("strong", { children: [
|
|
2108
2286
|
"Last verified ",
|
|
2109
2287
|
age,
|
|
2110
2288
|
"."
|
|
@@ -2114,10 +2292,10 @@ function ReportFreshness({ lastRunMs, ciUrl, staleAfterDays, nowMs }) {
|
|
|
2114
2292
|
runLink
|
|
2115
2293
|
] });
|
|
2116
2294
|
}
|
|
2117
|
-
return /* @__PURE__ */
|
|
2295
|
+
return /* @__PURE__ */ jsxs25("p", { className: "es-freshness", "aria-label": "Report freshness", children: [
|
|
2118
2296
|
"Verified ",
|
|
2119
2297
|
age,
|
|
2120
|
-
runLink ? /* @__PURE__ */
|
|
2298
|
+
runLink ? /* @__PURE__ */ jsxs25(Fragment11, { children: [
|
|
2121
2299
|
" \xB7 ",
|
|
2122
2300
|
runLink
|
|
2123
2301
|
] }) : null
|
|
@@ -2125,15 +2303,15 @@ function ReportFreshness({ lastRunMs, ciUrl, staleAfterDays, nowMs }) {
|
|
|
2125
2303
|
}
|
|
2126
2304
|
|
|
2127
2305
|
// src/interactive/ReportLastRunDelta.tsx
|
|
2128
|
-
import { Fragment as Fragment12, jsx as
|
|
2306
|
+
import { Fragment as Fragment12, jsx as jsx42, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
2129
2307
|
var MAX_LINKS = 5;
|
|
2130
2308
|
function ScenarioLinks({ scenarios, tone }) {
|
|
2131
|
-
return /* @__PURE__ */
|
|
2132
|
-
scenarios.slice(0, MAX_LINKS).map((s, i) => /* @__PURE__ */
|
|
2309
|
+
return /* @__PURE__ */ jsxs26(Fragment12, { children: [
|
|
2310
|
+
scenarios.slice(0, MAX_LINKS).map((s, i) => /* @__PURE__ */ jsxs26("span", { children: [
|
|
2133
2311
|
i > 0 ? ", " : "",
|
|
2134
|
-
/* @__PURE__ */
|
|
2312
|
+
/* @__PURE__ */ jsx42("a", { href: `#${s.id}`, className: cn("underline underline-offset-2 hover:no-underline", tone), children: s.title })
|
|
2135
2313
|
] }, s.id)),
|
|
2136
|
-
scenarios.length > MAX_LINKS ? /* @__PURE__ */
|
|
2314
|
+
scenarios.length > MAX_LINKS ? /* @__PURE__ */ jsxs26("span", { children: [
|
|
2137
2315
|
" and ",
|
|
2138
2316
|
scenarios.length - MAX_LINKS,
|
|
2139
2317
|
" more"
|
|
@@ -2150,23 +2328,23 @@ function ReportLastRunDelta({
|
|
|
2150
2328
|
if (!delta) return null;
|
|
2151
2329
|
const { newlyFailing, newlyPassing, added } = delta;
|
|
2152
2330
|
if (newlyFailing.length === 0 && newlyPassing.length === 0 && added.length === 0) {
|
|
2153
|
-
return /* @__PURE__ */
|
|
2331
|
+
return /* @__PURE__ */ jsx42("p", { className: "text-xs text-muted-foreground", "data-testid": "es-last-run-delta", children: "Since last run: no behavior changes." });
|
|
2154
2332
|
}
|
|
2155
|
-
return /* @__PURE__ */
|
|
2156
|
-
/* @__PURE__ */
|
|
2157
|
-
newlyFailing.length > 0 ? /* @__PURE__ */
|
|
2333
|
+
return /* @__PURE__ */ jsxs26("p", { className: "text-xs text-muted-foreground", "data-testid": "es-last-run-delta", children: [
|
|
2334
|
+
/* @__PURE__ */ jsx42("span", { className: "font-medium text-foreground", children: "Since last run:" }),
|
|
2335
|
+
newlyFailing.length > 0 ? /* @__PURE__ */ jsxs26("span", { className: "ml-2 text-fail", children: [
|
|
2158
2336
|
newlyFailing.length,
|
|
2159
2337
|
" newly failing (",
|
|
2160
|
-
/* @__PURE__ */
|
|
2338
|
+
/* @__PURE__ */ jsx42(ScenarioLinks, { scenarios: newlyFailing, tone: "text-fail" }),
|
|
2161
2339
|
")"
|
|
2162
2340
|
] }) : null,
|
|
2163
|
-
newlyPassing.length > 0 ? /* @__PURE__ */
|
|
2341
|
+
newlyPassing.length > 0 ? /* @__PURE__ */ jsxs26("span", { className: "ml-2 text-pass", children: [
|
|
2164
2342
|
newlyPassing.length,
|
|
2165
2343
|
" fixed (",
|
|
2166
|
-
/* @__PURE__ */
|
|
2344
|
+
/* @__PURE__ */ jsx42(ScenarioLinks, { scenarios: newlyPassing, tone: "text-pass" }),
|
|
2167
2345
|
")"
|
|
2168
2346
|
] }) : null,
|
|
2169
|
-
added.length > 0 ? /* @__PURE__ */
|
|
2347
|
+
added.length > 0 ? /* @__PURE__ */ jsxs26("span", { className: "ml-2", children: [
|
|
2170
2348
|
added.length,
|
|
2171
2349
|
" new"
|
|
2172
2350
|
] }) : null
|
|
@@ -2230,7 +2408,7 @@ function Button({
|
|
|
2230
2408
|
}
|
|
2231
2409
|
|
|
2232
2410
|
// src/interactive/ReportShortcutsHelp.tsx
|
|
2233
|
-
import { jsx as
|
|
2411
|
+
import { jsx as jsx43, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
2234
2412
|
var SHORTCUTS = [
|
|
2235
2413
|
{ keys: "/", description: "Focus search" },
|
|
2236
2414
|
{ keys: "f", description: "Jump to next failure" },
|
|
@@ -2242,9 +2420,9 @@ var SHORTCUTS = [
|
|
|
2242
2420
|
];
|
|
2243
2421
|
function Keys({ keys }) {
|
|
2244
2422
|
const parts = keys.split(" ");
|
|
2245
|
-
return /* @__PURE__ */
|
|
2246
|
-
i > 0 ? /* @__PURE__ */
|
|
2247
|
-
/* @__PURE__ */
|
|
2423
|
+
return /* @__PURE__ */ jsx43("span", { className: "inline-flex items-center gap-1", children: parts.map((k, i) => /* @__PURE__ */ jsxs27("span", { className: "inline-flex items-center gap-1", children: [
|
|
2424
|
+
i > 0 ? /* @__PURE__ */ jsx43("span", { className: "text-xs text-muted-foreground", children: "+" }) : null,
|
|
2425
|
+
/* @__PURE__ */ jsx43("kbd", { className: "inline-flex h-6 min-w-6 items-center justify-center rounded border border-border bg-muted px-1.5 font-mono text-xs font-medium text-muted-foreground", children: k })
|
|
2248
2426
|
] }, k)) });
|
|
2249
2427
|
}
|
|
2250
2428
|
function ReportShortcutsHelp({ open, onClose }) {
|
|
@@ -2255,7 +2433,7 @@ function ReportShortcutsHelp({ open, onClose }) {
|
|
|
2255
2433
|
if (open && !dialog.open) dialog.showModal();
|
|
2256
2434
|
else if (!open && dialog.open) dialog.close();
|
|
2257
2435
|
}, [open]);
|
|
2258
|
-
return /* @__PURE__ */
|
|
2436
|
+
return /* @__PURE__ */ jsxs27(
|
|
2259
2437
|
"dialog",
|
|
2260
2438
|
{
|
|
2261
2439
|
ref: dialogRef,
|
|
@@ -2263,12 +2441,12 @@ function ReportShortcutsHelp({ open, onClose }) {
|
|
|
2263
2441
|
"aria-label": "Keyboard shortcuts",
|
|
2264
2442
|
onClose,
|
|
2265
2443
|
children: [
|
|
2266
|
-
/* @__PURE__ */
|
|
2267
|
-
/* @__PURE__ */
|
|
2268
|
-
/* @__PURE__ */
|
|
2269
|
-
/* @__PURE__ */
|
|
2444
|
+
/* @__PURE__ */ jsx43("h2", { className: "text-base font-semibold", children: "Keyboard shortcuts" }),
|
|
2445
|
+
/* @__PURE__ */ jsx43("dl", { className: "mt-4 grid grid-cols-[auto_1fr] items-center gap-x-4 gap-y-2.5", children: SHORTCUTS.map((s) => /* @__PURE__ */ jsxs27("div", { className: "col-span-2 grid grid-cols-subgrid items-center", children: [
|
|
2446
|
+
/* @__PURE__ */ jsx43("dt", { className: "justify-self-start", children: /* @__PURE__ */ jsx43(Keys, { keys: s.keys }) }),
|
|
2447
|
+
/* @__PURE__ */ jsx43("dd", { className: "text-sm text-muted-foreground", children: s.description })
|
|
2270
2448
|
] }, s.keys)) }),
|
|
2271
|
-
/* @__PURE__ */
|
|
2449
|
+
/* @__PURE__ */ jsx43("form", { method: "dialog", className: "mt-6", children: /* @__PURE__ */ jsx43(Button, { type: "submit", variant: "outline", size: "sm", children: "Close" }) })
|
|
2272
2450
|
]
|
|
2273
2451
|
}
|
|
2274
2452
|
);
|
|
@@ -2471,7 +2649,7 @@ function failuresFirst(report) {
|
|
|
2471
2649
|
|
|
2472
2650
|
// src/interactive/ReportFilters.tsx
|
|
2473
2651
|
import { useState as useState3 } from "react";
|
|
2474
|
-
import { jsx as
|
|
2652
|
+
import { jsx as jsx44, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
2475
2653
|
var TAG_LIMIT = 12;
|
|
2476
2654
|
function ReportFilters({
|
|
2477
2655
|
statuses,
|
|
@@ -2485,10 +2663,10 @@ function ReportFilters({
|
|
|
2485
2663
|
if (statuses.length === 0 && tags.length === 0) return null;
|
|
2486
2664
|
const tagsCollapsed = tags.length > TAG_LIMIT && !showAllTags;
|
|
2487
2665
|
const visibleTags = tagsCollapsed ? tags.slice(0, TAG_LIMIT) : tags;
|
|
2488
|
-
return /* @__PURE__ */
|
|
2489
|
-
statuses.length > 0 ? /* @__PURE__ */
|
|
2666
|
+
return /* @__PURE__ */ jsxs28("div", { className: "flex flex-col gap-2", children: [
|
|
2667
|
+
statuses.length > 0 ? /* @__PURE__ */ jsx44("div", { role: "group", "aria-label": "Filter by status", className: "flex flex-wrap gap-1", children: statuses.map((opt) => {
|
|
2490
2668
|
const active = status === opt.key;
|
|
2491
|
-
return /* @__PURE__ */
|
|
2669
|
+
return /* @__PURE__ */ jsxs28(
|
|
2492
2670
|
"button",
|
|
2493
2671
|
{
|
|
2494
2672
|
type: "button",
|
|
@@ -2500,23 +2678,23 @@ function ReportFilters({
|
|
|
2500
2678
|
),
|
|
2501
2679
|
children: [
|
|
2502
2680
|
opt.label,
|
|
2503
|
-
/* @__PURE__ */
|
|
2681
|
+
/* @__PURE__ */ jsx44("span", { className: "ml-1 font-mono opacity-70", children: opt.count })
|
|
2504
2682
|
]
|
|
2505
2683
|
},
|
|
2506
2684
|
opt.key
|
|
2507
2685
|
);
|
|
2508
2686
|
}) }) : null,
|
|
2509
|
-
tags.length > 0 ? /* @__PURE__ */
|
|
2687
|
+
tags.length > 0 ? /* @__PURE__ */ jsxs28("ul", { "aria-label": "Filter by tag", className: "flex flex-wrap items-center gap-1.5", children: [
|
|
2510
2688
|
visibleTags.map((tag) => {
|
|
2511
2689
|
const active = activeTags.includes(tag);
|
|
2512
|
-
return /* @__PURE__ */
|
|
2690
|
+
return /* @__PURE__ */ jsx44("li", { children: /* @__PURE__ */ jsx44(
|
|
2513
2691
|
"button",
|
|
2514
2692
|
{
|
|
2515
2693
|
type: "button",
|
|
2516
2694
|
"aria-pressed": active,
|
|
2517
2695
|
onClick: () => onToggleTag(tag),
|
|
2518
2696
|
className: "cursor-pointer",
|
|
2519
|
-
children: /* @__PURE__ */
|
|
2697
|
+
children: /* @__PURE__ */ jsx44(
|
|
2520
2698
|
Badge,
|
|
2521
2699
|
{
|
|
2522
2700
|
variant: "tag",
|
|
@@ -2529,7 +2707,7 @@ function ReportFilters({
|
|
|
2529
2707
|
}
|
|
2530
2708
|
) }, tag);
|
|
2531
2709
|
}),
|
|
2532
|
-
tags.length > TAG_LIMIT ? /* @__PURE__ */
|
|
2710
|
+
tags.length > TAG_LIMIT ? /* @__PURE__ */ jsx44("li", { children: /* @__PURE__ */ jsx44(
|
|
2533
2711
|
"button",
|
|
2534
2712
|
{
|
|
2535
2713
|
type: "button",
|
|
@@ -2545,7 +2723,7 @@ function ReportFilters({
|
|
|
2545
2723
|
|
|
2546
2724
|
// src/interactive/ReportToc.tsx
|
|
2547
2725
|
import { useEffect as useEffect5, useMemo as useMemo2, useState as useState4 } from "react";
|
|
2548
|
-
import { jsx as
|
|
2726
|
+
import { jsx as jsx45, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
2549
2727
|
var DOT = {
|
|
2550
2728
|
passed: "bg-pass",
|
|
2551
2729
|
failed: "bg-fail",
|
|
@@ -2574,11 +2752,11 @@ function TocContent({ onNavigate }) {
|
|
|
2574
2752
|
return () => observer.disconnect();
|
|
2575
2753
|
}, [scenarioIds]);
|
|
2576
2754
|
if (report.features.length === 0) return null;
|
|
2577
|
-
return /* @__PURE__ */
|
|
2578
|
-
/* @__PURE__ */
|
|
2579
|
-
/* @__PURE__ */
|
|
2755
|
+
return /* @__PURE__ */ jsx45("ul", { className: "flex list-none flex-col gap-4 pl-0", children: report.features.map((feature) => /* @__PURE__ */ jsxs29("li", { children: [
|
|
2756
|
+
/* @__PURE__ */ jsx45("p", { className: "mb-1.5 font-semibold leading-snug text-foreground", children: feature.title }),
|
|
2757
|
+
/* @__PURE__ */ jsx45("ul", { className: "flex list-none flex-col gap-0.5 pl-0", children: feature.scenarios.map((scenario) => {
|
|
2580
2758
|
const active = activeId === scenario.id;
|
|
2581
|
-
return /* @__PURE__ */
|
|
2759
|
+
return /* @__PURE__ */ jsx45("li", { children: /* @__PURE__ */ jsxs29(
|
|
2582
2760
|
"a",
|
|
2583
2761
|
{
|
|
2584
2762
|
href: `#${scenario.id}`,
|
|
@@ -2593,14 +2771,14 @@ function TocContent({ onNavigate }) {
|
|
|
2593
2771
|
active ? "border-primary font-medium text-foreground" : "border-border text-muted-foreground"
|
|
2594
2772
|
),
|
|
2595
2773
|
children: [
|
|
2596
|
-
/* @__PURE__ */
|
|
2774
|
+
/* @__PURE__ */ jsx45(
|
|
2597
2775
|
"span",
|
|
2598
2776
|
{
|
|
2599
2777
|
"aria-hidden": true,
|
|
2600
2778
|
className: cn("mt-1 size-1.5 shrink-0 rounded-full", DOT[scenario.status])
|
|
2601
2779
|
}
|
|
2602
2780
|
),
|
|
2603
|
-
/* @__PURE__ */
|
|
2781
|
+
/* @__PURE__ */ jsx45("span", { className: "break-words", children: scenario.title })
|
|
2604
2782
|
]
|
|
2605
2783
|
}
|
|
2606
2784
|
) }, scenario.id);
|
|
@@ -2610,14 +2788,14 @@ function TocContent({ onNavigate }) {
|
|
|
2610
2788
|
function ReportToc() {
|
|
2611
2789
|
const report = useReport();
|
|
2612
2790
|
if (report.features.length === 0) return null;
|
|
2613
|
-
return /* @__PURE__ */
|
|
2791
|
+
return /* @__PURE__ */ jsxs29(
|
|
2614
2792
|
"nav",
|
|
2615
2793
|
{
|
|
2616
2794
|
"aria-label": "Table of contents",
|
|
2617
2795
|
className: "sticky top-4 hidden h-fit w-64 shrink-0 self-start text-xs lg:block",
|
|
2618
2796
|
children: [
|
|
2619
|
-
/* @__PURE__ */
|
|
2620
|
-
/* @__PURE__ */
|
|
2797
|
+
/* @__PURE__ */ jsx45("p", { className: "mb-3 text-xs font-semibold uppercase tracking-wide text-muted-foreground", children: "Contents" }),
|
|
2798
|
+
/* @__PURE__ */ jsx45(TocContent, {})
|
|
2621
2799
|
]
|
|
2622
2800
|
}
|
|
2623
2801
|
);
|
|
@@ -2627,31 +2805,31 @@ function ReportToc() {
|
|
|
2627
2805
|
import { useState as useState5 } from "react";
|
|
2628
2806
|
import { Dialog as DialogPrimitive } from "@base-ui/react/dialog";
|
|
2629
2807
|
import { ListIcon, XIcon } from "lucide-react";
|
|
2630
|
-
import { jsx as
|
|
2808
|
+
import { jsx as jsx46, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
2631
2809
|
function ReportTocDrawer() {
|
|
2632
2810
|
const report = useReport();
|
|
2633
2811
|
const [open, setOpen] = useState5(false);
|
|
2634
2812
|
if (report.features.length === 0) return null;
|
|
2635
|
-
return /* @__PURE__ */
|
|
2636
|
-
/* @__PURE__ */
|
|
2637
|
-
/* @__PURE__ */
|
|
2813
|
+
return /* @__PURE__ */ jsxs30(DialogPrimitive.Root, { open, onOpenChange: setOpen, children: [
|
|
2814
|
+
/* @__PURE__ */ jsxs30(DialogPrimitive.Trigger, { className: "flex cursor-pointer items-center gap-1 rounded-md border border-border px-2 py-1 text-xs text-muted-foreground hover:bg-muted hover:text-foreground lg:hidden [&_svg]:size-3.5", children: [
|
|
2815
|
+
/* @__PURE__ */ jsx46(ListIcon, { "aria-hidden": true }),
|
|
2638
2816
|
" Contents"
|
|
2639
2817
|
] }),
|
|
2640
|
-
/* @__PURE__ */
|
|
2641
|
-
/* @__PURE__ */
|
|
2642
|
-
/* @__PURE__ */
|
|
2643
|
-
/* @__PURE__ */
|
|
2644
|
-
/* @__PURE__ */
|
|
2645
|
-
/* @__PURE__ */
|
|
2818
|
+
/* @__PURE__ */ jsxs30(DialogPrimitive.Portal, { children: [
|
|
2819
|
+
/* @__PURE__ */ jsx46(DialogPrimitive.Backdrop, { className: "fixed inset-0 z-50 bg-black/50 transition-opacity duration-200 data-[ending-style]:opacity-0 data-[starting-style]:opacity-0" }),
|
|
2820
|
+
/* @__PURE__ */ jsxs30(DialogPrimitive.Popup, { className: "fixed inset-y-0 left-0 z-50 flex w-72 max-w-[80vw] flex-col gap-3 overflow-y-auto border-r border-border bg-background p-4 font-sans text-xs shadow-lg outline-none transition-transform duration-200 data-[ending-style]:-translate-x-full data-[starting-style]:-translate-x-full", children: [
|
|
2821
|
+
/* @__PURE__ */ jsxs30("div", { className: "flex items-center justify-between", children: [
|
|
2822
|
+
/* @__PURE__ */ jsx46(DialogPrimitive.Title, { className: "text-xs font-semibold tracking-wide text-muted-foreground uppercase", children: "Contents" }),
|
|
2823
|
+
/* @__PURE__ */ jsx46(
|
|
2646
2824
|
DialogPrimitive.Close,
|
|
2647
2825
|
{
|
|
2648
2826
|
"aria-label": "Close contents",
|
|
2649
2827
|
className: "cursor-pointer rounded p-1 text-muted-foreground hover:bg-muted hover:text-foreground [&_svg]:size-4",
|
|
2650
|
-
children: /* @__PURE__ */
|
|
2828
|
+
children: /* @__PURE__ */ jsx46(XIcon, { "aria-hidden": true })
|
|
2651
2829
|
}
|
|
2652
2830
|
)
|
|
2653
2831
|
] }),
|
|
2654
|
-
/* @__PURE__ */
|
|
2832
|
+
/* @__PURE__ */ jsx46(TocContent, { onNavigate: () => setOpen(false) })
|
|
2655
2833
|
] })
|
|
2656
2834
|
] })
|
|
2657
2835
|
] });
|
|
@@ -2734,14 +2912,14 @@ function useUrlState() {
|
|
|
2734
2912
|
}
|
|
2735
2913
|
|
|
2736
2914
|
// src/interactive/ReportInteractive.tsx
|
|
2737
|
-
import { Fragment as Fragment13, jsx as
|
|
2915
|
+
import { Fragment as Fragment13, jsx as jsx47, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
2738
2916
|
function ReportInteractive(props) {
|
|
2739
2917
|
const { report, className, title, dataTheme } = props;
|
|
2740
2918
|
const result = unwrapReport(report);
|
|
2741
2919
|
if (!result.ok) {
|
|
2742
|
-
return /* @__PURE__ */
|
|
2920
|
+
return /* @__PURE__ */ jsx47(ReportErrorShell, { error: result.error, className, title, dataTheme });
|
|
2743
2921
|
}
|
|
2744
|
-
return /* @__PURE__ */
|
|
2922
|
+
return /* @__PURE__ */ jsx47(ReportInteractiveView, { ...props, report: result.data });
|
|
2745
2923
|
}
|
|
2746
2924
|
var THEME_OPTIONS = [
|
|
2747
2925
|
{ value: "light", label: "Light", Icon: Sun },
|
|
@@ -2749,7 +2927,7 @@ var THEME_OPTIONS = [
|
|
|
2749
2927
|
{ value: "dark", label: "Dark", Icon: Moon }
|
|
2750
2928
|
];
|
|
2751
2929
|
function ThemeSegment({ pref, onPref }) {
|
|
2752
|
-
return /* @__PURE__ */
|
|
2930
|
+
return /* @__PURE__ */ jsx47(
|
|
2753
2931
|
ToggleGroup,
|
|
2754
2932
|
{
|
|
2755
2933
|
size: "sm",
|
|
@@ -2759,7 +2937,7 @@ function ThemeSegment({ pref, onPref }) {
|
|
|
2759
2937
|
if (next) onPref(next);
|
|
2760
2938
|
},
|
|
2761
2939
|
"aria-label": "Color theme",
|
|
2762
|
-
children: THEME_OPTIONS.map(({ value, label, Icon }) => /* @__PURE__ */
|
|
2940
|
+
children: THEME_OPTIONS.map(({ value, label, Icon }) => /* @__PURE__ */ jsx47(ToggleGroupItem, { value, "aria-label": label, title: label, className: "px-2", children: /* @__PURE__ */ jsx47(Icon, {}) }, value))
|
|
2763
2941
|
}
|
|
2764
2942
|
);
|
|
2765
2943
|
}
|
|
@@ -2890,13 +3068,13 @@ function ReportInteractiveView({
|
|
|
2890
3068
|
const totalScenarios = report.summary.total;
|
|
2891
3069
|
const matchedScenarios = filtered.summary.total;
|
|
2892
3070
|
const showToc = !hideToc && totalScenarios > 3;
|
|
2893
|
-
return /* @__PURE__ */
|
|
3071
|
+
return /* @__PURE__ */ jsx47(CollapseProvider, { value: collapse.api, children: /* @__PURE__ */ jsx47(ScenarioActionsProvider, { value: scenarioActions, children: /* @__PURE__ */ jsx47(ScenarioHistoryProvider, { value: scenarioHistory ?? null, children: /* @__PURE__ */ jsx47(
|
|
2894
3072
|
ReportRoot,
|
|
2895
3073
|
{
|
|
2896
3074
|
report: filtered,
|
|
2897
3075
|
customRenderers,
|
|
2898
3076
|
renderers,
|
|
2899
|
-
children: /* @__PURE__ */
|
|
3077
|
+
children: /* @__PURE__ */ jsxs31(
|
|
2900
3078
|
"main",
|
|
2901
3079
|
{
|
|
2902
3080
|
className: cn("es-report", "es-report-interactive", className),
|
|
@@ -2905,8 +3083,8 @@ function ReportInteractiveView({
|
|
|
2905
3083
|
"data-theme": dataTheme,
|
|
2906
3084
|
"data-detail-level": detail,
|
|
2907
3085
|
children: [
|
|
2908
|
-
/* @__PURE__ */
|
|
2909
|
-
/* @__PURE__ */
|
|
3086
|
+
/* @__PURE__ */ jsxs31("header", { className: "es-report-header", children: [
|
|
3087
|
+
/* @__PURE__ */ jsxs31(
|
|
2910
3088
|
"div",
|
|
2911
3089
|
{
|
|
2912
3090
|
"data-es-navbar": true,
|
|
@@ -2915,9 +3093,9 @@ function ReportInteractiveView({
|
|
|
2915
3093
|
hideHeader ? "justify-end" : "justify-between"
|
|
2916
3094
|
),
|
|
2917
3095
|
children: [
|
|
2918
|
-
hideHeader ? null : /* @__PURE__ */
|
|
2919
|
-
/* @__PURE__ */
|
|
2920
|
-
/* @__PURE__ */
|
|
3096
|
+
hideHeader ? null : /* @__PURE__ */ jsx47("h1", { className: "min-w-0", children: title ?? "Story Report" }),
|
|
3097
|
+
/* @__PURE__ */ jsxs31("div", { className: "flex items-center gap-2", children: [
|
|
3098
|
+
/* @__PURE__ */ jsx47(
|
|
2921
3099
|
ReportSearch,
|
|
2922
3100
|
{
|
|
2923
3101
|
ref: searchRef,
|
|
@@ -2927,16 +3105,16 @@ function ReportInteractiveView({
|
|
|
2927
3105
|
totalCount: totalScenarios
|
|
2928
3106
|
}
|
|
2929
3107
|
),
|
|
2930
|
-
/* @__PURE__ */
|
|
3108
|
+
/* @__PURE__ */ jsx47(ThemeSegment, { pref: themePref, onPref: setThemePref })
|
|
2931
3109
|
] })
|
|
2932
3110
|
]
|
|
2933
3111
|
}
|
|
2934
3112
|
),
|
|
2935
|
-
hideHeader ? null : /* @__PURE__ */
|
|
2936
|
-
/* @__PURE__ */
|
|
2937
|
-
/* @__PURE__ */
|
|
3113
|
+
hideHeader ? null : /* @__PURE__ */ jsxs31(Fragment13, { children: [
|
|
3114
|
+
/* @__PURE__ */ jsx47(ReportSummary, {}),
|
|
3115
|
+
/* @__PURE__ */ jsx47(ReportMeta, {})
|
|
2938
3116
|
] }),
|
|
2939
|
-
/* @__PURE__ */
|
|
3117
|
+
/* @__PURE__ */ jsx47(
|
|
2940
3118
|
ReportFreshness,
|
|
2941
3119
|
{
|
|
2942
3120
|
lastRunMs: reportLastRunMs(report),
|
|
@@ -2944,8 +3122,8 @@ function ReportInteractiveView({
|
|
|
2944
3122
|
staleAfterDays
|
|
2945
3123
|
}
|
|
2946
3124
|
),
|
|
2947
|
-
/* @__PURE__ */
|
|
2948
|
-
/* @__PURE__ */
|
|
3125
|
+
/* @__PURE__ */ jsx47(ReportLastRunDelta, { history: scenarioHistory, report }),
|
|
3126
|
+
/* @__PURE__ */ jsx47(
|
|
2949
3127
|
ReportFilters,
|
|
2950
3128
|
{
|
|
2951
3129
|
statuses: statusOptions,
|
|
@@ -2956,14 +3134,14 @@ function ReportInteractiveView({
|
|
|
2956
3134
|
onToggleTag: toggleTag
|
|
2957
3135
|
}
|
|
2958
3136
|
),
|
|
2959
|
-
/* @__PURE__ */
|
|
2960
|
-
showToc ? /* @__PURE__ */
|
|
2961
|
-
/* @__PURE__ */
|
|
2962
|
-
/* @__PURE__ */
|
|
2963
|
-
/* @__PURE__ */
|
|
3137
|
+
/* @__PURE__ */ jsxs31("div", { className: "flex flex-wrap items-center gap-x-6 gap-y-2 border-t border-border/60 pt-3", children: [
|
|
3138
|
+
showToc ? /* @__PURE__ */ jsx47(ReportTocDrawer, {}) : null,
|
|
3139
|
+
/* @__PURE__ */ jsxs31("div", { className: "flex items-center gap-2", children: [
|
|
3140
|
+
/* @__PURE__ */ jsx47(Switch, { id: expandId, checked: expandedAll, onCheckedChange: setExpanded }),
|
|
3141
|
+
/* @__PURE__ */ jsx47("label", { htmlFor: expandId, className: "cursor-pointer text-sm text-muted-foreground select-none", children: "Expand all" })
|
|
2964
3142
|
] }),
|
|
2965
|
-
/* @__PURE__ */
|
|
2966
|
-
/* @__PURE__ */
|
|
3143
|
+
/* @__PURE__ */ jsxs31("div", { className: "flex items-center gap-2", children: [
|
|
3144
|
+
/* @__PURE__ */ jsx47(
|
|
2967
3145
|
Switch,
|
|
2968
3146
|
{
|
|
2969
3147
|
id: docsId,
|
|
@@ -2971,16 +3149,16 @@ function ReportInteractiveView({
|
|
|
2971
3149
|
onCheckedChange: (checked) => setDetail(checked ? "full" : "minimal")
|
|
2972
3150
|
}
|
|
2973
3151
|
),
|
|
2974
|
-
/* @__PURE__ */
|
|
3152
|
+
/* @__PURE__ */ jsx47("label", { htmlFor: docsId, className: "cursor-pointer text-sm text-muted-foreground select-none", children: "Show documentation" })
|
|
2975
3153
|
] })
|
|
2976
3154
|
] })
|
|
2977
3155
|
] }),
|
|
2978
|
-
/* @__PURE__ */
|
|
2979
|
-
hasContent ? showToc ? /* @__PURE__ */
|
|
2980
|
-
/* @__PURE__ */
|
|
2981
|
-
/* @__PURE__ */
|
|
2982
|
-
] }) : /* @__PURE__ */
|
|
2983
|
-
/* @__PURE__ */
|
|
3156
|
+
/* @__PURE__ */ jsx47(ReportFailureBanner, { failures }),
|
|
3157
|
+
hasContent ? showToc ? /* @__PURE__ */ jsxs31("div", { className: "flex gap-6", children: [
|
|
3158
|
+
/* @__PURE__ */ jsx47(ReportToc, {}),
|
|
3159
|
+
/* @__PURE__ */ jsx47("div", { className: "flex min-w-0 flex-1 flex-col gap-4", children: /* @__PURE__ */ jsx47(ReportFeatureList, {}) })
|
|
3160
|
+
] }) : /* @__PURE__ */ jsx47("div", { className: "flex flex-col gap-4", children: /* @__PURE__ */ jsx47(ReportFeatureList, {}) }) : /* @__PURE__ */ jsx47(ReportEmpty, { message: query ? "No scenarios match the search." : void 0 }),
|
|
3161
|
+
/* @__PURE__ */ jsx47(
|
|
2984
3162
|
"button",
|
|
2985
3163
|
{
|
|
2986
3164
|
type: "button",
|
|
@@ -2991,8 +3169,8 @@ function ReportInteractiveView({
|
|
|
2991
3169
|
children: "?"
|
|
2992
3170
|
}
|
|
2993
3171
|
),
|
|
2994
|
-
/* @__PURE__ */
|
|
2995
|
-
toast ? /* @__PURE__ */
|
|
3172
|
+
/* @__PURE__ */ jsx47(ReportShortcutsHelp, { open: helpOpen, onClose: () => setHelpOpen(false) }),
|
|
3173
|
+
toast ? /* @__PURE__ */ jsx47(
|
|
2996
3174
|
"div",
|
|
2997
3175
|
{
|
|
2998
3176
|
role: "status",
|
|
@@ -3016,7 +3194,7 @@ import { createElement, useEffect as useEffect9, useState as useState10 } from "
|
|
|
3016
3194
|
|
|
3017
3195
|
// src/components/doc/MermaidView.tsx
|
|
3018
3196
|
import { useEffect as useEffect8, useRef as useRef6, useState as useState9 } from "react";
|
|
3019
|
-
import { Fragment as Fragment14, jsx as
|
|
3197
|
+
import { Fragment as Fragment14, jsx as jsx48, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
3020
3198
|
function prefersDark(el) {
|
|
3021
3199
|
const themed = el?.closest("[data-theme]");
|
|
3022
3200
|
if (themed?.dataset.theme === "dark") return true;
|
|
@@ -3070,9 +3248,9 @@ function MermaidView({ entry, load }) {
|
|
|
3070
3248
|
};
|
|
3071
3249
|
}, [entry.code, load]);
|
|
3072
3250
|
if (svg) {
|
|
3073
|
-
return /* @__PURE__ */
|
|
3074
|
-
entry.title ? /* @__PURE__ */
|
|
3075
|
-
/* @__PURE__ */
|
|
3251
|
+
return /* @__PURE__ */ jsxs32("figure", { ref, className: "my-3", children: [
|
|
3252
|
+
entry.title ? /* @__PURE__ */ jsx48("figcaption", { className: "mb-1.5 text-xs font-medium text-muted-foreground", children: entry.title }) : null,
|
|
3253
|
+
/* @__PURE__ */ jsx48(
|
|
3076
3254
|
"div",
|
|
3077
3255
|
{
|
|
3078
3256
|
role: "img",
|
|
@@ -3083,8 +3261,8 @@ function MermaidView({ entry, load }) {
|
|
|
3083
3261
|
)
|
|
3084
3262
|
] });
|
|
3085
3263
|
}
|
|
3086
|
-
return /* @__PURE__ */
|
|
3087
|
-
error ? /* @__PURE__ */
|
|
3264
|
+
return /* @__PURE__ */ jsxs32(Fragment14, { children: [
|
|
3265
|
+
error ? /* @__PURE__ */ jsxs32(
|
|
3088
3266
|
"p",
|
|
3089
3267
|
{
|
|
3090
3268
|
role: "alert",
|
|
@@ -3096,12 +3274,12 @@ function MermaidView({ entry, load }) {
|
|
|
3096
3274
|
]
|
|
3097
3275
|
}
|
|
3098
3276
|
) : null,
|
|
3099
|
-
/* @__PURE__ */
|
|
3277
|
+
/* @__PURE__ */ jsx48(MermaidSource, { entry, ref })
|
|
3100
3278
|
] });
|
|
3101
3279
|
}
|
|
3102
3280
|
|
|
3103
3281
|
// src/interactive/island-renderers.tsx
|
|
3104
|
-
import { jsx as
|
|
3282
|
+
import { jsx as jsx49 } from "react/jsx-runtime";
|
|
3105
3283
|
var HLJS_ESM = "https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/es/highlight.min.js";
|
|
3106
3284
|
var MERMAID_ESM = "https://cdn.jsdelivr.net/npm/mermaid@10/dist/mermaid.esm.min.mjs";
|
|
3107
3285
|
function cachedCdnModule(url) {
|
|
@@ -3135,13 +3313,13 @@ function CdnHighlightedCode({ entry }) {
|
|
|
3135
3313
|
cancelled = true;
|
|
3136
3314
|
};
|
|
3137
3315
|
}, [entry.content, entry.lang]);
|
|
3138
|
-
return /* @__PURE__ */
|
|
3316
|
+
return /* @__PURE__ */ jsx49(CodeFigure, { label: entry.label, children: html !== null ? /* @__PURE__ */ jsx49(
|
|
3139
3317
|
"code",
|
|
3140
3318
|
{
|
|
3141
3319
|
className: cn("hljs font-mono text-xs", entry.lang && `language-${entry.lang}`),
|
|
3142
3320
|
dangerouslySetInnerHTML: { __html: html }
|
|
3143
3321
|
}
|
|
3144
|
-
) : /* @__PURE__ */
|
|
3322
|
+
) : /* @__PURE__ */ jsx49("code", { className: cn("font-mono text-xs", entry.lang && `language-${entry.lang}`), children: entry.content }) });
|
|
3145
3323
|
}
|
|
3146
3324
|
function buildIslandRenderers(opts) {
|
|
3147
3325
|
const renderers = {};
|
|
@@ -3155,7 +3333,7 @@ function buildIslandRenderers(opts) {
|
|
|
3155
3333
|
}
|
|
3156
3334
|
|
|
3157
3335
|
// src/interactive/ReportInteractiveIsland.tsx
|
|
3158
|
-
import { jsx as
|
|
3336
|
+
import { jsx as jsx50 } from "react/jsx-runtime";
|
|
3159
3337
|
function ReportInteractiveIsland({
|
|
3160
3338
|
report,
|
|
3161
3339
|
title,
|
|
@@ -3169,7 +3347,7 @@ function ReportInteractiveIsland({
|
|
|
3169
3347
|
() => buildIslandRenderers({ syntaxHighlighting, mermaid }),
|
|
3170
3348
|
[syntaxHighlighting, mermaid]
|
|
3171
3349
|
);
|
|
3172
|
-
return /* @__PURE__ */
|
|
3350
|
+
return /* @__PURE__ */ jsx50(
|
|
3173
3351
|
ReportInteractive,
|
|
3174
3352
|
{
|
|
3175
3353
|
report,
|