executable-stories-react 0.19.0 → 0.20.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.
@@ -520,7 +520,7 @@ function ReportDocEntries({ entries }) {
520
520
  }
521
521
 
522
522
  // src/components/ReportSteps.tsx
523
- import { jsx as jsx19, jsxs as jsxs10 } from "react/jsx-runtime";
523
+ import { Fragment as Fragment6, jsx as jsx19, jsxs as jsxs10 } from "react/jsx-runtime";
524
524
  var STEP_GLYPH = {
525
525
  passed: "\u2713",
526
526
  failed: "\u2717",
@@ -597,6 +597,23 @@ function ReportStepItem({
597
597
  children: step.errorMessage
598
598
  }
599
599
  ) : null,
600
+ step.expected !== void 0 || step.actual !== void 0 ? /* @__PURE__ */ jsxs10(
601
+ "dl",
602
+ {
603
+ "data-slot": "step-comparison",
604
+ className: "mt-1.5 ml-6 grid grid-cols-[auto_1fr] gap-x-3 gap-y-1 font-mono text-xs",
605
+ children: [
606
+ step.expected !== void 0 ? /* @__PURE__ */ jsxs10(Fragment6, { children: [
607
+ /* @__PURE__ */ jsx19("dt", { className: "text-muted-foreground", children: "Expected" }),
608
+ /* @__PURE__ */ jsx19("dd", { className: "overflow-x-auto whitespace-pre-wrap text-pass", children: step.expected })
609
+ ] }) : null,
610
+ step.actual !== void 0 ? /* @__PURE__ */ jsxs10(Fragment6, { children: [
611
+ /* @__PURE__ */ jsx19("dt", { className: "text-muted-foreground", children: "Actual" }),
612
+ /* @__PURE__ */ jsx19("dd", { className: "overflow-x-auto whitespace-pre-wrap text-fail", children: step.actual })
613
+ ] }) : null
614
+ ]
615
+ }
616
+ ) : null,
600
617
  step.docEntries.length > 0 ? /* @__PURE__ */ jsx19("div", { "data-es-docs": true, className: "mt-2 ml-6", children: /* @__PURE__ */ jsx19(ReportDocEntries, { entries: step.docEntries }) }) : null
601
618
  ]
602
619
  }
@@ -720,7 +737,7 @@ function StateCardView({ card }) {
720
737
  }
721
738
 
722
739
  // src/components/ReportAttachments.tsx
