@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
|
@@ -11231,15 +11231,7 @@ function applyWarpAwareSelectionBorders(selection) {
|
|
|
11231
11231
|
} else {
|
|
11232
11232
|
const anyRotated = worldAngles.some((a) => Math.abs(a) > 0.5);
|
|
11233
11233
|
if (anyRotated) {
|
|
11234
|
-
|
|
11235
|
-
selection.setControlsVisibility({
|
|
11236
|
-
ml: false,
|
|
11237
|
-
mr: false,
|
|
11238
|
-
mt: false,
|
|
11239
|
-
mb: false
|
|
11240
|
-
});
|
|
11241
|
-
} catch {
|
|
11242
|
-
}
|
|
11234
|
+
selection.__pixldocsMixedRotation = true;
|
|
11243
11235
|
}
|
|
11244
11236
|
}
|
|
11245
11237
|
}
|
|
@@ -13585,10 +13577,21 @@ const PageCanvas = react.forwardRef(
|
|
|
13585
13577
|
fabricCanvas.on("selection:cleared", () => {
|
|
13586
13578
|
});
|
|
13587
13579
|
fabricCanvas.on("object:scaling", (e) => {
|
|
13588
|
-
var _a2, _b2, _c, _d, _e, _f;
|
|
13580
|
+
var _a2, _b2, _c, _d, _e, _f, _g;
|
|
13589
13581
|
if (!isActiveRef.current) return;
|
|
13590
13582
|
const t = e.target;
|
|
13591
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
|
+
}
|
|
13592
13595
|
prepareGroupSelectionTransformStart(t);
|
|
13593
13596
|
markTransforming(t);
|
|
13594
13597
|
didTransformRef.current = true;
|
|
@@ -13752,7 +13755,7 @@ const PageCanvas = react.forwardRef(
|
|
|
13752
13755
|
time: Math.round(performance.now()),
|
|
13753
13756
|
corner,
|
|
13754
13757
|
groupSelectionId: obj.__pixldocsGroupSelection,
|
|
13755
|
-
currentTransformAction: (
|
|
13758
|
+
currentTransformAction: (_b2 = fabricCanvas._currentTransform) == null ? void 0 : _b2.action,
|
|
13756
13759
|
selection: summarizeFabricObjectForResizeDebug(obj),
|
|
13757
13760
|
textChildren: obj.getObjects().filter((child) => child instanceof fabric__namespace.Textbox).map((child) => summarizeFabricObjectForResizeDebug(child))
|
|
13758
13761
|
};
|
|
@@ -13762,13 +13765,13 @@ const PageCanvas = react.forwardRef(
|
|
|
13762
13765
|
const isXSide = corner === "ml" || corner === "mr";
|
|
13763
13766
|
const sAxis = isXSide ? Math.abs(obj.scaleX ?? 1) : Math.abs(obj.scaleY ?? 1);
|
|
13764
13767
|
if (sAxis > 1e-3) {
|
|
13765
|
-
if (isXSide && ((
|
|
13768
|
+
if (isXSide && ((_c = groupShiftReflowSnapshotRef.current) == null ? void 0 : _c.selection) !== obj) {
|
|
13766
13769
|
groupShiftReflowSnapshotRef.current = null;
|
|
13767
13770
|
const logicalGroupId = obj.__pixldocsGroupSelection;
|
|
13768
13771
|
if (logicalGroupId) {
|
|
13769
13772
|
try {
|
|
13770
13773
|
const state = useEditorStore.getState();
|
|
13771
|
-
const pageChildren2 = ((
|
|
13774
|
+
const pageChildren2 = ((_d = state.canvas.pages.find((p) => p.id === pageId)) == null ? void 0 : _d.children) ?? [];
|
|
13772
13775
|
const groupNode = findNodeById(pageChildren2, logicalGroupId);
|
|
13773
13776
|
if (groupNode && isGroup(groupNode) && !isStackLayoutMode(groupNode.layoutMode)) {
|
|
13774
13777
|
const entries = obj.getObjects().map((c) => ({
|
|
@@ -13798,7 +13801,7 @@ const PageCanvas = react.forwardRef(
|
|
|
13798
13801
|
const asRect0 = obj.getBoundingRect();
|
|
13799
13802
|
let didReflowTextChild = false;
|
|
13800
13803
|
for (const child of obj.getObjects()) {
|
|
13801
|
-
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))) {
|
|
13802
13805
|
const ct = child.__cropData;
|
|
13803
13806
|
if (!ct) continue;
|
|
13804
13807
|
if (isXSide) {
|
|
@@ -13903,7 +13906,7 @@ const PageCanvas = react.forwardRef(
|
|
|
13903
13906
|
didReflowTextChild = true;
|
|
13904
13907
|
}
|
|
13905
13908
|
}
|
|
13906
|
-
if (isXSide && ((
|
|
13909
|
+
if (isXSide && ((_f = groupShiftReflowSnapshotRef.current) == null ? void 0 : _f.selection) === obj) {
|
|
13907
13910
|
const snap = groupShiftReflowSnapshotRef.current;
|
|
13908
13911
|
const anchorEntry = snap.children[0];
|
|
13909
13912
|
const anchorTopLive = anchorEntry.obj.top ?? 0;
|
|
@@ -14059,7 +14062,7 @@ const PageCanvas = react.forwardRef(
|
|
|
14059
14062
|
setGuides(gridGuidesForScale.length ? [...scaleGuides, ...gridGuidesForScale] : scaleGuides);
|
|
14060
14063
|
if (drilledGroupIdRef.current) {
|
|
14061
14064
|
try {
|
|
14062
|
-
(
|
|
14065
|
+
(_g = fabricCanvas.__updateDrilledGroupOutline) == null ? void 0 : _g.call(fabricCanvas);
|
|
14063
14066
|
} catch {
|
|
14064
14067
|
}
|
|
14065
14068
|
}
|
|
@@ -24289,9 +24292,9 @@ function captureFabricCanvasSvgForPdf(fabricInstance, canvasWidth, canvasHeight)
|
|
|
24289
24292
|
}
|
|
24290
24293
|
return svgString;
|
|
24291
24294
|
}
|
|
24292
|
-
const resolvedPackageVersion = "0.5.
|
|
24295
|
+
const resolvedPackageVersion = "0.5.315";
|
|
24293
24296
|
const PACKAGE_VERSION = resolvedPackageVersion;
|
|
24294
|
-
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.
|
|
24297
|
+
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.315";
|
|
24295
24298
|
const roundParityValue = (value) => {
|
|
24296
24299
|
if (typeof value !== "number") return value;
|
|
24297
24300
|
return Number.isFinite(value) ? Number(value.toFixed(3)) : value;
|
|
@@ -25105,7 +25108,7 @@ class PixldocsRenderer {
|
|
|
25105
25108
|
await this.waitForCanvasScene(container, cloned, i);
|
|
25106
25109
|
}
|
|
25107
25110
|
console.log(`[canvas-renderer][pdf-unified] mounted ${cloned.pages.length} page(s), handing off to client exportMultiPagePdf`);
|
|
25108
|
-
const { exportMultiPagePdf, preparePagesForExport } = await Promise.resolve().then(() => require("./vectorPdfExport-
|
|
25111
|
+
const { exportMultiPagePdf, preparePagesForExport } = await Promise.resolve().then(() => require("./vectorPdfExport-Co08KOeq.cjs"));
|
|
25109
25112
|
const prepared = preparePagesForExport(
|
|
25110
25113
|
cloned.pages,
|
|
25111
25114
|
canvasWidth,
|
|
@@ -27425,7 +27428,7 @@ async function prepareLiveCanvasSvgForPdf(rawSvg, pageWidth, pageHeight, pageKey
|
|
|
27425
27428
|
if (options == null ? void 0 : options.stripPageBackground) stripRootPageBackgroundFromSvg(svgToDraw);
|
|
27426
27429
|
sanitizeSvgTreeForPdf(svgToDraw);
|
|
27427
27430
|
try {
|
|
27428
|
-
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await Promise.resolve().then(() => require("./vectorPdfExport-
|
|
27431
|
+
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await Promise.resolve().then(() => require("./vectorPdfExport-Co08KOeq.cjs"));
|
|
27429
27432
|
try {
|
|
27430
27433
|
await logTextMeasurementDiagnostic(svgToDraw);
|
|
27431
27434
|
} catch {
|
|
@@ -27822,4 +27825,4 @@ exports.setAutoShrinkDebug = setAutoShrinkDebug;
|
|
|
27822
27825
|
exports.setBundledAssetPrefixes = setBundledAssetPrefixes;
|
|
27823
27826
|
exports.warmResolvedTemplateForPreview = warmResolvedTemplateForPreview;
|
|
27824
27827
|
exports.warmTemplateFromForm = warmTemplateFromForm;
|
|
27825
|
-
//# sourceMappingURL=index-
|
|
27828
|
+
//# sourceMappingURL=index-CyM9SvCF.cjs.map
|