@fluid-topics/ft-wc-utils 1.2.34 → 1.2.35

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.
@@ -1,3 +1,3 @@
1
1
  import { ComputePositionReturn, Placement, Strategy } from "@floating-ui/dom";
2
2
  export declare function computeOffsetPosition(reference: HTMLElement, element: HTMLElement, placement: Placement): Promise<ComputePositionReturn>;
3
- export declare function computeFlipOffsetPosition(reference: HTMLElement, element: HTMLElement, placement?: Placement, fallbackPlacements?: Placement[], strategy?: Strategy, maxHeightCssVariable?: string, offsetValue?: number): Promise<ComputePositionReturn>;
3
+ export declare function computeOffsetAutoPosition(reference: HTMLElement, element: HTMLElement, placement?: Placement, allowedPlacements?: Placement[], strategy?: Strategy, maxHeightCssVariable?: string, offsetValue?: number): Promise<ComputePositionReturn>;
package/build/floating.js CHANGED
@@ -1,4 +1,4 @@
1
- import { autoPlacement, computePosition, flip, offset, platform, shift, size } from "@floating-ui/dom";
1
+ import { autoPlacement, computePosition, offset, platform, shift, size } from "@floating-ui/dom";
2
2
  import { offsetParent } from "composed-offset-position";
3
3
  export async function computeOffsetPosition(reference, element, placement) {
4
4
  return computePosition(reference, element, {
@@ -14,7 +14,7 @@ export async function computeOffsetPosition(reference, element, placement) {
14
14
  ],
15
15
  });
16
16
  }
17
- export async function computeFlipOffsetPosition(reference, element, placement, fallbackPlacements, strategy, maxHeightCssVariable, offsetValue = 4) {
17
+ export async function computeOffsetAutoPosition(reference, element, placement, allowedPlacements, strategy, maxHeightCssVariable, offsetValue = 4) {
18
18
  return computePosition(reference, element, {
19
19
  placement: placement,
20
20
  strategy: strategy,
@@ -26,7 +26,7 @@ export async function computeFlipOffsetPosition(reference, element, placement, f
26
26
  },
27
27
  middleware: [
28
28
  offset(offsetValue),
29
- flip({ fallbackPlacements: fallbackPlacements }),
29
+ autoPlacement({ allowedPlacements: allowedPlacements }),
30
30
  size({
31
31
  apply({ availableHeight, elements }) {
32
32
  if (maxHeightCssVariable) {