alpha2 0.4.6 → 0.5.1

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 (123) hide show
  1. package/README.md +5 -4
  2. package/THIRD_PARTY_NOTICES.md +4 -0
  3. package/dist/abort.d.ts +12 -0
  4. package/dist/abort.js +48 -0
  5. package/dist/active-clock.d.ts +35 -0
  6. package/dist/active-clock.js +99 -0
  7. package/dist/assets.d.ts +51 -22
  8. package/dist/assets.js +8 -12
  9. package/dist/audio-layout.d.ts +52 -74
  10. package/dist/audio-layout.js +114 -148
  11. package/dist/audio-timeline.d.ts +89 -117
  12. package/dist/audio-timeline.js +102 -118
  13. package/dist/audio-worker.d.ts +12 -21
  14. package/dist/audio-worker.js +8 -13
  15. package/dist/audio-worklet-processor.js +45 -58
  16. package/dist/audio-worklet.d.ts +45 -76
  17. package/dist/audio-worklet.js +44 -79
  18. package/dist/audio.d.ts +15 -23
  19. package/dist/audio.js +9 -13
  20. package/dist/builder.d.ts +45 -63
  21. package/dist/builder.js +49 -45
  22. package/dist/capabilities.d.ts +99 -16
  23. package/dist/capabilities.js +2 -2
  24. package/dist/captions.d.ts +45 -22
  25. package/dist/captions.js +60 -15
  26. package/dist/chroma-siting.d.ts +24 -41
  27. package/dist/chroma-siting.js +38 -71
  28. package/dist/containers.d.ts +41 -30
  29. package/dist/containers.js +59 -27
  30. package/dist/decoder-fallback.d.ts +13 -0
  31. package/dist/decoder-fallback.js +38 -0
  32. package/dist/decoder-order.d.ts +24 -39
  33. package/dist/decoder-order.js +28 -42
  34. package/dist/edit.d.ts +77 -154
  35. package/dist/edit.js +98 -180
  36. package/dist/effects.d.ts +125 -176
  37. package/dist/effects.js +7 -9
  38. package/dist/export-destination.d.ts +25 -41
  39. package/dist/export-destination.js +20 -32
  40. package/dist/export-failure.d.ts +34 -59
  41. package/dist/export-failure.js +54 -48
  42. package/dist/export-metrics.d.ts +116 -0
  43. package/dist/export-metrics.js +74 -0
  44. package/dist/export-retry.d.ts +46 -29
  45. package/dist/export-retry.js +86 -51
  46. package/dist/exporter.d.ts +67 -116
  47. package/dist/exporter.js +133 -133
  48. package/dist/extensions.d.ts +69 -115
  49. package/dist/extensions.js +55 -82
  50. package/dist/frame-intake.d.ts +92 -0
  51. package/dist/frame-intake.js +114 -0
  52. package/dist/frame-supply.d.ts +96 -162
  53. package/dist/frame-supply.js +181 -171
  54. package/dist/frames.d.ts +23 -0
  55. package/dist/frames.js +34 -0
  56. package/dist/generated/project-schema.d.ts +712 -485
  57. package/dist/generated/project-schema.js +55 -2
  58. package/dist/generated/project-shape.js +276 -16
  59. package/dist/geometry.d.ts +28 -34
  60. package/dist/geometry.js +18 -23
  61. package/dist/gpu-recovery.d.ts +92 -0
  62. package/dist/gpu-recovery.js +135 -0
  63. package/dist/hdr-frames.d.ts +82 -67
  64. package/dist/hdr-frames.js +112 -49
  65. package/dist/index.d.ts +6 -0
  66. package/dist/index.js +6 -0
  67. package/dist/json-text.d.ts +13 -23
  68. package/dist/json-text.js +10 -20
  69. package/dist/layout-values.d.ts +14 -22
  70. package/dist/layout-values.js +18 -21
  71. package/dist/layout.d.ts +48 -63
  72. package/dist/layout.js +37 -37
  73. package/dist/loudness.d.ts +27 -32
  74. package/dist/loudness.js +19 -23
  75. package/dist/media.d.ts +85 -237
  76. package/dist/media.js +133 -287
  77. package/dist/mediabunny.d.ts +178 -246
  78. package/dist/mediabunny.js +781 -583
  79. package/dist/paint.d.ts +23 -0
  80. package/dist/paint.js +37 -0
  81. package/dist/physical-frames.d.ts +5 -17
  82. package/dist/physical-frames.js +4 -11
  83. package/dist/player.d.ts +56 -47
  84. package/dist/player.js +155 -40
  85. package/dist/presented-frames.d.ts +2 -7
  86. package/dist/presented-frames.js +3 -8
  87. package/dist/project.d.ts +74 -118
  88. package/dist/project.js +384 -445
  89. package/dist/rate-control.d.ts +9 -23
  90. package/dist/rate-control.js +7 -18
  91. package/dist/renderer-choice.d.ts +41 -0
  92. package/dist/renderer-choice.js +82 -0
  93. package/dist/repacked-bytes.d.ts +0 -2
  94. package/dist/repacked-bytes.js +2 -5
  95. package/dist/robustness.d.ts +25 -37
  96. package/dist/robustness.js +71 -54
  97. package/dist/sha256.d.ts +5 -13
  98. package/dist/sha256.js +9 -24
  99. package/dist/text.d.ts +97 -71
  100. package/dist/text.js +33 -70
  101. package/dist/video-frames.d.ts +7 -25
  102. package/dist/video-frames.js +12 -29
  103. package/dist/waveform.d.ts +5 -11
  104. package/dist/waveform.js +4 -9
  105. package/dist/worker-error.d.ts +5 -20
  106. package/dist/worker-error.js +8 -25
  107. package/dist/worker.d.ts +82 -95
  108. package/dist/worker.js +235 -143
  109. package/package.json +26 -2
  110. package/wasm/alpha2_audio_worklet.wasm +0 -0
  111. package/wasm/alpha2_extensions.d.ts +26 -47
  112. package/wasm/alpha2_extensions.js +26 -47
  113. package/wasm/alpha2_extensions_bg.wasm +0 -0
  114. package/wasm/alpha2_wasm.d.ts +501 -587
  115. package/wasm/alpha2_wasm.js +661 -616
  116. package/wasm/alpha2_wasm_bg.wasm +0 -0
  117. package/wasm/alpha2_wasm_bg.wasm.d.ts +22 -12
  118. package/wasm/rust-crate-licenses.md +2 -2
  119. package/wasm/snippets/{alpha2-wasm-c62e60c964e88a52 → alpha2-wasm-070d94113471ef0a}/inline1.js +1 -0
  120. package/wasm/snippets/alpha2-wasm-070d94113471ef0a/inline2.js +82 -0
  121. package/wasm/snippets/alpha2-wasm-c62e60c964e88a52/inline2.js +0 -52
  122. /package/wasm/snippets/{alpha2-wasm-c62e60c964e88a52 → alpha2-wasm-070d94113471ef0a}/inline0.js +0 -0
  123. /package/wasm/snippets/{alpha2-wasm-c62e60c964e88a52 → alpha2-wasm-070d94113471ef0a}/inline3.js +0 -0
