@shotstack/shotstack-studio 1.1.0 → 1.1.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.
- package/dist/core/schemas/asset.d.ts +6 -10
- package/dist/core/schemas/audio-asset.d.ts +6 -10
- package/dist/core/schemas/clip.d.ts +21 -35
- package/dist/core/schemas/edit.d.ts +42 -70
- package/dist/core/schemas/track.d.ts +21 -35
- package/dist/core/schemas/video-asset.d.ts +6 -10
- package/dist/shotstack-studio.es.js +2 -4
- package/dist/shotstack-studio.umd.js +3 -3
- package/package.json +1 -1
- package/readme.md +42 -7
|
@@ -329,17 +329,15 @@ export declare const TrackSchema: zod.ZodObject<{
|
|
|
329
329
|
bottom?: number | undefined;
|
|
330
330
|
left?: number | undefined;
|
|
331
331
|
}>>;
|
|
332
|
-
volume: zod.ZodOptional<zod.ZodUnion<[zod.ZodArray<zod.ZodObject<
|
|
333
|
-
from: zod.ZodNumber;
|
|
334
|
-
to: zod.ZodNumber;
|
|
332
|
+
volume: zod.ZodOptional<zod.ZodUnion<[zod.ZodArray<zod.ZodObject<{
|
|
335
333
|
start: zod.ZodNumber;
|
|
336
334
|
length: zod.ZodNumber;
|
|
337
335
|
interpolation: zod.ZodOptional<zod.ZodEnum<["linear", "bezier", "constant"]>>;
|
|
338
336
|
easing: zod.ZodOptional<zod.ZodEnum<["ease", "easeIn", "easeOut", "easeInOut", "easeInQuad", "easeInCubic", "easeInQuart", "easeInQuint", "easeInSine", "easeInExpo", "easeInCirc", "easeInBack", "easeOutQuad", "easeOutCubic", "easeOutQuart", "easeOutQuint", "easeOutSine", "easeOutExpo", "easeOutCirc", "easeOutBack", "easeInOutQuad", "easeInOutCubic", "easeInOutQuart", "easeInOutQuint", "easeInOutSine", "easeInOutExpo", "easeInOutCirc", "easeInOutBack"]>>;
|
|
339
|
-
}
|
|
337
|
+
} & {
|
|
340
338
|
from: zod.ZodNumber;
|
|
341
339
|
to: zod.ZodNumber;
|
|
342
|
-
}
|
|
340
|
+
}, "strip", zod.ZodTypeAny, {
|
|
343
341
|
length: number;
|
|
344
342
|
from: number;
|
|
345
343
|
to: number;
|
|
@@ -403,17 +401,15 @@ export declare const TrackSchema: zod.ZodObject<{
|
|
|
403
401
|
type: zod.ZodLiteral<"audio">;
|
|
404
402
|
src: zod.ZodString;
|
|
405
403
|
trim: zod.ZodOptional<zod.ZodNumber>;
|
|
406
|
-
volume: zod.ZodOptional<zod.ZodUnion<[zod.ZodArray<zod.ZodObject<
|
|
407
|
-
from: zod.ZodNumber;
|
|
408
|
-
to: zod.ZodNumber;
|
|
404
|
+
volume: zod.ZodOptional<zod.ZodUnion<[zod.ZodArray<zod.ZodObject<{
|
|
409
405
|
start: zod.ZodNumber;
|
|
410
406
|
length: zod.ZodNumber;
|
|
411
407
|
interpolation: zod.ZodOptional<zod.ZodEnum<["linear", "bezier", "constant"]>>;
|
|
412
408
|
easing: zod.ZodOptional<zod.ZodEnum<["ease", "easeIn", "easeOut", "easeInOut", "easeInQuad", "easeInCubic", "easeInQuart", "easeInQuint", "easeInSine", "easeInExpo", "easeInCirc", "easeInBack", "easeOutQuad", "easeOutCubic", "easeOutQuart", "easeOutQuint", "easeOutSine", "easeOutExpo", "easeOutCirc", "easeOutBack", "easeInOutQuad", "easeInOutCubic", "easeInOutQuart", "easeInOutQuint", "easeInOutSine", "easeInOutExpo", "easeInOutCirc", "easeInOutBack"]>>;
|
|
413
|
-
}
|
|
409
|
+
} & {
|
|
414
410
|
from: zod.ZodNumber;
|
|
415
411
|
to: zod.ZodNumber;
|
|
416
|
-
}
|
|
412
|
+
}, "strip", zod.ZodTypeAny, {
|
|
417
413
|
length: number;
|
|
418
414
|
from: number;
|
|
419
415
|
to: number;
|
|
@@ -652,17 +648,15 @@ export declare const TrackSchema: zod.ZodObject<{
|
|
|
652
648
|
position: zod.ZodOptional<zod.ZodDefault<zod.ZodEnum<["topLeft", "top", "topRight", "left", "center", "right", "bottomLeft", "bottom", "bottomRight"]>>>;
|
|
653
649
|
fit: zod.ZodOptional<zod.ZodDefault<zod.ZodEnum<["crop", "cover", "contain", "none"]>>>;
|
|
654
650
|
offset: zod.ZodOptional<zod.ZodDefault<zod.ZodObject<{
|
|
655
|
-
x: zod.ZodDefault<zod.ZodUnion<[zod.ZodArray<zod.ZodObject<
|
|
656
|
-
from: zod.ZodNumber;
|
|
657
|
-
to: zod.ZodNumber;
|
|
651
|
+
x: zod.ZodDefault<zod.ZodUnion<[zod.ZodArray<zod.ZodObject<{
|
|
658
652
|
start: zod.ZodNumber;
|
|
659
653
|
length: zod.ZodNumber;
|
|
660
654
|
interpolation: zod.ZodOptional<zod.ZodEnum<["linear", "bezier", "constant"]>>;
|
|
661
655
|
easing: zod.ZodOptional<zod.ZodEnum<["ease", "easeIn", "easeOut", "easeInOut", "easeInQuad", "easeInCubic", "easeInQuart", "easeInQuint", "easeInSine", "easeInExpo", "easeInCirc", "easeInBack", "easeOutQuad", "easeOutCubic", "easeOutQuart", "easeOutQuint", "easeOutSine", "easeOutExpo", "easeOutCirc", "easeOutBack", "easeInOutQuad", "easeInOutCubic", "easeInOutQuart", "easeInOutQuint", "easeInOutSine", "easeInOutExpo", "easeInOutCirc", "easeInOutBack"]>>;
|
|
662
|
-
}
|
|
656
|
+
} & {
|
|
663
657
|
from: zod.ZodDefault<zod.ZodNumber>;
|
|
664
658
|
to: zod.ZodDefault<zod.ZodNumber>;
|
|
665
|
-
}
|
|
659
|
+
}, "strip", zod.ZodTypeAny, {
|
|
666
660
|
length: number;
|
|
667
661
|
from: number;
|
|
668
662
|
to: number;
|
|
@@ -677,17 +671,15 @@ export declare const TrackSchema: zod.ZodObject<{
|
|
|
677
671
|
interpolation?: "linear" | "bezier" | "constant" | undefined;
|
|
678
672
|
easing?: "ease" | "easeIn" | "easeOut" | "easeInOut" | "easeInQuad" | "easeInCubic" | "easeInQuart" | "easeInQuint" | "easeInSine" | "easeInExpo" | "easeInCirc" | "easeInBack" | "easeOutQuad" | "easeOutCubic" | "easeOutQuart" | "easeOutQuint" | "easeOutSine" | "easeOutExpo" | "easeOutCirc" | "easeOutBack" | "easeInOutQuad" | "easeInOutCubic" | "easeInOutQuart" | "easeInOutQuint" | "easeInOutSine" | "easeInOutExpo" | "easeInOutCirc" | "easeInOutBack" | undefined;
|
|
679
673
|
}>, "many">, zod.ZodDefault<zod.ZodNumber>]>>;
|
|
680
|
-
y: zod.ZodDefault<zod.ZodUnion<[zod.ZodArray<zod.ZodObject<
|
|
681
|
-
from: zod.ZodNumber;
|
|
682
|
-
to: zod.ZodNumber;
|
|
674
|
+
y: zod.ZodDefault<zod.ZodUnion<[zod.ZodArray<zod.ZodObject<{
|
|
683
675
|
start: zod.ZodNumber;
|
|
684
676
|
length: zod.ZodNumber;
|
|
685
677
|
interpolation: zod.ZodOptional<zod.ZodEnum<["linear", "bezier", "constant"]>>;
|
|
686
678
|
easing: zod.ZodOptional<zod.ZodEnum<["ease", "easeIn", "easeOut", "easeInOut", "easeInQuad", "easeInCubic", "easeInQuart", "easeInQuint", "easeInSine", "easeInExpo", "easeInCirc", "easeInBack", "easeOutQuad", "easeOutCubic", "easeOutQuart", "easeOutQuint", "easeOutSine", "easeOutExpo", "easeOutCirc", "easeOutBack", "easeInOutQuad", "easeInOutCubic", "easeInOutQuart", "easeInOutQuint", "easeInOutSine", "easeInOutExpo", "easeInOutCirc", "easeInOutBack"]>>;
|
|
687
|
-
}
|
|
679
|
+
} & {
|
|
688
680
|
from: zod.ZodDefault<zod.ZodNumber>;
|
|
689
681
|
to: zod.ZodDefault<zod.ZodNumber>;
|
|
690
|
-
}
|
|
682
|
+
}, "strip", zod.ZodTypeAny, {
|
|
691
683
|
length: number;
|
|
692
684
|
from: number;
|
|
693
685
|
to: number;
|
|
@@ -737,17 +729,15 @@ export declare const TrackSchema: zod.ZodObject<{
|
|
|
737
729
|
easing?: "ease" | "easeIn" | "easeOut" | "easeInOut" | "easeInQuad" | "easeInCubic" | "easeInQuart" | "easeInQuint" | "easeInSine" | "easeInExpo" | "easeInCirc" | "easeInBack" | "easeOutQuad" | "easeOutCubic" | "easeOutQuart" | "easeOutQuint" | "easeOutSine" | "easeOutExpo" | "easeOutCirc" | "easeOutBack" | "easeInOutQuad" | "easeInOutCubic" | "easeInOutQuart" | "easeInOutQuint" | "easeInOutSine" | "easeInOutExpo" | "easeInOutCirc" | "easeInOutBack" | undefined;
|
|
738
730
|
}[] | undefined;
|
|
739
731
|
}>>>;
|
|
740
|
-
opacity: zod.ZodOptional<zod.ZodDefault<zod.ZodUnion<[zod.ZodArray<zod.ZodObject<
|
|
741
|
-
from: zod.ZodNumber;
|
|
742
|
-
to: zod.ZodNumber;
|
|
732
|
+
opacity: zod.ZodOptional<zod.ZodDefault<zod.ZodUnion<[zod.ZodArray<zod.ZodObject<{
|
|
743
733
|
start: zod.ZodNumber;
|
|
744
734
|
length: zod.ZodNumber;
|
|
745
735
|
interpolation: zod.ZodOptional<zod.ZodEnum<["linear", "bezier", "constant"]>>;
|
|
746
736
|
easing: zod.ZodOptional<zod.ZodEnum<["ease", "easeIn", "easeOut", "easeInOut", "easeInQuad", "easeInCubic", "easeInQuart", "easeInQuint", "easeInSine", "easeInExpo", "easeInCirc", "easeInBack", "easeOutQuad", "easeOutCubic", "easeOutQuart", "easeOutQuint", "easeOutSine", "easeOutExpo", "easeOutCirc", "easeOutBack", "easeInOutQuad", "easeInOutCubic", "easeInOutQuart", "easeInOutQuint", "easeInOutSine", "easeInOutExpo", "easeInOutCirc", "easeInOutBack"]>>;
|
|
747
|
-
}
|
|
737
|
+
} & {
|
|
748
738
|
from: zod.ZodNumber;
|
|
749
739
|
to: zod.ZodNumber;
|
|
750
|
-
}
|
|
740
|
+
}, "strip", zod.ZodTypeAny, {
|
|
751
741
|
length: number;
|
|
752
742
|
from: number;
|
|
753
743
|
to: number;
|
|
@@ -762,17 +752,15 @@ export declare const TrackSchema: zod.ZodObject<{
|
|
|
762
752
|
interpolation?: "linear" | "bezier" | "constant" | undefined;
|
|
763
753
|
easing?: "ease" | "easeIn" | "easeOut" | "easeInOut" | "easeInQuad" | "easeInCubic" | "easeInQuart" | "easeInQuint" | "easeInSine" | "easeInExpo" | "easeInCirc" | "easeInBack" | "easeOutQuad" | "easeOutCubic" | "easeOutQuart" | "easeOutQuint" | "easeOutSine" | "easeOutExpo" | "easeOutCirc" | "easeOutBack" | "easeInOutQuad" | "easeInOutCubic" | "easeInOutQuart" | "easeInOutQuint" | "easeInOutSine" | "easeInOutExpo" | "easeInOutCirc" | "easeInOutBack" | undefined;
|
|
764
754
|
}>, "many">, zod.ZodNumber]>>>;
|
|
765
|
-
scale: zod.ZodOptional<zod.ZodDefault<zod.ZodUnion<[zod.ZodArray<zod.ZodObject<
|
|
766
|
-
from: zod.ZodNumber;
|
|
767
|
-
to: zod.ZodNumber;
|
|
755
|
+
scale: zod.ZodOptional<zod.ZodDefault<zod.ZodUnion<[zod.ZodArray<zod.ZodObject<{
|
|
768
756
|
start: zod.ZodNumber;
|
|
769
757
|
length: zod.ZodNumber;
|
|
770
758
|
interpolation: zod.ZodOptional<zod.ZodEnum<["linear", "bezier", "constant"]>>;
|
|
771
759
|
easing: zod.ZodOptional<zod.ZodEnum<["ease", "easeIn", "easeOut", "easeInOut", "easeInQuad", "easeInCubic", "easeInQuart", "easeInQuint", "easeInSine", "easeInExpo", "easeInCirc", "easeInBack", "easeOutQuad", "easeOutCubic", "easeOutQuart", "easeOutQuint", "easeOutSine", "easeOutExpo", "easeOutCirc", "easeOutBack", "easeInOutQuad", "easeInOutCubic", "easeInOutQuart", "easeInOutQuint", "easeInOutSine", "easeInOutExpo", "easeInOutCirc", "easeInOutBack"]>>;
|
|
772
|
-
}
|
|
760
|
+
} & {
|
|
773
761
|
from: zod.ZodNumber;
|
|
774
762
|
to: zod.ZodNumber;
|
|
775
|
-
}
|
|
763
|
+
}, "strip", zod.ZodTypeAny, {
|
|
776
764
|
length: number;
|
|
777
765
|
from: number;
|
|
778
766
|
to: number;
|
|
@@ -789,17 +777,15 @@ export declare const TrackSchema: zod.ZodObject<{
|
|
|
789
777
|
}>, "many">, zod.ZodNumber]>>>;
|
|
790
778
|
transform: zod.ZodOptional<zod.ZodDefault<zod.ZodObject<{
|
|
791
779
|
rotate: zod.ZodDefault<zod.ZodObject<{
|
|
792
|
-
angle: zod.ZodUnion<[zod.ZodArray<zod.ZodObject<
|
|
793
|
-
from: zod.ZodNumber;
|
|
794
|
-
to: zod.ZodNumber;
|
|
780
|
+
angle: zod.ZodUnion<[zod.ZodArray<zod.ZodObject<{
|
|
795
781
|
start: zod.ZodNumber;
|
|
796
782
|
length: zod.ZodNumber;
|
|
797
783
|
interpolation: zod.ZodOptional<zod.ZodEnum<["linear", "bezier", "constant"]>>;
|
|
798
784
|
easing: zod.ZodOptional<zod.ZodEnum<["ease", "easeIn", "easeOut", "easeInOut", "easeInQuad", "easeInCubic", "easeInQuart", "easeInQuint", "easeInSine", "easeInExpo", "easeInCirc", "easeInBack", "easeOutQuad", "easeOutCubic", "easeOutQuart", "easeOutQuint", "easeOutSine", "easeOutExpo", "easeOutCirc", "easeOutBack", "easeInOutQuad", "easeInOutCubic", "easeInOutQuart", "easeInOutQuint", "easeInOutSine", "easeInOutExpo", "easeInOutCirc", "easeInOutBack"]>>;
|
|
799
|
-
}
|
|
785
|
+
} & {
|
|
800
786
|
from: zod.ZodNumber;
|
|
801
787
|
to: zod.ZodNumber;
|
|
802
|
-
}
|
|
788
|
+
}, "strip", zod.ZodTypeAny, {
|
|
803
789
|
length: number;
|
|
804
790
|
from: number;
|
|
805
791
|
to: number;
|
|
@@ -16,17 +16,15 @@ export declare const VideoAssetCropSchema: zod.ZodObject<{
|
|
|
16
16
|
bottom?: number | undefined;
|
|
17
17
|
left?: number | undefined;
|
|
18
18
|
}>;
|
|
19
|
-
export declare const VideoAssetVolumeSchema: zod.ZodUnion<[zod.ZodArray<zod.ZodObject<
|
|
20
|
-
from: zod.ZodNumber;
|
|
21
|
-
to: zod.ZodNumber;
|
|
19
|
+
export declare const VideoAssetVolumeSchema: zod.ZodUnion<[zod.ZodArray<zod.ZodObject<{
|
|
22
20
|
start: zod.ZodNumber;
|
|
23
21
|
length: zod.ZodNumber;
|
|
24
22
|
interpolation: zod.ZodOptional<zod.ZodEnum<["linear", "bezier", "constant"]>>;
|
|
25
23
|
easing: zod.ZodOptional<zod.ZodEnum<["ease", "easeIn", "easeOut", "easeInOut", "easeInQuad", "easeInCubic", "easeInQuart", "easeInQuint", "easeInSine", "easeInExpo", "easeInCirc", "easeInBack", "easeOutQuad", "easeOutCubic", "easeOutQuart", "easeOutQuint", "easeOutSine", "easeOutExpo", "easeOutCirc", "easeOutBack", "easeInOutQuad", "easeInOutCubic", "easeInOutQuart", "easeInOutQuint", "easeInOutSine", "easeInOutExpo", "easeInOutCirc", "easeInOutBack"]>>;
|
|
26
|
-
}
|
|
24
|
+
} & {
|
|
27
25
|
from: zod.ZodNumber;
|
|
28
26
|
to: zod.ZodNumber;
|
|
29
|
-
}
|
|
27
|
+
}, "strip", zod.ZodTypeAny, {
|
|
30
28
|
length: number;
|
|
31
29
|
from: number;
|
|
32
30
|
to: number;
|
|
@@ -61,17 +59,15 @@ export declare const VideoAssetSchema: zod.ZodObject<{
|
|
|
61
59
|
bottom?: number | undefined;
|
|
62
60
|
left?: number | undefined;
|
|
63
61
|
}>>;
|
|
64
|
-
volume: zod.ZodOptional<zod.ZodUnion<[zod.ZodArray<zod.ZodObject<
|
|
65
|
-
from: zod.ZodNumber;
|
|
66
|
-
to: zod.ZodNumber;
|
|
62
|
+
volume: zod.ZodOptional<zod.ZodUnion<[zod.ZodArray<zod.ZodObject<{
|
|
67
63
|
start: zod.ZodNumber;
|
|
68
64
|
length: zod.ZodNumber;
|
|
69
65
|
interpolation: zod.ZodOptional<zod.ZodEnum<["linear", "bezier", "constant"]>>;
|
|
70
66
|
easing: zod.ZodOptional<zod.ZodEnum<["ease", "easeIn", "easeOut", "easeInOut", "easeInQuad", "easeInCubic", "easeInQuart", "easeInQuint", "easeInSine", "easeInExpo", "easeInCirc", "easeInBack", "easeOutQuad", "easeOutCubic", "easeOutQuart", "easeOutQuint", "easeOutSine", "easeOutExpo", "easeOutCirc", "easeOutBack", "easeInOutQuad", "easeInOutCubic", "easeInOutQuart", "easeInOutQuint", "easeInOutSine", "easeInOutExpo", "easeInOutCirc", "easeInOutBack"]>>;
|
|
71
|
-
}
|
|
67
|
+
} & {
|
|
72
68
|
from: zod.ZodNumber;
|
|
73
69
|
to: zod.ZodNumber;
|
|
74
|
-
}
|
|
70
|
+
}, "strip", zod.ZodTypeAny, {
|
|
75
71
|
length: number;
|
|
76
72
|
from: number;
|
|
77
73
|
to: number;
|
|
@@ -4652,7 +4652,7 @@ class le extends rt {
|
|
|
4652
4652
|
this.seek(0);
|
|
4653
4653
|
}
|
|
4654
4654
|
async loadEdit(e) {
|
|
4655
|
-
this.edit = Qi.parse(e), this.backgroundColor = this.edit.timeline.background || "#000000", await Promise.all(
|
|
4655
|
+
this.clearClips(), this.edit = Qi.parse(e), this.backgroundColor = this.edit.timeline.background || "#000000", await Promise.all(
|
|
4656
4656
|
(this.edit.timeline.fonts ?? []).map(async (t) => {
|
|
4657
4657
|
const i = t.src, s = { src: i, loadParser: Ze.Name };
|
|
4658
4658
|
return this.assetLoader.load(i, s);
|
|
@@ -4793,10 +4793,8 @@ class le extends rt {
|
|
|
4793
4793
|
}
|
|
4794
4794
|
clearClips() {
|
|
4795
4795
|
for (const e of this.clips)
|
|
4796
|
-
e.shouldDispose = !0;
|
|
4797
|
-
for (const e of this.clipsToDispose)
|
|
4798
4796
|
this.disposeClip(e);
|
|
4799
|
-
this.clipsToDispose = [], this.updateTotalDuration();
|
|
4797
|
+
this.clips = [], this.clipsToDispose = [], this.updateTotalDuration();
|
|
4800
4798
|
}
|
|
4801
4799
|
updateTotalDuration() {
|
|
4802
4800
|
let e = 0;
|