@shotstack/shotstack-studio 2.31.0 → 2.31.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/index.d.ts +2 -0
- package/dist/internal.es.js +23 -23
- package/dist/internal.umd.js +1 -1
- package/dist/shotstack-studio.es.js +6986 -6973
- 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
|
@@ -42118,10 +42118,10 @@ class Js extends nr {
|
|
|
42118
42118
|
super.dispose(), this.loadComplete = !1, this.texture && this.texture.destroy(), this.texture = null, this.sprite && (this.sprite.destroy(), this.sprite = null), this.cleanupResources();
|
|
42119
42119
|
}
|
|
42120
42120
|
getSize() {
|
|
42121
|
-
const e = this.edit.
|
|
42121
|
+
const e = this.edit.getDocument()?.getOutput().size;
|
|
42122
42122
|
return {
|
|
42123
|
-
width: this.clipConfiguration.width || e?.
|
|
42124
|
-
height: this.clipConfiguration.height || e?.
|
|
42123
|
+
width: this.clipConfiguration.width || e?.width || this.edit.size.width,
|
|
42124
|
+
height: this.clipConfiguration.height || e?.height || this.edit.size.height
|
|
42125
42125
|
};
|
|
42126
42126
|
}
|
|
42127
42127
|
getContentSize() {
|
|
@@ -42289,14 +42289,14 @@ class Vr extends nr {
|
|
|
42289
42289
|
const { baseFontFamily: n } = Fr(e), i = this.edit.getFontUrlByFamilyAndWeight(n, r);
|
|
42290
42290
|
if (i)
|
|
42291
42291
|
return { url: i, baseFontFamily: n, fontWeight: r };
|
|
42292
|
-
const
|
|
42293
|
-
const { full:
|
|
42294
|
-
return
|
|
42292
|
+
const s = this.edit.getTimelineFonts().find((u) => {
|
|
42293
|
+
const { full: l, base: c } = Pl(u.src), h = e.toLowerCase();
|
|
42294
|
+
return l.toLowerCase() === h || c.toLowerCase() === h;
|
|
42295
42295
|
});
|
|
42296
|
-
if (
|
|
42297
|
-
return { url:
|
|
42298
|
-
const
|
|
42299
|
-
return
|
|
42296
|
+
if (s)
|
|
42297
|
+
return { url: s.src, baseFontFamily: n, fontWeight: r };
|
|
42298
|
+
const o = as(e, r);
|
|
42299
|
+
return o ? { url: o, baseFontFamily: n, fontWeight: r } : null;
|
|
42300
42300
|
}
|
|
42301
42301
|
reconfigureAfterRestore() {
|
|
42302
42302
|
super.reconfigureAfterRestore(), this.reconfigure(this.clipConfiguration.asset);
|
|
@@ -42359,35 +42359,35 @@ class Vr extends nr {
|
|
|
42359
42359
|
}
|
|
42360
42360
|
}
|
|
42361
42361
|
createFallbackText(e) {
|
|
42362
|
-
const
|
|
42362
|
+
const { width: r, height: n } = this.getSize(), i = new et.TextStyle({
|
|
42363
42363
|
fontFamily: e.font?.family || "Arial",
|
|
42364
42364
|
fontSize: e.font?.size || 48,
|
|
42365
42365
|
fill: e.font?.color || "#ffffff",
|
|
42366
42366
|
align: e.align?.horizontal || "center",
|
|
42367
42367
|
wordWrap: !0,
|
|
42368
|
-
wordWrapWidth:
|
|
42369
|
-
}),
|
|
42368
|
+
wordWrapWidth: r
|
|
42369
|
+
}), a = new et.Text(e.text, i);
|
|
42370
42370
|
switch (e.align?.horizontal) {
|
|
42371
42371
|
case "left":
|
|
42372
|
-
|
|
42372
|
+
a.anchor.set(0, 0.5), a.x = 0;
|
|
42373
42373
|
break;
|
|
42374
42374
|
case "right":
|
|
42375
|
-
|
|
42375
|
+
a.anchor.set(1, 0.5), a.x = r;
|
|
42376
42376
|
break;
|
|
42377
42377
|
default:
|
|
42378
|
-
|
|
42378
|
+
a.anchor.set(0.5, 0.5), a.x = r / 2;
|
|
42379
42379
|
}
|
|
42380
42380
|
switch (e.align?.vertical) {
|
|
42381
42381
|
case "top":
|
|
42382
|
-
|
|
42382
|
+
a.anchor.set(a.anchor.x, 0), a.y = 0;
|
|
42383
42383
|
break;
|
|
42384
42384
|
case "bottom":
|
|
42385
|
-
|
|
42385
|
+
a.anchor.set(a.anchor.x, 1), a.y = n;
|
|
42386
42386
|
break;
|
|
42387
42387
|
default:
|
|
42388
|
-
|
|
42388
|
+
a.anchor.set(a.anchor.x, 0.5), a.y = n / 2;
|
|
42389
42389
|
}
|
|
42390
|
-
this.contentContainer.addChild(
|
|
42390
|
+
this.contentContainer.addChild(a), this.configureKeyframes();
|
|
42391
42391
|
}
|
|
42392
42392
|
renderFrameSafe(e) {
|
|
42393
42393
|
if (this.isRendering) {
|
|
@@ -42428,10 +42428,10 @@ class Vr extends nr {
|
|
|
42428
42428
|
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
42429
|
}
|
|
42430
42430
|
getSize() {
|
|
42431
|
-
const e = this.edit.
|
|
42431
|
+
const e = this.edit.getDocument()?.getOutput().size;
|
|
42432
42432
|
return {
|
|
42433
|
-
width: this.clipConfiguration.width || e?.
|
|
42434
|
-
height: this.clipConfiguration.height || e?.
|
|
42433
|
+
width: this.clipConfiguration.width || e?.width || this.edit.size.width,
|
|
42434
|
+
height: this.clipConfiguration.height || e?.height || this.edit.size.height
|
|
42435
42435
|
};
|
|
42436
42436
|
}
|
|
42437
42437
|
getContentSize() {
|