executable-stories-react 0.10.1 → 0.11.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/ssr.js CHANGED
@@ -380,21 +380,29 @@ function DocLink({ entry }) {
380
380
  );
381
381
  }
382
382
 
383
- // src/components/doc/DocSection.tsx
383
+ // src/lib/markdown.ts
384
384
  import { marked } from "marked";
385
385
 
386
386
  // src/lib/url.ts
387
387
  import { safeUrl, safeImageUrl, isLocalFsPath } from "executable-stories-core/utils/url";
388
388
 
389
- // src/components/doc/DocSection.tsx
390
- import { Fragment as Fragment2, jsx as jsx9, jsxs as jsxs5 } from "react/jsx-runtime";
391
- function neutralizeUrl(value) {
392
- return safeUrl(value) ?? "#";
393
- }
389
+ // src/lib/markdown.ts
394
390
  function safeMarkdownHtml(markdown) {
395
391
  const raw = marked.parse(markdown, { async: false });
396
392
  return raw.replace(/<script\b[^>]*>[\s\S]*?<\/script>/gi, "").replace(/<style\b[^>]*>[\s\S]*?<\/style>/gi, "").replace(/<\/?(?:iframe|object|embed|form|base)\b[^>]*>/gi, "").replace(/\son[a-z]+\s*=\s*"[^"]*"/gi, "").replace(/\son[a-z]+\s*=\s*'[^']*'/gi, "").replace(/\son[a-z]+\s*=\s*[^\s>]+/gi, "").replace(/(href|src)\s*=\s*"([^"]*)"/gi, (_m, attr, val) => `${attr}="${neutralizeUrl(val)}"`).replace(/(href|src)\s*=\s*'([^']*)'/gi, (_m, attr, val) => `${attr}='${neutralizeUrl(val)}'`);
397
393
  }
