@gnawbit/tabretake 0.4.2 → 0.5.1

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 CHANGED
@@ -1,5 +1,19 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.5.1 — 2026-11-27
4
+
5
+ - Move the Chinese README to `docs/README.zh-CN.md` and remove it from `package.json` `files` so npm displays the English `README.md`.
6
+ - Classify missing system/Playwright browsers (`BROWSER_MISSING` and `BROWSER_DEPS_MISSING`) with actionable `Hint:` recovery lines in CLI error output, and warn during `tabretake init --auto` when no browser is detected.
7
+ - Reuse saved login state in `tabretake capture --login --run` without repeating manual login, preserve existing story fields (such as `brand` and `controls`) when updating via `tabretake mark`, and remove the unused `bin/demo-reel.mjs` alias.
8
+
9
+ ## 0.5.0 — 2026-11-26
10
+
11
+ - Add `tabretake capture` interactive recorder so users can click, type, select, and pin `focus` steps directly in a browser window to generate an editable `story.json` (with automatic password field skipping).
12
+ - Add `tabretake run` to validate, record, and render in a single command (supporting story, marks, and recorded timelines).
13
+ - Add `tabretake mark` local visual video marker studio for click-to-mark timestamps and normalized `(x, y)` coordinates on existing screen recordings.
14
+ - Upgrade `init --auto` element scoring to skip empty navigation links and destructive buttons while prioritizing main form/CTA controls and native `<select>` elements.
15
+ - Add `select` story step action, HiDPI `--scale 2` / `"scale": 2` recording, theme-matched cursor click ripples, rounded content corner masks, and `brand.frame` (`auto`, `browser`, `phone`, `none`).
16
+
3
17
  ## 0.4.2 — 2026-11-26
4
18
 
5
19
  - Add automatic system Chrome/Edge fallback (`--browser auto|chromium|chrome|msedge`) so users can run `demo`, `init --auto`, `plan`, `preview`, and `record` immediately without waiting for `tabretake setup`.
package/README.md CHANGED
@@ -1,12 +1,13 @@
1
1
  # TabRetake — repeatable web app demo videos
2
2
 
3
- English · [简体中文](README.zh-CN.md)
3
+ English · [简体中文](docs/README.zh-CN.md)
4
4
 
