@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
|
@@ -13177,7 +13177,28 @@ const PageCanvas = react.forwardRef(
|
|
|
13177
13177
|
dragStarted = false;
|
|
13178
13178
|
const pendingDrillIn = pendingGroupDrillInRef.current;
|
|
13179
13179
|
pendingGroupDrillInRef.current = null;
|
|
13180
|
-
if (pendingDrillIn &&
|
|
13180
|
+
if (pendingDrillIn && didTransformRef.current) {
|
|
13181
|
+
const activeNow = fabricCanvas.getActiveObject();
|
|
13182
|
+
fabricCanvas.__activeEditingGroupId = null;
|
|
13183
|
+
setDrilledGroupBounds(null);
|
|
13184
|
+
drilledGroupIdRef.current = null;
|
|
13185
|
+
if (activeNow instanceof fabric__namespace.ActiveSelection) {
|
|
13186
|
+
restoreGroupSelectionVisualState(activeNow, pendingDrillIn.groupId);
|
|
13187
|
+
activeNow.setCoords();
|
|
13188
|
+
fabricCanvas.requestRenderAll();
|
|
13189
|
+
}
|
|
13190
|
+
const pageNow = useEditorStore.getState().canvas.pages.find((p) => p.id === pageId);
|
|
13191
|
+
const groupNode = pageNow ? findNodeById(pageNow.children ?? [], pendingDrillIn.groupId) : null;
|
|
13192
|
+
const memberIds = groupNode && isGroup(groupNode) ? getAllElementIds(groupNode.children ?? []) : [];
|
|
13193
|
+
if (memberIds.length > 1) {
|
|
13194
|
+
restorePreservedGroupSelectionSoon({
|
|
13195
|
+
memberIds,
|
|
13196
|
+
groupSelectionId: pendingDrillIn.groupId
|
|
13197
|
+
});
|
|
13198
|
+
} else {
|
|
13199
|
+
selectElements([pendingDrillIn.groupId], false, false);
|
|
13200
|
+
}
|
|
13201
|
+
} else if (pendingDrillIn && !didTransformRef.current) {
|
|
13181
13202
|
const activeNow = fabricCanvas.getActiveObject();
|
|
13182
13203
|
if (activeNow !== pendingDrillIn.target) {
|
|
13183
13204
|
isSyncingSelectionToFabricRef.current = true;
|
|
@@ -13505,6 +13526,8 @@ const PageCanvas = react.forwardRef(
|
|
|
13505
13526
|
const asSy0 = obj.scaleY ?? 1;
|
|
13506
13527
|
const asLeft0 = obj.left ?? 0;
|
|
13507
13528
|
const asTop0 = obj.top ?? 0;
|
|
13529
|
+
const asRect0 = obj.getBoundingRect();
|
|
13530
|
+
let didReflowTextChild = false;
|
|
13508
13531
|
for (const child of obj.getObjects()) {
|
|
13509
13532
|
if (!(child instanceof fabric__namespace.Textbox)) continue;
|
|
13510
13533
|
if (isXSide) {
|
|
@@ -13520,7 +13543,9 @@ const PageCanvas = react.forwardRef(
|
|
|
13520
13543
|
child.initDimensions();
|
|
13521
13544
|
} catch {
|
|
13522
13545
|
}
|
|
13546
|
+
child.setCoords();
|
|
13523
13547
|
child.dirty = true;
|
|
13548
|
+
didReflowTextChild = true;
|
|
13524
13549
|
}
|
|
13525
13550
|
} else {
|
|
13526
13551
|
if (child.__asLiveOrigH == null) {
|
|
@@ -13534,16 +13559,35 @@ const PageCanvas = react.forwardRef(
|
|
|
13534
13559
|
child.initDimensions();
|
|
13535
13560
|
} catch {
|
|
13536
13561
|
}
|
|
13562
|
+
child.setCoords();
|
|
13537
13563
|
child.dirty = true;
|
|
13564
|
+
didReflowTextChild = true;
|
|
13538
13565
|
}
|
|
13539
13566
|
}
|
|
13567
|
+
if (isXSide && didReflowTextChild && typeof obj.triggerLayout === "function") {
|
|
13568
|
+
try {
|
|
13569
|
+
obj.triggerLayout();
|
|
13570
|
+
} catch {
|
|
13571
|
+
}
|
|
13572
|
+
obj._set("width", asW0);
|
|
13573
|
+
obj._set("scaleX", asSx0);
|
|
13574
|
+
obj._set("scaleY", asSy0);
|
|
13575
|
+
obj.setCoords();
|
|
13576
|
+
const afterRect = obj.getBoundingRect();
|
|
13577
|
+
const fixedLeft = asRect0.left;
|
|
13578
|
+
const fixedRight = asRect0.left + asRect0.width;
|
|
13579
|
+
const nextLeft = corner === "ml" ? (obj.left ?? 0) + (fixedRight - (afterRect.left + afterRect.width)) : (obj.left ?? 0) + (fixedLeft - afterRect.left);
|
|
13580
|
+
obj._set("left", nextLeft);
|
|
13581
|
+
} else {
|
|
13582
|
+
obj._set("height", asH0);
|
|
13583
|
+
obj._set("left", asLeft0);
|
|
13584
|
+
obj._set("top", asTop0);
|
|
13585
|
+
}
|
|
13540
13586
|
obj._set("width", asW0);
|
|
13541
|
-
obj._set("height", asH0);
|
|
13542
13587
|
obj._set("scaleX", asSx0);
|
|
13543
13588
|
obj._set("scaleY", asSy0);
|
|
13544
|
-
obj._set("left", asLeft0);
|
|
13545
|
-
obj._set("top", asTop0);
|
|
13546
13589
|
obj.setCoords();
|
|
13590
|
+
obj.dirty = true;
|
|
13547
13591
|
}
|
|
13548
13592
|
}
|
|
13549
13593
|
snapDuringScaleCallback(obj, corner);
|
|
@@ -23560,9 +23604,9 @@ function captureFabricCanvasSvgForPdf(fabricInstance, canvasWidth, canvasHeight)
|
|
|
23560
23604
|
}
|
|
23561
23605
|
return svgString;
|
|
23562
23606
|
}
|
|
23563
|
-
const resolvedPackageVersion = "0.5.
|
|
23607
|
+
const resolvedPackageVersion = "0.5.262";
|
|
23564
23608
|
const PACKAGE_VERSION = resolvedPackageVersion;
|
|
23565
|
-
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.
|
|
23609
|
+
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.262";
|
|
23566
23610
|
const roundParityValue = (value) => {
|
|
23567
23611
|
if (typeof value !== "number") return value;
|
|
23568
23612
|
return Number.isFinite(value) ? Number(value.toFixed(3)) : value;
|
|
@@ -24376,7 +24420,7 @@ class PixldocsRenderer {
|
|
|
24376
24420
|
await this.waitForCanvasScene(container, cloned, i);
|
|
24377
24421
|
}
|
|
24378
24422
|
console.log(`[canvas-renderer][pdf-unified] mounted ${cloned.pages.length} page(s), handing off to client exportMultiPagePdf`);
|
|
24379
|
-
const { exportMultiPagePdf, preparePagesForExport } = await Promise.resolve().then(() => require("./vectorPdfExport-
|
|
24423
|
+
const { exportMultiPagePdf, preparePagesForExport } = await Promise.resolve().then(() => require("./vectorPdfExport-DItLh5J4.cjs"));
|
|
24380
24424
|
const prepared = preparePagesForExport(
|
|
24381
24425
|
cloned.pages,
|
|
24382
24426
|
canvasWidth,
|
|
@@ -26696,7 +26740,7 @@ async function prepareLiveCanvasSvgForPdf(rawSvg, pageWidth, pageHeight, pageKey
|
|
|
26696
26740
|
if (options == null ? void 0 : options.stripPageBackground) stripRootPageBackgroundFromSvg(svgToDraw);
|
|
26697
26741
|
sanitizeSvgTreeForPdf(svgToDraw);
|
|
26698
26742
|
try {
|
|
26699
|
-
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await Promise.resolve().then(() => require("./vectorPdfExport-
|
|
26743
|
+
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await Promise.resolve().then(() => require("./vectorPdfExport-DItLh5J4.cjs"));
|
|
26700
26744
|
try {
|
|
26701
26745
|
await logTextMeasurementDiagnostic(svgToDraw);
|
|
26702
26746
|
} catch {
|
|
@@ -27093,4 +27137,4 @@ exports.setAutoShrinkDebug = setAutoShrinkDebug;
|
|
|
27093
27137
|
exports.setBundledAssetPrefixes = setBundledAssetPrefixes;
|
|
27094
27138
|
exports.warmResolvedTemplateForPreview = warmResolvedTemplateForPreview;
|
|
27095
27139
|
exports.warmTemplateFromForm = warmTemplateFromForm;
|
|
27096
|
-
//# sourceMappingURL=index-
|
|
27140
|
+
//# sourceMappingURL=index-CjmYCoaf.cjs.map
|