@pixldocs/canvas-renderer 0.5.174 → 0.5.175
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-DLAkGTqW.js → index-CTIPncpy.js} +13 -11
- package/dist/{index-DLAkGTqW.js.map → index-CTIPncpy.js.map} +1 -1
- package/dist/{index-BH1kJLpb.cjs → index-DOxhZsjV.cjs} +13 -11
- package/dist/{index-BH1kJLpb.cjs.map → index-DOxhZsjV.cjs.map} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/{vectorPdfExport-wyGn4ybk.cjs → vectorPdfExport-BZAl0Pdr.cjs} +14 -6
- package/dist/{vectorPdfExport-wyGn4ybk.cjs.map → vectorPdfExport-BZAl0Pdr.cjs.map} +1 -1
- package/dist/{vectorPdfExport-B4B0CPjW.js → vectorPdfExport-COqBgUXt.js} +14 -6
- package/dist/{vectorPdfExport-B4B0CPjW.js.map → vectorPdfExport-COqBgUXt.js.map} +1 -1
- package/package.json +1 -1
|
@@ -16349,9 +16349,9 @@ function captureFabricCanvasSvgForPdf(fabricInstance, canvasWidth, canvasHeight)
|
|
|
16349
16349
|
}
|
|
16350
16350
|
return svgString;
|
|
16351
16351
|
}
|
|
16352
|
-
const resolvedPackageVersion = "0.5.
|
|
16352
|
+
const resolvedPackageVersion = "0.5.175";
|
|
16353
16353
|
const PACKAGE_VERSION = resolvedPackageVersion;
|
|
16354
|
-
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.
|
|
16354
|
+
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.175";
|
|
16355
16355
|
const roundParityValue = (value) => {
|
|
16356
16356
|
if (typeof value !== "number") return value;
|
|
16357
16357
|
return Number.isFinite(value) ? Number(value.toFixed(3)) : value;
|
|
@@ -16848,11 +16848,11 @@ class PixldocsRenderer {
|
|
|
16848
16848
|
await this.waitForCanvasScene(container, cloned, i);
|
|
16849
16849
|
const expected = this.getExpectedImageCount(cloned, i);
|
|
16850
16850
|
await this.waitForCanvasImages(container, expected);
|
|
16851
|
-
await this.waitForStableTextMetrics(container, cloned);
|
|
16851
|
+
await this.waitForStableTextMetrics(container, cloned, { clearGlobalCharCache: false });
|
|
16852
16852
|
await this.waitForCanvasScene(container, cloned, i);
|
|
16853
16853
|
}
|
|
16854
16854
|
console.log(`[canvas-renderer][pdf-unified] mounted ${cloned.pages.length} page(s), handing off to client exportMultiPagePdf`);
|
|
16855
|
-
const { exportMultiPagePdf, preparePagesForExport } = await Promise.resolve().then(() => require("./vectorPdfExport-
|
|
16855
|
+
const { exportMultiPagePdf, preparePagesForExport } = await Promise.resolve().then(() => require("./vectorPdfExport-BZAl0Pdr.cjs"));
|
|
16856
16856
|
const prepared = preparePagesForExport(
|
|
16857
16857
|
cloned.pages,
|
|
16858
16858
|
canvasWidth,
|
|
@@ -17491,7 +17491,7 @@ class PixldocsRenderer {
|
|
|
17491
17491
|
(_a = fabricInstance == null ? void 0 : fabricInstance.getObjects) == null ? void 0 : _a.call(fabricInstance).forEach((obj) => visit(obj));
|
|
17492
17492
|
logJsonLine("[canvas-renderer][fabric-text-parity]", { stage, textboxes: sample.length, sample });
|
|
17493
17493
|
}
|
|
17494
|
-
async waitForStableTextMetrics(container, config) {
|
|
17494
|
+
async waitForStableTextMetrics(container, config, options = {}) {
|
|
17495
17495
|
var _a, _b, _c;
|
|
17496
17496
|
if (typeof document !== "undefined") {
|
|
17497
17497
|
void ensureFontsForResolvedConfig(config);
|
|
@@ -17526,9 +17526,11 @@ class PixldocsRenderer {
|
|
|
17526
17526
|
obj.dirty = true;
|
|
17527
17527
|
}
|
|
17528
17528
|
};
|
|
17529
|
-
|
|
17530
|
-
|
|
17531
|
-
|
|
17529
|
+
if (options.clearGlobalCharCache !== false) {
|
|
17530
|
+
try {
|
|
17531
|
+
clearFabricCharCache();
|
|
17532
|
+
} catch {
|
|
17533
|
+
}
|
|
17532
17534
|
}
|
|
17533
17535
|
fabricInstance.getObjects().forEach(primeCharBounds);
|
|
17534
17536
|
(_a = fabricInstance.calcOffset) == null ? void 0 : _a.call(fabricInstance);
|
|
@@ -18988,7 +18990,7 @@ async function prepareLiveCanvasSvgForPdf(rawSvg, pageWidth, pageHeight, pageKey
|
|
|
18988
18990
|
if (options == null ? void 0 : options.stripPageBackground) stripRootPageBackgroundFromSvg(svgToDraw);
|
|
18989
18991
|
sanitizeSvgTreeForPdf(svgToDraw);
|
|
18990
18992
|
try {
|
|
18991
|
-
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await Promise.resolve().then(() => require("./vectorPdfExport-
|
|
18993
|
+
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await Promise.resolve().then(() => require("./vectorPdfExport-BZAl0Pdr.cjs"));
|
|
18992
18994
|
try {
|
|
18993
18995
|
await logTextMeasurementDiagnostic(svgToDraw);
|
|
18994
18996
|
} catch {
|
|
@@ -19111,7 +19113,7 @@ async function assemblePdfFromSvgs(svgResults, options = {}) {
|
|
|
19111
19113
|
const shouldStripBg = stripPageBackground ?? hasGradient;
|
|
19112
19114
|
const textMode = options.textMode ?? (options.outlineText === true ? "pixel-perfect" : "selectable");
|
|
19113
19115
|
const shouldOutlineText = textMode === "pixel-perfect" || textMode === "auto";
|
|
19114
|
-
const outlineSubMode = textMode === "
|
|
19116
|
+
const outlineSubMode = textMode === "pixel-perfect" ? "all" : "gradient-only";
|
|
19115
19117
|
let pageSvg = page.svg;
|
|
19116
19118
|
try {
|
|
19117
19119
|
pageSvg = await convertSvgTextDecorationsToLinesString(pageSvg);
|
|
@@ -19398,4 +19400,4 @@ exports.setAutoShrinkDebug = setAutoShrinkDebug;
|
|
|
19398
19400
|
exports.setBundledAssetPrefixes = setBundledAssetPrefixes;
|
|
19399
19401
|
exports.warmResolvedTemplateForPreview = warmResolvedTemplateForPreview;
|
|
19400
19402
|
exports.warmTemplateFromForm = warmTemplateFromForm;
|
|
19401
|
-
//# sourceMappingURL=index-
|
|
19403
|
+
//# sourceMappingURL=index-DOxhZsjV.cjs.map
|