acture-walkthru
v0.0.4
Published
Turn a sequence of app commands into an editable, re-renderable demo/tour artifact.
Readme
acture-walkthru
The TypeScript surface of walkthru — a Zod schema (and its inferred type) for the Demo Document, the editable, re-renderable artifact that represents a demo/tour.
The schema is generated from walkthru's Python Pydantic single source of truth, so a Demo Document produced anywhere — Python, a renderer, a capture tool — validates and types identically here.
npm i acture-walkthruValidate a Demo Document
import { demoDocumentSchema, type DemoDocument } from "acture-walkthru";
const doc: DemoDocument = demoDocumentSchema.parse(JSON.parse(jsonString));
// Throws on unknown cue/step kinds or wrong field types — the unions are closed,
// and the wire format is camelCase (durationMs, holdAfterMs, stepId, …).A minimal document:
const doc = {
id: "demo-minimal",
sections: [
{
id: "s1",
steps: [
{ kind: "command", id: "step-1", command: { id: "app.open" },
timing: { durationMs: 500 } },
],
},
],
};
const validated = demoDocumentSchema.parse(doc); // -> typed DemoDocumentWhat's here / what's coming
- Now:
demoDocumentSchema(Zod validator) + theDemoDocumenttype. - Later: the live capture/play engine over
acture.
The Python package walkthru owns the schema
SSOT, the pure play/capture engine, and the render hand-off.
License
MIT
