executable-stories-react 0.7.0 → 0.9.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.d.cts CHANGED
@@ -75,7 +75,7 @@ interface ReportCoverageSummary {
75
75
  functionsPct?: number;
76
76
  statementsPct?: number;
77
77
  }
78
- type ReportDocEntry = ReportDocNote | ReportDocTag | ReportDocKv | ReportDocCode | ReportDocTable | ReportDocLink | ReportDocSection | ReportDocMermaid | ReportDocScreenshot | ReportDocVideo | ReportDocHtml | ReportDocCustom;
78
+ type ReportDocEntry = ReportDocNote | ReportDocTag | ReportDocKv | ReportDocCode | ReportDocTable | ReportDocLink | ReportDocSection | ReportDocMermaid | ReportDocScreenshot | ReportDocVideo | ReportDocHtml | ReportDocState | ReportDocCustom;
79
79
  interface ReportDocNote {
80
80
  kind: "note";
81
81
  text: string;
@@ -161,6 +161,15 @@ interface ReportDocHtml {
161
161
  phase: DocPhase;
162
162
  children?: ReportDocEntry[];
163
163
  }
164
+ interface ReportDocState {
165
+ kind: "state";
166
+ /** Entity name ("Basket") — diff identity across steps. Unlabeled states share one lane. */
167
+ label?: string;
168
+ /** JSON-serializable snapshot of the state at this step. */
169
+ value: unknown;
170
+ phase: DocPhase;
171
+ children?: ReportDocEntry[];
172
+ }
164
173
  interface ReportDocCustom {
165
174
  kind: "custom";
166
175
  type: string;
@@ -373,16 +382,18 @@ interface ReportStoryboardProps {
373
382
  scenario: ReportScenario$1;
374
383
  }
375
384
  /**
376
- * Storyboard — a horizontal filmstrip of the scenario's step screenshots
385
+ * Storyboard — a horizontal filmstrip of the scenario's step evidence
377
386
  * (Given → When → Then), derived from the same step docs the vertical step
378
- * list renders. Each frame links to its step's anchor, where the full-size
379
- * screenshot and step detail live.
387
+ * list renders. A frame is a container: the step's screenshot (when present)
388
+ * plus its `story.state()` snapshot cards, so data-only scenarios get
389
+ * filmstrips too. Each frame links to its step's anchor.
380
390
  *
381
- * Renders nothing below 2 frames: a single screenshot is evidence, not a
391
+ * Renders nothing below 2 frames: a single capture is evidence, not a
382
392
  * walkthrough, and it already shows under its step.
383
393
  *
384
394
  * Must stay hydration-free: the Astro story pages render this inside a static
385
- * (no client JS) island, so navigation is plain anchors — no lightbox state.
395
+ * (no client JS) island, so navigation is plain anchors and snapshot expansion
396
+ * is a native <details> — no lightbox or toggle state.
386
397
  */
387
398
  declare function ReportStoryboard({ scenario }: ReportStoryboardProps): react.JSX.Element | null;
388
399
 
package/dist/index.d.ts CHANGED
@@ -75,7 +75,7 @@ interface ReportCoverageSummary {
75
75
  functionsPct?: number;
76
76
  statementsPct?: number;
77
77
  }
78
- type ReportDocEntry = ReportDocNote | ReportDocTag | ReportDocKv | ReportDocCode | ReportDocTable | ReportDocLink | ReportDocSection | ReportDocMermaid | ReportDocScreenshot | ReportDocVideo | ReportDocHtml | ReportDocCustom;
78
+ type ReportDocEntry = ReportDocNote | ReportDocTag | ReportDocKv | ReportDocCode | ReportDocTable | ReportDocLink | ReportDocSection | ReportDocMermaid | ReportDocScreenshot | ReportDocVideo | ReportDocHtml | ReportDocState | ReportDocCustom;
79
79
  interface ReportDocNote {
80
80
  kind: "note";
81
81
  text: string;
@@ -161,6 +161,15 @@ interface ReportDocHtml {
161
161
  phase: DocPhase;
162
162
  children?: ReportDocEntry[];
163
163
  }
164
+ interface ReportDocState {
165
+ kind: "state";
166
+ /** Entity name ("Basket") — diff identity across steps. Unlabeled states share one lane. */
167
+ label?: string;
168
+ /** JSON-serializable snapshot of the state at this step. */
169
+ value: unknown;
170
+ phase: DocPhase;
171
+ children?: ReportDocEntry[];
172
+ }
164
173
  interface ReportDocCustom {
165
174
  kind: "custom";
166
175
  type: string;
@@ -373,16 +382,18 @@ interface ReportStoryboardProps {
373
382
  scenario: ReportScenario$1;
374
383
  }
375
384
  /**
376
- * Storyboard — a horizontal filmstrip of the scenario's step screenshots
385
+ * Storyboard — a horizontal filmstrip of the scenario's step evidence
377
386
  * (Given → When → Then), derived from the same step docs the vertical step
378
- * list renders. Each frame links to its step's anchor, where the full-size
379
- * screenshot and step detail live.
387
+ * list renders. A frame is a container: the step's screenshot (when present)
388
+ * plus its `story.state()` snapshot cards, so data-only scenarios get
389
+ * filmstrips too. Each frame links to its step's anchor.
380
390
  *
381
- * Renders nothing below 2 frames: a single screenshot is evidence, not a
391
+ * Renders nothing below 2 frames: a single capture is evidence, not a
382
392
  * walkthrough, and it already shows under its step.
383
393
  *
384
394
  * Must stay hydration-free: the Astro story pages render this inside a static
385
- * (no client JS) island, so navigation is plain anchors — no lightbox state.
395
+ * (no client JS) island, so navigation is plain anchors and snapshot expansion
396
+ * is a native <details> — no lightbox or toggle state.
386
397
  */
387
398
  declare function ReportStoryboard({ scenario }: ReportStoryboardProps): react.JSX.Element | null;
388
399