@floating-ui/core
Advanced tools
Comparing version 1.2.4 to 1.2.5
@@ -88,18 +88,2 @@ function getAlignment(placement) { | ||
const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(floating)); | ||
if (process.env.NODE_ENV !== "production") { | ||
if (platform == null) { | ||
console.error(['Floating UI: `platform` property was not passed to config. If you', 'want to use Floating UI on the web, install @floating-ui/dom', 'instead of the /core package. Otherwise, you can create your own', '`platform`: https://floating-ui.com/docs/platform'].join(' ')); | ||
} | ||
if (validMiddleware.filter(_ref => { | ||
let { | ||
name | ||
} = _ref; | ||
return name === 'autoPlacement' || name === 'flip'; | ||
}).length > 1) { | ||
throw new Error(['Floating UI: duplicate `flip` and/or `autoPlacement` middleware', 'detected. This will lead to an infinite loop. Ensure only one of', 'either has been passed to the `middleware` array.'].join(' ')); | ||
} | ||
if (!reference || !floating) { | ||
console.error(['Floating UI: The reference and/or floating element was not defined', 'when `computePosition()` was called. Ensure that both elements have', 'been created and can be measured.'].join(' ')); | ||
} | ||
} | ||
let rects = await platform.getElementRects({ | ||
@@ -150,7 +134,2 @@ reference, | ||
}; | ||
if (process.env.NODE_ENV !== "production") { | ||
if (resetCount > 50) { | ||
console.warn(['Floating UI: The middleware lifecycle appears to be running in an', 'infinite loop. This is usually caused by a `reset` continually', 'being returned without a break condition.'].join(' ')); | ||
} | ||
} | ||
if (reset && resetCount <= 50) { | ||
@@ -271,3 +250,2 @@ resetCount++; | ||
}) : rect); | ||
if (process.env.NODE_ENV !== "production") ; | ||
return { | ||
@@ -311,5 +289,2 @@ top: (clippingClientRect.top - elementClientRect.top + paddingObject.top) / offsetScale.y, | ||
if (element == null) { | ||
if (process.env.NODE_ENV !== "production") { | ||
console.warn('Floating UI: No `element` was passed to the `arrow` middleware.'); | ||
} | ||
return {}; | ||
@@ -316,0 +291,0 @@ } |
@@ -94,18 +94,2 @@ (function (global, factory) { | ||
const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(floating)); | ||
{ | ||
if (platform == null) { | ||
console.error(['Floating UI: `platform` property was not passed to config. If you', 'want to use Floating UI on the web, install @floating-ui/dom', 'instead of the /core package. Otherwise, you can create your own', '`platform`: https://floating-ui.com/docs/platform'].join(' ')); | ||
} | ||
if (validMiddleware.filter(_ref => { | ||
let { | ||
name | ||
} = _ref; | ||
return name === 'autoPlacement' || name === 'flip'; | ||
}).length > 1) { | ||
throw new Error(['Floating UI: duplicate `flip` and/or `autoPlacement` middleware', 'detected. This will lead to an infinite loop. Ensure only one of', 'either has been passed to the `middleware` array.'].join(' ')); | ||
} | ||
if (!reference || !floating) { | ||
console.error(['Floating UI: The reference and/or floating element was not defined', 'when `computePosition()` was called. Ensure that both elements have', 'been created and can be measured.'].join(' ')); | ||
} | ||
} | ||
let rects = await platform.getElementRects({ | ||
@@ -156,7 +140,2 @@ reference, | ||
}; | ||
{ | ||
if (resetCount > 50) { | ||
console.warn(['Floating UI: The middleware lifecycle appears to be running in an', 'infinite loop. This is usually caused by a `reset` continually', 'being returned without a break condition.'].join(' ')); | ||
} | ||
} | ||
if (reset && resetCount <= 50) { | ||
@@ -315,5 +294,2 @@ resetCount++; | ||
if (element == null) { | ||
{ | ||
console.warn('Floating UI: No `element` was passed to the `arrow` middleware.'); | ||
} | ||
return {}; | ||
@@ -320,0 +296,0 @@ } |
{ | ||
"name": "@floating-ui/core", | ||
"version": "1.2.4", | ||
"version": "1.2.5", | ||
"@rollingversions": { | ||
@@ -5,0 +5,0 @@ "baseVersion": [ |
Sorry, the diff of this file is not supported yet
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
192562
4978