vuetify-nuxt-module 0.18.9 → 0.19.0
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/custom-configuration.d.ts +1 -1
- package/dist/module.d.mts +19 -2
- package/dist/module.json +4 -4
- package/dist/module.mjs +63 -33
- package/dist/runtime/plugins/i18n.js +5 -3
- package/dist/runtime/plugins/vuetify-date.d.ts +1 -1
- package/dist/runtime/plugins/vuetify-i18n-date.d.ts +1 -1
- package/dist/runtime/plugins/vuetify-i18n.d.ts +1 -1
- package/dist/runtime/plugins/vuetify-icons.d.ts +1 -1
- package/dist/types.d.mts +3 -5
- package/package.json +21 -11
- package/dist/module.cjs +0 -5
- package/dist/module.d.ts +0 -448
- package/dist/types.d.ts +0 -15
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type { ExternalVuetifyOptions } from './dist/module.
|
|
1
|
+
import type { ExternalVuetifyOptions } from './dist/module.mjs'
|
|
2
2
|
declare function defineVuetifyConfiguration(vuetifyOptions: ExternalVuetifyOptions): ExternalVuetifyOptions;
|
|
3
3
|
export { defineVuetifyConfiguration };
|
package/dist/module.d.mts
CHANGED
|
@@ -282,6 +282,22 @@ interface MOptions {
|
|
|
282
282
|
* @since v0.15.1
|
|
283
283
|
*/
|
|
284
284
|
ignoreDirectives?: DirectiveName | DirectiveName[];
|
|
285
|
+
/**
|
|
286
|
+
* Automatically install rules plugin
|
|
287
|
+
*
|
|
288
|
+
* @since v0.19.0
|
|
289
|
+
* @see https://vuetifyjs.com/en/features/rules/
|
|
290
|
+
*/
|
|
291
|
+
enableRules?: boolean;
|
|
292
|
+
/**
|
|
293
|
+
* Rules configuration.
|
|
294
|
+
*
|
|
295
|
+
* @since v0.19.0
|
|
296
|
+
* @default true
|
|
297
|
+
*/
|
|
298
|
+
rulesConfiguration?: {
|
|
299
|
+
fromLabs: boolean;
|
|
300
|
+
};
|
|
285
301
|
/**
|
|
286
302
|
* Vuetify SSR client hints.
|
|
287
303
|
*
|
|
@@ -443,6 +459,7 @@ interface ModuleRuntimeHooks {
|
|
|
443
459
|
ssrClientHintsConfiguration: SSRClientHintsConfiguration;
|
|
444
460
|
}) => HookResult;
|
|
445
461
|
}
|
|
446
|
-
declare const _default: _nuxt_schema.NuxtModule<ModuleOptions>;
|
|
462
|
+
declare const _default: _nuxt_schema.NuxtModule<ModuleOptions, ModuleOptions, false>;
|
|
447
463
|
|
|
448
|
-
export {
|
|
464
|
+
export { _default as default };
|
|
465
|
+
export type { ComponentName, Components, DateAdapter, DateOptions, DirectiveName, Directives, ExternalVuetifyOptions, FontAwesomeSvgIconSet, FontIconSet, IconFontName, IconSetName, IconsOptions, InlineModuleOptions, JSSVGIconSet, LabComponentName, LabComponents, MOptions, ModuleHooks, ModuleOptions, ModuleRuntimeHooks, SSRClientHints, SSRClientHintsConfiguration, UnoCCSMdiIconSet, VOptions, VuetifyLocale, VuetifyModuleOptions };
|
package/dist/module.json
CHANGED
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
"name": "vuetify-nuxt-module",
|
|
3
3
|
"configKey": "vuetify",
|
|
4
4
|
"compatibility": {
|
|
5
|
-
"nuxt": ">=3.
|
|
5
|
+
"nuxt": ">=3.15.0"
|
|
6
6
|
},
|
|
7
|
-
"version": "0.
|
|
7
|
+
"version": "0.19.0",
|
|
8
8
|
"builder": {
|
|
9
|
-
"@nuxt/module-builder": "0.
|
|
10
|
-
"unbuild": "
|
|
9
|
+
"@nuxt/module-builder": "1.0.2",
|
|
10
|
+
"unbuild": "3.6.1"
|
|
11
11
|
}
|
|
12
12
|
}
|
package/dist/module.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { addVitePlugin, addPluginTemplate,
|
|
1
|
+
import { addVitePlugin, addPluginTemplate, extendWebpackConfig, isNuxtMajorVersion, addImports, addPlugin, useLogger, defineNuxtModule, getNuxtVersion, hasNuxtModule, createResolver } from '@nuxt/kit';
|
|
2
2
|
import { isPackageExists, getPackageInfo } from 'local-pkg';
|
|
3
3
|
import { createFilter, version as version$1 } from 'vite';
|
|
4
4
|
import { resolve, dirname, relative } from 'node:path';
|
|
@@ -16,7 +16,7 @@ import { transformAssetUrls } from 'vite-plugin-vuetify';
|
|
|
16
16
|
import { parseQuery, parseURL } from 'ufo';
|
|
17
17
|
import destr from 'destr';
|
|
18
18
|
|
|
19
|
-
const version = "0.
|
|
19
|
+
const version = "0.19.0";
|
|
20
20
|
|
|
21
21
|
const VIRTUAL_VUETIFY_CONFIGURATION = "virtual:vuetify-configuration";
|
|
22
22
|
const RESOLVED_VIRTUAL_VUETIFY_CONFIGURATION = `\0${VIRTUAL_VUETIFY_CONFIGURATION}`;
|
|
@@ -476,6 +476,8 @@ async function load(options, nuxt, ctx) {
|
|
|
476
476
|
nuxt.options.app.head.link = nuxt.options.app.head.link.filter((link) => !link.key || !oldIcons.cdn.some(([key]) => link.key === key));
|
|
477
477
|
ctx.moduleOptions = configuration.moduleOptions;
|
|
478
478
|
ctx.vuetifyOptions = configuration.vuetifyOptions;
|
|
479
|
+
ctx.enableRules = ctx.moduleOptions.enableRules;
|
|
480
|
+
ctx.rulesConfiguration = ctx.moduleOptions.rulesConfiguration;
|
|
479
481
|
ctx.vuetifyFilesToWatch = Array.from(vuetifyConfigurationFilesToWatch);
|
|
480
482
|
ctx.icons = prepareIcons(ctx.unocss, ctx.logger, vuetifyAppOptions);
|
|
481
483
|
ctx.ssrClientHints = prepareSSRClientHints(nuxt.options.app.baseURL ?? "/", ctx);
|
|
@@ -833,13 +835,13 @@ async function buildConfiguration(ctx) {
|
|
|
833
835
|
componentsToImport.forEach((componentsArray, from) => {
|
|
834
836
|
config.imports.push(`import {${Array.from(new Set(componentsArray)).join(",")}} from 'vuetify/components/${from}'`);
|
|
835
837
|
});
|
|
836
|
-
let addDatePicker = ctx.
|
|
838
|
+
let addDatePicker = ctx.isVuetifyAtLeast(3, 4) ? !Array.from(componentsToImport.values()).some((components2) => components2.includes("VDatePicker")) : true;
|
|
837
839
|
if (labComponents) {
|
|
838
840
|
const useLabComponents = [];
|
|
839
841
|
if (typeof labComponents === "boolean") {
|
|
840
842
|
config.imports.push("import * as labsComponents from 'vuetify/labs/components'");
|
|
841
843
|
config.labComponents.add("*");
|
|
842
|
-
if (ctx.
|
|
844
|
+
if (!ctx.isVuetifyAtLeast(3, 4))
|
|
843
845
|
addDatePicker = false;
|
|
844
846
|
} else if (typeof labComponents === "string") {
|
|
845
847
|
useLabComponents.push(labComponents);
|
|
@@ -867,7 +869,7 @@ async function buildConfiguration(ctx) {
|
|
|
867
869
|
componentsArray.push(component);
|
|
868
870
|
config.labComponents.add(component);
|
|
869
871
|
});
|
|
870
|
-
if (ctx.
|
|
872
|
+
if (!ctx.isVuetifyAtLeast(3, 4) && dateOptions && !addDatePicker) {
|
|
871
873
|
const entry = componentsToImport.get("VDatePicker");
|
|
872
874
|
if (entry) {
|
|
873
875
|
entry.push("VDatePicker");
|
|
@@ -882,9 +884,9 @@ async function buildConfiguration(ctx) {
|
|
|
882
884
|
}
|
|
883
885
|
if (dateOptions && addDatePicker) {
|
|
884
886
|
let warn = true;
|
|
885
|
-
if (
|
|
887
|
+
if (ctx.isVuetifyAtLeast(0, 0)) {
|
|
886
888
|
warn = false;
|
|
887
|
-
if (ctx.
|
|
889
|
+
if (ctx.isVuetifyAtLeast(3, 4)) {
|
|
888
890
|
config.components.add("VDatePicker");
|
|
889
891
|
config.imports.push("import {VDatePicker} from 'vuetify/components/VDatePicker'");
|
|
890
892
|
} else {
|
|
@@ -911,7 +913,7 @@ async function buildConfiguration(ctx) {
|
|
|
911
913
|
componentsEntry = `options.components = {${Array.from(config.labComponents).join(",")}}`;
|
|
912
914
|
}
|
|
913
915
|
if (!ctx.i18n && localeMessages) {
|
|
914
|
-
const useLocales = Array.isArray(localeMessages) ? [
|
|
916
|
+
const useLocales = Array.isArray(localeMessages) ? [...new Set(localeMessages)] : [localeMessages];
|
|
915
917
|
config.imports.push(`import {${useLocales.join(",")}} from 'vuetify/locale'`);
|
|
916
918
|
config.messages = `
|
|
917
919
|
options.locale = options.locale || {}
|
|
@@ -1147,7 +1149,7 @@ export function dateConfiguration() {
|
|
|
1147
1149
|
}
|
|
1148
1150
|
};
|
|
1149
1151
|
function buildAdapter() {
|
|
1150
|
-
if (ctx.dateAdapter === "custom" || ctx.dateAdapter === "vuetify" && ctx.
|
|
1152
|
+
if (ctx.dateAdapter === "custom" || ctx.dateAdapter === "vuetify" && ctx.isVuetifyAtLeast(3, 4))
|
|
1151
1153
|
return "";
|
|
1152
1154
|
if (ctx.dateAdapter === "vuetify")
|
|
1153
1155
|
return "options.adapter = VuetifyDateAdapter";
|
|
@@ -1157,7 +1159,7 @@ export function dateConfiguration() {
|
|
|
1157
1159
|
return "options.adapter = Adapter";
|
|
1158
1160
|
}
|
|
1159
1161
|
function buildImports() {
|
|
1160
|
-
if (ctx.dateAdapter === "custom" || ctx.dateAdapter === "vuetify" && ctx.
|
|
1162
|
+
if (ctx.dateAdapter === "custom" || ctx.dateAdapter === "vuetify" && ctx.isVuetifyAtLeast(3, 4))
|
|
1161
1163
|
return "";
|
|
1162
1164
|
if (ctx.dateAdapter === "vuetify")
|
|
1163
1165
|
return "import { VuetifyDateAdapter } from 'vuetify/labs/date/adapters/vuetify'";
|
|
@@ -1324,10 +1326,23 @@ function addVuetifyNuxtPlugin(nuxt, ctx, mode) {
|
|
|
1324
1326
|
dependsOn.push("vuetify:date:plugin");
|
|
1325
1327
|
}
|
|
1326
1328
|
}
|
|
1329
|
+
let rulesImports = "";
|
|
1330
|
+
let rulesPlugin = "";
|
|
1331
|
+
if (mode === "client" && ctx.enableRules) {
|
|
1332
|
+
rulesImports = [
|
|
1333
|
+
"",
|
|
1334
|
+
`import { rulesOptions } from '#build/vuetify/${ctx.rulesConfiguration.fromLabs ? "labs-" : ""}rules-configuration.mjs'`,
|
|
1335
|
+
`import { createRulesPlugin } from 'vuetify/${ctx.rulesConfiguration.fromLabs ? "labs/" : ""}rules'`
|
|
1336
|
+
].join("\n");
|
|
1337
|
+
rulesPlugin = [
|
|
1338
|
+
"",
|
|
1339
|
+
" nuxtApp.vueApp.use(createRulesPlugin(rulesOptions, vuetify.locale))"
|
|
1340
|
+
].join("\n");
|
|
1341
|
+
}
|
|
1327
1342
|
return `
|
|
1328
1343
|
import { defineNuxtPlugin } from '#imports'
|
|
1329
1344
|
import { isDev, vuetifyConfiguration } from 'virtual:vuetify-configuration'
|
|
1330
|
-
import { createVuetify } from 'vuetify'
|
|
1345
|
+
import { createVuetify } from 'vuetify'${rulesImports}
|
|
1331
1346
|
|
|
1332
1347
|
export default defineNuxtPlugin({
|
|
1333
1348
|
name: 'vuetify:nuxt:${mode}:plugin',
|
|
@@ -1339,7 +1354,8 @@ export default defineNuxtPlugin({
|
|
|
1339
1354
|
await nuxtApp.hooks.callHook('vuetify:configuration', { isDev, vuetifyOptions })
|
|
1340
1355
|
await nuxtApp.hooks.callHook('vuetify:before-create', { isDev, vuetifyOptions })
|
|
1341
1356
|
const vuetify = createVuetify(vuetifyOptions)
|
|
1342
|
-
|
|
1357
|
+
console.log('vuetify', vuetify)
|
|
1358
|
+
nuxtApp.vueApp.use(vuetify)${rulesPlugin}
|
|
1343
1359
|
nuxtApp.provide('vuetify', vuetify)
|
|
1344
1360
|
await nuxtApp.hooks.callHook('vuetify:ready', vuetify)
|
|
1345
1361
|
if (import.meta.client)
|
|
@@ -1359,20 +1375,18 @@ function configureNuxt(configKey, nuxt, ctx) {
|
|
|
1359
1375
|
disableVuetifyStyles
|
|
1360
1376
|
} = ctx.moduleOptions;
|
|
1361
1377
|
const runtimeDir = ctx.resolver.resolve("./runtime");
|
|
1362
|
-
if (ctx.
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
nuxt.options.features.inlineStyles = false;
|
|
1367
|
-
else
|
|
1368
|
-
nuxt.options.experimental["inlineSSRStyles"] = false;
|
|
1369
|
-
}
|
|
1378
|
+
if (typeof ctx.enableRules !== "undefined")
|
|
1379
|
+
ctx.enableRules = ctx.isVuetifyAtLeast(3, 8);
|
|
1380
|
+
if (ctx.isSSR && !!styles && typeof styles === "object")
|
|
1381
|
+
nuxt.options.features.inlineStyles = false;
|
|
1370
1382
|
if (!disableVuetifyStyles) {
|
|
1371
1383
|
nuxt.options.css ??= [];
|
|
1372
1384
|
nuxt.options.css.unshift("vuetify/styles");
|
|
1373
1385
|
}
|
|
1374
1386
|
nuxt.options.build.transpile.push(configKey);
|
|
1375
1387
|
nuxt.options.build.transpile.push(runtimeDir);
|
|
1388
|
+
if (ctx.enableRules)
|
|
1389
|
+
nuxt.options.build.transpile.push(`#build/vuetify/${ctx.rulesConfiguration.fromLabs ? "labs-" : ""}rules-configuration.mjs`);
|
|
1376
1390
|
nuxt.options.build.transpile.push(/\/vuetify-nuxt-plugin\.(client|server)\.mjs$/);
|
|
1377
1391
|
nuxt.options.imports.transform ??= {};
|
|
1378
1392
|
nuxt.options.imports.transform.include ??= [];
|
|
@@ -1381,21 +1395,36 @@ function configureNuxt(configKey, nuxt, ctx) {
|
|
|
1381
1395
|
extendWebpackConfig(() => {
|
|
1382
1396
|
throw new Error("Webpack is not supported: vuetify-nuxt-module module can only be used with Vite!");
|
|
1383
1397
|
});
|
|
1384
|
-
|
|
1398
|
+
const v4Available = isNuxtMajorVersion(4, nuxt);
|
|
1399
|
+
nuxt.hook("prepare:types", ({ references, nodeReferences }) => {
|
|
1385
1400
|
references.push({ types: "vuetify" });
|
|
1386
1401
|
references.push({ types: "vuetify-nuxt-module/custom-configuration" });
|
|
1387
1402
|
references.push({ types: "vuetify-nuxt-module/configuration" });
|
|
1388
1403
|
references.push({ path: ctx.resolver.resolve(runtimeDir, "plugins/types") });
|
|
1404
|
+
if (ctx.enableRules)
|
|
1405
|
+
references.push({ types: `vuetify-nuxt-module/custom-${ctx.rulesConfiguration.fromLabs ? "labs-" : ""}rules-configuration` });
|
|
1406
|
+
if (v4Available) {
|
|
1407
|
+
nodeReferences.push({ types: "vuetify-nuxt-module/custom-configuration" });
|
|
1408
|
+
if (ctx.enableRules)
|
|
1409
|
+
nodeReferences.push({ types: `vuetify-nuxt-module/custom-${ctx.rulesConfiguration.fromLabs ? "labs-" : ""}rules-configuration` });
|
|
1410
|
+
}
|
|
1389
1411
|
});
|
|
1390
1412
|
if (importComposables) {
|
|
1391
1413
|
const composables = ["useDate", "useLocale", "useDefaults", "useDisplay", "useLayout", "useRtl", "useTheme"];
|
|
1392
|
-
if (ctx.
|
|
1414
|
+
if (ctx.isVuetifyAtLeast(3, 5))
|
|
1393
1415
|
composables.push("useGoTo");
|
|
1416
|
+
if (ctx.isVuetifyAtLeast(3, 8)) {
|
|
1417
|
+
composables.push("useHotkey");
|
|
1418
|
+
if (ctx.enableRules)
|
|
1419
|
+
composables.push("useRules");
|
|
1420
|
+
}
|
|
1421
|
+
if (ctx.isVuetifyAtLeast(3, 10))
|
|
1422
|
+
composables.push("useMask");
|
|
1394
1423
|
addImports(composables.map((name) => ({
|
|
1395
1424
|
name,
|
|
1396
|
-
from: ctx.
|
|
1425
|
+
from: ctx.isVuetifyAtLeast(3, 4) || name !== "useDate" ? "vuetify" : "vuetify/labs/date",
|
|
1397
1426
|
as: prefixComposables ? name.replace(/^use/, "useV") : void 0,
|
|
1398
|
-
meta: { docsUrl: `https://vuetifyjs.com/en/api/${toKebabCase(name)}/` }
|
|
1427
|
+
meta: { docsUrl: name === "useRules" ? "https://vuetifyjs.com/en/features/rules/" : `https://vuetifyjs.com/en/api/${toKebabCase(name)}/` }
|
|
1399
1428
|
})));
|
|
1400
1429
|
}
|
|
1401
1430
|
if (ctx.ssrClientHints.enabled) {
|
|
@@ -1436,12 +1465,12 @@ function configureNuxt(configKey, nuxt, ctx) {
|
|
|
1436
1465
|
|
|
1437
1466
|
const CONFIG_KEY = "vuetify";
|
|
1438
1467
|
const logger = useLogger(`nuxt:${CONFIG_KEY}`);
|
|
1439
|
-
const module = defineNuxtModule({
|
|
1468
|
+
const module$1 = defineNuxtModule({
|
|
1440
1469
|
meta: {
|
|
1441
1470
|
name: "vuetify-nuxt-module",
|
|
1442
1471
|
configKey: "vuetify",
|
|
1443
1472
|
compatibility: {
|
|
1444
|
-
nuxt: ">=3.
|
|
1473
|
+
nuxt: ">=3.15.0"
|
|
1445
1474
|
},
|
|
1446
1475
|
version
|
|
1447
1476
|
},
|
|
@@ -1456,16 +1485,18 @@ const module = defineNuxtModule({
|
|
|
1456
1485
|
includeTransformAssetsUrls: true,
|
|
1457
1486
|
styles: true,
|
|
1458
1487
|
disableVuetifyStyles: false,
|
|
1459
|
-
disableModernSassCompiler: false
|
|
1488
|
+
disableModernSassCompiler: false,
|
|
1489
|
+
rulesConfiguration: {
|
|
1490
|
+
fromLabs: true
|
|
1491
|
+
}
|
|
1460
1492
|
}
|
|
1461
1493
|
}),
|
|
1462
1494
|
async setup(options, nuxt) {
|
|
1463
|
-
if (
|
|
1495
|
+
if (isNuxtMajorVersion(2, nuxt))
|
|
1464
1496
|
logger.error(`Cannot support nuxt version: ${getNuxtVersion(nuxt)}`);
|
|
1465
1497
|
const vuetifyPkg = await getPackageInfo("vuetify");
|
|
1466
1498
|
const versions = vuetifyPkg?.version?.split(".").map((v) => Number.parseInt(v));
|
|
1467
|
-
const
|
|
1468
|
-
const vuetify3_5 = versions && versions.length > 1 && (versions[0] > 3 || versions[0] === 3 && versions[1] >= 5);
|
|
1499
|
+
const isVuetifyAtLeast = (major, minor) => !!versions && versions.length > 1 && (versions[0] > major || versions[0] === major && versions[1] >= minor);
|
|
1469
1500
|
const viteVersion = version$1.split(".").map((v) => v.includes("-") ? v.split("-")[0] : v).map((v) => Number.parseInt(v));
|
|
1470
1501
|
const ctx = {
|
|
1471
1502
|
logger,
|
|
@@ -1482,8 +1513,7 @@ const module = defineNuxtModule({
|
|
|
1482
1513
|
ssrClientHints: void 0,
|
|
1483
1514
|
componentsPromise: void 0,
|
|
1484
1515
|
labComponentsPromise: void 0,
|
|
1485
|
-
|
|
1486
|
-
vuetify3_5,
|
|
1516
|
+
isVuetifyAtLeast,
|
|
1487
1517
|
viteVersion
|
|
1488
1518
|
};
|
|
1489
1519
|
await load(options, nuxt, ctx);
|
|
@@ -1493,4 +1523,4 @@ const module = defineNuxtModule({
|
|
|
1493
1523
|
}
|
|
1494
1524
|
});
|
|
1495
1525
|
|
|
1496
|
-
export { module as default };
|
|
1526
|
+
export { module$1 as default };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ref,
|
|
1
|
+
import { ref, toRef, watch } from "vue";
|
|
2
2
|
import { useI18n } from "vue-i18n";
|
|
3
3
|
import { useNuxtApp } from "#imports";
|
|
4
4
|
function inferDecimalSeparator(n) {
|
|
@@ -31,6 +31,7 @@ export function createAdapter(vuetifyOptions) {
|
|
|
31
31
|
t: (key, ...params) => i18n.t(key, params),
|
|
32
32
|
n: i18n.n,
|
|
33
33
|
provide: createProvideFunction({ current: currentLocale, fallback, messages }),
|
|
34
|
+
// @ts-expect-error available in vuetify 3.9
|
|
34
35
|
decimalSeparator: toRef(() => inferDecimalSeparator(i18n.n))
|
|
35
36
|
};
|
|
36
37
|
}
|
|
@@ -58,13 +59,14 @@ function createProvideFunction(data) {
|
|
|
58
59
|
messages: data.messages,
|
|
59
60
|
t,
|
|
60
61
|
n,
|
|
62
|
+
// @ts-expect-error available in vuetify 3.9
|
|
61
63
|
decimalSeparator: toRef(() => props.decimalSeparator ?? inferDecimalSeparator(n)),
|
|
62
64
|
provide: createProvideFunction({ current: currentLocale, fallback: data.fallback, messages: data.messages })
|
|
63
65
|
};
|
|
64
66
|
};
|
|
65
67
|
}
|
|
66
68
|
function wrapI18n(t) {
|
|
67
|
-
return (...args) => {
|
|
69
|
+
return ((...args) => {
|
|
68
70
|
return t(...args);
|
|
69
|
-
};
|
|
71
|
+
});
|
|
70
72
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default:
|
|
1
|
+
declare const _default: import("#app").Plugin<Record<string, unknown>> & import("#app").ObjectPlugin<Record<string, unknown>>;
|
|
2
2
|
export default _default;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default:
|
|
1
|
+
declare const _default: import("#app").Plugin<Record<string, unknown>> & import("#app").ObjectPlugin<Record<string, unknown>>;
|
|
2
2
|
export default _default;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default:
|
|
1
|
+
declare const _default: import("#app").Plugin<Record<string, unknown>> & import("#app").ObjectPlugin<Record<string, unknown>>;
|
|
2
2
|
export default _default;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default:
|
|
1
|
+
declare const _default: import("#app").Plugin<Record<string, unknown>> & import("#app").ObjectPlugin<Record<string, unknown>>;
|
|
2
2
|
export default _default;
|
package/dist/types.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ModuleHooks, ModuleRuntimeHooks } from './module.
|
|
1
|
+
import type { ModuleHooks, ModuleRuntimeHooks } from './module.mjs'
|
|
2
2
|
|
|
3
3
|
declare module '#app' {
|
|
4
4
|
interface RuntimeNuxtHooks extends ModuleRuntimeHooks {}
|
|
@@ -8,8 +8,6 @@ declare module '@nuxt/schema' {
|
|
|
8
8
|
interface NuxtHooks extends ModuleHooks {}
|
|
9
9
|
}
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
interface NuxtHooks extends ModuleHooks {}
|
|
13
|
-
}
|
|
11
|
+
export { default } from './module.mjs'
|
|
14
12
|
|
|
15
|
-
export { type ComponentName, type Components, type DateAdapter, type DateOptions, type DirectiveName, type Directives, type ExternalVuetifyOptions, type FontAwesomeSvgIconSet, type FontIconSet, type IconFontName, type IconSetName, type IconsOptions, type InlineModuleOptions, type JSSVGIconSet, type LabComponentName, type LabComponents, type MOptions, type ModuleHooks, type ModuleOptions, type ModuleRuntimeHooks, type SSRClientHints, type SSRClientHintsConfiguration, type UnoCCSMdiIconSet, type VOptions, type VuetifyLocale, type VuetifyModuleOptions
|
|
13
|
+
export { type ComponentName, type Components, type DateAdapter, type DateOptions, type DirectiveName, type Directives, type ExternalVuetifyOptions, type FontAwesomeSvgIconSet, type FontIconSet, type IconFontName, type IconSetName, type IconsOptions, type InlineModuleOptions, type JSSVGIconSet, type LabComponentName, type LabComponents, type MOptions, type ModuleHooks, type ModuleOptions, type ModuleRuntimeHooks, type SSRClientHints, type SSRClientHintsConfiguration, type UnoCCSMdiIconSet, type VOptions, type VuetifyLocale, type VuetifyModuleOptions } from './module.mjs'
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vuetify-nuxt-module",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.19.0",
|
|
5
5
|
"description": "Zero-Config Nuxt Module for Vuetify",
|
|
6
6
|
"author": "userquin <userquin@gmail.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -33,7 +33,17 @@
|
|
|
33
33
|
"./*": "./*"
|
|
34
34
|
},
|
|
35
35
|
"main": "./dist/module.mjs",
|
|
36
|
-
"
|
|
36
|
+
"typesVersions": {
|
|
37
|
+
"*": {
|
|
38
|
+
"*": [
|
|
39
|
+
"*",
|
|
40
|
+
"dist/*",
|
|
41
|
+
"runtime/*",
|
|
42
|
+
"runtime/*.d.ts",
|
|
43
|
+
"types.d.mts"
|
|
44
|
+
]
|
|
45
|
+
}
|
|
46
|
+
},
|
|
37
47
|
"files": [
|
|
38
48
|
"dist",
|
|
39
49
|
"*.cjs",
|
|
@@ -41,7 +51,7 @@
|
|
|
41
51
|
"*.mjs"
|
|
42
52
|
],
|
|
43
53
|
"dependencies": {
|
|
44
|
-
"@nuxt/kit": "
|
|
54
|
+
"@nuxt/kit": "3.15.4",
|
|
45
55
|
"defu": "^6.1.4",
|
|
46
56
|
"destr": "^2.0.3",
|
|
47
57
|
"local-pkg": "^0.5.0",
|
|
@@ -64,28 +74,28 @@
|
|
|
64
74
|
"@iconify-json/mdi": "^1.1.68",
|
|
65
75
|
"@mdi/js": "^7.4.47",
|
|
66
76
|
"@nuxt/devtools": "latest",
|
|
67
|
-
"@nuxt/module-builder": "^0.
|
|
68
|
-
"@nuxt/schema": "^3.
|
|
77
|
+
"@nuxt/module-builder": "^1.0.2",
|
|
78
|
+
"@nuxt/schema": "^3.15.4",
|
|
69
79
|
"@nuxt/test-utils": "^3.13.1",
|
|
70
80
|
"@nuxtjs/i18n": "^8.0.0",
|
|
71
81
|
"@parcel/watcher": "^2.3.0",
|
|
72
82
|
"@types/node": "^18",
|
|
73
|
-
"@unocss/nuxt": "^
|
|
83
|
+
"@unocss/nuxt": "^66.5.10",
|
|
74
84
|
"bumpp": "^9.2.0",
|
|
75
85
|
"eslint": "^8.54.0",
|
|
76
86
|
"luxon": "^3.4.3",
|
|
77
|
-
"nuxt": "^3.
|
|
87
|
+
"nuxt": "^3.15.4",
|
|
78
88
|
"publint": "^0.2.10",
|
|
79
89
|
"rimraf": "^6.0.1",
|
|
80
90
|
"sass": "^1.77.8",
|
|
81
91
|
"typescript": "^5.5.4",
|
|
82
|
-
"vite": "
|
|
92
|
+
"vite": "6.4.1",
|
|
83
93
|
"vitest": "^3.2.4",
|
|
84
|
-
"vue-tsc": "^2.
|
|
94
|
+
"vue-tsc": "^2.1.10"
|
|
85
95
|
},
|
|
86
96
|
"resolutions": {
|
|
87
|
-
"@nuxt/kit": "3.
|
|
88
|
-
"vite": "
|
|
97
|
+
"@nuxt/kit": "3.15.4",
|
|
98
|
+
"vite": "6.4.1",
|
|
89
99
|
"vue": "3.4.31"
|
|
90
100
|
},
|
|
91
101
|
"build": {
|
package/dist/module.cjs
DELETED
package/dist/module.d.ts
DELETED
|
@@ -1,448 +0,0 @@
|
|
|
1
|
-
import * as _nuxt_schema from '@nuxt/schema';
|
|
2
|
-
import { HookResult } from '@nuxt/schema';
|
|
3
|
-
import { VuetifyOptions, LocaleOptions, RtlOptions, createVuetify } from 'vuetify';
|
|
4
|
-
import * as vuetify_locale from 'vuetify/locale';
|
|
5
|
-
import * as vuetify_labs_components from 'vuetify/labs/components';
|
|
6
|
-
import * as vuetify_directives from 'vuetify/directives';
|
|
7
|
-
import * as vuetify_components from 'vuetify/components';
|
|
8
|
-
|
|
9
|
-
type DateAdapter = 'vuetify' | 'date-fns' | 'moment' | 'luxon' | 'dayjs' | 'js-joda' | 'date-fns-jalali' | 'jalaali' | 'hijri' | 'custom';
|
|
10
|
-
/**
|
|
11
|
-
* Date configuration.
|
|
12
|
-
*/
|
|
13
|
-
interface DateOptions {
|
|
14
|
-
/**
|
|
15
|
-
* The date adapter.
|
|
16
|
-
*
|
|
17
|
-
* The adapter will be picked from the dependencies.
|
|
18
|
-
* When multiple `@date-io/xxxx` libraries installed in your project,
|
|
19
|
-
* you should specify the adapter otherwise an error will be thrown.
|
|
20
|
-
*
|
|
21
|
-
* If you want to use a custom adapter, configure `adapter: 'custom'`,
|
|
22
|
-
* and then add a Nuxt plugin to configure the adapter using `vuetify:configuration` hook.
|
|
23
|
-
*
|
|
24
|
-
* @default 'vuetify'
|
|
25
|
-
*/
|
|
26
|
-
adapter?: DateAdapter;
|
|
27
|
-
/**
|
|
28
|
-
* Formats.
|
|
29
|
-
*/
|
|
30
|
-
formats?: Record<string, string>;
|
|
31
|
-
/**
|
|
32
|
-
* Locales.
|
|
33
|
-
*
|
|
34
|
-
* When `@nuxtjs/i18n` Nuxt module is present, this option will be ignored, locales will be extracted from the available locales.
|
|
35
|
-
*/
|
|
36
|
-
locale?: Record<string, any>;
|
|
37
|
-
}
|
|
38
|
-
type IconSetName = 'mdi' | 'fa' | 'fa4' | 'md' | 'mdi-svg' | 'fa-svg' | 'unocss-mdi' | 'custom';
|
|
39
|
-
type IconFontName = 'unocss-mdi' | 'mdi' | 'fa' | 'fa4' | 'md';
|
|
40
|
-
interface JSSVGIconSet {
|
|
41
|
-
aliases?: Record<string, string>;
|
|
42
|
-
}
|
|
43
|
-
interface FontAwesomeSvgIconSet {
|
|
44
|
-
/**
|
|
45
|
-
* The libraries to import and register with the corresponding name.
|
|
46
|
-
*
|
|
47
|
-
* For example, to import free svg icons, `libraries` should be (the default):
|
|
48
|
-
* `libraries: [[false, 'fas', '@fortawesome/free-solid-svg-icons']]
|
|
49
|
-
*
|
|
50
|
-
* Following with the example, the resulting import will be:
|
|
51
|
-
* `import { fas } from '@fortawesome/free-solid-svg-icons'`
|
|
52
|
-
*
|
|
53
|
-
* @default [[false, 'fas', '@fortawesome/free-solid-svg-icons']]
|
|
54
|
-
*/
|
|
55
|
-
libraries?: [defaultExport: boolean, name: string, library: string][];
|
|
56
|
-
}
|
|
57
|
-
interface FontIconSet {
|
|
58
|
-
name: IconFontName;
|
|
59
|
-
/**
|
|
60
|
-
* Use CDN?
|
|
61
|
-
*
|
|
62
|
-
* - mdi: https://cdn.jsdelivr.net/npm/@mdi/font@5.x/css/materialdesignicons.min.css
|
|
63
|
-
* - md: https://fonts.googleapis.com/css?family=Material+Icons
|
|
64
|
-
* - fa: https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@latest/css/all.min.css
|
|
65
|
-
* - fa4: https://cdn.jsdelivr.net/npm/font-awesome@4.x/css/font-awesome.min.css
|
|
66
|
-
*
|
|
67
|
-
* @default the corresponding CDN for the icon set
|
|
68
|
-
*/
|
|
69
|
-
cdn?: string;
|
|
70
|
-
}
|
|
71
|
-
interface UnoCCSMdiIconSet {
|
|
72
|
-
collapse?: string;
|
|
73
|
-
complete?: string;
|
|
74
|
-
cancel?: string;
|
|
75
|
-
close?: string;
|
|
76
|
-
delete?: string;
|
|
77
|
-
clear?: string;
|
|
78
|
-
success?: string;
|
|
79
|
-
info?: string;
|
|
80
|
-
warning?: string;
|
|
81
|
-
error?: string;
|
|
82
|
-
prev?: string;
|
|
83
|
-
next?: string;
|
|
84
|
-
checkboxOn?: string;
|
|
85
|
-
checkboxOff?: string;
|
|
86
|
-
checkboxIndeterminate?: string;
|
|
87
|
-
delimiter?: string;
|
|
88
|
-
sortAsc?: string;
|
|
89
|
-
sortDesc?: string;
|
|
90
|
-
expand?: string;
|
|
91
|
-
menu?: string;
|
|
92
|
-
subgroup?: string;
|
|
93
|
-
dropdown?: string;
|
|
94
|
-
radioOn?: string;
|
|
95
|
-
radioOff?: string;
|
|
96
|
-
edit?: string;
|
|
97
|
-
ratingEmpty?: string;
|
|
98
|
-
ratingFull?: string;
|
|
99
|
-
ratingHalf?: string;
|
|
100
|
-
loading?: string;
|
|
101
|
-
first?: string;
|
|
102
|
-
last?: string;
|
|
103
|
-
unfold?: string;
|
|
104
|
-
file?: string;
|
|
105
|
-
plus?: string;
|
|
106
|
-
minus?: string;
|
|
107
|
-
calendar?: string;
|
|
108
|
-
}
|
|
109
|
-
interface IconsOptions {
|
|
110
|
-
/**
|
|
111
|
-
* @default 'mdi'
|
|
112
|
-
*/
|
|
113
|
-
defaultSet: IconSetName;
|
|
114
|
-
/**
|
|
115
|
-
* The prefix for UnoCSS Preset Icons.
|
|
116
|
-
*
|
|
117
|
-
* @default 'i-'
|
|
118
|
-
*/
|
|
119
|
-
unocssIconPrefix?: string;
|
|
120
|
-
/**
|
|
121
|
-
* Override the default mdi icons.
|
|
122
|
-
*
|
|
123
|
-
* Icon names should include the prefix and the collection, for example:
|
|
124
|
-
* - home: i-<collection>:<icon>
|
|
125
|
-
*/
|
|
126
|
-
unocssIcons?: UnoCCSMdiIconSet;
|
|
127
|
-
unocssAdditionalIcons?: Record<string, string>;
|
|
128
|
-
sets?: IconFontName | IconFontName[] | FontIconSet[];
|
|
129
|
-
svg?: {
|
|
130
|
-
mdi?: JSSVGIconSet;
|
|
131
|
-
fa?: FontAwesomeSvgIconSet;
|
|
132
|
-
};
|
|
133
|
-
}
|
|
134
|
-
type ComponentName = keyof typeof vuetify_components;
|
|
135
|
-
type Components = false | ComponentName | ComponentName[];
|
|
136
|
-
type DirectiveName = keyof typeof vuetify_directives;
|
|
137
|
-
type Directives = boolean | DirectiveName | DirectiveName[];
|
|
138
|
-
type LabComponentName = keyof typeof vuetify_labs_components;
|
|
139
|
-
type LabComponents = boolean | LabComponentName | LabComponentName[];
|
|
140
|
-
type VuetifyLocale = keyof typeof vuetify_locale;
|
|
141
|
-
interface VOptions extends Partial<Omit<VuetifyOptions, 'ssr' | 'aliases' | 'components' | 'directives' | 'locale' | 'date' | 'icons'>> {
|
|
142
|
-
/**
|
|
143
|
-
* Configure the SSR options.
|
|
144
|
-
*
|
|
145
|
-
* This option is only used when SSR is enabled in your Nuxt configuration.
|
|
146
|
-
*/
|
|
147
|
-
ssr?: {
|
|
148
|
-
clientWidth: number;
|
|
149
|
-
clientHeight?: number;
|
|
150
|
-
};
|
|
151
|
-
aliases?: Record<string, ComponentName>;
|
|
152
|
-
/**
|
|
153
|
-
* Do you need to configure some global components?.
|
|
154
|
-
*
|
|
155
|
-
* @default false
|
|
156
|
-
*/
|
|
157
|
-
components?: Components;
|
|
158
|
-
/**
|
|
159
|
-
* Configure the locale messages, the locale, the fallback locale and RTL options.
|
|
160
|
-
*
|
|
161
|
-
* When `@nuxtjs/i18n` Nuxt module is present, the following options will be ignored:
|
|
162
|
-
* - `locale`
|
|
163
|
-
* - `fallback`
|
|
164
|
-
* - `rtl`
|
|
165
|
-
* - `messages`
|
|
166
|
-
*
|
|
167
|
-
* The adapter will be `vuetify`, if you want to use another adapter, check `date` option.
|
|
168
|
-
*/
|
|
169
|
-
locale?: Omit<LocaleOptions, 'adapter'> & RtlOptions;
|
|
170
|
-
/**
|
|
171
|
-
* Include locale messages?
|
|
172
|
-
*
|
|
173
|
-
* When `@nuxtjs/i18n` Nuxt module is present, this option will be ignored.
|
|
174
|
-
*
|
|
175
|
-
* You can include the locales you want to use in your application, this module will load and configure the messages for you.
|
|
176
|
-
*/
|
|
177
|
-
localeMessages?: VuetifyLocale | VuetifyLocale[];
|
|
178
|
-
/**
|
|
179
|
-
* Include the lab components?
|
|
180
|
-
*
|
|
181
|
-
* You can include all lab components configuring `labComponents: true`.
|
|
182
|
-
*
|
|
183
|
-
* You can provide an array with the names of the lab components to include.
|
|
184
|
-
*
|
|
185
|
-
* @see https://vuetifyjs.com/en/labs/introduction/
|
|
186
|
-
*
|
|
187
|
-
* @default false
|
|
188
|
-
*/
|
|
189
|
-
labComponents?: LabComponents;
|
|
190
|
-
/**
|
|
191
|
-
* Include the directives?
|
|
192
|
-
*
|
|
193
|
-
* You can include all directives configuring `directives: true`.
|
|
194
|
-
*
|
|
195
|
-
* You can provide an array with the names of the directives to include.
|
|
196
|
-
*
|
|
197
|
-
* @default false
|
|
198
|
-
*/
|
|
199
|
-
directives?: Directives;
|
|
200
|
-
/**
|
|
201
|
-
* Date configuration.
|
|
202
|
-
*
|
|
203
|
-
* When this option is configured, the `v-date-picker` lab component will be included.
|
|
204
|
-
*
|
|
205
|
-
* @see https://vuetifyjs.com/features/dates/
|
|
206
|
-
* @see https://vuetifyjs.com/components/date-pickers/
|
|
207
|
-
*/
|
|
208
|
-
date?: DateOptions;
|
|
209
|
-
/**
|
|
210
|
-
* Include the icons?
|
|
211
|
-
*
|
|
212
|
-
* By default, `mdi` icons will be used via cdn: https://cdn.jsdelivr.net/npm/@mdi/font@5.x/css/materialdesignicons.min.css.
|
|
213
|
-
*
|
|
214
|
-
* @see https://vuetifyjs.com/en/features/icon-fonts/
|
|
215
|
-
*/
|
|
216
|
-
icons?: false | IconsOptions;
|
|
217
|
-
}
|
|
218
|
-
interface MOptions {
|
|
219
|
-
/**
|
|
220
|
-
* @default true
|
|
221
|
-
*/
|
|
222
|
-
importComposables?: boolean;
|
|
223
|
-
/**
|
|
224
|
-
* If you are using another composables that collide with the Vuetify ones,
|
|
225
|
-
* enable this flag to prefix them with `V`:
|
|
226
|
-
* - `useLocale` -> `useVLocale`
|
|
227
|
-
* - `useDefaults` -> `useVDefaults`
|
|
228
|
-
* - `useDisplay` -> `useVDisplay`
|
|
229
|
-
* - `useLayout` -> `useVLayout`
|
|
230
|
-
* - `useRtl` -> `useVRtl`
|
|
231
|
-
* - `useTheme` -> `useVTheme`
|
|
232
|
-
* - `useGoTo` -> `useVGoTo`
|
|
233
|
-
*
|
|
234
|
-
* @default false
|
|
235
|
-
*/
|
|
236
|
-
prefixComposables?: boolean;
|
|
237
|
-
/**
|
|
238
|
-
* Vuetify styles.
|
|
239
|
-
*
|
|
240
|
-
* If you want to use configFile on SSR, you have to disable `experimental.inlineSSRStyles` in nuxt.config.
|
|
241
|
-
*
|
|
242
|
-
* @see https://github.com/vuetifyjs/vuetify-loader/tree/master/packages/vite-plugin
|
|
243
|
-
* @see https://github.com/userquin/vuetify-nuxt-module/issues/78 and https://github.com/userquin/vuetify-nuxt-module/issues/74
|
|
244
|
-
*
|
|
245
|
-
* @default true
|
|
246
|
-
*/
|
|
247
|
-
styles?: true | 'none' | 'sass' | {
|
|
248
|
-
configFile: string;
|
|
249
|
-
};
|
|
250
|
-
/**
|
|
251
|
-
* The module will add `vuetify/styles` in Nuxt `css` by default.
|
|
252
|
-
*
|
|
253
|
-
* If you want to add custom styles, you should enable this flag to avoid registering `vuetify/styles`.
|
|
254
|
-
*
|
|
255
|
-
* @see https://github.com/vuetifyjs/nuxt-module/pull/213
|
|
256
|
-
* @default false
|
|
257
|
-
*/
|
|
258
|
-
disableVuetifyStyles?: boolean;
|
|
259
|
-
/**
|
|
260
|
-
* Disable the modern SASS compiler and API.
|
|
261
|
-
*
|
|
262
|
-
* The module will check for `sass-embedded` dev dependency:
|
|
263
|
-
* - if `disableModernSassCompiler` is enabled, the module will configure the legacy SASS compiler.
|
|
264
|
-
* - if `sass-embedded` dependency is installed, the module will configure the modern SASS compiler.
|
|
265
|
-
* - otherwise, the module will configure the modern SASS API and will enable [preprocessorMaxWorkers](https://vitejs.dev/config/shared-options.html#css-preprocessormaxworkers), only if not configured from user land.
|
|
266
|
-
*
|
|
267
|
-
* @https://vitejs.dev/config/shared-options.html#css-preprocessoroptions
|
|
268
|
-
* @see https://vitejs.dev/config/shared-options.html#css-preprocessormaxworkers
|
|
269
|
-
*
|
|
270
|
-
* @default false
|
|
271
|
-
*/
|
|
272
|
-
disableModernSassCompiler?: boolean;
|
|
273
|
-
/**
|
|
274
|
-
* Add Vuetify Vite Plugin `transformAssetsUrls`?
|
|
275
|
-
*
|
|
276
|
-
* @default true
|
|
277
|
-
*/
|
|
278
|
-
includeTransformAssetsUrls?: boolean | Record<string, string[]>;
|
|
279
|
-
/**
|
|
280
|
-
* Directives Vuetify Vite Plugin should ignore.
|
|
281
|
-
*
|
|
282
|
-
* @since v0.15.1
|
|
283
|
-
*/
|
|
284
|
-
ignoreDirectives?: DirectiveName | DirectiveName[];
|
|
285
|
-
/**
|
|
286
|
-
* Vuetify SSR client hints.
|
|
287
|
-
*
|
|
288
|
-
* @see https://developer.mozilla.org/en-US/docs/Web/HTTP/Client_hints
|
|
289
|
-
*/
|
|
290
|
-
ssrClientHints?: {
|
|
291
|
-
/**
|
|
292
|
-
* Should the module reload the page on first request?
|
|
293
|
-
*
|
|
294
|
-
* @default false
|
|
295
|
-
*/
|
|
296
|
-
reloadOnFirstRequest?: boolean;
|
|
297
|
-
/**
|
|
298
|
-
* Enable `Sec-CH-Viewport-Width` and `Sec-CH-Viewport-Height` headers?
|
|
299
|
-
*
|
|
300
|
-
* @see https://wicg.github.io/responsive-image-client-hints/#sec-ch-viewport-width
|
|
301
|
-
* @see https://wicg.github.io/responsive-image-client-hints/#sec-ch-viewport-height
|
|
302
|
-
*
|
|
303
|
-
* @default false
|
|
304
|
-
*/
|
|
305
|
-
viewportSize?: boolean;
|
|
306
|
-
/**
|
|
307
|
-
* Enable `Sec-CH-Prefers-Color-Scheme` header?
|
|
308
|
-
*
|
|
309
|
-
* @see https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Sec-CH-Prefers-Color-Scheme
|
|
310
|
-
*
|
|
311
|
-
* @default false
|
|
312
|
-
*/
|
|
313
|
-
prefersColorScheme?: boolean;
|
|
314
|
-
/**
|
|
315
|
-
* The options for `prefersColorScheme`, `prefersColorScheme` must be enabled.
|
|
316
|
-
*
|
|
317
|
-
* If you want the module to handle the color scheme for you, you should configure this option, otherwise you'll need to add your custom implementation.
|
|
318
|
-
*/
|
|
319
|
-
prefersColorSchemeOptions?: {
|
|
320
|
-
/**
|
|
321
|
-
* The name for the cookie.
|
|
322
|
-
*
|
|
323
|
-
* @default 'color-scheme'
|
|
324
|
-
*/
|
|
325
|
-
cookieName?: string;
|
|
326
|
-
/**
|
|
327
|
-
* The name for the dark theme.
|
|
328
|
-
*
|
|
329
|
-
* @default 'dark'
|
|
330
|
-
*/
|
|
331
|
-
darkThemeName?: string;
|
|
332
|
-
/**
|
|
333
|
-
* The name for the light theme.
|
|
334
|
-
*
|
|
335
|
-
* @default 'light'
|
|
336
|
-
*/
|
|
337
|
-
lightThemeName?: string;
|
|
338
|
-
/**
|
|
339
|
-
* Use the browser theme only?
|
|
340
|
-
*
|
|
341
|
-
* This flag can be used when your application provides a custom dark and light themes,
|
|
342
|
-
* but will not provide a theme switcher, that's, using by default the browser theme.
|
|
343
|
-
*
|
|
344
|
-
* @default false
|
|
345
|
-
*/
|
|
346
|
-
useBrowserThemeOnly?: boolean;
|
|
347
|
-
};
|
|
348
|
-
/**
|
|
349
|
-
* Enable `Sec-CH-Prefers-Reduced-Motion` header?
|
|
350
|
-
*
|
|
351
|
-
* @see https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Sec-CH-Prefers-Reduced-Motion
|
|
352
|
-
*
|
|
353
|
-
* @default false
|
|
354
|
-
*/
|
|
355
|
-
prefersReducedMotion?: boolean;
|
|
356
|
-
};
|
|
357
|
-
}
|
|
358
|
-
interface VuetifyModuleOptions {
|
|
359
|
-
moduleOptions?: MOptions;
|
|
360
|
-
/**
|
|
361
|
-
* Vuetify options.
|
|
362
|
-
*
|
|
363
|
-
* You can inline the configuration or specify a file path:
|
|
364
|
-
* `vuetifyOptions: './vuetify.options.ts'`
|
|
365
|
-
*
|
|
366
|
-
* The path should be relative to the root folder.
|
|
367
|
-
*/
|
|
368
|
-
vuetifyOptions?: string | VOptions;
|
|
369
|
-
}
|
|
370
|
-
interface InlineModuleOptions extends Omit<VuetifyModuleOptions, 'vuetifyOptions'> {
|
|
371
|
-
vuetifyOptions: VOptions;
|
|
372
|
-
}
|
|
373
|
-
interface ExternalVuetifyOptions extends VOptions {
|
|
374
|
-
config?: boolean;
|
|
375
|
-
}
|
|
376
|
-
/**
|
|
377
|
-
* Request headers received from the client in SSR.
|
|
378
|
-
*/
|
|
379
|
-
interface SSRClientHints {
|
|
380
|
-
/**
|
|
381
|
-
* Is the first request the browser hits the server?
|
|
382
|
-
*/
|
|
383
|
-
firstRequest: boolean;
|
|
384
|
-
/**
|
|
385
|
-
* The browser supports prefer-color-scheme client hints?
|
|
386
|
-
*/
|
|
387
|
-
prefersColorSchemeAvailable: boolean;
|
|
388
|
-
/**
|
|
389
|
-
* The browser supports prefer-reduced-motion client hints?
|
|
390
|
-
*/
|
|
391
|
-
prefersReducedMotionAvailable: boolean;
|
|
392
|
-
/**
|
|
393
|
-
* The browser supports viewport-height client hints?
|
|
394
|
-
*/
|
|
395
|
-
viewportHeightAvailable: boolean;
|
|
396
|
-
/**
|
|
397
|
-
* The browser supports viewport-width client hints?
|
|
398
|
-
*/
|
|
399
|
-
viewportWidthAvailable: boolean;
|
|
400
|
-
prefersColorScheme?: 'dark' | 'light' | 'no-preference';
|
|
401
|
-
prefersReducedMotion?: 'no-preference' | 'reduce';
|
|
402
|
-
viewportHeight?: number;
|
|
403
|
-
viewportWidth?: number;
|
|
404
|
-
/**
|
|
405
|
-
* The theme name from the cookie.
|
|
406
|
-
*/
|
|
407
|
-
colorSchemeFromCookie?: string;
|
|
408
|
-
colorSchemeCookie?: string;
|
|
409
|
-
}
|
|
410
|
-
interface SSRClientHintsConfiguration {
|
|
411
|
-
enabled: boolean;
|
|
412
|
-
viewportSize: boolean;
|
|
413
|
-
prefersColorScheme: boolean;
|
|
414
|
-
prefersReducedMotion: boolean;
|
|
415
|
-
prefersColorSchemeOptions?: {
|
|
416
|
-
baseUrl: string;
|
|
417
|
-
defaultTheme: string;
|
|
418
|
-
themeNames: string[];
|
|
419
|
-
cookieName: string;
|
|
420
|
-
darkThemeName: string;
|
|
421
|
-
lightThemeName: string;
|
|
422
|
-
};
|
|
423
|
-
}
|
|
424
|
-
|
|
425
|
-
interface ModuleOptions extends VuetifyModuleOptions {
|
|
426
|
-
}
|
|
427
|
-
interface ModuleHooks {
|
|
428
|
-
'vuetify:registerModule': (registerModule: (config: InlineModuleOptions) => void) => HookResult;
|
|
429
|
-
}
|
|
430
|
-
interface ModuleRuntimeHooks {
|
|
431
|
-
'vuetify:configuration': (options: {
|
|
432
|
-
isDev: boolean;
|
|
433
|
-
vuetifyOptions: VuetifyOptions;
|
|
434
|
-
}) => HookResult;
|
|
435
|
-
'vuetify:before-create': (options: {
|
|
436
|
-
isDev: boolean;
|
|
437
|
-
vuetifyOptions: VuetifyOptions;
|
|
438
|
-
}) => HookResult;
|
|
439
|
-
'vuetify:ready': (vuetify: ReturnType<typeof createVuetify>) => HookResult;
|
|
440
|
-
'vuetify:ssr-client-hints': (options: {
|
|
441
|
-
vuetifyOptions: VuetifyOptions;
|
|
442
|
-
ssrClientHints: SSRClientHints;
|
|
443
|
-
ssrClientHintsConfiguration: SSRClientHintsConfiguration;
|
|
444
|
-
}) => HookResult;
|
|
445
|
-
}
|
|
446
|
-
declare const _default: _nuxt_schema.NuxtModule<ModuleOptions>;
|
|
447
|
-
|
|
448
|
-
export { type ComponentName, type Components, type DateAdapter, type DateOptions, type DirectiveName, type Directives, type ExternalVuetifyOptions, type FontAwesomeSvgIconSet, type FontIconSet, type IconFontName, type IconSetName, type IconsOptions, type InlineModuleOptions, type JSSVGIconSet, type LabComponentName, type LabComponents, type MOptions, type ModuleHooks, type ModuleOptions, type ModuleRuntimeHooks, type SSRClientHints, type SSRClientHintsConfiguration, type UnoCCSMdiIconSet, type VOptions, type VuetifyLocale, type VuetifyModuleOptions, _default as default };
|
package/dist/types.d.ts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import type { ModuleHooks, ModuleRuntimeHooks } from './module'
|
|
2
|
-
|
|
3
|
-
declare module '#app' {
|
|
4
|
-
interface RuntimeNuxtHooks extends ModuleRuntimeHooks {}
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
declare module '@nuxt/schema' {
|
|
8
|
-
interface NuxtHooks extends ModuleHooks {}
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
declare module 'nuxt/schema' {
|
|
12
|
-
interface NuxtHooks extends ModuleHooks {}
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export { type ComponentName, type Components, type DateAdapter, type DateOptions, type DirectiveName, type Directives, type ExternalVuetifyOptions, type FontAwesomeSvgIconSet, type FontIconSet, type IconFontName, type IconSetName, type IconsOptions, type InlineModuleOptions, type JSSVGIconSet, type LabComponentName, type LabComponents, type MOptions, type ModuleHooks, type ModuleOptions, type ModuleRuntimeHooks, type SSRClientHints, type SSRClientHintsConfiguration, type UnoCCSMdiIconSet, type VOptions, type VuetifyLocale, type VuetifyModuleOptions, default } from './module'
|