5
5
  [![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
6
6
  [![Node](https://img.shields.io/badge/node-%3E%3D20.9-339933?logo=node.js&logoColor=white)](package.json)
7
7
  [![Latest release](https://img.shields.io/github/v/release/gnawbit/tabretake?label=latest%20release&color=6c5ce7)](https://github.com/gnawbit/tabretake/releases/latest)
8
8
  [![Agent skill](https://img.shields.io/badge/agent%20skill-Claude%20Code%20%7C%20Codex%20%7C%20Cursor-6c5ce7)](SKILL.md)
9
9
  [![GitHub stars](https://img.shields.io/github/stars/gnawbit/tabretake?style=social)](https://github.com/gnawbit/tabretake/stargazers)
10
+ [![Listed in Awesome Agent Skills](https://sagargupta.online/awesome-skills/badge.svg)](https://github.com/Sagargupta16/awesome-skills)
10
11
 
11
12
  **Automate your web app demos. Never manually record and edit a screen again.**
12
13
 
@@ -24,8 +25,8 @@ Turn editable JSON steps or AI Agent instructions into crisp **16:9 README GIFs*
24
25
  |---|---|
25
26
  | **Runtime & License** | Node.js `>=20.9.0`, MIT License, 100% local execution (zero cloud upload, zero telemetry) |
26
27
  | **Browser Engine** | Playwright Chromium with automatic fallback to local **Chrome / Edge** (`--browser auto`) |
27
- | **Input Modes** | (1) Live Web URL + editable JSON steps (`init --auto`) · (2) Existing MP4/WebM recording + JSON `marks` |
28
- | **Output Artifacts** | `16:9` 1080p MP4, `README GIF` (~400–900 KB), `9:16` portrait MP4/GIF, PNG posters, `record.json` |
28
+ | **Input Modes** | (1) Interactive browser `capture`, `init --auto`, or editable JSON steps · (2) Existing MP4/WebM + visual `mark` studio |
29
+ | **Output Artifacts** | `16:9` 1080p MP4, `README GIF` (~400–900 KB), `9:16` portrait MP4/GIF, PNG posters, `record.json` (1x or 2x HiDPI `--scale 2`) |
29
30
  | **Theme Presets** | `midnight` (dark studio), `daylight` (light minimal), `paper` (warm cream), `slate` (slate-emerald) |
30
31
  | **Platforms & Agents** | Windows, macOS, Linux · Claude Code, Codex, Cursor, and any [Agent Skills](https://agentskills.io) client |
31
32
 
@@ -45,7 +46,7 @@ Already have a screen recording? Supply timestamp marks to
45
46
  ### 🚀 Quick Taste (Zero-Wait with Local Chrome/Edge)
46
47
 
47
48
  ```bash
48
- npm install --global @gnawbit/tabretake@0.4.2
49
+ npm install --global @gnawbit/tabretake@0.5.1
49
50
  tabretake demo --preset daylight
50
51
  ```
51
52
 
@@ -100,7 +101,7 @@ edit and run again after a release.
100
101
  Install the CLI from npm.
101
102
 
102
103
  ```bash
103
- npm install --global @gnawbit/tabretake@0.4.2
104
+ npm install --global @gnawbit/tabretake@0.5.1
104
105
  tabretake demo
105
106
  ```
106
107
 
@@ -128,7 +129,7 @@ replace `node bin/tabretake.mjs` with `tabretake`.
128
129
  To add the agent workflow after setting up the CLI:
129
130
 
130
131
  ```bash
131
- npx skills@1.9.0 add "https://github.com/gnawbit/tabretake.git#v0.4.2" --skill tabretake
132
+ npx skills@1.9.0 add "https://github.com/gnawbit/tabretake.git#v0.5.1" --skill tabretake
132
133
  ```
133
134
 
134
135
  Run this in the target project; add `--agent codex`, `--agent claude-code` or
@@ -139,7 +140,7 @@ or a source checkout. Install the CLI and Skill from the same revision.
139
140
  Claude Code users can install the plugin instead (CLI 2.1.292+):
140
141
 
141
142
  ```bash
142
- claude plugin install tabretake --marketplace "gnawbit/tabretake#v0.4.2"
143
+ claude plugin install tabretake --marketplace "gnawbit/tabretake#v0.5.1"
143
144
  ```
144
145
 
145
146
  Install the workflow through one of these routes; the plugin still needs the
@@ -164,14 +165,16 @@ node bin/tabretake.mjs doctor
164
165
  # 2. See it work on the bundled demo app
165
166
  node bin/tabretake.mjs demo
166
167
 
167
- # 3. Use it on your own app (Auto-detect interactive steps + theme preset)
168
+ # 3. Record your own app (choose interactive capture or auto-scan + one-command run)
169
+ tabretake capture --url https://your-app.com --out demo.json --run --vertical --preset daylight
170
+ # Or auto-scan DOM controls into an editable story, then run:
168
171
  tabretake init --url https://your-app.com --auto --preset daylight
169
- tabretake record --config demo.json
170
- tabretake render --config demo/record.json --vertical
172
+ tabretake run --config demo.json --vertical --scale 2
171
173
  ```
172
174
 
173
- `init --auto` scans your target page, detects visible inputs and buttons, and generates a runnable multi-step story with captions.
174
- Without `--auto`, `init` creates a minimal starter waiting on the page. Use `plan --url <url>` to inventory all available DOM controls (including ARIA/HTML `label` and native select `options`).
175
+ `capture` opens a browser window so you can click, type, select, and pin focus points directly — saving an editable `demo.json` (never storing password values) and optionally rendering immediately with `--run`.
176
+ `init --auto` scans your target page, skips navigation dead links and destructive actions, prioritizes main form/CTA controls, and generates a runnable multi-step story with captions.
177
+ `run` validates, records, and renders in a single command (or accepts an existing `marks` or `record.json` config). You can also run `record` and `render` separately, or use `plan --url <url>` to inspect all DOM controls (including ARIA/HTML `label` and native select `options`).
175
178
  `name` remains the HTML attribute and `selector` is the suggested CSS locator; this is a DOM inventory rather than a full accessibility tree.
176
179
 
177
180
  ```bash
@@ -251,7 +254,7 @@ Preview checks browser actions. Use a rendered clip to check zooms and captions.
251
254
  }
252
255
  ```
253
256
 
254
- Actions: `wait`, `goto`, `click`, `type`, `hover`, `focus`, `drag`, `scroll`, `press`,
257
+ Actions: `wait`, `goto`, `click`, `type`, `select`, `hover`, `focus`, `drag`, `scroll`, `press`,
255
258
  `waitFor`, `screenshot`.
256
259
 
257
260
  `click` waits for an enabled, unobstructed target up to `timeout` (milliseconds, default 20,000; blocked clicks return `STEP_TIMEOUT`).
@@ -261,7 +264,6 @@ An explicit `selector` is tried first. Label matching tries exact buttons/links,
261
264
  then partial buttons/links, then plain text (exact before partial). An explicit
262
265
  `role` restricts matching to that role, with exact names first. Each candidate
263
266
  keeps the first visible match; use a scoped selector when labels repeat or overlap.
264
- See [compatibility](docs/compatibility.md) for legacy matching behavior.
265
267
 
266
268
  Tips:
267
269
 
@@ -292,7 +294,7 @@ trimmed output, starting at zero, and must be shorter than the video.
292
294
 
293
295
  ### Theme presets & vertical branding
294
296
 
295
- Choose a built-in `brand.preset` (`midnight`, `daylight`, `paper`, or `slate`) in your config or override it at render time with `--preset <name>`. Explicit `brand.background` and `brand.accent` override preset colors unless `--preset` is passed on the CLI.
297
+ Choose a built-in `brand.preset` (`midnight`, `daylight`, `paper`, or `slate`) in your config or override it at render time with `--preset <name>`. Cursor click ripples automatically follow the theme's `accent` color, and `brand.frame` supports `"auto"` (default), `"browser"`, `"phone"` (lightweight portrait bezel), or `"none"`. Explicit `brand.background` and `brand.accent` override preset colors unless `--preset` is passed on the CLI. Use `"scale": 2` (or `--scale 2`) for HiDPI 2x recording so zoomed shots stay crisp.
296
298
 
297
299
  ```json
298
300
  "brand": {
@@ -327,11 +329,14 @@ for cropped context.
327
329
  | `tabretake doctor [--json]` | Check Node, Chromium, ffmpeg, fonts |
328
330
  | `tabretake setup` | Install the Chromium version used by this CLI |
329
331
  | `tabretake init --url <url> [--auto] [--preset <name>]` | Create an editable story file (`--auto` scans controls; `--preset` sets theme) |
332
+ | `tabretake capture --url <url> [--out demo.json] [--run]` | Record your real browser clicks/inputs into an editable `story.json` |
330
333
  | `tabretake validate --config demo.json [--json]` | Validate a story, marks or recorded timeline without recording |
331
334
  | `tabretake plan --url <url>` | Screenshot + list interactive elements |
332
335
  | `tabretake record --config demo.json` | Record the story |
333
336
  | `tabretake preview --config demo.json` | Execute steps in a visible browser before recording |
334
337
  | `tabretake render --config demo/record.json [--preset <name>]` | Render MP4 + GIF |
338
+ | `tabretake run --config demo.json [--vertical] [--scale 2]` | Validate, record, and render in one command |
339
+ | `tabretake mark --video recording.mp4 [--out story-video.json]` | Open local visual studio to click-mark timestamps & zoom points |
335
340
  | `tabretake serve` | Serve the bundled demo app |
336
341
  | `tabretake demo [--preset <name>]` | Record + render the bundled demo |
337
342
 
@@ -359,11 +364,10 @@ Before recording, run `validate --config demo.json --json` against the packaged
359
364
  For editor completion, add `"$schema": "https://raw.githubusercontent.com/gnawbit/tabretake/main/schemas/story.schema.json"`
360
365
  to your config.
361
366
 
362
- `init`, `plan`, `record` and `render` accept `--json` (one JSON result object on stdout, progress on stderr).
367
+ `init`, `capture`, `plan`, `record`, `render`, `run` and `mark` accept `--json` (one JSON result object on stdout, progress on stderr).
363
368
  Navigation failures return `PAGE_UNREACHABLE` or `PAGE_HTTP_ERROR` without echoing sensitive URLs;
364
369
  captions start when an action completes and hold during its `pause`.
365
370
  Run manual `--login` in an interactive terminal without `--json`, then reuse `--storage-state` in automation.
366
- See [compatibility](docs/compatibility.md) for legacy version behavior (`v0.4.0` and earlier).
367
371
 
368
372
  ```bash
369
373
  --browser auto # auto (bundled Chromium or local Chrome/Edge), chromium, chrome, msedge
@@ -372,6 +376,7 @@ See [compatibility](docs/compatibility.md) for legacy version behavior (`v0.4.0`
372
376
  --storage-state auth.json
373
377
  --proxy http://127.0.0.1:10808
374
378
  --viewport 1440x810
379
+ --scale 2 # 1 (default) or 2 (HiDPI Retina recording for crisp zooms)
375
380
  --headed # watch the recording happen
376
381
  --vertical # also render 9:16 + vertical GIF
377
382
  --video recording.mp4 # render an existing recording + marks
@@ -441,8 +446,14 @@ node bin/tabretake.mjs demo --story release --port 0 --out demo-release
441
446
  ## Use an existing screen recording
442
447
 
443
448
  If a site blocks automation, or you are demoing a desktop or mobile app, record
444
- the flow with OBS, Screen Studio, QuickTime or the OS recorder, then describe
445
- where to zoom in `marks`:
449
+ the flow with OBS, Screen Studio, QuickTime or the OS recorder, then run the
450
+ local visual studio to click on zoom targets directly (no manual math required):
451
+
452
+ ```bash
453
+ tabretake mark --video recording.mp4 --out story-video.json
454
+ ```
455
+
456
+ Or author `marks` JSON directly to describe where to zoom:
446
457
 
447
458
  ```json
448
459
  {
@@ -528,8 +539,9 @@ are yours or licensed.
528
539
  - [x] 9:16 vertical export
529
540
  - [x] Screen-recording input (`--video` + `marks`)
530
541
  - [x] Brand presets (`midnight`, `daylight`, `paper`, `slate`)
542
+ - [x] Interactive capture (`capture`), visual marker studio (`mark`), and lightweight frames (`browser`, `phone`)
543
+ - [ ] Full device bezels (iPhone, Android, macOS)
531
544
  - [ ] Voiceover (TTS)
532
- - [ ] Device frames (iPhone, Android, macOS)
533
545
  - [ ] Cloud rendering
534
546
 
535
547
  ## Contributing
package/SKILL.md CHANGED
@@ -4,7 +4,7 @@ description: Create repeatable product demo videos, screen recording walkthrough
4
4
  license: MIT
5
5
  metadata:
6
6
  author: gnawbit
7
- version: "0.4.2"
7
+ version: "0.5.1"
8
8
  repository: https://github.com/gnawbit/tabretake
9
9
  compatibility: Node.js 20.9+, local Chrome/Edge or Chromium via tabretake setup, Windows/macOS/Linux. Target app access is required. Rendering is local.
10
10
  ---
@@ -21,13 +21,14 @@ Create a repeatable product walkthrough from a web URL, or render an existing
21
21
  screen recording with supplied timestamps. Canonical project:
22
22
  https://github.com/gnawbit/tabretake.
23
23
  Outputs are local MP4, GIF and PNG posters in landscape (16:9) and optional portrait (9:16).
24
- For legacy release notes (`v0.4.0` and earlier / `demo-reel`), see [compatibility](docs/compatibility.md).
24
+ For legacy release notes (v0.4.0 and earlier / `demo-reel`), see
25
+ [compatibility](https://github.com/gnawbit/tabretake/blob/main/docs/compatibility.md).
25
26
 
26
27
  ## Locate and check the CLI
27
28
 
28
29
  Use an installed `tabretake` CLI when available. For a source checkout, replace
29
30
  `tabretake` with `node /absolute/path/to/tabretake/bin/tabretake.mjs` (quote paths with spaces).
30
- If missing, install with `npm install --global @gnawbit/tabretake@0.4.2`.
31
+ If missing, install with `npm install --global @gnawbit/tabretake@0.5.1`.
31
32
  When Playwright Chromium is absent, TabRetake automatically falls back to local
32
33
  Chrome or Edge (`--browser auto`), or you can install pinned Chromium via `tabretake setup`.
33
34
 
@@ -46,8 +47,11 @@ required errors first. Node.js 20.9+ is required; Chinese captions need a CJK sy
46
47
  ## Choose the input
47
48
 
48
49
  - **Web app:** confirm the URL and intended flow. Use a test account and non-sensitive demo data.
49
- - **Existing recording:** get the file and moments to highlight. Read
50
+ - **Existing recording:** get the file and moments to highlight, or launch
51
+ `tabretake mark --video recording.mp4` for interactive timestamp picking. Read
50
52
  [recording input and branding](references/rendering.md); do not invent marks.
53
+ - **Interactive capture:** `tabretake capture --url https://your-app.com --out demo.json --run`
54
+ lets the user perform the steps in a visible browser and saves a reusable story.
51
55
  - **Example requested:** `tabretake demo --story readme|onboarding|release --port 0`
52
56
  runs a fictional bundled app (not evidence of external adoption).
53
57
 
@@ -69,18 +73,21 @@ theme preset (`midnight`, `daylight`, `paper`, `slate`), or output orientation.
69
73
  and native select `options`; `name` remains the HTML attribute. Use scoped `selector`
70
74
  when labels repeat or overlap. `init` will not overwrite an existing story.
71
75
 
72
- 3. Validate, preview, record and render:
76
+ 3. Validate, preview, record and render (or use `tabretake run` for one-command execution):
73
77
 
74
78
  ```bash
75
79
  tabretake validate --config demo.json --json
76
80
  tabretake preview --config demo.json --headless --json
77
- tabretake record --config demo.json --out demo --json
81
+ tabretake run --config demo.json --out demo --vertical --scale 2 --json
82
+ # Or run record and render separately:
83
+ tabretake record --config demo.json --out demo --scale 2 --json
78
84
  tabretake render --config demo/record.json --vertical --json
79
85
  ```
80
86
 
81
87
  Omit `--vertical` for landscape only; add `--no-gif` to skip GIFs; pass
82
88
  `--preset daylight|paper|slate|midnight` to switch themes without re-recording;
83
- pass `--browser chrome|msedge|chromium|auto` to pick a browser engine.
89
+ pass `--browser chrome|msedge|chromium|auto` to pick a browser engine;
90
+ pass `--scale 2` for HiDPI Retina recording when zooming in.
84
91
  Use `--vertical --zoom 1 --vertical-zoom 1.8` to keep landscape overview while
85
92
  enlarging portrait focus targets (`vertical.zoom` saves it in config; `zoom: false`
86
93
  keeps full view). Record narrow viewports (e.g. `390x844`) for mobile flows.
@@ -103,24 +110,21 @@ partial files. `schemaVersion` identifies the response format, not the CLI relea
103
110
  - `TARGET_NOT_FOUND`, `STEP_TIMEOUT`, `STEP_FAILED`: inspect `error.step.path`
104
111
  and its zero-based index. Re-run `plan` with the same login state, update the
105
112
  target or wait condition and retry. Do not repeat an unchanged failing command.
106
- From v0.3.3, `click` also waits for an enabled, unobstructed
107
- target using step `timeout` (milliseconds; default 20,000). v0.3.2 and earlier
108
- do not reliably wait for clickable targets; inspect the resulting page.
113
+ `click` waits for an enabled, unobstructed target using step `timeout`
114
+ (milliseconds; default 20,000).
109
115
  - `PAGE_UNREACHABLE`: check the URL, local app server and browser network/proxy
110
116
  access. `PAGE_HTTP_ERROR`: inspect `error.status`; fix the route/server or use
111
- authorized login state for 401/403. These codes are available in v0.3.1 or newer;
112
- older versions may return `COMMAND_FAILED`. Dependency checks do not prove
113
- page access, and an HTTP error page is not a completed demo.
117
+ authorized login state for 401/403. Dependency checks do not prove page access,
118
+ and an HTTP error page is not a completed demo.
114
119
  - Missing runtime or fonts: inspect `doctor --json` and its recovery hints.
115
120
  - Captcha, anti-bot block, iframe-only or canvas-only flow: use a user-provided
116
121
  recording with marks instead of trying to bypass the restriction.
117
122
 
118
123
  ## Protected pages and privacy
119
124
 
120
- Manual login needs an interactive terminal without `--json`:
121
-
122
- From v0.3.2, login navigation errors also omit the target URL. HTTP 401/403
123
- pages stay open for sign-in; other HTTP errors stop the command.
125
+ Manual login needs an interactive terminal without `--json`. Login navigation
126
+ errors omit the target URL; HTTP 401/403 pages stay open for sign-in while other
127
+ HTTP errors stop the command.
124
128
 
125
129
  ```bash
126
130
  tabretake plan --url https://your-app.com --login
package/bin/tabretake.mjs CHANGED
@@ -7,6 +7,11 @@ main(process.argv.slice(2)).catch((err) => {
7
7
  const [command, ...args] = process.argv.slice(2);
8
8
  if (commandOptions[command]?.json && args.includes("--json")) {
9
9
  console.log(JSON.stringify(errorReport(command, err)));
10
- } else console.error(err?.stack || err?.message || String(err));
10
+ } else if (err?.code) {
11
+ console.error(`Error: ${err.message || String(err)}`);
12
+ if (err.hint) console.error(`Hint: ${err.hint}`);
13
+ } else {
14
+ console.error(err?.stack || err?.message || String(err));
15
+ }
11
16
  process.exitCode = 1;
12
17
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gnawbit/tabretake",
3
- "version": "0.4.2",
3
+ "version": "0.5.1",
4
4
  "description": "Create repeatable web app demos, README GIFs and 9:16 videos from editable JSON steps or existing screen recordings. Local CLI and Agent Skill for Claude Code, Codex and Cursor.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -17,11 +17,10 @@
17
17
  "examples/story.json",
18
18
  "examples/story-video.json",
19
19
  "SKILL.md",
20
- "README.zh-CN.md",
21
20
  "CHANGELOG.md"
22
21
  ],
23
22
  "scripts": {
24
- "test": "node --test",
23
+ "test": "node tools/test.mjs",
25
24
  "doctor": "node bin/tabretake.mjs doctor",
26
25
  "serve": "node bin/tabretake.mjs serve",
27
26
  "demo": "node bin/tabretake.mjs demo"
@@ -20,10 +20,13 @@ checks still apply, and missing fonts need visual inspection of captions.
20
20
  ```
21
21
 
22
22
  ```bash
23
+ tabretake mark --video recording.mp4 --out story-video.json
23
24
  tabretake validate --config story-video.json --json
24
25
  tabretake render --config story-video.json --video recording.mp4 --vertical --json
25
26
  ```
26
27
 
28
+ Use `tabretake mark` to click directly on the video frame in a local browser UI instead of estimating normalized `x`, `y` and `t` manually.
29
+
27
30
  `video` in the config is relative to the config file; `--video` is relative to
28
31
  the current working directory. Marks use **seconds**. Prefer normalized `x`, `y`
29
32
  coordinates from 0 to 1; larger values are source pixels. `duration` delays the
@@ -38,9 +41,9 @@ story will not update a saved timeline. Re-record for changed browser actions.
38
41
  ## Camera, posters and portrait branding
39
42
 
40
43
  - `--zoom 1.28` sets focus magnification.
41
- - From v0.4.1, `vertical.zoom` or `--vertical-zoom 1.8` sets portrait
42
- focus magnification independently (1–10). The flag overrides config; when
43
- neither is set it follows `--zoom`. Check capabilities before using the flag.
44
+ - `vertical.zoom` or `--vertical-zoom 1.8` sets portrait focus magnification
45
+ independently (1–10). The flag overrides config; when neither is set it
46
+ follows `--zoom`. Check capabilities before using the flag.
44
47
  - `zoomDuration` or `--zoom-duration 0.5` sets transition seconds; `0` uses cuts.
45
48
  - `posterAt` or `--poster-at 4.5` selects an output time strictly before the end.
46
49
  Without it, the poster is chosen near the end.
@@ -48,8 +51,8 @@ story will not update a saved timeline. Re-record for changed browser actions.
48
51
  suppresses captions and font-based portrait text.
49
52
 
50
53
  Portrait cards fit the source video's aspect ratio between the title and captions.
51
- From v0.4.1, landscape recordings also fit their source aspect ratio,
52
- with captions below the content. Zooming still intentionally crops the source.
54
+ Landscape recordings also fit their source aspect ratio, with captions below the
55
+ content. Zooming still intentionally crops the source.
53
56
  For a responsive mobile UI, record with a narrow viewport such as `390x844`;
54
57
  inspect the page with `plan --viewport 390x844` before recording at that size.
55
58
  Use `--zoom 1` to retain the full viewport. Larger zoom values intentionally crop
@@ -71,7 +74,7 @@ Branding belongs at the top of a story/marks config, or inside a timeline's `con
71
74
  }
72
75
  ```
73
76
 
74
- Built-in `brand.preset` (or `--preset`) themes: `midnight` (dark studio, default), `daylight` (light minimal), `paper` (warm cream), and `slate` (dark slate-emerald). Explicit `background` and `accent` override preset colors unless `--preset` is passed to `render`.
77
+ Built-in `brand.preset` (or `--preset`) themes: `midnight` (dark studio, default), `daylight` (light minimal), `paper` (warm cream), and `slate` (dark slate-emerald). Cursor click ripples automatically adopt `accent`; `brand.frame` supports `"auto"` (default), `"browser"`, `"phone"` (lightweight vertical device bezel), or `"none"`. Explicit `background` and `accent` override preset colors unless `--preset` is passed to `render`. Use `"scale": 2` (or `--scale 2` on `record`/`run`) for HiDPI 2x recording.
75
78
 
76
79
  Use at most two title lines. Captions wrap and fit within the frame; excessively
77
80
  long captions produce an error. Chinese text needs a CJK font such as Microsoft
@@ -1,10 +1,9 @@
1
1
  # Story authoring
2
2
 
3
- Use `plan` output to select controls for the requested flow. From v0.3.3, `label`
4
- resolves ARIA references and HTML labels; native select `options` provide labels,
5
- values and disabled states. Older versions omit these fields; use the plan
6
- screenshot and existing control metadata instead. The plan's `name` remains the
7
- HTML attribute, not a computed accessible name. This DOM inventory is not a complete accessibility
3
+ Use `plan` output to select controls for the requested flow. `label` resolves
4
+ ARIA references and HTML labels; native select `options` provide labels, values
5
+ and disabled states. The plan's `name` remains the HTML attribute, not a
6
+ computed accessible name. This DOM inventory is not a complete accessibility
8
7
  tree. Use the supplied `selector` when the intended locator is uncertain.
9
8
 
10
9
  An editable story:
@@ -36,6 +35,7 @@ An editable story:
36
35
  | `click`, `hover` | locator, `pause`, `caption`, `zoom` |
37
36
  | `focus` | locator, `pause`, `caption`, `zoom`; measure the target after scrolling into view |
38
37
  | `type` | locator, `value`, `pause`, `caption`, `zoom` |
38
+ | `select` | locator, `value` or `text`, `pause`, `caption`, `zoom` |
39
39
  | `drag` | locator, `dx`, `dy`, `steps`, `pause`, `caption`, `zoom` |
40
40
  | `scroll` | `y`, `pause`, `caption`, `zoom` |
41
41
  | `press` | `key`, `pause`, `caption`, `zoom` |
@@ -43,38 +43,33 @@ An editable story:
43
43
  | `screenshot` | `file`, relative to the output directory |
44
44
 
45
45
  Locator fields are `selector`, `role` + `name` (or `text`), `name`, or `text`.
46
- An explicit selector is tried first. From v0.4.0, a supplied
47
- role restricts name matching to that role, exact before partial. Without a role,
48
- try exact button/link candidates, partial button/link candidates, then plain text
49
- (exact before partial). This keeps noninteractive headings behind controls. Each candidate
46
+ An explicit selector is tried first. A supplied `role` restricts name matching
47
+ to that role, exact before partial. Without a role, try exact button/link
48
+ candidates, partial button/link candidates, then plain text (exact before
49
+ partial). This keeps noninteractive headings behind controls. Each candidate
50
50
  selects its first visible match; hidden exact matches do not block a visible
51
51
  partial match. Use a scoped selector when labels repeat or overlap.
52
- On v0.3.3 and earlier, partial buttons may beat exact links: use a selector such
53
- as `a[href='#/completed']` for “Completed” beside a “Clear completed” button.
54
52
  Story steps do not have a dedicated iframe locator. `type` clears the field
55
53
  before typing.
56
54
 
57
- From v0.3.3, `click` waits for an enabled, unobstructed target;
58
- its optional `timeout` is in milliseconds (default 20,000). Persistent blocking
59
- returns `STEP_TIMEOUT`. v0.3.2 and earlier do not reliably wait for clickable
60
- targets. A successful click does not prove the app finished processing it;
61
- continue to use `waitFor` for the expected result.
55
+ `click` waits for an enabled, unobstructed target; its optional `timeout` is in
56
+ milliseconds (default 20,000). Persistent blocking returns `STEP_TIMEOUT`.
57
+ A successful click does not prove the app finished processing it; continue to
58
+ use `waitFor` for the expected result.
62
59
 
63
60
  Use `waitFor` for a visible result before the next interaction. Give captions
64
61
  and focus targets explicit pauses. `focus` frames the target without clicking it;
65
62
  add another focus step after the layout changes. Use `preview --config story.json`
66
63
  to execute steps before recording. Preview performs actual app changes, so reset
67
64
  demo data before a retake. It preserves recordings and writes explicit screenshots.
68
- Use rendered output to check camera framing. Give captions
69
- time to be read; they begin after the interaction and replace the previous
70
- caption. In v0.3.1 or newer, an action's `pause` provides reading time
71
- after its caption starts. With older releases, set `pause: 0` and add a separate
72
- `wait` step to avoid delaying the caption. Re-record older stories to get the
73
- new timing; saved timelines keep their original timestamps.
65
+ Use rendered output to check camera framing. Give captions time to be read; they
66
+ begin after the interaction and replace the previous caption. An action's `pause`
67
+ provides reading time after its caption starts; saved timelines keep their
68
+ original timestamps.
74
69
  Set `zoom: false` when the result is elsewhere on screen. Avoid
75
70
  recording a blank initial load or ending on an unfinished dialog.
76
71
 
77
- To improve blurry output, record at a larger viewport such as 1920x1080.
72
+ To improve blurry output when zooming, record with `"scale": 2` (or `--scale 2`) for HiDPI 2x capture, or use a larger viewport such as `1920x1080`. To capture an editable story by clicking through the app interactively, run `tabretake capture --url <url> --out story.json`.
78
73
  If text does not fit, shorten the caption or split it across meaningful steps.
79
74
  If a selector fails, inspect the reported step and refresh the page plan rather
80
75
  than guessing at selectors or increasing every timeout.
@@ -33,6 +33,15 @@
33
33
  "accent": {
34
34
  "type": "string",
35
35
  "pattern": "^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6})$"
36
+ },
37
+ "frame": {
38
+ "type": "string",
39
+ "enum": [
40
+ "auto",
41
+ "browser",
42
+ "phone",
43
+ "none"
44
+ ]
36
45
  }
37
46
  },
38
47
  "additionalProperties": false
@@ -120,6 +129,7 @@
120
129
  "goto",
121
130
  "click",
122
131
  "type",
132
+ "select",
123
133
  "hover",
124
134
  "focus",
125
135
  "drag",
@@ -207,6 +217,7 @@
207
217
  "enum": [
208
218
  "click",
209
219
  "type",
220
+ "select",
210
221
  "hover",
211
222
  "focus",
212
223
  "drag"
@@ -243,7 +254,10 @@
243
254
  "if": {
244
255
  "properties": {
245
256
  "action": {
246
- "const": "type"
257
+ "enum": [
258
+ "type",
259
+ "select"
260
+ ]
247
261
  }
248
262
  }
249
263
  },
@@ -420,7 +434,11 @@
420
434
  "pattern": "^https?://"
421
435
  },
422
436
  "scale": {
423
- "const": 1
437
+ "type": "integer",
438
+ "enum": [
439
+ 1,
440
+ 2
441
+ ]
424
442
  },
425
443
  "initialWait": {
426
444
  "type": "number",
@@ -477,7 +495,11 @@
477
495
  "pattern": "^https?://"
478
496
  },
479
497
  "scale": {
480
- "const": 1
498
+ "type": "integer",
499
+ "enum": [
500
+ 1,
501
+ 2
502
+ ]
481
503
  },
482
504
  "initialWait": {
483
505
  "type": "number",
@@ -572,7 +594,11 @@
572
594
  "$ref": "#/definitions/viewport"
573
595
  },
574
596
  "scale": {
575
- "const": 1
597
+ "type": "integer",
598
+ "enum": [
599
+ 1,
600
+ 2
601
+ ]
576
602
  },
577
603
  "video": {
578
604
  "type": "string",