@pixldocs/canvas-renderer 0.5.265 → 0.5.266
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-8qmW0_0N.cjs → index-BTlyH7B1.cjs} +43 -13
- package/dist/index-BTlyH7B1.cjs.map +1 -0
- package/dist/{index-CO6jIEmB.js → index-Dno8Fb1D.js} +43 -13
- package/dist/index-Dno8Fb1D.js.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/{vectorPdfExport-ONQJ99LA.js → vectorPdfExport-CO8Kr9ha.js} +4 -4
- package/dist/{vectorPdfExport-ONQJ99LA.js.map → vectorPdfExport-CO8Kr9ha.js.map} +1 -1
- package/dist/{vectorPdfExport-C_SPH6M3.cjs → vectorPdfExport-i1DTwWah.cjs} +4 -4
- package/dist/{vectorPdfExport-C_SPH6M3.cjs.map → vectorPdfExport-i1DTwWah.cjs.map} +1 -1
- package/package.json +1 -1
- package/dist/index-8qmW0_0N.cjs.map +0 -1
- package/dist/index-CO6jIEmB.js.map +0 -1
|
@@ -13020,7 +13020,14 @@ const PageCanvas = react.forwardRef(
|
|
|
13020
13020
|
pendingGroupDrillInRef.current = null;
|
|
13021
13021
|
} else if (drillGroup && !drillGroup.backgroundColor && !targetIsInCrop && alreadyThisGroup && !isMultiSelectKey && effectiveTarget !== activeNow) {
|
|
13022
13022
|
pendingGroupPromotionRef.current = null;
|
|
13023
|
-
|
|
13023
|
+
const pointer = fabricCanvas.getPointer(opt.e);
|
|
13024
|
+
pendingGroupDrillInRef.current = {
|
|
13025
|
+
groupId: drillGroup.id,
|
|
13026
|
+
childId: effectiveTargetId,
|
|
13027
|
+
target: effectiveTarget,
|
|
13028
|
+
startX: pointer.x,
|
|
13029
|
+
startY: pointer.y
|
|
13030
|
+
};
|
|
13024
13031
|
if (effectiveTarget instanceof fabric__namespace.Textbox) {
|
|
13025
13032
|
suppressTextEditForClick(effectiveTarget);
|
|
13026
13033
|
}
|
|
@@ -13167,7 +13174,7 @@ const PageCanvas = react.forwardRef(
|
|
|
13167
13174
|
o.__lockScaleDuringCrop = false;
|
|
13168
13175
|
});
|
|
13169
13176
|
fabricCanvas.on("mouse:up", (e) => {
|
|
13170
|
-
var _a2, _b2, _c;
|
|
13177
|
+
var _a2, _b2, _c, _d;
|
|
13171
13178
|
clearTransforming();
|
|
13172
13179
|
setGuides([]);
|
|
13173
13180
|
setRotationLabel(null);
|
|
@@ -13177,7 +13184,21 @@ const PageCanvas = react.forwardRef(
|
|
|
13177
13184
|
dragStarted = false;
|
|
13178
13185
|
const pendingDrillIn = pendingGroupDrillInRef.current;
|
|
13179
13186
|
pendingGroupDrillInRef.current = null;
|
|
13180
|
-
|
|
13187
|
+
let movedPendingDrillPointer = false;
|
|
13188
|
+
if (pendingDrillIn && pendingDrillIn.startX !== void 0 && pendingDrillIn.startY !== void 0) {
|
|
13189
|
+
try {
|
|
13190
|
+
const pointer = fabricCanvas.getPointer(e == null ? void 0 : e.e);
|
|
13191
|
+
const zoom3 = ((_a2 = fabricCanvas.getZoom) == null ? void 0 : _a2.call(fabricCanvas)) || 1;
|
|
13192
|
+
const dragThreshold = Math.max(2, 4 / zoom3);
|
|
13193
|
+
movedPendingDrillPointer = Math.hypot(pointer.x - pendingDrillIn.startX, pointer.y - pendingDrillIn.startY) > dragThreshold;
|
|
13194
|
+
} catch {
|
|
13195
|
+
movedPendingDrillPointer = false;
|
|
13196
|
+
}
|
|
13197
|
+
}
|
|
13198
|
+
if (movedPendingDrillPointer) {
|
|
13199
|
+
didTransformRef.current = true;
|
|
13200
|
+
}
|
|
13201
|
+
if (pendingDrillIn && (didTransformRef.current || movedPendingDrillPointer)) {
|
|
13181
13202
|
const activeNow = fabricCanvas.getActiveObject();
|
|
13182
13203
|
fabricCanvas.__activeEditingGroupId = null;
|
|
13183
13204
|
setDrilledGroupBounds(null);
|
|
@@ -13207,7 +13228,7 @@ const PageCanvas = react.forwardRef(
|
|
|
13207
13228
|
fabricCanvas.__activeEditingGroupId = pendingDrillIn.groupId;
|
|
13208
13229
|
delete pendingDrillIn.target.__pixldocsGroupSelection;
|
|
13209
13230
|
delete pendingDrillIn.target.__pixldocsLogicalGroupIds;
|
|
13210
|
-
(
|
|
13231
|
+
(_c = (_b2 = pendingDrillIn.target).set) == null ? void 0 : _c.call(_b2, { selectable: true, evented: true, hasBorders: true, hasControls: true });
|
|
13211
13232
|
fabricCanvas.setActiveObject(pendingDrillIn.target);
|
|
13212
13233
|
pendingDrillIn.target.setCoords();
|
|
13213
13234
|
if (pendingDrillIn.target instanceof fabric__namespace.Textbox) {
|
|
@@ -13260,7 +13281,7 @@ const PageCanvas = react.forwardRef(
|
|
|
13260
13281
|
}
|
|
13261
13282
|
}
|
|
13262
13283
|
const activeObj = fabricCanvas.getActiveObject();
|
|
13263
|
-
if (activeObj && (activeObj.__cropGroup || ((
|
|
13284
|
+
if (activeObj && (activeObj.__cropGroup || ((_d = activeObj._ct) == null ? void 0 : _d.isCropGroup))) {
|
|
13264
13285
|
activeObj.__lockScaleDuringCrop = false;
|
|
13265
13286
|
if (activeObj.__cropDrag) {
|
|
13266
13287
|
delete activeObj.__cropDrag;
|
|
@@ -13278,7 +13299,9 @@ const PageCanvas = react.forwardRef(
|
|
|
13278
13299
|
syncLockedRef.current = false;
|
|
13279
13300
|
}, 50);
|
|
13280
13301
|
}
|
|
13281
|
-
|
|
13302
|
+
requestAnimationFrame(() => {
|
|
13303
|
+
didTransformRef.current = false;
|
|
13304
|
+
});
|
|
13282
13305
|
setTimeout(() => {
|
|
13283
13306
|
if (!fabricCanvas._currentTransform) {
|
|
13284
13307
|
editLockRef.current = false;
|
|
@@ -13806,19 +13829,26 @@ const PageCanvas = react.forwardRef(
|
|
|
13806
13829
|
const activeDuringMove = fabricCanvas.getActiveObject();
|
|
13807
13830
|
const movingLogicalGroupId = activeDuringMove instanceof fabric__namespace.ActiveSelection ? activeDuringMove.__pixldocsGroupSelection : void 0;
|
|
13808
13831
|
const pendingMoveDrill = pendingGroupDrillInRef.current;
|
|
13832
|
+
const groupIdToKeep = movingLogicalGroupId ?? (pendingMoveDrill == null ? void 0 : pendingMoveDrill.groupId);
|
|
13809
13833
|
if (movingLogicalGroupId || pendingMoveDrill) {
|
|
13810
|
-
const groupIdToKeep = movingLogicalGroupId ?? (pendingMoveDrill == null ? void 0 : pendingMoveDrill.groupId);
|
|
13811
13834
|
pendingGroupDrillInRef.current = null;
|
|
13812
13835
|
fabricCanvas.__activeEditingGroupId = null;
|
|
13813
13836
|
setDrilledGroupBounds(null);
|
|
13814
13837
|
drilledGroupIdRef.current = null;
|
|
13815
13838
|
if (activeDuringMove instanceof fabric__namespace.ActiveSelection && groupIdToKeep) {
|
|
13816
13839
|
restoreGroupSelectionVisualState(activeDuringMove, groupIdToKeep);
|
|
13840
|
+
const memberIds = activeDuringMove.getObjects().map((obj2) => getObjectId(obj2)).filter((id) => !!id && id !== "__background__");
|
|
13841
|
+
if (memberIds.length > 1) {
|
|
13842
|
+
preserveActiveSelectionAfterTransformRef.current = { memberIds, groupSelectionId: groupIdToKeep, expiresAt: Date.now() + 1200 };
|
|
13843
|
+
}
|
|
13844
|
+
preserveSelectionAfterTransformIdRef.current = groupIdToKeep;
|
|
13817
13845
|
}
|
|
13818
13846
|
}
|
|
13819
13847
|
if (e.target) e.target.__pixldocsDragMoved = true;
|
|
13820
13848
|
const moveTargetId = e.target ? getObjectId(e.target) : null;
|
|
13821
|
-
if (
|
|
13849
|
+
if (groupIdToKeep) {
|
|
13850
|
+
preserveSelectionAfterTransformIdRef.current = groupIdToKeep;
|
|
13851
|
+
} else if (moveTargetId && moveTargetId !== "__background__") {
|
|
13822
13852
|
preserveSelectionAfterTransformIdRef.current = moveTargetId;
|
|
13823
13853
|
}
|
|
13824
13854
|
if (!dragStarted) {
|
|
@@ -23623,9 +23653,9 @@ function captureFabricCanvasSvgForPdf(fabricInstance, canvasWidth, canvasHeight)
|
|
|
23623
23653
|
}
|
|
23624
23654
|
return svgString;
|
|
23625
23655
|
}
|
|
23626
|
-
const resolvedPackageVersion = "0.5.
|
|
23656
|
+
const resolvedPackageVersion = "0.5.266";
|
|
23627
23657
|
const PACKAGE_VERSION = resolvedPackageVersion;
|
|
23628
|
-
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.
|
|
23658
|
+
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.266";
|
|
23629
23659
|
const roundParityValue = (value) => {
|
|
23630
23660
|
if (typeof value !== "number") return value;
|
|
23631
23661
|
return Number.isFinite(value) ? Number(value.toFixed(3)) : value;
|
|
@@ -24439,7 +24469,7 @@ class PixldocsRenderer {
|
|
|
24439
24469
|
await this.waitForCanvasScene(container, cloned, i);
|
|
24440
24470
|
}
|
|
24441
24471
|
console.log(`[canvas-renderer][pdf-unified] mounted ${cloned.pages.length} page(s), handing off to client exportMultiPagePdf`);
|
|
24442
|
-
const { exportMultiPagePdf, preparePagesForExport } = await Promise.resolve().then(() => require("./vectorPdfExport-
|
|
24472
|
+
const { exportMultiPagePdf, preparePagesForExport } = await Promise.resolve().then(() => require("./vectorPdfExport-i1DTwWah.cjs"));
|
|
24443
24473
|
const prepared = preparePagesForExport(
|
|
24444
24474
|
cloned.pages,
|
|
24445
24475
|
canvasWidth,
|
|
@@ -26759,7 +26789,7 @@ async function prepareLiveCanvasSvgForPdf(rawSvg, pageWidth, pageHeight, pageKey
|
|
|
26759
26789
|
if (options == null ? void 0 : options.stripPageBackground) stripRootPageBackgroundFromSvg(svgToDraw);
|
|
26760
26790
|
sanitizeSvgTreeForPdf(svgToDraw);
|
|
26761
26791
|
try {
|
|
26762
|
-
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await Promise.resolve().then(() => require("./vectorPdfExport-
|
|
26792
|
+
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await Promise.resolve().then(() => require("./vectorPdfExport-i1DTwWah.cjs"));
|
|
26763
26793
|
try {
|
|
26764
26794
|
await logTextMeasurementDiagnostic(svgToDraw);
|
|
26765
26795
|
} catch {
|
|
@@ -27156,4 +27186,4 @@ exports.setAutoShrinkDebug = setAutoShrinkDebug;
|
|
|
27156
27186
|
exports.setBundledAssetPrefixes = setBundledAssetPrefixes;
|
|
27157
27187
|
exports.warmResolvedTemplateForPreview = warmResolvedTemplateForPreview;
|
|
27158
27188
|
exports.warmTemplateFromForm = warmTemplateFromForm;
|
|
27159
|
-
//# sourceMappingURL=index-
|
|
27189
|
+
//# sourceMappingURL=index-BTlyH7B1.cjs.map
|