@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
|
@@ -11043,6 +11043,8 @@ const scaleUpdateNumber = (updates, source, key, factor) => {
|
|
|
11043
11043
|
};
|
|
11044
11044
|
const GROUP_TEXT_RESIZE_DEBUG_PREFIX = "[Pixldocs][group-text-corner-resize]";
|
|
11045
11045
|
const GROUP_TEXT_RESIZE_DEBUG_MAX_ENTRIES = 200;
|
|
11046
|
+
const GROUP_IMAGE_RESIZE_DEBUG_PREFIX = "[Pixldocs][group-image-side-resize]";
|
|
11047
|
+
const GROUP_IMAGE_RESIZE_DEBUG_MAX_ENTRIES = 300;
|
|
11046
11048
|
const isCornerResizeHandle = (handle) => handle === "tl" || handle === "tr" || handle === "bl" || handle === "br";
|
|
11047
11049
|
const summarizeFabricObjectForResizeDebug = (obj) => {
|
|
11048
11050
|
var _a2;
|
|
@@ -11105,6 +11107,43 @@ const logGroupTextResizeDebug = (phase, payload) => {
|
|
|
11105
11107
|
console.log(GROUP_TEXT_RESIZE_DEBUG_PREFIX, phase, payload);
|
|
11106
11108
|
}
|
|
11107
11109
|
};
|
|
11110
|
+
const isGroupResizeImageLikeObject = (obj) => {
|
|
11111
|
+
var _a2;
|
|
11112
|
+
return !!obj && (obj instanceof fabric__namespace.FabricImage || obj instanceof fabric__namespace.Group && (obj.__cropGroup || ((_a2 = obj._ct) == null ? void 0 : _a2.isCropGroup)));
|
|
11113
|
+
};
|
|
11114
|
+
const logGroupImageResizeDebug = (phase, payload) => {
|
|
11115
|
+
if (typeof console === "undefined") return;
|
|
11116
|
+
try {
|
|
11117
|
+
const seen = /* @__PURE__ */ new WeakSet();
|
|
11118
|
+
const normalize = (value) => {
|
|
11119
|
+
if (value == null) return value;
|
|
11120
|
+
const valueType = typeof value;
|
|
11121
|
+
if (valueType === "number") return Number.isFinite(value) ? Math.round(value * 1e3) / 1e3 : String(value);
|
|
11122
|
+
if (valueType === "string" || valueType === "boolean") return value;
|
|
11123
|
+
if (valueType === "function") return `[Function ${value.name || "anonymous"}]`;
|
|
11124
|
+
if (Array.isArray(value)) return value.map((entry) => normalize(entry));
|
|
11125
|
+
if (valueType === "object") {
|
|
11126
|
+
if (seen.has(value)) return "[Circular]";
|
|
11127
|
+
seen.add(value);
|
|
11128
|
+
if (value instanceof fabric__namespace.FabricObject) return normalize(summarizeFabricObjectForResizeDebug(value));
|
|
11129
|
+
const output = {};
|
|
11130
|
+
Object.entries(value).forEach(([key, entry]) => {
|
|
11131
|
+
output[key] = normalize(entry);
|
|
11132
|
+
});
|
|
11133
|
+
return output;
|
|
11134
|
+
}
|
|
11135
|
+
return String(value);
|
|
11136
|
+
};
|
|
11137
|
+
const normalizedPayload = normalize(payload);
|
|
11138
|
+
const line = `${GROUP_IMAGE_RESIZE_DEBUG_PREFIX} ${phase} ${JSON.stringify(normalizedPayload)}`;
|
|
11139
|
+
const debugWindow = window;
|
|
11140
|
+
debugWindow.__pixldocsGroupImageResizeLogs = Array.isArray(debugWindow.__pixldocsGroupImageResizeLogs) ? debugWindow.__pixldocsGroupImageResizeLogs.slice(-GROUP_IMAGE_RESIZE_DEBUG_MAX_ENTRIES + 1) : [];
|
|
11141
|
+
debugWindow.__pixldocsGroupImageResizeLogs.push(line);
|
|
11142
|
+
console.log(line);
|
|
11143
|
+
} catch {
|
|
11144
|
+
console.log(GROUP_IMAGE_RESIZE_DEBUG_PREFIX, phase, payload);
|
|
11145
|
+
}
|
|
11146
|
+
};
|
|
11108
11147
|
const bakeTextboxScaleIntoTypography = (obj, sourceElement) => {
|
|
11109
11148
|
const sx = Math.abs(obj.scaleX ?? 1) || 1;
|
|
11110
11149
|
const sy = Math.abs(obj.scaleY ?? 1) || 1;
|
|
@@ -13580,10 +13619,30 @@ const PageCanvas = react.forwardRef(
|
|
|
13580
13619
|
fabricCanvas.on("selection:cleared", () => {
|
|
13581
13620
|
});
|
|
13582
13621
|
fabricCanvas.on("object:scaling", (e) => {
|
|
13583
|
-
var _a2, _b2, _c, _d, _e, _f;
|
|
13622
|
+
var _a2, _b2, _c, _d, _e, _f, _g, _h;
|
|
13584
13623
|
if (!isActiveRef.current) return;
|
|
13585
13624
|
const t = e.target;
|
|
13586
13625
|
if (t) lastResizeScaleTargetRef.current = t;
|
|
13626
|
+
try {
|
|
13627
|
+
const transformDbg = e.transform;
|
|
13628
|
+
const cornerDbg = (transformDbg == null ? void 0 : transformDbg.corner) || "";
|
|
13629
|
+
const children = t instanceof fabric__namespace.Group || t instanceof fabric__namespace.ActiveSelection ? t.getObjects() : [];
|
|
13630
|
+
logGroupImageResizeDebug("scaling-entry", {
|
|
13631
|
+
time: Math.round(performance.now()),
|
|
13632
|
+
corner: cornerDbg,
|
|
13633
|
+
targetType: t == null ? void 0 : t.type,
|
|
13634
|
+
targetCtor: (_a2 = t == null ? void 0 : t.constructor) == null ? void 0 : _a2.name,
|
|
13635
|
+
isActiveSelection: t instanceof fabric__namespace.ActiveSelection,
|
|
13636
|
+
isGroup: t instanceof fabric__namespace.Group,
|
|
13637
|
+
isCropGroup: !!(t && (t.__cropGroup || ((_b2 = t._ct) == null ? void 0 : _b2.isCropGroup))),
|
|
13638
|
+
childCount: children.length,
|
|
13639
|
+
childTypes: children.map((c) => c == null ? void 0 : c.type),
|
|
13640
|
+
hasImageChild: children.some((c) => isGroupResizeImageLikeObject(c)),
|
|
13641
|
+
target: t ? summarizeFabricObjectForResizeDebug(t) : null
|
|
13642
|
+
});
|
|
13643
|
+
} catch (err) {
|
|
13644
|
+
console.warn("[Pixldocs][group-image-side-resize] scaling-entry log failed", err);
|
|
13645
|
+
}
|
|
13587
13646
|
prepareGroupSelectionTransformStart(t);
|
|
13588
13647
|
markTransforming(t);
|
|
13589
13648
|
didTransformRef.current = true;
|
|
@@ -13747,7 +13806,7 @@ const PageCanvas = react.forwardRef(
|
|
|
13747
13806
|
time: Math.round(performance.now()),
|
|
13748
13807
|
corner,
|
|
13749
13808
|
groupSelectionId: obj.__pixldocsGroupSelection,
|
|
13750
|
-
currentTransformAction: (
|
|
13809
|
+
currentTransformAction: (_c = fabricCanvas._currentTransform) == null ? void 0 : _c.action,
|
|
13751
13810
|
selection: summarizeFabricObjectForResizeDebug(obj),
|
|
13752
13811
|
textChildren: obj.getObjects().filter((child) => child instanceof fabric__namespace.Textbox).map((child) => summarizeFabricObjectForResizeDebug(child))
|
|
13753
13812
|
};
|
|
@@ -13764,13 +13823,28 @@ const PageCanvas = react.forwardRef(
|
|
|
13764
13823
|
const selectionAngle = ((obj.angle ?? 0) % 180 + 180) % 180;
|
|
13765
13824
|
const isSelectionRotated = !(selectionAngle < 0.5 || selectionAngle > 179.5);
|
|
13766
13825
|
const shouldPinNonTextChildren = hasRotatedChild || isSelectionRotated;
|
|
13767
|
-
|
|
13826
|
+
const shouldDebugGroupImageResize = obj.getObjects().some((child) => isGroupResizeImageLikeObject(child));
|
|
13827
|
+
if (shouldDebugGroupImageResize) {
|
|
13828
|
+
logGroupImageResizeDebug("live-start", {
|
|
13829
|
+
time: Math.round(performance.now()),
|
|
13830
|
+
corner,
|
|
13831
|
+
isXSide,
|
|
13832
|
+
sAxis,
|
|
13833
|
+
hasRotatedChild,
|
|
13834
|
+
isSelectionRotated,
|
|
13835
|
+
shouldPinNonTextChildren,
|
|
13836
|
+
groupSelectionId: obj.__pixldocsGroupSelection,
|
|
13837
|
+
selection: summarizeFabricObjectForResizeDebug(obj),
|
|
13838
|
+
children: obj.getObjects().map((child) => summarizeFabricObjectForResizeDebug(child))
|
|
13839
|
+
});
|
|
13840
|
+
}
|
|
13841
|
+
if ((isXSide || shouldPinNonTextChildren) && ((_d = groupShiftReflowSnapshotRef.current) == null ? void 0 : _d.selection) !== obj) {
|
|
13768
13842
|
groupShiftReflowSnapshotRef.current = null;
|
|
13769
13843
|
const logicalGroupId = obj.__pixldocsGroupSelection;
|
|
13770
13844
|
if (logicalGroupId) {
|
|
13771
13845
|
try {
|
|
13772
13846
|
const state = useEditorStore.getState();
|
|
13773
|
-
const pageChildren2 = ((
|
|
13847
|
+
const pageChildren2 = ((_e = state.canvas.pages.find((p) => p.id === pageId)) == null ? void 0 : _e.children) ?? [];
|
|
13774
13848
|
const groupNode = findNodeById(pageChildren2, logicalGroupId);
|
|
13775
13849
|
if (groupNode && isGroup(groupNode) && !isStackLayoutMode(groupNode.layoutMode)) {
|
|
13776
13850
|
const entries = obj.getObjects().map((c) => ({
|
|
@@ -13836,12 +13910,25 @@ const PageCanvas = react.forwardRef(
|
|
|
13836
13910
|
targetLeft = (pin == null ? void 0 : pin.left) ?? targetLeft;
|
|
13837
13911
|
targetTop = (pin == null ? void 0 : pin.top) ?? targetTop;
|
|
13838
13912
|
}
|
|
13913
|
+
const beforeRestore = shouldDebugGroupImageResize ? summarizeFabricObjectForResizeDebug(child) : null;
|
|
13839
13914
|
if (Math.abs((child.left ?? 0) - targetLeft) > 0.01) child._set("left", targetLeft);
|
|
13840
13915
|
if (Math.abs((child.top ?? 0) - targetTop) > 0.01) child._set("top", targetTop);
|
|
13841
13916
|
if (isXSide) child._set("scaleX", childCounterScale);
|
|
13842
13917
|
else child._set("scaleY", childCounterScale);
|
|
13843
13918
|
child.setCoords();
|
|
13844
13919
|
child.dirty = true;
|
|
13920
|
+
if (shouldDebugGroupImageResize) {
|
|
13921
|
+
logGroupImageResizeDebug("restore-non-text", {
|
|
13922
|
+
time: Math.round(performance.now()),
|
|
13923
|
+
corner,
|
|
13924
|
+
childId: getObjectId(child),
|
|
13925
|
+
targetLeft,
|
|
13926
|
+
targetTop,
|
|
13927
|
+
pin,
|
|
13928
|
+
before: beforeRestore,
|
|
13929
|
+
after: summarizeFabricObjectForResizeDebug(child)
|
|
13930
|
+
});
|
|
13931
|
+
}
|
|
13845
13932
|
}
|
|
13846
13933
|
}
|
|
13847
13934
|
};
|
|
@@ -13854,7 +13941,8 @@ const PageCanvas = react.forwardRef(
|
|
|
13854
13941
|
else child._set("top", entry.top0 * sAxis);
|
|
13855
13942
|
};
|
|
13856
13943
|
for (const child of obj.getObjects()) {
|
|
13857
|
-
if (child instanceof fabric__namespace.Group && (child.__cropGroup || ((
|
|
13944
|
+
if (child instanceof fabric__namespace.Group && (child.__cropGroup || ((_f = child._ct) == null ? void 0 : _f.isCropGroup))) {
|
|
13945
|
+
const beforeImageChildResize = shouldDebugGroupImageResize ? summarizeFabricObjectForResizeDebug(child) : null;
|
|
13858
13946
|
const ct = child.__cropData;
|
|
13859
13947
|
if (ct) {
|
|
13860
13948
|
if (child.__asLiveOrigW == null) {
|
|
@@ -13881,10 +13969,22 @@ const PageCanvas = react.forwardRef(
|
|
|
13881
13969
|
else child._set("scaleY", childCounterScale);
|
|
13882
13970
|
child.setCoords();
|
|
13883
13971
|
child.dirty = true;
|
|
13972
|
+
if (shouldDebugGroupImageResize) {
|
|
13973
|
+
logGroupImageResizeDebug("live-crop-child-resized", {
|
|
13974
|
+
time: Math.round(performance.now()),
|
|
13975
|
+
corner,
|
|
13976
|
+
sAxis,
|
|
13977
|
+
childCounterScale,
|
|
13978
|
+
before: beforeImageChildResize,
|
|
13979
|
+
after: summarizeFabricObjectForResizeDebug(child),
|
|
13980
|
+
cropData: ct ? { frameW: ct.frameW, frameH: ct.frameH } : null
|
|
13981
|
+
});
|
|
13982
|
+
}
|
|
13884
13983
|
didReflowTextChild = true;
|
|
13885
13984
|
continue;
|
|
13886
13985
|
}
|
|
13887
13986
|
if (child instanceof fabric__namespace.FabricImage && !child.__cropGroup && !child.smartElementType) {
|
|
13987
|
+
const beforeImageChildResize = shouldDebugGroupImageResize ? summarizeFabricObjectForResizeDebug(child) : null;
|
|
13888
13988
|
if (isXSide) {
|
|
13889
13989
|
if (child.__asLiveOrigW == null) {
|
|
13890
13990
|
child.__asLiveOrigW = (child.width ?? 0) * Math.abs(child.scaleX ?? 1);
|
|
@@ -13902,6 +14002,18 @@ const PageCanvas = react.forwardRef(
|
|
|
13902
14002
|
else child._set("scaleY", childCounterScale);
|
|
13903
14003
|
child.setCoords();
|
|
13904
14004
|
child.dirty = true;
|
|
14005
|
+
if (shouldDebugGroupImageResize) {
|
|
14006
|
+
logGroupImageResizeDebug("live-image-child-resized", {
|
|
14007
|
+
time: Math.round(performance.now()),
|
|
14008
|
+
corner,
|
|
14009
|
+
sAxis,
|
|
14010
|
+
childCounterScale,
|
|
14011
|
+
liveOrigW: child.__asLiveOrigW,
|
|
14012
|
+
liveOrigH: child.__asLiveOrigH,
|
|
14013
|
+
before: beforeImageChildResize,
|
|
14014
|
+
after: summarizeFabricObjectForResizeDebug(child)
|
|
14015
|
+
});
|
|
14016
|
+
}
|
|
13905
14017
|
didReflowTextChild = true;
|
|
13906
14018
|
continue;
|
|
13907
14019
|
}
|
|
@@ -13941,7 +14053,7 @@ const PageCanvas = react.forwardRef(
|
|
|
13941
14053
|
didReflowTextChild = true;
|
|
13942
14054
|
}
|
|
13943
14055
|
}
|
|
13944
|
-
if (isXSide && !shouldPinNonTextChildren && ((
|
|
14056
|
+
if (isXSide && !shouldPinNonTextChildren && ((_g = groupShiftReflowSnapshotRef.current) == null ? void 0 : _g.selection) === obj) {
|
|
13945
14057
|
const snap = groupShiftReflowSnapshotRef.current;
|
|
13946
14058
|
const anchorEntry = snap.children[0];
|
|
13947
14059
|
const anchorTopLive = anchorEntry.obj.top ?? 0;
|
|
@@ -13985,6 +14097,15 @@ const PageCanvas = react.forwardRef(
|
|
|
13985
14097
|
}
|
|
13986
14098
|
restoreNonTextChildren(nonTextPinsBeforeLayout);
|
|
13987
14099
|
restoredNonTextAfterLayout = !!nonTextPinsBeforeLayout;
|
|
14100
|
+
if (shouldDebugGroupImageResize) {
|
|
14101
|
+
logGroupImageResizeDebug("after-trigger-layout", {
|
|
14102
|
+
time: Math.round(performance.now()),
|
|
14103
|
+
corner,
|
|
14104
|
+
selection: summarizeFabricObjectForResizeDebug(obj),
|
|
14105
|
+
nonTextPinsBeforeLayout,
|
|
14106
|
+
children: obj.getObjects().map((child) => summarizeFabricObjectForResizeDebug(child))
|
|
14107
|
+
});
|
|
14108
|
+
}
|
|
13988
14109
|
obj._set("width", asW0);
|
|
13989
14110
|
obj._set("scaleX", asSx0);
|
|
13990
14111
|
obj._set("scaleY", asSy0);
|
|
@@ -14114,7 +14235,7 @@ const PageCanvas = react.forwardRef(
|
|
|
14114
14235
|
setGuides(gridGuidesForScale.length ? [...scaleGuides, ...gridGuidesForScale] : scaleGuides);
|
|
14115
14236
|
if (drilledGroupIdRef.current) {
|
|
14116
14237
|
try {
|
|
14117
|
-
(
|
|
14238
|
+
(_h = fabricCanvas.__updateDrilledGroupOutline) == null ? void 0 : _h.call(fabricCanvas);
|
|
14118
14239
|
} catch {
|
|
14119
14240
|
}
|
|
14120
14241
|
}
|
|
@@ -14579,6 +14700,18 @@ const PageCanvas = react.forwardRef(
|
|
|
14579
14700
|
const isActiveSelection = activeObj instanceof fabric__namespace.ActiveSelection || activeObjects.length > 1;
|
|
14580
14701
|
const activeSelectionResizeHandle = isActiveSelection ? activeSelectionResizeHandleRef.current : null;
|
|
14581
14702
|
const debugGroupTextCornerResize = activeObj instanceof fabric__namespace.ActiveSelection && isCornerResizeHandle(activeSelectionResizeHandle) && activeObjects.some((candidate) => candidate instanceof fabric__namespace.Textbox);
|
|
14703
|
+
const debugGroupImageSideResize = activeObj instanceof fabric__namespace.ActiveSelection && (activeSelectionResizeHandle === "ml" || activeSelectionResizeHandle === "mr" || activeSelectionResizeHandle === "mt" || activeSelectionResizeHandle === "mb") && activeObjects.some((candidate) => isGroupResizeImageLikeObject(candidate));
|
|
14704
|
+
if (debugGroupImageSideResize) {
|
|
14705
|
+
logGroupImageResizeDebug("modified-start", {
|
|
14706
|
+
time: Math.round(performance.now()),
|
|
14707
|
+
handle: activeSelectionResizeHandle,
|
|
14708
|
+
target: summarizeFabricObjectForResizeDebug(modifiedTarget),
|
|
14709
|
+
selection: summarizeFabricObjectForResizeDebug(activeObj),
|
|
14710
|
+
activeObjectIds: activeObjects.map((candidate) => getObjectId(candidate)),
|
|
14711
|
+
selectedStoreIds: useEditorStore.getState().canvas.selectedIds,
|
|
14712
|
+
members: activeObjects.map((candidate) => summarizeFabricObjectForResizeDebug(candidate))
|
|
14713
|
+
});
|
|
14714
|
+
}
|
|
14582
14715
|
if (debugGroupTextCornerResize) {
|
|
14583
14716
|
logGroupTextResizeDebug("modified-start", {
|
|
14584
14717
|
time: Math.round(performance.now()),
|
|
@@ -14933,6 +15066,7 @@ const PageCanvas = react.forwardRef(
|
|
|
14933
15066
|
useEditorStore.getState().updateElement(objId, { src: newSrc }, { recordHistory: false, skipLayoutRecalc: true });
|
|
14934
15067
|
}
|
|
14935
15068
|
} else if (isActiveSelection && (Math.abs((decomposed.scaleX ?? 1) - 1) > 1e-3 || Math.abs((decomposed.scaleY ?? 1) - 1) > 1e-3)) {
|
|
15069
|
+
const debugImageBeforeBake = debugGroupImageSideResize ? summarizeFabricObjectForResizeDebug(obj) : null;
|
|
14936
15070
|
const sx = Math.abs(decomposed.scaleX || 1);
|
|
14937
15071
|
const sy = Math.abs(decomposed.scaleY || 1);
|
|
14938
15072
|
const handle = activeSelectionResizeHandle;
|
|
@@ -15003,6 +15137,38 @@ const PageCanvas = react.forwardRef(
|
|
|
15003
15137
|
skewX: finalSkewX ?? 0,
|
|
15004
15138
|
skewY: finalSkewY ?? 0
|
|
15005
15139
|
});
|
|
15140
|
+
if (debugGroupImageSideResize) {
|
|
15141
|
+
logGroupImageResizeDebug("image-bake", {
|
|
15142
|
+
time: Math.round(performance.now()),
|
|
15143
|
+
handle: activeSelectionResizeHandle,
|
|
15144
|
+
imageId: objId,
|
|
15145
|
+
source: sourceElement ? {
|
|
15146
|
+
left: sourceElement.left,
|
|
15147
|
+
top: sourceElement.top,
|
|
15148
|
+
width: sourceElement.width,
|
|
15149
|
+
height: sourceElement.height,
|
|
15150
|
+
angle: sourceElement.angle,
|
|
15151
|
+
scaleX: sourceElement.scaleX,
|
|
15152
|
+
scaleY: sourceElement.scaleY
|
|
15153
|
+
} : null,
|
|
15154
|
+
factors: { sx, sy, fx, fy, isCornerHandle },
|
|
15155
|
+
beforeBake: debugImageBeforeBake,
|
|
15156
|
+
afterBake: summarizeFabricObjectForResizeDebug(obj),
|
|
15157
|
+
persistedGeometry: {
|
|
15158
|
+
absoluteLeft,
|
|
15159
|
+
absoluteTop,
|
|
15160
|
+
finalWidth,
|
|
15161
|
+
finalHeight,
|
|
15162
|
+
finalScaleX,
|
|
15163
|
+
finalScaleY,
|
|
15164
|
+
finalAngle,
|
|
15165
|
+
finalSkewX,
|
|
15166
|
+
finalSkewY,
|
|
15167
|
+
decomposed,
|
|
15168
|
+
finalAbsoluteMatrix
|
|
15169
|
+
}
|
|
15170
|
+
});
|
|
15171
|
+
}
|
|
15006
15172
|
} else {
|
|
15007
15173
|
finalWidth = intrinsicWidth;
|
|
15008
15174
|
finalHeight = intrinsicHeight;
|
|
@@ -15220,6 +15386,16 @@ const PageCanvas = react.forwardRef(
|
|
|
15220
15386
|
objectBeforeStoreWrite: summarizeFabricObjectForResizeDebug(obj)
|
|
15221
15387
|
});
|
|
15222
15388
|
}
|
|
15389
|
+
if (debugGroupImageSideResize && isGroupResizeImageLikeObject(obj)) {
|
|
15390
|
+
logGroupImageResizeDebug("store-update-image", {
|
|
15391
|
+
time: Math.round(performance.now()),
|
|
15392
|
+
handle: activeSelectionResizeHandle,
|
|
15393
|
+
imageId: objId,
|
|
15394
|
+
storePos,
|
|
15395
|
+
elementUpdate,
|
|
15396
|
+
objectBeforeStoreWrite: summarizeFabricObjectForResizeDebug(obj)
|
|
15397
|
+
});
|
|
15398
|
+
}
|
|
15223
15399
|
updateElement(objId, elementUpdate, { recordHistory: false, skipLayoutRecalc: true });
|
|
15224
15400
|
obj.setCoords();
|
|
15225
15401
|
}
|
|
@@ -15250,6 +15426,16 @@ const PageCanvas = react.forwardRef(
|
|
|
15250
15426
|
renderOnAddRemove: fabricCanvas.renderOnAddRemove
|
|
15251
15427
|
});
|
|
15252
15428
|
}
|
|
15429
|
+
if (debugGroupImageSideResize) {
|
|
15430
|
+
logGroupImageResizeDebug("before-reselect", {
|
|
15431
|
+
time: Math.round(performance.now()),
|
|
15432
|
+
handle: activeSelectionResizeHandle,
|
|
15433
|
+
wasGroupSel,
|
|
15434
|
+
selection: summarizeFabricObjectForResizeDebug(activeObj),
|
|
15435
|
+
members: membersToReselect.map((member) => summarizeFabricObjectForResizeDebug(member)),
|
|
15436
|
+
renderOnAddRemove: fabricCanvas.renderOnAddRemove
|
|
15437
|
+
});
|
|
15438
|
+
}
|
|
15253
15439
|
const prevRenderOnAddRemove = fabricCanvas.renderOnAddRemove;
|
|
15254
15440
|
fabricCanvas.renderOnAddRemove = false;
|
|
15255
15441
|
skipSelectionClearOnDiscardRef.current = true;
|
|
@@ -15294,6 +15480,16 @@ const PageCanvas = react.forwardRef(
|
|
|
15294
15480
|
renderOnAddRemove: fabricCanvas.renderOnAddRemove
|
|
15295
15481
|
});
|
|
15296
15482
|
}
|
|
15483
|
+
if (debugGroupImageSideResize) {
|
|
15484
|
+
logGroupImageResizeDebug("after-reselect", {
|
|
15485
|
+
time: Math.round(performance.now()),
|
|
15486
|
+
handle: activeSelectionResizeHandle,
|
|
15487
|
+
wasGroupSel,
|
|
15488
|
+
selection: summarizeFabricObjectForResizeDebug(newSel),
|
|
15489
|
+
members: membersToReselect.map((member) => summarizeFabricObjectForResizeDebug(member)),
|
|
15490
|
+
renderOnAddRemove: fabricCanvas.renderOnAddRemove
|
|
15491
|
+
});
|
|
15492
|
+
}
|
|
15297
15493
|
} else if (membersToReselect.length === 1) {
|
|
15298
15494
|
fabricCanvas.setActiveObject(membersToReselect[0]);
|
|
15299
15495
|
}
|
|
@@ -24343,9 +24539,9 @@ function captureFabricCanvasSvgForPdf(fabricInstance, canvasWidth, canvasHeight)
|
|
|
24343
24539
|
}
|
|
24344
24540
|
return svgString;
|
|
24345
24541
|
}
|
|
24346
|
-
const resolvedPackageVersion = "0.5.
|
|
24542
|
+
const resolvedPackageVersion = "0.5.334";
|
|
24347
24543
|
const PACKAGE_VERSION = resolvedPackageVersion;
|
|
24348
|
-
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.
|
|
24544
|
+
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.334";
|
|
24349
24545
|
const roundParityValue = (value) => {
|
|
24350
24546
|
if (typeof value !== "number") return value;
|
|
24351
24547
|
return Number.isFinite(value) ? Number(value.toFixed(3)) : value;
|
|
@@ -25159,7 +25355,7 @@ class PixldocsRenderer {
|
|
|
25159
25355
|
await this.waitForCanvasScene(container, cloned, i);
|
|
25160
25356
|
}
|
|
25161
25357
|
console.log(`[canvas-renderer][pdf-unified] mounted ${cloned.pages.length} page(s), handing off to client exportMultiPagePdf`);
|
|
25162
|
-
const { exportMultiPagePdf, preparePagesForExport } = await Promise.resolve().then(() => require("./vectorPdfExport-
|
|
25358
|
+
const { exportMultiPagePdf, preparePagesForExport } = await Promise.resolve().then(() => require("./vectorPdfExport-9OekmGZH.cjs"));
|
|
25163
25359
|
const prepared = preparePagesForExport(
|
|
25164
25360
|
cloned.pages,
|
|
25165
25361
|
canvasWidth,
|
|
@@ -27479,7 +27675,7 @@ async function prepareLiveCanvasSvgForPdf(rawSvg, pageWidth, pageHeight, pageKey
|
|
|
27479
27675
|
if (options == null ? void 0 : options.stripPageBackground) stripRootPageBackgroundFromSvg(svgToDraw);
|
|
27480
27676
|
sanitizeSvgTreeForPdf(svgToDraw);
|
|
27481
27677
|
try {
|
|
27482
|
-
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await Promise.resolve().then(() => require("./vectorPdfExport-
|
|
27678
|
+
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await Promise.resolve().then(() => require("./vectorPdfExport-9OekmGZH.cjs"));
|
|
27483
27679
|
try {
|
|
27484
27680
|
await logTextMeasurementDiagnostic(svgToDraw);
|
|
27485
27681
|
} catch {
|
|
@@ -27876,4 +28072,4 @@ exports.setAutoShrinkDebug = setAutoShrinkDebug;
|
|
|
27876
28072
|
exports.setBundledAssetPrefixes = setBundledAssetPrefixes;
|
|
27877
28073
|
exports.warmResolvedTemplateForPreview = warmResolvedTemplateForPreview;
|
|
27878
28074
|
exports.warmTemplateFromForm = warmTemplateFromForm;
|
|
27879
|
-
//# sourceMappingURL=index-
|
|
28075
|
+
//# sourceMappingURL=index-CBVpyFeT.cjs.map
|