723
- import { Fragment as Fragment6, jsx as jsx21, jsxs as jsxs12 } from "react/jsx-runtime";
740
+ import { Fragment as Fragment7, jsx as jsx21, jsxs as jsxs12 } from "react/jsx-runtime";
724
741
  function attachmentText(att) {
725
742
  if (att.contentEncoding !== "BASE64") return att.body;
726
743
  try {
@@ -760,7 +777,7 @@ function ReportAttachments({ attachments }) {
760
777
  const href = dataUri ?? safeUrl(att.body);
761
778
  const imageSrc = dataUri ?? safeImageUrl(att.body);
762
779
  const isImage = att.mediaType.startsWith("image/") && imageSrc !== void 0;
763
- return /* @__PURE__ */ jsx21("figure", { className: "m-0", children: isImage ? /* @__PURE__ */ jsxs12(Fragment6, { children: [
780
+ return /* @__PURE__ */ jsx21("figure", { className: "m-0", children: isImage ? /* @__PURE__ */ jsxs12(Fragment7, { children: [
764
781
  /* @__PURE__ */ jsx21(
765
782
  "img",
766
783
  {
@@ -771,7 +788,7 @@ function ReportAttachments({ attachments }) {
771
788
  }
772
789
  ),
773
790
  /* @__PURE__ */ jsx21("figcaption", { className: "mt-1 text-xs text-muted-foreground", children: att.name })
774
- ] }) : /* @__PURE__ */ jsxs12(Fragment6, { children: [
791
+ ] }) : /* @__PURE__ */ jsxs12(Fragment7, { children: [
775
792
  att.external ? null : preview(att),
776
793
  /* @__PURE__ */ jsxs12(
777
794
  "a",
@@ -984,7 +1001,7 @@ function diffSinceLastRun(history, scenarios) {
984
1001
  }
985
1002
 
986
1003
  // src/components/ScenarioRunHistory.tsx
987
- import { Fragment as Fragment7, jsx as jsx23, jsxs as jsxs14 } from "react/jsx-runtime";
1004
+ import { Fragment as Fragment8, jsx as jsx23, jsxs as jsxs14 } from "react/jsx-runtime";
988
1005
  var MAX_DOTS = 10;
989
1006
  var DOT_COLOR = {
990
1007
  passed: "bg-pass",
@@ -1004,7 +1021,7 @@ function ScenarioRunHistory({ scenarioId }) {
1004
1021
  const recent = entries.slice(-MAX_DOTS);
1005
1022
  const flaky = flakinessOf(recent) === "flaky";
1006
1023
  const summary = flaky ? `${describeRunHistory(recent)} \xB7 Flaky` : describeRunHistory(recent);
1007
- return /* @__PURE__ */ jsxs14(Fragment7, { children: [
1024
+ return /* @__PURE__ */ jsxs14(Fragment8, { children: [
1008
1025
  flaky ? /* @__PURE__ */ jsx23(Badge, { variant: "pending", "aria-label": "Flaky: status flips between recent runs", title: summary, children: "Flaky" }) : null,
1009
1026
  /* @__PURE__ */ jsx23(
1010
1027
  "span",
@@ -1426,9 +1443,9 @@ function ReportScenario({ scenario, hideTitle = false }) {
1426
1443
  }
1427
1444
 
1428
1445
  // src/components/ReportScenarioList.tsx
1429
- import { Fragment as Fragment8, jsx as jsx27 } from "react/jsx-runtime";
1446
+ import { Fragment as Fragment9, jsx as jsx27 } from "react/jsx-runtime";
1430
1447
  function ReportScenarioList({ feature }) {
1431
- return /* @__PURE__ */ jsx27(Fragment8, { children: feature.scenarios.map((scenario) => /* @__PURE__ */ jsx27(ReportScenario, { scenario }, scenario.id)) });
1448
+ return /* @__PURE__ */ jsx27(Fragment9, { children: feature.scenarios.map((scenario) => /* @__PURE__ */ jsx27(ReportScenario, { scenario }, scenario.id)) });
1432
1449
  }
1433
1450
 
1434
1451
  // src/components/ReportFeatureIntro.tsx
@@ -1466,7 +1483,7 @@ function featureKindLabel(kind) {
1466
1483
  }
1467
1484
 
1468
1485
  // src/components/ReportFeature.tsx
1469
- import { Fragment as Fragment9, jsx as jsx29, jsxs as jsxs19 } from "react/jsx-runtime";
1486
+ import { Fragment as Fragment10, jsx as jsx29, jsxs as jsxs19 } from "react/jsx-runtime";
1470
1487
  function ReportFeature({ feature }) {
1471
1488
  const titleId = `${feature.id}-title`;
1472
1489
  const bodyId = `${feature.id}-body`;
@@ -1526,14 +1543,14 @@ function ReportFeature({ feature }) {
1526
1543
  s.failed,
1527
1544
  " failed"
1528
1545
  ] }),
1529
- s.skipped > 0 ? /* @__PURE__ */ jsxs19(Fragment9, { children: [
1546
+ s.skipped > 0 ? /* @__PURE__ */ jsxs19(Fragment10, { children: [
1530
1547
  /* @__PURE__ */ jsx29("span", { "aria-hidden": true, children: "\xB7" }),
1531
1548
  /* @__PURE__ */ jsxs19("span", { children: [
1532
1549
  s.skipped,
1533
1550
  " skipped"
1534
1551
  ] })
1535
1552
  ] }) : null,
1536
- s.pending > 0 ? /* @__PURE__ */ jsxs19(Fragment9, { children: [
1553
+ s.pending > 0 ? /* @__PURE__ */ jsxs19(Fragment10, { children: [
1537
1554
  /* @__PURE__ */ jsx29("span", { "aria-hidden": true, children: "\xB7" }),
1538
1555
  /* @__PURE__ */ jsxs19("span", { children: [
1539
1556
  s.pending,
@@ -1720,7 +1737,7 @@ function ReportSchemaError({ error }) {
1720
1737
  }
1721
1738
 
1722
1739
  // src/components/ReportShell.tsx
1723
- import { Fragment as Fragment10, jsx as jsx34, jsxs as jsxs23 } from "react/jsx-runtime";
1740
+ import { Fragment as Fragment11, jsx as jsx34, jsxs as jsxs23 } from "react/jsx-runtime";
1724
1741
  function ReportErrorShell({
1725
1742
  error,
1726
1743
  className,
@@ -2258,7 +2275,7 @@ function listFailures(report) {
2258
2275
 
2259
2276
  // src/interactive/ReportAgentFilterNotice.tsx
2260
2277
  import { Bot, X } from "lucide-react";
2261
- import { Fragment as Fragment11, jsx as jsx40, jsxs as jsxs26 } from "react/jsx-runtime";
2278
+ import { Fragment as Fragment12, jsx as jsx40, jsxs as jsxs26 } from "react/jsx-runtime";
2262
2279
  function ReportAgentFilterNotice({
2263
2280
  applied,
2264
2281
  onReset,
@@ -2278,7 +2295,7 @@ function ReportAgentFilterNotice({
2278
2295
  /* @__PURE__ */ jsx40(Bot, { "aria-hidden": true, className: "size-4 shrink-0 text-primary" }),
2279
2296
  /* @__PURE__ */ jsxs26("span", { className: "min-w-0 flex-1", children: [
2280
2297
  "An agent filtered this report",
2281
- terms.length > 0 ? /* @__PURE__ */ jsxs26(Fragment11, { children: [
2298
+ terms.length > 0 ? /* @__PURE__ */ jsxs26(Fragment12, { children: [
2282
2299
  " to ",
2283
2300
  terms.join(" \xB7 ")
2284
2301
  ] }) : null,
@@ -2447,7 +2464,7 @@ function ReportFilters({
2447
2464
 
2448
2465
  // src/interactive/ReportFreshness.tsx
2449
2466
  import { useEffect as useEffect3, useState as useState5 } from "react";
2450
- import { Fragment as Fragment12, jsx as jsx43, jsxs as jsxs29 } from "react/jsx-runtime";
2467
+ import { Fragment as Fragment13, jsx as jsx43, jsxs as jsxs29 } from "react/jsx-runtime";
2451
2468
  function ReportFreshness({ lastRunMs, ciUrl, staleAfterDays, nowMs }) {
2452
2469
  const [now, setNow] = useState5(nowMs);
2453
2470
  useEffect3(() => {
@@ -2481,7 +2498,7 @@ function ReportFreshness({ lastRunMs, ciUrl, staleAfterDays, nowMs }) {
2481
2498
  return /* @__PURE__ */ jsxs29("p", { className: "es-freshness", "aria-label": "Report freshness", children: [
2482
2499
  "Verified ",
2483
2500
  age,
2484
- runLink ? /* @__PURE__ */ jsxs29(Fragment12, { children: [
2501
+ runLink ? /* @__PURE__ */ jsxs29(Fragment13, { children: [
2485
2502
  " \xB7 ",
2486
2503
  runLink
2487
2504
  ] }) : null
@@ -2489,10 +2506,10 @@ function ReportFreshness({ lastRunMs, ciUrl, staleAfterDays, nowMs }) {
2489
2506
  }
2490
2507
 
2491
2508
  // src/interactive/ReportLastRunDelta.tsx
2492
- import { Fragment as Fragment13, jsx as jsx44, jsxs as jsxs30 } from "react/jsx-runtime";
2509
+ import { Fragment as Fragment14, jsx as jsx44, jsxs as jsxs30 } from "react/jsx-runtime";
2493
2510
  var MAX_LINKS = 5;
2494
2511
  function ScenarioLinks({ scenarios, tone }) {
2495
- return /* @__PURE__ */ jsxs30(Fragment13, { children: [
2512
+ return /* @__PURE__ */ jsxs30(Fragment14, { children: [
2496
2513
  scenarios.slice(0, MAX_LINKS).map((s, i) => /* @__PURE__ */ jsxs30("span", { children: [
2497
2514
  i > 0 ? ", " : "",
2498
2515
  /* @__PURE__ */ jsx44("a", { href: `#${s.id}`, className: cn("underline underline-offset-2 hover:no-underline", tone), children: s.title })
@@ -2689,7 +2706,7 @@ function Button({
2689
2706
  }
2690
2707
 
2691
2708
  // src/interactive/ReportShare.tsx
2692
- import { Fragment as Fragment14, jsx as jsx47, jsxs as jsxs32 } from "react/jsx-runtime";
2709
+ import { Fragment as Fragment15, jsx as jsx47, jsxs as jsxs32 } from "react/jsx-runtime";
2693
2710
  var DEFAULT_SHARE_COMMAND = "npx executable-stories share reports/";
2694
2711
  function ReportShare({
2695
2712
  command = DEFAULT_SHARE_COMMAND,
@@ -2703,7 +2720,7 @@ function ReportShare({
2703
2720
  if (open && !dialog.open) dialog.showModal();
2704
2721
  else if (!open && dialog.open) dialog.close();
2705
2722
  }, [open]);
2706
- return /* @__PURE__ */ jsxs32(Fragment14, { children: [
2723
+ return /* @__PURE__ */ jsxs32(Fragment15, { children: [
2707
2724
  /* @__PURE__ */ jsxs32(
2708
2725
  Button,
2709
2726
  {
@@ -2798,7 +2815,7 @@ function diffSinceVisit(previous, report) {
2798
2815
  }
2799
2816
 
2800
2817
  // src/interactive/ReportSinceLastVisit.tsx
2801
- import { Fragment as Fragment15, jsx as jsx48, jsxs as jsxs33 } from "react/jsx-runtime";
2818
+ import { Fragment as Fragment16, jsx as jsx48, jsxs as jsxs33 } from "react/jsx-runtime";
2802
2819
  var KEY = "es-last-visit";
2803
2820
  var MAX_LINKS2 = 5;
2804
2821
  function readVisit() {
@@ -2823,7 +2840,7 @@ function writeVisit(snapshot) {
2823
2840
  }
2824
2841
  }
2825
2842
  function ScenarioLinks2({ scenarios, tone }) {
2826
- return /* @__PURE__ */ jsxs33(Fragment15, { children: [
2843
+ return /* @__PURE__ */ jsxs33(Fragment16, { children: [
2827
2844
  scenarios.slice(0, MAX_LINKS2).map((s, i) => /* @__PURE__ */ jsxs33("span", { children: [
2828
2845
  i > 0 ? ", " : "",
2829
2846
  /* @__PURE__ */ jsx48("a", { href: `#${s.id}`, className: cn("underline underline-offset-2 hover:no-underline", tone), children: s.title })
@@ -3447,7 +3464,7 @@ function reportTools(deps) {
3447
3464
  }
3448
3465
 
3449
3466
  // src/interactive/ReportInteractive.tsx
3450
- import { Fragment as Fragment16, jsx as jsx52, jsxs as jsxs37 } from "react/jsx-runtime";
3467
+ import { Fragment as Fragment17, jsx as jsx52, jsxs as jsxs37 } from "react/jsx-runtime";
3451
3468
  function ReportInteractive(props) {
3452
3469
  const { report, className, title, dataTheme } = props;
3453
3470
  const result = unwrapReport(report);
@@ -3716,7 +3733,7 @@ function ReportInteractiveView({
3716
3733
  ]
3717
3734
  }
3718
3735
  ),
3719
- hideHeader ? null : /* @__PURE__ */ jsxs37(Fragment16, { children: [
3736
+ hideHeader ? null : /* @__PURE__ */ jsxs37(Fragment17, { children: [
3720
3737
  /* @__PURE__ */ jsx52(ReportSummary, {}),
3721
3738
  /* @__PURE__ */ jsx52(ReportMeta, {})
3722
3739
  ] }),
@@ -3848,7 +3865,7 @@ import { createElement, useEffect as useEffect13, useState as useState14 } from
3848
3865
 
3849
3866
  // src/components/doc/MermaidView.tsx
3850
3867
  import { useEffect as useEffect12, useRef as useRef8, useState as useState13 } from "react";
3851
- import { Fragment as Fragment17, jsx as jsx53, jsxs as jsxs38 } from "react/jsx-runtime";
3868
+ import { Fragment as Fragment18, jsx as jsx53, jsxs as jsxs38 } from "react/jsx-runtime";
3852
3869
  function prefersDark(el) {
3853
3870
  const themed = el?.closest("[data-theme]");
3854
3871
  if (themed?.dataset.theme === "dark") return true;
@@ -3918,7 +3935,7 @@ function MermaidView({ entry, load }) {
3918
3935
  )
3919
3936
  ] });
3920
3937
  }
3921
- return /* @__PURE__ */ jsxs38(Fragment17, { children: [
3938
+ return /* @__PURE__ */ jsxs38(Fragment18, { children: [
3922
3939
  error ? /* @__PURE__ */ jsxs38(
3923
3940
  "p",
3924
3941
  {