@pixldocs/canvas-renderer 0.5.295 → 0.5.297
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-DmJeO8GF.js → index-BDVGR-oo.js} +19 -9
- package/dist/index-BDVGR-oo.js.map +1 -0
- package/dist/{index-Z2C993Tm.cjs → index-CrvU0g7N.cjs} +19 -9
- package/dist/index-CrvU0g7N.cjs.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/{vectorPdfExport-BLXRwisV.js → vectorPdfExport-DOAlZclW.js} +4 -4
- package/dist/{vectorPdfExport-BLXRwisV.js.map → vectorPdfExport-DOAlZclW.js.map} +1 -1
- package/dist/{vectorPdfExport-BeR1yhlp.cjs → vectorPdfExport-hvIfS0b3.cjs} +4 -4
- package/dist/{vectorPdfExport-BeR1yhlp.cjs.map → vectorPdfExport-hvIfS0b3.cjs.map} +1 -1
- package/package.json +1 -1
- package/dist/index-DmJeO8GF.js.map +0 -1
- package/dist/index-Z2C993Tm.cjs.map +0 -1
|
@@ -13937,7 +13937,7 @@ const PageCanvas = forwardRef(
|
|
|
13937
13937
|
});
|
|
13938
13938
|
let cropGroupSaveTimer = null;
|
|
13939
13939
|
fabricCanvas.on("object:modified", (e) => {
|
|
13940
|
-
var _a2, _b2, _c, _d, _e, _f, _g;
|
|
13940
|
+
var _a2, _b2, _c, _d, _e, _f, _g, _h;
|
|
13941
13941
|
try {
|
|
13942
13942
|
dragStarted = false;
|
|
13943
13943
|
setGuides([]);
|
|
@@ -14582,10 +14582,20 @@ const PageCanvas = forwardRef(
|
|
|
14582
14582
|
const prevObjCaching = obj.objectCaching;
|
|
14583
14583
|
obj.set({ width: bakedWidth, scaleX: 1, scaleY: 1, objectCaching: false });
|
|
14584
14584
|
obj.initDimensions();
|
|
14585
|
-
obj.setPositionByOrigin(preBakeCenter, "center", "center");
|
|
14586
14585
|
obj.objectCaching = prevObjCaching;
|
|
14587
14586
|
if (sx > 0 && sy > 0) {
|
|
14588
|
-
|
|
14587
|
+
const localScaleX = 1 / sx;
|
|
14588
|
+
const localScaleY = 1 / sy;
|
|
14589
|
+
obj.set({ scaleX: localScaleX, scaleY: localScaleY });
|
|
14590
|
+
const selectionMatrix = (_g = activeObj == null ? void 0 : activeObj.calcTransformMatrix) == null ? void 0 : _g.call(activeObj);
|
|
14591
|
+
const localCenter = selectionMatrix ? fabric.util.transformPoint(preBakeCenter, fabric.util.invertTransform(selectionMatrix)) : preBakeCenter;
|
|
14592
|
+
const localWidth = bakedWidth * localScaleX;
|
|
14593
|
+
const localHeight = (obj.height ?? intrinsicHeight) * localScaleY;
|
|
14594
|
+
obj.set({
|
|
14595
|
+
left: localCenter.x - localWidth / 2,
|
|
14596
|
+
top: localCenter.y - localHeight / 2
|
|
14597
|
+
});
|
|
14598
|
+
} else {
|
|
14589
14599
|
obj.setPositionByOrigin(preBakeCenter, "center", "center");
|
|
14590
14600
|
}
|
|
14591
14601
|
obj.dirty = true;
|
|
@@ -14729,7 +14739,7 @@ const PageCanvas = forwardRef(
|
|
|
14729
14739
|
updateElement(objId, elementUpdate, { recordHistory: false, skipLayoutRecalc: true });
|
|
14730
14740
|
obj.setCoords();
|
|
14731
14741
|
}
|
|
14732
|
-
const pageChildrenForReflow = ((
|
|
14742
|
+
const pageChildrenForReflow = ((_h = useEditorStore.getState().canvas.pages.find((p) => p.id === pageId)) == null ? void 0 : _h.children) ?? [];
|
|
14733
14743
|
const stackGroupsToReflow = /* @__PURE__ */ new Set();
|
|
14734
14744
|
for (const id of modifiedIdsThisRound) {
|
|
14735
14745
|
const parent = findParentGroup(pageChildrenForReflow, id);
|
|
@@ -23829,9 +23839,9 @@ function captureFabricCanvasSvgForPdf(fabricInstance, canvasWidth, canvasHeight)
|
|
|
23829
23839
|
}
|
|
23830
23840
|
return svgString;
|
|
23831
23841
|
}
|
|
23832
|
-
const resolvedPackageVersion = "0.5.
|
|
23842
|
+
const resolvedPackageVersion = "0.5.297";
|
|
23833
23843
|
const PACKAGE_VERSION = resolvedPackageVersion;
|
|
23834
|
-
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.
|
|
23844
|
+
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.297";
|
|
23835
23845
|
const roundParityValue = (value) => {
|
|
23836
23846
|
if (typeof value !== "number") return value;
|
|
23837
23847
|
return Number.isFinite(value) ? Number(value.toFixed(3)) : value;
|
|
@@ -24645,7 +24655,7 @@ class PixldocsRenderer {
|
|
|
24645
24655
|
await this.waitForCanvasScene(container, cloned, i);
|
|
24646
24656
|
}
|
|
24647
24657
|
console.log(`[canvas-renderer][pdf-unified] mounted ${cloned.pages.length} page(s), handing off to client exportMultiPagePdf`);
|
|
24648
|
-
const { exportMultiPagePdf, preparePagesForExport } = await import("./vectorPdfExport-
|
|
24658
|
+
const { exportMultiPagePdf, preparePagesForExport } = await import("./vectorPdfExport-DOAlZclW.js");
|
|
24649
24659
|
const prepared = preparePagesForExport(
|
|
24650
24660
|
cloned.pages,
|
|
24651
24661
|
canvasWidth,
|
|
@@ -26965,7 +26975,7 @@ async function prepareLiveCanvasSvgForPdf(rawSvg, pageWidth, pageHeight, pageKey
|
|
|
26965
26975
|
if (options == null ? void 0 : options.stripPageBackground) stripRootPageBackgroundFromSvg(svgToDraw);
|
|
26966
26976
|
sanitizeSvgTreeForPdf(svgToDraw);
|
|
26967
26977
|
try {
|
|
26968
|
-
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await import("./vectorPdfExport-
|
|
26978
|
+
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await import("./vectorPdfExport-DOAlZclW.js");
|
|
26969
26979
|
try {
|
|
26970
26980
|
await logTextMeasurementDiagnostic(svgToDraw);
|
|
26971
26981
|
} catch {
|
|
@@ -27365,4 +27375,4 @@ export {
|
|
|
27365
27375
|
buildTeaserBlurFlatKeys as y,
|
|
27366
27376
|
collectFontDescriptorsFromConfig as z
|
|
27367
27377
|
};
|
|
27368
|
-
//# sourceMappingURL=index-
|
|
27378
|
+
//# sourceMappingURL=index-BDVGR-oo.js.map
|