@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
|
@@ -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;
|
|
@@ -14563,6 +14595,12 @@ const PageCanvas = react.forwardRef(
|
|
|
14563
14595
|
return;
|
|
14564
14596
|
}
|
|
14565
14597
|
editingTextIdRef.current = elementId || null;
|
|
14598
|
+
try {
|
|
14599
|
+
target.hasBorders = true;
|
|
14600
|
+
target.hasControls = true;
|
|
14601
|
+
target.borderColor = SELECTION_PRIMARY;
|
|
14602
|
+
} catch {
|
|
14603
|
+
}
|
|
14566
14604
|
if (target.__pixldocsEmptyPlaceholder) {
|
|
14567
14605
|
try {
|
|
14568
14606
|
target.__pixldocsEmptyPlaceholder = false;
|
|
@@ -23477,9 +23515,9 @@ function captureFabricCanvasSvgForPdf(fabricInstance, canvasWidth, canvasHeight)
|
|
|
23477
23515
|
}
|
|
23478
23516
|
return svgString;
|
|
23479
23517
|
}
|
|
23480
|
-
const resolvedPackageVersion = "0.5.
|
|
23518
|
+
const resolvedPackageVersion = "0.5.254";
|
|
23481
23519
|
const PACKAGE_VERSION = resolvedPackageVersion;
|
|
23482
|
-
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.
|
|
23520
|
+
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.254";
|
|
23483
23521
|
const roundParityValue = (value) => {
|
|
23484
23522
|
if (typeof value !== "number") return value;
|
|
23485
23523
|
return Number.isFinite(value) ? Number(value.toFixed(3)) : value;
|
|
@@ -24293,7 +24331,7 @@ class PixldocsRenderer {
|
|
|
24293
24331
|
await this.waitForCanvasScene(container, cloned, i);
|
|
24294
24332
|
}
|
|
24295
24333
|
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-
|
|
24334
|
+
const { exportMultiPagePdf, preparePagesForExport } = await Promise.resolve().then(() => require("./vectorPdfExport-BpVM86xb.cjs"));
|
|
24297
24335
|
const prepared = preparePagesForExport(
|
|
24298
24336
|
cloned.pages,
|
|
24299
24337
|
canvasWidth,
|
|
@@ -26613,7 +26651,7 @@ async function prepareLiveCanvasSvgForPdf(rawSvg, pageWidth, pageHeight, pageKey
|
|
|
26613
26651
|
if (options == null ? void 0 : options.stripPageBackground) stripRootPageBackgroundFromSvg(svgToDraw);
|
|
26614
26652
|
sanitizeSvgTreeForPdf(svgToDraw);
|
|
26615
26653
|
try {
|
|
26616
|
-
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await Promise.resolve().then(() => require("./vectorPdfExport-
|
|
26654
|
+
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await Promise.resolve().then(() => require("./vectorPdfExport-BpVM86xb.cjs"));
|
|
26617
26655
|
try {
|
|
26618
26656
|
await logTextMeasurementDiagnostic(svgToDraw);
|
|
26619
26657
|
} catch {
|
|
@@ -27010,4 +27048,4 @@ exports.setAutoShrinkDebug = setAutoShrinkDebug;
|
|
|
27010
27048
|
exports.setBundledAssetPrefixes = setBundledAssetPrefixes;
|
|
27011
27049
|
exports.warmResolvedTemplateForPreview = warmResolvedTemplateForPreview;
|
|
27012
27050
|
exports.warmTemplateFromForm = warmTemplateFromForm;
|
|
27013
|
-
//# sourceMappingURL=index-
|
|
27051
|
+
//# sourceMappingURL=index-9Lw_NdWM.cjs.map
|