@pixldocs/canvas-renderer 0.5.332 → 0.5.334
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-B9Lpo1N6.cjs → index-CBVpyFeT.cjs} +208 -12
- package/dist/index-CBVpyFeT.cjs.map +1 -0
- package/dist/{index-xMYBX3BX.js → index-DDQNmmRg.js} +208 -12
- package/dist/index-DDQNmmRg.js.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/{vectorPdfExport-BnF6Lk4i.cjs → vectorPdfExport-9OekmGZH.cjs} +4 -4
- package/dist/{vectorPdfExport-BnF6Lk4i.cjs.map → vectorPdfExport-9OekmGZH.cjs.map} +1 -1
- package/dist/{vectorPdfExport-BE-V6kqQ.js → vectorPdfExport-CESWzne5.js} +4 -4
- package/dist/{vectorPdfExport-BE-V6kqQ.js.map → vectorPdfExport-CESWzne5.js.map} +1 -1
- package/package.json +1 -1
- package/dist/index-B9Lpo1N6.cjs.map +0 -1
- package/dist/index-xMYBX3BX.js.map +0 -1
|
@@ -11025,6 +11025,8 @@ const scaleUpdateNumber = (updates, source, key, factor) => {
|
|
|
11025
11025
|
};
|
|
11026
11026
|
const GROUP_TEXT_RESIZE_DEBUG_PREFIX = "[Pixldocs][group-text-corner-resize]";
|
|
11027
11027
|
const GROUP_TEXT_RESIZE_DEBUG_MAX_ENTRIES = 200;
|
|
11028
|
+
const GROUP_IMAGE_RESIZE_DEBUG_PREFIX = "[Pixldocs][group-image-side-resize]";
|
|
11029
|
+
const GROUP_IMAGE_RESIZE_DEBUG_MAX_ENTRIES = 300;
|
|
11028
11030
|
const isCornerResizeHandle = (handle) => handle === "tl" || handle === "tr" || handle === "bl" || handle === "br";
|
|
11029
11031
|
const summarizeFabricObjectForResizeDebug = (obj) => {
|
|
11030
11032
|
var _a2;
|
|
@@ -11087,6 +11089,43 @@ const logGroupTextResizeDebug = (phase, payload) => {
|
|
|
11087
11089
|
console.log(GROUP_TEXT_RESIZE_DEBUG_PREFIX, phase, payload);
|
|
11088
11090
|
}
|
|
11089
11091
|
};
|
|
11092
|
+
const isGroupResizeImageLikeObject = (obj) => {
|
|
11093
|
+
var _a2;
|
|
11094
|
+
return !!obj && (obj instanceof fabric.FabricImage || obj instanceof fabric.Group && (obj.__cropGroup || ((_a2 = obj._ct) == null ? void 0 : _a2.isCropGroup)));
|
|
11095
|
+
};
|
|
11096
|
+
const logGroupImageResizeDebug = (phase, payload) => {
|
|
11097
|
+
if (typeof console === "undefined") return;
|
|
11098
|
+
try {
|
|
11099
|
+
const seen = /* @__PURE__ */ new WeakSet();
|
|
11100
|
+
const normalize = (value) => {
|
|
11101
|
+
if (value == null) return value;
|
|
11102
|
+
const valueType = typeof value;
|
|
11103
|
+
if (valueType === "number") return Number.isFinite(value) ? Math.round(value * 1e3) / 1e3 : String(value);
|
|
11104
|
+
if (valueType === "string" || valueType === "boolean") return value;
|
|
11105
|
+
if (valueType === "function") return `[Function ${value.name || "anonymous"}]`;
|
|
11106
|
+
if (Array.isArray(value)) return value.map((entry) => normalize(entry));
|
|
11107
|
+
if (valueType === "object") {
|
|
11108
|
+
if (seen.has(value)) return "[Circular]";
|
|
11109
|
+
seen.add(value);
|
|
11110
|
+
if (value instanceof fabric.FabricObject) return normalize(summarizeFabricObjectForResizeDebug(value));
|
|
11111
|
+
const output = {};
|
|
11112
|
+
Object.entries(value).forEach(([key, entry]) => {
|
|
11113
|
+
output[key] = normalize(entry);
|
|
11114
|
+
});
|
|
11115
|
+
return output;
|
|
11116
|
+
}
|
|
11117
|
+
return String(value);
|
|
11118
|
+
};
|
|
11119
|
+
const normalizedPayload = normalize(payload);
|
|
11120
|
+
const line = `${GROUP_IMAGE_RESIZE_DEBUG_PREFIX} ${phase} ${JSON.stringify(normalizedPayload)}`;
|
|
11121
|
+
const debugWindow = window;
|
|
11122
|
+
debugWindow.__pixldocsGroupImageResizeLogs = Array.isArray(debugWindow.__pixldocsGroupImageResizeLogs) ? debugWindow.__pixldocsGroupImageResizeLogs.slice(-GROUP_IMAGE_RESIZE_DEBUG_MAX_ENTRIES + 1) : [];
|
|
11123
|
+
debugWindow.__pixldocsGroupImageResizeLogs.push(line);
|
|
11124
|
+
console.log(line);
|
|
11125
|
+
} catch {
|
|
11126
|
+
console.log(GROUP_IMAGE_RESIZE_DEBUG_PREFIX, phase, payload);
|
|
11127
|
+
}
|
|
11128
|
+
};
|
|
11090
11129
|
const bakeTextboxScaleIntoTypography = (obj, sourceElement) => {
|
|
11091
11130
|
const sx = Math.abs(obj.scaleX ?? 1) || 1;
|
|
11092
11131
|
const sy = Math.abs(obj.scaleY ?? 1) || 1;
|
|
@@ -13562,10 +13601,30 @@ const PageCanvas = forwardRef(
|
|
|
13562
13601
|
fabricCanvas.on("selection:cleared", () => {
|
|
13563
13602
|
});
|
|
13564
13603
|
fabricCanvas.on("object:scaling", (e) => {
|
|
13565
|
-
var _a2, _b2, _c, _d, _e, _f;
|
|
13604
|
+
var _a2, _b2, _c, _d, _e, _f, _g, _h;
|
|
13566
13605
|
if (!isActiveRef.current) return;
|
|
13567
13606
|
const t = e.target;
|
|
13568
13607
|
if (t) lastResizeScaleTargetRef.current = t;
|
|
13608
|
+
try {
|
|
13609
|
+
const transformDbg = e.transform;
|
|
13610
|
+
const cornerDbg = (transformDbg == null ? void 0 : transformDbg.corner) || "";
|
|
13611
|
+
const children = t instanceof fabric.Group || t instanceof fabric.ActiveSelection ? t.getObjects() : [];
|
|
13612
|
+
logGroupImageResizeDebug("scaling-entry", {
|
|
13613
|
+
time: Math.round(performance.now()),
|
|
13614
|
+
corner: cornerDbg,
|
|
13615
|
+
targetType: t == null ? void 0 : t.type,
|
|
13616
|
+
targetCtor: (_a2 = t == null ? void 0 : t.constructor) == null ? void 0 : _a2.name,
|
|
13617
|
+
isActiveSelection: t instanceof fabric.ActiveSelection,
|
|
13618
|
+
isGroup: t instanceof fabric.Group,
|
|
13619
|
+
isCropGroup: !!(t && (t.__cropGroup || ((_b2 = t._ct) == null ? void 0 : _b2.isCropGroup))),
|
|
13620
|
+
childCount: children.length,
|
|
13621
|
+
childTypes: children.map((c) => c == null ? void 0 : c.type),
|
|
13622
|
+
hasImageChild: children.some((c) => isGroupResizeImageLikeObject(c)),
|
|
13623
|
+
target: t ? summarizeFabricObjectForResizeDebug(t) : null
|
|
13624
|
+
});
|
|
13625
|
+
} catch (err) {
|
|
13626
|
+
console.warn("[Pixldocs][group-image-side-resize] scaling-entry log failed", err);
|
|
13627
|
+
}
|
|
13569
13628
|
prepareGroupSelectionTransformStart(t);
|
|
13570
13629
|
markTransforming(t);
|
|
13571
13630
|
didTransformRef.current = true;
|
|
@@ -13729,7 +13788,7 @@ const PageCanvas = forwardRef(
|
|
|
13729
13788
|
time: Math.round(performance.now()),
|
|
13730
13789
|
corner,
|
|
13731
13790
|
groupSelectionId: obj.__pixldocsGroupSelection,
|
|
13732
|
-
currentTransformAction: (
|
|
13791
|
+
currentTransformAction: (_c = fabricCanvas._currentTransform) == null ? void 0 : _c.action,
|
|
13733
13792
|
selection: summarizeFabricObjectForResizeDebug(obj),
|
|
13734
13793
|
textChildren: obj.getObjects().filter((child) => child instanceof fabric.Textbox).map((child) => summarizeFabricObjectForResizeDebug(child))
|
|
13735
13794
|
};
|
|
@@ -13746,13 +13805,28 @@ const PageCanvas = forwardRef(
|
|
|
13746
13805
|
const selectionAngle = ((obj.angle ?? 0) % 180 + 180) % 180;
|
|
13747
13806
|
const isSelectionRotated = !(selectionAngle < 0.5 || selectionAngle > 179.5);
|
|
13748
13807
|
const shouldPinNonTextChildren = hasRotatedChild || isSelectionRotated;
|
|
13749
|
-
|
|
13808
|
+
const shouldDebugGroupImageResize = obj.getObjects().some((child) => isGroupResizeImageLikeObject(child));
|
|
13809
|
+
if (shouldDebugGroupImageResize) {
|
|
13810
|
+
logGroupImageResizeDebug("live-start", {
|
|
13811
|
+
time: Math.round(performance.now()),
|
|
13812
|
+
corner,
|
|
13813
|
+
isXSide,
|
|
13814
|
+
sAxis,
|
|
13815
|
+
hasRotatedChild,
|
|
13816
|
+
isSelectionRotated,
|
|
13817
|
+
shouldPinNonTextChildren,
|
|
13818
|
+
groupSelectionId: obj.__pixldocsGroupSelection,
|
|
13819
|
+
selection: summarizeFabricObjectForResizeDebug(obj),
|
|
13820
|
+
children: obj.getObjects().map((child) => summarizeFabricObjectForResizeDebug(child))
|
|
13821
|
+
});
|
|
13822
|
+
}
|
|
13823
|
+
if ((isXSide || shouldPinNonTextChildren) && ((_d = groupShiftReflowSnapshotRef.current) == null ? void 0 : _d.selection) !== obj) {
|
|
13750
13824
|
groupShiftReflowSnapshotRef.current = null;
|
|
13751
13825
|
const logicalGroupId = obj.__pixldocsGroupSelection;
|
|
13752
13826
|
if (logicalGroupId) {
|
|
13753
13827
|
try {
|
|
13754
13828
|
const state = useEditorStore.getState();
|
|
13755
|
-
const pageChildren2 = ((
|
|
13829
|
+
const pageChildren2 = ((_e = state.canvas.pages.find((p) => p.id === pageId)) == null ? void 0 : _e.children) ?? [];
|
|
13756
13830
|
const groupNode = findNodeById(pageChildren2, logicalGroupId);
|
|
13757
13831
|
if (groupNode && isGroup(groupNode) && !isStackLayoutMode(groupNode.layoutMode)) {
|
|
13758
13832
|
const entries = obj.getObjects().map((c) => ({
|
|
@@ -13818,12 +13892,25 @@ const PageCanvas = forwardRef(
|
|
|
13818
13892
|
targetLeft = (pin == null ? void 0 : pin.left) ?? targetLeft;
|
|
13819
13893
|
targetTop = (pin == null ? void 0 : pin.top) ?? targetTop;
|
|
13820
13894
|
}
|
|
13895
|
+
const beforeRestore = shouldDebugGroupImageResize ? summarizeFabricObjectForResizeDebug(child) : null;
|
|
13821
13896
|
if (Math.abs((child.left ?? 0) - targetLeft) > 0.01) child._set("left", targetLeft);
|
|
13822
13897
|
if (Math.abs((child.top ?? 0) - targetTop) > 0.01) child._set("top", targetTop);
|
|
13823
13898
|
if (isXSide) child._set("scaleX", childCounterScale);
|
|
13824
13899
|
else child._set("scaleY", childCounterScale);
|
|
13825
13900
|
child.setCoords();
|
|
13826
13901
|
child.dirty = true;
|
|
13902
|
+
if (shouldDebugGroupImageResize) {
|
|
13903
|
+
logGroupImageResizeDebug("restore-non-text", {
|
|
13904
|
+
time: Math.round(performance.now()),
|
|
13905
|
+
corner,
|
|
13906
|
+
childId: getObjectId(child),
|
|
13907
|
+
targetLeft,
|
|
13908
|
+
targetTop,
|
|
13909
|
+
pin,
|
|
13910
|
+
before: beforeRestore,
|
|
13911
|
+
after: summarizeFabricObjectForResizeDebug(child)
|
|
13912
|
+
});
|
|
13913
|
+
}
|
|
13827
13914
|
}
|
|
13828
13915
|
}
|
|
13829
13916
|
};
|
|
@@ -13836,7 +13923,8 @@ const PageCanvas = forwardRef(
|
|
|
13836
13923
|
else child._set("top", entry.top0 * sAxis);
|
|
13837
13924
|
};
|
|
13838
13925
|
for (const child of obj.getObjects()) {
|
|
13839
|
-
if (child instanceof fabric.Group && (child.__cropGroup || ((
|
|
13926
|
+
if (child instanceof fabric.Group && (child.__cropGroup || ((_f = child._ct) == null ? void 0 : _f.isCropGroup))) {
|
|
13927
|
+
const beforeImageChildResize = shouldDebugGroupImageResize ? summarizeFabricObjectForResizeDebug(child) : null;
|
|
13840
13928
|
const ct = child.__cropData;
|
|
13841
13929
|
if (ct) {
|
|
13842
13930
|
if (child.__asLiveOrigW == null) {
|
|
@@ -13863,10 +13951,22 @@ const PageCanvas = forwardRef(
|
|
|
13863
13951
|
else child._set("scaleY", childCounterScale);
|
|
13864
13952
|
child.setCoords();
|
|
13865
13953
|
child.dirty = true;
|
|
13954
|
+
if (shouldDebugGroupImageResize) {
|
|
13955
|
+
logGroupImageResizeDebug("live-crop-child-resized", {
|
|
13956
|
+
time: Math.round(performance.now()),
|
|
13957
|
+
corner,
|
|
13958
|
+
sAxis,
|
|
13959
|
+
childCounterScale,
|
|
13960
|
+
before: beforeImageChildResize,
|
|
13961
|
+
after: summarizeFabricObjectForResizeDebug(child),
|
|
13962
|
+
cropData: ct ? { frameW: ct.frameW, frameH: ct.frameH } : null
|
|
13963
|
+
});
|
|
13964
|
+
}
|
|
13866
13965
|
didReflowTextChild = true;
|
|
13867
13966
|
continue;
|
|
13868
13967
|
}
|
|
13869
13968
|
if (child instanceof fabric.FabricImage && !child.__cropGroup && !child.smartElementType) {
|
|
13969
|
+
const beforeImageChildResize = shouldDebugGroupImageResize ? summarizeFabricObjectForResizeDebug(child) : null;
|
|
13870
13970
|
if (isXSide) {
|
|
13871
13971
|
if (child.__asLiveOrigW == null) {
|
|
13872
13972
|
child.__asLiveOrigW = (child.width ?? 0) * Math.abs(child.scaleX ?? 1);
|
|
@@ -13884,6 +13984,18 @@ const PageCanvas = forwardRef(
|
|
|
13884
13984
|
else child._set("scaleY", childCounterScale);
|
|
13885
13985
|
child.setCoords();
|
|
13886
13986
|
child.dirty = true;
|
|
13987
|
+
if (shouldDebugGroupImageResize) {
|
|
13988
|
+
logGroupImageResizeDebug("live-image-child-resized", {
|
|
13989
|
+
time: Math.round(performance.now()),
|
|
13990
|
+
corner,
|
|
13991
|
+
sAxis,
|
|
13992
|
+
childCounterScale,
|
|
13993
|
+
liveOrigW: child.__asLiveOrigW,
|
|
13994
|
+
liveOrigH: child.__asLiveOrigH,
|
|
13995
|
+
before: beforeImageChildResize,
|
|
13996
|
+
after: summarizeFabricObjectForResizeDebug(child)
|
|
13997
|
+
});
|
|
13998
|
+
}
|
|
13887
13999
|
didReflowTextChild = true;
|
|
13888
14000
|
continue;
|
|
13889
14001
|
}
|
|
@@ -13923,7 +14035,7 @@ const PageCanvas = forwardRef(
|
|
|
13923
14035
|
didReflowTextChild = true;
|
|
13924
14036
|
}
|
|
13925
14037
|
}
|
|
13926
|
-
if (isXSide && !shouldPinNonTextChildren && ((
|
|
14038
|
+
if (isXSide && !shouldPinNonTextChildren && ((_g = groupShiftReflowSnapshotRef.current) == null ? void 0 : _g.selection) === obj) {
|
|
13927
14039
|
const snap = groupShiftReflowSnapshotRef.current;
|
|
13928
14040
|
const anchorEntry = snap.children[0];
|
|
13929
14041
|
const anchorTopLive = anchorEntry.obj.top ?? 0;
|
|
@@ -13967,6 +14079,15 @@ const PageCanvas = forwardRef(
|
|
|
13967
14079
|
}
|
|
13968
14080
|
restoreNonTextChildren(nonTextPinsBeforeLayout);
|
|
13969
14081
|
restoredNonTextAfterLayout = !!nonTextPinsBeforeLayout;
|
|
14082
|
+
if (shouldDebugGroupImageResize) {
|
|
14083
|
+
logGroupImageResizeDebug("after-trigger-layout", {
|
|
14084
|
+
time: Math.round(performance.now()),
|
|
14085
|
+
corner,
|
|
14086
|
+
selection: summarizeFabricObjectForResizeDebug(obj),
|
|
14087
|
+
nonTextPinsBeforeLayout,
|
|
14088
|
+
children: obj.getObjects().map((child) => summarizeFabricObjectForResizeDebug(child))
|
|
14089
|
+
});
|
|
14090
|
+
}
|
|
13970
14091
|
obj._set("width", asW0);
|
|
13971
14092
|
obj._set("scaleX", asSx0);
|
|
13972
14093
|
obj._set("scaleY", asSy0);
|
|
@@ -14096,7 +14217,7 @@ const PageCanvas = forwardRef(
|
|
|
14096
14217
|
setGuides(gridGuidesForScale.length ? [...scaleGuides, ...gridGuidesForScale] : scaleGuides);
|
|
14097
14218
|
if (drilledGroupIdRef.current) {
|
|
14098
14219
|
try {
|
|
14099
|
-
(
|
|
14220
|
+
(_h = fabricCanvas.__updateDrilledGroupOutline) == null ? void 0 : _h.call(fabricCanvas);
|
|
14100
14221
|
} catch {
|
|
14101
14222
|
}
|
|
14102
14223
|
}
|
|
@@ -14561,6 +14682,18 @@ const PageCanvas = forwardRef(
|
|
|
14561
14682
|
const isActiveSelection = activeObj instanceof fabric.ActiveSelection || activeObjects.length > 1;
|
|
14562
14683
|
const activeSelectionResizeHandle = isActiveSelection ? activeSelectionResizeHandleRef.current : null;
|
|
14563
14684
|
const debugGroupTextCornerResize = activeObj instanceof fabric.ActiveSelection && isCornerResizeHandle(activeSelectionResizeHandle) && activeObjects.some((candidate) => candidate instanceof fabric.Textbox);
|
|
14685
|
+
const debugGroupImageSideResize = activeObj instanceof fabric.ActiveSelection && (activeSelectionResizeHandle === "ml" || activeSelectionResizeHandle === "mr" || activeSelectionResizeHandle === "mt" || activeSelectionResizeHandle === "mb") && activeObjects.some((candidate) => isGroupResizeImageLikeObject(candidate));
|
|
14686
|
+
if (debugGroupImageSideResize) {
|
|
14687
|
+
logGroupImageResizeDebug("modified-start", {
|
|
14688
|
+
time: Math.round(performance.now()),
|
|
14689
|
+
handle: activeSelectionResizeHandle,
|
|
14690
|
+
target: summarizeFabricObjectForResizeDebug(modifiedTarget),
|
|
14691
|
+
selection: summarizeFabricObjectForResizeDebug(activeObj),
|
|
14692
|
+
activeObjectIds: activeObjects.map((candidate) => getObjectId(candidate)),
|
|
14693
|
+
selectedStoreIds: useEditorStore.getState().canvas.selectedIds,
|
|
14694
|
+
members: activeObjects.map((candidate) => summarizeFabricObjectForResizeDebug(candidate))
|
|
14695
|
+
});
|
|
14696
|
+
}
|
|
14564
14697
|
if (debugGroupTextCornerResize) {
|
|
14565
14698
|
logGroupTextResizeDebug("modified-start", {
|
|
14566
14699
|
time: Math.round(performance.now()),
|
|
@@ -14915,6 +15048,7 @@ const PageCanvas = forwardRef(
|
|
|
14915
15048
|
useEditorStore.getState().updateElement(objId, { src: newSrc }, { recordHistory: false, skipLayoutRecalc: true });
|
|
14916
15049
|
}
|
|
14917
15050
|
} else if (isActiveSelection && (Math.abs((decomposed.scaleX ?? 1) - 1) > 1e-3 || Math.abs((decomposed.scaleY ?? 1) - 1) > 1e-3)) {
|
|
15051
|
+
const debugImageBeforeBake = debugGroupImageSideResize ? summarizeFabricObjectForResizeDebug(obj) : null;
|
|
14918
15052
|
const sx = Math.abs(decomposed.scaleX || 1);
|
|
14919
15053
|
const sy = Math.abs(decomposed.scaleY || 1);
|
|
14920
15054
|
const handle = activeSelectionResizeHandle;
|
|
@@ -14985,6 +15119,38 @@ const PageCanvas = forwardRef(
|
|
|
14985
15119
|
skewX: finalSkewX ?? 0,
|
|
14986
15120
|
skewY: finalSkewY ?? 0
|
|
14987
15121
|
});
|
|
15122
|
+
if (debugGroupImageSideResize) {
|
|
15123
|
+
logGroupImageResizeDebug("image-bake", {
|
|
15124
|
+
time: Math.round(performance.now()),
|
|
15125
|
+
handle: activeSelectionResizeHandle,
|
|
15126
|
+
imageId: objId,
|
|
15127
|
+
source: sourceElement ? {
|
|
15128
|
+
left: sourceElement.left,
|
|
15129
|
+
top: sourceElement.top,
|
|
15130
|
+
width: sourceElement.width,
|
|
15131
|
+
height: sourceElement.height,
|
|
15132
|
+
angle: sourceElement.angle,
|
|
15133
|
+
scaleX: sourceElement.scaleX,
|
|
15134
|
+
scaleY: sourceElement.scaleY
|
|
15135
|
+
} : null,
|
|
15136
|
+
factors: { sx, sy, fx, fy, isCornerHandle },
|
|
15137
|
+
beforeBake: debugImageBeforeBake,
|
|
15138
|
+
afterBake: summarizeFabricObjectForResizeDebug(obj),
|
|
15139
|
+
persistedGeometry: {
|
|
15140
|
+
absoluteLeft,
|
|
15141
|
+
absoluteTop,
|
|
15142
|
+
finalWidth,
|
|
15143
|
+
finalHeight,
|
|
15144
|
+
finalScaleX,
|
|
15145
|
+
finalScaleY,
|
|
15146
|
+
finalAngle,
|
|
15147
|
+
finalSkewX,
|
|
15148
|
+
finalSkewY,
|
|
15149
|
+
decomposed,
|
|
15150
|
+
finalAbsoluteMatrix
|
|
15151
|
+
}
|
|
15152
|
+
});
|
|
15153
|
+
}
|
|
14988
15154
|
} else {
|
|
14989
15155
|
finalWidth = intrinsicWidth;
|
|
14990
15156
|
finalHeight = intrinsicHeight;
|
|
@@ -15202,6 +15368,16 @@ const PageCanvas = forwardRef(
|
|
|
15202
15368
|
objectBeforeStoreWrite: summarizeFabricObjectForResizeDebug(obj)
|
|
15203
15369
|
});
|
|
15204
15370
|
}
|
|
15371
|
+
if (debugGroupImageSideResize && isGroupResizeImageLikeObject(obj)) {
|
|
15372
|
+
logGroupImageResizeDebug("store-update-image", {
|
|
15373
|
+
time: Math.round(performance.now()),
|
|
15374
|
+
handle: activeSelectionResizeHandle,
|
|
15375
|
+
imageId: objId,
|
|
15376
|
+
storePos,
|
|
15377
|
+
elementUpdate,
|
|
15378
|
+
objectBeforeStoreWrite: summarizeFabricObjectForResizeDebug(obj)
|
|
15379
|
+
});
|
|
15380
|
+
}
|
|
15205
15381
|
updateElement(objId, elementUpdate, { recordHistory: false, skipLayoutRecalc: true });
|
|
15206
15382
|
obj.setCoords();
|
|
15207
15383
|
}
|
|
@@ -15232,6 +15408,16 @@ const PageCanvas = forwardRef(
|
|
|
15232
15408
|
renderOnAddRemove: fabricCanvas.renderOnAddRemove
|
|
15233
15409
|
});
|
|
15234
15410
|
}
|
|
15411
|
+
if (debugGroupImageSideResize) {
|
|
15412
|
+
logGroupImageResizeDebug("before-reselect", {
|
|
15413
|
+
time: Math.round(performance.now()),
|
|
15414
|
+
handle: activeSelectionResizeHandle,
|
|
15415
|
+
wasGroupSel,
|
|
15416
|
+
selection: summarizeFabricObjectForResizeDebug(activeObj),
|
|
15417
|
+
members: membersToReselect.map((member) => summarizeFabricObjectForResizeDebug(member)),
|
|
15418
|
+
renderOnAddRemove: fabricCanvas.renderOnAddRemove
|
|
15419
|
+
});
|
|
15420
|
+
}
|
|
15235
15421
|
const prevRenderOnAddRemove = fabricCanvas.renderOnAddRemove;
|
|
15236
15422
|
fabricCanvas.renderOnAddRemove = false;
|
|
15237
15423
|
skipSelectionClearOnDiscardRef.current = true;
|
|
@@ -15276,6 +15462,16 @@ const PageCanvas = forwardRef(
|
|
|
15276
15462
|
renderOnAddRemove: fabricCanvas.renderOnAddRemove
|
|
15277
15463
|
});
|
|
15278
15464
|
}
|
|
15465
|
+
if (debugGroupImageSideResize) {
|
|
15466
|
+
logGroupImageResizeDebug("after-reselect", {
|
|
15467
|
+
time: Math.round(performance.now()),
|
|
15468
|
+
handle: activeSelectionResizeHandle,
|
|
15469
|
+
wasGroupSel,
|
|
15470
|
+
selection: summarizeFabricObjectForResizeDebug(newSel),
|
|
15471
|
+
members: membersToReselect.map((member) => summarizeFabricObjectForResizeDebug(member)),
|
|
15472
|
+
renderOnAddRemove: fabricCanvas.renderOnAddRemove
|
|
15473
|
+
});
|
|
15474
|
+
}
|
|
15279
15475
|
} else if (membersToReselect.length === 1) {
|
|
15280
15476
|
fabricCanvas.setActiveObject(membersToReselect[0]);
|
|
15281
15477
|
}
|
|
@@ -24325,9 +24521,9 @@ function captureFabricCanvasSvgForPdf(fabricInstance, canvasWidth, canvasHeight)
|
|
|
24325
24521
|
}
|
|
24326
24522
|
return svgString;
|
|
24327
24523
|
}
|
|
24328
|
-
const resolvedPackageVersion = "0.5.
|
|
24524
|
+
const resolvedPackageVersion = "0.5.334";
|
|
24329
24525
|
const PACKAGE_VERSION = resolvedPackageVersion;
|
|
24330
|
-
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.
|
|
24526
|
+
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.334";
|
|
24331
24527
|
const roundParityValue = (value) => {
|
|
24332
24528
|
if (typeof value !== "number") return value;
|
|
24333
24529
|
return Number.isFinite(value) ? Number(value.toFixed(3)) : value;
|
|
@@ -25141,7 +25337,7 @@ class PixldocsRenderer {
|
|
|
25141
25337
|
await this.waitForCanvasScene(container, cloned, i);
|
|
25142
25338
|
}
|
|
25143
25339
|
console.log(`[canvas-renderer][pdf-unified] mounted ${cloned.pages.length} page(s), handing off to client exportMultiPagePdf`);
|
|
25144
|
-
const { exportMultiPagePdf, preparePagesForExport } = await import("./vectorPdfExport-
|
|
25340
|
+
const { exportMultiPagePdf, preparePagesForExport } = await import("./vectorPdfExport-CESWzne5.js");
|
|
25145
25341
|
const prepared = preparePagesForExport(
|
|
25146
25342
|
cloned.pages,
|
|
25147
25343
|
canvasWidth,
|
|
@@ -27461,7 +27657,7 @@ async function prepareLiveCanvasSvgForPdf(rawSvg, pageWidth, pageHeight, pageKey
|
|
|
27461
27657
|
if (options == null ? void 0 : options.stripPageBackground) stripRootPageBackgroundFromSvg(svgToDraw);
|
|
27462
27658
|
sanitizeSvgTreeForPdf(svgToDraw);
|
|
27463
27659
|
try {
|
|
27464
|
-
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await import("./vectorPdfExport-
|
|
27660
|
+
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await import("./vectorPdfExport-CESWzne5.js");
|
|
27465
27661
|
try {
|
|
27466
27662
|
await logTextMeasurementDiagnostic(svgToDraw);
|
|
27467
27663
|
} catch {
|
|
@@ -27861,4 +28057,4 @@ export {
|
|
|
27861
28057
|
buildTeaserBlurFlatKeys as y,
|
|
27862
28058
|
collectFontDescriptorsFromConfig as z
|
|
27863
28059
|
};
|
|
27864
|
-
//# sourceMappingURL=index-
|
|
28060
|
+
//# sourceMappingURL=index-DDQNmmRg.js.map
|