@shotstack/shotstack-studio 2.24.1 → 2.24.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 dD = "2.24.
|
|
14
|
+
const dD = "2.24.1", fD = {
|
|
15
15
|
version: dD
|
|
16
16
|
};
|
|
17
17
|
function Cv(e, t, i) {
|
|
@@ -38638,12 +38638,21 @@ ${t.stack}` : t), this.createFallbackGraphic();
|
|
|
38638
38638
|
}
|
|
38639
38639
|
captureIframeAsForeignObjectSvg(t, i) {
|
|
38640
38640
|
if (!this.iframe?.contentDocument) throw new Error("iframe not ready");
|
|
38641
|
-
const r = this.iframe.contentDocument, n = new XMLSerializer(), s = Array.from(r.querySelectorAll("style")).map((
|
|
38642
|
-
o.querySelectorAll("script").forEach((
|
|
38643
|
-
const l =
|
|
38644
|
-
|
|
38645
|
-
|
|
38646
|
-
|
|
38641
|
+
const r = this.iframe.contentDocument, n = new XMLSerializer(), s = Array.from(r.querySelectorAll("style")).map((f) => n.serializeToString(f)).join(""), a = "<style>*,*::before,*::after{animation:none!important;transition:none!important}</style>", o = r.body.cloneNode(!0);
|
|
38642
|
+
o.querySelectorAll("script").forEach((f) => f.remove());
|
|
38643
|
+
const l = r.body.querySelectorAll("canvas"), u = o.querySelectorAll("canvas");
|
|
38644
|
+
for (let f = 0; f < u.length; f += 1) {
|
|
38645
|
+
const { style: h } = u[f], p = r.defaultView?.getComputedStyle(l[f]);
|
|
38646
|
+
p && (h.display = p.display === "inline" ? "inline-block" : p.display, h.width = p.width, h.height = p.height);
|
|
38647
|
+
try {
|
|
38648
|
+
h.backgroundImage = `url("${l[f].toDataURL()}")`, h.backgroundSize = "100% 100%", h.backgroundOrigin = "content-box", h.backgroundRepeat = "no-repeat";
|
|
38649
|
+
} catch {
|
|
38650
|
+
}
|
|
38651
|
+
}
|
|
38652
|
+
const c = o.getAttribute("style") ?? "";
|
|
38653
|
+
o.setAttribute("style", `width:${t}px;height:${i}px;margin:0;overflow:hidden;${c}`);
|
|
38654
|
+
const d = n.serializeToString(o);
|
|
38655
|
+
return `<svg xmlns="http://www.w3.org/2000/svg" width="${t}" height="${i}"><foreignObject width="${t}" height="${i}">${s}${a}${d}</foreignObject></svg>`;
|
|
38647
38656
|
}
|
|
38648
38657
|
async getDecodedFrame(t) {
|
|
38649
38658
|
if (!this.capturedFrames) return null;
|