@turing-machine-js/visuals 7.0.0-alpha.6
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/CHANGELOG.md +21 -0
- package/LICENSE +674 -0
- package/README.md +21 -0
- package/dist/applyHighlight.d.ts +42 -0
- package/dist/applyHighlight.js +191 -0
- package/dist/format.d.ts +22 -0
- package/dist/format.js +46 -0
- package/dist/graphIndexes.d.ts +31 -0
- package/dist/graphIndexes.js +58 -0
- package/dist/graphUtils.d.ts +37 -0
- package/dist/graphUtils.js +76 -0
- package/dist/highlightOps.d.ts +81 -0
- package/dist/highlightOps.js +36 -0
- package/dist/index.cjs +514 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.js +6 -0
- package/dist/index.mjs +503 -0
- package/dist/recordSnippet.d.ts +35 -0
- package/dist/recordSnippet.js +92 -0
- package/dist/types.d.ts +92 -0
- package/dist/types.js +1 -0
- package/docs/graph-highlight-and-breakpoints.md +272 -0
- package/package.json +46 -0
- package/src/applyHighlight.spec.ts +331 -0
- package/src/applyHighlight.ts +217 -0
- package/src/fixtures/graphs/post-walk-mark.json +108 -0
- package/src/fixtures/graphs/turing-callable-subtree.json +108 -0
- package/src/fixtures/graphs/turing-copy-two-tapes.json +87 -0
- package/src/fixtures/graphs/turing-replace-b.json +72 -0
- package/src/format.spec.ts +100 -0
- package/src/format.ts +51 -0
- package/src/graphIndexes.ts +84 -0
- package/src/graphUtils.spec.ts +112 -0
- package/src/graphUtils.ts +74 -0
- package/src/highlightOps.ts +94 -0
- package/src/index.ts +10 -0
- package/src/recordSnippet.spec.ts +275 -0
- package/src/recordSnippet.ts +141 -0
- package/src/types.ts +96 -0
- package/tsconfig.build.json +11 -0
- package/tsconfig.build.tsbuildinfo +1 -0
- package/tsconfig.json +10 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this package will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
6
|
+
|
|
7
|
+
## [7.0.0-alpha.6] - 2026-05-30
|
|
8
|
+
|
|
9
|
+
### Added
|
|
10
|
+
|
|
11
|
+
- Initial extraction from machines-demo (highlight + graph-indexing surface):
|
|
12
|
+
- Types: `HighlightOps`, `IndicatorOps`, `RecordedOp`, `NodeKey`, `HighlightClass`, `GraphIndexes`, `GraphHighlight`, `TapeSnapshot`.
|
|
13
|
+
- Functions: `indexGraph`, `applyHighlight`, `applyIndicator`, `bareIdOf`, `highlightExpand`, `equivalentIds`, `recordingOps`.
|
|
14
|
+
- Rules doc at `docs/graph-highlight-and-breakpoints.md`.
|
|
15
|
+
- Initial `recordSnippet` surface (folded in from step 3 of #204 — first published alpha ships with a complete v1 API ready to feed downstream consumers):
|
|
16
|
+
- Types: `Snippet` (`{ version: 1, name?, graph, alphabets, frames }`), `Frame` (`{ step, tape, commands?, highlight, log? }`), `RecordSnippetOptions`.
|
|
17
|
+
- `Frame.commands` carries per-tape `{ movement, read, write }` — both sides of the cell, so players can step forward and backward without recomputing from neighbouring frames.
|
|
18
|
+
- `recordSnippet({ machine, initialState, graph, alphabets, name?, maxSteps?, log? }) => Snippet` runs `machine.runStepByStep` and captures one frame per iter plus a frame-0 initial-state snapshot.
|
|
19
|
+
- Composable formatter primitives: `formatCommand(tapeCommand)` + `formatStep(machineState)` — match the engine's edge-label notation (`[reads] → [writes]/[moves]`) so logged steps line up with rendered graph edges.
|
|
20
|
+
|
|
21
|
+
Closes [#204](https://github.com/mellonis/turing-machine-js/issues/204).
|