trace-avatar-render 0.1.7 → 0.2.0
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 +24 -1
- package/README.md +52 -0
- package/dist/{chunk-PPVNEPXF.js → chunk-EAMOVIQK.js} +1967 -591
- package/dist/chunk-EAMOVIQK.js.map +1 -0
- package/dist/cli.js +6 -448
- package/dist/cli.js.map +1 -1
- package/dist/index.d.ts +430 -9
- package/dist/index.js +55 -1
- package/package.json +12 -1
- package/dist/chunk-PPVNEPXF.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,29 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
-
## 0.
|
|
3
|
+
## 0.2.0 (unreleased)
|
|
4
|
+
|
|
5
|
+
- **Campaigns** (`campaign.json`): a product's marketing videos, made on the real app in every look and shape.
|
|
6
|
+
- `trace-avatar-render campaign check | make | status [campaign.json]`, and `readCampaign`, `makeCampaign`,
|
|
7
|
+
`statusOf`, `rendersOf`, `filesOf`, `endsWithOf`, `saysOf` from code.
|
|
8
|
+
- Per video and look: one desktop capture written as 16:9, 1:1 and 4:5 (captions as a file), and a phone capture
|
|
9
|
+
(390×844) for 9:16 with captions burned in. A video is a guide or a director script.
|
|
10
|
+
- The app: started with `--start` (`app.start`, ready at `app.ready` or when it prints `app.readyText`), put back
|
|
11
|
+
to a known state before each video (`app.reset`: `{ post }` or `{ run }`, with the video's `reset` as its body),
|
|
12
|
+
signed in with `app.storageState` or a session module (`storageStateFor(url, options)`), shown under its public
|
|
13
|
+
name (`app.alias`), with prop folders served at its address (`app.routes`).
|
|
14
|
+
- Looks are named brand files; a look's `endsWith` (or its brand's end card) is what its videos end with.
|
|
15
|
+
- Progress in `<out>/progress.json` while it runs; a run stopped part way carries on (`--fresh` starts over);
|
|
16
|
+
`<out>/made.json` lists what was made. It stops before capturing anything when there's no ffmpeg or the voice
|
|
17
|
+
can't be reached.
|
|
18
|
+
- **Director videos** (`direct()`): a script plays a person using the app — `d.scene`, `d.card`, `d.click`,
|
|
19
|
+
`d.type`, `d.hover`, `d.press`, `d.read`, `d.skip`, `d.open`, `d.window`, `d.expect` (with `@playwright/test`) —
|
|
20
|
+
with the cursor drawn on afterwards; narrated, the captions say the spoken lines. Writes `<id>.scenes.json`.
|
|
21
|
+
`lookOptions()` gives finish() options from a brand and the video's flags.
|
|
22
|
+
- **Narrated from a script, captions say the spoken lines** (render, `--script`): each step's caption is its line,
|
|
23
|
+
so the captions file and burned-in captions show what is heard (they kept the steps' own words).
|
|
24
|
+
- **ffmpeg**: `ffmpeg-static` is an optional dependency, used when there's no `FFMPEG` and no ffmpeg on the PATH.
|
|
25
|
+
|
|
26
|
+
## 0.1.7 (13 Nov 2026)
|
|
4
27
|
|
|
5
28
|
- **The clip catalogue, `trace-avatar-catalogue/1`** (`schemas/catalogue-1.json`, also at
|
|
6
29
|
https://traceavatar.com/schemas/catalogue-1.json): a public JSON file of a product's published videos, one entry per
|
package/README.md
CHANGED
|
@@ -155,6 +155,58 @@ frames move with the holds. GIFs from the same render keep the original timing.
|
|
|
155
155
|
`<out>.narration.txt`. `suggest --task narration` drafts spoken lines from the steps (nothing typed is sent) for a
|
|
156
156
|
person to edit and pass with `--script`.
|
|
157
157
|
|
|
158
|
+
## Campaigns
|
|
159
|
+
|
|
160
|
+
A product's marketing videos, in every look and shape, from one `campaign.json`:
|
|
161
|
+
|
|
162
|
+
```json
|
|
163
|
+
{
|
|
164
|
+
"product": "acme", "site": "https://acme.com", "narrator": "gateway",
|
|
165
|
+
"app": {
|
|
166
|
+
"name": "Acme", "url": "http://127.0.0.1:3000", "dir": "..", "start": ["npm", "run", "demo"], "ready": "/login",
|
|
167
|
+
"guides": "demo/guides.json", "storageState": "demo/storage-state.json",
|
|
168
|
+
"reset": { "post": "http://127.0.0.1:3001/demo/reset" }, "alias": "acme.com"
|
|
169
|
+
},
|
|
170
|
+
"looks": { "product": { "brand": "brands/acme.json" } },
|
|
171
|
+
"videos": [
|
|
172
|
+
{ "id": "intro", "kind": "intro", "guide": "send-your-first-invoice", "mode": "perform",
|
|
173
|
+
"shapes": ["16:9", "1:1", "9:16"], "voice": { "product": "scripts/intro.json" }, "polish": ["--title-card"],
|
|
174
|
+
"alt": "Acme sends a first invoice: the customer picked, two lines added, then Send." },
|
|
175
|
+
{ "id": "ad-paid", "kind": "ad", "director": "directors/ad-paid.mjs", "page": "/invoices",
|
|
176
|
+
"shapes": ["9:16", "1:1"], "voice": { "product": "scripts/ad-paid.json" }, "reset": { "start": "paid" },
|
|
177
|
+
"alt": "Acme ad: an invoice marked paid the moment the transfer lands." }
|
|
178
|
+
]
|
|
179
|
+
}
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
```bash
|
|
183
|
+
trace-avatar-render campaign check # every problem at once (guides, scripts' lines, looks …)
|
|
184
|
+
trace-avatar-render campaign make --start # start the app, make every render; or name video ids
|
|
185
|
+
trace-avatar-render campaign status # from another terminal: done, failed, what it's on now
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
- Each video is made per look. The desktop shapes (16:9, 1:1, 4:5) come from one capture, each on its own canvas,
|
|
189
|
+
with captions as a file; 9:16 is captured again at a phone's size with its captions burned in.
|
|
190
|
+
- A video is a **guide** (an id in `app.guides`, or a `.trace.json`) or a **director script**:
|
|
191
|
+
|
|
192
|
+
```js
|
|
193
|
+
export default async function (d) {
|
|
194
|
+
await d.card('Get paid the day you send it.'); // a card between scenes, spoken when narrated
|
|
195
|
+
await d.scene('Pick the customer, add two lines, send.', async () => {
|
|
196
|
+
await d.click(d.page.getByRole('button', { name: 'New invoice' })); // real mouse events; cursor drawn after
|
|
197
|
+
await d.type(d.page.getByLabel('Customer'), 'Ada Stores');
|
|
198
|
+
await d.read(600);
|
|
199
|
+
});
|
|
200
|
+
await d.skip(async () => { /* a long wait, cut to a jump */ });
|
|
201
|
+
}
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
Line *n* of a narration script is scene *n* (cards count). Narrated, the captions are the spoken lines.
|
|
205
|
+
- `app.reset` puts the app back before every video (the video's `reset` is the body), so a video made twice looks
|
|
206
|
+
the same. `app.alias` shows it under its public name, answered locally.
|
|
207
|
+
- Files go to `out/<product>/` with `made.json`, each render's `.scenes.json` (its words in order, for a
|
|
208
|
+
catalogue's `says`) and `progress.json`. A run stopped part way carries on; `--fresh` starts over.
|
|
209
|
+
|
|
158
210
|
## A clip catalogue
|
|
159
211
|
|
|
160
212
|
Published videos are listed in a **clip catalogue**: a public JSON file (`trace-avatar-catalogue/1`, schema in
|