@fluid-topics/ft-wc-utils
Advanced tools
Comparing version 1.1.114 to 1.1.115
@@ -1,2 +0,3 @@ | ||
import { ComputePositionReturn, Placement } from "@floating-ui/dom"; | ||
import { ComputePositionReturn, Placement, Strategy } from "@floating-ui/dom"; | ||
export declare function computeOffsetPosition(reference: HTMLElement, element: HTMLElement, placement: Placement): Promise<ComputePositionReturn>; | ||
export declare function computeFlipOffsetPosition(reference: HTMLElement, element: HTMLElement, placement?: Placement, fallbackPlacements?: Placement[], strategy?: Strategy): Promise<ComputePositionReturn>; |
@@ -1,2 +0,2 @@ | ||
import { autoPlacement, computePosition, platform, shift } from "@floating-ui/dom"; | ||
import { autoPlacement, computePosition, flip, offset, platform, shift } from "@floating-ui/dom"; | ||
import { offsetParent } from "composed-offset-position"; | ||
@@ -17,1 +17,17 @@ export async function computeOffsetPosition(reference, element, placement) { | ||
} | ||
export async function computeFlipOffsetPosition(reference, element, placement, fallbackPlacements, strategy) { | ||
return computePosition(reference, element, { | ||
placement: placement, | ||
strategy: strategy, | ||
platform: { | ||
...platform, | ||
getOffsetParent: (element) => { | ||
return platform.getOffsetParent(element, offsetParent); | ||
}, | ||
}, | ||
middleware: [ | ||
offset(4), | ||
flip({ fallbackPlacements: fallbackPlacements }), | ||
] | ||
}); | ||
} |
{ | ||
"name": "@fluid-topics/ft-wc-utils", | ||
"version": "1.1.114", | ||
"version": "1.1.115", | ||
"description": "Internal web components tools", | ||
@@ -27,3 +27,3 @@ "author": "Fluid Topics <devtopics@antidot.net>", | ||
}, | ||
"gitHead": "f8167e187c7e56de530a810eb2ad87426989e775" | ||
"gitHead": "7a0d8f324bb95d068d787990f2d1f1325399467f" | ||
} |
Sorry, the diff of this file is too big to display
355162
3415