Skip to content

feat: update to upstream @floating-ui/vue@2.0.0#342

Merged
DanielleHuisman merged 1 commit into
mainfrom
upstream/vue-2.0.0
Jun 12, 2026
Merged

feat: update to upstream @floating-ui/vue@2.0.0#342
DanielleHuisman merged 1 commit into
mainfrom
upstream/vue-2.0.0

Conversation

@rust-for-web

@rust-for-web rust-for-web Bot commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Release
@floating-ui/vue@2.0.0

Diff for packages/vue

Diff
diff --git a/packages/vue/CHANGELOG.md b/packages/vue/CHANGELOG.md
index 81dbb61d..93475381 100644
--- a/packages/vue/CHANGELOG.md
+++ b/packages/vue/CHANGELOG.md
@@ -1,5 +1,11 @@
 # @floating-ui/vue
 
+## 2.0.0
+
+### Major Changes
+
+- breaking: drop the abandoned and soon-to-be-deprecated `vue-demi` package (see [Deprecation Warning](https://github.com/vueuse/vue-demi/pull/270)), ending support for Vue 2 and Vue <3.3.0
+
 ## 1.1.11
 
 ### Patch Changes
diff --git a/packages/vue/package.json b/packages/vue/package.json
index f15187f0..82c8a58d 100644
--- a/packages/vue/package.json
+++ b/packages/vue/package.json
@@ -1,6 +1,6 @@
 {
   "name": "@floating-ui/vue",
-  "version": "1.1.11",
+  "version": "2.0.0",
   "description": "Floating UI for Vue",
   "publishConfig": {
     "access": "public"
@@ -27,7 +27,7 @@
   ],
   "scripts": {
     "lint": "eslint .",
-    "format": "prettier --write .",
+    "format": "prettier --ignore-path ../../.gitignore --write .",
     "clean": "rimraf dist out-tsc",
     "test": "vitest run",
     "test:watch": "vitest watch",
@@ -58,15 +58,16 @@
   ],
   "dependencies": {
     "@floating-ui/dom": "workspace:^",
-    "@floating-ui/utils": "workspace:^",
-    "vue-demi": ">=0.13.0"
+    "@floating-ui/utils": "workspace:^"
   },
   "devDependencies": {
-    "@parcel/transformer-vue": "^2.10.3",
     "@testing-library/jest-dom": "^6.1.6",
     "@testing-library/vue": "^6.6.1",
     "@vitejs/plugin-vue": "^5.2.3",
     "config": "workspace:*",
     "vue": "^3.4.4"
+  },
+  "peerDependencies": {
+    "vue": ">=3.3.0"
   }
 }
diff --git a/packages/vue/rollup.config.mjs b/packages/vue/rollup.config.mjs
index bf5ec12f..e71fe014 100644
--- a/packages/vue/rollup.config.mjs
+++ b/packages/vue/rollup.config.mjs
@@ -10,7 +10,7 @@ export default defineRollupConfig({
     },
   ],
   globals: {
-    'vue-demi': 'VueDemi',
+    vue: 'Vue',
     '@floating-ui/dom': 'FloatingUIDOM',
     '@floating-ui/utils/dom': 'FloatingUIUtilsDOM',
   },
diff --git a/packages/vue/src/arrow.ts b/packages/vue/src/arrow.ts
index 215bee0c..307921b6 100644
--- a/packages/vue/src/arrow.ts
+++ b/packages/vue/src/arrow.ts
@@ -3,7 +3,7 @@ import {arrow as apply} from '@floating-ui/dom';
 
 import type {ArrowOptions} from './types';
 import {unwrapElement} from './utils/unwrapElement';
-import {toValue} from './utils/toValue';
+import {toValue} from 'vue';
 
 /**
  * Positions an inner element of the floating element such that it is centered to the reference element.
diff --git a/packages/vue/src/types.ts b/packages/vue/src/types.ts
index 02aea117..a8b49393 100644
--- a/packages/vue/src/types.ts
+++ b/packages/vue/src/types.ts
@@ -7,7 +7,7 @@ import type {
   ReferenceElement,
   Strategy,
 } from '@floating-ui/dom';
-import type {ComponentPublicInstance, Ref} from 'vue-demi';
+import type {ComponentPublicInstance, Ref} from 'vue';
 
 export type {
   AlignedPlacement,
diff --git a/packages/vue/src/useFloating.ts b/packages/vue/src/useFloating.ts
index 9897dba5..77df8e19 100644
--- a/packages/vue/src/useFloating.ts
+++ b/packages/vue/src/useFloating.ts
@@ -4,7 +4,7 @@ import type {
   ReferenceElement,
 } from '@floating-ui/dom';
 import {computePosition} from '@floating-ui/dom';
-import type {Ref} from 'vue-demi';
+import type {Ref} from 'vue';
 import {
   computed,
   getCurrentScope,
@@ -12,8 +12,9 @@ import {
   ref,
   shallowReadonly,
   shallowRef,
+  toValue,
   watch,
-} from 'vue-demi';
+} from 'vue';
 
 import type {
   MaybeElement,
@@ -23,7 +24,6 @@ import type {
 import {getDPR} from './utils/getDPR';
 import {roundByDPR} from './utils/roundByDPR';
 import {unwrapElement} from './utils/unwrapElement';
-import {toValue} from './utils/toValue';
 
 /**
  * Computes the `x` and `y` coordinates that will place the floating element next to a reference element when it is given a certain CSS positioning strategy.
diff --git a/packages/vue/src/utils/toValue.ts b/packages/vue/src/utils/toValue.ts
deleted file mode 100644
index 632b5625..00000000
--- a/packages/vue/src/utils/toValue.ts
+++ /dev/null
@@ -1,11 +0,0 @@
-import {unref} from 'vue-demi';
-import type {Ref} from 'vue-demi';
-
-type MaybeRef<T> = T | Ref<T>;
-type MaybeRefOrGetter<T> = MaybeRef<T> | (() => T);
-
-type AnyFn = (...args: any[]) => any;
-
-export function toValue<T>(source: MaybeRefOrGetter<T>): T {
-  return typeof source === 'function' ? (source as AnyFn)() : unref(source);
-}
diff --git a/packages/vue/src/utils/unwrapElement.ts b/packages/vue/src/utils/unwrapElement.ts
index 3601f4bd..f59c10c7 100644
--- a/packages/vue/src/utils/unwrapElement.ts
+++ b/packages/vue/src/utils/unwrapElement.ts
@@ -1,5 +1,5 @@
 import {getNodeName, isNode} from '@floating-ui/utils/dom';
-import type {ComponentPublicInstance} from 'vue-demi';
+import type {ComponentPublicInstance} from 'vue';
 
 import type {MaybeElement} from '../types';
 

Full diff
1.1.11...2.0.0.

@DanielleHuisman DanielleHuisman marked this pull request as ready for review June 12, 2026 07:12
@DanielleHuisman DanielleHuisman merged commit 561e39d into main Jun 12, 2026
9 of 11 checks passed
@DanielleHuisman DanielleHuisman deleted the upstream/vue-2.0.0 branch June 12, 2026 07:13
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.

1 participant