@vizejs/nuxt 0.236.0 → 0.238.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/dist/index.d.mts +19 -3
- package/dist/index.mjs +3 -3
- package/package.json +4 -5
package/dist/index.d.mts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { MuseaOptions, MuseaOptions as MuseaOptions$1 } from "@vizejs/vite-plugin-musea";
|
|
2
1
|
import * as _$nuxt_schema0 from "nuxt/schema";
|
|
3
|
-
import {
|
|
2
|
+
import { MuseaOptions, MuseaOptions as MuseaOptions$1 } from "@vizejs/vite-plugin-musea";
|
|
4
3
|
|
|
5
4
|
//#region src/compiler-options.d.ts
|
|
6
5
|
type VizeNuxtPattern = string | RegExp;
|
|
@@ -174,6 +173,23 @@ interface VizeNuxtDevOptions {
|
|
|
174
173
|
*/
|
|
175
174
|
stylesheetLinks?: boolean;
|
|
176
175
|
}
|
|
176
|
+
interface NuxtMuseaOptions {
|
|
177
|
+
route?: {
|
|
178
|
+
path?: string;
|
|
179
|
+
name?: string;
|
|
180
|
+
params?: Record<string, string>;
|
|
181
|
+
query?: Record<string, string>;
|
|
182
|
+
hash?: string;
|
|
183
|
+
fullPath?: string;
|
|
184
|
+
meta?: Record<string, unknown>;
|
|
185
|
+
};
|
|
186
|
+
runtimeConfig?: {
|
|
187
|
+
public?: Record<string, unknown>;
|
|
188
|
+
[key: string]: unknown;
|
|
189
|
+
};
|
|
190
|
+
fetchMocks?: Record<string, unknown>;
|
|
191
|
+
stateMocks?: Record<string, unknown>;
|
|
192
|
+
}
|
|
177
193
|
interface VizeNuxtOptions {
|
|
178
194
|
/**
|
|
179
195
|
* Host framework compatibility overrides.
|
|
@@ -219,7 +235,7 @@ interface VizeNuxtOptions {
|
|
|
219
235
|
* because they would intercept `#imports` resolution and break Nuxt's internals.
|
|
220
236
|
* Real Nuxt composables are available via Nuxt's own plugin pipeline.
|
|
221
237
|
*/
|
|
222
|
-
nuxtMusea?: NuxtMuseaOptions
|
|
238
|
+
nuxtMusea?: NuxtMuseaOptions;
|
|
223
239
|
}
|
|
224
240
|
//#endregion
|
|
225
241
|
//#region src/index.d.ts
|
package/dist/index.mjs
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import { createRequire } from "node:module";
|
|
2
2
|
import { addServerPlugin, addVitePlugin, createResolver, defineNuxtModule, getNuxtVersion, isNuxt2 } from "@nuxt/kit";
|
|
3
|
-
import vize from "@vizejs/vite-plugin";
|
|
4
|
-
import { musea } from "@vizejs/vite-plugin-musea";
|
|
5
3
|
import fs from "node:fs";
|
|
6
4
|
import path from "node:path";
|
|
7
5
|
import { createHash } from "node:crypto";
|
|
@@ -851,7 +849,7 @@ var src_default = defineNuxtModule({
|
|
|
851
849
|
musea: false,
|
|
852
850
|
nuxtMusea: { route: { path: "/" } }
|
|
853
851
|
},
|
|
854
|
-
setup(options, nuxt) {
|
|
852
|
+
async setup(options, nuxt) {
|
|
855
853
|
const resolver = createResolver(import.meta.url);
|
|
856
854
|
const detectedNuxtMajor = options.compatibility?.nuxtVersion ?? getDetectedNuxtMajor(nuxt) ?? 3;
|
|
857
855
|
const vueVersion = options.compatibility?.vueVersion ?? (detectedNuxtMajor === 2 ? 2 : 3);
|
|
@@ -870,6 +868,7 @@ var src_default = defineNuxtModule({
|
|
|
870
868
|
});
|
|
871
869
|
const usesVizeCompiler = shouldUseVizeCompiler(compilerOptions);
|
|
872
870
|
if (compilerOptions !== false) {
|
|
871
|
+
const { default: vize } = await import("@vizejs/vite-plugin");
|
|
873
872
|
nuxt.options.vite ||= {};
|
|
874
873
|
nuxt.options.vite.plugins = nuxt.options.vite.plugins || [];
|
|
875
874
|
nuxt.options.vite.plugins.push(vize(compilerOptions));
|
|
@@ -992,6 +991,7 @@ var src_default = defineNuxtModule({
|
|
|
992
991
|
}
|
|
993
992
|
});
|
|
994
993
|
if (museaOptions !== false && supportsViteCompiler) {
|
|
994
|
+
const { musea } = await import("@vizejs/vite-plugin-musea");
|
|
995
995
|
const museaBasePath = "basePath" in museaOptions ? museaOptions.basePath : "/__musea__";
|
|
996
996
|
nuxt.options.vite ||= {};
|
|
997
997
|
nuxt.options.vite.plugins = nuxt.options.vite.plugins || [];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vizejs/nuxt",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.238.0",
|
|
4
4
|
"description": "Nuxt module for Vize - compiler, musea gallery, linter, and type checker",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"compiler",
|
|
@@ -42,10 +42,9 @@
|
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
44
|
"@nuxt/kit": "4.4.8",
|
|
45
|
-
"@vizejs/
|
|
46
|
-
"@vizejs/vite-plugin": "0.
|
|
47
|
-
"
|
|
48
|
-
"vize": "0.236.0"
|
|
45
|
+
"@vizejs/vite-plugin": "0.238.0",
|
|
46
|
+
"@vizejs/vite-plugin-musea": "0.238.0",
|
|
47
|
+
"vize": "0.238.0"
|
|
49
48
|
},
|
|
50
49
|
"devDependencies": {
|
|
51
50
|
"typescript": "6.0.3",
|