@pixldocs/canvas-renderer 0.5.252 → 0.5.253
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-DifGYkqE.cjs → index-BTDu7FNP.cjs} +38 -6
- package/dist/index-BTDu7FNP.cjs.map +1 -0
- package/dist/{index-k8vzqr4-.js → index-BsuNRFPC.js} +38 -6
- package/dist/index-BsuNRFPC.js.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/{vectorPdfExport-CLXGLXKP.cjs → vectorPdfExport-BNcQDkad.cjs} +4 -4
- package/dist/{vectorPdfExport-CLXGLXKP.cjs.map → vectorPdfExport-BNcQDkad.cjs.map} +1 -1
- package/dist/{vectorPdfExport-Cat5oceo.js → vectorPdfExport-DyfBSeYs.js} +4 -4
- package/dist/{vectorPdfExport-Cat5oceo.js.map → vectorPdfExport-DyfBSeYs.js.map} +1 -1
- package/package.json +1 -1
- package/dist/index-DifGYkqE.cjs.map +0 -1
- package/dist/index-k8vzqr4-.js.map +0 -1
|
@@ -12051,7 +12051,7 @@ const PageCanvas = react.forwardRef(
|
|
|
12051
12051
|
}
|
|
12052
12052
|
});
|
|
12053
12053
|
fabricCanvas.on("object:scaling", () => {
|
|
12054
|
-
var _a2;
|
|
12054
|
+
var _a2, _b2;
|
|
12055
12055
|
fabricCanvas.__isUserTransforming = true;
|
|
12056
12056
|
if (drilledGroupIdRef.current) {
|
|
12057
12057
|
try {
|
|
@@ -12059,6 +12059,38 @@ const PageCanvas = react.forwardRef(
|
|
|
12059
12059
|
} catch {
|
|
12060
12060
|
}
|
|
12061
12061
|
}
|
|
12062
|
+
const active = fabricCanvas.getActiveObject();
|
|
12063
|
+
if (!active) return;
|
|
12064
|
+
const state = useEditorStore.getState();
|
|
12065
|
+
const canvasPage = (_b2 = state.canvas.pages) == null ? void 0 : _b2.find((p) => p.id === pageId);
|
|
12066
|
+
const children = (canvasPage == null ? void 0 : canvasPage.children) ?? [];
|
|
12067
|
+
if (!canvasPage) return;
|
|
12068
|
+
const ids = state.canvas.selectedIds ?? [];
|
|
12069
|
+
let selectedGroup2 = null;
|
|
12070
|
+
for (const id of ids) {
|
|
12071
|
+
const node = findNodeById(children, id);
|
|
12072
|
+
if (node && isGroup(node)) {
|
|
12073
|
+
selectedGroup2 = node;
|
|
12074
|
+
break;
|
|
12075
|
+
}
|
|
12076
|
+
}
|
|
12077
|
+
if (!selectedGroup2) {
|
|
12078
|
+
const firstId = ids[0];
|
|
12079
|
+
const parent = firstId ? findParentGroup(children, firstId) : null;
|
|
12080
|
+
if (parent) {
|
|
12081
|
+
const memberIds = new Set(getAllElementIds(parent.children ?? []));
|
|
12082
|
+
const allSelectedInGroup = ids.every((id) => memberIds.has(id) || id === parent.id);
|
|
12083
|
+
if (allSelectedInGroup) selectedGroup2 = parent;
|
|
12084
|
+
}
|
|
12085
|
+
}
|
|
12086
|
+
if (!selectedGroup2) return;
|
|
12087
|
+
const rect = active.getBoundingRect();
|
|
12088
|
+
if (rect.width > 0 && rect.height > 0) {
|
|
12089
|
+
const bounds = { left: rect.left, top: rect.top, width: rect.width, height: rect.height };
|
|
12090
|
+
reactDom.flushSync(() => {
|
|
12091
|
+
setGroupOverlayLiveBoundsRef.current(bounds);
|
|
12092
|
+
});
|
|
12093
|
+
}
|
|
12062
12094
|
});
|
|
12063
12095
|
fabricCanvas.on("object:moving", () => {
|
|
12064
12096
|
var _a2, _b2;
|
|
@@ -23477,9 +23509,9 @@ function captureFabricCanvasSvgForPdf(fabricInstance, canvasWidth, canvasHeight)
|
|
|
23477
23509
|
}
|
|
23478
23510
|
return svgString;
|
|
23479
23511
|
}
|
|
23480
|
-
const resolvedPackageVersion = "0.5.
|
|
23512
|
+
const resolvedPackageVersion = "0.5.253";
|
|
23481
23513
|
const PACKAGE_VERSION = resolvedPackageVersion;
|
|
23482
|
-
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.
|
|
23514
|
+
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.253";
|
|
23483
23515
|
const roundParityValue = (value) => {
|
|
23484
23516
|
if (typeof value !== "number") return value;
|
|
23485
23517
|
return Number.isFinite(value) ? Number(value.toFixed(3)) : value;
|
|
@@ -24293,7 +24325,7 @@ class PixldocsRenderer {
|
|
|
24293
24325
|
await this.waitForCanvasScene(container, cloned, i);
|
|
24294
24326
|
}
|
|
24295
24327
|
console.log(`[canvas-renderer][pdf-unified] mounted ${cloned.pages.length} page(s), handing off to client exportMultiPagePdf`);
|
|
24296
|
-
const { exportMultiPagePdf, preparePagesForExport } = await Promise.resolve().then(() => require("./vectorPdfExport-
|
|
24328
|
+
const { exportMultiPagePdf, preparePagesForExport } = await Promise.resolve().then(() => require("./vectorPdfExport-BNcQDkad.cjs"));
|
|
24297
24329
|
const prepared = preparePagesForExport(
|
|
24298
24330
|
cloned.pages,
|
|
24299
24331
|
canvasWidth,
|
|
@@ -26613,7 +26645,7 @@ async function prepareLiveCanvasSvgForPdf(rawSvg, pageWidth, pageHeight, pageKey
|
|
|
26613
26645
|
if (options == null ? void 0 : options.stripPageBackground) stripRootPageBackgroundFromSvg(svgToDraw);
|
|
26614
26646
|
sanitizeSvgTreeForPdf(svgToDraw);
|
|
26615
26647
|
try {
|
|
26616
|
-
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await Promise.resolve().then(() => require("./vectorPdfExport-
|
|
26648
|
+
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await Promise.resolve().then(() => require("./vectorPdfExport-BNcQDkad.cjs"));
|
|
26617
26649
|
try {
|
|
26618
26650
|
await logTextMeasurementDiagnostic(svgToDraw);
|
|
26619
26651
|
} catch {
|
|
@@ -27010,4 +27042,4 @@ exports.setAutoShrinkDebug = setAutoShrinkDebug;
|
|
|
27010
27042
|
exports.setBundledAssetPrefixes = setBundledAssetPrefixes;
|
|
27011
27043
|
exports.warmResolvedTemplateForPreview = warmResolvedTemplateForPreview;
|
|
27012
27044
|
exports.warmTemplateFromForm = warmTemplateFromForm;
|
|
27013
|
-
//# sourceMappingURL=index-
|
|
27045
|
+
//# sourceMappingURL=index-BTDu7FNP.cjs.map
|