Socket
Socket
Sign inDemoInstall

@floating-ui/dom

Package Overview
Dependencies
Maintainers
2
Versions
75
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@floating-ui/dom - npm Package Compare versions

Comparing version 1.0.6 to 1.0.7

24

dist/floating-ui.dom.esm.js

@@ -31,3 +31,3 @@ import { rectToClientRect, computePosition as computePosition$1 } from '@floating-ui/core';

if (uaData != null && uaData.brands) {
if (uaData && Array.isArray(uaData.brands)) {
return uaData.brands.map(item => item.brand + "/" + item.version).join(' ');

@@ -431,9 +431,12 @@ }

let result = getOverflowAncestors(element).filter(el => isElement(el) && getNodeName(el) !== 'body');
let currentNode = element;
let currentContainingBlockComputedStyle = null; // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block
let currentContainingBlockComputedStyle = null;
const elementIsFixed = getComputedStyle(element).position === 'fixed';
let currentNode = elementIsFixed ? getParentNode(element) : element; // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block
while (isElement(currentNode) && !isLastTraversableNode(currentNode)) {
const computedStyle = getComputedStyle(currentNode);
const containingBlock = isContainingBlock(currentNode);
const shouldDropCurrentNode = elementIsFixed ? !containingBlock && !currentContainingBlockComputedStyle : !containingBlock && computedStyle.position === 'static' && !!currentContainingBlockComputedStyle && ['absolute', 'fixed'].includes(currentContainingBlockComputedStyle.position);
if (computedStyle.position === 'static' && currentContainingBlockComputedStyle && ['absolute', 'fixed'].includes(currentContainingBlockComputedStyle.position) && !isContainingBlock(currentNode)) {
if (shouldDropCurrentNode) {
// Drop non-containing blocks

@@ -487,3 +490,4 @@ result = result.filter(ancestor => ancestor !== currentNode);

getDocumentElement,
getElementRects: _ref => {
async getElementRects(_ref) {
let {

@@ -494,10 +498,14 @@ reference,

} = _ref;
const getOffsetParentFn = this.getOffsetParent || getOffsetParent;
const getDimensionsFn = this.getDimensions;
return {
reference: getRectRelativeToOffsetParent(reference, getOffsetParent(floating), strategy),
floating: { ...getDimensions(floating),
reference: getRectRelativeToOffsetParent(reference, await getOffsetParentFn(floating), strategy),
floating: {
x: 0,
y: 0
y: 0,
...(await getDimensionsFn(floating))
}
};
},
getClientRects: element => Array.from(element.getClientRects()),

@@ -504,0 +512,0 @@ isRTL: element => getComputedStyle(element).direction === 'rtl'

@@ -34,3 +34,3 @@ (function (global, factory) {

if (uaData != null && uaData.brands) {
if (uaData && Array.isArray(uaData.brands)) {
return uaData.brands.map(item => item.brand + "/" + item.version).join(' ');

@@ -434,9 +434,12 @@ }

let result = getOverflowAncestors(element).filter(el => isElement(el) && getNodeName(el) !== 'body');
let currentNode = element;
let currentContainingBlockComputedStyle = null; // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block
let currentContainingBlockComputedStyle = null;
const elementIsFixed = getComputedStyle(element).position === 'fixed';
let currentNode = elementIsFixed ? getParentNode(element) : element; // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block
while (isElement(currentNode) && !isLastTraversableNode(currentNode)) {
const computedStyle = getComputedStyle(currentNode);
const containingBlock = isContainingBlock(currentNode);
const shouldDropCurrentNode = elementIsFixed ? !containingBlock && !currentContainingBlockComputedStyle : !containingBlock && computedStyle.position === 'static' && !!currentContainingBlockComputedStyle && ['absolute', 'fixed'].includes(currentContainingBlockComputedStyle.position);
if (computedStyle.position === 'static' && currentContainingBlockComputedStyle && ['absolute', 'fixed'].includes(currentContainingBlockComputedStyle.position) && !isContainingBlock(currentNode)) {
if (shouldDropCurrentNode) {
// Drop non-containing blocks

@@ -490,3 +493,4 @@ result = result.filter(ancestor => ancestor !== currentNode);

getDocumentElement,
getElementRects: _ref => {
async getElementRects(_ref) {
let {

@@ -497,10 +501,14 @@ reference,

} = _ref;
const getOffsetParentFn = this.getOffsetParent || getOffsetParent;
const getDimensionsFn = this.getDimensions;
return {
reference: getRectRelativeToOffsetParent(reference, getOffsetParent(floating), strategy),
floating: { ...getDimensions(floating),
reference: getRectRelativeToOffsetParent(reference, await getOffsetParentFn(floating), strategy),
floating: {
x: 0,
y: 0
y: 0,
...(await getDimensionsFn(floating))
}
};
},
getClientRects: element => Array.from(element.getClientRects()),

@@ -507,0 +515,0 @@ isRTL: element => getComputedStyle(element).direction === 'rtl'

@@ -1,1 +0,1 @@

!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@floating-ui/core")):"function"==typeof define&&define.amd?define(["exports","@floating-ui/core"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).FloatingUIDOM={},t.FloatingUICore)}(this,(function(t,e){"use strict";function n(t){return t&&t.document&&t.location&&t.alert&&t.setInterval}function o(t){if(null==t)return window;if(!n(t)){const e=t.ownerDocument;return e&&e.defaultView||window}return t}function i(t){return o(t).getComputedStyle(t)}function r(t){return n(t)?"":t?(t.nodeName||"").toLowerCase():""}function l(){const t=navigator.userAgentData;return null!=t&&t.brands?t.brands.map((t=>t.brand+"/"+t.version)).join(" "):navigator.userAgent}function c(t){return t instanceof o(t).HTMLElement}function f(t){return t instanceof o(t).Element}function u(t){if("undefined"==typeof ShadowRoot)return!1;return t instanceof o(t).ShadowRoot||t instanceof ShadowRoot}function s(t){const{overflow:e,overflowX:n,overflowY:o,display:r}=i(t);return/auto|scroll|overlay|hidden/.test(e+o+n)&&!["inline","contents"].includes(r)}function d(t){return["table","td","th"].includes(r(t))}function a(t){const e=/firefox/i.test(l()),n=i(t),o=n.backdropFilter||n.WebkitBackdropFilter;return"none"!==n.transform||"none"!==n.perspective||!!o&&"none"!==o||e&&"filter"===n.willChange||e&&!!n.filter&&"none"!==n.filter||["transform","perspective"].some((t=>n.willChange.includes(t)))||["paint","layout","strict","content"].some((t=>{const e=n.contain;return null!=e&&e.includes(t)}))}function h(){return!/^((?!chrome|android).)*safari/i.test(l())}function p(t){return["html","body","#document"].includes(r(t))}const g=Math.min,m=Math.max,y=Math.round;function w(t,e,n){var i,r,l,u;void 0===e&&(e=!1),void 0===n&&(n=!1);const s=t.getBoundingClientRect();let d=1,a=1;e&&c(t)&&(d=t.offsetWidth>0&&y(s.width)/t.offsetWidth||1,a=t.offsetHeight>0&&y(s.height)/t.offsetHeight||1);const p=f(t)?o(t):window,g=!h()&&n,m=(s.left+(g&&null!=(i=null==(r=p.visualViewport)?void 0:r.offsetLeft)?i:0))/d,w=(s.top+(g&&null!=(l=null==(u=p.visualViewport)?void 0:u.offsetTop)?l:0))/a,b=s.width/d,v=s.height/a;return{width:b,height:v,top:w,right:m+b,bottom:w+v,left:m,x:m,y:w}}function b(t){return(e=t,(e instanceof o(e).Node?t.ownerDocument:t.document)||window.document).documentElement;var e}function v(t){return f(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function x(t){return w(b(t)).left+v(t).scrollLeft}function L(t,e,n){const o=c(e),i=b(e),l=w(t,o&&function(t){const e=w(t);return y(e.width)!==t.offsetWidth||y(e.height)!==t.offsetHeight}(e),"fixed"===n);let f={scrollLeft:0,scrollTop:0};const u={x:0,y:0};if(o||!o&&"fixed"!==n)if(("body"!==r(e)||s(i))&&(f=v(e)),c(e)){const t=w(e,!0);u.x=t.x+e.clientLeft,u.y=t.y+e.clientTop}else i&&(u.x=x(i));return{x:l.left+f.scrollLeft-u.x,y:l.top+f.scrollTop-u.y,width:l.width,height:l.height}}function O(t){if("html"===r(t))return t;const e=t.assignedSlot||t.parentNode||(u(t)?t.host:null)||b(t);return u(e)?e.host:e}function T(t){return c(t)&&"fixed"!==i(t).position?t.offsetParent:null}function P(t){const e=o(t);let n=T(t);for(;n&&d(n)&&"static"===i(n).position;)n=T(n);return n&&("html"===r(n)||"body"===r(n)&&"static"===i(n).position&&!a(n))?e:n||function(t){let e=O(t);for(;c(e)&&!p(e);){if(a(e))return e;e=O(e)}return null}(t)||e}function R(t){if(c(t))return{width:t.offsetWidth,height:t.offsetHeight};const e=w(t);return{width:e.width,height:e.height}}function E(t){const e=O(t);return p(e)?t.ownerDocument.body:c(e)&&s(e)?e:E(e)}function W(t,e){var n;void 0===e&&(e=[]);const i=E(t),r=i===(null==(n=t.ownerDocument)?void 0:n.body),l=o(i),c=r?[l].concat(l.visualViewport||[],s(i)?i:[]):i,f=e.concat(c);return r?f:f.concat(W(c))}function j(t,n,r){return"viewport"===n?e.rectToClientRect(function(t,e){const n=o(t),i=b(t),r=n.visualViewport;let l=i.clientWidth,c=i.clientHeight,f=0,u=0;if(r){l=r.width,c=r.height;const t=h();(t||!t&&"fixed"===e)&&(f=r.offsetLeft,u=r.offsetTop)}return{width:l,height:c,x:f,y:u}}(t,r)):f(n)?function(t,e){const n=w(t,!1,"fixed"===e),o=n.top+t.clientTop,i=n.left+t.clientLeft;return{top:o,left:i,x:i,y:o,right:i+t.clientWidth,bottom:o+t.clientHeight,width:t.clientWidth,height:t.clientHeight}}(n,r):e.rectToClientRect(function(t){var e;const n=b(t),o=v(t),r=null==(e=t.ownerDocument)?void 0:e.body,l=m(n.scrollWidth,n.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),c=m(n.scrollHeight,n.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0);let f=-o.scrollLeft+x(t);const u=-o.scrollTop;return"rtl"===i(r||n).direction&&(f+=m(n.clientWidth,r?r.clientWidth:0)-l),{width:l,height:c,x:f,y:u}}(b(t)))}const H={getClippingRect:function(t){let{element:e,boundary:n,rootBoundary:o,strategy:l}=t;const c="clippingAncestors"===n?function(t){let e=W(t).filter((t=>f(t)&&"body"!==r(t))),n=t,o=null;for(;f(n)&&!p(n);){const t=i(n);"static"===t.position&&o&&["absolute","fixed"].includes(o.position)&&!a(n)?e=e.filter((t=>t!==n)):o=t,n=O(n)}return e}(e):[].concat(n),u=[...c,o],s=u[0],d=u.reduce(((t,n)=>{const o=j(e,n,l);return t.top=m(o.top,t.top),t.right=g(o.right,t.right),t.bottom=g(o.bottom,t.bottom),t.left=m(o.left,t.left),t}),j(e,s,l));return{width:d.right-d.left,height:d.bottom-d.top,x:d.left,y:d.top}},convertOffsetParentRelativeRectToViewportRelativeRect:function(t){let{rect:e,offsetParent:n,strategy:o}=t;const i=c(n),l=b(n);if(n===l)return e;let f={scrollLeft:0,scrollTop:0};const u={x:0,y:0};if((i||!i&&"fixed"!==o)&&(("body"!==r(n)||s(l))&&(f=v(n)),c(n))){const t=w(n,!0);u.x=t.x+n.clientLeft,u.y=t.y+n.clientTop}return{...e,x:e.x-f.scrollLeft+u.x,y:e.y-f.scrollTop+u.y}},isElement:f,getDimensions:R,getOffsetParent:P,getDocumentElement:b,getElementRects:t=>{let{reference:e,floating:n,strategy:o}=t;return{reference:L(e,P(n),o),floating:{...R(n),x:0,y:0}}},getClientRects:t=>Array.from(t.getClientRects()),isRTL:t=>"rtl"===i(t).direction};Object.defineProperty(t,"arrow",{enumerable:!0,get:function(){return e.arrow}}),Object.defineProperty(t,"autoPlacement",{enumerable:!0,get:function(){return e.autoPlacement}}),Object.defineProperty(t,"detectOverflow",{enumerable:!0,get:function(){return e.detectOverflow}}),Object.defineProperty(t,"flip",{enumerable:!0,get:function(){return e.flip}}),Object.defineProperty(t,"hide",{enumerable:!0,get:function(){return e.hide}}),Object.defineProperty(t,"inline",{enumerable:!0,get:function(){return e.inline}}),Object.defineProperty(t,"limitShift",{enumerable:!0,get:function(){return e.limitShift}}),Object.defineProperty(t,"offset",{enumerable:!0,get:function(){return e.offset}}),Object.defineProperty(t,"shift",{enumerable:!0,get:function(){return e.shift}}),Object.defineProperty(t,"size",{enumerable:!0,get:function(){return e.size}}),t.autoUpdate=function(t,e,n,o){void 0===o&&(o={});const{ancestorScroll:i=!0,ancestorResize:r=!0,elementResize:l=!0,animationFrame:c=!1}=o,u=i&&!c,s=u||r?[...f(t)?W(t):t.contextElement?W(t.contextElement):[],...W(e)]:[];s.forEach((t=>{u&&t.addEventListener("scroll",n,{passive:!0}),r&&t.addEventListener("resize",n)}));let d,a=null;if(l){let o=!0;a=new ResizeObserver((()=>{o||n(),o=!1})),f(t)&&!c&&a.observe(t),f(t)||!t.contextElement||c||a.observe(t.contextElement),a.observe(e)}let h=c?w(t):null;return c&&function e(){const o=w(t);!h||o.x===h.x&&o.y===h.y&&o.width===h.width&&o.height===h.height||n();h=o,d=requestAnimationFrame(e)}(),n(),()=>{var t;s.forEach((t=>{u&&t.removeEventListener("scroll",n),r&&t.removeEventListener("resize",n)})),null==(t=a)||t.disconnect(),a=null,c&&cancelAnimationFrame(d)}},t.computePosition=(t,n,o)=>e.computePosition(t,n,{platform:H,...o}),t.getOverflowAncestors=W,t.platform=H,Object.defineProperty(t,"__esModule",{value:!0})}));
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@floating-ui/core")):"function"==typeof define&&define.amd?define(["exports","@floating-ui/core"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).FloatingUIDOM={},t.FloatingUICore)}(this,(function(t,e){"use strict";function n(t){return t&&t.document&&t.location&&t.alert&&t.setInterval}function o(t){if(null==t)return window;if(!n(t)){const e=t.ownerDocument;return e&&e.defaultView||window}return t}function i(t){return o(t).getComputedStyle(t)}function r(t){return n(t)?"":t?(t.nodeName||"").toLowerCase():""}function l(){const t=navigator.userAgentData;return t&&Array.isArray(t.brands)?t.brands.map((t=>t.brand+"/"+t.version)).join(" "):navigator.userAgent}function c(t){return t instanceof o(t).HTMLElement}function f(t){return t instanceof o(t).Element}function s(t){if("undefined"==typeof ShadowRoot)return!1;return t instanceof o(t).ShadowRoot||t instanceof ShadowRoot}function u(t){const{overflow:e,overflowX:n,overflowY:o,display:r}=i(t);return/auto|scroll|overlay|hidden/.test(e+o+n)&&!["inline","contents"].includes(r)}function a(t){return["table","td","th"].includes(r(t))}function d(t){const e=/firefox/i.test(l()),n=i(t),o=n.backdropFilter||n.WebkitBackdropFilter;return"none"!==n.transform||"none"!==n.perspective||!!o&&"none"!==o||e&&"filter"===n.willChange||e&&!!n.filter&&"none"!==n.filter||["transform","perspective"].some((t=>n.willChange.includes(t)))||["paint","layout","strict","content"].some((t=>{const e=n.contain;return null!=e&&e.includes(t)}))}function h(){return!/^((?!chrome|android).)*safari/i.test(l())}function p(t){return["html","body","#document"].includes(r(t))}const g=Math.min,m=Math.max,y=Math.round;function w(t,e,n){var i,r,l,s;void 0===e&&(e=!1),void 0===n&&(n=!1);const u=t.getBoundingClientRect();let a=1,d=1;e&&c(t)&&(a=t.offsetWidth>0&&y(u.width)/t.offsetWidth||1,d=t.offsetHeight>0&&y(u.height)/t.offsetHeight||1);const p=f(t)?o(t):window,g=!h()&&n,m=(u.left+(g&&null!=(i=null==(r=p.visualViewport)?void 0:r.offsetLeft)?i:0))/a,w=(u.top+(g&&null!=(l=null==(s=p.visualViewport)?void 0:s.offsetTop)?l:0))/d,b=u.width/a,v=u.height/d;return{width:b,height:v,top:w,right:m+b,bottom:w+v,left:m,x:m,y:w}}function b(t){return(e=t,(e instanceof o(e).Node?t.ownerDocument:t.document)||window.document).documentElement;var e}function v(t){return f(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function x(t){return w(b(t)).left+v(t).scrollLeft}function L(t,e,n){const o=c(e),i=b(e),l=w(t,o&&function(t){const e=w(t);return y(e.width)!==t.offsetWidth||y(e.height)!==t.offsetHeight}(e),"fixed"===n);let f={scrollLeft:0,scrollTop:0};const s={x:0,y:0};if(o||!o&&"fixed"!==n)if(("body"!==r(e)||u(i))&&(f=v(e)),c(e)){const t=w(e,!0);s.x=t.x+e.clientLeft,s.y=t.y+e.clientTop}else i&&(s.x=x(i));return{x:l.left+f.scrollLeft-s.x,y:l.top+f.scrollTop-s.y,width:l.width,height:l.height}}function O(t){if("html"===r(t))return t;const e=t.assignedSlot||t.parentNode||(s(t)?t.host:null)||b(t);return s(e)?e.host:e}function P(t){return c(t)&&"fixed"!==i(t).position?t.offsetParent:null}function T(t){const e=o(t);let n=P(t);for(;n&&a(n)&&"static"===i(n).position;)n=P(n);return n&&("html"===r(n)||"body"===r(n)&&"static"===i(n).position&&!d(n))?e:n||function(t){let e=O(t);for(;c(e)&&!p(e);){if(d(e))return e;e=O(e)}return null}(t)||e}function R(t){const e=O(t);return p(e)?t.ownerDocument.body:c(e)&&u(e)?e:R(e)}function E(t,e){var n;void 0===e&&(e=[]);const i=R(t),r=i===(null==(n=t.ownerDocument)?void 0:n.body),l=o(i),c=r?[l].concat(l.visualViewport||[],u(i)?i:[]):i,f=e.concat(c);return r?f:f.concat(E(c))}function W(t,n,r){return"viewport"===n?e.rectToClientRect(function(t,e){const n=o(t),i=b(t),r=n.visualViewport;let l=i.clientWidth,c=i.clientHeight,f=0,s=0;if(r){l=r.width,c=r.height;const t=h();(t||!t&&"fixed"===e)&&(f=r.offsetLeft,s=r.offsetTop)}return{width:l,height:c,x:f,y:s}}(t,r)):f(n)?function(t,e){const n=w(t,!1,"fixed"===e),o=n.top+t.clientTop,i=n.left+t.clientLeft;return{top:o,left:i,x:i,y:o,right:i+t.clientWidth,bottom:o+t.clientHeight,width:t.clientWidth,height:t.clientHeight}}(n,r):e.rectToClientRect(function(t){var e;const n=b(t),o=v(t),r=null==(e=t.ownerDocument)?void 0:e.body,l=m(n.scrollWidth,n.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),c=m(n.scrollHeight,n.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0);let f=-o.scrollLeft+x(t);const s=-o.scrollTop;return"rtl"===i(r||n).direction&&(f+=m(n.clientWidth,r?r.clientWidth:0)-l),{width:l,height:c,x:f,y:s}}(b(t)))}const j={getClippingRect:function(t){let{element:e,boundary:n,rootBoundary:o,strategy:l}=t;const c="clippingAncestors"===n?function(t){let e=E(t).filter((t=>f(t)&&"body"!==r(t))),n=null;const o="fixed"===i(t).position;let l=o?O(t):t;for(;f(l)&&!p(l);){const t=i(l),r=d(l);(o?r||n:r||"static"!==t.position||!n||!["absolute","fixed"].includes(n.position))?n=t:e=e.filter((t=>t!==l)),l=O(l)}return e}(e):[].concat(n),s=[...c,o],u=s[0],a=s.reduce(((t,n)=>{const o=W(e,n,l);return t.top=m(o.top,t.top),t.right=g(o.right,t.right),t.bottom=g(o.bottom,t.bottom),t.left=m(o.left,t.left),t}),W(e,u,l));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}},convertOffsetParentRelativeRectToViewportRelativeRect:function(t){let{rect:e,offsetParent:n,strategy:o}=t;const i=c(n),l=b(n);if(n===l)return e;let f={scrollLeft:0,scrollTop:0};const s={x:0,y:0};if((i||!i&&"fixed"!==o)&&(("body"!==r(n)||u(l))&&(f=v(n)),c(n))){const t=w(n,!0);s.x=t.x+n.clientLeft,s.y=t.y+n.clientTop}return{...e,x:e.x-f.scrollLeft+s.x,y:e.y-f.scrollTop+s.y}},isElement:f,getDimensions:function(t){if(c(t))return{width:t.offsetWidth,height:t.offsetHeight};const e=w(t);return{width:e.width,height:e.height}},getOffsetParent:T,getDocumentElement:b,async getElementRects(t){let{reference:e,floating:n,strategy:o}=t;const i=this.getOffsetParent||T,r=this.getDimensions;return{reference:L(e,await i(n),o),floating:{x:0,y:0,...await r(n)}}},getClientRects:t=>Array.from(t.getClientRects()),isRTL:t=>"rtl"===i(t).direction};Object.defineProperty(t,"arrow",{enumerable:!0,get:function(){return e.arrow}}),Object.defineProperty(t,"autoPlacement",{enumerable:!0,get:function(){return e.autoPlacement}}),Object.defineProperty(t,"detectOverflow",{enumerable:!0,get:function(){return e.detectOverflow}}),Object.defineProperty(t,"flip",{enumerable:!0,get:function(){return e.flip}}),Object.defineProperty(t,"hide",{enumerable:!0,get:function(){return e.hide}}),Object.defineProperty(t,"inline",{enumerable:!0,get:function(){return e.inline}}),Object.defineProperty(t,"limitShift",{enumerable:!0,get:function(){return e.limitShift}}),Object.defineProperty(t,"offset",{enumerable:!0,get:function(){return e.offset}}),Object.defineProperty(t,"shift",{enumerable:!0,get:function(){return e.shift}}),Object.defineProperty(t,"size",{enumerable:!0,get:function(){return e.size}}),t.autoUpdate=function(t,e,n,o){void 0===o&&(o={});const{ancestorScroll:i=!0,ancestorResize:r=!0,elementResize:l=!0,animationFrame:c=!1}=o,s=i&&!c,u=s||r?[...f(t)?E(t):t.contextElement?E(t.contextElement):[],...E(e)]:[];u.forEach((t=>{s&&t.addEventListener("scroll",n,{passive:!0}),r&&t.addEventListener("resize",n)}));let a,d=null;if(l){let o=!0;d=new ResizeObserver((()=>{o||n(),o=!1})),f(t)&&!c&&d.observe(t),f(t)||!t.contextElement||c||d.observe(t.contextElement),d.observe(e)}let h=c?w(t):null;return c&&function e(){const o=w(t);!h||o.x===h.x&&o.y===h.y&&o.width===h.width&&o.height===h.height||n();h=o,a=requestAnimationFrame(e)}(),n(),()=>{var t;u.forEach((t=>{s&&t.removeEventListener("scroll",n),r&&t.removeEventListener("resize",n)})),null==(t=d)||t.disconnect(),d=null,c&&cancelAnimationFrame(a)}},t.computePosition=(t,n,o)=>e.computePosition(t,n,{platform:j,...o}),t.getOverflowAncestors=E,t.platform=j,Object.defineProperty(t,"__esModule",{value:!0})}));
{
"name": "@floating-ui/dom",
"version": "1.0.6",
"version": "1.0.7",
"@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

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc