@shotstack/shotstack-studio 2.10.0 → 2.10.2
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/index.d.ts +58 -1
- package/dist/internal.d.ts +51 -1
- package/dist/internal.es.js +4624 -4368
- package/dist/internal.umd.js +109 -61
- package/dist/shotstack-studio.es.js +11039 -10853
- package/dist/shotstack-studio.umd.js +221 -173
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -47,6 +47,13 @@ export declare class Canvas {
|
|
|
47
47
|
resize(): void;
|
|
48
48
|
setZoom(zoom: number): void;
|
|
49
49
|
getZoom(): number;
|
|
50
|
+
/**
|
|
51
|
+
* Capture the current canvas content as a base64-encoded data URL.
|
|
52
|
+
*/
|
|
53
|
+
captureFrame(options?: {
|
|
54
|
+
format?: "png" | "jpeg" | "webp";
|
|
55
|
+
quality?: number;
|
|
56
|
+
}): Promise<string>;
|
|
50
57
|
/**
|
|
51
58
|
* Sync overlay container and toolbar positions after content transforms change.
|
|
52
59
|
* Single point of update for all position-dependent UI elements.
|
|
@@ -155,7 +162,36 @@ export declare class Edit {
|
|
|
155
162
|
*/
|
|
156
163
|
loadEdit(edit: Edit_2): Promise<void>;
|
|
157
164
|
private loadSoundtrack;
|
|
158
|
-
|
|
165
|
+
/**
|
|
166
|
+
* Serialise the current edit to plain JSON.
|
|
167
|
+
*/
|
|
168
|
+
getEdit(options?: {
|
|
169
|
+
includeIds?: boolean;
|
|
170
|
+
}): Edit_2;
|
|
171
|
+
/**
|
|
172
|
+
* Look up a clip by its stable ID.
|
|
173
|
+
* @returns The clip or null if no clip with that ID exists.
|
|
174
|
+
*/
|
|
175
|
+
getClipById(clipId: string): Clip | null;
|
|
176
|
+
/**
|
|
177
|
+
* Look up the (trackIndex, clipIndex) position of a clip by its stable ID.
|
|
178
|
+
*/
|
|
179
|
+
getClipPositionById(clipId: string): {
|
|
180
|
+
trackIndex: number;
|
|
181
|
+
clipIndex: number;
|
|
182
|
+
} | null;
|
|
183
|
+
/**
|
|
184
|
+
* Patch fields on a clip identified by stable ID.
|
|
185
|
+
*/
|
|
186
|
+
updateClipById(clipId: string, updates: Partial<Clip>): Promise<void>;
|
|
187
|
+
/**
|
|
188
|
+
* Remove a clip identified by stable ID.
|
|
189
|
+
*/
|
|
190
|
+
deleteClipById(clipId: string): Promise<void>;
|
|
191
|
+
/**
|
|
192
|
+
* Move a clip identified by stable ID to a different track and/or start time.
|
|
193
|
+
*/
|
|
194
|
+
moveClipById(clipId: string, toTrackIndex: number, newStart?: Seconds): Promise<void>;
|
|
159
195
|
addClip(trackIdx: number, clip: Clip): void | Promise<void>;
|
|
160
196
|
addSvgClip(svgMarkup: string, opts?: {
|
|
161
197
|
trackIndex?: number;
|
|
@@ -253,6 +289,27 @@ export declare class Edit {
|
|
|
253
289
|
setOutputResolution(resolution: string): Promise<void>;
|
|
254
290
|
getOutputResolution(): string | undefined;
|
|
255
291
|
setOutputAspectRatio(aspectRatio: string): Promise<void>;
|
|
292
|
+
/**
|
|
293
|
+
* Capture the current canvas as a base64 data URL.
|
|
294
|
+
*/
|
|
295
|
+
captureFrame(options?: {
|
|
296
|
+
time?: number;
|
|
297
|
+
format?: "png" | "jpeg" | "webp";
|
|
298
|
+
quality?: number;
|
|
299
|
+
}): Promise<string>;
|
|
300
|
+
/**
|
|
301
|
+
* Atomically apply multiple output settings.
|
|
302
|
+
*/
|
|
303
|
+
setOutput(options: {
|
|
304
|
+
size?: {
|
|
305
|
+
width: number;
|
|
306
|
+
height: number;
|
|
307
|
+
};
|
|
308
|
+
resolution?: string;
|
|
309
|
+
format?: string;
|
|
310
|
+
fps?: number;
|
|
311
|
+
aspectRatio?: string;
|
|
312
|
+
}): Promise<void>;
|
|
256
313
|
getOutputAspectRatio(): string | undefined;
|
|
257
314
|
setTimelineBackground(color: string): Promise<void>;
|
|
258
315
|
private setTimelineBackgroundInternal;
|
package/dist/internal.d.ts
CHANGED
|
@@ -67,7 +67,36 @@ export declare class Edit {
|
|
|
67
67
|
*/
|
|
68
68
|
loadEdit(edit: Edit_2): Promise<void>;
|
|
69
69
|
private loadSoundtrack;
|
|
70
|
-
|
|
70
|
+
/**
|
|
71
|
+
* Serialise the current edit to plain JSON.
|
|
72
|
+
*/
|
|
73
|
+
getEdit(options?: {
|
|
74
|
+
includeIds?: boolean;
|
|
75
|
+
}): Edit_2;
|
|
76
|
+
/**
|
|
77
|
+
* Look up a clip by its stable ID.
|
|
78
|
+
* @returns The clip or null if no clip with that ID exists.
|
|
79
|
+
*/
|
|
80
|
+
getClipById(clipId: string): Clip | null;
|
|
81
|
+
/**
|
|
82
|
+
* Look up the (trackIndex, clipIndex) position of a clip by its stable ID.
|
|
83
|
+
*/
|
|
84
|
+
getClipPositionById(clipId: string): {
|
|
85
|
+
trackIndex: number;
|
|
86
|
+
clipIndex: number;
|
|
87
|
+
} | null;
|
|
88
|
+
/**
|
|
89
|
+
* Patch fields on a clip identified by stable ID.
|
|
90
|
+
*/
|
|
91
|
+
updateClipById(clipId: string, updates: Partial<Clip>): Promise<void>;
|
|
92
|
+
/**
|
|
93
|
+
* Remove a clip identified by stable ID.
|
|
94
|
+
*/
|
|
95
|
+
deleteClipById(clipId: string): Promise<void>;
|
|
96
|
+
/**
|
|
97
|
+
* Move a clip identified by stable ID to a different track and/or start time.
|
|
98
|
+
*/
|
|
99
|
+
moveClipById(clipId: string, toTrackIndex: number, newStart?: Seconds): Promise<void>;
|
|
71
100
|
addClip(trackIdx: number, clip: Clip): void | Promise<void>;
|
|
72
101
|
addSvgClip(svgMarkup: string, opts?: {
|
|
73
102
|
trackIndex?: number;
|
|
@@ -165,6 +194,27 @@ export declare class Edit {
|
|
|
165
194
|
setOutputResolution(resolution: string): Promise<void>;
|
|
166
195
|
getOutputResolution(): string | undefined;
|
|
167
196
|
setOutputAspectRatio(aspectRatio: string): Promise<void>;
|
|
197
|
+
/**
|
|
198
|
+
* Capture the current canvas as a base64 data URL.
|
|
199
|
+
*/
|
|
200
|
+
captureFrame(options?: {
|
|
201
|
+
time?: number;
|
|
202
|
+
format?: "png" | "jpeg" | "webp";
|
|
203
|
+
quality?: number;
|
|
204
|
+
}): Promise<string>;
|
|
205
|
+
/**
|
|
206
|
+
* Atomically apply multiple output settings.
|
|
207
|
+
*/
|
|
208
|
+
setOutput(options: {
|
|
209
|
+
size?: {
|
|
210
|
+
width: number;
|
|
211
|
+
height: number;
|
|
212
|
+
};
|
|
213
|
+
resolution?: string;
|
|
214
|
+
format?: string;
|
|
215
|
+
fps?: number;
|
|
216
|
+
aspectRatio?: string;
|
|
217
|
+
}): Promise<void>;
|
|
168
218
|
getOutputAspectRatio(): string | undefined;
|
|
169
219
|
setTimelineBackground(color: string): Promise<void>;
|
|
170
220
|
private setTimelineBackgroundInternal;
|