@vue/compiler-dom 3.4.0-alpha.3 → 3.4.0-alpha.4

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.
@@ -10,8 +10,8 @@ var VueCompilerDOM = (function (exports) {
10
10
  const NOOP = () => {
11
11
  };
12
12
  const NO = () => false;
13
- const onRE = /^on[^a-z]/;
14
- const isOn = (key) => onRE.test(key);
13
+ const isOn = (key) => key.charCodeAt(0) === 111 && key.charCodeAt(1) === 110 && // uppercase letter
14
+ (key.charCodeAt(2) > 122 || key.charCodeAt(2) < 97);
15
15
  const extend = Object.assign;
16
16
  const isArray = Array.isArray;
17
17
  const isString = (val) => typeof val === "string";
@@ -215,6 +215,90 @@ var VueCompilerDOM = (function (exports) {
215
215
  });
216
216
  }
217
217
 
218
+ const Namespaces = {
219
+ "HTML": 0,
220
+ "0": "HTML",
221
+ "SVG": 1,
222
+ "1": "SVG",
223
+ "MATH_ML": 2,
224
+ "2": "MATH_ML"
225
+ };
226
+ const NodeTypes = {
227
+ "ROOT": 0,
228
+ "0": "ROOT",
229
+ "ELEMENT": 1,
230
+ "1": "ELEMENT",
231
+ "TEXT": 2,
232
+ "2": "TEXT",
233
+ "COMMENT": 3,
234
+ "3": "COMMENT",
235
+ "SIMPLE_EXPRESSION": 4,
236
+ "4": "SIMPLE_EXPRESSION",
237
+ "INTERPOLATION": 5,
238
+ "5": "INTERPOLATION",
239
+ "ATTRIBUTE": 6,
240
+ "6": "ATTRIBUTE",
241
+ "DIRECTIVE": 7,
242
+ "7": "DIRECTIVE",
243
+ "COMPOUND_EXPRESSION": 8,
244
+ "8": "COMPOUND_EXPRESSION",
245
+ "IF": 9,
246
+ "9": "IF",
247
+ "IF_BRANCH": 10,
248
+ "10": "IF_BRANCH",
249
+ "FOR": 11,
250
+ "11": "FOR",
251
+ "TEXT_CALL": 12,
252
+ "12": "TEXT_CALL",
253
+ "VNODE_CALL": 13,
254
+ "13": "VNODE_CALL",
255
+ "JS_CALL_EXPRESSION": 14,
256
+ "14": "JS_CALL_EXPRESSION",
257
+ "JS_OBJECT_EXPRESSION": 15,
258
+ "15": "JS_OBJECT_EXPRESSION",
259
+ "JS_PROPERTY": 16,
260
+ "16": "JS_PROPERTY",
261
+ "JS_ARRAY_EXPRESSION": 17,
262
+ "17": "JS_ARRAY_EXPRESSION",
263
+ "JS_FUNCTION_EXPRESSION": 18,
264
+ "18": "JS_FUNCTION_EXPRESSION",
265
+ "JS_CONDITIONAL_EXPRESSION": 19,
266
+ "19": "JS_CONDITIONAL_EXPRESSION",
267
+ "JS_CACHE_EXPRESSION": 20,
268
+ "20": "JS_CACHE_EXPRESSION",
269
+ "JS_BLOCK_STATEMENT": 21,
270
+ "21": "JS_BLOCK_STATEMENT",
271
+ "JS_TEMPLATE_LITERAL": 22,
272
+ "22": "JS_TEMPLATE_LITERAL",
273
+ "JS_IF_STATEMENT": 23,
274
+ "23": "JS_IF_STATEMENT",
275
+ "JS_ASSIGNMENT_EXPRESSION": 24,
276
+ "24": "JS_ASSIGNMENT_EXPRESSION",
277
+ "JS_SEQUENCE_EXPRESSION": 25,
278
+ "25": "JS_SEQUENCE_EXPRESSION",
279
+ "JS_RETURN_STATEMENT": 26,
280
+ "26": "JS_RETURN_STATEMENT"
281
+ };
282
+ const ElementTypes = {
283
+ "ELEMENT": 0,
284
+ "0": "ELEMENT",
285
+ "COMPONENT": 1,
286
+ "1": "COMPONENT",
287
+ "SLOT": 2,
288
+ "2": "SLOT",
289
+ "TEMPLATE": 3,
290
+ "3": "TEMPLATE"
291
+ };
292
+ const ConstantTypes = {
293
+ "NOT_CONSTANT": 0,
294
+ "0": "NOT_CONSTANT",
295
+ "CAN_SKIP_PATCH": 1,
296
+ "1": "CAN_SKIP_PATCH",
297
+ "CAN_HOIST": 2,
298
+ "2": "CAN_HOIST",
299
+ "CAN_STRINGIFY": 3,
300
+ "3": "CAN_STRINGIFY"
301
+ };
218
302
  const locStub = {
219
303
  start: { line: 1, column: 1, offset: 0 },
220
304
  end: { line: 1, column: 1, offset: 0 },
@@ -469,7 +553,9 @@ var VueCompilerDOM = (function (exports) {
469
553
  this.inRCDATA = false;
470
554
  /** For disabling RCDATA tags handling */
471
555
  this.inXML = false;
472
- /** Reocrd newline positions for fast line / column calculation */
556
+ /** For disabling interpolation parsing in v-pre */
557
+ this.inVPre = false;
558
+ /** Record newline positions for fast line / column calculation */
473
559
  this.newlines = [];
474
560
  this.mode = 0;
475
561
  this.delimiterOpen = defaultDelimitersOpen;
@@ -488,6 +574,7 @@ var VueCompilerDOM = (function (exports) {
488
574
  this.sectionStart = 0;
489
575
  this.index = 0;
490
576
  this.baseState = 1;
577
+ this.inRCDATA = false;
491
578
  this.currentSequence = void 0;
492
579
  this.newlines.length = 0;
493
580
  this.delimiterOpen = defaultDelimitersOpen;
@@ -526,7 +613,7 @@ var VueCompilerDOM = (function (exports) {
526
613
  }
527
614
  this.state = 5;
528
615
  this.sectionStart = this.index;
529
- } else if (c === this.delimiterOpen[0]) {
616
+ } else if (!this.inVPre && c === this.delimiterOpen[0]) {
530
617
  this.state = 2;
531
618
  this.delimiterIndex = 0;
532
619
  this.stateInterpolationOpen(c);
@@ -1208,6 +1295,16 @@ var VueCompilerDOM = (function (exports) {
1208
1295
  }
1209
1296
  }
1210
1297
 
1298
+ const CompilerDeprecationTypes = {
1299
+ "COMPILER_IS_ON_ELEMENT": "COMPILER_IS_ON_ELEMENT",
1300
+ "COMPILER_V_BIND_SYNC": "COMPILER_V_BIND_SYNC",
1301
+ "COMPILER_V_BIND_OBJECT_ORDER": "COMPILER_V_BIND_OBJECT_ORDER",
1302
+ "COMPILER_V_ON_NATIVE": "COMPILER_V_ON_NATIVE",
1303
+ "COMPILER_V_IF_V_FOR_PRECEDENCE": "COMPILER_V_IF_V_FOR_PRECEDENCE",
1304
+ "COMPILER_NATIVE_TEMPLATE": "COMPILER_NATIVE_TEMPLATE",
1305
+ "COMPILER_INLINE_TEMPLATE": "COMPILER_INLINE_TEMPLATE",
1306
+ "COMPILER_FILTERS": "COMPILER_FILTER"
1307
+ };
1211
1308
  const deprecationData = {
1212
1309
  ["COMPILER_IS_ON_ELEMENT"]: {
1213
1310
  message: `Platform-native elements with "is" prop will no longer be treated as components in Vue 3 unless the "is" value is explicitly prefixed with "vue:".`,
@@ -1289,6 +1386,114 @@ var VueCompilerDOM = (function (exports) {
1289
1386
  error.loc = loc;
1290
1387
  return error;
1291
1388
  }
1389
+ const ErrorCodes = {
1390
+ "ABRUPT_CLOSING_OF_EMPTY_COMMENT": 0,
1391
+ "0": "ABRUPT_CLOSING_OF_EMPTY_COMMENT",
1392
+ "CDATA_IN_HTML_CONTENT": 1,
1393
+ "1": "CDATA_IN_HTML_CONTENT",
1394
+ "DUPLICATE_ATTRIBUTE": 2,
1395
+ "2": "DUPLICATE_ATTRIBUTE",
1396
+ "END_TAG_WITH_ATTRIBUTES": 3,
1397
+ "3": "END_TAG_WITH_ATTRIBUTES",
1398
+ "END_TAG_WITH_TRAILING_SOLIDUS": 4,
1399
+ "4": "END_TAG_WITH_TRAILING_SOLIDUS",
1400
+ "EOF_BEFORE_TAG_NAME": 5,
1401
+ "5": "EOF_BEFORE_TAG_NAME",
1402
+ "EOF_IN_CDATA": 6,
1403
+ "6": "EOF_IN_CDATA",
1404
+ "EOF_IN_COMMENT": 7,
1405
+ "7": "EOF_IN_COMMENT",
1406
+ "EOF_IN_SCRIPT_HTML_COMMENT_LIKE_TEXT": 8,
1407
+ "8": "EOF_IN_SCRIPT_HTML_COMMENT_LIKE_TEXT",
1408
+ "EOF_IN_TAG": 9,
1409
+ "9": "EOF_IN_TAG",
1410
+ "INCORRECTLY_CLOSED_COMMENT": 10,
1411
+ "10": "INCORRECTLY_CLOSED_COMMENT",
1412
+ "INCORRECTLY_OPENED_COMMENT": 11,
1413
+ "11": "INCORRECTLY_OPENED_COMMENT",
1414
+ "INVALID_FIRST_CHARACTER_OF_TAG_NAME": 12,
1415
+ "12": "INVALID_FIRST_CHARACTER_OF_TAG_NAME",
1416
+ "MISSING_ATTRIBUTE_VALUE": 13,
1417
+ "13": "MISSING_ATTRIBUTE_VALUE",
1418
+ "MISSING_END_TAG_NAME": 14,
1419
+ "14": "MISSING_END_TAG_NAME",
1420
+ "MISSING_WHITESPACE_BETWEEN_ATTRIBUTES": 15,
1421
+ "15": "MISSING_WHITESPACE_BETWEEN_ATTRIBUTES",
1422
+ "NESTED_COMMENT": 16,
1423
+ "16": "NESTED_COMMENT",
1424
+ "UNEXPECTED_CHARACTER_IN_ATTRIBUTE_NAME": 17,
1425
+ "17": "UNEXPECTED_CHARACTER_IN_ATTRIBUTE_NAME",
1426
+ "UNEXPECTED_CHARACTER_IN_UNQUOTED_ATTRIBUTE_VALUE": 18,
1427
+ "18": "UNEXPECTED_CHARACTER_IN_UNQUOTED_ATTRIBUTE_VALUE",
1428
+ "UNEXPECTED_EQUALS_SIGN_BEFORE_ATTRIBUTE_NAME": 19,
1429
+ "19": "UNEXPECTED_EQUALS_SIGN_BEFORE_ATTRIBUTE_NAME",
1430
+ "UNEXPECTED_NULL_CHARACTER": 20,
1431
+ "20": "UNEXPECTED_NULL_CHARACTER",
1432
+ "UNEXPECTED_QUESTION_MARK_INSTEAD_OF_TAG_NAME": 21,
1433
+ "21": "UNEXPECTED_QUESTION_MARK_INSTEAD_OF_TAG_NAME",
1434
+ "UNEXPECTED_SOLIDUS_IN_TAG": 22,
1435
+ "22": "UNEXPECTED_SOLIDUS_IN_TAG",
1436
+ "X_INVALID_END_TAG": 23,
1437
+ "23": "X_INVALID_END_TAG",
1438
+ "X_MISSING_END_TAG": 24,
1439
+ "24": "X_MISSING_END_TAG",
1440
+ "X_MISSING_INTERPOLATION_END": 25,
1441
+ "25": "X_MISSING_INTERPOLATION_END",
1442
+ "X_MISSING_DIRECTIVE_NAME": 26,
1443
+ "26": "X_MISSING_DIRECTIVE_NAME",
1444
+ "X_MISSING_DYNAMIC_DIRECTIVE_ARGUMENT_END": 27,
1445
+ "27": "X_MISSING_DYNAMIC_DIRECTIVE_ARGUMENT_END",
1446
+ "X_V_IF_NO_EXPRESSION": 28,
1447
+ "28": "X_V_IF_NO_EXPRESSION",
1448
+ "X_V_IF_SAME_KEY": 29,
1449
+ "29": "X_V_IF_SAME_KEY",
1450
+ "X_V_ELSE_NO_ADJACENT_IF": 30,
1451
+ "30": "X_V_ELSE_NO_ADJACENT_IF",
1452
+ "X_V_FOR_NO_EXPRESSION": 31,
1453
+ "31": "X_V_FOR_NO_EXPRESSION",
1454
+ "X_V_FOR_MALFORMED_EXPRESSION": 32,
1455
+ "32": "X_V_FOR_MALFORMED_EXPRESSION",
1456
+ "X_V_FOR_TEMPLATE_KEY_PLACEMENT": 33,
1457
+ "33": "X_V_FOR_TEMPLATE_KEY_PLACEMENT",
1458
+ "X_V_BIND_NO_EXPRESSION": 34,
1459
+ "34": "X_V_BIND_NO_EXPRESSION",
1460
+ "X_V_ON_NO_EXPRESSION": 35,
1461
+ "35": "X_V_ON_NO_EXPRESSION",
1462
+ "X_V_SLOT_UNEXPECTED_DIRECTIVE_ON_SLOT_OUTLET": 36,
1463
+ "36": "X_V_SLOT_UNEXPECTED_DIRECTIVE_ON_SLOT_OUTLET",
1464
+ "X_V_SLOT_MIXED_SLOT_USAGE": 37,
1465
+ "37": "X_V_SLOT_MIXED_SLOT_USAGE",
1466
+ "X_V_SLOT_DUPLICATE_SLOT_NAMES": 38,
1467
+ "38": "X_V_SLOT_DUPLICATE_SLOT_NAMES",
1468
+ "X_V_SLOT_EXTRANEOUS_DEFAULT_SLOT_CHILDREN": 39,
1469
+ "39": "X_V_SLOT_EXTRANEOUS_DEFAULT_SLOT_CHILDREN",
1470
+ "X_V_SLOT_MISPLACED": 40,
1471
+ "40": "X_V_SLOT_MISPLACED",
1472
+ "X_V_MODEL_NO_EXPRESSION": 41,
1473
+ "41": "X_V_MODEL_NO_EXPRESSION",
1474
+ "X_V_MODEL_MALFORMED_EXPRESSION": 42,
1475
+ "42": "X_V_MODEL_MALFORMED_EXPRESSION",
1476
+ "X_V_MODEL_ON_SCOPE_VARIABLE": 43,
1477
+ "43": "X_V_MODEL_ON_SCOPE_VARIABLE",
1478
+ "X_V_MODEL_ON_PROPS": 44,
1479
+ "44": "X_V_MODEL_ON_PROPS",
1480
+ "X_INVALID_EXPRESSION": 45,
1481
+ "45": "X_INVALID_EXPRESSION",
1482
+ "X_KEEP_ALIVE_INVALID_CHILDREN": 46,
1483
+ "46": "X_KEEP_ALIVE_INVALID_CHILDREN",
1484
+ "X_VNODE_HOOKS": 47,
1485
+ "47": "X_VNODE_HOOKS",
1486
+ "X_PREFIX_ID_NOT_SUPPORTED": 48,
1487
+ "48": "X_PREFIX_ID_NOT_SUPPORTED",
1488
+ "X_MODULE_MODE_NOT_SUPPORTED": 49,
1489
+ "49": "X_MODULE_MODE_NOT_SUPPORTED",
1490
+ "X_CACHE_HANDLER_NOT_SUPPORTED": 50,
1491
+ "50": "X_CACHE_HANDLER_NOT_SUPPORTED",
1492
+ "X_SCOPE_ID_NOT_SUPPORTED": 51,
1493
+ "51": "X_SCOPE_ID_NOT_SUPPORTED",
1494
+ "__EXTEND_POINT__": 52,
1495
+ "52": "__EXTEND_POINT__"
1496
+ };
1292
1497
  const errorMessages = {
1293
1498
  // parse errors
1294
1499
  [0]: "Illegal comment.",
@@ -1341,16 +1546,14 @@ var VueCompilerDOM = (function (exports) {
1341
1546
  Use a v-bind binding combined with a v-on listener that emits update:x event instead.`,
1342
1547
  [45]: `Error parsing JavaScript expression: `,
1343
1548
  [46]: `<KeepAlive> expects exactly one child component.`,
1549
+ [47]: `@vnode-* hooks in templates are deprecated. Use the vue: prefix instead. For example, @vnode-mounted should be changed to @vue:mounted. @vnode-* hooks support will be removed in 3.4.`,
1344
1550
  // generic errors
1345
- [47]: `"prefixIdentifiers" option is not supported in this build of compiler.`,
1346
- [48]: `ES module mode is not supported in this build of compiler.`,
1347
- [49]: `"cacheHandlers" option is only supported when the "prefixIdentifiers" option is enabled.`,
1348
- [50]: `"scopeId" option is only supported in module mode.`,
1349
- // deprecations
1350
- [51]: `@vnode-* hooks in templates are deprecated. Use the vue: prefix instead. For example, @vnode-mounted should be changed to @vue:mounted. @vnode-* hooks support will be removed in 3.4.`,
1351
- [52]: `v-is="component-name" has been deprecated. Use is="vue:component-name" instead. v-is support will be removed in 3.4.`,
1551
+ [48]: `"prefixIdentifiers" option is not supported in this build of compiler.`,
1552
+ [49]: `ES module mode is not supported in this build of compiler.`,
1553
+ [50]: `"cacheHandlers" option is only supported when the "prefixIdentifiers" option is enabled.`,
1554
+ [51]: `"scopeId" option is only supported in module mode.`,
1352
1555
  // just to fulfill types
1353
- [53]: ``
1556
+ [52]: ``
1354
1557
  };
1355
1558
 
1356
1559
  const isStaticExp = (p) => p.type === 4 && p.isStatic;
@@ -1658,7 +1861,8 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
1658
1861
  isCustomElement: NO,
1659
1862
  onError: defaultOnError,
1660
1863
  onWarn: defaultOnWarn,
1661
- comments: true
1864
+ comments: true,
1865
+ prefixIdentifiers: false
1662
1866
  };
1663
1867
  let currentOptions = defaultParserOptions;
1664
1868
  let currentRoot = null;
@@ -1700,7 +1904,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
1700
1904
  }
1701
1905
  addNode({
1702
1906
  type: 5,
1703
- content: createSimpleExpression(exp, false, getLoc(innerStart, innerEnd)),
1907
+ content: createExp(exp, false, getLoc(innerStart, innerEnd)),
1704
1908
  loc: getLoc(start, end)
1705
1909
  });
1706
1910
  },
@@ -1793,7 +1997,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
1793
1997
  loc: getLoc(start)
1794
1998
  };
1795
1999
  if (name === "pre") {
1796
- inVPre = true;
2000
+ inVPre = tokenizer.inVPre = true;
1797
2001
  currentVPreBoundary = currentOpenTag;
1798
2002
  const props = currentOpenTag.props;
1799
2003
  for (let i = 0; i < props.length; i++) {
@@ -1813,7 +2017,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
1813
2017
  setLocEnd(currentProp.nameLoc, end);
1814
2018
  } else {
1815
2019
  const isStatic = arg[0] !== `[`;
1816
- currentProp.arg = createSimpleExpression(
2020
+ currentProp.arg = createExp(
1817
2021
  isStatic ? arg : arg.slice(1, -1),
1818
2022
  isStatic,
1819
2023
  getLoc(start, end),
@@ -1886,10 +2090,13 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
1886
2090
  tokenizer.enterRCDATA(toCharCodes(`</template`), 0);
1887
2091
  }
1888
2092
  } else {
1889
- currentProp.exp = createSimpleExpression(
2093
+ let expParseMode = 0 /* Normal */;
2094
+ currentProp.exp = createExp(
1890
2095
  currentAttrValue,
1891
2096
  false,
1892
- getLoc(currentAttrStartIndex, currentAttrEndIndex)
2097
+ getLoc(currentAttrStartIndex, currentAttrEndIndex),
2098
+ 0,
2099
+ expParseMode
1893
2100
  );
1894
2101
  if (currentProp.name === "for") {
1895
2102
  currentProp.forParseResult = parseForExpression(currentProp.exp);
@@ -1992,10 +2199,16 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
1992
2199
  if (!inMatch)
1993
2200
  return;
1994
2201
  const [, LHS, RHS] = inMatch;
1995
- const createAliasExpression = (content, offset) => {
2202
+ const createAliasExpression = (content, offset, asParam = false) => {
1996
2203
  const start = loc.start.offset + offset;
1997
2204
  const end = start + content.length;
1998
- return createSimpleExpression(content, false, getLoc(start, end));
2205
+ return createExp(
2206
+ content,
2207
+ false,
2208
+ getLoc(start, end),
2209
+ 0,
2210
+ asParam ? 1 /* Params */ : 0 /* Normal */
2211
+ );
1999
2212
  };
2000
2213
  const result = {
2001
2214
  source: createAliasExpression(RHS.trim(), exp.indexOf(RHS, LHS.length)),
@@ -2013,7 +2226,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
2013
2226
  let keyOffset;
2014
2227
  if (keyContent) {
2015
2228
  keyOffset = exp.indexOf(keyContent, trimmedOffset + valueContent.length);
2016
- result.key = createAliasExpression(keyContent, keyOffset);
2229
+ result.key = createAliasExpression(keyContent, keyOffset, true);
2017
2230
  }
2018
2231
  if (iteratorMatch[2]) {
2019
2232
  const indexContent = iteratorMatch[2].trim();
@@ -2023,13 +2236,14 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
2023
2236
  exp.indexOf(
2024
2237
  indexContent,
2025
2238
  result.key ? keyOffset + keyContent.length : trimmedOffset + valueContent.length
2026
- )
2239
+ ),
2240
+ true
2027
2241
  );
2028
2242
  }
2029
2243
  }
2030
2244
  }
2031
2245
  if (valueContent) {
2032
- result.value = createAliasExpression(valueContent, trimmedOffset);
2246
+ result.value = createAliasExpression(valueContent, trimmedOffset, true);
2033
2247
  }
2034
2248
  return result;
2035
2249
  }
@@ -2107,7 +2321,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
2107
2321
  inPre--;
2108
2322
  }
2109
2323
  if (currentVPreBoundary === el) {
2110
- inVPre = false;
2324
+ inVPre = tokenizer.inVPre = false;
2111
2325
  currentVPreBoundary = null;
2112
2326
  }
2113
2327
  if (tokenizer.inXML && (stack[0] ? stack[0].ns : currentOptions.ns) === 0) {
@@ -2342,8 +2556,14 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
2342
2556
  }
2343
2557
  return attr;
2344
2558
  }
2345
- function emitError(code, index) {
2346
- currentOptions.onError(createCompilerError(code, getLoc(index, index)));
2559
+ function createExp(content, isStatic = false, loc, constType = 0, parseMode = 0 /* Normal */) {
2560
+ const exp = createSimpleExpression(content, isStatic, loc, constType);
2561
+ return exp;
2562
+ }
2563
+ function emitError(code, index, message) {
2564
+ currentOptions.onError(
2565
+ createCompilerError(code, getLoc(index, index), void 0, message)
2566
+ );
2347
2567
  }
2348
2568
  function reset() {
2349
2569
  tokenizer.reset();
@@ -2374,6 +2594,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
2374
2594
  }
2375
2595
  }
2376
2596
  tokenizer.mode = currentOptions.parseMode === "html" ? 1 : currentOptions.parseMode === "sfc" ? 2 : 0;
2597
+ tokenizer.inXML = currentOptions.ns === 1 || currentOptions.ns === 2;
2377
2598
  const delimiters = options == null ? void 0 : options.delimiters;
2378
2599
  if (delimiters) {
2379
2600
  tokenizer.delimiterOpen = toCharCodes(delimiters[0]);
@@ -4559,6 +4780,9 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
4559
4780
  if (isEventHandler && isReservedProp(name)) {
4560
4781
  hasVnodeHook = true;
4561
4782
  }
4783
+ if (isEventHandler && value.type === 14) {
4784
+ value = value.arguments[0];
4785
+ }
4562
4786
  if (value.type === 20 || (value.type === 4 || value.type === 8) && getConstantType(value, context) > 0) {
4563
4787
  return;
4564
4788
  }
@@ -5011,9 +5235,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
5011
5235
  if (arg.isStatic) {
5012
5236
  let rawName = arg.content;
5013
5237
  if (rawName.startsWith("vnode")) {
5014
- context.onWarn(
5015
- createCompilerError(51, arg.loc)
5016
- );
5238
+ context.onError(createCompilerError(47, arg.loc));
5017
5239
  }
5018
5240
  if (rawName.startsWith("vue:")) {
5019
5241
  rawName = `vnode-${rawName.slice(4)}`;
@@ -5494,17 +5716,17 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
5494
5716
  const isModuleMode = options.mode === "module";
5495
5717
  {
5496
5718
  if (options.prefixIdentifiers === true) {
5497
- onError(createCompilerError(47));
5498
- } else if (isModuleMode) {
5499
5719
  onError(createCompilerError(48));
5720
+ } else if (isModuleMode) {
5721
+ onError(createCompilerError(49));
5500
5722
  }
5501
5723
  }
5502
5724
  const prefixIdentifiers = false;
5503
5725
  if (options.cacheHandlers) {
5504
- onError(createCompilerError(49));
5726
+ onError(createCompilerError(50));
5505
5727
  }
5506
5728
  if (options.scopeId && !isModuleMode) {
5507
- onError(createCompilerError(50));
5729
+ onError(createCompilerError(51));
5508
5730
  }
5509
5731
  const ast = isString(source) ? baseParse(source, options) : source;
5510
5732
  const [nodeTransforms, directiveTransforms] = getBaseTransformPreset();
@@ -5533,6 +5755,19 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
5533
5755
  );
5534
5756
  }
5535
5757
 
5758
+ const BindingTypes = {
5759
+ "DATA": "data",
5760
+ "PROPS": "props",
5761
+ "PROPS_ALIASED": "props-aliased",
5762
+ "SETUP_LET": "setup-let",
5763
+ "SETUP_CONST": "setup-const",
5764
+ "SETUP_REACTIVE_CONST": "setup-reactive-const",
5765
+ "SETUP_MAYBE_REF": "setup-maybe-ref",
5766
+ "SETUP_REF": "setup-ref",
5767
+ "OPTIONS": "options",
5768
+ "LITERAL_CONST": "literal-const"
5769
+ };
5770
+
5536
5771
  const noopDirectiveTransform = () => ({ props: [] });
5537
5772
 
5538
5773
  const V_MODEL_RADIO = Symbol(`vModelRadio` );
@@ -5651,6 +5886,32 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
5651
5886
  DOMErrorMessages
5652
5887
  );
5653
5888
  }
5889
+ const DOMErrorCodes = {
5890
+ "X_V_HTML_NO_EXPRESSION": 53,
5891
+ "53": "X_V_HTML_NO_EXPRESSION",
5892
+ "X_V_HTML_WITH_CHILDREN": 54,
5893
+ "54": "X_V_HTML_WITH_CHILDREN",
5894
+ "X_V_TEXT_NO_EXPRESSION": 55,
5895
+ "55": "X_V_TEXT_NO_EXPRESSION",
5896
+ "X_V_TEXT_WITH_CHILDREN": 56,
5897
+ "56": "X_V_TEXT_WITH_CHILDREN",
5898
+ "X_V_MODEL_ON_INVALID_ELEMENT": 57,
5899
+ "57": "X_V_MODEL_ON_INVALID_ELEMENT",
5900
+ "X_V_MODEL_ARG_ON_ELEMENT": 58,
5901
+ "58": "X_V_MODEL_ARG_ON_ELEMENT",
5902
+ "X_V_MODEL_ON_FILE_INPUT_ELEMENT": 59,
5903
+ "59": "X_V_MODEL_ON_FILE_INPUT_ELEMENT",
5904
+ "X_V_MODEL_UNNECESSARY_VALUE": 60,
5905
+ "60": "X_V_MODEL_UNNECESSARY_VALUE",
5906
+ "X_V_SHOW_NO_EXPRESSION": 61,
5907
+ "61": "X_V_SHOW_NO_EXPRESSION",
5908
+ "X_TRANSITION_INVALID_CHILDREN": 62,
5909
+ "62": "X_TRANSITION_INVALID_CHILDREN",
5910
+ "X_IGNORED_SIDE_EFFECT_TAG": 63,
5911
+ "63": "X_IGNORED_SIDE_EFFECT_TAG",
5912
+ "__EXTEND_POINT__": 64,
5913
+ "64": "__EXTEND_POINT__"
5914
+ };
5654
5915
  const DOMErrorMessages = {
5655
5916
  [53]: `v-html is missing expression.`,
5656
5917
  [54]: `v-html will override element children.`,
@@ -6006,6 +6267,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
6006
6267
  }
6007
6268
 
6008
6269
  exports.BASE_TRANSITION = BASE_TRANSITION;
6270
+ exports.BindingTypes = BindingTypes;
6009
6271
  exports.CAMELIZE = CAMELIZE;
6010
6272
  exports.CAPITALIZE = CAPITALIZE;
6011
6273
  exports.CREATE_BLOCK = CREATE_BLOCK;
@@ -6016,9 +6278,14 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
6016
6278
  exports.CREATE_STATIC = CREATE_STATIC;
6017
6279
  exports.CREATE_TEXT = CREATE_TEXT;
6018
6280
  exports.CREATE_VNODE = CREATE_VNODE;
6281
+ exports.CompilerDeprecationTypes = CompilerDeprecationTypes;
6282
+ exports.ConstantTypes = ConstantTypes;
6019
6283
  exports.DOMDirectiveTransforms = DOMDirectiveTransforms;
6284
+ exports.DOMErrorCodes = DOMErrorCodes;
6020
6285
  exports.DOMErrorMessages = DOMErrorMessages;
6021
6286
  exports.DOMNodeTransforms = DOMNodeTransforms;
6287
+ exports.ElementTypes = ElementTypes;
6288
+ exports.ErrorCodes = ErrorCodes;
6022
6289
  exports.FRAGMENT = FRAGMENT;
6023
6290
  exports.GUARD_REACTIVE_PROPS = GUARD_REACTIVE_PROPS;
6024
6291
  exports.IS_MEMO_SAME = IS_MEMO_SAME;
@@ -6028,6 +6295,8 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
6028
6295
  exports.NORMALIZE_CLASS = NORMALIZE_CLASS;
6029
6296
  exports.NORMALIZE_PROPS = NORMALIZE_PROPS;
6030
6297
  exports.NORMALIZE_STYLE = NORMALIZE_STYLE;
6298
+ exports.Namespaces = Namespaces;
6299
+ exports.NodeTypes = NodeTypes;
6031
6300
  exports.OPEN_BLOCK = OPEN_BLOCK;
6032
6301
  exports.POP_SCOPE_ID = POP_SCOPE_ID;
6033
6302
  exports.PUSH_SCOPE_ID = PUSH_SCOPE_ID;