@pixldocs/canvas-renderer 0.5.309 → 0.5.311
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-Dl6fYmUm.js → index-BGRSqiXc.js} +28 -46
- package/dist/index-BGRSqiXc.js.map +1 -0
- package/dist/{index-B5XKQ7rz.cjs → index-C7ZK-TLB.cjs} +28 -46
- package/dist/index-C7ZK-TLB.cjs.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/{vectorPdfExport-D4oH9a3h.cjs → vectorPdfExport-CgqBRltR.cjs} +4 -4
- package/dist/{vectorPdfExport-D4oH9a3h.cjs.map → vectorPdfExport-CgqBRltR.cjs.map} +1 -1
- package/dist/{vectorPdfExport-1wNO6G60.js → vectorPdfExport-DouKBaoG.js} +4 -4
- package/dist/{vectorPdfExport-1wNO6G60.js.map → vectorPdfExport-DouKBaoG.js.map} +1 -1
- package/package.json +1 -1
- package/dist/index-B5XKQ7rz.cjs.map +0 -1
- package/dist/index-Dl6fYmUm.js.map +0 -1
|
@@ -11161,12 +11161,35 @@ const bakeTextboxScaleIntoTypography = (obj, sourceElement) => {
|
|
|
11161
11161
|
return updates;
|
|
11162
11162
|
};
|
|
11163
11163
|
function applyWarpAwareSelectionBorders(selection) {
|
|
11164
|
+
var _a2;
|
|
11164
11165
|
if (selection.__pixldocsOrigASHasBorders !== void 0) {
|
|
11165
11166
|
selection.hasBorders = selection.__pixldocsOrigASHasBorders;
|
|
11166
11167
|
delete selection.__pixldocsOrigASHasBorders;
|
|
11167
11168
|
}
|
|
11168
11169
|
selection.hasBorders = true;
|
|
11169
11170
|
selection.hasControls = true;
|
|
11171
|
+
try {
|
|
11172
|
+
const kids = selection.getObjects();
|
|
11173
|
+
let allSameNonZero = kids.length > 0;
|
|
11174
|
+
const first = ((((_a2 = kids[0]) == null ? void 0 : _a2.angle) ?? 0) % 360 + 360) % 360;
|
|
11175
|
+
if (Math.abs(first) < 0.5 || Math.abs(first - 360) < 0.5) allSameNonZero = false;
|
|
11176
|
+
if (allSameNonZero) {
|
|
11177
|
+
for (const k of kids) {
|
|
11178
|
+
const a = ((k.angle ?? 0) % 360 + 360) % 360;
|
|
11179
|
+
if (Math.abs(a - first) > 0.5) {
|
|
11180
|
+
allSameNonZero = false;
|
|
11181
|
+
break;
|
|
11182
|
+
}
|
|
11183
|
+
}
|
|
11184
|
+
}
|
|
11185
|
+
selection.setControlsVisibility({
|
|
11186
|
+
ml: !allSameNonZero,
|
|
11187
|
+
mr: !allSameNonZero,
|
|
11188
|
+
mt: !allSameNonZero,
|
|
11189
|
+
mb: !allSameNonZero
|
|
11190
|
+
});
|
|
11191
|
+
} catch {
|
|
11192
|
+
}
|
|
11170
11193
|
}
|
|
11171
11194
|
const PageCanvas = forwardRef(
|
|
11172
11195
|
({
|
|
@@ -14625,47 +14648,6 @@ const PageCanvas = forwardRef(
|
|
|
14625
14648
|
unlockEditsSoon();
|
|
14626
14649
|
return;
|
|
14627
14650
|
}
|
|
14628
|
-
if (hadRotation && !hadScale && isActiveSelection && activeObj instanceof fabric.ActiveSelection && !isStackLayoutMode(groupToMove.layoutMode)) {
|
|
14629
|
-
const groupSelectionId = activeObj.__pixldocsGroupSelection ?? groupToMove.id;
|
|
14630
|
-
const newAngle = ((activeObj.angle ?? 0) % 360 + 360) % 360;
|
|
14631
|
-
const { updateNode: updateNodeStore, commitHistory: commitHistoryStore, getCurrentElements } = useEditorStore.getState();
|
|
14632
|
-
const rotPatch = { angle: newAngle === 0 ? void 0 : newAngle };
|
|
14633
|
-
if (Math.abs(deltaX) > 0.1) rotPatch.left = (groupToMove.left ?? 0) + deltaX;
|
|
14634
|
-
if (Math.abs(deltaY) > 0.1) rotPatch.top = (groupToMove.top ?? 0) + deltaY;
|
|
14635
|
-
updateNodeStore(groupToMove.id, rotPatch, { recordHistory: false, skipLayoutRecalc: true });
|
|
14636
|
-
commitHistoryStore();
|
|
14637
|
-
pendingGroupDrillInRef.current = null;
|
|
14638
|
-
fabricCanvas.__activeEditingGroupId = null;
|
|
14639
|
-
setDrilledGroupBounds(null);
|
|
14640
|
-
drilledGroupIdRef.current = null;
|
|
14641
|
-
if (groupSelectionId) {
|
|
14642
|
-
restoreGroupSelectionVisualState(activeObj, groupSelectionId);
|
|
14643
|
-
fabricCanvas.setActiveObject(activeObj);
|
|
14644
|
-
activeObj.setCoords();
|
|
14645
|
-
}
|
|
14646
|
-
selectElements([groupSelectionId], false, false);
|
|
14647
|
-
fabricCanvas.requestRenderAll();
|
|
14648
|
-
elementsRef.current = getCurrentElements();
|
|
14649
|
-
const rotTargets = activeObj.getObjects();
|
|
14650
|
-
for (const o of rotTargets) {
|
|
14651
|
-
const oid = getObjectId(o);
|
|
14652
|
-
if (oid && oid !== "__background__") {
|
|
14653
|
-
justModifiedIdsRef.current.add(oid);
|
|
14654
|
-
modifiedIdsThisRound.add(oid);
|
|
14655
|
-
}
|
|
14656
|
-
}
|
|
14657
|
-
setTimeout(() => modifiedIdsThisRound.forEach((id) => justModifiedIdsRef.current.delete(id)), 150);
|
|
14658
|
-
groupSelectionTransformStartRef.current = null;
|
|
14659
|
-
const rotSnapshot = {
|
|
14660
|
-
memberIds: rotTargets.map((o) => getObjectId(o)).filter((id) => !!id && id !== "__background__"),
|
|
14661
|
-
groupSelectionId,
|
|
14662
|
-
expiresAt: Date.now() + 1200
|
|
14663
|
-
};
|
|
14664
|
-
recentGroupSelectionRestoreRef.current = rotSnapshot;
|
|
14665
|
-
restorePreservedGroupSelectionSoon(rotSnapshot);
|
|
14666
|
-
unlockEditsSoon();
|
|
14667
|
-
return;
|
|
14668
|
-
}
|
|
14669
14651
|
}
|
|
14670
14652
|
}
|
|
14671
14653
|
const pendingCropGroupFrameBakes = [];
|
|
@@ -24251,9 +24233,9 @@ function captureFabricCanvasSvgForPdf(fabricInstance, canvasWidth, canvasHeight)
|
|
|
24251
24233
|
}
|
|
24252
24234
|
return svgString;
|
|
24253
24235
|
}
|
|
24254
|
-
const resolvedPackageVersion = "0.5.
|
|
24236
|
+
const resolvedPackageVersion = "0.5.311";
|
|
24255
24237
|
const PACKAGE_VERSION = resolvedPackageVersion;
|
|
24256
|
-
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.
|
|
24238
|
+
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.311";
|
|
24257
24239
|
const roundParityValue = (value) => {
|
|
24258
24240
|
if (typeof value !== "number") return value;
|
|
24259
24241
|
return Number.isFinite(value) ? Number(value.toFixed(3)) : value;
|
|
@@ -25067,7 +25049,7 @@ class PixldocsRenderer {
|
|
|
25067
25049
|
await this.waitForCanvasScene(container, cloned, i);
|
|
25068
25050
|
}
|
|
25069
25051
|
console.log(`[canvas-renderer][pdf-unified] mounted ${cloned.pages.length} page(s), handing off to client exportMultiPagePdf`);
|
|
25070
|
-
const { exportMultiPagePdf, preparePagesForExport } = await import("./vectorPdfExport-
|
|
25052
|
+
const { exportMultiPagePdf, preparePagesForExport } = await import("./vectorPdfExport-DouKBaoG.js");
|
|
25071
25053
|
const prepared = preparePagesForExport(
|
|
25072
25054
|
cloned.pages,
|
|
25073
25055
|
canvasWidth,
|
|
@@ -27387,7 +27369,7 @@ async function prepareLiveCanvasSvgForPdf(rawSvg, pageWidth, pageHeight, pageKey
|
|
|
27387
27369
|
if (options == null ? void 0 : options.stripPageBackground) stripRootPageBackgroundFromSvg(svgToDraw);
|
|
27388
27370
|
sanitizeSvgTreeForPdf(svgToDraw);
|
|
27389
27371
|
try {
|
|
27390
|
-
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await import("./vectorPdfExport-
|
|
27372
|
+
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await import("./vectorPdfExport-DouKBaoG.js");
|
|
27391
27373
|
try {
|
|
27392
27374
|
await logTextMeasurementDiagnostic(svgToDraw);
|
|
27393
27375
|
} catch {
|
|
@@ -27787,4 +27769,4 @@ export {
|
|
|
27787
27769
|
buildTeaserBlurFlatKeys as y,
|
|
27788
27770
|
collectFontDescriptorsFromConfig as z
|
|
27789
27771
|
};
|
|
27790
|
-
//# sourceMappingURL=index-
|
|
27772
|
+
//# sourceMappingURL=index-BGRSqiXc.js.map
|