@dargmuesli/nuxt-vio 9.0.0-beta.3 → 9.0.0-beta.4
Sign up to get free protection for your applications and to get access to all the features.
- package/components/vio/button/VioButtonShare.vue +1 -1
- package/nuxt.config.ts +1 -2
- package/package.json +63 -58
- package/utils/text.ts +2 -19
@@ -25,7 +25,7 @@ const copy = async (string: string) => {
|
|
25
25
|
if (typeof window === 'undefined') return
|
26
26
|
|
27
27
|
try {
|
28
|
-
await
|
28
|
+
await copyText(string)
|
29
29
|
showToast({ title: t('donationUrlCopySuccess') })
|
30
30
|
} catch (error: any) {
|
31
31
|
alert(t('donationUrlCopyError'))
|
package/nuxt.config.ts
CHANGED
@@ -18,7 +18,6 @@ export default defineNuxtConfig(
|
|
18
18
|
defu(
|
19
19
|
{
|
20
20
|
alias: {
|
21
|
-
clipboard: 'clipboard',
|
22
21
|
dayjs: 'dayjs',
|
23
22
|
sweetalert2: 'sweetalert2',
|
24
23
|
}, // TODO: remove (https://github.com/nuxt/nuxt/issues/19426)
|
@@ -51,7 +50,7 @@ export default defineNuxtConfig(
|
|
51
50
|
'@nuxtjs/tailwindcss',
|
52
51
|
'@nuxtseo/module',
|
53
52
|
'@pinia/nuxt',
|
54
|
-
// nuxt-security: remove invalid `'none'`s
|
53
|
+
// nuxt-security: remove invalid `'none'`s and duplicates
|
55
54
|
(_options, nuxt) => {
|
56
55
|
const nuxtConfigSecurity = nuxt.options.security
|
57
56
|
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@dargmuesli/nuxt-vio",
|
3
|
-
"version": "9.0.0-beta.
|
3
|
+
"version": "9.0.0-beta.4",
|
4
4
|
"repository": {
|
5
5
|
"type": "git",
|
6
6
|
"url": "git+https://github.com/dargmuesli/vio.git"
|
@@ -12,7 +12,7 @@
|
|
12
12
|
"engines": {
|
13
13
|
"node": "20"
|
14
14
|
},
|
15
|
-
"packageManager": "pnpm@8.
|
15
|
+
"packageManager": "pnpm@8.10.2",
|
16
16
|
"files": [
|
17
17
|
"assets",
|
18
18
|
"components",
|
@@ -33,84 +33,55 @@
|
|
33
33
|
"tailwind.config.ts"
|
34
34
|
],
|
35
35
|
"main": "nuxt.config.ts",
|
36
|
-
"
|
37
|
-
"
|
38
|
-
"build:node": "nuxt build .playground",
|
39
|
-
"build:static": "nuxt generate .playground",
|
40
|
-
"build:static:test": "cross-env NODE_ENV=production SITE_URL=http://localhost:3002 pnpm run build:static",
|
41
|
-
"dev": "pnpm run start:dev",
|
42
|
-
"generate": "pnpm run build:static",
|
43
|
-
"lint:fix": "pnpm run lint:js --fix && pnpm run lint:ts --fix && pnpm run lint:style --fix",
|
44
|
-
"lint:js": "eslint --cache --ext .js,.ts,.vue --ignore-path .gitignore .",
|
45
|
-
"lint:staged": "lint-staged",
|
46
|
-
"lint:style": "stylelint --cache \"**/*.{vue,css}\" --ignore-path .gitignore",
|
47
|
-
"lint:ts": "nuxt typecheck",
|
48
|
-
"lint": "pnpm run lint:js && pnpm run lint:ts && pnpm run lint:style",
|
49
|
-
"prepare": "nuxt prepare .playground",
|
50
|
-
"preview": "nuxt preview .playground",
|
51
|
-
"start:dev": "nuxt dev .playground",
|
52
|
-
"start:node": "node .playground/.output/server/index.mjs",
|
53
|
-
"start:static": "serve .playground/.output/public",
|
54
|
-
"start:static:test": "cross-env NODE_ENV=production PORT=3002 SITE_URL=http://localhost:3002 pnpm run start:static",
|
55
|
-
"test:e2e:docker:br": "pnpm run test:e2e:docker:build && pnpm run test:e2e:docker:run",
|
56
|
-
"test:e2e:docker:build": "docker build -t test-e2e_base --build-arg UID=$(id -u) --build-arg GID=$(id -g) --target test-e2e_base ..",
|
57
|
-
"test:e2e:docker:run": "docker run --rm -v \"$PWD/..:/srv/app\" -v \"$(pnpm store path):/srv/.pnpm-store\" test-e2e_base",
|
58
|
-
"test:e2e:docker:server:dev:update": "pnpm run test:e2e:docker:server:dev --update-snapshots",
|
59
|
-
"test:e2e:docker:server:dev": "pnpm run test:e2e:docker:br pnpm --dir src run test:e2e:server:dev",
|
60
|
-
"test:e2e:docker:server:node:update": "pnpm run test:e2e:docker:server:node --update-snapshots",
|
61
|
-
"test:e2e:docker:server:node": "pnpm run test:e2e:docker:br pnpm --dir src run test:e2e:server:node",
|
62
|
-
"test:e2e:docker:server:static:update": "pnpm run test:e2e:docker:server:static --update-snapshots",
|
63
|
-
"test:e2e:docker:server:static": "pnpm run test:e2e:docker:br pnpm --dir src run test:e2e:server:static",
|
64
|
-
"test:e2e:server:dev": "cross-env PORT=3000 SITE_URL=http://localhost:3000 VIO_SERVER=dev pnpm run test:e2e",
|
65
|
-
"test:e2e:server:node": "cross-env NODE_ENV=production NUXT_PUBLIC_I18N_BASE_URL=http://localhost:3001 NUXT_PUBLIC_SITE_URL=http://localhost:3001 PORT=3001 VIO_SERVER=node pnpm run test:e2e",
|
66
|
-
"test:e2e:server:static": "cross-env NODE_ENV=production PORT=3002 SITE_URL=http://localhost:3002 VIO_SERVER=static pnpm run test:e2e",
|
67
|
-
"test:e2e": "playwright test"
|
68
|
-
},
|
69
|
-
"devDependencies": {
|
70
|
-
"@axe-core/playwright": "4.8.1",
|
71
|
-
"@dargmuesli/nuxt-cookie-control": "7.0.1",
|
36
|
+
"dependencies": {
|
37
|
+
"@dargmuesli/nuxt-cookie-control": "7.1.1",
|
72
38
|
"@heroicons/vue": "2.0.18",
|
73
39
|
"@http-util/status-i18n": "0.8.1",
|
74
|
-
"@intlify/eslint-plugin-vue-i18n": "3.0.0-next.4",
|
75
40
|
"@nuxt/devtools": "1.0.0",
|
76
41
|
"@nuxt/image": "1.0.0",
|
77
42
|
"@nuxtjs/color-mode": "3.3.0",
|
78
|
-
"@nuxtjs/eslint-config-typescript": "12.1.0",
|
79
43
|
"@nuxtjs/html-validator": "1.5.2",
|
80
|
-
"@nuxtjs/i18n": "npm:@nuxtjs/i18n-edge@8.0.0-rc.5-
|
81
|
-
"@nuxtjs/tailwindcss": "6.
|
44
|
+
"@nuxtjs/i18n": "npm:@nuxtjs/i18n-edge@8.0.0-rc.5-28319130.4a511e8",
|
45
|
+
"@nuxtjs/tailwindcss": "6.9.4",
|
82
46
|
"@nuxtseo/module": "2.0.0-beta.39",
|
83
47
|
"@pinia/nuxt": "0.5.1",
|
84
|
-
"@playwright/test": "1.39.0",
|
85
48
|
"@tailwindcss/forms": "0.5.6",
|
86
49
|
"@tailwindcss/typography": "0.5.10",
|
87
50
|
"@types/lodash-es": "4.17.10",
|
88
|
-
"@
|
51
|
+
"@vuelidate/core": "2.0.3",
|
52
|
+
"@vuelidate/validators": "2.0.4",
|
53
|
+
"clipboardy": "4.0.0",
|
54
|
+
"dayjs": "2.0.0-alpha.4",
|
55
|
+
"jose": "5.1.0",
|
56
|
+
"nuxt-security": "1.0.0-rc.2",
|
57
|
+
"sweetalert2": "11.9.0",
|
58
|
+
"vue-gtag": "2.0.1"
|
59
|
+
},
|
60
|
+
"devDependencies": {
|
61
|
+
"@axe-core/playwright": "4.8.1",
|
62
|
+
"@intlify/eslint-plugin-vue-i18n": "3.0.0-next.4",
|
63
|
+
"@nuxtjs/eslint-config-typescript": "12.1.0",
|
64
|
+
"@playwright/test": "1.39.0",
|
65
|
+
"@unhead/vue": "1.8.3",
|
89
66
|
"@urql/core": "4.1.4",
|
90
67
|
"@urql/devtools": "2.0.3",
|
91
68
|
"@urql/exchange-graphcache": "6.3.3",
|
92
69
|
"@urql/vue": "1.1.2",
|
93
|
-
"@vuelidate/core": "2.0.3",
|
94
|
-
"@vuelidate/validators": "2.0.4",
|
95
|
-
"clipboard": "2.0.11",
|
96
70
|
"consola": "3.2.3",
|
97
71
|
"cookie-es": "1.0.0",
|
98
72
|
"cross-env": "7.0.3",
|
99
|
-
"dayjs": "2.0.0-alpha.4",
|
100
73
|
"defu": "6.1.3",
|
101
|
-
"eslint": "8.
|
74
|
+
"eslint": "8.53.0",
|
102
75
|
"eslint-config-prettier": "9.0.0",
|
103
76
|
"eslint-plugin-compat": "4.2.0",
|
104
77
|
"eslint-plugin-nuxt": "4.0.0",
|
105
78
|
"eslint-plugin-prettier": "5.0.1",
|
106
79
|
"eslint-plugin-yml": "1.10.0",
|
107
80
|
"h3": "1.8.2",
|
108
|
-
"jiti": "1.
|
109
|
-
"jose": "5.0.1",
|
81
|
+
"jiti": "1.21.0",
|
110
82
|
"lint-staged": "15.0.2",
|
111
83
|
"lodash-es": "4.17.21",
|
112
|
-
"nuxt": "3.8.
|
113
|
-
"nuxt-security": "1.0.0-rc.2",
|
84
|
+
"nuxt": "3.8.1",
|
114
85
|
"ofetch": "1.3.3",
|
115
86
|
"pinia": "2.1.7",
|
116
87
|
"prettier": "3.0.3",
|
@@ -120,16 +91,50 @@
|
|
120
91
|
"stylelint-config-recommended-vue": "1.5.0",
|
121
92
|
"stylelint-config-standard": "34.0.0",
|
122
93
|
"stylelint-no-unsupported-browser-features": "7.0.0",
|
123
|
-
"sweetalert2": "11.7.32",
|
124
94
|
"tailwindcss": "3.3.5",
|
125
95
|
"ufo": "1.3.1",
|
126
|
-
"unhead": "1.
|
127
|
-
"vue": "3.3.
|
128
|
-
"vue-gtag": "2.0.1",
|
96
|
+
"unhead": "1.8.0-beta.2",
|
97
|
+
"vue": "3.3.8",
|
129
98
|
"vue-router": "4.2.5",
|
130
99
|
"vue-tsc": "1.8.22"
|
131
100
|
},
|
132
101
|
"peerDependencies": {
|
133
|
-
"playwright-core": "1.39.0"
|
102
|
+
"playwright-core": "1.39.0",
|
103
|
+
"nuxt": "3.8.1",
|
104
|
+
"vue": "3.3.8",
|
105
|
+
"vue-router": "4.2.5"
|
106
|
+
},
|
107
|
+
"scripts": {
|
108
|
+
"build": "pnpm run build:node",
|
109
|
+
"build:node": "nuxt build .playground",
|
110
|
+
"build:static": "nuxt generate .playground",
|
111
|
+
"build:static:test": "cross-env NODE_ENV=production SITE_URL=http://localhost:3002 pnpm run build:static",
|
112
|
+
"dev": "pnpm run start:dev",
|
113
|
+
"generate": "pnpm run build:static",
|
114
|
+
"lint:fix": "pnpm run lint:js --fix && pnpm run lint:ts --fix && pnpm run lint:style --fix",
|
115
|
+
"lint:js": "eslint --cache --ext .js,.ts,.vue --ignore-path .gitignore .",
|
116
|
+
"lint:staged": "lint-staged",
|
117
|
+
"lint:style": "stylelint --cache \"**/*.{vue,css}\" --ignore-path .gitignore",
|
118
|
+
"lint:ts": "nuxt typecheck",
|
119
|
+
"lint": "pnpm run lint:js && pnpm run lint:ts && pnpm run lint:style",
|
120
|
+
"prepare": "nuxt prepare .playground",
|
121
|
+
"preview": "nuxt preview .playground",
|
122
|
+
"start:dev": "nuxt dev .playground",
|
123
|
+
"start:node": "node .playground/.output/server/index.mjs",
|
124
|
+
"start:static": "serve .playground/.output/public",
|
125
|
+
"start:static:test": "cross-env NODE_ENV=production PORT=3002 SITE_URL=http://localhost:3002 pnpm run start:static",
|
126
|
+
"test:e2e:docker:br": "pnpm run test:e2e:docker:build && pnpm run test:e2e:docker:run",
|
127
|
+
"test:e2e:docker:build": "docker build -t test-e2e_base --build-arg UID=$(id -u) --build-arg GID=$(id -g) --target test-e2e_base ..",
|
128
|
+
"test:e2e:docker:run": "docker run --rm -v \"$PWD/..:/srv/app\" -v \"$(pnpm store path):/srv/.pnpm-store\" test-e2e_base",
|
129
|
+
"test:e2e:docker:server:dev:update": "pnpm run test:e2e:docker:server:dev --update-snapshots",
|
130
|
+
"test:e2e:docker:server:dev": "pnpm run test:e2e:docker:br pnpm --dir src run test:e2e:server:dev",
|
131
|
+
"test:e2e:docker:server:node:update": "pnpm run test:e2e:docker:server:node --update-snapshots",
|
132
|
+
"test:e2e:docker:server:node": "pnpm run test:e2e:docker:br pnpm --dir src run test:e2e:server:node",
|
133
|
+
"test:e2e:docker:server:static:update": "pnpm run test:e2e:docker:server:static --update-snapshots",
|
134
|
+
"test:e2e:docker:server:static": "pnpm run test:e2e:docker:br pnpm --dir src run test:e2e:server:static",
|
135
|
+
"test:e2e:server:dev": "cross-env PORT=3000 SITE_URL=http://localhost:3000 VIO_SERVER=dev pnpm run test:e2e",
|
136
|
+
"test:e2e:server:node": "cross-env NODE_ENV=production NUXT_PUBLIC_I18N_BASE_URL=http://localhost:3001 NUXT_PUBLIC_SITE_URL=http://localhost:3001 PORT=3001 VIO_SERVER=node pnpm run test:e2e",
|
137
|
+
"test:e2e:server:static": "cross-env NODE_ENV=production PORT=3002 SITE_URL=http://localhost:3002 VIO_SERVER=static pnpm run test:e2e",
|
138
|
+
"test:e2e": "playwright test"
|
134
139
|
}
|
135
140
|
}
|
package/utils/text.ts
CHANGED
@@ -1,20 +1,3 @@
|
|
1
|
-
import
|
1
|
+
import clipboard from 'clipboardy'
|
2
2
|
|
3
|
-
export const copyText = (text: string) =>
|
4
|
-
new Promise((resolve, reject) => {
|
5
|
-
const fakeElement = document.createElement('button')
|
6
|
-
const clipboard = new Clipboard(fakeElement, {
|
7
|
-
text: () => text,
|
8
|
-
action: () => 'copy',
|
9
|
-
container: document.body,
|
10
|
-
})
|
11
|
-
clipboard.on('success', (e) => {
|
12
|
-
clipboard.destroy()
|
13
|
-
resolve(e)
|
14
|
-
})
|
15
|
-
clipboard.on('error', (e) => {
|
16
|
-
clipboard.destroy()
|
17
|
-
reject(e)
|
18
|
-
})
|
19
|
-
fakeElement.click()
|
20
|
-
})
|
3
|
+
export const copyText = async (text: string) => await clipboard.write(text)
|