@pixldocs/canvas-renderer 0.5.316 → 0.5.317
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-CnPI9yBL.cjs → index-Bx4Y_HmX.cjs} +16 -12
- package/dist/index-Bx4Y_HmX.cjs.map +1 -0
- package/dist/{index-D23LGkaT.js → index-CXbCTms2.js} +16 -12
- package/dist/index-CXbCTms2.js.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/{vectorPdfExport-DR523IAy.js → vectorPdfExport-CM-HtbmR.js} +4 -4
- package/dist/{vectorPdfExport-DR523IAy.js.map → vectorPdfExport-CM-HtbmR.js.map} +1 -1
- package/dist/{vectorPdfExport-CFD-x_MA.cjs → vectorPdfExport-Cbrzzq6K.cjs} +4 -4
- package/dist/{vectorPdfExport-CFD-x_MA.cjs.map → vectorPdfExport-Cbrzzq6K.cjs.map} +1 -1
- package/package.json +1 -1
- package/dist/index-CnPI9yBL.cjs.map +0 -1
- package/dist/index-D23LGkaT.js.map +0 -1
|
@@ -13575,12 +13575,15 @@ const PageCanvas = forwardRef(
|
|
|
13575
13575
|
const t = e.target;
|
|
13576
13576
|
if (t) lastResizeScaleTargetRef.current = t;
|
|
13577
13577
|
try {
|
|
13578
|
-
if (t instanceof fabric.ActiveSelection
|
|
13579
|
-
const
|
|
13580
|
-
if (
|
|
13581
|
-
|
|
13582
|
-
|
|
13583
|
-
|
|
13578
|
+
if (t instanceof fabric.ActiveSelection) {
|
|
13579
|
+
const isRotated = !!t.__pixldocsMixedRotation || Math.abs(((t.angle ?? 0) % 360 + 360) % 360) > 0.5;
|
|
13580
|
+
if (isRotated) {
|
|
13581
|
+
const corner2 = (_a2 = e.transform) == null ? void 0 : _a2.corner;
|
|
13582
|
+
if (corner2 === "ml" || corner2 === "mr") {
|
|
13583
|
+
t.scaleY = t.scaleX;
|
|
13584
|
+
} else if (corner2 === "mt" || corner2 === "mb") {
|
|
13585
|
+
t.scaleX = t.scaleY;
|
|
13586
|
+
}
|
|
13584
13587
|
}
|
|
13585
13588
|
}
|
|
13586
13589
|
} catch {
|
|
@@ -13754,7 +13757,8 @@ const PageCanvas = forwardRef(
|
|
|
13754
13757
|
};
|
|
13755
13758
|
}
|
|
13756
13759
|
}
|
|
13757
|
-
|
|
13760
|
+
const _asRotatedForReflow = obj instanceof fabric.ActiveSelection && (!!obj.__pixldocsMixedRotation || Math.abs(((obj.angle ?? 0) % 360 + 360) % 360) > 0.5);
|
|
13761
|
+
if (obj instanceof fabric.ActiveSelection && !_asRotatedForReflow && (corner === "ml" || corner === "mr" || corner === "mt" || corner === "mb")) {
|
|
13758
13762
|
const isXSide = corner === "ml" || corner === "mr";
|
|
13759
13763
|
const sAxis = isXSide ? Math.abs(obj.scaleX ?? 1) : Math.abs(obj.scaleY ?? 1);
|
|
13760
13764
|
if (sAxis > 1e-3) {
|
|
@@ -24285,9 +24289,9 @@ function captureFabricCanvasSvgForPdf(fabricInstance, canvasWidth, canvasHeight)
|
|
|
24285
24289
|
}
|
|
24286
24290
|
return svgString;
|
|
24287
24291
|
}
|
|
24288
|
-
const resolvedPackageVersion = "0.5.
|
|
24292
|
+
const resolvedPackageVersion = "0.5.317";
|
|
24289
24293
|
const PACKAGE_VERSION = resolvedPackageVersion;
|
|
24290
|
-
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.
|
|
24294
|
+
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.317";
|
|
24291
24295
|
const roundParityValue = (value) => {
|
|
24292
24296
|
if (typeof value !== "number") return value;
|
|
24293
24297
|
return Number.isFinite(value) ? Number(value.toFixed(3)) : value;
|
|
@@ -25101,7 +25105,7 @@ class PixldocsRenderer {
|
|
|
25101
25105
|
await this.waitForCanvasScene(container, cloned, i);
|
|
25102
25106
|
}
|
|
25103
25107
|
console.log(`[canvas-renderer][pdf-unified] mounted ${cloned.pages.length} page(s), handing off to client exportMultiPagePdf`);
|
|
25104
|
-
const { exportMultiPagePdf, preparePagesForExport } = await import("./vectorPdfExport-
|
|
25108
|
+
const { exportMultiPagePdf, preparePagesForExport } = await import("./vectorPdfExport-CM-HtbmR.js");
|
|
25105
25109
|
const prepared = preparePagesForExport(
|
|
25106
25110
|
cloned.pages,
|
|
25107
25111
|
canvasWidth,
|
|
@@ -27421,7 +27425,7 @@ async function prepareLiveCanvasSvgForPdf(rawSvg, pageWidth, pageHeight, pageKey
|
|
|
27421
27425
|
if (options == null ? void 0 : options.stripPageBackground) stripRootPageBackgroundFromSvg(svgToDraw);
|
|
27422
27426
|
sanitizeSvgTreeForPdf(svgToDraw);
|
|
27423
27427
|
try {
|
|
27424
|
-
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await import("./vectorPdfExport-
|
|
27428
|
+
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await import("./vectorPdfExport-CM-HtbmR.js");
|
|
27425
27429
|
try {
|
|
27426
27430
|
await logTextMeasurementDiagnostic(svgToDraw);
|
|
27427
27431
|
} catch {
|
|
@@ -27821,4 +27825,4 @@ export {
|
|
|
27821
27825
|
buildTeaserBlurFlatKeys as y,
|
|
27822
27826
|
collectFontDescriptorsFromConfig as z
|
|
27823
27827
|
};
|
|
27824
|
-
//# sourceMappingURL=index-
|
|
27828
|
+
//# sourceMappingURL=index-CXbCTms2.js.map
|