@pixldocs/canvas-renderer 0.5.379 → 0.5.381
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-DQaiAXYK.js → index-BR48GoFH.js} +35 -10
- package/dist/index-BR48GoFH.js.map +1 -0
- package/dist/{index-D_l8rDHU.cjs → index-Cm_jngwB.cjs} +35 -10
- package/dist/index-Cm_jngwB.cjs.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/{vectorPdfExport-CzLwUclq.js → vectorPdfExport-OXbQZXtd.js} +4 -4
- package/dist/{vectorPdfExport-CzLwUclq.js.map → vectorPdfExport-OXbQZXtd.js.map} +1 -1
- package/dist/{vectorPdfExport-C1UzGCn0.cjs → vectorPdfExport-VKrjfN4n.cjs} +4 -4
- package/dist/{vectorPdfExport-C1UzGCn0.cjs.map → vectorPdfExport-VKrjfN4n.cjs.map} +1 -1
- package/package.json +1 -1
- package/dist/index-DQaiAXYK.js.map +0 -1
- package/dist/index-D_l8rDHU.cjs.map +0 -1
|
@@ -11091,16 +11091,29 @@ try {
|
|
|
11091
11091
|
};
|
|
11092
11092
|
CanvasProto.__pixldocsCanvaSetCursorVersion = 1;
|
|
11093
11093
|
}
|
|
11094
|
-
if (CanvasProto && typeof CanvasProto._setCursorFromEvent === "function" && CanvasProto.__pixldocsCanvaCursorEventVersion !==
|
|
11094
|
+
if (CanvasProto && typeof CanvasProto._setCursorFromEvent === "function" && CanvasProto.__pixldocsCanvaCursorEventVersion !== 3) {
|
|
11095
11095
|
const origSet = CanvasProto.__pixldocsOriginalSetCursorFromEvent ?? CanvasProto._setCursorFromEvent;
|
|
11096
11096
|
CanvasProto.__pixldocsOriginalSetCursorFromEvent = origSet;
|
|
11097
11097
|
CanvasProto._setCursorFromEvent = function(e, target) {
|
|
11098
|
+
var _a2, _b2, _c2, _d, _e, _f;
|
|
11098
11099
|
const prev = target && target.__corner;
|
|
11099
11100
|
const res = origSet.call(this, e, target);
|
|
11100
11101
|
const next = target && target.__corner;
|
|
11101
11102
|
try {
|
|
11103
|
+
let cursor = null;
|
|
11102
11104
|
const control = next && (target == null ? void 0 : target.controls) ? target.controls[next] : null;
|
|
11103
|
-
|
|
11105
|
+
cursor = resolveCanvaControlCursor(target, typeof next === "string" ? next : null, control);
|
|
11106
|
+
if (!cursor) {
|
|
11107
|
+
const active = (_a2 = this.getActiveObject) == null ? void 0 : _a2.call(this);
|
|
11108
|
+
const isActiveSelection = active instanceof fabric.ActiveSelection;
|
|
11109
|
+
if (isActiveSelection && active !== target) {
|
|
11110
|
+
const pointer = (_b2 = this.getViewportPoint) == null ? void 0 : _b2.call(this, e);
|
|
11111
|
+
const activeCorner = pointer ? (_c2 = active.findControl) == null ? void 0 : _c2.call(active, pointer) : (_d = active.getActiveControl) == null ? void 0 : _d.call(active);
|
|
11112
|
+
const key = (activeCorner == null ? void 0 : activeCorner.key) ?? ((_f = (_e = active.getActiveControl) == null ? void 0 : _e.call(active)) == null ? void 0 : _f.key);
|
|
11113
|
+
const activeControl = (activeCorner == null ? void 0 : activeCorner.control) ?? (key && active.controls ? active.controls[key] : null);
|
|
11114
|
+
cursor = resolveCanvaControlCursor(active, typeof key === "string" ? key : null, activeControl);
|
|
11115
|
+
}
|
|
11116
|
+
}
|
|
11104
11117
|
if (cursor) {
|
|
11105
11118
|
if (typeof this.setCursor === "function") this.setCursor(cursor);
|
|
11106
11119
|
else if (this.upperCanvasEl) this.upperCanvasEl.style.cursor = cursor;
|
|
@@ -11115,7 +11128,7 @@ try {
|
|
|
11115
11128
|
}
|
|
11116
11129
|
return res;
|
|
11117
11130
|
};
|
|
11118
|
-
CanvasProto.__pixldocsCanvaCursorEventVersion =
|
|
11131
|
+
CanvasProto.__pixldocsCanvaCursorEventVersion = 3;
|
|
11119
11132
|
}
|
|
11120
11133
|
}
|
|
11121
11134
|
} catch (e) {
|
|
@@ -11720,13 +11733,17 @@ const PageCanvas = forwardRef(
|
|
|
11720
11733
|
const sameMembers = activeMembers.length === members.length && members.every((member) => activeMembers.includes(member));
|
|
11721
11734
|
const sameGroup = activeBeforeRestore.__pixldocsGroupSelection === groupId;
|
|
11722
11735
|
const alreadyAligned = activeBeforeRestore.__pixldocsAlignedAngle != null;
|
|
11723
|
-
if (sameMembers && sameGroup && alreadyAligned)
|
|
11736
|
+
if (sameMembers && sameGroup && alreadyAligned) {
|
|
11737
|
+
ensureCanvaControlRenders(activeBeforeRestore);
|
|
11738
|
+
return;
|
|
11739
|
+
}
|
|
11724
11740
|
}
|
|
11725
11741
|
isSyncingSelectionToFabricRef.current = true;
|
|
11726
11742
|
try {
|
|
11727
11743
|
const active = activeBeforeRestore;
|
|
11728
11744
|
const selection = active instanceof fabric.ActiveSelection && members.every((member) => active.getObjects().includes(member)) ? active : new fabric.ActiveSelection(members, { canvas: fc });
|
|
11729
11745
|
applyLogicalGroupSelectionVisualState(selection, groupId);
|
|
11746
|
+
ensureCanvaControlRenders(selection);
|
|
11730
11747
|
fc.setActiveObject(selection);
|
|
11731
11748
|
try {
|
|
11732
11749
|
members.forEach((m) => m.setCoords());
|
|
@@ -13350,7 +13367,10 @@ const PageCanvas = forwardRef(
|
|
|
13350
13367
|
const sameMembers = activeIds.length === snapshot.memberIds.length && snapshot.memberIds.every((id) => activeIds.includes(id));
|
|
13351
13368
|
const sameGroup = active.__pixldocsGroupSelection === snapshot.groupSelectionId;
|
|
13352
13369
|
const alreadyAligned = active.__pixldocsAlignedAngle != null;
|
|
13353
|
-
if (sameMembers && sameGroup && alreadyAligned)
|
|
13370
|
+
if (sameMembers && sameGroup && alreadyAligned) {
|
|
13371
|
+
ensureCanvaControlRenders(active);
|
|
13372
|
+
return;
|
|
13373
|
+
}
|
|
13354
13374
|
}
|
|
13355
13375
|
restoreGroupSelectionSnapshot(snapshot);
|
|
13356
13376
|
}, 0);
|
|
@@ -16076,6 +16096,10 @@ const PageCanvas = forwardRef(
|
|
|
16076
16096
|
const sameMembers = !!prevAS && prevMembers.length === freshMembers.length && prevMembers.every((m) => freshMembers.includes(m));
|
|
16077
16097
|
const alreadyAligned = sameMembers && prevAS.__pixldocsAlignedAngle != null;
|
|
16078
16098
|
if (sameMembers && alreadyAligned) {
|
|
16099
|
+
try {
|
|
16100
|
+
ensureCanvaControlRenders(prevAS);
|
|
16101
|
+
} catch {
|
|
16102
|
+
}
|
|
16079
16103
|
fc.setActiveObject(prevAS);
|
|
16080
16104
|
prevAS.setCoords();
|
|
16081
16105
|
fc.requestRenderAll();
|
|
@@ -17183,6 +17207,7 @@ const PageCanvas = forwardRef(
|
|
|
17183
17207
|
});
|
|
17184
17208
|
if (isPureSingleGroupSelection) applyWarpAwareSelectionBorders(selection);
|
|
17185
17209
|
}
|
|
17210
|
+
ensureCanvaControlRenders(selection);
|
|
17186
17211
|
fc.setActiveObject(selection);
|
|
17187
17212
|
if (!isFlatGroupSelection) {
|
|
17188
17213
|
selection.setCoords();
|
|
@@ -24790,9 +24815,9 @@ function captureFabricCanvasSvgForPdf(fabricInstance, canvasWidth, canvasHeight)
|
|
|
24790
24815
|
}
|
|
24791
24816
|
return svgString;
|
|
24792
24817
|
}
|
|
24793
|
-
const resolvedPackageVersion = "0.5.
|
|
24818
|
+
const resolvedPackageVersion = "0.5.381";
|
|
24794
24819
|
const PACKAGE_VERSION = resolvedPackageVersion;
|
|
24795
|
-
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.
|
|
24820
|
+
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.381";
|
|
24796
24821
|
const roundParityValue = (value) => {
|
|
24797
24822
|
if (typeof value !== "number") return value;
|
|
24798
24823
|
return Number.isFinite(value) ? Number(value.toFixed(3)) : value;
|
|
@@ -25606,7 +25631,7 @@ class PixldocsRenderer {
|
|
|
25606
25631
|
await this.waitForCanvasScene(container, cloned, i);
|
|
25607
25632
|
}
|
|
25608
25633
|
console.log(`[canvas-renderer][pdf-unified] mounted ${cloned.pages.length} page(s), handing off to client exportMultiPagePdf`);
|
|
25609
|
-
const { exportMultiPagePdf, preparePagesForExport } = await import("./vectorPdfExport-
|
|
25634
|
+
const { exportMultiPagePdf, preparePagesForExport } = await import("./vectorPdfExport-OXbQZXtd.js");
|
|
25610
25635
|
const prepared = preparePagesForExport(
|
|
25611
25636
|
cloned.pages,
|
|
25612
25637
|
canvasWidth,
|
|
@@ -27926,7 +27951,7 @@ async function prepareLiveCanvasSvgForPdf(rawSvg, pageWidth, pageHeight, pageKey
|
|
|
27926
27951
|
if (options == null ? void 0 : options.stripPageBackground) stripRootPageBackgroundFromSvg(svgToDraw);
|
|
27927
27952
|
sanitizeSvgTreeForPdf(svgToDraw);
|
|
27928
27953
|
try {
|
|
27929
|
-
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await import("./vectorPdfExport-
|
|
27954
|
+
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await import("./vectorPdfExport-OXbQZXtd.js");
|
|
27930
27955
|
try {
|
|
27931
27956
|
await logTextMeasurementDiagnostic(svgToDraw);
|
|
27932
27957
|
} catch {
|
|
@@ -28326,4 +28351,4 @@ export {
|
|
|
28326
28351
|
buildTeaserBlurFlatKeys as y,
|
|
28327
28352
|
collectFontDescriptorsFromConfig as z
|
|
28328
28353
|
};
|
|
28329
|
-
//# sourceMappingURL=index-
|
|
28354
|
+
//# sourceMappingURL=index-BR48GoFH.js.map
|