@shotstack/shotstack-studio 2.31.0 → 2.31.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.
- package/dist/index.d.ts +2 -0
- package/dist/internal.es.js +30 -27
- package/dist/internal.umd.js +2 -2
- package/dist/shotstack-studio.es.js +6992 -6976
- package/dist/shotstack-studio.umd.js +158 -158
- package/package.json +4 -4
- package/readme.md +3 -0
package/dist/index.d.ts
CHANGED
|
@@ -150,8 +150,10 @@ export declare class Controls {
|
|
|
150
150
|
private seekDistanceLarge;
|
|
151
151
|
private frameTime;
|
|
152
152
|
private pendingPaste;
|
|
153
|
+
private disposed;
|
|
153
154
|
constructor(edit: Edit);
|
|
154
155
|
load(): Promise<void>;
|
|
156
|
+
dispose(): void;
|
|
155
157
|
private shouldIgnoreKeyboardEvent;
|
|
156
158
|
private handleKeyDown;
|
|
157
159
|
private handlePaste;
|
package/dist/internal.es.js
CHANGED
|
@@ -847,15 +847,18 @@ class n5 extends iy {
|
|
|
847
847
|
}
|
|
848
848
|
var Se = /* @__PURE__ */ ((t) => (t.Video = "video", t.Image = "image", t.Audio = "audio", t.Text = "text", t.RichText = "rich-text", t.Luma = "luma", t.Html = "html", t.Html5 = "html5", t.Shape = "shape", t.Caption = "caption", t.Svg = "svg", t.TextToImage = "text-to-image", t.ImageToVideo = "image-to-video", t.TextToSpeech = "text-to-speech", t.RichCaption = "rich-caption", t))(Se || {});
|
|
849
849
|
const a5 = /* @__PURE__ */ new Set([
|
|
850
|
+
"video",
|
|
850
851
|
"image",
|
|
851
852
|
"text",
|
|
852
853
|
"rich-text",
|
|
853
854
|
"shape",
|
|
854
855
|
"caption",
|
|
855
856
|
"html",
|
|
857
|
+
"html5",
|
|
856
858
|
"svg",
|
|
857
|
-
"text-to-image"
|
|
858
|
-
|
|
859
|
+
"text-to-image",
|
|
860
|
+
"rich-caption"
|
|
861
|
+
/* RichCaption */
|
|
859
862
|
]), s5 = 4.69;
|
|
860
863
|
class nr extends e5 {
|
|
861
864
|
static DiscardedFrameCount = 0;
|
|
@@ -966,8 +969,8 @@ class nr extends e5 {
|
|
|
966
969
|
this.wipeMask || (this.wipeMask = new et.Graphics(), this.getContainer().addChild(this.wipeMask), this.getContainer().mask = this.wipeMask), this.wipeMask.clear(), this.wipeMask.rect(0, 0, r.width * e, r.height), this.wipeMask.fill(16777215);
|
|
967
970
|
}
|
|
968
971
|
updateClipFilter() {
|
|
969
|
-
const
|
|
970
|
-
|
|
972
|
+
const e = a5.has(this.playerType) ? this.clipConfiguration.filter : void 0;
|
|
973
|
+
e !== this.clipFilterName && (this.clipFilter?.destroy(), this.clipFilter = this.createClipFilter(e), this.clipFilterName = e, this.syncContentFilters());
|
|
971
974
|
}
|
|
972
975
|
createClipFilter(e) {
|
|
973
976
|
if (e === "blur") {
|
|
@@ -42118,10 +42121,10 @@ class Js extends nr {
|
|
|
42118
42121
|
super.dispose(), this.loadComplete = !1, this.texture && this.texture.destroy(), this.texture = null, this.sprite && (this.sprite.destroy(), this.sprite = null), this.cleanupResources();
|
|
42119
42122
|
}
|
|
42120
42123
|
getSize() {
|
|
42121
|
-
const e = this.edit.
|
|
42124
|
+
const e = this.edit.getDocument()?.getOutput().size;
|
|
42122
42125
|
return {
|
|
42123
|
-
width: this.clipConfiguration.width || e?.
|
|
42124
|
-
height: this.clipConfiguration.height || e?.
|
|
42126
|
+
width: this.clipConfiguration.width || e?.width || this.edit.size.width,
|
|
42127
|
+
height: this.clipConfiguration.height || e?.height || this.edit.size.height
|
|
42125
42128
|
};
|
|
42126
42129
|
}
|
|
42127
42130
|
getContentSize() {
|
|
@@ -42289,14 +42292,14 @@ class Vr extends nr {
|
|
|
42289
42292
|
const { baseFontFamily: n } = Fr(e), i = this.edit.getFontUrlByFamilyAndWeight(n, r);
|
|
42290
42293
|
if (i)
|
|
42291
42294
|
return { url: i, baseFontFamily: n, fontWeight: r };
|
|
42292
|
-
const
|
|
42293
|
-
const { full:
|
|
42294
|
-
return
|
|
42295
|
+
const s = this.edit.getTimelineFonts().find((u) => {
|
|
42296
|
+
const { full: l, base: c } = Pl(u.src), h = e.toLowerCase();
|
|
42297
|
+
return l.toLowerCase() === h || c.toLowerCase() === h;
|
|
42295
42298
|
});
|
|
42296
|
-
if (
|
|
42297
|
-
return { url:
|
|
42298
|
-
const
|
|
42299
|
-
return
|
|
42299
|
+
if (s)
|
|
42300
|
+
return { url: s.src, baseFontFamily: n, fontWeight: r };
|
|
42301
|
+
const o = as(e, r);
|
|
42302
|
+
return o ? { url: o, baseFontFamily: n, fontWeight: r } : null;
|
|
42300
42303
|
}
|
|
42301
42304
|
reconfigureAfterRestore() {
|
|
42302
42305
|
super.reconfigureAfterRestore(), this.reconfigure(this.clipConfiguration.asset);
|
|
@@ -42359,35 +42362,35 @@ class Vr extends nr {
|
|
|
42359
42362
|
}
|
|
42360
42363
|
}
|
|
42361
42364
|
createFallbackText(e) {
|
|
42362
|
-
const
|
|
42365
|
+
const { width: r, height: n } = this.getSize(), i = new et.TextStyle({
|
|
42363
42366
|
fontFamily: e.font?.family || "Arial",
|
|
42364
42367
|
fontSize: e.font?.size || 48,
|
|
42365
42368
|
fill: e.font?.color || "#ffffff",
|
|
42366
42369
|
align: e.align?.horizontal || "center",
|
|
42367
42370
|
wordWrap: !0,
|
|
42368
|
-
wordWrapWidth:
|
|
42369
|
-
}),
|
|
42371
|
+
wordWrapWidth: r
|
|
42372
|
+
}), a = new et.Text(e.text, i);
|
|
42370
42373
|
switch (e.align?.horizontal) {
|
|
42371
42374
|
case "left":
|
|
42372
|
-
|
|
42375
|
+
a.anchor.set(0, 0.5), a.x = 0;
|
|
42373
42376
|
break;
|
|
42374
42377
|
case "right":
|
|
42375
|
-
|
|
42378
|
+
a.anchor.set(1, 0.5), a.x = r;
|
|
42376
42379
|
break;
|
|
42377
42380
|
default:
|
|
42378
|
-
|
|
42381
|
+
a.anchor.set(0.5, 0.5), a.x = r / 2;
|
|
42379
42382
|
}
|
|
42380
42383
|
switch (e.align?.vertical) {
|
|
42381
42384
|
case "top":
|
|
42382
|
-
|
|
42385
|
+
a.anchor.set(a.anchor.x, 0), a.y = 0;
|
|
42383
42386
|
break;
|
|
42384
42387
|
case "bottom":
|
|
42385
|
-
|
|
42388
|
+
a.anchor.set(a.anchor.x, 1), a.y = n;
|
|
42386
42389
|
break;
|
|
42387
42390
|
default:
|
|
42388
|
-
|
|
42391
|
+
a.anchor.set(a.anchor.x, 0.5), a.y = n / 2;
|
|
42389
42392
|
}
|
|
42390
|
-
this.contentContainer.addChild(
|
|
42393
|
+
this.contentContainer.addChild(a), this.configureKeyframes();
|
|
42391
42394
|
}
|
|
42392
42395
|
renderFrameSafe(e) {
|
|
42393
42396
|
if (this.isRendering) {
|
|
@@ -42428,10 +42431,10 @@ class Vr extends nr {
|
|
|
42428
42431
|
super.dispose(), this.loadComplete = !1, this.texture?.destroy(), this.texture = null, this.sprite && (this.sprite.destroy(), this.sprite = null), this.canvas && (this.canvas = null), this.textEngine && (this.textEngine.destroy(), this.textEngine = null), this.renderer = null, this.validatedAsset = null;
|
|
42429
42432
|
}
|
|
42430
42433
|
getSize() {
|
|
42431
|
-
const e = this.edit.
|
|
42434
|
+
const e = this.edit.getDocument()?.getOutput().size;
|
|
42432
42435
|
return {
|
|
42433
|
-
width: this.clipConfiguration.width || e?.
|
|
42434
|
-
height: this.clipConfiguration.height || e?.
|
|
42436
|
+
width: this.clipConfiguration.width || e?.width || this.edit.size.width,
|
|
42437
|
+
height: this.clipConfiguration.height || e?.height || this.edit.size.height
|
|
42435
42438
|
};
|
|
42436
42439
|
}
|
|
42437
42440
|
getContentSize() {
|