@pixldocs/canvas-renderer 0.5.308 → 0.5.309
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-DvZ7xADZ.cjs → index-B5XKQ7rz.cjs} +7 -57
- package/dist/index-B5XKQ7rz.cjs.map +1 -0
- package/dist/{index-C56kkT1g.js → index-Dl6fYmUm.js} +7 -57
- package/dist/index-Dl6fYmUm.js.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/{vectorPdfExport-D_Bu2WUi.js → vectorPdfExport-1wNO6G60.js} +4 -4
- package/dist/{vectorPdfExport-D_Bu2WUi.js.map → vectorPdfExport-1wNO6G60.js.map} +1 -1
- package/dist/{vectorPdfExport-CRUQe1BV.cjs → vectorPdfExport-D4oH9a3h.cjs} +4 -4
- package/dist/{vectorPdfExport-CRUQe1BV.cjs.map → vectorPdfExport-D4oH9a3h.cjs.map} +1 -1
- package/package.json +1 -1
- package/dist/index-C56kkT1g.js.map +0 -1
- package/dist/index-DvZ7xADZ.cjs.map +0 -1
|
@@ -11241,35 +11241,10 @@ const PageCanvas = forwardRef(
|
|
|
11241
11241
|
const [ready, setReady] = useState(false);
|
|
11242
11242
|
const [unlockRequestId, setUnlockRequestId] = useState(0);
|
|
11243
11243
|
const applyLogicalGroupSelectionVisualState = useCallback((selection, groupId) => {
|
|
11244
|
-
var _a2
|
|
11244
|
+
var _a2;
|
|
11245
11245
|
selection.__pixldocsGroupSelection = groupId;
|
|
11246
11246
|
delete selection.__pixldocsLogicalGroupIds;
|
|
11247
11247
|
selection.hasBorders = true;
|
|
11248
|
-
try {
|
|
11249
|
-
const state = useEditorStore.getState();
|
|
11250
|
-
const pages = ((_a2 = state.canvas) == null ? void 0 : _a2.pages) ?? [];
|
|
11251
|
-
let groupNode = null;
|
|
11252
|
-
for (const page of pages) {
|
|
11253
|
-
const found = findNodeById(page.children ?? [], groupId);
|
|
11254
|
-
if (found && isGroup(found)) {
|
|
11255
|
-
groupNode = found;
|
|
11256
|
-
break;
|
|
11257
|
-
}
|
|
11258
|
-
}
|
|
11259
|
-
if (groupNode && !isStackLayoutMode(groupNode.layoutMode) && typeof groupNode.angle === "number" && Math.abs(groupNode.angle) > 0.01) {
|
|
11260
|
-
const currentAngle = ((selection.angle ?? 0) % 360 + 360) % 360;
|
|
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
|
-
}
|
|
11266
|
-
if (Math.abs(currentAngle - targetAngle) > 0.01) {
|
|
11267
|
-
selection.rotate(targetAngle);
|
|
11268
|
-
selection.setCoords();
|
|
11269
|
-
}
|
|
11270
|
-
}
|
|
11271
|
-
} catch {
|
|
11272
|
-
}
|
|
11273
11248
|
const members = selection.getObjects();
|
|
11274
11249
|
for (const prev of suppressGroupMemberBordersRef.current) {
|
|
11275
11250
|
if (members.includes(prev)) continue;
|
|
@@ -11293,7 +11268,7 @@ const PageCanvas = forwardRef(
|
|
|
11293
11268
|
if (m.__pixldocsOrigHasControls === void 0) m.__pixldocsOrigHasControls = m.hasControls;
|
|
11294
11269
|
m.hasBorders = false;
|
|
11295
11270
|
m.hasControls = false;
|
|
11296
|
-
if (m.__cropGroup || ((
|
|
11271
|
+
if (m.__cropGroup || ((_a2 = m._ct) == null ? void 0 : _a2.isCropGroup)) {
|
|
11297
11272
|
if (m.__pixldocsOrigLockScalingX === void 0) {
|
|
11298
11273
|
m.__pixldocsOrigLockScalingX = m.lockScalingX;
|
|
11299
11274
|
m.__pixldocsOrigLockScalingY = m.lockScalingY;
|
|
@@ -14611,27 +14586,6 @@ const PageCanvas = forwardRef(
|
|
|
14611
14586
|
360 - Math.abs(currentSelAngle - startSelAngle)
|
|
14612
14587
|
);
|
|
14613
14588
|
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
|
-
}
|
|
14635
14589
|
if (!hadScale && !hadRotation && (Math.abs(deltaX) > 0.1 || Math.abs(deltaY) > 0.1)) {
|
|
14636
14590
|
const { updateNode: updateNodeStore, commitHistory: commitHistoryStore, getCurrentElements } = useEditorStore.getState();
|
|
14637
14591
|
const newLeft = (groupToMove.left ?? 0) + deltaX;
|
|
@@ -14674,10 +14628,6 @@ const PageCanvas = forwardRef(
|
|
|
14674
14628
|
if (hadRotation && !hadScale && isActiveSelection && activeObj instanceof fabric.ActiveSelection && !isStackLayoutMode(groupToMove.layoutMode)) {
|
|
14675
14629
|
const groupSelectionId = activeObj.__pixldocsGroupSelection ?? groupToMove.id;
|
|
14676
14630
|
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
|
-
}
|
|
14681
14631
|
const { updateNode: updateNodeStore, commitHistory: commitHistoryStore, getCurrentElements } = useEditorStore.getState();
|
|
14682
14632
|
const rotPatch = { angle: newAngle === 0 ? void 0 : newAngle };
|
|
14683
14633
|
if (Math.abs(deltaX) > 0.1) rotPatch.left = (groupToMove.left ?? 0) + deltaX;
|
|
@@ -24301,9 +24251,9 @@ function captureFabricCanvasSvgForPdf(fabricInstance, canvasWidth, canvasHeight)
|
|
|
24301
24251
|
}
|
|
24302
24252
|
return svgString;
|
|
24303
24253
|
}
|
|
24304
|
-
const resolvedPackageVersion = "0.5.
|
|
24254
|
+
const resolvedPackageVersion = "0.5.309";
|
|
24305
24255
|
const PACKAGE_VERSION = resolvedPackageVersion;
|
|
24306
|
-
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.
|
|
24256
|
+
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.309";
|
|
24307
24257
|
const roundParityValue = (value) => {
|
|
24308
24258
|
if (typeof value !== "number") return value;
|
|
24309
24259
|
return Number.isFinite(value) ? Number(value.toFixed(3)) : value;
|
|
@@ -25117,7 +25067,7 @@ class PixldocsRenderer {
|
|
|
25117
25067
|
await this.waitForCanvasScene(container, cloned, i);
|
|
25118
25068
|
}
|
|
25119
25069
|
console.log(`[canvas-renderer][pdf-unified] mounted ${cloned.pages.length} page(s), handing off to client exportMultiPagePdf`);
|
|
25120
|
-
const { exportMultiPagePdf, preparePagesForExport } = await import("./vectorPdfExport-
|
|
25070
|
+
const { exportMultiPagePdf, preparePagesForExport } = await import("./vectorPdfExport-1wNO6G60.js");
|
|
25121
25071
|
const prepared = preparePagesForExport(
|
|
25122
25072
|
cloned.pages,
|
|
25123
25073
|
canvasWidth,
|
|
@@ -27437,7 +27387,7 @@ async function prepareLiveCanvasSvgForPdf(rawSvg, pageWidth, pageHeight, pageKey
|
|
|
27437
27387
|
if (options == null ? void 0 : options.stripPageBackground) stripRootPageBackgroundFromSvg(svgToDraw);
|
|
27438
27388
|
sanitizeSvgTreeForPdf(svgToDraw);
|
|
27439
27389
|
try {
|
|
27440
|
-
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await import("./vectorPdfExport-
|
|
27390
|
+
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await import("./vectorPdfExport-1wNO6G60.js");
|
|
27441
27391
|
try {
|
|
27442
27392
|
await logTextMeasurementDiagnostic(svgToDraw);
|
|
27443
27393
|
} catch {
|
|
@@ -27837,4 +27787,4 @@ export {
|
|
|
27837
27787
|
buildTeaserBlurFlatKeys as y,
|
|
27838
27788
|
collectFontDescriptorsFromConfig as z
|
|
27839
27789
|
};
|
|
27840
|
-
//# sourceMappingURL=index-
|
|
27790
|
+
//# sourceMappingURL=index-Dl6fYmUm.js.map
|