vuetify-nuxt-module 0.13.0 → 0.13.1

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 CHANGED
@@ -229,6 +229,7 @@ interface MOptions {
229
229
  * - `useLayout` -> `useVLayout`
230
230
  * - `useRtl` -> `useVRtl`
231
231
  * - `useTheme` -> `useVTheme`
232
+ * - `useGoTo` -> `useVGoTo`
232
233
  *
233
234
  * @default false
234
235
  */
package/dist/module.d.ts CHANGED
@@ -229,6 +229,7 @@ interface MOptions {
229
229
  * - `useLayout` -> `useVLayout`
230
230
  * - `useRtl` -> `useVRtl`
231
231
  * - `useTheme` -> `useVTheme`
232
+ * - `useGoTo` -> `useVGoTo`
232
233
  *
233
234
  * @default false
234
235
  */
package/dist/module.json CHANGED
@@ -5,5 +5,5 @@
5
5
  "nuxt": "^3.9.0",
6
6
  "bridge": false
7
7
  },
8
- "version": "0.13.0"
8
+ "version": "0.13.1"
9
9
  }
package/dist/module.mjs CHANGED
@@ -1,20 +1,20 @@
1
1
  import { addVitePlugin, addPluginTemplate, extendWebpackConfig, addImports, addPlugin, useLogger, defineNuxtModule, isNuxt3, getNuxtVersion, createResolver, hasNuxtModule } from '@nuxt/kit';
2
2
  import { isPackageExists, getPackageInfo } from 'local-pkg';
3
+ import { resolve, dirname, relative, extname } from 'node:path';
3
4
  import defu from 'defu';
4
5
  import { debounce } from 'perfect-debounce';
5
6
  import { existsSync, statSync } from 'node:fs';
6
- import { resolve, dirname, extname } from 'node:path';
7
7
  import process from 'node:process';
8
8
  import { createConfigLoader } from 'unconfig';
9
9
  import { readFile } from 'node:fs/promises';
10
10
  import { resolveVuetifyBase, normalizePath, generateImports } from '@vuetify/loader-shared';
11
- import { isAbsolute, join, relative } from 'pathe';
11
+ import { isAbsolute, join, relative as relative$1 } from 'pathe';
12
12
  import { pathToFileURL } from 'node:url';
13
13
  import { parseQuery, parseURL } from 'ufo';
14
14
  import destr from 'destr';
15
15
  import { transformAssetUrls } from 'vite-plugin-vuetify';
16
16
 
17
- const version = "0.13.0";
17
+ const version = "0.13.1";
18
18
 
19
19
  const VIRTUAL_VUETIFY_CONFIGURATION = "virtual:vuetify-configuration";
20
20
  const RESOLVED_VIRTUAL_VUETIFY_CONFIGURATION = `/@nuxt-vuetify-configuration/${VIRTUAL_VUETIFY_CONFIGURATION.slice("virtual:".length)}`;
