@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
|
@@ -13955,7 +13955,7 @@ const PageCanvas = react.forwardRef(
|
|
|
13955
13955
|
});
|
|
13956
13956
|
let cropGroupSaveTimer = null;
|
|
13957
13957
|
fabricCanvas.on("object:modified", (e) => {
|
|
13958
|
-
var _a2, _b2, _c, _d, _e, _f, _g;
|
|
13958
|
+
var _a2, _b2, _c, _d, _e, _f, _g, _h;
|
|
13959
13959
|
try {
|
|
13960
13960
|
dragStarted = false;
|
|
13961
13961
|
setGuides([]);
|
|
@@ -14600,10 +14600,20 @@ const PageCanvas = react.forwardRef(
|
|
|
14600
14600
|
const prevObjCaching = obj.objectCaching;
|
|
14601
14601
|
obj.set({ width: bakedWidth, scaleX: 1, scaleY: 1, objectCaching: false });
|
|
14602
14602
|
obj.initDimensions();
|
|
14603
|
-
obj.setPositionByOrigin(preBakeCenter, "center", "center");
|
|
14604
14603
|
obj.objectCaching = prevObjCaching;
|
|
14605
14604
|
if (sx > 0 && sy > 0) {
|
|
14606
|
-
|
|
14605
|
+
const localScaleX = 1 / sx;
|
|
14606
|
+
const localScaleY = 1 / sy;
|
|
14607
|
+
obj.set({ scaleX: localScaleX, scaleY: localScaleY });
|
|
14608
|
+
const selectionMatrix = (_g = activeObj == null ? void 0 : activeObj.calcTransformMatrix) == null ? void 0 : _g.call(activeObj);
|
|
14609
|
+
const localCenter = selectionMatrix ? fabric__namespace.util.transformPoint(preBakeCenter, fabric__namespace.util.invertTransform(selectionMatrix)) : preBakeCenter;
|
|
14610
|
+
const localWidth = bakedWidth * localScaleX;
|
|
14611
|
+
const localHeight = (obj.height ?? intrinsicHeight) * localScaleY;
|
|
14612
|
+
obj.set({
|
|
14613
|
+
left: localCenter.x - localWidth / 2,
|
|
14614
|
+
top: localCenter.y - localHeight / 2
|
|
14615
|
+
});
|
|
14616
|
+
} else {
|
|
14607
14617
|
obj.setPositionByOrigin(preBakeCenter, "center", "center");
|
|
14608
14618
|
}
|
|
14609
14619
|
obj.dirty = true;
|
|
@@ -14747,7 +14757,7 @@ const PageCanvas = react.forwardRef(
|
|
|
14747
14757
|
updateElement(objId, elementUpdate, { recordHistory: false, skipLayoutRecalc: true });
|
|
14748
14758
|
obj.setCoords();
|
|
14749
14759
|
}
|
|
14750
|
-
const pageChildrenForReflow = ((
|
|
14760
|
+
const pageChildrenForReflow = ((_h = useEditorStore.getState().canvas.pages.find((p) => p.id === pageId)) == null ? void 0 : _h.children) ?? [];
|
|
14751
14761
|
const stackGroupsToReflow = /* @__PURE__ */ new Set();
|
|
14752
14762
|
for (const id of modifiedIdsThisRound) {
|
|
14753
14763
|
const parent = findParentGroup(pageChildrenForReflow, id);
|
|
@@ -23847,9 +23857,9 @@ function captureFabricCanvasSvgForPdf(fabricInstance, canvasWidth, canvasHeight)
|
|
|
23847
23857
|
}
|
|
23848
23858
|
return svgString;
|
|
23849
23859
|
}
|
|
23850
|
-
const resolvedPackageVersion = "0.5.
|
|
23860
|
+
const resolvedPackageVersion = "0.5.297";
|
|
23851
23861
|
const PACKAGE_VERSION = resolvedPackageVersion;
|
|
23852
|
-
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.
|
|
23862
|
+
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.297";
|
|
23853
23863
|
const roundParityValue = (value) => {
|
|
23854
23864
|
if (typeof value !== "number") return value;
|
|
23855
23865
|
return Number.isFinite(value) ? Number(value.toFixed(3)) : value;
|
|
@@ -24663,7 +24673,7 @@ class PixldocsRenderer {
|
|
|
24663
24673
|
await this.waitForCanvasScene(container, cloned, i);
|
|
24664
24674
|
}
|
|
24665
24675
|
console.log(`[canvas-renderer][pdf-unified] mounted ${cloned.pages.length} page(s), handing off to client exportMultiPagePdf`);
|
|
24666
|
-
const { exportMultiPagePdf, preparePagesForExport } = await Promise.resolve().then(() => require("./vectorPdfExport-
|
|
24676
|
+
const { exportMultiPagePdf, preparePagesForExport } = await Promise.resolve().then(() => require("./vectorPdfExport-hvIfS0b3.cjs"));
|
|
24667
24677
|
const prepared = preparePagesForExport(
|
|
24668
24678
|
cloned.pages,
|
|
24669
24679
|
canvasWidth,
|
|
@@ -26983,7 +26993,7 @@ async function prepareLiveCanvasSvgForPdf(rawSvg, pageWidth, pageHeight, pageKey
|
|
|
26983
26993
|
if (options == null ? void 0 : options.stripPageBackground) stripRootPageBackgroundFromSvg(svgToDraw);
|
|
26984
26994
|
sanitizeSvgTreeForPdf(svgToDraw);
|
|
26985
26995
|
try {
|
|
26986
|
-
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await Promise.resolve().then(() => require("./vectorPdfExport-
|
|
26996
|
+
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await Promise.resolve().then(() => require("./vectorPdfExport-hvIfS0b3.cjs"));
|
|
26987
26997
|
try {
|
|
26988
26998
|
await logTextMeasurementDiagnostic(svgToDraw);
|
|
26989
26999
|
} catch {
|
|
@@ -27380,4 +27390,4 @@ exports.setAutoShrinkDebug = setAutoShrinkDebug;
|
|
|
27380
27390
|
exports.setBundledAssetPrefixes = setBundledAssetPrefixes;
|
|
27381
27391
|
exports.warmResolvedTemplateForPreview = warmResolvedTemplateForPreview;
|
|
27382
27392
|
exports.warmTemplateFromForm = warmTemplateFromForm;
|
|
27383
|
-
//# sourceMappingURL=index-
|
|
27393
|
+
//# sourceMappingURL=index-CrvU0g7N.cjs.map
|