@pixldocs/canvas-renderer 0.5.243 → 0.5.245
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-C5mQ2kl5.js → index-FE8QLDiA.js} +170 -47
- package/dist/index-FE8QLDiA.js.map +1 -0
- package/dist/{index-UuNicsNZ.cjs → index-o3TKXqkj.cjs} +170 -47
- package/dist/index-o3TKXqkj.cjs.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/{vectorPdfExport-V2qBQ4Xs.cjs → vectorPdfExport-00z0fojJ.cjs} +4 -4
- package/dist/{vectorPdfExport-V2qBQ4Xs.cjs.map → vectorPdfExport-00z0fojJ.cjs.map} +1 -1
- package/dist/{vectorPdfExport-DJD1vq7N.js → vectorPdfExport-qzZ0kZCI.js} +4 -4
- package/dist/{vectorPdfExport-DJD1vq7N.js.map → vectorPdfExport-qzZ0kZCI.js.map} +1 -1
- package/package.json +1 -1
- package/dist/index-C5mQ2kl5.js.map +0 -1
- package/dist/index-UuNicsNZ.cjs.map +0 -1
|
@@ -11120,6 +11120,8 @@ const PageCanvas = forwardRef(
|
|
|
11120
11120
|
const [guides, setGuides] = useState([]);
|
|
11121
11121
|
const [gridResizeLabel, setGridResizeLabel] = useState(null);
|
|
11122
11122
|
const [hoverBounds, setHoverBounds] = useState(null);
|
|
11123
|
+
const [drilledGroupBounds, setDrilledGroupBounds] = useState(null);
|
|
11124
|
+
const drilledGroupIdRef = useRef(null);
|
|
11123
11125
|
const [rotationLabel, setRotationLabel] = useState(null);
|
|
11124
11126
|
const [sizeLabel, setSizeLabel] = useState(null);
|
|
11125
11127
|
const [ready, setReady] = useState(false);
|
|
@@ -11176,6 +11178,7 @@ const PageCanvas = forwardRef(
|
|
|
11176
11178
|
const preserveEditingScopeOnSelectionClearRef = useRef(false);
|
|
11177
11179
|
const preserveActiveSelectionAfterTransformRef = useRef(null);
|
|
11178
11180
|
const pendingGroupPromotionRef = useRef(null);
|
|
11181
|
+
const pendingGroupDrillInRef = useRef(null);
|
|
11179
11182
|
const imageReloadRequestSeqRef = useRef(/* @__PURE__ */ new Map());
|
|
11180
11183
|
useRef(null);
|
|
11181
11184
|
const groupBoundsResizingRef = useRef(false);
|
|
@@ -11986,16 +11989,29 @@ const PageCanvas = forwardRef(
|
|
|
11986
11989
|
}
|
|
11987
11990
|
});
|
|
11988
11991
|
fabricCanvas.on("object:scaling", () => {
|
|
11992
|
+
var _a2;
|
|
11989
11993
|
fabricCanvas.__isUserTransforming = true;
|
|
11994
|
+
if (drilledGroupIdRef.current) {
|
|
11995
|
+
try {
|
|
11996
|
+
(_a2 = fabricCanvas.__updateDrilledGroupOutline) == null ? void 0 : _a2.call(fabricCanvas);
|
|
11997
|
+
} catch {
|
|
11998
|
+
}
|
|
11999
|
+
}
|
|
11990
12000
|
});
|
|
11991
12001
|
fabricCanvas.on("object:moving", () => {
|
|
11992
|
-
var _a2;
|
|
12002
|
+
var _a2, _b2;
|
|
11993
12003
|
fabricCanvas.__isUserTransforming = true;
|
|
11994
12004
|
didTransformRef.current = true;
|
|
12005
|
+
if (drilledGroupIdRef.current) {
|
|
12006
|
+
try {
|
|
12007
|
+
(_a2 = fabricCanvas.__updateDrilledGroupOutline) == null ? void 0 : _a2.call(fabricCanvas);
|
|
12008
|
+
} catch {
|
|
12009
|
+
}
|
|
12010
|
+
}
|
|
11995
12011
|
const active = fabricCanvas.getActiveObject();
|
|
11996
12012
|
if (!active) return;
|
|
11997
12013
|
const state = useEditorStore.getState();
|
|
11998
|
-
const canvasPage = (
|
|
12014
|
+
const canvasPage = (_b2 = state.canvas.pages) == null ? void 0 : _b2.find((p) => p.id === pageId);
|
|
11999
12015
|
const children = (canvasPage == null ? void 0 : canvasPage.children) ?? [];
|
|
12000
12016
|
if (!canvasPage) return;
|
|
12001
12017
|
const ids = state.canvas.selectedIds ?? [];
|
|
@@ -12026,8 +12042,15 @@ const PageCanvas = forwardRef(
|
|
|
12026
12042
|
}
|
|
12027
12043
|
});
|
|
12028
12044
|
fabricCanvas.on("object:rotating", () => {
|
|
12045
|
+
var _a2;
|
|
12029
12046
|
fabricCanvas.__isUserTransforming = true;
|
|
12030
12047
|
didTransformRef.current = true;
|
|
12048
|
+
if (drilledGroupIdRef.current) {
|
|
12049
|
+
try {
|
|
12050
|
+
(_a2 = fabricCanvas.__updateDrilledGroupOutline) == null ? void 0 : _a2.call(fabricCanvas);
|
|
12051
|
+
} catch {
|
|
12052
|
+
}
|
|
12053
|
+
}
|
|
12031
12054
|
});
|
|
12032
12055
|
const syncSelectionToStore = () => {
|
|
12033
12056
|
var _a2, _b2, _c, _d;
|
|
@@ -12238,7 +12261,7 @@ const PageCanvas = forwardRef(
|
|
|
12238
12261
|
}
|
|
12239
12262
|
});
|
|
12240
12263
|
fabricCanvas.on("mouse:dblclick", (opt) => {
|
|
12241
|
-
var _a2, _b2;
|
|
12264
|
+
var _a2, _b2, _c;
|
|
12242
12265
|
const target = opt == null ? void 0 : opt.target;
|
|
12243
12266
|
if (!target) return;
|
|
12244
12267
|
if (target.isEditing) return;
|
|
@@ -12246,7 +12269,7 @@ const PageCanvas = forwardRef(
|
|
|
12246
12269
|
const active = fabricCanvas.getActiveObject();
|
|
12247
12270
|
let hitChild = null;
|
|
12248
12271
|
if (active instanceof fabric.ActiveSelection) {
|
|
12249
|
-
const pointer = fabricCanvas.
|
|
12272
|
+
const pointer = fabricCanvas.getPointer(opt.e);
|
|
12250
12273
|
const objs = active.getObjects();
|
|
12251
12274
|
for (let i = objs.length - 1; i >= 0; i--) {
|
|
12252
12275
|
const o = objs[i];
|
|
@@ -12333,6 +12356,10 @@ const PageCanvas = forwardRef(
|
|
|
12333
12356
|
}
|
|
12334
12357
|
const selectedId = selectionIdx < 0 ? childId : chain[selectionIdx].id;
|
|
12335
12358
|
selectElements([selectedId], false, false);
|
|
12359
|
+
try {
|
|
12360
|
+
(_c = fabricCanvas.__updateDrilledGroupOutline) == null ? void 0 : _c.call(fabricCanvas);
|
|
12361
|
+
} catch {
|
|
12362
|
+
}
|
|
12336
12363
|
});
|
|
12337
12364
|
fabricCanvas.on("selection:cleared", () => {
|
|
12338
12365
|
if (!isActiveRef.current || isRebuildingRef.current || !allowSelection) return;
|
|
@@ -12340,6 +12367,8 @@ const PageCanvas = forwardRef(
|
|
|
12340
12367
|
groupBoundsResizingRef.current = false;
|
|
12341
12368
|
if (!preserveEditingScopeOnSelectionClearRef.current) {
|
|
12342
12369
|
fabricCanvas.__activeEditingGroupId = null;
|
|
12370
|
+
setDrilledGroupBounds(null);
|
|
12371
|
+
drilledGroupIdRef.current = null;
|
|
12343
12372
|
}
|
|
12344
12373
|
const preservedGroupSelection = preserveActiveSelectionAfterTransformRef.current;
|
|
12345
12374
|
const shouldRestoreGroupSelection = !!((preservedGroupSelection == null ? void 0 : preservedGroupSelection.groupSelectionId) && (!preservedGroupSelection.expiresAt || preservedGroupSelection.expiresAt > Date.now()));
|
|
@@ -12467,10 +12496,36 @@ const PageCanvas = forwardRef(
|
|
|
12467
12496
|
}
|
|
12468
12497
|
};
|
|
12469
12498
|
const isMultiSelectModifier = (event) => !!((event == null ? void 0 : event.shiftKey) || (event == null ? void 0 : event.metaKey) || (event == null ? void 0 : event.ctrlKey));
|
|
12499
|
+
const pickChildInActiveSelectionAtPointer = (selection, event) => {
|
|
12500
|
+
var _a2, _b2, _c, _d, _e;
|
|
12501
|
+
try {
|
|
12502
|
+
const pointer = fabricCanvas.getPointer(event);
|
|
12503
|
+
const viewportPointer = (_a2 = fabricCanvas.getViewportPoint) == null ? void 0 : _a2.call(fabricCanvas, event);
|
|
12504
|
+
const zoom3 = ((_b2 = fabricCanvas.getZoom) == null ? void 0 : _b2.call(fabricCanvas)) || 1;
|
|
12505
|
+
const tolerance = Math.max(3, 6 / zoom3);
|
|
12506
|
+
const members = selection.getObjects();
|
|
12507
|
+
for (let i = members.length - 1; i >= 0; i--) {
|
|
12508
|
+
const obj = members[i];
|
|
12509
|
+
const id = getObjectId(obj);
|
|
12510
|
+
if (!id || id === "__background__" || obj.visible === false) continue;
|
|
12511
|
+
(_c = obj.setCoords) == null ? void 0 : _c.call(obj);
|
|
12512
|
+
const containsScene = typeof obj.containsPoint === "function" && obj.containsPoint(pointer);
|
|
12513
|
+
const containsViewport = !!(viewportPointer && typeof obj.containsPoint === "function" && obj.containsPoint(viewportPointer));
|
|
12514
|
+
if (containsScene || containsViewport) return obj;
|
|
12515
|
+
const br = ((_d = obj.getBoundingRect) == null ? void 0 : _d.call(obj, true, true)) ?? ((_e = obj.getBoundingRect) == null ? void 0 : _e.call(obj));
|
|
12516
|
+
if (br && pointer.x >= br.left - tolerance && pointer.x <= br.left + br.width + tolerance && pointer.y >= br.top - tolerance && pointer.y <= br.top + br.height + tolerance) {
|
|
12517
|
+
return obj;
|
|
12518
|
+
}
|
|
12519
|
+
}
|
|
12520
|
+
} catch {
|
|
12521
|
+
return null;
|
|
12522
|
+
}
|
|
12523
|
+
return null;
|
|
12524
|
+
};
|
|
12470
12525
|
const pickSelectableObjectAtPointer = (event) => {
|
|
12471
12526
|
var _a2;
|
|
12472
12527
|
try {
|
|
12473
|
-
const pointer = fabricCanvas.
|
|
12528
|
+
const pointer = fabricCanvas.getPointer(event);
|
|
12474
12529
|
const objects = fabricCanvas.getObjects();
|
|
12475
12530
|
for (let i = objects.length - 1; i >= 0; i--) {
|
|
12476
12531
|
const obj = objects[i];
|
|
@@ -12717,6 +12772,32 @@ const PageCanvas = forwardRef(
|
|
|
12717
12772
|
}
|
|
12718
12773
|
return pick;
|
|
12719
12774
|
};
|
|
12775
|
+
const updateDrilledGroupOutline = () => {
|
|
12776
|
+
const gid = fabricCanvas.__activeEditingGroupId ?? null;
|
|
12777
|
+
drilledGroupIdRef.current = gid;
|
|
12778
|
+
if (!gid) {
|
|
12779
|
+
setDrilledGroupBounds(null);
|
|
12780
|
+
return;
|
|
12781
|
+
}
|
|
12782
|
+
const pageNow = useEditorStore.getState().canvas.pages.find((p) => p.id === pageId);
|
|
12783
|
+
const node = pageNow ? findNodeById(pageNow.children ?? [], gid) : null;
|
|
12784
|
+
if (!node || !isGroup(node) || node.backgroundColor) {
|
|
12785
|
+
setDrilledGroupBounds(null);
|
|
12786
|
+
return;
|
|
12787
|
+
}
|
|
12788
|
+
const b = groupFabricUnionBBox(node);
|
|
12789
|
+
if (!b) {
|
|
12790
|
+
setDrilledGroupBounds(null);
|
|
12791
|
+
return;
|
|
12792
|
+
}
|
|
12793
|
+
setDrilledGroupBounds({
|
|
12794
|
+
left: b.left,
|
|
12795
|
+
top: b.top,
|
|
12796
|
+
width: b.right - b.left,
|
|
12797
|
+
height: b.bottom - b.top
|
|
12798
|
+
});
|
|
12799
|
+
};
|
|
12800
|
+
fabricCanvas.__updateDrilledGroupOutline = updateDrilledGroupOutline;
|
|
12720
12801
|
fabricCanvas.on("mouse:down:before", (opt) => {
|
|
12721
12802
|
var _a2, _b2, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n;
|
|
12722
12803
|
if (editLockRef.current) {
|
|
@@ -12737,22 +12818,11 @@ const PageCanvas = forwardRef(
|
|
|
12737
12818
|
let target = opt.target;
|
|
12738
12819
|
let targetId = target ? getObjectId(target) : null;
|
|
12739
12820
|
if (target instanceof fabric.ActiveSelection && target.__pixldocsGroupSelection && target === fabricCanvas.getActiveObject()) {
|
|
12740
|
-
|
|
12741
|
-
|
|
12742
|
-
|
|
12743
|
-
|
|
12744
|
-
|
|
12745
|
-
if (m.visible === false) continue;
|
|
12746
|
-
if (typeof m.containsPoint === "function" && m.containsPoint(pointer)) {
|
|
12747
|
-
const mid = getObjectId(m);
|
|
12748
|
-
if (mid) {
|
|
12749
|
-
target = m;
|
|
12750
|
-
targetId = mid;
|
|
12751
|
-
}
|
|
12752
|
-
break;
|
|
12753
|
-
}
|
|
12754
|
-
}
|
|
12755
|
-
} catch {
|
|
12821
|
+
const child = pickChildInActiveSelectionAtPointer(target, opt.e);
|
|
12822
|
+
const childId = child ? getObjectId(child) : null;
|
|
12823
|
+
if (child && childId) {
|
|
12824
|
+
target = child;
|
|
12825
|
+
targetId = childId;
|
|
12756
12826
|
}
|
|
12757
12827
|
}
|
|
12758
12828
|
const activeEditingGroupId = fabricCanvas.__activeEditingGroupId ?? null;
|
|
@@ -12771,6 +12841,7 @@ const PageCanvas = forwardRef(
|
|
|
12771
12841
|
activeObjects: fabricCanvas.getActiveObjects().slice()
|
|
12772
12842
|
};
|
|
12773
12843
|
pendingGroupPromotionRef.current = null;
|
|
12844
|
+
pendingGroupDrillInRef.current = null;
|
|
12774
12845
|
return;
|
|
12775
12846
|
}
|
|
12776
12847
|
}
|
|
@@ -12793,28 +12864,21 @@ const PageCanvas = forwardRef(
|
|
|
12793
12864
|
const activeNowEarly = fabricCanvas.getActiveObject();
|
|
12794
12865
|
const asGroupId = target instanceof fabric.ActiveSelection ? target.__pixldocsGroupSelection : void 0;
|
|
12795
12866
|
if (target instanceof fabric.ActiveSelection && asGroupId && target === activeNowEarly) {
|
|
12796
|
-
|
|
12797
|
-
|
|
12798
|
-
|
|
12799
|
-
|
|
12800
|
-
|
|
12801
|
-
if (m.visible === false) continue;
|
|
12802
|
-
if (typeof m.containsPoint === "function" && m.containsPoint(pointer)) {
|
|
12803
|
-
const mid = getObjectId(m);
|
|
12804
|
-
if (mid) {
|
|
12805
|
-
effectiveTarget = m;
|
|
12806
|
-
effectiveTargetId = mid;
|
|
12807
|
-
}
|
|
12808
|
-
break;
|
|
12809
|
-
}
|
|
12810
|
-
}
|
|
12811
|
-
} catch {
|
|
12867
|
+
const child = pickChildInActiveSelectionAtPointer(target, opt.e);
|
|
12868
|
+
const childId = child ? getObjectId(child) : null;
|
|
12869
|
+
if (child && childId) {
|
|
12870
|
+
effectiveTarget = child;
|
|
12871
|
+
effectiveTargetId = childId;
|
|
12812
12872
|
}
|
|
12813
12873
|
}
|
|
12814
12874
|
const parent = findTopmostPromotableGroup(effectiveTargetId);
|
|
12815
12875
|
const targetIsInCrop = !!(effectiveTarget instanceof fabric.Group && isCropGroupInCropMode(effectiveTarget) || (effectiveTarget == null ? void 0 : effectiveTarget.group) instanceof fabric.Group && isCropGroupInCropMode(effectiveTarget.group));
|
|
12816
12876
|
const activeNow = fabricCanvas.getActiveObject();
|
|
12817
|
-
const
|
|
12877
|
+
const activeGroupSelectionId = activeNow instanceof fabric.ActiveSelection ? activeNow.__pixldocsGroupSelection : void 0;
|
|
12878
|
+
const activeGroupNode = activeGroupSelectionId ? findNodeById(childrenNow, activeGroupSelectionId) : null;
|
|
12879
|
+
const activeGroupContainsTarget = !!(activeGroupNode && isGroup(activeGroupNode) && getAllElementIds(activeGroupNode.children ?? []).includes(effectiveTargetId));
|
|
12880
|
+
const alreadyThisGroup = !!(activeGroupSelectionId && activeGroupContainsTarget);
|
|
12881
|
+
const drillGroup = alreadyThisGroup && activeGroupNode && isGroup(activeGroupNode) ? activeGroupNode : parent;
|
|
12818
12882
|
const isMultiSelectKey = !!(((_f = opt.e) == null ? void 0 : _f.shiftKey) || ((_g = opt.e) == null ? void 0 : _g.metaKey) || ((_h = opt.e) == null ? void 0 : _h.ctrlKey));
|
|
12819
12883
|
const isDeepSelectKey = !!((_i = opt.e) == null ? void 0 : _i.altKey);
|
|
12820
12884
|
if (isDeepSelectKey) {
|
|
@@ -12844,7 +12908,8 @@ const PageCanvas = forwardRef(
|
|
|
12844
12908
|
opt.target = only;
|
|
12845
12909
|
pendingGroupPromotionRef.current = { groupId: parent.id, selection: only };
|
|
12846
12910
|
}
|
|
12847
|
-
|
|
12911
|
+
pendingGroupDrillInRef.current = null;
|
|
12912
|
+
} else if (drillGroup && !drillGroup.backgroundColor && !targetIsInCrop && alreadyThisGroup && !isMultiSelectKey && effectiveTarget !== activeNow) {
|
|
12848
12913
|
try {
|
|
12849
12914
|
skipSelectionClearOnDiscardRef.current = true;
|
|
12850
12915
|
preserveEditingScopeOnSelectionClearRef.current = true;
|
|
@@ -12854,7 +12919,7 @@ const PageCanvas = forwardRef(
|
|
|
12854
12919
|
skipSelectionClearOnDiscardRef.current = false;
|
|
12855
12920
|
preserveEditingScopeOnSelectionClearRef.current = false;
|
|
12856
12921
|
}
|
|
12857
|
-
fabricCanvas.__activeEditingGroupId =
|
|
12922
|
+
fabricCanvas.__activeEditingGroupId = drillGroup.id;
|
|
12858
12923
|
delete effectiveTarget.__pixldocsGroupSelection;
|
|
12859
12924
|
delete effectiveTarget.__pixldocsLogicalGroupIds;
|
|
12860
12925
|
try {
|
|
@@ -12866,6 +12931,13 @@ const PageCanvas = forwardRef(
|
|
|
12866
12931
|
fabricCanvas._target = effectiveTarget;
|
|
12867
12932
|
opt.target = effectiveTarget;
|
|
12868
12933
|
pendingGroupPromotionRef.current = null;
|
|
12934
|
+
pendingGroupDrillInRef.current = { groupId: drillGroup.id, childId: effectiveTargetId, target: effectiveTarget };
|
|
12935
|
+
effectiveTarget.selected = false;
|
|
12936
|
+
effectiveTarget.__lastSelected = false;
|
|
12937
|
+
effectiveTarget.__corner = void 0;
|
|
12938
|
+
selectElements([effectiveTargetId], false, false);
|
|
12939
|
+
updateDrilledGroupOutline();
|
|
12940
|
+
fabricCanvas.requestRenderAll();
|
|
12869
12941
|
}
|
|
12870
12942
|
} else if (!target || targetId === "__background__") {
|
|
12871
12943
|
const isMultiSelectKey = !!(((_k = opt.e) == null ? void 0 : _k.shiftKey) || ((_l = opt.e) == null ? void 0 : _l.metaKey) || ((_m = opt.e) == null ? void 0 : _m.ctrlKey));
|
|
@@ -12892,6 +12964,7 @@ const PageCanvas = forwardRef(
|
|
|
12892
12964
|
fabricCanvas._target = selection;
|
|
12893
12965
|
opt.target = selection;
|
|
12894
12966
|
pendingGroupPromotionRef.current = { groupId: parent.id, selection };
|
|
12967
|
+
pendingGroupDrillInRef.current = null;
|
|
12895
12968
|
} else if (memberObjs.length === 1) {
|
|
12896
12969
|
const only = memberObjs[0];
|
|
12897
12970
|
only.__pixldocsGroupSelection = parent.id;
|
|
@@ -12899,6 +12972,7 @@ const PageCanvas = forwardRef(
|
|
|
12899
12972
|
fabricCanvas._target = only;
|
|
12900
12973
|
opt.target = only;
|
|
12901
12974
|
pendingGroupPromotionRef.current = { groupId: parent.id, selection: only };
|
|
12975
|
+
pendingGroupDrillInRef.current = null;
|
|
12902
12976
|
}
|
|
12903
12977
|
}
|
|
12904
12978
|
}
|
|
@@ -13008,7 +13082,7 @@ const PageCanvas = forwardRef(
|
|
|
13008
13082
|
o.__lockScaleDuringCrop = false;
|
|
13009
13083
|
});
|
|
13010
13084
|
fabricCanvas.on("mouse:up", (e) => {
|
|
13011
|
-
var _a2;
|
|
13085
|
+
var _a2, _b2, _c;
|
|
13012
13086
|
clearTransforming();
|
|
13013
13087
|
setGuides([]);
|
|
13014
13088
|
setRotationLabel(null);
|
|
@@ -13016,6 +13090,33 @@ const PageCanvas = forwardRef(
|
|
|
13016
13090
|
objectResizeActiveSnapRef.current = null;
|
|
13017
13091
|
groupResizeActiveSnapRef.current = null;
|
|
13018
13092
|
dragStarted = false;
|
|
13093
|
+
const pendingDrillIn = pendingGroupDrillInRef.current;
|
|
13094
|
+
pendingGroupDrillInRef.current = null;
|
|
13095
|
+
if (pendingDrillIn && !didTransformRef.current) {
|
|
13096
|
+
const activeNow = fabricCanvas.getActiveObject();
|
|
13097
|
+
if (activeNow !== pendingDrillIn.target) {
|
|
13098
|
+
isSyncingSelectionToFabricRef.current = true;
|
|
13099
|
+
try {
|
|
13100
|
+
restoreSuppressedGroupBorders();
|
|
13101
|
+
fabricCanvas.__activeEditingGroupId = pendingDrillIn.groupId;
|
|
13102
|
+
delete pendingDrillIn.target.__pixldocsGroupSelection;
|
|
13103
|
+
delete pendingDrillIn.target.__pixldocsLogicalGroupIds;
|
|
13104
|
+
(_b2 = (_a2 = pendingDrillIn.target).set) == null ? void 0 : _b2.call(_a2, { selectable: true, evented: true, hasBorders: true, hasControls: true });
|
|
13105
|
+
fabricCanvas.setActiveObject(pendingDrillIn.target);
|
|
13106
|
+
pendingDrillIn.target.setCoords();
|
|
13107
|
+
pendingDrillIn.target.selected = false;
|
|
13108
|
+
pendingDrillIn.target.__lastSelected = false;
|
|
13109
|
+
pendingDrillIn.target.__corner = void 0;
|
|
13110
|
+
fabricCanvas.requestRenderAll();
|
|
13111
|
+
} finally {
|
|
13112
|
+
requestAnimationFrame(() => {
|
|
13113
|
+
isSyncingSelectionToFabricRef.current = false;
|
|
13114
|
+
});
|
|
13115
|
+
}
|
|
13116
|
+
selectElements([pendingDrillIn.childId], false, false);
|
|
13117
|
+
updateDrilledGroupOutline();
|
|
13118
|
+
}
|
|
13119
|
+
}
|
|
13019
13120
|
const pendingPromotion = pendingGroupPromotionRef.current;
|
|
13020
13121
|
pendingGroupPromotionRef.current = null;
|
|
13021
13122
|
if (pendingPromotion && !didTransformRef.current) {
|
|
@@ -13049,7 +13150,7 @@ const PageCanvas = forwardRef(
|
|
|
13049
13150
|
}
|
|
13050
13151
|
}
|
|
13051
13152
|
const activeObj = fabricCanvas.getActiveObject();
|
|
13052
|
-
if (activeObj && (activeObj.__cropGroup || ((
|
|
13153
|
+
if (activeObj && (activeObj.__cropGroup || ((_c = activeObj._ct) == null ? void 0 : _c.isCropGroup))) {
|
|
13053
13154
|
activeObj.__lockScaleDuringCrop = false;
|
|
13054
13155
|
if (activeObj.__cropDrag) {
|
|
13055
13156
|
delete activeObj.__cropDrag;
|
|
@@ -17142,6 +17243,28 @@ const PageCanvas = forwardRef(
|
|
|
17142
17243
|
)
|
|
17143
17244
|
}
|
|
17144
17245
|
),
|
|
17246
|
+
drilledGroupBounds && /* @__PURE__ */ jsx(
|
|
17247
|
+
"svg",
|
|
17248
|
+
{
|
|
17249
|
+
className: "absolute inset-0 pointer-events-none",
|
|
17250
|
+
style: { width: scaledWidth, height: scaledHeight },
|
|
17251
|
+
viewBox: `0 0 ${canvasWidth} ${canvasHeight}`,
|
|
17252
|
+
children: /* @__PURE__ */ jsx(
|
|
17253
|
+
"rect",
|
|
17254
|
+
{
|
|
17255
|
+
x: drilledGroupBounds.left,
|
|
17256
|
+
y: drilledGroupBounds.top,
|
|
17257
|
+
width: drilledGroupBounds.width,
|
|
17258
|
+
height: drilledGroupBounds.height,
|
|
17259
|
+
fill: "none",
|
|
17260
|
+
stroke: "rgba(100, 116, 139, 0.7)",
|
|
17261
|
+
strokeWidth: 1,
|
|
17262
|
+
strokeDasharray: "4 4",
|
|
17263
|
+
vectorEffect: "non-scaling-stroke"
|
|
17264
|
+
}
|
|
17265
|
+
)
|
|
17266
|
+
}
|
|
17267
|
+
),
|
|
17145
17268
|
canvas.projectSettings.showGrid && (() => {
|
|
17146
17269
|
const ps = canvas.projectSettings;
|
|
17147
17270
|
const gx = Math.max(1, ps.gridSizeX ?? ps.gridSize ?? 0);
|
|
@@ -23253,9 +23376,9 @@ function captureFabricCanvasSvgForPdf(fabricInstance, canvasWidth, canvasHeight)
|
|
|
23253
23376
|
}
|
|
23254
23377
|
return svgString;
|
|
23255
23378
|
}
|
|
23256
|
-
const resolvedPackageVersion = "0.5.
|
|
23379
|
+
const resolvedPackageVersion = "0.5.245";
|
|
23257
23380
|
const PACKAGE_VERSION = resolvedPackageVersion;
|
|
23258
|
-
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.
|
|
23381
|
+
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.245";
|
|
23259
23382
|
const roundParityValue = (value) => {
|
|
23260
23383
|
if (typeof value !== "number") return value;
|
|
23261
23384
|
return Number.isFinite(value) ? Number(value.toFixed(3)) : value;
|
|
@@ -24069,7 +24192,7 @@ class PixldocsRenderer {
|
|
|
24069
24192
|
await this.waitForCanvasScene(container, cloned, i);
|
|
24070
24193
|
}
|
|
24071
24194
|
console.log(`[canvas-renderer][pdf-unified] mounted ${cloned.pages.length} page(s), handing off to client exportMultiPagePdf`);
|
|
24072
|
-
const { exportMultiPagePdf, preparePagesForExport } = await import("./vectorPdfExport-
|
|
24195
|
+
const { exportMultiPagePdf, preparePagesForExport } = await import("./vectorPdfExport-qzZ0kZCI.js");
|
|
24073
24196
|
const prepared = preparePagesForExport(
|
|
24074
24197
|
cloned.pages,
|
|
24075
24198
|
canvasWidth,
|
|
@@ -26389,7 +26512,7 @@ async function prepareLiveCanvasSvgForPdf(rawSvg, pageWidth, pageHeight, pageKey
|
|
|
26389
26512
|
if (options == null ? void 0 : options.stripPageBackground) stripRootPageBackgroundFromSvg(svgToDraw);
|
|
26390
26513
|
sanitizeSvgTreeForPdf(svgToDraw);
|
|
26391
26514
|
try {
|
|
26392
|
-
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await import("./vectorPdfExport-
|
|
26515
|
+
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await import("./vectorPdfExport-qzZ0kZCI.js");
|
|
26393
26516
|
try {
|
|
26394
26517
|
await logTextMeasurementDiagnostic(svgToDraw);
|
|
26395
26518
|
} catch {
|
|
@@ -26789,4 +26912,4 @@ export {
|
|
|
26789
26912
|
buildTeaserBlurFlatKeys as y,
|
|
26790
26913
|
collectFontDescriptorsFromConfig as z
|
|
26791
26914
|
};
|
|
26792
|
-
//# sourceMappingURL=index-
|
|
26915
|
+
//# sourceMappingURL=index-FE8QLDiA.js.map
|