Skip to content

Commit 3c589ff

Browse files
committed
chore: vue-demi
1 parent 5e6ea7c commit 3c589ff

30 files changed

+953
-1488
lines changed

docs/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"dependencies": {
1717
"@vorms/core": "^1.1.0",
1818
"@vue-final-modal/nuxt": "workspace:1.0.3",
19-
"vue-final-modal": "workspace:4.5.2",
19+
"vue-final-modal": "workspace:4.5.3",
2020
"vue3-drag-resize": "^2.0.5"
2121
}
2222
}

examples/nuxt3/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,6 @@
1515
},
1616
"dependencies": {
1717
"@vue-final-modal/nuxt": "^1.0.3",
18-
"vue-final-modal": "^4.5.2"
18+
"vue-final-modal": "^4.5.3"
1919
}
2020
}

examples/vue3/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
"preview": "vite preview"
1010
},
1111
"dependencies": {
12-
"vue": "^3.3.7",
13-
"vue-final-modal": "^4.5.2"
12+
"vue": "^3.4.7",
13+
"vue-final-modal": "^4.5.3"
1414
},
1515
"devDependencies": {
1616
"@iconify/vue": "^4.1.1",

package.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,6 @@
1717
"prepare:module": "pnpm --filter @vue-final-modal/nuxt dev:prepare && pnpm --filter @vue-final-modal/nuxt prepack",
1818
"postinstall": "pnpm build:vfm && pnpm prepare:module"
1919
},
20-
"dependencies": {
21-
"vue": "^3.3.7"
22-
},
2320
"devDependencies": {
2421
"@antfu/eslint-config": "^0.37.0",
2522
"@types/node": "^20.10.0",

packages/nuxt/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
},
2525
"dependencies": {
2626
"@nuxt/kit": "^3.8.2",
27-
"vue-final-modal": "^4.5.2"
27+
"vue-final-modal": "^4.5.3"
2828
},
2929
"devDependencies": {
3030
"@nuxt/module-builder": "^0.5.4",

packages/vue-final-modal/cypress/components/Form.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<script setup lang="ts">
2-
import { ref } from 'vue'
2+
import { ref } from 'vue-demi'
33
44
const emit = defineEmits<{
55
(e: 'submit', payload: {

packages/vue-final-modal/package.json

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,26 +30,25 @@
3030
"release": "pnpm build && pnpm cypress:run && release-it"
3131
},
3232
"dependencies": {
33-
"@vueuse/core": "^10.5.0",
34-
"@vueuse/integrations": "^10.5.0",
35-
"focus-trap": "^7.5.4"
33+
"vue-demi": "^0.14.6"
3634
},
3735
"devDependencies": {
3836
"@cypress/vue": "^5.0.5",
3937
"@release-it/conventional-changelog": "^5.1.1",
40-
"@vue-macros/volar": "^0.8.4",
38+
"@vueuse/core": "^10.7.1",
39+
"@vueuse/integrations": "^10.7.1",
4140
"cypress": "^13.6.0",
41+
"focus-trap": "^7.5.4",
4242
"release-it": "^16.1.3",
43-
"unplugin-vue-define-options": "^1.3.8",
44-
"unplugin-vue-macros": "^2.3.0",
4543
"vite-plugin-dts": "^3.6.3",
46-
"vue": "^3.3.7"
44+
"vue": "^3.4.7"
4745
},
4846
"peerDependencies": {
4947
"@vueuse/core": ">=10.0.0",
5048
"@vueuse/integrations": ">=10.0.0",
5149
"focus-trap": ">=7.2.0",
52-
"vue": ">=3.2.0"
50+
"@vue/composition-api": "^1.0.0-rc.1",
51+
"vue": ">=2.7.0 || >=3.0.0"
5352
},
5453
"homepage": "https://vue-final-modal.org/",
5554
"bugs": {

packages/vue-final-modal/src/Modal.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { App, CSSProperties, Component, ComponentInternalInstance, FunctionalComponent, Raw, Ref } from 'vue'
1+
import type { App, CSSProperties, Component, ComponentInternalInstance, FunctionalComponent, Raw, Ref } from 'vue-demi'
22
import type { ComponentProps, ComponentSlots } from './Component'
33

44
export type ModalId = number | string | symbol

packages/vue-final-modal/src/components/ModalsContainer.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<script setup lang="ts">
2-
import type { Component } from 'vue'
3-
import { computed, onBeforeUnmount } from 'vue'
2+
import type { Component } from 'vue-demi'
3+
import { computed, onBeforeUnmount } from 'vue-demi'
44
import type { ModalSlotOptions } from '..'
55
import { isString } from '~/utils'
66
import { isModalSlotOptions, useVfm } from '~/useApi'

packages/vue-final-modal/src/components/VueFinalModal/VueFinalModal.vue

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<script setup lang="ts">
2-
import { computed, getCurrentInstance, nextTick, onBeforeUnmount, onMounted, ref, toRef, useAttrs, watch } from 'vue'
2+
import { computed, getCurrentInstance, nextTick, onBeforeUnmount, onMounted, ref, toRef, useAttrs, watch } from 'vue-demi'
33
import { vueFinalModalProps } from './VueFinalModalProps'
44
import { useTransition } from './useTransition'
55
import { useToClose } from './useToClose'
@@ -30,8 +30,6 @@ const props = defineProps(vueFinalModalProps)
3030
const emit = defineEmits<VueFinalModalEmits>()
3131
const attrs = useAttrs()
3232
33-
defineOptions({ inheritAttrs: false })
34-
3533
const instance = getCurrentInstance()
3634
3735
defineSlots<{
@@ -182,6 +180,12 @@ defineExpose({
182180
})
183181
</script>
184182

183+
<script lang="ts">
184+
export default {
185+
inheritAttrs: false,
186+
}
187+
</script>
188+
185189
<template>
186190
<Teleport :to="teleportTo ? teleportTo : undefined" :disabled="!teleportTo">
187191
<div

packages/vue-final-modal/src/components/VueFinalModal/VueFinalModalProps.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import type { Options } from 'focus-trap'
2-
import type { PropType, RendererElement, TransitionProps } from 'vue'
2+
import type { PropType, RendererElement, TransitionProps } from 'vue-demi'
33
import type { ModalId, StyleValue } from '~/Modal'
44

55
/**

packages/vue-final-modal/src/components/VueFinalModal/useBodyScrollLock.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import type { Ref } from 'vue'
2-
import { onBeforeUnmount, watch } from 'vue'
1+
import type { Ref } from 'vue-demi'
2+
import { onBeforeUnmount, watch } from 'vue-demi'
33
import type VueFinalModal from './VueFinalModal.vue'
44

55
type BodyScrollOptions = {

packages/vue-final-modal/src/components/VueFinalModal/useFocusTrap.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { Ref } from 'vue'
1+
import type { Ref } from 'vue-demi'
22
import { useFocusTrap as _useFocusTrap } from '@vueuse/integrations/useFocusTrap'
33
import type VueFinalModal from './VueFinalModal.vue'
44

packages/vue-final-modal/src/components/VueFinalModal/useModelValue.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { nextTick, ref, watch } from 'vue'
2-
import type { Ref } from 'vue'
1+
import { nextTick, ref, watch } from 'vue-demi'
2+
import type { Ref } from 'vue-demi'
33
import type VueFinalModal from './VueFinalModal.vue'
44

55
export function useModelValue(

packages/vue-final-modal/src/components/VueFinalModal/useToClose.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import type { Ref } from 'vue'
2-
import { ref } from 'vue'
1+
import type { Ref } from 'vue-demi'
2+
import { ref } from 'vue-demi'
33
import type VueFinalModal from './VueFinalModal.vue'
44

55
export function useToClose(

packages/vue-final-modal/src/components/VueFinalModal/useTransition.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import type { ComputedRef, Ref, TransitionProps } from 'vue'
2-
import { computed, nextTick, ref, watch } from 'vue'
1+
import type { ComputedRef, Ref, TransitionProps } from 'vue-demi'
2+
import { computed, nextTick, ref, watch } from 'vue-demi'
33
import type VueFinalModal from './VueFinalModal.vue'
44

55
export enum TransitionState {

packages/vue-final-modal/src/components/VueFinalModal/useZIndex.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { ref } from 'vue'
1+
import { ref } from 'vue-demi'
22
import type VueFinalModal from './VueFinalModal.vue'
33

44
export function useZIndex(

packages/vue-final-modal/src/components/VueFinalModal/vVisible.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { Directive } from 'vue'
1+
import type { Directive } from 'vue-demi'
22

33
interface VVisibleElement extends HTMLElement {
44
// _vov = vue original visibility
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { InjectionKey } from 'vue'
1+
import type { InjectionKey } from 'vue-demi'
22
import type { Vfm } from './Modal'
33

44
export const vfmSymbol = Symbol(__DEV__ ? 'vfm' : '') as InjectionKey<Vfm>

packages/vue-final-modal/src/plugin.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import type { App, ComponentInternalInstance, ComputedRef } from 'vue'
2-
import { getCurrentInstance, inject, markRaw, ref, shallowReactive } from 'vue'
1+
import type { App, ComponentInternalInstance, ComputedRef } from 'vue-demi'
2+
import { getCurrentInstance, inject, markRaw, ref, shallowReactive } from 'vue-demi'
33
import { vfmSymbol } from './injectionSymbols'
44
import type { ModalExposed, ModalId, UseModalOptions, UseModalOptionsPrivate, Vfm } from './Modal'
55
import { noop } from './utils'

packages/vue-final-modal/src/useApi.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import type { Component } from 'vue'
2-
import { computed, markRaw, nextTick, reactive, useAttrs } from 'vue'
1+
import type { Component } from 'vue-demi'
2+
import { computed, markRaw, nextTick, reactive, useAttrs } from 'vue-demi'
33
import { tryOnUnmounted } from '@vueuse/core'
44
import VueFinalModal from './components/VueFinalModal/VueFinalModal.vue'
55
import type { ModalSlotOptions, UseModalOptions, UseModalOptionsPrivate, UseModalReturnType, Vfm } from './Modal'

packages/vue-final-modal/src/useSwipeToClose.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { useEventListener } from '@vueuse/core'
2-
import type { Ref } from 'vue'
3-
import { computed, ref, watch } from 'vue'
2+
import type { Ref } from 'vue-demi'
3+
import { computed, ref, watch } from 'vue-demi'
44
import type VueFinalModal from './components/VueFinalModal/VueFinalModal.vue'
55
import { useSwipeable } from './useSwipeable'
66
import { clamp, noop } from './utils'

packages/vue-final-modal/src/useSwipeable.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import type { Ref } from 'vue'
2-
import { computed, onMounted, reactive, ref } from 'vue'
1+
import type { Ref } from 'vue-demi'
2+
import { computed, onMounted, reactive, ref } from 'vue-demi'
33
import { useEventListener } from '@vueuse/core'
44
import { checkPassiveEventSupport, getPosition } from './dom'
55

packages/vue-final-modal/tsconfig.json

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,6 @@
1717
]
1818
}
1919
},
20-
"vueCompilerOptions": {
21-
"plugins": [
22-
"@vue-macros/volar/define-model",
23-
"@vue-macros/volar/short-vmodel",
24-
"@vue-macros/volar/define-slots"
25-
],
26-
"shortVmodel": {
27-
"prefix": "$"
28-
}
29-
},
3020
"exclude": [
3121
"dist",
3222
"coverage",

packages/vue-final-modal/vite.config.ts

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
import path from 'node:path'
22
import { defineConfig } from 'vite'
33
import Vue from '@vitejs/plugin-vue'
4-
// @ts-expect-error
5-
import VueMacros from 'unplugin-vue-macros/vite'
6-
// @ts-expect-error
7-
import DefineOptions from 'unplugin-vue-define-options/vite'
84
import dts from 'vite-plugin-dts'
95

106
const name = 'index'
@@ -16,12 +12,7 @@ export default defineConfig({
1612
},
1713
},
1814
plugins: [
19-
VueMacros({
20-
plugins: {
21-
vue: Vue(),
22-
},
23-
}),
24-
DefineOptions(),
15+
Vue(),
2516
dts({
2617
include: 'src',
2718
}),

0 commit comments

Comments
 (0)