From a1d0ece6080195729e5934bec7c7b3723cf1e45d Mon Sep 17 00:00:00 2001 From: "Christopher S. Aondona" Date: Wed, 25 Nov 2026 11:06:15 +0100 Subject: [PATCH 1/2] docs: explicitly label historical Throughline schema-1 guides --- content/docs/throughline/accessibility.mdx | 2 ++ content/docs/throughline/architecture.mdx | 2 ++ content/docs/throughline/binary.mdx | 2 ++ content/docs/throughline/bindings.mdx | 2 ++ content/docs/throughline/callstack.mdx | 2 ++ content/docs/throughline/compatibility.mdx | 2 ++ content/docs/throughline/concepts.mdx | 2 ++ content/docs/throughline/custom-traces.mdx | 2 ++ content/docs/throughline/errors-and-limits.mdx | 2 ++ content/docs/throughline/getting-started.mdx | 6 ++++-- content/docs/throughline/index.mdx | 4 +++- 11 files changed, 25 insertions(+), 3 deletions(-) diff --git a/content/docs/throughline/accessibility.mdx b/content/docs/throughline/accessibility.mdx index 13bfc39..d3bbb7d 100644 --- a/content/docs/throughline/accessibility.mdx +++ b/content/docs/throughline/accessibility.mdx @@ -3,6 +3,8 @@ title: Accessibility and interaction description: Player keyboard support, screen-reader descriptions, captions, inspector, reduced motion, and sound. --- +**Version scope — v0.0.2 (historical schema 1).** This page and its examples use `@0xbuff/throughline@0.0.2`, the version pinned by this documentation app. They do not describe the unreleased schema-2 API intended for v0.2.0. See [compatibility and upgrading](/docs/throughline/compatibility). + Throughline does not rely on the visualization alone to communicate a trace. Its React player supplies semantic controls and textual summaries of each frame. ## Screen-reader experience diff --git a/content/docs/throughline/architecture.mdx b/content/docs/throughline/architecture.mdx index 9ddc8ad..8db186b 100644 --- a/content/docs/throughline/architecture.mdx +++ b/content/docs/throughline/architecture.mdx @@ -3,6 +3,8 @@ title: How Throughline works description: Learn how Throughline validates, compiles, and renders traces. --- +**Version scope — v0.0.2 (historical schema 1).** This page and its examples use `@0xbuff/throughline@0.0.2`, the version pinned by this documentation app. They do not describe the unreleased schema-2 API intended for v0.2.0. See [compatibility and upgrading](/docs/throughline/compatibility). + Throughline has two independent layers: a **React-free compiler** and an optional **React 19 player**. The root package can compile traces without a browser, account, backend, or network connection. ## Compilation diff --git a/content/docs/throughline/binary.mdx b/content/docs/throughline/binary.mdx index 1206b56..b94dcd4 100644 --- a/content/docs/throughline/binary.mdx +++ b/content/docs/throughline/binary.mdx @@ -3,6 +3,8 @@ title: Binary addition description: Visualize unsigned ripple-carry addition one bit at a time. --- +**Version scope — v0.0.2 (historical schema 1).** This page and its examples use `@0xbuff/throughline@0.0.2`, the version pinned by this documentation app. They do not describe the unreleased schema-2 API intended for v0.2.0. See [compatibility and upgrading](/docs/throughline/compatibility). + The `binary` domain generates a trace for **unsigned binary addition**. Each step handles one column, starting at the least significant bit (rightmost position), and exposes the outgoing carry. ## Input diff --git a/content/docs/throughline/bindings.mdx b/content/docs/throughline/bindings.mdx index a3e7607..7f11a7e 100644 --- a/content/docs/throughline/bindings.mdx +++ b/content/docs/throughline/bindings.mdx @@ -3,6 +3,8 @@ title: Bindings and references description: Explain primitive assignments, heap references, shared mutations, and rebinding with the bindings domain. --- +**Version scope — v0.0.2 (historical schema 1).** This page and its examples use `@0xbuff/throughline@0.0.2`, the version pinned by this documentation app. They do not describe the unreleased schema-2 API intended for v0.2.0. See [compatibility and upgrading](/docs/throughline/compatibility). + The `bindings` domain visualizes a **small, intentionally restricted assignment language**. It shows variable slots in a **Stack** lane and arrays/objects in a **Heap** lane. Use it to explain the difference between copying a primitive and copying a reference. It is not a JavaScript interpreter: it supports only declarations, assignments, and array `push`. Expressions, property access, branching, and arbitrary method calls are not supported. diff --git a/content/docs/throughline/callstack.mdx b/content/docs/throughline/callstack.mdx index e2dd129..516cf59 100644 --- a/content/docs/throughline/callstack.mdx +++ b/content/docs/throughline/callstack.mdx @@ -3,6 +3,8 @@ title: Call stack and recursion description: Understand factorial recursion through explicit call, return, and completion steps. --- +**Version scope — v0.0.2 (historical schema 1).** This page and its examples use `@0xbuff/throughline@0.0.2`, the version pinned by this documentation app. They do not describe the unreleased schema-2 API intended for v0.2.0. See [compatibility and upgrading](/docs/throughline/compatibility). + The `callstack` domain models a **single factorial recursion**. It shows how frames are pushed while calls descend, and how return values accumulate as the stack unwinds. ## Input diff --git a/content/docs/throughline/compatibility.mdx b/content/docs/throughline/compatibility.mdx index 4e0643d..704c012 100644 --- a/content/docs/throughline/compatibility.mdx +++ b/content/docs/throughline/compatibility.mdx @@ -3,6 +3,8 @@ title: Compatibility and upgrading description: Use the right runtime versions, interpret trace schema versions, upgrade safely, and troubleshoot compatibility. --- +**Version scope — v0.0.2 (historical schema 1).** This page and its examples use `@0xbuff/throughline@0.0.2`, the version pinned by this documentation app. They do not describe the unreleased schema-2 API intended for v0.2.0. See [compatibility and upgrading](/docs/throughline/compatibility). + These guides describe **`@0xbuff/throughline@0.0.2`**, published November 8, 2026. This page helps applications choose a compatible environment and upgrade without changing trace behavior unexpectedly. ## Installation and requirements diff --git a/content/docs/throughline/concepts.mdx b/content/docs/throughline/concepts.mdx index 0fe4050..65941f9 100644 --- a/content/docs/throughline/concepts.mdx +++ b/content/docs/throughline/concepts.mdx @@ -3,6 +3,8 @@ title: Core concepts description: Learn how Throughline turns source text into steps and complete state snapshots. --- +**Version scope — v0.0.2 (historical schema 1).** This page and its examples use `@0xbuff/throughline@0.0.2`, the version pinned by this documentation app. They do not describe the unreleased schema-2 API intended for v0.2.0. See [compatibility and upgrading](/docs/throughline/compatibility). + Throughline separates the trace you write from the frames it produces. This makes the result predictable and lets a player move directly to any step. ## From source to frames diff --git a/content/docs/throughline/custom-traces.mdx b/content/docs/throughline/custom-traces.mdx index 520c63e..29e4c28 100644 --- a/content/docs/throughline/custom-traces.mdx +++ b/content/docs/throughline/custom-traces.mdx @@ -3,6 +3,8 @@ title: Create visualizations with TypeScript description: Use the public TypeScript API to show how your own algorithms and systems change. --- +**Version scope — v0.0.2 (historical schema 1).** This page and its examples use `@0xbuff/throughline@0.0.2`, the version pinned by this documentation app. They do not describe the unreleased schema-2 API intended for v0.2.0. See [compatibility and upgrading](/docs/throughline/compatibility). + The five built-in `thl` domains cover common teaching scenarios. For any other algorithm or workflow, use **`tracer()`** to construct a Program from ordinary TypeScript, then compile it into a Trace. This is a **public consumer API**: you do not need to modify Throughline, add package source files, or register anything. Choose this approach when your product already knows the values and you want to decide which intermediate steps learners should see. Throughline does **not** instrument or execute arbitrary JavaScript statements from a `thl` fence. diff --git a/content/docs/throughline/errors-and-limits.mdx b/content/docs/throughline/errors-and-limits.mdx index 3e94757..aa9f6ea 100644 --- a/content/docs/throughline/errors-and-limits.mdx +++ b/content/docs/throughline/errors-and-limits.mdx @@ -3,6 +3,8 @@ title: Troubleshooting and limits description: Understand input errors, validation failures, and compilation limits. --- +**Version scope — v0.0.2 (historical schema 1).** This page and its examples use `@0xbuff/throughline@0.0.2`, the version pinned by this documentation app. They do not describe the unreleased schema-2 API intended for v0.2.0. See [compatibility and upgrading](/docs/throughline/compatibility). + Throughline validates authored and generated programs before returning snapshots. It throws `ProgramError` for known compilation failures. The package intentionally rejects invalid or unbounded input instead of attempting to recover silently. ## Catch source diagnostics diff --git a/content/docs/throughline/getting-started.mdx b/content/docs/throughline/getting-started.mdx index 9ae94af..f8bab39 100644 --- a/content/docs/throughline/getting-started.mdx +++ b/content/docs/throughline/getting-started.mdx @@ -3,6 +3,8 @@ title: Getting started description: Install Throughline, create your first visualization, and display it in React. --- +**Version scope — v0.0.2 (historical schema 1).** This page and its examples use `@0xbuff/throughline@0.0.2`, the version pinned by this documentation app. They do not describe the unreleased schema-2 API intended for v0.2.0. See [compatibility and upgrading](/docs/throughline/compatibility). + This guide starts with the standalone compiler. You can add the React player afterward. ## Before you begin @@ -12,10 +14,10 @@ Use an ESM project and **Node.js 24 or newer** for Node-based execution. React i ## 1. Install Throughline ~~~sh -npm install @0xbuff/throughline +npm install @0xbuff/throughline@0.0.2 ~~~ -For a reproducible setup, pin `@0xbuff/throughline@0.0.2` and commit your package lockfile. +Keep this exact version and commit your package lockfile so the examples match the installed API. ## 2. Compile a trace diff --git a/content/docs/throughline/index.mdx b/content/docs/throughline/index.mdx index 5e941b4..9628c50 100644 --- a/content/docs/throughline/index.mdx +++ b/content/docs/throughline/index.mdx @@ -4,6 +4,8 @@ description: Create step-by-step visualizations with Throughline. Find setup gui icon: Play --- +**Version scope — v0.0.2 (historical schema 1).** This page and its examples use `@0xbuff/throughline@0.0.2`, the version pinned by this documentation app. They do not describe the unreleased schema-2 API intended for v0.2.0. See [compatibility and upgrading](/docs/throughline/compatibility). + Throughline turns a short description of state changes into a sequence of frames you can inspect or play back. Write a `thl` block in Markdown, compile it with TypeScript, and optionally display it with the React player. Use it to explain algorithms, data structures, recursion, and system workflows. Throughline **does not run the code being explained**; you describe the changes you want to show. @@ -19,7 +21,7 @@ This checkout scenario follows a lost provider reply, an unknown payment outcome Install the package: ~~~sh -npm install @0xbuff/throughline +npm install @0xbuff/throughline@0.0.2 ~~~ Compile a trace: From 229cc671660559db136a720e85eb14b8bacf9d6d Mon Sep 17 00:00:00 2001 From: "Christopher S. Aondona" Date: Wed, 25 Nov 2026 11:06:32 +0100 Subject: [PATCH 2/2] docs: pin all historical installation examples and test version scope --- content/docs/throughline/flow.mdx | 2 ++ content/docs/throughline/frameworks.mdx | 2 ++ content/docs/throughline/integrations.mdx | 2 ++ content/docs/throughline/markdown-mdx.mdx | 2 ++ content/docs/throughline/matrix.mdx | 2 ++ content/docs/throughline/programmatic-api.mdx | 2 ++ content/docs/throughline/react-player.mdx | 4 +++- content/docs/throughline/recipes.mdx | 2 ++ content/docs/throughline/styling.mdx | 2 ++ content/docs/throughline/type-reference.mdx | 2 ++ scripts/throughline-docs.test.mjs | 16 ++++++++++++++++ 11 files changed, 37 insertions(+), 1 deletion(-) diff --git a/content/docs/throughline/flow.mdx b/content/docs/throughline/flow.mdx index d647c4d..5467f7f 100644 --- a/content/docs/throughline/flow.mdx +++ b/content/docs/throughline/flow.mdx @@ -3,6 +3,8 @@ title: Create flow visualizations description: Write a sequence of steps that shows how values, connections, and visibility change. --- +**Version scope — v0.0.2 (historical schema 1).** This page and its examples use `@0xbuff/throughline@0.0.2`, the version pinned by this documentation app. They do not describe the unreleased schema-2 API intended for v0.2.0. See [compatibility and upgrading](/docs/throughline/compatibility). + `flow` is the hand-authored domain. Use it when the explanation is a sequence of explicit state changes rather than a built-in computation. ## Complete example diff --git a/content/docs/throughline/frameworks.mdx b/content/docs/throughline/frameworks.mdx index 887c7b5..6739eb8 100644 --- a/content/docs/throughline/frameworks.mdx +++ b/content/docs/throughline/frameworks.mdx @@ -3,6 +3,8 @@ title: Framework and runtime support description: Use Throughline with React, Next.js, React Router, Astro, Node.js, and other runtimes. --- +**Version scope — v0.0.2 (historical schema 1).** This page and its examples use `@0xbuff/throughline@0.0.2`, the version pinned by this documentation app. They do not describe the unreleased schema-2 API intended for v0.2.0. See [compatibility and upgrading](/docs/throughline/compatibility). + The compiler is a standalone ESM package. The official visual player requires **React 19** and its separately imported CSS. ## Choose your environment diff --git a/content/docs/throughline/integrations.mdx b/content/docs/throughline/integrations.mdx index 2a77301..1df37d3 100644 --- a/content/docs/throughline/integrations.mdx +++ b/content/docs/throughline/integrations.mdx @@ -3,6 +3,8 @@ title: Use Throughline in applications description: Compile visualizations at build time or runtime and display them in your application. --- +**Version scope — v0.0.2 (historical schema 1).** This page and its examples use `@0xbuff/throughline@0.0.2`, the version pinned by this documentation app. They do not describe the unreleased schema-2 API intended for v0.2.0. See [compatibility and upgrading](/docs/throughline/compatibility). + Throughline compiles **one trace block at a time**. Your host application decides where blocks come from and how to display the results. ## Choose an approach diff --git a/content/docs/throughline/markdown-mdx.mdx b/content/docs/throughline/markdown-mdx.mdx index fcf2562..b97ee9a 100644 --- a/content/docs/throughline/markdown-mdx.mdx +++ b/content/docs/throughline/markdown-mdx.mdx @@ -3,6 +3,8 @@ title: Markdown and MDX description: Validate Throughline code blocks and show interactive traces in Markdown-based content. --- +**Version scope — v0.0.2 (historical schema 1).** This page and its examples use `@0xbuff/throughline@0.0.2`, the version pinned by this documentation app. They do not describe the unreleased schema-2 API intended for v0.2.0. See [compatibility and upgrading](/docs/throughline/compatibility). + Throughline compiles **one `thl` block at a time**. Your Markdown or MDX host must recognize those blocks and decide how to render them. Without an integration, a `thl` fence remains a normal code block. ## Write a trace in Markdown diff --git a/content/docs/throughline/matrix.mdx b/content/docs/throughline/matrix.mdx index d3622e9..4435e7f 100644 --- a/content/docs/throughline/matrix.mdx +++ b/content/docs/throughline/matrix.mdx @@ -3,6 +3,8 @@ title: Matrix multiplication description: Follow rows, columns, partial products, and result cells in the matrix domain. --- +**Version scope — v0.0.2 (historical schema 1).** This page and its examples use `@0xbuff/throughline@0.0.2`, the version pinned by this documentation app. They do not describe the unreleased schema-2 API intended for v0.2.0. See [compatibility and upgrading](/docs/throughline/compatibility). + The `matrix` domain explains ordinary **matrix multiplication**, one output cell at a time. Its steps are deterministic and computed from the two supplied numeric grids. ## Input diff --git a/content/docs/throughline/programmatic-api.mdx b/content/docs/throughline/programmatic-api.mdx index d8a4c77..c88908f 100644 --- a/content/docs/throughline/programmatic-api.mdx +++ b/content/docs/throughline/programmatic-api.mdx @@ -3,6 +3,8 @@ title: API reference description: Find the public imports, compilation functions, data types, and helper functions. --- +**Version scope — v0.0.2 (historical schema 1).** This page and its examples use `@0xbuff/throughline@0.0.2`, the version pinned by this documentation app. They do not describe the unreleased schema-2 API intended for v0.2.0. See [compatibility and upgrading](/docs/throughline/compatibility). + This page documents the exported TypeScript API of **`@0xbuff/throughline@0.0.2`**. Names listed here are exported from supported package entry points, not private source modules. ## Public package entry points diff --git a/content/docs/throughline/react-player.mdx b/content/docs/throughline/react-player.mdx index 62c381f..dd1f21b 100644 --- a/content/docs/throughline/react-player.mdx +++ b/content/docs/throughline/react-player.mdx @@ -3,12 +3,14 @@ title: React player description: Render compiled traces with controls, captions, keyboard navigation, and optional sound. --- +**Version scope — v0.0.2 (historical schema 1).** This page and its examples use `@0xbuff/throughline@0.0.2`, the version pinned by this documentation app. They do not describe the unreleased schema-2 API intended for v0.2.0. See [compatibility and upgrading](/docs/throughline/compatibility). + `ThroughlinePlayer` displays a compiled `Trace` in React 19. The compiler works without React; import the player only when you need the interactive visualization. ## Install and render ~~~sh -npm install @0xbuff/throughline react@^19 react-dom@^19 +npm install @0xbuff/throughline@0.0.2 react@^19 react-dom@^19 ~~~ ~~~tsx diff --git a/content/docs/throughline/recipes.mdx b/content/docs/throughline/recipes.mdx index 3e1a56d..7715933 100644 --- a/content/docs/throughline/recipes.mdx +++ b/content/docs/throughline/recipes.mdx @@ -3,6 +3,8 @@ title: Worked examples and recipes description: Copyable flow traces and a programmatic TypeScript tracer example for teaching state changes. --- +**Version scope — v0.0.2 (historical schema 1).** This page and its examples use `@0xbuff/throughline@0.0.2`, the version pinned by this documentation app. They do not describe the unreleased schema-2 API intended for v0.2.0. See [compatibility and upgrading](/docs/throughline/compatibility). + These examples demonstrate the five-domain model without claiming to execute the algorithms or systems being explained. Each block is valid input to `compile()`. Use the [Flow reference](/docs/throughline/flow) when editing event syntax. ## Recipe 1: a queue receiving and consuming items diff --git a/content/docs/throughline/styling.mdx b/content/docs/throughline/styling.mdx index 8d1fe9a..a318f16 100644 --- a/content/docs/throughline/styling.mdx +++ b/content/docs/throughline/styling.mdx @@ -3,6 +3,8 @@ title: Styling and themes description: Set light or dark mode and customize the React player with CSS properties. --- +**Version scope — v0.0.2 (historical schema 1).** This page and its examples use `@0xbuff/throughline@0.0.2`, the version pinned by this documentation app. They do not describe the unreleased schema-2 API intended for v0.2.0. See [compatibility and upgrading](/docs/throughline/compatibility). + The optional React player ships its own stylesheet. It does not require Tailwind, a theme provider, or a CSS-in-JS library. ## Import the stylesheet diff --git a/content/docs/throughline/type-reference.mdx b/content/docs/throughline/type-reference.mdx index 2754cf3..434436b 100644 --- a/content/docs/throughline/type-reference.mdx +++ b/content/docs/throughline/type-reference.mdx @@ -3,6 +3,8 @@ title: Type reference description: Look up public TypeScript types, event shapes, and exports for version 0.0.2. --- +**Version scope — v0.0.2 (historical schema 1).** This page and its examples use `@0xbuff/throughline@0.0.2`, the version pinned by this documentation app. They do not describe the unreleased schema-2 API intended for v0.2.0. See [compatibility and upgrading](/docs/throughline/compatibility). + This reference covers the **publicly exported symbols** of `@0xbuff/throughline@0.0.2` and `@0xbuff/throughline/react`. It is a self-contained companion to [API usage](/docs/throughline/programmatic-api) and [Flow authoring](/docs/throughline/flow). ## Supported import paths diff --git a/scripts/throughline-docs.test.mjs b/scripts/throughline-docs.test.mjs index 86cc765..26fc2bf 100644 --- a/scripts/throughline-docs.test.mjs +++ b/scripts/throughline-docs.test.mjs @@ -110,3 +110,19 @@ test("Throughline public docs exclude package-contribution procedures", () => { ); } }); + + +test("Historical Throughline articles match the pinned schema-1 package", async () => { + const manifest = JSON.parse(await readFile(new URL("../package.json", import.meta.url), "utf8")); + assert.equal(manifest.dependencies["@0xbuff/throughline"], "0.0.2"); + for (const [name, doc] of content) { + assert.match(doc, /Version scope — v0\.0\.2 \(historical schema 1\)/, name); + assert.match(doc, /@0xbuff\/throughline@0\.0\.2/, name); + assert.match(doc, /unreleased schema-2 API intended for v0\.2\.0/, name); + for (const line of doc.split("\n")) { + if (/\b(?:install|add)\b/.test(line) && /@0xbuff\/throughline(?:@|\s|$)/.test(line) && /^(?:npm|pnpm|yarn|bun)\s/.test(line.trim())) { + assert.match(line, /@0xbuff\/throughline@0\.0\.2(?=\s|$)/, name + ": mismatched install version"); + } + } + } +});