vue-jsx 3.3.0-beta.0 → 3.3.0-rc.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/README.md CHANGED
@@ -6,106 +6,107 @@ High-performance Vue JSX Compiler powered by Oxc.
6
6
 
7
7
  ## Features
8
8
 
9
- - ⚡️ High Performance: The same compiler principles as Vue.
10
- - 💨 Vapor Mode: The same compiler principles as Vue Vapor.
11
- - 🦀 Rust Compiler: Powered by Oxc, 35× faster (Virtual DOM) and 50× faster (Vapor) than Babel.
12
- - 🦾 Type Safe: Native type support for Typescript 7.0.
13
- - ✨ Unplugin: Provide `vite`, `rollup`, `rolldown` `webpack`, `rspack`, `rsbuild` , `esbuild`, `bun` and more plugins.
14
- - 📦 Custom Element: Support custom-element by default.
9
+ - ⚡️ High Performance: Brings Vue compiler optimizations to JSX for efficient runtime code.
10
+ - 💨 Vapor Mode: Compiles JSX for Vapor Mode with fine-grained reactive updates.
11
+ - 🦀 Rust Compiler: Powered by Oxc, 30× faster for Virtual DOM and 50× faster for Vapor than Babel.
12
+ - 🦾 Type Safe: Native TypeScript 7.0 support with automatic inference for JSX component props, refs, and children.
13
+ - ✨ Unplugin: Integrates with Vite, Rollup, Rolldown, webpack, Rspack, Rsbuild, esbuild, Bun, and more.
14
+ - 📦 Custom Element: Supports using and defining Custom Elements out of the box.
15
15
 
16
16
  ## Installation
17
17
 
18
18
  ```bash
19
- npm i vue-jsx
19
+ pnpm add vue-jsx
20
20
  ```
21
21
 
