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