@vue/compat 3.3.0-alpha.2 → 3.3.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.
package/dist/vue.cjs.js CHANGED
@@ -6743,7 +6743,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
6743
6743
  return vm;
6744
6744
  }
6745
6745
  }
6746
- Vue.version = `2.6.14-compat:${"3.3.0-alpha.2"}`;
6746
+ Vue.version = `2.6.14-compat:${"3.3.0-alpha.4"}`;
6747
6747
  Vue.config = singletonApp.config;
6748
6748
  Vue.use = (p, ...options) => {
6749
6749
  if (p && isFunction(p.install)) {
@@ -10737,7 +10737,7 @@ function isMemoSame(cached, memo) {
10737
10737
  return true;
10738
10738
  }
10739
10739
 
10740
- const version = "3.3.0-alpha.2";
10740
+ const version = "3.3.0-alpha.4";
10741
10741
  const _ssrUtils = {
10742
10742
  createComponentInstance,
10743
10743
  setupComponent,
@@ -12914,16 +12914,16 @@ function hasDynamicKeyVBind(node) {
12914
12914
  );
12915
12915
  }
12916
12916
  function isText$1(node) {
12917
- return node.type === 5 || node.type === "text";
12917
+ return node.type === 5 || node.type === 2;
12918
12918
  }
12919
12919
  function isVSlot(p) {
12920
12920
  return p.type === 7 && p.name === "slot";
12921
12921
  }
12922
12922
  function isTemplateNode(node) {
12923
- return node.type === "element" && node.tagType === 3;
12923
+ return node.type === 1 && node.tagType === 3;
12924
12924
  }
12925
12925
  function isSlotOutlet(node) {
12926
- return node.type === "element" && node.tagType === 2;
12926
+ return node.type === 1 && node.tagType === 2;
12927
12927
  }
12928
12928
  function getVNodeHelper(ssr, isComponent) {
12929
12929
  return ssr || isComponent ? CREATE_VNODE : CREATE_ELEMENT_VNODE;
@@ -13022,7 +13022,7 @@ function hasScopeRef(node, ids) {
13022
13022
  return false;
13023
13023
  }
13024
13024
  switch (node.type) {
13025
- case "element":
13025
+ case 1:
13026
13026
  for (let i = 0; i < node.props.length; i++) {
13027
13027
  const p = node.props[i];
13028
13028
  if (p.type === 7 && (hasScopeRef(p.arg, ids) || hasScopeRef(p.exp, ids))) {
@@ -13049,8 +13049,8 @@ function hasScopeRef(node, ids) {
13049
13049
  case 5:
13050
13050
  case 12:
13051
13051
  return hasScopeRef(node.content, ids);
13052
- case "text":
13053
- case "comment":
13052
+ case 2:
13053
+ case 3:
13054
13054
  return false;
13055
13055
  default:
13056
13056
  return false;
@@ -13281,12 +13281,12 @@ function parseChildren(context, mode, ancestors) {
13281
13281
  const shouldCondense = context.options.whitespace !== "preserve";
13282
13282
  for (let i = 0; i < nodes.length; i++) {
13283
13283
  const node = nodes[i];
13284
- if (node.type === "text") {
13284
+ if (node.type === 2) {
13285
13285
  if (!context.inPre) {
13286
13286
  if (!/[^\t\r\n\f ]/.test(node.content)) {
13287
13287
  const prev = nodes[i - 1];
13288
13288
  const next = nodes[i + 1];
13289
- if (!prev || !next || shouldCondense && (prev.type === "comment" && next.type === "comment" || prev.type === "comment" && next.type === "element" || prev.type === "element" && next.type === "comment" || prev.type === "element" && next.type === "element" && /[\r\n]/.test(node.content))) {
13289
+ if (!prev || !next || shouldCondense && (prev.type === 3 && next.type === 3 || prev.type === 3 && next.type === 1 || prev.type === 1 && next.type === 3 || prev.type === 1 && next.type === 1 && /[\r\n]/.test(node.content))) {
13290
13290
  removedWhitespace = true;
13291
13291
  nodes[i] = null;
13292
13292
  } else {
@@ -13298,14 +13298,14 @@ function parseChildren(context, mode, ancestors) {
13298
13298
  } else {
13299
13299
  node.content = node.content.replace(/\r\n/g, "\n");
13300
13300
  }
13301
- } else if (node.type === "comment" && !context.options.comments) {
13301
+ } else if (node.type === 3 && !context.options.comments) {
13302
13302
  removedWhitespace = true;
13303
13303
  nodes[i] = null;
13304
13304
  }
13305
13305
  }
13306
13306
  if (context.inPre && parent && context.options.isPreTag(parent.tag)) {
13307
13307
  const first = nodes[0];
13308
- if (first && first.type === "text") {
13308
+ if (first && first.type === 2) {
13309
13309
  first.content = first.content.replace(/^\r?\n/, "");
13310
13310
  }
13311
13311
  }
@@ -13313,9 +13313,9 @@ function parseChildren(context, mode, ancestors) {
13313
13313
  return removedWhitespace ? nodes.filter(Boolean) : nodes;
13314
13314
  }
13315
13315
  function pushNode(nodes, node) {
13316
- if (node.type === "text") {
13316
+ if (node.type === 2) {
13317
13317
  const prev = last(nodes);
13318
- if (prev && prev.type === "text" && prev.loc.end.offset === node.loc.start.offset) {
13318
+ if (prev && prev.type === 2 && prev.loc.end.offset === node.loc.start.offset) {
13319
13319
  prev.content += node.content;
13320
13320
  prev.loc.end = node.loc.end;
13321
13321
  prev.loc.source += node.loc.source;
@@ -13362,7 +13362,7 @@ function parseComment(context) {
13362
13362
  advanceBy(context, match.index + match[0].length - prevIndex + 1);
13363
13363
  }
13364
13364
  return {
13365
- type: "comment",
13365
+ type: 3,
13366
13366
  content,
13367
13367
  loc: getSelection(context, start)
13368
13368
  };
@@ -13380,7 +13380,7 @@ function parseBogusComment(context) {
13380
13380
  advanceBy(context, closeIndex + 1);
13381
13381
  }
13382
13382
  return {
13383
- type: "comment",
13383
+ type: 3,
13384
13384
  content,
13385
13385
  loc: getSelection(context, start)
13386
13386
  };
@@ -13416,7 +13416,7 @@ function parseElement(context, ancestors) {
13416
13416
  )) {
13417
13417
  const loc = getSelection(context, element.loc.end);
13418
13418
  inlineTemplateProp.value = {
13419
- type: "text",
13419
+ type: 2,
13420
13420
  content: loc.source,
13421
13421
  loc
13422
13422
  };
@@ -13523,7 +13523,7 @@ function parseTag(context, type, parent) {
13523
13523
  }
13524
13524
  }
13525
13525
  return {
13526
- type: "element",
13526
+ type: 1,
13527
13527
  ns,
13528
13528
  tag,
13529
13529
  tagType,
@@ -13729,7 +13729,7 @@ function parseAttribute(context, nameSet) {
13729
13729
  type: 6,
13730
13730
  name,
13731
13731
  value: value && {
13732
- type: "text",
13732
+ type: 2,
13733
13733
  content: value.content,
13734
13734
  loc: value.loc
13735
13735
  },
@@ -13819,7 +13819,7 @@ function parseText(context, mode) {
13819
13819
  const start = getCursor(context);
13820
13820
  const content = parseTextData(context, endIndex, mode);
13821
13821
  return {
13822
- type: "text",
13822
+ type: 2,
13823
13823
  content,
13824
13824
  loc: getSelection(context, start)
13825
13825
  };
@@ -13928,7 +13928,7 @@ function hoistStatic(root, context) {
13928
13928
  }
13929
13929
  function isSingleElementRoot(root, child) {
13930
13930
  const { children } = root;
13931
- return children.length === 1 && child.type === "element" && !isSlotOutlet(child);
13931
+ return children.length === 1 && child.type === 1 && !isSlotOutlet(child);
13932
13932
  }
13933
13933
  function walk(node, context, doNotHoistNode = false) {
13934
13934
  const { children } = node;
@@ -13936,7 +13936,7 @@ function walk(node, context, doNotHoistNode = false) {
13936
13936
  let hoistedCount = 0;
13937
13937
  for (let i = 0; i < children.length; i++) {
13938
13938
  const child = children[i];
13939
- if (child.type === "element" && child.tagType === 0) {
13939
+ if (child.type === 1 && child.tagType === 0) {
13940
13940
  const constantType = doNotHoistNode ? 0 : getConstantType(child, context);
13941
13941
  if (constantType > 0) {
13942
13942
  if (constantType >= 2) {
@@ -13961,7 +13961,7 @@ function walk(node, context, doNotHoistNode = false) {
13961
13961
  }
13962
13962
  }
13963
13963
  }
13964
- if (child.type === "element") {
13964
+ if (child.type === 1) {
13965
13965
  const isComponent = child.tagType === 1;
13966
13966
  if (isComponent) {
13967
13967
  context.scopes.vSlot++;
@@ -13985,7 +13985,7 @@ function walk(node, context, doNotHoistNode = false) {
13985
13985
  if (hoistedCount && context.transformHoist) {
13986
13986
  context.transformHoist(children, context, node);
13987
13987
  }
13988
- if (hoistedCount && hoistedCount === originalCount && node.type === "element" && node.tagType === 0 && node.codegenNode && node.codegenNode.type === 13 && isArray(node.codegenNode.children)) {
13988
+ if (hoistedCount && hoistedCount === originalCount && node.type === 1 && node.tagType === 0 && node.codegenNode && node.codegenNode.type === 13 && isArray(node.codegenNode.children)) {
13989
13989
  node.codegenNode.children = context.hoist(
13990
13990
  createArrayExpression(node.codegenNode.children)
13991
13991
  );
@@ -13994,7 +13994,7 @@ function walk(node, context, doNotHoistNode = false) {
13994
13994
  function getConstantType(node, context) {
13995
13995
  const { constantCache } = context;
13996
13996
  switch (node.type) {
13997
- case "element":
13997
+ case 1:
13998
13998
  if (node.tagType !== 0) {
13999
13999
  return 0;
14000
14000
  }
@@ -14066,8 +14066,8 @@ function getConstantType(node, context) {
14066
14066
  constantCache.set(node, 0);
14067
14067
  return 0;
14068
14068
  }
14069
- case "text":
14070
- case "comment":
14069
+ case 2:
14070
+ case 3:
14071
14071
  return 3;
14072
14072
  case 9:
14073
14073
  case 11:
@@ -14369,7 +14369,7 @@ function createRootCodegen(root, context) {
14369
14369
  } else if (children.length > 1) {
14370
14370
  let patchFlag = 64;
14371
14371
  let patchFlagText = PatchFlagNames[64];
14372
- if (children.filter((c) => c.type !== "comment").length === 1) {
14372
+ if (children.filter((c) => c.type !== 3).length === 1) {
14373
14373
  patchFlag |= 2048;
14374
14374
  patchFlagText += `, ${PatchFlagNames[2048]}`;
14375
14375
  }
@@ -14423,7 +14423,7 @@ function traverseNode(node, context) {
14423
14423
  }
14424
14424
  }
14425
14425
  switch (node.type) {
14426
- case "comment":
14426
+ case 3:
14427
14427
  if (!context.ssr) {
14428
14428
  context.helper(CREATE_COMMENT);
14429
14429
  }
@@ -14440,7 +14440,7 @@ function traverseNode(node, context) {
14440
14440
  break;
14441
14441
  case 10:
14442
14442
  case 11:
14443
- case "element":
14443
+ case 1:
14444
14444
  case 0:
14445
14445
  traverseChildren(node, context);
14446
14446
  break;
@@ -14454,7 +14454,7 @@ function traverseNode(node, context) {
14454
14454
  function createStructuralDirectiveTransform(name, fn) {
14455
14455
  const matches = isString(name) ? (n) => n === name : (n) => name.test(n);
14456
14456
  return (node, context) => {
14457
- if (node.type === "element") {
14457
+ if (node.type === 1) {
14458
14458
  const { props } = node;
14459
14459
  if (node.tagType === 3 && props.some(isVSlot)) {
14460
14460
  return;
@@ -14821,7 +14821,7 @@ function genImports(importsOptions, context) {
14821
14821
  });
14822
14822
  }
14823
14823
  function isText(n) {
14824
- return isString(n) || n.type === 4 || n.type === "text" || n.type === 5 || n.type === 8;
14824
+ return isString(n) || n.type === 4 || n.type === 2 || n.type === 5 || n.type === 8;
14825
14825
  }
14826
14826
  function genNodeListAsArray(nodes, context) {
14827
14827
  const multilines = nodes.length > 3 || nodes.some((n) => isArray(n) || !isText(n));
@@ -14862,7 +14862,7 @@ function genNode(node, context) {
14862
14862
  return;
14863
14863
  }
14864
14864
  switch (node.type) {
14865
- case "element":
14865
+ case 1:
14866
14866
  case 9:
14867
14867
  case 11:
14868
14868
  assert(
@@ -14871,7 +14871,7 @@ function genNode(node, context) {
14871
14871
  );
14872
14872
  genNode(node.codegenNode, context);
14873
14873
  break;
14874
- case "text":
14874
+ case 2:
14875
14875
  genText(node, context);
14876
14876
  break;
14877
14877
  case 4:
@@ -14886,7 +14886,7 @@ function genNode(node, context) {
14886
14886
  case 8:
14887
14887
  genCompoundExpression(node, context);
14888
14888
  break;
14889
- case "comment":
14889
+ case 3:
14890
14890
  genComment(node, context);
14891
14891
  break;
14892
14892
  case 13:
@@ -15467,7 +15467,7 @@ const transformExpression = (node, context) => {
15467
15467
  node.content,
15468
15468
  context
15469
15469
  );
15470
- } else if (node.type === "element") {
15470
+ } else if (node.type === 1) {
15471
15471
  for (let i = 0; i < node.props.length; i++) {
15472
15472
  const dir = node.props[i];
15473
15473
  if (dir.type === 7 && dir.name !== "for") {
@@ -15733,12 +15733,12 @@ function processIf(node, dir, context, processCodegen) {
15733
15733
  let i = siblings.indexOf(node);
15734
15734
  while (i-- >= -1) {
15735
15735
  const sibling = siblings[i];
15736
- if (sibling && sibling.type === "comment") {
15736
+ if (sibling && sibling.type === 3) {
15737
15737
  context.removeNode(sibling);
15738
15738
  comments.unshift(sibling);
15739
15739
  continue;
15740
15740
  }
15741
- if (sibling && sibling.type === "text" && !sibling.content.trim().length) {
15741
+ if (sibling && sibling.type === 2 && !sibling.content.trim().length) {
15742
15742
  context.removeNode(sibling);
15743
15743
  continue;
15744
15744
  }
@@ -15751,7 +15751,7 @@ function processIf(node, dir, context, processCodegen) {
15751
15751
  context.removeNode();
15752
15752
  const branch = createIfBranch(node, dir);
15753
15753
  if (comments.length && // #3619 ignore comments if the v-if is direct child of <transition>
15754
- !(context.parent && context.parent.type === "element" && isBuiltInType(context.parent.tag, "transition"))) {
15754
+ !(context.parent && context.parent.type === 1 && isBuiltInType(context.parent.tag, "transition"))) {
15755
15755
  branch.children = [...comments, ...branch.children];
15756
15756
  }
15757
15757
  {
@@ -15824,7 +15824,7 @@ function createChildrenCodegenNode(branch, keyIndex, context) {
15824
15824
  );
15825
15825
  const { children } = branch;
15826
15826
  const firstChild = children[0];
15827
- const needFragmentWrapper = children.length !== 1 || firstChild.type !== "element";
15827
+ const needFragmentWrapper = children.length !== 1 || firstChild.type !== 1;
15828
15828
  if (needFragmentWrapper) {
15829
15829
  if (children.length === 1 && firstChild.type === 11) {
15830
15830
  const vnodeCall = firstChild.codegenNode;
@@ -15833,7 +15833,7 @@ function createChildrenCodegenNode(branch, keyIndex, context) {
15833
15833
  } else {
15834
15834
  let patchFlag = 64;
15835
15835
  let patchFlagText = PatchFlagNames[64];
15836
- if (!branch.isTemplateIf && children.filter((c) => c.type !== "comment").length === 1) {
15836
+ if (!branch.isTemplateIf && children.filter((c) => c.type !== 3).length === 1) {
15837
15837
  patchFlag |= 2048;
15838
15838
  patchFlagText += `, ${PatchFlagNames[2048]}`;
15839
15839
  }
@@ -15942,7 +15942,7 @@ const transformFor = createStructuralDirectiveTransform(
15942
15942
  const { children } = forNode;
15943
15943
  if (isTemplate) {
15944
15944
  node.children.some((c) => {
15945
- if (c.type === "element") {
15945
+ if (c.type === 1) {
15946
15946
  const key = findProp(c, "key");
15947
15947
  if (key) {
15948
15948
  context.onError(
@@ -15956,7 +15956,7 @@ const transformFor = createStructuralDirectiveTransform(
15956
15956
  }
15957
15957
  });
15958
15958
  }
15959
- const needFragmentWrapper = children.length !== 1 || children[0].type !== "element";
15959
+ const needFragmentWrapper = children.length !== 1 || children[0].type !== 1;
15960
15960
  const slotOutlet = isSlotOutlet(node) ? node : isTemplate && node.children.length === 1 && isSlotOutlet(node.children[0]) ? node.children[0] : null;
15961
15961
  if (slotOutlet) {
15962
15962
  childBlock = slotOutlet.codegenNode;
@@ -16176,7 +16176,7 @@ function createParamsList(args) {
16176
16176
 
16177
16177
  const defaultFallback = createSimpleExpression(`undefined`, false);
16178
16178
  const trackSlotScopes = (node, context) => {
16179
- if (node.type === "element" && (node.tagType === 1 || node.tagType === 3)) {
16179
+ if (node.type === 1 && (node.tagType === 1 || node.tagType === 3)) {
16180
16180
  const vSlot = findDir(node, "slot");
16181
16181
  if (vSlot) {
16182
16182
  const slotProps = vSlot.exp;
@@ -16252,7 +16252,7 @@ function buildSlots(node, context, buildSlotFn = buildClientSlotFn) {
16252
16252
  const slotElement = children[i];
16253
16253
  let slotDir;
16254
16254
  if (!isTemplateNode(slotElement) || !(slotDir = findDir(slotElement, "slot", true))) {
16255
- if (slotElement.type !== "comment") {
16255
+ if (slotElement.type !== 3) {
16256
16256
  implicitDefaultChildren.push(slotElement);
16257
16257
  }
16258
16258
  continue;
@@ -16299,7 +16299,7 @@ function buildSlots(node, context, buildSlotFn = buildClientSlotFn) {
16299
16299
  let prev;
16300
16300
  while (j--) {
16301
16301
  prev = children[j];
16302
- if (prev.type !== "comment") {
16302
+ if (prev.type !== 3) {
16303
16303
  break;
16304
16304
  }
16305
16305
  }
@@ -16433,7 +16433,7 @@ function hasForwardedSlots(children) {
16433
16433
  for (let i = 0; i < children.length; i++) {
16434
16434
  const child = children[i];
16435
16435
  switch (child.type) {
16436
- case "element":
16436
+ case 1:
16437
16437
  if (child.tagType === 2 || hasForwardedSlots(child.children)) {
16438
16438
  return true;
16439
16439
  }
@@ -16452,16 +16452,16 @@ function hasForwardedSlots(children) {
16452
16452
  return false;
16453
16453
  }
16454
16454
  function isNonWhitespaceContent(node) {
16455
- if (node.type !== "text" && node.type !== 12)
16455
+ if (node.type !== 2 && node.type !== 12)
16456
16456
  return true;
16457
- return node.type === "text" ? !!node.content.trim() : isNonWhitespaceContent(node.content);
16457
+ return node.type === 2 ? !!node.content.trim() : isNonWhitespaceContent(node.content);
16458
16458
  }
16459
16459
 
16460
16460
  const directiveImportMap = /* @__PURE__ */ new WeakMap();
16461
16461
  const transformElement = (node, context) => {
16462
16462
  return function postTransformElement() {
16463
16463
  node = context.currentNode;
16464
- if (!(node.type === "element" && (node.tagType === 0 || node.tagType === 1))) {
16464
+ if (!(node.type === 1 && (node.tagType === 0 || node.tagType === 1))) {
16465
16465
  return;
16466
16466
  }
16467
16467
  const { tag, props } = node;
@@ -16532,7 +16532,7 @@ const transformElement = (node, context) => {
16532
16532
  if (hasDynamicTextChild && getConstantType(child, context) === 0) {
16533
16533
  patchFlag |= 1;
16534
16534
  }
16535
- if (hasDynamicTextChild || type === "text") {
16535
+ if (hasDynamicTextChild || type === 2) {
16536
16536
  vnodeChildren = child;
16537
16537
  } else {
16538
16538
  vnodeChildren = node.children;
@@ -17304,7 +17304,7 @@ const injectPrefix = (arg, prefix) => {
17304
17304
  };
17305
17305
 
17306
17306
  const transformText = (node, context) => {
17307
- if (node.type === 0 || node.type === "element" || node.type === 11 || node.type === 10) {
17307
+ if (node.type === 0 || node.type === 1 || node.type === 11 || node.type === 10) {
17308
17308
  return () => {
17309
17309
  const children = node.children;
17310
17310
  let currentContainer = void 0;
@@ -17336,7 +17336,7 @@ const transformText = (node, context) => {
17336
17336
  // as-is since the runtime has dedicated fast path for this by directly
17337
17337
  // setting textContent of the element.
17338
17338
  // for component root it's always normalized anyway.
17339
- children.length === 1 && (node.type === 0 || node.type === "element" && node.tagType === 0 && // #3756
17339
+ children.length === 1 && (node.type === 0 || node.type === 1 && node.tagType === 0 && // #3756
17340
17340
  // custom directives can potentially add DOM elements arbitrarily,
17341
17341
  // we need to avoid setting textContent of the element at runtime
17342
17342
  // to avoid accidentally overwriting the DOM elements added
@@ -17353,7 +17353,7 @@ const transformText = (node, context) => {
17353
17353
  const child = children[i];
17354
17354
  if (isText$1(child) || child.type === 8) {
17355
17355
  const callArgs = [];
17356
- if (child.type !== "text" || child.content !== " ") {
17356
+ if (child.type !== 2 || child.content !== " ") {
17357
17357
  callArgs.push(child);
17358
17358
  }
17359
17359
  if (!context.ssr && getConstantType(child, context) === 0) {
@@ -17378,7 +17378,7 @@ const transformText = (node, context) => {
17378
17378
 
17379
17379
  const seen$1 = /* @__PURE__ */ new WeakSet();
17380
17380
  const transformOnce = (node, context) => {
17381
- if (node.type === "element" && findDir(node, "once", true)) {
17381
+ if (node.type === 1 && findDir(node, "once", true)) {
17382
17382
  if (seen$1.has(node) || context.inVOnce) {
17383
17383
  return;
17384
17384
  }
@@ -17491,7 +17491,7 @@ const transformFilter = (node, context) => {
17491
17491
  if (node.type === 5) {
17492
17492
  rewriteFilter(node.content, context);
17493
17493
  }
17494
- if (node.type === "element") {
17494
+ if (node.type === 1) {
17495
17495
  node.props.forEach((prop) => {
17496
17496
  if (prop.type === 7 && prop.name !== "for" && prop.exp) {
17497
17497
  rewriteFilter(prop.exp, context);
@@ -17632,7 +17632,7 @@ function wrapFilter(exp, filter, context) {
17632
17632
 
17633
17633
  const seen = /* @__PURE__ */ new WeakSet();
17634
17634
  const transformMemo = (node, context) => {
17635
- if (node.type === "element") {
17635
+ if (node.type === 1) {
17636
17636
  const dir = findDir(node, "memo");
17637
17637
  if (!dir || seen.has(node)) {
17638
17638
  return;
@@ -20149,7 +20149,7 @@ const parserOptions = {
20149
20149
  };
20150
20150
 
20151
20151
  const transformStyle = (node) => {
20152
- if (node.type === "element") {
20152
+ if (node.type === 1) {
20153
20153
  node.props.forEach((p, i) => {
20154
20154
  if (p.type === 6 && p.name === "style" && p.value) {
20155
20155
  node.props[i] = {
@@ -20439,7 +20439,7 @@ const transformShow = (dir, node, context) => {
20439
20439
  };
20440
20440
 
20441
20441
  const transformTransition = (node, context) => {
20442
- if (node.type === "element" && node.tagType === 1) {
20442
+ if (node.type === 1 && node.tagType === 1) {
20443
20443
  const component = context.isBuiltInComponent(node.tag);
20444
20444
  if (component === TRANSITION) {
20445
20445
  return () => {
@@ -20459,7 +20459,7 @@ const transformTransition = (node, context) => {
20459
20459
  );
20460
20460
  }
20461
20461
  const child = node.children[0];
20462
- if (child.type === "element") {
20462
+ if (child.type === 1) {
20463
20463
  for (const p of child.props) {
20464
20464
  if (p.type === 7 && p.name === "show") {
20465
20465
  node.props.push({
@@ -20477,7 +20477,7 @@ const transformTransition = (node, context) => {
20477
20477
  };
20478
20478
  function hasMultipleChildren(node) {
20479
20479
  const children = node.children = node.children.filter(
20480
- (c) => c.type !== "comment" && !(c.type === "text" && !c.content.trim())
20480
+ (c) => c.type !== 3 && !(c.type === 2 && !c.content.trim())
20481
20481
  );
20482
20482
  const child = children[0];
20483
20483
  return children.length !== 1 || child.type === 11 || child.type === 9 && child.branches.some(hasMultipleChildren);
@@ -20534,7 +20534,7 @@ const stringifyStatic = (children, context, parent) => {
20534
20534
  }
20535
20535
  stringifyCurrentChunk(i);
20536
20536
  };
20537
- const getHoistedNode = (node) => (node.type === "element" && node.tagType === 0 || node.type == 12) && node.codegenNode && node.codegenNode.type === 4 && node.codegenNode.hoisted;
20537
+ const getHoistedNode = (node) => (node.type === 1 && node.tagType === 0 || node.type == 12) && node.codegenNode && node.codegenNode.type === 4 && node.codegenNode.hoisted;
20538
20538
  const dataAriaRE = /^(data|aria)-/;
20539
20539
  const isStringifiableAttr = (name, ns) => {
20540
20540
  return (ns === 0 ? isKnownHtmlAttr(name) : ns === 1 ? isKnownSvgAttr(name) : false) || dataAriaRE.test(name);
@@ -20547,7 +20547,7 @@ const isNonStringifiable = /* @__PURE__ */ makeMap(
20547
20547
  `caption,thead,tr,th,tbody,td,tfoot,colgroup,col`
20548
20548
  );
20549
20549
  function analyzeNode(node) {
20550
- if (node.type === "element" && isNonStringifiable(node.tag)) {
20550
+ if (node.type === 1 && isNonStringifiable(node.tag)) {
20551
20551
  return false;
20552
20552
  }
20553
20553
  if (node.type === 12) {
@@ -20578,7 +20578,7 @@ function analyzeNode(node) {
20578
20578
  for (let i = 0; i < node2.children.length; i++) {
20579
20579
  nc++;
20580
20580
  const child = node2.children[i];
20581
- if (child.type === "element") {
20581
+ if (child.type === 1) {
20582
20582
  if (child.props.length > 0) {
20583
20583
  ec++;
20584
20584
  }
@@ -20600,11 +20600,11 @@ function stringifyNode(node, context) {
20600
20600
  return ``;
20601
20601
  }
20602
20602
  switch (node.type) {
20603
- case "element":
20603
+ case 1:
20604
20604
  return stringifyElement(node, context);
20605
- case "text":
20605
+ case 2:
20606
20606
  return escapeHtml(node.content);
20607
- case "comment":
20607
+ case 3:
20608
20608
  return `<!--${escapeHtml(node.content)}-->`;
20609
20609
  case 5:
20610
20610
  return escapeHtml(toDisplayString(evaluateConstant(node.content)));
@@ -20682,7 +20682,7 @@ function evaluateConstant(exp) {
20682
20682
  if (isString(c) || isSymbol(c)) {
20683
20683
  return;
20684
20684
  }
20685
- if (c.type === "text") {
20685
+ if (c.type === 2) {
20686
20686
  res += c.content;
20687
20687
  } else if (c.type === 5) {
20688
20688
  res += toDisplayString(evaluateConstant(c.content));
@@ -20695,7 +20695,7 @@ function evaluateConstant(exp) {
20695
20695
  }
20696
20696
 
20697
20697
  const ignoreSideEffectTags = (node, context) => {
20698
- if (node.type === "element" && node.tagType === 0 && (node.tag === "script" || node.tag === "style")) {
20698
+ if (node.type === 1 && node.tagType === 0 && (node.tag === "script" || node.tag === "style")) {
20699
20699
  context.onError(
20700
20700
  createDOMCompilerError(61, node.loc)
20701
20701
  );