@pixldocs/canvas-renderer 0.5.320 → 0.5.322
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-BwDF94FE.js → index-BnpPfLA1.js} +42 -5
- package/dist/index-BnpPfLA1.js.map +1 -0
- package/dist/{index-wHNXUueq.cjs → index-CALomPaP.cjs} +42 -5
- package/dist/index-CALomPaP.cjs.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/{vectorPdfExport-B1wohdgq.js → vectorPdfExport-Bgsf0Zdu.js} +4 -4
- package/dist/{vectorPdfExport-B1wohdgq.js.map → vectorPdfExport-Bgsf0Zdu.js.map} +1 -1
- package/dist/{vectorPdfExport-BFpf44ad.cjs → vectorPdfExport-ChGwOWZr.cjs} +4 -4
- package/dist/{vectorPdfExport-BFpf44ad.cjs.map → vectorPdfExport-ChGwOWZr.cjs.map} +1 -1
- package/package.json +1 -1
- package/dist/index-BwDF94FE.js.map +0 -1
- package/dist/index-wHNXUueq.cjs.map +0 -1
|
@@ -13572,6 +13572,30 @@ const PageCanvas = forwardRef(
|
|
|
13572
13572
|
}
|
|
13573
13573
|
const obj = t;
|
|
13574
13574
|
if (!obj) return;
|
|
13575
|
+
try {
|
|
13576
|
+
const transformInfo = e.transform;
|
|
13577
|
+
const cornerEarly = (transformInfo == null ? void 0 : transformInfo.corner) || "";
|
|
13578
|
+
const isSideHandle = cornerEarly === "ml" || cornerEarly === "mr" || cornerEarly === "mt" || cornerEarly === "mb";
|
|
13579
|
+
const isGroupLike = obj instanceof fabric.Group && !obj.__cropGroup && !obj.__docuforgeSectionGroup;
|
|
13580
|
+
if (isSideHandle && isGroupLike && typeof obj.getObjects === "function") {
|
|
13581
|
+
const kids = obj.getObjects();
|
|
13582
|
+
const hasRotatedChild = kids.some(
|
|
13583
|
+
(c) => Math.abs((c.angle ?? 0) % 360) > 0.5
|
|
13584
|
+
);
|
|
13585
|
+
if (hasRotatedChild) {
|
|
13586
|
+
const isXSideEarly = cornerEarly === "ml" || cornerEarly === "mr";
|
|
13587
|
+
if (isXSideEarly) {
|
|
13588
|
+
obj._set("scaleY", obj.scaleX ?? 1);
|
|
13589
|
+
} else {
|
|
13590
|
+
obj._set("scaleX", obj.scaleY ?? 1);
|
|
13591
|
+
}
|
|
13592
|
+
obj.setCoords();
|
|
13593
|
+
obj.dirty = true;
|
|
13594
|
+
return;
|
|
13595
|
+
}
|
|
13596
|
+
}
|
|
13597
|
+
} catch {
|
|
13598
|
+
}
|
|
13575
13599
|
if (obj instanceof fabric.Rect || obj instanceof fabric.Path || obj instanceof fabric.Circle || obj instanceof fabric.Triangle || obj instanceof fabric.Line) {
|
|
13576
13600
|
obj.set({ strokeUniform: true });
|
|
13577
13601
|
}
|
|
@@ -13736,6 +13760,19 @@ const PageCanvas = forwardRef(
|
|
|
13736
13760
|
const isXSide = corner === "ml" || corner === "mr";
|
|
13737
13761
|
const sAxis = isXSide ? Math.abs(obj.scaleX ?? 1) : Math.abs(obj.scaleY ?? 1);
|
|
13738
13762
|
if (sAxis > 1e-3) {
|
|
13763
|
+
const hasRotatedChild = obj.getObjects().some(
|
|
13764
|
+
(c) => Math.abs((c.angle ?? 0) % 360) > 0.5
|
|
13765
|
+
);
|
|
13766
|
+
if (hasRotatedChild) {
|
|
13767
|
+
if (isXSide) {
|
|
13768
|
+
obj._set("scaleY", obj.scaleX ?? 1);
|
|
13769
|
+
} else {
|
|
13770
|
+
obj._set("scaleX", obj.scaleY ?? 1);
|
|
13771
|
+
}
|
|
13772
|
+
obj.setCoords();
|
|
13773
|
+
obj.dirty = true;
|
|
13774
|
+
return;
|
|
13775
|
+
}
|
|
13739
13776
|
if (isXSide && ((_b2 = groupShiftReflowSnapshotRef.current) == null ? void 0 : _b2.selection) !== obj) {
|
|
13740
13777
|
groupShiftReflowSnapshotRef.current = null;
|
|
13741
13778
|
const logicalGroupId = obj.__pixldocsGroupSelection;
|
|
@@ -24263,9 +24300,9 @@ function captureFabricCanvasSvgForPdf(fabricInstance, canvasWidth, canvasHeight)
|
|
|
24263
24300
|
}
|
|
24264
24301
|
return svgString;
|
|
24265
24302
|
}
|
|
24266
|
-
const resolvedPackageVersion = "0.5.
|
|
24303
|
+
const resolvedPackageVersion = "0.5.322";
|
|
24267
24304
|
const PACKAGE_VERSION = resolvedPackageVersion;
|
|
24268
|
-
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.
|
|
24305
|
+
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.322";
|
|
24269
24306
|
const roundParityValue = (value) => {
|
|
24270
24307
|
if (typeof value !== "number") return value;
|
|
24271
24308
|
return Number.isFinite(value) ? Number(value.toFixed(3)) : value;
|
|
@@ -25079,7 +25116,7 @@ class PixldocsRenderer {
|
|
|
25079
25116
|
await this.waitForCanvasScene(container, cloned, i);
|
|
25080
25117
|
}
|
|
25081
25118
|
console.log(`[canvas-renderer][pdf-unified] mounted ${cloned.pages.length} page(s), handing off to client exportMultiPagePdf`);
|
|
25082
|
-
const { exportMultiPagePdf, preparePagesForExport } = await import("./vectorPdfExport-
|
|
25119
|
+
const { exportMultiPagePdf, preparePagesForExport } = await import("./vectorPdfExport-Bgsf0Zdu.js");
|
|
25083
25120
|
const prepared = preparePagesForExport(
|
|
25084
25121
|
cloned.pages,
|
|
25085
25122
|
canvasWidth,
|
|
@@ -27399,7 +27436,7 @@ async function prepareLiveCanvasSvgForPdf(rawSvg, pageWidth, pageHeight, pageKey
|
|
|
27399
27436
|
if (options == null ? void 0 : options.stripPageBackground) stripRootPageBackgroundFromSvg(svgToDraw);
|
|
27400
27437
|
sanitizeSvgTreeForPdf(svgToDraw);
|
|
27401
27438
|
try {
|
|
27402
|
-
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await import("./vectorPdfExport-
|
|
27439
|
+
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await import("./vectorPdfExport-Bgsf0Zdu.js");
|
|
27403
27440
|
try {
|
|
27404
27441
|
await logTextMeasurementDiagnostic(svgToDraw);
|
|
27405
27442
|
} catch {
|
|
@@ -27799,4 +27836,4 @@ export {
|
|
|
27799
27836
|
buildTeaserBlurFlatKeys as y,
|
|
27800
27837
|
collectFontDescriptorsFromConfig as z
|
|
27801
27838
|
};
|
|
27802
|
-
//# sourceMappingURL=index-
|
|
27839
|
+
//# sourceMappingURL=index-BnpPfLA1.js.map
|