@pixldocs/canvas-renderer 0.5.433 → 0.5.435
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-Dl-ilqW_.cjs → index-B5NWvDlD.cjs} +42 -6
- package/dist/index-B5NWvDlD.cjs.map +1 -0
- package/dist/{index-XUxKXZ1L.js → index-BtkdFbJD.js} +42 -6
- package/dist/index-BtkdFbJD.js.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/{vectorPdfExport-BXdCe5ek.cjs → vectorPdfExport-BXT74Jwl.cjs} +4 -4
- package/dist/{vectorPdfExport-BXdCe5ek.cjs.map → vectorPdfExport-BXT74Jwl.cjs.map} +1 -1
- package/dist/{vectorPdfExport-6d2YhE8F.js → vectorPdfExport-DaUbsdKS.js} +4 -4
- package/dist/{vectorPdfExport-6d2YhE8F.js.map → vectorPdfExport-DaUbsdKS.js.map} +1 -1
- package/package.json +1 -1
- package/dist/index-Dl-ilqW_.cjs.map +0 -1
- package/dist/index-XUxKXZ1L.js.map +0 -1
|
@@ -14054,7 +14054,7 @@ const PageCanvas = react.forwardRef(
|
|
|
14054
14054
|
};
|
|
14055
14055
|
fabricCanvas.__updateDrilledGroupOutline = updateDrilledGroupOutline;
|
|
14056
14056
|
fabricCanvas.on("mouse:down:before", (opt) => {
|
|
14057
|
-
var _a2, _b2, _c2, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m;
|
|
14057
|
+
var _a2, _b2, _c2, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o;
|
|
14058
14058
|
const activeBeforeMouseDown = fabricCanvas.getActiveObject();
|
|
14059
14059
|
if (editLockRef.current) {
|
|
14060
14060
|
const active = fabricCanvas.getActiveObject();
|
|
@@ -14180,6 +14180,17 @@ const PageCanvas = react.forwardRef(
|
|
|
14180
14180
|
const isMultiSelectKey = !!(((_j = opt.e) == null ? void 0 : _j.shiftKey) || ((_k = opt.e) == null ? void 0 : _k.metaKey) || ((_l = opt.e) == null ? void 0 : _l.ctrlKey));
|
|
14181
14181
|
if (isMultiSelectKey) return;
|
|
14182
14182
|
if ((_m = opt.e) == null ? void 0 : _m.altKey) return;
|
|
14183
|
+
try {
|
|
14184
|
+
const activeForCornerCheck = fabricCanvas.getActiveObject();
|
|
14185
|
+
if (activeForCornerCheck) {
|
|
14186
|
+
const ptrForCorner = fabricCanvas.getPointer(opt.e);
|
|
14187
|
+
const cornerHit = ((_n = activeForCornerCheck.findControl) == null ? void 0 : _n.call(activeForCornerCheck, ptrForCorner)) || ((_o = activeForCornerCheck._findTargetCorner) == null ? void 0 : _o.call(activeForCornerCheck, ptrForCorner));
|
|
14188
|
+
if (cornerHit) {
|
|
14189
|
+
return;
|
|
14190
|
+
}
|
|
14191
|
+
}
|
|
14192
|
+
} catch {
|
|
14193
|
+
}
|
|
14183
14194
|
try {
|
|
14184
14195
|
const pointer = fabricCanvas.getPointer(opt.e);
|
|
14185
14196
|
const px = pointer.x;
|
|
@@ -14369,6 +14380,31 @@ const PageCanvas = react.forwardRef(
|
|
|
14369
14380
|
if (!o) return;
|
|
14370
14381
|
o.__lockScaleDuringCrop = false;
|
|
14371
14382
|
});
|
|
14383
|
+
fabricCanvas.on("mouse:down", () => {
|
|
14384
|
+
const pending = pendingGroupPromotionRef.current;
|
|
14385
|
+
if (!pending) return;
|
|
14386
|
+
const activeNow = fabricCanvas.getActiveObject();
|
|
14387
|
+
if (activeNow === pending.selection) return;
|
|
14388
|
+
isSyncingSelectionToFabricRef.current = true;
|
|
14389
|
+
try {
|
|
14390
|
+
fabricCanvas.setActiveObject(pending.selection);
|
|
14391
|
+
pending.selection.setCoords();
|
|
14392
|
+
fabricCanvas._target = pending.selection;
|
|
14393
|
+
if (pending.selection instanceof fabric__namespace.ActiveSelection) {
|
|
14394
|
+
restoreGroupSelectionVisualState(pending.selection, pending.groupId);
|
|
14395
|
+
pending.selection.hasBorders = true;
|
|
14396
|
+
applyWarpAwareSelectionBorders(pending.selection);
|
|
14397
|
+
} else {
|
|
14398
|
+
pending.selection.__pixldocsGroupSelection = pending.groupId;
|
|
14399
|
+
}
|
|
14400
|
+
fabricCanvas.requestRenderAll();
|
|
14401
|
+
} catch {
|
|
14402
|
+
} finally {
|
|
14403
|
+
requestAnimationFrame(() => {
|
|
14404
|
+
isSyncingSelectionToFabricRef.current = false;
|
|
14405
|
+
});
|
|
14406
|
+
}
|
|
14407
|
+
});
|
|
14372
14408
|
fabricCanvas.on("mouse:up", (e) => {
|
|
14373
14409
|
var _a2, _b2, _c2;
|
|
14374
14410
|
clearTransforming();
|
|
@@ -25810,9 +25846,9 @@ function captureFabricCanvasSvgForPdf(fabricInstance, canvasWidth, canvasHeight)
|
|
|
25810
25846
|
}
|
|
25811
25847
|
return svgString;
|
|
25812
25848
|
}
|
|
25813
|
-
const resolvedPackageVersion = "0.5.
|
|
25849
|
+
const resolvedPackageVersion = "0.5.435";
|
|
25814
25850
|
const PACKAGE_VERSION = resolvedPackageVersion;
|
|
25815
|
-
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.
|
|
25851
|
+
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.435";
|
|
25816
25852
|
const roundParityValue = (value) => {
|
|
25817
25853
|
if (typeof value !== "number") return value;
|
|
25818
25854
|
return Number.isFinite(value) ? Number(value.toFixed(3)) : value;
|
|
@@ -26626,7 +26662,7 @@ class PixldocsRenderer {
|
|
|
26626
26662
|
await this.waitForCanvasScene(container, cloned, i);
|
|
26627
26663
|
}
|
|
26628
26664
|
console.log(`[canvas-renderer][pdf-unified] mounted ${cloned.pages.length} page(s), handing off to client exportMultiPagePdf`);
|
|
26629
|
-
const { exportMultiPagePdf, preparePagesForExport } = await Promise.resolve().then(() => require("./vectorPdfExport-
|
|
26665
|
+
const { exportMultiPagePdf, preparePagesForExport } = await Promise.resolve().then(() => require("./vectorPdfExport-BXT74Jwl.cjs"));
|
|
26630
26666
|
const prepared = preparePagesForExport(
|
|
26631
26667
|
cloned.pages,
|
|
26632
26668
|
canvasWidth,
|
|
@@ -28946,7 +28982,7 @@ async function prepareLiveCanvasSvgForPdf(rawSvg, pageWidth, pageHeight, pageKey
|
|
|
28946
28982
|
if (options == null ? void 0 : options.stripPageBackground) stripRootPageBackgroundFromSvg(svgToDraw);
|
|
28947
28983
|
sanitizeSvgTreeForPdf(svgToDraw);
|
|
28948
28984
|
try {
|
|
28949
|
-
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await Promise.resolve().then(() => require("./vectorPdfExport-
|
|
28985
|
+
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await Promise.resolve().then(() => require("./vectorPdfExport-BXT74Jwl.cjs"));
|
|
28950
28986
|
try {
|
|
28951
28987
|
await logTextMeasurementDiagnostic(svgToDraw);
|
|
28952
28988
|
} catch {
|
|
@@ -29343,4 +29379,4 @@ exports.setAutoShrinkDebug = setAutoShrinkDebug;
|
|
|
29343
29379
|
exports.setBundledAssetPrefixes = setBundledAssetPrefixes;
|
|
29344
29380
|
exports.warmResolvedTemplateForPreview = warmResolvedTemplateForPreview;
|
|
29345
29381
|
exports.warmTemplateFromForm = warmTemplateFromForm;
|
|
29346
|
-
//# sourceMappingURL=index-
|
|
29382
|
+
//# sourceMappingURL=index-B5NWvDlD.cjs.map
|