@pixldocs/canvas-renderer 0.5.333 → 0.5.335
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-k8mzlqgs.cjs → index-DDHvGuGr.cjs} +35 -13
- package/dist/index-DDHvGuGr.cjs.map +1 -0
- package/dist/{index-CAdMLx_E.js → index-DpMLP8sp.js} +35 -13
- package/dist/index-DpMLP8sp.js.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/{vectorPdfExport-BSV5NYSE.js → vectorPdfExport-D2ai2jn2.js} +4 -4
- package/dist/{vectorPdfExport-BSV5NYSE.js.map → vectorPdfExport-D2ai2jn2.js.map} +1 -1
- package/dist/{vectorPdfExport-Cc-1U0NL.cjs → vectorPdfExport-_BIQ9o7V.cjs} +4 -4
- package/dist/{vectorPdfExport-Cc-1U0NL.cjs.map → vectorPdfExport-_BIQ9o7V.cjs.map} +1 -1
- package/package.json +1 -1
- package/dist/index-CAdMLx_E.js.map +0 -1
- package/dist/index-k8mzlqgs.cjs.map +0 -1
|
@@ -13619,10 +13619,30 @@ const PageCanvas = react.forwardRef(
|
|
|
13619
13619
|
fabricCanvas.on("selection:cleared", () => {
|
|
13620
13620
|
});
|
|
13621
13621
|
fabricCanvas.on("object:scaling", (e) => {
|
|
13622
|
-
var _a2, _b2, _c, _d, _e, _f;
|
|
13622
|
+
var _a2, _b2, _c, _d, _e, _f, _g, _h;
|
|
13623
13623
|
if (!isActiveRef.current) return;
|
|
13624
13624
|
const t = e.target;
|
|
13625
13625
|
if (t) lastResizeScaleTargetRef.current = t;
|
|
13626
|
+
try {
|
|
13627
|
+
const transformDbg = e.transform;
|
|
13628
|
+
const cornerDbg = (transformDbg == null ? void 0 : transformDbg.corner) || "";
|
|
13629
|
+
const children = t instanceof fabric__namespace.Group || t instanceof fabric__namespace.ActiveSelection ? t.getObjects() : [];
|
|
13630
|
+
logGroupImageResizeDebug("scaling-entry", {
|
|
13631
|
+
time: Math.round(performance.now()),
|
|
13632
|
+
corner: cornerDbg,
|
|
13633
|
+
targetType: t == null ? void 0 : t.type,
|
|
13634
|
+
targetCtor: (_a2 = t == null ? void 0 : t.constructor) == null ? void 0 : _a2.name,
|
|
13635
|
+
isActiveSelection: t instanceof fabric__namespace.ActiveSelection,
|
|
13636
|
+
isGroup: t instanceof fabric__namespace.Group,
|
|
13637
|
+
isCropGroup: !!(t && (t.__cropGroup || ((_b2 = t._ct) == null ? void 0 : _b2.isCropGroup))),
|
|
13638
|
+
childCount: children.length,
|
|
13639
|
+
childTypes: children.map((c) => c == null ? void 0 : c.type),
|
|
13640
|
+
hasImageChild: children.some((c) => isGroupResizeImageLikeObject(c)),
|
|
13641
|
+
target: t ? summarizeFabricObjectForResizeDebug(t) : null
|
|
13642
|
+
});
|
|
13643
|
+
} catch (err) {
|
|
13644
|
+
console.warn("[Pixldocs][group-image-side-resize] scaling-entry log failed", err);
|
|
13645
|
+
}
|
|
13626
13646
|
prepareGroupSelectionTransformStart(t);
|
|
13627
13647
|
markTransforming(t);
|
|
13628
13648
|
didTransformRef.current = true;
|
|
@@ -13786,7 +13806,7 @@ const PageCanvas = react.forwardRef(
|
|
|
13786
13806
|
time: Math.round(performance.now()),
|
|
13787
13807
|
corner,
|
|
13788
13808
|
groupSelectionId: obj.__pixldocsGroupSelection,
|
|
13789
|
-
currentTransformAction: (
|
|
13809
|
+
currentTransformAction: (_c = fabricCanvas._currentTransform) == null ? void 0 : _c.action,
|
|
13790
13810
|
selection: summarizeFabricObjectForResizeDebug(obj),
|
|
13791
13811
|
textChildren: obj.getObjects().filter((child) => child instanceof fabric__namespace.Textbox).map((child) => summarizeFabricObjectForResizeDebug(child))
|
|
13792
13812
|
};
|
|
@@ -13818,13 +13838,13 @@ const PageCanvas = react.forwardRef(
|
|
|
13818
13838
|
children: obj.getObjects().map((child) => summarizeFabricObjectForResizeDebug(child))
|
|
13819
13839
|
});
|
|
13820
13840
|
}
|
|
13821
|
-
if ((isXSide || shouldPinNonTextChildren) && ((
|
|
13841
|
+
if ((isXSide || shouldPinNonTextChildren) && ((_d = groupShiftReflowSnapshotRef.current) == null ? void 0 : _d.selection) !== obj) {
|
|
13822
13842
|
groupShiftReflowSnapshotRef.current = null;
|
|
13823
13843
|
const logicalGroupId = obj.__pixldocsGroupSelection;
|
|
13824
13844
|
if (logicalGroupId) {
|
|
13825
13845
|
try {
|
|
13826
13846
|
const state = useEditorStore.getState();
|
|
13827
|
-
const pageChildren2 = ((
|
|
13847
|
+
const pageChildren2 = ((_e = state.canvas.pages.find((p) => p.id === pageId)) == null ? void 0 : _e.children) ?? [];
|
|
13828
13848
|
const groupNode = findNodeById(pageChildren2, logicalGroupId);
|
|
13829
13849
|
if (groupNode && isGroup(groupNode) && !isStackLayoutMode(groupNode.layoutMode)) {
|
|
13830
13850
|
const entries = obj.getObjects().map((c) => ({
|
|
@@ -13921,7 +13941,7 @@ const PageCanvas = react.forwardRef(
|
|
|
13921
13941
|
else child._set("top", entry.top0 * sAxis);
|
|
13922
13942
|
};
|
|
13923
13943
|
for (const child of obj.getObjects()) {
|
|
13924
|
-
if (child instanceof fabric__namespace.Group && (child.__cropGroup || ((
|
|
13944
|
+
if (child instanceof fabric__namespace.Group && (child.__cropGroup || ((_f = child._ct) == null ? void 0 : _f.isCropGroup))) {
|
|
13925
13945
|
const beforeImageChildResize = shouldDebugGroupImageResize ? summarizeFabricObjectForResizeDebug(child) : null;
|
|
13926
13946
|
const ct = child.__cropData;
|
|
13927
13947
|
if (ct) {
|
|
@@ -14033,7 +14053,7 @@ const PageCanvas = react.forwardRef(
|
|
|
14033
14053
|
didReflowTextChild = true;
|
|
14034
14054
|
}
|
|
14035
14055
|
}
|
|
14036
|
-
if (isXSide && !shouldPinNonTextChildren && ((
|
|
14056
|
+
if (isXSide && !shouldPinNonTextChildren && ((_g = groupShiftReflowSnapshotRef.current) == null ? void 0 : _g.selection) === obj) {
|
|
14037
14057
|
const snap = groupShiftReflowSnapshotRef.current;
|
|
14038
14058
|
const anchorEntry = snap.children[0];
|
|
14039
14059
|
const anchorTopLive = anchorEntry.obj.top ?? 0;
|
|
@@ -14215,7 +14235,7 @@ const PageCanvas = react.forwardRef(
|
|
|
14215
14235
|
setGuides(gridGuidesForScale.length ? [...scaleGuides, ...gridGuidesForScale] : scaleGuides);
|
|
14216
14236
|
if (drilledGroupIdRef.current) {
|
|
14217
14237
|
try {
|
|
14218
|
-
(
|
|
14238
|
+
(_h = fabricCanvas.__updateDrilledGroupOutline) == null ? void 0 : _h.call(fabricCanvas);
|
|
14219
14239
|
} catch {
|
|
14220
14240
|
}
|
|
14221
14241
|
}
|
|
@@ -14766,7 +14786,7 @@ const PageCanvas = react.forwardRef(
|
|
|
14766
14786
|
}
|
|
14767
14787
|
}
|
|
14768
14788
|
const isActiveSelectionSideResize = isActiveSelection && (activeSelectionResizeHandle === "ml" || activeSelectionResizeHandle === "mr" || activeSelectionResizeHandle === "mt" || activeSelectionResizeHandle === "mb");
|
|
14769
|
-
if (selectedElementIds.length > 0
|
|
14789
|
+
if (selectedElementIds.length > 0) {
|
|
14770
14790
|
const firstObj = activeObjects[0];
|
|
14771
14791
|
const firstId = getObjectId(firstObj);
|
|
14772
14792
|
const parentGroups = selectedElementIds.map((id) => findParentGroup(pageChildren2, id)).filter((g) => g !== null);
|
|
@@ -14865,6 +14885,8 @@ const PageCanvas = react.forwardRef(
|
|
|
14865
14885
|
}
|
|
14866
14886
|
setTimeout(() => modifiedIdsThisRound.forEach((id) => justModifiedIdsRef.current.delete(id)), 150);
|
|
14867
14887
|
groupSelectionTransformStartRef.current = null;
|
|
14888
|
+
activeSelectionMoveStartRef.current = null;
|
|
14889
|
+
activeSelectionResizeHandleRef.current = null;
|
|
14868
14890
|
const restoreSnapshot = {
|
|
14869
14891
|
memberIds: targetObjects.map((obj) => getObjectId(obj)).filter((id) => !!id && id !== "__background__"),
|
|
14870
14892
|
groupSelectionId,
|
|
@@ -24519,9 +24541,9 @@ function captureFabricCanvasSvgForPdf(fabricInstance, canvasWidth, canvasHeight)
|
|
|
24519
24541
|
}
|
|
24520
24542
|
return svgString;
|
|
24521
24543
|
}
|
|
24522
|
-
const resolvedPackageVersion = "0.5.
|
|
24544
|
+
const resolvedPackageVersion = "0.5.335";
|
|
24523
24545
|
const PACKAGE_VERSION = resolvedPackageVersion;
|
|
24524
|
-
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.
|
|
24546
|
+
const DEPLOYMENT_VERSION_MARKER = "__PIXLDOCS_CANVAS_RENDERER_VERSION__:0.5.335";
|
|
24525
24547
|
const roundParityValue = (value) => {
|
|
24526
24548
|
if (typeof value !== "number") return value;
|
|
24527
24549
|
return Number.isFinite(value) ? Number(value.toFixed(3)) : value;
|
|
@@ -25335,7 +25357,7 @@ class PixldocsRenderer {
|
|
|
25335
25357
|
await this.waitForCanvasScene(container, cloned, i);
|
|
25336
25358
|
}
|
|
25337
25359
|
console.log(`[canvas-renderer][pdf-unified] mounted ${cloned.pages.length} page(s), handing off to client exportMultiPagePdf`);
|
|
25338
|
-
const { exportMultiPagePdf, preparePagesForExport } = await Promise.resolve().then(() => require("./vectorPdfExport-
|
|
25360
|
+
const { exportMultiPagePdf, preparePagesForExport } = await Promise.resolve().then(() => require("./vectorPdfExport-_BIQ9o7V.cjs"));
|
|
25339
25361
|
const prepared = preparePagesForExport(
|
|
25340
25362
|
cloned.pages,
|
|
25341
25363
|
canvasWidth,
|
|
@@ -27655,7 +27677,7 @@ async function prepareLiveCanvasSvgForPdf(rawSvg, pageWidth, pageHeight, pageKey
|
|
|
27655
27677
|
if (options == null ? void 0 : options.stripPageBackground) stripRootPageBackgroundFromSvg(svgToDraw);
|
|
27656
27678
|
sanitizeSvgTreeForPdf(svgToDraw);
|
|
27657
27679
|
try {
|
|
27658
|
-
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await Promise.resolve().then(() => require("./vectorPdfExport-
|
|
27680
|
+
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await Promise.resolve().then(() => require("./vectorPdfExport-_BIQ9o7V.cjs"));
|
|
27659
27681
|
try {
|
|
27660
27682
|
await logTextMeasurementDiagnostic(svgToDraw);
|
|
27661
27683
|
} catch {
|
|
@@ -28052,4 +28074,4 @@ exports.setAutoShrinkDebug = setAutoShrinkDebug;
|
|
|
28052
28074
|
exports.setBundledAssetPrefixes = setBundledAssetPrefixes;
|
|
28053
28075
|
exports.warmResolvedTemplateForPreview = warmResolvedTemplateForPreview;
|
|
28054
28076
|
exports.warmTemplateFromForm = warmTemplateFromForm;
|
|
28055
|
-
//# sourceMappingURL=index-
|
|
28077
|
+
//# sourceMappingURL=index-DDHvGuGr.cjs.map
|