@pixldocs/canvas-renderer 0.5.295 → 0.5.296
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-DmJeO8GF.js → index-JckTC23Z.js} +16 -6
- package/dist/index-JckTC23Z.js.map +1 -0
- package/dist/{index-Z2C993Tm.cjs → index-QphA136A.cjs} +16 -6
- package/dist/index-QphA136A.cjs.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/{vectorPdfExport-BeR1yhlp.cjs → vectorPdfExport-BhdvkuRF.cjs} +4 -4
- package/dist/{vectorPdfExport-BeR1yhlp.cjs.map → vectorPdfExport-BhdvkuRF.cjs.map} +1 -1
- package/dist/{vectorPdfExport-BLXRwisV.js → vectorPdfExport-Lo1YQq71.js} +4 -4
- package/dist/{vectorPdfExport-BLXRwisV.js.map → vectorPdfExport-Lo1YQq71.js.map} +1 -1
- package/package.json +1 -1
- package/dist/index-DmJeO8GF.js.map +0 -1
- package/dist/index-Z2C993Tm.cjs.map +0 -1
|
@@ -14600,10 +14600,20 @@ const PageCanvas = react.forwardRef(
|
|
|
14600
14600
|
const prevObjCaching = obj.objectCaching;
|
|
14601
14601
|
obj.set({ width: bakedWidth, scaleX: 1, scaleY: 1, objectCaching: false });
|
|
14602
14602
|
obj.initDimensions();
|
|
14603
|
-
obj.setPositionByOrigin(preBakeCenter, "center", "center");
|
|
14604
14603
|
obj.objectCaching = prevObjCaching;
|
|
14605
14604
|
if (sx > 0 && sy > 0) {
|
|
14606
14605
|
obj.set({ scaleX: 1 / sx, scaleY: 1 / sy });
|
|
14606
|
+
const asTx = Number(decomposed.translateX ?? 0);
|
|
14607
|
+
const asTy = Number(decomposed.translateY ?? 0);
|
|
14608
|
+
const localCx = (preBakeCenter.x - asTx) / sx;
|
|
14609
|
+
const localCy = (preBakeCenter.y - asTy) / sy;
|
|
14610
|
+
const localWidth = bakedWidth * (1 / sx);
|
|
14611
|
+
const localHeight = (obj.height ?? intrinsicHeight) * (1 / sy);
|
|
14612
|
+
obj.set({
|
|
14613
|
+
left: localCx - localWidth / 2,
|
|
14614
|
+
top: localCy - localHeight / 2
|
|
14615
|
+
});
|
|
14616
|
+
} else {
|
|
14607
14617
|
obj.setPositionByOrigin(preBakeCenter, "center", "center");
|
|
14608
14618
|
}
|
|
14609
14619
|
obj.dirty = true;
|
|
@@ -23847,9 +23857,9 @@ function captureFabricCanvasSvgForPdf(fabricInstance, canvasWidth, canvasHeight)
|
|
|
23847
23857
|
}
|
|
23848
23858
|
return svgString;
|
|
23849
23859
|
}
|
|
23850
|
-
const resolvedPackageVersion = "0.5.
|
|
23860
|
+
const resolvedPackageVersion = "0.5.296";
|
|
23851
23861
|
const PACKAGE_VERSION = resolvedPackageVersion;
|
|
23852
|
-
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.
|
|
23862
|
+
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.296";
|
|
23853
23863
|
const roundParityValue = (value) => {
|
|
23854
23864
|
if (typeof value !== "number") return value;
|
|
23855
23865
|
return Number.isFinite(value) ? Number(value.toFixed(3)) : value;
|
|
@@ -24663,7 +24673,7 @@ class PixldocsRenderer {
|
|
|
24663
24673
|
await this.waitForCanvasScene(container, cloned, i);
|
|
24664
24674
|
}
|
|
24665
24675
|
console.log(`[canvas-renderer][pdf-unified] mounted ${cloned.pages.length} page(s), handing off to client exportMultiPagePdf`);
|
|
24666
|
-
const { exportMultiPagePdf, preparePagesForExport } = await Promise.resolve().then(() => require("./vectorPdfExport-
|
|
24676
|
+
const { exportMultiPagePdf, preparePagesForExport } = await Promise.resolve().then(() => require("./vectorPdfExport-BhdvkuRF.cjs"));
|
|
24667
24677
|
const prepared = preparePagesForExport(
|
|
24668
24678
|
cloned.pages,
|
|
24669
24679
|
canvasWidth,
|
|
@@ -26983,7 +26993,7 @@ async function prepareLiveCanvasSvgForPdf(rawSvg, pageWidth, pageHeight, pageKey
|
|
|
26983
26993
|
if (options == null ? void 0 : options.stripPageBackground) stripRootPageBackgroundFromSvg(svgToDraw);
|
|
26984
26994
|
sanitizeSvgTreeForPdf(svgToDraw);
|
|
26985
26995
|
try {
|
|
26986
|
-
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await Promise.resolve().then(() => require("./vectorPdfExport-
|
|
26996
|
+
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await Promise.resolve().then(() => require("./vectorPdfExport-BhdvkuRF.cjs"));
|
|
26987
26997
|
try {
|
|
26988
26998
|
await logTextMeasurementDiagnostic(svgToDraw);
|
|
26989
26999
|
} catch {
|
|
@@ -27380,4 +27390,4 @@ exports.setAutoShrinkDebug = setAutoShrinkDebug;
|
|
|
27380
27390
|
exports.setBundledAssetPrefixes = setBundledAssetPrefixes;
|
|
27381
27391
|
exports.warmResolvedTemplateForPreview = warmResolvedTemplateForPreview;
|
|
27382
27392
|
exports.warmTemplateFromForm = warmTemplateFromForm;
|
|
27383
|
-
//# sourceMappingURL=index-
|
|
27393
|
+
//# sourceMappingURL=index-QphA136A.cjs.map
|