Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@floating-ui/utils

Package Overview
Dependencies
Maintainers
2
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@floating-ui/utils - npm Package Compare versions

Comparing version 0.2.6 to 0.2.7

2

dist/floating-ui.utils.dom.esm.js

@@ -139,5 +139,5 @@ function getNodeName(node) {

function getFrameElement(win) {
return Object.getPrototypeOf(win.parent) ? win.frameElement : null;
return win.parent && Object.getPrototypeOf(win.parent) ? win.frameElement : null;
}
export { getComputedStyle, getContainingBlock, getDocumentElement, getFrameElement, getNearestOverflowAncestor, getNodeName, getNodeScroll, getOverflowAncestors, getParentNode, getWindow, isContainingBlock, isElement, isHTMLElement, isLastTraversableNode, isNode, isOverflowElement, isShadowRoot, isTableElement, isTopLayer, isWebKit };

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

function getFrameElement(win) {
return Object.getPrototypeOf(win.parent) ? win.frameElement : null;
return win.parent && Object.getPrototypeOf(win.parent) ? win.frameElement : null;
}

@@ -148,0 +148,0 @@

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

!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n((e="undefined"!=typeof globalThis?globalThis:e||self).FloatingUIUtilsDOM={})}(this,(function(e){"use strict";function n(e){return r(e)?(e.nodeName||"").toLowerCase():"#document"}function t(e){var n;return(null==e||null==(n=e.ownerDocument)?void 0:n.defaultView)||window}function o(e){var n;return null==(n=(r(e)?e.ownerDocument:e.document)||window.document)?void 0:n.documentElement}function r(e){return e instanceof Node||e instanceof t(e).Node}function i(e){return e instanceof Element||e instanceof t(e).Element}function l(e){return e instanceof HTMLElement||e instanceof t(e).HTMLElement}function c(e){return"undefined"!=typeof ShadowRoot&&(e instanceof ShadowRoot||e instanceof t(e).ShadowRoot)}function u(e){const{overflow:n,overflowX:t,overflowY:o,display:r}=m(e);return/auto|scroll|overlay|hidden|clip/.test(n+o+t)&&!["inline","contents"].includes(r)}function s(e){return[":popover-open",":modal"].some((n=>{try{return e.matches(n)}catch(e){return!1}}))}function f(e){const n=d(),t=i(e)?m(e):e;return"none"!==t.transform||"none"!==t.perspective||!!t.containerType&&"normal"!==t.containerType||!n&&!!t.backdropFilter&&"none"!==t.backdropFilter||!n&&!!t.filter&&"none"!==t.filter||["transform","perspective","filter"].some((e=>(t.willChange||"").includes(e)))||["paint","layout","strict","content"].some((e=>(t.contain||"").includes(e)))}function d(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function a(e){return["html","body","#document"].includes(n(e))}function m(e){return t(e).getComputedStyle(e)}function p(e){if("html"===n(e))return e;const t=e.assignedSlot||e.parentNode||c(e)&&e.host||o(e);return c(t)?t.host:t}function w(e){const n=p(e);return a(n)?e.ownerDocument?e.ownerDocument.body:e.body:l(n)&&u(n)?n:w(n)}function v(e){return Object.getPrototypeOf(e.parent)?e.frameElement:null}e.getComputedStyle=m,e.getContainingBlock=function(e){let n=p(e);for(;l(n)&&!a(n);){if(f(n))return n;if(s(n))return null;n=p(n)}return null},e.getDocumentElement=o,e.getFrameElement=v,e.getNearestOverflowAncestor=w,e.getNodeName=n,e.getNodeScroll=function(e){return i(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}},e.getOverflowAncestors=function e(n,o,r){var i;void 0===o&&(o=[]),void 0===r&&(r=!0);const l=w(n),c=l===(null==(i=n.ownerDocument)?void 0:i.body),s=t(l);if(c){const n=v(s);return o.concat(s,s.visualViewport||[],u(l)?l:[],n&&r?e(n):[])}return o.concat(l,e(l,[],r))},e.getParentNode=p,e.getWindow=t,e.isContainingBlock=f,e.isElement=i,e.isHTMLElement=l,e.isLastTraversableNode=a,e.isNode=r,e.isOverflowElement=u,e.isShadowRoot=c,e.isTableElement=function(e){return["table","td","th"].includes(n(e))},e.isTopLayer=s,e.isWebKit=d}));
!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n((e="undefined"!=typeof globalThis?globalThis:e||self).FloatingUIUtilsDOM={})}(this,(function(e){"use strict";function n(e){return r(e)?(e.nodeName||"").toLowerCase():"#document"}function t(e){var n;return(null==e||null==(n=e.ownerDocument)?void 0:n.defaultView)||window}function o(e){var n;return null==(n=(r(e)?e.ownerDocument:e.document)||window.document)?void 0:n.documentElement}function r(e){return e instanceof Node||e instanceof t(e).Node}function i(e){return e instanceof Element||e instanceof t(e).Element}function l(e){return e instanceof HTMLElement||e instanceof t(e).HTMLElement}function c(e){return"undefined"!=typeof ShadowRoot&&(e instanceof ShadowRoot||e instanceof t(e).ShadowRoot)}function u(e){const{overflow:n,overflowX:t,overflowY:o,display:r}=m(e);return/auto|scroll|overlay|hidden|clip/.test(n+o+t)&&!["inline","contents"].includes(r)}function s(e){return[":popover-open",":modal"].some((n=>{try{return e.matches(n)}catch(e){return!1}}))}function f(e){const n=a(),t=i(e)?m(e):e;return"none"!==t.transform||"none"!==t.perspective||!!t.containerType&&"normal"!==t.containerType||!n&&!!t.backdropFilter&&"none"!==t.backdropFilter||!n&&!!t.filter&&"none"!==t.filter||["transform","perspective","filter"].some((e=>(t.willChange||"").includes(e)))||["paint","layout","strict","content"].some((e=>(t.contain||"").includes(e)))}function a(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function d(e){return["html","body","#document"].includes(n(e))}function m(e){return t(e).getComputedStyle(e)}function p(e){if("html"===n(e))return e;const t=e.assignedSlot||e.parentNode||c(e)&&e.host||o(e);return c(t)?t.host:t}function w(e){const n=p(e);return d(n)?e.ownerDocument?e.ownerDocument.body:e.body:l(n)&&u(n)?n:w(n)}function v(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}e.getComputedStyle=m,e.getContainingBlock=function(e){let n=p(e);for(;l(n)&&!d(n);){if(f(n))return n;if(s(n))return null;n=p(n)}return null},e.getDocumentElement=o,e.getFrameElement=v,e.getNearestOverflowAncestor=w,e.getNodeName=n,e.getNodeScroll=function(e){return i(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}},e.getOverflowAncestors=function e(n,o,r){var i;void 0===o&&(o=[]),void 0===r&&(r=!0);const l=w(n),c=l===(null==(i=n.ownerDocument)?void 0:i.body),s=t(l);if(c){const n=v(s);return o.concat(s,s.visualViewport||[],u(l)?l:[],n&&r?e(n):[])}return o.concat(l,e(l,[],r))},e.getParentNode=p,e.getWindow=t,e.isContainingBlock=f,e.isElement=i,e.isHTMLElement=l,e.isLastTraversableNode=d,e.isNode=r,e.isOverflowElement=u,e.isShadowRoot=c,e.isTableElement=function(e){return["table","td","th"].includes(n(e))},e.isTopLayer=s,e.isWebKit=a}));

@@ -139,5 +139,5 @@ function getNodeName(node) {

function getFrameElement(win) {
return Object.getPrototypeOf(win.parent) ? win.frameElement : null;
return win.parent && Object.getPrototypeOf(win.parent) ? win.frameElement : null;
}
export { getComputedStyle, getContainingBlock, getDocumentElement, getFrameElement, getNearestOverflowAncestor, getNodeName, getNodeScroll, getOverflowAncestors, getParentNode, getWindow, isContainingBlock, isElement, isHTMLElement, isLastTraversableNode, isNode, isOverflowElement, isShadowRoot, isTableElement, isTopLayer, isWebKit };

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

function getFrameElement(win) {
return Object.getPrototypeOf(win.parent) ? win.frameElement : null;
return win.parent && Object.getPrototypeOf(win.parent) ? win.frameElement : null;
}

@@ -148,0 +148,0 @@

{
"name": "@floating-ui/utils",
"version": "0.2.6",
"version": "0.2.7",
"description": "Utilities for Floating UI",

@@ -5,0 +5,0 @@ "publishConfig": {

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