394
+ function dedent(text) {
395
+ const lines = text.replace(/\t/g, " ").split("\n");
396
+ const indents = lines.filter((line) => line.trim().length > 0).map((line) => line.length - line.trimStart().length);
397
+ const shortest = indents.length > 0 ? Math.min(...indents) : 0;
398
+ return lines.map((line) => line.slice(shortest)).join("\n").trim();
399
+ }
400
+ function neutralizeUrl(value) {
401
+ return safeUrl(value) ?? "#";
402
+ }
403
+
404
+ // src/components/doc/DocSection.tsx
405
+ import { Fragment as Fragment2, jsx as jsx9, jsxs as jsxs5 } from "react/jsx-runtime";
398
406
  function DocSection({ entry }) {
399
407
  const renderers = useBuiltinRenderers();
400
408
  if (renderers.section) {
@@ -1271,8 +1279,35 @@ function ReportScenarioList({ feature }) {
1271
1279
  return /* @__PURE__ */ jsx27(Fragment8, { children: feature.scenarios.map((scenario) => /* @__PURE__ */ jsx27(ReportScenario, { scenario }, scenario.id)) });
1272
1280
  }
1273
1281
 
1282
+ // src/components/ReportFeatureIntro.tsx
1283
+ import { jsx as jsx28, jsxs as jsxs18 } from "react/jsx-runtime";
1284
+ function ReportFeatureIntro({ feature }) {
1285
+ const hasNarrative = Boolean(feature.narrative?.trim());
1286
+ const hasGlossary = Boolean(feature.glossary?.length);
1287
+ if (!hasNarrative && !hasGlossary) return null;
1288
+ return /* @__PURE__ */ jsxs18("div", { className: "flex flex-col gap-3 border-l-2 border-border pl-4 text-sm", children: [
1289
+ hasNarrative ? /* @__PURE__ */ jsx28(
1290
+ "div",
1291
+ {
1292
+ className: "es-doc-prose prose prose-sm max-w-none text-muted-foreground",
1293
+ dangerouslySetInnerHTML: { __html: safeMarkdownHtml(dedent(feature.narrative)) }
1294
+ }
1295
+ ) : null,
1296
+ hasGlossary ? /* @__PURE__ */ jsx28("dl", { className: "grid gap-1.5", "aria-label": "Glossary", children: feature.glossary.map((entry) => /* @__PURE__ */ jsxs18("div", { className: "flex flex-wrap gap-x-2 text-xs", children: [
1297
+ /* @__PURE__ */ jsx28("dt", { className: "font-medium text-foreground", children: entry.term }),
1298
+ /* @__PURE__ */ jsx28("dd", { className: "flex-1 text-muted-foreground", children: entry.definition })
1299
+ ] }, entry.term)) }) : null
1300
+ ] });
1301
+ }
1302
+ function featureKindLabel(kind) {
1303
+ if (kind === "ability") return "Ability";
1304
+ if (kind === "business-need") return "Business need";
1305
+ if (kind === "feature") return "Feature";
1306
+ return null;
1307
+ }
1308
+
1274
1309
  // src/components/ReportFeature.tsx
1275
- import { Fragment as Fragment9, jsx as jsx28, jsxs as jsxs18 } from "react/jsx-runtime";
1310
+ import { Fragment as Fragment9, jsx as jsx29, jsxs as jsxs19 } from "react/jsx-runtime";
1276
1311
  function ReportFeature({ feature }) {
1277
1312
  const titleId = `${feature.id}-title`;
1278
1313
  const bodyId = `${feature.id}-body`;
@@ -1280,10 +1315,11 @@ function ReportFeature({ feature }) {
1280
1315
  const skipped = s.skipped + s.pending;
1281
1316
  const collapse = useCollapse();
1282
1317
  const collapsed = collapse?.isCollapsed(feature.id) ?? false;
1318
+ const kindLabel = featureKindLabel(feature.kind);
1283
1319
  return (
1284
1320
  // Suite = a section heading + a divider, NOT another bordered card. Drops a
1285
1321
  // layer of nesting so the scenario cards below read as the primary unit.
1286
- /* @__PURE__ */ jsxs18(
1322
+ /* @__PURE__ */ jsxs19(
1287
1323
  "section",
1288
1324
  {
1289
1325
  id: feature.id,
@@ -1291,9 +1327,9 @@ function ReportFeature({ feature }) {
1291
1327
  "aria-labelledby": titleId,
1292
1328
  className: "flex flex-col gap-3",
1293
1329
  children: [
1294
- /* @__PURE__ */ jsxs18("div", { className: "flex items-end justify-between gap-4 border-b border-border pb-2", children: [
1295
- /* @__PURE__ */ jsxs18("div", { className: "min-w-0", children: [
1296
- /* @__PURE__ */ jsx28("h2", { id: titleId, className: "text-base font-semibold tracking-tight text-foreground", children: collapse ? /* @__PURE__ */ jsxs18(
1330
+ /* @__PURE__ */ jsxs19("div", { className: "flex items-end justify-between gap-4 border-b border-border pb-2", children: [
1331
+ /* @__PURE__ */ jsxs19("div", { className: "min-w-0", children: [
1332
+ /* @__PURE__ */ jsx29("h2", { id: titleId, className: "text-base font-semibold tracking-tight text-foreground", children: collapse ? /* @__PURE__ */ jsxs19(
1297
1333
  "button",
1298
1334
  {
1299
1335
  type: "button",
@@ -1302,31 +1338,34 @@ function ReportFeature({ feature }) {
1302
1338
  "aria-controls": bodyId,
1303
1339
  className: "flex w-full cursor-pointer items-center gap-2 text-left hover:text-foreground/80",
1304
1340
  children: [
1305
- /* @__PURE__ */ jsx28("span", { "aria-hidden": true, className: cn("shrink-0 text-xs text-muted-foreground transition-transform", !collapsed && "rotate-90"), children: "\u25B8" }),
1306
- /* @__PURE__ */ jsx28("span", { className: "truncate", children: feature.title })
1341
+ /* @__PURE__ */ jsx29("span", { "aria-hidden": true, className: cn("shrink-0 text-xs text-muted-foreground transition-transform", !collapsed && "rotate-90"), children: "\u25B8" }),
1342
+ /* @__PURE__ */ jsx29("span", { className: "truncate", children: feature.title })
1307
1343
  ]
1308
1344
  }
1309
1345
  ) : feature.title }),
1310
- /* @__PURE__ */ jsx28("p", { className: cn("mt-0.5 truncate font-mono text-xs text-muted-foreground", collapse && "pl-5"), children: feature.sourceFile })
1346
+ /* @__PURE__ */ jsxs19("p", { className: cn("mt-0.5 flex items-center gap-2 text-xs text-muted-foreground", collapse && "pl-5"), children: [
1347
+ kindLabel ? /* @__PURE__ */ jsx29("span", { className: "shrink-0 rounded-sm bg-muted px-1.5 py-0.5 font-medium text-foreground", children: kindLabel }) : null,
1348
+ /* @__PURE__ */ jsx29("span", { className: "truncate font-mono", children: feature.sourceFile })
1349
+ ] })
1311
1350
  ] }),
1312
- /* @__PURE__ */ jsxs18(
1351
+ /* @__PURE__ */ jsxs19(
1313
1352
  "p",
1314
1353
  {
1315
1354
  className: "flex shrink-0 items-center gap-1.5 text-xs text-muted-foreground",
1316
1355
  "aria-label": `${s.passed} passed, ${s.failed} failed, ${skipped} skipped`,
1317
1356
  children: [
1318
- /* @__PURE__ */ jsxs18("span", { children: [
1357
+ /* @__PURE__ */ jsxs19("span", { children: [
1319
1358
  s.passed,
1320
1359
  " passed"
1321
1360
  ] }),
1322
- /* @__PURE__ */ jsx28("span", { "aria-hidden": true, children: "\xB7" }),
1323
- /* @__PURE__ */ jsxs18("span", { className: cn(s.failed > 0 && "font-medium text-fail"), children: [
1361
+ /* @__PURE__ */ jsx29("span", { "aria-hidden": true, children: "\xB7" }),
1362
+ /* @__PURE__ */ jsxs19("span", { className: cn(s.failed > 0 && "font-medium text-fail"), children: [
1324
1363
  s.failed,
1325
1364
  " failed"
1326
1365
  ] }),
1327
- skipped > 0 ? /* @__PURE__ */ jsxs18(Fragment9, { children: [
1328
- /* @__PURE__ */ jsx28("span", { "aria-hidden": true, children: "\xB7" }),
1329
- /* @__PURE__ */ jsxs18("span", { children: [
1366
+ skipped > 0 ? /* @__PURE__ */ jsxs19(Fragment9, { children: [
1367
+ /* @__PURE__ */ jsx29("span", { "aria-hidden": true, children: "\xB7" }),
1368
+ /* @__PURE__ */ jsxs19("span", { children: [
1330
1369
  skipped,
1331
1370
  " skipped"
1332
1371
  ] })
@@ -1335,7 +1374,10 @@ function ReportFeature({ feature }) {
1335
1374
  }
1336
1375
  )
1337
1376
  ] }),
1338
- /* @__PURE__ */ jsx28("div", { id: bodyId, hidden: collapsed, className: "flex flex-col gap-3", children: /* @__PURE__ */ jsx28(ReportScenarioList, { feature }) })
1377
+ /* @__PURE__ */ jsxs19("div", { id: bodyId, hidden: collapsed, className: "flex flex-col gap-3", children: [
1378
+ /* @__PURE__ */ jsx29(ReportFeatureIntro, { feature }),
1379
+ /* @__PURE__ */ jsx29(ReportScenarioList, { feature })
1380
+ ] })
1339
1381
  ]
1340
1382
  }
1341
1383
  )
@@ -1343,17 +1385,17 @@ function ReportFeature({ feature }) {
1343
1385
  }
1344
1386
 
1345
1387
  // src/components/ReportFeatureList.tsx
1346
- import { jsx as jsx29 } from "react/jsx-runtime";
1388
+ import { jsx as jsx30 } from "react/jsx-runtime";
1347
1389
  function ReportFeatureList() {
1348
1390
  const report = useReport();
1349
- return /* @__PURE__ */ jsx29("div", { className: "flex flex-col gap-8", children: report.features.map((feature) => /* @__PURE__ */ jsx29(ReportFeature, { feature }, feature.id)) });
1391
+ return /* @__PURE__ */ jsx30("div", { className: "flex flex-col gap-8", children: report.features.map((feature) => /* @__PURE__ */ jsx30(ReportFeature, { feature }, feature.id)) });
1350
1392
  }
1351
1393
 
1352
1394
  // src/components/ui/empty.tsx
1353
1395
  import { cva as cva2 } from "class-variance-authority";
1354
- import { jsx as jsx30 } from "react/jsx-runtime";
1396
+ import { jsx as jsx31 } from "react/jsx-runtime";
1355
1397
  function Empty({ className, ...props }) {
1356
- return /* @__PURE__ */ jsx30(
1398
+ return /* @__PURE__ */ jsx31(
1357
1399
  "div",
1358
1400
  {
1359
1401
  "data-slot": "empty",
@@ -1366,7 +1408,7 @@ function Empty({ className, ...props }) {
1366
1408
  );
1367
1409
  }
1368
1410
  function EmptyHeader({ className, ...props }) {
1369
- return /* @__PURE__ */ jsx30(
1411
+ return /* @__PURE__ */ jsx31(
1370
1412
  "div",
1371
1413
  {
1372
1414
  "data-slot": "empty-header",
@@ -1393,7 +1435,7 @@ var emptyMediaVariants = cva2(
1393
1435
  }
1394
1436
  );
1395
1437
  function EmptyTitle({ className, ...props }) {
1396
- return /* @__PURE__ */ jsx30(
1438
+ return /* @__PURE__ */ jsx31(
1397
1439
  "div",
1398
1440
  {
1399
1441
  "data-slot": "empty-title",
@@ -1404,16 +1446,16 @@ function EmptyTitle({ className, ...props }) {
1404
1446
  }
1405
1447
 
1406
1448
  // src/components/ReportEmpty.tsx
1407
- import { jsx as jsx31 } from "react/jsx-runtime";
1449
+ import { jsx as jsx32 } from "react/jsx-runtime";
1408
1450
  function ReportEmpty({ message }) {
1409
- return /* @__PURE__ */ jsx31(Empty, { "aria-live": "polite", className: "border", children: /* @__PURE__ */ jsx31(EmptyHeader, { children: /* @__PURE__ */ jsx31(EmptyTitle, { children: message ?? "No scenarios in this report." }) }) });
1451
+ return /* @__PURE__ */ jsx32(Empty, { "aria-live": "polite", className: "border", children: /* @__PURE__ */ jsx32(EmptyHeader, { children: /* @__PURE__ */ jsx32(EmptyTitle, { children: message ?? "No scenarios in this report." }) }) });
1410
1452
  }
1411
1453
 
1412
1454
  // src/components/ReportSummary.tsx
1413
- import { jsx as jsx32, jsxs as jsxs19 } from "react/jsx-runtime";
1455
+ import { jsx as jsx33, jsxs as jsxs20 } from "react/jsx-runtime";
1414
1456
  function ReportSummary({ className }) {
1415
1457
  const report = useReport();
1416
- return /* @__PURE__ */ jsx32(
1458
+ return /* @__PURE__ */ jsx33(
1417
1459
  ReportSummaryView,
1418
1460
  {
1419
1461
  summary: report.summary,
@@ -1439,7 +1481,7 @@ function ReportSummaryView({ summary, className, ariaLabel }) {
1439
1481
  if (summary.pending > 0) {
1440
1482
  cards.push({ status: "pending", label: "Pending", value: summary.pending });
1441
1483
  }
1442
- return /* @__PURE__ */ jsx32(
1484
+ return /* @__PURE__ */ jsx33(
1443
1485
  "dl",
1444
1486
  {
1445
1487
  className: cn(
@@ -1452,17 +1494,17 @@ function ReportSummaryView({ summary, className, ariaLabel }) {
1452
1494
  "aria-label": ariaLabel,
1453
1495
  children: cards.map((c) => {
1454
1496
  const tone = TONE[c.status];
1455
- return /* @__PURE__ */ jsxs19(
1497
+ return /* @__PURE__ */ jsxs20(
1456
1498
  "div",
1457
1499
  {
1458
1500
  "data-status": c.status,
1459
1501
  className: "rounded-lg border bg-card px-4 py-3",
1460
1502
  children: [
1461
- /* @__PURE__ */ jsxs19("dt", { className: "flex items-center gap-1.5 font-mono text-[11px] font-medium uppercase tracking-wider text-muted-foreground", children: [
1462
- /* @__PURE__ */ jsx32("span", { className: cn("size-1.5 shrink-0 rounded-full", tone.dot), "aria-hidden": "true" }),
1503
+ /* @__PURE__ */ jsxs20("dt", { className: "flex items-center gap-1.5 font-mono text-[11px] font-medium uppercase tracking-wider text-muted-foreground", children: [
1504
+ /* @__PURE__ */ jsx33("span", { className: cn("size-1.5 shrink-0 rounded-full", tone.dot), "aria-hidden": "true" }),
1463
1505
  c.label
1464
1506
  ] }),
1465
- /* @__PURE__ */ jsx32("dd", { className: cn("mt-2 text-3xl font-semibold leading-none tracking-tight tabular-nums", tone.num), children: c.value })
1507
+ /* @__PURE__ */ jsx33("dd", { className: cn("mt-2 text-3xl font-semibold leading-none tracking-tight tabular-nums", tone.num), children: c.value })
1466
1508
  ]
1467
1509
  },
1468
1510
  c.status
@@ -1506,7 +1548,7 @@ function prUrl(ci) {
1506
1548
  }
1507
1549
 
1508
1550
  // src/components/ReportMeta.tsx
1509
- import { jsx as jsx33, jsxs as jsxs20 } from "react/jsx-runtime";
1551
+ import { jsx as jsx34, jsxs as jsxs21 } from "react/jsx-runtime";
1510
1552
  function ReportMeta() {
1511
1553
  const report = useReport();
1512
1554
  const items = [];
@@ -1529,13 +1571,13 @@ function ReportMeta() {
1529
1571
  const short = sha.slice(0, 8);
1530
1572
  items.push({
1531
1573
  label: "Commit",
1532
- value: url ? /* @__PURE__ */ jsx33("a", { href: url, target: "_blank", rel: "noreferrer noopener", className: linkClass, children: short }) : short
1574
+ value: url ? /* @__PURE__ */ jsx34("a", { href: url, target: "_blank", rel: "noreferrer noopener", className: linkClass, children: short }) : short
1533
1575
  });
1534
1576
  }
1535
1577
  if (report.ci) {
1536
1578
  items.push({
1537
1579
  label: "CI",
1538
- value: report.ci.url ? /* @__PURE__ */ jsxs20("a", { href: report.ci.url, target: "_blank", rel: "noreferrer noopener", className: linkClass, children: [
1580
+ value: report.ci.url ? /* @__PURE__ */ jsxs21("a", { href: report.ci.url, target: "_blank", rel: "noreferrer noopener", className: linkClass, children: [
1539
1581
  ciDisplayName(report.ci.name),
1540
1582
  report.ci.buildNumber ? ` #${report.ci.buildNumber}` : ""
1541
1583
  ] }) : `${ciDisplayName(report.ci.name)}${report.ci.buildNumber ? ` #${report.ci.buildNumber}` : ""}`
@@ -1546,7 +1588,7 @@ function ReportMeta() {
1546
1588
  const label = `#${report.ci.prNumber}`;
1547
1589
  items.push({
1548
1590
  label: "PR",
1549
- value: url ? /* @__PURE__ */ jsx33("a", { href: url, target: "_blank", rel: "noreferrer noopener", className: linkClass, children: label }) : label
1591
+ value: url ? /* @__PURE__ */ jsx34("a", { href: url, target: "_blank", rel: "noreferrer noopener", className: linkClass, children: label }) : label
1550
1592
  });
1551
1593
  }
1552
1594
  if (items.length === 0) return null;
@@ -1554,48 +1596,48 @@ function ReportMeta() {
1554
1596
  // Run metadata is useful but secondary to "what failed" — tuck it into a
1555
1597
  // collapsed disclosure so it doesn't push the result down. Native <details>
1556
1598
  // so it works with no JS (the SSR/no-hydration report still toggles).
1557
- /* @__PURE__ */ jsxs20("details", { "data-es-meta-card": true, className: "es-run-details group rounded-lg border border-border bg-card text-xs", children: [
1558
- /* @__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: [
1559
- /* @__PURE__ */ jsx33("span", { "aria-hidden": true, className: "text-xs transition-transform group-open:rotate-90", children: "\u25B8" }),
1599
+ /* @__PURE__ */ jsxs21("details", { "data-es-meta-card": true, className: "es-run-details group rounded-lg border border-border bg-card text-xs", children: [
1600
+ /* @__PURE__ */ jsxs21("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: [
1601
+ /* @__PURE__ */ jsx34("span", { "aria-hidden": true, className: "text-xs transition-transform group-open:rotate-90", children: "\u25B8" }),
1560
1602
  "Run details"
1561
1603
  ] }),
1562
- /* @__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: [
1563
- /* @__PURE__ */ jsx33("dt", { className: "font-medium", children: item.label }),
1564
- /* @__PURE__ */ jsx33("dd", { className: "font-mono text-foreground", children: item.value })
1604
+ /* @__PURE__ */ jsx34("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__ */ jsxs21("div", { className: "flex items-baseline gap-1.5", children: [
1605
+ /* @__PURE__ */ jsx34("dt", { className: "font-medium", children: item.label }),
1606
+ /* @__PURE__ */ jsx34("dd", { className: "font-mono text-foreground", children: item.value })
1565
1607
  ] }, item.label)) })
1566
1608
  ] })
1567
1609
  );
1568
1610
  }
1569
1611
 
1570
1612
  // src/components/ReportSchemaError.tsx
1571
- import { jsx as jsx34, jsxs as jsxs21 } from "react/jsx-runtime";
1613
+ import { jsx as jsx35, jsxs as jsxs22 } from "react/jsx-runtime";
1572
1614
  function ReportSchemaError({ error }) {
1573
- return /* @__PURE__ */ jsxs21("section", { className: "es-schema-error", role: "alert", "aria-live": "assertive", children: [
1574
- /* @__PURE__ */ jsx34("p", { children: /* @__PURE__ */ jsx34("strong", { children: "Report could not be displayed." }) }),
1575
- /* @__PURE__ */ jsx34("p", { children: error.message }),
1576
- error.code === "SCHEMA_VERSION_MISMATCH" ? /* @__PURE__ */ jsxs21("p", { children: [
1615
+ return /* @__PURE__ */ jsxs22("section", { className: "es-schema-error", role: "alert", "aria-live": "assertive", children: [
1616
+ /* @__PURE__ */ jsx35("p", { children: /* @__PURE__ */ jsx35("strong", { children: "Report could not be displayed." }) }),
1617
+ /* @__PURE__ */ jsx35("p", { children: error.message }),
1618
+ error.code === "SCHEMA_VERSION_MISMATCH" ? /* @__PURE__ */ jsxs22("p", { children: [
1577
1619
  "The report bundle is newer than this version of ",
1578
- /* @__PURE__ */ jsx34("code", { children: "executable-stories-react" }),
1620
+ /* @__PURE__ */ jsx35("code", { children: "executable-stories-react" }),
1579
1621
  ". Upgrade the package, or regenerate the report with an older formatters CLI."
1580
1622
  ] }) : null,
1581
- error.issues && error.issues.length > 0 ? /* @__PURE__ */ jsxs21("details", { children: [
1582
- /* @__PURE__ */ jsxs21("summary", { children: [
1623
+ error.issues && error.issues.length > 0 ? /* @__PURE__ */ jsxs22("details", { children: [
1624
+ /* @__PURE__ */ jsxs22("summary", { children: [
1583
1625
  error.issues.length,
1584
1626
  " validation issue",
1585
1627
  error.issues.length === 1 ? "" : "s"
1586
1628
  ] }),
1587
- /* @__PURE__ */ jsx34("pre", { children: error.issues.slice(0, 20).map((i) => `${i.path}: ${i.message}`).join("\n") })
1629
+ /* @__PURE__ */ jsx35("pre", { children: error.issues.slice(0, 20).map((i) => `${i.path}: ${i.message}`).join("\n") })
1588
1630
  ] }) : null
1589
1631
  ] });
1590
1632
  }
1591
1633
 
1592
1634
  // src/components/ReportShell.tsx
1593
- import { Fragment as Fragment10, jsx as jsx35, jsxs as jsxs22 } from "react/jsx-runtime";
1635
+ import { Fragment as Fragment10, jsx as jsx36, jsxs as jsxs23 } from "react/jsx-runtime";
1594
1636
  function ReportTitleBlock({ title }) {
1595
- return /* @__PURE__ */ jsxs22(Fragment10, { children: [
1596
- /* @__PURE__ */ jsx35("h1", { children: title ?? "Story Report" }),
1597
- /* @__PURE__ */ jsx35(ReportSummary, {}),
1598
- /* @__PURE__ */ jsx35(ReportMeta, {})
1637
+ return /* @__PURE__ */ jsxs23(Fragment10, { children: [
1638
+ /* @__PURE__ */ jsx36("h1", { children: title ?? "Story Report" }),
1639
+ /* @__PURE__ */ jsx36(ReportSummary, {}),
1640
+ /* @__PURE__ */ jsx36(ReportMeta, {})
1599
1641
  ] });
1600
1642
  }
1601
1643
  function ReportErrorShell({
@@ -1604,22 +1646,22 @@ function ReportErrorShell({
1604
1646
  title,
1605
1647
  dataTheme
1606
1648
  }) {
1607
- return /* @__PURE__ */ jsx35("main", { className: cn("es-report", className), "aria-label": title ?? "Test report", "data-theme": dataTheme, children: /* @__PURE__ */ jsx35(ReportSchemaError, { error }) });
1649
+ return /* @__PURE__ */ jsx36("main", { className: cn("es-report", className), "aria-label": title ?? "Test report", "data-theme": dataTheme, children: /* @__PURE__ */ jsx36(ReportSchemaError, { error }) });
1608
1650
  }
1609
1651
 
1610
1652
  // src/components/Report.tsx
1611
- import { jsx as jsx36, jsxs as jsxs23 } from "react/jsx-runtime";
1653
+ import { jsx as jsx37, jsxs as jsxs24 } from "react/jsx-runtime";
1612
1654
  function Report(props) {
1613
1655
  const { report, customRenderers, renderers, className, title, dataTheme } = props;
1614
1656
  const result = unwrapReport(report);
1615
1657
  if (!result.ok) {
1616
- return /* @__PURE__ */ jsx36(ReportErrorShell, { error: result.error, className, title, dataTheme });
1658
+ return /* @__PURE__ */ jsx37(ReportErrorShell, { error: result.error, className, title, dataTheme });
1617
1659
  }
1618
1660
  const data = result.data;
1619
1661
  const hasContent = data.features.length > 0;
1620
- return /* @__PURE__ */ jsx36(ReportRoot, { report: data, customRenderers, renderers, children: /* @__PURE__ */ jsxs23("main", { className: cn("es-report", className), "aria-label": title ?? "Test report", "data-theme": dataTheme, children: [
1621
- /* @__PURE__ */ jsx36("header", { className: "es-report-header", children: /* @__PURE__ */ jsx36(ReportTitleBlock, { title }) }),
1622
- hasContent ? /* @__PURE__ */ jsx36(ReportFeatureList, {}) : /* @__PURE__ */ jsx36(ReportEmpty, {})
1662
+ return /* @__PURE__ */ jsx37(ReportRoot, { report: data, customRenderers, renderers, children: /* @__PURE__ */ jsxs24("main", { className: cn("es-report", className), "aria-label": title ?? "Test report", "data-theme": dataTheme, children: [
1663
+ /* @__PURE__ */ jsx37("header", { className: "es-report-header", children: /* @__PURE__ */ jsx37(ReportTitleBlock, { title }) }),
1664
+ hasContent ? /* @__PURE__ */ jsx37(ReportFeatureList, {}) : /* @__PURE__ */ jsx37(ReportEmpty, {})
1623
1665
  ] }) });
1624
1666
  }
1625
1667