@pixldocs/canvas-renderer 0.5.316 → 0.5.318
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-CnPI9yBL.cjs → index-CjYAXB7l.cjs} +24 -19
- package/dist/index-CjYAXB7l.cjs.map +1 -0
- package/dist/{index-D23LGkaT.js → index-CjatPuQ6.js} +24 -19
- package/dist/index-CjatPuQ6.js.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/{vectorPdfExport-DR523IAy.js → vectorPdfExport-56Aw1H7k.js} +4 -4
- package/dist/{vectorPdfExport-DR523IAy.js.map → vectorPdfExport-56Aw1H7k.js.map} +1 -1
- package/dist/{vectorPdfExport-CFD-x_MA.cjs → vectorPdfExport-DM_wkrZm.cjs} +4 -4
- package/dist/{vectorPdfExport-CFD-x_MA.cjs.map → vectorPdfExport-DM_wkrZm.cjs.map} +1 -1
- package/package.json +1 -1
- package/dist/index-CnPI9yBL.cjs.map +0 -1
- package/dist/index-D23LGkaT.js.map +0 -1
|
@@ -13570,17 +13570,21 @@ const PageCanvas = forwardRef(
|
|
|
13570
13570
|
fabricCanvas.on("selection:cleared", () => {
|
|
13571
13571
|
});
|
|
13572
13572
|
fabricCanvas.on("object:scaling", (e) => {
|
|
13573
|
-
var _a2, _b2, _c, _d, _e, _f, _g;
|
|
13573
|
+
var _a2, _b2, _c, _d, _e, _f, _g, _h;
|
|
13574
13574
|
if (!isActiveRef.current) return;
|
|
13575
13575
|
const t = e.target;
|
|
13576
13576
|
if (t) lastResizeScaleTargetRef.current = t;
|
|
13577
13577
|
try {
|
|
13578
|
-
|
|
13579
|
-
|
|
13580
|
-
|
|
13581
|
-
|
|
13582
|
-
|
|
13583
|
-
|
|
13578
|
+
const isNativeGroup = t instanceof fabric.Group && !(t instanceof fabric.ActiveSelection) && !t.__docuforgeSectionGroup && !t.__cropGroup && !((_a2 = t._ct) == null ? void 0 : _a2.isCropGroup) && !t.__smartController;
|
|
13579
|
+
if (t instanceof fabric.ActiveSelection || isNativeGroup) {
|
|
13580
|
+
const isRotated = !!t.__pixldocsMixedRotation || Math.abs(((t.angle ?? 0) % 360 + 360) % 360) > 0.5;
|
|
13581
|
+
if (isRotated) {
|
|
13582
|
+
const corner2 = (_b2 = e.transform) == null ? void 0 : _b2.corner;
|
|
13583
|
+
if (corner2 === "ml" || corner2 === "mr") {
|
|
13584
|
+
t.scaleY = t.scaleX;
|
|
13585
|
+
} else if (corner2 === "mt" || corner2 === "mb") {
|
|
13586
|
+
t.scaleX = t.scaleY;
|
|
13587
|
+
}
|
|
13584
13588
|
}
|
|
13585
13589
|
}
|
|
13586
13590
|
} catch {
|
|
@@ -13748,23 +13752,24 @@ const PageCanvas = forwardRef(
|
|
|
13748
13752
|
time: Math.round(performance.now()),
|
|
13749
13753
|
corner,
|
|
13750
13754
|
groupSelectionId: obj.__pixldocsGroupSelection,
|
|
13751
|
-
currentTransformAction: (
|
|
13755
|
+
currentTransformAction: (_c = fabricCanvas._currentTransform) == null ? void 0 : _c.action,
|
|
13752
13756
|
selection: summarizeFabricObjectForResizeDebug(obj),
|
|
13753
13757
|
textChildren: obj.getObjects().filter((child) => child instanceof fabric.Textbox).map((child) => summarizeFabricObjectForResizeDebug(child))
|
|
13754
13758
|
};
|
|
13755
13759
|
}
|
|
13756
13760
|
}
|
|
13757
|
-
|
|
13761
|
+
const _asRotatedForReflow = obj instanceof fabric.ActiveSelection && (!!obj.__pixldocsMixedRotation || Math.abs(((obj.angle ?? 0) % 360 + 360) % 360) > 0.5);
|
|
13762
|
+
if (obj instanceof fabric.ActiveSelection && !_asRotatedForReflow && (corner === "ml" || corner === "mr" || corner === "mt" || corner === "mb")) {
|
|
13758
13763
|
const isXSide = corner === "ml" || corner === "mr";
|
|
13759
13764
|
const sAxis = isXSide ? Math.abs(obj.scaleX ?? 1) : Math.abs(obj.scaleY ?? 1);
|
|
13760
13765
|
if (sAxis > 1e-3) {
|
|
13761
|
-
if (isXSide && ((
|
|
13766
|
+
if (isXSide && ((_d = groupShiftReflowSnapshotRef.current) == null ? void 0 : _d.selection) !== obj) {
|
|
13762
13767
|
groupShiftReflowSnapshotRef.current = null;
|
|
13763
13768
|
const logicalGroupId = obj.__pixldocsGroupSelection;
|
|
13764
13769
|
if (logicalGroupId) {
|
|
13765
13770
|
try {
|
|
13766
13771
|
const state = useEditorStore.getState();
|
|
13767
|
-
const pageChildren2 = ((
|
|
13772
|
+
const pageChildren2 = ((_e = state.canvas.pages.find((p) => p.id === pageId)) == null ? void 0 : _e.children) ?? [];
|
|
13768
13773
|
const groupNode = findNodeById(pageChildren2, logicalGroupId);
|
|
13769
13774
|
if (groupNode && isGroup(groupNode) && !isStackLayoutMode(groupNode.layoutMode)) {
|
|
13770
13775
|
const entries = obj.getObjects().map((c) => ({
|
|
@@ -13794,7 +13799,7 @@ const PageCanvas = forwardRef(
|
|
|
13794
13799
|
const asRect0 = obj.getBoundingRect();
|
|
13795
13800
|
let didReflowTextChild = false;
|
|
13796
13801
|
for (const child of obj.getObjects()) {
|
|
13797
|
-
if (child instanceof fabric.Group && (child.__cropGroup || ((
|
|
13802
|
+
if (child instanceof fabric.Group && (child.__cropGroup || ((_f = child._ct) == null ? void 0 : _f.isCropGroup))) {
|
|
13798
13803
|
const ct = child.__cropData;
|
|
13799
13804
|
if (!ct) continue;
|
|
13800
13805
|
if (isXSide) {
|
|
@@ -13899,7 +13904,7 @@ const PageCanvas = forwardRef(
|
|
|
13899
13904
|
didReflowTextChild = true;
|
|
13900
13905
|
}
|
|
13901
13906
|
}
|
|
13902
|
-
if (isXSide && ((
|
|
13907
|
+
if (isXSide && ((_g = groupShiftReflowSnapshotRef.current) == null ? void 0 : _g.selection) === obj) {
|
|
13903
13908
|
const snap = groupShiftReflowSnapshotRef.current;
|
|
13904
13909
|
const anchorEntry = snap.children[0];
|
|
13905
13910
|
const anchorTopLive = anchorEntry.obj.top ?? 0;
|
|
@@ -14055,7 +14060,7 @@ const PageCanvas = forwardRef(
|
|
|
14055
14060
|
setGuides(gridGuidesForScale.length ? [...scaleGuides, ...gridGuidesForScale] : scaleGuides);
|
|
14056
14061
|
if (drilledGroupIdRef.current) {
|
|
14057
14062
|
try {
|
|
14058
|
-
(
|
|
14063
|
+
(_h = fabricCanvas.__updateDrilledGroupOutline) == null ? void 0 : _h.call(fabricCanvas);
|
|
14059
14064
|
} catch {
|
|
14060
14065
|
}
|
|
14061
14066
|
}
|
|
@@ -24285,9 +24290,9 @@ function captureFabricCanvasSvgForPdf(fabricInstance, canvasWidth, canvasHeight)
|
|
|
24285
24290
|
}
|
|
24286
24291
|
return svgString;
|
|
24287
24292
|
}
|
|
24288
|
-
const resolvedPackageVersion = "0.5.
|
|
24293
|
+
const resolvedPackageVersion = "0.5.318";
|
|
24289
24294
|
const PACKAGE_VERSION = resolvedPackageVersion;
|
|
24290
|
-
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.
|
|
24295
|
+
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.318";
|
|
24291
24296
|
const roundParityValue = (value) => {
|
|
24292
24297
|
if (typeof value !== "number") return value;
|
|
24293
24298
|
return Number.isFinite(value) ? Number(value.toFixed(3)) : value;
|
|
@@ -25101,7 +25106,7 @@ class PixldocsRenderer {
|
|
|
25101
25106
|
await this.waitForCanvasScene(container, cloned, i);
|
|
25102
25107
|
}
|
|
25103
25108
|
console.log(`[canvas-renderer][pdf-unified] mounted ${cloned.pages.length} page(s), handing off to client exportMultiPagePdf`);
|
|
25104
|
-
const { exportMultiPagePdf, preparePagesForExport } = await import("./vectorPdfExport-
|
|
25109
|
+
const { exportMultiPagePdf, preparePagesForExport } = await import("./vectorPdfExport-56Aw1H7k.js");
|
|
25105
25110
|
const prepared = preparePagesForExport(
|
|
25106
25111
|
cloned.pages,
|
|
25107
25112
|
canvasWidth,
|
|
@@ -27421,7 +27426,7 @@ async function prepareLiveCanvasSvgForPdf(rawSvg, pageWidth, pageHeight, pageKey
|
|
|
27421
27426
|
if (options == null ? void 0 : options.stripPageBackground) stripRootPageBackgroundFromSvg(svgToDraw);
|
|
27422
27427
|
sanitizeSvgTreeForPdf(svgToDraw);
|
|
27423
27428
|
try {
|
|
27424
|
-
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await import("./vectorPdfExport-
|
|
27429
|
+
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await import("./vectorPdfExport-56Aw1H7k.js");
|
|
27425
27430
|
try {
|
|
27426
27431
|
await logTextMeasurementDiagnostic(svgToDraw);
|
|
27427
27432
|
} catch {
|
|
@@ -27821,4 +27826,4 @@ export {
|
|
|
27821
27826
|
buildTeaserBlurFlatKeys as y,
|
|
27822
27827
|
collectFontDescriptorsFromConfig as z
|
|
27823
27828
|
};
|
|
27824
|
-
//# sourceMappingURL=index-
|
|
27829
|
+
//# sourceMappingURL=index-CjatPuQ6.js.map
|