vuetify-nuxt-module 0.7.1 → 0.7.3
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/dist/module.json +1 -1
- package/dist/module.mjs +16 -5
- package/package.json +6 -4
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -15,7 +15,7 @@ import { parseQuery, parseURL } from 'ufo';
|
|
|
15
15
|
import destr from 'destr';
|
|
16
16
|
import { transformAssetUrls } from 'vite-plugin-vuetify';
|
|
17
17
|
|
|
18
|
-
const version = "0.7.
|
|
18
|
+
const version = "0.7.3";
|
|
19
19
|
|
|
20
20
|
const VIRTUAL_VUETIFY_CONFIGURATION = "virtual:vuetify-configuration";
|
|
21
21
|
const RESOLVED_VIRTUAL_VUETIFY_CONFIGURATION = `/@nuxt-vuetify-configuration/${VIRTUAL_VUETIFY_CONFIGURATION.slice("virtual:".length)}`;
|
|
@@ -1158,8 +1158,7 @@ export function dateConfiguration() {
|
|
|
1158
1158
|
`;
|
|
1159
1159
|
}
|
|
1160
1160
|
const { adapter: _adapter, ...newDateOptions } = ctx.vuetifyOptions.date ?? {};
|
|
1161
|
-
|
|
1162
|
-
return `${imports}
|
|
1161
|
+
return `${buildImports()}
|
|
1163
1162
|
export const enabled = true
|
|
1164
1163
|
export const isDev = ${ctx.isDev}
|
|
1165
1164
|
export const i18n = ${ctx.i18n}
|
|
@@ -1178,8 +1177,21 @@ export function dateConfiguration() {
|
|
|
1178
1177
|
return "";
|
|
1179
1178
|
if (ctx.dateAdapter === "vuetify")
|
|
1180
1179
|
return "options.adapter = VuetifyDateAdapter";
|
|
1180
|
+
const locale = ctx.vuetifyOptions.locale?.locale ?? "en";
|
|
1181
|
+
if (ctx.dateAdapter === "date-fns")
|
|
1182
|
+
return `options.adapter = new Adapter({ locale: ${locale} })`;
|
|
1181
1183
|
return "options.adapter = Adapter";
|
|
1182
1184
|
}
|
|
1185
|
+
function buildImports() {
|
|
1186
|
+
if (ctx.dateAdapter === "custom" || ctx.dateAdapter === "vuetify" && ctx.vuetify3_4 === true)
|
|
1187
|
+
return "";
|
|
1188
|
+
if (ctx.dateAdapter === "vuetify")
|
|
1189
|
+
return "import { VuetifyDateAdapter } from 'vuetify/labs/date/adapters/vuetify'";
|
|
1190
|
+
const imports = [`import Adapter from '@date-io/${ctx.dateAdapter}'`];
|
|
1191
|
+
if (ctx.dateAdapter === "date-fns")
|
|
1192
|
+
imports.push(`import { ${ctx.vuetifyOptions.locale?.locale ?? "en"} } from 'date-fns/locale'`);
|
|
1193
|
+
return imports.join("\n");
|
|
1194
|
+
}
|
|
1183
1195
|
}
|
|
1184
1196
|
|
|
1185
1197
|
function vuetifySSRClientHintsPlugin(ctx) {
|
|
@@ -1297,8 +1309,7 @@ function configureNuxt(configKey, nuxt, ctx) {
|
|
|
1297
1309
|
references.push({ types: "vuetify" });
|
|
1298
1310
|
references.push({ types: "vuetify-nuxt-module/custom-configuration" });
|
|
1299
1311
|
references.push({ types: "vuetify-nuxt-module/configuration" });
|
|
1300
|
-
|
|
1301
|
-
references.push({ path: ctx.resolver.resolve(nuxt.options.buildDir, types) });
|
|
1312
|
+
references.push({ path: ctx.resolver.resolve(runtimeDir, "plugins/types") });
|
|
1302
1313
|
});
|
|
1303
1314
|
if (importComposables) {
|
|
1304
1315
|
const composables = ["useDate", "useLocale", "useDefaults", "useDisplay", "useLayout", "useRtl", "useTheme"];
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vuetify-nuxt-module",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.7.
|
|
4
|
+
"version": "0.7.3",
|
|
5
5
|
"packageManager": "pnpm@8.11.0",
|
|
6
6
|
"description": "Zero-Config Nuxt Module for Vuetify",
|
|
7
7
|
"author": "userquin <userquin@gmail.com>",
|
|
@@ -45,13 +45,15 @@
|
|
|
45
45
|
"prepack": "nuxt-module-build prepare && nuxt-module-build build && jiti scripts/postbuild.ts",
|
|
46
46
|
"dev": "nuxi dev playground",
|
|
47
47
|
"dev:multiple-json": "MULTIPLE_LANG_FILES=true nuxi dev playground",
|
|
48
|
-
"dev:prepare": "nuxt-module-build --stub && nuxt-module-build prepare && nuxi prepare playground",
|
|
49
|
-
"dev:prepare:multiple-json": "nuxt-module-build --stub && nuxt-module-build prepare && MULTIPLE_LANG_FILES=true nuxi prepare playground",
|
|
48
|
+
"dev:prepare": "nuxt-module-build build --stub && nuxt-module-build prepare && nuxi prepare playground",
|
|
49
|
+
"dev:prepare:multiple-json": "nuxt-module-build build --stub && nuxt-module-build prepare && MULTIPLE_LANG_FILES=true nuxi prepare playground",
|
|
50
50
|
"dev:build": "nuxi build playground",
|
|
51
51
|
"dev:generate": "nuxi generate playground",
|
|
52
52
|
"dev:build:multiple-json": "MULTIPLE_LANG_FILES=true nuxi build playground",
|
|
53
53
|
"dev:generate:multiple-json": "MULTIPLE_LANG_FILES=true nuxi generate playground",
|
|
54
54
|
"dev:preview": "nuxi preview playground",
|
|
55
|
+
"dev:prepare:date-io": "nuxt-module-build build --stub && nuxt-module-build prepare && pnpm nuxt prepare date-io-playground",
|
|
56
|
+
"dev:date-io": "nuxi dev date-io-playground",
|
|
55
57
|
"docs:dev": "pnpm -C docs run dev",
|
|
56
58
|
"docs:build": "nuxt-module-build prepare && pnpm -C docs run build",
|
|
57
59
|
"docs:serve": "pnpm -C docs run serve",
|
|
@@ -72,7 +74,7 @@
|
|
|
72
74
|
"ufo": "^1.3.1",
|
|
73
75
|
"unconfig": "^0.3.11",
|
|
74
76
|
"vite-plugin-vuetify": "^1.0.2",
|
|
75
|
-
"vuetify": "^3.4.
|
|
77
|
+
"vuetify": "^3.4.6"
|
|
76
78
|
},
|
|
77
79
|
"devDependencies": {
|
|
78
80
|
"@antfu/eslint-config": "^0.43.1",
|