@pixldocs/canvas-renderer 0.5.142 → 0.5.145
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-MJxDhnDv.js → index-Br7Pk6Ol.js} +14 -6
- package/dist/index-Br7Pk6Ol.js.map +1 -0
- package/dist/{index-CBXAcuts.cjs → index-DVjmPr0D.cjs} +14 -6
- package/dist/index-DVjmPr0D.cjs.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/{vectorPdfExport-CnC7-RiI.js → vectorPdfExport-B63qQqDW.js} +105 -4
- package/dist/vectorPdfExport-B63qQqDW.js.map +1 -0
- package/dist/{vectorPdfExport-fTlcySFg.cjs → vectorPdfExport-C9jFFq3k.cjs} +105 -4
- package/dist/vectorPdfExport-C9jFFq3k.cjs.map +1 -0
- package/package.json +1 -1
- package/dist/index-CBXAcuts.cjs.map +0 -1
- package/dist/index-MJxDhnDv.js.map +0 -1
- package/dist/vectorPdfExport-CnC7-RiI.js.map +0 -1
- package/dist/vectorPdfExport-fTlcySFg.cjs.map +0 -1
|
@@ -2675,7 +2675,7 @@ async function loadFontshareFont(fontFamily, slug, weights) {
|
|
|
2675
2675
|
if (existing) return existing;
|
|
2676
2676
|
const promise = (async () => {
|
|
2677
2677
|
try {
|
|
2678
|
-
const weightStr = (weights || [300, 400, 500, 700]).join(",");
|
|
2678
|
+
const weightStr = (weights || [300, 400, 500, 600, 700]).join(",");
|
|
2679
2679
|
const url = `https://api.fontshare.com/v2/css?f[]=${slug}@${weightStr}&display=swap`;
|
|
2680
2680
|
if (document.querySelector(`link[href="${url}"]`)) return true;
|
|
2681
2681
|
const link = document.createElement("link");
|
|
@@ -14760,7 +14760,7 @@ async function registerRemoteFontFaceViaProxy(family, requestedWeight, styleRaw)
|
|
|
14760
14760
|
try {
|
|
14761
14761
|
const weightsToRegister = /* @__PURE__ */ new Set([actualWeight]);
|
|
14762
14762
|
const requestedNum = Number.isFinite(parsed) ? Math.max(100, Math.min(900, parsed)) : 400;
|
|
14763
|
-
weightsToRegister.add(requestedNum);
|
|
14763
|
+
if (requestedNum === actualWeight) weightsToRegister.add(requestedNum);
|
|
14764
14764
|
for (const w of weightsToRegister) {
|
|
14765
14765
|
const aliasKey = `${family}|${w}|${style}|${source}`;
|
|
14766
14766
|
if (registeredRemoteFontFaces.has(aliasKey)) continue;
|
|
@@ -15974,7 +15974,7 @@ function captureFabricCanvasSvgForPdf(fabricInstance, canvasWidth, canvasHeight)
|
|
|
15974
15974
|
}
|
|
15975
15975
|
return svgString;
|
|
15976
15976
|
}
|
|
15977
|
-
const PACKAGE_VERSION = "0.5.
|
|
15977
|
+
const PACKAGE_VERSION = "0.5.145";
|
|
15978
15978
|
const roundParityValue = (value) => {
|
|
15979
15979
|
if (typeof value !== "number") return value;
|
|
15980
15980
|
return Number.isFinite(value) ? Number(value.toFixed(3)) : value;
|
|
@@ -16399,7 +16399,7 @@ class PixldocsRenderer {
|
|
|
16399
16399
|
await this.waitForCanvasScene(container, cloned, i);
|
|
16400
16400
|
}
|
|
16401
16401
|
console.log(`[canvas-renderer][pdf-unified] mounted ${cloned.pages.length} page(s), handing off to client exportMultiPagePdf`);
|
|
16402
|
-
const { exportMultiPagePdf, preparePagesForExport } = await Promise.resolve().then(() => require("./vectorPdfExport-
|
|
16402
|
+
const { exportMultiPagePdf, preparePagesForExport } = await Promise.resolve().then(() => require("./vectorPdfExport-C9jFFq3k.cjs"));
|
|
16403
16403
|
const prepared = preparePagesForExport(
|
|
16404
16404
|
cloned.pages,
|
|
16405
16405
|
canvasWidth,
|
|
@@ -17039,6 +17039,10 @@ class PixldocsRenderer {
|
|
|
17039
17039
|
obj.dirty = true;
|
|
17040
17040
|
}
|
|
17041
17041
|
};
|
|
17042
|
+
try {
|
|
17043
|
+
clearFabricCharCache();
|
|
17044
|
+
} catch {
|
|
17045
|
+
}
|
|
17042
17046
|
fabricInstance.getObjects().forEach(primeCharBounds);
|
|
17043
17047
|
(_a = fabricInstance.calcOffset) == null ? void 0 : _a.call(fabricInstance);
|
|
17044
17048
|
(_b = fabricInstance.renderAll) == null ? void 0 : _b.call(fabricInstance);
|
|
@@ -18497,7 +18501,11 @@ async function prepareLiveCanvasSvgForPdf(rawSvg, pageWidth, pageHeight, pageKey
|
|
|
18497
18501
|
if (options == null ? void 0 : options.stripPageBackground) stripRootPageBackgroundFromSvg(svgToDraw);
|
|
18498
18502
|
sanitizeSvgTreeForPdf(svgToDraw);
|
|
18499
18503
|
try {
|
|
18500
|
-
const { bakeTextAnchorPositionsFromLiveSvg } = await Promise.resolve().then(() => require("./vectorPdfExport-
|
|
18504
|
+
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await Promise.resolve().then(() => require("./vectorPdfExport-C9jFFq3k.cjs"));
|
|
18505
|
+
try {
|
|
18506
|
+
await logTextMeasurementDiagnostic(svgToDraw);
|
|
18507
|
+
} catch {
|
|
18508
|
+
}
|
|
18501
18509
|
await bakeTextAnchorPositionsFromLiveSvg(svgToDraw);
|
|
18502
18510
|
} catch (e) {
|
|
18503
18511
|
console.warn("[canvas-renderer][pdf-export] anchor-bake pass failed (continuing):", e);
|
|
@@ -18839,4 +18847,4 @@ exports.setAutoShrinkDebug = setAutoShrinkDebug;
|
|
|
18839
18847
|
exports.setBundledAssetPrefixes = setBundledAssetPrefixes;
|
|
18840
18848
|
exports.warmResolvedTemplateForPreview = warmResolvedTemplateForPreview;
|
|
18841
18849
|
exports.warmTemplateFromForm = warmTemplateFromForm;
|
|
18842
|
-
//# sourceMappingURL=index-
|
|
18850
|
+
//# sourceMappingURL=index-DVjmPr0D.cjs.map
|