@@ -13,49 +13,42 @@ import type {DetectOverflowOptions} from '../detectOverflow';
1313import { detectOverflow } from '../detectOverflow' ;
1414import type { Derivable , Middleware } from '../types' ;
1515
16- export type FlipOptions = Partial <
17- DetectOverflowOptions & {
18- /**
19- * The axis that runs along the side of the floating element. Determines
20- * whether overflow along this axis is checked to perform a flip.
21- * @default true
22- */
23- mainAxis : boolean ;
24-
25- /**
26- * The axis that runs along the alignment of the floating element. Determines
27- * whether overflow along this axis is checked to perform a flip.
28- * @default true
29- */
30- crossAxis : boolean ;
31-
32- /**
33- * Placements to try sequentially if the preferred `placement` does not fit.
34- * @default [oppositePlacement] (computed)
35- */
36- fallbackPlacements : Array < Placement > ;
37-
38- /**
39- * What strategy to use when no placements fit.
40- * @default 'bestFit'
41- */
42- fallbackStrategy : 'bestFit' | 'initialPlacement' ;
43-
44- /**
45- * Whether to allow fallback to the perpendicular axis of the preferred
46- * placement, and if so, which side direction along the axis to prefer.
47- * @default 'none' (disallow fallback)
48- */
49- fallbackAxisSideDirection : 'none' | 'start' | 'end' ;
50-
51- /**
52- * Whether to flip to placements with the opposite alignment if they fit
53- * better.
54- * @default true
55- */
56- flipAlignment : boolean ;
57- }
58- > ;
16+ export interface FlipOptions extends DetectOverflowOptions {
17+ /**
18+ * The axis that runs along the side of the floating element. Determines
19+ * whether overflow along this axis is checked to perform a flip.
20+ * @default true
21+ */
22+ mainAxis ?: boolean ;
23+ /**
24+ * The axis that runs along the alignment of the floating element. Determines
25+ * whether overflow along this axis is checked to perform a flip.
26+ * @default true
27+ */
28+ crossAxis ?: boolean ;
29+ /**
30+ * Placements to try sequentially if the preferred `placement` does not fit.
31+ * @default [oppositePlacement] (computed)
32+ */
33+ fallbackPlacements ?: Array < Placement > ;
34+ /**
35+ * What strategy to use when no placements fit.
36+ * @default 'bestFit'
37+ */
38+ fallbackStrategy ?: 'bestFit' | 'initialPlacement' ;
39+ /**
40+ * Whether to allow fallback to the perpendicular axis of the preferred
41+ * placement, and if so, which side direction along the axis to prefer.
42+ * @default 'none' (disallow fallback)
43+ */
44+ fallbackAxisSideDirection ?: 'none' | 'start' | 'end' ;
45+ /**
46+ * Whether to flip to placements with the opposite alignment if they fit
47+ * better.
48+ * @default true
49+ */
50+ flipAlignment ?: boolean ;
51+ }
5952
6053/**
6154 * Optimizes the visibility of the floating element by flipping the `placement`
0 commit comments