executable-stories-react 0.1.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.
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/result.ts","../src/schema/story-report.schema.ts","../../executable-stories-formatters/schemas/story-report-v1.json","../src/schema/parse.ts"],"sourcesContent":["/**\n * Result<T> — explicit success/error type matching the cookbook convention.\n *\n * Used at the boundary where a StoryReport is parsed: the consumer hands us\n * an unknown value (file contents, fetch body, prop) and we return a Result.\n */\n\nexport type Result<T, E = ReportParseError> =\n | { ok: true; data: T }\n | { ok: false; error: E };\n\nexport interface ReportParseError {\n message: string;\n code: ReportParseErrorCode;\n issues?: readonly { path: string; message: string }[];\n}\n\nexport type ReportParseErrorCode =\n | \"INVALID_INPUT\"\n | \"SCHEMA_VERSION_MISMATCH\"\n | \"VALIDATION_FAILED\";\n\nexport const ok = <T>(data: T): Result<T> => ({ ok: true, data });\nexport const err = (error: ReportParseError): Result<never> => ({ ok: false, error });\n","/**\n * StoryReport runtime Zod schema, derived from the canonical JSON Schema\n * at executable-stories-formatters/schemas/story-report-v1.json.\n *\n * Uses z.fromJSONSchema (experimental in Zod 4.x). If the API changes upstream,\n * only this file needs updating — the rest of the package consumes\n * `storyReportSchema` and `StoryReportSchemaShape` via parse.ts.\n *\n * The JSON Schema is bundled at build time by tsup (resolveJsonModule).\n */\n\nimport { z } from \"zod\";\nimport schemaJson from \"../../../executable-stories-formatters/schemas/story-report-v1.json\" with { type: \"json\" };\n\nconst compiled = z.fromJSONSchema(schemaJson as Parameters<typeof z.fromJSONSchema>[0]);\n\nexport const storyReportSchema = compiled;\nexport type StoryReportSchemaShape = z.infer<typeof compiled>;\n\nexport const STORY_REPORT_SCHEMA_MAJOR = 1 as const;\n","{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://executable-stories.dev/schemas/story-report-v1.schema.json\",\n \"title\": \"StoryReport\",\n \"description\": \"Pre-grouped, denormalized report shape consumed by UI renderers (React, Svelte, Vue, etc.). Stable public contract — additive-only within a major. Distinct from internal TestRunResult.\",\n \"type\": \"object\",\n \"$ref\": \"#/$defs/StoryReport\",\n \"$defs\": {\n \"StoryReport\": {\n \"type\": \"object\",\n \"description\": \"Top-level report containing all features, runtime metadata, and a pre-computed summary.\",\n \"properties\": {\n \"schemaVersion\": {\n \"type\": \"string\",\n \"pattern\": \"^1\\\\.[0-9]+$\",\n \"description\": \"Schema version as 'major.minor'. Major bumps are breaking; minors are additive-only. UI packages must accept any 1.x.\"\n },\n \"runId\": {\n \"type\": \"string\",\n \"minLength\": 1,\n \"description\": \"Unique deterministic identifier for this run.\"\n },\n \"startedAtMs\": {\n \"type\": \"number\",\n \"minimum\": 0,\n \"description\": \"Run start time as Unix epoch milliseconds.\"\n },\n \"finishedAtMs\": {\n \"type\": \"number\",\n \"minimum\": 0,\n \"description\": \"Run finish time as Unix epoch milliseconds.\"\n },\n \"durationMs\": {\n \"type\": \"number\",\n \"minimum\": 0,\n \"description\": \"Total run duration in milliseconds.\"\n },\n \"projectRoot\": {\n \"type\": \"string\",\n \"minLength\": 1,\n \"description\": \"Absolute path to the project root (for context only; relative paths in features.sourceFile are preferred).\"\n },\n \"packageVersion\": {\n \"type\": \"string\",\n \"description\": \"Version of the package under test, if known.\"\n },\n \"gitSha\": {\n \"type\": \"string\",\n \"description\": \"Git commit SHA at the time of the run.\"\n },\n \"ci\": {\n \"$ref\": \"#/$defs/CIInfo\"\n },\n \"coverage\": {\n \"$ref\": \"#/$defs/CoverageSummary\"\n },\n \"summary\": {\n \"$ref\": \"#/$defs/Summary\",\n \"description\": \"Pre-computed counts across all features and scenarios.\"\n },\n \"features\": {\n \"type\": \"array\",\n \"items\": { \"$ref\": \"#/$defs/Feature\" },\n \"description\": \"Features grouped by sourceFile, sorted by title.\"\n }\n },\n \"required\": [\"schemaVersion\", \"runId\", \"startedAtMs\", \"finishedAtMs\", \"durationMs\", \"projectRoot\", \"summary\", \"features\"],\n \"additionalProperties\": false\n },\n \"Summary\": {\n \"type\": \"object\",\n \"description\": \"Counts by status. Sums equal 'total'.\",\n \"properties\": {\n \"total\": { \"type\": \"integer\", \"minimum\": 0 },\n \"passed\": { \"type\": \"integer\", \"minimum\": 0 },\n \"failed\": { \"type\": \"integer\", \"minimum\": 0 },\n \"skipped\": { \"type\": \"integer\", \"minimum\": 0 },\n \"pending\": { \"type\": \"integer\", \"minimum\": 0 },\n \"durationMs\": { \"type\": \"number\", \"minimum\": 0 }\n },\n \"required\": [\"total\", \"passed\", \"failed\", \"skipped\", \"pending\", \"durationMs\"],\n \"additionalProperties\": false\n },\n \"Feature\": {\n \"type\": \"object\",\n \"description\": \"A group of scenarios from the same source file.\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\",\n \"minLength\": 1,\n \"description\": \"Stable slug derived from the relative source path. Suitable for use as a deep-link anchor.\"\n },\n \"title\": {\n \"type\": \"string\",\n \"minLength\": 1,\n \"description\": \"Display title. Derived from describe block when present, otherwise the file basename.\"\n },\n \"sourceFile\": {\n \"type\": \"string\",\n \"minLength\": 1,\n \"description\": \"Source path, relative to projectRoot when possible.\"\n },\n \"summary\": { \"$ref\": \"#/$defs/Summary\" },\n \"scenarios\": {\n \"type\": \"array\",\n \"items\": { \"$ref\": \"#/$defs/Scenario\" },\n \"description\": \"Scenarios in this feature, in declaration order.\"\n }\n },\n \"required\": [\"id\", \"title\", \"sourceFile\", \"summary\", \"scenarios\"],\n \"additionalProperties\": false\n },\n \"Scenario\": {\n \"type\": \"object\",\n \"description\": \"A single scenario with its steps, story-level doc entries, and attachments.\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\",\n \"minLength\": 1,\n \"description\": \"Stable identifier: '<feature.id>--<slug-of-title>'. Suitable for use as a deep-link anchor.\"\n },\n \"title\": { \"type\": \"string\", \"minLength\": 1 },\n \"status\": { \"$ref\": \"#/$defs/TestStatus\" },\n \"durationMs\": { \"type\": \"number\", \"minimum\": 0 },\n \"tags\": {\n \"type\": \"array\",\n \"items\": { \"type\": \"string\" },\n \"description\": \"Normalized tags, deduplicated, lowercased.\"\n },\n \"tickets\": {\n \"type\": \"array\",\n \"items\": { \"$ref\": \"#/$defs/Ticket\" }\n },\n \"sourceLine\": { \"type\": \"integer\", \"minimum\": 1 },\n \"errorMessage\": { \"type\": \"string\" },\n \"errorStack\": { \"type\": \"string\" },\n \"retry\": { \"type\": \"integer\", \"minimum\": 0 },\n \"retries\": { \"type\": \"integer\", \"minimum\": 0 },\n \"docEntries\": {\n \"type\": \"array\",\n \"items\": { \"$ref\": \"#/$defs/DocEntry\" },\n \"description\": \"Story-level doc entries (rendered before steps).\"\n },\n \"steps\": {\n \"type\": \"array\",\n \"items\": { \"$ref\": \"#/$defs/Step\" }\n },\n \"attachments\": {\n \"type\": \"array\",\n \"items\": { \"$ref\": \"#/$defs/Attachment\" }\n }\n },\n \"required\": [\"id\", \"title\", \"status\", \"durationMs\", \"tags\", \"retry\", \"retries\", \"docEntries\", \"steps\", \"attachments\"],\n \"additionalProperties\": false\n },\n \"Step\": {\n \"type\": \"object\",\n \"description\": \"A single BDD step.\",\n \"properties\": {\n \"id\": { \"type\": \"string\", \"minLength\": 1 },\n \"index\": { \"type\": \"integer\", \"minimum\": 0 },\n \"keyword\": { \"$ref\": \"#/$defs/StepKeyword\" },\n \"text\": { \"type\": \"string\" },\n \"status\": { \"$ref\": \"#/$defs/TestStatus\" },\n \"durationMs\": { \"type\": \"number\", \"minimum\": 0 },\n \"errorMessage\": { \"type\": \"string\" },\n \"mode\": { \"$ref\": \"#/$defs/StepMode\" },\n \"docEntries\": {\n \"type\": \"array\",\n \"items\": { \"$ref\": \"#/$defs/DocEntry\" },\n \"description\": \"Doc entries attached to this step.\"\n }\n },\n \"required\": [\"id\", \"index\", \"keyword\", \"text\", \"status\", \"durationMs\", \"docEntries\"],\n \"additionalProperties\": false\n },\n \"StepKeyword\": {\n \"type\": \"string\",\n \"enum\": [\"Given\", \"When\", \"Then\", \"And\", \"But\"]\n },\n \"StepMode\": {\n \"type\": \"string\",\n \"enum\": [\"normal\", \"skip\", \"only\", \"todo\", \"fails\", \"concurrent\"]\n },\n \"TestStatus\": {\n \"type\": \"string\",\n \"enum\": [\"passed\", \"failed\", \"skipped\", \"pending\"]\n },\n \"Ticket\": {\n \"type\": \"object\",\n \"properties\": {\n \"id\": { \"type\": \"string\", \"minLength\": 1 },\n \"url\": { \"type\": \"string\" }\n },\n \"required\": [\"id\"],\n \"additionalProperties\": false\n },\n \"Attachment\": {\n \"type\": \"object\",\n \"properties\": {\n \"name\": { \"type\": \"string\" },\n \"mediaType\": { \"type\": \"string\", \"minLength\": 1 },\n \"body\": { \"type\": \"string\" },\n \"contentEncoding\": {\n \"type\": \"string\",\n \"enum\": [\"BASE64\", \"IDENTITY\"]\n }\n },\n \"required\": [\"name\", \"mediaType\", \"body\", \"contentEncoding\"],\n \"additionalProperties\": false\n },\n \"CIInfo\": {\n \"type\": \"object\",\n \"properties\": {\n \"name\": { \"type\": \"string\" },\n \"url\": { \"type\": \"string\" },\n \"buildNumber\": { \"type\": \"string\" },\n \"branch\": { \"type\": \"string\" },\n \"commitSha\": { \"type\": \"string\" },\n \"prNumber\": { \"type\": \"string\" }\n },\n \"required\": [\"name\"],\n \"additionalProperties\": false\n },\n \"CoverageSummary\": {\n \"type\": \"object\",\n \"properties\": {\n \"linesPct\": { \"type\": \"number\", \"minimum\": 0, \"maximum\": 100 },\n \"branchesPct\": { \"type\": \"number\", \"minimum\": 0, \"maximum\": 100 },\n \"functionsPct\": { \"type\": \"number\", \"minimum\": 0, \"maximum\": 100 },\n \"statementsPct\": { \"type\": \"number\", \"minimum\": 0, \"maximum\": 100 }\n },\n \"additionalProperties\": false\n },\n \"DocPhase\": {\n \"type\": \"string\",\n \"enum\": [\"static\", \"runtime\"]\n },\n \"DocEntry\": {\n \"oneOf\": [\n { \"$ref\": \"#/$defs/DocNote\" },\n { \"$ref\": \"#/$defs/DocTag\" },\n { \"$ref\": \"#/$defs/DocKv\" },\n { \"$ref\": \"#/$defs/DocCode\" },\n { \"$ref\": \"#/$defs/DocTable\" },\n { \"$ref\": \"#/$defs/DocLink\" },\n { \"$ref\": \"#/$defs/DocSection\" },\n { \"$ref\": \"#/$defs/DocMermaid\" },\n { \"$ref\": \"#/$defs/DocScreenshot\" },\n { \"$ref\": \"#/$defs/DocCustom\" }\n ]\n },\n \"DocNote\": {\n \"type\": \"object\",\n \"properties\": {\n \"kind\": { \"const\": \"note\" },\n \"text\": { \"type\": \"string\" },\n \"phase\": { \"$ref\": \"#/$defs/DocPhase\" },\n \"children\": {\n \"type\": \"array\",\n \"items\": { \"$ref\": \"#/$defs/DocEntry\" }\n }\n },\n \"required\": [\"kind\", \"text\", \"phase\"],\n \"additionalProperties\": false\n },\n \"DocTag\": {\n \"type\": \"object\",\n \"properties\": {\n \"kind\": { \"const\": \"tag\" },\n \"names\": { \"type\": \"array\", \"items\": { \"type\": \"string\" } },\n \"phase\": { \"$ref\": \"#/$defs/DocPhase\" },\n \"children\": {\n \"type\": \"array\",\n \"items\": { \"$ref\": \"#/$defs/DocEntry\" }\n }\n },\n \"required\": [\"kind\", \"names\", \"phase\"],\n \"additionalProperties\": false\n },\n \"DocKv\": {\n \"type\": \"object\",\n \"properties\": {\n \"kind\": { \"const\": \"kv\" },\n \"label\": { \"type\": \"string\" },\n \"value\": {},\n \"phase\": { \"$ref\": \"#/$defs/DocPhase\" },\n \"children\": {\n \"type\": \"array\",\n \"items\": { \"$ref\": \"#/$defs/DocEntry\" }\n }\n },\n \"required\": [\"kind\", \"label\", \"value\", \"phase\"],\n \"additionalProperties\": false\n },\n \"DocCode\": {\n \"type\": \"object\",\n \"properties\": {\n \"kind\": { \"const\": \"code\" },\n \"label\": { \"type\": \"string\" },\n \"content\": { \"type\": \"string\" },\n \"lang\": { \"type\": \"string\" },\n \"phase\": { \"$ref\": \"#/$defs/DocPhase\" },\n \"children\": {\n \"type\": \"array\",\n \"items\": { \"$ref\": \"#/$defs/DocEntry\" }\n }\n },\n \"required\": [\"kind\", \"label\", \"content\", \"phase\"],\n \"additionalProperties\": false\n },\n \"DocTable\": {\n \"type\": \"object\",\n \"properties\": {\n \"kind\": { \"const\": \"table\" },\n \"label\": { \"type\": \"string\" },\n \"columns\": { \"type\": \"array\", \"items\": { \"type\": \"string\" } },\n \"rows\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"array\",\n \"items\": { \"type\": \"string\" }\n }\n },\n \"phase\": { \"$ref\": \"#/$defs/DocPhase\" },\n \"children\": {\n \"type\": \"array\",\n \"items\": { \"$ref\": \"#/$defs/DocEntry\" }\n }\n },\n \"required\": [\"kind\", \"label\", \"columns\", \"rows\", \"phase\"],\n \"additionalProperties\": false\n },\n \"DocLink\": {\n \"type\": \"object\",\n \"properties\": {\n \"kind\": { \"const\": \"link\" },\n \"label\": { \"type\": \"string\" },\n \"url\": { \"type\": \"string\" },\n \"phase\": { \"$ref\": \"#/$defs/DocPhase\" },\n \"children\": {\n \"type\": \"array\",\n \"items\": { \"$ref\": \"#/$defs/DocEntry\" }\n }\n },\n \"required\": [\"kind\", \"label\", \"url\", \"phase\"],\n \"additionalProperties\": false\n },\n \"DocSection\": {\n \"type\": \"object\",\n \"properties\": {\n \"kind\": { \"const\": \"section\" },\n \"title\": { \"type\": \"string\" },\n \"markdown\": { \"type\": \"string\" },\n \"phase\": { \"$ref\": \"#/$defs/DocPhase\" },\n \"children\": {\n \"type\": \"array\",\n \"items\": { \"$ref\": \"#/$defs/DocEntry\" }\n }\n },\n \"required\": [\"kind\", \"title\", \"markdown\", \"phase\"],\n \"additionalProperties\": false\n },\n \"DocMermaid\": {\n \"type\": \"object\",\n \"properties\": {\n \"kind\": { \"const\": \"mermaid\" },\n \"code\": { \"type\": \"string\" },\n \"title\": { \"type\": \"string\" },\n \"phase\": { \"$ref\": \"#/$defs/DocPhase\" },\n \"children\": {\n \"type\": \"array\",\n \"items\": { \"$ref\": \"#/$defs/DocEntry\" }\n }\n },\n \"required\": [\"kind\", \"code\", \"phase\"],\n \"additionalProperties\": false\n },\n \"DocScreenshot\": {\n \"type\": \"object\",\n \"properties\": {\n \"kind\": { \"const\": \"screenshot\" },\n \"path\": { \"type\": \"string\" },\n \"alt\": { \"type\": \"string\" },\n \"phase\": { \"$ref\": \"#/$defs/DocPhase\" },\n \"children\": {\n \"type\": \"array\",\n \"items\": { \"$ref\": \"#/$defs/DocEntry\" }\n }\n },\n \"required\": [\"kind\", \"path\", \"phase\"],\n \"additionalProperties\": false\n },\n \"DocCustom\": {\n \"type\": \"object\",\n \"properties\": {\n \"kind\": { \"const\": \"custom\" },\n \"type\": { \"type\": \"string\", \"minLength\": 1 },\n \"data\": {},\n \"phase\": { \"$ref\": \"#/$defs/DocPhase\" },\n \"children\": {\n \"type\": \"array\",\n \"items\": { \"$ref\": \"#/$defs/DocEntry\" }\n }\n },\n \"required\": [\"kind\", \"type\", \"data\", \"phase\"],\n \"additionalProperties\": false\n }\n }\n}\n","/**\n * parseStoryReport — boundary validator. Accepts unknown input (file contents,\n * fetch body, prop) and returns a Result-typed StoryReport.\n */\n\nimport type { StoryReport } from \"executable-stories-formatters\";\nimport type { Result } from \"../result\";\nimport { ok, err } from \"../result\";\nimport { storyReportSchema, STORY_REPORT_SCHEMA_MAJOR } from \"./story-report.schema\";\n\nexport function parseStoryReport(input: unknown): Result<StoryReport> {\n if (input === null || typeof input !== \"object\") {\n return err({\n message: \"Expected a StoryReport object.\",\n code: \"INVALID_INPUT\",\n });\n }\n\n const versionRaw = (input as { schemaVersion?: unknown }).schemaVersion;\n if (typeof versionRaw === \"string\") {\n const major = versionRaw.split(\".\")[0];\n if (major !== String(STORY_REPORT_SCHEMA_MAJOR)) {\n return err({\n message: `Schema major ${major} is not supported by this version of executable-stories-react (expected ${STORY_REPORT_SCHEMA_MAJOR}.x). Upgrade the package.`,\n code: \"SCHEMA_VERSION_MISMATCH\",\n });\n }\n }\n\n const parsed = storyReportSchema.safeParse(input);\n if (parsed.success) {\n return ok(parsed.data as StoryReport);\n }\n\n const issues = parsed.error.issues.map((i) => ({\n path: i.path.join(\".\") || \"/\",\n message: i.message,\n }));\n\n return err({\n message: `StoryReport failed validation (${issues.length} issue${issues.length === 1 ? \"\" : \"s\"}).`,\n code: \"VALIDATION_FAILED\",\n issues,\n });\n}\n"],"mappings":";AAsBO,IAAM,KAAK,CAAI,UAAwB,EAAE,IAAI,MAAM,KAAK;AACxD,IAAM,MAAM,CAAC,WAA4C,EAAE,IAAI,OAAO,MAAM;;;ACZnF,SAAS,SAAS;;;ACXlB;AAAA,EACE,SAAW;AAAA,EACX,KAAO;AAAA,EACP,OAAS;AAAA,EACT,aAAe;AAAA,EACf,MAAQ;AAAA,EACR,MAAQ;AAAA,EACR,OAAS;AAAA,IACP,aAAe;AAAA,MACb,MAAQ;AAAA,MACR,aAAe;AAAA,MACf,YAAc;AAAA,QACZ,eAAiB;AAAA,UACf,MAAQ;AAAA,UACR,SAAW;AAAA,UACX,aAAe;AAAA,QACjB;AAAA,QACA,OAAS;AAAA,UACP,MAAQ;AAAA,UACR,WAAa;AAAA,UACb,aAAe;AAAA,QACjB;AAAA,QACA,aAAe;AAAA,UACb,MAAQ;AAAA,UACR,SAAW;AAAA,UACX,aAAe;AAAA,QACjB;AAAA,QACA,cAAgB;AAAA,UACd,MAAQ;AAAA,UACR,SAAW;AAAA,UACX,aAAe;AAAA,QACjB;AAAA,QACA,YAAc;AAAA,UACZ,MAAQ;AAAA,UACR,SAAW;AAAA,UACX,aAAe;AAAA,QACjB;AAAA,QACA,aAAe;AAAA,UACb,MAAQ;AAAA,UACR,WAAa;AAAA,UACb,aAAe;AAAA,QACjB;AAAA,QACA,gBAAkB;AAAA,UAChB,MAAQ;AAAA,UACR,aAAe;AAAA,QACjB;AAAA,QACA,QAAU;AAAA,UACR,MAAQ;AAAA,UACR,aAAe;AAAA,QACjB;AAAA,QACA,IAAM;AAAA,UACJ,MAAQ;AAAA,QACV;AAAA,QACA,UAAY;AAAA,UACV,MAAQ;AAA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,EAAE,KAAK,KAAK,GAAG,KAAK;AAAA,IAC1B,SAAS,EAAE;AAAA,EACb,EAAE;AAEF,SAAO,IAAI;AAAA,IACT,SAAS,kCAAkC,OAAO,MAAM,SAAS,OAAO,WAAW,IAAI,KAAK,GAAG;AAAA,IAC/F,MAAM;AAAA,IACN;AAAA,EACF,CAAC;AACH;","names":[]}
@@ -0,0 +1,244 @@
1
+ /* executable-stories-react: base stylesheet.
2
+ *
3
+ * Theme via CSS variables (--es-*). Override on any ancestor or :root.
4
+ * Light/dark adapts to prefers-color-scheme; force a theme with
5
+ * data-theme="dark" / data-theme="light" on a parent element.
6
+ *
7
+ * No global resets, no Tailwind dependency, no CSS-in-JS runtime.
8
+ * Class names are scoped via .es- prefix.
9
+ *
10
+ * ===
11
+ * The --es-* token block below mirrors ES_THEME_TOKENS_CSS exported from
12
+ * executable-stories-formatters/src/theme/tokens.ts. A test in
13
+ * test/theme-tokens-sync.test.ts asserts these stay in lockstep — if you
14
+ * change one, change both.
15
+ * ===
16
+ */
17
+
18
+ :root,
19
+ [data-theme="light"] {
20
+ --es-color-bg: #ffffff;
21
+ --es-color-fg: #111827;
22
+ --es-color-muted: #6b7280;
23
+ --es-color-border: #e5e7eb;
24
+ --es-color-surface: #f9fafb;
25
+ --es-color-link: #2563eb;
26
+ --es-color-passed: #16a34a;
27
+ --es-color-failed: #dc2626;
28
+ --es-color-skipped: #9ca3af;
29
+ --es-color-pending: #d97706;
30
+ --es-color-passed-bg: #f0fdf4;
31
+ --es-color-failed-bg: #fef2f2;
32
+ --es-color-skipped-bg: #f3f4f6;
33
+ --es-color-pending-bg: #fffbeb;
34
+
35
+ --es-font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
36
+ --es-font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;
37
+
38
+ --es-size-base: 1rem;
39
+ --es-size-sm: 0.875rem;
40
+ --es-size-xs: 0.75rem;
41
+ --es-size-h1: 1.875rem;
42
+ --es-size-h2: 1.5rem;
43
+ --es-size-h3: 1.25rem;
44
+
45
+ --es-space-1: 0.25rem;
46
+ --es-space-2: 0.5rem;
47
+ --es-space-3: 0.75rem;
48
+ --es-space-4: 1rem;
49
+ --es-space-6: 1.5rem;
50
+ --es-space-8: 2rem;
51
+
52
+ --es-radius: 0.5rem;
53
+ --es-line: 1.6;
54
+ --es-measure: 72ch;
55
+ }
56
+
57
+ @media (prefers-color-scheme: dark) {
58
+ :root {
59
+ --es-color-bg: #0b0f17;
60
+ --es-color-fg: #e5e7eb;
61
+ --es-color-muted: #9ca3af;
62
+ --es-color-border: #1f2937;
63
+ --es-color-surface: #111827;
64
+ --es-color-link: #60a5fa;
65
+ --es-color-passed: #4ade80;
66
+ --es-color-failed: #f87171;
67
+ --es-color-skipped: #6b7280;
68
+ --es-color-pending: #fbbf24;
69
+ --es-color-passed-bg: rgba(74, 222, 128, 0.08);
70
+ --es-color-failed-bg: rgba(248, 113, 113, 0.08);
71
+ --es-color-skipped-bg: rgba(107, 114, 128, 0.08);
72
+ --es-color-pending-bg: rgba(251, 191, 36, 0.08);
73
+ }
74
+ }
75
+
76
+ [data-theme="dark"] {
77
+ --es-color-bg: #0b0f17;
78
+ --es-color-fg: #e5e7eb;
79
+ --es-color-muted: #9ca3af;
80
+ --es-color-border: #1f2937;
81
+ --es-color-surface: #111827;
82
+ --es-color-link: #60a5fa;
83
+ --es-color-passed: #4ade80;
84
+ --es-color-failed: #f87171;
85
+ --es-color-skipped: #6b7280;
86
+ --es-color-pending: #fbbf24;
87
+ --es-color-passed-bg: rgba(74, 222, 128, 0.08);
88
+ --es-color-failed-bg: rgba(248, 113, 113, 0.08);
89
+ --es-color-skipped-bg: rgba(107, 114, 128, 0.08);
90
+ --es-color-pending-bg: rgba(251, 191, 36, 0.08);
91
+ }
92
+
93
+ .es-report {
94
+ background: var(--es-color-bg);
95
+ color: var(--es-color-fg);
96
+ font-family: var(--es-font-body);
97
+ font-size: var(--es-size-base);
98
+ line-height: var(--es-line);
99
+ padding: var(--es-space-6);
100
+ max-width: 1100px;
101
+ margin-inline: auto;
102
+ }
103
+ .es-report-header h1 {
104
+ font-size: var(--es-size-h1);
105
+ margin: 0 0 var(--es-space-2);
106
+ }
107
+ .es-report-summary {
108
+ color: var(--es-color-muted);
109
+ font-size: var(--es-size-sm);
110
+ margin: 0 0 var(--es-space-6);
111
+ }
112
+ .es-report-summary [data-status] { margin-inline-end: var(--es-space-3); }
113
+ .es-report-summary [data-status="passed"] { color: var(--es-color-passed); }
114
+ .es-report-summary [data-status="failed"] { color: var(--es-color-failed); }
115
+ .es-report-summary [data-status="skipped"] { color: var(--es-color-skipped); }
116
+ .es-report-summary [data-status="pending"] { color: var(--es-color-pending); }
117
+
118
+ .es-feature {
119
+ border: 1px solid var(--es-color-border);
120
+ border-radius: var(--es-radius);
121
+ padding: var(--es-space-6);
122
+ margin-block-end: var(--es-space-6);
123
+ }
124
+ .es-feature-title { font-size: var(--es-size-h2); margin: 0 0 var(--es-space-2); }
125
+ .es-feature-source { color: var(--es-color-muted); font-family: var(--es-font-mono); font-size: var(--es-size-xs); margin: 0 0 var(--es-space-4); }
126
+ .es-feature-summary { color: var(--es-color-muted); font-size: var(--es-size-sm); margin-block-end: var(--es-space-4); }
127
+
128
+ .es-scenario { padding: var(--es-space-4) 0; border-block-start: 1px solid var(--es-color-border); }
129
+ .es-scenario:first-of-type { border-block-start: 0; }
130
+ .es-scenario-title { font-size: var(--es-size-h3); margin: 0 0 var(--es-space-2); display: flex; align-items: baseline; gap: var(--es-space-2); }
131
+ .es-scenario-status { font-size: var(--es-size-xs); text-transform: uppercase; letter-spacing: 0.04em; padding: 2px 6px; border-radius: 4px; }
132
+ .es-status-passed .es-scenario-status { color: var(--es-color-passed); background: var(--es-color-passed-bg); }
133
+ .es-status-failed .es-scenario-status { color: var(--es-color-failed); background: var(--es-color-failed-bg); }
134
+ .es-status-skipped .es-scenario-status { color: var(--es-color-skipped); background: var(--es-color-skipped-bg); }
135
+ .es-status-pending .es-scenario-status { color: var(--es-color-pending); background: var(--es-color-pending-bg); }
136
+
137
+ .es-scenario-error {
138
+ background: var(--es-color-failed-bg);
139
+ color: var(--es-color-failed);
140
+ padding: var(--es-space-3) var(--es-space-4);
141
+ border-radius: var(--es-radius);
142
+ font-family: var(--es-font-mono);
143
+ font-size: var(--es-size-sm);
144
+ white-space: pre-wrap;
145
+ }
146
+
147
+ .es-steps { list-style: none; padding: 0; margin: var(--es-space-4) 0 0; }
148
+ .es-step { padding: var(--es-space-2) 0; }
149
+ .es-step-keyword { font-weight: 600; color: var(--es-color-muted); margin-inline-end: var(--es-space-2); }
150
+ .es-step-failed { color: var(--es-color-failed); }
151
+ .es-step-skipped { color: var(--es-color-skipped); }
152
+
153
+ .es-tags { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: var(--es-space-2); margin: var(--es-space-2) 0; }
154
+ .es-tags li { font-size: var(--es-size-xs); padding: 2px 8px; border-radius: 999px; background: var(--es-color-surface); color: var(--es-color-muted); }
155
+
156
+ .es-doc { margin-block: var(--es-space-3); max-width: var(--es-measure); }
157
+ .es-doc-kv dt { font-weight: 600; color: var(--es-color-muted); font-size: var(--es-size-sm); }
158
+ .es-doc-kv dd { margin-inline-start: 0; }
159
+ .es-doc-code { background: var(--es-color-surface); border-radius: var(--es-radius); padding: var(--es-space-3); overflow-x: auto; }
160
+ .es-doc-code pre { margin: 0; font-family: var(--es-font-mono); font-size: var(--es-size-sm); }
161
+ .es-doc-code figcaption { color: var(--es-color-muted); font-size: var(--es-size-xs); margin-block-end: var(--es-space-2); }
162
+ .es-doc-table table { width: 100%; border-collapse: collapse; }
163
+ .es-doc-table th, .es-doc-table td { text-align: start; padding: var(--es-space-2); border-block-end: 1px solid var(--es-color-border); }
164
+ .es-doc-link { color: var(--es-color-link); }
165
+ .es-doc-section { background: var(--es-color-surface); padding: var(--es-space-4); border-radius: var(--es-radius); }
166
+ .es-doc-mermaid pre { font-family: var(--es-font-mono); font-size: var(--es-size-sm); background: var(--es-color-surface); padding: var(--es-space-3); border-radius: var(--es-radius); overflow-x: auto; }
167
+ .es-doc-screenshot img { max-width: 100%; height: auto; border-radius: var(--es-radius); }
168
+ .es-doc-custom { background: var(--es-color-surface); padding: var(--es-space-3); border-radius: var(--es-radius); font-family: var(--es-font-mono); font-size: var(--es-size-sm); }
169
+
170
+ .es-empty, .es-schema-error {
171
+ text-align: center;
172
+ padding: var(--es-space-8);
173
+ color: var(--es-color-muted);
174
+ }
175
+ .es-schema-error { background: var(--es-color-failed-bg); color: var(--es-color-failed); border-radius: var(--es-radius); }
176
+ .es-schema-error pre { font-family: var(--es-font-mono); font-size: var(--es-size-sm); text-align: start; margin-block-start: var(--es-space-3); }
177
+
178
+ .es-search { display: flex; align-items: center; gap: var(--es-space-2); margin-block: var(--es-space-3) 0; }
179
+ .es-search-label { position: absolute; left: -9999px; }
180
+ .es-search input { flex: 1 1 auto; padding: var(--es-space-2) var(--es-space-3); border: 1px solid var(--es-color-border); border-radius: var(--es-radius); background: var(--es-color-bg); color: var(--es-color-fg); font: inherit; }
181
+ .es-search input:focus-visible { outline: 2px solid var(--es-color-link); outline-offset: 2px; }
182
+ .es-search-counts { color: var(--es-color-muted); font-size: var(--es-size-sm); white-space: nowrap; }
183
+
184
+ .es-failure-banner {
185
+ position: sticky;
186
+ top: 0;
187
+ z-index: 10;
188
+ display: flex;
189
+ align-items: center;
190
+ gap: var(--es-space-3);
191
+ padding: var(--es-space-3) var(--es-space-4);
192
+ margin-block-end: var(--es-space-4);
193
+ background: var(--es-color-failed-bg);
194
+ color: var(--es-color-failed);
195
+ border: 1px solid var(--es-color-failed);
196
+ border-radius: var(--es-radius);
197
+ }
198
+ .es-failure-banner-jump {
199
+ background: transparent;
200
+ border: 1px solid currentColor;
201
+ color: inherit;
202
+ border-radius: var(--es-radius);
203
+ padding: var(--es-space-1) var(--es-space-3);
204
+ cursor: pointer;
205
+ font: inherit;
206
+ }
207
+ .es-failure-banner-jump:focus-visible {
208
+ outline: 2px solid var(--es-color-failed);
209
+ outline-offset: 2px;
210
+ }
211
+
212
+ .es-shortcuts-trigger {
213
+ position: fixed;
214
+ inset-block-end: var(--es-space-4);
215
+ inset-inline-end: var(--es-space-4);
216
+ width: 2.5rem;
217
+ height: 2.5rem;
218
+ border-radius: 999px;
219
+ border: 1px solid var(--es-color-border);
220
+ background: var(--es-color-surface);
221
+ color: var(--es-color-fg);
222
+ font: inherit;
223
+ cursor: pointer;
224
+ box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
225
+ }
226
+ .es-shortcuts-help {
227
+ border: 1px solid var(--es-color-border);
228
+ border-radius: var(--es-radius);
229
+ padding: var(--es-space-6);
230
+ background: var(--es-color-bg);
231
+ color: var(--es-color-fg);
232
+ max-width: 32rem;
233
+ }
234
+ .es-shortcuts-help::backdrop { background: rgba(0, 0, 0, 0.4); }
235
+ .es-shortcuts-help dl { display: grid; grid-template-columns: max-content 1fr; gap: var(--es-space-2) var(--es-space-4); }
236
+ .es-shortcuts-help kbd { font-family: var(--es-font-mono); background: var(--es-color-surface); padding: 2px 6px; border-radius: 4px; border: 1px solid var(--es-color-border); }
237
+ .es-shortcuts-close { margin-block-start: var(--es-space-4); padding: var(--es-space-2) var(--es-space-4); border: 1px solid var(--es-color-border); background: var(--es-color-surface); color: var(--es-color-fg); border-radius: var(--es-radius); cursor: pointer; font: inherit; }
238
+
239
+ @media print {
240
+ .es-report { max-width: 100%; padding: 0; }
241
+ .es-feature { break-inside: avoid; }
242
+ .es-scenario { break-inside: avoid; }
243
+ .es-failure-banner, .es-shortcuts-trigger, .es-search { display: none; }
244
+ }
package/package.json ADDED
@@ -0,0 +1,84 @@
1
+ {
2
+ "name": "executable-stories-react",
3
+ "version": "0.1.0",
4
+ "description": "React components for rendering executable-stories StoryReport JSON. Semantic, SSR-safe, themeable via CSS variables.",
5
+ "author": "Jag Reehal <jag@jagreehal.com>",
6
+ "homepage": "https://github.com/jagreehal/executable-stories#readme",
7
+ "bugs": {
8
+ "url": "https://github.com/jagreehal/executable-stories/issues"
9
+ },
10
+ "repository": {
11
+ "type": "git",
12
+ "url": "git+https://github.com/jagreehal/executable-stories.git",
13
+ "directory": "packages/executable-stories-react"
14
+ },
15
+ "license": "MIT",
16
+ "type": "module",
17
+ "main": "./dist/index.cjs",
18
+ "module": "./dist/index.js",
19
+ "types": "./dist/index.d.ts",
20
+ "sideEffects": ["./dist/styles.css", "*.css"],
21
+ "exports": {
22
+ ".": {
23
+ "types": "./dist/index.d.ts",
24
+ "import": "./dist/index.js",
25
+ "require": "./dist/index.cjs"
26
+ },
27
+ "./parse": {
28
+ "types": "./dist/parse.d.ts",
29
+ "import": "./dist/parse.js",
30
+ "require": "./dist/parse.cjs"
31
+ },
32
+ "./interactive": {
33
+ "types": "./dist/interactive.d.ts",
34
+ "import": "./dist/interactive.js",
35
+ "require": "./dist/interactive.cjs"
36
+ },
37
+ "./styles.css": "./dist/styles.css"
38
+ },
39
+ "files": [
40
+ "dist",
41
+ "README.md"
42
+ ],
43
+ "peerDependencies": {
44
+ "react": ">=18.0.0",
45
+ "react-dom": ">=18.0.0"
46
+ },
47
+ "dependencies": {
48
+ "executable-stories-formatters": "workspace:*",
49
+ "marked": "^15.0.7",
50
+ "zod": "^4.0.0"
51
+ },
52
+ "devDependencies": {
53
+ "@testing-library/jest-dom": "^6.4.0",
54
+ "@testing-library/react": "^16.0.0",
55
+ "@types/node": "^25.6.0",
56
+ "@types/react": "^19.0.0",
57
+ "@types/react-dom": "^19.0.0",
58
+ "@vitejs/plugin-react": "^4.3.4",
59
+ "eslint-config-executable-stories": "workspace:*",
60
+ "eslint-plugin-react-hooks": "^7.1.0",
61
+ "jsdom": "^25.0.0",
62
+ "react": "^19.0.0",
63
+ "react-dom": "^19.0.0",
64
+ "tsup": "^8.5.1",
65
+ "typescript": "^6.0.3",
66
+ "vitest": "^4.1.4"
67
+ },
68
+ "keywords": [
69
+ "executable-stories",
70
+ "react",
71
+ "report",
72
+ "living-documentation",
73
+ "bdd",
74
+ "testing"
75
+ ],
76
+ "scripts": {
77
+ "build": "tsup",
78
+ "type-check": "tsc --noEmit",
79
+ "lint": "eslint .",
80
+ "clean": "rm -rf dist",
81
+ "test": "vitest run",
82
+ "quality": "pnpm type-check && pnpm test && pnpm lint"
83
+ }
84
+ }