@pixldocs/canvas-renderer 0.5.307 → 0.5.308
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-D4p1jWxS.js → index-C56kkT1g.js} +34 -5
- package/dist/index-C56kkT1g.js.map +1 -0
- package/dist/{index-DDubE6xA.cjs → index-DvZ7xADZ.cjs} +34 -5
- package/dist/index-DvZ7xADZ.cjs.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/{vectorPdfExport-BLbk8p1V.cjs → vectorPdfExport-CRUQe1BV.cjs} +4 -4
- package/dist/{vectorPdfExport-BLbk8p1V.cjs.map → vectorPdfExport-CRUQe1BV.cjs.map} +1 -1
- package/dist/{vectorPdfExport-B6HX4s-I.js → vectorPdfExport-D_Bu2WUi.js} +4 -4
- package/dist/{vectorPdfExport-B6HX4s-I.js.map → vectorPdfExport-D_Bu2WUi.js.map} +1 -1
- package/package.json +1 -1
- package/dist/index-D4p1jWxS.js.map +0 -1
- package/dist/index-DDubE6xA.cjs.map +0 -1
|
@@ -11259,6 +11259,10 @@ const PageCanvas = forwardRef(
|
|
|
11259
11259
|
if (groupNode && !isStackLayoutMode(groupNode.layoutMode) && typeof groupNode.angle === "number" && Math.abs(groupNode.angle) > 0.01) {
|
|
11260
11260
|
const currentAngle = ((selection.angle ?? 0) % 360 + 360) % 360;
|
|
11261
11261
|
const targetAngle = ((groupNode.angle ?? 0) % 360 + 360) % 360;
|
|
11262
|
+
try {
|
|
11263
|
+
console.log("[ROT-DBG] restore AS angle", { groupId, currentAngle, targetAngle, childCount: selection.getObjects().length });
|
|
11264
|
+
} catch {
|
|
11265
|
+
}
|
|
11262
11266
|
if (Math.abs(currentAngle - targetAngle) > 0.01) {
|
|
11263
11267
|
selection.rotate(targetAngle);
|
|
11264
11268
|
selection.setCoords();
|
|
@@ -14607,6 +14611,27 @@ const PageCanvas = forwardRef(
|
|
|
14607
14611
|
360 - Math.abs(currentSelAngle - startSelAngle)
|
|
14608
14612
|
);
|
|
14609
14613
|
const hadRotation = isActiveSelection && activeObj && angleDelta > 0.01;
|
|
14614
|
+
try {
|
|
14615
|
+
console.log("[ROT-DBG] object:modified", {
|
|
14616
|
+
isActiveSelection,
|
|
14617
|
+
isAS: activeObj instanceof fabric.ActiveSelection,
|
|
14618
|
+
groupToMoveId: groupToMove == null ? void 0 : groupToMove.id,
|
|
14619
|
+
groupToMoveLayout: groupToMove == null ? void 0 : groupToMove.layoutMode,
|
|
14620
|
+
groupSelMarker: activeObj == null ? void 0 : activeObj.__pixldocsGroupSelection,
|
|
14621
|
+
startSelAngle,
|
|
14622
|
+
currentSelAngle,
|
|
14623
|
+
angleDelta,
|
|
14624
|
+
hadRotation,
|
|
14625
|
+
hadScale,
|
|
14626
|
+
deltaX,
|
|
14627
|
+
deltaY,
|
|
14628
|
+
asScaleX: activeObj == null ? void 0 : activeObj.scaleX,
|
|
14629
|
+
asScaleY: activeObj == null ? void 0 : activeObj.scaleY,
|
|
14630
|
+
childCount: activeObj instanceof fabric.ActiveSelection ? activeObj.getObjects().length : 0,
|
|
14631
|
+
childAngles: activeObj instanceof fabric.ActiveSelection ? activeObj.getObjects().map((o) => Math.round(((o.angle ?? 0) + Number.EPSILON) * 100) / 100) : []
|
|
14632
|
+
});
|
|
14633
|
+
} catch {
|
|
14634
|
+
}
|
|
14610
14635
|
if (!hadScale && !hadRotation && (Math.abs(deltaX) > 0.1 || Math.abs(deltaY) > 0.1)) {
|
|
14611
14636
|
const { updateNode: updateNodeStore, commitHistory: commitHistoryStore, getCurrentElements } = useEditorStore.getState();
|
|
14612
14637
|
const newLeft = (groupToMove.left ?? 0) + deltaX;
|
|
@@ -14649,6 +14674,10 @@ const PageCanvas = forwardRef(
|
|
|
14649
14674
|
if (hadRotation && !hadScale && isActiveSelection && activeObj instanceof fabric.ActiveSelection && !isStackLayoutMode(groupToMove.layoutMode)) {
|
|
14650
14675
|
const groupSelectionId = activeObj.__pixldocsGroupSelection ?? groupToMove.id;
|
|
14651
14676
|
const newAngle = ((activeObj.angle ?? 0) % 360 + 360) % 360;
|
|
14677
|
+
try {
|
|
14678
|
+
console.log("[ROT-DBG] persist group.angle", { groupId: groupToMove.id, newAngle, groupSelectionId });
|
|
14679
|
+
} catch {
|
|
14680
|
+
}
|
|
14652
14681
|
const { updateNode: updateNodeStore, commitHistory: commitHistoryStore, getCurrentElements } = useEditorStore.getState();
|
|
14653
14682
|
const rotPatch = { angle: newAngle === 0 ? void 0 : newAngle };
|
|
14654
14683
|
if (Math.abs(deltaX) > 0.1) rotPatch.left = (groupToMove.left ?? 0) + deltaX;
|
|
@@ -24272,9 +24301,9 @@ function captureFabricCanvasSvgForPdf(fabricInstance, canvasWidth, canvasHeight)
|
|
|
24272
24301
|
}
|
|
24273
24302
|
return svgString;
|
|
24274
24303
|
}
|
|
24275
|
-
const resolvedPackageVersion = "0.5.
|
|
24304
|
+
const resolvedPackageVersion = "0.5.308";
|
|
24276
24305
|
const PACKAGE_VERSION = resolvedPackageVersion;
|
|
24277
|
-
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.
|
|
24306
|
+
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.308";
|
|
24278
24307
|
const roundParityValue = (value) => {
|
|
24279
24308
|
if (typeof value !== "number") return value;
|
|
24280
24309
|
return Number.isFinite(value) ? Number(value.toFixed(3)) : value;
|
|
@@ -25088,7 +25117,7 @@ class PixldocsRenderer {
|
|
|
25088
25117
|
await this.waitForCanvasScene(container, cloned, i);
|
|
25089
25118
|
}
|
|
25090
25119
|
console.log(`[canvas-renderer][pdf-unified] mounted ${cloned.pages.length} page(s), handing off to client exportMultiPagePdf`);
|
|
25091
|
-
const { exportMultiPagePdf, preparePagesForExport } = await import("./vectorPdfExport-
|
|
25120
|
+
const { exportMultiPagePdf, preparePagesForExport } = await import("./vectorPdfExport-D_Bu2WUi.js");
|
|
25092
25121
|
const prepared = preparePagesForExport(
|
|
25093
25122
|
cloned.pages,
|
|
25094
25123
|
canvasWidth,
|
|
@@ -27408,7 +27437,7 @@ async function prepareLiveCanvasSvgForPdf(rawSvg, pageWidth, pageHeight, pageKey
|
|
|
27408
27437
|
if (options == null ? void 0 : options.stripPageBackground) stripRootPageBackgroundFromSvg(svgToDraw);
|
|
27409
27438
|
sanitizeSvgTreeForPdf(svgToDraw);
|
|
27410
27439
|
try {
|
|
27411
|
-
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await import("./vectorPdfExport-
|
|
27440
|
+
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await import("./vectorPdfExport-D_Bu2WUi.js");
|
|
27412
27441
|
try {
|
|
27413
27442
|
await logTextMeasurementDiagnostic(svgToDraw);
|
|
27414
27443
|
} catch {
|
|
@@ -27808,4 +27837,4 @@ export {
|
|
|
27808
27837
|
buildTeaserBlurFlatKeys as y,
|
|
27809
27838
|
collectFontDescriptorsFromConfig as z
|
|
27810
27839
|
};
|
|
27811
|
-
//# sourceMappingURL=index-
|
|
27840
|
+
//# sourceMappingURL=index-C56kkT1g.js.map
|