@vue/compat 3.2.44 → 3.2.45

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.
@@ -3584,10 +3584,15 @@ function defineAsyncComponent(source) {
3584
3584
  }
3585
3585
  });
3586
3586
  }
3587
- function createInnerComp(comp, { vnode: { ref, props, children, shapeFlag }, parent }) {
3587
+ function createInnerComp(comp, parent) {
3588
+ const { ref, props, children, ce } = parent.vnode;
3588
3589
  const vnode = createVNode(comp, props, children);
3589
3590
  // ensure inner component inherits the async wrapper's ref owner
3590
3591
  vnode.ref = ref;
3592
+ // pass the custom element callback on to the inner comp
3593
+ // and remove it from the async wrapper
3594
+ vnode.ce = ce;
3595
+ delete parent.vnode.ce;
3591
3596
  return vnode;
3592
3597
  }
3593
3598
 
@@ -3739,8 +3744,7 @@ const KeepAliveImpl = {
3739
3744
  : comp);
3740
3745
  const { include, exclude, max } = props;
3741
3746
  if ((include && (!name || !matches(include, name))) ||
3742
- (exclude && name && matches(exclude, name)) ||
3743
- (false )) {
3747
+ (exclude && name && matches(exclude, name))) {
3744
3748
  current = vnode;
3745
3749
  return rawVNode;
3746
3750
  }
@@ -3853,14 +3857,9 @@ function injectToKeepAliveRoot(hook, type, target, keepAliveRoot) {
3853
3857
  }, target);
3854
3858
  }
3855
3859
  function resetShapeFlag(vnode) {
3856
- let shapeFlag = vnode.shapeFlag;
3857
- if (shapeFlag & 256 /* ShapeFlags.COMPONENT_SHOULD_KEEP_ALIVE */) {
3858
- shapeFlag -= 256 /* ShapeFlags.COMPONENT_SHOULD_KEEP_ALIVE */;
3859
- }
3860
- if (shapeFlag & 512 /* ShapeFlags.COMPONENT_KEPT_ALIVE */) {
3861
- shapeFlag -= 512 /* ShapeFlags.COMPONENT_KEPT_ALIVE */;
3862
- }
3863
- vnode.shapeFlag = shapeFlag;
3860
+ // bitwise operations to remove keep alive flags
3861
+ vnode.shapeFlag &= ~256 /* ShapeFlags.COMPONENT_SHOULD_KEEP_ALIVE */;
3862
+ vnode.shapeFlag &= ~512 /* ShapeFlags.COMPONENT_KEPT_ALIVE */;
3864
3863
  }
3865
3864
  function getInnerChild(vnode) {
3866
3865
  return vnode.shapeFlag & 128 /* ShapeFlags.SUSPENSE */ ? vnode.ssContent : vnode;
@@ -4459,7 +4458,9 @@ fallback, noSlotted) {
4459
4458
  (currentRenderingInstance.parent &&
4460
4459
  isAsyncWrapper(currentRenderingInstance.parent) &&
4461
4460
  currentRenderingInstance.parent.isCE)) {
4462
- return createVNode('slot', name === 'default' ? null : { name }, fallback && fallback());
4461
+ if (name !== 'default')
4462
+ props.name = name;
4463
+ return createVNode('slot', props, fallback && fallback());
4463
4464
  }
4464
4465
  let slot = slots[name];
4465
4466
  // a compiled slot disables block tracking by default to avoid manual
@@ -4768,6 +4769,7 @@ const publicPropertiesMap =
4768
4769
  {
4769
4770
  installCompatInstanceProperties(publicPropertiesMap);
4770
4771
  }
