@pixldocs/canvas-renderer 0.5.403 → 0.5.405
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-B8c2DkaJ.js → index-A1mT_rQo.js} +23 -12
- package/dist/index-A1mT_rQo.js.map +1 -0
- package/dist/{index-Bp9XxxF8.cjs → index-uJf5RraI.cjs} +23 -12
- package/dist/index-uJf5RraI.cjs.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/{vectorPdfExport-V449U4Y7.js → vectorPdfExport-C3La67Vw.js} +4 -4
- package/dist/{vectorPdfExport-V449U4Y7.js.map → vectorPdfExport-C3La67Vw.js.map} +1 -1
- package/dist/{vectorPdfExport-BevFDNWQ.cjs → vectorPdfExport-DSku6Anm.cjs} +4 -4
- package/dist/{vectorPdfExport-BevFDNWQ.cjs.map → vectorPdfExport-DSku6Anm.cjs.map} +1 -1
- package/package.json +1 -1
- package/dist/index-B8c2DkaJ.js.map +0 -1
- package/dist/index-Bp9XxxF8.cjs.map +0 -1
|
@@ -14169,7 +14169,7 @@ const PageCanvas = forwardRef(
|
|
|
14169
14169
|
fabricCanvas.on("selection:cleared", () => {
|
|
14170
14170
|
});
|
|
14171
14171
|
fabricCanvas.on("object:scaling", (e) => {
|
|
14172
|
-
var _a2, _b2, _c2, _d, _e, _f, _g, _h;
|
|
14172
|
+
var _a2, _b2, _c2, _d, _e, _f, _g, _h, _i, _j;
|
|
14173
14173
|
if (!isActiveRef.current) return;
|
|
14174
14174
|
const t = e.target;
|
|
14175
14175
|
if (t) lastResizeScaleTargetRef.current = t;
|
|
@@ -14353,15 +14353,18 @@ const PageCanvas = forwardRef(
|
|
|
14353
14353
|
}
|
|
14354
14354
|
if (obj instanceof fabric.ActiveSelection && (corner === "ml" || corner === "mr" || corner === "mt" || corner === "mb")) {
|
|
14355
14355
|
const isXSide = corner === "ml" || corner === "mr";
|
|
14356
|
-
const
|
|
14356
|
+
const _cur = fabricCanvas._currentTransform;
|
|
14357
|
+
const startSx = Math.abs(Number(((_d = _cur == null ? void 0 : _cur.original) == null ? void 0 : _d.scaleX) ?? 1)) || 1;
|
|
14358
|
+
const startSy = Math.abs(Number(((_e = _cur == null ? void 0 : _cur.original) == null ? void 0 : _e.scaleY) ?? 1)) || 1;
|
|
14359
|
+
const sAxis = isXSide ? Math.abs((obj.scaleX ?? 1) / startSx) : Math.abs((obj.scaleY ?? 1) / startSy);
|
|
14357
14360
|
if (sAxis > 1e-3) {
|
|
14358
|
-
if (isXSide && ((
|
|
14361
|
+
if (isXSide && ((_f = groupShiftReflowSnapshotRef.current) == null ? void 0 : _f.selection) !== obj) {
|
|
14359
14362
|
groupShiftReflowSnapshotRef.current = null;
|
|
14360
14363
|
const logicalGroupId = obj.__pixldocsGroupSelection;
|
|
14361
14364
|
if (logicalGroupId) {
|
|
14362
14365
|
try {
|
|
14363
14366
|
const state = useEditorStore.getState();
|
|
14364
|
-
const pageChildren2 = ((
|
|
14367
|
+
const pageChildren2 = ((_g = state.canvas.pages.find((p) => p.id === pageId)) == null ? void 0 : _g.children) ?? [];
|
|
14365
14368
|
const groupNode = findNodeById(pageChildren2, logicalGroupId);
|
|
14366
14369
|
if (groupNode && isGroup(groupNode) && !isStackLayoutMode(groupNode.layoutMode)) {
|
|
14367
14370
|
const entries = obj.getObjects().map((c) => ({
|
|
@@ -14391,7 +14394,15 @@ const PageCanvas = forwardRef(
|
|
|
14391
14394
|
const asRect0 = obj.getBoundingRect();
|
|
14392
14395
|
let didReflowTextChild = false;
|
|
14393
14396
|
for (const child of obj.getObjects()) {
|
|
14394
|
-
|
|
14397
|
+
const childLocalAngle = child.__asLiveOrigAngle != null ? child.__asLiveOrigAngle : child.angle ?? 0;
|
|
14398
|
+
const isRotatedChild = Math.abs((childLocalAngle % 360 + 360) % 360) > 0.5 && Math.abs((childLocalAngle % 360 + 360) % 360 - 360) > 0.5;
|
|
14399
|
+
if (isRotatedChild) {
|
|
14400
|
+
if (child.__asLiveOrigAngle == null) {
|
|
14401
|
+
child.__asLiveOrigAngle = child.angle ?? 0;
|
|
14402
|
+
}
|
|
14403
|
+
continue;
|
|
14404
|
+
}
|
|
14405
|
+
if (child instanceof fabric.Group && (child.__cropGroup || ((_h = child._ct) == null ? void 0 : _h.isCropGroup))) {
|
|
14395
14406
|
const ct = child.__cropData;
|
|
14396
14407
|
if (!ct) continue;
|
|
14397
14408
|
if (child.__asLiveOrigAngle == null) {
|
|
@@ -14558,7 +14569,7 @@ const PageCanvas = forwardRef(
|
|
|
14558
14569
|
child.dirty = true;
|
|
14559
14570
|
didReflowTextChild = true;
|
|
14560
14571
|
}
|
|
14561
|
-
if (isXSide && ((
|
|
14572
|
+
if (isXSide && ((_i = groupShiftReflowSnapshotRef.current) == null ? void 0 : _i.selection) === obj) {
|
|
14562
14573
|
const snap = groupShiftReflowSnapshotRef.current;
|
|
14563
14574
|
const anchorEntry = snap.children[0];
|
|
14564
14575
|
const anchorTopLive = anchorEntry.obj.top ?? 0;
|
|
@@ -14718,7 +14729,7 @@ const PageCanvas = forwardRef(
|
|
|
14718
14729
|
setGuides(gridGuidesForScale.length ? [...scaleGuides, ...gridGuidesForScale] : scaleGuides);
|
|
14719
14730
|
if (drilledGroupIdRef.current) {
|
|
14720
14731
|
try {
|
|
14721
|
-
(
|
|
14732
|
+
(_j = fabricCanvas.__updateDrilledGroupOutline) == null ? void 0 : _j.call(fabricCanvas);
|
|
14722
14733
|
} catch {
|
|
14723
14734
|
}
|
|
14724
14735
|
}
|
|
@@ -25127,9 +25138,9 @@ function captureFabricCanvasSvgForPdf(fabricInstance, canvasWidth, canvasHeight)
|
|
|
25127
25138
|
}
|
|
25128
25139
|
return svgString;
|
|
25129
25140
|
}
|
|
25130
|
-
const resolvedPackageVersion = "0.5.
|
|
25141
|
+
const resolvedPackageVersion = "0.5.405";
|
|
25131
25142
|
const PACKAGE_VERSION = resolvedPackageVersion;
|
|
25132
|
-
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.
|
|
25143
|
+
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.405";
|
|
25133
25144
|
const roundParityValue = (value) => {
|
|
25134
25145
|
if (typeof value !== "number") return value;
|
|
25135
25146
|
return Number.isFinite(value) ? Number(value.toFixed(3)) : value;
|
|
@@ -25943,7 +25954,7 @@ class PixldocsRenderer {
|
|
|
25943
25954
|
await this.waitForCanvasScene(container, cloned, i);
|
|
25944
25955
|
}
|
|
25945
25956
|
console.log(`[canvas-renderer][pdf-unified] mounted ${cloned.pages.length} page(s), handing off to client exportMultiPagePdf`);
|
|
25946
|
-
const { exportMultiPagePdf, preparePagesForExport } = await import("./vectorPdfExport-
|
|
25957
|
+
const { exportMultiPagePdf, preparePagesForExport } = await import("./vectorPdfExport-C3La67Vw.js");
|
|
25947
25958
|
const prepared = preparePagesForExport(
|
|
25948
25959
|
cloned.pages,
|
|
25949
25960
|
canvasWidth,
|
|
@@ -28263,7 +28274,7 @@ async function prepareLiveCanvasSvgForPdf(rawSvg, pageWidth, pageHeight, pageKey
|
|
|
28263
28274
|
if (options == null ? void 0 : options.stripPageBackground) stripRootPageBackgroundFromSvg(svgToDraw);
|
|
28264
28275
|
sanitizeSvgTreeForPdf(svgToDraw);
|
|
28265
28276
|
try {
|
|
28266
|
-
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await import("./vectorPdfExport-
|
|
28277
|
+
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await import("./vectorPdfExport-C3La67Vw.js");
|
|
28267
28278
|
try {
|
|
28268
28279
|
await logTextMeasurementDiagnostic(svgToDraw);
|
|
28269
28280
|
} catch {
|
|
@@ -28663,4 +28674,4 @@ export {
|
|
|
28663
28674
|
buildTeaserBlurFlatKeys as y,
|
|
28664
28675
|
collectFontDescriptorsFromConfig as z
|
|
28665
28676
|
};
|
|
28666
|
-
//# sourceMappingURL=index-
|
|
28677
|
+
//# sourceMappingURL=index-A1mT_rQo.js.map
|