@pixldocs/canvas-renderer 0.5.260 → 0.5.262
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-Dh9WY10e.js → index-BT_fzwgm.js} +53 -9
- package/dist/index-BT_fzwgm.js.map +1 -0
- package/dist/{index-iahevkuu.cjs → index-CjmYCoaf.cjs} +53 -9
- package/dist/index-CjmYCoaf.cjs.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/{vectorPdfExport-D4Vl-GPD.js → vectorPdfExport-BlbjTsRn.js} +4 -4
- package/dist/{vectorPdfExport-D4Vl-GPD.js.map → vectorPdfExport-BlbjTsRn.js.map} +1 -1
- package/dist/{vectorPdfExport-DuUmVQWJ.cjs → vectorPdfExport-DItLh5J4.cjs} +4 -4
- package/dist/{vectorPdfExport-DuUmVQWJ.cjs.map → vectorPdfExport-DItLh5J4.cjs.map} +1 -1
- package/package.json +1 -1
- package/dist/index-Dh9WY10e.js.map +0 -1
- package/dist/index-iahevkuu.cjs.map +0 -1
|
@@ -13159,7 +13159,28 @@ const PageCanvas = forwardRef(
|
|
|
13159
13159
|
dragStarted = false;
|
|
13160
13160
|
const pendingDrillIn = pendingGroupDrillInRef.current;
|
|
13161
13161
|
pendingGroupDrillInRef.current = null;
|
|
13162
|
-
if (pendingDrillIn &&
|
|
13162
|
+
if (pendingDrillIn && didTransformRef.current) {
|
|
13163
|
+
const activeNow = fabricCanvas.getActiveObject();
|
|
13164
|
+
fabricCanvas.__activeEditingGroupId = null;
|
|
13165
|
+
setDrilledGroupBounds(null);
|
|
13166
|
+
drilledGroupIdRef.current = null;
|
|
13167
|
+
if (activeNow instanceof fabric.ActiveSelection) {
|
|
13168
|
+
restoreGroupSelectionVisualState(activeNow, pendingDrillIn.groupId);
|
|
13169
|
+
activeNow.setCoords();
|
|
13170
|
+
fabricCanvas.requestRenderAll();
|
|
13171
|
+
}
|
|
13172
|
+
const pageNow = useEditorStore.getState().canvas.pages.find((p) => p.id === pageId);
|
|
13173
|
+
const groupNode = pageNow ? findNodeById(pageNow.children ?? [], pendingDrillIn.groupId) : null;
|
|
13174
|
+
const memberIds = groupNode && isGroup(groupNode) ? getAllElementIds(groupNode.children ?? []) : [];
|
|
13175
|
+
if (memberIds.length > 1) {
|
|
13176
|
+
restorePreservedGroupSelectionSoon({
|
|
13177
|
+
memberIds,
|
|
13178
|
+
groupSelectionId: pendingDrillIn.groupId
|
|
13179
|
+
});
|
|
13180
|
+
} else {
|
|
13181
|
+
selectElements([pendingDrillIn.groupId], false, false);
|
|
13182
|
+
}
|
|
13183
|
+
} else if (pendingDrillIn && !didTransformRef.current) {
|
|
13163
13184
|
const activeNow = fabricCanvas.getActiveObject();
|
|
13164
13185
|
if (activeNow !== pendingDrillIn.target) {
|
|
13165
13186
|
isSyncingSelectionToFabricRef.current = true;
|
|
@@ -13487,6 +13508,8 @@ const PageCanvas = forwardRef(
|
|
|
13487
13508
|
const asSy0 = obj.scaleY ?? 1;
|
|
13488
13509
|
const asLeft0 = obj.left ?? 0;
|
|
13489
13510
|
const asTop0 = obj.top ?? 0;
|
|
13511
|
+
const asRect0 = obj.getBoundingRect();
|
|
13512
|
+
let didReflowTextChild = false;
|
|
13490
13513
|
for (const child of obj.getObjects()) {
|
|
13491
13514
|
if (!(child instanceof fabric.Textbox)) continue;
|
|
13492
13515
|
if (isXSide) {
|
|
@@ -13502,7 +13525,9 @@ const PageCanvas = forwardRef(
|
|
|
13502
13525
|
child.initDimensions();
|
|
13503
13526
|
} catch {
|
|
13504
13527
|
}
|
|
13528
|
+
child.setCoords();
|
|
13505
13529
|
child.dirty = true;
|
|
13530
|
+
didReflowTextChild = true;
|
|
13506
13531
|
}
|
|
13507
13532
|
} else {
|
|
13508
13533
|
if (child.__asLiveOrigH == null) {
|
|
@@ -13516,16 +13541,35 @@ const PageCanvas = forwardRef(
|
|
|
13516
13541
|
child.initDimensions();
|
|
13517
13542
|
} catch {
|
|
13518
13543
|
}
|
|
13544
|
+
child.setCoords();
|
|
13519
13545
|
child.dirty = true;
|
|
13546
|
+
didReflowTextChild = true;
|
|
13520
13547
|
}
|
|
13521
13548
|
}
|
|
13549
|
+
if (isXSide && didReflowTextChild && typeof obj.triggerLayout === "function") {
|
|
13550
|
+
try {
|
|
13551
|
+
obj.triggerLayout();
|
|
13552
|
+
} catch {
|
|
13553
|
+
}
|
|
13554
|
+
obj._set("width", asW0);
|
|
13555
|
+
obj._set("scaleX", asSx0);
|
|
13556
|
+
obj._set("scaleY", asSy0);
|
|
13557
|
+
obj.setCoords();
|
|
13558
|
+
const afterRect = obj.getBoundingRect();
|
|
13559
|
+
const fixedLeft = asRect0.left;
|
|
13560
|
+
const fixedRight = asRect0.left + asRect0.width;
|
|
13561
|
+
const nextLeft = corner === "ml" ? (obj.left ?? 0) + (fixedRight - (afterRect.left + afterRect.width)) : (obj.left ?? 0) + (fixedLeft - afterRect.left);
|
|
13562
|
+
obj._set("left", nextLeft);
|
|
13563
|
+
} else {
|
|
13564
|
+
obj._set("height", asH0);
|
|
13565
|
+
obj._set("left", asLeft0);
|
|
13566
|
+
obj._set("top", asTop0);
|
|
13567
|
+
}
|
|
13522
13568
|
obj._set("width", asW0);
|
|
13523
|
-
obj._set("height", asH0);
|
|
13524
13569
|
obj._set("scaleX", asSx0);
|
|
13525
13570
|
obj._set("scaleY", asSy0);
|
|
13526
|
-
obj._set("left", asLeft0);
|
|
13527
|
-
obj._set("top", asTop0);
|
|
13528
13571
|
obj.setCoords();
|
|
13572
|
+
obj.dirty = true;
|
|
13529
13573
|
}
|
|
13530
13574
|
}
|
|
13531
13575
|
snapDuringScaleCallback(obj, corner);
|
|
@@ -23542,9 +23586,9 @@ function captureFabricCanvasSvgForPdf(fabricInstance, canvasWidth, canvasHeight)
|
|
|
23542
23586
|
}
|
|
23543
23587
|
return svgString;
|
|
23544
23588
|
}
|
|
23545
|
-
const resolvedPackageVersion = "0.5.
|
|
23589
|
+
const resolvedPackageVersion = "0.5.262";
|
|
23546
23590
|
const PACKAGE_VERSION = resolvedPackageVersion;
|
|
23547
|
-
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.
|
|
23591
|
+
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.262";
|
|
23548
23592
|
const roundParityValue = (value) => {
|
|
23549
23593
|
if (typeof value !== "number") return value;
|
|
23550
23594
|
return Number.isFinite(value) ? Number(value.toFixed(3)) : value;
|
|
@@ -24358,7 +24402,7 @@ class PixldocsRenderer {
|
|
|
24358
24402
|
await this.waitForCanvasScene(container, cloned, i);
|
|
24359
24403
|
}
|
|
24360
24404
|
console.log(`[canvas-renderer][pdf-unified] mounted ${cloned.pages.length} page(s), handing off to client exportMultiPagePdf`);
|
|
24361
|
-
const { exportMultiPagePdf, preparePagesForExport } = await import("./vectorPdfExport-
|
|
24405
|
+
const { exportMultiPagePdf, preparePagesForExport } = await import("./vectorPdfExport-BlbjTsRn.js");
|
|
24362
24406
|
const prepared = preparePagesForExport(
|
|
24363
24407
|
cloned.pages,
|
|
24364
24408
|
canvasWidth,
|
|
@@ -26678,7 +26722,7 @@ async function prepareLiveCanvasSvgForPdf(rawSvg, pageWidth, pageHeight, pageKey
|
|
|
26678
26722
|
if (options == null ? void 0 : options.stripPageBackground) stripRootPageBackgroundFromSvg(svgToDraw);
|
|
26679
26723
|
sanitizeSvgTreeForPdf(svgToDraw);
|
|
26680
26724
|
try {
|
|
26681
|
-
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await import("./vectorPdfExport-
|
|
26725
|
+
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await import("./vectorPdfExport-BlbjTsRn.js");
|
|
26682
26726
|
try {
|
|
26683
26727
|
await logTextMeasurementDiagnostic(svgToDraw);
|
|
26684
26728
|
} catch {
|
|
@@ -27078,4 +27122,4 @@ export {
|
|
|
27078
27122
|
buildTeaserBlurFlatKeys as y,
|
|
27079
27123
|
collectFontDescriptorsFromConfig as z
|
|
27080
27124
|
};
|
|
27081
|
-
//# sourceMappingURL=index-
|
|
27125
|
+
//# sourceMappingURL=index-BT_fzwgm.js.map
|