@vizejs/nuxt 0.315.1 → 0.321.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.
@@ -66,6 +66,8 @@ interface VizeNuxtCompilerOptions {
66
66
  * directive (forwarded to the underlying Vize plugin). @default "vdom"
67
67
  */
68
68
  jsxMode?: "vdom" | "vapor";
69
+ /** JSX semantics; `"babel"` opts into @vue/babel-plugin-jsx compatibility. */
70
+ jsxCompat?: "native" | "babel";
69
71
  /** Treat lowercase non-HTML tags as custom renderer elements. */
70
72
  customRenderer?: boolean;
71
73
  /** Template syntax compatibility mode. */
package/dist/index.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import { _ as VizeNuxtLintCheckerOptions, b as VizeNuxtCompilerOptions, c as NuxtMuseaOptions, d as VizeNuxtDevOptions, f as VizeNuxtMajorVersion, h as VizeNuxtLintOptions, l as VizeNuxtBridgeOptions, m as VizeNuxtUnoCssOptions, n as NuxtLintConfigAddon, p as VizeNuxtOptions, u as VizeNuxtCompatibilityOptions, x as VizeNuxtVueVersion, y as VizeNuxtCompilerCompatibilityOptions } from "./addons-ecITHT3X.mjs";
1
+ import { _ as VizeNuxtLintCheckerOptions, b as VizeNuxtCompilerOptions, c as NuxtMuseaOptions, d as VizeNuxtDevOptions, f as VizeNuxtMajorVersion, h as VizeNuxtLintOptions, l as VizeNuxtBridgeOptions, m as VizeNuxtUnoCssOptions, n as NuxtLintConfigAddon, p as VizeNuxtOptions, u as VizeNuxtCompatibilityOptions, x as VizeNuxtVueVersion, y as VizeNuxtCompilerCompatibilityOptions } from "./addons-RJOwQHyO.mjs";
2
2
  import { MuseaOptions } from "@vizejs/vite-plugin-musea";
3
3
 
4
4
  //#region src/schema.d.ts
@@ -1,4 +1,4 @@
1
- import { _ as VizeNuxtLintCheckerOptions, a as ResolveNuxtLintConfigAddons, g as ResolvedVizeNuxtLintCheckerOptions, h as VizeNuxtLintOptions, i as NuxtLintImport, n as NuxtLintConfigAddon, o as VIZE_NUXT_LINT_CONFIG_ADDONS_HOOK, r as NuxtLintConfigAddonNuxt, s as setupNuxtLintConfigAddons, t as NuxtLintAwaitable, v as resolveNuxtLintCheckerOptions } from "../addons-ecITHT3X.mjs";
1
+ import { _ as VizeNuxtLintCheckerOptions, a as ResolveNuxtLintConfigAddons, g as ResolvedVizeNuxtLintCheckerOptions, h as VizeNuxtLintOptions, i as NuxtLintImport, n as NuxtLintConfigAddon, o as VIZE_NUXT_LINT_CONFIG_ADDONS_HOOK, r as NuxtLintConfigAddonNuxt, s as setupNuxtLintConfigAddons, t as NuxtLintAwaitable, v as resolveNuxtLintCheckerOptions } from "../addons-RJOwQHyO.mjs";
2
2
  import { NuxtLintConfigItem, NuxtLintDirNames, NuxtLintLayer, NuxtLintProjectState } from "@vizejs/nuxt-lint-config";
3
3
  export * from "@vizejs/nuxt-lint-config";
4
4
 
@@ -0,0 +1,57 @@
1
+ "use strict";
2
+
3
+ const moduleMeta = { name: "@vizejs/nuxt", configKey: "vize" };
4
+ const moduleDefaults = {
5
+ checker: false,
6
+ lint: true,
7
+ musea: false,
8
+ nuxtMusea: { route: { path: "/" } },
9
+ };
10
+
11
+ let modulePromise;
12
+
13
+ function loadNuxtModule() {
14
+ modulePromise ||= import("./index.mjs").then((loaded) => loaded.default);
15
+ return modulePromise;
16
+ }
17
+
18
+ function isPlainRecord(value) {
19
+ return value != null && typeof value === "object" && !Array.isArray(value);
20
+ }
21
+
22
+ function mergePlainRecords(...values) {
23
+ const result = {};
24
+
25
+ for (const value of values) {
26
+ if (!value) continue;
27
+ for (const [key, nextValue] of Object.entries(value)) {
28
+ const currentValue = result[key];
29
+ result[key] =
30
+ isPlainRecord(currentValue) && isPlainRecord(nextValue)
31
+ ? mergePlainRecords(currentValue, nextValue)
32
+ : nextValue;
33
+ }
34
+ }
35
+
36
+ return result;
37
+ }
38
+
39
+ function resolveModuleOptions(inlineOptions = {}, nuxt) {
40
+ return mergePlainRecords(moduleDefaults, nuxt?.options?.vize, inlineOptions);
41
+ }
42
+
43
+ const vizeNuxtModule = Object.assign(
44
+ async function vizeNuxtModule(inlineOptions = {}, nuxtArg) {
45
+ const loaded = await loadNuxtModule();
46
+ return loaded.call(this, inlineOptions, nuxtArg);
47
+ },
48
+ {
49
+ getMeta: () => moduleMeta,
50
+ getOptions: resolveModuleOptions,
51
+ meta: moduleMeta,
52
+ defaults: moduleDefaults,
53
+ },
54
+ );
55
+
56
+ module.exports = vizeNuxtModule;
57
+ module.exports.default = vizeNuxtModule;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vizejs/nuxt",
3
- "version": "0.315.1",
3
+ "version": "0.321.0",
4
4
  "description": "Nuxt module for Vize - compiler, musea gallery, linter, and type checker",
5
5
  "keywords": [
6
6
  "compiler",
@@ -28,12 +28,14 @@
28
28
  "dist"
29
29
  ],
30
30
  "type": "module",
31
- "main": "./dist/index.mjs",
31
+ "main": "./dist/nuxt2-entry.cjs",
32
+ "module": "./dist/index.mjs",
32
33
  "types": "./dist/index.d.mts",
33
34
  "exports": {
34
35
  ".": {
35
36
  "types": "./dist/index.d.mts",
36
37
  "import": "./dist/index.mjs",
38
+ "require": "./dist/nuxt2-entry.cjs",
37
39
  "default": "./dist/index.mjs"
38
40
  },
39
41
  "./lint": {
@@ -47,14 +49,15 @@
47
49
  },
48
50
  "dependencies": {
49
51
  "@nuxt/kit": "3.11.2",
50
- "@vizejs/native": "0.315.1",
51
- "@vizejs/nuxt-lint-config": "0.315.1",
52
- "@vizejs/vite-plugin": "0.315.1",
53
- "@vizejs/vite-plugin-musea": "0.315.1",
54
- "oxlint-plugin-vize": "0.315.1",
55
- "vize": "0.315.1"
52
+ "@vizejs/native": "0.321.0",
53
+ "@vizejs/nuxt-lint-config": "0.321.0",
54
+ "@vizejs/vite-plugin": "0.321.0",
55
+ "@vizejs/vite-plugin-musea": "0.321.0",
56
+ "oxlint-plugin-vize": "0.321.0",
57
+ "vize": "0.321.0"
56
58
  },
57
59
  "devDependencies": {
60
+ "jiti-nuxt2": "npm:jiti@1.21.7",
58
61
  "typescript": "6.0.3",
59
62
  "vite": "npm:@voidzero-dev/vite-plus-core@0.1.21",
60
63
  "vite-plus": "0.1.21",