@pixldocs/canvas-renderer 0.5.252 → 0.5.254
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-9Lw_NdWM.cjs} +44 -6
- package/dist/index-9Lw_NdWM.cjs.map +1 -0
- package/dist/{index-k8vzqr4-.js → index-DNP0J9Fe.js} +44 -6
- package/dist/index-DNP0J9Fe.js.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/{vectorPdfExport-CLXGLXKP.cjs → vectorPdfExport-BpVM86xb.cjs} +4 -4
- package/dist/{vectorPdfExport-CLXGLXKP.cjs.map → vectorPdfExport-BpVM86xb.cjs.map} +1 -1
- package/dist/{vectorPdfExport-Cat5oceo.js → vectorPdfExport-MzXdlOEY.js} +4 -4
- package/dist/{vectorPdfExport-Cat5oceo.js.map → vectorPdfExport-MzXdlOEY.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
|
@@ -12033,7 +12033,7 @@ const PageCanvas = forwardRef(
|
|
|
12033
12033
|
}
|
|
12034
12034
|
});
|
|
12035
12035
|
fabricCanvas.on("object:scaling", () => {
|
|
12036
|
-
var _a2;
|
|
12036
|
+
var _a2, _b2;
|
|
12037
12037
|
fabricCanvas.__isUserTransforming = true;
|
|
12038
12038
|
if (drilledGroupIdRef.current) {
|
|
12039
12039
|
try {
|
|
@@ -12041,6 +12041,38 @@ const PageCanvas = forwardRef(
|
|
|
12041
12041
|
} catch {
|
|
12042
12042
|
}
|
|
12043
12043
|
}
|
|
12044
|
+
const active = fabricCanvas.getActiveObject();
|
|
12045
|
+
if (!active) return;
|
|
12046
|
+
const state = useEditorStore.getState();
|
|
12047
|
+
const canvasPage = (_b2 = state.canvas.pages) == null ? void 0 : _b2.find((p) => p.id === pageId);
|
|
12048
|
+
const children = (canvasPage == null ? void 0 : canvasPage.children) ?? [];
|
|
12049
|
+
if (!canvasPage) return;
|
|
12050
|
+
const ids = state.canvas.selectedIds ?? [];
|
|
12051
|
+
let selectedGroup2 = null;
|
|
12052
|
+
for (const id of ids) {
|
|
12053
|
+
const node = findNodeById(children, id);
|
|
12054
|
+
if (node && isGroup(node)) {
|
|
12055
|
+
selectedGroup2 = node;
|
|
12056
|
+
break;
|
|
12057
|
+
}
|
|
12058
|
+
}
|
|
12059
|
+
if (!selectedGroup2) {
|
|
12060
|
+
const firstId = ids[0];
|
|
12061
|
+
const parent = firstId ? findParentGroup(children, firstId) : null;
|
|
12062
|
+
if (parent) {
|
|
12063
|
+
const memberIds = new Set(getAllElementIds(parent.children ?? []));
|
|
12064
|
+
const allSelectedInGroup = ids.every((id) => memberIds.has(id) || id === parent.id);
|
|
12065
|
+
if (allSelectedInGroup) selectedGroup2 = parent;
|
|
12066
|
+
}
|
|
12067
|
+
}
|
|
12068
|
+
if (!selectedGroup2) return;
|
|
12069
|
+
const rect = active.getBoundingRect();
|
|
12070
|
+
if (rect.width > 0 && rect.height > 0) {
|
|
12071
|
+
const bounds = { left: rect.left, top: rect.top, width: rect.width, height: rect.height };
|
|
12072
|
+
flushSync(() => {
|
|
12073
|
+
setGroupOverlayLiveBoundsRef.current(bounds);
|
|
12074
|
+
});
|
|
12075
|
+
}
|
|
12044
12076
|
});
|
|
12045
12077
|
fabricCanvas.on("object:moving", () => {
|
|
12046
12078
|
var _a2, _b2;
|
|
@@ -14545,6 +14577,12 @@ const PageCanvas = forwardRef(
|
|
|
14545
14577
|
return;
|
|
14546
14578
|
}
|
|
14547
14579
|
editingTextIdRef.current = elementId || null;
|
|
14580
|
+
try {
|
|
14581
|
+
target.hasBorders = true;
|
|
14582
|
+
target.hasControls = true;
|
|
14583
|
+
target.borderColor = SELECTION_PRIMARY;
|
|
14584
|
+
} catch {
|
|
14585
|
+
}
|
|
14548
14586
|
if (target.__pixldocsEmptyPlaceholder) {
|
|
14549
14587
|
try {
|
|
14550
14588
|
target.__pixldocsEmptyPlaceholder = false;
|
|
@@ -23459,9 +23497,9 @@ function captureFabricCanvasSvgForPdf(fabricInstance, canvasWidth, canvasHeight)
|
|
|
23459
23497
|
}
|
|
23460
23498
|
return svgString;
|
|
23461
23499
|
}
|
|
23462
|
-
const resolvedPackageVersion = "0.5.
|
|
23500
|
+
const resolvedPackageVersion = "0.5.254";
|
|
23463
23501
|
const PACKAGE_VERSION = resolvedPackageVersion;
|
|
23464
|
-
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.
|
|
23502
|
+
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.254";
|
|
23465
23503
|
const roundParityValue = (value) => {
|
|
23466
23504
|
if (typeof value !== "number") return value;
|
|
23467
23505
|
return Number.isFinite(value) ? Number(value.toFixed(3)) : value;
|
|
@@ -24275,7 +24313,7 @@ class PixldocsRenderer {
|
|
|
24275
24313
|
await this.waitForCanvasScene(container, cloned, i);
|
|
24276
24314
|
}
|
|
24277
24315
|
console.log(`[canvas-renderer][pdf-unified] mounted ${cloned.pages.length} page(s), handing off to client exportMultiPagePdf`);
|
|
24278
|
-
const { exportMultiPagePdf, preparePagesForExport } = await import("./vectorPdfExport-
|
|
24316
|
+
const { exportMultiPagePdf, preparePagesForExport } = await import("./vectorPdfExport-MzXdlOEY.js");
|
|
24279
24317
|
const prepared = preparePagesForExport(
|
|
24280
24318
|
cloned.pages,
|
|
24281
24319
|
canvasWidth,
|
|
@@ -26595,7 +26633,7 @@ async function prepareLiveCanvasSvgForPdf(rawSvg, pageWidth, pageHeight, pageKey
|
|
|
26595
26633
|
if (options == null ? void 0 : options.stripPageBackground) stripRootPageBackgroundFromSvg(svgToDraw);
|
|
26596
26634
|
sanitizeSvgTreeForPdf(svgToDraw);
|
|
26597
26635
|
try {
|
|
26598
|
-
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await import("./vectorPdfExport-
|
|
26636
|
+
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await import("./vectorPdfExport-MzXdlOEY.js");
|
|
26599
26637
|
try {
|
|
26600
26638
|
await logTextMeasurementDiagnostic(svgToDraw);
|
|
26601
26639
|
} catch {
|
|
@@ -26995,4 +27033,4 @@ export {
|
|
|
26995
27033
|
buildTeaserBlurFlatKeys as y,
|
|
26996
27034
|
collectFontDescriptorsFromConfig as z
|
|
26997
27035
|
};
|
|
26998
|
-
//# sourceMappingURL=index-
|
|
27036
|
+
//# sourceMappingURL=index-DNP0J9Fe.js.map
|