vue-jsx-vapor 2.3.6 → 2.4.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.
Files changed (76) hide show
  1. package/dist/api.cjs +2 -2
  2. package/dist/api.d.cts +3 -3
  3. package/dist/api.d.ts +3 -3
  4. package/dist/astro.cjs +4 -5
  5. package/dist/astro.d.cts +6 -8
  6. package/dist/astro.d.ts +6 -8
  7. package/dist/astro.js +2 -2
  8. package/dist/{chunk-BCwAaXi7.cjs → chunk-CUT6urMc.cjs} +0 -1
  9. package/dist/{core-B29W1zp3.cjs → core-BEqRwfoK.cjs} +1 -2
  10. package/dist/esbuild.cjs +4 -5
  11. package/dist/esbuild.d.cts +3 -3
  12. package/dist/esbuild.d.ts +3 -3
  13. package/dist/esbuild.js +2 -2
  14. package/dist/index.cjs +46 -5
  15. package/dist/index.d.cts +34 -2
  16. package/dist/index.d.ts +34 -2
  17. package/dist/index.js +43 -3
  18. package/dist/nuxt.cjs +7 -8
  19. package/dist/nuxt.d.cts +4 -5
  20. package/dist/nuxt.d.ts +4 -5
  21. package/dist/nuxt.js +4 -4
  22. package/dist/options-BRfDD5qB.d.cts +18 -0
  23. package/dist/options-CeDGvYqS.d.ts +18 -0
  24. package/dist/options.d.cts +1 -2
  25. package/dist/options.d.ts +1 -2
  26. package/dist/{raw-CPEhZ9Wr.cjs → raw-BY1njZIx.cjs} +3 -4
  27. package/dist/{raw-D5n6wETp.js → raw-DecHkpC5.js} +1 -1
  28. package/dist/raw.cjs +3 -3
  29. package/dist/raw.d.cts +1 -1
  30. package/dist/raw.d.ts +1 -1
  31. package/dist/raw.js +1 -1
  32. package/dist/rolldown.cjs +5 -6
  33. package/dist/rolldown.d.cts +3 -3
  34. package/dist/rolldown.d.ts +3 -3
  35. package/dist/rolldown.js +2 -2
  36. package/dist/rollup.cjs +4 -5
  37. package/dist/rollup.d.cts +3 -3
  38. package/dist/rollup.d.ts +3 -3
  39. package/dist/rollup.js +2 -2
  40. package/dist/rspack.cjs +4 -5
  41. package/dist/rspack.d.cts +1 -1
  42. package/dist/rspack.d.ts +1 -1
  43. package/dist/rspack.js +2 -2
  44. package/dist/{unplugin-O-j6KrDW.js → unplugin-DeYNxSzL.js} +1 -1
  45. package/dist/{unplugin-BE5nHMyo.cjs → unplugin-JV7CydWf.cjs} +2 -3
  46. package/dist/unplugin.cjs +6 -6
  47. package/dist/unplugin.d.cts +4 -3
  48. package/dist/unplugin.d.ts +4 -3
  49. package/dist/unplugin.js +2 -2
  50. package/dist/vite-C2WptbyG.js +7 -0
  51. package/dist/{vite-CnMq6-74.cjs → vite-CVR2C-Wy.cjs} +1 -2
  52. package/dist/vite.cjs +5 -5
  53. package/dist/vite.d.cts +3 -3
  54. package/dist/vite.d.ts +3 -3
  55. package/dist/vite.js +3 -3
  56. package/dist/volar.cjs +3 -4
  57. package/dist/volar.d.cts +1 -1
  58. package/dist/volar.d.ts +1 -1
  59. package/dist/volar.js +1 -1
  60. package/dist/{webpack-DjBty3ZC.cjs → webpack-DWlp7dxs.cjs} +1 -2
  61. package/dist/{webpack-BnYgbUqF.js → webpack-mKQ7x4tg.js} +1 -1
  62. package/dist/webpack.cjs +5 -5
  63. package/dist/webpack.d.cts +3 -3
  64. package/dist/webpack.d.ts +3 -3
  65. package/dist/webpack.js +3 -3
  66. package/jsx-runtime/index.cjs +38 -0
  67. package/jsx-runtime/index.d.cts +1355 -0
  68. package/jsx-runtime/index.d.ts +1355 -0
  69. package/package.json +41 -96
  70. package/dist/jsx-runtime.cjs +0 -17
  71. package/dist/jsx-runtime.d.cts +0 -1362
  72. package/dist/jsx-runtime.d.ts +0 -1362
  73. package/dist/options.d-BAyccQwr.d.ts +0 -20
  74. package/dist/options.d-CA70vgwp.d.cts +0 -20
  75. package/dist/vite-B8-AEirI.js +0 -7
  76. /package/{dist/jsx-runtime.js → jsx-runtime/index.js} +0 -0
package/dist/api.cjs CHANGED
@@ -1,3 +1,3 @@
1
- const require_core = require('./core-B29W1zp3.cjs');
1
+ const require_core = require('./core-BEqRwfoK.cjs');
2
2
 
3
- exports.transformVueJsxVapor = require_core.transformVueJsxVapor
3
+ exports.transformVueJsxVapor = require_core.transformVueJsxVapor;
package/dist/api.d.cts CHANGED
@@ -1,8 +1,8 @@
1
- import { Options } from "./options.d-CA70vgwp.cjs";
2
- import { BabelFileResult } from "@babel/core";
1
+ import { Options } from "./options-BRfDD5qB.cjs";
2
+ import * as _babel_core14 from "@babel/core";
3
3
 
4
4
  //#region src/core/index.d.ts
