@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
|
@@ -11228,6 +11228,11 @@ function applyWarpAwareSelectionBorders(selection) {
|
|
|
11228
11228
|
selection.setCoords();
|
|
11229
11229
|
selection.dirty = true;
|
|
11230
11230
|
selection.__pixldocsAlignedAngle = first;
|
|
11231
|
+
} else {
|
|
11232
|
+
const anyRotated = worldAngles.some((a) => Math.abs(a) > 0.5);
|
|
11233
|
+
if (anyRotated) {
|
|
11234
|
+
selection.__pixldocsMixedRotation = true;
|
|
11235
|
+
}
|
|
11231
11236
|
}
|
|
11232
11237
|
}
|
|
11233
11238
|
}
|
|
@@ -13572,10 +13577,21 @@ const PageCanvas = react.forwardRef(
|
|
|
13572
13577
|
fabricCanvas.on("selection:cleared", () => {
|
|
13573
13578
|
});
|
|
13574
13579
|
fabricCanvas.on("object:scaling", (e) => {
|
|
13575
|
-
var _a2, _b2, _c, _d, _e, _f;
|
|
13580
|
+
var _a2, _b2, _c, _d, _e, _f, _g;
|
|
13576
13581
|
if (!isActiveRef.current) return;
|
|
13577
13582
|
const t = e.target;
|
|
13578
13583
|
if (t) lastResizeScaleTargetRef.current = t;
|
|
13584
|
+
try {
|
|
13585
|
+
if (t instanceof fabric__namespace.ActiveSelection && t.__pixldocsMixedRotation) {
|
|
13586
|
+
const corner2 = (_a2 = e.transform) == null ? void 0 : _a2.corner;
|
|
13587
|
+
if (corner2 === "ml" || corner2 === "mr") {
|
|
13588
|
+
t.scaleY = t.scaleX;
|
|
13589
|
+
} else if (corner2 === "mt" || corner2 === "mb") {
|
|
13590
|
+
t.scaleX = t.scaleY;
|
|
13591
|
+
}
|
|
13592
|
+
}
|
|
13593
|
+
} catch {
|
|
13594
|
+
}
|
|
13579
13595
|
prepareGroupSelectionTransformStart(t);
|
|
13580
13596
|
markTransforming(t);
|
|
13581
13597
|
didTransformRef.current = true;
|
|
@@ -13739,7 +13755,7 @@ const PageCanvas = react.forwardRef(
|
|
|
13739
13755
|
time: Math.round(performance.now()),
|
|
13740
13756
|
corner,
|
|
13741
13757
|
groupSelectionId: obj.__pixldocsGroupSelection,
|
|
13742
|
-
currentTransformAction: (
|
|
13758
|
+
currentTransformAction: (_b2 = fabricCanvas._currentTransform) == null ? void 0 : _b2.action,
|
|
13743
13759
|
selection: summarizeFabricObjectForResizeDebug(obj),
|
|
13744
13760
|
textChildren: obj.getObjects().filter((child) => child instanceof fabric__namespace.Textbox).map((child) => summarizeFabricObjectForResizeDebug(child))
|
|
13745
13761
|
};
|
|
@@ -13749,13 +13765,13 @@ const PageCanvas = react.forwardRef(
|
|
|
13749
13765
|
const isXSide = corner === "ml" || corner === "mr";
|
|
13750
13766
|
const sAxis = isXSide ? Math.abs(obj.scaleX ?? 1) : Math.abs(obj.scaleY ?? 1);
|
|
13751
13767
|
if (sAxis > 1e-3) {
|
|
13752
|
-
if (isXSide && ((
|
|
13768
|
+
if (isXSide && ((_c = groupShiftReflowSnapshotRef.current) == null ? void 0 : _c.selection) !== obj) {
|
|
13753
13769
|
groupShiftReflowSnapshotRef.current = null;
|
|
13754
13770
|
const logicalGroupId = obj.__pixldocsGroupSelection;
|
|
13755
13771
|
if (logicalGroupId) {
|
|
13756
13772
|
try {
|
|
13757
13773
|
const state = useEditorStore.getState();
|
|
13758
|
-
const pageChildren2 = ((
|
|
13774
|
+
const pageChildren2 = ((_d = state.canvas.pages.find((p) => p.id === pageId)) == null ? void 0 : _d.children) ?? [];
|
|
13759
13775
|
const groupNode = findNodeById(pageChildren2, logicalGroupId);
|
|
13760
13776
|
if (groupNode && isGroup(groupNode) && !isStackLayoutMode(groupNode.layoutMode)) {
|
|
13761
13777
|
const entries = obj.getObjects().map((c) => ({
|
|
@@ -13785,7 +13801,7 @@ const PageCanvas = react.forwardRef(
|
|
|
13785
13801
|
const asRect0 = obj.getBoundingRect();
|
|
13786
13802
|
let didReflowTextChild = false;
|
|
13787
13803
|
for (const child of obj.getObjects()) {
|
|
13788
|
-
if (child instanceof fabric__namespace.Group && (child.__cropGroup || ((
|
|
13804
|
+
if (child instanceof fabric__namespace.Group && (child.__cropGroup || ((_e = child._ct) == null ? void 0 : _e.isCropGroup))) {
|
|
13789
13805
|
const ct = child.__cropData;
|
|
13790
13806
|
if (!ct) continue;
|
|
13791
13807
|
if (isXSide) {
|
|
@@ -13890,7 +13906,7 @@ const PageCanvas = react.forwardRef(
|
|
|
13890
13906
|
didReflowTextChild = true;
|
|
13891
13907
|
}
|
|
13892
13908
|
}
|
|
13893
|
-
if (isXSide && ((
|
|
13909
|
+
if (isXSide && ((_f = groupShiftReflowSnapshotRef.current) == null ? void 0 : _f.selection) === obj) {
|
|
13894
13910
|
const snap = groupShiftReflowSnapshotRef.current;
|
|
13895
13911
|
const anchorEntry = snap.children[0];
|
|
13896
13912
|
const anchorTopLive = anchorEntry.obj.top ?? 0;
|
|
@@ -14046,7 +14062,7 @@ const PageCanvas = react.forwardRef(
|
|
|
14046
14062
|
setGuides(gridGuidesForScale.length ? [...scaleGuides, ...gridGuidesForScale] : scaleGuides);
|
|
14047
14063
|
if (drilledGroupIdRef.current) {
|
|
14048
14064
|
try {
|
|
14049
|
-
(
|
|
14065
|
+
(_g = fabricCanvas.__updateDrilledGroupOutline) == null ? void 0 : _g.call(fabricCanvas);
|
|
14050
14066
|
} catch {
|
|
14051
14067
|
}
|
|
14052
14068
|
}
|
|
@@ -24276,9 +24292,9 @@ function captureFabricCanvasSvgForPdf(fabricInstance, canvasWidth, canvasHeight)
|
|
|
24276
24292
|
}
|
|
24277
24293
|
return svgString;
|
|
24278
24294
|
}
|
|
24279
|
-
const resolvedPackageVersion = "0.5.
|
|
24295
|
+
const resolvedPackageVersion = "0.5.315";
|
|
24280
24296
|
const PACKAGE_VERSION = resolvedPackageVersion;
|
|
24281
|
-
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.
|
|
24297
|
+
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.315";
|
|
24282
24298
|
const roundParityValue = (value) => {
|
|
24283
24299
|
if (typeof value !== "number") return value;
|
|
24284
24300
|
return Number.isFinite(value) ? Number(value.toFixed(3)) : value;
|
|
@@ -25092,7 +25108,7 @@ class PixldocsRenderer {
|
|
|
25092
25108
|
await this.waitForCanvasScene(container, cloned, i);
|
|
25093
25109
|
}
|
|
25094
25110
|
console.log(`[canvas-renderer][pdf-unified] mounted ${cloned.pages.length} page(s), handing off to client exportMultiPagePdf`);
|
|
25095
|
-
const { exportMultiPagePdf, preparePagesForExport } = await Promise.resolve().then(() => require("./vectorPdfExport-
|
|
25111
|
+
const { exportMultiPagePdf, preparePagesForExport } = await Promise.resolve().then(() => require("./vectorPdfExport-Co08KOeq.cjs"));
|
|
25096
25112
|
const prepared = preparePagesForExport(
|
|
25097
25113
|
cloned.pages,
|
|
25098
25114
|
canvasWidth,
|
|
@@ -27412,7 +27428,7 @@ async function prepareLiveCanvasSvgForPdf(rawSvg, pageWidth, pageHeight, pageKey
|
|
|
27412
27428
|
if (options == null ? void 0 : options.stripPageBackground) stripRootPageBackgroundFromSvg(svgToDraw);
|
|
27413
27429
|
sanitizeSvgTreeForPdf(svgToDraw);
|
|
27414
27430
|
try {
|
|
27415
|
-
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await Promise.resolve().then(() => require("./vectorPdfExport-
|
|
27431
|
+
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await Promise.resolve().then(() => require("./vectorPdfExport-Co08KOeq.cjs"));
|
|
27416
27432
|
try {
|
|
27417
27433
|
await logTextMeasurementDiagnostic(svgToDraw);
|
|
27418
27434
|
} catch {
|
|
@@ -27809,4 +27825,4 @@ exports.setAutoShrinkDebug = setAutoShrinkDebug;
|
|
|
27809
27825
|
exports.setBundledAssetPrefixes = setBundledAssetPrefixes;
|
|
27810
27826
|
exports.warmResolvedTemplateForPreview = warmResolvedTemplateForPreview;
|
|
27811
27827
|
exports.warmTemplateFromForm = warmTemplateFromForm;
|
|
27812
|
-
//# sourceMappingURL=index-
|
|
27828
|
+
//# sourceMappingURL=index-CyM9SvCF.cjs.map
|