@kgalexander/mcreate 1.0.5 → 1.0.7
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.js +2 -2
- package/dist/index.mjs +3 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -16988,9 +16988,9 @@ async function captureTemplateImage(compiledHtml) {
|
|
|
16988
16988
|
await new Promise((resolve) => requestAnimationFrame(resolve));
|
|
16989
16989
|
await new Promise((resolve) => setTimeout(resolve, 100));
|
|
16990
16990
|
try {
|
|
16991
|
-
const dataUrl = await (0, import_html_to_image.
|
|
16991
|
+
const dataUrl = await (0, import_html_to_image.toJpeg)(container, {
|
|
16992
16992
|
width: CAPTURE_WIDTH,
|
|
16993
|
-
quality: 0.
|
|
16993
|
+
quality: 0.5,
|
|
16994
16994
|
pixelRatio: 1,
|
|
16995
16995
|
cacheBust: true,
|
|
16996
16996
|
imagePlaceholder: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mN88P/BfwAJhAPkD+pMGAAAAABJRU5ErkJggg==",
|
package/dist/index.mjs
CHANGED
|
@@ -204,7 +204,7 @@ function TemplateNameDialog() {
|
|
|
204
204
|
}
|
|
205
205
|
|
|
206
206
|
// src/core/editor/utils/capture-template.ts
|
|
207
|
-
import {
|
|
207
|
+
import { toJpeg } from "html-to-image";
|
|
208
208
|
var CAPTURE_WIDTH = 600;
|
|
209
209
|
async function captureTemplateImage(compiledHtml) {
|
|
210
210
|
const container = document.createElement("div");
|
|
@@ -222,9 +222,9 @@ async function captureTemplateImage(compiledHtml) {
|
|
|
222
222
|
await new Promise((resolve) => requestAnimationFrame(resolve));
|
|
223
223
|
await new Promise((resolve) => setTimeout(resolve, 100));
|
|
224
224
|
try {
|
|
225
|
-
const dataUrl = await
|
|
225
|
+
const dataUrl = await toJpeg(container, {
|
|
226
226
|
width: CAPTURE_WIDTH,
|
|
227
|
-
quality: 0.
|
|
227
|
+
quality: 0.5,
|
|
228
228
|
pixelRatio: 1,
|
|
229
229
|
cacheBust: true,
|
|
230
230
|
imagePlaceholder: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mN88P/BfwAJhAPkD+pMGAAAAABJRU5ErkJggg==",
|