5
- declare function transformVueJsxVapor(code: string, id: string, options?: Options, needSourceMap?: boolean): BabelFileResult | null;
5
+ declare function transformVueJsxVapor(code: string, id: string, options?: Options, needSourceMap?: boolean): _babel_core14.BabelFileResult | null;
6
6
 
7
7
  //#endregion
8
8
  export { Options, transformVueJsxVapor };
package/dist/api.d.ts CHANGED
@@ -1,8 +1,8 @@
1
- import { Options } from "./options.d-BAyccQwr.js";
2
- import { BabelFileResult } from "@babel/core";
1
+ import { Options } from "./options-CeDGvYqS.js";
2
+ import * as _babel_core14 from "@babel/core";
3
3
 
4
4
  //#region src/core/index.d.ts
5
- declare function transformVueJsxVapor(code: string, id: string, options?: Options, needSourceMap?: boolean): BabelFileResult | null;
5
+ declare function transformVueJsxVapor(code: string, id: string, options?: Options, needSourceMap?: boolean): _babel_core14.BabelFileResult | null;
6
6
 
7
7
  //#endregion
8
8
  export { Options, transformVueJsxVapor };
package/dist/astro.cjs CHANGED
@@ -1,9 +1,8 @@
1
- "use strict";
2
1
  Object.defineProperty(exports, '__esModule', { value: true });
3
- require('./core-B29W1zp3.cjs');
4
- require('./raw-CPEhZ9Wr.cjs');
2
+ require('./core-BEqRwfoK.cjs');
3
+ require('./raw-BY1njZIx.cjs');
5
4
  require('./options-CulFO0WS.cjs');
6
- const require_unplugin = require('./unplugin-BE5nHMyo.cjs');
5
+ const require_unplugin = require('./unplugin-JV7CydWf.cjs');
7
6
 
8
7
  //#region src/astro.ts
9
8
  var astro_default = (options) => ({
@@ -15,4 +14,4 @@ var astro_default = (options) => ({
15
14
  });
16
15
 
17
16
  //#endregion
18
- exports.default = astro_default
17
+ exports.default = astro_default;
package/dist/astro.d.cts CHANGED
@@ -1,12 +1,10 @@
1
- import { Options } from "./options.d-CA70vgwp.cjs";
1
+ import { Options } from "./options-BRfDD5qB.cjs";
2
2
 
3
3
  //#region src/astro.d.ts
4
4
  declare const _default: (options: Options) => {
5
- name: string;
6
- hooks: {
7
- 'astro:config:setup': (astro: any) => void;
8
- };
9
- };
10
-
11
- //#endregion
5
+ name: string;
6
+ hooks: {
7
+ 'astro:config:setup': (astro: any) => void;
8
+ };
9
+ }; //#endregion
12
10
  export { _default as default };
package/dist/astro.d.ts CHANGED
@@ -1,12 +1,10 @@
1
- import { Options } from "./options.d-BAyccQwr.js";
1
+ import { Options } from "./options-CeDGvYqS.js";
2
2
 
3
3
  //#region src/astro.d.ts
4
4
  declare const _default: (options: Options) => {
5
- name: string;
6
- hooks: {
7
- 'astro:config:setup': (astro: any) => void;
8
- };
9
- };
10
-
11
- //#endregion
5
+ name: string;
6
+ hooks: {
7
+ 'astro:config:setup': (astro: any) => void;
8
+ };
9
+ }; //#endregion
12
10
  export { _default as default };
package/dist/astro.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import "./core-BDE4GLH8.js";
2
- import "./raw-D5n6wETp.js";
2
+ import "./raw-DecHkpC5.js";
3
3
  import "./options-HYvLzmlg.js";
4
- import { unplugin_default } from "./unplugin-O-j6KrDW.js";
4
+ import { unplugin_default } from "./unplugin-DeYNxSzL.js";
5
5
 
6
6
  //#region src/astro.ts
7
7
  var astro_default = (options) => ({
@@ -1,4 +1,3 @@
1
- "use strict";
2
1
  //#region rolldown:runtime
3
2
  var __create = Object.create;
4
3
  var __defProp = Object.defineProperty;
@@ -1,5 +1,4 @@
1
- "use strict";
2
- const require_chunk = require('./chunk-BCwAaXi7.cjs');
1
+ const require_chunk = require('./chunk-CUT6urMc.cjs');
3
2
  const __babel_core = require_chunk.__toESM(require("@babel/core"));
4
3
  const __babel_plugin_transform_typescript = require_chunk.__toESM(require("@babel/plugin-transform-typescript"));
5
4
  const __vue_jsx_vapor_babel = require_chunk.__toESM(require("@vue-jsx-vapor/babel"));
package/dist/esbuild.cjs CHANGED
@@ -1,12 +1,11 @@
1
- "use strict";
2
1
  Object.defineProperty(exports, '__esModule', { value: true });
3
- require('./core-B29W1zp3.cjs');
4
- require('./raw-CPEhZ9Wr.cjs');
2
+ require('./core-BEqRwfoK.cjs');
3
+ require('./raw-BY1njZIx.cjs');
5
4
  require('./options-CulFO0WS.cjs');
6
- const require_unplugin = require('./unplugin-BE5nHMyo.cjs');
5
+ const require_unplugin = require('./unplugin-JV7CydWf.cjs');
7
6
 
8
7
  //#region src/esbuild.ts
9
8
  var esbuild_default = require_unplugin.unplugin_default.esbuild;
10
9
 
11
10
  //#endregion
12
- exports.default = esbuild_default
11
+ exports.default = esbuild_default;
@@ -1,8 +1,8 @@
1
- import { Options } from "./options.d-CA70vgwp.cjs";
2
- import { Plugin } from "esbuild";
1
+ import { Options } from "./options-BRfDD5qB.cjs";
2
+ import * as esbuild3 from "esbuild";
3
3
 
4
4
  //#region src/esbuild.d.ts
5
- declare const _default: (options?: Options | undefined) => Plugin;
5
+ declare const _default: (options?: Options | undefined) => esbuild3.Plugin;
6
6
 
7
7
  //#endregion
8
8
  export { _default as default };
package/dist/esbuild.d.ts CHANGED
@@ -1,8 +1,8 @@
1
- import { Options } from "./options.d-BAyccQwr.js";
2
- import { Plugin } from "esbuild";
1
+ import { Options } from "./options-CeDGvYqS.js";
2
+ import * as esbuild10 from "esbuild";
3
3
 
4
4
  //#region src/esbuild.d.ts
5
- declare const _default: (options?: Options | undefined) => Plugin;
5
+ declare const _default: (options?: Options | undefined) => esbuild10.Plugin;
6
6
 
7
7
  //#endregion
8
8
  export { _default as default };
package/dist/esbuild.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import "./core-BDE4GLH8.js";
2
- import "./raw-D5n6wETp.js";
2
+ import "./raw-DecHkpC5.js";
3
3
  import "./options-HYvLzmlg.js";
4
- import { unplugin_default } from "./unplugin-O-j6KrDW.js";
4
+ import { unplugin_default } from "./unplugin-DeYNxSzL.js";
5
5
 
6
6
  //#region src/esbuild.ts
7
7
  var esbuild_default = unplugin_default.esbuild;
package/dist/index.cjs CHANGED
@@ -1,8 +1,44 @@
1
- "use strict";
2
- const require_chunk = require('./chunk-BCwAaXi7.cjs');
1
+ const require_chunk = require('./chunk-CUT6urMc.cjs');
3
2
  const vue = require_chunk.__toESM(require("vue"));
4
3
 
5
4
  //#region src/core/runtime.ts
5
+ function getCurrentInstance() {
6
+ return vue.currentInstance || vue.getCurrentInstance();
7
+ }
8
+ /**
9
+ * Returns the props of the current component instance.
10
+ *
11
+ * @example
12
+ * ```tsx
13
+ * import { useProps } from 'vue-jsx-vapor'
14
+ *
15
+ * defineComponent(({ foo = '' })=>{
16
+ * const props = useProps() // { foo: '' }
17
+ * })
18
+ * ```
19
+ */
20
+ function useProps() {
21
+ const i = getCurrentInstance();
22
+ return i.props;
23
+ }
24
+ /**
25
+ * Returns the merged props and attrs of the current component.\
26
+ * Equivalent to `useProps()` + `useAttrs()`.
27
+ *
28
+ * @example
29
+ * ```tsx
30
+ * import { useFullProps } from 'vue-jsx-vapor'
31
+ *
32
+ * defineComponent((props) => {
33
+ * const fullProps = useFullProps() // = useAttrs() + useProps()
34
+ * })
35
+ */
36
+ function useFullProps() {
37
+ return (0, vue.proxyRefs)({
38
+ ...(0, vue.toRefs)(useProps()),
39
+ ...(0, vue.toRefs)((0, vue.useAttrs)())
40
+ });
41
+ }
6
42
  function createFragment(nodes, anchor = document.createTextNode("")) {
7
43
  const frag = new vue.VaporFragment(nodes);
8
44
  frag.anchor = anchor;
@@ -56,9 +92,11 @@ function resolveValues(values = [], _anchor) {
56
92
  for (const [index, value] of values.entries()) {
57
93
  const anchor = index === values.length - 1 ? _anchor : void 0;
58
94
  if (typeof value === "function") (0, vue.renderEffect)(() => {
95
+ (0, vue.pauseTracking)();
59
96
  if (scopes[index]) scopes[index].stop();
60
- scopes[index] = (0, vue.effectScope)();
97
+ scopes[index] = new vue.EffectScope();
61
98
  nodes[index] = scopes[index].run(() => resolveValue(nodes[index], value(), anchor));
99
+ (0, vue.resetTracking)();
62
100
  });
63
101
  else nodes[index] = resolveValue(nodes[index], value, anchor);
64
102
  }
@@ -73,8 +111,11 @@ function createNodes(...values) {
73
111
  }
74
112
 
75
113
  //#endregion
76
- exports.createNodes = createNodes
77
- exports.setNodes = setNodes
114
+ exports.createNodes = createNodes;
115
+ exports.getCurrentInstance = getCurrentInstance;
116
+ exports.setNodes = setNodes;
117
+ exports.useFullProps = useFullProps;
118
+ exports.useProps = useProps;
78
119
  Object.defineProperty(exports, 'useRef', {
79
120
  enumerable: true,
80
121
  get: function () {
package/dist/index.d.cts CHANGED
@@ -1,8 +1,40 @@
1
- import { shallowRef as useRef } from "vue";
1
+ import * as Vue from "vue";
2
+ import { Block, GenericComponentInstance, shallowRef as useRef } from "vue";
2
3
 
3
4
  //#region src/core/runtime.d.ts
5
+ declare function getCurrentInstance(): GenericComponentInstance | null;
6
+ /**
7
+ * Returns the props of the current component instance.
8
+ *
9
+ * @example
10
+ * ```tsx
11
+ * import { useProps } from 'vue-jsx-vapor'
12
+ *
13
+ * defineComponent(({ foo = '' })=>{
14
+ * const props = useProps() // { foo: '' }
15
+ * })
16
+ * ```
17
+ */
18
+ declare function useProps(): {
19
+ [x: string]: unknown;
20
+ };
21
+ /**
22
+ * Returns the merged props and attrs of the current component.\
23
+ * Equivalent to `useProps()` + `useAttrs()`.
24
+ *
25
+ * @example
26
+ * ```tsx
27
+ * import { useFullProps } from 'vue-jsx-vapor'
28
+ *
29
+ * defineComponent((props) => {
30
+ * const fullProps = useFullProps() // = useAttrs() + useProps()
31
+ * })
32
+ */
33
+ declare function useFullProps(): Vue.ShallowUnwrapRef<{
34
+ [x: string]: Vue.Ref<unknown, unknown>;
35
+ }>;
4
36
  declare function setNodes(anchor: Element, ...values: any[]): void;
5
37
  declare function createNodes(...values: any[]): Block[];
6
38
 
7
39
  //#endregion
8
- export { createNodes, setNodes, useRef };
40
+ export { createNodes, getCurrentInstance, setNodes, useFullProps, useProps, useRef };
package/dist/index.d.ts CHANGED
@@ -1,8 +1,40 @@
1
- import { shallowRef as useRef } from "vue";
1
+ import * as Vue from "vue";
2
+ import { Block, GenericComponentInstance, shallowRef as useRef } from "vue";
2
3
 
3
4
  //#region src/core/runtime.d.ts
5
+ declare function getCurrentInstance(): GenericComponentInstance | null;
6
+ /**
7
+ * Returns the props of the current component instance.
8
+ *
9
+ * @example
10
+ * ```tsx
11
+ * import { useProps } from 'vue-jsx-vapor'
12
+ *
13
+ * defineComponent(({ foo = '' })=>{
14
+ * const props = useProps() // { foo: '' }
15
+ * })
16
+ * ```
17
+ */
18
+ declare function useProps(): {
19
+ [x: string]: unknown;
20
+ };
21
+ /**
22
+ * Returns the merged props and attrs of the current component.\
23
+ * Equivalent to `useProps()` + `useAttrs()`.
24
+ *
25
+ * @example
26
+ * ```tsx
27
+ * import { useFullProps } from 'vue-jsx-vapor'
28
+ *
29
+ * defineComponent((props) => {
30
+ * const fullProps = useFullProps() // = useAttrs() + useProps()
31
+ * })
32
+ */
33
+ declare function useFullProps(): Vue.ShallowUnwrapRef<{
34
+ [x: string]: Vue.Ref<unknown, unknown>;
35
+ }>;
4
36
  declare function setNodes(anchor: Element, ...values: any[]): void;
5
37
  declare function createNodes(...values: any[]): Block[];
6
38
 
7
39
  //#endregion
8
- export { createNodes, setNodes, useRef };
40
+ export { createNodes, getCurrentInstance, setNodes, useFullProps, useProps, useRef };
package/dist/index.js CHANGED
@@ -1,6 +1,44 @@
1
- import { VaporFragment, effectScope, insert, isFragment, isVaporComponent, remove, renderEffect, shallowRef as useRef } from "vue";
1
+ import * as Vue from "vue";
2
+ import { EffectScope, VaporFragment, insert, isFragment, isVaporComponent, pauseTracking, proxyRefs, remove, renderEffect, resetTracking, shallowRef as useRef, toRefs, useAttrs } from "vue";
2
3
 
3
4
  //#region src/core/runtime.ts
5
+ function getCurrentInstance() {
6
+ return Vue.currentInstance || Vue.getCurrentInstance();
7
+ }
8
+ /**
9
+ * Returns the props of the current component instance.
10
+ *
11
+ * @example
12
+ * ```tsx
13
+ * import { useProps } from 'vue-jsx-vapor'
14
+ *
15
+ * defineComponent(({ foo = '' })=>{
16
+ * const props = useProps() // { foo: '' }
17
+ * })
18
+ * ```
19
+ */
20
+ function useProps() {
21
+ const i = getCurrentInstance();
22
+ return i.props;
23
+ }
24
+ /**
25
+ * Returns the merged props and attrs of the current component.\
26
+ * Equivalent to `useProps()` + `useAttrs()`.
27
+ *
28
+ * @example
29
+ * ```tsx
30
+ * import { useFullProps } from 'vue-jsx-vapor'
31
+ *
32
+ * defineComponent((props) => {
33
+ * const fullProps = useFullProps() // = useAttrs() + useProps()
34
+ * })
35
+ */
36
+ function useFullProps() {
37
+ return proxyRefs({
38
+ ...toRefs(useProps()),
39
+ ...toRefs(useAttrs())
40
+ });
41
+ }
4
42
  function createFragment(nodes, anchor = document.createTextNode("")) {
5
43
  const frag = new VaporFragment(nodes);
6
44
  frag.anchor = anchor;
@@ -54,9 +92,11 @@ function resolveValues(values = [], _anchor) {
54
92
  for (const [index, value] of values.entries()) {
55
93
  const anchor = index === values.length - 1 ? _anchor : void 0;
56
94
  if (typeof value === "function") renderEffect(() => {
95
+ pauseTracking();
57
96
  if (scopes[index]) scopes[index].stop();
58
- scopes[index] = effectScope();
97
+ scopes[index] = new EffectScope();
59
98
  nodes[index] = scopes[index].run(() => resolveValue(nodes[index], value(), anchor));
99
+ resetTracking();
60
100
  });
61
101
  else nodes[index] = resolveValue(nodes[index], value, anchor);
62
102
  }
@@ -71,4 +111,4 @@ function createNodes(...values) {
71
111
  }
72
112
 
73
113
  //#endregion
74
- export { createNodes, setNodes, useRef };
114
+ export { createNodes, getCurrentInstance, setNodes, useFullProps, useProps, useRef };
package/dist/nuxt.cjs CHANGED
@@ -1,12 +1,11 @@
1
- "use strict";
2
1
  Object.defineProperty(exports, '__esModule', { value: true });
3
- const require_chunk = require('./chunk-BCwAaXi7.cjs');
4
- require('./core-B29W1zp3.cjs');
5
- require('./raw-CPEhZ9Wr.cjs');
2
+ const require_chunk = require('./chunk-CUT6urMc.cjs');
3
+ require('./core-BEqRwfoK.cjs');
4
+ require('./raw-BY1njZIx.cjs');
6
5
  require('./options-CulFO0WS.cjs');
7
- require('./unplugin-BE5nHMyo.cjs');
8
- const require_vite = require('./vite-CnMq6-74.cjs');
9
- const require_webpack = require('./webpack-DjBty3ZC.cjs');
6
+ require('./unplugin-JV7CydWf.cjs');
7
+ const require_vite = require('./vite-CVR2C-Wy.cjs');
8
+ const require_webpack = require('./webpack-DWlp7dxs.cjs');
10
9
  const __nuxt_kit = require_chunk.__toESM(require("@nuxt/kit"));
11
10
  require("@nuxt/schema");
12
11
 
@@ -23,4 +22,4 @@ var nuxt_default = (0, __nuxt_kit.defineNuxtModule)({
23
22
  });
24
23
 
25
24
  //#endregion
26
- exports.default = nuxt_default
25
+ exports.default = nuxt_default;
package/dist/nuxt.d.cts CHANGED
@@ -1,10 +1,9 @@
1
- import { Options } from "./options.d-CA70vgwp.cjs";
2
- import { NuxtModule } from "@nuxt/schema";
1
+ import { Options } from "./options-BRfDD5qB.cjs";
2
+ import * as _nuxt_schema0 from "@nuxt/schema";
3
3
 
4
4
  //#region src/nuxt.d.ts
5
- interface ModuleOptions extends Options {
6
- }
7
- declare const _default: NuxtModule<ModuleOptions, ModuleOptions, false>;
5
+ interface ModuleOptions extends Options {}
6
+ declare const _default: _nuxt_schema0.NuxtModule<ModuleOptions, ModuleOptions, false>;
8
7
 
9
8
  //#endregion
10
9
  export { ModuleOptions, _default as default };
package/dist/nuxt.d.ts CHANGED
@@ -1,10 +1,9 @@
1
- import { Options } from "./options.d-BAyccQwr.js";
2
- import { NuxtModule } from "@nuxt/schema";
1
+ import { Options } from "./options-CeDGvYqS.js";
2
+ import * as _nuxt_schema0 from "@nuxt/schema";
3
3
 
4
4
  //#region src/nuxt.d.ts
5
- interface ModuleOptions extends Options {
6
- }
7
- declare const _default: NuxtModule<ModuleOptions, ModuleOptions, false>;
5
+ interface ModuleOptions extends Options {}
6
+ declare const _default: _nuxt_schema0.NuxtModule<ModuleOptions, ModuleOptions, false>;
8
7
 
9
8
  //#endregion
10
9
  export { ModuleOptions, _default as default };
package/dist/nuxt.js CHANGED
@@ -1,9 +1,9 @@
1
1
  import "./core-BDE4GLH8.js";
2
- import "./raw-D5n6wETp.js";
2
+ import "./raw-DecHkpC5.js";
3
3
  import "./options-HYvLzmlg.js";
4
- import "./unplugin-O-j6KrDW.js";
5
- import { vite_default } from "./vite-B8-AEirI.js";
6
- import { webpack_default } from "./webpack-BnYgbUqF.js";
4
+ import "./unplugin-DeYNxSzL.js";
5
+ import { vite_default } from "./vite-C2WptbyG.js";
6
+ import { webpack_default } from "./webpack-mKQ7x4tg.js";
7
7
  import { addVitePlugin, addWebpackPlugin, defineNuxtModule } from "@nuxt/kit";
8
8
  import "@nuxt/schema";
9
9
 
@@ -0,0 +1,18 @@
1
+ import { CompilerOptions } from "@vue-jsx-vapor/compiler";
2
+ import { Options } from "@vue-jsx-vapor/macros";
3
+ import { FilterPattern } from "unplugin-utils";
4
+
5
+ //#region src/options.d.ts
6
+ interface Options$1 {
7
+ include?: FilterPattern;
8
+ exclude?: FilterPattern;
9
+ interop?: boolean;
10
+ compile?: CompilerOptions;
11
+ /** @default true */
12
+ ref?: {
13
+ alias?: string[];
14
+ } | boolean;
15
+ /** @default false */
16
+ macros?: Options | boolean;
17
+ } //#endregion
18
+ export { Options$1 as Options };
@@ -0,0 +1,18 @@
1
+ import { FilterPattern } from "unplugin-utils";
2
+ import { CompilerOptions } from "@vue-jsx-vapor/compiler";
3
+ import { Options } from "@vue-jsx-vapor/macros";
4
+
5
+ //#region src/options.d.ts
6
+ interface Options$1 {
7
+ include?: FilterPattern;
8
+ exclude?: FilterPattern;
9
+ interop?: boolean;
10
+ compile?: CompilerOptions;
11
+ /** @default true */
12
+ ref?: {
13
+ alias?: string[];
14
+ } | boolean;
15
+ /** @default false */
16
+ macros?: Options | boolean;
17
+ } //#endregion
18
+ export { Options$1 as Options };
@@ -1,3 +1,2 @@
1
- import { Options } from "./options.d-CA70vgwp.cjs";
2
-
1
+ import { Options } from "./options-BRfDD5qB.cjs";
3
2
  export { Options };
package/dist/options.d.ts CHANGED
@@ -1,3 +1,2 @@
1
- import { Options } from "./options.d-BAyccQwr.js";
2
-
1
+ import { Options } from "./options-CeDGvYqS.js";
3
2
  export { Options };
@@ -1,6 +1,5 @@
1
- "use strict";
2
- const require_chunk = require('./chunk-BCwAaXi7.cjs');
3
- const require_core = require('./core-B29W1zp3.cjs');
1
+ const require_chunk = require('./chunk-CUT6urMc.cjs');
2
+ const require_core = require('./core-BEqRwfoK.cjs');
4
3
  const __babel_core = require_chunk.__toESM(require("@babel/core"));
5
4
  const __babel_plugin_transform_typescript = require_chunk.__toESM(require("@babel/plugin-transform-typescript"));
6
5
  const __vue_jsx_vapor_macros_raw = require_chunk.__toESM(require("@vue-jsx-vapor/macros/raw"));
@@ -113,7 +112,7 @@ function isDefineComponentCall(node, names) {
113
112
 
114
113
  //#endregion
115
114
  //#region src/core/runtime.ts?raw
116
- var runtime_default = "import {\n effectScope,\n insert,\n isFragment,\n isVaporComponent,\n remove,\n renderEffect,\n VaporFragment\n} from \"vue\";\nexport { shallowRef as useRef } from \"vue\";\nfunction createFragment(nodes, anchor = document.createTextNode(\"\")) {\n const frag = new VaporFragment(nodes);\n frag.anchor = anchor;\n return frag;\n}\nfunction normalizeNode(node, anchor) {\n if (node instanceof Node || isFragment(node)) {\n anchor && (anchor.textContent = \"\");\n return node;\n } else if (isVaporComponent(node)) {\n anchor && (anchor.textContent = \"\");\n return createFragment(node, anchor);\n } else if (Array.isArray(node)) {\n anchor && (anchor.textContent = \"\");\n return createFragment(\n node.map((i) => normalizeNode(i)),\n anchor\n );\n } else {\n const result = node == null || typeof node === \"boolean\" ? \"\" : String(node);\n if (anchor) {\n anchor.textContent = result;\n return anchor;\n } else {\n return document.createTextNode(result);\n }\n }\n}\nfunction resolveValue(current, value, anchor) {\n const node = normalizeNode(value, anchor);\n if (current) {\n if (isFragment(current)) {\n const { anchor: anchor2 } = current;\n if (anchor2 && anchor2.parentNode) {\n remove(current.nodes, anchor2.parentNode);\n insert(node, anchor2.parentNode, anchor2);\n anchor2.remove();\n }\n } else if (current instanceof Node) {\n if (isFragment(node) && current.parentNode) {\n insert(node, current.parentNode, current);\n current.remove();\n } else if (node instanceof Node) {\n if (current.nodeType === 3 && node.nodeType === 3) {\n current.textContent = node.textContent;\n return current;\n } else if (current.parentNode) {\n current.parentNode.replaceChild(node, current);\n }\n }\n }\n }\n return node;\n}\nfunction resolveValues(values = [], _anchor) {\n const nodes = [];\n const scopes = [];\n for (const [index, value] of values.entries()) {\n const anchor = index === values.length - 1 ? _anchor : void 0;\n if (typeof value === \"function\") {\n renderEffect(() => {\n if (scopes[index]) scopes[index].stop();\n scopes[index] = effectScope();\n nodes[index] = scopes[index].run(\n () => resolveValue(nodes[index], value(), anchor)\n );\n });\n } else {\n nodes[index] = resolveValue(nodes[index], value, anchor);\n }\n }\n return nodes;\n}\nexport function setNodes(anchor, ...values) {\n const resolvedValues = resolveValues(values, anchor);\n anchor.parentNode && insert(resolvedValues, anchor.parentNode, anchor);\n}\nexport function createNodes(...values) {\n return resolveValues(values);\n}\n";
115
+ var runtime_default = "import {\n EffectScope,\n insert,\n isFragment,\n isVaporComponent,\n pauseTracking,\n proxyRefs,\n remove,\n renderEffect,\n resetTracking,\n toRefs,\n useAttrs,\n VaporFragment\n} from \"vue\";\nimport * as Vue from \"vue\";\nexport { shallowRef as useRef } from \"vue\";\nexport function getCurrentInstance() {\n return Vue.currentInstance || Vue.getCurrentInstance();\n}\nexport function useProps() {\n const i = getCurrentInstance();\n return i.props;\n}\nexport function useFullProps() {\n return proxyRefs({\n ...toRefs(useProps()),\n ...toRefs(useAttrs())\n });\n}\nfunction createFragment(nodes, anchor = document.createTextNode(\"\")) {\n const frag = new VaporFragment(nodes);\n frag.anchor = anchor;\n return frag;\n}\nfunction normalizeNode(node, anchor) {\n if (node instanceof Node || isFragment(node)) {\n anchor && (anchor.textContent = \"\");\n return node;\n } else if (isVaporComponent(node)) {\n anchor && (anchor.textContent = \"\");\n return createFragment(node, anchor);\n } else if (Array.isArray(node)) {\n anchor && (anchor.textContent = \"\");\n return createFragment(\n node.map((i) => normalizeNode(i)),\n anchor\n );\n } else {\n const result = node == null || typeof node === \"boolean\" ? \"\" : String(node);\n if (anchor) {\n anchor.textContent = result;\n return anchor;\n } else {\n return document.createTextNode(result);\n }\n }\n}\nfunction resolveValue(current, value, anchor) {\n const node = normalizeNode(value, anchor);\n if (current) {\n if (isFragment(current)) {\n const { anchor: anchor2 } = current;\n if (anchor2 && anchor2.parentNode) {\n remove(current.nodes, anchor2.parentNode);\n insert(node, anchor2.parentNode, anchor2);\n anchor2.remove();\n }\n } else if (current instanceof Node) {\n if (isFragment(node) && current.parentNode) {\n insert(node, current.parentNode, current);\n current.remove();\n } else if (node instanceof Node) {\n if (current.nodeType === 3 && node.nodeType === 3) {\n current.textContent = node.textContent;\n return current;\n } else if (current.parentNode) {\n current.parentNode.replaceChild(node, current);\n }\n }\n }\n }\n return node;\n}\nfunction resolveValues(values = [], _anchor) {\n const nodes = [];\n const scopes = [];\n for (const [index, value] of values.entries()) {\n const anchor = index === values.length - 1 ? _anchor : void 0;\n if (typeof value === \"function\") {\n renderEffect(() => {\n pauseTracking();\n if (scopes[index]) scopes[index].stop();\n scopes[index] = new EffectScope();\n nodes[index] = scopes[index].run(\n () => resolveValue(nodes[index], value(), anchor)\n );\n resetTracking();\n });\n } else {\n nodes[index] = resolveValue(nodes[index], value, anchor);\n }\n }\n return nodes;\n}\nexport function setNodes(anchor, ...values) {\n const resolvedValues = resolveValues(values, anchor);\n anchor.parentNode && insert(resolvedValues, anchor.parentNode, anchor);\n}\nexport function createNodes(...values) {\n return resolveValues(values);\n}\n";
117
116
 
118
117
  //#endregion
119
118
  //#region src/core/vue-jsx.ts
@@ -111,7 +111,7 @@ function isDefineComponentCall(node, names) {
111
111
 
112
112
  //#endregion
113
113
  //#region src/core/runtime.ts?raw
114
- var runtime_default = "import {\n effectScope,\n insert,\n isFragment,\n isVaporComponent,\n remove,\n renderEffect,\n VaporFragment\n} from \"vue\";\nexport { shallowRef as useRef } from \"vue\";\nfunction createFragment(nodes, anchor = document.createTextNode(\"\")) {\n const frag = new VaporFragment(nodes);\n frag.anchor = anchor;\n return frag;\n}\nfunction normalizeNode(node, anchor) {\n if (node instanceof Node || isFragment(node)) {\n anchor && (anchor.textContent = \"\");\n return node;\n } else if (isVaporComponent(node)) {\n anchor && (anchor.textContent = \"\");\n return createFragment(node, anchor);\n } else if (Array.isArray(node)) {\n anchor && (anchor.textContent = \"\");\n return createFragment(\n node.map((i) => normalizeNode(i)),\n anchor\n );\n } else {\n const result = node == null || typeof node === \"boolean\" ? \"\" : String(node);\n if (anchor) {\n anchor.textContent = result;\n return anchor;\n } else {\n return document.createTextNode(result);\n }\n }\n}\nfunction resolveValue(current, value, anchor) {\n const node = normalizeNode(value, anchor);\n if (current) {\n if (isFragment(current)) {\n const { anchor: anchor2 } = current;\n if (anchor2 && anchor2.parentNode) {\n remove(current.nodes, anchor2.parentNode);\n insert(node, anchor2.parentNode, anchor2);\n anchor2.remove();\n }\n } else if (current instanceof Node) {\n if (isFragment(node) && current.parentNode) {\n insert(node, current.parentNode, current);\n current.remove();\n } else if (node instanceof Node) {\n if (current.nodeType === 3 && node.nodeType === 3) {\n current.textContent = node.textContent;\n return current;\n } else if (current.parentNode) {\n current.parentNode.replaceChild(node, current);\n }\n }\n }\n }\n return node;\n}\nfunction resolveValues(values = [], _anchor) {\n const nodes = [];\n const scopes = [];\n for (const [index, value] of values.entries()) {\n const anchor = index === values.length - 1 ? _anchor : void 0;\n if (typeof value === \"function\") {\n renderEffect(() => {\n if (scopes[index]) scopes[index].stop();\n scopes[index] = effectScope();\n nodes[index] = scopes[index].run(\n () => resolveValue(nodes[index], value(), anchor)\n );\n });\n } else {\n nodes[index] = resolveValue(nodes[index], value, anchor);\n }\n }\n return nodes;\n}\nexport function setNodes(anchor, ...values) {\n const resolvedValues = resolveValues(values, anchor);\n anchor.parentNode && insert(resolvedValues, anchor.parentNode, anchor);\n}\nexport function createNodes(...values) {\n return resolveValues(values);\n}\n";
114
+ var runtime_default = "import {\n EffectScope,\n insert,\n isFragment,\n isVaporComponent,\n pauseTracking,\n proxyRefs,\n remove,\n renderEffect,\n resetTracking,\n toRefs,\n useAttrs,\n VaporFragment\n} from \"vue\";\nimport * as Vue from \"vue\";\nexport { shallowRef as useRef } from \"vue\";\nexport function getCurrentInstance() {\n return Vue.currentInstance || Vue.getCurrentInstance();\n}\nexport function useProps() {\n const i = getCurrentInstance();\n return i.props;\n}\nexport function useFullProps() {\n return proxyRefs({\n ...toRefs(useProps()),\n ...toRefs(useAttrs())\n });\n}\nfunction createFragment(nodes, anchor = document.createTextNode(\"\")) {\n const frag = new VaporFragment(nodes);\n frag.anchor = anchor;\n return frag;\n}\nfunction normalizeNode(node, anchor) {\n if (node instanceof Node || isFragment(node)) {\n anchor && (anchor.textContent = \"\");\n return node;\n } else if (isVaporComponent(node)) {\n anchor && (anchor.textContent = \"\");\n return createFragment(node, anchor);\n } else if (Array.isArray(node)) {\n anchor && (anchor.textContent = \"\");\n return createFragment(\n node.map((i) => normalizeNode(i)),\n anchor\n );\n } else {\n const result = node == null || typeof node === \"boolean\" ? \"\" : String(node);\n if (anchor) {\n anchor.textContent = result;\n return anchor;\n } else {\n return document.createTextNode(result);\n }\n }\n}\nfunction resolveValue(current, value, anchor) {\n const node = normalizeNode(value, anchor);\n if (current) {\n if (isFragment(current)) {\n const { anchor: anchor2 } = current;\n if (anchor2 && anchor2.parentNode) {\n remove(current.nodes, anchor2.parentNode);\n insert(node, anchor2.parentNode, anchor2);\n anchor2.remove();\n }\n } else if (current instanceof Node) {\n if (isFragment(node) && current.parentNode) {\n insert(node, current.parentNode, current);\n current.remove();\n } else if (node instanceof Node) {\n if (current.nodeType === 3 && node.nodeType === 3) {\n current.textContent = node.textContent;\n return current;\n } else if (current.parentNode) {\n current.parentNode.replaceChild(node, current);\n }\n }\n }\n }\n return node;\n}\nfunction resolveValues(values = [], _anchor) {\n const nodes = [];\n const scopes = [];\n for (const [index, value] of values.entries()) {\n const anchor = index === values.length - 1 ? _anchor : void 0;\n if (typeof value === \"function\") {\n renderEffect(() => {\n pauseTracking();\n if (scopes[index]) scopes[index].stop();\n scopes[index] = new EffectScope();\n nodes[index] = scopes[index].run(\n () => resolveValue(nodes[index], value(), anchor)\n );\n resetTracking();\n });\n } else {\n nodes[index] = resolveValue(nodes[index], value, anchor);\n }\n }\n return nodes;\n}\nexport function setNodes(anchor, ...values) {\n const resolvedValues = resolveValues(values, anchor);\n anchor.parentNode && insert(resolvedValues, anchor.parentNode, anchor);\n}\nexport function createNodes(...values) {\n return resolveValues(values);\n}\n";
115
115
 
116
116
  //#endregion
117
117
  //#region src/core/vue-jsx.ts
package/dist/raw.cjs CHANGED
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, '__esModule', { value: true });
2
- require('./core-B29W1zp3.cjs');
3
- const require_raw = require('./raw-CPEhZ9Wr.cjs');
2
+ require('./core-BEqRwfoK.cjs');
3
+ const require_raw = require('./raw-BY1njZIx.cjs');
4
4
 
5
- exports.default = require_raw.raw_default
5
+ exports.default = require_raw.raw_default;
package/dist/raw.d.cts CHANGED
@@ -1,4 +1,4 @@
1
- import { Options } from "./options.d-CA70vgwp.cjs";
1
+ import { Options } from "./options-BRfDD5qB.cjs";
2
2
  import { UnpluginOptions } from "unplugin";
3
3
 
4
4
  //#region src/raw.d.ts
package/dist/raw.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { Options } from "./options.d-BAyccQwr.js";
1
+ import { Options } from "./options-CeDGvYqS.js";
2
2
  import { UnpluginOptions } from "unplugin";
3
3
 
4
4
  //#region src/raw.d.ts
package/dist/raw.js CHANGED
@@ -1,4 +1,4 @@
1
1
  import "./core-BDE4GLH8.js";
2
- import { raw_default } from "./raw-D5n6wETp.js";
2
+ import { raw_default } from "./raw-DecHkpC5.js";
3
3
 
4
4
  export { raw_default as default };
package/dist/rolldown.cjs CHANGED
@@ -1,14 +1,13 @@
1
- "use strict";
2
1
  Object.defineProperty(exports, '__esModule', { value: true });
3
- const require_chunk = require('./chunk-BCwAaXi7.cjs');
4
- require('./core-B29W1zp3.cjs');
5
- require('./raw-CPEhZ9Wr.cjs');
2
+ const require_chunk = require('./chunk-CUT6urMc.cjs');
3
+ require('./core-BEqRwfoK.cjs');
4
+ require('./raw-BY1njZIx.cjs');
6
5
  require('./options-CulFO0WS.cjs');
7
- const require_unplugin = require('./unplugin-BE5nHMyo.cjs');
6
+ const require_unplugin = require('./unplugin-JV7CydWf.cjs');
8
7
  const unplugin = require_chunk.__toESM(require("unplugin"));
9
8
 
10
9
  //#region src/rolldown.ts
11
10
  var rolldown_default = (0, unplugin.createRollupPlugin)(require_unplugin.unpluginFactory);
12
11
 
13
12
  //#endregion
14
- exports.default = rolldown_default
13
+ exports.default = rolldown_default;
@@ -1,8 +1,8 @@
1
- import { Options } from "./options.d-CA70vgwp.cjs";
2
- import { Plugin } from "rollup";
1
+ import { Options } from "./options-BRfDD5qB.cjs";
2
+ import * as rollup7 from "rollup";
3
3
 
4
4
  //#region src/rolldown.d.ts
5
- declare const _default: (options?: Options | undefined) => Plugin<any> | Plugin<any>[];
5
+ declare const _default: (options?: Options | undefined) => rollup7.Plugin<any> | rollup7.Plugin<any>[];
6
6
 
7
7
  //#endregion
8
8
  export { _default as default };