@pixldocs/canvas-renderer 0.5.314 → 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-Dr4Grd18.js → index-BVj3Aj4_.js} +24 -21
- package/dist/index-BVj3Aj4_.js.map +1 -0
- package/dist/{index-CivzkA4l.cjs → index-CyM9SvCF.cjs} +24 -21
- package/dist/index-CyM9SvCF.cjs.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/{vectorPdfExport-DBoLqkEn.js → vectorPdfExport-BrYF2E8L.js} +4 -4
- package/dist/{vectorPdfExport-DBoLqkEn.js.map → vectorPdfExport-BrYF2E8L.js.map} +1 -1
- package/dist/{vectorPdfExport-CkSLQ4vT.cjs → vectorPdfExport-Co08KOeq.cjs} +4 -4
- package/dist/{vectorPdfExport-CkSLQ4vT.cjs.map → vectorPdfExport-Co08KOeq.cjs.map} +1 -1
- package/package.json +1 -1
- package/dist/index-CivzkA4l.cjs.map +0 -1
- package/dist/index-Dr4Grd18.js.map +0 -1
|
@@ -11213,15 +11213,7 @@ function applyWarpAwareSelectionBorders(selection) {
|
|
|
11213
11213
|
} else {
|
|
11214
11214
|
const anyRotated = worldAngles.some((a) => Math.abs(a) > 0.5);
|
|
11215
11215
|
if (anyRotated) {
|
|
11216
|
-
|
|
11217
|
-
selection.setControlsVisibility({
|
|
11218
|
-
ml: false,
|
|
11219
|
-
mr: false,
|
|
11220
|
-
mt: false,
|
|
11221
|
-
mb: false
|
|
11222
|
-
});
|
|
11223
|
-
} catch {
|
|
11224
|
-
}
|
|
11216
|
+
selection.__pixldocsMixedRotation = true;
|
|
11225
11217
|
}
|
|
11226
11218
|
}
|
|
11227
11219
|
}
|
|
@@ -13567,10 +13559,21 @@ const PageCanvas = forwardRef(
|
|
|
13567
13559
|
fabricCanvas.on("selection:cleared", () => {
|
|
13568
13560
|
});
|
|
13569
13561
|
fabricCanvas.on("object:scaling", (e) => {
|
|
13570
|
-
var _a2, _b2, _c, _d, _e, _f;
|
|
13562
|
+
var _a2, _b2, _c, _d, _e, _f, _g;
|
|
13571
13563
|
if (!isActiveRef.current) return;
|
|
13572
13564
|
const t = e.target;
|
|
13573
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
|
+
}
|
|
13574
13577
|
prepareGroupSelectionTransformStart(t);
|
|
13575
13578
|
markTransforming(t);
|
|
13576
13579
|
didTransformRef.current = true;
|
|
@@ -13734,7 +13737,7 @@ const PageCanvas = forwardRef(
|
|
|
13734
13737
|
time: Math.round(performance.now()),
|
|
13735
13738
|
corner,
|
|
13736
13739
|
groupSelectionId: obj.__pixldocsGroupSelection,
|
|
13737
|
-
currentTransformAction: (
|
|
13740
|
+
currentTransformAction: (_b2 = fabricCanvas._currentTransform) == null ? void 0 : _b2.action,
|
|
13738
13741
|
selection: summarizeFabricObjectForResizeDebug(obj),
|
|
13739
13742
|
textChildren: obj.getObjects().filter((child) => child instanceof fabric.Textbox).map((child) => summarizeFabricObjectForResizeDebug(child))
|
|
13740
13743
|
};
|
|
@@ -13744,13 +13747,13 @@ const PageCanvas = forwardRef(
|
|
|
13744
13747
|
const isXSide = corner === "ml" || corner === "mr";
|
|
13745
13748
|
const sAxis = isXSide ? Math.abs(obj.scaleX ?? 1) : Math.abs(obj.scaleY ?? 1);
|
|
13746
13749
|
if (sAxis > 1e-3) {
|
|
13747
|
-
if (isXSide && ((
|
|
13750
|
+
if (isXSide && ((_c = groupShiftReflowSnapshotRef.current) == null ? void 0 : _c.selection) !== obj) {
|
|
13748
13751
|
groupShiftReflowSnapshotRef.current = null;
|
|
13749
13752
|
const logicalGroupId = obj.__pixldocsGroupSelection;
|
|
13750
13753
|
if (logicalGroupId) {
|
|
13751
13754
|
try {
|
|
13752
13755
|
const state = useEditorStore.getState();
|
|
13753
|
-
const pageChildren2 = ((
|
|
13756
|
+
const pageChildren2 = ((_d = state.canvas.pages.find((p) => p.id === pageId)) == null ? void 0 : _d.children) ?? [];
|
|
13754
13757
|
const groupNode = findNodeById(pageChildren2, logicalGroupId);
|
|
13755
13758
|
if (groupNode && isGroup(groupNode) && !isStackLayoutMode(groupNode.layoutMode)) {
|
|
13756
13759
|
const entries = obj.getObjects().map((c) => ({
|
|
@@ -13780,7 +13783,7 @@ const PageCanvas = forwardRef(
|
|
|
13780
13783
|
const asRect0 = obj.getBoundingRect();
|
|
13781
13784
|
let didReflowTextChild = false;
|
|
13782
13785
|
for (const child of obj.getObjects()) {
|
|
13783
|
-
if (child instanceof fabric.Group && (child.__cropGroup || ((
|
|
13786
|
+
if (child instanceof fabric.Group && (child.__cropGroup || ((_e = child._ct) == null ? void 0 : _e.isCropGroup))) {
|
|
13784
13787
|
const ct = child.__cropData;
|
|
13785
13788
|
if (!ct) continue;
|
|
13786
13789
|
if (isXSide) {
|
|
@@ -13885,7 +13888,7 @@ const PageCanvas = forwardRef(
|
|
|
13885
13888
|
didReflowTextChild = true;
|
|
13886
13889
|
}
|
|
13887
13890
|
}
|
|
13888
|
-
if (isXSide && ((
|
|
13891
|
+
if (isXSide && ((_f = groupShiftReflowSnapshotRef.current) == null ? void 0 : _f.selection) === obj) {
|
|
13889
13892
|
const snap = groupShiftReflowSnapshotRef.current;
|
|
13890
13893
|
const anchorEntry = snap.children[0];
|
|
13891
13894
|
const anchorTopLive = anchorEntry.obj.top ?? 0;
|
|
@@ -14041,7 +14044,7 @@ const PageCanvas = forwardRef(
|
|
|
14041
14044
|
setGuides(gridGuidesForScale.length ? [...scaleGuides, ...gridGuidesForScale] : scaleGuides);
|
|
14042
14045
|
if (drilledGroupIdRef.current) {
|
|
14043
14046
|
try {
|
|
14044
|
-
(
|
|
14047
|
+
(_g = fabricCanvas.__updateDrilledGroupOutline) == null ? void 0 : _g.call(fabricCanvas);
|
|
14045
14048
|
} catch {
|
|
14046
14049
|
}
|
|
14047
14050
|
}
|
|
@@ -24271,9 +24274,9 @@ function captureFabricCanvasSvgForPdf(fabricInstance, canvasWidth, canvasHeight)
|
|
|
24271
24274
|
}
|
|
24272
24275
|
return svgString;
|
|
24273
24276
|
}
|
|
24274
|
-
const resolvedPackageVersion = "0.5.
|
|
24277
|
+
const resolvedPackageVersion = "0.5.315";
|
|
24275
24278
|
const PACKAGE_VERSION = resolvedPackageVersion;
|
|
24276
|
-
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.
|
|
24279
|
+
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.315";
|
|
24277
24280
|
const roundParityValue = (value) => {
|
|
24278
24281
|
if (typeof value !== "number") return value;
|
|
24279
24282
|
return Number.isFinite(value) ? Number(value.toFixed(3)) : value;
|
|
@@ -25087,7 +25090,7 @@ class PixldocsRenderer {
|
|
|
25087
25090
|
await this.waitForCanvasScene(container, cloned, i);
|
|
25088
25091
|
}
|
|
25089
25092
|
console.log(`[canvas-renderer][pdf-unified] mounted ${cloned.pages.length} page(s), handing off to client exportMultiPagePdf`);
|
|
25090
|
-
const { exportMultiPagePdf, preparePagesForExport } = await import("./vectorPdfExport-
|
|
25093
|
+
const { exportMultiPagePdf, preparePagesForExport } = await import("./vectorPdfExport-BrYF2E8L.js");
|
|
25091
25094
|
const prepared = preparePagesForExport(
|
|
25092
25095
|
cloned.pages,
|
|
25093
25096
|
canvasWidth,
|
|
@@ -27407,7 +27410,7 @@ async function prepareLiveCanvasSvgForPdf(rawSvg, pageWidth, pageHeight, pageKey
|
|
|
27407
27410
|
if (options == null ? void 0 : options.stripPageBackground) stripRootPageBackgroundFromSvg(svgToDraw);
|
|
27408
27411
|
sanitizeSvgTreeForPdf(svgToDraw);
|
|
27409
27412
|
try {
|
|
27410
|
-
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await import("./vectorPdfExport-
|
|
27413
|
+
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await import("./vectorPdfExport-BrYF2E8L.js");
|
|
27411
27414
|
try {
|
|
27412
27415
|
await logTextMeasurementDiagnostic(svgToDraw);
|
|
27413
27416
|
} catch {
|
|
@@ -27807,4 +27810,4 @@ export {
|
|
|
27807
27810
|
buildTeaserBlurFlatKeys as y,
|
|
27808
27811
|
collectFontDescriptorsFromConfig as z
|
|
27809
27812
|
};
|
|
27810
|
-
//# sourceMappingURL=index-
|
|
27813
|
+
//# sourceMappingURL=index-BVj3Aj4_.js.map
|