@agrhub/engine-pixi 1.4.0 → 1.4.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.
@@ -76872,6 +76872,8 @@ class $s extends DD {
76872
76872
  _keywordPreserveAfterSpoken = !1;
76873
76873
  _wordAnimation = { type: "scale", application: "none", value: 1 };
76874
76874
  _wordsPerLine = "multiple";
76875
+ /** Track-level colours this clip inherits when it has none of its own (set by fromObject) */
76876
+ _trackCaptionColors;
76875
76877
  _videoWidth = 1280;
76876
76878
  _videoHeight = 720;
76877
76879
  _bottomOffset = 100;
@@ -76906,7 +76908,10 @@ class $s extends DD {
76906
76908
  };
76907
76909
  }
76908
76910
  set caption(e) {
76909
- e && (e.words && (this._words = e.words, this.originalOpts && (this.originalOpts.words = e.words)), e.colors && ("active" in e.colors && (this.originalOpts.activeStyle = e.colors.active ?? void 0), "future" in e.colors && (this.originalOpts.futureStyle = e.colors.future ?? void 0), "keyword" in e.colors && (e.colors.keyword != null ? (this.originalOpts.keywordColor = e.colors.keyword.color, this.originalOpts.keywordPreserveAfterSpoken = e.colors.keyword.preserveAfterSpoken) : (this.originalOpts.keywordColor = void 0, this.originalOpts.keywordPreserveAfterSpoken = void 0))), e.wordAnimation !== void 0 && (this.originalOpts.wordAnimation = e.wordAnimation), e.positioning && (e.positioning.videoWidth !== void 0 && (this._videoWidth = e.positioning.videoWidth), e.positioning.videoHeight !== void 0 && (this._videoHeight = e.positioning.videoHeight), e.positioning.bottomOffset !== void 0 && (this._bottomOffset = e.positioning.bottomOffset)), this._syncOpts());
76911
+ if (!e) return;
76912
+ e.words && (this._words = e.words, this.originalOpts && (this.originalOpts.words = e.words));
76913
+ const t = Array.isArray(e.words), i = e.colors ?? (t ? this._trackCaptionColors ?? {} : void 0), n = !e.colors && t;
76914
+ i && (("active" in i || n) && (this.originalOpts.activeStyle = i.active ?? void 0), ("future" in i || n) && (this.originalOpts.futureStyle = i.future ?? void 0), ("keyword" in i || n) && (i.keyword != null ? (this.originalOpts.keywordColor = i.keyword.color, this.originalOpts.keywordPreserveAfterSpoken = i.keyword.preserveAfterSpoken) : (this.originalOpts.keywordColor = void 0, this.originalOpts.keywordPreserveAfterSpoken = void 0))), e.wordAnimation !== void 0 && (this.originalOpts.wordAnimation = e.wordAnimation), e.positioning && (e.positioning.videoWidth !== void 0 && (this._videoWidth = e.positioning.videoWidth), e.positioning.videoHeight !== void 0 && (this._videoHeight = e.positioning.videoHeight), e.positioning.bottomOffset !== void 0 && (this._bottomOffset = e.positioning.bottomOffset)), this._syncOpts(), (i || e.wordAnimation !== void 0 || e.words) && (this._buildTextStyles(), this.refreshText().then(() => this.emit("propsChange", { caption: e })));
76910
76915
  }
76911
76916
  // ─── Words ────────────────────────────────────────────────────────────────
76912
76917
  get words() {
@@ -76925,7 +76930,7 @@ class $s extends DD {
76925
76930
  return this._wordsPerLine;
76926
76931
  }
76927
76932
  set wordsPerLine(e) {
76928
- this._wordsPerLine = e, this.originalOpts && (this.originalOpts.wordsPerLine = e), this.refreshText();
76933
+ e && (this._wordsPerLine = e, this.originalOpts && (this.originalOpts.wordsPerLine = e), this.refreshText());
76929
76934
  }
76930
76935
  // ─── Style proxy ──────────────────────────────────────────────────────────
76931
76936
  get style() {
@@ -77154,7 +77159,7 @@ class $s extends DD {
77154
77159
  });
77155
77160
  o.initialLayoutApplied = !0;
77156
77161
  const c = new $s(n, o);
77157
- return Ft.deserializeBaseProperties(c, e), c.wordsPerLine = (a(e.wordsPerLine) ? e.wordsPerLine : void 0) ?? i?.wordsPerLine ?? "multiple", e.effects && (c.effects = e.effects), await c.ready, c;
77162
+ return c._trackCaptionColors = i?.colors, Ft.deserializeBaseProperties(c, e), c.wordsPerLine = (a(e.wordsPerLine) ? e.wordsPerLine : void 0) ?? i?.wordsPerLine ?? "multiple", e.effects && (c.effects = e.effects), await c.ready, c;
77158
77163
  }
77159
77164
  getVisibleHandles() {
77160
77165
  return ["mr", "mb", "br", "rot"];