@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
|
**/
|
|
@@ -141,81 +141,81 @@ const isSVGTag = /* @__PURE__ */ makeMap(SVG_TAGS);
|
|
|
141
141
|
const isMathMLTag = /* @__PURE__ */ makeMap(MATH_TAGS);
|
|
142
142
|
const isVoidTag = /* @__PURE__ */ makeMap(VOID_TAGS);
|
|
143
143
|
|
|
144
|
-
const FRAGMENT = Symbol(`Fragment` );
|
|
145
|
-
const TELEPORT = Symbol(`Teleport` );
|
|
146
|
-
const SUSPENSE = Symbol(`Suspense` );
|
|
147
|
-
const KEEP_ALIVE = Symbol(`KeepAlive` );
|
|
148
|
-
const BASE_TRANSITION = Symbol(
|
|
144
|
+
const FRAGMENT = /* @__PURE__ */ Symbol(`Fragment` );
|
|
145
|
+
const TELEPORT = /* @__PURE__ */ Symbol(`Teleport` );
|
|
146
|
+
const SUSPENSE = /* @__PURE__ */ Symbol(`Suspense` );
|
|
147
|
+
const KEEP_ALIVE = /* @__PURE__ */ Symbol(`KeepAlive` );
|
|
148
|
+
const BASE_TRANSITION = /* @__PURE__ */ Symbol(
|
|
149
149
|
`BaseTransition`
|
|
150
150
|
);
|
|
151
|
-
const OPEN_BLOCK = Symbol(`openBlock` );
|
|
152
|
-
const CREATE_BLOCK = Symbol(`createBlock` );
|
|
153
|
-
const CREATE_ELEMENT_BLOCK = Symbol(
|
|
151
|
+
const OPEN_BLOCK = /* @__PURE__ */ Symbol(`openBlock` );
|
|
152
|
+
const CREATE_BLOCK = /* @__PURE__ */ Symbol(`createBlock` );
|
|
153
|
+
const CREATE_ELEMENT_BLOCK = /* @__PURE__ */ Symbol(
|
|
154
154
|
`createElementBlock`
|
|
155
155
|
);
|
|
156
|
-
const CREATE_VNODE = Symbol(`createVNode` );
|
|
157
|
-
const CREATE_ELEMENT_VNODE = Symbol(
|
|
156
|
+
const CREATE_VNODE = /* @__PURE__ */ Symbol(`createVNode` );
|
|
157
|
+
const CREATE_ELEMENT_VNODE = /* @__PURE__ */ Symbol(
|
|
158
158
|
`createElementVNode`
|
|
159
159
|
);
|
|
160
|
-
const CREATE_COMMENT = Symbol(
|
|
160
|
+
const CREATE_COMMENT = /* @__PURE__ */ Symbol(
|
|
161
161
|
`createCommentVNode`
|
|
162
162
|
);
|
|
163
|
-
const CREATE_TEXT = Symbol(
|
|
163
|
+
const CREATE_TEXT = /* @__PURE__ */ Symbol(
|
|
164
164
|
`createTextVNode`
|
|
165
165
|
);
|
|
166
|
-
const CREATE_STATIC = Symbol(
|
|
166
|
+
const CREATE_STATIC = /* @__PURE__ */ Symbol(
|
|
167
167
|
`createStaticVNode`
|
|
168
168
|
);
|
|
169
|
-
const RESOLVE_COMPONENT = Symbol(
|
|
169
|
+
const RESOLVE_COMPONENT = /* @__PURE__ */ Symbol(
|
|
170
170
|
`resolveComponent`
|
|
171
171
|
);
|
|
172
|
-
const RESOLVE_DYNAMIC_COMPONENT = Symbol(
|
|
172
|
+
const RESOLVE_DYNAMIC_COMPONENT = /* @__PURE__ */ Symbol(
|
|
173
173
|
`resolveDynamicComponent`
|
|
174
174
|
);
|
|
175
|
-
const RESOLVE_DIRECTIVE = Symbol(
|
|
175
|
+
const RESOLVE_DIRECTIVE = /* @__PURE__ */ Symbol(
|
|
176
176
|
`resolveDirective`
|
|
177
177
|
);
|
|
178
|
-
const RESOLVE_FILTER = Symbol(
|
|
178
|
+
const RESOLVE_FILTER = /* @__PURE__ */ Symbol(
|
|
179
179
|
`resolveFilter`
|
|
180
180
|
);
|
|
181
|
-
const WITH_DIRECTIVES = Symbol(
|
|
181
|
+
const WITH_DIRECTIVES = /* @__PURE__ */ Symbol(
|
|
182
182
|
`withDirectives`
|
|
183
183
|
);
|
|
184
|
-
const RENDER_LIST = Symbol(`renderList` );
|
|
185
|
-
const RENDER_SLOT = Symbol(`renderSlot` );
|
|
186
|
-
const CREATE_SLOTS = Symbol(`createSlots` );
|
|
187
|
-
const TO_DISPLAY_STRING = Symbol(
|
|
184
|
+
const RENDER_LIST = /* @__PURE__ */ Symbol(`renderList` );
|
|
185
|
+
const RENDER_SLOT = /* @__PURE__ */ Symbol(`renderSlot` );
|
|
186
|
+
const CREATE_SLOTS = /* @__PURE__ */ Symbol(`createSlots` );
|
|
187
|
+
const TO_DISPLAY_STRING = /* @__PURE__ */ Symbol(
|
|
188
188
|
`toDisplayString`
|
|
189
189
|
);
|
|
190
|
-
const MERGE_PROPS = Symbol(`mergeProps` );
|
|
191
|
-
const NORMALIZE_CLASS = Symbol(
|
|
190
|
+
const MERGE_PROPS = /* @__PURE__ */ Symbol(`mergeProps` );
|
|
191
|
+
const NORMALIZE_CLASS = /* @__PURE__ */ Symbol(
|
|
192
192
|
`normalizeClass`
|
|
193
193
|
);
|
|
194
|
-
const NORMALIZE_STYLE = Symbol(
|
|
194
|
+
const NORMALIZE_STYLE = /* @__PURE__ */ Symbol(
|
|
195
195
|
`normalizeStyle`
|
|
196
196
|
);
|
|
197
|
-
const NORMALIZE_PROPS = Symbol(
|
|
197
|
+
const NORMALIZE_PROPS = /* @__PURE__ */ Symbol(
|
|
198
198
|
`normalizeProps`
|
|
199
199
|
);
|
|
200
|
-
const GUARD_REACTIVE_PROPS = Symbol(
|
|
200
|
+
const GUARD_REACTIVE_PROPS = /* @__PURE__ */ Symbol(
|
|
201
201
|
`guardReactiveProps`
|
|
202
202
|
);
|
|
203
|
-
const TO_HANDLERS = Symbol(`toHandlers` );
|
|
204
|
-
const CAMELIZE = Symbol(`camelize` );
|
|
205
|
-
const CAPITALIZE = Symbol(`capitalize` );
|
|
206
|
-
const TO_HANDLER_KEY = Symbol(
|
|
203
|
+
const TO_HANDLERS = /* @__PURE__ */ Symbol(`toHandlers` );
|
|
204
|
+
const CAMELIZE = /* @__PURE__ */ Symbol(`camelize` );
|
|
205
|
+
const CAPITALIZE = /* @__PURE__ */ Symbol(`capitalize` );
|
|
206
|
+
const TO_HANDLER_KEY = /* @__PURE__ */ Symbol(
|
|
207
207
|
`toHandlerKey`
|
|
208
208
|
);
|
|
209
|
-
const SET_BLOCK_TRACKING = Symbol(
|
|
209
|
+
const SET_BLOCK_TRACKING = /* @__PURE__ */ Symbol(
|
|
210
210
|
`setBlockTracking`
|
|
211
211
|
);
|
|
212
|
-
const PUSH_SCOPE_ID = Symbol(`pushScopeId` );
|
|
213
|
-
const POP_SCOPE_ID = Symbol(`popScopeId` );
|
|
214
|
-
const WITH_CTX = Symbol(`withCtx` );
|
|
215
|
-
const UNREF = Symbol(`unref` );
|
|
216
|
-
const IS_REF = Symbol(`isRef` );
|
|
217
|
-
const WITH_MEMO = Symbol(`withMemo` );
|
|
218
|
-
const IS_MEMO_SAME = Symbol(`isMemoSame` );
|
|
212
|
+
const PUSH_SCOPE_ID = /* @__PURE__ */ Symbol(`pushScopeId` );
|
|
213
|
+
const POP_SCOPE_ID = /* @__PURE__ */ Symbol(`popScopeId` );
|
|
214
|
+
const WITH_CTX = /* @__PURE__ */ Symbol(`withCtx` );
|
|
215
|
+
const UNREF = /* @__PURE__ */ Symbol(`unref` );
|
|
216
|
+
const IS_REF = /* @__PURE__ */ Symbol(`isRef` );
|
|
217
|
+
const WITH_MEMO = /* @__PURE__ */ Symbol(`withMemo` );
|
|
218
|
+
const IS_MEMO_SAME = /* @__PURE__ */ Symbol(`isMemoSame` );
|
|
219
219
|
const helperNameMap = {
|
|
220
220
|
[FRAGMENT]: `Fragment`,
|
|
221
221
|
[TELEPORT]: `Teleport`,
|
|
@@ -631,14 +631,28 @@ class Tokenizer {
|
|
|
631
631
|
getPos(index) {
|
|
632
632
|
let line = 1;
|
|
633
633
|
let column = index + 1;
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
634
|
+
const length = this.newlines.length;
|
|
635
|
+
let j = -1;
|
|
636
|
+
if (length > 100) {
|
|
637
|
+
let l = -1;
|
|
638
|
+
let r = length;
|
|
639
|
+
while (l + 1 < r) {
|
|
640
|
+
const m = l + r >>> 1;
|
|
641
|
+
this.newlines[m] < index ? l = m : r = m;
|
|
642
|
+
}
|
|
643
|
+
j = l;
|
|
644
|
+
} else {
|
|
645
|
+
for (let i = length - 1; i >= 0; i--) {
|
|
646
|
+
if (index > this.newlines[i]) {
|
|
647
|
+
j = i;
|
|
648
|
+
break;
|
|
649
|
+
}
|
|
640
650
|
}
|
|
641
651
|
}
|
|
652
|
+
if (j >= 0) {
|
|
653
|
+
line = j + 2;
|
|
654
|
+
column = index - this.newlines[j];
|
|
655
|
+
}
|
|
642
656
|
return {
|
|
643
657
|
column,
|
|
644
658
|
line,
|
|
@@ -1515,24 +1529,26 @@ const ErrorCodes = {
|
|
|
1515
1529
|
"43": "X_V_MODEL_ON_SCOPE_VARIABLE",
|
|
1516
1530
|
"X_V_MODEL_ON_PROPS": 44,
|
|
1517
1531
|
"44": "X_V_MODEL_ON_PROPS",
|
|
1518
|
-
"
|
|
1519
|
-
"45": "
|
|
1520
|
-
"
|
|
1521
|
-
"46": "
|
|
1522
|
-
"
|
|
1523
|
-
"47": "
|
|
1524
|
-
"
|
|
1525
|
-
"48": "
|
|
1526
|
-
"
|
|
1527
|
-
"49": "
|
|
1528
|
-
"
|
|
1529
|
-
"50": "
|
|
1530
|
-
"
|
|
1531
|
-
"51": "
|
|
1532
|
-
"
|
|
1533
|
-
"52": "
|
|
1534
|
-
"
|
|
1535
|
-
"53": "
|
|
1532
|
+
"X_V_MODEL_ON_CONST": 45,
|
|
1533
|
+
"45": "X_V_MODEL_ON_CONST",
|
|
1534
|
+
"X_INVALID_EXPRESSION": 46,
|
|
1535
|
+
"46": "X_INVALID_EXPRESSION",
|
|
1536
|
+
"X_KEEP_ALIVE_INVALID_CHILDREN": 47,
|
|
1537
|
+
"47": "X_KEEP_ALIVE_INVALID_CHILDREN",
|
|
1538
|
+
"X_PREFIX_ID_NOT_SUPPORTED": 48,
|
|
1539
|
+
"48": "X_PREFIX_ID_NOT_SUPPORTED",
|
|
1540
|
+
"X_MODULE_MODE_NOT_SUPPORTED": 49,
|
|
1541
|
+
"49": "X_MODULE_MODE_NOT_SUPPORTED",
|
|
1542
|
+
"X_CACHE_HANDLER_NOT_SUPPORTED": 50,
|
|
1543
|
+
"50": "X_CACHE_HANDLER_NOT_SUPPORTED",
|
|
1544
|
+
"X_SCOPE_ID_NOT_SUPPORTED": 51,
|
|
1545
|
+
"51": "X_SCOPE_ID_NOT_SUPPORTED",
|
|
1546
|
+
"X_VNODE_HOOKS": 52,
|
|
1547
|
+
"52": "X_VNODE_HOOKS",
|
|
1548
|
+
"X_V_BIND_INVALID_SAME_NAME_ARGUMENT": 53,
|
|
1549
|
+
"53": "X_V_BIND_INVALID_SAME_NAME_ARGUMENT",
|
|
1550
|
+
"__EXTEND_POINT__": 54,
|
|
1551
|
+
"54": "__EXTEND_POINT__"
|
|
1536
1552
|
};
|
|
1537
1553
|
const errorMessages = {
|
|
1538
1554
|
// parse errors
|
|
@@ -1573,7 +1589,7 @@ const errorMessages = {
|
|
|
1573
1589
|
[32]: `v-for has invalid expression.`,
|
|
1574
1590
|
[33]: `<template v-for> key should be placed on the <template> tag.`,
|
|
1575
1591
|
[34]: `v-bind is missing expression.`,
|
|
1576
|
-
[
|
|
1592
|
+
[53]: `v-bind with same-name shorthand only allows static argument.`,
|
|
1577
1593
|
[35]: `v-on is missing expression.`,
|
|
1578
1594
|
[36]: `Unexpected custom directive on <slot> outlet.`,
|
|
1579
1595
|
[37]: `Mixed v-slot usage on both the component and nested <template>. When there are multiple named slots, all slots should use <template> syntax to avoid scope ambiguity.`,
|
|
@@ -1585,16 +1601,17 @@ const errorMessages = {
|
|
|
1585
1601
|
[43]: `v-model cannot be used on v-for or v-slot scope variables because they are not writable.`,
|
|
1586
1602
|
[44]: `v-model cannot be used on a prop, because local prop bindings are not writable.
|
|
1587
1603
|
Use a v-bind binding combined with a v-on listener that emits update:x event instead.`,
|
|
1588
|
-
[45]: `
|
|
1589
|
-
[46]:
|
|
1590
|
-
[
|
|
1604
|
+
[45]: `v-model cannot be used on a const binding because it is not writable.`,
|
|
1605
|
+
[46]: `Error parsing JavaScript expression: `,
|
|
1606
|
+
[47]: `<KeepAlive> expects exactly one child component.`,
|
|
1607
|
+
[52]: `@vnode-* hooks in templates are no longer supported. Use the vue: prefix instead. For example, @vnode-mounted should be changed to @vue:mounted. @vnode-* hooks support has been removed in 3.4.`,
|
|
1591
1608
|
// generic errors
|
|
1592
|
-
[
|
|
1593
|
-
[
|
|
1594
|
-
[
|
|
1595
|
-
[
|
|
1609
|
+
[48]: `"prefixIdentifiers" option is not supported in this build of compiler.`,
|
|
1610
|
+
[49]: `ES module mode is not supported in this build of compiler.`,
|
|
1611
|
+
[50]: `"cacheHandlers" option is only supported when the "prefixIdentifiers" option is enabled.`,
|
|
1612
|
+
[51]: `"scopeId" option is only supported in module mode.`,
|
|
1596
1613
|
// just to fulfill types
|
|
1597
|
-
[
|
|
1614
|
+
[54]: ``
|
|
1598
1615
|
};
|
|
1599
1616
|
|
|
1600
1617
|
function walkIdentifiers(root, onIdentifier, includeAll = false, parentStack = [], knownIds = /* @__PURE__ */ Object.create(null)) {
|
|
@@ -2102,7 +2119,7 @@ function getMemoedVNodeCall(node) {
|
|
|
2102
2119
|
}
|
|
2103
2120
|
}
|
|
2104
2121
|
function filterNonCommentChildren(node) {
|
|
2105
|
-
return node.children.filter((n) => n
|
|
2122
|
+
return node.children.filter((n) => !isCommentOrWhitespace(n));
|
|
2106
2123
|
}
|
|
2107
2124
|
function hasSingleChild(node) {
|
|
2108
2125
|
return filterNonCommentChildren(node).length === 1;
|
|
@@ -4086,7 +4103,7 @@ function validateBrowserExpression(node, context, asParams = false, asRawStateme
|
|
|
4086
4103
|
}
|
|
4087
4104
|
context.onError(
|
|
4088
4105
|
createCompilerError(
|
|
4089
|
-
|
|
4106
|
+
46,
|
|
4090
4107
|
node.loc,
|
|
4091
4108
|
void 0,
|
|
4092
4109
|
message
|
|
@@ -4881,7 +4898,7 @@ const transformElement = (node, context) => {
|
|
|
4881
4898
|
patchFlag |= 1024;
|
|
4882
4899
|
if (node.children.length > 1) {
|
|
4883
4900
|
context.onError(
|
|
4884
|
-
createCompilerError(
|
|
4901
|
+
createCompilerError(47, {
|
|
4885
4902
|
start: node.children[0].loc.start,
|
|
4886
4903
|
end: node.children[node.children.length - 1].loc.end,
|
|
4887
4904
|
source: ""
|
|
@@ -5468,7 +5485,7 @@ const transformOn$1 = (dir, node, context, augmentor) => {
|
|
|
5468
5485
|
if (arg.isStatic) {
|
|
5469
5486
|
let rawName = arg.content;
|
|
5470
5487
|
if (rawName.startsWith("vnode")) {
|
|
5471
|
-
context.onError(createCompilerError(
|
|
5488
|
+
context.onError(createCompilerError(52, arg.loc));
|
|
5472
5489
|
}
|
|
5473
5490
|
if (rawName.startsWith("vue:")) {
|
|
5474
5491
|
rawName = `vnode-${rawName.slice(4)}`;
|
|
@@ -5701,6 +5718,10 @@ const transformModel$1 = (dir, node, context) => {
|
|
|
5701
5718
|
context.onError(createCompilerError(44, exp.loc));
|
|
5702
5719
|
return createTransformProps();
|
|
5703
5720
|
}
|
|
5721
|
+
if (bindingType === "literal-const" || bindingType === "setup-const") {
|
|
5722
|
+
context.onError(createCompilerError(45, exp.loc));
|
|
5723
|
+
return createTransformProps();
|
|
5724
|
+
}
|
|
5704
5725
|
if (!expString.trim() || !isMemberExpression(exp) && true) {
|
|
5705
5726
|
context.onError(
|
|
5706
5727
|
createCompilerError(42, exp.loc)
|
|
@@ -5929,7 +5950,7 @@ const transformVBindShorthand = (node, context) => {
|
|
|
5929
5950
|
if (arg.type !== 4 || !arg.isStatic) {
|
|
5930
5951
|
context.onError(
|
|
5931
5952
|
createCompilerError(
|
|
5932
|
-
|
|
5953
|
+
53,
|
|
5933
5954
|
arg.loc
|
|
5934
5955
|
)
|
|
5935
5956
|
);
|
|
@@ -5973,17 +5994,17 @@ function baseCompile(source, options = {}) {
|
|
|
5973
5994
|
const isModuleMode = options.mode === "module";
|
|
5974
5995
|
{
|
|
5975
5996
|
if (options.prefixIdentifiers === true) {
|
|
5976
|
-
onError(createCompilerError(47));
|
|
5977
|
-
} else if (isModuleMode) {
|
|
5978
5997
|
onError(createCompilerError(48));
|
|
5998
|
+
} else if (isModuleMode) {
|
|
5999
|
+
onError(createCompilerError(49));
|
|
5979
6000
|
}
|
|
5980
6001
|
}
|
|
5981
6002
|
const prefixIdentifiers = false;
|
|
5982
6003
|
if (options.cacheHandlers) {
|
|
5983
|
-
onError(createCompilerError(
|
|
6004
|
+
onError(createCompilerError(50));
|
|
5984
6005
|
}
|
|
5985
6006
|
if (options.scopeId && !isModuleMode) {
|
|
5986
|
-
onError(createCompilerError(
|
|
6007
|
+
onError(createCompilerError(51));
|
|
5987
6008
|
}
|
|
5988
6009
|
const resolvedOptions = extend({}, options, {
|
|
5989
6010
|
prefixIdentifiers
|
|
@@ -6024,26 +6045,26 @@ const BindingTypes = {
|
|
|
6024
6045
|
|
|
6025
6046
|
const noopDirectiveTransform = () => ({ props: [] });
|
|
6026
6047
|
|
|
6027
|
-
const V_MODEL_RADIO = Symbol(`vModelRadio` );
|
|
6028
|
-
const V_MODEL_CHECKBOX = Symbol(
|
|
6048
|
+
const V_MODEL_RADIO = /* @__PURE__ */ Symbol(`vModelRadio` );
|
|
6049
|
+
const V_MODEL_CHECKBOX = /* @__PURE__ */ Symbol(
|
|
6029
6050
|
`vModelCheckbox`
|
|
6030
6051
|
);
|
|
6031
|
-
const V_MODEL_TEXT = Symbol(`vModelText` );
|
|
6032
|
-
const V_MODEL_SELECT = Symbol(
|
|
6052
|
+
const V_MODEL_TEXT = /* @__PURE__ */ Symbol(`vModelText` );
|
|
6053
|
+
const V_MODEL_SELECT = /* @__PURE__ */ Symbol(
|
|
6033
6054
|
`vModelSelect`
|
|
6034
6055
|
);
|
|
6035
|
-
const V_MODEL_DYNAMIC = Symbol(
|
|
6056
|
+
const V_MODEL_DYNAMIC = /* @__PURE__ */ Symbol(
|
|
6036
6057
|
`vModelDynamic`
|
|
6037
6058
|
);
|
|
6038
|
-
const V_ON_WITH_MODIFIERS = Symbol(
|
|
6059
|
+
const V_ON_WITH_MODIFIERS = /* @__PURE__ */ Symbol(
|
|
6039
6060
|
`vOnModifiersGuard`
|
|
6040
6061
|
);
|
|
6041
|
-
const V_ON_WITH_KEYS = Symbol(
|
|
6062
|
+
const V_ON_WITH_KEYS = /* @__PURE__ */ Symbol(
|
|
6042
6063
|
`vOnKeysGuard`
|
|
6043
6064
|
);
|
|
6044
|
-
const V_SHOW = Symbol(`vShow` );
|
|
6045
|
-
const TRANSITION = Symbol(`Transition` );
|
|
6046
|
-
const TRANSITION_GROUP = Symbol(
|
|
6065
|
+
const V_SHOW = /* @__PURE__ */ Symbol(`vShow` );
|
|
6066
|
+
const TRANSITION = /* @__PURE__ */ Symbol(`Transition` );
|
|
6067
|
+
const TRANSITION_GROUP = /* @__PURE__ */ Symbol(
|
|
6047
6068
|
`TransitionGroup`
|
|
6048
6069
|
);
|
|
6049
6070
|
registerRuntimeHelpers({
|
|
@@ -6154,57 +6175,57 @@ function createDOMCompilerError(code, loc) {
|
|
|
6154
6175
|
);
|
|
6155
6176
|
}
|
|
6156
6177
|
const DOMErrorCodes = {
|
|
6157
|
-
"X_V_HTML_NO_EXPRESSION":
|
|
6158
|
-
"
|
|
6159
|
-
"X_V_HTML_WITH_CHILDREN":
|
|
6160
|
-
"
|
|
6161
|
-
"X_V_TEXT_NO_EXPRESSION":
|
|
6162
|
-
"
|
|
6163
|
-
"X_V_TEXT_WITH_CHILDREN":
|
|
6164
|
-
"
|
|
6165
|
-
"X_V_MODEL_ON_INVALID_ELEMENT":
|
|
6166
|
-
"
|
|
6167
|
-
"X_V_MODEL_ARG_ON_ELEMENT":
|
|
6168
|
-
"
|
|
6169
|
-
"X_V_MODEL_ON_FILE_INPUT_ELEMENT":
|
|
6170
|
-
"
|
|
6171
|
-
"X_V_MODEL_UNNECESSARY_VALUE":
|
|
6172
|
-
"
|
|
6173
|
-
"X_V_SHOW_NO_EXPRESSION":
|
|
6174
|
-
"
|
|
6175
|
-
"X_TRANSITION_INVALID_CHILDREN":
|
|
6176
|
-
"
|
|
6177
|
-
"X_IGNORED_SIDE_EFFECT_TAG":
|
|
6178
|
-
"
|
|
6179
|
-
"__EXTEND_POINT__":
|
|
6180
|
-
"
|
|
6178
|
+
"X_V_HTML_NO_EXPRESSION": 54,
|
|
6179
|
+
"54": "X_V_HTML_NO_EXPRESSION",
|
|
6180
|
+
"X_V_HTML_WITH_CHILDREN": 55,
|
|
6181
|
+
"55": "X_V_HTML_WITH_CHILDREN",
|
|
6182
|
+
"X_V_TEXT_NO_EXPRESSION": 56,
|
|
6183
|
+
"56": "X_V_TEXT_NO_EXPRESSION",
|
|
6184
|
+
"X_V_TEXT_WITH_CHILDREN": 57,
|
|
6185
|
+
"57": "X_V_TEXT_WITH_CHILDREN",
|
|
6186
|
+
"X_V_MODEL_ON_INVALID_ELEMENT": 58,
|
|
6187
|
+
"58": "X_V_MODEL_ON_INVALID_ELEMENT",
|
|
6188
|
+
"X_V_MODEL_ARG_ON_ELEMENT": 59,
|
|
6189
|
+
"59": "X_V_MODEL_ARG_ON_ELEMENT",
|
|
6190
|
+
"X_V_MODEL_ON_FILE_INPUT_ELEMENT": 60,
|
|
6191
|
+
"60": "X_V_MODEL_ON_FILE_INPUT_ELEMENT",
|
|
6192
|
+
"X_V_MODEL_UNNECESSARY_VALUE": 61,
|
|
6193
|
+
"61": "X_V_MODEL_UNNECESSARY_VALUE",
|
|
6194
|
+
"X_V_SHOW_NO_EXPRESSION": 62,
|
|
6195
|
+
"62": "X_V_SHOW_NO_EXPRESSION",
|
|
6196
|
+
"X_TRANSITION_INVALID_CHILDREN": 63,
|
|
6197
|
+
"63": "X_TRANSITION_INVALID_CHILDREN",
|
|
6198
|
+
"X_IGNORED_SIDE_EFFECT_TAG": 64,
|
|
6199
|
+
"64": "X_IGNORED_SIDE_EFFECT_TAG",
|
|
6200
|
+
"__EXTEND_POINT__": 65,
|
|
6201
|
+
"65": "__EXTEND_POINT__"
|
|
6181
6202
|
};
|
|
6182
6203
|
const DOMErrorMessages = {
|
|
6183
|
-
[
|
|
6184
|
-
[
|
|
6185
|
-
[
|
|
6186
|
-
[
|
|
6187
|
-
[
|
|
6188
|
-
[
|
|
6189
|
-
[
|
|
6190
|
-
[
|
|
6191
|
-
[
|
|
6192
|
-
[
|
|
6193
|
-
[
|
|
6204
|
+
[54]: `v-html is missing expression.`,
|
|
6205
|
+
[55]: `v-html will override element children.`,
|
|
6206
|
+
[56]: `v-text is missing expression.`,
|
|
6207
|
+
[57]: `v-text will override element children.`,
|
|
6208
|
+
[58]: `v-model can only be used on <input>, <textarea> and <select> elements.`,
|
|
6209
|
+
[59]: `v-model argument is not supported on plain elements.`,
|
|
6210
|
+
[60]: `v-model cannot be used on file inputs since they are read-only. Use a v-on:change listener instead.`,
|
|
6211
|
+
[61]: `Unnecessary value binding used alongside v-model. It will interfere with v-model's behavior.`,
|
|
6212
|
+
[62]: `v-show is missing expression.`,
|
|
6213
|
+
[63]: `<Transition> expects exactly one child element or component.`,
|
|
6214
|
+
[64]: `Tags with side effect (<script> and <style>) are ignored in client component templates.`,
|
|
6194
6215
|
// just to fulfill types
|
|
6195
|
-
[
|
|
6216
|
+
[65]: ``
|
|
6196
6217
|
};
|
|
6197
6218
|
|
|
6198
6219
|
const transformVHtml = (dir, node, context) => {
|
|
6199
6220
|
const { exp, loc } = dir;
|
|
6200
6221
|
if (!exp) {
|
|
6201
6222
|
context.onError(
|
|
6202
|
-
createDOMCompilerError(
|
|
6223
|
+
createDOMCompilerError(54, loc)
|
|
6203
6224
|
);
|
|
6204
6225
|
}
|
|
6205
6226
|
if (node.children.length) {
|
|
6206
6227
|
context.onError(
|
|
6207
|
-
createDOMCompilerError(
|
|
6228
|
+
createDOMCompilerError(55, loc)
|
|
6208
6229
|
);
|
|
6209
6230
|
node.children.length = 0;
|
|
6210
6231
|
}
|
|
@@ -6222,12 +6243,12 @@ const transformVText = (dir, node, context) => {
|
|
|
6222
6243
|
const { exp, loc } = dir;
|
|
6223
6244
|
if (!exp) {
|
|
6224
6245
|
context.onError(
|
|
6225
|
-
createDOMCompilerError(
|
|
6246
|
+
createDOMCompilerError(56, loc)
|
|
6226
6247
|
);
|
|
6227
6248
|
}
|
|
6228
6249
|
if (node.children.length) {
|
|
6229
6250
|
context.onError(
|
|
6230
|
-
createDOMCompilerError(
|
|
6251
|
+
createDOMCompilerError(57, loc)
|
|
6231
6252
|
);
|
|
6232
6253
|
node.children.length = 0;
|
|
6233
6254
|
}
|
|
@@ -6253,7 +6274,7 @@ const transformModel = (dir, node, context) => {
|
|
|
6253
6274
|
if (dir.arg) {
|
|
6254
6275
|
context.onError(
|
|
6255
6276
|
createDOMCompilerError(
|
|
6256
|
-
|
|
6277
|
+
59,
|
|
6257
6278
|
dir.arg.loc
|
|
6258
6279
|
)
|
|
6259
6280
|
);
|
|
@@ -6263,7 +6284,7 @@ const transformModel = (dir, node, context) => {
|
|
|
6263
6284
|
if (value && isStaticArgOf(value.arg, "value")) {
|
|
6264
6285
|
context.onError(
|
|
6265
6286
|
createDOMCompilerError(
|
|
6266
|
-
|
|
6287
|
+
61,
|
|
6267
6288
|
value.loc
|
|
6268
6289
|
)
|
|
6269
6290
|
);
|
|
@@ -6291,7 +6312,7 @@ const transformModel = (dir, node, context) => {
|
|
|
6291
6312
|
isInvalidType = true;
|
|
6292
6313
|
context.onError(
|
|
6293
6314
|
createDOMCompilerError(
|
|
6294
|
-
|
|
6315
|
+
60,
|
|
6295
6316
|
dir.loc
|
|
6296
6317
|
)
|
|
6297
6318
|
);
|
|
@@ -6317,7 +6338,7 @@ const transformModel = (dir, node, context) => {
|
|
|
6317
6338
|
} else {
|
|
6318
6339
|
context.onError(
|
|
6319
6340
|
createDOMCompilerError(
|
|
6320
|
-
|
|
6341
|
+
58,
|
|
6321
6342
|
dir.loc
|
|
6322
6343
|
)
|
|
6323
6344
|
);
|
|
@@ -6428,7 +6449,7 @@ const transformShow = (dir, node, context) => {
|
|
|
6428
6449
|
const { exp, loc } = dir;
|
|
6429
6450
|
if (!exp) {
|
|
6430
6451
|
context.onError(
|
|
6431
|
-
createDOMCompilerError(
|
|
6452
|
+
createDOMCompilerError(62, loc)
|
|
6432
6453
|
);
|
|
6433
6454
|
}
|
|
6434
6455
|
return {
|
|
@@ -6452,7 +6473,7 @@ function postTransformTransition(node, onError, hasMultipleChildren = defaultHas
|
|
|
6452
6473
|
}
|
|
6453
6474
|
if (hasMultipleChildren(node)) {
|
|
6454
6475
|
onError(
|
|
6455
|
-
createDOMCompilerError(
|
|
6476
|
+
createDOMCompilerError(63, {
|
|
6456
6477
|
start: node.children[0].loc.start,
|
|
6457
6478
|
end: node.children[node.children.length - 1].loc.end,
|
|
6458
6479
|
source: ""
|
|
@@ -6487,7 +6508,7 @@ const ignoreSideEffectTags = (node, context) => {
|
|
|
6487
6508
|
if (node.type === 1 && node.tagType === 0 && (node.tag === "script" || node.tag === "style")) {
|
|
6488
6509
|
context.onError(
|
|
6489
6510
|
createDOMCompilerError(
|
|
6490
|
-
|
|
6511
|
+
64,
|
|
6491
6512
|
node.loc
|
|
6492
6513
|
)
|
|
6493
6514
|
);
|