vuetify-nuxt-module 0.4.9 β†’ 0.4.11

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
@@ -1,99 +1,100 @@
1
- <div align="center">
2
- <picture>
3
- <source media="(prefers-color-scheme: dark)" srcset="https://github.com/userquin/vuetify-nuxt-module/raw/main/hero-dark.svg" />
4
- <img alt="vuetify-nuxt-module - Zero-config Nuxt module for Vuetify" src='https://github.com/userquin/vuetify-nuxt-module/raw/main/hero.svg' alt="vuetify-nuxt-module - Zero-config Nuxt module for Vuetify"><br>
5
- </picture>
6
- <p>Zero-config Nuxt module for Vuetify</p>
7
- </div>
8
-
9
- <p align='center'>
10
- <a href='https://www.npmjs.com/package/vuetify-nuxt-module' target="__blank">
11
- <img src='https://img.shields.io/npm/v/vuetify-nuxt-module?color=33A6B8&label=' alt="NPM version">
12
- </a>
13
- <a href="https://www.npmjs.com/package/vuetify-nuxt-module" target="__blank">
14
- <img alt="NPM Downloads" src="https://img.shields.io/npm/dm/vuetify-nuxt-module?color=476582&label=">
15
- </a>
16
- <a href="https://vuetify-nuxt-module.netlify.app/" target="__blank">
17
- <img src="https://img.shields.io/static/v1?label=&message=docs%20%26%20guides&color=2e859c" alt="Docs & Guides">
18
- </a>
19
- <br>
20
- <a href="https://github.com/userquin/vuetify-nuxt-module" target="__blank">
21
- <img alt="GitHub stars" src="https://img.shields.io/github/stars/userquin/vuetify-nuxt-module?style=social">
22
- </a>
23
- </p>
24
-
25
- <br>
26
-
27
- ## πŸš€ Features
28
-
29
- - πŸ“– [**Documentation & guides**](https://vuetify-nuxt-module.netlify.app/)
30
- - πŸ‘Œ **Zero-Config**: sensible built-in default [Vuetify](https://vuetifyjs.com/) configuration for common use cases
31
- - πŸ”Œ **Extensible**: expose the ability to customize the Vuetify configuration via [Nuxt Plugin Hooks](https://nuxt.com/docs/guide/going-further/hooks#usage-with-plugins)
32
- - ⚑ **Fully Tree Shakable**: by default, only the needed Vuetify components are imported
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
- - ✨ **Configurable Styles**: configure your variables using [Vuetify SASS Variables](https://vuetifyjs.com/en/features/sass-variables/)
35
- - πŸ’₯ **SSR**: automatic SSR detection and configuration
36
- - πŸ”₯ **Pure CSS Icons**: no more font/js icons, use the new `unocss-mdi` icon set or build your own with UnoCSS Preset Icons
37
- - πŸ˜ƒ **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
- - 🎭 **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
39
- - πŸ“¦ **Multiple Icon Sets**: register [multiple icon sets](https://vuetifyjs.com/en/features/icon-fonts/#multiple-icon-sets)
40
- - 🌍 **I18n Ready**: install [@nuxtjs/i18n](https://v8.i18n.nuxtjs.org/) Nuxt module, and you're ready to use Vuetify [internationalization](https://vuetifyjs.com/en/features/internationalization/) features
41
- - πŸ“† **Date Components**: use Vuetify components [that require date functionality](https://vuetifyjs.com/en/features/dates/) installing and configuring one of the [@date-io](https://github.com/dmtrKovalenko/date-io#projects) adapters
42
- - βš™οΈ **Auto-Import Vuetify Composables**: you don't need to import Vuetify composables manually, they are automatically imported for you
43
- - 🎨 **Vuetify Blueprints**: use [Vuetify Blueprints](https://vuetifyjs.com/en/features/blueprints/) to quickly scaffold components
44
- - πŸ”© **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)
45
- - πŸ‘€ **Nuxt DevTools**: ready to inspect your Vuetify styles with the [Nuxt DevTools](https://github.com/nuxt/devtools) inspector
46
- - 🦾 **Type Strong**: written in [TypeScript](https://www.typescriptlang.org/)
47
-
48
- ## πŸ“¦ Install
49
-
50
- > Requires Vite, will not work with Webpack
51
-
52
- ```bash
53
- npm i vuetify-nuxt-module -D
54
-
55
- # yarn
56
- yarn add vuetify-nuxt-module -D
57
-
58
- # pnpm
59
- pnpm add vuetify-nuxt-module -D
60
- ```
61
-
62
- [![Open in StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/github/userquin/vuetify-nuxt-module)
63
-
64
- ## πŸ¦„ Usage
65
-
66
- > `vuetify-nuxt-module` is strongly opinionated and has a built-in default configuration out of the box. You can use it without any configuration, and it will work for most use cases.
67
-
68
- Add `vuetify-nuxt-module` module to `nuxt.config.ts` and configure it:
69
-
70
- ```ts
71
- // Nuxt config file
72
- import { defineNuxtConfig } from 'nuxt/config'
73
-
74
- export default defineNuxtConfig({
75
- modules: [
76
- 'vuetify-nuxt-module'
77
- ],
78
- vuetify: {
79
- moduleOptions: {
80
- /* module specific options */
81
- },
82
- vuetifyOptions: {
83
- /* vuetify options */
84
- }
85
- }
86
- })
87
- ```
88
-
89
- Read the [πŸ“– documentation](https://vuetify-nuxt-module.netlify.app/) for a complete guide on how to configure and use this module.
90
-
91
- ## πŸ‘€ Full config
92
-
93
- Check out the [types](https://github.com/userquin/vuetify-nuxt-module/blob/main/src/types.ts).
94
-
95
- The virtual modules can be found in [configuration.d.ts](https://github.com/userquin/vuetify-nuxt-module/blob/main/configuration.d.ts) file.
96
-
97
- ## πŸ“„ License
98
-
99
- [MIT](https://github.com/userquin/vuetify-nuxt-module/blob/main/LICENSE) License &copy; 2023-PRESENT [JoaquΓ­n SΓ‘nchez](https://github.com/userquin)
1
+ <div align="center">
2
+ <picture>
3
+ <source media="(prefers-color-scheme: dark)" srcset="https://github.com/userquin/vuetify-nuxt-module/raw/main/hero-dark.svg" />
4
+ <img alt="vuetify-nuxt-module - Zero-config Nuxt module for Vuetify" src='https://github.com/userquin/vuetify-nuxt-module/raw/main/hero.svg' alt="vuetify-nuxt-module - Zero-config Nuxt module for Vuetify"><br>
5
+ </picture>
6
+ <p>Zero-config Nuxt module for Vuetify</p>
7
+ </div>
8
+
9
+ <p align='center'>
10
+ <a href='https://www.npmjs.com/package/vuetify-nuxt-module' target="__blank">
11
+ <img src='https://img.shields.io/npm/v/vuetify-nuxt-module?color=33A6B8&label=' alt="NPM version">
12
+ </a>
13
+ <a href="https://www.npmjs.com/package/vuetify-nuxt-module" target="__blank">
14
+ <img alt="NPM Downloads" src="https://img.shields.io/npm/dm/vuetify-nuxt-module?color=476582&label=">
15
+ </a>
16
+ <a href="https://vuetify-nuxt-module.netlify.app/" target="__blank">
17
+ <img src="https://img.shields.io/static/v1?label=&message=docs%20%26%20guides&color=2e859c" alt="Docs & Guides">
18
+ </a>
19
+ <br>
20
+ <a href="https://github.com/userquin/vuetify-nuxt-module" target="__blank">
21
+ <img alt="GitHub stars" src="https://img.shields.io/github/stars/userquin/vuetify-nuxt-module?style=social">
22
+ </a>
23
+ </p>
24
+
25
+ <br>
26
+
27
+ ## πŸš€ Features
28
+
29
+ - πŸ“– [**Documentation & guides**](https://vuetify-nuxt-module.netlify.app/)
30
+ - πŸ‘Œ **Zero-Config**: sensible built-in default [Vuetify](https://vuetifyjs.com/) configuration for common use cases
31
+ - πŸ”Œ **Extensible**: expose the ability to customize the Vuetify configuration via [Nuxt Plugin Hooks](https://nuxt.com/docs/guide/going-further/hooks#usage-with-plugins)
32
+ - ⚑ **Fully Tree Shakable**: by default, only the needed Vuetify components are imported
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
+ - ✨ **Configurable Styles**: configure your variables using [Vuetify SASS Variables](https://vuetifyjs.com/en/features/sass-variables/)
35
+ - πŸ’₯ **SSR**: automatic SSR detection and configuration
36
+ - πŸ”₯ **Pure CSS Icons**: no more font/js icons, use the new `unocss-mdi` icon set or build your own with UnoCSS Preset Icons
37
+ - πŸ˜ƒ **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
+ - 🎭 **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
39
+ - πŸ“¦ **Multiple Icon Sets**: register [multiple icon sets](https://vuetifyjs.com/en/features/icon-fonts/#multiple-icon-sets)
40
+ - 🌍 **I18n Ready**: install [@nuxtjs/i18n](https://v8.i18n.nuxtjs.org/) Nuxt module, and you're ready to use Vuetify [internationalization](https://vuetifyjs.com/en/features/internationalization/) features
41
+ - πŸ“† **Date Components**: use Vuetify components [that require date functionality](https://vuetifyjs.com/en/features/dates/) installing and configuring one of the [@date-io](https://github.com/dmtrKovalenko/date-io#projects) adapters
42
+ - πŸ’¬ **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
+ - βš™οΈ **Auto-Import Vuetify Composables**: you don't need to import Vuetify composables manually, they are automatically imported for you
44
+ - 🎨 **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
+ - πŸ‘€ **Nuxt DevTools**: ready to inspect your Vuetify styles with the [Nuxt DevTools](https://github.com/nuxt/devtools) inspector
47
+ - 🦾 **Type Strong**: written in [TypeScript](https://www.typescriptlang.org/)
48
+
49
+ ## πŸ“¦ Install
50
+
51
+ > Requires Vite, will not work with Webpack
52
+
53
+ ```bash
54
+ npm i vuetify-nuxt-module -D
55
+
56
+ # yarn
57
+ yarn add vuetify-nuxt-module -D
58
+
59
+ # pnpm
60
+ pnpm add vuetify-nuxt-module -D
61
+ ```
62
+
63
+ [![Open in StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/github/userquin/vuetify-nuxt-module)
64
+
65
+ ## πŸ¦„ Usage
66
+
67
+ > `vuetify-nuxt-module` is strongly opinionated and has a built-in default configuration out of the box. You can use it without any configuration, and it will work for most use cases.
68
+
69
+ Add `vuetify-nuxt-module` module to `nuxt.config.ts` and configure it:
70
+
71
+ ```ts
72
+ // Nuxt config file
73
+ import { defineNuxtConfig } from 'nuxt/config'
74
+
75
+ export default defineNuxtConfig({
76
+ modules: [
77
+ 'vuetify-nuxt-module'
78
+ ],
79
+ vuetify: {
80
+ moduleOptions: {
81
+ /* module specific options */
82
+ },
83
+ vuetifyOptions: {
84
+ /* vuetify options */
85
+ }
86
+ }
87
+ })
88
+ ```
89
+
90
+ Read the [πŸ“– documentation](https://vuetify-nuxt-module.netlify.app/) for a complete guide on how to configure and use this module.
91
+
92
+ ## πŸ‘€ Full config
93
+
94
+ Check out the [types](https://github.com/userquin/vuetify-nuxt-module/blob/main/src/types.ts).
95
+
96
+ The virtual modules can be found in [configuration.d.ts](https://github.com/userquin/vuetify-nuxt-module/blob/main/configuration.d.ts) file.
97
+
98
+ ## πŸ“„ License
99
+
100
+ [MIT](https://github.com/userquin/vuetify-nuxt-module/blob/main/LICENSE) License &copy; 2023-PRESENT [JoaquΓ­n SΓ‘nchez](https://github.com/userquin)
package/dist/module.d.ts CHANGED
@@ -93,6 +93,15 @@ type LabComponentName = keyof typeof vuetify_labs_components;
93
93
  type LabComponents = boolean | LabComponentName | LabComponentName[];
94
94
  type VuetifyLocale = keyof typeof vuetify_locale;
95
95
  interface VOptions extends Partial<Omit<VuetifyOptions, 'ssr' | 'aliases' | 'components' | 'directives' | 'locale' | 'date' | 'icons'>> {
96
+ /**
97
+ * Configure the SSR options.
98
+ *
99
+ * This option is only used when SSR is enabled in your Nuxt configuration.
100
+ */
101
+ ssr?: {
102
+ clientWidth: number;
103
+ clientHeight?: number;
104
+ };
96
105
  aliases?: Record<string, ComponentName>;
97
106
  /**
98
107
  * Do you need to configure some global components?.
package/dist/module.json CHANGED
@@ -4,5 +4,5 @@
4
4
  "compatibility": {
5
5
  "nuxt": "^3.0.0"
6
6
  },
7
- "version": "0.4.9"
7
+ "version": "0.4.11"
8
8
  }
package/dist/module.mjs CHANGED
@@ -6,7 +6,7 @@ import { isAbsolute, join, relative } from 'pathe';
6
6
  import { normalizePath as normalizePath$1 } from 'vite';
7
7
  import { isPackageExists } from 'local-pkg';
8
8
 
9
- const version = "0.4.9";
9
+ const version = "0.4.11";
10
10
 
11
11
  function isSubdir(root, test) {
12
12
  const relative$1 = relative(root, test);
@@ -184,16 +184,19 @@ const RESOLVED_VIRTUAL_VUETIFY_DATE_CONFIGURATION = `/@nuxt-vuetify-configuratio
184
184
  const VIRTUAL_VUETIFY_ICONS_CONFIGURATION = "virtual:vuetify-icons-configuration";
185
185
  const RESOLVED_VIRTUAL_VUETIFY_ICONS_CONFIGURATION = `/@nuxt-vuetify-configuration/${VIRTUAL_VUETIFY_ICONS_CONFIGURATION.slice("virtual:".length)}`;
186
186
 
187
- function vuetifyConfigurationPlugin(isDev, i18n, directives, labComponents, vuetifyAppOptions, componentsPromise, labComponentsPromise, logger) {
187
+ function vuetifyConfigurationPlugin(isDev, isSSR, i18n, directives, labComponents, vuetifyAppOptions, componentsPromise, labComponentsPromise, logger) {
188
188
  const {
189
189
  directives: _directives,
190
190
  date: _date,
191
191
  icons: _icons,
192
192
  localeMessages,
193
193
  components,
194
+ ssr,
194
195
  aliases,
195
196
  ...newVuetifyOptions
196
197
  } = vuetifyAppOptions;
198
+ if (isSSR)
199
+ newVuetifyOptions.ssr = ssr ?? true;
197
200
  return {
198
201
  name: "vuetify:configuration:nuxt",
199
202
  enforce: "pre",
@@ -815,9 +818,7 @@ const module = defineNuxtModule({
815
818
  prefixComposables: false
816
819
  });
817
820
  const isSSR = nuxt.options.ssr;
818
- const vuetifyAppOptions = defu(vOptions, {
819
- ssr: isSSR
820
- });
821
+ const vuetifyAppOptions = defu(vOptions, {});
821
822
  cleanupBlueprint(vuetifyAppOptions);
822
823
  const { styles } = moduleOptions;
823
824
  const i18n = hasNuxtModule("@nuxtjs/i18n", nuxt);
@@ -869,23 +870,22 @@ const module = defineNuxtModule({
869
870
  });
870
871
  nuxt.hook("vite:extend", ({ config }) => checkVuetifyPlugins(config));
871
872
  nuxt.hook("prepare:types", ({ references }) => {
873
+ references.push({ types: "vuetify" });
872
874
  references.push({ types: "vuetify-nuxt-module/configuration" });
873
875
  });
874
876
  const {
875
- vuetifyBase,
876
877
  componentsPromise,
877
878
  labComponentsPromise
878
879
  } = resolveVuetifyComponents(resolver);
879
880
  nuxt.hook("components:extend", async (c) => {
880
881
  const components = await componentsPromise;
881
882
  Object.keys(components).forEach((component) => {
882
- const from = components[component].from;
883
883
  c.push({
884
884
  pascalName: component,
885
885
  kebabName: toKebabCase(component),
886
886
  export: component,
887
- filePath: `${resolver.resolve(vuetifyBase, `lib/${from}`)}`,
888
- shortPath: `vuetify/components/${from}`,
887
+ filePath: "vuetify/components",
888
+ shortPath: "vuetify/components",
889
889
  chunkName: toKebabCase(component),
890
890
  prefetch: false,
891
891
  preload: false,
@@ -915,6 +915,7 @@ const module = defineNuxtModule({
915
915
  viteInlineConfig.plugins.push(vuetifyStylesPlugin({ styles }, logger));
916
916
  viteInlineConfig.plugins.push(vuetifyConfigurationPlugin(
917
917
  nuxt.options.dev,
918
+ isSSR,
918
919
  i18n,
919
920
  directives,
920
921
  labComponents,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "vuetify-nuxt-module",
3
3
  "type": "module",
4
- "version": "0.4.9",
4
+ "version": "0.4.11",
5
5
  "packageManager": "pnpm@8.6.9",
6
6
  "description": "Zero-Config Nuxt Module for Vuetify",
7
7
  "author": "userquin <userquin@gmail.com>",