@shotstack/shotstack-studio 2.13.1 → 2.13.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.
@@ -11,7 +11,7 @@ import "pixi.js/text-html";
11
11
  import "pixi.js/sprite-tiling";
12
12
  import "pixi.js/filters";
13
13
  import "pixi.js/mesh";
14
- const ZE = "2.13.0", HE = {
14
+ const ZE = "2.13.1", HE = {
15
15
  version: ZE
16
16
  };
17
17
  function E1(e, t, i) {
@@ -42677,10 +42677,12 @@ class _o {
42677
42677
  // ─── ID-Based Clip Mutations (public passthroughs) ─────────────────────────
42678
42678
  /**
42679
42679
  * Look up a clip by its stable ID.
42680
- * @returns The clip or null if no clip with that ID exists.
42680
+ * @returns A copy of the clip, or null if no clip with that ID exists. Mutating the
42681
+ * returned object has no effect on the edit — use `updateClipById` to make changes.
42681
42682
  */
42682
42683
  getClipById(t) {
42683
- return this.document.getClipById(t)?.clip ?? null;
42684
+ const i = this.document.getClipById(t)?.clip;
42685
+ return i ? structuredClone(i) : null;
42684
42686
  }
42685
42687
  /**
42686
42688
  * Look up the (trackIndex, clipIndex) position of a clip by its stable ID.
@@ -42883,7 +42885,7 @@ class _o {
42883
42885
  }
42884
42886
  getClip(t, i) {
42885
42887
  const n = this.tracks[t];
42886
- return !n || i < 0 || i >= n.length ? null : n[i].clipConfiguration;
42888
+ return !n || i < 0 || i >= n.length ? null : structuredClone(n[i].clipConfiguration);
42887
42889
  }
42888
42890
  /**
42889
42891
  * Get the error state for a clip that failed to load.
@@ -43093,7 +43095,8 @@ class _o {
43093
43095
  getTrack(t) {
43094
43096
  const i = this.clips.filter((n) => n.layer === t + 1);
43095
43097
  return i.length === 0 ? null : {
43096
- clips: i.map((n) => n.clipConfiguration)
43098
+ // Copy so callers can't mutate (or freeze) live player state through the return value
43099
+ clips: i.map((n) => structuredClone(n.clipConfiguration))
43097
43100
  };
43098
43101
  }
43099
43102
  /**
@@ -56787,7 +56790,7 @@ class iX {
56787
56790
  this.ensureTempBufferSize(i);
56788
56791
  const n = t.allocationSize({ planeIndex: 0, format: "f32" }), r = new Float32Array(this.tempSourceBuffer.buffer, 0, n / 4);
56789
56792
  t.copyTo(r, { planeIndex: 0, format: "f32" });
56790
- const s = t.timestamp - this.startTime, a = s + t.duration, o = Math.floor(s * this.targetSampleRate), l = Math.ceil(a * this.targetSampleRate);
56793
+ const s = t.timestamp - this.startTime, a = s + t.duration, o = Math.floor((s - 1 / this.sourceSampleRate) * this.targetSampleRate) + 1, l = Math.ceil(a * this.targetSampleRate);
56791
56794
  for (let u = o; u < l; u++) {
56792
56795
  if (u < this.bufferStartFrame)
56793
56796
  continue;