recordable 0.1.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.
Files changed (140) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +303 -0
  3. package/dist/actions.d.ts +140 -0
  4. package/dist/actions.d.ts.map +1 -0
  5. package/dist/actions.js +184 -0
  6. package/dist/actions.js.map +1 -0
  7. package/dist/audio/track.d.ts +45 -0
  8. package/dist/audio/track.d.ts.map +1 -0
  9. package/dist/audio/track.js +61 -0
  10. package/dist/audio/track.js.map +1 -0
  11. package/dist/browser/cursor.d.ts +33 -0
  12. package/dist/browser/cursor.d.ts.map +1 -0
  13. package/dist/browser/cursor.js +118 -0
  14. package/dist/browser/cursor.js.map +1 -0
  15. package/dist/browser/dom.d.ts +31 -0
  16. package/dist/browser/dom.d.ts.map +1 -0
  17. package/dist/browser/dom.js +134 -0
  18. package/dist/browser/dom.js.map +1 -0
  19. package/dist/browser/play-button.d.ts +11 -0
  20. package/dist/browser/play-button.d.ts.map +1 -0
  21. package/dist/browser/play-button.js +87 -0
  22. package/dist/browser/play-button.js.map +1 -0
  23. package/dist/browser/runtime.d.ts +66 -0
  24. package/dist/browser/runtime.d.ts.map +1 -0
  25. package/dist/browser/runtime.js +271 -0
  26. package/dist/browser/runtime.js.map +1 -0
  27. package/dist/cli.d.ts +3 -0
  28. package/dist/cli.d.ts.map +1 -0
  29. package/dist/cli.js +131 -0
  30. package/dist/cli.js.map +1 -0
  31. package/dist/compose/mix.d.ts +13 -0
  32. package/dist/compose/mix.d.ts.map +1 -0
  33. package/dist/compose/mix.js +50 -0
  34. package/dist/compose/mix.js.map +1 -0
  35. package/dist/compose/recordable.d.ts +149 -0
  36. package/dist/compose/recordable.d.ts.map +1 -0
  37. package/dist/compose/recordable.js +337 -0
  38. package/dist/compose/recordable.js.map +1 -0
  39. package/dist/compose/session.d.ts +38 -0
  40. package/dist/compose/session.d.ts.map +1 -0
  41. package/dist/compose/session.js +122 -0
  42. package/dist/compose/session.js.map +1 -0
  43. package/dist/config.d.ts +93 -0
  44. package/dist/config.d.ts.map +1 -0
  45. package/dist/config.js +64 -0
  46. package/dist/config.js.map +1 -0
  47. package/dist/errors.d.ts +13 -0
  48. package/dist/errors.d.ts.map +1 -0
  49. package/dist/errors.js +21 -0
  50. package/dist/errors.js.map +1 -0
  51. package/dist/ffmpeg.d.ts +8 -0
  52. package/dist/ffmpeg.d.ts.map +1 -0
  53. package/dist/ffmpeg.js +55 -0
  54. package/dist/ffmpeg.js.map +1 -0
  55. package/dist/formats/json.d.ts +12 -0
  56. package/dist/formats/json.d.ts.map +1 -0
  57. package/dist/formats/json.js +20 -0
  58. package/dist/formats/json.js.map +1 -0
  59. package/dist/formats/markdown/method.d.ts +25 -0
  60. package/dist/formats/markdown/method.d.ts.map +1 -0
  61. package/dist/formats/markdown/method.js +48 -0
  62. package/dist/formats/markdown/method.js.map +1 -0
  63. package/dist/formats/markdown/parse.d.ts +44 -0
  64. package/dist/formats/markdown/parse.d.ts.map +1 -0
  65. package/dist/formats/markdown/parse.js +143 -0
  66. package/dist/formats/markdown/parse.js.map +1 -0
  67. package/dist/fs.d.ts +9 -0
  68. package/dist/fs.d.ts.map +1 -0
  69. package/dist/fs.js +30 -0
  70. package/dist/fs.js.map +1 -0
  71. package/dist/index.d.ts +10 -0
  72. package/dist/index.d.ts.map +1 -0
  73. package/dist/index.js +6 -0
  74. package/dist/index.js.map +1 -0
  75. package/dist/logger.d.ts +21 -0
  76. package/dist/logger.d.ts.map +1 -0
  77. package/dist/logger.js +45 -0
  78. package/dist/logger.js.map +1 -0
  79. package/dist/schema.d.ts +5 -0
  80. package/dist/schema.d.ts.map +1 -0
  81. package/dist/schema.js +100 -0
  82. package/dist/schema.js.map +1 -0
  83. package/dist/script.d.ts +21 -0
  84. package/dist/script.d.ts.map +1 -0
  85. package/dist/script.js +26 -0
  86. package/dist/script.js.map +1 -0
  87. package/dist/targets.d.ts +6 -0
  88. package/dist/targets.d.ts.map +1 -0
  89. package/dist/targets.js +13 -0
  90. package/dist/targets.js.map +1 -0
  91. package/dist/timing.d.ts +41 -0
  92. package/dist/timing.d.ts.map +1 -0
  93. package/dist/timing.js +149 -0
  94. package/dist/timing.js.map +1 -0
  95. package/dist/utils.d.ts +3 -0
  96. package/dist/utils.d.ts.map +1 -0
  97. package/dist/utils.js +8 -0
  98. package/dist/utils.js.map +1 -0
  99. package/dist/validate.d.ts +8 -0
  100. package/dist/validate.d.ts.map +1 -0
  101. package/dist/validate.js +54 -0
  102. package/dist/validate.js.map +1 -0
  103. package/dist/video/recorder.d.ts +57 -0
  104. package/dist/video/recorder.d.ts.map +1 -0
  105. package/dist/video/recorder.js +238 -0
  106. package/dist/video/recorder.js.map +1 -0
  107. package/dist/video/stitch.d.ts +15 -0
  108. package/dist/video/stitch.d.ts.map +1 -0
  109. package/dist/video/stitch.js +111 -0
  110. package/dist/video/stitch.js.map +1 -0
  111. package/dist/voiceover/alignment.d.ts +14 -0
  112. package/dist/voiceover/alignment.d.ts.map +1 -0
  113. package/dist/voiceover/alignment.js +13 -0
  114. package/dist/voiceover/alignment.js.map +1 -0
  115. package/dist/voiceover/cache.d.ts +22 -0
  116. package/dist/voiceover/cache.d.ts.map +1 -0
  117. package/dist/voiceover/cache.js +55 -0
  118. package/dist/voiceover/cache.js.map +1 -0
  119. package/dist/voiceover/compile.d.ts +35 -0
  120. package/dist/voiceover/compile.d.ts.map +1 -0
  121. package/dist/voiceover/compile.js +194 -0
  122. package/dist/voiceover/compile.js.map +1 -0
  123. package/dist/voiceover/elevenlabs.d.ts +16 -0
  124. package/dist/voiceover/elevenlabs.d.ts.map +1 -0
  125. package/dist/voiceover/elevenlabs.js +66 -0
  126. package/dist/voiceover/elevenlabs.js.map +1 -0
  127. package/dist/voiceover/index.d.ts +7 -0
  128. package/dist/voiceover/index.d.ts.map +1 -0
  129. package/dist/voiceover/index.js +8 -0
  130. package/dist/voiceover/index.js.map +1 -0
  131. package/dist/voiceover/mock.d.ts +15 -0
  132. package/dist/voiceover/mock.d.ts.map +1 -0
  133. package/dist/voiceover/mock.js +41 -0
  134. package/dist/voiceover/mock.js.map +1 -0
  135. package/dist/voiceover/types.d.ts +31 -0
  136. package/dist/voiceover/types.d.ts.map +1 -0
  137. package/dist/voiceover/types.js +10 -0
  138. package/dist/voiceover/types.js.map +1 -0
  139. package/package.json +86 -0
  140. package/recordable.schema.json +738 -0
