@floating-ui/dom
Advanced tools
Comparing version 1.5.0 to 1.5.1
import { rectToClientRect, computePosition as computePosition$1 } from '@floating-ui/core'; | ||
export { arrow, autoPlacement, detectOverflow, flip, hide, inline, limitShift, offset, shift, size } from '@floating-ui/core'; | ||
import { round, createCoords, max, min, floor } from '@floating-ui/utils'; | ||
import { getComputedStyle, isHTMLElement, isElement, getWindow, isWebKit, getDocumentElement, getNodeName, isOverflowElement, getNodeScroll, getOverflowAncestors, getParentNode, isLastTraversableNode, isContainingBlock, isTableElement } from '@floating-ui/utils/dom'; | ||
import { getComputedStyle, isHTMLElement, isElement, getWindow, isWebKit, getDocumentElement, getNodeName, isOverflowElement, getNodeScroll, getOverflowAncestors, getParentNode, isLastTraversableNode, isContainingBlock, isTableElement, getContainingBlock } from '@floating-ui/utils/dom'; | ||
export { getOverflowAncestors } from '@floating-ui/utils/dom'; | ||
@@ -372,13 +372,2 @@ | ||
} | ||
function getContainingBlock(element) { | ||
let currentNode = getParentNode(element); | ||
while (isHTMLElement(currentNode) && !isLastTraversableNode(currentNode)) { | ||
if (isContainingBlock(currentNode)) { | ||
return currentNode; | ||
} else { | ||
currentNode = getParentNode(currentNode); | ||
} | ||
} | ||
return null; | ||
} | ||
@@ -385,0 +374,0 @@ // Gets the closest ancestor positioned element. Handles some edge cases, |
@@ -68,2 +68,13 @@ (function (global, factory) { | ||
} | ||
function getContainingBlock(element) { | ||
let currentNode = getParentNode(element); | ||
while (isHTMLElement(currentNode) && !isLastTraversableNode(currentNode)) { | ||
if (isContainingBlock(currentNode)) { | ||
return currentNode; | ||
} else { | ||
currentNode = getParentNode(currentNode); | ||
} | ||
} | ||
return null; | ||
} | ||
function isWebKit() { | ||
@@ -495,13 +506,2 @@ if (typeof CSS === 'undefined' || !CSS.supports) return false; | ||
} | ||
function getContainingBlock(element) { | ||
let currentNode = getParentNode(element); | ||
while (isHTMLElement(currentNode) && !isLastTraversableNode(currentNode)) { | ||
if (isContainingBlock(currentNode)) { | ||
return currentNode; | ||
} else { | ||
currentNode = getParentNode(currentNode); | ||
} | ||
} | ||
return null; | ||
} | ||
@@ -508,0 +508,0 @@ // Gets the closest ancestor positioned element. Handles some edge cases, |
{ | ||
"name": "@floating-ui/dom", | ||
"version": "1.5.0", | ||
"version": "1.5.1", | ||
"@rollingversions": { | ||
@@ -23,3 +23,3 @@ "baseVersion": [ | ||
"import": { | ||
"types": "./src/types.d.mts", | ||
"types": "./src/types.d.ts", | ||
"default": "./dist/floating-ui.dom.mjs" | ||
@@ -61,4 +61,4 @@ }, | ||
"dependencies": { | ||
"@floating-ui/core": "^1.4.0", | ||
"@floating-ui/utils": "^0.1.0" | ||
"@floating-ui/core": "^1.4.1", | ||
"@floating-ui/utils": "^0.1.1" | ||
}, | ||
@@ -65,0 +65,0 @@ "devDependencies": { |
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
126378
31
2940
Updated@floating-ui/core@^1.4.1
Updated@floating-ui/utils@^0.1.1