vue-jsx-vapor 2.5.3 → 2.6.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/astro.cjs +2 -2
- package/dist/astro.js +2 -2
- package/dist/esbuild.cjs +2 -2
- package/dist/esbuild.d.ts +2 -2
- package/dist/esbuild.js +2 -2
- package/dist/index.cjs +7 -160
- package/dist/index.d.cts +1 -1400
- package/dist/index.d.ts +1 -1400
- package/dist/index.js +1 -148
- package/dist/nuxt.cjs +4 -4
- package/dist/nuxt.d.cts +2 -2
- package/dist/nuxt.d.ts +2 -2
- package/dist/nuxt.js +4 -4
- package/dist/{raw-BjP3gPbY.cjs → raw-B2YMrqwY.cjs} +0 -7
- package/dist/{raw-B9sTyvy7.js → raw-CWZ5g7Vk.js} +0 -7
- package/dist/raw.cjs +1 -1
- package/dist/raw.js +1 -1
- package/dist/rolldown.cjs +2 -2
- package/dist/rolldown.d.cts +2 -2
- package/dist/rolldown.d.ts +2 -2
- package/dist/rolldown.js +2 -2
- package/dist/rollup.cjs +2 -2
- package/dist/rollup.d.cts +2 -2
- package/dist/rollup.d.ts +2 -2
- package/dist/rollup.js +2 -2
- package/dist/rspack.cjs +2 -2
- package/dist/rspack.js +2 -2
- package/dist/{unplugin-DhoceK4a.js → unplugin-CyifZGPt.js} +1 -1
- package/dist/{unplugin-FVMt3g-d.cjs → unplugin-aKVZLoq9.cjs} +1 -1
- package/dist/unplugin.cjs +2 -2
- package/dist/unplugin.d.cts +2 -2
- package/dist/unplugin.d.ts +2 -2
- package/dist/unplugin.js +2 -2
- package/dist/{vite-BWHljTjb.cjs → vite-C63GJQHT.cjs} +1 -1
- package/dist/vite-Djd6MAt9.js +7 -0
- package/dist/vite.cjs +3 -3
- package/dist/vite.d.cts +2 -2
- package/dist/vite.d.ts +2 -2
- package/dist/vite.js +3 -3
- package/dist/volar.cjs +1 -1
- package/dist/volar.js +1 -1
- package/dist/{webpack-B-DlzoE4.js → webpack-3fgVTA33.js} +1 -1
- package/dist/{webpack-BYCaRcg_.cjs → webpack-CeAur76z.cjs} +1 -1
- package/dist/webpack.cjs +3 -3
- package/dist/webpack.d.cts +2 -2
- package/dist/webpack.d.ts +2 -2
- package/dist/webpack.js +3 -3
- package/jsx-runtime/index.cjs +45 -33
- package/jsx-runtime/index.d.ts +10 -12
- package/jsx-runtime/index.js +8 -10
- package/package.json +12 -15
- package/dist/vite-C5CQFFD-.js +0 -7
- package/jsx-runtime/index.d.cts +0 -25
package/dist/index.js
CHANGED
|
@@ -1,148 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import { EffectScope, Fragment, VaporFragment, createComponent as createComponent$1, createComponentWithFallback as createComponentWithFallback$1, createTextNode, insert, isFragment, isVaporComponent, proxyRefs, remove, renderEffect, shallowRef as useRef, toRefs, useAttrs } from "vue";
|
|
3
|
-
|
|
4
|
-
//#region src/core/runtime.ts
|
|
5
|
-
function isBlock(val) {
|
|
6
|
-
return val instanceof Node || Array.isArray(val) || isVaporComponent(val) || isFragment(val);
|
|
7
|
-
}
|
|
8
|
-
function getCurrentInstance() {
|
|
9
|
-
return Vue.currentInstance || Vue.getCurrentInstance();
|
|
10
|
-
}
|
|
11
|
-
const createProxyComponent = (createComponent$2, type, props, ...args) => {
|
|
12
|
-
if (type === Fragment) {
|
|
13
|
-
type = (_, { slots }) => slots.default();
|
|
14
|
-
props = null;
|
|
15
|
-
}
|
|
16
|
-
if (Vue.currentInstance && Vue.currentInstance.appContext.vapor) typeof type === "function" && (type.__vapor = true);
|
|
17
|
-
return createComponent$2(type, props, ...args);
|
|
18
|
-
};
|
|
19
|
-
const createComponent = (type, ...args) => {
|
|
20
|
-
return createProxyComponent(createComponent$1, type, ...args);
|
|
21
|
-
};
|
|
22
|
-
const createComponentWithFallback = (type, ...args) => createProxyComponent(createComponentWithFallback$1, type, ...args);
|
|
23
|
-
/**
|
|
24
|
-
* Returns the props of the current component instance.
|
|
25
|
-
*
|
|
26
|
-
* @example
|
|
27
|
-
* ```tsx
|
|
28
|
-
* import { useProps } from 'vue-jsx-vapor'
|
|
29
|
-
*
|
|
30
|
-
* defineComponent(({ foo = '' })=>{
|
|
31
|
-
* const props = useProps() // { foo: '' }
|
|
32
|
-
* })
|
|
33
|
-
* ```
|
|
34
|
-
*/
|
|
35
|
-
function useProps() {
|
|
36
|
-
const i = getCurrentInstance();
|
|
37
|
-
return i.props;
|
|
38
|
-
}
|
|
39
|
-
/**
|
|
40
|
-
* Returns the merged props and attrs of the current component.\
|
|
41
|
-
* Equivalent to `useProps()` + `useAttrs()`.
|
|
42
|
-
*
|
|
43
|
-
* @example
|
|
44
|
-
* ```tsx
|
|
45
|
-
* import { useFullProps } from 'vue-jsx-vapor'
|
|
46
|
-
*
|
|
47
|
-
* defineComponent((props) => {
|
|
48
|
-
* const fullProps = useFullProps() // = useAttrs() + useProps()
|
|
49
|
-
* })
|
|
50
|
-
*/
|
|
51
|
-
function useFullProps() {
|
|
52
|
-
return proxyRefs({
|
|
53
|
-
...toRefs(useProps()),
|
|
54
|
-
...toRefs(useAttrs())
|
|
55
|
-
});
|
|
56
|
-
}
|
|
57
|
-
function createFragment(nodes, anchor = document.createTextNode("")) {
|
|
58
|
-
const frag = new VaporFragment(nodes);
|
|
59
|
-
frag.anchor = anchor;
|
|
60
|
-
return frag;
|
|
61
|
-
}
|
|
62
|
-
function normalizeNode$1(node, anchor) {
|
|
63
|
-
if (node instanceof Node || isFragment(node)) {
|
|
64
|
-
anchor && (anchor.textContent = "");
|
|
65
|
-
return node;
|
|
66
|
-
} else if (isVaporComponent(node)) {
|
|
67
|
-
anchor && (anchor.textContent = "");
|
|
68
|
-
return createFragment(node, anchor);
|
|
69
|
-
} else if (Array.isArray(node)) {
|
|
70
|
-
anchor && (anchor.textContent = "");
|
|
71
|
-
return createFragment(node.map((i) => normalizeNode$1(i)), anchor);
|
|
72
|
-
} else {
|
|
73
|
-
const result = node == null || typeof node === "boolean" ? "" : String(node);
|
|
74
|
-
if (anchor) {
|
|
75
|
-
anchor.textContent = result;
|
|
76
|
-
return anchor;
|
|
77
|
-
} else return document.createTextNode(result);
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
function resolveValue(current, value, _anchor) {
|
|
81
|
-
const node = normalizeNode$1(value, _anchor);
|
|
82
|
-
if (current) {
|
|
83
|
-
if (isFragment(current)) {
|
|
84
|
-
const { anchor } = current;
|
|
85
|
-
if (anchor && anchor.parentNode) {
|
|
86
|
-
remove(current.nodes, anchor.parentNode);
|
|
87
|
-
insert(node, anchor.parentNode, anchor);
|
|
88
|
-
!_anchor && anchor.parentNode.removeChild(anchor);
|
|
89
|
-
}
|
|
90
|
-
} else if (current instanceof Node) {
|
|
91
|
-
if (isFragment(node) && current.parentNode) {
|
|
92
|
-
insert(node, current.parentNode, current);
|
|
93
|
-
current.parentNode.removeChild(current);
|
|
94
|
-
} else if (node instanceof Node) {
|
|
95
|
-
if (current.nodeType === 3 && node.nodeType === 3) {
|
|
96
|
-
current.textContent = node.textContent;
|
|
97
|
-
return current;
|
|
98
|
-
} else if (current.parentNode) current.parentNode.replaceChild(node, current);
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
return node;
|
|
103
|
-
}
|
|
104
|
-
function resolveValues(values = [], _anchor) {
|
|
105
|
-
const nodes = [];
|
|
106
|
-
const frag = createFragment(nodes, _anchor);
|
|
107
|
-
const scopes = [];
|
|
108
|
-
for (const [index, value] of values.entries()) {
|
|
109
|
-
const anchor = index === values.length - 1 ? _anchor : void 0;
|
|
110
|
-
if (typeof value === "function") renderEffect(() => {
|
|
111
|
-
if (scopes[index]) scopes[index].stop();
|
|
112
|
-
scopes[index] = new EffectScope();
|
|
113
|
-
nodes[index] = scopes[index].run(() => resolveValue(nodes[index], value(), anchor));
|
|
114
|
-
});
|
|
115
|
-
else nodes[index] = resolveValue(nodes[index], value, anchor);
|
|
116
|
-
}
|
|
117
|
-
return frag;
|
|
118
|
-
}
|
|
119
|
-
function setNodes(anchor, ...values) {
|
|
120
|
-
const resolvedValues = resolveValues(values, anchor);
|
|
121
|
-
anchor.parentNode && insert(resolvedValues, anchor.parentNode, anchor);
|
|
122
|
-
}
|
|
123
|
-
function createNodes(...values) {
|
|
124
|
-
return resolveValues(values);
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
//#endregion
|
|
128
|
-
//#region src/core/h.ts
|
|
129
|
-
function normalizeNode(node) {
|
|
130
|
-
if (node == null || typeof node === "boolean") return [];
|
|
131
|
-
else if (Array.isArray(node) && node.length) return node.map(normalizeNode);
|
|
132
|
-
else if (isBlock(node)) return node;
|
|
133
|
-
else return createTextNode(String(node));
|
|
134
|
-
}
|
|
135
|
-
function h(type, propsOrChildren, children) {
|
|
136
|
-
const l = arguments.length;
|
|
137
|
-
if (l === 2) if (typeof propsOrChildren === "object" && !Array.isArray(propsOrChildren)) {
|
|
138
|
-
if (isBlock(propsOrChildren)) return createComponentWithFallback(type, null, { default: () => normalizeNode(propsOrChildren) });
|
|
139
|
-
return createComponentWithFallback(type, propsOrChildren ? { $: [() => propsOrChildren] } : null);
|
|
140
|
-
} else return createComponentWithFallback(type, null, { default: () => normalizeNode(propsOrChildren) });
|
|
141
|
-
else {
|
|
142
|
-
if (l > 3) children = Array.prototype.slice.call(arguments, 2);
|
|
143
|
-
return createComponentWithFallback(type, propsOrChildren ? { $: [() => propsOrChildren] } : null, children ? typeof children === "object" && !Array.isArray(children) ? children : { default: () => normalizeNode(children) } : void 0);
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
//#endregion
|
|
148
|
-
export { createComponent, createComponentWithFallback, createNodes, getCurrentInstance, h, isBlock, setNodes, useFullProps, useProps, useRef };
|
|
1
|
+
export * from "@vue-jsx-vapor/runtime"
|
package/dist/nuxt.cjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
2
2
|
const require_chunk = require('./chunk-CUT6urMc.cjs');
|
|
3
3
|
require('./core-C-41-Q2Y.cjs');
|
|
4
|
-
require('./raw-
|
|
5
|
-
require('./unplugin-
|
|
6
|
-
const require_vite = require('./vite-
|
|
7
|
-
const require_webpack = require('./webpack-
|
|
4
|
+
require('./raw-B2YMrqwY.cjs');
|
|
5
|
+
require('./unplugin-aKVZLoq9.cjs');
|
|
6
|
+
const require_vite = require('./vite-C63GJQHT.cjs');
|
|
7
|
+
const require_webpack = require('./webpack-CeAur76z.cjs');
|
|
8
8
|
const __nuxt_kit = require_chunk.__toESM(require("@nuxt/kit"));
|
|
9
9
|
require("@nuxt/schema");
|
|
10
10
|
|
package/dist/nuxt.d.cts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Options } from "./options-jKAq0dFf.cjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as _nuxt_schema2 from "@nuxt/schema";
|
|
3
3
|
|
|
4
4
|
//#region src/nuxt.d.ts
|
|
5
5
|
interface ModuleOptions extends Options {}
|
|
6
|
-
declare const _default:
|
|
6
|
+
declare const _default: _nuxt_schema2.NuxtModule<ModuleOptions, ModuleOptions, false>;
|
|
7
7
|
//#endregion
|
|
8
8
|
export { ModuleOptions, _default as default };
|
package/dist/nuxt.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Options } from "./options-CBMw6D8V.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as _nuxt_schema13 from "@nuxt/schema";
|
|
3
3
|
|
|
4
4
|
//#region src/nuxt.d.ts
|
|
5
5
|
interface ModuleOptions extends Options {}
|
|
6
|
-
declare const _default:
|
|
6
|
+
declare const _default: _nuxt_schema13.NuxtModule<ModuleOptions, ModuleOptions, false>;
|
|
7
7
|
//#endregion
|
|
8
8
|
export { ModuleOptions, _default as default };
|
package/dist/nuxt.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import "./core-CJgJmh2O.js";
|
|
2
|
-
import "./raw-
|
|
3
|
-
import "./unplugin-
|
|
4
|
-
import { vite_default } from "./vite-
|
|
5
|
-
import { webpack_default } from "./webpack-
|
|
2
|
+
import "./raw-CWZ5g7Vk.js";
|
|
3
|
+
import "./unplugin-CyifZGPt.js";
|
|
4
|
+
import { vite_default } from "./vite-Djd6MAt9.js";
|
|
5
|
+
import { webpack_default } from "./webpack-3fgVTA33.js";
|
|
6
6
|
import { addVitePlugin, addWebpackPlugin, defineNuxtModule } from "@nuxt/kit";
|
|
7
7
|
import "@nuxt/schema";
|
|
8
8
|
|
|
@@ -110,10 +110,6 @@ function isDefineComponentCall(node, names) {
|
|
|
110
110
|
return !!(node && node.type === "CallExpression" && node.callee.type === "Identifier" && names.includes(node.callee.name));
|
|
111
111
|
}
|
|
112
112
|
|
|
113
|
-
//#endregion
|
|
114
|
-
//#region src/core/runtime.ts?raw
|
|
115
|
-
var runtime_default = "import {\n createComponent as _createComponent,\n createComponentWithFallback as _createComponentWithFallback,\n EffectScope,\n Fragment,\n insert,\n isFragment,\n isVaporComponent,\n proxyRefs,\n remove,\n renderEffect,\n toRefs,\n useAttrs,\n VaporFragment\n} from \"vue\";\nimport * as Vue from \"vue\";\nexport function isBlock(val) {\n return val instanceof Node || Array.isArray(val) || isVaporComponent(val) || isFragment(val);\n}\nexport function getCurrentInstance() {\n return Vue.currentInstance || Vue.getCurrentInstance();\n}\nconst createProxyComponent = (createComponent2, type, props, ...args) => {\n if (type === Fragment) {\n type = (_, { slots }) => slots.default();\n props = null;\n }\n if (Vue.currentInstance && Vue.currentInstance.appContext.vapor) {\n typeof type === \"function\" && (type.__vapor = true);\n }\n return createComponent2(type, props, ...args);\n};\nexport const createComponent = (type, ...args) => {\n return createProxyComponent(_createComponent, type, ...args);\n};\nexport const createComponentWithFallback = (type, ...args) => createProxyComponent(_createComponentWithFallback, type, ...args);\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 } = current;\n if (anchor && anchor.parentNode) {\n remove(current.nodes, anchor.parentNode);\n insert(node, anchor.parentNode, anchor);\n !_anchor && anchor.parentNode.removeChild(anchor);\n }\n } else if (current instanceof Node) {\n if (isFragment(node) && current.parentNode) {\n insert(node, current.parentNode, current);\n current.parentNode.removeChild(current);\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 frag = createFragment(nodes, _anchor);\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] = new 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 frag;\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";
|
|
116
|
-
|
|
117
113
|
//#endregion
|
|
118
114
|
//#region src/core/vue-jsx.ts
|
|
119
115
|
function transformVueJsx(code, id, needSourceMap = false) {
|
|
@@ -163,15 +159,12 @@ const plugin = (options = {}) => {
|
|
|
163
159
|
},
|
|
164
160
|
resolveId(id) {
|
|
165
161
|
if (id === ssrRegisterHelperId) return id;
|
|
166
|
-
if ((0, unplugin_utils.normalizePath)(id) === "vue-jsx-vapor/runtime") return id;
|
|
167
162
|
},
|
|
168
163
|
loadInclude(id) {
|
|
169
164
|
if (id === ssrRegisterHelperId) return true;
|
|
170
|
-
return (0, unplugin_utils.normalizePath)(id) === "vue-jsx-vapor/runtime";
|
|
171
165
|
},
|
|
172
166
|
load(id) {
|
|
173
167
|
if (id === ssrRegisterHelperId) return ssrRegisterHelperCode;
|
|
174
|
-
if ((0, unplugin_utils.normalizePath)(id) === "vue-jsx-vapor/runtime") return runtime_default;
|
|
175
168
|
},
|
|
176
169
|
transformInclude,
|
|
177
170
|
transform(code, id, opt) {
|
|
@@ -109,10 +109,6 @@ function isDefineComponentCall(node, names) {
|
|
|
109
109
|
return !!(node && node.type === "CallExpression" && node.callee.type === "Identifier" && names.includes(node.callee.name));
|
|
110
110
|
}
|
|
111
111
|
|
|
112
|
-
//#endregion
|
|
113
|
-
//#region src/core/runtime.ts?raw
|
|
114
|
-
var runtime_default = "import {\n createComponent as _createComponent,\n createComponentWithFallback as _createComponentWithFallback,\n EffectScope,\n Fragment,\n insert,\n isFragment,\n isVaporComponent,\n proxyRefs,\n remove,\n renderEffect,\n toRefs,\n useAttrs,\n VaporFragment\n} from \"vue\";\nimport * as Vue from \"vue\";\nexport function isBlock(val) {\n return val instanceof Node || Array.isArray(val) || isVaporComponent(val) || isFragment(val);\n}\nexport function getCurrentInstance() {\n return Vue.currentInstance || Vue.getCurrentInstance();\n}\nconst createProxyComponent = (createComponent2, type, props, ...args) => {\n if (type === Fragment) {\n type = (_, { slots }) => slots.default();\n props = null;\n }\n if (Vue.currentInstance && Vue.currentInstance.appContext.vapor) {\n typeof type === \"function\" && (type.__vapor = true);\n }\n return createComponent2(type, props, ...args);\n};\nexport const createComponent = (type, ...args) => {\n return createProxyComponent(_createComponent, type, ...args);\n};\nexport const createComponentWithFallback = (type, ...args) => createProxyComponent(_createComponentWithFallback, type, ...args);\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 } = current;\n if (anchor && anchor.parentNode) {\n remove(current.nodes, anchor.parentNode);\n insert(node, anchor.parentNode, anchor);\n !_anchor && anchor.parentNode.removeChild(anchor);\n }\n } else if (current instanceof Node) {\n if (isFragment(node) && current.parentNode) {\n insert(node, current.parentNode, current);\n current.parentNode.removeChild(current);\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 frag = createFragment(nodes, _anchor);\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] = new 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 frag;\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
|
-
|
|
116
112
|
//#endregion
|
|
117
113
|
//#region src/core/vue-jsx.ts
|
|
118
114
|
function transformVueJsx(code, id, needSourceMap = false) {
|
|
@@ -162,15 +158,12 @@ const plugin = (options = {}) => {
|
|
|
162
158
|
},
|
|
163
159
|
resolveId(id) {
|
|
164
160
|
if (id === ssrRegisterHelperId) return id;
|
|
165
|
-
if (normalizePath(id) === "vue-jsx-vapor/runtime") return id;
|
|
166
161
|
},
|
|
167
162
|
loadInclude(id) {
|
|
168
163
|
if (id === ssrRegisterHelperId) return true;
|
|
169
|
-
return normalizePath(id) === "vue-jsx-vapor/runtime";
|
|
170
164
|
},
|
|
171
165
|
load(id) {
|
|
172
166
|
if (id === ssrRegisterHelperId) return ssrRegisterHelperCode;
|
|
173
|
-
if (normalizePath(id) === "vue-jsx-vapor/runtime") return runtime_default;
|
|
174
167
|
},
|
|
175
168
|
transformInclude,
|
|
176
169
|
transform(code, id, opt) {
|
package/dist/raw.cjs
CHANGED
package/dist/raw.js
CHANGED
package/dist/rolldown.cjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
2
2
|
const require_chunk = require('./chunk-CUT6urMc.cjs');
|
|
3
3
|
require('./core-C-41-Q2Y.cjs');
|
|
4
|
-
require('./raw-
|
|
5
|
-
const require_unplugin = require('./unplugin-
|
|
4
|
+
require('./raw-B2YMrqwY.cjs');
|
|
5
|
+
const require_unplugin = require('./unplugin-aKVZLoq9.cjs');
|
|
6
6
|
const unplugin = require_chunk.__toESM(require("unplugin"));
|
|
7
7
|
|
|
8
8
|
//#region src/rolldown.ts
|
package/dist/rolldown.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Options } from "./options-jKAq0dFf.cjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as rollup10 from "rollup";
|
|
3
3
|
|
|
4
4
|
//#region src/rolldown.d.ts
|
|
5
|
-
declare const _default: (options?: Options | undefined) =>
|
|
5
|
+
declare const _default: (options?: Options | undefined) => rollup10.Plugin<any> | rollup10.Plugin<any>[];
|
|
6
6
|
//#endregion
|
|
7
7
|
export { _default as default };
|
package/dist/rolldown.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Options } from "./options-CBMw6D8V.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as rollup1 from "rollup";
|
|
3
3
|
|
|
4
4
|
//#region src/rolldown.d.ts
|
|
5
|
-
declare const _default: (options?: Options | undefined) =>
|
|
5
|
+
declare const _default: (options?: Options | undefined) => rollup1.Plugin<any> | rollup1.Plugin<any>[];
|
|
6
6
|
//#endregion
|
|
7
7
|
export { _default as default };
|
package/dist/rolldown.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "./core-CJgJmh2O.js";
|
|
2
|
-
import "./raw-
|
|
3
|
-
import { unpluginFactory } from "./unplugin-
|
|
2
|
+
import "./raw-CWZ5g7Vk.js";
|
|
3
|
+
import { unpluginFactory } from "./unplugin-CyifZGPt.js";
|
|
4
4
|
import { createRollupPlugin } from "unplugin";
|
|
5
5
|
|
|
6
6
|
//#region src/rolldown.ts
|
package/dist/rollup.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
2
2
|
require('./core-C-41-Q2Y.cjs');
|
|
3
|
-
require('./raw-
|
|
4
|
-
const require_unplugin = require('./unplugin-
|
|
3
|
+
require('./raw-B2YMrqwY.cjs');
|
|
4
|
+
const require_unplugin = require('./unplugin-aKVZLoq9.cjs');
|
|
5
5
|
|
|
6
6
|
//#region src/rollup.ts
|
|
7
7
|
var rollup_default = require_unplugin.unplugin_default.rollup;
|
package/dist/rollup.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Options } from "./options-jKAq0dFf.cjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as rollup7 from "rollup";
|
|
3
3
|
|
|
4
4
|
//#region src/rollup.d.ts
|
|
5
|
-
declare const _default: (options?: Options | undefined) =>
|
|
5
|
+
declare const _default: (options?: Options | undefined) => rollup7.Plugin<any>[];
|
|
6
6
|
//#endregion
|
|
7
7
|
export { _default as default };
|
package/dist/rollup.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Options } from "./options-CBMw6D8V.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as rollup8 from "rollup";
|
|
3
3
|
|
|
4
4
|
//#region src/rollup.d.ts
|
|
5
|
-
declare const _default: (options?: Options | undefined) =>
|
|
5
|
+
declare const _default: (options?: Options | undefined) => rollup8.Plugin<any>[];
|
|
6
6
|
//#endregion
|
|
7
7
|
export { _default as default };
|
package/dist/rollup.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "./core-CJgJmh2O.js";
|
|
2
|
-
import "./raw-
|
|
3
|
-
import { unplugin_default } from "./unplugin-
|
|
2
|
+
import "./raw-CWZ5g7Vk.js";
|
|
3
|
+
import { unplugin_default } from "./unplugin-CyifZGPt.js";
|
|
4
4
|
|
|
5
5
|
//#region src/rollup.ts
|
|
6
6
|
var rollup_default = unplugin_default.rollup;
|
package/dist/rspack.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
2
2
|
require('./core-C-41-Q2Y.cjs');
|
|
3
|
-
require('./raw-
|
|
4
|
-
const require_unplugin = require('./unplugin-
|
|
3
|
+
require('./raw-B2YMrqwY.cjs');
|
|
4
|
+
const require_unplugin = require('./unplugin-aKVZLoq9.cjs');
|
|
5
5
|
|
|
6
6
|
//#region src/rspack.ts
|
|
7
7
|
var rspack_default = require_unplugin.unplugin_default.rspack;
|
package/dist/rspack.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "./core-CJgJmh2O.js";
|
|
2
|
-
import "./raw-
|
|
3
|
-
import { unplugin_default } from "./unplugin-
|
|
2
|
+
import "./raw-CWZ5g7Vk.js";
|
|
3
|
+
import { unplugin_default } from "./unplugin-CyifZGPt.js";
|
|
4
4
|
|
|
5
5
|
//#region src/rspack.ts
|
|
6
6
|
var rspack_default = unplugin_default.rspack;
|
package/dist/unplugin.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
2
2
|
require('./core-C-41-Q2Y.cjs');
|
|
3
|
-
require('./raw-
|
|
4
|
-
const require_unplugin = require('./unplugin-
|
|
3
|
+
require('./raw-B2YMrqwY.cjs');
|
|
4
|
+
const require_unplugin = require('./unplugin-aKVZLoq9.cjs');
|
|
5
5
|
|
|
6
6
|
exports.default = require_unplugin.unplugin_default;
|
|
7
7
|
exports.unplugin = require_unplugin.unplugin;
|
package/dist/unplugin.d.cts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Options } from "./options-jKAq0dFf.cjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as unplugin5 from "unplugin";
|
|
3
3
|
import { UnpluginFactory } from "unplugin";
|
|
4
4
|
|
|
5
5
|
//#region src/unplugin.d.ts
|
|
6
6
|
declare const unpluginFactory: UnpluginFactory<Options | undefined, true>;
|
|
7
|
-
declare const unplugin:
|
|
7
|
+
declare const unplugin: unplugin5.UnpluginInstance<Options | undefined, true>;
|
|
8
8
|
//#endregion
|
|
9
9
|
export { Options, unplugin as default, unplugin, unpluginFactory };
|
package/dist/unplugin.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Options } from "./options-CBMw6D8V.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as unplugin12 from "unplugin";
|
|
3
3
|
import { UnpluginFactory } from "unplugin";
|
|
4
4
|
|
|
5
5
|
//#region src/unplugin.d.ts
|
|
6
6
|
declare const unpluginFactory: UnpluginFactory<Options | undefined, true>;
|
|
7
|
-
declare const unplugin:
|
|
7
|
+
declare const unplugin: unplugin12.UnpluginInstance<Options | undefined, true>;
|
|
8
8
|
//#endregion
|
|
9
9
|
export { Options, unplugin as default, unplugin, unpluginFactory };
|
package/dist/unplugin.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "./core-CJgJmh2O.js";
|
|
2
|
-
import "./raw-
|
|
3
|
-
import { unplugin, unpluginFactory, unplugin_default } from "./unplugin-
|
|
2
|
+
import "./raw-CWZ5g7Vk.js";
|
|
3
|
+
import { unplugin, unpluginFactory, unplugin_default } from "./unplugin-CyifZGPt.js";
|
|
4
4
|
|
|
5
5
|
export { unplugin_default as default, unplugin, unpluginFactory };
|
package/dist/vite.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
2
2
|
require('./core-C-41-Q2Y.cjs');
|
|
3
|
-
require('./raw-
|
|
4
|
-
require('./unplugin-
|
|
5
|
-
const require_vite = require('./vite-
|
|
3
|
+
require('./raw-B2YMrqwY.cjs');
|
|
4
|
+
require('./unplugin-aKVZLoq9.cjs');
|
|
5
|
+
const require_vite = require('./vite-C63GJQHT.cjs');
|
|
6
6
|
|
|
7
7
|
exports.default = require_vite.vite_default;
|
package/dist/vite.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Options } from "./options-jKAq0dFf.cjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as vite4 from "vite";
|
|
3
3
|
|
|
4
4
|
//#region src/vite.d.ts
|
|
5
|
-
declare const _default: (options?: Options | undefined) =>
|
|
5
|
+
declare const _default: (options?: Options | undefined) => vite4.Plugin<any>[];
|
|
6
6
|
//#endregion
|
|
7
7
|
export { _default as default };
|
package/dist/vite.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Options } from "./options-CBMw6D8V.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as vite4 from "vite";
|
|
3
3
|
|
|
4
4
|
//#region src/vite.d.ts
|
|
5
|
-
declare const _default: (options?: Options | undefined) =>
|
|
5
|
+
declare const _default: (options?: Options | undefined) => vite4.Plugin<any>[];
|
|
6
6
|
//#endregion
|
|
7
7
|
export { _default as default };
|
package/dist/vite.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "./core-CJgJmh2O.js";
|
|
2
|
-
import "./raw-
|
|
3
|
-
import "./unplugin-
|
|
4
|
-
import { vite_default } from "./vite-
|
|
2
|
+
import "./raw-CWZ5g7Vk.js";
|
|
3
|
+
import "./unplugin-CyifZGPt.js";
|
|
4
|
+
import { vite_default } from "./vite-Djd6MAt9.js";
|
|
5
5
|
|
|
6
6
|
export { vite_default as default };
|
package/dist/volar.cjs
CHANGED
|
@@ -6,7 +6,7 @@ const __vue_macros_volar_jsx_ref = require_chunk.__toESM(require("@vue-macros/vo
|
|
|
6
6
|
const ts_macro = require_chunk.__toESM(require("ts-macro"));
|
|
7
7
|
|
|
8
8
|
//#region src/volar.ts
|
|
9
|
-
const plugin = (0, ts_macro.createPlugin)((ctx, options = ctx.vueCompilerOptions["vue-jsx-vapor"]) => {
|
|
9
|
+
const plugin = (0, ts_macro.createPlugin)((ctx, options = ctx.vueCompilerOptions?.["vue-jsx-vapor"]) => {
|
|
10
10
|
return [
|
|
11
11
|
(0, __vue_macros_volar_jsx_directive.default)()(ctx),
|
|
12
12
|
options?.ref === false ? [] : (0, __vue_macros_volar_jsx_ref.default)(options?.ref === true ? void 0 : options?.ref)(ctx),
|
package/dist/volar.js
CHANGED
|
@@ -4,7 +4,7 @@ import jsxRef from "@vue-macros/volar/jsx-ref";
|
|
|
4
4
|
import { createPlugin } from "ts-macro";
|
|
5
5
|
|
|
6
6
|
//#region src/volar.ts
|
|
7
|
-
const plugin = createPlugin((ctx, options = ctx.vueCompilerOptions["vue-jsx-vapor"]) => {
|
|
7
|
+
const plugin = createPlugin((ctx, options = ctx.vueCompilerOptions?.["vue-jsx-vapor"]) => {
|
|
8
8
|
return [
|
|
9
9
|
jsxDirective()(ctx),
|
|
10
10
|
options?.ref === false ? [] : jsxRef(options?.ref === true ? void 0 : options?.ref)(ctx),
|
package/dist/webpack.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
2
2
|
require('./core-C-41-Q2Y.cjs');
|
|
3
|
-
require('./raw-
|
|
4
|
-
require('./unplugin-
|
|
5
|
-
const require_webpack = require('./webpack-
|
|
3
|
+
require('./raw-B2YMrqwY.cjs');
|
|
4
|
+
require('./unplugin-aKVZLoq9.cjs');
|
|
5
|
+
const require_webpack = require('./webpack-CeAur76z.cjs');
|
|
6
6
|
|
|
7
7
|
exports.default = require_webpack.webpack_default;
|
package/dist/webpack.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Options } from "./options-jKAq0dFf.cjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as webpack13 from "webpack";
|
|
3
3
|
|
|
4
4
|
//#region src/webpack.d.ts
|
|
5
|
-
declare const _default: (options?: Options | undefined) =>
|
|
5
|
+
declare const _default: (options?: Options | undefined) => webpack13.WebpackPluginInstance;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { _default as default };
|
package/dist/webpack.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Options } from "./options-CBMw6D8V.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as webpack10 from "webpack";
|
|
3
3
|
|
|
4
4
|
//#region src/webpack.d.ts
|
|
5
|
-
declare const _default: (options?: Options | undefined) =>
|
|
5
|
+
declare const _default: (options?: Options | undefined) => webpack10.WebpackPluginInstance;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { _default as default };
|
package/dist/webpack.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "./core-CJgJmh2O.js";
|
|
2
|
-
import "./raw-
|
|
3
|
-
import "./unplugin-
|
|
4
|
-
import { webpack_default } from "./webpack-
|
|
2
|
+
import "./raw-CWZ5g7Vk.js";
|
|
3
|
+
import "./unplugin-CyifZGPt.js";
|
|
4
|
+
import { webpack_default } from "./webpack-3fgVTA33.js";
|
|
5
5
|
|
|
6
6
|
export { webpack_default as default };
|