mnfst 0.5.77 → 0.5.78
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/lib/manifest.export.js +13 -6
- package/package.json +1 -1
package/lib/manifest.export.js
CHANGED
|
@@ -241,7 +241,7 @@ function initializeExportPlugin() {
|
|
|
241
241
|
const safer = {
|
|
242
242
|
...so,
|
|
243
243
|
scale: Math.min(so.scale || 2, 1),
|
|
244
|
-
font:
|
|
244
|
+
font: false,
|
|
245
245
|
};
|
|
246
246
|
return await lib[fn](target, safer);
|
|
247
247
|
}
|
|
@@ -433,14 +433,21 @@ function initializeExportPlugin() {
|
|
|
433
433
|
// html-to-image with proper CSS AST parsing. It handles @layer rules,
|
|
434
434
|
// CSS custom properties, modern color functions, and url(data:...) values
|
|
435
435
|
// inside cross-origin stylesheets — all of which html-to-image mishandles.
|
|
436
|
+
// It ships ESM-only, so we load via dynamic import() rather than a script
|
|
437
|
+
// tag. jsDelivr serves the ESM bundle directly.
|
|
436
438
|
let snapshotLibPromise = null;
|
|
437
439
|
function loadSnapshotLib() {
|
|
438
440
|
if (snapshotLibPromise) return snapshotLibPromise;
|
|
439
|
-
snapshotLibPromise =
|
|
440
|
-
.then(() => {
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
441
|
+
snapshotLibPromise = import('https://cdn.jsdelivr.net/npm/modern-screenshot@4/dist/index.mjs')
|
|
442
|
+
.then((mod) => {
|
|
443
|
+
if (!mod || typeof mod.domToPng !== 'function') {
|
|
444
|
+
throw new Error('modern-screenshot failed to load (missing expected exports)');
|
|
445
|
+
}
|
|
446
|
+
return mod;
|
|
447
|
+
})
|
|
448
|
+
.catch((err) => {
|
|
449
|
+
snapshotLibPromise = null; // allow retry on next call
|
|
450
|
+
throw err;
|
|
444
451
|
});
|
|
445
452
|
return snapshotLibPromise;
|
|
446
453
|
}
|