4772
+ const hasSetupBinding = (state, key) => state !== EMPTY_OBJ && !state.__isScriptSetup && hasOwn(state, key);
4771
4773
  const PublicInstanceProxyHandlers = {
4772
4774
  get({ _: instance }, key) {
4773
4775
  const { ctx, setupState, data, props, accessCache, type, appContext } = instance;
@@ -4793,7 +4795,7 @@ const PublicInstanceProxyHandlers = {
4793
4795
  // default: just fallthrough
4794
4796
  }
4795
4797
  }
4796
- else if (setupState !== EMPTY_OBJ && hasOwn(setupState, key)) {
4798
+ else if (hasSetupBinding(setupState, key)) {
4797
4799
  accessCache[key] = 1 /* AccessTypes.SETUP */;
4798
4800
  return setupState[key];
4799
4801
  }
@@ -4858,7 +4860,7 @@ const PublicInstanceProxyHandlers = {
4858
4860
  },
4859
4861
  set({ _: instance }, key, value) {
4860
4862
  const { data, setupState, ctx } = instance;
4861
- if (setupState !== EMPTY_OBJ && hasOwn(setupState, key)) {
4863
+ if (hasSetupBinding(setupState, key)) {
4862
4864
  setupState[key] = value;
4863
4865
  return true;
4864
4866
  }
@@ -4883,7 +4885,7 @@ const PublicInstanceProxyHandlers = {
4883
4885
  let normalizedProps;
4884
4886
  return (!!accessCache[key] ||
4885
4887
  (data !== EMPTY_OBJ && hasOwn(data, key)) ||
4886
- (setupState !== EMPTY_OBJ && hasOwn(setupState, key)) ||
4888
+ hasSetupBinding(setupState, key) ||
4887
4889
  ((normalizedProps = propsOptions[0]) && hasOwn(normalizedProps, key)) ||
4888
4890
  hasOwn(ctx, key) ||
4889
4891
  hasOwn(publicPropertiesMap, key) ||
@@ -5804,7 +5806,7 @@ function createCompatVue(createApp, createSingletonApp) {
5804
5806
  return vm;
5805
5807
  }
5806
5808
  }
5807
- Vue.version = `2.6.14-compat:${"3.2.44"}`;
5809
+ Vue.version = `2.6.14-compat:${"3.2.45"}`;
5808
5810
  Vue.config = singletonApp.config;
5809
5811
  Vue.use = (p, ...options) => {
5810
5812
  if (p && isFunction(p.install)) {
@@ -7855,6 +7857,10 @@ function traverseStaticChildren(n1, n2, shallow = false) {
7855
7857
  if (!shallow)
7856
7858
  traverseStaticChildren(c1, c2);
7857
7859
  }
7860
+ // #6852 also inherit for text nodes
7861
+ if (c2.type === Text) {
7862
+ c2.el = c1.el;
7863
+ }
7858
7864
  }
7859
7865
  }
7860
7866
  }
@@ -7995,6 +8001,7 @@ const TeleportImpl = {
7995
8001
  }
7996
8002
  }
7997
8003
  }
8004
+ updateCssVars(n2);
7998
8005
  },
7999
8006
  remove(vnode, parentComponent, parentSuspense, optimized, { um: unmount, o: { remove: hostRemove } }, doRemove) {
8000
8007
  const { shapeFlag, children, anchor, targetAnchor, target, props } = vnode;
@@ -8073,11 +8080,26 @@ function hydrateTeleport(node, vnode, parentComponent, parentSuspense, slotScope
8073
8080
  hydrateChildren(targetNode, vnode, target, parentComponent, parentSuspense, slotScopeIds, optimized);
8074
8081
  }
8075
8082
  }
8083
+ updateCssVars(vnode);
8076
8084
  }
8077
8085
  return vnode.anchor && nextSibling(vnode.anchor);
8078
8086
  }
8079
8087
  // Force-casted public typing for h and TSX props inference
8080
8088
  const Teleport = TeleportImpl;
