alpha2 0.4.5 → 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 +5 -4
- package/THIRD_PARTY_NOTICES.md +4 -0
- package/dist/abort.d.ts +12 -0
- package/dist/abort.js +48 -0
- package/dist/active-clock.d.ts +35 -0
- package/dist/active-clock.js +99 -0
- package/dist/assets.d.ts +28 -22
- package/dist/assets.js +8 -12
- package/dist/audio-layout.d.ts +52 -74
- package/dist/audio-layout.js +114 -148
- package/dist/audio-timeline.d.ts +89 -117
- package/dist/audio-timeline.js +102 -118
- package/dist/audio-worker.d.ts +12 -21
- package/dist/audio-worker.js +8 -13
- package/dist/audio-worklet-processor.js +45 -58
- package/dist/audio-worklet.d.ts +45 -76
- package/dist/audio-worklet.js +44 -79
- package/dist/audio.d.ts +15 -23
- package/dist/audio.js +9 -13
- package/dist/builder.d.ts +45 -63
- package/dist/builder.js +49 -45
- package/dist/capabilities.d.ts +99 -16
- package/dist/capabilities.js +2 -2
- package/dist/captions.d.ts +45 -22
- package/dist/captions.js +60 -15
- package/dist/chroma-siting.d.ts +24 -41
- package/dist/chroma-siting.js +38 -71
- package/dist/containers.d.ts +41 -30
- package/dist/containers.js +59 -27
- package/dist/decoder-fallback.d.ts +13 -0
- package/dist/decoder-fallback.js +38 -0
- package/dist/decoder-order.d.ts +24 -39
- package/dist/decoder-order.js +28 -42
- package/dist/edit.d.ts +77 -154
- package/dist/edit.js +98 -180
- package/dist/effects.d.ts +109 -173
- package/dist/effects.js +7 -9
- package/dist/export-destination.d.ts +25 -41
- package/dist/export-destination.js +20 -32
- package/dist/export-failure.d.ts +34 -59
- package/dist/export-failure.js +54 -48
- package/dist/export-metrics.d.ts +116 -0
- package/dist/export-metrics.js +74 -0
- package/dist/export-retry.d.ts +46 -29
- package/dist/export-retry.js +86 -51
- package/dist/exporter.d.ts +67 -116
- package/dist/exporter.js +133 -133
- package/dist/extensions.d.ts +69 -115
- package/dist/extensions.js +55 -82
- package/dist/frame-intake.d.ts +92 -0
- package/dist/frame-intake.js +114 -0
- package/dist/frame-supply.d.ts +98 -157
- package/dist/frame-supply.js +191 -162
- package/dist/generated/project-schema.d.ts +742 -464
- package/dist/generated/project-schema.js +63 -2
- package/dist/generated/project-shape.js +663 -118
- package/dist/geometry.d.ts +28 -34
- package/dist/geometry.js +18 -23
- package/dist/gpu-recovery.d.ts +92 -0
- package/dist/gpu-recovery.js +135 -0
- package/dist/hdr-frames.d.ts +88 -62
- package/dist/hdr-frames.js +123 -46
- package/dist/index.d.ts +4 -0
- package/dist/index.js +4 -0
- package/dist/json-text.d.ts +13 -23
- package/dist/json-text.js +10 -20
- package/dist/layout-values.d.ts +14 -22
- package/dist/layout-values.js +18 -21
- package/dist/layout.d.ts +55 -55
- package/dist/layout.js +37 -36
- package/dist/loudness.d.ts +27 -32
- package/dist/loudness.js +19 -23
- package/dist/media.d.ts +85 -237
- package/dist/media.js +133 -287
- package/dist/mediabunny.d.ts +173 -237
- package/dist/mediabunny.js +943 -518
- package/dist/physical-frames.d.ts +5 -17
- package/dist/physical-frames.js +4 -11
- package/dist/player.d.ts +56 -47
- package/dist/player.js +155 -40
- package/dist/presented-frames.d.ts +2 -7
- package/dist/presented-frames.js +3 -8
- package/dist/project.d.ts +83 -110
- package/dist/project.js +421 -447
- package/dist/rate-control.d.ts +9 -23
- package/dist/rate-control.js +7 -18
- package/dist/renderer-choice.d.ts +41 -0
- package/dist/renderer-choice.js +82 -0
- package/dist/repacked-bytes.d.ts +0 -2
- package/dist/repacked-bytes.js +2 -5
- package/dist/robustness.d.ts +25 -37
- package/dist/robustness.js +71 -54
- package/dist/sha256.d.ts +5 -13
- package/dist/sha256.js +9 -24
- package/dist/text.d.ts +106 -63
- package/dist/text.js +44 -69
- package/dist/video-frames.d.ts +7 -25
- package/dist/video-frames.js +12 -29
- package/dist/waveform.d.ts +5 -11
- package/dist/waveform.js +4 -9
- package/dist/worker-error.d.ts +5 -20
- package/dist/worker-error.js +8 -25
- package/dist/worker.d.ts +82 -92
- package/dist/worker.js +239 -144
- package/package.json +26 -2
- package/wasm/alpha2_audio_worklet.wasm +0 -0
- package/wasm/alpha2_extensions.d.ts +26 -47
- package/wasm/alpha2_extensions.js +26 -47
- package/wasm/alpha2_extensions_bg.wasm +0 -0
- package/wasm/alpha2_wasm.d.ts +487 -543
- package/wasm/alpha2_wasm.js +669 -572
- package/wasm/alpha2_wasm_bg.wasm +0 -0
- package/wasm/alpha2_wasm_bg.wasm.d.ts +20 -8
- package/wasm/rust-crate-licenses.md +2 -2
- package/wasm/snippets/{alpha2-wasm-57b04ecc6db57e1f → alpha2-wasm-1313375d424845c0}/inline1.js +1 -0
- package/wasm/snippets/alpha2-wasm-1313375d424845c0/inline2.js +82 -0
- package/wasm/snippets/alpha2-wasm-57b04ecc6db57e1f/inline2.js +0 -52
- /package/wasm/snippets/{alpha2-wasm-57b04ecc6db57e1f → alpha2-wasm-1313375d424845c0}/inline0.js +0 -0
- /package/wasm/snippets/{alpha2-wasm-57b04ecc6db57e1f → alpha2-wasm-1313375d424845c0}/inline3.js +0 -0
package/dist/edit.d.ts
CHANGED
|
@@ -1,44 +1,25 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Document editing operations
|
|
3
|
-
*
|
|
4
|
-
* clip down (insert, overwrite, append), as pure functions from one valid
|
|
5
|
-
* project to another.
|
|
2
|
+
* Document editing operations (split, trim, ripple, roll, slip, slide, retime, move, insert,
|
|
3
|
+
* overwrite, append) as pure functions from one valid project to another.
|
|
6
4
|
*
|
|
7
|
-
* Each
|
|
8
|
-
*
|
|
9
|
-
* new project that passes {@link validateProject}, or a typed error, and never
|
|
10
|
-
* changes its input. History, selection, and snapping stay with the host: a
|
|
11
|
-
* host keeps the projects it has returned to undo.
|
|
5
|
+
* Each returns a new project that passes {@link validateProject}, or a typed error, and never
|
|
6
|
+
* modifies its input. Undo history, selection and snapping are the host's job.
|
|
12
7
|
*
|
|
13
|
-
* Times are ticks. A clip keeps its speed
|
|
14
|
-
*
|
|
15
|
-
* loses the end of its source.
|
|
8
|
+
* Times, deltas and durations are whole ticks (`invalid_time` otherwise). A clip keeps its speed
|
|
9
|
+
* across an edit, so a reversed clip trimmed at its start loses the end of its source.
|
|
16
10
|
*
|
|
17
|
-
* A clip's composition keeps its own time
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
* splitting gives the right half a copy of the composition and of the group
|
|
21
|
-
* definitions it draws ({@link copyComposition}), starting where the cut
|
|
22
|
-
* falls in it.
|
|
11
|
+
* A clip's composition keeps its own time: moving a clip moves its animation with it, trimming the
|
|
12
|
+
* start by `delta` adds `delta * scale` to the offset, and splitting gives the right half a copy
|
|
13
|
+
* ({@link copyComposition}).
|
|
23
14
|
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
* (`outside_source`). A source without a recorded length is bounded only at
|
|
27
|
-
* its start.
|
|
15
|
+
* Edits may not read before a source's start or past its fingerprint's `duration_ticks`
|
|
16
|
+
* (`outside_source`).
|
|
28
17
|
*
|
|
29
|
-
* Ripple edits
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
* track whose clip, transition, or caption cue lies across the edit point
|
|
33
|
-
* refuses the whole edit (`sync_conflict`): nothing is split or trimmed on a
|
|
34
|
-
* track the edit does not target. So does one where content the edit pulls
|
|
35
|
-
* earlier would land on content that stays.
|
|
18
|
+
* Ripple edits move later content on the edited track and on `syncTracks` by the same amount. A
|
|
19
|
+
* sync track with content across the edit point, or where pulled content would land on content
|
|
20
|
+
* that stays, refuses the whole edit (`sync_conflict`).
|
|
36
21
|
*
|
|
37
|
-
*
|
|
38
|
-
* (`invalid_time`).
|
|
39
|
-
*
|
|
40
|
-
* A batch of edits valid only as a whole runs in {@link deferValidation}, whose caller validates
|
|
41
|
-
* the project it keeps instead of each edit validating its own.
|
|
22
|
+
* Use {@link deferValidation} for a batch of edits that is valid only as a whole.
|
|
42
23
|
*/
|
|
43
24
|
import type { Clip, Composition, Project, TimeRange } from "./generated/project-schema.js";
|
|
44
25
|
/** Why an edit was refused. */
|
|
@@ -63,34 +44,22 @@ export type EditErrorCode =
|
|
|
63
44
|
| "incompatible_track"
|
|
64
45
|
/** Two clips do not meet at one cut, so there is nothing to roll. */
|
|
65
46
|
| "not_adjacent"
|
|
66
|
-
/**
|
|
67
|
-
* A track that moves with the edit has content across its edit point, or content the edit
|
|
68
|
-
* would pull onto content that stays.
|
|
69
|
-
*/
|
|
47
|
+
/** A sync track has content across the edit point, or would collide after the edit. */
|
|
70
48
|
| "sync_conflict"
|
|
71
|
-
/**
|
|
72
|
-
* The edit cuts a clip in two and was given no id for the new part, or cuts more clips than the
|
|
73
|
-
* one id it was given can name.
|
|
74
|
-
*/
|
|
49
|
+
/** The edit splits a clip without an id for the new part, or splits more than one clip. */
|
|
75
50
|
| "needs_id"
|
|
76
51
|
/** The edit would read the source before its start or past its recorded end. */
|
|
77
52
|
| "outside_source"
|
|
78
53
|
/** The edited document breaks a model rule; `problems` says which. */
|
|
79
54
|
| "invalid_result";
|
|
80
|
-
/**
|
|
81
|
-
* A refused edit. Branch on `code`; `message` is a human-readable description
|
|
82
|
-
* naming the clip, track, or time involved.
|
|
83
|
-
*/
|
|
55
|
+
/** A refused edit. Branch on `code`; `message` is human-readable. */
|
|
84
56
|
export interface EditError {
|
|
85
57
|
readonly code: EditErrorCode;
|
|
86
58
|
readonly message: string;
|
|
87
59
|
/** For `invalid_result`, what {@link validateProject} reported. */
|
|
88
60
|
readonly problems?: readonly string[];
|
|
89
61
|
}
|
|
90
|
-
/**
|
|
91
|
-
* The outcome of an edit: the new project, which passes {@link validateProject},
|
|
92
|
-
* or why the edit was refused. The input project is never modified either way.
|
|
93
|
-
*/
|
|
62
|
+
/** The new project, or why the edit was refused. The input is never modified. */
|
|
94
63
|
export type EditResult = {
|
|
95
64
|
readonly ok: true;
|
|
96
65
|
readonly project: Project;
|
|
@@ -98,67 +67,51 @@ export type EditResult = {
|
|
|
98
67
|
readonly ok: false;
|
|
99
68
|
readonly error: EditError;
|
|
100
69
|
};
|
|
101
|
-
/** Which end of a clip an edit moves. */
|
|
102
70
|
export type ClipEdge = "start" | "end";
|
|
103
71
|
/** How a ripple edit reaches other tracks. */
|
|
104
72
|
export interface RippleOptions {
|
|
105
|
-
/**
|
|
106
|
-
* Tracks, besides the edited one, whose content after the edit point moves by the same amount:
|
|
107
|
-
* the sync-locked tracks. Caption tracks move their cues.
|
|
108
|
-
*/
|
|
73
|
+
/** Sync-locked tracks whose content after the edit point moves with the edited track. */
|
|
109
74
|
readonly syncTracks?: readonly string[];
|
|
110
75
|
}
|
|
111
|
-
/** Options for
|
|
76
|
+
/** Options for placing a clip where another must be split. */
|
|
112
77
|
export interface PlaceOptions extends RippleOptions {
|
|
113
|
-
/**
|
|
78
|
+
/** Id for the split-off part of an existing clip. */
|
|
114
79
|
readonly splitId?: string;
|
|
115
80
|
}
|
|
116
81
|
/**
|
|
117
|
-
*
|
|
118
|
-
*
|
|
119
|
-
*
|
|
120
|
-
*
|
|
121
|
-
* taken), so editing one half does not edit the other. Refused inside a transition or a fade (a
|
|
122
|
-
* fade is a ramp from the clip's edge, which neither half could continue), for a clip that is
|
|
123
|
-
* another clip's matte, and for a loop.
|
|
82
|
+
* Splits a clip at `at`. The left part keeps the id, incoming transitions and fade in; the right
|
|
83
|
+
* part becomes `newId` with outgoing transitions, fade out, and its own copy of the composition
|
|
84
|
+
* ({@link copyComposition}). Refused inside a transition or fade, for a matte source, and for a
|
|
85
|
+
* loop.
|
|
124
86
|
*/
|
|
125
87
|
export declare function split(project: Project, clipId: string, at: number, newId: string): EditResult;
|
|
126
88
|
/**
|
|
127
|
-
* Moves one edge of a clip to `to`, keeping
|
|
128
|
-
*
|
|
129
|
-
* source (`outside_source`); a loop's start cannot move.
|
|
89
|
+
* Moves one edge of a clip to `to`, keeping its speed. Refused for an edge in a transition, before
|
|
90
|
+
* the timeline start, past the source (`outside_source`), or at a loop's start.
|
|
130
91
|
*/
|
|
131
92
|
export declare function trim(project: Project, clipId: string, edge: ClipEdge, to: number): EditResult;
|
|
132
93
|
/**
|
|
133
|
-
* Trims like {@link trim} and
|
|
134
|
-
*
|
|
135
|
-
* Trimming the start keeps the clip's start in place and moves its end, so
|
|
136
|
-
* `to` may be before the timeline's start: the head grows by as much as the
|
|
137
|
-
* source has before it.
|
|
94
|
+
* Trims like {@link trim} and shifts later clips on the track by the same amount. A start trim
|
|
95
|
+
* keeps the clip's start in place, so `to` may be before the timeline start.
|
|
138
96
|
*/
|
|
139
97
|
export declare function rippleTrim(project: Project, clipId: string, edge: ClipEdge, to: number, options?: RippleOptions): EditResult;
|
|
140
98
|
/**
|
|
141
|
-
* Removes a clip and its transitions
|
|
142
|
-
*
|
|
143
|
-
* matte, and when a track in `syncTracks` has content in that time.
|
|
99
|
+
* Removes a clip and its transitions and closes the gap ({@link rippleDeleteSpan}). Refused for a
|
|
100
|
+
* matte source, and when a sync track has content in that span.
|
|
144
101
|
*/
|
|
145
102
|
export declare function rippleDelete(project: Project, clipId: string, options?: RippleOptions): EditResult;
|
|
146
103
|
/**
|
|
147
|
-
* The
|
|
148
|
-
*
|
|
149
|
-
*
|
|
150
|
-
* `undefined` for an unknown clip. A host moving its own timeline items (markers) with the delete
|
|
151
|
-
* moves those from `start` on back by its length.
|
|
104
|
+
* The span {@link rippleDelete} closes: the part of the clip's span no other clip on its track
|
|
105
|
+
* shares. Empty when fully covered; `undefined` for an unknown clip. Hosts can use it to move their
|
|
106
|
+
* own timeline items, such as markers.
|
|
152
107
|
*/
|
|
153
108
|
export declare function rippleDeleteSpan(project: Project, clipId: string): TimeRange | undefined;
|
|
154
109
|
/**
|
|
155
|
-
* Moves the cut between
|
|
156
|
-
*
|
|
157
|
-
* span what they did. Refused unless the clips meet, when a transition joins them, and when the cut
|
|
158
|
-
* would empty either.
|
|
110
|
+
* Moves the cut between adjacent clips `leftId` and `rightId` to `at`, each keeping its speed.
|
|
111
|
+
* Refused unless they meet, when a transition joins them, or when either would become empty.
|
|
159
112
|
*/
|
|
160
113
|
export declare function rollTrim(project: Project, leftId: string, rightId: string, at: number): EditResult;
|
|
161
|
-
/**
|
|
114
|
+
/** Allowed deltas, `min` to `max` inclusive, or why there are none. */
|
|
162
115
|
export type EditLimits = {
|
|
163
116
|
readonly ok: true;
|
|
164
117
|
readonly min: number;
|
|
@@ -167,119 +120,89 @@ export type EditLimits = {
|
|
|
167
120
|
readonly ok: false;
|
|
168
121
|
readonly error: EditError;
|
|
169
122
|
};
|
|
170
|
-
/**
|
|
171
|
-
* How far {@link slip} may move a clip's source window, in source ticks: to the source's start one
|
|
172
|
-
* way and to its recorded end the other (unbounded without one).
|
|
173
|
-
*/
|
|
123
|
+
/** Source-tick range {@link slip} allows, bounded by the source's start and recorded end. */
|
|
174
124
|
export declare function slipLimits(project: Project, clipId: string): EditLimits;
|
|
175
125
|
/**
|
|
176
|
-
*
|
|
177
|
-
*
|
|
178
|
-
* composition stay. Refused past the source's start or recorded end.
|
|
126
|
+
* Moves a clip's source window (or a frozen clip's instant) by `delta` source ticks, leaving its
|
|
127
|
+
* timeline placement unchanged. Refused past the source's start or recorded end.
|
|
179
128
|
*/
|
|
180
129
|
export declare function slip(project: Project, clipId: string, delta: number): EditResult;
|
|
181
130
|
/**
|
|
182
|
-
*
|
|
183
|
-
*
|
|
184
|
-
*
|
|
185
|
-
* there, a loop's start); refused (`in_transition`) for a clip in a transition, which slide never
|
|
186
|
-
* moves.
|
|
131
|
+
* Timeline-tick range {@link slide} allows, limited by neighbours becoming empty, reading outside
|
|
132
|
+
* their source or uncovering a transition, and by content across a gap. Only 0 when a neighbour's
|
|
133
|
+
* edge cannot move; refused (`in_transition`) for a clip in a transition.
|
|
187
134
|
*/
|
|
188
135
|
export declare function slideLimits(project: Project, clipId: string): EditLimits;
|
|
189
136
|
/**
|
|
190
|
-
* Moves a clip by `delta
|
|
191
|
-
*
|
|
192
|
-
*
|
|
193
|
-
* gap the clip moves into or leaves. The clip keeps its source window, keyframes (moved with it),
|
|
194
|
-
* and composition. Refused in a transition, when a neighbour would be empty or read outside its
|
|
195
|
-
* source, and past the content across a gap.
|
|
137
|
+
* Moves a clip by `delta`, trimming the adjacent neighbours so the total span is unchanged; a side
|
|
138
|
+
* without an adjacent clip is a gap. The clip keeps its source window and composition. Refused
|
|
139
|
+
* within the limits described by {@link slideLimits}.
|
|
196
140
|
*/
|
|
197
141
|
export declare function slide(project: Project, clipId: string, delta: number): EditResult;
|
|
198
142
|
/** Options for {@link retime}. */
|
|
199
143
|
export interface RetimeOptions extends RippleOptions {
|
|
200
|
-
/**
|
|
201
|
-
* Whether the content after the clip on its track (and on `syncTracks`) moves with the clip's
|
|
202
|
-
* end, keeping its distance; otherwise the clip's end moves alone.
|
|
203
|
-
*/
|
|
144
|
+
/** Whether later content on the track and `syncTracks` moves with the clip's end. */
|
|
204
145
|
readonly ripple?: boolean;
|
|
205
146
|
/**
|
|
206
|
-
*
|
|
207
|
-
*
|
|
208
|
-
* start, and the composition's speed with them.
|
|
147
|
+
* `keep` leaves keyframes, fades and composition time unchanged; `stretch` scales them with the
|
|
148
|
+
* clip from its start.
|
|
209
149
|
*/
|
|
210
150
|
readonly keyframes?: "keep" | "stretch";
|
|
211
|
-
/**
|
|
212
|
-
* Plays the source backwards (`true`) or forwards (`false`); unchanged when absent. Only for
|
|
213
|
-
* clips that play forward or reversed.
|
|
214
|
-
*/
|
|
151
|
+
/** Sets playback direction; unchanged when absent. Only for forward or reversed clips. */
|
|
215
152
|
readonly reverse?: boolean;
|
|
216
153
|
}
|
|
217
154
|
/**
|
|
218
|
-
*
|
|
219
|
-
*
|
|
220
|
-
*
|
|
221
|
-
* passes. Refused when the clip's end is in a transition.
|
|
155
|
+
* Sets a clip's timeline length to `duration`. Forward and reversed clips change speed to fit the
|
|
156
|
+
* same source window; frozen clips hold longer or shorter; loops play more or fewer passes.
|
|
157
|
+
* Refused when the clip's end is in a transition.
|
|
222
158
|
*/
|
|
223
159
|
export declare function retime(project: Project, clipId: string, duration: number, options?: RetimeOptions): EditResult;
|
|
224
160
|
/**
|
|
225
|
-
*
|
|
226
|
-
* `
|
|
227
|
-
* its right part is `splitId`. Refused (`needs_id`) when more than one clip is across `at`, as
|
|
228
|
-
* overlapping audio clips can be.
|
|
161
|
+
* Inserts `clip` at `at`, pushing later content on the track and `syncTracks` by its length. A clip
|
|
162
|
+
* across `at` is split first, its right part becoming `splitId`; `needs_id` when more than one is.
|
|
229
163
|
*/
|
|
230
164
|
export declare function insert(project: Project, trackId: string, clip: Clip, at: number, options?: PlaceOptions): EditResult;
|
|
231
165
|
/**
|
|
232
|
-
*
|
|
233
|
-
*
|
|
234
|
-
*
|
|
235
|
-
*
|
|
236
|
-
* both edges.
|
|
166
|
+
* Places `clip` at `at`, replacing whatever the track shows there. Clips inside are removed, clips
|
|
167
|
+
* across an edge are trimmed, and a clip across both is split (right part `splitId`). Refused where
|
|
168
|
+
* a transition or matte source would be cut, and (`needs_id`) when more than one clip spans both
|
|
169
|
+
* edges.
|
|
237
170
|
*/
|
|
238
171
|
export declare function overwrite(project: Project, trackId: string, clip: Clip, at: number, options?: PlaceOptions): EditResult;
|
|
239
|
-
/**
|
|
172
|
+
/** Places `clip` after the track's last clip, or at 0. */
|
|
240
173
|
export declare function append(project: Project, trackId: string, clip: Clip): EditResult;
|
|
241
|
-
/** Moves a clip to start at `to
|
|
174
|
+
/** Moves a clip to start at `to`. Refused while in a transition. */
|
|
242
175
|
export declare function move(project: Project, clipId: string, to: number): EditResult;
|
|
243
176
|
/**
|
|
244
|
-
* Moves a clip to another track,
|
|
245
|
-
*
|
|
177
|
+
* Moves a clip to another track, at `to` or its current start. Refused while in a transition or
|
|
178
|
+
* onto an incompatible track.
|
|
246
179
|
*/
|
|
247
180
|
export declare function moveToTrack(project: Project, clipId: string, trackId: string, to?: number): EditResult;
|
|
248
|
-
/** Where {@link moveClips} puts one clip. */
|
|
249
181
|
export interface ClipMove {
|
|
250
182
|
readonly clip: string;
|
|
251
|
-
/**
|
|
183
|
+
/** Defaults to the current start. */
|
|
252
184
|
readonly to?: number;
|
|
253
|
-
/**
|
|
185
|
+
/** Defaults to the current track. */
|
|
254
186
|
readonly track?: string;
|
|
255
187
|
}
|
|
256
188
|
/**
|
|
257
|
-
* Moves several clips at once
|
|
258
|
-
*
|
|
259
|
-
* as one whatever order its moves come in. Refused for a clip listed twice (`duplicate_id`), and
|
|
260
|
-
* wherever one of the moves alone is refused.
|
|
189
|
+
* Moves several clips at once. Only the final result is checked, so the order of moves does not
|
|
190
|
+
* matter. Refused for a clip listed twice (`duplicate_id`) or wherever a single move would be.
|
|
261
191
|
*/
|
|
262
192
|
export declare function moveClips(project: Project, moves: readonly ClipMove[]): EditResult;
|
|
263
193
|
/**
|
|
264
|
-
* Runs `run
|
|
265
|
-
*
|
|
266
|
-
*
|
|
267
|
-
* keeps. For a batch of edits valid only as a whole, such as an editor transaction, which then pays
|
|
268
|
-
* for one validation instead of one per edit. `run` is synchronous; nested calls and a throw end
|
|
269
|
-
* the deferral where they began.
|
|
194
|
+
* Runs `run` with {@link validateProject} skipped after each edit. Edits still apply their own
|
|
195
|
+
* checks (`sync_conflict`, `outside_source`, ...); the caller validates the final project. `run` is
|
|
196
|
+
* synchronous and may nest.
|
|
270
197
|
*/
|
|
271
198
|
export declare function deferValidation<T>(run: () => T): T;
|
|
272
199
|
/**
|
|
273
|
-
* `
|
|
274
|
-
*
|
|
275
|
-
*
|
|
276
|
-
*
|
|
277
|
-
*
|
|
278
|
-
*
|
|
279
|
-
* definition drawn twice in it is copied once. Composition sources are Library items, shown as
|
|
280
|
-
* media are, and stay shared. `from` holds the compositions to copy, by default the project's own;
|
|
281
|
-
* a host pasting a clip whose composition the project no longer has passes those it kept. Returns
|
|
282
|
-
* the copy's id, and the id of each copy by its original's.
|
|
200
|
+
* Copies composition `id` and every group definition it draws (recursively) so clip `clipId` can
|
|
201
|
+
* be edited independently. Copies take the first free id of `<root>~<clipId>`, `<root>~<clipId>~2`
|
|
202
|
+
* and so on, where `<root>` is the original's id up to its first `~` after the first character, so
|
|
203
|
+
* repeated splits do not grow ids. Composition sources stay shared. `from` supplies the
|
|
204
|
+
* compositions to copy (default: the project's), for pasting a clip whose composition was removed.
|
|
205
|
+
* Returns the copy's id and a map from original to copy ids.
|
|
283
206
|
*/
|
|
284
207
|
export declare function copyComposition(project: Project, id: string, clipId: string, from?: readonly Composition[]): {
|
|
285
208
|
readonly project: Project;
|