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

@floating-ui/dom

Package Overview
Dependencies
Maintainers
2
Versions
76
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 0.4.5 to 0.5.0

dist/floating-ui.dom.browser.min.mjs

19

dist/floating-ui.dom.esm.js

@@ -28,2 +28,12 @@ import { rectToClientRect, computePosition as computePosition$1 } from '@floating-ui/core';

function getUAString() {
const uaData = navigator.userAgentData;
if (uaData != null && uaData.brands) {
return uaData.brands.map(item => item.brand + "/" + item.version).join(' ');
}
return navigator.userAgent;
}
function isHTMLElement(value) {

@@ -61,3 +71,3 @@ return value instanceof getWindow(value).HTMLElement;

// TODO: Try and use feature detection here instead
const isFirefox = navigator.userAgent.toLowerCase().includes('firefox');
const isFirefox = /firefox/i.test(getUAString());
const css = getComputedStyle$1(element); // This is non-exhaustive but covers the most common CSS properties that

@@ -72,3 +82,3 @@ // create a containing block.

// Not Safari
return !/^((?!chrome|android).)*safari/i.test(navigator.userAgent); // Feature detection for this fails in various ways
return !/^((?!chrome|android).)*safari/i.test(getUAString()); // Feature detection for this fails in various ways
// • Always-visible scrollbar or not

@@ -520,3 +530,3 @@ // • Width of <html>, etc.

ancestorResize: _ancestorResize = true,
elementResize: _elementResize = true,
elementResize = true,
animationFrame = false

@@ -527,3 +537,2 @@ } = options;

const ancestorResize = _ancestorResize && !animationFrame;
const elementResize = _elementResize && !animationFrame;
const ancestors = ancestorScroll || ancestorResize ? [...(isElement(reference) ? getOverflowAncestors(reference) : []), ...getOverflowAncestors(floating)] : [];

@@ -540,3 +549,3 @@ ancestors.forEach(ancestor => {

observer = new ResizeObserver(update);
isElement(reference) && observer.observe(reference);
isElement(reference) && !animationFrame && observer.observe(reference);
observer.observe(floating);

@@ -543,0 +552,0 @@ }

{
"name": "@floating-ui/dom",
"version": "0.4.5",
"version": "0.5.0",
"@rollingversions": {

@@ -15,17 +15,20 @@ "baseVersion": [

},
"main": "dist/floating-ui.dom.js",
"module": "dist/floating-ui.dom.esm.js",
"unpkg": "dist/floating-ui.dom.min.js",
"type": "module",
"main": "./dist/floating-ui.dom.umd.js",
"module": "./dist/floating-ui.dom.esm.js",
"unpkg": "./dist/floating-ui.dom.umd.min.js",
"types": "./index.d.ts",
"exports": {
".": {
"types": "./index.d.ts",
"import": {
"development": "./dist/floating-ui.dom.esm.development.js",
"production": "./dist/floating-ui.dom.esm.min.js",
"default": "./dist/floating-ui.dom.esm.js"
"browser": {
"development": "./dist/floating-ui.dom.browser.mjs",
"default": "./dist/floating-ui.dom.browser.min.mjs"
},
"default": "./dist/floating-ui.dom.mjs"
},
"require": "./dist/floating-ui.dom.cjs"
"module": "./dist/floating-ui.dom.esm.js",
"default": "./dist/floating-ui.dom.umd.js"
},
"./package.json": "./package.json",
"./src/index.ts": "./src/index.ts"
"./package.json": "./package.json"
},

@@ -62,3 +65,3 @@ "sideEffects": false,

"dependencies": {
"@floating-ui/core": "^0.6.2"
"@floating-ui/core": "^0.7.0"
},

@@ -65,0 +68,0 @@ "devDependencies": {

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