@vue/compiler-dom 3.6.0-alpha.7 → 3.6.0-beta.2
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/compiler-dom.cjs.js +58 -58
- package/dist/compiler-dom.cjs.prod.js +56 -56
- package/dist/compiler-dom.d.ts +12 -12
- package/dist/compiler-dom.esm-browser.js +160 -139
- package/dist/compiler-dom.esm-browser.prod.js +6 -6
- package/dist/compiler-dom.esm-bundler.js +58 -58
- package/dist/compiler-dom.global.js +160 -139
- package/dist/compiler-dom.global.prod.js +6 -6
- package/package.json +3 -3
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/compiler-dom v3.6.0-
|
|
2
|
+
* @vue/compiler-dom v3.6.0-beta.2
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -7,26 +7,26 @@ import { registerRuntimeHelpers, createSimpleExpression, createCompilerError, cr
|
|
|
7
7
|
export * from '@vue/compiler-core';
|
|
8
8
|
import { isHTMLTag, isSVGTag, isMathMLTag, isVoidTag, parseStringStyle, makeMap, capitalize, isString, extend } from '@vue/shared';
|
|
9
9
|
|
|
10
|
-
const V_MODEL_RADIO = Symbol(!!(process.env.NODE_ENV !== "production") ? `vModelRadio` : ``);
|
|
11
|
-
const V_MODEL_CHECKBOX = Symbol(
|
|
10
|
+
const V_MODEL_RADIO = /* @__PURE__ */ Symbol(!!(process.env.NODE_ENV !== "production") ? `vModelRadio` : ``);
|
|
11
|
+
const V_MODEL_CHECKBOX = /* @__PURE__ */ Symbol(
|
|
12
12
|
!!(process.env.NODE_ENV !== "production") ? `vModelCheckbox` : ``
|
|
13
13
|
);
|
|
14
|
-
const V_MODEL_TEXT = Symbol(!!(process.env.NODE_ENV !== "production") ? `vModelText` : ``);
|
|
15
|
-
const V_MODEL_SELECT = Symbol(
|
|
14
|
+
const V_MODEL_TEXT = /* @__PURE__ */ Symbol(!!(process.env.NODE_ENV !== "production") ? `vModelText` : ``);
|
|
15
|
+
const V_MODEL_SELECT = /* @__PURE__ */ Symbol(
|
|
16
16
|
!!(process.env.NODE_ENV !== "production") ? `vModelSelect` : ``
|
|
17
17
|
);
|
|
18
|
-
const V_MODEL_DYNAMIC = Symbol(
|
|
18
|
+
const V_MODEL_DYNAMIC = /* @__PURE__ */ Symbol(
|
|
19
19
|
!!(process.env.NODE_ENV !== "production") ? `vModelDynamic` : ``
|
|
20
20
|
);
|
|
21
|
-
const V_ON_WITH_MODIFIERS = Symbol(
|
|
21
|
+
const V_ON_WITH_MODIFIERS = /* @__PURE__ */ Symbol(
|
|
22
22
|
!!(process.env.NODE_ENV !== "production") ? `vOnModifiersGuard` : ``
|
|
23
23
|
);
|
|
24
|
-
const V_ON_WITH_KEYS = Symbol(
|
|
24
|
+
const V_ON_WITH_KEYS = /* @__PURE__ */ Symbol(
|
|
25
25
|
!!(process.env.NODE_ENV !== "production") ? `vOnKeysGuard` : ``
|
|
26
26
|
);
|
|
27
|
-
const V_SHOW = Symbol(!!(process.env.NODE_ENV !== "production") ? `vShow` : ``);
|
|
28
|
-
const TRANSITION = Symbol(!!(process.env.NODE_ENV !== "production") ? `Transition` : ``);
|
|
29
|
-
const TRANSITION_GROUP = Symbol(
|
|
27
|
+
const V_SHOW = /* @__PURE__ */ Symbol(!!(process.env.NODE_ENV !== "production") ? `vShow` : ``);
|
|
28
|
+
const TRANSITION = /* @__PURE__ */ Symbol(!!(process.env.NODE_ENV !== "production") ? `Transition` : ``);
|
|
29
|
+
const TRANSITION_GROUP = /* @__PURE__ */ Symbol(
|
|
30
30
|
!!(process.env.NODE_ENV !== "production") ? `TransitionGroup` : ``
|
|
31
31
|
);
|
|
32
32
|
registerRuntimeHelpers({
|
|
@@ -137,57 +137,57 @@ function createDOMCompilerError(code, loc) {
|
|
|
137
137
|
);
|
|
138
138
|
}
|
|
139
139
|
const DOMErrorCodes = {
|
|
140
|
-
"X_V_HTML_NO_EXPRESSION":
|
|
141
|
-
"
|
|
142
|
-
"X_V_HTML_WITH_CHILDREN":
|
|
143
|
-
"
|
|
144
|
-
"X_V_TEXT_NO_EXPRESSION":
|
|
145
|
-
"
|
|
146
|
-
"X_V_TEXT_WITH_CHILDREN":
|
|
147
|
-
"
|
|
148
|
-
"X_V_MODEL_ON_INVALID_ELEMENT":
|
|
149
|
-
"
|
|
150
|
-
"X_V_MODEL_ARG_ON_ELEMENT":
|
|
151
|
-
"
|
|
152
|
-
"X_V_MODEL_ON_FILE_INPUT_ELEMENT":
|
|
153
|
-
"
|
|
154
|
-
"X_V_MODEL_UNNECESSARY_VALUE":
|
|
155
|
-
"
|
|
156
|
-
"X_V_SHOW_NO_EXPRESSION":
|
|
157
|
-
"
|
|
158
|
-
"X_TRANSITION_INVALID_CHILDREN":
|
|
159
|
-
"
|
|
160
|
-
"X_IGNORED_SIDE_EFFECT_TAG":
|
|
161
|
-
"
|
|
162
|
-
"__EXTEND_POINT__":
|
|
163
|
-
"
|
|
140
|
+
"X_V_HTML_NO_EXPRESSION": 54,
|
|
141
|
+
"54": "X_V_HTML_NO_EXPRESSION",
|
|
142
|
+
"X_V_HTML_WITH_CHILDREN": 55,
|
|
143
|
+
"55": "X_V_HTML_WITH_CHILDREN",
|
|
144
|
+
"X_V_TEXT_NO_EXPRESSION": 56,
|
|
145
|
+
"56": "X_V_TEXT_NO_EXPRESSION",
|
|
146
|
+
"X_V_TEXT_WITH_CHILDREN": 57,
|
|
147
|
+
"57": "X_V_TEXT_WITH_CHILDREN",
|
|
148
|
+
"X_V_MODEL_ON_INVALID_ELEMENT": 58,
|
|
149
|
+
"58": "X_V_MODEL_ON_INVALID_ELEMENT",
|
|
150
|
+
"X_V_MODEL_ARG_ON_ELEMENT": 59,
|
|
151
|
+
"59": "X_V_MODEL_ARG_ON_ELEMENT",
|
|
152
|
+
"X_V_MODEL_ON_FILE_INPUT_ELEMENT": 60,
|
|
153
|
+
"60": "X_V_MODEL_ON_FILE_INPUT_ELEMENT",
|
|
154
|
+
"X_V_MODEL_UNNECESSARY_VALUE": 61,
|
|
155
|
+
"61": "X_V_MODEL_UNNECESSARY_VALUE",
|
|
156
|
+
"X_V_SHOW_NO_EXPRESSION": 62,
|
|
157
|
+
"62": "X_V_SHOW_NO_EXPRESSION",
|
|
158
|
+
"X_TRANSITION_INVALID_CHILDREN": 63,
|
|
159
|
+
"63": "X_TRANSITION_INVALID_CHILDREN",
|
|
160
|
+
"X_IGNORED_SIDE_EFFECT_TAG": 64,
|
|
161
|
+
"64": "X_IGNORED_SIDE_EFFECT_TAG",
|
|
162
|
+
"__EXTEND_POINT__": 65,
|
|
163
|
+
"65": "__EXTEND_POINT__"
|
|
164
164
|
};
|
|
165
165
|
const DOMErrorMessages = {
|
|
166
|
-
[
|
|
167
|
-
[
|
|
168
|
-
[
|
|
169
|
-
[
|
|
170
|
-
[
|
|
171
|
-
[
|
|
172
|
-
[
|
|
173
|
-
[
|
|
174
|
-
[
|
|
175
|
-
[
|
|
176
|
-
[
|
|
166
|
+
[54]: `v-html is missing expression.`,
|
|
167
|
+
[55]: `v-html will override element children.`,
|
|
168
|
+
[56]: `v-text is missing expression.`,
|
|
169
|
+
[57]: `v-text will override element children.`,
|
|
170
|
+
[58]: `v-model can only be used on <input>, <textarea> and <select> elements.`,
|
|
171
|
+
[59]: `v-model argument is not supported on plain elements.`,
|
|
172
|
+
[60]: `v-model cannot be used on file inputs since they are read-only. Use a v-on:change listener instead.`,
|
|
173
|
+
[61]: `Unnecessary value binding used alongside v-model. It will interfere with v-model's behavior.`,
|
|
174
|
+
[62]: `v-show is missing expression.`,
|
|
175
|
+
[63]: `<Transition> expects exactly one child element or component.`,
|
|
176
|
+
[64]: `Tags with side effect (<script> and <style>) are ignored in client component templates.`,
|
|
177
177
|
// just to fulfill types
|
|
178
|
-
[
|
|
178
|
+
[65]: ``
|
|
179
179
|
};
|
|
180
180
|
|
|
181
181
|
const transformVHtml = (dir, node, context) => {
|
|
182
182
|
const { exp, loc } = dir;
|
|
183
183
|
if (!exp) {
|
|
184
184
|
context.onError(
|
|
185
|
-
createDOMCompilerError(
|
|
185
|
+
createDOMCompilerError(54, loc)
|
|
186
186
|
);
|
|
187
187
|
}
|
|
188
188
|
if (node.children.length) {
|
|
189
189
|
context.onError(
|
|
190
|
-
createDOMCompilerError(
|
|
190
|
+
createDOMCompilerError(55, loc)
|
|
191
191
|
);
|
|
192
192
|
node.children.length = 0;
|
|
193
193
|
}
|
|
@@ -205,12 +205,12 @@ const transformVText = (dir, node, context) => {
|
|
|
205
205
|
const { exp, loc } = dir;
|
|
206
206
|
if (!exp) {
|
|
207
207
|
context.onError(
|
|
208
|
-
createDOMCompilerError(
|
|
208
|
+
createDOMCompilerError(56, loc)
|
|
209
209
|
);
|
|
210
210
|
}
|
|
211
211
|
if (node.children.length) {
|
|
212
212
|
context.onError(
|
|
213
|
-
createDOMCompilerError(
|
|
213
|
+
createDOMCompilerError(57, loc)
|
|
214
214
|
);
|
|
215
215
|
node.children.length = 0;
|
|
216
216
|
}
|
|
@@ -236,7 +236,7 @@ const transformModel = (dir, node, context) => {
|
|
|
236
236
|
if (dir.arg) {
|
|
237
237
|
context.onError(
|
|
238
238
|
createDOMCompilerError(
|
|
239
|
-
|
|
239
|
+
59,
|
|
240
240
|
dir.arg.loc
|
|
241
241
|
)
|
|
242
242
|
);
|
|
@@ -246,7 +246,7 @@ const transformModel = (dir, node, context) => {
|
|
|
246
246
|
if (value && isStaticArgOf(value.arg, "value")) {
|
|
247
247
|
context.onError(
|
|
248
248
|
createDOMCompilerError(
|
|
249
|
-
|
|
249
|
+
61,
|
|
250
250
|
value.loc
|
|
251
251
|
)
|
|
252
252
|
);
|
|
@@ -274,7 +274,7 @@ const transformModel = (dir, node, context) => {
|
|
|
274
274
|
isInvalidType = true;
|
|
275
275
|
context.onError(
|
|
276
276
|
createDOMCompilerError(
|
|
277
|
-
|
|
277
|
+
60,
|
|
278
278
|
dir.loc
|
|
279
279
|
)
|
|
280
280
|
);
|
|
@@ -300,7 +300,7 @@ const transformModel = (dir, node, context) => {
|
|
|
300
300
|
} else {
|
|
301
301
|
context.onError(
|
|
302
302
|
createDOMCompilerError(
|
|
303
|
-
|
|
303
|
+
58,
|
|
304
304
|
dir.loc
|
|
305
305
|
)
|
|
306
306
|
);
|
|
@@ -411,7 +411,7 @@ const transformShow = (dir, node, context) => {
|
|
|
411
411
|
const { exp, loc } = dir;
|
|
412
412
|
if (!exp) {
|
|
413
413
|
context.onError(
|
|
414
|
-
createDOMCompilerError(
|
|
414
|
+
createDOMCompilerError(62, loc)
|
|
415
415
|
);
|
|
416
416
|
}
|
|
417
417
|
return {
|
|
@@ -435,7 +435,7 @@ function postTransformTransition(node, onError, hasMultipleChildren = defaultHas
|
|
|
435
435
|
}
|
|
436
436
|
if (hasMultipleChildren(node)) {
|
|
437
437
|
onError(
|
|
438
|
-
createDOMCompilerError(
|
|
438
|
+
createDOMCompilerError(63, {
|
|
439
439
|
start: node.children[0].loc.start,
|
|
440
440
|
end: node.children[node.children.length - 1].loc.end,
|
|
441
441
|
source: ""
|
|
@@ -470,7 +470,7 @@ const ignoreSideEffectTags = (node, context) => {
|
|
|
470
470
|
if (node.type === 1 && node.tagType === 0 && (node.tag === "script" || node.tag === "style")) {
|
|
471
471
|
!!(process.env.NODE_ENV !== "production") && context.onError(
|
|
472
472
|
createDOMCompilerError(
|
|
473
|
-
|
|
473
|
+
64,
|
|
474
474
|
node.loc
|
|
475
475
|
)
|
|
476
476
|
);
|