executable-stories-react 0.17.1 → 0.18.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 +40 -14
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +7 -2
- package/dist/index.d.ts +7 -2
- package/dist/index.js +40 -14
- package/dist/index.js.map +1 -1
- package/dist/interactive.cjs +40 -14
- package/dist/interactive.cjs.map +1 -1
- package/dist/interactive.js +40 -14
- package/dist/interactive.js.map +1 -1
- package/dist/report-island.global.js +23 -23
- package/dist/ssr.cjs +40 -14
- package/dist/ssr.cjs.map +1 -1
- package/dist/ssr.js +40 -14
- package/dist/ssr.js.map +1 -1
- package/dist/tailwind.css +1 -1
- package/package.json +1 -1
package/dist/interactive.cjs
CHANGED
|
@@ -239,11 +239,11 @@ function formatValue(value) {
|
|
|
239
239
|
return String(value);
|
|
240
240
|
}
|
|
241
241
|
}
|
|
242
|
-
function DocKv({
|
|
243
|
-
return /* @__PURE__ */ (0, import_jsx_runtime6.
|
|
242
|
+
function DocKv({ entries }) {
|
|
243
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("dl", { className: "my-2 grid grid-cols-[max-content_1fr] gap-x-3 gap-y-1 text-sm", children: entries.map((entry, i) => /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "contents", children: [
|
|
244
244
|
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("dt", { className: "font-semibold text-muted-foreground", children: entry.label }),
|
|
245
245
|
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("dd", { className: "min-w-0 break-words font-mono text-foreground", children: formatValue(entry.value) })
|
|
246
|
-
] });
|
|
246
|
+
] }, i)) });
|
|
247
247
|
}
|
|
248
248
|
|
|
249
249
|
// src/hooks/useRenderers.ts
|
|
@@ -330,7 +330,7 @@ function DocSection({ entry }) {
|
|
|
330
330
|
if (renderers.section) {
|
|
331
331
|
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_jsx_runtime10.Fragment, { children: renderers.section(entry) });
|
|
332
332
|
}
|
|
333
|
-
const html = safeMarkdownHtml(entry.markdown);
|
|
333
|
+
const html = safeMarkdownHtml(dedent(entry.markdown));
|
|
334
334
|
return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("section", { className: "my-3 text-sm", "aria-label": entry.title, children: [
|
|
335
335
|
entry.title ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("h4", { className: "mb-1 font-semibold text-foreground", children: entry.title }) : null,
|
|
336
336
|
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
@@ -516,7 +516,7 @@ function DocEntry({ entry }) {
|
|
|
516
516
|
case "tag":
|
|
517
517
|
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(DocTag, { entry });
|
|
518
518
|
case "kv":
|
|
519
|
-
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(DocKv, { entry });
|
|
519
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(DocKv, { entries: [entry] });
|
|
520
520
|
case "code":
|
|
521
521
|
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(DocCode, { entry });
|
|
522
522
|
case "table":
|
|
@@ -544,7 +544,15 @@ function DocEntry({ entry }) {
|
|
|
544
544
|
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
545
545
|
function ReportDocEntries({ entries }) {
|
|
546
546
|
if (entries.length === 0) return null;
|
|
547
|
-
|
|
547
|
+
const groups = [];
|
|
548
|
+
for (const entry of entries) {
|
|
549
|
+
const last = groups[groups.length - 1];
|
|
550
|
+
if (entry.kind === "kv" && Array.isArray(last)) last.push(entry);
|
|
551
|
+
else groups.push(entry.kind === "kv" ? [entry] : entry);
|
|
552
|
+
}
|
|
553
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_jsx_runtime18.Fragment, { children: groups.map(
|
|
554
|
+
(g, i) => Array.isArray(g) ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(DocKv, { entries: g }, i) : /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(DocEntry, { entry: g }, i)
|
|
555
|
+
) });
|
|
548
556
|
}
|
|
549
557
|
|
|
550
558
|
// src/components/ReportSteps.tsx
|
|
@@ -1439,10 +1447,17 @@ function ReportFeatureIntro({ feature }) {
|
|
|
1439
1447
|
dangerouslySetInnerHTML: { __html: safeMarkdownHtml(dedent(feature.narrative)) }
|
|
1440
1448
|
}
|
|
1441
1449
|
) : null,
|
|
1442
|
-
hasGlossary ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1450
|
+
hasGlossary ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
1451
|
+
"dl",
|
|
1452
|
+
{
|
|
1453
|
+
className: "grid grid-cols-[max-content_1fr] gap-x-4 gap-y-1.5 text-xs",
|
|
1454
|
+
"aria-label": "Glossary",
|
|
1455
|
+
children: feature.glossary.map((entry) => /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "contents", children: [
|
|
1456
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)("dt", { className: "font-medium text-foreground", children: entry.term }),
|
|
1457
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)("dd", { className: "text-muted-foreground", children: entry.definition })
|
|
1458
|
+
] }, entry.term))
|
|
1459
|
+
}
|
|
1460
|
+
) : null
|
|
1446
1461
|
] });
|
|
1447
1462
|
}
|
|
1448
1463
|
function featureKindLabel(kind) {
|
|
@@ -1458,7 +1473,6 @@ function ReportFeature({ feature }) {
|
|
|
1458
1473
|
const titleId = `${feature.id}-title`;
|
|
1459
1474
|
const bodyId = `${feature.id}-body`;
|
|
1460
1475
|
const s = feature.summary;
|
|
1461
|
-
const skipped = s.skipped + s.pending;
|
|
1462
1476
|
const collapse = useCollapse();
|
|
1463
1477
|
const collapsed = collapse?.isCollapsed(feature.id) ?? false;
|
|
1464
1478
|
const kindLabel = featureKindLabel(feature.kind);
|
|
@@ -1498,7 +1512,12 @@ function ReportFeature({ feature }) {
|
|
|
1498
1512
|
"p",
|
|
1499
1513
|
{
|
|
1500
1514
|
className: "flex shrink-0 items-center gap-1.5 text-xs text-muted-foreground",
|
|
1501
|
-
"aria-label":
|
|
1515
|
+
"aria-label": [
|
|
1516
|
+
`${s.passed} passed`,
|
|
1517
|
+
`${s.failed} failed`,
|
|
1518
|
+
s.skipped > 0 && `${s.skipped} skipped`,
|
|
1519
|
+
s.pending > 0 && `${s.pending} pending`
|
|
1520
|
+
].filter(Boolean).join(", "),
|
|
1502
1521
|
children: [
|
|
1503
1522
|
/* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("span", { children: [
|
|
1504
1523
|
s.passed,
|
|
@@ -1509,12 +1528,19 @@ function ReportFeature({ feature }) {
|
|
|
1509
1528
|
s.failed,
|
|
1510
1529
|
" failed"
|
|
1511
1530
|
] }),
|
|
1512
|
-
skipped > 0 ? /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(import_jsx_runtime30.Fragment, { children: [
|
|
1531
|
+
s.skipped > 0 ? /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(import_jsx_runtime30.Fragment, { children: [
|
|
1513
1532
|
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { "aria-hidden": true, children: "\xB7" }),
|
|
1514
1533
|
/* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("span", { children: [
|
|
1515
|
-
skipped,
|
|
1534
|
+
s.skipped,
|
|
1516
1535
|
" skipped"
|
|
1517
1536
|
] })
|
|
1537
|
+
] }) : null,
|
|
1538
|
+
s.pending > 0 ? /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(import_jsx_runtime30.Fragment, { children: [
|
|
1539
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { "aria-hidden": true, children: "\xB7" }),
|
|
1540
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("span", { children: [
|
|
1541
|
+
s.pending,
|
|
1542
|
+
" pending"
|
|
1543
|
+
] })
|
|
1518
1544
|
] }) : null
|
|
1519
1545
|
]
|
|
1520
1546
|
}
|