@lace-cloud/canvas 0.41.0 → 0.42.0
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/{chunk-ELOBZOVE.mjs → chunk-QH7BZCFZ.mjs} +1 -1
- package/dist/{chunk-ELOBZOVE.mjs.map → chunk-QH7BZCFZ.mjs.map} +1 -1
- package/dist/engine/index.cjs.map +1 -1
- package/dist/engine/index.mjs +1 -1
- package/dist/index.cjs +1 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +8 -4
- package/dist/index.mjs.map +1 -1
- package/package.json +4 -4
package/dist/index.mjs
CHANGED
|
@@ -50,7 +50,7 @@ import {
|
|
|
50
50
|
sourceHandleId,
|
|
51
51
|
targetHandleId,
|
|
52
52
|
wireEndText
|
|
53
|
-
} from "./chunk-
|
|
53
|
+
} from "./chunk-QH7BZCFZ.mjs";
|
|
54
54
|
|
|
55
55
|
// src/App.tsx
|
|
56
56
|
import { ReactFlowProvider } from "@xyflow/react";
|
|
@@ -240,7 +240,12 @@ function CanvasControls({
|
|
|
240
240
|
}
|
|
241
241
|
|
|
242
242
|
// src/components/ContextMenu.tsx
|
|
243
|
-
import {
|
|
243
|
+
import {
|
|
244
|
+
inertProps,
|
|
245
|
+
naturalHeight,
|
|
246
|
+
placeFloating,
|
|
247
|
+
Tooltip
|
|
248
|
+
} from "@lace-cloud/ui";
|
|
244
249
|
import { Fragment as Fragment2, useEffect, useLayoutEffect, useRef, useState as useState2 } from "react";
|
|
245
250
|
|
|
246
251
|
// src/core/sections.ts
|
|
@@ -311,8 +316,7 @@ import { Fragment as Fragment3, jsx as jsx3, jsxs as jsxs2 } from "react/jsx-run
|
|
|
311
316
|
var atPoint = (x, y) => ({ left: x, right: x, top: y, bottom: y });
|
|
312
317
|
function naturalSize(menu) {
|
|
313
318
|
const box = menu.getBoundingClientRect();
|
|
314
|
-
|
|
315
|
-
return { width: box.width, height: Math.max(box.height, menu.scrollHeight + borders) };
|
|
319
|
+
return { width: box.width, height: Math.max(box.height, naturalHeight(menu)) };
|
|
316
320
|
}
|
|
317
321
|
function samePlacement(a, b) {
|
|
318
322
|
return a === b || a !== null && b !== null && Object.is(a.left, b.left) && Object.is(a.top, b.top) && Object.is(a.maxHeight, b.maxHeight);
|