@@ -0,0 +1,738 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://raw.githubusercontent.com/paragramagency/recordable/main/recordable.schema.json",
4
+ "title": "Recordable script",
5
+ "description": "A declarative recording script: config + an array of actions.",
6
+ "oneOf": [
7
+ {
8
+ "type": "object",
9
+ "required": [
10
+ "actions"
11
+ ],
12
+ "additionalProperties": false,
13
+ "properties": {
14
+ "$schema": {
15
+ "type": "string"
16
+ },
17
+ "config": {
18
+ "$ref": "#/$defs/config"
19
+ },
20
+ "actions": {
21
+ "type": "array",
22
+ "items": {
23
+ "$ref": "#/$defs/action"
24
+ }
25
+ }
26
+ }
27
+ },
28
+ {
29
+ "type": "array",
30
+ "items": {
31
+ "$ref": "#/$defs/action"
32
+ }
33
+ }
34
+ ],
35
+ "$defs": {
36
+ "config": {
37
+ "type": "object",
38
+ "properties": {
39
+ "viewport": {
40
+ "type": "object",
41
+ "properties": {
42
+ "width": {
43
+ "type": "number"
44
+ },
45
+ "height": {
46
+ "type": "number"
47
+ }
48
+ },
49
+ "required": [
50
+ "width",
51
+ "height"
52
+ ],
53
+ "additionalProperties": false
54
+ },
55
+ "fps": {
56
+ "type": "number"
57
+ },
58
+ "outputDir": {
59
+ "type": "string"
60
+ },
61
+ "outputName": {
62
+ "type": "string"
63
+ },
64
+ "outputTimestamp": {
65
+ "type": "boolean"
66
+ },
67
+ "assetsDir": {
68
+ "type": "string"
69
+ },
70
+ "headless": {
71
+ "type": "boolean"
72
+ },
73
+ "launchArgs": {
74
+ "type": "array",
75
+ "items": {
76
+ "type": "string"
77
+ }
78
+ },
79
+ "typingSpeed": {
80
+ "type": "number"
81
+ },
82
+ "videoCrf": {
83
+ "type": "number"
84
+ },
85
+ "videoCodec": {
86
+ "type": "string"
87
+ },
88
+ "videoPreset": {
89
+ "type": "string"
90
+ },
91
+ "zoomDuration": {
92
+ "type": "number"
93
+ },
94
+ "actionDelay": {
95
+ "type": "number"
96
+ },
97
+ "silent": {
98
+ "type": "boolean"
99
+ },
100
+ "autoScroll": {
101
+ "type": "boolean"
102
+ },
103
+ "scrollMargin": {
104
+ "type": "number"
105
+ },
106
+ "scrollSpeed": {
107
+ "type": "number"
108
+ },
109
+ "scrollDuration": {
110
+ "type": "number"
111
+ },
112
+ "cursor": {
113
+ "type": "boolean"
114
+ },
115
+ "visitTimeout": {
116
+ "type": "number"
117
+ }
118
+ },
119
+ "additionalProperties": false
120
+ },
121
+ "action": {
122
+ "type": "object",
123
+ "required": [
124
+ "action"
125
+ ],
126
+ "properties": {
127
+ "action": {
128
+ "enum": [
129
+ "pause",
130
+ "resume",
131
+ "resumeOnInput",
132
+ "insert",
133
+ "audio",
134
+ "setConfig",
135
+ "visit",
136
+ "waitFor",
137
+ "click",
138
+ "hover",
139
+ "type",
140
+ "clear",
141
+ "select",
142
+ "key",
143
+ "mouse",
144
+ "scroll",
145
+ "zoom",
146
+ "resetZoom",
147
+ "wait"
148
+ ],
149
+ "description": "The action to perform."
150
+ }
151
+ },
152
+ "allOf": [
153
+ {
154
+ "if": {
155
+ "properties": {
156
+ "action": {
157
+ "const": "pause"
158
+ }
159
+ },
160
+ "required": [
161
+ "action"
162
+ ]
163
+ },
164
+ "then": {
165
+ "properties": {
166
+ "action": {
167
+ "const": "pause"
168
+ }
169
+ },
170
+ "required": [
171
+ "action"
172
+ ],
173
+ "additionalProperties": false
174
+ }
175
+ },
176
+ {
177
+ "if": {
178
+ "properties": {
179
+ "action": {
180
+ "const": "resume"
181
+ }
182
+ },
183
+ "required": [
184
+ "action"
185
+ ]
186
+ },
187
+ "then": {
188
+ "properties": {
189
+ "action": {
190
+ "const": "resume"
191
+ }
192
+ },
193
+ "required": [
194
+ "action"
195
+ ],
196
+ "additionalProperties": false
197
+ }
198
+ },
199
+ {
200
+ "if": {
201
+ "properties": {
202
+ "action": {
203
+ "const": "resumeOnInput"
204
+ }
205
+ },
206
+ "required": [
207
+ "action"
208
+ ]
209
+ },
210
+ "then": {
211
+ "properties": {
212
+ "action": {
213
+ "const": "resumeOnInput"
214
+ },
215
+ "message": {
216
+ "type": "string"
217
+ }
218
+ },
219
+ "required": [
220
+ "action"
221
+ ],
222
+ "additionalProperties": false
223
+ }
224
+ },
225
+ {
226
+ "if": {
227
+ "properties": {
228
+ "action": {
229
+ "const": "insert"
230
+ }
231
+ },
232
+ "required": [
233
+ "action"
234
+ ]
235
+ },
236
+ "then": {
237
+ "properties": {
238
+ "action": {
239
+ "const": "insert"
240
+ },
241
+ "path": {
242
+ "type": "string"
243
+ },
244
+ "fadeIn": {
245
+ "type": "number"
246
+ },
247
+ "fadeOut": {
248
+ "type": "number"
249
+ }
250
+ },
251
+ "required": [
252
+ "action",
253
+ "path"
254
+ ],
255
+ "additionalProperties": false
256
+ }
257
+ },
258
+ {
259
+ "if": {
260
+ "properties": {
261
+ "action": {
262
+ "const": "audio"
263
+ }
264
+ },
265
+ "required": [
266
+ "action"
267
+ ]
268
+ },
269
+ "then": {
270
+ "properties": {
271
+ "action": {
272
+ "const": "audio"
273
+ },
274
+ "path": {
275
+ "type": "string"
276
+ },
277
+ "wait": {
278
+ "type": "boolean"
279
+ },
280
+ "volume": {
281
+ "type": "number"
282
+ }
283
+ },
284
+ "required": [
285
+ "action",
286
+ "path"
287
+ ],
288
+ "additionalProperties": false
289
+ }
290
+ },
291
+ {
292
+ "if": {
293
+ "properties": {
294
+ "action": {
295
+ "const": "setConfig"
296
+ }
297
+ },
298
+ "required": [
299
+ "action"
300
+ ]
301
+ },
302
+ "then": {
303
+ "properties": {
304
+ "action": {
305
+ "const": "setConfig"
306
+ },
307
+ "config": {
308
+ "$ref": "#/$defs/config"
309
+ }
310
+ },
311
+ "required": [
312
+ "action",
313
+ "config"
314
+ ],
315
+ "additionalProperties": false
316
+ }
317
+ },
318
+ {
319
+ "if": {
320
+ "properties": {
321
+ "action": {
322
+ "const": "visit"
323
+ }
324
+ },
325
+ "required": [
326
+ "action"
327
+ ]
328
+ },
329
+ "then": {
330
+ "properties": {
331
+ "action": {
332
+ "const": "visit"
333
+ },
334
+ "url": {
335
+ "type": "string"
336
+ },
337
+ "waitUntil": {
338
+ "type": "string"
339
+ },
340
+ "timeout": {
341
+ "type": "number"
342
+ },
343
+ "referer": {
344
+ "type": "string"
345
+ }
346
+ },
347
+ "required": [
348
+ "action",
349
+ "url"
350
+ ],
351
+ "additionalProperties": false
352
+ }
353
+ },
354
+ {
355
+ "if": {
356
+ "properties": {
357
+ "action": {
358
+ "const": "waitFor"
359
+ }
360
+ },
361
+ "required": [
362
+ "action"
363
+ ]
364
+ },
365
+ "then": {
366
+ "properties": {
367
+ "action": {
368
+ "const": "waitFor"
369
+ },
370
+ "target": {
371
+ "type": "string"
372
+ },
373
+ "state": {
374
+ "type": "string",
375
+ "enum": [
376
+ "visible",
377
+ "hidden",
378
+ "present"
379
+ ]
380
+ },
381
+ "timeout": {
382
+ "type": "number"
383
+ }
384
+ },
385
+ "required": [
386
+ "action",
387
+ "target"
388
+ ],
389
+ "additionalProperties": false
390
+ }
391
+ },
392
+ {
393
+ "if": {
394
+ "properties": {
395
+ "action": {
396
+ "const": "click"
397
+ }
398
+ },
399
+ "required": [
400
+ "action"
401
+ ]
402
+ },
403
+ "then": {
404
+ "properties": {
405
+ "action": {
406
+ "const": "click"
407
+ },
408
+ "target": {
409
+ "type": "string"
410
+ }
411
+ },
412
+ "required": [
413
+ "action",
414
+ "target"
415
+ ],
416
+ "additionalProperties": false
417
+ }
418
+ },
419
+ {
420
+ "if": {
421
+ "properties": {
422
+ "action": {
423
+ "const": "hover"
424
+ }
425
+ },
426
+ "required": [
427
+ "action"
428
+ ]
429
+ },
430
+ "then": {
431
+ "properties": {
432
+ "action": {
433
+ "const": "hover"
434
+ },
435
+ "target": {
436
+ "type": "string"
437
+ }
438
+ },
439
+ "required": [
440
+ "action",
441
+ "target"
442
+ ],
443
+ "additionalProperties": false
444
+ }
445
+ },
446
+ {
447
+ "if": {
448
+ "properties": {
449
+ "action": {
450
+ "const": "type"
451
+ }
452
+ },
453
+ "required": [
454
+ "action"
455
+ ]
456
+ },
457
+ "then": {
458
+ "properties": {
459
+ "action": {
460
+ "const": "type"
461
+ },
462
+ "target": {
463
+ "type": "string"
464
+ },
465
+ "text": {
466
+ "type": "string"
467
+ },
468
+ "duration": {
469
+ "type": "number"
470
+ }
471
+ },
472
+ "required": [
473
+ "action",
474
+ "target",
475
+ "text"
476
+ ],
477
+ "additionalProperties": false
478
+ }
479
+ },
480
+ {
481
+ "if": {
482
+ "properties": {
483
+ "action": {
484
+ "const": "clear"
485
+ }
486
+ },
487
+ "required": [
488
+ "action"
489
+ ]
490
+ },
491
+ "then": {
492
+ "properties": {
493
+ "action": {
494
+ "const": "clear"
495
+ },
496
+ "target": {
497
+ "type": "string"
498
+ }
499
+ },
500
+ "required": [
501
+ "action",
502
+ "target"
503
+ ],
504
+ "additionalProperties": false
505
+ }
506
+ },
507
+ {
508
+ "if": {
509
+ "properties": {
510
+ "action": {
511
+ "const": "select"
512
+ }
513
+ },
514
+ "required": [
515
+ "action"
516
+ ]
517
+ },
518
+ "then": {
519
+ "properties": {
520
+ "action": {
521
+ "const": "select"
522
+ },
523
+ "target": {
524
+ "type": "string"
525
+ },
526
+ "value": {
527
+ "type": "string"
528
+ }
529
+ },
530
+ "required": [
531
+ "action",
532
+ "target",
533
+ "value"
534
+ ],
535
+ "additionalProperties": false
536
+ }
537
+ },
538
+ {
539
+ "if": {
540
+ "properties": {
541
+ "action": {
542
+ "const": "key"
543
+ }
544
+ },
545
+ "required": [
546
+ "action"
547
+ ]
548
+ },
549
+ "then": {
550
+ "properties": {
551
+ "action": {
552
+ "const": "key"
553
+ },
554
+ "key": {
555
+ "type": "string"
556
+ }
557
+ },
558
+ "required": [
559
+ "action",
560
+ "key"
561
+ ],
562
+ "additionalProperties": false
563
+ }
564
+ },
565
+ {
566
+ "if": {
567
+ "properties": {
568
+ "action": {
569
+ "const": "mouse"
570
+ }
571
+ },
572
+ "required": [
573
+ "action"
574
+ ]
575
+ },
576
+ "then": {
577
+ "properties": {
578
+ "action": {
579
+ "const": "mouse"
580
+ },
581
+ "target": {
582
+ "anyOf": [
583
+ {
584
+ "type": "string"
585
+ },
586
+ {
587
+ "type": "object",
588
+ "properties": {
589
+ "x": {
590
+ "type": "number"
591
+ },
592
+ "y": {
593
+ "type": "number"
594
+ }
595
+ },
596
+ "required": [
597
+ "x",
598
+ "y"
599
+ ],
600
+ "additionalProperties": false
601
+ }
602
+ ]
603
+ }
604
+ },
605
+ "required": [
606
+ "action",
607
+ "target"
608
+ ],
609
+ "additionalProperties": false
610
+ }
611
+ },
612
+ {
613
+ "if": {
614
+ "properties": {
615
+ "action": {
616
+ "const": "scroll"
617
+ }
618
+ },
619
+ "required": [
620
+ "action"
621
+ ]
622
+ },
623
+ "then": {
624
+ "properties": {
625
+ "action": {
626
+ "const": "scroll"
627
+ },
628
+ "target": {
629
+ "anyOf": [
630
+ {
631
+ "type": "string"
632
+ },
633
+ {
634
+ "type": "number"
635
+ }
636
+ ]
637
+ },
638
+ "duration": {
639
+ "type": "number"
640
+ }
641
+ },
642
+ "required": [
643
+ "action",
644
+ "target"
645
+ ],
646
+ "additionalProperties": false
647
+ }
648
+ },
649
+ {
650
+ "if": {
651
+ "properties": {
652
+ "action": {
653
+ "const": "zoom"
654
+ }
655
+ },
656
+ "required": [
657
+ "action"
658
+ ]
659
+ },
660
+ "then": {
661
+ "properties": {
662
+ "action": {
663
+ "const": "zoom"
664
+ },
665
+ "level": {
666
+ "type": "number"
667
+ },
668
+ "origin": {
669
+ "type": "string"
670
+ },
671
+ "duration": {
672
+ "type": "number"
673
+ }
674
+ },
675
+ "required": [
676
+ "action",
677
+ "level"
678
+ ],
679
+ "additionalProperties": false
680
+ }
681
+ },
682
+ {
683
+ "if": {
684
+ "properties": {
685
+ "action": {
686
+ "const": "resetZoom"
687
+ }
688
+ },
689
+ "required": [
690
+ "action"
691
+ ]
692
+ },
693
+ "then": {
694
+ "properties": {
695
+ "action": {
696
+ "const": "resetZoom"
697
+ },
698
+ "duration": {
699
+ "type": "number"
700
+ }
701
+ },
702
+ "required": [
703
+ "action"
704
+ ],
705
+ "additionalProperties": false
706
+ }
707
+ },
708
+ {
709
+ "if": {
710
+ "properties": {
711
+ "action": {
712
+ "const": "wait"
713
+ }
714
+ },
715
+ "required": [
716
+ "action"
717
+ ]
718
+ },
719
+ "then": {
720
+ "properties": {
721
+ "action": {
722
+ "const": "wait"
723
+ },
724
+ "ms": {
725
+ "type": "number"
726
+ }
727
+ },
728
+ "required": [
729
+ "action",
730
+ "ms"
731
+ ],
732
+ "additionalProperties": false
733
+ }
734
+ }
735
+ ]
736
+ }
737
+ }
738
+ }