8089
+ function updateCssVars(vnode) {
8090
+ // presence of .ut method indicates owner component uses css vars.
8091
+ // code path here can assume browser environment.
8092
+ const ctx = vnode.ctx;
8093
+ if (ctx && ctx.ut) {
8094
+ let node = vnode.children[0].el;
8095
+ while (node !== vnode.targetAnchor) {
8096
+ if (node.nodeType === 1)
8097
+ node.setAttribute('data-v-owner', ctx.uid);
8098
+ node = node.nextSibling;
8099
+ }
8100
+ ctx.ut();
8101
+ }
8102
+ }
8081
8103
 
8082
8104
  const normalizedAsyncComponentMap = new Map();
8083
8105
  function convertLegacyAsyncComponent(comp) {
@@ -8275,7 +8297,8 @@ function createBaseVNode(type, props = null, children = null, patchFlag = 0, dyn
8275
8297
  patchFlag,
8276
8298
  dynamicProps,
8277
8299
  dynamicChildren: null,
8278
- appContext: null
8300
+ appContext: null,
8301
+ ctx: currentRenderingInstance
8279
8302
  };
8280
8303
  if (needFullChildrenNormalization) {
8281
8304
  normalizeChildren(vnode, children);
@@ -8434,7 +8457,8 @@ function cloneVNode(vnode, extraProps, mergeRef = false) {
8434
8457
  ssContent: vnode.ssContent && cloneVNode(vnode.ssContent),
8435
8458
  ssFallback: vnode.ssFallback && cloneVNode(vnode.ssFallback),
8436
8459
  el: vnode.el,
8437
- anchor: vnode.anchor
8460
+ anchor: vnode.anchor,
8461
+ ctx: vnode.ctx
8438
8462
  };
8439
8463
  {
8440
8464
  defineLegacyVNodeProperties(cloned);
@@ -9083,7 +9107,7 @@ function isMemoSame(cached, memo) {
9083
9107
  }
9084
9108
 
9085
9109
  // Core API ------------------------------------------------------------------
9086
- const version = "3.2.44";
9110
+ const version = "3.2.45";
9087
9111
  const _ssrUtils = {
9088
9112
  createComponentInstance,
9089
9113
  setupComponent,
@@ -9609,12 +9633,21 @@ class VueElement extends BaseClass {
9609
9633
  }
9610
9634
  else {
9611
9635
  this.attachShadow({ mode: 'open' });
9636
+ if (!this._def.__asyncLoader) {
9637
+ // for sync component defs we can immediately resolve props
9638
+ this._resolveProps(this._def);
9639
+ }
9612
9640
  }
9613
9641
  }
9614
9642
  connectedCallback() {
9615
9643
  this._connected = true;
9616
9644
  if (!this._instance) {
9617
- this._resolveDef();
9645
+ if (this._resolved) {
9646
+ this._update();
9647
+ }
9648
+ else {
9649
+ this._resolveDef();
9650
+ }
9618
9651
  }
9619
9652
  }
9620
9653
  disconnectedCallback() {
@@ -9630,9 +9663,6 @@ class VueElement extends BaseClass {
9630
9663
  * resolve inner component definition (handle possible async component)
9631
9664
  */
9632
9665
  _resolveDef() {
9633
- if (this._resolved) {
9634
- return;
9635
- }
9636
9666
  this._resolved = true;
9637
9667
  // set initial attrs
9638
9668
  for (let i = 0; i < this.attributes.length; i++) {
@@ -9644,38 +9674,26 @@ class VueElement extends BaseClass {
9644
9674
  this._setAttr(m.attributeName);
9645
9675
  }
9646
9676
  }).observe(this, { attributes: true });
9647
- const resolve = (def) => {
9648
- const { props = {}, styles } = def;
9649
- const hasOptions = !isArray(props);
9650
- const rawKeys = props ? (hasOptions ? Object.keys(props) : props) : [];
9677
+ const resolve = (def, isAsync = false) => {
9678
+ const { props, styles } = def;
9651
9679
  // cast Number-type props set before resolve
9652
9680
  let numberProps;
9653
- if (hasOptions) {
9654
- for (const key in this._props) {
9681
+ if (props && !isArray(props)) {
9682
+ for (const key in props) {
9655
9683
  const opt = props[key];
9656
9684
  if (opt === Number || (opt && opt.type === Number)) {
9657
- this._props[key] = toNumber(this._props[key]);
9658
- (numberProps || (numberProps = Object.create(null)))[key] = true;
9685
+ if (key in this._props) {
9686
+ this._props[key] = toNumber(this._props[key]);
9687
+ }
9688
+ (numberProps || (numberProps = Object.create(null)))[camelize(key)] = true;
9659
9689
  }
9660
9690
  }
9661
9691
  }
9662
9692
  this._numberProps = numberProps;
9663
- // check if there are props set pre-upgrade or connect
9664
- for (const key of Object.keys(this)) {
9665
- if (key[0] !== '_') {
9666
- this._setProp(key, this[key], true, false);
9667
- }
9668
- }
9669
- // defining getter/setters on prototype
9670
- for (const key of rawKeys.map(camelize)) {
9671
- Object.defineProperty(this, key, {
9672
- get() {
9673
- return this._getProp(key);
9674
- },
9675
- set(val) {
9676
- this._setProp(key, val);
9677
- }
9678
- });
9693
+ if (isAsync) {
9694
+ // defining getter/setters on prototype
9695
+ // for sync defs, this already happened in the constructor
9696
+ this._resolveProps(def);
9679
9697
  }
9680
9698
  // apply CSS
9681
9699
  this._applyStyles(styles);
@@ -9684,12 +9702,33 @@ class VueElement extends BaseClass {
9684
9702
  };
9685
9703
  const asyncDef = this._def.__asyncLoader;
9686
9704
  if (asyncDef) {
9687
- asyncDef().then(resolve);
9705
+ asyncDef().then(def => resolve(def, true));
9688
9706
  }
9689
9707
  else {
9690
9708
  resolve(this._def);
9691
9709
  }
9692
9710
  }
9711
+ _resolveProps(def) {
9712
+ const { props } = def;
9713
+ const declaredPropKeys = isArray(props) ? props : Object.keys(props || {});
9714
+ // check if there are props set pre-upgrade or connect
9715
+ for (const key of Object.keys(this)) {
9716
+ if (key[0] !== '_' && declaredPropKeys.includes(key)) {
9717
+ this._setProp(key, this[key], true, false);
9718
+ }
9719
+ }
9720
+ // defining getter/setters on prototype
9721
+ for (const key of declaredPropKeys.map(camelize)) {
9722
+ Object.defineProperty(this, key, {
9723
+ get() {
9724
+ return this._getProp(key);
9725
+ },
9726
+ set(val) {
9727
+ this._setProp(key, val);
9728
+ }
9729
+ });
9730
+ }
9731
+ }
9693
9732
  _setAttr(key) {
9694
9733
  let value = this.getAttribute(key);
9695
9734
  const camelKey = camelize(key);
@@ -9736,18 +9775,27 @@ class VueElement extends BaseClass {
9736
9775
  vnode.ce = instance => {
9737
9776
  this._instance = instance;
9738
9777
  instance.isCE = true;
9739
- // intercept emit
9740
- instance.emit = (event, ...args) => {
9778
+ const dispatch = (event, args) => {
9741
9779
  this.dispatchEvent(new CustomEvent(event, {
9742
9780
  detail: args
9743
9781
  }));
9744
9782
  };
9783
+ // intercept emit
9784
+ instance.emit = (event, ...args) => {
9785
+ // dispatch both the raw and hyphenated versions of an event
9786
+ // to match Vue behavior
9787
+ dispatch(event, args);
9788
+ if (hyphenate(event) !== event) {
9789
+ dispatch(hyphenate(event), args);
9790
+ }
9791
+ };
9745
9792
  // locate nearest Vue custom element parent for provide/inject
9746
9793
  let parent = this;
9747
9794
  while ((parent =
9748
9795
  parent && (parent.parentNode || parent.host))) {
9749
9796
  if (parent instanceof VueElement) {
9750
9797
  instance.parent = parent._instance;
9798
+ instance.provides = parent._instance.provides;
9751
9799
  break;
9752
9800
  }
9753
9801
  }
@@ -10961,15 +11009,16 @@ const errorMessages = {
10961
11009
  [41 /* ErrorCodes.X_V_MODEL_NO_EXPRESSION */]: `v-model is missing expression.`,
10962
11010
  [42 /* ErrorCodes.X_V_MODEL_MALFORMED_EXPRESSION */]: `v-model value must be a valid JavaScript member expression.`,
10963
11011
  [43 /* ErrorCodes.X_V_MODEL_ON_SCOPE_VARIABLE */]: `v-model cannot be used on v-for or v-slot scope variables because they are not writable.`,
10964
- [44 /* ErrorCodes.X_INVALID_EXPRESSION */]: `Error parsing JavaScript expression: `,
10965
- [45 /* ErrorCodes.X_KEEP_ALIVE_INVALID_CHILDREN */]: `<KeepAlive> expects exactly one child component.`,
11012
+ [44 /* ErrorCodes.X_V_MODEL_ON_PROPS */]: `v-model cannot be used on a prop, because local prop bindings are not writable.\nUse a v-bind binding combined with a v-on listener that emits update:x event instead.`,
11013
+ [45 /* ErrorCodes.X_INVALID_EXPRESSION */]: `Error parsing JavaScript expression: `,
11014
+ [46 /* ErrorCodes.X_KEEP_ALIVE_INVALID_CHILDREN */]: `<KeepAlive> expects exactly one child component.`,
10966
11015
  // generic errors
10967
- [46 /* ErrorCodes.X_PREFIX_ID_NOT_SUPPORTED */]: `"prefixIdentifiers" option is not supported in this build of compiler.`,
10968
- [47 /* ErrorCodes.X_MODULE_MODE_NOT_SUPPORTED */]: `ES module mode is not supported in this build of compiler.`,
10969
- [48 /* ErrorCodes.X_CACHE_HANDLER_NOT_SUPPORTED */]: `"cacheHandlers" option is only supported when the "prefixIdentifiers" option is enabled.`,
10970
- [49 /* ErrorCodes.X_SCOPE_ID_NOT_SUPPORTED */]: `"scopeId" option is only supported in module mode.`,
11016
+ [47 /* ErrorCodes.X_PREFIX_ID_NOT_SUPPORTED */]: `"prefixIdentifiers" option is not supported in this build of compiler.`,
11017
+ [48 /* ErrorCodes.X_MODULE_MODE_NOT_SUPPORTED */]: `ES module mode is not supported in this build of compiler.`,
11018
+ [49 /* ErrorCodes.X_CACHE_HANDLER_NOT_SUPPORTED */]: `"cacheHandlers" option is only supported when the "prefixIdentifiers" option is enabled.`,
11019
+ [50 /* ErrorCodes.X_SCOPE_ID_NOT_SUPPORTED */]: `"scopeId" option is only supported in module mode.`,
10971
11020
  // just to fulfill types
10972
- [50 /* ErrorCodes.__EXTEND_POINT__ */]: ``
11021
+ [51 /* ErrorCodes.__EXTEND_POINT__ */]: ``
10973
11022
  };
10974
11023
 
10975
11024
  const FRAGMENT = Symbol(``);
@@ -14124,7 +14173,7 @@ asRawStatements = false, localVars = Object.create(context.identifiers)) {
14124
14173
  }).program;
14125
14174
  }
14126
14175
  catch (e) {
14127
- context.onError(createCompilerError(44 /* ErrorCodes.X_INVALID_EXPRESSION */, node.loc, undefined, e.message));
14176
+ context.onError(createCompilerError(45 /* ErrorCodes.X_INVALID_EXPRESSION */, node.loc, undefined, e.message));
14128
14177
  return node;
14129
14178
  }
14130
14179
  const ids = [];
@@ -15935,9 +15984,16 @@ const transformModel = (dir, node, context) => {
15935
15984
  // im SFC <script setup> inline mode, the exp may have been transformed into
15936
15985
  // _unref(exp)
15937
15986
  const bindingType = context.bindingMetadata[rawExp];
15987
+ // check props
15988
+ if (bindingType === "props" /* BindingTypes.PROPS */ ||
15989
+ bindingType === "props-aliased" /* BindingTypes.PROPS_ALIASED */) {
15990
+ context.onError(createCompilerError(44 /* ErrorCodes.X_V_MODEL_ON_PROPS */, exp.loc));
15991
+ return createTransformProps();
15992
+ }
15938
15993
  const maybeRef = context.inline &&
15939
- bindingType &&
15940
- bindingType !== "setup-const" /* BindingTypes.SETUP_CONST */;
15994
+ (bindingType === "setup-let" /* BindingTypes.SETUP_LET */ ||
15995
+ bindingType === "setup-ref" /* BindingTypes.SETUP_REF */ ||
15996
+ bindingType === "setup-maybe-ref" /* BindingTypes.SETUP_MAYBE_REF */);
15941
15997
  if (!expString.trim() ||
15942
15998
  (!isMemberExpression(expString, context) && !maybeRef)) {
15943
15999
  context.onError(createCompilerError(42 /* ErrorCodes.X_V_MODEL_MALFORMED_EXPRESSION */, exp.loc));
@@ -16240,10 +16296,10 @@ function baseCompile(template, options = {}) {
16240
16296
  const isModuleMode = options.mode === 'module';
16241
16297
  const prefixIdentifiers = (options.prefixIdentifiers === true || isModuleMode);
16242
16298
  if (!prefixIdentifiers && options.cacheHandlers) {
16243
- onError(createCompilerError(48 /* ErrorCodes.X_CACHE_HANDLER_NOT_SUPPORTED */));
16299
+ onError(createCompilerError(49 /* ErrorCodes.X_CACHE_HANDLER_NOT_SUPPORTED */));
16244
16300
  }
16245
16301
  if (options.scopeId && !isModuleMode) {
16246
- onError(createCompilerError(49 /* ErrorCodes.X_SCOPE_ID_NOT_SUPPORTED */));
16302
+ onError(createCompilerError(50 /* ErrorCodes.X_SCOPE_ID_NOT_SUPPORTED */));
16247
16303
  }
16248
16304
  const ast = isString(template) ? baseParse(template, options) : template;
16249
16305
  const [nodeTransforms, directiveTransforms] = getBaseTransformPreset(prefixIdentifiers);
@@ -18747,26 +18803,26 @@ function createDOMCompilerError(code, loc) {
18747
18803
  return createCompilerError(code, loc, DOMErrorMessages );
18748
18804
  }
18749
18805
  const DOMErrorMessages = {
18750
- [50 /* DOMErrorCodes.X_V_HTML_NO_EXPRESSION */]: `v-html is missing expression.`,
18751
- [51 /* DOMErrorCodes.X_V_HTML_WITH_CHILDREN */]: `v-html will override element children.`,
18752
- [52 /* DOMErrorCodes.X_V_TEXT_NO_EXPRESSION */]: `v-text is missing expression.`,
18753
- [53 /* DOMErrorCodes.X_V_TEXT_WITH_CHILDREN */]: `v-text will override element children.`,
18754
- [54 /* DOMErrorCodes.X_V_MODEL_ON_INVALID_ELEMENT */]: `v-model can only be used on <input>, <textarea> and <select> elements.`,
18755
- [55 /* DOMErrorCodes.X_V_MODEL_ARG_ON_ELEMENT */]: `v-model argument is not supported on plain elements.`,
18756
- [56 /* DOMErrorCodes.X_V_MODEL_ON_FILE_INPUT_ELEMENT */]: `v-model cannot be used on file inputs since they are read-only. Use a v-on:change listener instead.`,
18757
- [57 /* DOMErrorCodes.X_V_MODEL_UNNECESSARY_VALUE */]: `Unnecessary value binding used alongside v-model. It will interfere with v-model's behavior.`,
18758
- [58 /* DOMErrorCodes.X_V_SHOW_NO_EXPRESSION */]: `v-show is missing expression.`,
18759
- [59 /* DOMErrorCodes.X_TRANSITION_INVALID_CHILDREN */]: `<Transition> expects exactly one child element or component.`,
18760
- [60 /* DOMErrorCodes.X_IGNORED_SIDE_EFFECT_TAG */]: `Tags with side effect (<script> and <style>) are ignored in client component templates.`
18806
+ [51 /* DOMErrorCodes.X_V_HTML_NO_EXPRESSION */]: `v-html is missing expression.`,
18807
+ [52 /* DOMErrorCodes.X_V_HTML_WITH_CHILDREN */]: `v-html will override element children.`,
18808
+ [53 /* DOMErrorCodes.X_V_TEXT_NO_EXPRESSION */]: `v-text is missing expression.`,
18809
+ [54 /* DOMErrorCodes.X_V_TEXT_WITH_CHILDREN */]: `v-text will override element children.`,
18810
+ [55 /* DOMErrorCodes.X_V_MODEL_ON_INVALID_ELEMENT */]: `v-model can only be used on <input>, <textarea> and <select> elements.`,
18811
+ [56 /* DOMErrorCodes.X_V_MODEL_ARG_ON_ELEMENT */]: `v-model argument is not supported on plain elements.`,
18812
+ [57 /* DOMErrorCodes.X_V_MODEL_ON_FILE_INPUT_ELEMENT */]: `v-model cannot be used on file inputs since they are read-only. Use a v-on:change listener instead.`,
18813
+ [58 /* DOMErrorCodes.X_V_MODEL_UNNECESSARY_VALUE */]: `Unnecessary value binding used alongside v-model. It will interfere with v-model's behavior.`,
18814
+ [59 /* DOMErrorCodes.X_V_SHOW_NO_EXPRESSION */]: `v-show is missing expression.`,
18815
+ [60 /* DOMErrorCodes.X_TRANSITION_INVALID_CHILDREN */]: `<Transition> expects exactly one child element or component.`,
18816
+ [61 /* DOMErrorCodes.X_IGNORED_SIDE_EFFECT_TAG */]: `Tags with side effect (<script> and <style>) are ignored in client component templates.`
18761
18817
  };
18762
18818
 
18763
18819
  const transformVHtml = (dir, node, context) => {
18764
18820
  const { exp, loc } = dir;
18765
18821
  if (!exp) {
18766
- context.onError(createDOMCompilerError(50 /* DOMErrorCodes.X_V_HTML_NO_EXPRESSION */, loc));
18822
+ context.onError(createDOMCompilerError(51 /* DOMErrorCodes.X_V_HTML_NO_EXPRESSION */, loc));
18767
18823
  }
18768
18824
  if (node.children.length) {
18769
- context.onError(createDOMCompilerError(51 /* DOMErrorCodes.X_V_HTML_WITH_CHILDREN */, loc));
18825
+ context.onError(createDOMCompilerError(52 /* DOMErrorCodes.X_V_HTML_WITH_CHILDREN */, loc));
18770
18826
  node.children.length = 0;
18771
18827
  }
18772
18828
  return {
@@ -18779,10 +18835,10 @@ const transformVHtml = (dir, node, context) => {
18779
18835
  const transformVText = (dir, node, context) => {
18780
18836
  const { exp, loc } = dir;
18781
18837
  if (!exp) {
18782
- context.onError(createDOMCompilerError(52 /* DOMErrorCodes.X_V_TEXT_NO_EXPRESSION */, loc));
18838
+ context.onError(createDOMCompilerError(53 /* DOMErrorCodes.X_V_TEXT_NO_EXPRESSION */, loc));
18783
18839
  }
18784
18840
  if (node.children.length) {
18785
- context.onError(createDOMCompilerError(53 /* DOMErrorCodes.X_V_TEXT_WITH_CHILDREN */, loc));
18841
+ context.onError(createDOMCompilerError(54 /* DOMErrorCodes.X_V_TEXT_WITH_CHILDREN */, loc));
18786
18842
  node.children.length = 0;
18787
18843
  }
18788
18844
  return {
@@ -18803,7 +18859,7 @@ const transformModel$1 = (dir, node, context) => {
18803
18859
  return baseResult;
18804
18860
  }
18805
18861
  if (dir.arg) {
18806
- context.onError(createDOMCompilerError(55 /* DOMErrorCodes.X_V_MODEL_ARG_ON_ELEMENT */, dir.arg.loc));
18862
+ context.onError(createDOMCompilerError(56 /* DOMErrorCodes.X_V_MODEL_ARG_ON_ELEMENT */, dir.arg.loc));
18807
18863
  }
18808
18864
  const { tag } = node;
18809
18865
  const isCustomElement = context.isCustomElement(tag);
@@ -18830,7 +18886,7 @@ const transformModel$1 = (dir, node, context) => {
18830
18886
  break;
18831
18887
  case 'file':
18832
18888
  isInvalidType = true;
18833
- context.onError(createDOMCompilerError(56 /* DOMErrorCodes.X_V_MODEL_ON_FILE_INPUT_ELEMENT */, dir.loc));
18889
+ context.onError(createDOMCompilerError(57 /* DOMErrorCodes.X_V_MODEL_ON_FILE_INPUT_ELEMENT */, dir.loc));
18834
18890
  break;
18835
18891
  }
18836
18892
  }
@@ -18854,7 +18910,7 @@ const transformModel$1 = (dir, node, context) => {
18854
18910
  }
18855
18911
  }
18856
18912
  else {
18857
- context.onError(createDOMCompilerError(54 /* DOMErrorCodes.X_V_MODEL_ON_INVALID_ELEMENT */, dir.loc));
18913
+ context.onError(createDOMCompilerError(55 /* DOMErrorCodes.X_V_MODEL_ON_INVALID_ELEMENT */, dir.loc));
18858
18914
  }
18859
18915
  // native vmodel doesn't need the `modelValue` props since they are also
18860
18916
  // passed to the runtime as `binding.value`. removing it reduces code size.
@@ -18978,7 +19034,7 @@ const transformOn$1 = (dir, node, context) => {
18978
19034
  const transformShow = (dir, node, context) => {
18979
19035
  const { exp, loc } = dir;
18980
19036
  if (!exp) {
18981
- context.onError(createDOMCompilerError(58 /* DOMErrorCodes.X_V_SHOW_NO_EXPRESSION */, loc));
19037
+ context.onError(createDOMCompilerError(59 /* DOMErrorCodes.X_V_SHOW_NO_EXPRESSION */, loc));
18982
19038
  }
18983
19039
  return {
18984
19040
  props: [],
@@ -19286,7 +19342,7 @@ const ignoreSideEffectTags = (node, context) => {
19286
19342
  if (node.type === 1 /* NodeTypes.ELEMENT */ &&
19287
19343
  node.tagType === 0 /* ElementTypes.ELEMENT */ &&
19288
19344
  (node.tag === 'script' || node.tag === 'style')) {
19289
- context.onError(createDOMCompilerError(60 /* DOMErrorCodes.X_IGNORED_SIDE_EFFECT_TAG */, node.loc));
19345
+ context.onError(createDOMCompilerError(61 /* DOMErrorCodes.X_IGNORED_SIDE_EFFECT_TAG */, node.loc));
19290
19346
  context.removeNode();
19291
19347
  }
19292
19348
  };