@vue/compiler-dom 3.5.24 → 3.5.26
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 +54 -54
- package/dist/compiler-dom.d.ts +12 -12
- package/dist/compiler-dom.esm-browser.js +180 -160
- package/dist/compiler-dom.esm-browser.prod.js +9 -9
- package/dist/compiler-dom.esm-bundler.js +59 -59
- package/dist/compiler-dom.global.js +182 -159
- package/dist/compiler-dom.global.prod.js +11 -11
- package/package.json +3 -3
|
@@ -1,32 +1,32 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/compiler-dom v3.5.
|
|
2
|
+
* @vue/compiler-dom v3.5.26
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
6
|
-
import { registerRuntimeHelpers, createSimpleExpression, createCompilerError, createObjectProperty, createCallExpression, getConstantType, TO_DISPLAY_STRING, transformModel as transformModel$1, findProp, hasDynamicKeyVBind, findDir, isStaticArgOf, transformOn as transformOn$1, isStaticExp, createCompoundExpression, checkCompatEnabled, noopDirectiveTransform, baseCompile, baseParse } from '@vue/compiler-core';
|
|
6
|
+
import { registerRuntimeHelpers, createSimpleExpression, createCompilerError, createObjectProperty, createCallExpression, getConstantType, TO_DISPLAY_STRING, transformModel as transformModel$1, findProp, hasDynamicKeyVBind, findDir, isStaticArgOf, transformOn as transformOn$1, isStaticExp, createCompoundExpression, checkCompatEnabled, isCommentOrWhitespace, noopDirectiveTransform, baseCompile, baseParse } from '@vue/compiler-core';
|
|
7
7
|
export * from '@vue/compiler-core';
|
|
8
8
|
import { isHTMLTag, isSVGTag, isMathMLTag, isVoidTag, parseStringStyle, makeMap, capitalize, 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,55 +137,55 @@ 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
|
};
|
|
178
178
|
|
|
179
179
|
const transformVHtml = (dir, node, context) => {
|
|
180
180
|
const { exp, loc } = dir;
|
|
181
181
|
if (!exp) {
|
|
182
182
|
context.onError(
|
|
183
|
-
createDOMCompilerError(
|
|
183
|
+
createDOMCompilerError(54, loc)
|
|
184
184
|
);
|
|
185
185
|
}
|
|
186
186
|
if (node.children.length) {
|
|
187
187
|
context.onError(
|
|
188
|
-
createDOMCompilerError(
|
|
188
|
+
createDOMCompilerError(55, loc)
|
|
189
189
|
);
|
|
190
190
|
node.children.length = 0;
|
|
191
191
|
}
|
|
@@ -203,12 +203,12 @@ const transformVText = (dir, node, context) => {
|
|
|
203
203
|
const { exp, loc } = dir;
|
|
204
204
|
if (!exp) {
|
|
205
205
|
context.onError(
|
|
206
|
-
createDOMCompilerError(
|
|
206
|
+
createDOMCompilerError(56, loc)
|
|
207
207
|
);
|
|
208
208
|
}
|
|
209
209
|
if (node.children.length) {
|
|
210
210
|
context.onError(
|
|
211
|
-
createDOMCompilerError(
|
|
211
|
+
createDOMCompilerError(57, loc)
|
|
212
212
|
);
|
|
213
213
|
node.children.length = 0;
|
|
214
214
|
}
|
|
@@ -234,7 +234,7 @@ const transformModel = (dir, node, context) => {
|
|
|
234
234
|
if (dir.arg) {
|
|
235
235
|
context.onError(
|
|
236
236
|
createDOMCompilerError(
|
|
237
|
-
|
|
237
|
+
59,
|
|
238
238
|
dir.arg.loc
|
|
239
239
|
)
|
|
240
240
|
);
|
|
@@ -244,7 +244,7 @@ const transformModel = (dir, node, context) => {
|
|
|
244
244
|
if (value && isStaticArgOf(value.arg, "value")) {
|
|
245
245
|
context.onError(
|
|
246
246
|
createDOMCompilerError(
|
|
247
|
-
|
|
247
|
+
61,
|
|
248
248
|
value.loc
|
|
249
249
|
)
|
|
250
250
|
);
|
|
@@ -272,7 +272,7 @@ const transformModel = (dir, node, context) => {
|
|
|
272
272
|
isInvalidType = true;
|
|
273
273
|
context.onError(
|
|
274
274
|
createDOMCompilerError(
|
|
275
|
-
|
|
275
|
+
60,
|
|
276
276
|
dir.loc
|
|
277
277
|
)
|
|
278
278
|
);
|
|
@@ -298,7 +298,7 @@ const transformModel = (dir, node, context) => {
|
|
|
298
298
|
} else {
|
|
299
299
|
context.onError(
|
|
300
300
|
createDOMCompilerError(
|
|
301
|
-
|
|
301
|
+
58,
|
|
302
302
|
dir.loc
|
|
303
303
|
)
|
|
304
304
|
);
|
|
@@ -406,7 +406,7 @@ const transformShow = (dir, node, context) => {
|
|
|
406
406
|
const { exp, loc } = dir;
|
|
407
407
|
if (!exp) {
|
|
408
408
|
context.onError(
|
|
409
|
-
createDOMCompilerError(
|
|
409
|
+
createDOMCompilerError(62, loc)
|
|
410
410
|
);
|
|
411
411
|
}
|
|
412
412
|
return {
|
|
@@ -426,7 +426,7 @@ const transformTransition = (node, context) => {
|
|
|
426
426
|
if (hasMultipleChildren(node)) {
|
|
427
427
|
context.onError(
|
|
428
428
|
createDOMCompilerError(
|
|
429
|
-
|
|
429
|
+
63,
|
|
430
430
|
{
|
|
431
431
|
start: node.children[0].loc.start,
|
|
432
432
|
end: node.children[node.children.length - 1].loc.end,
|
|
@@ -455,7 +455,7 @@ const transformTransition = (node, context) => {
|
|
|
455
455
|
};
|
|
456
456
|
function hasMultipleChildren(node) {
|
|
457
457
|
const children = node.children = node.children.filter(
|
|
458
|
-
(c) =>
|
|
458
|
+
(c) => !isCommentOrWhitespace(c)
|
|
459
459
|
);
|
|
460
460
|
const child = children[0];
|
|
461
461
|
return children.length !== 1 || child.type === 11 || child.type === 9 && child.branches.some(hasMultipleChildren);
|
|
@@ -465,7 +465,7 @@ const ignoreSideEffectTags = (node, context) => {
|
|
|
465
465
|
if (node.type === 1 && node.tagType === 0 && (node.tag === "script" || node.tag === "style")) {
|
|
466
466
|
!!(process.env.NODE_ENV !== "production") && context.onError(
|
|
467
467
|
createDOMCompilerError(
|
|
468
|
-
|
|
468
|
+
64,
|
|
469
469
|
node.loc
|
|
470
470
|
)
|
|
471
471
|
);
|