@pixldocs/canvas-renderer 0.5.404 → 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-FljS6ssY.js → index-A1mT_rQo.js} +15 -12
- package/dist/index-A1mT_rQo.js.map +1 -0
- package/dist/{index-BsKKxOH4.cjs → index-uJf5RraI.cjs} +15 -12
- package/dist/index-uJf5RraI.cjs.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/{vectorPdfExport-CWHd6dnp.js → vectorPdfExport-C3La67Vw.js} +4 -4
- package/dist/{vectorPdfExport-CWHd6dnp.js.map → vectorPdfExport-C3La67Vw.js.map} +1 -1
- package/dist/{vectorPdfExport-CMUgVgvn.cjs → vectorPdfExport-DSku6Anm.cjs} +4 -4
- package/dist/{vectorPdfExport-CMUgVgvn.cjs.map → vectorPdfExport-DSku6Anm.cjs.map} +1 -1
- package/package.json +1 -1
- package/dist/index-BsKKxOH4.cjs.map +0 -1
- package/dist/index-FljS6ssY.js.map +0 -1
|
@@ -14187,7 +14187,7 @@ const PageCanvas = react.forwardRef(
|
|
|
14187
14187
|
fabricCanvas.on("selection:cleared", () => {
|
|
14188
14188
|
});
|
|
14189
14189
|
fabricCanvas.on("object:scaling", (e) => {
|
|
14190
|
-
var _a2, _b2, _c2, _d, _e, _f, _g, _h;
|
|
14190
|
+
var _a2, _b2, _c2, _d, _e, _f, _g, _h, _i, _j;
|
|
14191
14191
|
if (!isActiveRef.current) return;
|
|
14192
14192
|
const t = e.target;
|
|
14193
14193
|
if (t) lastResizeScaleTargetRef.current = t;
|
|
@@ -14371,15 +14371,18 @@ const PageCanvas = react.forwardRef(
|
|
|
14371
14371
|
}
|
|
14372
14372
|
if (obj instanceof fabric__namespace.ActiveSelection && (corner === "ml" || corner === "mr" || corner === "mt" || corner === "mb")) {
|
|
14373
14373
|
const isXSide = corner === "ml" || corner === "mr";
|
|
14374
|
-
const
|
|
14374
|
+
const _cur = fabricCanvas._currentTransform;
|
|
14375
|
+
const startSx = Math.abs(Number(((_d = _cur == null ? void 0 : _cur.original) == null ? void 0 : _d.scaleX) ?? 1)) || 1;
|
|
14376
|
+
const startSy = Math.abs(Number(((_e = _cur == null ? void 0 : _cur.original) == null ? void 0 : _e.scaleY) ?? 1)) || 1;
|
|
14377
|
+
const sAxis = isXSide ? Math.abs((obj.scaleX ?? 1) / startSx) : Math.abs((obj.scaleY ?? 1) / startSy);
|
|
14375
14378
|
if (sAxis > 1e-3) {
|
|
14376
|
-
if (isXSide && ((
|
|
14379
|
+
if (isXSide && ((_f = groupShiftReflowSnapshotRef.current) == null ? void 0 : _f.selection) !== obj) {
|
|
14377
14380
|
groupShiftReflowSnapshotRef.current = null;
|
|
14378
14381
|
const logicalGroupId = obj.__pixldocsGroupSelection;
|
|
14379
14382
|
if (logicalGroupId) {
|
|
14380
14383
|
try {
|
|
14381
14384
|
const state = useEditorStore.getState();
|
|
14382
|
-
const pageChildren2 = ((
|
|
14385
|
+
const pageChildren2 = ((_g = state.canvas.pages.find((p) => p.id === pageId)) == null ? void 0 : _g.children) ?? [];
|
|
14383
14386
|
const groupNode = findNodeById(pageChildren2, logicalGroupId);
|
|
14384
14387
|
if (groupNode && isGroup(groupNode) && !isStackLayoutMode(groupNode.layoutMode)) {
|
|
14385
14388
|
const entries = obj.getObjects().map((c) => ({
|
|
@@ -14417,7 +14420,7 @@ const PageCanvas = react.forwardRef(
|
|
|
14417
14420
|
}
|
|
14418
14421
|
continue;
|
|
14419
14422
|
}
|
|
14420
|
-
if (child instanceof fabric__namespace.Group && (child.__cropGroup || ((
|
|
14423
|
+
if (child instanceof fabric__namespace.Group && (child.__cropGroup || ((_h = child._ct) == null ? void 0 : _h.isCropGroup))) {
|
|
14421
14424
|
const ct = child.__cropData;
|
|
14422
14425
|
if (!ct) continue;
|
|
14423
14426
|
if (child.__asLiveOrigAngle == null) {
|
|
@@ -14584,7 +14587,7 @@ const PageCanvas = react.forwardRef(
|
|
|
14584
14587
|
child.dirty = true;
|
|
14585
14588
|
didReflowTextChild = true;
|
|
14586
14589
|
}
|
|
14587
|
-
if (isXSide && ((
|
|
14590
|
+
if (isXSide && ((_i = groupShiftReflowSnapshotRef.current) == null ? void 0 : _i.selection) === obj) {
|
|
14588
14591
|
const snap = groupShiftReflowSnapshotRef.current;
|
|
14589
14592
|
const anchorEntry = snap.children[0];
|
|
14590
14593
|
const anchorTopLive = anchorEntry.obj.top ?? 0;
|
|
@@ -14744,7 +14747,7 @@ const PageCanvas = react.forwardRef(
|
|
|
14744
14747
|
setGuides(gridGuidesForScale.length ? [...scaleGuides, ...gridGuidesForScale] : scaleGuides);
|
|
14745
14748
|
if (drilledGroupIdRef.current) {
|
|
14746
14749
|
try {
|
|
14747
|
-
(
|
|
14750
|
+
(_j = fabricCanvas.__updateDrilledGroupOutline) == null ? void 0 : _j.call(fabricCanvas);
|
|
14748
14751
|
} catch {
|
|
14749
14752
|
}
|
|
14750
14753
|
}
|
|
@@ -25153,9 +25156,9 @@ function captureFabricCanvasSvgForPdf(fabricInstance, canvasWidth, canvasHeight)
|
|
|
25153
25156
|
}
|
|
25154
25157
|
return svgString;
|
|
25155
25158
|
}
|
|
25156
|
-
const resolvedPackageVersion = "0.5.
|
|
25159
|
+
const resolvedPackageVersion = "0.5.405";
|
|
25157
25160
|
const PACKAGE_VERSION = resolvedPackageVersion;
|
|
25158
|
-
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.
|
|
25161
|
+
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.405";
|
|
25159
25162
|
const roundParityValue = (value) => {
|
|
25160
25163
|
if (typeof value !== "number") return value;
|
|
25161
25164
|
return Number.isFinite(value) ? Number(value.toFixed(3)) : value;
|
|
@@ -25969,7 +25972,7 @@ class PixldocsRenderer {
|
|
|
25969
25972
|
await this.waitForCanvasScene(container, cloned, i);
|
|
25970
25973
|
}
|
|
25971
25974
|
console.log(`[canvas-renderer][pdf-unified] mounted ${cloned.pages.length} page(s), handing off to client exportMultiPagePdf`);
|
|
25972
|
-
const { exportMultiPagePdf, preparePagesForExport } = await Promise.resolve().then(() => require("./vectorPdfExport-
|
|
25975
|
+
const { exportMultiPagePdf, preparePagesForExport } = await Promise.resolve().then(() => require("./vectorPdfExport-DSku6Anm.cjs"));
|
|
25973
25976
|
const prepared = preparePagesForExport(
|
|
25974
25977
|
cloned.pages,
|
|
25975
25978
|
canvasWidth,
|
|
@@ -28289,7 +28292,7 @@ async function prepareLiveCanvasSvgForPdf(rawSvg, pageWidth, pageHeight, pageKey
|
|
|
28289
28292
|
if (options == null ? void 0 : options.stripPageBackground) stripRootPageBackgroundFromSvg(svgToDraw);
|
|
28290
28293
|
sanitizeSvgTreeForPdf(svgToDraw);
|
|
28291
28294
|
try {
|
|
28292
|
-
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await Promise.resolve().then(() => require("./vectorPdfExport-
|
|
28295
|
+
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await Promise.resolve().then(() => require("./vectorPdfExport-DSku6Anm.cjs"));
|
|
28293
28296
|
try {
|
|
28294
28297
|
await logTextMeasurementDiagnostic(svgToDraw);
|
|
28295
28298
|
} catch {
|
|
@@ -28686,4 +28689,4 @@ exports.setAutoShrinkDebug = setAutoShrinkDebug;
|
|
|
28686
28689
|
exports.setBundledAssetPrefixes = setBundledAssetPrefixes;
|
|
28687
28690
|
exports.warmResolvedTemplateForPreview = warmResolvedTemplateForPreview;
|
|
28688
28691
|
exports.warmTemplateFromForm = warmTemplateFromForm;
|
|
28689
|
-
//# sourceMappingURL=index-
|
|
28692
|
+
//# sourceMappingURL=index-uJf5RraI.cjs.map
|