@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
|
@@ -11277,6 +11277,10 @@ const PageCanvas = react.forwardRef(
|
|
|
11277
11277
|
if (groupNode && !isStackLayoutMode(groupNode.layoutMode) && typeof groupNode.angle === "number" && Math.abs(groupNode.angle) > 0.01) {
|
|
11278
11278
|
const currentAngle = ((selection.angle ?? 0) % 360 + 360) % 360;
|
|
11279
11279
|
const targetAngle = ((groupNode.angle ?? 0) % 360 + 360) % 360;
|
|
11280
|
+
try {
|
|
11281
|
+
console.log("[ROT-DBG] restore AS angle", { groupId, currentAngle, targetAngle, childCount: selection.getObjects().length });
|
|
11282
|
+
} catch {
|
|
11283
|
+
}
|
|
11280
11284
|
if (Math.abs(currentAngle - targetAngle) > 0.01) {
|
|
11281
11285
|
selection.rotate(targetAngle);
|
|
11282
11286
|
selection.setCoords();
|
|
@@ -14625,6 +14629,27 @@ const PageCanvas = react.forwardRef(
|
|
|
14625
14629
|
360 - Math.abs(currentSelAngle - startSelAngle)
|
|
14626
14630
|
);
|
|
14627
14631
|
const hadRotation = isActiveSelection && activeObj && angleDelta > 0.01;
|
|
14632
|
+
try {
|
|
14633
|
+
console.log("[ROT-DBG] object:modified", {
|
|
14634
|
+
isActiveSelection,
|
|
14635
|
+
isAS: activeObj instanceof fabric__namespace.ActiveSelection,
|
|
14636
|
+
groupToMoveId: groupToMove == null ? void 0 : groupToMove.id,
|
|
14637
|
+
groupToMoveLayout: groupToMove == null ? void 0 : groupToMove.layoutMode,
|
|
14638
|
+
groupSelMarker: activeObj == null ? void 0 : activeObj.__pixldocsGroupSelection,
|
|
14639
|
+
startSelAngle,
|
|
14640
|
+
currentSelAngle,
|
|
14641
|
+
angleDelta,
|
|
14642
|
+
hadRotation,
|
|
14643
|
+
hadScale,
|
|
14644
|
+
deltaX,
|
|
14645
|
+
deltaY,
|
|
14646
|
+
asScaleX: activeObj == null ? void 0 : activeObj.scaleX,
|
|
14647
|
+
asScaleY: activeObj == null ? void 0 : activeObj.scaleY,
|
|
14648
|
+
childCount: activeObj instanceof fabric__namespace.ActiveSelection ? activeObj.getObjects().length : 0,
|
|
14649
|
+
childAngles: activeObj instanceof fabric__namespace.ActiveSelection ? activeObj.getObjects().map((o) => Math.round(((o.angle ?? 0) + Number.EPSILON) * 100) / 100) : []
|
|
14650
|
+
});
|
|
14651
|
+
} catch {
|
|
14652
|
+
}
|
|
14628
14653
|
if (!hadScale && !hadRotation && (Math.abs(deltaX) > 0.1 || Math.abs(deltaY) > 0.1)) {
|
|
14629
14654
|
const { updateNode: updateNodeStore, commitHistory: commitHistoryStore, getCurrentElements } = useEditorStore.getState();
|
|
14630
14655
|
const newLeft = (groupToMove.left ?? 0) + deltaX;
|
|
@@ -14667,6 +14692,10 @@ const PageCanvas = react.forwardRef(
|
|
|
14667
14692
|
if (hadRotation && !hadScale && isActiveSelection && activeObj instanceof fabric__namespace.ActiveSelection && !isStackLayoutMode(groupToMove.layoutMode)) {
|
|
14668
14693
|
const groupSelectionId = activeObj.__pixldocsGroupSelection ?? groupToMove.id;
|
|
14669
14694
|
const newAngle = ((activeObj.angle ?? 0) % 360 + 360) % 360;
|
|
14695
|
+
try {
|
|
14696
|
+
console.log("[ROT-DBG] persist group.angle", { groupId: groupToMove.id, newAngle, groupSelectionId });
|
|
14697
|
+
} catch {
|
|
14698
|
+
}
|
|
14670
14699
|
const { updateNode: updateNodeStore, commitHistory: commitHistoryStore, getCurrentElements } = useEditorStore.getState();
|
|
14671
14700
|
const rotPatch = { angle: newAngle === 0 ? void 0 : newAngle };
|
|
14672
14701
|
if (Math.abs(deltaX) > 0.1) rotPatch.left = (groupToMove.left ?? 0) + deltaX;
|
|
@@ -24290,9 +24319,9 @@ function captureFabricCanvasSvgForPdf(fabricInstance, canvasWidth, canvasHeight)
|
|
|
24290
24319
|
}
|
|
24291
24320
|
return svgString;
|
|
24292
24321
|
}
|
|
24293
|
-
const resolvedPackageVersion = "0.5.
|
|
24322
|
+
const resolvedPackageVersion = "0.5.308";
|
|
24294
24323
|
const PACKAGE_VERSION = resolvedPackageVersion;
|
|
24295
|
-
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.
|
|
24324
|
+
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.308";
|
|
24296
24325
|
const roundParityValue = (value) => {
|
|
24297
24326
|
if (typeof value !== "number") return value;
|
|
24298
24327
|
return Number.isFinite(value) ? Number(value.toFixed(3)) : value;
|
|
@@ -25106,7 +25135,7 @@ class PixldocsRenderer {
|
|
|
25106
25135
|
await this.waitForCanvasScene(container, cloned, i);
|
|
25107
25136
|
}
|
|
25108
25137
|
console.log(`[canvas-renderer][pdf-unified] mounted ${cloned.pages.length} page(s), handing off to client exportMultiPagePdf`);
|
|
25109
|
-
const { exportMultiPagePdf, preparePagesForExport } = await Promise.resolve().then(() => require("./vectorPdfExport-
|
|
25138
|
+
const { exportMultiPagePdf, preparePagesForExport } = await Promise.resolve().then(() => require("./vectorPdfExport-CRUQe1BV.cjs"));
|
|
25110
25139
|
const prepared = preparePagesForExport(
|
|
25111
25140
|
cloned.pages,
|
|
25112
25141
|
canvasWidth,
|
|
@@ -27426,7 +27455,7 @@ async function prepareLiveCanvasSvgForPdf(rawSvg, pageWidth, pageHeight, pageKey
|
|
|
27426
27455
|
if (options == null ? void 0 : options.stripPageBackground) stripRootPageBackgroundFromSvg(svgToDraw);
|
|
27427
27456
|
sanitizeSvgTreeForPdf(svgToDraw);
|
|
27428
27457
|
try {
|
|
27429
|
-
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await Promise.resolve().then(() => require("./vectorPdfExport-
|
|
27458
|
+
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await Promise.resolve().then(() => require("./vectorPdfExport-CRUQe1BV.cjs"));
|
|
27430
27459
|
try {
|
|
27431
27460
|
await logTextMeasurementDiagnostic(svgToDraw);
|
|
27432
27461
|
} catch {
|
|
@@ -27823,4 +27852,4 @@ exports.setAutoShrinkDebug = setAutoShrinkDebug;
|
|
|
27823
27852
|
exports.setBundledAssetPrefixes = setBundledAssetPrefixes;
|
|
27824
27853
|
exports.warmResolvedTemplateForPreview = warmResolvedTemplateForPreview;
|
|
27825
27854
|
exports.warmTemplateFromForm = warmTemplateFromForm;
|
|
27826
|
-
//# sourceMappingURL=index-
|
|
27855
|
+
//# sourceMappingURL=index-DvZ7xADZ.cjs.map
|