22
- ## Usage
23
-
24
- - [📜 Documentation](https://vuejsx.dev/)
25
- - [🛰️ Playground](https://repl.vuejsx.dev)
26
-
27
- <details>
28
- <summary>Vite</summary><br>
22
+ ## Vite
29
23
 
30
24
  ```ts
31
- // vite.config.ts
32
- import VueJsx from 'vue-jsx/vite'
25
+ import { defineConfig } from 'vite'
26
+ import vueJsx from 'vue-jsx/vite'
33
27
 
34
28
  export default defineConfig({
35
- plugins: [VueJsx()],
29
+ plugins: [vueJsx()],
36
30
  })
37
31
  ```
38
32
 
39
- Example: [`playground/`](./playground/)
40
-
41
- <br></details>
42
-
43
- <details>
44
- <summary>Rollup</summary><br>
45
-
46
- ```ts
47
- // rollup.config.js
48
- import VueJsx from 'vue-jsx/rollup'
33
+ Add the JSX runtime to TypeScript:
49
34
 
50
- export default {
51
- plugins: [VueJsx()],
35
+ ```json
36
+ {
37
+ "compilerOptions": {
38
+ "jsx": "preserve",
39
+ "jsxImportSource": "vue-jsx"
40
+ }
52
41
  }
53
42
  ```
54
43
 
55
- <br></details>
56
-
57
- <details>
58
- <summary>Webpack</summary><br>
44
+ `jsxImportSource` is required: there is no global `JSX` namespace, so classic
45
+ JSX mode without `jsxImportSource` won't be type-checked. In a mixed
46
+ React/Vue codebase that shares one `tsconfig`, use a per-file pragma instead:
59
47
 
60
- ```ts
61
- // webpack.config.js
62
- module.exports = {
63
- /* ... */
64
- plugins: [require('vue-jsx/webpack')()],
65
- }
48
+ ```tsx
49
+ /** @jsxImportSource vue-jsx */
66
50
  ```
67
51
 
68
- <br></details>
69
-
70
- <details>
71
- <summary>Nuxt</summary><br>
52
+ In type positions, import the `JSX` namespace explicitly instead of relying on
53
+ a global:
72
54
 
73
55
  ```ts
74
- // nuxt.config.js
75
- export default defineNuxtConfig({
76
- modules: ['vue-jsx/nuxt'],
77
- })
56
+ import type { JSX } from 'vue-jsx'
78
57
  ```
79
58
 
80
- > This module works for both Nuxt 2 and [Nuxt Vite](https://github.com/nuxt/vite)
59
+ If you prefer to keep a global `JSX` namespace, write your own `global.d.ts`:
81
60
 
82
- <br></details>
61
+ ```ts
62
+ import type { JSX as VueJSX } from 'vue-jsx'
63
+
64
+ declare global {
65
+ namespace JSX {
66
+ type Element = VueJSX.Element
67
+ type ElementChildrenAttribute = VueJSX.ElementChildrenAttribute
68
+ type IntrinsicElements = VueJSX.IntrinsicElements
69
+ type IntrinsicAttributes = VueJSX.IntrinsicAttributes
70
+ type LibraryManagedAttributes<Component, Props> = VueJSX.LibraryManagedAttributes<
71
+ Component,
72
+ Props
73
+ >
74
+ }
75
+ }
76
+ ```
83
77
 
84
- <details>
85
- <summary>Vue CLI</summary><br>
78
+ To extend the JSX types, augment the module named in `jsxImportSource` from a
79
+ module file (one with a top-level `import` or `export`):
86
80
 
87
81
  ```ts
88
- // vue.config.js
89
- module.exports = {
90
- configureWebpack: {
91
- plugins: [require('vue-jsx/webpack')()],
92
- },
82
+ export {}
83
+
84
+ declare module 'vue-jsx' {
85
+ namespace JSX {
86
+ interface IntrinsicElements {
87
+ 'user-card': { name: string }
88
+ }
89
+ }
93
90
  }
94
91
  ```
95
92
 
96
- <br></details>
97
-
98
- <details>
99
- <summary>esbuild</summary><br>
93
+ ## Vapor Mode
100
94
 
101
95
  ```ts
102
- // esbuild.config.js
103
- import { build } from 'esbuild'
104
- import VueJsx from 'vue-jsx/esbuild'
105
-
106
- build({
107
- plugins: [VueJsx()],
96
+ vueJsx({
97
+ vapor: true,
108
98
  })
109
99
  ```
110
100
 
111
- <br></details>
101
+ When `vapor` is omitted or `false`, regular `.tsx` and `.jsx` files compile to
102
+ Vue Virtual DOM. You can still opt individual components or files into Vapor by
103
+ using `defineVaporComponent`, `defineVaporCustomElement`, `.vapor.tsx`, or
104
+ `.vapor.jsx`.
105
+
106
+ ## Integrations
107
+
108
+ The package also exports plugins for Rollup, Rolldown, webpack, Rspack,
109
+ Rsbuild, esbuild, Bun, Nuxt, and Astro.
110
+
111
+ - [Documentation](https://vuejsx.dev/)
112
+ - [Playground](https://repl.vuejsx.dev/)
package/dist/api.d.ts CHANGED
@@ -1,7 +1,5 @@
1
- import * as _$_vue_jsx_compiler0 from "@vue-jsx/compiler";
2
1
  import { CompilerOptions } from "@vue-jsx/compiler";
3
-
4
2
  //#region src/core/index.d.ts
5
- declare function transformVueJsx(code: string, id: string, options?: CompilerOptions): _$_vue_jsx_compiler0.TransformReturn;
3
+ export declare function transformVueJsx(code: string, id: string, options?: CompilerOptions): import("@vue-jsx/compiler").TransformReturn;
6
4
  //#endregion
7
- export { type CompilerOptions, transformVueJsx };
5
+ export type { CompilerOptions };
package/dist/api.js CHANGED
@@ -1,2 +1,2 @@
1
- import { t as transformVueJsx } from "./core-D6A0aY-g.js";
1
+ import { t as transformVueJsx } from "./core-BgVvweAb.js";
2
2
  export { transformVueJsx };
package/dist/astro.d.ts CHANGED
@@ -1,7 +1,6 @@
1
- import { t as Options } from "./options-DHzozgGn.js";
2
-
1
+ import { t as Options } from "./options-DO20LLvf.js";
3
2
  //#region src/astro.d.ts
4
- declare const _default: (options: Options) => {
3
+ declare function _default(options: Options): {
5
4
  name: string;
6
5
  hooks: {
7
6
  'astro:config:setup': (astro: any) => void;
package/dist/bun.d.ts CHANGED
@@ -1,5 +1,4 @@
1
- import { t as Options } from "./options-DHzozgGn.js";
2
-
1
+ import { t as Options } from "./options-DO20LLvf.js";
3
2
  //#region src/bun.d.ts
4
3
  declare const _default: (options?: Options | undefined) => BunPlugin;
5
4
  //#endregion
@@ -1,10 +1,11 @@
1
1
  import { transform } from "@vue-jsx/compiler";
2
2
  //#region src/core/index.ts
3
3
  function transformVueJsx(code, id, options) {
4
+ const vapor = new URLSearchParams(id).has("vapor");
4
5
  return transform(code, {
5
6
  filename: id,
6
- interop: new URLSearchParams(id).get("vapor") ? false : options?.interop,
7
- ...options
7
+ ...options,
8
+ vapor: vapor || options?.vapor
8
9
  });
9
10
  }
10
11
  //#endregion
package/dist/esbuild.d.ts CHANGED
@@ -1,7 +1,5 @@
1
- import { t as Options } from "./options-DHzozgGn.js";
2
- import * as _$unplugin from "unplugin";
3
-
1
+ import { t as Options } from "./options-DO20LLvf.js";
4
2
  //#region src/esbuild.d.ts
5
- declare const _default: (options?: Options | undefined) => _$unplugin.EsbuildPlugin;
3
+ declare const _default: (options?: Options | undefined) => import("unplugin").EsbuildPlugin;
6
4
  //#endregion
7
5
  export { _default as default };
package/dist/nuxt.d.ts CHANGED
@@ -1,8 +1,7 @@
1
- import { t as Options } from "./options-DHzozgGn.js";
2
- import * as _$_nuxt_schema0 from "@nuxt/schema";
3
-
1
+ import { t as Options } from "./options-DO20LLvf.js";
2
+ import "@nuxt/schema";
4
3
  //#region src/nuxt.d.ts
5
- interface ModuleOptions extends Options {}
6
- declare const _default: _$_nuxt_schema0.NuxtModule<ModuleOptions, ModuleOptions, false>;
4
+ export interface ModuleOptions extends Options {}
5
+ declare const _default: import("@nuxt/schema").NuxtModule<ModuleOptions, ModuleOptions, false>;
7
6
  //#endregion
8
- export { ModuleOptions, _default as default };
7
+ export { _default as default };
package/dist/nuxt.js CHANGED
@@ -5,8 +5,8 @@ import "@nuxt/schema";
5
5
  //#region src/nuxt.ts
6
6
  var nuxt_default = defineNuxtModule({
7
7
  meta: {
8
- name: "nuxt-vue-jsx",
9
- configKey: "vue-jsx"
8
+ name: "vue-jsx",
9
+ configKey: "vueJsx"
10
10
  },
11
11
  setup(options) {
12
12
  addVitePlugin(() => vite_default(options));
@@ -1,17 +1,16 @@
1
1
  import { CompilerOptions } from "@vue-jsx/compiler";
2
2
  import { FilterPattern } from "unplugin";
3
3
  import { Options } from "@vue-jsx/macros";
4
-
5
4
  //#region src/options.d.ts
6
5
  interface Options$1 extends CompilerOptions {
7
6
  // define your plugin options here
8
7
  include?: FilterPattern;
9
8
  exclude?: FilterPattern;
10
9
  /**
11
- * @default true
10
+ * @default false
12
11
  * By default, only JSX elements inside `defineVaporComponent` / `defineVaporCustomElement`,
13
- * or in files ending with `.vapor.jsx` / `.vapor.tsx` (e.g., `Comp.vapor.tsx`), will be compiled to Vapor DOM.
14
- * Set this to `true` if you want all JSX elements to be compiled to Vapor DOM.
12
+ * or in files ending with `.vapor.jsx` / `.vapor.tsx` (e.g., `Comp.vapor.tsx`), will be compiled for Vapor Mode.
13
+ * Set this to `true` if you want all JSX elements to be compiled for Vapor Mode.
15
14
  */
16
15
  vapor?: boolean;
17
16
  /** @default true */
package/dist/raw.d.ts CHANGED
@@ -1,6 +1,5 @@
1
- import { t as Options } from "./options-DHzozgGn.js";
1
+ import { t as Options } from "./options-DO20LLvf.js";
2
2
  import { UnpluginOptions } from "unplugin";
3
-
4
3
  //#region src/raw.d.ts
5
4
  declare const plugin: (options?: Options) => UnpluginOptions[];
6
5
  //#endregion
package/dist/raw.js CHANGED
@@ -1,14 +1,12 @@
1
- import { t as transformVueJsx } from "./core-D6A0aY-g.js";
1
+ import { t as transformVueJsx } from "./core-BgVvweAb.js";
2
2
  import macros from "@vue-jsx/macros/raw";
3
3
  import { propsHelperCode, propsHelperId, ssrHelperCode, ssrHelperId, vaporHelperCode, vaporHelperId, vdomHelperCode, vdomHelperId } from "@vue-jsx/runtime/raw";
4
- import { relative } from "pathe";
5
- import { normalizePath } from "unplugin-utils";
6
4
  //#region src/raw.ts
7
5
  const plugin = (options = {}) => {
8
6
  let root = "";
9
7
  let hmr = false;
10
8
  let sourceMap = false;
11
- const helperId = /^\/vue-jsx-vapor\//;
9
+ const helperId = /^\/vue-jsx\//;
12
10
  return [...options.macros === false ? [] : options.macros ? macros(options.macros === true ? void 0 : options.macros) : [], {
13
11
  enforce: "pre",
14
12
  name: "vue-jsx",
@@ -45,11 +43,11 @@ const plugin = (options = {}) => {
45
43
  exclude: options?.exclude || /node_modules/
46
44
  } },
47
45
  handler(code, id, { ssr } = {}) {
48
- const result = transformVueJsx(code, ssr ? normalizePath(relative(root, id)) : id, {
46
+ const result = transformVueJsx(code, id, {
49
47
  hmr,
50
48
  sourceMap,
51
49
  ssr,
52
- interop: !options.vapor,
50
+ root,
53
51
  ...options
54
52
  });
55
53
  if (result?.code) return {
@@ -1,7 +1,5 @@
1
- import { t as Options } from "./options-DHzozgGn.js";
2
- import * as _$rollup from "rollup";
3
-
1
+ import { t as Options } from "./options-DO20LLvf.js";
4
2
  //#region src/rolldown.d.ts
5
- declare const _default: (options?: Options | undefined) => _$rollup.Plugin<any>[] | _$rollup.Plugin<any>;
3
+ declare const _default: (options?: Options | undefined) => import("rollup").Plugin<any>[] | import("rollup").Plugin<any>;
6
4
  //#endregion
7
5
  export { _default as default };
package/dist/rollup.d.ts CHANGED
@@ -1,7 +1,5 @@
1
- import { t as Options } from "./options-DHzozgGn.js";
2
- import * as _$rollup from "rollup";
3
-
1
+ import { t as Options } from "./options-DO20LLvf.js";
4
2
  //#region src/rollup.d.ts
5
- declare const _default: (options?: Options | undefined) => _$rollup.Plugin<any>[];
3
+ declare const _default: (options?: Options | undefined) => import("rollup").Plugin<any>[];
6
4
  //#endregion
7
5
  export { _default as default };
package/dist/rsbuild.d.ts CHANGED
@@ -1,7 +1,6 @@
1
- import { t as Options } from "./options-DHzozgGn.js";
2
-
1
+ import { t as Options } from "./options-DO20LLvf.js";
3
2
  //#region src/rsbuild.d.ts
4
- declare const _default: (options?: Options) => {
3
+ declare function _default(options?: Options): {
5
4
  name: string;
6
5
  setup(api: any): void;
7
6
  };
package/dist/rspack.d.ts CHANGED
@@ -1,5 +1,4 @@
1
- import { t as Options } from "./options-DHzozgGn.js";
2
-
1
+ import { t as Options } from "./options-DO20LLvf.js";
3
2
  //#region src/rspack.d.ts
4
3
  declare const _default: (options?: Options | undefined) => RspackPluginInstance;
5
4
  //#endregion
@@ -1,9 +1,7 @@
1
- import { t as Options } from "./options-DHzozgGn.js";
2
- import * as _$unplugin from "unplugin";
1
+ import { t as Options } from "./options-DO20LLvf.js";
3
2
  import { UnpluginFactory } from "unplugin";
4
-
5
3
  //#region src/unplugin.d.ts
6
- declare const unpluginFactory: UnpluginFactory<Options | undefined, true>;
7
- declare const unplugin: _$unplugin.UnpluginInstance<Options | undefined, true>;
4
+ export declare const unpluginFactory: UnpluginFactory<Options | undefined, true>;
5
+ export declare const unplugin: import("unplugin").UnpluginInstance<Options | undefined, true>;
8
6
  //#endregion
9
- export { type Options, unplugin as default, unplugin, unpluginFactory };
7
+ export { type Options, unplugin as default };
package/dist/unplugin.js CHANGED
@@ -4,6 +4,6 @@ import { createUnplugin } from "unplugin";
4
4
  const unpluginFactory = (options = {}) => {
5
5
  return plugin(options);
6
6
  };
7
- const unplugin = /* @__PURE__ */ createUnplugin(unpluginFactory);
7
+ const unplugin = /* #__PURE__ */ createUnplugin(unpluginFactory);
8
8
  //#endregion
9
9
  export { unplugin as default, unplugin, unpluginFactory };
package/dist/vite.d.ts CHANGED
@@ -1,7 +1,5 @@
1
- import { t as Options } from "./options-DHzozgGn.js";
2
- import * as _$vite from "vite";
3
-
1
+ import { t as Options } from "./options-DO20LLvf.js";
4
2
  //#region src/vite.d.ts
5
- declare const _default: (options?: Options | undefined) => _$vite.Plugin<any>[];
3
+ declare const _default: (options?: Options | undefined) => import("vite").Plugin<any>[];
6
4
  //#endregion
7
5
  export { _default as default };
package/dist/volar.d.ts CHANGED
@@ -1,6 +1,5 @@
1
- import { t as Options } from "./options-DHzozgGn.js";
2
- import { PluginReturn } from "ts-macro";
3
-
1
+ import { t as Options } from "./options-DO20LLvf.js";
2
+ import { PluginReturn } from "@vue-jsx/macros/volar";
4
3
  //#region src/volar.d.ts
5
4
  declare const plugin: PluginReturn<Options | undefined, true>;
6
5
  //#endregion
package/dist/volar.js CHANGED
@@ -1,7 +1,412 @@
1
- import jsxMacros from "@vue-jsx/macros/volar";
2
- import { allCodeFeatures, createPlugin } from "ts-macro";
3
- import { isHTMLTag, isSVGTag } from "@vue/shared";
4
- //#region ../../node_modules/.pnpm/@vue-macros+volar@3.1.4_patch_hash=79e6492c51b3afca57b92023dd1aae9ddd57140efa1cf2cdf74d_acc5ae0987bad0943555f2f9fe5e1571/node_modules/@vue-macros/volar/dist/jsx-directive-w2gUTWdx.js
1
+ import jsxMacros, { createPlugin } from "@vue-jsx/macros/volar";
2
+ //#region \0rolldown/runtime.js
3
+ var __create = Object.create;
4
+ var __defProp = Object.defineProperty;
5
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
+ var __getOwnPropNames = Object.getOwnPropertyNames;
7
+ var __getProtoOf = Object.getPrototypeOf;
8
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
9
+ var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod), cb = null), mod.exports);
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
12
+ key = keys[i];
13
+ if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
14
+ get: ((k) => from[k]).bind(null, key),
15
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
16
+ });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule || !__hasOwnProp.call(mod, "default") ? __defProp(target, "default", {
21
+ value: mod,
22
+ enumerable: true
23
+ }) : target, mod));
24
+ //#endregion
25
+ //#region ../../node_modules/.pnpm/muggle-string@0.4.1/node_modules/muggle-string/out/binarySearch.js
26
+ var require_binarySearch = /* @__PURE__ */ __commonJSMin(((exports) => {
27
+ Object.defineProperty(exports, "__esModule", { value: true });
28
+ exports.binarySearch = void 0;
29
+ function binarySearch(offsets, start) {
30
+ let low = 0;
31
+ let high = offsets.length - 1;
32
+ while (low <= high) {
33
+ const mid = Math.floor((low + high) / 2);
34
+ const midValue = offsets[mid];
35
+ if (midValue < start) low = mid + 1;
36
+ else if (midValue > start) high = mid - 1;
37
+ else {
38
+ low = mid;
39
+ high = mid;
40
+ break;
41
+ }
42
+ }
43
+ return Math.max(Math.min(low, high, offsets.length - 1), 0);
44
+ }
45
+ exports.binarySearch = binarySearch;
46
+ }));
47
+ //#endregion
48
+ //#region ../../node_modules/.pnpm/muggle-string@0.4.1/node_modules/muggle-string/out/track.js
49
+ var require_track = /* @__PURE__ */ __commonJSMin(((exports) => {
50
+ Object.defineProperty(exports, "__esModule", { value: true });
51
+ exports.getStack = exports.track = exports.resetOffsetStack = exports.offsetStack = exports.setTracking = void 0;
52
+ let tracking = true;
53
+ let stackOffset = 0;
54
+ function setTracking(value) {
55
+ tracking = value;
56
+ }
57
+ exports.setTracking = setTracking;
58
+ function offsetStack() {
59
+ stackOffset++;
60
+ }
61
+ exports.offsetStack = offsetStack;
62
+ function resetOffsetStack() {
63
+ stackOffset--;
64
+ }
65
+ exports.resetOffsetStack = resetOffsetStack;
66
+ function track(segments, stacks = []) {
67
+ return [new Proxy(segments, { get(target, prop, receiver) {
68
+ if (tracking) {
69
+ if (prop === "push") return push;
70
+ if (prop === "pop") return pop;
71
+ if (prop === "shift") return shift;
72
+ if (prop === "unshift") return unshift;
73
+ if (prop === "splice") return splice;
74
+ if (prop === "sort") return sort;
75
+ if (prop === "reverse") return reverse;
76
+ }
77
+ return Reflect.get(target, prop, receiver);
78
+ } }), stacks];
79
+ function push(...items) {
80
+ stacks.push({
81
+ stack: getStack(),
82
+ length: items.length
83
+ });
84
+ return segments.push(...items);
85
+ }
86
+ function pop() {
87
+ if (stacks.length) {
88
+ const last = stacks[stacks.length - 1];
89
+ if (last.length > 1) last.length--;
90
+ else stacks.pop();
91
+ }
92
+ return segments.pop();
93
+ }
94
+ function shift() {
95
+ if (stacks.length) {
96
+ const first = stacks[0];
97
+ if (first.length > 1) first.length--;
98
+ else stacks.shift();
99
+ }
100
+ return segments.shift();
101
+ }
102
+ function unshift(...items) {
103
+ stacks.unshift({
104
+ stack: getStack(),
105
+ length: items.length
106
+ });
107
+ return segments.unshift(...items);
108
+ }
109
+ function splice(start, deleteCount, ...items) {
110
+ if (deleteCount === void 0) deleteCount = segments.length - start;
111
+ let _stackStart = 0;
112
+ let operateIndex;
113
+ for (let i = 0; i < stacks.length; i++) {
114
+ const stack = stacks[i];
115
+ const stackStart = _stackStart;
116
+ _stackStart = stackStart + stack.length;
117
+ if (start >= stackStart) {
118
+ operateIndex = i + 1;
119
+ const originalLength = stack.length;
120
+ stack.length = start - stackStart;
121
+ stacks.splice(operateIndex, 0, {
122
+ stack: stack.stack,
123
+ length: originalLength - stack.length
124
+ });
125
+ break;
126
+ }
127
+ }
128
+ if (operateIndex === void 0) throw new Error("Invalid splice operation");
129
+ let _deleteCount = deleteCount;
130
+ for (let i = operateIndex; i < stacks.length; i++) {
131
+ const stack = stacks[i];
132
+ while (_deleteCount > 0 && stack.length > 0) {
133
+ stack.length--;
134
+ _deleteCount--;
135
+ }
136
+ if (_deleteCount === 0) break;
137
+ }
138
+ stacks.splice(operateIndex, 0, {
139
+ stack: getStack(),
140
+ length: items.length
141
+ });
142
+ return segments.splice(start, deleteCount, ...items);
143
+ }
144
+ function sort(compareFn) {
145
+ stacks.splice(0, stacks.length, {
146
+ stack: getStack(),
147
+ length: segments.length
148
+ });
149
+ return segments.sort(compareFn);
150
+ }
151
+ function reverse() {
152
+ stacks.splice(0, stacks.length, {
153
+ stack: getStack(),
154
+ length: segments.length
155
+ });
156
+ return segments.reverse();
157
+ }
158
+ }
159
+ exports.track = track;
160
+ function getStack() {
161
+ let source = (/* @__PURE__ */ new Error()).stack.split("\n")[3 + stackOffset].trim();
162
+ if (source.endsWith(")")) source = source.slice(source.lastIndexOf("(") + 1, -1);
163
+ else source = source.slice(source.lastIndexOf(" ") + 1);
164
+ return source;
165
+ }
166
+ exports.getStack = getStack;
167
+ }));
168
+ //#endregion
169
+ //#region ../../node_modules/.pnpm/muggle-string@0.4.1/node_modules/muggle-string/out/types.js
170
+ var require_types = /* @__PURE__ */ __commonJSMin(((exports) => {
171
+ Object.defineProperty(exports, "__esModule", { value: true });
172
+ }));
173
+ //#endregion
174
+ //#region ../../node_modules/.pnpm/ts-macro@0.3.7_typescript@7.0.2/node_modules/ts-macro/dist/index.js
175
+ var import_out = /* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin(((exports) => {
176
+ var __createBinding = exports && exports.__createBinding || (Object.create ? (function(o, m, k, k2) {
177
+ if (k2 === void 0) k2 = k;
178
+ var desc = Object.getOwnPropertyDescriptor(m, k);
179
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) desc = {
180
+ enumerable: true,
181
+ get: function() {
182
+ return m[k];
183
+ }
184
+ };
185
+ Object.defineProperty(o, k2, desc);
186
+ }) : (function(o, m, k, k2) {
187
+ if (k2 === void 0) k2 = k;
188
+ o[k2] = m[k];
189
+ }));
190
+ var __exportStar = exports && exports.__exportStar || function(m, exports$1) {
191
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports$1, p)) __createBinding(exports$1, m, p);
192
+ };
193
+ Object.defineProperty(exports, "__esModule", { value: true });
194
+ exports.replaceRange = exports.replaceSourceRange = exports.replaceAll = exports.replace = exports.create = exports.toString = exports.getLength = void 0;
195
+ const binarySearch_1 = require_binarySearch();
196
+ const track_1 = require_track();
197
+ __exportStar(require_types(), exports);
198
+ __exportStar(require_track(), exports);
199
+ function getLength(segments) {
200
+ let length = 0;
201
+ for (const segment of segments) length += typeof segment == "string" ? segment.length : segment[0].length;
202
+ return length;
203
+ }
204
+ exports.getLength = getLength;
205
+ function toString(segments) {
206
+ return segments.map((s) => typeof s === "string" ? s : s[0]).join("");
207
+ }
208
+ exports.toString = toString;
209
+ function create(source) {
210
+ return [[
211
+ source,
212
+ void 0,
213
+ 0
214
+ ]];
215
+ }
216
+ exports.create = create;
217
+ function replace(segments, pattern, ...replacers) {
218
+ const match = toString(segments).match(pattern);
219
+ if (match && match.index !== void 0) {
220
+ const startOffset = match.index;
221
+ const endOffset = startOffset + match[0].length;
222
+ (0, track_1.offsetStack)();
223
+ replaceRange(segments, startOffset, endOffset, ...replacers.map((replacer) => typeof replacer === "function" ? replacer(match[0]) : replacer));
224
+ (0, track_1.resetOffsetStack)();
225
+ }
226
+ }
227
+ exports.replace = replace;
228
+ function replaceAll(segments, pattern, ...replacers) {
229
+ const str = toString(segments);
230
+ const allMatch = str.matchAll(pattern);
231
+ let length = str.length;
232
+ let lengthDiff = 0;
233
+ for (const match of allMatch) if (match.index !== void 0) {
234
+ const startOffset = match.index + lengthDiff;
235
+ const endOffset = startOffset + match[0].length;
236
+ (0, track_1.offsetStack)();
237
+ replaceRange(segments, startOffset, endOffset, ...replacers.map((replacer) => typeof replacer === "function" ? replacer(match[0]) : replacer));
238
+ (0, track_1.resetOffsetStack)();
239
+ const newLength = getLength(segments);
240
+ lengthDiff += newLength - length;
241
+ length = newLength;
242
+ }
243
+ }
244
+ exports.replaceAll = replaceAll;
245
+ function replaceSourceRange(segments, source, startOffset, endOffset, ...newSegments) {
246
+ for (const segment of segments) {
247
+ if (typeof segment === "string") continue;
248
+ if (segment[1] === source) {
249
+ const segmentStart = segment[2];
250
+ const segmentEnd = segment[2] + segment[0].length;
251
+ if (segmentStart <= startOffset && segmentEnd >= endOffset) {
252
+ const inserts = [];
253
+ if (startOffset > segmentStart) inserts.push(trimSegmentEnd(segment, startOffset - segmentStart));
254
+ for (const newSegment of newSegments) inserts.push(newSegment);
255
+ if (endOffset < segmentEnd) inserts.push(trimSegmentStart(segment, endOffset - segmentEnd));
256
+ combineStrings(inserts);
257
+ (0, track_1.offsetStack)();
258
+ segments.splice(segments.indexOf(segment), 1, ...inserts);
259
+ (0, track_1.resetOffsetStack)();
260
+ return true;
261
+ }
262
+ }
263
+ }
264
+ return false;
265
+ }
266
+ exports.replaceSourceRange = replaceSourceRange;
267
+ function replaceRange(segments, startOffset, endOffset, ...newSegments) {
268
+ const offsets = toOffsets(segments);
269
+ const startIndex = (0, binarySearch_1.binarySearch)(offsets, startOffset);
270
+ const endIndex = (0, binarySearch_1.binarySearch)(offsets, endOffset);
271
+ const startSegment = segments[startIndex];
272
+ const endSegment = segments[endIndex];
273
+ const startSegmentStart = offsets[startIndex];
274
+ const endSegmentStart = offsets[endIndex];
275
+ const endSegmentEnd = offsets[endIndex] + (typeof endSegment === "string" ? endSegment.length : endSegment[0].length);
276
+ const inserts = [];
277
+ if (startOffset > startSegmentStart) inserts.push(trimSegmentEnd(startSegment, startOffset - startSegmentStart));
278
+ for (const newSegment of newSegments) inserts.push(newSegment);
279
+ if (endOffset < endSegmentEnd) inserts.push(trimSegmentStart(endSegment, endOffset - endSegmentStart));
280
+ combineStrings(inserts);
281
+ (0, track_1.offsetStack)();
282
+ segments.splice(startIndex, endIndex - startIndex + 1, ...inserts);
283
+ (0, track_1.resetOffsetStack)();
284
+ }
285
+ exports.replaceRange = replaceRange;
286
+ function combineStrings(segments) {
287
+ for (let i = segments.length - 1; i >= 1; i--) if (typeof segments[i] === "string" && typeof segments[i - 1] === "string") {
288
+ segments[i - 1] = segments[i - 1] + segments[i];
289
+ (0, track_1.offsetStack)();
290
+ segments.splice(i, 1);
291
+ (0, track_1.resetOffsetStack)();
292
+ }
293
+ }
294
+ function trimSegmentEnd(segment, trimEnd) {
295
+ if (typeof segment === "string") return segment.slice(0, trimEnd);
296
+ return [segment[0].slice(0, trimEnd), ...segment.slice(1)];
297
+ }
298
+ function trimSegmentStart(segment, trimStart) {
299
+ if (typeof segment === "string") return segment.slice(trimStart);
300
+ if (trimStart < 0) trimStart += segment[0].length;
301
+ return [
302
+ segment[0].slice(trimStart),
303
+ segment[1],
304
+ segment[2] + trimStart,
305
+ ...segment.slice(3)
306
+ ];
307
+ }
308
+ function toOffsets(segments) {
309
+ const offsets = [];
310
+ let offset = 0;
311
+ for (const segment of segments) {
312
+ offsets.push(offset);
313
+ offset += typeof segment == "string" ? segment.length : segment[0].length;
314
+ }
315
+ return offsets;
316
+ }
317
+ })))(), 1);
318
+ const t = (e, t) => (Array.isArray(e) && (typeof e[1] == `number` && e.splice(1, 0, t), typeof e.at(-1) != `object` && e.push(l)), e);
319
+ function n(n, r, i, ...a) {
320
+ return import_out.replaceSourceRange(n, void 0, r, i, ...a.map((e) => t(e)));
321
+ }
322
+ function r(n, r, i, a, ...o) {
323
+ return import_out.replaceSourceRange(n, r, i, a, ...o.map((e) => t(e, r)));
324
+ }
325
+ function i(t) {
326
+ return import_out.toString(t);
327
+ }
328
+ function a(t) {
329
+ return import_out.getLength(t);
330
+ }
331
+ function o(n, r, ...i) {
332
+ return import_out.replace(n, r, ...i.map((e) => typeof e == `function` ? e : t(e)));
333
+ }
334
+ function s(n, r, ...i) {
335
+ return import_out.replaceAll(n, r, ...i.map((e) => typeof e == `function` ? e : t(e)));
336
+ }
337
+ function c(e, c) {
338
+ return new Proxy(e, { get: (l, u, d) => u === `replaceRange` ? (t, i, ...a) => c ? r(e, c, t, i, ...a) : n(e, t, i, ...a) : u === `replace` ? (t, ...n) => o(e, t, ...n) : u === `replaceAll` ? (t, ...n) => s(e, t, ...n) : u === `toString` ? () => i(e) : u === `getLength` ? () => a(e) : u === `push` ? (...n) => e.push(...n.map((e) => t(e, c))) : u === `unshift` ? (...n) => e.unshift(...n.map((e) => t(e, c))) : u === `splice` ? (n, r, ...i) => e.splice(n, r, ...i.map((e) => t(e, c))) : Reflect.get(l, u, d) });
339
+ }
340
+ const l = {
341
+ completion: !0,
342
+ format: !0,
343
+ navigation: !0,
344
+ semantic: !0,
345
+ structure: !0,
346
+ verification: !0
347
+ };
348
+ function f(e, t, n) {
349
+ return n ? n.getTokenPosOfNode(e, t) : e.pos;
350
+ }
351
+ function p(e, t, n) {
352
+ return t ? t.text.slice(f(e, t, n), e.end) : ``;
353
+ }
354
+ function m(e) {
355
+ return e?.kind === 294;
356
+ }
357
+ function g(e) {
358
+ return (t) => {
359
+ if (t?.modules) {
360
+ let n = t.modules.typescript, r = e({
361
+ ts: n,
362
+ ...t
363
+ });
364
+ return (Array.isArray(r) ? r : [r]).flatMap((e) => (e.resolveVirtualCode && (e.resolveEmbeddedCode ??= (t, r, i) => {
365
+ if ([`script_ts`, `script_tsx`].includes(i.id)) for (let a of [`script`, `scriptSetup`]) {
366
+ let o = r[a]?.ast;
367
+ if (!o) continue;
368
+ _(o, n), e.resolveVirtualCode({
369
+ sfc: r,
370
+ ast: o,
371
+ source: a,
372
+ filePath: t,
373
+ id: i.id,
374
+ codes: c(i.content, a),
375
+ lang: i.lang,
376
+ languageId: i.lang === `tsx` ? `typescriptreact` : `typescript`,
377
+ embeddedCodes: i.embeddedCodes,
378
+ linkedCodeMappings: i.linkedCodeMappings
379
+ });
380
+ }
381
+ }), e.order ??= e.enforce === `pre` ? -1 : e.enforce === `post` ? 1 : 0, e.version ??= 2.1, e));
382
+ }
383
+ return (n) => e(n, t);
384
+ };
385
+ }
386
+ function _(e, t) {
387
+ if (e.forEachChild) return;
388
+ n(e), t.forEachChild(e, function e(r) {
389
+ t.isIdentifier(r) && !r.text && Object.defineProperty(Object.getPrototypeOf(r), `text`, {
390
+ get() {
391
+ return t.idText(this);
392
+ },
393
+ enumerable: !0,
394
+ configurable: !0
395
+ }), n(r), t.forEachChild(r, (t) => {
396
+ e(t);
397
+ });
398
+ }), t.isJsxExpression ??= function(e) {
399
+ return m(e);
400
+ };
401
+ function n(e) {
402
+ e.getSourceFile = () => {
403
+ for (; e && e.kind !== t.SyntaxKind.SourceFile;) e = e.parent;
404
+ return e;
405
+ }, e.getFullStart = () => e.pos, e.getStart = (n = e.getSourceFile()) => f(e, n, t), e.getEnd = () => e.end, e.getText = (n = e.getSourceFile()) => p(e, n, t), e.getFullText = (t = e.getSourceFile()) => t ? t.text.slice(e.pos, e.end) : ``, e.getWidth = (t) => e.end - e.getStart(t), e.getFullWidth = () => e.end - e.pos, e.getLeadingTriviaWidth = (t) => e.getStart(t) - e.pos, e.forEachChild = (n, r) => t.forEachChild(e, n, r);
406
+ }
407
+ }
408
+ //#endregion
409
+ //#region ../../node_modules/.pnpm/@vue-macros+volar@3.1.4_patch_hash=4d7df65192eceb1e3a4c08b7e3c28c2aea947987c838490dcb28_441b6ef458e4462cad2dd596d8e2ac6e/node_modules/@vue-macros/volar/dist/jsx-directive-w2gUTWdx.js
5
410
  function getDirectiveArgs(attribute, options) {
6
411
  const { ts, ast } = options;
7
412
  const attributeName = attribute.name.getText(ast);
@@ -59,7 +464,7 @@ declare function __VLS_asFunctionalComponent<
59
464
  ? Props
60
465
  : any),
61
466
  ctx?: any,
62
- ) => JSX.Element & {
467
+ ) => {
63
468
  __ctx: {
64
469
  attrs: Record<string, any>,
65
470
  props: (K extends { $props: infer Props }
@@ -149,7 +554,7 @@ function transformCtx(node, root, index, options) {
149
554
  const ctxName = `__VLS_ctx_${refValue || index}`;
150
555
  let tagName = "";
151
556
  const originTagName = tagName = getTagName(node, options);
152
- if (isHTMLTag(tagName) || isSVGTag(tagName) || tagName.includes("-")) tagName = `{}`;
557
+ if (!tagName.includes(".") && /^[a-z]/.test(tagName) || tagName.includes("-")) tagName = `{}`;
153
558
  else {
154
559
  let types = "";
155
560
  if (openingElement.typeArguments?.length) {
@@ -229,14 +634,14 @@ function transform$1(attribute, options) {
229
634
  `v`,
230
635
  start,
231
636
  {
232
- ...allCodeFeatures,
637
+ ...l,
233
638
  verification: false
234
639
  }
235
640
  ], [
236
641
  name[2].toUpperCase() + name.slice(3),
237
642
  start + 2,
238
643
  {
239
- ...allCodeFeatures,
644
+ ...l,
240
645
  verification: false
241
646
  }
242
647
  ], `>}`);
@@ -519,7 +924,8 @@ function transformVSlot(nodeMap, ctxMap, options) {
519
924
  if (vForAttribute) result.push("})) as any,");
520
925
  if (vIfAttribute && vIfAttributeName) {
521
926
  if ([`${prefix}if`, `${prefix}else-if`].includes(vIfAttributeName)) {
522
- const nextAttribute = attributes[index + (attributes[index + 1]?.[0] ? 1 : 2)]?.[1].vIfAttribute;
927
+ const nextIndex = index + (attributes[index + 1]?.[0] ? 1 : 2);
928
+ const nextAttribute = attributes[nextIndex]?.[1].vIfAttribute;
523
929
  result.push("}", nextAttribute && nextAttribute.name.getText(ast).startsWith(`${prefix}else`) ? " : " : " : null,");
524
930
  } else if (`${prefix}else` === vIfAttributeName) result.push("},");
525
931
  }
@@ -700,7 +1106,7 @@ function getTagName(node, options) {
700
1106
  if (!openingElement) return "";
701
1107
  return openingElement.tagName.getText(options.ast);
702
1108
  }
703
- var jsx_directive_default = createPlugin(({ ts, vueCompilerOptions }, options = vueCompilerOptions?.vueMacros?.jsxDirective === true ? {} : vueCompilerOptions?.vueMacros?.jsxDirective ?? {}) => {
1109
+ var jsx_directive_default = g(({ ts, vueCompilerOptions }, options = vueCompilerOptions?.vueMacros?.jsxDirective === true ? {} : vueCompilerOptions?.vueMacros?.jsxDirective ?? {}) => {
704
1110
  if (!options) return [];
705
1111
  return {
706
1112
  name: "vue-macros-jsx-directive",
@@ -716,7 +1122,7 @@ var jsx_directive_default = createPlugin(({ ts, vueCompilerOptions }, options =
716
1122
  };
717
1123
  });
718
1124
  //#endregion
719
- //#region ../../node_modules/.pnpm/@vue-macros+volar@3.1.4_patch_hash=79e6492c51b3afca57b92023dd1aae9ddd57140efa1cf2cdf74d_acc5ae0987bad0943555f2f9fe5e1571/node_modules/@vue-macros/volar/dist/jsx-ref-DZlb-F7c.js
1125
+ //#region ../../node_modules/.pnpm/@vue-macros+volar@3.1.4_patch_hash=4d7df65192eceb1e3a4c08b7e3c28c2aea947987c838490dcb28_441b6ef458e4462cad2dd596d8e2ac6e/node_modules/@vue-macros/volar/dist/jsx-ref-DZlb-F7c.js
720
1126
  function transformRef({ nodes, codes, ts }) {
721
1127
  for (const { name, initializer } of nodes) if (ts.isCallExpression(initializer)) codes.replaceRange(initializer.expression.end, initializer.expression.end, `<Parameters<typeof __VLS_ctx_${name.text}['expose']>[0] | null>`);
722
1128
  }
@@ -740,7 +1146,7 @@ function getRefNodes(ts, sourceFile, alias) {
740
1146
  ts.forEachChild(sourceFile, walk);
741
1147
  return result;
742
1148
  }
743
- var jsx_ref_default = createPlugin(({ ts, vueCompilerOptions }, options = vueCompilerOptions?.vueMacros?.jsxRef === true ? {} : vueCompilerOptions?.vueMacros?.jsxRef ?? {}) => {
1149
+ var jsx_ref_default = g(({ ts, vueCompilerOptions }, options = vueCompilerOptions?.vueMacros?.jsxRef === true ? {} : vueCompilerOptions?.vueMacros?.jsxRef ?? {}) => {
744
1150
  if (!options) return [];
745
1151
  const alias = options.alias || ["useRef"];
746
1152
  return {
package/dist/webpack.d.ts CHANGED
@@ -1,7 +1,5 @@
1
- import { t as Options } from "./options-DHzozgGn.js";
2
- import * as _$unplugin from "unplugin";
3
-
1
+ import { t as Options } from "./options-DO20LLvf.js";
4
2
  //#region src/webpack.d.ts
5
- declare const _default: (options?: Options | undefined) => _$unplugin.WebpackPluginInstance;
3
+ declare const _default: (options?: Options | undefined) => import("unplugin").WebpackPluginInstance;
6
4
  //#endregion
7
5
  export { _default as default };
@@ -1,10 +1,6 @@
1
1
  import type { Fragment, VNode } from 'vue'
2
2
  export type { JSX } from 'vue-jsx'
3
3
 
4
- declare global {
5
- export type { JSX } from 'vue-jsx'
6
- }
7
-
8
4
  declare function jsx(type: any, props: any, key: any): VNode
9
5
 
10
6
  export { Fragment, jsx, jsx as jsxDEV, jsx as jsxs }
package/package.json CHANGED
@@ -1,27 +1,44 @@
1
1
  {
2
2
  "name": "vue-jsx",
3
- "type": "module",
4
- "version": "3.3.0-beta.0",
3
+ "version": "3.3.0-rc.1",
5
4
  "description": "High-performance Vue JSX Compiler powered by Oxc",
6
- "license": "MIT",
5
+ "keywords": [
6
+ "compiler",
7
+ "rollup",
8
+ "unplugin",
9
+ "vapor",
10
+ "vite",
11
+ "volar",
12
+ "vue-jsx",
13
+ "webpack"
14
+ ],
7
15
  "homepage": "https://github.com/vuejs/vue-jsx-vapor#readme",
16
+ "bugs": {
17
+ "url": "https://github.com/vuejs/vue-jsx-vapor/issues"
18
+ },
19
+ "license": "MIT",
8
20
  "repository": {
9
21
  "type": "git",
10
22
  "url": "git+https://github.com/vuejs/vue-jsx-vapor.git"
11
23
  },
12
- "bugs": {
13
- "url": "https://github.com/vuejs/vue-jsx-vapor/issues"
14
- },
15
- "keywords": [
16
- "unplugin",
17
- "vite",
18
- "webpack",
19
- "rollup",
20
- "compiler",
21
- "vue-jsx",
22
- "volar",
23
- "vapor"
24
+ "files": [
25
+ "dist",
26
+ "jsx-runtime"
24
27
  ],
28
+ "type": "module",
29
+ "main": "dist/index.js",
30
+ "types": "dist/index.d.ts",
31
+ "typesVersions": {
32
+ "*": {
33
+ "*": [
34
+ "./dist/*",
35
+ "./*"
36
+ ],
37
+ "jsx-runtime": [
38
+ "./jsx-runtime/index.d.ts"
39
+ ]
40
+ }
41
+ },
25
42
  "exports": {
26
43
  ".": "./dist/index.js",
27
44
  "./astro": "./dist/astro.js",
@@ -42,23 +59,18 @@
42
59
  "./volar": "./dist/volar.js",
43
60
  "./*": "./*"
44
61
  },
45
- "main": "dist/index.js",
46
- "types": "dist/index.d.ts",
47
- "typesVersions": {
48
- "*": {
49
- "*": [
50
- "./dist/*",
51
- "./*"
52
- ],
53
- "jsx-runtime": [
54
- "./jsx-runtime/index.d.ts"
55
- ]
56
- }
62
+ "dependencies": {
63
+ "@vue-jsx/compiler": "3.3.0-rc.1",
64
+ "@vue-jsx/macros": "3.3.0-rc.1",
65
+ "@vue-jsx/runtime": "3.3.0-rc.1",
66
+ "unplugin": "^3.0.0"
67
+ },
68
+ "devDependencies": {
69
+ "@nuxt/kit": "^4.5.2",
70
+ "@nuxt/schema": "^4.5.2",
71
+ "@vue-macros/volar": "^3.1.4",
72
+ "vue": "3.6.0-rc.8"
57
73
  },
58
- "files": [
59
- "dist",
60
- "jsx-runtime"
61
- ],
62
74
  "peerDependencies": {
63
75
  "@nuxt/kit": "^3",
64
76
  "@nuxt/schema": "^3",
@@ -88,28 +100,12 @@
88
100
  "optional": true
89
101
  }
90
102
  },
91
- "dependencies": {
92
- "@vue-jsx/compiler": "3.3.0-beta.0",
93
- "@vue-jsx/macros": "3.3.0-beta.0",
94
- "@vue-jsx/runtime": "3.3.0-beta.0",
95
- "@vue/shared": "3.6.0-rc.5",
96
- "pathe": "^2.0.3",
97
- "ts-macro": "^0.3.7",
98
- "unplugin": "^3.0.0",
99
- "unplugin-utils": "^0.3.1"
100
- },
101
- "devDependencies": {
102
- "@nuxt/kit": "^3.21.4",
103
- "@nuxt/schema": "^3.21.4",
104
- "@vue-macros/volar": "^3.1.4",
105
- "vue": "3.6.0-rc.5"
106
- },
107
103
  "scripts": {
108
- "build": "tsdown",
109
- "dev": "DEV=true tsdown",
110
- "lint": "eslint .",
111
- "play": "npm -C playground run dev",
104
+ "build": "vp pack",
105
+ "dev": "DEV=true vp pack",
106
+ "lint": "vp lint .",
107
+ "play": "vp -C playground dev",
112
108
  "release": "bumpp && npm publish",
113
- "test": "vitest"
109
+ "test": "vp test"
114
110
  }
115
111
  }