vuetify-nuxt-module 1.0.0-rc.4 → 1.0.0-rc.6
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.d.mts +6 -2
- package/dist/module.json +1 -1
- package/dist/module.mjs +8 -5
- package/dist/runtime/plugins/date.js +1 -1
- package/dist/runtime/plugins/i18n.js +1 -1
- package/dist/runtime/plugins/vuetify-client-hints.client.d.ts +1 -1
- package/dist/runtime/plugins/vuetify-client-hints.client.js +2 -2
- package/dist/runtime/plugins/vuetify-client-hints.server.d.ts +1 -1
- package/dist/runtime/plugins/vuetify-client-hints.server.js +6 -6
- package/dist/runtime/plugins/vuetify-no-client-hints.d.ts +1 -1
- package/dist/runtime/plugins/vuetify-no-client-hints.js +1 -1
- package/package.json +26 -27
package/dist/module.d.mts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import * as _nuxt_schema from '@nuxt/schema';
|
|
2
2
|
import { HookResult } from '@nuxt/schema';
|
|
3
|
-
import { VuetifyOptions, LocaleOptions, RtlOptions, createVuetify } from 'vuetify';
|
|
4
3
|
import * as vuetify_locale from 'vuetify/locale';
|
|
5
4
|
import * as vuetify_labs_components from 'vuetify/labs/components';
|
|
6
5
|
import * as vuetify_directives from 'vuetify/directives';
|
|
7
6
|
import * as vuetify_components from 'vuetify/components';
|
|
7
|
+
import { VuetifyOptions, LocaleOptions, RtlOptions, createVuetify } from 'vuetify';
|
|
8
8
|
|
|
9
9
|
type DateAdapter = 'vuetify' | 'date-fns' | 'moment' | 'luxon' | 'dayjs' | 'js-joda' | 'date-fns-jalali' | 'jalaali' | 'hijri' | 'custom';
|
|
10
10
|
/**
|
|
@@ -329,9 +329,13 @@ interface MOptions {
|
|
|
329
329
|
* Rules configuration.
|
|
330
330
|
*
|
|
331
331
|
* @since v0.19.0
|
|
332
|
-
* @default true
|
|
333
332
|
*/
|
|
334
333
|
rulesConfiguration?: {
|
|
334
|
+
/**
|
|
335
|
+
* Resolves import path for rules composable. Ignored since Vuetify 4.2.0.
|
|
336
|
+
*
|
|
337
|
+
* @default true
|
|
338
|
+
*/
|
|
335
339
|
fromLabs?: boolean;
|
|
336
340
|
configFile?: string;
|
|
337
341
|
};
|
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -4,8 +4,8 @@ import { addPluginTemplate, resolvePath, addTemplate, extendWebpackConfig, isNux
|
|
|
4
4
|
import { isAbsolute, resolve, dirname } from 'pathe';
|
|
5
5
|
import semver from 'semver';
|
|
6
6
|
import { createFilter, version as version$1 } from 'vite';
|
|
7
|
-
import defu from 'defu';
|
|
8
7
|
import { transformAssetUrls, generateImports } from '@vuetify/loader-shared';
|
|
8
|
+
import defu from 'defu';
|
|
9
9
|
import Styles from '@vuetify/unplugin-styles/vite';
|
|
10
10
|
import { isPackageExists } from 'local-pkg';
|
|
11
11
|
import { parseQuery, parseURL } from 'ufo';
|
|
@@ -13,7 +13,7 @@ import { readFile } from 'node:fs/promises';
|
|
|
13
13
|
import process from 'node:process';
|
|
14
14
|
import { createConfigLoader } from 'unconfig';
|
|
15
15
|
|
|
16
|
-
const version = "1.0.0-rc.
|
|
16
|
+
const version = "1.0.0-rc.6";
|
|
17
17
|
|
|
18
18
|
const VIRTUAL_VUETIFY_CONFIGURATION = "virtual:vuetify-configuration";
|
|
19
19
|
const RESOLVED_VIRTUAL_VUETIFY_CONFIGURATION = `\0${VIRTUAL_VUETIFY_CONFIGURATION}`;
|
|
@@ -170,7 +170,7 @@ function addVuetifyNuxtPlugin(nuxt, ctx, mode) {
|
|
|
170
170
|
rulesImports = [
|
|
171
171
|
"",
|
|
172
172
|
`import { rulesOptions } from '#build/vuetify/${ctx.rulesConfiguration.fromLabs ? "labs-" : ""}rules-configuration.mjs'`,
|
|
173
|
-
`import { createRulesPlugin } from '
|
|
173
|
+
`import { createRulesPlugin } from '${ctx.rulesConfiguration.fromLabs ? "vuetify/labs/rules" : "vuetify"}'`
|
|
174
174
|
].join("\n");
|
|
175
175
|
rulesPlugin = [
|
|
176
176
|
"",
|
|
@@ -970,7 +970,7 @@ function vuetifyImportPlugin(options) {
|
|
|
970
970
|
async transform(code, id) {
|
|
971
971
|
const { query, path } = parseId(id);
|
|
972
972
|
const isVueVirtual = query && "vue" in query;
|
|
973
|
-
const isVueFile = !isVueVirtual && filter(path) && !/^import { render as _sfc_render } from ".*"$/m.test(code);
|
|
973
|
+
const isVueFile = !isVueVirtual && filter(path) && !/^import \{ render as _sfc_render \} from ".*"$/m.test(code);
|
|
974
974
|
const isVueTemplate = isVueVirtual && (query.type === "template" || query.type === "script" && query.setup === "true");
|
|
975
975
|
if (isVueFile || isVueTemplate) {
|
|
976
976
|
const { code: imports, source } = generateImports(code, options);
|
|
@@ -1593,7 +1593,10 @@ async function load(options, nuxt, ctx, reload = false) {
|
|
|
1593
1593
|
ctx.moduleOptions = configuration.moduleOptions;
|
|
1594
1594
|
ctx.vuetifyOptions = configuration.vuetifyOptions;
|
|
1595
1595
|
ctx.enableRules = ctx.moduleOptions.enableRules;
|
|
1596
|
-
ctx.rulesConfiguration = ctx.moduleOptions.rulesConfiguration;
|
|
1596
|
+
ctx.rulesConfiguration = { ...ctx.moduleOptions.rulesConfiguration };
|
|
1597
|
+
if (ctx.vuetifyGte("4.2.0")) {
|
|
1598
|
+
ctx.rulesConfiguration.fromLabs = false;
|
|
1599
|
+
}
|
|
1597
1600
|
ctx.vuetifyFilesToWatch = Array.from(vuetifyConfigurationFilesToWatch);
|
|
1598
1601
|
ctx.icons = prepareIcons(ctx.unocss, ctx.logger, vuetifyAppOptions, ctx.resolvePaths);
|
|
1599
1602
|
ctx.ssrClientHints = prepareSSRClientHints(nuxt.options.app.baseURL ?? "/", ctx);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { useNuxtApp } from "#imports";
|
|
2
1
|
import { adapter, dateConfiguration, enabled, i18n } from "virtual:vuetify-date-configuration";
|
|
2
|
+
import { useNuxtApp } from "#imports";
|
|
3
3
|
export function configureDate(vuetifyOptions) {
|
|
4
4
|
if (adapter === "custom" || !enabled) {
|
|
5
5
|
return;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Plugin } from '#app';
|
|
2
|
-
import type { UnwrapNestedRefs } from 'vue';
|
|
3
2
|
import type { SSRClientHints } from './types.js';
|
|
3
|
+
import type { UnwrapNestedRefs } from 'vue';
|
|
4
4
|
declare const plugin: Plugin<{
|
|
5
5
|
ssrClientHints: UnwrapNestedRefs<SSRClientHints>;
|
|
6
6
|
}>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { defineNuxtPlugin, useNuxtApp, useState } from "#imports";
|
|
2
1
|
import { ssrClientHintsConfiguration } from "virtual:vuetify-ssr-client-hints-configuration";
|
|
3
2
|
import { reactive, ref, watch } from "vue";
|
|
3
|
+
import { defineNuxtPlugin, useNuxtApp, useState } from "#imports";
|
|
4
4
|
import { VuetifyHTTPClientHints } from "./client-hints.js";
|
|
5
5
|
import { buildReloadGuardCookie, hasReloadGuardCookie, shouldReloadOnFirstRequest } from "./first-request-reload-guard.js";
|
|
6
6
|
const plugin = defineNuxtPlugin({
|
|
@@ -130,7 +130,7 @@ function useSSRClientHints() {
|
|
|
130
130
|
defaultTheme
|
|
131
131
|
} = ssrClientHintsConfiguration.prefersColorSchemeOptions;
|
|
132
132
|
const cookieNamePrefix = `${cookieName}=`;
|
|
133
|
-
initial.value.colorSchemeFromCookie = document.cookie?.split(";")?.find((c) => c.trim().startsWith(cookieNamePrefix))?.split("=")[1] ?? defaultTheme;
|
|
133
|
+
initial.value.colorSchemeFromCookie = document.cookie?.split(";")?.find((c) => c.trim().startsWith(cookieNamePrefix))?.split("=", 2)[1] ?? defaultTheme;
|
|
134
134
|
const date = /* @__PURE__ */ new Date();
|
|
135
135
|
const expires = new Date(date.setDate(date.getDate() + 365));
|
|
136
136
|
initial.value.colorSchemeCookie = `${cookieName}=${initial.value.colorSchemeFromCookie}; Path=${baseUrl}; Expires=${expires.toUTCString()}; SameSite=${cookieSameSite[0].toUpperCase()}${cookieSameSite.slice(1)}`;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Plugin } from '#app';
|
|
2
|
-
import type { UnwrapNestedRefs } from 'vue';
|
|
3
2
|
import type { SSRClientHints } from './types.js';
|
|
3
|
+
import type { UnwrapNestedRefs } from 'vue';
|
|
4
4
|
declare const plugin: Plugin<{
|
|
5
5
|
ssrClientHints: UnwrapNestedRefs<SSRClientHints>;
|
|
6
6
|
}>;
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
import { setResponseHeader } from "h3";
|
|
2
|
+
import {
|
|
3
|
+
ssrClientHintsConfiguration
|
|
4
|
+
} from "virtual:vuetify-ssr-client-hints-configuration";
|
|
5
|
+
import { reactive } from "vue";
|
|
1
6
|
import {
|
|
2
7
|
defineNuxtPlugin,
|
|
3
8
|
useCookie,
|
|
@@ -6,11 +11,6 @@ import {
|
|
|
6
11
|
useRequestHeaders,
|
|
7
12
|
useState
|
|
8
13
|
} from "#imports";
|
|
9
|
-
import { setResponseHeader } from "h3";
|
|
10
|
-
import {
|
|
11
|
-
ssrClientHintsConfiguration
|
|
12
|
-
} from "virtual:vuetify-ssr-client-hints-configuration";
|
|
13
|
-
import { reactive } from "vue";
|
|
14
14
|
import { VuetifyHTTPClientHints } from "./client-hints.js";
|
|
15
15
|
import { parseUserAgent } from "./detect-browser.js";
|
|
16
16
|
const AcceptClientHintsHeaders = {
|
|
@@ -155,7 +155,7 @@ function collectClientHints(userAgent, ssrClientHintsConfiguration2, headers) {
|
|
|
155
155
|
const cookieName = ssrClientHintsConfiguration2.prefersColorSchemeOptions.cookieName;
|
|
156
156
|
const cookieValue = headers.cookie?.split(";").find((c) => c.trim().startsWith(`${cookieName}=`));
|
|
157
157
|
if (cookieValue) {
|
|
158
|
-
const value = cookieValue.split("=")?.[1].trim();
|
|
158
|
+
const value = cookieValue.split("=", 2)?.[1].trim();
|
|
159
159
|
if (ssrClientHintsConfiguration2.prefersColorSchemeOptions.themeNames.includes(value)) {
|
|
160
160
|
hints.colorSchemeFromCookie = value;
|
|
161
161
|
hints.firstRequest = false;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Plugin } from '#app';
|
|
2
|
-
import type { UnwrapNestedRefs } from 'vue';
|
|
3
2
|
import type { SSRClientHints } from './types.js';
|
|
3
|
+
import type { UnwrapNestedRefs } from 'vue';
|
|
4
4
|
declare const plugin: Plugin<{
|
|
5
5
|
ssrClientHints: UnwrapNestedRefs<SSRClientHints>;
|
|
6
6
|
}>;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vuetify-nuxt-module",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.0.0-rc.
|
|
4
|
+
"version": "1.0.0-rc.6",
|
|
5
5
|
"description": "Zero-Config Nuxt Module for Vuetify",
|
|
6
6
|
"author": "userquin <userquin@gmail.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -51,14 +51,14 @@
|
|
|
51
51
|
"*.mjs"
|
|
52
52
|
],
|
|
53
53
|
"dependencies": {
|
|
54
|
-
"@nuxt/kit": "^4.5.
|
|
54
|
+
"@nuxt/kit": "^4.5.2",
|
|
55
55
|
"@vuetify/loader-shared": "^2.1.2",
|
|
56
56
|
"@vuetify/unplugin-styles": "^1.0.0-rc.1",
|
|
57
57
|
"defu": "^6.1.7",
|
|
58
58
|
"local-pkg": "^1.2.1",
|
|
59
59
|
"pathe": "^2.0.3",
|
|
60
60
|
"perfect-debounce": "^2.1.0",
|
|
61
|
-
"semver": "^7.8.
|
|
61
|
+
"semver": "^7.8.5",
|
|
62
62
|
"ufo": "^1.6.4",
|
|
63
63
|
"unconfig": "^7.5.0"
|
|
64
64
|
},
|
|
@@ -66,37 +66,36 @@
|
|
|
66
66
|
"vuetify": "^3.4.0 || ^4.0.0"
|
|
67
67
|
},
|
|
68
68
|
"devDependencies": {
|
|
69
|
-
"@antfu/
|
|
70
|
-
"@antfu/ni": "^28.3.0",
|
|
69
|
+
"@antfu/ni": "^30.5.0",
|
|
71
70
|
"@date-io/luxon": "^3.2.0",
|
|
72
|
-
"@fortawesome/fontawesome-svg-core": "^7.
|
|
73
|
-
"@fortawesome/free-solid-svg-icons": "^7.
|
|
74
|
-
"@fortawesome/vue-fontawesome": "^3.
|
|
75
|
-
"@iconify-json/carbon": "^1.2.
|
|
71
|
+
"@fortawesome/fontawesome-svg-core": "^7.3.1",
|
|
72
|
+
"@fortawesome/free-solid-svg-icons": "^7.3.1",
|
|
73
|
+
"@fortawesome/vue-fontawesome": "^3.3.3",
|
|
74
|
+
"@iconify-json/carbon": "^1.2.25",
|
|
76
75
|
"@iconify-json/mdi": "^1.2.3",
|
|
77
76
|
"@mdi/js": "^7.4.47",
|
|
78
|
-
"@nuxt/devtools": "
|
|
77
|
+
"@nuxt/devtools": "^3.4.1",
|
|
79
78
|
"@nuxt/module-builder": "^1.0.3",
|
|
80
|
-
"@nuxt/schema": "^4.5.
|
|
81
|
-
"@nuxt/test-utils": "^4.0
|
|
82
|
-
"@nuxtjs/i18n": "^10.
|
|
83
|
-
"@parcel/watcher": "^2.
|
|
84
|
-
"@types/node": "^25.9.
|
|
85
|
-
"@types/semver": "^7.
|
|
86
|
-
"@unocss/nuxt": "^66.
|
|
87
|
-
"bumpp": "^
|
|
88
|
-
"eslint": "^10.
|
|
79
|
+
"@nuxt/schema": "^4.5.2",
|
|
80
|
+
"@nuxt/test-utils": "^4.1.0",
|
|
81
|
+
"@nuxtjs/i18n": "^10.6.0",
|
|
82
|
+
"@parcel/watcher": "^2.6.0",
|
|
83
|
+
"@types/node": "^25.9.5",
|
|
84
|
+
"@types/semver": "^7.8.0",
|
|
85
|
+
"@unocss/nuxt": "^66.8.1",
|
|
86
|
+
"bumpp": "^12.2.1",
|
|
87
|
+
"eslint": "^10.9.0",
|
|
89
88
|
"luxon": "^3.7.2",
|
|
90
|
-
"nuxt": "^4.5.
|
|
91
|
-
"playwright-core": "^1.
|
|
92
|
-
"publint": "^0.3.
|
|
89
|
+
"nuxt": "^4.5.2",
|
|
90
|
+
"playwright-core": "^1.62.1",
|
|
91
|
+
"publint": "^0.3.24",
|
|
93
92
|
"rimraf": "^6.1.3",
|
|
94
|
-
"sass": "^1.
|
|
93
|
+
"sass": "^1.103.1",
|
|
95
94
|
"typescript": "^5.9.3",
|
|
96
|
-
"vite": "
|
|
97
|
-
"vitest": "^4.1.
|
|
98
|
-
"vue-tsc": "^3.3.
|
|
99
|
-
"vuetify": "^4.1.
|
|
95
|
+
"vite": "^8.2.2",
|
|
96
|
+
"vitest": "^4.1.11",
|
|
97
|
+
"vue-tsc": "^3.3.11",
|
|
98
|
+
"vuetify": "^4.1.11"
|
|
100
99
|
},
|
|
101
100
|
"build": {
|
|
102
101
|
"externals": [
|