package/dist/edit.d.ts CHANGED
@@ -1,44 +1,25 @@
1
1
  /**
2
- * Document editing operations: split, trim, ripple, roll, slip, slide,
3
- * retime, move (one clip or several at once), and the three ways to put a
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 operation keeps the document's invariants the way the engine
8
- * specifies them (the cases in `tests/cases/edit-corpus.json`), returns a
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 across an edit: the source range
14
- * follows the clip's own mapping, so a reversed clip trimmed at its start
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. Moving a clip keeps its offset,
18
- * so the composition's animation moves with it; trimming its start by `delta`
19
- * adds `delta * scale` to the offset, so what remains stays where it was; and
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
- * A source's length is what its fingerprint records (`duration_ticks`); an
25
- * edit that would read past it, or before the source's start, is refused
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 (`insert`, `rippleTrim`, `rippleDelete`) move later content on
30
- * the edited track and, with `syncTracks`, on those tracks too, by the same
31
- * amount, so their events keep their offsets to each other. A participating
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
- * Times, deltas, and durations are whole ticks; any other number is refused
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 putting a clip down where another must be cut in two. */
76
+ /** Options for placing a clip where another must be split. */
112
77
  export interface PlaceOptions extends RippleOptions {
113
- /** The id for the part of a clip the new one cuts off. */
78
+ /** Id for the split-off part of an existing clip. */
114
79
  readonly splitId?: string;
115
80
  }
