vuetify-nuxt-module 0.13.1 → 0.13.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -8
- package/dist/module.json +1 -1
- package/dist/module.mjs +2 -8
- package/dist/runtime/plugins/i18n.mjs +9 -4
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
- 😃 **Icon Fonts**: configure the [icon font](https://vuetifyjs.com/en/features/icon-fonts/) you want to use, the module will automatically import it for you using CDN or local dependencies
|
|
40
40
|
- 🎭 **SVG Icons**: ready to use [@mdi/js](https://www.npmjs.com/package/@mdi/js) and [@fortawesome/vue-fontawesome](https://www.npmjs.com/package/@fortawesome/vue-fontawesome) SVG icons packs
|
|
41
41
|
- 📦 **Multiple Icon Sets**: register [multiple icon sets](https://vuetifyjs.com/en/features/icon-fonts/#multiple-icon-sets)
|
|
42
|
-
- 🌍 **I18n Ready**: install [@nuxtjs/i18n](https://
|
|
42
|
+
- 🌍 **I18n Ready**: install [@nuxtjs/i18n](https://i18n.nuxtjs.org/) Nuxt module, and you're ready to use Vuetify [internationalization](https://vuetifyjs.com/en/features/internationalization/) features
|
|
43
43
|
- 📆 **Date Components**: use Vuetify components [that require date functionality](https://vuetifyjs.com/en/features/dates/) installing and configuring one of the [@date-io](https://github.com/dmtrKovalenko/date-io#projects) adapters
|
|
44
44
|
- 💬 **Auto-Import Vuetify Locale Messages**: add [Vuetify Locale Messages](https://vuetifyjs.com/en/features/internationalization/#getting-started) adding just the locales you want to use, no more imports needed
|
|
45
45
|
- ⚙️ **Auto-Import Vuetify Composables**: you don't need to import Vuetify composables manually, they are automatically imported for you
|
|
@@ -52,13 +52,7 @@
|
|
|
52
52
|
> Requires Vite, will not work with Webpack
|
|
53
53
|
|
|
54
54
|
```bash
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
# yarn
|
|
58
|
-
yarn add vuetify-nuxt-module -D
|
|
59
|
-
|
|
60
|
-
# pnpm
|
|
61
|
-
pnpm add vuetify-nuxt-module -D
|
|
55
|
+
npx nuxi@latest module add vuetify-nuxt-module
|
|
62
56
|
```
|
|
63
57
|
|
|
64
58
|
[](https://stackblitz.com/github/userquin/vuetify-nuxt-module)
|
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -14,7 +14,7 @@ import { parseQuery, parseURL } from 'ufo';
|
|
|
14
14
|
import destr from 'destr';
|
|
15
15
|
import { transformAssetUrls } from 'vite-plugin-vuetify';
|
|
16
16
|
|
|
17
|
-
const version = "0.13.
|
|
17
|
+
const version = "0.13.2";
|
|
18
18
|
|
|
19
19
|
const VIRTUAL_VUETIFY_CONFIGURATION = "virtual:vuetify-configuration";
|
|
20
20
|
const RESOLVED_VIRTUAL_VUETIFY_CONFIGURATION = `/@nuxt-vuetify-configuration/${VIRTUAL_VUETIFY_CONFIGURATION.slice("virtual:".length)}`;
|
|
@@ -1226,7 +1226,6 @@ function configureNuxt(configKey, nuxt, ctx) {
|
|
|
1226
1226
|
const {
|
|
1227
1227
|
importComposables,
|
|
1228
1228
|
prefixComposables,
|
|
1229
|
-
styles,
|
|
1230
1229
|
includeTransformAssetsUrls = true
|
|
1231
1230
|
} = ctx.moduleOptions;
|
|
1232
1231
|
const runtimeDir = ctx.resolver.resolve("./runtime");
|
|
@@ -1238,12 +1237,7 @@ function configureNuxt(configKey, nuxt, ctx) {
|
|
|
1238
1237
|
for (const virtual of RESOLVED_VIRTUAL_MODULES)
|
|
1239
1238
|
nuxt.options.imports.transform.include.push(new RegExp(`${virtual}$`));
|
|
1240
1239
|
nuxt.options.css ??= [];
|
|
1241
|
-
|
|
1242
|
-
nuxt.options.css.unshift("vuetify/styles/main.sass");
|
|
1243
|
-
else if (styles === true)
|
|
1244
|
-
nuxt.options.css.unshift("vuetify/styles");
|
|
1245
|
-
else if (typeof styles === "object" && typeof styles?.configFile === "string")
|
|
1246
|
-
nuxt.options.css.unshift(styles.configFile);
|
|
1240
|
+
nuxt.options.css.unshift("vuetify/styles");
|
|
1247
1241
|
if (includeTransformAssetsUrls && typeof nuxt.options.vite.vue?.template?.transformAssetUrls === "undefined") {
|
|
1248
1242
|
nuxt.options.vite.vue ??= {};
|
|
1249
1243
|
nuxt.options.vite.vue.template ??= {};
|
|
@@ -45,16 +45,21 @@ function createProvideFunction(data) {
|
|
|
45
45
|
if (oldVal)
|
|
46
46
|
i18n.setLocale(val);
|
|
47
47
|
}, { immediate: true, flush: "post" });
|
|
48
|
+
const t = wrapI18n(i18n.t);
|
|
49
|
+
const n = wrapI18n(i18n.n);
|
|
48
50
|
return {
|
|
49
51
|
name: "nuxt-vue-i18n",
|
|
50
52
|
current: currentLocale,
|
|
51
53
|
fallback: data.fallback,
|
|
52
54
|
messages: data.messages,
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
t: (key, ...params) => i18n.t(key, params),
|
|
56
|
-
n: i18n.n,
|
|
55
|
+
t,
|
|
56
|
+
n,
|
|
57
57
|
provide: createProvideFunction({ current: currentLocale, fallback: data.fallback, messages: data.messages })
|
|
58
58
|
};
|
|
59
59
|
};
|
|
60
60
|
}
|
|
61
|
+
function wrapI18n(t) {
|
|
62
|
+
return (...args) => {
|
|
63
|
+
return t(...args);
|
|
64
|
+
};
|
|
65
|
+
}
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vuetify-nuxt-module",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.13.
|
|
5
|
-
"packageManager": "pnpm@8.15.
|
|
4
|
+
"version": "0.13.2",
|
|
5
|
+
"packageManager": "pnpm@8.15.6",
|
|
6
6
|
"description": "Zero-Config Nuxt Module for Vuetify",
|
|
7
7
|
"author": "userquin <userquin@gmail.com>",
|
|
8
8
|
"license": "MIT",
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
"ufo": "^1.5.3",
|
|
75
75
|
"unconfig": "^0.3.11",
|
|
76
76
|
"vite-plugin-vuetify": "^2.0.3",
|
|
77
|
-
"vuetify": "^3.5.
|
|
77
|
+
"vuetify": "^3.5.13"
|
|
78
78
|
},
|
|
79
79
|
"devDependencies": {
|
|
80
80
|
"@antfu/eslint-config": "^0.43.1",
|