screenwright 0.1.44 → 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/dist/src/commands/compose.d.ts.map +1 -1
- package/dist/src/commands/compose.js +60 -41
- package/dist/src/commands/compose.js.map +1 -1
- package/dist/src/commands/preview.d.ts.map +1 -1
- package/dist/src/commands/preview.js +9 -12
- package/dist/src/commands/preview.js.map +1 -1
- package/dist/src/composition/DemoVideo.d.ts.map +1 -1
- package/dist/src/composition/DemoVideo.js +24 -78
- package/dist/src/composition/DemoVideo.js.map +1 -1
- package/dist/src/composition/frame-resolve.d.ts +37 -0
- package/dist/src/composition/frame-resolve.d.ts.map +1 -0
- package/dist/src/composition/frame-resolve.js +114 -0
- package/dist/src/composition/frame-resolve.js.map +1 -0
- package/dist/src/composition/remotion-root.d.ts.map +1 -1
- package/dist/src/composition/remotion-root.js +7 -14
- package/dist/src/composition/remotion-root.js.map +1 -1
- package/dist/src/composition/render.d.ts.map +1 -1
- package/dist/src/composition/render.js +2 -6
- package/dist/src/composition/render.js.map +1 -1
- package/dist/src/index.d.ts +1 -1
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/runtime/action-helpers.d.ts +15 -5
- package/dist/src/runtime/action-helpers.d.ts.map +1 -1
- package/dist/src/runtime/action-helpers.js +218 -60
- package/dist/src/runtime/action-helpers.js.map +1 -1
- package/dist/src/runtime/instrumented-page.d.ts +3 -2
- package/dist/src/runtime/instrumented-page.d.ts.map +1 -1
- package/dist/src/runtime/instrumented-page.js +105 -101
- package/dist/src/runtime/instrumented-page.js.map +1 -1
- package/dist/src/runtime/narration-preprocess.d.ts +30 -0
- package/dist/src/runtime/narration-preprocess.d.ts.map +1 -0
- package/dist/src/runtime/narration-preprocess.js +79 -0
- package/dist/src/runtime/narration-preprocess.js.map +1 -0
- package/dist/src/runtime/timeline-collector.d.ts +1 -7
- package/dist/src/runtime/timeline-collector.d.ts.map +1 -1
- package/dist/src/runtime/timeline-collector.js +2 -17
- package/dist/src/runtime/timeline-collector.js.map +1 -1
- package/dist/src/timeline/schema.d.ts +143 -162
- package/dist/src/timeline/schema.d.ts.map +1 -1
- package/dist/src/timeline/schema.js +12 -18
- package/dist/src/timeline/schema.js.map +1 -1
- package/dist/src/timeline/types.d.ts +15 -18
- package/dist/src/timeline/types.d.ts.map +1 -1
- package/dist/src/timeline/types.js.map +1 -1
- package/dist/src/version.d.ts +1 -1
- package/dist/src/version.d.ts.map +1 -1
- package/dist/src/version.js +1 -1
- package/dist/src/version.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/skill/SKILL.md +3 -3
- package/dist/src/composition/SceneSlide.d.ts +0 -12
- package/dist/src/composition/SceneSlide.d.ts.map +0 -1
- package/dist/src/composition/SceneSlide.js +0 -71
- package/dist/src/composition/SceneSlide.js.map +0 -1
- package/dist/src/composition/frame-lookup.d.ts +0 -8
- package/dist/src/composition/frame-lookup.d.ts.map +0 -1
- package/dist/src/composition/frame-lookup.js +0 -26
- package/dist/src/composition/frame-lookup.js.map +0 -1
- package/dist/src/composition/time-remap.d.ts +0 -83
- package/dist/src/composition/time-remap.d.ts.map +0 -1
- package/dist/src/composition/time-remap.js +0 -200
- package/dist/src/composition/time-remap.js.map +0 -1
- package/dist/src/voiceover/narration-timing.d.ts +0 -18
- package/dist/src/voiceover/narration-timing.d.ts.map +0 -1
- package/dist/src/voiceover/narration-timing.js +0 -40
- package/dist/src/voiceover/narration-timing.js.map +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
export declare const timelineSchema: z.ZodEffects<z.ZodObject<{
|
|
3
|
-
version: z.ZodLiteral<
|
|
4
|
-
metadata: z.
|
|
3
|
+
version: z.ZodLiteral<2>;
|
|
4
|
+
metadata: z.ZodObject<{
|
|
5
5
|
testFile: z.ZodString;
|
|
6
6
|
scenarioFile: z.ZodString;
|
|
7
7
|
recordedAt: z.ZodString;
|
|
@@ -15,47 +15,42 @@ export declare const timelineSchema: z.ZodEffects<z.ZodObject<{
|
|
|
15
15
|
width: number;
|
|
16
16
|
height: number;
|
|
17
17
|
}>;
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
frameManifest: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
21
|
-
timestampMs: z.ZodNumber;
|
|
18
|
+
frameManifest: z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
19
|
+
type: z.ZodLiteral<"frame">;
|
|
22
20
|
file: z.ZodString;
|
|
23
21
|
}, "strip", z.ZodTypeAny, {
|
|
24
|
-
|
|
22
|
+
type: "frame";
|
|
25
23
|
file: string;
|
|
26
24
|
}, {
|
|
27
|
-
|
|
25
|
+
type: "frame";
|
|
28
26
|
file: string;
|
|
29
|
-
}>,
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
width: number;
|
|
36
|
-
height: number;
|
|
37
|
-
};
|
|
38
|
-
videoDurationMs: number;
|
|
39
|
-
videoFile?: string | undefined;
|
|
40
|
-
frameManifest?: {
|
|
41
|
-
timestampMs: number;
|
|
27
|
+
}>, z.ZodObject<{
|
|
28
|
+
type: z.ZodLiteral<"hold">;
|
|
29
|
+
file: z.ZodString;
|
|
30
|
+
count: z.ZodNumber;
|
|
31
|
+
}, "strip", z.ZodTypeAny, {
|
|
32
|
+
type: "hold";
|
|
42
33
|
file: string;
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
scenarioFile: string;
|
|
47
|
-
recordedAt: string;
|
|
48
|
-
viewport: {
|
|
49
|
-
width: number;
|
|
50
|
-
height: number;
|
|
51
|
-
};
|
|
52
|
-
videoDurationMs: number;
|
|
53
|
-
videoFile?: string | undefined;
|
|
54
|
-
frameManifest?: {
|
|
55
|
-
timestampMs: number;
|
|
34
|
+
count: number;
|
|
35
|
+
}, {
|
|
36
|
+
type: "hold";
|
|
56
37
|
file: string;
|
|
57
|
-
|
|
58
|
-
|
|
38
|
+
count: number;
|
|
39
|
+
}>]>, "many">;
|
|
40
|
+
transitionMarkers: z.ZodArray<z.ZodObject<{
|
|
41
|
+
afterEntryIndex: z.ZodNumber;
|
|
42
|
+
transition: z.ZodEnum<["fade", "wipe", "slide-up", "slide-left", "zoom", "doorway", "swap", "cube"]>;
|
|
43
|
+
durationFrames: z.ZodNumber;
|
|
44
|
+
}, "strip", z.ZodTypeAny, {
|
|
45
|
+
afterEntryIndex: number;
|
|
46
|
+
transition: "fade" | "wipe" | "slide-up" | "slide-left" | "zoom" | "doorway" | "swap" | "cube";
|
|
47
|
+
durationFrames: number;
|
|
48
|
+
}, {
|
|
49
|
+
afterEntryIndex: number;
|
|
50
|
+
transition: "fade" | "wipe" | "slide-up" | "slide-left" | "zoom" | "doorway" | "swap" | "cube";
|
|
51
|
+
durationFrames: number;
|
|
52
|
+
}>, "many">;
|
|
53
|
+
}, "strip", z.ZodTypeAny, {
|
|
59
54
|
testFile: string;
|
|
60
55
|
scenarioFile: string;
|
|
61
56
|
recordedAt: string;
|
|
@@ -63,12 +58,19 @@ export declare const timelineSchema: z.ZodEffects<z.ZodObject<{
|
|
|
63
58
|
width: number;
|
|
64
59
|
height: number;
|
|
65
60
|
};
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
frameManifest?: {
|
|
69
|
-
timestampMs: number;
|
|
61
|
+
frameManifest: ({
|
|
62
|
+
type: "frame";
|
|
70
63
|
file: string;
|
|
71
|
-
}
|
|
64
|
+
} | {
|
|
65
|
+
type: "hold";
|
|
66
|
+
file: string;
|
|
67
|
+
count: number;
|
|
68
|
+
})[];
|
|
69
|
+
transitionMarkers: {
|
|
70
|
+
afterEntryIndex: number;
|
|
71
|
+
transition: "fade" | "wipe" | "slide-up" | "slide-left" | "zoom" | "doorway" | "swap" | "cube";
|
|
72
|
+
durationFrames: number;
|
|
73
|
+
}[];
|
|
72
74
|
}, {
|
|
73
75
|
testFile: string;
|
|
74
76
|
scenarioFile: string;
|
|
@@ -77,12 +79,19 @@ export declare const timelineSchema: z.ZodEffects<z.ZodObject<{
|
|
|
77
79
|
width: number;
|
|
78
80
|
height: number;
|
|
79
81
|
};
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
82
|
+
frameManifest: ({
|
|
83
|
+
type: "frame";
|
|
84
|
+
file: string;
|
|
85
|
+
} | {
|
|
86
|
+
type: "hold";
|
|
84
87
|
file: string;
|
|
85
|
-
|
|
88
|
+
count: number;
|
|
89
|
+
})[];
|
|
90
|
+
transitionMarkers: {
|
|
91
|
+
afterEntryIndex: number;
|
|
92
|
+
transition: "fade" | "wipe" | "slide-up" | "slide-left" | "zoom" | "doorway" | "swap" | "cube";
|
|
93
|
+
durationFrames: number;
|
|
94
|
+
}[];
|
|
86
95
|
}>;
|
|
87
96
|
events: z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
88
97
|
type: z.ZodLiteral<"scene">;
|
|
@@ -111,8 +120,8 @@ export declare const timelineSchema: z.ZodEffects<z.ZodObject<{
|
|
|
111
120
|
}>>;
|
|
112
121
|
}, "strip", z.ZodTypeAny, {
|
|
113
122
|
type: "scene";
|
|
114
|
-
timestampMs: number;
|
|
115
123
|
id: string;
|
|
124
|
+
timestampMs: number;
|
|
116
125
|
title: string;
|
|
117
126
|
description?: string | undefined;
|
|
118
127
|
slide?: {
|
|
@@ -124,8 +133,8 @@ export declare const timelineSchema: z.ZodEffects<z.ZodObject<{
|
|
|
124
133
|
} | undefined;
|
|
125
134
|
}, {
|
|
126
135
|
type: "scene";
|
|
127
|
-
timestampMs: number;
|
|
128
136
|
id: string;
|
|
137
|
+
timestampMs: number;
|
|
129
138
|
title: string;
|
|
130
139
|
description?: string | undefined;
|
|
131
140
|
slide?: {
|
|
@@ -160,12 +169,11 @@ export declare const timelineSchema: z.ZodEffects<z.ZodObject<{
|
|
|
160
169
|
y: number;
|
|
161
170
|
}>>;
|
|
162
171
|
settledAtMs: z.ZodOptional<z.ZodNumber>;
|
|
163
|
-
settledSnapshot: z.ZodOptional<z.ZodString>;
|
|
164
172
|
}, "strip", z.ZodTypeAny, {
|
|
165
173
|
type: "action";
|
|
166
|
-
action: "fill" | "click" | "hover" | "select" | "press" | "navigate";
|
|
167
|
-
timestampMs: number;
|
|
168
174
|
id: string;
|
|
175
|
+
timestampMs: number;
|
|
176
|
+
action: "fill" | "click" | "hover" | "select" | "press" | "navigate";
|
|
169
177
|
selector: string;
|
|
170
178
|
durationMs: number;
|
|
171
179
|
boundingBox: {
|
|
@@ -176,12 +184,11 @@ export declare const timelineSchema: z.ZodEffects<z.ZodObject<{
|
|
|
176
184
|
} | null;
|
|
177
185
|
value?: string | undefined;
|
|
178
186
|
settledAtMs?: number | undefined;
|
|
179
|
-
settledSnapshot?: string | undefined;
|
|
180
187
|
}, {
|
|
181
188
|
type: "action";
|
|
182
|
-
action: "fill" | "click" | "hover" | "select" | "press" | "navigate";
|
|
183
|
-
timestampMs: number;
|
|
184
189
|
id: string;
|
|
190
|
+
timestampMs: number;
|
|
191
|
+
action: "fill" | "click" | "hover" | "select" | "press" | "navigate";
|
|
185
192
|
selector: string;
|
|
186
193
|
durationMs: number;
|
|
187
194
|
boundingBox: {
|
|
@@ -192,7 +199,6 @@ export declare const timelineSchema: z.ZodEffects<z.ZodObject<{
|
|
|
192
199
|
} | null;
|
|
193
200
|
value?: string | undefined;
|
|
194
201
|
settledAtMs?: number | undefined;
|
|
195
|
-
settledSnapshot?: string | undefined;
|
|
196
202
|
}>, z.ZodObject<{
|
|
197
203
|
type: z.ZodLiteral<"cursor_target">;
|
|
198
204
|
id: z.ZodString;
|
|
@@ -205,8 +211,8 @@ export declare const timelineSchema: z.ZodEffects<z.ZodObject<{
|
|
|
205
211
|
easing: z.ZodLiteral<"bezier">;
|
|
206
212
|
}, "strip", z.ZodTypeAny, {
|
|
207
213
|
type: "cursor_target";
|
|
208
|
-
timestampMs: number;
|
|
209
214
|
id: string;
|
|
215
|
+
timestampMs: number;
|
|
210
216
|
fromX: number;
|
|
211
217
|
fromY: number;
|
|
212
218
|
toX: number;
|
|
@@ -215,8 +221,8 @@ export declare const timelineSchema: z.ZodEffects<z.ZodObject<{
|
|
|
215
221
|
easing: "bezier";
|
|
216
222
|
}, {
|
|
217
223
|
type: "cursor_target";
|
|
218
|
-
timestampMs: number;
|
|
219
224
|
id: string;
|
|
225
|
+
timestampMs: number;
|
|
220
226
|
fromX: number;
|
|
221
227
|
fromY: number;
|
|
222
228
|
toX: number;
|
|
@@ -232,15 +238,15 @@ export declare const timelineSchema: z.ZodEffects<z.ZodObject<{
|
|
|
232
238
|
audioFile: z.ZodOptional<z.ZodString>;
|
|
233
239
|
}, "strip", z.ZodTypeAny, {
|
|
234
240
|
type: "narration";
|
|
235
|
-
timestampMs: number;
|
|
236
241
|
id: string;
|
|
242
|
+
timestampMs: number;
|
|
237
243
|
text: string;
|
|
238
244
|
audioDurationMs?: number | undefined;
|
|
239
245
|
audioFile?: string | undefined;
|
|
240
246
|
}, {
|
|
241
247
|
type: "narration";
|
|
242
|
-
timestampMs: number;
|
|
243
248
|
id: string;
|
|
249
|
+
timestampMs: number;
|
|
244
250
|
text: string;
|
|
245
251
|
audioDurationMs?: number | undefined;
|
|
246
252
|
audioFile?: string | undefined;
|
|
@@ -252,40 +258,19 @@ export declare const timelineSchema: z.ZodEffects<z.ZodObject<{
|
|
|
252
258
|
reason: z.ZodEnum<["pacing", "narration_sync", "page_load"]>;
|
|
253
259
|
}, "strip", z.ZodTypeAny, {
|
|
254
260
|
type: "wait";
|
|
255
|
-
timestampMs: number;
|
|
256
261
|
id: string;
|
|
262
|
+
timestampMs: number;
|
|
257
263
|
durationMs: number;
|
|
258
264
|
reason: "pacing" | "narration_sync" | "page_load";
|
|
259
265
|
}, {
|
|
260
266
|
type: "wait";
|
|
261
|
-
timestampMs: number;
|
|
262
|
-
id: string;
|
|
263
|
-
durationMs: number;
|
|
264
|
-
reason: "pacing" | "narration_sync" | "page_load";
|
|
265
|
-
}>, z.ZodObject<{
|
|
266
|
-
type: z.ZodLiteral<"transition">;
|
|
267
|
-
id: z.ZodString;
|
|
268
|
-
timestampMs: z.ZodNumber;
|
|
269
|
-
transition: z.ZodEnum<["fade", "wipe", "slide-up", "slide-left", "zoom", "doorway", "swap", "cube"]>;
|
|
270
|
-
durationMs: z.ZodNumber;
|
|
271
|
-
pageSnapshot: z.ZodOptional<z.ZodString>;
|
|
272
|
-
}, "strip", z.ZodTypeAny, {
|
|
273
|
-
type: "transition";
|
|
274
|
-
transition: "fade" | "wipe" | "slide-up" | "slide-left" | "zoom" | "doorway" | "swap" | "cube";
|
|
275
|
-
timestampMs: number;
|
|
276
267
|
id: string;
|
|
277
|
-
durationMs: number;
|
|
278
|
-
pageSnapshot?: string | undefined;
|
|
279
|
-
}, {
|
|
280
|
-
type: "transition";
|
|
281
|
-
transition: "fade" | "wipe" | "slide-up" | "slide-left" | "zoom" | "doorway" | "swap" | "cube";
|
|
282
268
|
timestampMs: number;
|
|
283
|
-
id: string;
|
|
284
269
|
durationMs: number;
|
|
285
|
-
|
|
270
|
+
reason: "pacing" | "narration_sync" | "page_load";
|
|
286
271
|
}>]>, "many">;
|
|
287
272
|
}, "strip", z.ZodTypeAny, {
|
|
288
|
-
version:
|
|
273
|
+
version: 2;
|
|
289
274
|
metadata: {
|
|
290
275
|
testFile: string;
|
|
291
276
|
scenarioFile: string;
|
|
@@ -294,17 +279,24 @@ export declare const timelineSchema: z.ZodEffects<z.ZodObject<{
|
|
|
294
279
|
width: number;
|
|
295
280
|
height: number;
|
|
296
281
|
};
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
frameManifest?: {
|
|
300
|
-
timestampMs: number;
|
|
282
|
+
frameManifest: ({
|
|
283
|
+
type: "frame";
|
|
301
284
|
file: string;
|
|
302
|
-
}
|
|
285
|
+
} | {
|
|
286
|
+
type: "hold";
|
|
287
|
+
file: string;
|
|
288
|
+
count: number;
|
|
289
|
+
})[];
|
|
290
|
+
transitionMarkers: {
|
|
291
|
+
afterEntryIndex: number;
|
|
292
|
+
transition: "fade" | "wipe" | "slide-up" | "slide-left" | "zoom" | "doorway" | "swap" | "cube";
|
|
293
|
+
durationFrames: number;
|
|
294
|
+
}[];
|
|
303
295
|
};
|
|
304
296
|
events: ({
|
|
305
297
|
type: "scene";
|
|
306
|
-
timestampMs: number;
|
|
307
298
|
id: string;
|
|
299
|
+
timestampMs: number;
|
|
308
300
|
title: string;
|
|
309
301
|
description?: string | undefined;
|
|
310
302
|
slide?: {
|
|
@@ -316,9 +308,9 @@ export declare const timelineSchema: z.ZodEffects<z.ZodObject<{
|
|
|
316
308
|
} | undefined;
|
|
317
309
|
} | {
|
|
318
310
|
type: "action";
|
|
319
|
-
action: "fill" | "click" | "hover" | "select" | "press" | "navigate";
|
|
320
|
-
timestampMs: number;
|
|
321
311
|
id: string;
|
|
312
|
+
timestampMs: number;
|
|
313
|
+
action: "fill" | "click" | "hover" | "select" | "press" | "navigate";
|
|
322
314
|
selector: string;
|
|
323
315
|
durationMs: number;
|
|
324
316
|
boundingBox: {
|
|
@@ -329,11 +321,10 @@ export declare const timelineSchema: z.ZodEffects<z.ZodObject<{
|
|
|
329
321
|
} | null;
|
|
330
322
|
value?: string | undefined;
|
|
331
323
|
settledAtMs?: number | undefined;
|
|
332
|
-
settledSnapshot?: string | undefined;
|
|
333
324
|
} | {
|
|
334
325
|
type: "cursor_target";
|
|
335
|
-
timestampMs: number;
|
|
336
326
|
id: string;
|
|
327
|
+
timestampMs: number;
|
|
337
328
|
fromX: number;
|
|
338
329
|
fromY: number;
|
|
339
330
|
toX: number;
|
|
@@ -342,27 +333,20 @@ export declare const timelineSchema: z.ZodEffects<z.ZodObject<{
|
|
|
342
333
|
easing: "bezier";
|
|
343
334
|
} | {
|
|
344
335
|
type: "narration";
|
|
345
|
-
timestampMs: number;
|
|
346
336
|
id: string;
|
|
337
|
+
timestampMs: number;
|
|
347
338
|
text: string;
|
|
348
339
|
audioDurationMs?: number | undefined;
|
|
349
340
|
audioFile?: string | undefined;
|
|
350
341
|
} | {
|
|
351
342
|
type: "wait";
|
|
352
|
-
timestampMs: number;
|
|
353
343
|
id: string;
|
|
354
|
-
durationMs: number;
|
|
355
|
-
reason: "pacing" | "narration_sync" | "page_load";
|
|
356
|
-
} | {
|
|
357
|
-
type: "transition";
|
|
358
|
-
transition: "fade" | "wipe" | "slide-up" | "slide-left" | "zoom" | "doorway" | "swap" | "cube";
|
|
359
344
|
timestampMs: number;
|
|
360
|
-
id: string;
|
|
361
345
|
durationMs: number;
|
|
362
|
-
|
|
346
|
+
reason: "pacing" | "narration_sync" | "page_load";
|
|
363
347
|
})[];
|
|
364
348
|
}, {
|
|
365
|
-
version:
|
|
349
|
+
version: 2;
|
|
366
350
|
metadata: {
|
|
367
351
|
testFile: string;
|
|
368
352
|
scenarioFile: string;
|
|
@@ -371,17 +355,24 @@ export declare const timelineSchema: z.ZodEffects<z.ZodObject<{
|
|
|
371
355
|
width: number;
|
|
372
356
|
height: number;
|
|
373
357
|
};
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
358
|
+
frameManifest: ({
|
|
359
|
+
type: "frame";
|
|
360
|
+
file: string;
|
|
361
|
+
} | {
|
|
362
|
+
type: "hold";
|
|
378
363
|
file: string;
|
|
379
|
-
|
|
364
|
+
count: number;
|
|
365
|
+
})[];
|
|
366
|
+
transitionMarkers: {
|
|
367
|
+
afterEntryIndex: number;
|
|
368
|
+
transition: "fade" | "wipe" | "slide-up" | "slide-left" | "zoom" | "doorway" | "swap" | "cube";
|
|
369
|
+
durationFrames: number;
|
|
370
|
+
}[];
|
|
380
371
|
};
|
|
381
372
|
events: ({
|
|
382
373
|
type: "scene";
|
|
383
|
-
timestampMs: number;
|
|
384
374
|
id: string;
|
|
375
|
+
timestampMs: number;
|
|
385
376
|
title: string;
|
|
386
377
|
description?: string | undefined;
|
|
387
378
|
slide?: {
|
|
@@ -393,9 +384,9 @@ export declare const timelineSchema: z.ZodEffects<z.ZodObject<{
|
|
|
393
384
|
} | undefined;
|
|
394
385
|
} | {
|
|
395
386
|
type: "action";
|
|
396
|
-
action: "fill" | "click" | "hover" | "select" | "press" | "navigate";
|
|
397
|
-
timestampMs: number;
|
|
398
387
|
id: string;
|
|
388
|
+
timestampMs: number;
|
|
389
|
+
action: "fill" | "click" | "hover" | "select" | "press" | "navigate";
|
|
399
390
|
selector: string;
|
|
400
391
|
durationMs: number;
|
|
401
392
|
boundingBox: {
|
|
@@ -406,11 +397,10 @@ export declare const timelineSchema: z.ZodEffects<z.ZodObject<{
|
|
|
406
397
|
} | null;
|
|
407
398
|
value?: string | undefined;
|
|
408
399
|
settledAtMs?: number | undefined;
|
|
409
|
-
settledSnapshot?: string | undefined;
|
|
410
400
|
} | {
|
|
411
401
|
type: "cursor_target";
|
|
412
|
-
timestampMs: number;
|
|
413
402
|
id: string;
|
|
403
|
+
timestampMs: number;
|
|
414
404
|
fromX: number;
|
|
415
405
|
fromY: number;
|
|
416
406
|
toX: number;
|
|
@@ -419,27 +409,20 @@ export declare const timelineSchema: z.ZodEffects<z.ZodObject<{
|
|
|
419
409
|
easing: "bezier";
|
|
420
410
|
} | {
|
|
421
411
|
type: "narration";
|
|
422
|
-
timestampMs: number;
|
|
423
412
|
id: string;
|
|
413
|
+
timestampMs: number;
|
|
424
414
|
text: string;
|
|
425
415
|
audioDurationMs?: number | undefined;
|
|
426
416
|
audioFile?: string | undefined;
|
|
427
417
|
} | {
|
|
428
418
|
type: "wait";
|
|
429
|
-
timestampMs: number;
|
|
430
419
|
id: string;
|
|
431
|
-
durationMs: number;
|
|
432
|
-
reason: "pacing" | "narration_sync" | "page_load";
|
|
433
|
-
} | {
|
|
434
|
-
type: "transition";
|
|
435
|
-
transition: "fade" | "wipe" | "slide-up" | "slide-left" | "zoom" | "doorway" | "swap" | "cube";
|
|
436
420
|
timestampMs: number;
|
|
437
|
-
id: string;
|
|
438
421
|
durationMs: number;
|
|
439
|
-
|
|
422
|
+
reason: "pacing" | "narration_sync" | "page_load";
|
|
440
423
|
})[];
|
|
441
424
|
}>, {
|
|
442
|
-
version:
|
|
425
|
+
version: 2;
|
|
443
426
|
metadata: {
|
|
444
427
|
testFile: string;
|
|
445
428
|
scenarioFile: string;
|
|
@@ -448,17 +431,24 @@ export declare const timelineSchema: z.ZodEffects<z.ZodObject<{
|
|
|
448
431
|
width: number;
|
|
449
432
|
height: number;
|
|
450
433
|
};
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
frameManifest?: {
|
|
454
|
-
timestampMs: number;
|
|
434
|
+
frameManifest: ({
|
|
435
|
+
type: "frame";
|
|
455
436
|
file: string;
|
|
456
|
-
}
|
|
437
|
+
} | {
|
|
438
|
+
type: "hold";
|
|
439
|
+
file: string;
|
|
440
|
+
count: number;
|
|
441
|
+
})[];
|
|
442
|
+
transitionMarkers: {
|
|
443
|
+
afterEntryIndex: number;
|
|
444
|
+
transition: "fade" | "wipe" | "slide-up" | "slide-left" | "zoom" | "doorway" | "swap" | "cube";
|
|
445
|
+
durationFrames: number;
|
|
446
|
+
}[];
|
|
457
447
|
};
|
|
458
448
|
events: ({
|
|
459
449
|
type: "scene";
|
|
460
|
-
timestampMs: number;
|
|
461
450
|
id: string;
|
|
451
|
+
timestampMs: number;
|
|
462
452
|
title: string;
|
|
463
453
|
description?: string | undefined;
|
|
464
454
|
slide?: {
|
|
@@ -470,9 +460,9 @@ export declare const timelineSchema: z.ZodEffects<z.ZodObject<{
|
|
|
470
460
|
} | undefined;
|
|
471
461
|
} | {
|
|
472
462
|
type: "action";
|
|
473
|
-
action: "fill" | "click" | "hover" | "select" | "press" | "navigate";
|
|
474
|
-
timestampMs: number;
|
|
475
463
|
id: string;
|
|
464
|
+
timestampMs: number;
|
|
465
|
+
action: "fill" | "click" | "hover" | "select" | "press" | "navigate";
|
|
476
466
|
selector: string;
|
|
477
467
|
durationMs: number;
|
|
478
468
|
boundingBox: {
|
|
@@ -483,11 +473,10 @@ export declare const timelineSchema: z.ZodEffects<z.ZodObject<{
|
|
|
483
473
|
} | null;
|
|
484
474
|
value?: string | undefined;
|
|
485
475
|
settledAtMs?: number | undefined;
|
|
486
|
-
settledSnapshot?: string | undefined;
|
|
487
476
|
} | {
|
|
488
477
|
type: "cursor_target";
|
|
489
|
-
timestampMs: number;
|
|
490
478
|
id: string;
|
|
479
|
+
timestampMs: number;
|
|
491
480
|
fromX: number;
|
|
492
481
|
fromY: number;
|
|
493
482
|
toX: number;
|
|
@@ -496,27 +485,20 @@ export declare const timelineSchema: z.ZodEffects<z.ZodObject<{
|
|
|
496
485
|
easing: "bezier";
|
|
497
486
|
} | {
|
|
498
487
|
type: "narration";
|
|
499
|
-
timestampMs: number;
|
|
500
488
|
id: string;
|
|
489
|
+
timestampMs: number;
|
|
501
490
|
text: string;
|
|
502
491
|
audioDurationMs?: number | undefined;
|
|
503
492
|
audioFile?: string | undefined;
|
|
504
493
|
} | {
|
|
505
494
|
type: "wait";
|
|
506
|
-
timestampMs: number;
|
|
507
495
|
id: string;
|
|
508
|
-
durationMs: number;
|
|
509
|
-
reason: "pacing" | "narration_sync" | "page_load";
|
|
510
|
-
} | {
|
|
511
|
-
type: "transition";
|
|
512
|
-
transition: "fade" | "wipe" | "slide-up" | "slide-left" | "zoom" | "doorway" | "swap" | "cube";
|
|
513
496
|
timestampMs: number;
|
|
514
|
-
id: string;
|
|
515
497
|
durationMs: number;
|
|
516
|
-
|
|
498
|
+
reason: "pacing" | "narration_sync" | "page_load";
|
|
517
499
|
})[];
|
|
518
500
|
}, {
|
|
519
|
-
version:
|
|
501
|
+
version: 2;
|
|
520
502
|
metadata: {
|
|
521
503
|
testFile: string;
|
|
522
504
|
scenarioFile: string;
|
|
@@ -525,17 +507,24 @@ export declare const timelineSchema: z.ZodEffects<z.ZodObject<{
|
|
|
525
507
|
width: number;
|
|
526
508
|
height: number;
|
|
527
509
|
};
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
510
|
+
frameManifest: ({
|
|
511
|
+
type: "frame";
|
|
512
|
+
file: string;
|
|
513
|
+
} | {
|
|
514
|
+
type: "hold";
|
|
532
515
|
file: string;
|
|
533
|
-
|
|
516
|
+
count: number;
|
|
517
|
+
})[];
|
|
518
|
+
transitionMarkers: {
|
|
519
|
+
afterEntryIndex: number;
|
|
520
|
+
transition: "fade" | "wipe" | "slide-up" | "slide-left" | "zoom" | "doorway" | "swap" | "cube";
|
|
521
|
+
durationFrames: number;
|
|
522
|
+
}[];
|
|
534
523
|
};
|
|
535
524
|
events: ({
|
|
536
525
|
type: "scene";
|
|
537
|
-
timestampMs: number;
|
|
538
526
|
id: string;
|
|
527
|
+
timestampMs: number;
|
|
539
528
|
title: string;
|
|
540
529
|
description?: string | undefined;
|
|
541
530
|
slide?: {
|
|
@@ -547,9 +536,9 @@ export declare const timelineSchema: z.ZodEffects<z.ZodObject<{
|
|
|
547
536
|
} | undefined;
|
|
548
537
|
} | {
|
|
549
538
|
type: "action";
|
|
550
|
-
action: "fill" | "click" | "hover" | "select" | "press" | "navigate";
|
|
551
|
-
timestampMs: number;
|
|
552
539
|
id: string;
|
|
540
|
+
timestampMs: number;
|
|
541
|
+
action: "fill" | "click" | "hover" | "select" | "press" | "navigate";
|
|
553
542
|
selector: string;
|
|
554
543
|
durationMs: number;
|
|
555
544
|
boundingBox: {
|
|
@@ -560,11 +549,10 @@ export declare const timelineSchema: z.ZodEffects<z.ZodObject<{
|
|
|
560
549
|
} | null;
|
|
561
550
|
value?: string | undefined;
|
|
562
551
|
settledAtMs?: number | undefined;
|
|
563
|
-
settledSnapshot?: string | undefined;
|
|
564
552
|
} | {
|
|
565
553
|
type: "cursor_target";
|
|
566
|
-
timestampMs: number;
|
|
567
554
|
id: string;
|
|
555
|
+
timestampMs: number;
|
|
568
556
|
fromX: number;
|
|
569
557
|
fromY: number;
|
|
570
558
|
toX: number;
|
|
@@ -573,24 +561,17 @@ export declare const timelineSchema: z.ZodEffects<z.ZodObject<{
|
|
|
573
561
|
easing: "bezier";
|
|
574
562
|
} | {
|
|
575
563
|
type: "narration";
|
|
576
|
-
timestampMs: number;
|
|
577
564
|
id: string;
|
|
565
|
+
timestampMs: number;
|
|
578
566
|
text: string;
|
|
579
567
|
audioDurationMs?: number | undefined;
|
|
580
568
|
audioFile?: string | undefined;
|
|
581
569
|
} | {
|
|
582
570
|
type: "wait";
|
|
583
|
-
timestampMs: number;
|
|
584
571
|
id: string;
|
|
585
|
-
durationMs: number;
|
|
586
|
-
reason: "pacing" | "narration_sync" | "page_load";
|
|
587
|
-
} | {
|
|
588
|
-
type: "transition";
|
|
589
|
-
transition: "fade" | "wipe" | "slide-up" | "slide-left" | "zoom" | "doorway" | "swap" | "cube";
|
|
590
572
|
timestampMs: number;
|
|
591
|
-
id: string;
|
|
592
573
|
durationMs: number;
|
|
593
|
-
|
|
574
|
+
reason: "pacing" | "narration_sync" | "page_load";
|
|
594
575
|
})[];
|
|
595
576
|
}>;
|
|
596
577
|
export type ValidatedTimeline = z.infer<typeof timelineSchema>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../src/timeline/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../src/timeline/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAqFxB,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAoB1B,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC"}
|
|
@@ -30,7 +30,6 @@ const actionEventSchema = z.object({
|
|
|
30
30
|
height: z.number().positive(),
|
|
31
31
|
}).nullable(),
|
|
32
32
|
settledAtMs: z.number().nonnegative().optional(),
|
|
33
|
-
settledSnapshot: z.string().optional(),
|
|
34
33
|
});
|
|
35
34
|
const cursorTargetEventSchema = z.object({
|
|
36
35
|
type: z.literal('cursor_target'),
|
|
@@ -58,28 +57,24 @@ const waitEventSchema = z.object({
|
|
|
58
57
|
durationMs: z.number().positive(),
|
|
59
58
|
reason: z.enum(['pacing', 'narration_sync', 'page_load']),
|
|
60
59
|
});
|
|
61
|
-
const transitionEventSchema = z.object({
|
|
62
|
-
type: z.literal('transition'),
|
|
63
|
-
id: z.string(),
|
|
64
|
-
timestampMs: z.number().nonnegative(),
|
|
65
|
-
transition: z.enum(transitionTypes),
|
|
66
|
-
durationMs: z.number().positive(),
|
|
67
|
-
pageSnapshot: z.string().optional(),
|
|
68
|
-
});
|
|
69
60
|
const timelineEventSchema = z.discriminatedUnion('type', [
|
|
70
61
|
sceneEventSchema,
|
|
71
62
|
actionEventSchema,
|
|
72
63
|
cursorTargetEventSchema,
|
|
73
64
|
narrationEventSchema,
|
|
74
65
|
waitEventSchema,
|
|
75
|
-
transitionEventSchema,
|
|
76
66
|
]);
|
|
77
|
-
const
|
|
78
|
-
|
|
79
|
-
file: z.string(),
|
|
67
|
+
const manifestEntrySchema = z.discriminatedUnion('type', [
|
|
68
|
+
z.object({ type: z.literal('frame'), file: z.string() }),
|
|
69
|
+
z.object({ type: z.literal('hold'), file: z.string(), count: z.number().int().positive() }),
|
|
70
|
+
]);
|
|
71
|
+
const transitionMarkerSchema = z.object({
|
|
72
|
+
afterEntryIndex: z.number().int().nonnegative(),
|
|
73
|
+
transition: z.enum(transitionTypes),
|
|
74
|
+
durationFrames: z.number().int().positive(),
|
|
80
75
|
});
|
|
81
76
|
export const timelineSchema = z.object({
|
|
82
|
-
version: z.literal(
|
|
77
|
+
version: z.literal(2),
|
|
83
78
|
metadata: z.object({
|
|
84
79
|
testFile: z.string(),
|
|
85
80
|
scenarioFile: z.string(),
|
|
@@ -88,10 +83,9 @@ export const timelineSchema = z.object({
|
|
|
88
83
|
width: z.number().int().positive(),
|
|
89
84
|
height: z.number().int().positive(),
|
|
90
85
|
}),
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
}).refine(m => (m.videoFile && m.videoFile.length > 0) || (m.frameManifest && m.frameManifest.length > 0), { message: 'metadata must have either videoFile or a non-empty frameManifest' }),
|
|
86
|
+
frameManifest: z.array(manifestEntrySchema).min(1),
|
|
87
|
+
transitionMarkers: z.array(transitionMarkerSchema),
|
|
88
|
+
}),
|
|
95
89
|
events: z.array(timelineEventSchema),
|
|
96
90
|
}).refine(t => t.events.every(e => {
|
|
97
91
|
if (e.type !== 'action')
|