vuetify-nuxt-module 0.5.12 → 0.5.14
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.ts +49 -2
- package/dist/module.json +1 -1
- package/dist/module.mjs +95 -50
- package/dist/runtime/plugins/config.mjs +1 -0
- package/dist/types.d.ts +1 -1
- package/package.json +2 -2
package/dist/module.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as _nuxt_schema from '@nuxt/schema';
|
|
2
2
|
import * as vuetify from 'vuetify';
|
|
3
|
-
import { VuetifyOptions, LocaleOptions, RtlOptions } from 'vuetify';
|
|
3
|
+
import { VuetifyOptions, createVuetify, LocaleOptions, RtlOptions } from 'vuetify';
|
|
4
4
|
import * as vuetify_locale from 'vuetify/locale';
|
|
5
5
|
import * as vuetify_labs_components from 'vuetify/labs/components';
|
|
6
6
|
import * as vuetify_directives from 'vuetify/directives';
|
|
@@ -69,6 +69,44 @@ interface FontIconSet {
|
|
|
69
69
|
*/
|
|
70
70
|
cdn?: string;
|
|
71
71
|
}
|
|
72
|
+
interface UnoCCSMdiIconSet {
|
|
73
|
+
collapse?: string;
|
|
74
|
+
complete?: string;
|
|
75
|
+
cancel?: string;
|
|
76
|
+
close?: string;
|
|
77
|
+
delete?: string;
|
|
78
|
+
clear?: string;
|
|
79
|
+
success?: string;
|
|
80
|
+
info?: string;
|
|
81
|
+
warning?: string;
|
|
82
|
+
error?: string;
|
|
83
|
+
prev?: string;
|
|
84
|
+
next?: string;
|
|
85
|
+
checkboxOn?: string;
|
|
86
|
+
checkboxOff?: string;
|
|
87
|
+
checkboxIndeterminate?: string;
|
|
88
|
+
delimiter?: string;
|
|
89
|
+
sortAsc?: string;
|
|
90
|
+
sortDesc?: string;
|
|
91
|
+
expand?: string;
|
|
92
|
+
menu?: string;
|
|
93
|
+
subgroup?: string;
|
|
94
|
+
dropdown?: string;
|
|
95
|
+
radioOn?: string;
|
|
96
|
+
radioOff?: string;
|
|
97
|
+
edit?: string;
|
|
98
|
+
ratingEmpty?: string;
|
|
99
|
+
ratingFull?: string;
|
|
100
|
+
ratingHalf?: string;
|
|
101
|
+
loading?: string;
|
|
102
|
+
first?: string;
|
|
103
|
+
last?: string;
|
|
104
|
+
unfold?: string;
|
|
105
|
+
file?: string;
|
|
106
|
+
plus?: string;
|
|
107
|
+
minus?: string;
|
|
108
|
+
calendar?: string;
|
|
109
|
+
}
|
|
72
110
|
interface IconsOptions {
|
|
73
111
|
/**
|
|
74
112
|
* @default 'mdi'
|
|
@@ -80,6 +118,14 @@ interface IconsOptions {
|
|
|
80
118
|
* @default 'i-'
|
|
81
119
|
*/
|
|
82
120
|
unocssIconPrefix?: string;
|
|
121
|
+
/**
|
|
122
|
+
* Override the default mdi icons.
|
|
123
|
+
*
|
|
124
|
+
* Icon names should include the prefix and the collection, for example:
|
|
125
|
+
* - home: i-<collection>:<icon>
|
|
126
|
+
*/
|
|
127
|
+
unocssIcons?: UnoCCSMdiIconSet;
|
|
128
|
+
unocssAdditionalIcons?: Record<string, string>;
|
|
83
129
|
sets?: IconFontName | IconFontName[] | FontIconSet[];
|
|
84
130
|
svg?: {
|
|
85
131
|
mdi?: JSSVGIconSet;
|
|
@@ -369,6 +415,7 @@ declare module '#app' {
|
|
|
369
415
|
isDev: boolean;
|
|
370
416
|
vuetifyOptions: VuetifyOptions;
|
|
371
417
|
}) => Promise<void> | void;
|
|
418
|
+
'vuetify:ready': (vuetify: ReturnType<typeof createVuetify>) => Promise<void> | void;
|
|
372
419
|
'vuetify:ssr-client-hints': (options: {
|
|
373
420
|
vuetifyOptions: VuetifyOptions;
|
|
374
421
|
ssrClientHints: SSRClientHints;
|
|
@@ -379,4 +426,4 @@ declare module '#app' {
|
|
|
379
426
|
|
|
380
427
|
declare const _default: _nuxt_schema.NuxtModule<ModuleOptions>;
|
|
381
428
|
|
|
382
|
-
export { ComponentName, Components, DateAdapter, DateOptions, DirectiveName, Directives, ExternalVuetifyOptions, FontAwesomeSvgIconSet, FontIconSet, IconFontName, IconSetName, IconsOptions, InlineModuleOptions, JSSVGIconSet, LabComponentName, LabComponents, MOptions, ModuleOptions, SSRClientHints, SSRClientHintsConfiguration, VOptions, VuetifyLocale, _default as default };
|
|
429
|
+
export { ComponentName, Components, DateAdapter, DateOptions, DirectiveName, Directives, ExternalVuetifyOptions, FontAwesomeSvgIconSet, FontIconSet, IconFontName, IconSetName, IconsOptions, InlineModuleOptions, JSSVGIconSet, LabComponentName, LabComponents, MOptions, ModuleOptions, SSRClientHints, SSRClientHintsConfiguration, UnoCCSMdiIconSet, VOptions, VuetifyLocale, _default as default };
|
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -12,7 +12,7 @@ import vuetify, { transformAssetUrls } from 'vite-plugin-vuetify';
|
|
|
12
12
|
import { isAbsolute, join, relative } from 'pathe';
|
|
13
13
|
import { normalizePath as normalizePath$1 } from 'vite';
|
|
14
14
|
|
|
15
|
-
const version = "0.5.
|
|
15
|
+
const version = "0.5.14";
|
|
16
16
|
|
|
17
17
|
const VIRTUAL_VUETIFY_CONFIGURATION = "virtual:vuetify-configuration";
|
|
18
18
|
const RESOLVED_VIRTUAL_VUETIFY_CONFIGURATION = `/@nuxt-vuetify-configuration/${VIRTUAL_VUETIFY_CONFIGURATION.slice("virtual:".length)}`;
|
|
@@ -198,6 +198,8 @@ const disabledResolvedIcons = Object.freeze({
|
|
|
198
198
|
unocss: false,
|
|
199
199
|
unocssAliases: false,
|
|
200
200
|
unocssIconPrefix: "i-",
|
|
201
|
+
unocssIcons: {},
|
|
202
|
+
unocssAdditionalIcons: {},
|
|
201
203
|
imports: [],
|
|
202
204
|
aliases: [],
|
|
203
205
|
aliasesImportPresent: false,
|
|
@@ -221,6 +223,8 @@ function prepareIcons(unocssPresent, logger, vuetifyOptions) {
|
|
|
221
223
|
unocss: unocssPresent && (defaultSet === "unocss-mdi" || sets.some((s) => s.name === "unocss-mdi")),
|
|
222
224
|
unocssAliases: defaultSet === "unocss-mdi",
|
|
223
225
|
unocssIconPrefix: icons.unocssIconPrefix ?? "i-",
|
|
226
|
+
unocssIcons: icons.unocssIcons ?? {},
|
|
227
|
+
unocssAdditionalIcons: icons.unocssAdditionalIcons ?? {},
|
|
224
228
|
defaultSet,
|
|
225
229
|
sets: [],
|
|
226
230
|
aliases: [],
|
|
@@ -658,6 +662,15 @@ function vuetifyStylesPlugin(options, logger) {
|
|
|
658
662
|
};
|
|
659
663
|
}
|
|
660
664
|
|
|
665
|
+
function toKebabCase(str = "") {
|
|
666
|
+
if (toKebabCase.cache.has(str))
|
|
667
|
+
return toKebabCase.cache.get(str);
|
|
668
|
+
const kebab = str.replace(/[^a-z]/gi, "-").replace(/\B([A-Z])/g, "-$1").toLowerCase();
|
|
669
|
+
toKebabCase.cache.set(str, kebab);
|
|
670
|
+
return kebab;
|
|
671
|
+
}
|
|
672
|
+
toKebabCase.cache = /* @__PURE__ */ new Map();
|
|
673
|
+
|
|
661
674
|
function vuetifyConfigurationPlugin(ctx) {
|
|
662
675
|
return {
|
|
663
676
|
name: "vuetify:configuration:nuxt",
|
|
@@ -744,8 +757,8 @@ async function buildConfiguration(ctx) {
|
|
|
744
757
|
config.imports.push("import * as directives from 'vuetify/directives'");
|
|
745
758
|
config.directives = "options.directives = directives";
|
|
746
759
|
} else {
|
|
747
|
-
const useDirectives = Array.isArray(directives) ? [...new Set(
|
|
748
|
-
config.imports.push(useDirectives.map((d) => `import {
|
|
760
|
+
const useDirectives = Array.isArray(directives) ? [...new Set(directives)] : [directives];
|
|
761
|
+
config.imports.push(useDirectives.map((d) => `import {${d}} from 'vuetify/directives/${toKebabCase(d)}'`).join("\n"));
|
|
749
762
|
config.directives = `options.directives = {${useDirectives.join(",")}}`;
|
|
750
763
|
}
|
|
751
764
|
}
|
|
@@ -960,46 +973,87 @@ ${unocss}
|
|
|
960
973
|
if (ctx.icons.unocss && ctx.icons.unocssAliases) {
|
|
961
974
|
ctx.icons.imports.unshift("// @unocss-include");
|
|
962
975
|
const prefix = `${ctx.icons.unocssIconPrefix}mdi:`;
|
|
963
|
-
|
|
964
|
-
collapse
|
|
965
|
-
complete
|
|
966
|
-
cancel
|
|
967
|
-
close
|
|
968
|
-
delete: `${prefix}close-circle`,
|
|
976
|
+
const {
|
|
977
|
+
collapse = `${prefix}chevron-up`,
|
|
978
|
+
complete = `${prefix}check`,
|
|
979
|
+
cancel = `${prefix}close-circle`,
|
|
980
|
+
close = `${prefix}close`,
|
|
969
981
|
// delete (e.g. v-chip close)
|
|
970
|
-
clear
|
|
971
|
-
success
|
|
972
|
-
info
|
|
973
|
-
warning
|
|
974
|
-
error
|
|
975
|
-
prev
|
|
976
|
-
next
|
|
977
|
-
checkboxOn
|
|
978
|
-
checkboxOff
|
|
979
|
-
checkboxIndeterminate
|
|
980
|
-
delimiter
|
|
982
|
+
clear = `${prefix}close-circle`,
|
|
983
|
+
success = `${prefix}check-circle`,
|
|
984
|
+
info = `${prefix}information`,
|
|
985
|
+
warning = `${prefix}alert-circle`,
|
|
986
|
+
error = `${prefix}close-circle`,
|
|
987
|
+
prev = `${prefix}chevron-left`,
|
|
988
|
+
next = `${prefix}chevron-right`,
|
|
989
|
+
checkboxOn = `${prefix}checkbox-marked`,
|
|
990
|
+
checkboxOff = `${prefix}checkbox-blank-outline`,
|
|
991
|
+
checkboxIndeterminate = `${prefix}minus-box`,
|
|
992
|
+
delimiter = `${prefix}circle`,
|
|
981
993
|
// for carousel
|
|
982
|
-
sortAsc
|
|
983
|
-
sortDesc
|
|
984
|
-
expand
|
|
985
|
-
menu
|
|
986
|
-
subgroup
|
|
987
|
-
dropdown
|
|
988
|
-
radioOn
|
|
989
|
-
radioOff
|
|
990
|
-
edit
|
|
991
|
-
ratingEmpty
|
|
992
|
-
ratingFull
|
|
993
|
-
ratingHalf
|
|
994
|
-
loading
|
|
995
|
-
first
|
|
996
|
-
last
|
|
997
|
-
unfold
|
|
998
|
-
file
|
|
999
|
-
plus
|
|
1000
|
-
minus
|
|
1001
|
-
calendar
|
|
1002
|
-
}
|
|
994
|
+
sortAsc = `${prefix}arrow-up`,
|
|
995
|
+
sortDesc = `${prefix}arrow-down`,
|
|
996
|
+
expand = `${prefix}chevron-down`,
|
|
997
|
+
menu = `${prefix}menu`,
|
|
998
|
+
subgroup = `${prefix}menu-down`,
|
|
999
|
+
dropdown = `${prefix}menu-down`,
|
|
1000
|
+
radioOn = `${prefix}radiobox-marked`,
|
|
1001
|
+
radioOff = `${prefix}radiobox-blank`,
|
|
1002
|
+
edit = `${prefix}pencil`,
|
|
1003
|
+
ratingEmpty = `${prefix}star-outline`,
|
|
1004
|
+
ratingFull = `${prefix}star`,
|
|
1005
|
+
ratingHalf = `${prefix}star-half-full`,
|
|
1006
|
+
loading = `${prefix}cached`,
|
|
1007
|
+
first = `${prefix}page-first`,
|
|
1008
|
+
last = `${prefix}page-last`,
|
|
1009
|
+
unfold = `${prefix}unfold-more-horizontal`,
|
|
1010
|
+
file = `${prefix}paperclip`,
|
|
1011
|
+
plus = `${prefix}plus`,
|
|
1012
|
+
minus = `${prefix}minus`,
|
|
1013
|
+
calendar = `${prefix}calendar`
|
|
1014
|
+
} = ctx.icons.unocssIcons;
|
|
1015
|
+
const useIcons = {
|
|
1016
|
+
collapse,
|
|
1017
|
+
complete,
|
|
1018
|
+
cancel,
|
|
1019
|
+
close,
|
|
1020
|
+
delete: ctx.icons.unocssIcons.delete ?? `${prefix}close-circle`,
|
|
1021
|
+
clear,
|
|
1022
|
+
success,
|
|
1023
|
+
info,
|
|
1024
|
+
warning,
|
|
1025
|
+
error,
|
|
1026
|
+
prev,
|
|
1027
|
+
next,
|
|
1028
|
+
checkboxOn,
|
|
1029
|
+
checkboxOff,
|
|
1030
|
+
checkboxIndeterminate,
|
|
1031
|
+
delimiter,
|
|
1032
|
+
sortAsc,
|
|
1033
|
+
sortDesc,
|
|
1034
|
+
expand,
|
|
1035
|
+
menu,
|
|
1036
|
+
subgroup,
|
|
1037
|
+
dropdown,
|
|
1038
|
+
radioOn,
|
|
1039
|
+
radioOff,
|
|
1040
|
+
edit,
|
|
1041
|
+
ratingEmpty,
|
|
1042
|
+
ratingFull,
|
|
1043
|
+
ratingHalf,
|
|
1044
|
+
loading,
|
|
1045
|
+
first,
|
|
1046
|
+
last,
|
|
1047
|
+
unfold,
|
|
1048
|
+
file,
|
|
1049
|
+
plus,
|
|
1050
|
+
minus,
|
|
1051
|
+
calendar
|
|
1052
|
+
};
|
|
1053
|
+
Object.entries(ctx.icons.unocssAdditionalIcons).forEach(([key, value]) => {
|
|
1054
|
+
useIcons[key] = value;
|
|
1055
|
+
});
|
|
1056
|
+
unocss = `const aliases = JSON.parse('${JSON.stringify(useIcons)}');
|
|
1003
1057
|
`;
|
|
1004
1058
|
}
|
|
1005
1059
|
return {
|
|
@@ -1106,15 +1160,6 @@ function configureVite(configKey, nuxt, ctx) {
|
|
|
1106
1160
|
});
|
|
1107
1161
|
}
|
|
1108
1162
|
|
|
1109
|
-
function toKebabCase(str = "") {
|
|
1110
|
-
if (toKebabCase.cache.has(str))
|
|
1111
|
-
return toKebabCase.cache.get(str);
|
|
1112
|
-
const kebab = str.replace(/[^a-z]/gi, "-").replace(/\B([A-Z])/g, "-$1").toLowerCase();
|
|
1113
|
-
toKebabCase.cache.set(str, kebab);
|
|
1114
|
-
return kebab;
|
|
1115
|
-
}
|
|
1116
|
-
toKebabCase.cache = /* @__PURE__ */ new Map();
|
|
1117
|
-
|
|
1118
1163
|
function configureNuxt(configKey, nuxt, ctx) {
|
|
1119
1164
|
var _a, _b, _c;
|
|
1120
1165
|
const {
|
|
@@ -9,6 +9,7 @@ export async function configureVuetify() {
|
|
|
9
9
|
const vuetify = createVuetify(vuetifyOptions);
|
|
10
10
|
nuxtApp.vueApp.use(vuetify);
|
|
11
11
|
nuxtApp.provide("vuetify", vuetify);
|
|
12
|
+
await nuxtApp.hooks.callHook("vuetify:ready", vuetify);
|
|
12
13
|
if (process.client) {
|
|
13
14
|
isDev && console.log("Vuetify 3 initialized", vuetify);
|
|
14
15
|
}
|
package/dist/types.d.ts
CHANGED
|
@@ -12,4 +12,4 @@ declare module 'nuxt/schema' {
|
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
|
|
15
|
-
export { ComponentName, Components, DateAdapter, DateOptions, DirectiveName, Directives, ExternalVuetifyOptions, FontAwesomeSvgIconSet, FontIconSet, IconFontName, IconSetName, IconsOptions, InlineModuleOptions, JSSVGIconSet, LabComponentName, LabComponents, MOptions, ModuleOptions, SSRClientHints, SSRClientHintsConfiguration, VOptions, VuetifyLocale, default } from './module'
|
|
15
|
+
export { ComponentName, Components, DateAdapter, DateOptions, DirectiveName, Directives, ExternalVuetifyOptions, FontAwesomeSvgIconSet, FontIconSet, IconFontName, IconSetName, IconsOptions, InlineModuleOptions, JSSVGIconSet, LabComponentName, LabComponents, MOptions, ModuleOptions, SSRClientHints, SSRClientHintsConfiguration, UnoCCSMdiIconSet, VOptions, VuetifyLocale, default } from './module'
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vuetify-nuxt-module",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.5.
|
|
5
|
-
"packageManager": "pnpm@8.
|
|
4
|
+
"version": "0.5.14",
|
|
5
|
+
"packageManager": "pnpm@8.9.0",
|
|
6
6
|
"description": "Zero-Config Nuxt Module for Vuetify",
|
|
7
7
|
"author": "userquin <userquin@gmail.com>",
|
|
8
8
|
"license": "MIT",
|