@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
|
@@ -11259,35 +11259,10 @@ const PageCanvas = react.forwardRef(
|
|
|
11259
11259
|
const [ready, setReady] = react.useState(false);
|
|
11260
11260
|
const [unlockRequestId, setUnlockRequestId] = react.useState(0);
|
|
11261
11261
|
const applyLogicalGroupSelectionVisualState = react.useCallback((selection, groupId) => {
|
|
11262
|
-
var _a2
|
|
11262
|
+
var _a2;
|
|
11263
11263
|
selection.__pixldocsGroupSelection = groupId;
|
|
11264
11264
|
delete selection.__pixldocsLogicalGroupIds;
|
|
11265
11265
|
selection.hasBorders = true;
|
|
11266
|
-
try {
|
|
11267
|
-
const state = useEditorStore.getState();
|
|
11268
|
-
const pages = ((_a2 = state.canvas) == null ? void 0 : _a2.pages) ?? [];
|
|
11269
|
-
let groupNode = null;
|
|
11270
|
-
for (const page of pages) {
|
|
11271
|
-
const found = findNodeById(page.children ?? [], groupId);
|
|
11272
|
-
if (found && isGroup(found)) {
|
|
11273
|
-
groupNode = found;
|
|
11274
|
-
break;
|
|
11275
|
-
}
|
|
11276
|
-
}
|
|
11277
|
-
if (groupNode && !isStackLayoutMode(groupNode.layoutMode) && typeof groupNode.angle === "number" && Math.abs(groupNode.angle) > 0.01) {
|
|
11278
|
-
const currentAngle = ((selection.angle ?? 0) % 360 + 360) % 360;
|
|
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
|
-
}
|
|
11284
|
-
if (Math.abs(currentAngle - targetAngle) > 0.01) {
|
|
11285
|
-
selection.rotate(targetAngle);
|
|
11286
|
-
selection.setCoords();
|
|
11287
|
-
}
|
|
11288
|
-
}
|
|
11289
|
-
} catch {
|
|
11290
|
-
}
|
|
11291
11266
|
const members = selection.getObjects();
|
|
11292
11267
|
for (const prev of suppressGroupMemberBordersRef.current) {
|
|
11293
11268
|
if (members.includes(prev)) continue;
|
|
@@ -11311,7 +11286,7 @@ const PageCanvas = react.forwardRef(
|
|
|
11311
11286
|
if (m.__pixldocsOrigHasControls === void 0) m.__pixldocsOrigHasControls = m.hasControls;
|
|
11312
11287
|
m.hasBorders = false;
|
|
11313
11288
|
m.hasControls = false;
|
|
11314
|
-
if (m.__cropGroup || ((
|
|
11289
|
+
if (m.__cropGroup || ((_a2 = m._ct) == null ? void 0 : _a2.isCropGroup)) {
|
|
11315
11290
|
if (m.__pixldocsOrigLockScalingX === void 0) {
|
|
11316
11291
|
m.__pixldocsOrigLockScalingX = m.lockScalingX;
|
|
11317
11292
|
m.__pixldocsOrigLockScalingY = m.lockScalingY;
|
|
@@ -14629,27 +14604,6 @@ const PageCanvas = react.forwardRef(
|
|
|
14629
14604
|
360 - Math.abs(currentSelAngle - startSelAngle)
|
|
14630
14605
|
);
|
|
14631
14606
|
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
|
-
}
|
|
14653
14607
|
if (!hadScale && !hadRotation && (Math.abs(deltaX) > 0.1 || Math.abs(deltaY) > 0.1)) {
|
|
14654
14608
|
const { updateNode: updateNodeStore, commitHistory: commitHistoryStore, getCurrentElements } = useEditorStore.getState();
|
|
14655
14609
|
const newLeft = (groupToMove.left ?? 0) + deltaX;
|
|
@@ -14692,10 +14646,6 @@ const PageCanvas = react.forwardRef(
|
|
|
14692
14646
|
if (hadRotation && !hadScale && isActiveSelection && activeObj instanceof fabric__namespace.ActiveSelection && !isStackLayoutMode(groupToMove.layoutMode)) {
|
|
14693
14647
|
const groupSelectionId = activeObj.__pixldocsGroupSelection ?? groupToMove.id;
|
|
14694
14648
|
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
|
-
}
|
|
14699
14649
|
const { updateNode: updateNodeStore, commitHistory: commitHistoryStore, getCurrentElements } = useEditorStore.getState();
|
|
14700
14650
|
const rotPatch = { angle: newAngle === 0 ? void 0 : newAngle };
|
|
14701
14651
|
if (Math.abs(deltaX) > 0.1) rotPatch.left = (groupToMove.left ?? 0) + deltaX;
|
|
@@ -24319,9 +24269,9 @@ function captureFabricCanvasSvgForPdf(fabricInstance, canvasWidth, canvasHeight)
|
|
|
24319
24269
|
}
|
|
24320
24270
|
return svgString;
|
|
24321
24271
|
}
|
|
24322
|
-
const resolvedPackageVersion = "0.5.
|
|
24272
|
+
const resolvedPackageVersion = "0.5.309";
|
|
24323
24273
|
const PACKAGE_VERSION = resolvedPackageVersion;
|
|
24324
|
-
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.
|
|
24274
|
+
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.309";
|
|
24325
24275
|
const roundParityValue = (value) => {
|
|
24326
24276
|
if (typeof value !== "number") return value;
|
|
24327
24277
|
return Number.isFinite(value) ? Number(value.toFixed(3)) : value;
|
|
@@ -25135,7 +25085,7 @@ class PixldocsRenderer {
|
|
|
25135
25085
|
await this.waitForCanvasScene(container, cloned, i);
|
|
25136
25086
|
}
|
|
25137
25087
|
console.log(`[canvas-renderer][pdf-unified] mounted ${cloned.pages.length} page(s), handing off to client exportMultiPagePdf`);
|
|
25138
|
-
const { exportMultiPagePdf, preparePagesForExport } = await Promise.resolve().then(() => require("./vectorPdfExport-
|
|
25088
|
+
const { exportMultiPagePdf, preparePagesForExport } = await Promise.resolve().then(() => require("./vectorPdfExport-D4oH9a3h.cjs"));
|
|
25139
25089
|
const prepared = preparePagesForExport(
|
|
25140
25090
|
cloned.pages,
|
|
25141
25091
|
canvasWidth,
|
|
@@ -27455,7 +27405,7 @@ async function prepareLiveCanvasSvgForPdf(rawSvg, pageWidth, pageHeight, pageKey
|
|
|
27455
27405
|
if (options == null ? void 0 : options.stripPageBackground) stripRootPageBackgroundFromSvg(svgToDraw);
|
|
27456
27406
|
sanitizeSvgTreeForPdf(svgToDraw);
|
|
27457
27407
|
try {
|
|
27458
|
-
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await Promise.resolve().then(() => require("./vectorPdfExport-
|
|
27408
|
+
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await Promise.resolve().then(() => require("./vectorPdfExport-D4oH9a3h.cjs"));
|
|
27459
27409
|
try {
|
|
27460
27410
|
await logTextMeasurementDiagnostic(svgToDraw);
|
|
27461
27411
|
} catch {
|
|
@@ -27852,4 +27802,4 @@ exports.setAutoShrinkDebug = setAutoShrinkDebug;
|
|
|
27852
27802
|
exports.setBundledAssetPrefixes = setBundledAssetPrefixes;
|
|
27853
27803
|
exports.warmResolvedTemplateForPreview = warmResolvedTemplateForPreview;
|
|
27854
27804
|
exports.warmTemplateFromForm = warmTemplateFromForm;
|
|
27855
|
-
//# sourceMappingURL=index-
|
|
27805
|
+
//# sourceMappingURL=index-B5XKQ7rz.cjs.map
|