@floating-ui/dom
Advanced tools
Comparing version 0.1.10 to 0.2.0
@@ -483,2 +483,8 @@ import { rectToClientRect, computePosition as computePosition$1 } from '@floating-ui/core'; | ||
/** | ||
* Computes the `x` and `y` coordinates that will place the floating element | ||
* next to a reference element when it is given a certain CSS positioning | ||
* strategy. | ||
*/ | ||
const computePosition = (reference, floating, options) => computePosition$1(reference, floating, { | ||
@@ -485,0 +491,0 @@ platform, |
@@ -486,2 +486,8 @@ (function (global, factory) { | ||
/** | ||
* Computes the `x` and `y` coordinates that will place the floating element | ||
* next to a reference element when it is given a certain CSS positioning | ||
* strategy. | ||
*/ | ||
const computePosition = (reference, floating, options) => core.computePosition(reference, floating, { | ||
@@ -488,0 +494,0 @@ platform, |
{ | ||
"name": "@floating-ui/dom", | ||
"version": "0.1.10", | ||
"version": "0.2.0", | ||
"@rollingversions": { | ||
@@ -21,3 +21,7 @@ "baseVersion": [ | ||
".": { | ||
"import": "./dist/floating-ui.dom.esm.js", | ||
"import": { | ||
"development": "./dist/floating-ui.dom.esm.development.js", | ||
"production": "./dist/floating-ui.dom.esm.min.js", | ||
"default": "./dist/floating-ui.dom.esm.js" | ||
}, | ||
"require": "./dist/floating-ui.dom.cjs" | ||
@@ -57,3 +61,3 @@ }, | ||
"dependencies": { | ||
"@floating-ui/core": "^0.3.0" | ||
"@floating-ui/core": "^0.4.0" | ||
}, | ||
@@ -60,0 +64,0 @@ "devDependencies": { |
import { ClientRectObject, ComputePositionConfig } from '@floating-ui/core'; | ||
/** | ||
* Computes the `x` and `y` coordinates that will place the floating element | ||
* next to a reference element when it is given a certain CSS positioning | ||
* strategy. | ||
*/ | ||
export declare const computePosition: (reference: Element | { | ||
@@ -3,0 +8,0 @@ getBoundingClientRect(): ClientRectObject; |
@@ -14,6 +14,26 @@ import type { Middleware, MiddlewareArguments, SideObject } from '@floating-ui/core'; | ||
}; | ||
/** | ||
* Automatically chooses the `placement` which has the most space available. | ||
*/ | ||
declare const autoPlacement: (options?: Partial<AutoPlacementOptions & DOMDetectOverflowOptions>) => Middleware; | ||
/** | ||
* Shifts the floating element in order to keep it in view when it will overflow | ||
* a clipping boundary. | ||
*/ | ||
declare const shift: (options?: Partial<ShiftOptions & DOMDetectOverflowOptions>) => Middleware; | ||
/** | ||
* Changes the placement of the floating element to one that will fit if the | ||
* initially specified `placement` does not. | ||
*/ | ||
declare const flip: (options?: Partial<FlipOptions & DOMDetectOverflowOptions>) => Middleware; | ||
/** | ||
* Provides data to change the size of the floating element. For instance, | ||
* prevent it from overflowing its clipping boundary or match the width of the | ||
* reference element. | ||
*/ | ||
declare const size: (options?: Partial<SizeOptions & DOMDetectOverflowOptions>) => Middleware; | ||
/** | ||
* Positions an inner element of the floating element such that it is centered | ||
* to the reference element. | ||
*/ | ||
declare const arrow: (options: { | ||
@@ -23,2 +43,9 @@ element: HTMLElement; | ||
}) => Middleware; | ||
/** | ||
* Resolves with an object of overflow side offsets that determine how much the | ||
* element is overflowing a given clipping boundary. | ||
* - positive = overflowing the boundary by that number of pixels | ||
* - negative = how many pixels left before it will overflow | ||
* - 0 = lies flush with the boundary | ||
*/ | ||
declare const detectOverflow: (middlewareArguments: MiddlewareArguments, options?: Partial<DOMDetectOverflowOptions>) => Promise<SideObject>; | ||
@@ -25,0 +52,0 @@ export { autoPlacement, shift, arrow, size, flip, detectOverflow }; |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
84589
32
1920
+ Added@floating-ui/core@0.4.0(transitive)
- Removed@floating-ui/core@0.3.1(transitive)
Updated@floating-ui/core@^0.4.0