demo-reel 0.4.2 → 0.5.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/README.md +50 -33
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +8 -3
- package/dist/commands/init.js.map +1 -1
- package/dist/schemas.d.ts +664 -1006
- package/dist/schemas.d.ts.map +1 -1
- package/dist/schemas.js +114 -20
- package/dist/schemas.js.map +1 -1
- package/dist/script/assembler.d.ts.map +1 -1
- package/dist/script/assembler.js +10 -17
- package/dist/script/assembler.js.map +1 -1
- package/package.json +18 -21
- package/src/commands/init.ts +8 -3
- package/src/index.ts +1 -1
- package/src/schemas.ts +149 -24
- package/src/script/assembler.ts +14 -22
package/README.md
CHANGED
|
@@ -54,39 +54,42 @@ await generate(
|
|
|
54
54
|
],
|
|
55
55
|
|
|
56
56
|
scenes: [
|
|
57
|
-
{ narration: "Welcome to our app. Let's create a new project.", stepIndex: 0, isIntro: true },
|
|
58
|
-
{ narration: "Fill in the details and click Create.", stepIndex: 2 },
|
|
59
|
-
],
|
|
60
|
-
|
|
61
|
-
steps: [
|
|
62
|
-
// Scene 1
|
|
63
|
-
{
|
|
64
|
-
action: "hover",
|
|
65
|
-
selector: { strategy: "testId", value: "new-project" },
|
|
66
|
-
delayAfterMs: 800,
|
|
67
|
-
},
|
|
68
|
-
{
|
|
69
|
-
action: "click",
|
|
70
|
-
selector: { strategy: "testId", value: "new-project" },
|
|
71
|
-
delayAfterMs: 1500,
|
|
72
|
-
},
|
|
73
|
-
|
|
74
|
-
// Scene 2
|
|
75
|
-
{
|
|
76
|
-
action: "type",
|
|
77
|
-
selector: { strategy: "id", value: "name" },
|
|
78
|
-
text: "My Project",
|
|
79
|
-
delayAfterMs: 500,
|
|
80
|
-
},
|
|
81
57
|
{
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
58
|
+
narration: "Welcome to our app. Let's create a new project.",
|
|
59
|
+
isIntro: true,
|
|
60
|
+
steps: [
|
|
61
|
+
{
|
|
62
|
+
action: "hover",
|
|
63
|
+
selector: { strategy: "testId", value: "new-project" },
|
|
64
|
+
delayAfterMs: 800,
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
action: "click",
|
|
68
|
+
selector: { strategy: "testId", value: "new-project" },
|
|
69
|
+
delayAfterMs: 1500,
|
|
70
|
+
},
|
|
71
|
+
],
|
|
85
72
|
},
|
|
86
73
|
{
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
74
|
+
narration: "Fill in the details and click Create.",
|
|
75
|
+
steps: [
|
|
76
|
+
{
|
|
77
|
+
action: "type",
|
|
78
|
+
selector: { strategy: "id", value: "name" },
|
|
79
|
+
text: "My Project",
|
|
80
|
+
delayAfterMs: 500,
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
action: "hover",
|
|
84
|
+
selector: { strategy: "custom", value: "button[type='submit']" },
|
|
85
|
+
delayAfterMs: 600,
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
action: "click",
|
|
89
|
+
selector: { strategy: "custom", value: "button[type='submit']" },
|
|
90
|
+
delayAfterMs: 2000,
|
|
91
|
+
},
|
|
92
|
+
],
|
|
90
93
|
},
|
|
91
94
|
],
|
|
92
95
|
},
|
|
@@ -225,17 +228,31 @@ Setup and cleanup run in tolerant mode — failed steps are skipped.
|
|
|
225
228
|
|
|
226
229
|
```typescript
|
|
227
230
|
scenes: [
|
|
228
|
-
{
|
|
229
|
-
|
|
231
|
+
{
|
|
232
|
+
narration: "Welcome to our app.",
|
|
233
|
+
isIntro: true,
|
|
234
|
+
steps: [
|
|
235
|
+
{ action: "goto", url: "https://myapp.com" },
|
|
236
|
+
{ action: "wait", ms: 1500 },
|
|
237
|
+
],
|
|
238
|
+
},
|
|
239
|
+
{
|
|
240
|
+
narration: "Let's create something.",
|
|
241
|
+
steps: [
|
|
242
|
+
{ action: "click", selector: { strategy: "id", value: "create" } },
|
|
243
|
+
],
|
|
244
|
+
},
|
|
230
245
|
],
|
|
231
246
|
```
|
|
232
247
|
|
|
233
248
|
- `narration` — voiceover text (also used for subtitles)
|
|
234
|
-
- `
|
|
249
|
+
- `steps` — steps that belong to this scene
|
|
235
250
|
- `isIntro` — marks the intro scene (used by presentation systems to skip context)
|
|
236
251
|
|
|
237
252
|
Generates `.srt`, `.vtt` (subtitles) and `.meta.json` (scene timestamps for interactive players).
|
|
238
253
|
|
|
254
|
+
> **Legacy compatibility:** You can also use the older format with a single top-level `steps` array and `scenes` referencing `stepIndex`. The two formats cannot be mixed.
|
|
255
|
+
|
|
239
256
|
### Steps
|
|
240
257
|
|
|
241
258
|
| Action | Description |
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../src/commands/init.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../src/commands/init.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AA4BzE,qBAAa,WAAY,YAAW,OAAO;IACzC,QAAQ,CAAC,IAAI,UAAU;IAEvB,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAGhC;IAEK,OAAO,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,QAAQ,EAAE,aAAa,EAAE,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAK5F;CACF"}
|
package/dist/commands/init.js
CHANGED
|
@@ -13,9 +13,14 @@ export default defineConfig({
|
|
|
13
13
|
typing: 'humanlike',
|
|
14
14
|
timing: 'normal',
|
|
15
15
|
|
|
16
|
-
|
|
17
|
-
{
|
|
18
|
-
|
|
16
|
+
scenes: [
|
|
17
|
+
{
|
|
18
|
+
narration: "Welcome to our example demo.",
|
|
19
|
+
steps: [
|
|
20
|
+
{ action: 'goto', url: 'https://example.com' },
|
|
21
|
+
{ action: 'wait', ms: 1000 },
|
|
22
|
+
],
|
|
23
|
+
},
|
|
19
24
|
],
|
|
20
25
|
});
|
|
21
26
|
`;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"init.js","sourceRoot":"","sources":["../../src/commands/init.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAG5B,MAAM,gBAAgB,GAAG
|
|
1
|
+
{"version":3,"file":"init.js","sourceRoot":"","sources":["../../src/commands/init.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAG5B,MAAM,gBAAgB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;CAwBxB,CAAC;AAEF,MAAM,OAAO,WAAW;IACb,IAAI,GAAG,MAAM,CAAC;IAEvB,QAAQ,CAAC,IAAc;QACrB,qCAAqC;QACrC,OAAO,IAAI,CAAC,MAAM,KAAK,CAAC,CAAC;IAC3B,CAAC;IAED,KAAK,CAAC,OAAO,CAAC,KAAe,EAAE,QAAuB,EAAE,GAAmB;QACzE,MAAM,QAAQ,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,EAAE,iBAAiB,CAAC,CAAC;QACpD,MAAM,GAAG,CAAC,EAAE,CAAC,SAAS,CAAC,QAAQ,EAAE,gBAAgB,EAAE,OAAO,CAAC,CAAC;QAC5D,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,WAAW,QAAQ,EAAE,CAAC,CAAC;QACvC,OAAO,CAAC,CAAC;IACX,CAAC;CACF"}
|