@pixldocs/canvas-renderer 0.5.342 → 0.5.343
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-AFV1WnF5.cjs → index-BVDxgitP.cjs} +18 -10
- package/dist/index-BVDxgitP.cjs.map +1 -0
- package/dist/{index-BQHFDZIZ.js → index-JXiTI3jA.js} +18 -10
- package/dist/index-JXiTI3jA.js.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/{vectorPdfExport-8iq2cL_r.cjs → vectorPdfExport-CdDnoHs2.cjs} +4 -4
- package/dist/{vectorPdfExport-8iq2cL_r.cjs.map → vectorPdfExport-CdDnoHs2.cjs.map} +1 -1
- package/dist/{vectorPdfExport-BW-Au2Xo.js → vectorPdfExport-DWz1fLQ7.js} +4 -4
- package/dist/{vectorPdfExport-BW-Au2Xo.js.map → vectorPdfExport-DWz1fLQ7.js.map} +1 -1
- package/package.json +1 -1
- package/dist/index-AFV1WnF5.cjs.map +0 -1
- package/dist/index-BQHFDZIZ.js.map +0 -1
|
@@ -13197,6 +13197,9 @@ const PageCanvas = react.forwardRef(
|
|
|
13197
13197
|
fabricCanvas.on("mouse:down:before", (opt) => {
|
|
13198
13198
|
var _a2, _b2, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m;
|
|
13199
13199
|
const activeBeforeMouseDown = fabricCanvas.getActiveObject();
|
|
13200
|
+
if (activeBeforeMouseDown instanceof fabric__namespace.ActiveSelection && activeBeforeMouseDown.__pixldocsGroupSelection) {
|
|
13201
|
+
prepareGroupSelectionTransformStart(activeBeforeMouseDown);
|
|
13202
|
+
}
|
|
13200
13203
|
if (editLockRef.current) {
|
|
13201
13204
|
const active = fabricCanvas.getActiveObject();
|
|
13202
13205
|
if (active && (((_a2 = active._ct) == null ? void 0 : _a2.isCropGroup) || active.__cropGroup)) {
|
|
@@ -13296,6 +13299,7 @@ const PageCanvas = react.forwardRef(
|
|
|
13296
13299
|
restoreGroupSelectionVisualState(selection, parent.id);
|
|
13297
13300
|
fabricCanvas.setActiveObject(selection);
|
|
13298
13301
|
selection.setCoords();
|
|
13302
|
+
prepareGroupSelectionTransformStart(selection);
|
|
13299
13303
|
fabricCanvas._target = selection;
|
|
13300
13304
|
opt.target = selection;
|
|
13301
13305
|
pendingGroupPromotionRef.current = { groupId: parent.id, selection };
|
|
@@ -13338,6 +13342,7 @@ const PageCanvas = react.forwardRef(
|
|
|
13338
13342
|
restoreGroupSelectionVisualState(selection, parent.id);
|
|
13339
13343
|
fabricCanvas.setActiveObject(selection);
|
|
13340
13344
|
selection.setCoords();
|
|
13345
|
+
prepareGroupSelectionTransformStart(selection);
|
|
13341
13346
|
fabricCanvas._target = selection;
|
|
13342
13347
|
opt.target = selection;
|
|
13343
13348
|
pendingGroupPromotionRef.current = { groupId: parent.id, selection };
|
|
@@ -14895,9 +14900,9 @@ const PageCanvas = react.forwardRef(
|
|
|
14895
14900
|
let movedGroupLeft = groupAbs.left;
|
|
14896
14901
|
let movedGroupTop = groupAbs.top;
|
|
14897
14902
|
if (activeObj instanceof fabric__namespace.ActiveSelection && (transformStart == null ? void 0 : transformStart.groupId) === groupToMove.id) {
|
|
14898
|
-
const
|
|
14899
|
-
movedGroupLeft = transformStart.groupLeft + (
|
|
14900
|
-
movedGroupTop = transformStart.groupTop + (
|
|
14903
|
+
const selectionCenter = activeObj.getCenterPoint();
|
|
14904
|
+
movedGroupLeft = transformStart.groupLeft + (selectionCenter.x - transformStart.selectionCenterX);
|
|
14905
|
+
movedGroupTop = transformStart.groupTop + (selectionCenter.y - transformStart.selectionCenterY);
|
|
14901
14906
|
} else if (activeObj instanceof fabric__namespace.ActiveSelection && firstId && firstObj) {
|
|
14902
14907
|
const firstNode = findNodeById(pageChildren2, firstId);
|
|
14903
14908
|
if (firstNode) {
|
|
@@ -14942,8 +14947,10 @@ const PageCanvas = react.forwardRef(
|
|
|
14942
14947
|
if (activeGroupSelectionId === groupToMove.id && hadRotation && !hadScale && !activeSelectionResizeHandle && activeObj instanceof fabric__namespace.ActiveSelection) {
|
|
14943
14948
|
const { updateNode: updateNodeStore, commitHistory: commitHistoryStore, getCurrentElements } = useEditorStore.getState();
|
|
14944
14949
|
const center = activeObj.getCenterPoint();
|
|
14945
|
-
const
|
|
14946
|
-
const
|
|
14950
|
+
const baseCenterX = (transformStart == null ? void 0 : transformStart.selectionCenterX) ?? center.x;
|
|
14951
|
+
const baseCenterY = (transformStart == null ? void 0 : transformStart.selectionCenterY) ?? center.y;
|
|
14952
|
+
const nextAbsLeft = groupAbs.left + (center.x - baseCenterX);
|
|
14953
|
+
const nextAbsTop = groupAbs.top + (center.y - baseCenterY);
|
|
14947
14954
|
const storePos = absoluteToStorePosition(nextAbsLeft, nextAbsTop, groupToMove.id, pageChildren2);
|
|
14948
14955
|
updateNodeStore(groupToMove.id, {
|
|
14949
14956
|
left: storePos.left,
|
|
@@ -15649,6 +15656,7 @@ const PageCanvas = react.forwardRef(
|
|
|
15649
15656
|
const activeObj = fabricCanvas.getActiveObject();
|
|
15650
15657
|
if (!(activeObj instanceof fabric__namespace.ActiveSelection)) return;
|
|
15651
15658
|
if (skipActiveSelectionBakeOnClearRef.current) return;
|
|
15659
|
+
if (activeObj.__pixldocsGroupSelection) return;
|
|
15652
15660
|
const selectionMatrix = activeObj.calcTransformMatrix();
|
|
15653
15661
|
for (const obj of deselected) {
|
|
15654
15662
|
const objId = getObjectId(obj);
|
|
@@ -24662,9 +24670,9 @@ function captureFabricCanvasSvgForPdf(fabricInstance, canvasWidth, canvasHeight)
|
|
|
24662
24670
|
}
|
|
24663
24671
|
return svgString;
|
|
24664
24672
|
}
|
|
24665
|
-
const resolvedPackageVersion = "0.5.
|
|
24673
|
+
const resolvedPackageVersion = "0.5.343";
|
|
24666
24674
|
const PACKAGE_VERSION = resolvedPackageVersion;
|
|
24667
|
-
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.
|
|
24675
|
+
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.343";
|
|
24668
24676
|
const roundParityValue = (value) => {
|
|
24669
24677
|
if (typeof value !== "number") return value;
|
|
24670
24678
|
return Number.isFinite(value) ? Number(value.toFixed(3)) : value;
|
|
@@ -25478,7 +25486,7 @@ class PixldocsRenderer {
|
|
|
25478
25486
|
await this.waitForCanvasScene(container, cloned, i);
|
|
25479
25487
|
}
|
|
25480
25488
|
console.log(`[canvas-renderer][pdf-unified] mounted ${cloned.pages.length} page(s), handing off to client exportMultiPagePdf`);
|
|
25481
|
-
const { exportMultiPagePdf, preparePagesForExport } = await Promise.resolve().then(() => require("./vectorPdfExport-
|
|
25489
|
+
const { exportMultiPagePdf, preparePagesForExport } = await Promise.resolve().then(() => require("./vectorPdfExport-CdDnoHs2.cjs"));
|
|
25482
25490
|
const prepared = preparePagesForExport(
|
|
25483
25491
|
cloned.pages,
|
|
25484
25492
|
canvasWidth,
|
|
@@ -27798,7 +27806,7 @@ async function prepareLiveCanvasSvgForPdf(rawSvg, pageWidth, pageHeight, pageKey
|
|
|
27798
27806
|
if (options == null ? void 0 : options.stripPageBackground) stripRootPageBackgroundFromSvg(svgToDraw);
|
|
27799
27807
|
sanitizeSvgTreeForPdf(svgToDraw);
|
|
27800
27808
|
try {
|
|
27801
|
-
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await Promise.resolve().then(() => require("./vectorPdfExport-
|
|
27809
|
+
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await Promise.resolve().then(() => require("./vectorPdfExport-CdDnoHs2.cjs"));
|
|
27802
27810
|
try {
|
|
27803
27811
|
await logTextMeasurementDiagnostic(svgToDraw);
|
|
27804
27812
|
} catch {
|
|
@@ -28195,4 +28203,4 @@ exports.setAutoShrinkDebug = setAutoShrinkDebug;
|
|
|
28195
28203
|
exports.setBundledAssetPrefixes = setBundledAssetPrefixes;
|
|
28196
28204
|
exports.warmResolvedTemplateForPreview = warmResolvedTemplateForPreview;
|
|
28197
28205
|
exports.warmTemplateFromForm = warmTemplateFromForm;
|
|
28198
|
-
//# sourceMappingURL=index-
|
|
28206
|
+
//# sourceMappingURL=index-BVDxgitP.cjs.map
|