@pixldocs/canvas-renderer 0.5.313 → 0.5.315
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-D8s0AmMC.js → index-BVj3Aj4_.js} +28 -12
- package/dist/index-BVj3Aj4_.js.map +1 -0
- package/dist/{index-DaZy0Hz3.cjs → index-CyM9SvCF.cjs} +28 -12
- package/dist/index-CyM9SvCF.cjs.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/{vectorPdfExport-BPFpKueR.js → vectorPdfExport-BrYF2E8L.js} +4 -4
- package/dist/{vectorPdfExport-BPFpKueR.js.map → vectorPdfExport-BrYF2E8L.js.map} +1 -1
- package/dist/{vectorPdfExport-BdNT5NW8.cjs → vectorPdfExport-Co08KOeq.cjs} +4 -4
- package/dist/{vectorPdfExport-BdNT5NW8.cjs.map → vectorPdfExport-Co08KOeq.cjs.map} +1 -1
- package/package.json +1 -1
- package/dist/index-D8s0AmMC.js.map +0 -1
- package/dist/index-DaZy0Hz3.cjs.map +0 -1
|
@@ -11210,6 +11210,11 @@ function applyWarpAwareSelectionBorders(selection) {
|
|
|
11210
11210
|
selection.setCoords();
|
|
11211
11211
|
selection.dirty = true;
|
|
11212
11212
|
selection.__pixldocsAlignedAngle = first;
|
|
11213
|
+
} else {
|
|
11214
|
+
const anyRotated = worldAngles.some((a) => Math.abs(a) > 0.5);
|
|
11215
|
+
if (anyRotated) {
|
|
11216
|
+
selection.__pixldocsMixedRotation = true;
|
|
11217
|
+
}
|
|
11213
11218
|
}
|
|
11214
11219
|
}
|
|
11215
11220
|
}
|
|
@@ -13554,10 +13559,21 @@ const PageCanvas = forwardRef(
|
|
|
13554
13559
|
fabricCanvas.on("selection:cleared", () => {
|
|
13555
13560
|
});
|
|
13556
13561
|
fabricCanvas.on("object:scaling", (e) => {
|
|
13557
|
-
var _a2, _b2, _c, _d, _e, _f;
|
|
13562
|
+
var _a2, _b2, _c, _d, _e, _f, _g;
|
|
13558
13563
|
if (!isActiveRef.current) return;
|
|
13559
13564
|
const t = e.target;
|
|
13560
13565
|
if (t) lastResizeScaleTargetRef.current = t;
|
|
13566
|
+
try {
|
|
13567
|
+
if (t instanceof fabric.ActiveSelection && t.__pixldocsMixedRotation) {
|
|
13568
|
+
const corner2 = (_a2 = e.transform) == null ? void 0 : _a2.corner;
|
|
13569
|
+
if (corner2 === "ml" || corner2 === "mr") {
|
|
13570
|
+
t.scaleY = t.scaleX;
|
|
13571
|
+
} else if (corner2 === "mt" || corner2 === "mb") {
|
|
13572
|
+
t.scaleX = t.scaleY;
|
|
13573
|
+
}
|
|
13574
|
+
}
|
|
13575
|
+
} catch {
|
|
13576
|
+
}
|
|
13561
13577
|
prepareGroupSelectionTransformStart(t);
|
|
13562
13578
|
markTransforming(t);
|
|
13563
13579
|
didTransformRef.current = true;
|
|
@@ -13721,7 +13737,7 @@ const PageCanvas = forwardRef(
|
|
|
13721
13737
|
time: Math.round(performance.now()),
|
|
13722
13738
|
corner,
|
|
13723
13739
|
groupSelectionId: obj.__pixldocsGroupSelection,
|
|
13724
|
-
currentTransformAction: (
|
|
13740
|
+
currentTransformAction: (_b2 = fabricCanvas._currentTransform) == null ? void 0 : _b2.action,
|
|
13725
13741
|
selection: summarizeFabricObjectForResizeDebug(obj),
|
|
13726
13742
|
textChildren: obj.getObjects().filter((child) => child instanceof fabric.Textbox).map((child) => summarizeFabricObjectForResizeDebug(child))
|
|
13727
13743
|
};
|
|
@@ -13731,13 +13747,13 @@ const PageCanvas = forwardRef(
|
|
|
13731
13747
|
const isXSide = corner === "ml" || corner === "mr";
|
|
13732
13748
|
const sAxis = isXSide ? Math.abs(obj.scaleX ?? 1) : Math.abs(obj.scaleY ?? 1);
|
|
13733
13749
|
if (sAxis > 1e-3) {
|
|
13734
|
-
if (isXSide && ((
|
|
13750
|
+
if (isXSide && ((_c = groupShiftReflowSnapshotRef.current) == null ? void 0 : _c.selection) !== obj) {
|
|
13735
13751
|
groupShiftReflowSnapshotRef.current = null;
|
|
13736
13752
|
const logicalGroupId = obj.__pixldocsGroupSelection;
|
|
13737
13753
|
if (logicalGroupId) {
|
|
13738
13754
|
try {
|
|
13739
13755
|
const state = useEditorStore.getState();
|
|
13740
|
-
const pageChildren2 = ((
|
|
13756
|
+
const pageChildren2 = ((_d = state.canvas.pages.find((p) => p.id === pageId)) == null ? void 0 : _d.children) ?? [];
|
|
13741
13757
|
const groupNode = findNodeById(pageChildren2, logicalGroupId);
|
|
13742
13758
|
if (groupNode && isGroup(groupNode) && !isStackLayoutMode(groupNode.layoutMode)) {
|
|
13743
13759
|
const entries = obj.getObjects().map((c) => ({
|
|
@@ -13767,7 +13783,7 @@ const PageCanvas = forwardRef(
|
|
|
13767
13783
|
const asRect0 = obj.getBoundingRect();
|
|
13768
13784
|
let didReflowTextChild = false;
|
|
13769
13785
|
for (const child of obj.getObjects()) {
|
|
13770
|
-
if (child instanceof fabric.Group && (child.__cropGroup || ((
|
|
13786
|
+
if (child instanceof fabric.Group && (child.__cropGroup || ((_e = child._ct) == null ? void 0 : _e.isCropGroup))) {
|
|
13771
13787
|
const ct = child.__cropData;
|
|
13772
13788
|
if (!ct) continue;
|
|
13773
13789
|
if (isXSide) {
|
|
@@ -13872,7 +13888,7 @@ const PageCanvas = forwardRef(
|
|
|
13872
13888
|
didReflowTextChild = true;
|
|
13873
13889
|
}
|
|
13874
13890
|
}
|
|
13875
|
-
if (isXSide && ((
|
|
13891
|
+
if (isXSide && ((_f = groupShiftReflowSnapshotRef.current) == null ? void 0 : _f.selection) === obj) {
|
|
13876
13892
|
const snap = groupShiftReflowSnapshotRef.current;
|
|
13877
13893
|
const anchorEntry = snap.children[0];
|
|
13878
13894
|
const anchorTopLive = anchorEntry.obj.top ?? 0;
|
|
@@ -14028,7 +14044,7 @@ const PageCanvas = forwardRef(
|
|
|
14028
14044
|
setGuides(gridGuidesForScale.length ? [...scaleGuides, ...gridGuidesForScale] : scaleGuides);
|
|
14029
14045
|
if (drilledGroupIdRef.current) {
|
|
14030
14046
|
try {
|
|
14031
|
-
(
|
|
14047
|
+
(_g = fabricCanvas.__updateDrilledGroupOutline) == null ? void 0 : _g.call(fabricCanvas);
|
|
14032
14048
|
} catch {
|
|
14033
14049
|
}
|
|
14034
14050
|
}
|
|
@@ -24258,9 +24274,9 @@ function captureFabricCanvasSvgForPdf(fabricInstance, canvasWidth, canvasHeight)
|
|
|
24258
24274
|
}
|
|
24259
24275
|
return svgString;
|
|
24260
24276
|
}
|
|
24261
|
-
const resolvedPackageVersion = "0.5.
|
|
24277
|
+
const resolvedPackageVersion = "0.5.315";
|
|
24262
24278
|
const PACKAGE_VERSION = resolvedPackageVersion;
|
|
24263
|
-
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.
|
|
24279
|
+
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.315";
|
|
24264
24280
|
const roundParityValue = (value) => {
|
|
24265
24281
|
if (typeof value !== "number") return value;
|
|
24266
24282
|
return Number.isFinite(value) ? Number(value.toFixed(3)) : value;
|
|
@@ -25074,7 +25090,7 @@ class PixldocsRenderer {
|
|
|
25074
25090
|
await this.waitForCanvasScene(container, cloned, i);
|
|
25075
25091
|
}
|
|
25076
25092
|
console.log(`[canvas-renderer][pdf-unified] mounted ${cloned.pages.length} page(s), handing off to client exportMultiPagePdf`);
|
|
25077
|
-
const { exportMultiPagePdf, preparePagesForExport } = await import("./vectorPdfExport-
|
|
25093
|
+
const { exportMultiPagePdf, preparePagesForExport } = await import("./vectorPdfExport-BrYF2E8L.js");
|
|
25078
25094
|
const prepared = preparePagesForExport(
|
|
25079
25095
|
cloned.pages,
|
|
25080
25096
|
canvasWidth,
|
|
@@ -27394,7 +27410,7 @@ async function prepareLiveCanvasSvgForPdf(rawSvg, pageWidth, pageHeight, pageKey
|
|
|
27394
27410
|
if (options == null ? void 0 : options.stripPageBackground) stripRootPageBackgroundFromSvg(svgToDraw);
|
|
27395
27411
|
sanitizeSvgTreeForPdf(svgToDraw);
|
|
27396
27412
|
try {
|
|
27397
|
-
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await import("./vectorPdfExport-
|
|
27413
|
+
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await import("./vectorPdfExport-BrYF2E8L.js");
|
|
27398
27414
|
try {
|
|
27399
27415
|
await logTextMeasurementDiagnostic(svgToDraw);
|
|
27400
27416
|
} catch {
|
|
@@ -27794,4 +27810,4 @@ export {
|
|
|
27794
27810
|
buildTeaserBlurFlatKeys as y,
|
|
27795
27811
|
collectFontDescriptorsFromConfig as z
|
|
27796
27812
|
};
|
|
27797
|
-
//# sourceMappingURL=index-
|
|
27813
|
+
//# sourceMappingURL=index-BVj3Aj4_.js.map
|