vuetify-nuxt-module 0.4.11 → 0.5.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/README.md CHANGED
@@ -33,6 +33,8 @@
33
33
  - 🛠️ **Versatile**: custom Vuetify [directives](https://vuetifyjs.com/en/getting-started/installation/#manual-steps) and [labs components](https://vuetifyjs.com/en/labs/introduction/) registration
34
34
  - ✨ **Configurable Styles**: configure your variables using [Vuetify SASS Variables](https://vuetifyjs.com/en/features/sass-variables/)
35
35
  - 💥 **SSR**: automatic SSR detection and configuration
36
+ - 🔩 **Nuxt Layers and Hooks**: load your Vuetify configuration using [Nuxt Layers](https://nuxt.com/docs/getting-started/layers#layers) or using a custom module via `vuetify:registerModule` [Nuxt Hook](https://nuxt.com/docs/guide/going-further/hooks#nuxt-hooks-build-time)
37
+ - 📥 **Vuetify Configuration File**: configure your Vuetify options using a custom `vuetify.config` file, no dev server restart needed
36
38
  - 🔥 **Pure CSS Icons**: no more font/js icons, use the new `unocss-mdi` icon set or build your own with UnoCSS Preset Icons
37
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
38
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
@@ -42,7 +44,6 @@
42
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
43
45
  - ⚙️ **Auto-Import Vuetify Composables**: you don't need to import Vuetify composables manually, they are automatically imported for you
44
46
  - 🎨 **Vuetify Blueprints**: use [Vuetify Blueprints](https://vuetifyjs.com/en/features/blueprints/) to quickly scaffold components
45
- - 🔩 **Nuxt Layers and Hooks**: load your Vuetify configuration using [Nuxt Layers](https://nuxt.com/docs/getting-started/layers#layers) or using a custom module via `vuetify:registerModule` [Nuxt Hook](https://nuxt.com/docs/guide/going-further/hooks#nuxt-hooks-build-time)
46
47
  - 👀 **Nuxt DevTools**: ready to inspect your Vuetify styles with the [Nuxt DevTools](https://github.com/nuxt/devtools) inspector
47
48
  - 🦾 **Type Strong**: written in [TypeScript](https://www.typescriptlang.org/)
48
49
 
@@ -8,6 +8,7 @@ declare module 'virtual:vuetify-configuration' {
8
8
  declare module 'virtual:vuetify-date-configuration' {
9
9
  import type { DateOptions } from 'vuetify';
10
10
 
11
+ export const enabled: boolean
11
12
  export const isDev: boolean
12
13
  export const i18n: boolean
13
14
  export const adapter: 'vuetify' | 'date-fns' | 'moment' | 'luxon' | 'dayjs' | 'js-joda' | 'date-fns-jalali' | 'jalaali' | 'hijri' | 'custom'
@@ -17,6 +18,7 @@ declare module 'virtual:vuetify-date-configuration' {
17
18
  declare module 'virtual:vuetify-icons-configuration' {
18
19
  import type { IconOptions } from 'vuetify'
19
20
 
21
+ export const enabled: boolean
20
22
  export const isDev: boolean
21
23
  export function iconsConfiguration(): IconOptions
22
24
  }
@@ -0,0 +1,3 @@
1
+ module.exports.defineVuetifyConfiguration = function(...args) {
2
+ return import('./custom-configuration.mjs').then(m => m.defineVuetifyConfiguration.call(this, ...args))
3
+ }
@@ -0,0 +1,3 @@
1
+ import { ExternalVuetifyOptions } from './dist/types';
2
+ declare function defineVuetifyConfiguration(vuetifyOptions: ExternalVuetifyOptions): ExternalVuetifyOptions;
3
+ export { defineVuetifyConfiguration };
@@ -0,0 +1,4 @@
1
+ function defineVuetifyConfiguration(vuetifyOptions) {
2
+ return vuetifyOptions;
3
+ }
4
+ export { /* #__PURE__ */ defineVuetifyConfiguration };
package/dist/module.d.ts CHANGED
@@ -200,15 +200,26 @@ interface ModuleOptions {
200
200
  moduleOptions?: MOptions;
201
201
  /**
202
202
  * Vuetify options.
203
+ *
204
+ * You can inline the configuration or specify a file path:
205
+ * `vuetifyOptions: './vuetify.options.ts'`
206
+ *
207
+ * The path should be relative to the root folder.
203
208
  */
204
- vuetifyOptions?: VOptions;
209
+ vuetifyOptions?: string | VOptions;
210
+ }
211
+ interface InlineModuleOptions extends Omit<ModuleOptions, 'vuetifyOptions'> {
212
+ vuetifyOptions: VOptions;
213
+ }
214
+ interface ExternalVuetifyOptions extends VOptions {
215
+ config?: boolean;
205
216
  }
206
217
  declare module '@nuxt/schema' {
207
218
  interface NuxtConfig {
208
219
  vuetify?: ModuleOptions;
209
220
  }
210
221
  interface NuxtHooks {
211
- 'vuetify:registerModule': (registerModule: (config: ModuleOptions) => void) => void;
222
+ 'vuetify:registerModule': (registerModule: (config: InlineModuleOptions) => void) => void;
212
223
  }
213
224
  }
214
225
  declare module '#app' {
@@ -229,4 +240,4 @@ declare module '#app' {
229
240
 
230
241
  declare const _default: _nuxt_schema.NuxtModule<ModuleOptions>;
231
242
 
232
- export { ComponentName, Components, DateAdapter, DateOptions, DirectiveName, Directives, FontAwesomeSvgIconSet, FontIconSet, IconFontName, IconSetName, IconsOptions, JSSVGIconSet, LabComponentName, LabComponents, MOptions, ModuleOptions, VOptions, VuetifyLocale, _default as default };
243
+ export { ComponentName, Components, DateAdapter, DateOptions, DirectiveName, Directives, ExternalVuetifyOptions, FontAwesomeSvgIconSet, FontIconSet, IconFontName, IconSetName, IconsOptions, InlineModuleOptions, JSSVGIconSet, LabComponentName, LabComponents, MOptions, ModuleOptions, VOptions, VuetifyLocale, _default as default };
package/dist/module.json CHANGED
@@ -4,5 +4,5 @@
4
4
  "compatibility": {
5
5
  "nuxt": "^3.0.0"
6
6
  },
7
- "version": "0.4.11"
7
+ "version": "0.5.0"
8
8
  }