@shotstack/shotstack-studio 2.0.0-beta.19 → 2.0.0-beta.20
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 +50 -34
- package/dist/internal.es.js +13605 -10222
- package/dist/internal.umd.js +74 -36
- package/dist/schema/index.cjs +1 -1
- package/dist/schema/index.d.ts +50 -34
- package/dist/schema/index.mjs +1091 -877
- package/dist/shotstack-studio.es.js +18540 -14869
- package/dist/shotstack-studio.umd.js +248 -198
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ import { cropSchema as CropSchema } from '@shotstack/schemas/zod';
|
|
|
7
7
|
import { editSchema as EditSchema } from '@shotstack/schemas/zod';
|
|
8
8
|
import { htmlAssetSchema as HtmlAssetSchema } from '@shotstack/schemas/zod';
|
|
9
9
|
import { imageAssetSchema as ImageAssetSchema } from '@shotstack/schemas/zod';
|
|
10
|
+
import { imageToVideoAssetSchema as ImageToVideoAssetSchema } from '@shotstack/schemas/zod';
|
|
10
11
|
import { lumaAssetSchema as LumaAssetSchema } from '@shotstack/schemas/zod';
|
|
11
12
|
import { offsetSchema as OffsetSchema } from '@shotstack/schemas/zod';
|
|
12
13
|
import { outputSchema as OutputSchema } from '@shotstack/schemas/zod';
|
|
@@ -14,6 +15,8 @@ import * as pixi from 'pixi.js';
|
|
|
14
15
|
import { richTextAssetSchema as RichTextAssetSchema } from '@shotstack/schemas/zod';
|
|
15
16
|
import { shapeAssetSchema as ShapeAssetSchema } from '@shotstack/schemas/zod';
|
|
16
17
|
import { textAssetSchema as TextAssetSchema } from '@shotstack/schemas/zod';
|
|
18
|
+
import { textToImageAssetSchema as TextToImageAssetSchema } from '@shotstack/schemas/zod';
|
|
19
|
+
import { textToSpeechAssetSchema as TextToSpeechAssetSchema } from '@shotstack/schemas/zod';
|
|
17
20
|
import { timelineSchema as TimelineSchema } from '@shotstack/schemas/zod';
|
|
18
21
|
import { trackSchema as TrackSchema } from '@shotstack/schemas/zod';
|
|
19
22
|
import { transformationSchema as TransformationSchema } from '@shotstack/schemas/zod';
|
|
@@ -138,6 +141,7 @@ export declare class Canvas {
|
|
|
138
141
|
private background?;
|
|
139
142
|
private timeline?;
|
|
140
143
|
private uiController;
|
|
144
|
+
private alignmentGuides;
|
|
141
145
|
private minZoom;
|
|
142
146
|
private maxZoom;
|
|
143
147
|
private currentZoom;
|
|
@@ -146,11 +150,6 @@ export declare class Canvas {
|
|
|
146
150
|
private onWheelBound;
|
|
147
151
|
private canvasRoot;
|
|
148
152
|
constructor(edit: Edit);
|
|
149
|
-
/**
|
|
150
|
-
* Register a UIController to receive tick updates for canvas overlays.
|
|
151
|
-
* @deprecated Use `new UIController(edit, canvas)` instead - auto-registers.
|
|
152
|
-
*/
|
|
153
|
-
registerUIController(controller: UIController): void;
|
|
154
153
|
load(): Promise<void>;
|
|
155
154
|
private setupTouchHandling;
|
|
156
155
|
private onWheel;
|
|
@@ -310,8 +309,13 @@ export declare type ClipLocation = {
|
|
|
310
309
|
clipIndex: number;
|
|
311
310
|
};
|
|
312
311
|
|
|
312
|
+
/**
|
|
313
|
+
* Reference to a clip from the document (source of truth).
|
|
314
|
+
* Contains original timing values like "auto", "end", and alias references.
|
|
315
|
+
* Used in public SDK events so consumers see the document state.
|
|
316
|
+
*/
|
|
313
317
|
export declare type ClipReference = ClipLocation & {
|
|
314
|
-
clip:
|
|
318
|
+
clip: Clip;
|
|
315
319
|
};
|
|
316
320
|
|
|
317
321
|
/** Custom clip renderer interface */
|
|
@@ -443,20 +447,17 @@ export declare class Edit {
|
|
|
443
447
|
private static readonly MAX_HISTORY_SIZE;
|
|
444
448
|
private document;
|
|
445
449
|
private backgroundColor;
|
|
446
|
-
private edit;
|
|
447
450
|
private tracks;
|
|
448
451
|
playbackTime: Seconds;
|
|
449
452
|
totalDuration: Seconds;
|
|
450
453
|
isPlaying: boolean;
|
|
451
454
|
private get clips();
|
|
452
|
-
private get endLengthClips();
|
|
453
|
-
private cachedTimelineEnd;
|
|
454
455
|
private canvas;
|
|
456
|
+
private timingManager;
|
|
455
457
|
private lumaMaskController;
|
|
456
458
|
private playerReconciler;
|
|
457
459
|
private outputSettings;
|
|
458
460
|
private selectionManager;
|
|
459
|
-
private alignmentGuides;
|
|
460
461
|
private commandHistory;
|
|
461
462
|
private commandIndex;
|
|
462
463
|
private commandQueue;
|
|
@@ -467,6 +468,7 @@ export declare class Edit {
|
|
|
467
468
|
private isBatchingEvents;
|
|
468
469
|
private syncCorrectionCount;
|
|
469
470
|
private isExporting;
|
|
471
|
+
private lastResolved;
|
|
470
472
|
/**
|
|
471
473
|
* Create an Edit instance from a template configuration.
|
|
472
474
|
*/
|
|
@@ -499,7 +501,6 @@ export declare class Edit {
|
|
|
499
501
|
message: string;
|
|
500
502
|
}>;
|
|
501
503
|
};
|
|
502
|
-
getResolvedEdit(): ResolvedEdit;
|
|
503
504
|
addClip(trackIdx: number, clip: Clip): void | Promise<void>;
|
|
504
505
|
getClip(trackIdx: number, clipIdx: number): Clip | null;
|
|
505
506
|
/**
|
|
@@ -532,6 +533,12 @@ export declare class Edit {
|
|
|
532
533
|
private detectBindingsInObject;
|
|
533
534
|
/**
|
|
534
535
|
* Checks if edit has structural changes requiring full reload.
|
|
536
|
+
*
|
|
537
|
+
* TODO: Expand granular path to handle more cases:
|
|
538
|
+
* - Clip add/remove: Use existing addClip()/deleteClip() commands
|
|
539
|
+
* - Soundtrack changes: Add/remove AudioPlayer via commands
|
|
540
|
+
* - Font changes: Load new fonts incrementally
|
|
541
|
+
* - Merge field changes: Re-resolve affected clips
|
|
535
542
|
*/
|
|
536
543
|
private hasStructuralChanges;
|
|
537
544
|
/**
|
|
@@ -540,6 +547,9 @@ export declare class Edit {
|
|
|
540
547
|
private preserveClipIdsForGranularUpdate;
|
|
541
548
|
/**
|
|
542
549
|
* Applies granular changes without full reload.
|
|
550
|
+
* @param newEdit - The new edit configuration
|
|
551
|
+
* @param oldTracks - The old tracks (captured before document update)
|
|
552
|
+
* @param oldOutput - The old output settings (captured before document update)
|
|
543
553
|
*/
|
|
544
554
|
private applyGranularChanges;
|
|
545
555
|
private queueDisposeClip;
|
|
@@ -553,8 +563,6 @@ export declare class Edit {
|
|
|
553
563
|
private extractFilenameFromUrl;
|
|
554
564
|
private disposeClip;
|
|
555
565
|
private unloadClipAssets;
|
|
556
|
-
private updateTotalDuration;
|
|
557
|
-
private resolveAllTiming;
|
|
558
566
|
private movePlayerToTrackContainer;
|
|
559
567
|
private addPlayer;
|
|
560
568
|
setOutputSize(width: number, height: number): Promise<void>;
|
|
@@ -608,9 +616,6 @@ export declare class Edit {
|
|
|
608
616
|
|
|
609
617
|
declare type Edit_2 = components["schemas"]["Edit"];
|
|
610
618
|
|
|
611
|
-
/** Alias for Edit type to avoid conflicts with SDK's Edit class */
|
|
612
|
-
export declare type EditConfig = Edit_2;
|
|
613
|
-
|
|
614
619
|
export declare const EditEvent: {
|
|
615
620
|
readonly PlaybackPlay: "playback:play";
|
|
616
621
|
readonly PlaybackPause: "playback:pause";
|
|
@@ -624,6 +629,7 @@ export declare const EditEvent: {
|
|
|
624
629
|
readonly ClipRestored: "clip:restored";
|
|
625
630
|
readonly ClipCopied: "clip:copied";
|
|
626
631
|
readonly ClipLoadFailed: "clip:loadFailed";
|
|
632
|
+
readonly ClipUnresolved: "clip:unresolved";
|
|
627
633
|
readonly SelectionCleared: "selection:cleared";
|
|
628
634
|
readonly EditChanged: "edit:changed";
|
|
629
635
|
readonly EditUndo: "edit:undo";
|
|
@@ -652,8 +658,9 @@ export declare const EditEvent: {
|
|
|
652
658
|
export declare type EditEventMap = {
|
|
653
659
|
[EditEvent.PlaybackPlay]: void;
|
|
654
660
|
[EditEvent.PlaybackPause]: void;
|
|
661
|
+
/** Contains the document (source of truth) with original timing values like "auto", "end" */
|
|
655
662
|
[EditEvent.TimelineUpdated]: {
|
|
656
|
-
current:
|
|
663
|
+
current: Edit_2;
|
|
657
664
|
};
|
|
658
665
|
[EditEvent.TimelineBackgroundChanged]: {
|
|
659
666
|
color: string;
|
|
@@ -676,6 +683,10 @@ export declare type EditEventMap = {
|
|
|
676
683
|
error: string;
|
|
677
684
|
assetType: string;
|
|
678
685
|
};
|
|
686
|
+
[EditEvent.ClipUnresolved]: ClipLocation & {
|
|
687
|
+
assetType: string;
|
|
688
|
+
clipId: string;
|
|
689
|
+
};
|
|
679
690
|
[EditEvent.SelectionCleared]: void;
|
|
680
691
|
[EditEvent.EditChanged]: {
|
|
681
692
|
source: string;
|
|
@@ -702,19 +713,19 @@ export declare type EditEventMap = {
|
|
|
702
713
|
height: number;
|
|
703
714
|
};
|
|
704
715
|
[EditEvent.OutputResolutionChanged]: {
|
|
705
|
-
resolution:
|
|
716
|
+
resolution: Output["resolution"];
|
|
706
717
|
};
|
|
707
718
|
[EditEvent.OutputAspectRatioChanged]: {
|
|
708
|
-
aspectRatio:
|
|
719
|
+
aspectRatio: Output["aspectRatio"];
|
|
709
720
|
};
|
|
710
721
|
[EditEvent.OutputFpsChanged]: {
|
|
711
722
|
fps: number;
|
|
712
723
|
};
|
|
713
724
|
[EditEvent.OutputFormatChanged]: {
|
|
714
|
-
format:
|
|
725
|
+
format: Output["format"];
|
|
715
726
|
};
|
|
716
727
|
[EditEvent.OutputDestinationsChanged]: {
|
|
717
|
-
destinations:
|
|
728
|
+
destinations: Destination[];
|
|
718
729
|
};
|
|
719
730
|
[EditEvent.MergeFieldRegistered]: {
|
|
720
731
|
field: MergeField_2;
|
|
@@ -792,6 +803,10 @@ export declare type ImageAsset = components["schemas"]["ImageAsset"];
|
|
|
792
803
|
|
|
793
804
|
export { ImageAssetSchema }
|
|
794
805
|
|
|
806
|
+
export declare type ImageToVideoAsset = components["schemas"]["ImageToVideoAsset"];
|
|
807
|
+
|
|
808
|
+
export { ImageToVideoAssetSchema }
|
|
809
|
+
|
|
795
810
|
/**
|
|
796
811
|
* Inspector displays performance stats as an HTML overlay.
|
|
797
812
|
* Shows FPS, memory, playback health, and clip statistics.
|
|
@@ -1006,27 +1021,18 @@ export declare const OutputResolutionSchema: z.ZodOptional<z.ZodEnum<{
|
|
|
1006
1021
|
export { OutputSchema }
|
|
1007
1022
|
|
|
1008
1023
|
export declare const OutputSizeSchema: z.ZodObject<{
|
|
1009
|
-
width: z.ZodOptional<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodNumber>>;
|
|
1010
|
-
height: z.ZodOptional<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodNumber>>;
|
|
1024
|
+
width: z.ZodOptional<z.ZodUnion<readonly [z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodNumber>, z.ZodString]>>;
|
|
1025
|
+
height: z.ZodOptional<z.ZodUnion<readonly [z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodNumber>, z.ZodString]>>;
|
|
1011
1026
|
}, z.core.$strip>;
|
|
1012
1027
|
|
|
1013
1028
|
declare type ResolutionChangeCallback = (width: number, height: number) => void;
|
|
1014
1029
|
|
|
1015
1030
|
declare type ResolvedClip = Omit<Clip, "start" | "length"> & {
|
|
1031
|
+
id: string;
|
|
1016
1032
|
start: Seconds;
|
|
1017
1033
|
length: Seconds;
|
|
1018
1034
|
};
|
|
1019
1035
|
|
|
1020
|
-
declare type ResolvedEdit = Omit<Edit_2, "timeline"> & {
|
|
1021
|
-
timeline: Omit<Edit_2["timeline"], "tracks"> & {
|
|
1022
|
-
tracks: ResolvedTrack[];
|
|
1023
|
-
};
|
|
1024
|
-
};
|
|
1025
|
-
|
|
1026
|
-
declare type ResolvedTrack = {
|
|
1027
|
-
clips: ResolvedClip[];
|
|
1028
|
-
};
|
|
1029
|
-
|
|
1030
1036
|
export declare type RichTextAsset = components["schemas"]["RichTextAsset"];
|
|
1031
1037
|
|
|
1032
1038
|
export { RichTextAssetSchema }
|
|
@@ -1240,6 +1246,10 @@ export declare type TextAsset = components["schemas"]["TextAsset"];
|
|
|
1240
1246
|
|
|
1241
1247
|
export { TextAssetSchema }
|
|
1242
1248
|
|
|
1249
|
+
export declare type TextToImageAsset = components["schemas"]["TextToImageAsset"];
|
|
1250
|
+
|
|
1251
|
+
export { TextToImageAssetSchema }
|
|
1252
|
+
|
|
1243
1253
|
export declare class TextToolbar extends BaseToolbar {
|
|
1244
1254
|
private textEditBtn;
|
|
1245
1255
|
private textEditPopup;
|
|
@@ -1310,6 +1320,10 @@ export declare class TextToolbar extends BaseToolbar {
|
|
|
1310
1320
|
dispose(): void;
|
|
1311
1321
|
}
|
|
1312
1322
|
|
|
1323
|
+
export declare type TextToSpeechAsset = components["schemas"]["TextToSpeechAsset"];
|
|
1324
|
+
|
|
1325
|
+
export { TextToSpeechAssetSchema }
|
|
1326
|
+
|
|
1313
1327
|
export declare class Timeline {
|
|
1314
1328
|
private readonly edit;
|
|
1315
1329
|
readonly element: HTMLElement;
|
|
@@ -1543,7 +1557,6 @@ export declare class TranscriptionIndicator extends Entity {
|
|
|
1543
1557
|
hide(): void;
|
|
1544
1558
|
getIsVisible(): boolean;
|
|
1545
1559
|
update(deltaTime: number, _elapsed: number): void;
|
|
1546
|
-
draw(): void;
|
|
1547
1560
|
private redraw;
|
|
1548
1561
|
setPosition(x: number, y: number): void;
|
|
1549
1562
|
getWidth(): number;
|
|
@@ -1813,6 +1826,9 @@ export declare interface UIRegistration {
|
|
|
1813
1826
|
dispose(): void;
|
|
1814
1827
|
}
|
|
1815
1828
|
|
|
1829
|
+
/** Alias for Edit type - represents an edit before timing values are resolved */
|
|
1830
|
+
export declare type UnresolvedEdit = Edit_2;
|
|
1831
|
+
|
|
1816
1832
|
export declare const VERSION: string;
|
|
1817
1833
|
|
|
1818
1834
|
export declare type VideoAsset = components["schemas"]["VideoAsset"];
|