Skip to content

Commit 9882e67

Browse files
feat!: move transitions and maxToasts to theme config
1 parent 2f7cafc commit 9882e67

17 files changed

+1878
-1904
lines changed

playground/app.config.ts renamed to .playground/app.config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// @ts-expect-error
12
export default defineAppConfig({
23
toaster: {
34
maxToasts: 10

playground/app.vue renamed to .playground/app.vue

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@ function showCustomToast() {
1919
h(CustomToast, {
2020
message: `Hello ${i} from Nuxt module playground!`
2121
}),
22-
transition: {
23-
name: 'toaster'
24-
},
25-
maxToasts: 5,
2622
theme: {
23+
transition: {
24+
name: 'toaster'
25+
},
26+
maxToasts: 5,
2727
containerId: 'nt-container-bottom-right',
2828
containerClass: [
2929
'absolute',
@@ -48,9 +48,9 @@ async function showAdvancedToast() {
4848
message: `Hello ${i} from Nuxt module playground!`
4949
}),
5050
dismissible: false,
51-
maxToasts: 1,
5251
theme: {
5352
containerId: 'nt-container-top-left',
53+
maxToasts: 1,
5454
containerClass: [
5555
'absolute',
5656
'inset-0',
@@ -70,15 +70,15 @@ async function showAdvancedToast() {
7070
'focus:outline-2',
7171
'focus-within:outline',
7272
'focus-within:outline-2'
73-
]
74-
},
75-
transition: {
76-
enterActiveClass: 'transition duration-300 ease-out',
77-
enterFromClass: 'transform translate-x-full opacity-0',
78-
enterToClass: 'transform translate-x-0 opacity-100',
79-
leaveActiveClass: 'transition duration-300 ease-in',
80-
leaveFromClass: 'transform translate-x-0 opacity-100',
81-
leaveToClass: 'transform translate-x-full opacity-0'
73+
],
74+
transition: {
75+
enterActiveClass: 'transition duration-300 ease-out',
76+
enterFromClass: 'transform translate-x-full opacity-0',
77+
enterToClass: 'transform translate-x-0 opacity-100',
78+
leaveActiveClass: 'transition duration-300 ease-in',
79+
leaveFromClass: 'transform translate-x-0 opacity-100',
80+
leaveToClass: 'transform translate-x-full opacity-0'
81+
}
8282
}
8383
})
8484

playground/components/AdvancedToast.vue renamed to .playground/components/AdvancedToast.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<script setup lang="ts">
2+
// @ts-expect-error
23
import { useNinjaToasterProgress, useNinjaToasterState } from '#imports'
34
45
const props = defineProps<{

playground/nuxt.config.ts renamed to .playground/nuxt.config.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import { defineNuxtConfig } from 'nuxt/config'
2-
// @ts-expect-error - this is a playground
32
import NinjaNuxtToaster from '..'
43

54
export default defineNuxtConfig({
File renamed without changes.

package.json

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@
1616
],
1717
"scripts": {
1818
"prepack": "nuxt-module-build",
19-
"dev": "nuxi dev playground",
20-
"dev:build": "nuxi build playground",
21-
"dev:prepare": "nuxt-module-build --stub && nuxi prepare playground",
19+
"dev": "nuxi dev .playground",
20+
"dev:build": "nuxi build .playground",
21+
"dev:prepare": "nuxt-module-build --stub && nuxi prepare .playground",
2222
"eslint": "eslint .",
2323
"eslint:fix": "eslint --fix .",
2424
"test": "run-p test:*",
@@ -27,23 +27,24 @@
2727
"release": "standard-version && git push --follow-tags origin main && npm publish"
2828
},
2929
"dependencies": {
30-
"@nuxt/kit": "^3.0.0",
31-
"@vueuse/core": "^9.6.0",
32-
"defu": "^6.1.1"
30+
"@nuxt/kit": "^3.3.2",
31+
"@vueuse/core": "^9.13.0",
32+
"defu": "^6.1.2"
3333
},
3434
"devDependencies": {
35-
"@antfu/eslint-config": "^0.31.0",
35+
"@antfu/eslint-config": "^0.37.0",
3636
"@nuxt/module-builder": "^0.2.1",
37-
"@nuxt/schema": "^3.0.0",
38-
"eslint": "8.28.0",
39-
"eslint-config-prettier": "8.5.0",
37+
"@nuxt/schema": "^3.3.2",
38+
"@types/node": "18.15.9",
39+
"eslint": "8.36.0",
40+
"eslint-config-prettier": "8.8.0",
4041
"eslint-plugin-prettier-vue": "4.2.0",
41-
"eslint-plugin-tailwindcss": "3.7.0",
42-
"eslint-plugin-vuejs-accessibility": "2.0.0",
42+
"eslint-plugin-tailwindcss": "3.10.1",
43+
"eslint-plugin-vuejs-accessibility": "2.1.0",
4344
"npm-run-all": "^4.1.5",
44-
"nuxt": "^3.0.0",
45+
"nuxt": "^3.3.2",
4546
"standard-version": "^9.5.0",
46-
"vue": "^3.2.45",
47-
"vue-tsc": "^1.0.9"
47+
"vue": "^3.2.47",
48+
"vue-tsc": "^1.2.0"
4849
}
4950
}

0 commit comments

Comments
 (0)