Skip to content

Commit 5e2346a

Browse files
authored
feat: separate component logic, add <MotionGroup> and tests (#187)
1 parent e8b0b47 commit 5e2346a

File tree

21 files changed

+6333
-4963
lines changed

21 files changed

+6333
-4963
lines changed

docs/components/content/Illustration.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ refs.forEach((ref, index) => {
4040
y: 20,
4141
transition: {
4242
duration: 1500,
43-
repeat: Infinity,
43+
repeat: Number.POSITIVE_INFINITY,
4444
ease: 'easeInOut',
4545
repeatType: 'mirror',
4646
},

docs/components/content/Person.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ refs.forEach((ref, index) => {
3838
y: 15,
3939
transition: {
4040
duration: 1500,
41-
repeat: Infinity,
41+
repeat: Number.POSITIVE_INFINITY,
4242
ease: 'easeInOut',
4343
repeatType: 'mirror',
4444
},

docs/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"@vueuse/motion": "workspace:~"
1111
},
1212
"devDependencies": {
13-
"@nuxt-themes/docus": "^1.12.0",
14-
"nuxt": "^3.5.1"
13+
"@nuxt-themes/docus": "^1.15.0",
14+
"nuxt": "^3.11.2"
1515
}
1616
}

package.json

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -75,21 +75,22 @@
7575
"vue": ">=3.0.0"
7676
},
7777
"dependencies": {
78-
"@vueuse/core": "^10.1.2",
79-
"@vueuse/shared": "^10.1.2",
80-
"csstype": "^3.1.2",
78+
"@vueuse/core": "^10.9.0",
79+
"@vueuse/shared": "^10.9.0",
80+
"csstype": "^3.1.3",
8181
"framesync": "^6.1.2",
8282
"popmotion": "^11.0.5",
8383
"style-value-types": "^5.1.2"
8484
},
8585
"optionalDependencies": {
86-
"@nuxt/kit": "^3.5.1"
86+
"@nuxt/kit": "^3.11.2"
8787
},
8888
"devDependencies": {
8989
"@antfu/eslint-config": "^0.39.3",
90-
"@nuxt/kit": "^3.5.1",
90+
"@nuxt/kit": "^3.11.2",
91+
"@nuxt/schema": "^3.11.2",
9192
"@nuxtjs/eslint-config-typescript": "^12.0.0",
92-
"@vitest/coverage-c8": "^0.31.1",
93+
"@vitest/coverage-v8": "^1.5.0",
9394
"@vue/test-utils": "^2.3.2",
9495
"chokidar": "^3.5.3",
9596
"eslint": "^8.41.0",
@@ -99,11 +100,11 @@
99100
"happy-dom": "^9.20.3",
100101
"lint-staged": "^13.2.2",
101102
"prettier": "^2.8.8",
102-
"typescript": "^5.0.4",
103+
"typescript": "^5.4.5",
103104
"unbuild": "^2.0.0",
104105
"vite": "4.3.8",
105-
"vitest": "^0.31.1",
106-
"vue": "^3.3.4",
106+
"vitest": "^1.5.0",
107+
"vue": "^3.4.23",
107108
"yorkie": "^2.0.0"
108109
},
109110
"gitHooks": {

playgrounds/nuxt/.npmrc

Lines changed: 0 additions & 1 deletion
This file was deleted.

playgrounds/nuxt/app.vue

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
<template>
2-
<NuxtPage />
2+
<div>
3+
<NuxtPage />
4+
</div>
35
</template>

playgrounds/nuxt/nuxt.config.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
import { resolve } from 'node:path'
22

33
export default defineNuxtConfig({
4+
features: {
5+
devLogs: false,
6+
},
47
css: ['~/assets/pico.css'],
58
alias: {
69
'@vueuse/motion': resolve(__dirname, '../../src/index.ts'),

playgrounds/nuxt/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"@vueuse/motion": "workspace:~"
1111
},
1212
"devDependencies": {
13-
"@nuxt/content": "^2.6.0",
14-
"nuxt": "^3.5.1"
13+
"@nuxt/content": "^2.12.1",
14+
"nuxt": "^3.11.2"
1515
}
1616
}

playgrounds/vite/src/demos/Editor.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ const codeText = computed(() => basic(input.value))
1313
watch(input, (newVal) => {
1414
if (motions.editor) {
1515
motions.editor.apply({
16-
rotate: parseInt(newVal),
16+
rotate: Number.parseInt(newVal),
1717
})
1818
}
1919
})

0 commit comments

Comments
 (0)