@shotstack/shotstack-studio 1.1.1 → 1.1.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.
@@ -329,15 +329,17 @@ 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<{
332
+ volume: zod.ZodOptional<zod.ZodUnion<[zod.ZodArray<zod.ZodObject<zod.objectUtil.extendShape<{
333
+ from: zod.ZodNumber;
334
+ to: zod.ZodNumber;
333
335
  start: zod.ZodNumber;
334
336
  length: zod.ZodNumber;
335
337
  interpolation: zod.ZodOptional<zod.ZodEnum<["linear", "bezier", "constant"]>>;
336
338
  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"]>>;
337
- } & {
339
+ }, {
338
340
  from: zod.ZodNumber;
339
341
  to: zod.ZodNumber;
340
- }, "strip", zod.ZodTypeAny, {
342
+ }>, "strip", zod.ZodTypeAny, {
341
343
  length: number;
342
344
  from: number;
343
345
  to: number;
@@ -401,15 +403,17 @@ export declare const TrackSchema: zod.ZodObject<{
401
403
  type: zod.ZodLiteral<"audio">;
402
404
  src: zod.ZodString;
403
405
  trim: zod.ZodOptional<zod.ZodNumber>;
404
- volume: zod.ZodOptional<zod.ZodUnion<[zod.ZodArray<zod.ZodObject<{
406
+ volume: zod.ZodOptional<zod.ZodUnion<[zod.ZodArray<zod.ZodObject<zod.objectUtil.extendShape<{
407
+ from: zod.ZodNumber;
408
+ to: zod.ZodNumber;
405
409
  start: zod.ZodNumber;
406
410
  length: zod.ZodNumber;
407
411
  interpolation: zod.ZodOptional<zod.ZodEnum<["linear", "bezier", "constant"]>>;
408
412
  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"]>>;
409
- } & {
413
+ }, {
410
414
  from: zod.ZodNumber;
411
415
  to: zod.ZodNumber;
412
- }, "strip", zod.ZodTypeAny, {
416
+ }>, "strip", zod.ZodTypeAny, {
413
417
  length: number;
414
418
  from: number;
415
419
  to: number;
@@ -648,15 +652,17 @@ export declare const TrackSchema: zod.ZodObject<{
648
652
  position: zod.ZodOptional<zod.ZodDefault<zod.ZodEnum<["topLeft", "top", "topRight", "left", "center", "right", "bottomLeft", "bottom", "bottomRight"]>>>;
649
653
  fit: zod.ZodOptional<zod.ZodDefault<zod.ZodEnum<["crop", "cover", "contain", "none"]>>>;
650
654
  offset: zod.ZodOptional<zod.ZodDefault<zod.ZodObject<{
651
- x: zod.ZodDefault<zod.ZodUnion<[zod.ZodArray<zod.ZodObject<{
655
+ x: zod.ZodDefault<zod.ZodUnion<[zod.ZodArray<zod.ZodObject<zod.objectUtil.extendShape<{
656
+ from: zod.ZodNumber;
657
+ to: zod.ZodNumber;
652
658
  start: zod.ZodNumber;
653
659
  length: zod.ZodNumber;
654
660
  interpolation: zod.ZodOptional<zod.ZodEnum<["linear", "bezier", "constant"]>>;
655
661
  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"]>>;
656
- } & {
662
+ }, {
657
663
  from: zod.ZodDefault<zod.ZodNumber>;
658
664
  to: zod.ZodDefault<zod.ZodNumber>;
659
- }, "strip", zod.ZodTypeAny, {
665
+ }>, "strip", zod.ZodTypeAny, {
660
666
  length: number;
661
667
  from: number;
662
668
  to: number;
@@ -671,15 +677,17 @@ export declare const TrackSchema: zod.ZodObject<{
671
677
  interpolation?: "linear" | "bezier" | "constant" | undefined;
672
678
  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;
673
679
  }>, "many">, zod.ZodDefault<zod.ZodNumber>]>>;
674
- y: zod.ZodDefault<zod.ZodUnion<[zod.ZodArray<zod.ZodObject<{
680
+ y: zod.ZodDefault<zod.ZodUnion<[zod.ZodArray<zod.ZodObject<zod.objectUtil.extendShape<{
681
+ from: zod.ZodNumber;
682
+ to: zod.ZodNumber;
675
683
  start: zod.ZodNumber;
676
684
  length: zod.ZodNumber;
677
685
  interpolation: zod.ZodOptional<zod.ZodEnum<["linear", "bezier", "constant"]>>;
678
686
  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"]>>;
679
- } & {
687
+ }, {
680
688
  from: zod.ZodDefault<zod.ZodNumber>;
681
689
  to: zod.ZodDefault<zod.ZodNumber>;
682
- }, "strip", zod.ZodTypeAny, {
690
+ }>, "strip", zod.ZodTypeAny, {
683
691
  length: number;
684
692
  from: number;
685
693
  to: number;
@@ -729,15 +737,17 @@ export declare const TrackSchema: zod.ZodObject<{
729
737
  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;
730
738
  }[] | undefined;
731
739
  }>>>;
732
- opacity: zod.ZodOptional<zod.ZodDefault<zod.ZodUnion<[zod.ZodArray<zod.ZodObject<{
740
+ opacity: zod.ZodOptional<zod.ZodDefault<zod.ZodUnion<[zod.ZodArray<zod.ZodObject<zod.objectUtil.extendShape<{
741
+ from: zod.ZodNumber;
742
+ to: zod.ZodNumber;
733
743
  start: zod.ZodNumber;
734
744
  length: zod.ZodNumber;
735
745
  interpolation: zod.ZodOptional<zod.ZodEnum<["linear", "bezier", "constant"]>>;
736
746
  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"]>>;
737
- } & {
747
+ }, {
738
748
  from: zod.ZodNumber;
739
749
  to: zod.ZodNumber;
740
- }, "strip", zod.ZodTypeAny, {
750
+ }>, "strip", zod.ZodTypeAny, {
741
751
  length: number;
742
752
  from: number;
743
753
  to: number;
@@ -752,15 +762,17 @@ export declare const TrackSchema: zod.ZodObject<{
752
762
  interpolation?: "linear" | "bezier" | "constant" | undefined;
753
763
  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;
754
764
  }>, "many">, zod.ZodNumber]>>>;
755
- scale: zod.ZodOptional<zod.ZodDefault<zod.ZodUnion<[zod.ZodArray<zod.ZodObject<{
765
+ scale: zod.ZodOptional<zod.ZodDefault<zod.ZodUnion<[zod.ZodArray<zod.ZodObject<zod.objectUtil.extendShape<{
766
+ from: zod.ZodNumber;
767
+ to: zod.ZodNumber;
756
768
  start: zod.ZodNumber;
757
769
  length: zod.ZodNumber;
758
770
  interpolation: zod.ZodOptional<zod.ZodEnum<["linear", "bezier", "constant"]>>;
759
771
  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"]>>;
760
- } & {
772
+ }, {
761
773
  from: zod.ZodNumber;
762
774
  to: zod.ZodNumber;
763
- }, "strip", zod.ZodTypeAny, {
775
+ }>, "strip", zod.ZodTypeAny, {
764
776
  length: number;
765
777
  from: number;
766
778
  to: number;
@@ -777,15 +789,17 @@ export declare const TrackSchema: zod.ZodObject<{
777
789
  }>, "many">, zod.ZodNumber]>>>;
778
790
  transform: zod.ZodOptional<zod.ZodDefault<zod.ZodObject<{
779
791
  rotate: zod.ZodDefault<zod.ZodObject<{
780
- angle: zod.ZodUnion<[zod.ZodArray<zod.ZodObject<{
792
+ angle: zod.ZodUnion<[zod.ZodArray<zod.ZodObject<zod.objectUtil.extendShape<{
793
+ from: zod.ZodNumber;
794
+ to: zod.ZodNumber;
781
795
  start: zod.ZodNumber;
782
796
  length: zod.ZodNumber;
783
797
  interpolation: zod.ZodOptional<zod.ZodEnum<["linear", "bezier", "constant"]>>;
784
798
  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"]>>;
785
- } & {
799
+ }, {
786
800
  from: zod.ZodNumber;
787
801
  to: zod.ZodNumber;
788
- }, "strip", zod.ZodTypeAny, {
802
+ }>, "strip", zod.ZodTypeAny, {
789
803
  length: number;
790
804
  from: number;
791
805
  to: number;
@@ -16,15 +16,17 @@ 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<{
19
+ export declare const VideoAssetVolumeSchema: zod.ZodUnion<[zod.ZodArray<zod.ZodObject<zod.objectUtil.extendShape<{
20
+ from: zod.ZodNumber;
21
+ to: zod.ZodNumber;
20
22
  start: zod.ZodNumber;
21
23
  length: zod.ZodNumber;
22
24
  interpolation: zod.ZodOptional<zod.ZodEnum<["linear", "bezier", "constant"]>>;
23
25
  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"]>>;
24
- } & {
26
+ }, {
25
27
  from: zod.ZodNumber;
26
28
  to: zod.ZodNumber;
27
- }, "strip", zod.ZodTypeAny, {
29
+ }>, "strip", zod.ZodTypeAny, {
28
30
  length: number;
29
31
  from: number;
30
32
  to: number;
@@ -59,15 +61,17 @@ export declare const VideoAssetSchema: zod.ZodObject<{
59
61
  bottom?: number | undefined;
60
62
  left?: number | undefined;
61
63
  }>>;
62
- volume: zod.ZodOptional<zod.ZodUnion<[zod.ZodArray<zod.ZodObject<{
64
+ volume: zod.ZodOptional<zod.ZodUnion<[zod.ZodArray<zod.ZodObject<zod.objectUtil.extendShape<{
65
+ from: zod.ZodNumber;
66
+ to: zod.ZodNumber;
63
67
  start: zod.ZodNumber;
64
68
  length: zod.ZodNumber;
65
69
  interpolation: zod.ZodOptional<zod.ZodEnum<["linear", "bezier", "constant"]>>;
66
70
  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"]>>;
67
- } & {
71
+ }, {
68
72
  from: zod.ZodNumber;
69
73
  to: zod.ZodNumber;
70
- }, "strip", zod.ZodTypeAny, {
74
+ }>, "strip", zod.ZodTypeAny, {
71
75
  length: number;
72
76
  from: number;
73
77
  to: number;
@@ -3758,8 +3758,9 @@ class z extends rt {
3758
3758
  isRotating;
3759
3759
  rotationStart;
3760
3760
  rotationOffset;
3761
+ initialClipConfiguration;
3761
3762
  constructor(e, t) {
3762
- super(), this.edit = e, this.layer = 0, this.shouldDispose = !1, this.clipConfiguration = t, this.positionBuilder = new ss(e.size), this.outline = null, this.topLeftScaleHandle = null, this.topRightScaleHandle = null, this.bottomRightScaleHandle = null, this.bottomLeftScaleHandle = null, this.rotationHandle = null, this.isHovering = !1, this.isDragging = !1, this.dragOffset = { x: 0, y: 0 }, this.scaleDirection = null, this.scaleStart = null, this.scaleOffset = { x: 0, y: 0 }, this.isRotating = !1, this.rotationStart = null, this.rotationOffset = { x: 0, y: 0 };
3763
+ super(), this.edit = e, this.layer = 0, this.shouldDispose = !1, this.clipConfiguration = t, this.positionBuilder = new ss(e.size), this.outline = null, this.topLeftScaleHandle = null, this.topRightScaleHandle = null, this.bottomRightScaleHandle = null, this.bottomLeftScaleHandle = null, this.rotationHandle = null, this.isHovering = !1, this.isDragging = !1, this.dragOffset = { x: 0, y: 0 }, this.scaleDirection = null, this.scaleStart = null, this.scaleOffset = { x: 0, y: 0 }, this.isRotating = !1, this.rotationStart = null, this.rotationOffset = { x: 0, y: 0 }, this.initialClipConfiguration = null;
3763
3764
  }
3764
3765
  configureKeyframes() {
3765
3766
  if (this.offsetXKeyframeBuilder = new R(this.clipConfiguration.offset?.x ?? 0, this.getLength()), this.offsetYKeyframeBuilder = new R(this.clipConfiguration.offset?.y ?? 0, this.getLength()), this.scaleKeyframeBuilder = new R(this.clipConfiguration.scale ?? 1, this.getLength(), 1), this.opacityKeyframeBuilder = new R(this.clipConfiguration.opacity ?? 1, this.getLength(), 1), this.rotationKeyframeBuilder = new R(this.clipConfiguration.transform?.rotate?.angle ?? 0, this.getLength()), this.clipHasKeyframes())
@@ -3853,7 +3854,7 @@ class z extends rt {
3853
3854
  return this.getPlaybackTime() < z.DiscardedFrameCount;
3854
3855
  }
3855
3856
  onPointerStart(e) {
3856
- if (e.button !== is.ButtonLeftClick || this.clipHasKeyframes())
3857
+ if (e.button !== is.ButtonLeftClick || (this.edit.setSelectedClip(this), this.initialClipConfiguration = structuredClone(this.clipConfiguration), this.clipHasKeyframes()))
3857
3858
  return;
3858
3859
  if (this.scaleDirection = null, this.topLeftScaleHandle?.getBounds().containsPoint(e.globalX, e.globalY) && (this.scaleDirection = "topLeft"), this.topRightScaleHandle?.getBounds().containsPoint(e.globalX, e.globalY) && (this.scaleDirection = "topRight"), this.bottomRightScaleHandle?.getBounds().containsPoint(e.globalX, e.globalY) && (this.scaleDirection = "bottomRight"), this.bottomLeftScaleHandle?.getBounds().containsPoint(e.globalX, e.globalY) && (this.scaleDirection = "bottomLeft"), this.scaleDirection !== null) {
3859
3860
  this.scaleStart = this.getScale() / this.getFitScale();
@@ -3917,7 +3918,7 @@ class z extends rt {
3917
3918
  }
3918
3919
  }
3919
3920
  onPointerUp() {
3920
- this.isDragging && this.edit.setSelectedClip(this), this.isDragging = !1, this.dragOffset = { x: 0, y: 0 }, this.scaleDirection = null, this.scaleStart = null, this.scaleOffset = { x: 0, y: 0 }, this.isRotating = !1, this.rotationStart = null, this.rotationOffset = { x: 0, y: 0 };
3921
+ (this.isDragging || this.scaleDirection !== null || this.isRotating) && this.hasStateChanged() && this.edit.setUpdatedClip(this, this.initialClipConfiguration), this.isDragging = !1, this.dragOffset = { x: 0, y: 0 }, this.scaleDirection = null, this.scaleStart = null, this.scaleOffset = { x: 0, y: 0 }, this.isRotating = !1, this.rotationStart = null, this.rotationOffset = { x: 0, y: 0 }, this.initialClipConfiguration = null;
3921
3922
  }
3922
3923
  onPointerOver() {
3923
3924
  this.isHovering = !0;
@@ -3936,6 +3937,11 @@ class z extends rt {
3936
3937
  this.clipConfiguration.transform?.rotate?.angle
3937
3938
  ].some((e) => e && typeof e != "number");
3938
3939
  }
3940
+ hasStateChanged() {
3941
+ if (!this.initialClipConfiguration) return !1;
3942
+ const e = this.clipConfiguration.offset?.x, t = this.clipConfiguration.offset?.y, i = this.clipConfiguration.scale, s = Number(this.clipConfiguration.transform?.rotate?.angle ?? 0), n = this.initialClipConfiguration.offset?.x, r = this.initialClipConfiguration.offset?.y, o = this.initialClipConfiguration.scale, h = Number(this.initialClipConfiguration.transform?.rotate?.angle ?? 0);
3943
+ return n !== void 0 && e !== n || r !== void 0 && t !== r || o !== void 0 && i !== o || s !== h;
3944
+ }
3939
3945
  }
3940
3946
  class st extends z {
3941
3947
  audioResource;
@@ -4615,8 +4621,10 @@ class le extends rt {
4615
4621
  isPlaying;
4616
4622
  /** @internal */
4617
4623
  selectedClip;
4624
+ /** @internal */
4625
+ updatedClip;
4618
4626
  constructor(e, t = "#ffffff") {
4619
- super(), this.assetLoader = new Wt(), this.edit = null, this.tracks = [], this.clipsToDispose = [], this.clips = [], this.events = new At(), this.size = e, this.playbackTime = 0, this.totalDuration = 0, this.isPlaying = !1, this.selectedClip = null, this.backgroundColor = t;
4627
+ super(), this.assetLoader = new Wt(), this.edit = null, this.tracks = [], this.clipsToDispose = [], this.clips = [], this.events = new At(), this.size = e, this.playbackTime = 0, this.totalDuration = 0, this.isPlaying = !1, this.selectedClip = null, this.updatedClip = null, this.backgroundColor = t;
4620
4628
  }
4621
4629
  async load() {
4622
4630
  const e = new w.Graphics();
@@ -4663,6 +4671,7 @@ class le extends rt {
4663
4671
  const n = this.createPlayerFromAssetType(s);
4664
4672
  n.layer = t + 1, await this.addPlayer(t, n);
4665
4673
  }
4674
+ this.updateTotalDuration();
4666
4675
  }
4667
4676
  getEdit() {
4668
4677
  const e = [], t = /* @__PURE__ */ new Map();
@@ -4756,6 +4765,23 @@ class le extends rt {
4756
4765
  };
4757
4766
  this.events.emit("clip:selected", n);
4758
4767
  }
4768
+ /** @internal */
4769
+ setUpdatedClip(e, t = null) {
4770
+ this.updatedClip = e;
4771
+ const i = e.layer - 1, n = this.clips.filter((o) => o.layer === e.layer).indexOf(e), r = {
4772
+ previous: {
4773
+ clip: t,
4774
+ trackIndex: i,
4775
+ clipIndex: n
4776
+ },
4777
+ current: {
4778
+ clip: e.clipConfiguration,
4779
+ trackIndex: i,
4780
+ clipIndex: n
4781
+ }
4782
+ };
4783
+ this.events.emit("clip:updated", r);
4784
+ }
4759
4785
  queueDisposeClip(e) {
4760
4786
  this.clipsToDispose.push(e);
4761
4787
  }