@pixldocs/canvas-renderer 0.5.323 → 0.5.325
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-DZw_u3PM.cjs → index-BeSkXpzz.cjs} +13 -32
- package/dist/{index-DZw_u3PM.cjs.map → index-BeSkXpzz.cjs.map} +1 -1
- package/dist/{index-B7-tIVVJ.js → index-CYpr1MY-.js} +13 -32
- package/dist/{index-B7-tIVVJ.js.map → index-CYpr1MY-.js.map} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/{vectorPdfExport-Da51BWna.cjs → vectorPdfExport-DHtj2TRz.cjs} +4 -4
- package/dist/{vectorPdfExport-Da51BWna.cjs.map → vectorPdfExport-DHtj2TRz.cjs.map} +1 -1
- package/dist/{vectorPdfExport-CMBSLf34.js → vectorPdfExport-Mq6tcwR7.js} +4 -4
- package/dist/{vectorPdfExport-CMBSLf34.js.map → vectorPdfExport-Mq6tcwR7.js.map} +1 -1
- package/package.json +1 -1
|
@@ -13572,30 +13572,6 @@ 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
|
-
}
|
|
13599
13575
|
if (obj instanceof fabric.Rect || obj instanceof fabric.Path || obj instanceof fabric.Circle || obj instanceof fabric.Triangle || obj instanceof fabric.Line) {
|
|
13600
13576
|
obj.set({ strokeUniform: true });
|
|
13601
13577
|
}
|
|
@@ -13760,10 +13736,15 @@ const PageCanvas = forwardRef(
|
|
|
13760
13736
|
const isXSide = corner === "ml" || corner === "mr";
|
|
13761
13737
|
const sAxis = isXSide ? Math.abs(obj.scaleX ?? 1) : Math.abs(obj.scaleY ?? 1);
|
|
13762
13738
|
if (sAxis > 1e-3) {
|
|
13763
|
-
const
|
|
13764
|
-
|
|
13739
|
+
const childAnglesNorm = obj.getObjects().map((c) => {
|
|
13740
|
+
const a = (c.angle ?? 0) % 360;
|
|
13741
|
+
return a < 0 ? a + 360 : a;
|
|
13742
|
+
});
|
|
13743
|
+
const baseAngle = childAnglesNorm[0] ?? 0;
|
|
13744
|
+
const hasMixedRotation = childAnglesNorm.some(
|
|
13745
|
+
(a) => Math.abs(a - baseAngle) > 0.5 && Math.abs(Math.abs(a - baseAngle) - 360) > 0.5
|
|
13765
13746
|
);
|
|
13766
|
-
if (
|
|
13747
|
+
if (hasMixedRotation) {
|
|
13767
13748
|
if (isXSide) {
|
|
13768
13749
|
obj._set("scaleY", obj.scaleX ?? 1);
|
|
13769
13750
|
} else {
|
|
@@ -24300,9 +24281,9 @@ function captureFabricCanvasSvgForPdf(fabricInstance, canvasWidth, canvasHeight)
|
|
|
24300
24281
|
}
|
|
24301
24282
|
return svgString;
|
|
24302
24283
|
}
|
|
24303
|
-
const resolvedPackageVersion = "0.5.
|
|
24284
|
+
const resolvedPackageVersion = "0.5.325";
|
|
24304
24285
|
const PACKAGE_VERSION = resolvedPackageVersion;
|
|
24305
|
-
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.
|
|
24286
|
+
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.325";
|
|
24306
24287
|
const roundParityValue = (value) => {
|
|
24307
24288
|
if (typeof value !== "number") return value;
|
|
24308
24289
|
return Number.isFinite(value) ? Number(value.toFixed(3)) : value;
|
|
@@ -25116,7 +25097,7 @@ class PixldocsRenderer {
|
|
|
25116
25097
|
await this.waitForCanvasScene(container, cloned, i);
|
|
25117
25098
|
}
|
|
25118
25099
|
console.log(`[canvas-renderer][pdf-unified] mounted ${cloned.pages.length} page(s), handing off to client exportMultiPagePdf`);
|
|
25119
|
-
const { exportMultiPagePdf, preparePagesForExport } = await import("./vectorPdfExport-
|
|
25100
|
+
const { exportMultiPagePdf, preparePagesForExport } = await import("./vectorPdfExport-Mq6tcwR7.js");
|
|
25120
25101
|
const prepared = preparePagesForExport(
|
|
25121
25102
|
cloned.pages,
|
|
25122
25103
|
canvasWidth,
|
|
@@ -27436,7 +27417,7 @@ async function prepareLiveCanvasSvgForPdf(rawSvg, pageWidth, pageHeight, pageKey
|
|
|
27436
27417
|
if (options == null ? void 0 : options.stripPageBackground) stripRootPageBackgroundFromSvg(svgToDraw);
|
|
27437
27418
|
sanitizeSvgTreeForPdf(svgToDraw);
|
|
27438
27419
|
try {
|
|
27439
|
-
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await import("./vectorPdfExport-
|
|
27420
|
+
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await import("./vectorPdfExport-Mq6tcwR7.js");
|
|
27440
27421
|
try {
|
|
27441
27422
|
await logTextMeasurementDiagnostic(svgToDraw);
|
|
27442
27423
|
} catch {
|
|
@@ -27836,4 +27817,4 @@ export {
|
|
|
27836
27817
|
buildTeaserBlurFlatKeys as y,
|
|
27837
27818
|
collectFontDescriptorsFromConfig as z
|
|
27838
27819
|
};
|
|
27839
|
-
//# sourceMappingURL=index-
|
|
27820
|
+
//# sourceMappingURL=index-CYpr1MY-.js.map
|