Repository navigation
Releases
Releases · casoon/castwright
v0.6.0
Breaking
- show: a
show:file must live inside the project root (the working directory, or Vite'sroot); a path outside it is an error unless--allow-show-outside-rootor the plugin optionallowShowOutsideRootis set. Shown text also gets the secret and home-directory warnings thatexec:output has.
Details: DSL reference. - Parser:
pauseon awaitstep is a positioned error instead of being silently ignored.
Added
- CLI:
castwright --versionand per-command--help. - CLI:
castwright validatechecksshow:steps (file,lines:range, language) without running the highlighter. - CLI: an
exec:step on Windows stops with a clear "not supported on Windows" message instead of a spawn failure. - Cursor:
terminal.cursortakes effect — the cast carries it as DECSCUSR at t=0, and the SVG export draws block, bar or underline (no blink). - Player: plays asciicast v3 recordings, honours
idle_time_limit, skips truncated or malformed event lines with a warning, and rejects v1 and unknown versions with a clear error. - Player: the progress bar is an accessible seek slider; while focus is inside the demo, Left/Right/Home/End seek and
ktoggles play/pause. - Player:
castwright:ready,castwright:play,castwright:pause,castwright:endedandcastwright:errorevents, andposter="marker:<label>". - Astro:
<TerminalDemo src="…">takes the accessibility fallback as slot content and warns at build time when none is given. - npm:
node-ptyis declared as an optional peer dependency of@casoon/castwright. - Player: marker ticks on the seek bar, plus
handle.markersandhandle.seekToMarker(label); the slider's value text names the latest marker passed. - Player: drag scrubbing on the seek bar for mouse, touch and pen; it pauses while dragging and restores the previous play state on release.
- Player:
speedattribute and option (0.25–4×) andhandle.speed; optionalspeed-controladds a labelled speed button to the transport row. - Player: optional
copyattribute adds a button that copies the terminal's final text, with anaria-liveconfirmation.
Changed
- Parser: "unknown markup tag" hints at the
{{escape for shell braces such asawk '{print $1}'. - Parser: the
outputline-width warning measures terminal columns — escape sequences are ignored, wide characters and emoji count twice. - Record:
--recordwritesrawoutput as a double-quoted scalar. - Player: changing attributes or
caston a mounted<castwright-demo>rebuilds the player; playback pauses in hidden tabs. - Astro: the reserved height includes the title bar and transport row and honours
rows,chromeandcontrols. - Pages: the project site uses the current shared theme (0.12.6).
- Contributors: CI runs on Node 22 and 24 and builds on Windows and macOS; the publish gate runs the asciicast compatibility check; a tag creates a GitHub Release; issue and pull request templates and
SECURITY.mdadded.
Fixed
- Compiler:
outputwithdelay > 0no longer appends a newline the text did not have, so--recordreplays match the live screen. - Parser: a double-quoted
output.rawis no longer decoded twice —"C:\\Users"keeps its backslashes. - Parser: error positions inside block and quoted scalars point at the offending character, including bad
rawescapes. - SVG: characters forbidden in XML 1.0 are dropped instead of producing a malformed file, and non-
#rrggbbtheme colours are rejected. - Record:
--recordkeeps comments written on anexec:step. - Tape: a line edited with an unsupported key such as
Homeis typed but not run, andBackspaceremoves a whole grapheme. - CLI: a missing or unwritable file prints
castwright: cannot read|write <file>: …instead of a stack trace, andcastwright devchecks the file exists. - Vite: the plugin forwards YAML parse warnings and watches
show:files before reading them, so creating a missing file recompiles the demo. - Player: a looping demo no longer restarts or keeps playing after it scrolls out of view during the final-frame hold.
- Player: the terminal size is restored on seek, restart and loop after a recording's resize events.
- Player: switching
prefers-reduced-motionon while a demo plays stops it and shows the final frame. - Player: disconnecting restores the host element's attributes and
--castwright-*properties;controls="hover"controls no longer capture clicks while invisible.
Security
- Astro: the inline cast JSON no longer breaks out of its
<script>block when a demo's output contains</script>or<!--. - Dependencies: development and build dependencies updated to clear all
pnpm auditadvisories (Vitest 4, happy-dom 21, Vite 7.3.7, Astro 7.4.4 and their transitive packages); the published packages' runtime dependencies are unchanged.