@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.
@@ -2101,12 +2101,6 @@ var Vue = (function () {
2101
2101
  // components to be unmounted and re-mounted. Queue the update so that we
2102
2102
  // don't end up forcing the same parent to re-render multiple times.
2103
2103
  queueJob(instance.parent.update);
2104
- // instance is the inner component of an async custom element
2105
- // invoke to reset styles
2106
- if (instance.parent.type.__asyncLoader &&
2107
- instance.parent.ceReload) {
2108
- instance.parent.ceReload(newComp.styles);
2109
- }
2110
2104
  }
2111
2105
  else if (instance.appContext.reload) {
2112
2106
  // root instance mounted via createApp() has a reload method
@@ -4519,10 +4513,15 @@ var Vue = (function () {
4519
4513
  }
4520
4514
  });
4521
4515
  }
4522
- function createInnerComp(comp, { vnode: { ref, props, children, shapeFlag }, parent }) {
4516
+ function createInnerComp(comp, parent) {
4517
+ const { ref, props, children, ce } = parent.vnode;
4523
4518
  const vnode = createVNode(comp, props, children);
4524
4519
  // ensure inner component inherits the async wrapper's ref owner
4525
4520
  vnode.ref = ref;
4521
+ // pass the custom element callback on to the inner comp
4522
+ // and remove it from the async wrapper
4523
+ vnode.ce = ce;
4524
+ delete parent.vnode.ce;
4526
4525
  return vnode;
4527
4526
  }
4528
4527
 
@@ -4680,8 +4679,7 @@ var Vue = (function () {
4680
4679
  : comp);
4681
4680
  const { include, exclude, max } = props;
4682
4681
  if ((include && (!name || !matches(include, name))) ||
4683
- (exclude && name && matches(exclude, name)) ||
4684
- (hmrDirtyComponents.has(comp))) {
4682
+ (exclude && name && matches(exclude, name))) {
4685
4683
  current = vnode;
4686
4684
  return rawVNode;
4687
4685
  }
@@ -4794,14 +4792,9 @@ var Vue = (function () {
4794
4792
  }, target);
4795
4793
  }
4796
4794
  function resetShapeFlag(vnode) {
4797
- let shapeFlag = vnode.shapeFlag;
4798
- if (shapeFlag & 256 /* ShapeFlags.COMPONENT_SHOULD_KEEP_ALIVE */) {
4799
- shapeFlag -= 256 /* ShapeFlags.COMPONENT_SHOULD_KEEP_ALIVE */;
4800
- }
4801
- if (shapeFlag & 512 /* ShapeFlags.COMPONENT_KEPT_ALIVE */) {
4802
- shapeFlag -= 512 /* ShapeFlags.COMPONENT_KEPT_ALIVE */;
4803
- }
4804
- vnode.shapeFlag = shapeFlag;
4795
+ // bitwise operations to remove keep alive flags
4796
+ vnode.shapeFlag &= ~256 /* ShapeFlags.COMPONENT_SHOULD_KEEP_ALIVE */;
4797
+ vnode.shapeFlag &= ~512 /* ShapeFlags.COMPONENT_KEPT_ALIVE */;
4805
4798
  }
4806
4799
  function getInnerChild(vnode) {
4807
4800
  return vnode.shapeFlag & 128 /* ShapeFlags.SUSPENSE */ ? vnode.ssContent : vnode;
@@ -5429,7 +5422,9 @@ var Vue = (function () {
5429
5422
  (currentRenderingInstance.parent &&
5430
5423
  isAsyncWrapper(currentRenderingInstance.parent) &&
5431
5424
  currentRenderingInstance.parent.isCE)) {
5432
- return createVNode('slot', name === 'default' ? null : { name }, fallback && fallback());
5425
+ if (name !== 'default')
5426
+ props.name = name;
5427
+ return createVNode('slot', props, fallback && fallback());
5433
5428
  }
5434
5429
  let slot = slots[name];
5435
5430
  if (slot && slot.length > 1) {
@@ -5749,6 +5744,7 @@ var Vue = (function () {
5749
5744
  installCompatInstanceProperties(publicPropertiesMap);
5750
5745
  }
5751
5746
  const isReservedPrefix = (key) => key === '_' || key === '$';
5747
+ const hasSetupBinding = (state, key) => state !== EMPTY_OBJ && !state.__isScriptSetup && hasOwn(state, key);
5752
5748
  const PublicInstanceProxyHandlers = {
5753
5749
  get({ _: instance }, key) {
5754
5750
  const { ctx, setupState, data, props, accessCache, type, appContext } = instance;
@@ -5756,15 +5752,6 @@ var Vue = (function () {
5756
5752
  if (key === '__isVue') {
5757
5753
  return true;
5758
5754
  }
5759
- // prioritize <script setup> bindings during dev.
5760
- // this allows even properties that start with _ or $ to be used - so that
5761
- // it aligns with the production behavior where the render fn is inlined and
5762
- // indeed has access to all declared variables.
5763
- if (setupState !== EMPTY_OBJ &&
5764
- setupState.__isScriptSetup &&
5765
- hasOwn(setupState, key)) {
5766
- return setupState[key];
5767
- }
5768
5755
  // data / props / ctx
5769
5756
  // This getter gets called for every property access on the render context
5770
5757
  // during render and is a major hotspot. The most expensive part of this
@@ -5787,7 +5774,7 @@ var Vue = (function () {
5787
5774
  // default: just fallthrough
5788
5775
  }
5789
5776
  }
5790
- else if (setupState !== EMPTY_OBJ && hasOwn(setupState, key)) {
5777
+ else if (hasSetupBinding(setupState, key)) {
5791
5778
  accessCache[key] = 1 /* AccessTypes.SETUP */;
5792
5779
  return setupState[key];
5793
5780
  }
@@ -5866,21 +5853,26 @@ var Vue = (function () {
5866
5853
  },
5867
5854
  set({ _: instance }, key, value) {
5868
5855
  const { data, setupState, ctx } = instance;
5869
- if (setupState !== EMPTY_OBJ && hasOwn(setupState, key)) {
5856
+ if (hasSetupBinding(setupState, key)) {
5870
5857
  setupState[key] = value;
5871
5858
  return true;
5872
5859
  }
5860
+ else if (setupState.__isScriptSetup &&
5861
+ hasOwn(setupState, key)) {
5862
+ warn$1(`Cannot mutate <script setup> binding "${key}" from Options API.`);
5863
+ return false;
5864
+ }
5873
5865
  else if (data !== EMPTY_OBJ && hasOwn(data, key)) {
5874
5866
  data[key] = value;
5875
5867
  return true;
5876
5868
  }
5877
5869
  else if (hasOwn(instance.props, key)) {
5878
- warn$1(`Attempting to mutate prop "${key}". Props are readonly.`, instance);
5870
+ warn$1(`Attempting to mutate prop "${key}". Props are readonly.`);
5879
5871
  return false;
5880
5872
  }
5881
5873
  if (key[0] === '$' && key.slice(1) in instance) {
5882
5874
  warn$1(`Attempting to mutate public property "${key}". ` +
5883
- `Properties starting with $ are reserved and readonly.`, instance);
5875
+ `Properties starting with $ are reserved and readonly.`);
5884
5876
  return false;
5885
5877
  }
5886
5878
  else {
@@ -5901,7 +5893,7 @@ var Vue = (function () {
5901
5893
  let normalizedProps;
5902
5894
  return (!!accessCache[key] ||
5903
5895
  (data !== EMPTY_OBJ && hasOwn(data, key)) ||
5904
- (setupState !== EMPTY_OBJ && hasOwn(setupState, key)) ||
5896
+ hasSetupBinding(setupState, key) ||
5905
5897
  ((normalizedProps = propsOptions[0]) && hasOwn(normalizedProps, key)) ||
5906
5898
  hasOwn(ctx, key) ||
5907
5899
  hasOwn(publicPropertiesMap, key) ||
@@ -7176,7 +7168,7 @@ var Vue = (function () {
7176
7168
  return vm;
7177
7169
  }
7178
7170
  }
7179
- Vue.version = `2.6.14-compat:${"3.2.44"}`;
7171
+ Vue.version = `2.6.14-compat:${"3.2.45"}`;
7180
7172
  Vue.config = singletonApp.config;
7181
7173
  Vue.use = (p, ...options) => {
7182
7174
  if (p && isFunction(p.install)) {
@@ -9563,6 +9555,10 @@ var Vue = (function () {
9563
9555
  if (!shallow)
9564
9556
  traverseStaticChildren(c1, c2);
9565
9557
  }
9558
+ // #6852 also inherit for text nodes
9559
+ if (c2.type === Text) {
9560
+ c2.el = c1.el;
9561
+ }
9566
9562
  // also inherit for comment nodes, but not placeholders (e.g. v-if which
9567
9563
  // would have received .el during block patch)
9568
9564
  if (c2.type === Comment && !c2.el) {
@@ -9733,6 +9729,7 @@ var Vue = (function () {
9733
9729
  }
9734
9730
  }
9735
9731
  }
9732
+ updateCssVars(n2);
9736
9733
  },
9737
9734
  remove(vnode, parentComponent, parentSuspense, optimized, { um: unmount, o: { remove: hostRemove } }, doRemove) {
9738
9735
  const { shapeFlag, children, anchor, targetAnchor, target, props } = vnode;
@@ -9811,11 +9808,26 @@ var Vue = (function () {
9811
9808
  hydrateChildren(targetNode, vnode, target, parentComponent, parentSuspense, slotScopeIds, optimized);
9812
9809
  }
9813
9810
  }
9811
+ updateCssVars(vnode);
9814
9812
  }
9815
9813
  return vnode.anchor && nextSibling(vnode.anchor);
9816
9814
  }
9817
9815
  // Force-casted public typing for h and TSX props inference
9818
9816
  const Teleport = TeleportImpl;
9817
+ function updateCssVars(vnode) {
9818
+ // presence of .ut method indicates owner component uses css vars.
9819
+ // code path here can assume browser environment.
9820
+ const ctx = vnode.ctx;
9821
+ if (ctx && ctx.ut) {
9822
+ let node = vnode.children[0].el;
9823
+ while (node !== vnode.targetAnchor) {
9824
+ if (node.nodeType === 1)
9825
+ node.setAttribute('data-v-owner', ctx.uid);
9826
+ node = node.nextSibling;
9827
+ }
9828
+ ctx.ut();
9829
+ }
9830
+ }
9819
9831
 
9820
9832
  const normalizedAsyncComponentMap = new Map();
9821
9833
  function convertLegacyAsyncComponent(comp) {
@@ -9970,6 +9982,10 @@ var Vue = (function () {
9970
9982
  function isSameVNodeType(n1, n2) {
9971
9983
  if (n2.shapeFlag & 6 /* ShapeFlags.COMPONENT */ &&
9972
9984
  hmrDirtyComponents.has(n2.type)) {
9985
+ // #7042, ensure the vnode being unmounted during HMR
9986
+ // bitwise operations to remove keep alive flags
9987
+ n1.shapeFlag &= ~256 /* ShapeFlags.COMPONENT_SHOULD_KEEP_ALIVE */;
9988
+ n2.shapeFlag &= ~512 /* ShapeFlags.COMPONENT_KEPT_ALIVE */;
9973
9989
  // HMR only: if the component has been hot-updated, force a reload.
9974
9990
  return false;
9975
9991
  }
@@ -10025,7 +10041,8 @@ var Vue = (function () {
10025
10041
  patchFlag,
10026
10042
  dynamicProps,
10027
10043
  dynamicChildren: null,
10028
- appContext: null
10044
+ appContext: null,
10045
+ ctx: currentRenderingInstance
10029
10046
  };
10030
10047
  if (needFullChildrenNormalization) {
10031
10048
  normalizeChildren(vnode, children);
@@ -10200,7 +10217,8 @@ var Vue = (function () {
10200
10217
  ssContent: vnode.ssContent && cloneVNode(vnode.ssContent),
10201
10218
  ssFallback: vnode.ssFallback && cloneVNode(vnode.ssFallback),
10202
10219
  el: vnode.el,
10203
- anchor: vnode.anchor
10220
+ anchor: vnode.anchor,
10221
+ ctx: vnode.ctx
10204
10222
  };
10205
10223
  {
10206
10224
  defineLegacyVNodeProperties(cloned);
@@ -11183,7 +11201,7 @@ var Vue = (function () {
11183
11201
  }
11184
11202
 
11185
11203
  // Core API ------------------------------------------------------------------
11186
- const version = "3.2.44";
11204
+ const version = "3.2.45";
11187
11205
  /**
11188
11206
  * SSR utils for \@vue/server-renderer. Only exposed in ssr-possible builds.
11189
11207
  * @internal
@@ -11717,12 +11735,21 @@ var Vue = (function () {
11717
11735
  `defined as hydratable. Use \`defineSSRCustomElement\`.`);
11718
11736
  }
11719
11737
  this.attachShadow({ mode: 'open' });
11738
+ if (!this._def.__asyncLoader) {
11739
+ // for sync component defs we can immediately resolve props
11740
+ this._resolveProps(this._def);
11741
+ }
11720
11742
  }
11721
11743
  }
11722
11744
  connectedCallback() {
11723
11745
  this._connected = true;
11724
11746
  if (!this._instance) {
11725
- this._resolveDef();
11747
+ if (this._resolved) {
11748
+ this._update();
11749
+ }
11750
+ else {
11751
+ this._resolveDef();
11752
+ }
11726
11753
  }
11727
11754
  }
11728
11755
  disconnectedCallback() {
@@ -11738,9 +11765,6 @@ var Vue = (function () {
11738
11765
  * resolve inner component definition (handle possible async component)
11739
11766
  */
11740
11767
  _resolveDef() {
11741
- if (this._resolved) {
11742
- return;
11743
- }
11744
11768
  this._resolved = true;
11745
11769
  // set initial attrs
11746
11770
  for (let i = 0; i < this.attributes.length; i++) {
@@ -11752,38 +11776,26 @@ var Vue = (function () {
11752
11776
  this._setAttr(m.attributeName);
11753
11777
  }
11754
11778
  }).observe(this, { attributes: true });
11755
- const resolve = (def) => {
11756
- const { props = {}, styles } = def;
11757
- const hasOptions = !isArray(props);
11758
- const rawKeys = props ? (hasOptions ? Object.keys(props) : props) : [];
11779
+ const resolve = (def, isAsync = false) => {
11780
+ const { props, styles } = def;
11759
11781
  // cast Number-type props set before resolve
11760
11782
  let numberProps;
11761
- if (hasOptions) {
11762
- for (const key in this._props) {
11783
+ if (props && !isArray(props)) {
11784
+ for (const key in props) {
11763
11785
  const opt = props[key];
11764
11786
  if (opt === Number || (opt && opt.type === Number)) {
11765
- this._props[key] = toNumber(this._props[key]);
11766
- (numberProps || (numberProps = Object.create(null)))[key] = true;
11787
+ if (key in this._props) {
11788
+ this._props[key] = toNumber(this._props[key]);
11789
+ }
11790
+ (numberProps || (numberProps = Object.create(null)))[camelize(key)] = true;
11767
11791
  }
11768
11792
  }
11769
11793
  }
11770
11794
  this._numberProps = numberProps;
11771
- // check if there are props set pre-upgrade or connect
11772
- for (const key of Object.keys(this)) {
11773
- if (key[0] !== '_') {
11774
- this._setProp(key, this[key], true, false);
11775
- }
11776
- }
11777
- // defining getter/setters on prototype
11778
- for (const key of rawKeys.map(camelize)) {
11779
- Object.defineProperty(this, key, {
11780
- get() {
11781
- return this._getProp(key);
11782
- },
11783
- set(val) {
11784
- this._setProp(key, val);
11785
- }
11786
- });
11795
+ if (isAsync) {
11796
+ // defining getter/setters on prototype
11797
+ // for sync defs, this already happened in the constructor
11798
+ this._resolveProps(def);
11787
11799
  }
11788
11800
  // apply CSS
11789
11801
  this._applyStyles(styles);
@@ -11792,12 +11804,33 @@ var Vue = (function () {
11792
11804
  };
11793
11805
  const asyncDef = this._def.__asyncLoader;
11794
11806
  if (asyncDef) {
11795
- asyncDef().then(resolve);
11807
+ asyncDef().then(def => resolve(def, true));
11796
11808
  }
11797
11809
  else {
11798
11810
  resolve(this._def);
11799
11811
  }
11800
11812
  }
11813
+ _resolveProps(def) {
11814
+ const { props } = def;
11815
+ const declaredPropKeys = isArray(props) ? props : Object.keys(props || {});
11816
+ // check if there are props set pre-upgrade or connect
11817
+ for (const key of Object.keys(this)) {
11818
+ if (key[0] !== '_' && declaredPropKeys.includes(key)) {
11819
+ this._setProp(key, this[key], true, false);
11820
+ }
11821
+ }
11822
+ // defining getter/setters on prototype
11823
+ for (const key of declaredPropKeys.map(camelize)) {
11824
+ Object.defineProperty(this, key, {
11825
+ get() {
11826
+ return this._getProp(key);
11827
+ },
11828
+ set(val) {
11829
+ this._setProp(key, val);
11830
+ }
11831
+ });
11832
+ }
11833
+ }
11801
11834
  _setAttr(key) {
11802
11835
  let value = this.getAttribute(key);
11803
11836
  const camelKey = camelize(key);
@@ -11853,27 +11886,31 @@ var Vue = (function () {
11853
11886
  this._styles.length = 0;
11854
11887
  }
11855
11888
  this._applyStyles(newStyles);
11856
- // if this is an async component, ceReload is called from the inner
11857
- // component so no need to reload the async wrapper
11858
- if (!this._def.__asyncLoader) {
11859
- // reload
11860
- this._instance = null;
11861
- this._update();
11862
- }
11889
+ this._instance = null;
11890
+ this._update();
11863
11891
  };
11864
11892
  }
11865
- // intercept emit
11866
- instance.emit = (event, ...args) => {
11893
+ const dispatch = (event, args) => {
11867
11894
  this.dispatchEvent(new CustomEvent(event, {
11868
11895
  detail: args
11869
11896
  }));
11870
11897
  };
11898
+ // intercept emit
11899
+ instance.emit = (event, ...args) => {
11900
+ // dispatch both the raw and hyphenated versions of an event
11901
+ // to match Vue behavior
11902
+ dispatch(event, args);
11903
+ if (hyphenate(event) !== event) {
11904
+ dispatch(hyphenate(event), args);
11905
+ }
11906
+ };
11871
11907
  // locate nearest Vue custom element parent for provide/inject
11872
11908
  let parent = this;
11873
11909
  while ((parent =
11874
11910
  parent && (parent.parentNode || parent.host))) {
11875
11911
  if (parent instanceof VueElement) {
11876
11912
  instance.parent = parent._instance;
11913
+ instance.provides = parent._instance.provides;
11877
11914
  break;
11878
11915
  }
11879
11916
  }
@@ -11917,7 +11954,14 @@ var Vue = (function () {
11917
11954
  warn$1(`useCssVars is called without current active component instance.`);
11918
11955
  return;
11919
11956
  }
11920
- const setVars = () => setVarsOnVNode(instance.subTree, getter(instance.proxy));
11957
+ const updateTeleports = (instance.ut = (vars = getter(instance.proxy)) => {
11958
+ Array.from(document.querySelectorAll(`[data-v-owner="${instance.uid}"]`)).forEach(node => setVarsOnNode(node, vars));
11959
+ });
11960
+ const setVars = () => {
11961
+ const vars = getter(instance.proxy);
11962
+ setVarsOnVNode(instance.subTree, vars);
11963
+ updateTeleports(vars);
11964
+ };
11921
11965
  watchPostEffect(setVars);
11922
11966
  onMounted(() => {
11923
11967
  const ob = new MutationObserver(setVars);
@@ -13178,15 +13222,16 @@ var Vue = (function () {
13178
13222
  [41 /* ErrorCodes.X_V_MODEL_NO_EXPRESSION */]: `v-model is missing expression.`,
13179
13223
  [42 /* ErrorCodes.X_V_MODEL_MALFORMED_EXPRESSION */]: `v-model value must be a valid JavaScript member expression.`,
13180
13224
  [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.`,
13181
- [44 /* ErrorCodes.X_INVALID_EXPRESSION */]: `Error parsing JavaScript expression: `,
13182
- [45 /* ErrorCodes.X_KEEP_ALIVE_INVALID_CHILDREN */]: `<KeepAlive> expects exactly one child component.`,
13225
+ [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.`,
13226
+ [45 /* ErrorCodes.X_INVALID_EXPRESSION */]: `Error parsing JavaScript expression: `,
13227
+ [46 /* ErrorCodes.X_KEEP_ALIVE_INVALID_CHILDREN */]: `<KeepAlive> expects exactly one child component.`,
13183
13228
  // generic errors
13184
- [46 /* ErrorCodes.X_PREFIX_ID_NOT_SUPPORTED */]: `"prefixIdentifiers" option is not supported in this build of compiler.`,
13185
- [47 /* ErrorCodes.X_MODULE_MODE_NOT_SUPPORTED */]: `ES module mode is not supported in this build of compiler.`,
13186
- [48 /* ErrorCodes.X_CACHE_HANDLER_NOT_SUPPORTED */]: `"cacheHandlers" option is only supported when the "prefixIdentifiers" option is enabled.`,
13187
- [49 /* ErrorCodes.X_SCOPE_ID_NOT_SUPPORTED */]: `"scopeId" option is only supported in module mode.`,
13229
+ [47 /* ErrorCodes.X_PREFIX_ID_NOT_SUPPORTED */]: `"prefixIdentifiers" option is not supported in this build of compiler.`,
13230
+ [48 /* ErrorCodes.X_MODULE_MODE_NOT_SUPPORTED */]: `ES module mode is not supported in this build of compiler.`,
13231
+ [49 /* ErrorCodes.X_CACHE_HANDLER_NOT_SUPPORTED */]: `"cacheHandlers" option is only supported when the "prefixIdentifiers" option is enabled.`,
13232
+ [50 /* ErrorCodes.X_SCOPE_ID_NOT_SUPPORTED */]: `"scopeId" option is only supported in module mode.`,
13188
13233
  // just to fulfill types
13189
- [50 /* ErrorCodes.__EXTEND_POINT__ */]: ``
13234
+ [51 /* ErrorCodes.__EXTEND_POINT__ */]: ``
13190
13235
  };
13191
13236
 
13192
13237
  const FRAGMENT = Symbol(`Fragment` );
@@ -15811,7 +15856,7 @@ var Vue = (function () {
15811
15856
  if (keywordMatch) {
15812
15857
  message = `avoid using JavaScript keyword as property name: "${keywordMatch[0]}"`;
15813
15858
  }
15814
- context.onError(createCompilerError(44 /* ErrorCodes.X_INVALID_EXPRESSION */, node.loc, undefined, message));
15859
+ context.onError(createCompilerError(45 /* ErrorCodes.X_INVALID_EXPRESSION */, node.loc, undefined, message));
15815
15860
  }
15816
15861
  }
15817
15862
 
@@ -16605,7 +16650,7 @@ var Vue = (function () {
16605
16650
  // 2. Force keep-alive to always be updated, since it uses raw children.
16606
16651
  patchFlag |= 1024 /* PatchFlags.DYNAMIC_SLOTS */;
16607
16652
  if (node.children.length > 1) {
16608
- context.onError(createCompilerError(45 /* ErrorCodes.X_KEEP_ALIVE_INVALID_CHILDREN */, {
16653
+ context.onError(createCompilerError(46 /* ErrorCodes.X_KEEP_ALIVE_INVALID_CHILDREN */, {
16609
16654
  start: node.children[0].loc.start,
16610
16655
  end: node.children[node.children.length - 1].loc.end,
16611
16656
  source: ''
@@ -17460,8 +17505,14 @@ var Vue = (function () {
17460
17505
  const expString = exp.type === 4 /* NodeTypes.SIMPLE_EXPRESSION */ ? exp.content : rawExp;
17461
17506
  // im SFC <script setup> inline mode, the exp may have been transformed into
17462
17507
  // _unref(exp)
17463
- context.bindingMetadata[rawExp];
17464
- const maybeRef = !true /* BindingTypes.SETUP_CONST */;
17508
+ const bindingType = context.bindingMetadata[rawExp];
17509
+ // check props
17510
+ if (bindingType === "props" /* BindingTypes.PROPS */ ||
17511
+ bindingType === "props-aliased" /* BindingTypes.PROPS_ALIASED */) {
17512
+ context.onError(createCompilerError(44 /* ErrorCodes.X_V_MODEL_ON_PROPS */, exp.loc));
17513
+ return createTransformProps();
17514
+ }
17515
+ const maybeRef = !true ;
17465
17516
  if (!expString.trim() ||
17466
17517
  (!isMemberExpression(expString) && !maybeRef)) {
17467
17518
  context.onError(createCompilerError(42 /* ErrorCodes.X_V_MODEL_MALFORMED_EXPRESSION */, exp.loc));
@@ -17728,18 +17779,18 @@ var Vue = (function () {
17728
17779
  /* istanbul ignore if */
17729
17780
  {
17730
17781
  if (options.prefixIdentifiers === true) {
17731
- onError(createCompilerError(46 /* ErrorCodes.X_PREFIX_ID_NOT_SUPPORTED */));
17782
+ onError(createCompilerError(47 /* ErrorCodes.X_PREFIX_ID_NOT_SUPPORTED */));
17732
17783
  }
17733
17784
  else if (isModuleMode) {
17734
- onError(createCompilerError(47 /* ErrorCodes.X_MODULE_MODE_NOT_SUPPORTED */));
17785
+ onError(createCompilerError(48 /* ErrorCodes.X_MODULE_MODE_NOT_SUPPORTED */));
17735
17786
  }
17736
17787
  }
17737
17788
  const prefixIdentifiers = !true ;
17738
17789
  if (options.cacheHandlers) {
17739
- onError(createCompilerError(48 /* ErrorCodes.X_CACHE_HANDLER_NOT_SUPPORTED */));
17790
+ onError(createCompilerError(49 /* ErrorCodes.X_CACHE_HANDLER_NOT_SUPPORTED */));
17740
17791
  }
17741
17792
  if (options.scopeId && !isModuleMode) {
17742
- onError(createCompilerError(49 /* ErrorCodes.X_SCOPE_ID_NOT_SUPPORTED */));
17793
+ onError(createCompilerError(50 /* ErrorCodes.X_SCOPE_ID_NOT_SUPPORTED */));
17743
17794
  }
17744
17795
  const ast = isString(template) ? baseParse(template, options) : template;
17745
17796
  const [nodeTransforms, directiveTransforms] = getBaseTransformPreset();
@@ -17897,26 +17948,26 @@ var Vue = (function () {
17897
17948
  return createCompilerError(code, loc, DOMErrorMessages );
17898
17949
  }
17899
17950
  const DOMErrorMessages = {
17900
- [50 /* DOMErrorCodes.X_V_HTML_NO_EXPRESSION */]: `v-html is missing expression.`,
17901
- [51 /* DOMErrorCodes.X_V_HTML_WITH_CHILDREN */]: `v-html will override element children.`,
17902
- [52 /* DOMErrorCodes.X_V_TEXT_NO_EXPRESSION */]: `v-text is missing expression.`,
17903
- [53 /* DOMErrorCodes.X_V_TEXT_WITH_CHILDREN */]: `v-text will override element children.`,
17904
- [54 /* DOMErrorCodes.X_V_MODEL_ON_INVALID_ELEMENT */]: `v-model can only be used on <input>, <textarea> and <select> elements.`,
17905
- [55 /* DOMErrorCodes.X_V_MODEL_ARG_ON_ELEMENT */]: `v-model argument is not supported on plain elements.`,
17906
- [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.`,
17907
- [57 /* DOMErrorCodes.X_V_MODEL_UNNECESSARY_VALUE */]: `Unnecessary value binding used alongside v-model. It will interfere with v-model's behavior.`,
17908
- [58 /* DOMErrorCodes.X_V_SHOW_NO_EXPRESSION */]: `v-show is missing expression.`,
17909
- [59 /* DOMErrorCodes.X_TRANSITION_INVALID_CHILDREN */]: `<Transition> expects exactly one child element or component.`,
17910
- [60 /* DOMErrorCodes.X_IGNORED_SIDE_EFFECT_TAG */]: `Tags with side effect (<script> and <style>) are ignored in client component templates.`
17951
+ [51 /* DOMErrorCodes.X_V_HTML_NO_EXPRESSION */]: `v-html is missing expression.`,
17952
+ [52 /* DOMErrorCodes.X_V_HTML_WITH_CHILDREN */]: `v-html will override element children.`,
17953
+ [53 /* DOMErrorCodes.X_V_TEXT_NO_EXPRESSION */]: `v-text is missing expression.`,
17954
+ [54 /* DOMErrorCodes.X_V_TEXT_WITH_CHILDREN */]: `v-text will override element children.`,
17955
+ [55 /* DOMErrorCodes.X_V_MODEL_ON_INVALID_ELEMENT */]: `v-model can only be used on <input>, <textarea> and <select> elements.`,
17956
+ [56 /* DOMErrorCodes.X_V_MODEL_ARG_ON_ELEMENT */]: `v-model argument is not supported on plain elements.`,
17957
+ [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.`,
17958
+ [58 /* DOMErrorCodes.X_V_MODEL_UNNECESSARY_VALUE */]: `Unnecessary value binding used alongside v-model. It will interfere with v-model's behavior.`,
17959
+ [59 /* DOMErrorCodes.X_V_SHOW_NO_EXPRESSION */]: `v-show is missing expression.`,
17960
+ [60 /* DOMErrorCodes.X_TRANSITION_INVALID_CHILDREN */]: `<Transition> expects exactly one child element or component.`,
17961
+ [61 /* DOMErrorCodes.X_IGNORED_SIDE_EFFECT_TAG */]: `Tags with side effect (<script> and <style>) are ignored in client component templates.`
17911
17962
  };
17912
17963
 
17913
17964
  const transformVHtml = (dir, node, context) => {
17914
17965
  const { exp, loc } = dir;
17915
17966
  if (!exp) {
17916
- context.onError(createDOMCompilerError(50 /* DOMErrorCodes.X_V_HTML_NO_EXPRESSION */, loc));
17967
+ context.onError(createDOMCompilerError(51 /* DOMErrorCodes.X_V_HTML_NO_EXPRESSION */, loc));
17917
17968
  }
17918
17969
  if (node.children.length) {
17919
- context.onError(createDOMCompilerError(51 /* DOMErrorCodes.X_V_HTML_WITH_CHILDREN */, loc));
17970
+ context.onError(createDOMCompilerError(52 /* DOMErrorCodes.X_V_HTML_WITH_CHILDREN */, loc));
17920
17971
  node.children.length = 0;
17921
17972
  }
17922
17973
  return {
@@ -17929,10 +17980,10 @@ var Vue = (function () {
17929
17980
  const transformVText = (dir, node, context) => {
17930
17981
  const { exp, loc } = dir;
17931
17982
  if (!exp) {
17932
- context.onError(createDOMCompilerError(52 /* DOMErrorCodes.X_V_TEXT_NO_EXPRESSION */, loc));
17983
+ context.onError(createDOMCompilerError(53 /* DOMErrorCodes.X_V_TEXT_NO_EXPRESSION */, loc));
17933
17984
  }
17934
17985
  if (node.children.length) {
17935
- context.onError(createDOMCompilerError(53 /* DOMErrorCodes.X_V_TEXT_WITH_CHILDREN */, loc));
17986
+ context.onError(createDOMCompilerError(54 /* DOMErrorCodes.X_V_TEXT_WITH_CHILDREN */, loc));
17936
17987
  node.children.length = 0;
17937
17988
  }
17938
17989
  return {
@@ -17953,12 +18004,12 @@ var Vue = (function () {
17953
18004
  return baseResult;
17954
18005
  }
17955
18006
  if (dir.arg) {
17956
- context.onError(createDOMCompilerError(55 /* DOMErrorCodes.X_V_MODEL_ARG_ON_ELEMENT */, dir.arg.loc));
18007
+ context.onError(createDOMCompilerError(56 /* DOMErrorCodes.X_V_MODEL_ARG_ON_ELEMENT */, dir.arg.loc));
17957
18008
  }
17958
18009
  function checkDuplicatedValue() {
17959
18010
  const value = findProp(node, 'value');
17960
18011
  if (value) {
17961
- context.onError(createDOMCompilerError(57 /* DOMErrorCodes.X_V_MODEL_UNNECESSARY_VALUE */, value.loc));
18012
+ context.onError(createDOMCompilerError(58 /* DOMErrorCodes.X_V_MODEL_UNNECESSARY_VALUE */, value.loc));
17962
18013
  }
17963
18014
  }
17964
18015
  const { tag } = node;
@@ -17986,7 +18037,7 @@ var Vue = (function () {
17986
18037
  break;
17987
18038
  case 'file':
17988
18039
  isInvalidType = true;
17989
- context.onError(createDOMCompilerError(56 /* DOMErrorCodes.X_V_MODEL_ON_FILE_INPUT_ELEMENT */, dir.loc));
18040
+ context.onError(createDOMCompilerError(57 /* DOMErrorCodes.X_V_MODEL_ON_FILE_INPUT_ELEMENT */, dir.loc));
17990
18041
  break;
17991
18042
  default:
17992
18043
  // text type
@@ -18020,7 +18071,7 @@ var Vue = (function () {
18020
18071
  }
18021
18072
  }
18022
18073
  else {
18023
- context.onError(createDOMCompilerError(54 /* DOMErrorCodes.X_V_MODEL_ON_INVALID_ELEMENT */, dir.loc));
18074
+ context.onError(createDOMCompilerError(55 /* DOMErrorCodes.X_V_MODEL_ON_INVALID_ELEMENT */, dir.loc));
18024
18075
  }
18025
18076
  // native vmodel doesn't need the `modelValue` props since they are also
18026
18077
  // passed to the runtime as `binding.value`. removing it reduces code size.
@@ -18144,7 +18195,7 @@ var Vue = (function () {
18144
18195
  const transformShow = (dir, node, context) => {
18145
18196
  const { exp, loc } = dir;
18146
18197
  if (!exp) {
18147
- context.onError(createDOMCompilerError(58 /* DOMErrorCodes.X_V_SHOW_NO_EXPRESSION */, loc));
18198
+ context.onError(createDOMCompilerError(59 /* DOMErrorCodes.X_V_SHOW_NO_EXPRESSION */, loc));
18148
18199
  }
18149
18200
  return {
18150
18201
  props: [],
@@ -18163,7 +18214,7 @@ var Vue = (function () {
18163
18214
  }
18164
18215
  // warn multiple transition children
18165
18216
  if (hasMultipleChildren(node)) {
18166
- context.onError(createDOMCompilerError(59 /* DOMErrorCodes.X_TRANSITION_INVALID_CHILDREN */, {
18217
+ context.onError(createDOMCompilerError(60 /* DOMErrorCodes.X_TRANSITION_INVALID_CHILDREN */, {
18167
18218
  start: node.children[0].loc.start,
18168
18219
  end: node.children[node.children.length - 1].loc.end,
18169
18220
  source: ''
@@ -18202,7 +18253,7 @@ var Vue = (function () {
18202
18253
  if (node.type === 1 /* NodeTypes.ELEMENT */ &&
18203
18254
  node.tagType === 0 /* ElementTypes.ELEMENT */ &&
18204
18255
  (node.tag === 'script' || node.tag === 'style')) {
18205
- context.onError(createDOMCompilerError(60 /* DOMErrorCodes.X_IGNORED_SIDE_EFFECT_TAG */, node.loc));
18256
+ context.onError(createDOMCompilerError(61 /* DOMErrorCodes.X_IGNORED_SIDE_EFFECT_TAG */, node.loc));
18206
18257
  context.removeNode();
18207
18258
  }
18208
18259
  };