@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
|
@@ -16331,9 +16331,9 @@ function captureFabricCanvasSvgForPdf(fabricInstance, canvasWidth, canvasHeight)
|
|
|
16331
16331
|
}
|
|
16332
16332
|
return svgString;
|
|
16333
16333
|
}
|
|
16334
|
-
const resolvedPackageVersion = "0.5.
|
|
16334
|
+
const resolvedPackageVersion = "0.5.175";
|
|
16335
16335
|
const PACKAGE_VERSION = resolvedPackageVersion;
|
|
16336
|
-
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.
|
|
16336
|
+
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.175";
|
|
16337
16337
|
const roundParityValue = (value) => {
|
|
16338
16338
|
if (typeof value !== "number") return value;
|
|
16339
16339
|
return Number.isFinite(value) ? Number(value.toFixed(3)) : value;
|
|
@@ -16830,11 +16830,11 @@ class PixldocsRenderer {
|
|
|
16830
16830
|
await this.waitForCanvasScene(container, cloned, i);
|
|
16831
16831
|
const expected = this.getExpectedImageCount(cloned, i);
|
|
16832
16832
|
await this.waitForCanvasImages(container, expected);
|
|
16833
|
-
await this.waitForStableTextMetrics(container, cloned);
|
|
16833
|
+
await this.waitForStableTextMetrics(container, cloned, { clearGlobalCharCache: false });
|
|
16834
16834
|
await this.waitForCanvasScene(container, cloned, i);
|
|
16835
16835
|
}
|
|
16836
16836
|
console.log(`[canvas-renderer][pdf-unified] mounted ${cloned.pages.length} page(s), handing off to client exportMultiPagePdf`);
|
|
16837
|
-
const { exportMultiPagePdf, preparePagesForExport } = await import("./vectorPdfExport-
|
|
16837
|
+
const { exportMultiPagePdf, preparePagesForExport } = await import("./vectorPdfExport-COqBgUXt.js");
|
|
16838
16838
|
const prepared = preparePagesForExport(
|
|
16839
16839
|
cloned.pages,
|
|
16840
16840
|
canvasWidth,
|
|
@@ -17473,7 +17473,7 @@ class PixldocsRenderer {
|
|
|
17473
17473
|
(_a = fabricInstance == null ? void 0 : fabricInstance.getObjects) == null ? void 0 : _a.call(fabricInstance).forEach((obj) => visit(obj));
|
|
17474
17474
|
logJsonLine("[canvas-renderer][fabric-text-parity]", { stage, textboxes: sample.length, sample });
|
|
17475
17475
|
}
|
|
17476
|
-
async waitForStableTextMetrics(container, config) {
|
|
17476
|
+
async waitForStableTextMetrics(container, config, options = {}) {
|
|
17477
17477
|
var _a, _b, _c;
|
|
17478
17478
|
if (typeof document !== "undefined") {
|
|
17479
17479
|
void ensureFontsForResolvedConfig(config);
|
|
@@ -17508,9 +17508,11 @@ class PixldocsRenderer {
|
|
|
17508
17508
|
obj.dirty = true;
|
|
17509
17509
|
}
|
|
17510
17510
|
};
|
|
17511
|
-
|
|
17512
|
-
|
|
17513
|
-
|
|
17511
|
+
if (options.clearGlobalCharCache !== false) {
|
|
17512
|
+
try {
|
|
17513
|
+
clearFabricCharCache();
|
|
17514
|
+
} catch {
|
|
17515
|
+
}
|
|
17514
17516
|
}
|
|
17515
17517
|
fabricInstance.getObjects().forEach(primeCharBounds);
|
|
17516
17518
|
(_a = fabricInstance.calcOffset) == null ? void 0 : _a.call(fabricInstance);
|
|
@@ -18970,7 +18972,7 @@ async function prepareLiveCanvasSvgForPdf(rawSvg, pageWidth, pageHeight, pageKey
|
|
|
18970
18972
|
if (options == null ? void 0 : options.stripPageBackground) stripRootPageBackgroundFromSvg(svgToDraw);
|
|
18971
18973
|
sanitizeSvgTreeForPdf(svgToDraw);
|
|
18972
18974
|
try {
|
|
18973
|
-
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await import("./vectorPdfExport-
|
|
18975
|
+
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await import("./vectorPdfExport-COqBgUXt.js");
|
|
18974
18976
|
try {
|
|
18975
18977
|
await logTextMeasurementDiagnostic(svgToDraw);
|
|
18976
18978
|
} catch {
|
|
@@ -19093,7 +19095,7 @@ async function assemblePdfFromSvgs(svgResults, options = {}) {
|
|
|
19093
19095
|
const shouldStripBg = stripPageBackground ?? hasGradient;
|
|
19094
19096
|
const textMode = options.textMode ?? (options.outlineText === true ? "pixel-perfect" : "selectable");
|
|
19095
19097
|
const shouldOutlineText = textMode === "pixel-perfect" || textMode === "auto";
|
|
19096
|
-
const outlineSubMode = textMode === "
|
|
19098
|
+
const outlineSubMode = textMode === "pixel-perfect" ? "all" : "gradient-only";
|
|
19097
19099
|
let pageSvg = page.svg;
|
|
19098
19100
|
try {
|
|
19099
19101
|
pageSvg = await convertSvgTextDecorationsToLinesString(pageSvg);
|
|
@@ -19383,4 +19385,4 @@ export {
|
|
|
19383
19385
|
collectFontDescriptorsFromConfig as y,
|
|
19384
19386
|
collectFontsFromConfig as z
|
|
19385
19387
|
};
|
|
19386
|
-
//# sourceMappingURL=index-
|
|
19388
|
+
//# sourceMappingURL=index-CTIPncpy.js.map
|