116
81
  /**
117
- * Cuts a clip in two at `at`. The left part keeps the clip's id, its incoming transitions, and its
118
- * fade in; the right part is `newId`, with its outgoing transitions and fade out. The right part
119
- * shows a copy of the clip's composition and of the group definitions it draws ({@link
120
- * copyComposition}), each copy's id the original's root and `newId` joined by `~` (numbered if
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 the clip's speed. Refused when the edge is in a
128
- * transition, before the timeline's start, and where the clip would read further outside its
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 moves the clips after the trimmed edge on the
134
- * same track by the same amount, so nothing after it gains or loses a gap.
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, and moves the clips after it on the same track back by the
142
- * time it alone occupied ({@link rippleDeleteSpan}). Refused for a clip that is another clip's
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 time {@link rippleDelete} closes for clip `clipId`: the part of its span no other clip on its
148
- * track shares, from where the clips that start before it end (an incoming dissolve's overlap is
149
- * shared) to where the next clip starts. Empty (`start === end`) when other clips cover it all;
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 clip `leftId` and the clip `rightId` that starts where it ends to `at`: the
156
- * left clip ends there and the right one starts there, each keeping its speed, so the two together
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
- /** The deltas an edit may move by, from `min` to `max` inclusive, or why there are none. */
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
- * Shows another part of a clip's source in the same place: its source window, and a frozen clip's
177
- * instant, move by `delta` source ticks; the clip's place, length, speed, keyframes, and
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
- * How far {@link slide} may move a clip, in timeline ticks: until a neighbour it meets would be
183
- * empty, read outside its source, or uncover a transition at its far edge, or until it reaches the
184
- * content across a gap. Nothing but 0 when a neighbour's edge it trims cannot move (a transition
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` between its neighbours, which give and take the time: a clip that ends
191
- * where it starts is trimmed at its end, and one that starts where it ends at its start, each
192
- * keeping its speed, so the three together span what they did. A side with no clip meeting it is a
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
- * The clip's keyframes, fades, and composition time: `keep` leaves them in timeline time, where
207
- * they are, and the composition at its own speed; `stretch` scales them with the clip from its
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
- * Gives a clip a new length on the timeline, `duration` ticks from where it starts. A clip that
219
- * plays forward or reversed plays its whole source window over it, so its speed becomes the ratio
220
- * of the two; a frozen clip holds its instant longer or shorter, and a loop plays more or fewer
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
- * Puts `clip` on track `trackId` at `at` and moves everything from `at` on, on that track and on
226
- * `syncTracks`, later by its length. A clip across `at` on the target track is split there first;
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
- * Puts `clip` on track `trackId` at `at` in place of whatever that track shows there: clips inside
233
- * the range are removed, clips across its edges are trimmed back to it (one across both is split;
234
- * its right part is `splitId`). Nothing moves and no other track changes. Refused where a
235
- * transition or a matte source would be cut, and (`needs_id`) when more than one clip is across
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
- /** Puts `clip` on track `trackId` right after the last clip there, or at 0. */
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` on its track. Refused while in a transition. */
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, starting at `to` (by default where it starts now). Refused while
245
- * in a transition, and onto a track whose kind does not take its source.
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
- /** Where the clip starts; where it starts now when left out. */
183
+ /** Defaults to the current start. */
252
184
  readonly to?: number;
253
- /** The track it goes to; its own when left out. */
185
+ /** Defaults to the current track. */
254
186
  readonly track?: string;
255
187
  }
256
188
  /**
257
- * Moves several clips at once, each as {@link move} or {@link moveToTrack} would. Only the result
258
- * is checked, so clips that move together may pass through where the others were: a selection moves
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`, in which the edits do not check their results with {@link validateProject}: each
265
- * still refuses what it refuses itself (`sync_conflict`, `outside_source`, ...), but returns the
266
- * project it made even when that breaks a model rule, and the caller validates the project it
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
- * `project` with a copy of composition `id` for clip `clipId` to show, so that editing the clip's
274
- * graph edits no other clip's: the composition and every group definition it draws, through group
275
- * nodes inside group definitions too, each under the first free id of `<root>~<clipId>`,
276
- * `<root>~<clipId>~2`, and so on, where `<root>` is the original's id up to its first `~` after
277
- * the first character (a copy of a copy is named from the same root, so ids stay as long however
278
- * often a clip's right part is split again), with the copies' group nodes drawing the copies. A
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;