screenci 0.0.75 → 0.0.78
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/cli.d.ts +62 -1
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +699 -229
- package/dist/cli.js.map +1 -1
- package/dist/docs/manifest.d.ts +277 -91
- package/dist/docs/manifest.d.ts.map +1 -1
- package/dist/docs/manifest.js +101 -30
- package/dist/docs/manifest.js.map +1 -1
- package/dist/docs/video-sources/camera-and-zooming.screenci.d.ts +2 -0
- package/dist/docs/video-sources/camera-and-zooming.screenci.d.ts.map +1 -0
- package/dist/docs/video-sources/camera-and-zooming.screenci.js +57 -0
- package/dist/docs/video-sources/camera-and-zooming.screenci.js.map +1 -0
- package/dist/docs/video-sources/installation.screenci.js +19 -10
- package/dist/docs/video-sources/installation.screenci.js.map +1 -1
- package/dist/docs/video-sources/landing.screenci.js +6 -8
- package/dist/docs/video-sources/landing.screenci.js.map +1 -1
- package/dist/docs/video-sources/languages.screenci.d.ts +2 -0
- package/dist/docs/video-sources/languages.screenci.d.ts.map +1 -0
- package/dist/docs/video-sources/languages.screenci.js +68 -0
- package/dist/docs/video-sources/languages.screenci.js.map +1 -0
- package/dist/docs/video-sources/locator-highlight-animated.screenci.js +4 -5
- package/dist/docs/video-sources/locator-highlight-animated.screenci.js.map +1 -1
- package/dist/docs/video-sources/locator-highlight-still.screenci.js +3 -4
- package/dist/docs/video-sources/locator-highlight-still.screenci.js.map +1 -1
- package/dist/docs/video-sources/narration.screenci.d.ts +2 -0
- package/dist/docs/video-sources/narration.screenci.d.ts.map +1 -0
- package/dist/docs/video-sources/narration.screenci.js +71 -0
- package/dist/docs/video-sources/narration.screenci.js.map +1 -0
- package/dist/docs/video-sources/public-urls-and-embeds.screenci.d.ts +2 -0
- package/dist/docs/video-sources/public-urls-and-embeds.screenci.d.ts.map +1 -0
- package/dist/docs/video-sources/public-urls-and-embeds.screenci.js +60 -0
- package/dist/docs/video-sources/public-urls-and-embeds.screenci.js.map +1 -0
- package/dist/docs/video-sources/speaking-style.screenci.d.ts +2 -0
- package/dist/docs/video-sources/speaking-style.screenci.d.ts.map +1 -0
- package/dist/docs/video-sources/speaking-style.screenci.js +76 -0
- package/dist/docs/video-sources/speaking-style.screenci.js.map +1 -0
- package/dist/docs/video-sources/studio.screenci.js +8 -10
- package/dist/docs/video-sources/studio.screenci.js.map +1 -1
- package/dist/docs/video-sources/vertical-video.screenci.d.ts +2 -0
- package/dist/docs/video-sources/vertical-video.screenci.d.ts.map +1 -0
- package/dist/docs/video-sources/vertical-video.screenci.js +58 -0
- package/dist/docs/video-sources/vertical-video.screenci.js.map +1 -0
- package/dist/docs/videos.d.ts +20 -0
- package/dist/docs/videos.d.ts.map +1 -1
- package/dist/docs/videos.js +25 -0
- package/dist/docs/videos.js.map +1 -1
- package/dist/e2e/instrument.e2e.js +60 -1
- package/dist/e2e/instrument.e2e.js.map +1 -1
- package/dist/e2e/redact.e2e.d.ts +2 -0
- package/dist/e2e/redact.e2e.d.ts.map +1 -0
- package/dist/e2e/redact.e2e.js +161 -0
- package/dist/e2e/redact.e2e.js.map +1 -0
- package/dist/index.d.ts +12 -6
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +8 -2
- package/dist/index.js.map +1 -1
- package/dist/src/asset.d.ts +174 -14
- package/dist/src/asset.d.ts.map +1 -1
- package/dist/src/asset.js +320 -39
- package/dist/src/asset.js.map +1 -1
- package/dist/src/assetHash.d.ts +27 -0
- package/dist/src/assetHash.d.ts.map +1 -0
- package/dist/src/assetHash.js +0 -0
- package/dist/src/assetHash.js.map +1 -0
- package/dist/src/audio.d.ts +20 -1
- package/dist/src/audio.d.ts.map +1 -1
- package/dist/src/audio.js +126 -24
- package/dist/src/audio.js.map +1 -1
- package/dist/src/autoZoom.d.ts.map +1 -1
- package/dist/src/autoZoom.js +3 -1
- package/dist/src/autoZoom.js.map +1 -1
- package/dist/src/browserLaunchOptions.d.ts +24 -2
- package/dist/src/browserLaunchOptions.d.ts.map +1 -1
- package/dist/src/browserLaunchOptions.js +57 -3
- package/dist/src/browserLaunchOptions.js.map +1 -1
- package/dist/src/builder.d.ts +229 -136
- package/dist/src/builder.d.ts.map +1 -1
- package/dist/src/builder.js +264 -77
- package/dist/src/builder.js.map +1 -1
- package/dist/src/callerFile.d.ts +12 -0
- package/dist/src/callerFile.d.ts.map +1 -0
- package/dist/src/callerFile.js +46 -0
- package/dist/src/callerFile.js.map +1 -0
- package/dist/src/changeFocus.d.ts.map +1 -1
- package/dist/src/changeFocus.js +109 -36
- package/dist/src/changeFocus.js.map +1 -1
- package/dist/src/config.d.ts.map +1 -1
- package/dist/src/config.js +15 -0
- package/dist/src/config.js.map +1 -1
- package/dist/src/cue.d.ts +29 -17
- package/dist/src/cue.d.ts.map +1 -1
- package/dist/src/cue.js +138 -61
- package/dist/src/cue.js.map +1 -1
- package/dist/src/declare.d.ts +63 -0
- package/dist/src/declare.d.ts.map +1 -0
- package/dist/src/declare.js +111 -0
- package/dist/src/declare.js.map +1 -0
- package/dist/src/defaults.d.ts +23 -0
- package/dist/src/defaults.d.ts.map +1 -1
- package/dist/src/defaults.js +27 -3
- package/dist/src/defaults.js.map +1 -1
- package/dist/src/events.d.ts +339 -25
- package/dist/src/events.d.ts.map +1 -1
- package/dist/src/events.js +250 -26
- package/dist/src/events.js.map +1 -1
- package/dist/src/htmlRasterizer.d.ts +10 -0
- package/dist/src/htmlRasterizer.d.ts.map +1 -1
- package/dist/src/htmlRasterizer.js +12 -2
- package/dist/src/htmlRasterizer.js.map +1 -1
- package/dist/src/init.d.ts +2 -0
- package/dist/src/init.d.ts.map +1 -1
- package/dist/src/init.js +81 -33
- package/dist/src/init.js.map +1 -1
- package/dist/src/instrument.d.ts.map +1 -1
- package/dist/src/instrument.js +164 -8
- package/dist/src/instrument.js.map +1 -1
- package/dist/src/locales.d.ts.map +1 -1
- package/dist/src/locales.js +1 -0
- package/dist/src/locales.js.map +1 -1
- package/dist/src/localize.d.ts +26 -17
- package/dist/src/localize.d.ts.map +1 -1
- package/dist/src/localize.js +19 -11
- package/dist/src/localize.js.map +1 -1
- package/dist/src/localizeRuntime.d.ts +29 -33
- package/dist/src/localizeRuntime.d.ts.map +1 -1
- package/dist/src/localizeRuntime.js +74 -49
- package/dist/src/localizeRuntime.js.map +1 -1
- package/dist/src/logger.d.ts +5 -0
- package/dist/src/logger.d.ts.map +1 -1
- package/dist/src/logger.js +7 -0
- package/dist/src/logger.js.map +1 -1
- package/dist/src/manualZoom.d.ts.map +1 -1
- package/dist/src/manualZoom.js +8 -5
- package/dist/src/manualZoom.js.map +1 -1
- package/dist/src/narrationVisibility.d.ts +19 -0
- package/dist/src/narrationVisibility.d.ts.map +1 -0
- package/dist/src/narrationVisibility.js +26 -0
- package/dist/src/narrationVisibility.js.map +1 -0
- package/dist/src/openBrowser.d.ts +34 -0
- package/dist/src/openBrowser.d.ts.map +1 -0
- package/dist/src/openBrowser.js +62 -0
- package/dist/src/openBrowser.js.map +1 -0
- package/dist/src/recordingData.d.ts +27 -0
- package/dist/src/recordingData.d.ts.map +1 -1
- package/dist/src/recordingSize.d.ts +32 -0
- package/dist/src/recordingSize.d.ts.map +1 -0
- package/dist/src/recordingSize.js +54 -0
- package/dist/src/recordingSize.js.map +1 -0
- package/dist/src/redact.d.ts +68 -0
- package/dist/src/redact.d.ts.map +1 -0
- package/dist/src/redact.js +138 -0
- package/dist/src/redact.js.map +1 -0
- package/dist/src/redactController.d.ts +61 -0
- package/dist/src/redactController.d.ts.map +1 -0
- package/dist/src/redactController.js +232 -0
- package/dist/src/redactController.js.map +1 -0
- package/dist/src/runtimeContext.d.ts +32 -0
- package/dist/src/runtimeContext.d.ts.map +1 -1
- package/dist/src/runtimeContext.js +21 -0
- package/dist/src/runtimeContext.js.map +1 -1
- package/dist/src/runtimeMode.d.ts +15 -7
- package/dist/src/runtimeMode.d.ts.map +1 -1
- package/dist/src/runtimeMode.js +17 -6
- package/dist/src/runtimeMode.js.map +1 -1
- package/dist/src/screenAudio.d.ts +88 -0
- package/dist/src/screenAudio.d.ts.map +1 -0
- package/dist/src/screenAudio.js +0 -0
- package/dist/src/screenAudio.js.map +1 -0
- package/dist/src/screenAudioSink.d.ts +46 -0
- package/dist/src/screenAudioSink.d.ts.map +1 -0
- package/dist/src/screenAudioSink.js +77 -0
- package/dist/src/screenAudioSink.js.map +1 -0
- package/dist/src/screenshot.d.ts +27 -29
- package/dist/src/screenshot.d.ts.map +1 -1
- package/dist/src/screenshot.js +39 -24
- package/dist/src/screenshot.js.map +1 -1
- package/dist/src/sourceTrim.d.ts +29 -0
- package/dist/src/sourceTrim.d.ts.map +1 -0
- package/dist/src/sourceTrim.js +76 -0
- package/dist/src/sourceTrim.js.map +1 -0
- package/dist/src/stillCapture.d.ts +5 -0
- package/dist/src/stillCapture.d.ts.map +1 -1
- package/dist/src/stillCapture.js +11 -1
- package/dist/src/stillCapture.js.map +1 -1
- package/dist/src/studio.d.ts +69 -57
- package/dist/src/studio.d.ts.map +1 -1
- package/dist/src/studio.js +16 -38
- package/dist/src/studio.js.map +1 -1
- package/dist/src/timelineOffset.d.ts +46 -0
- package/dist/src/timelineOffset.d.ts.map +1 -0
- package/dist/src/timelineOffset.js +66 -0
- package/dist/src/timelineOffset.js.map +1 -0
- package/dist/src/titleValidation.d.ts +38 -0
- package/dist/src/titleValidation.d.ts.map +1 -1
- package/dist/src/titleValidation.js +42 -0
- package/dist/src/titleValidation.js.map +1 -1
- package/dist/src/types.d.ts +218 -2
- package/dist/src/types.d.ts.map +1 -1
- package/dist/src/types.js +1 -1
- package/dist/src/types.js.map +1 -1
- package/dist/src/video.d.ts +74 -60
- package/dist/src/video.d.ts.map +1 -1
- package/dist/src/video.js +201 -39
- package/dist/src/video.js.map +1 -1
- package/dist/src/voiceSampleAudio.d.ts +34 -0
- package/dist/src/voiceSampleAudio.d.ts.map +1 -0
- package/dist/src/voiceSampleAudio.js +105 -0
- package/dist/src/voiceSampleAudio.js.map +1 -0
- package/dist/src/voices.d.ts +2 -2
- package/dist/src/voices.d.ts.map +1 -1
- package/dist/src/voices.js +8 -3
- package/dist/src/voices.js.map +1 -1
- package/dist/src/zoom.d.ts +1 -0
- package/dist/src/zoom.d.ts.map +1 -1
- package/dist/src/zoom.js +3 -0
- package/dist/src/zoom.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +3 -2
- package/skills/screenci/SKILL.md +2 -2
- package/skills/screenci/references/init.md +4 -3
- package/skills/screenci/references/record.md +1 -1
- package/templates/recordings/assets/logo.png +0 -0
- package/dist/docs/video-sources/public-urls.screenci.d.ts +0 -2
- package/dist/docs/video-sources/public-urls.screenci.d.ts.map +0 -1
- package/dist/docs/video-sources/public-urls.screenci.js +0 -41
- package/dist/docs/video-sources/public-urls.screenci.js.map +0 -1
package/dist/src/asset.d.ts
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import type { Locator } from '@playwright/test';
|
|
2
|
-
import type {
|
|
2
|
+
import type { NormalizedFeature } from './declare.js';
|
|
3
|
+
import { type IEventRecorder, type OverlayCrop } from './events.js';
|
|
4
|
+
import { type TimelineOffset } from './timelineOffset.js';
|
|
3
5
|
export { setOverlayCss } from './htmlRasterizer.js';
|
|
4
|
-
export type { OverlayPlacement } from './events.js';
|
|
6
|
+
export type { OverlayPlacement, OverlayCrop } from './events.js';
|
|
5
7
|
/**
|
|
6
8
|
* Minimal structural stand-in for a React element. Defined here so the core SDK
|
|
7
9
|
* never has to depend on `@types/react`: any JSX element is assignable to this,
|
|
@@ -62,14 +64,16 @@ type OverlayCommon = {
|
|
|
62
64
|
*/
|
|
63
65
|
margin?: number;
|
|
64
66
|
/**
|
|
65
|
-
*
|
|
67
|
+
* Default visible length, as a relative time string (`'2s'`, `'0:02'`), used
|
|
68
|
+
* when the overlay is shown with a bare call (`await overlays.logo()`) or
|
|
69
|
+
* `.for()` without its own length. Seconds/timecode only (no percentage).
|
|
66
70
|
* Omit when driving with `start()`/`end()`. Image/HTML/React overlays only.
|
|
67
71
|
*
|
|
68
72
|
* For animated overlays (`animate: true`) this is also the capture length: it
|
|
69
73
|
* is required when driving with `start()`/`end()` (the capture length is
|
|
70
74
|
* otherwise unknown).
|
|
71
75
|
*/
|
|
72
|
-
|
|
76
|
+
duration?: TimelineOffset;
|
|
73
77
|
/**
|
|
74
78
|
* Capture the overlay as an animation so its CSS/JS animation plays back in
|
|
75
79
|
* the video (HTML files and React elements only). The animation is sampled
|
|
@@ -91,6 +95,21 @@ type OverlayCommon = {
|
|
|
91
95
|
* HTML files and React elements only.
|
|
92
96
|
*/
|
|
93
97
|
capturePadding?: number;
|
|
98
|
+
/**
|
|
99
|
+
* Crop a rectangle of the SOURCE file before it is placed/scaled, in the
|
|
100
|
+
* source's own pixels (top-left origin), like Playwright's
|
|
101
|
+
* `page.screenshot({ clip })`. File overlays only (`.svg`/`.png` images and
|
|
102
|
+
* `.mp4` videos); rejected for `.html`/inline `html`/React `element`/`over`.
|
|
103
|
+
*/
|
|
104
|
+
crop?: OverlayCrop;
|
|
105
|
+
/**
|
|
106
|
+
* Keep the overlay stuck to the screen while the camera zooms: it stays at a
|
|
107
|
+
* fixed position and size in the output frame, unaffected by zoom. Useful for
|
|
108
|
+
* HUD-style elements (a corner logo, a persistent badge). By default (unset)
|
|
109
|
+
* an overlay is "burned" into the scene, so it moves and scales with the
|
|
110
|
+
* recording as the camera zooms and pans.
|
|
111
|
+
*/
|
|
112
|
+
pinToScreen?: boolean;
|
|
94
113
|
};
|
|
95
114
|
/** Fields that only apply to a `.mp4` video overlay (a file `path`). */
|
|
96
115
|
type OverlayVideoFields = {
|
|
@@ -104,11 +123,11 @@ type OverlayVideoFields = {
|
|
|
104
123
|
/**
|
|
105
124
|
* Playback-rate multiplier for `.mp4` overlays. `2` plays the clip (and its
|
|
106
125
|
* audio) twice as fast, `0.5` at half speed; `1` (the default) is the natural
|
|
107
|
-
* rate. Works like {@link speed} for a recording.
|
|
108
|
-
* (`await overlays.clip()`)
|
|
109
|
-
*
|
|
110
|
-
*
|
|
111
|
-
* exclusive with {@link time}. Video overlays only.
|
|
126
|
+
* rate. Works like {@link speed} for a recording. It sets how long the (sped)
|
|
127
|
+
* clip plays for, whether driven by a blocking call (`await overlays.clip()`)
|
|
128
|
+
* or a live `start()`/`end()` window, since both play the clip out to its end
|
|
129
|
+
* (see {@link OverlayController}); use it (or {@link time}) to make a clip run
|
|
130
|
+
* shorter. Mutually exclusive with {@link time}. Video overlays only.
|
|
112
131
|
*/
|
|
113
132
|
speed?: number;
|
|
114
133
|
/**
|
|
@@ -118,6 +137,18 @@ type OverlayVideoFields = {
|
|
|
118
137
|
* exclusive with {@link speed}. Video overlays only.
|
|
119
138
|
*/
|
|
120
139
|
time?: number;
|
|
140
|
+
/**
|
|
141
|
+
* Late start into the source video: skip to this point before playing. A time
|
|
142
|
+
* string only: `'2s'`/`'1.5s'`, a `'0:02'`/`'0:02.5'` timecode, or `'50%'` of
|
|
143
|
+
* the source duration. `.mp4` overlays only.
|
|
144
|
+
*/
|
|
145
|
+
start?: TimelineOffset;
|
|
146
|
+
/**
|
|
147
|
+
* Early end into the source video: stop playing at this point. A time string
|
|
148
|
+
* only (same forms as {@link start}; a percentage is of the source duration).
|
|
149
|
+
* `.mp4` overlays only.
|
|
150
|
+
*/
|
|
151
|
+
end?: TimelineOffset;
|
|
121
152
|
};
|
|
122
153
|
/**
|
|
123
154
|
* An overlay drawn from a file `path`: `.svg`/`.png` (image), `.mp4` (video),
|
|
@@ -144,6 +175,9 @@ export type ElementOverlayConfig = OverlayCommon & {
|
|
|
144
175
|
volume?: never;
|
|
145
176
|
speed?: never;
|
|
146
177
|
time?: never;
|
|
178
|
+
start?: never;
|
|
179
|
+
end?: never;
|
|
180
|
+
crop?: never;
|
|
147
181
|
};
|
|
148
182
|
/**
|
|
149
183
|
* An overlay rendered from an inline `html` fragment to a transparent PNG (or
|
|
@@ -162,6 +196,9 @@ export type HtmlOverlayConfig = OverlayCommon & {
|
|
|
162
196
|
volume?: never;
|
|
163
197
|
speed?: never;
|
|
164
198
|
time?: never;
|
|
199
|
+
start?: never;
|
|
200
|
+
end?: never;
|
|
201
|
+
crop?: never;
|
|
165
202
|
};
|
|
166
203
|
/**
|
|
167
204
|
* Display options for an overlay. An overlay draws its content from exactly one
|
|
@@ -177,14 +214,81 @@ export type OverlayConfig = FileOverlayConfig | ElementOverlayConfig | HtmlOverl
|
|
|
177
214
|
* headroom for a boost while guarding against accidental extreme distortion.
|
|
178
215
|
*/
|
|
179
216
|
export declare const MAX_AUDIO_LEVEL = 4;
|
|
217
|
+
/**
|
|
218
|
+
* Placement options accepted by {@link selected}. These are the subset of
|
|
219
|
+
* {@link OverlayCommon} that apply to a render dependency: the embedded output
|
|
220
|
+
* is a finished still or clip, so source-only fields (`over`/`margin`/`animate`/
|
|
221
|
+
* `css`/`capturePadding`) do not apply.
|
|
222
|
+
*/
|
|
223
|
+
export type DependencyOverlayOptions = Pick<OverlayCommon, 'relativeTo' | 'x' | 'y' | 'width' | 'height' | 'aspectRatio' | 'fill' | 'duration' | 'crop' | 'pinToScreen'> & {
|
|
224
|
+
/**
|
|
225
|
+
* Late start into the embedded VIDEO (a `'2s'`/timecode/`'50%'` position).
|
|
226
|
+
* Video dependencies only; rejected when the target resolves to a screenshot.
|
|
227
|
+
*/
|
|
228
|
+
start?: TimelineOffset;
|
|
229
|
+
/** Early end into the embedded VIDEO (video dependencies only). */
|
|
230
|
+
end?: TimelineOffset;
|
|
231
|
+
/**
|
|
232
|
+
* Also carry the embedded target's narration subtitles up into the surrounding
|
|
233
|
+
* video. The embed always plays the target's audio; with this on, the target's
|
|
234
|
+
* subtitles are additionally shown as subtitles of the surrounding video (in
|
|
235
|
+
* its VTT track) for the window the embed plays, wherever the surrounding video
|
|
236
|
+
* has no competing narration of its own. Defaults to `false`.
|
|
237
|
+
*/
|
|
238
|
+
inheritSubtitles?: boolean;
|
|
239
|
+
};
|
|
240
|
+
/** Brand identifying a {@link selected} render-dependency overlay input. */
|
|
241
|
+
declare const DEPENDENCY_INPUT_BRAND: "__screenciSelectedDependency";
|
|
242
|
+
/**
|
|
243
|
+
* The overlay input produced by {@link selected}. It embeds another render's
|
|
244
|
+
* output (a video or screenshot) as an overlay rather than a local file. The
|
|
245
|
+
* `name` identifies the target render (project-unique); `config` carries
|
|
246
|
+
* placement. The medium and concrete output are resolved by the backend.
|
|
247
|
+
*/
|
|
248
|
+
export type DependencyOverlayInput = {
|
|
249
|
+
readonly [DEPENDENCY_INPUT_BRAND]: true;
|
|
250
|
+
/** Project-unique name of the target video/screenshot to embed. */
|
|
251
|
+
name: string;
|
|
252
|
+
/** Placement options for the embedded overlay. */
|
|
253
|
+
config: DependencyOverlayOptions;
|
|
254
|
+
};
|
|
255
|
+
/**
|
|
256
|
+
* Embed another render's output as an overlay (a "render dependency"). Pass the
|
|
257
|
+
* project-unique `name` of a video or screenshot; screenci embeds that target's
|
|
258
|
+
* selected render for the matching language (falling back to its latest finished
|
|
259
|
+
* render before anything is selected). When the target's selection changes, this
|
|
260
|
+
* recording's dependents automatically re-render to embed the new output.
|
|
261
|
+
*
|
|
262
|
+
* No local file is read for a `selected(...)` overlay: the medium and concrete
|
|
263
|
+
* output are looked up by the backend at render time. Screenshots may only embed
|
|
264
|
+
* other screenshots; videos may embed either.
|
|
265
|
+
*
|
|
266
|
+
* The embed plays the target's audio. Pass `{ inheritSubtitles: true }` to also
|
|
267
|
+
* carry the target's narration subtitles up into the surrounding video's subtitle
|
|
268
|
+
* track for the window it plays, wherever the surrounding video has no competing
|
|
269
|
+
* narration of its own (off by default).
|
|
270
|
+
*
|
|
271
|
+
* @example
|
|
272
|
+
* ```ts
|
|
273
|
+
* video.overlays({ intro: selected('Intro Clip') })(
|
|
274
|
+
* 'Full Demo',
|
|
275
|
+
* async ({ page, overlays }) => {
|
|
276
|
+
* await overlays.intro()
|
|
277
|
+
* await page.goto('/dashboard')
|
|
278
|
+
* }
|
|
279
|
+
* )
|
|
280
|
+
* ```
|
|
281
|
+
*/
|
|
282
|
+
export declare function selected(name: string, options?: DependencyOverlayOptions): DependencyOverlayInput;
|
|
180
283
|
/**
|
|
181
284
|
* A value accepted by {@link createOverlays} for each key:
|
|
182
285
|
*
|
|
183
286
|
* - a `string` file path (`.html`/`.svg`/`.png`/`.mp4`),
|
|
184
|
-
* - a React element,
|
|
185
|
-
* - an {@link OverlayConfig} object
|
|
287
|
+
* - a React element,
|
|
288
|
+
* - an {@link OverlayConfig} object, or
|
|
289
|
+
* - a {@link selected} render dependency.
|
|
186
290
|
*/
|
|
187
|
-
export type OverlayInput = string | ReactElementLike | OverlayConfig;
|
|
291
|
+
export type OverlayInput = string | ReactElementLike | OverlayConfig | DependencyOverlayInput;
|
|
188
292
|
/**
|
|
189
293
|
* A factory that builds an {@link OverlayConfig} from caller-supplied props.
|
|
190
294
|
* Use this to make an overlay programmatic: the returned config (its content and
|
|
@@ -212,7 +316,18 @@ export declare function setAssetSleepFn(fn: (ms: number) => void): void;
|
|
|
212
316
|
export declare function setActiveAssetRecorder(recorder: IEventRecorder | null): void;
|
|
213
317
|
export declare function resetRegisteredAssetPaths(): void;
|
|
214
318
|
export declare function resetAssetChain(): void;
|
|
215
|
-
|
|
319
|
+
/**
|
|
320
|
+
* Validates the overlay files declared by the `.screenci` script at
|
|
321
|
+
* {@link testFilePath} (plus any unattributed registrations), resolving each
|
|
322
|
+
* as-is and relative to that file. Throws "Asset file not found" on the first
|
|
323
|
+
* missing file. Wired into the record flow so a missing overlay fails fast
|
|
324
|
+
* before the test body runs, rather than only when the overlay is first shown.
|
|
325
|
+
*
|
|
326
|
+
* Assets attributed to a different test file are skipped: another script sharing
|
|
327
|
+
* the worker may legitimately reference a file that does not resolve here.
|
|
328
|
+
*/
|
|
329
|
+
export declare function validateRegisteredAssetPaths(testFilePath: string | null): Promise<void>;
|
|
330
|
+
export declare function resetMissingOverlayWarnings(): void;
|
|
216
331
|
/**
|
|
217
332
|
* An overlay controller.
|
|
218
333
|
*
|
|
@@ -220,6 +335,14 @@ export declare function validateRegisteredAssetPaths(testFilePath: string): Prom
|
|
|
220
335
|
* (blocking). Use `start()`/`end()` to keep the overlay on screen while the page
|
|
221
336
|
* is driven underneath.
|
|
222
337
|
*
|
|
338
|
+
* For an overlay with an intrinsic length (a `.mp4` video, an embedded video
|
|
339
|
+
* dependency, or an animated HTML/React clip), `end()` lets the clip finish: if
|
|
340
|
+
* the media outlasts the live window, the remainder plays out over a frozen
|
|
341
|
+
* frame before the timeline continues, rather than being cut. To show less of
|
|
342
|
+
* such a clip, trim it (`start`/`end`/`speed`/`time`, or `selected(..., { end })`)
|
|
343
|
+
* rather than ending early. Length-less overlays (image, inline `html`, React)
|
|
344
|
+
* end exactly at `end()`.
|
|
345
|
+
*
|
|
223
346
|
* Overlays may overlap: several can be live at once (interleaved, not just
|
|
224
347
|
* nested), and a blocking overlay can run while others stay live. Each overlay
|
|
225
348
|
* you `start()` must be `end()`ed before the video function returns, and the
|
|
@@ -244,8 +367,37 @@ export declare function validateRegisteredAssetPaths(testFilePath: string): Prom
|
|
|
244
367
|
* ```
|
|
245
368
|
*/
|
|
246
369
|
export type OverlayController = {
|
|
247
|
-
|
|
370
|
+
/**
|
|
371
|
+
* Hold the overlay for its natural length. Valid only for a source with an
|
|
372
|
+
* intrinsic length (a `.mp4` video, or an embedded video dependency). Image,
|
|
373
|
+
* inline `html`, and React overlays have no natural length: use `.for(...)`,
|
|
374
|
+
* `.until(...)`, or drive them with `start()`/`end()`.
|
|
375
|
+
*/
|
|
376
|
+
(): Promise<void>;
|
|
377
|
+
/**
|
|
378
|
+
* Hold the overlay for a relative length, e.g. `.for('2s')` or `.for('0:02')`.
|
|
379
|
+
* Seconds and timecodes only; a percentage is rejected (a relative length has
|
|
380
|
+
* nothing to take a percentage of). Not for `.mp4`/animated overlays, whose
|
|
381
|
+
* length is fixed.
|
|
382
|
+
*/
|
|
383
|
+
for(duration: TimelineOffset): Promise<void>;
|
|
384
|
+
/**
|
|
385
|
+
* Keep the overlay visible until this absolute point in the final video (a
|
|
386
|
+
* `'<n>s'`/timecode position, or a `'<n>%'` fraction). Supported for image,
|
|
387
|
+
* HTML/React (static), and embedded-render overlays; not for `.mp4` or animated
|
|
388
|
+
* overlays, whose length is fixed. Successive `.until(...)` targets must be
|
|
389
|
+
* monotonic (each at or after the previous timeline point).
|
|
390
|
+
*/
|
|
391
|
+
until(position: TimelineOffset): Promise<void>;
|
|
392
|
+
/** Show the overlay live over the recording (non-blocking); pair with `end()`. */
|
|
248
393
|
start(): Promise<void>;
|
|
394
|
+
/**
|
|
395
|
+
* Stop a live overlay. For a length-less overlay (image/HTML/React) it ends
|
|
396
|
+
* immediately. For an overlay with an intrinsic length (video / dependency /
|
|
397
|
+
* animated) whose media has not finished, the clip plays out to its natural
|
|
398
|
+
* end over a frozen frame before the timeline continues; trim the source to
|
|
399
|
+
* show less instead of ending early.
|
|
400
|
+
*/
|
|
249
401
|
end(): Promise<void>;
|
|
250
402
|
};
|
|
251
403
|
/**
|
|
@@ -310,6 +462,14 @@ export declare function createOverlays<const T extends Record<string, OverlayInp
|
|
|
310
462
|
* Internal: the `overlays` fixture exposes these to the test body.
|
|
311
463
|
*/
|
|
312
464
|
export declare function buildStudioOverlays(names: readonly string[]): Record<string, OverlayController>;
|
|
465
|
+
/**
|
|
466
|
+
* Build overlay controllers for a `video.overlays(...)` declaration. Studio
|
|
467
|
+
* (array) names become Studio-managed controllers; code (object) names resolve
|
|
468
|
+
* their config for the active language (`byLang[language] ?? shared`) and become
|
|
469
|
+
* regular overlay controllers. Per-language mode realizes one language per pass,
|
|
470
|
+
* so the active-language config is the one captured.
|
|
471
|
+
*/
|
|
472
|
+
export declare function buildOverlays(feature: NormalizedFeature<OverlayInputOrFactory> | null | undefined, language: string | undefined): Record<string, OverlayController | ((props: unknown) => OverlayController)>;
|
|
313
473
|
/**
|
|
314
474
|
* Upper bound for a playback-speed multiplier. `16` is already an extreme rate;
|
|
315
475
|
* the cap guards against accidental runaway values producing degenerate output.
|
package/dist/src/asset.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"asset.d.ts","sourceRoot":"","sources":["../../src/asset.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAA;AAC/C,OAAO,KAAK,EAAE,cAAc,
|
|
1
|
+
{"version":3,"file":"asset.d.ts","sourceRoot":"","sources":["../../src/asset.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAA;AAC/C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAA;AACrD,OAAO,EAEL,KAAK,cAAc,EAEnB,KAAK,WAAW,EAGjB,MAAM,aAAa,CAAA;AACpB,OAAO,EAAuB,KAAK,cAAc,EAAE,MAAM,qBAAqB,CAAA;AAc9E,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AAWnD,YAAY,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;AAEhE;;;;;;GAMG;AACH,MAAM,MAAM,gBAAgB,GAAG;IAC7B,IAAI,EAAE,OAAO,CAAA;IACb,KAAK,EAAE,OAAO,CAAA;IACd,GAAG,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CACpB,CAAA;AAED;;;;;;;;GAQG;AACH,KAAK,aAAa,GAAG;IACnB,0EAA0E;IAC1E,UAAU,CAAC,EAAE,QAAQ,GAAG,WAAW,CAAA;IACnC,sEAAsE;IACtE,CAAC,CAAC,EAAE,MAAM,CAAA;IACV,qEAAqE;IACrE,CAAC,CAAC,EAAE,MAAM,CAAA;IACV,kEAAkE;IAClE,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,kEAAkE;IAClE,MAAM,CAAC,EAAE,MAAM,CAAA;IACf;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB;;;;;OAKG;IACH,IAAI,CAAC,EAAE,WAAW,GAAG,QAAQ,CAA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