@@ -469,6 +469,7 @@ function registerWatcher(options, nuxt, ctx) {
469
469
  if (nuxt.options.dev) {
470
470
  let pageReload;
471
471
  nuxt.hooks.hook("builder:watch", (_event, path) => {
472
+ path = relative(nuxt.options.srcDir, resolve(nuxt.options.srcDir, path));
472
473
  if (!pageReload && ctx.vuetifyFilesToWatch.includes(path))
473
474
  return nuxt.callHook("restart");
474
475
  });
@@ -499,8 +500,8 @@ function registerWatcher(options, nuxt, ctx) {
499
500
  }
500
501
 
501
502
  function isSubdir(root, test) {
502
- const relative$1 = relative(root, test);
503
- return relative$1 && !relative$1.startsWith("..") && !isAbsolute(relative$1);
503
+ const relative = relative$1(root, test);
504
+ return relative && !relative.startsWith("..") && !isAbsolute(relative);
504
505
  }
505
506
  function vuetifyStylesPlugin(options, _logger) {
506
507
  const vuetifyBase = resolveVuetifyBase();
@@ -531,7 +532,7 @@ function vuetifyStylesPlugin(options, _logger) {
531
532
  if (!resolution)
532
533
  return null;
533
534
  const target = resolution.id.replace(/\.css$/, ".sass");
534
- const file = relative(join(vuetifyBase, "lib"), target);
535
+ const file = relative$1(join(vuetifyBase, "lib"), target);
535
536
  const contents = `@use "${normalizePath(configFile)}"
536
537
  @use "${normalizePath(target)}"`;
537
538
  tempFiles.set(file, contents);
@@ -1261,6 +1262,8 @@ function configureNuxt(configKey, nuxt, ctx) {
1261
1262
  });
1262
1263
  if (importComposables) {
1263
1264
  const composables = ["useDate", "useLocale", "useDefaults", "useDisplay", "useLayout", "useRtl", "useTheme"];
1265
+ if (ctx.vuetify3_5)
1266
+ composables.push("useGoTo");
1264
1267
  addImports(composables.map((name) => ({
1265
1268
  name,
1266
1269
  from: ctx.vuetify3_4 || name !== "useDate" ? "vuetify" : "vuetify/labs/date",
@@ -1333,6 +1336,7 @@ const module = defineNuxtModule({
1333
1336
  const vuetifyPkg = await getPackageInfo("vuetify");
1334
1337
  const versions = vuetifyPkg?.version?.split(".").map((v) => Number.parseInt(v));
1335
1338
  const vuetify3_4 = versions && versions.length > 1 && (versions[0] > 3 || versions[0] === 3 && versions[1] >= 4);
1339
+ const vuetify3_5 = versions && versions.length > 1 && (versions[0] > 3 || versions[0] === 3 && versions[1] >= 5);
1336
1340
  const ctx = {
1337
1341
  logger,
1338
1342
  resolver: createResolver(import.meta.url),
@@ -1348,7 +1352,8 @@ const module = defineNuxtModule({
1348
1352
  ssrClientHints: void 0,
1349
1353
  componentsPromise: void 0,
1350
1354
  labComponentsPromise: void 0,
1351
- vuetify3_4
1355
+ vuetify3_4,
1356
+ vuetify3_5
1352
1357
  };
1353
1358
  await load(options, nuxt, ctx);
1354
1359
  configureNuxt(CONFIG_KEY, nuxt, ctx);
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "vuetify-nuxt-module",
3
3
  "type": "module",
4
- "version": "0.13.0",
5
- "packageManager": "pnpm@8.15.4",
4
+ "version": "0.13.1",
5
+ "packageManager": "pnpm@8.15.5",
6
6
  "description": "Zero-Config Nuxt Module for Vuetify",
7
7
  "author": "userquin <userquin@gmail.com>",
8
8
  "license": "MIT",
@@ -66,15 +66,15 @@
66
66
  },
67
67
  "dependencies": {
68
68
  "@nuxt/kit": "^3.9.0",
69
- "defu": "^6.1.3",
70
- "destr": "^2.0.2",
69
+ "defu": "^6.1.4",
70
+ "destr": "^2.0.3",
71
71
  "local-pkg": "^0.5.0",
72
- "pathe": "^1.1.1",
72
+ "pathe": "^1.1.2",
73
73
  "perfect-debounce": "^1.0.0",
74
- "ufo": "^1.3.2",
74
+ "ufo": "^1.5.3",
75
75
  "unconfig": "^0.3.11",
76
- "vite-plugin-vuetify": "^2.0.1",
77
- "vuetify": "^3.5.1"
76
+ "vite-plugin-vuetify": "^2.0.3",
77
+ "vuetify": "^3.5.12"
78
78
  },
79
79
  "devDependencies": {
80
80
  "@antfu/eslint-config": "^0.43.1",
@@ -103,8 +103,8 @@
103
103
  "sass": "^1.63.6",
104
104
  "typescript": "^5.3.3",
105
105
  "vite": "^5.0.12",
106
- "vitest": "^1.1.3",
107
- "vue-tsc": "^1.8.27"
106
+ "vitest": "^1.4.0",
107
+ "vue-tsc": "^2.0.7"
108
108
  },
109
109
  "pnpm": {
110
110
  "peerDependencyRules": {
@@ -114,7 +114,7 @@
114
114
  }
115
115
  },
116
116
  "resolutions": {
117
- "@nuxt/kit": "^3.10.2"
117
+ "@nuxt/kit": "3.11.1"
118
118
  },
119
119
  "build": {
120
120
  "externals": [