Skip to content

Conversation

@github-actions
Copy link
Contributor

Release
@floating-ui/core@1.6.1

Diff for packages/core

Diff
diff --git a/packages/core/CHANGELOG.md b/packages/core/CHANGELOG.md
index 914dc35b..6b800c2e 100644
--- a/packages/core/CHANGELOG.md
+++ b/packages/core/CHANGELOG.md
@@ -1,5 +1,11 @@
 # @floating-ui/core
 
+## 1.6.1
+
+### Patch Changes
+
+- fix: avoid spreading rects to support `DOMRect` types
+
 ## 1.6.0
 
 ### Minor Changes
diff --git a/packages/core/package.json b/packages/core/package.json
index 958c56fd..9e51d594 100644
--- a/packages/core/package.json
+++ b/packages/core/package.json
@@ -1,6 +1,6 @@
 {
   "name": "@floating-ui/core",
-  "version": "1.6.0",
+  "version": "1.6.1",
   "description": "Positioning library for floating elements: tooltips, popovers, dropdowns, and more",
   "publishConfig": {
     "access": "public"
@@ -28,7 +28,8 @@
   "scripts": {
     "test": "vitest run",
     "test:watch": "vitest watch",
-    "lint": "biome lint .",
+    "lint": "eslint .",
+    "format": "prettier --write .",
     "clean": "rimraf dist out-tsc",
     "dev": "rollup -c -w",
     "build": "rollup -c",
@@ -55,7 +56,7 @@
     "positioning"
   ],
   "dependencies": {
-    "@floating-ui/utils": "workspace:^"
+    "@floating-ui/utils": "^0.2.0"
   },
   "devDependencies": {
     "config": "workspace:*"
diff --git a/packages/core/src/detectOverflow.ts b/packages/core/src/detectOverflow.ts
index caa0b078..f9c206ee 100644
--- a/packages/core/src/detectOverflow.ts
+++ b/packages/core/src/detectOverflow.ts
@@ -82,7 +82,9 @@ export async function detectOverflow(
   );
 
   const rect =
-    elementContext === 'floating' ? {...rects.floating, x, y} : rects.reference;
+    elementContext === 'floating'
+      ? {x, y, width: rects.floating.width, height: rects.floating.height}
+      : rects.reference;
 
   const offsetParent = await platform.getOffsetParent?.(elements.floating);
   const offsetScale = (await platform.isElement?.(offsetParent))
diff --git a/packages/core/src/middleware/offset.ts b/packages/core/src/middleware/offset.ts
index 32934b2e..3673a79d 100644
--- a/packages/core/src/middleware/offset.ts
+++ b/packages/core/src/middleware/offset.ts
@@ -55,6 +55,7 @@ export async function convertValueToCoords(
   const crossAxisMulti = rtl && isVertical ? -1 : 1;
   const rawValue = evaluate(options, state);
 
+  // eslint-disable-next-line prefer-const
   let {mainAxis, crossAxis, alignmentAxis} =
     typeof rawValue === 'number'
       ? {mainAxis: rawValue, crossAxis: 0, alignmentAxis: null}

Full diff
1.6.0...1.6.1.

@DanielleHuisman DanielleHuisman marked this pull request as ready for review April 30, 2024 05:57
@DanielleHuisman DanielleHuisman merged commit 8fae3f1 into main Apr 30, 2024
@DanielleHuisman DanielleHuisman deleted the upstream/core-1.6.1 branch April 30, 2024 05:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants