@vue/compat 3.2.22 → 3.2.26

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.
@@ -34,7 +34,7 @@ const specialBooleanAttrs = `itemscope,allowfullscreen,formnovalidate,ismap,nomo
34
34
  const isSpecialBooleanAttr = /*#__PURE__*/ makeMap(specialBooleanAttrs);
35
35
  /**
36
36
  * Boolean attributes should be included if the value is truthy or ''.
37
- * e.g. <select multiple> compiles to { multiple: '' }
37
+ * e.g. `<select multiple>` compiles to `{ multiple: '' }`
38
38
  */
39
39
  function includeBooleanAttr(value) {
40
40
  return !!value || value === '';
@@ -267,7 +267,7 @@ const isIntegerKey = (key) => isString(key) &&
267
267
  '' + parseInt(key, 10) === key;
268
268
  const isReservedProp = /*#__PURE__*/ makeMap(
269
269
  // the leading comma is intentional so empty string "" is also included
270
- ',key,ref,' +
270
+ ',key,ref,ref_for,ref_key,' +
271
271
  'onVnodeBeforeMount,onVnodeMounted,' +
272
272
  'onVnodeBeforeUpdate,onVnodeUpdated,' +
273
273
  'onVnodeBeforeUnmount,onVnodeUnmounted');
@@ -456,7 +456,7 @@ const targetMap = new WeakMap();
456
456
  let effectTrackDepth = 0;
457
457
  let trackOpBit = 1;
458
458
  /**
459
- * The bitwise track markers support at most 30 levels op recursion.
459
+ * The bitwise track markers support at most 30 levels of recursion.
460
460
  * This value is chosen to enable modern JS engines to use a SMI on all platforms.
461
461
  * When recursion depth is greater, fall back to using a full cleanup.
462
462
  */
@@ -785,7 +785,7 @@ const shallowSet = /*#__PURE__*/ createSetter(true);
785
785
  function createSetter(shallow = false) {
786
786
  return function set(target, key, value, receiver) {
787
787
  let oldValue = target[key];
788
- if (!shallow) {
788
+ if (!shallow && !isReadonly(value)) {
789
789
  value = toRaw(value);
790
790
  oldValue = toRaw(oldValue);
791
791
  if (!isArray(target) && isRef(oldValue) && !isRef(value)) {
@@ -1377,21 +1377,25 @@ function toRefs(object) {
1377
1377
  return ret;
1378
1378
  }
1379
1379
  class ObjectRefImpl {
1380
- constructor(_object, _key) {
1380
+ constructor(_object, _key, _defaultValue) {
1381
1381
  this._object = _object;
1382
1382
  this._key = _key;
1383
+ this._defaultValue = _defaultValue;
1383
1384
  this.__v_isRef = true;
1384
1385
  }
1385
1386
  get value() {
1386
- return this._object[this._key];
1387
+ const val = this._object[this._key];
1388
+ return val === undefined ? this._defaultValue : val;
1387
1389
  }
1388
1390
  set value(newVal) {
1389
1391
  this._object[this._key] = newVal;
1390
1392
  }
1391
1393
  }
1392
- function toRef(object, key) {
1394
+ function toRef(object, key, defaultValue) {
1393
1395
  const val = object[key];
1394
- return isRef(val) ? val : new ObjectRefImpl(object, key);
1396
+ return isRef(val)
1397
+ ? val
1398
+ : new ObjectRefImpl(object, key, defaultValue);
1395
1399
  }
1396
1400
 
1397
1401
  class ComputedRefImpl {
@@ -1838,11 +1842,6 @@ const deprecationData = {
1838
1842
  `Use "${newHook}" instead.`,
1839
1843
  link: `https://v3.vuejs.org/guide/migration/custom-directives.html`
1840
1844
  },
1841
- ["V_FOR_REF" /* V_FOR_REF */]: {
1842
- message: `Ref usage on v-for no longer creates array ref values in Vue 3. ` +
1843
- `Consider using function refs or refactor to avoid ref usage altogether.`,
1844
- link: `https://v3.vuejs.org/guide/migration/array-refs.html`
1845
- },
1846
1845
  ["V_ON_KEYCODE_MODIFIER" /* V_ON_KEYCODE_MODIFIER */]: {
1847
1846
  message: `Using keyCode as v-on modifier is no longer supported. ` +
1848
1847
  `Use kebab-case key name modifiers instead.`,
@@ -3253,7 +3252,9 @@ const BaseTransitionImpl = {
3253
3252
  const rawProps = toRaw(props);
3254
3253
  const { mode } = rawProps;
3255
3254
  // check mode
3256
- if ((process.env.NODE_ENV !== 'production') && mode && !['in-out', 'out-in', 'default'].includes(mode)) {
3255
+ if ((process.env.NODE_ENV !== 'production') &&
3256
+ mode &&
3257
+ mode !== 'in-out' && mode !== 'out-in' && mode !== 'default') {
3257
3258
  warn$1(`invalid <transition> mode: ${mode}`);
3258
3259
  }
3259
3260
  // at this point children has a guaranteed length of 1.
@@ -3899,7 +3900,7 @@ function registerKeepAliveHook(hook, type, target = currentInstance) {
3899
3900
  }
3900
3901
  current = current.parent;
3901
3902
  }
3902
- hook();
3903
+ return hook();
3903
3904
  });
3904
3905
  injectHook(type, wrappedHook, target);
3905
3906
  // In addition to registering it on the target instance, we walk up the parent
@@ -4684,7 +4685,7 @@ function setFullProps(instance, rawProps, props, attrs) {
4684
4685
  continue;
4685
4686
  }
4686
4687
  }
4687
- if (value !== attrs[key]) {
4688
+ if (!(key in attrs) || value !== attrs[key]) {
4688
4689
  attrs[key] = value;
4689
4690
  hasAttrsChanged = true;
4690
4691
  }
@@ -5267,7 +5268,7 @@ function createCompatVue(createApp, createSingletonApp) {
5267
5268
  return vm;
5268
5269
  }
5269
5270
  }
5270
- Vue.version = "3.2.22";
5271
+ Vue.version = "3.2.26";
5271
5272
  Vue.config = singletonApp.config;
5272
5273
  Vue.use = (p, ...options) => {
5273
5274
  if (p && isFunction(p.install)) {
@@ -5620,7 +5621,7 @@ const methodsToPatch = [
5620
5621
  ];
5621
5622
  const patched = new WeakSet();
5622
5623
  function defineReactive(obj, key, val) {
5623
- // it's possible for the orignial object to be mutated after being defined
5624
+ // it's possible for the original object to be mutated after being defined
5624
5625
  // and expecting reactivity... we are covering it here because this seems to
5625
5626
  // be a bit more common.
5626
5627
  if (isObject(val) && !isReactive(val) && !patched.has(val)) {
@@ -5843,6 +5844,102 @@ function createAppAPI(render, hydrate) {
5843
5844
  };
5844
5845
  }
5845
5846
 
5847
+ /**
5848
+ * Function for handling a template ref
5849
+ */
5850
+ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
5851
+ if (isArray(rawRef)) {
5852
+ rawRef.forEach((r, i) => setRef(r, oldRawRef && (isArray(oldRawRef) ? oldRawRef[i] : oldRawRef), parentSuspense, vnode, isUnmount));
5853
+ return;
5854
+ }
5855
+ if (isAsyncWrapper(vnode) && !isUnmount) {
5856
+ // when mounting async components, nothing needs to be done,
5857
+ // because the template ref is forwarded to inner component
5858
+ return;
5859
+ }
5860
+ const refValue = vnode.shapeFlag & 4 /* STATEFUL_COMPONENT */
5861
+ ? getExposeProxy(vnode.component) || vnode.component.proxy
5862
+ : vnode.el;
5863
+ const value = isUnmount ? null : refValue;
5864
+ const { i: owner, r: ref } = rawRef;
5865
+ if ((process.env.NODE_ENV !== 'production') && !owner) {
5866
+ warn$1(`Missing ref owner context. ref cannot be used on hoisted vnodes. ` +
5867
+ `A vnode with ref must be created inside the render function.`);
5868
+ return;
5869
+ }
5870
+ const oldRef = oldRawRef && oldRawRef.r;
5871
+ const refs = owner.refs === EMPTY_OBJ ? (owner.refs = {}) : owner.refs;
5872
+ const setupState = owner.setupState;
5873
+ // dynamic ref changed. unset old ref
5874
+ if (oldRef != null && oldRef !== ref) {
5875
+ if (isString(oldRef)) {
5876
+ refs[oldRef] = null;
5877
+ if (hasOwn(setupState, oldRef)) {
5878
+ setupState[oldRef] = null;
5879
+ }
5880
+ }
5881
+ else if (isRef(oldRef)) {
5882
+ oldRef.value = null;
5883
+ }
5884
+ }
5885
+ if (isFunction(ref)) {
5886
+ callWithErrorHandling(ref, owner, 12 /* FUNCTION_REF */, [value, refs]);
5887
+ }
5888
+ else {
5889
+ const _isString = isString(ref);
5890
+ const _isRef = isRef(ref);
5891
+ if (_isString || _isRef) {
5892
+ const doSet = () => {
5893
+ if (rawRef.f) {
5894
+ const existing = _isString ? refs[ref] : ref.value;
5895
+ if (isUnmount) {
5896
+ isArray(existing) && remove(existing, refValue);
5897
+ }
5898
+ else {
5899
+ if (!isArray(existing)) {
5900
+ if (_isString) {
5901
+ refs[ref] = [refValue];
5902
+ }
5903
+ else {
5904
+ ref.value = [refValue];
5905
+ if (rawRef.k)
5906
+ refs[rawRef.k] = ref.value;
5907
+ }
5908
+ }
5909
+ else if (!existing.includes(refValue)) {
5910
+ existing.push(refValue);
5911
+ }
5912
+ }
5913
+ }
5914
+ else if (_isString) {
5915
+ refs[ref] = value;
5916
+ if (hasOwn(setupState, ref)) {
5917
+ setupState[ref] = value;
5918
+ }
5919
+ }
5920
+ else if (isRef(ref)) {
5921
+ ref.value = value;
5922
+ if (rawRef.k)
5923
+ refs[rawRef.k] = value;
5924
+ }
5925
+ else if ((process.env.NODE_ENV !== 'production')) {
5926
+ warn$1('Invalid template ref type:', ref, `(${typeof ref})`);
5927
+ }
5928
+ };
5929
+ if (value) {
5930
+ doSet.id = -1;
5931
+ queuePostRenderEffect(doSet, parentSuspense);
5932
+ }
5933
+ else {
5934
+ doSet();
5935
+ }
5936
+ }
5937
+ else if ((process.env.NODE_ENV !== 'production')) {
5938
+ warn$1('Invalid template ref type:', ref, `(${typeof ref})`);
5939
+ }
5940
+ }
5941
+ }
5942
+
5846
5943
  let hasMismatch = false;
5847
5944
  const isSVGContainer = (container) => /svg/.test(container.namespaceURI) && container.tagName !== 'foreignObject';
5848
5945
  const isComment = (node) => node.nodeType === 8 /* COMMENT */;
@@ -6231,45 +6328,7 @@ function initFeatureFlags() {
6231
6328
  `which expects these compile-time feature flags to be globally injected ` +
6232
6329
  `via the bundler config in order to get better tree-shaking in the ` +
6233
6330
  `production bundle.\n\n` +
6234
- `For more details, see http://link.vuejs.org/feature-flags.`);
6235
- }
6236
- }
6237
-
6238
- function convertLegacyRefInFor(vnode) {
6239
- // refInFor
6240
- if (vnode.props && vnode.props.refInFor) {
6241
- delete vnode.props.refInFor;
6242
- if (vnode.ref) {
6243
- if (isArray(vnode.ref)) {
6244
- vnode.ref.forEach(r => (r.f = true));
6245
- }
6246
- else {
6247
- vnode.ref.f = true;
6248
- }
6249
- }
6250
- }
6251
- }
6252
- function registerLegacyRef(refs, key, value, owner, isInFor, isUnmount) {
6253
- const existing = refs[key];
6254
- if (isUnmount) {
6255
- if (isArray(existing)) {
6256
- remove(existing, value);
6257
- }
6258
- else {
6259
- refs[key] = null;
6260
- }
6261
- }
6262
- else if (isInFor) {
6263
- (process.env.NODE_ENV !== 'production') && warnDeprecation("V_FOR_REF" /* V_FOR_REF */, owner);
6264
- if (!isArray(existing)) {
6265
- refs[key] = [value];
6266
- }
6267
- else if (!existing.includes(value)) {
6268
- existing.push(value);
6269
- }
6270
- }
6271
- else {
6272
- refs[key] = value;
6331
+ `For more details, see https://link.vuejs.org/feature-flags.`);
6273
6332
  }
6274
6333
  }
6275
6334
 
@@ -6559,12 +6618,15 @@ function baseCreateRenderer(options, createHydrationFns) {
6559
6618
  const oldProps = n1.props || EMPTY_OBJ;
6560
6619
  const newProps = n2.props || EMPTY_OBJ;
6561
6620
  let vnodeHook;
6621
+ // disable recurse in beforeUpdate hooks
6622
+ parentComponent && toggleRecurse(parentComponent, false);
6562
6623
  if ((vnodeHook = newProps.onVnodeBeforeUpdate)) {
6563
6624
  invokeVNodeHook(vnodeHook, parentComponent, n2, n1);
6564
6625
  }
6565
6626
  if (dirs) {
6566
6627
  invokeDirectiveHook(n2, n1, parentComponent, 'beforeUpdate');
6567
6628
  }
6629
+ parentComponent && toggleRecurse(parentComponent, true);
6568
6630
  if ((process.env.NODE_ENV !== 'production') && isHmrUpdating) {
6569
6631
  // HMR updated, force full diff
6570
6632
  patchFlag = 0;
@@ -6848,7 +6910,7 @@ function baseCreateRenderer(options, createHydrationFns) {
6848
6910
  const { el, props } = initialVNode;
6849
6911
  const { bm, m, parent } = instance;
6850
6912
  const isAsyncWrapperVNode = isAsyncWrapper(initialVNode);
6851
- effect.allowRecurse = false;
6913
+ toggleRecurse(instance, false);
6852
6914
  // beforeMount hook
6853
6915
  if (bm) {
6854
6916
  invokeArrayFns(bm);
@@ -6861,7 +6923,7 @@ function baseCreateRenderer(options, createHydrationFns) {
6861
6923
  if (isCompatEnabled("INSTANCE_EVENT_HOOKS" /* INSTANCE_EVENT_HOOKS */, instance)) {
6862
6924
  instance.emit('hook:beforeMount');
6863
6925
  }
6864
- effect.allowRecurse = true;
6926
+ toggleRecurse(instance, true);
6865
6927
  if (el && hydrateNode) {
6866
6928
  // vnode has adopted host node - perform hydration instead of mount.
6867
6929
  const hydrateSubTree = () => {
@@ -6949,7 +7011,7 @@ function baseCreateRenderer(options, createHydrationFns) {
6949
7011
  pushWarningContext(next || instance.vnode);
6950
7012
  }
6951
7013
  // Disallow component effect recursion during pre-lifecycle hooks.
6952
- effect.allowRecurse = false;
7014
+ toggleRecurse(instance, false);
6953
7015
  if (next) {
6954
7016
  next.el = vnode.el;
6955
7017
  updateComponentPreRender(instance, next, optimized);
@@ -6968,7 +7030,7 @@ function baseCreateRenderer(options, createHydrationFns) {
6968
7030
  if (isCompatEnabled("INSTANCE_EVENT_HOOKS" /* INSTANCE_EVENT_HOOKS */, instance)) {
6969
7031
  instance.emit('hook:beforeUpdate');
6970
7032
  }
6971
- effect.allowRecurse = true;
7033
+ toggleRecurse(instance, true);
6972
7034
  // render
6973
7035
  if ((process.env.NODE_ENV !== 'production')) {
6974
7036
  startMeasure(instance, `render`);
@@ -7017,13 +7079,13 @@ function baseCreateRenderer(options, createHydrationFns) {
7017
7079
  }
7018
7080
  };
7019
7081
  // create reactive effect for rendering
7020
- const effect = new ReactiveEffect(componentUpdateFn, () => queueJob(instance.update), instance.scope // track it in component's effect scope
7021
- );
7082
+ const effect = (instance.effect = new ReactiveEffect(componentUpdateFn, () => queueJob(instance.update), instance.scope // track it in component's effect scope
7083
+ ));
7022
7084
  const update = (instance.update = effect.run.bind(effect));
7023
7085
  update.id = instance.uid;
7024
7086
  // allowRecurse
7025
7087
  // #1801, #2043 component render effects should allow recursive updates
7026
- effect.allowRecurse = update.allowRecurse = true;
7088
+ toggleRecurse(instance, true);
7027
7089
  if ((process.env.NODE_ENV !== 'production')) {
7028
7090
  effect.onTrack = instance.rtc
7029
7091
  ? e => invokeArrayFns(instance.rtc, e)
@@ -7553,88 +7615,8 @@ function baseCreateRenderer(options, createHydrationFns) {
7553
7615
  createApp: createAppAPI(render, hydrate)
7554
7616
  };
7555
7617
  }
7556
- function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
7557
- if (isArray(rawRef)) {
7558
- rawRef.forEach((r, i) => setRef(r, oldRawRef && (isArray(oldRawRef) ? oldRawRef[i] : oldRawRef), parentSuspense, vnode, isUnmount));
7559
- return;
7560
- }
7561
- if (isAsyncWrapper(vnode) && !isUnmount) {
7562
- // when mounting async components, nothing needs to be done,
7563
- // because the template ref is forwarded to inner component
7564
- return;
7565
- }
7566
- const refValue = vnode.shapeFlag & 4 /* STATEFUL_COMPONENT */
7567
- ? getExposeProxy(vnode.component) || vnode.component.proxy
7568
- : vnode.el;
7569
- const value = isUnmount ? null : refValue;
7570
- const { i: owner, r: ref } = rawRef;
7571
- if ((process.env.NODE_ENV !== 'production') && !owner) {
7572
- warn$1(`Missing ref owner context. ref cannot be used on hoisted vnodes. ` +
7573
- `A vnode with ref must be created inside the render function.`);
7574
- return;
7575
- }
7576
- const oldRef = oldRawRef && oldRawRef.r;
7577
- const refs = owner.refs === EMPTY_OBJ ? (owner.refs = {}) : owner.refs;
7578
- const setupState = owner.setupState;
7579
- // dynamic ref changed. unset old ref
7580
- if (oldRef != null && oldRef !== ref) {
7581
- if (isString(oldRef)) {
7582
- refs[oldRef] = null;
7583
- if (hasOwn(setupState, oldRef)) {
7584
- setupState[oldRef] = null;
7585
- }
7586
- }
7587
- else if (isRef(oldRef)) {
7588
- oldRef.value = null;
7589
- }
7590
- }
7591
- if (isString(ref)) {
7592
- const doSet = () => {
7593
- if (isCompatEnabled("V_FOR_REF" /* V_FOR_REF */, owner)) {
7594
- registerLegacyRef(refs, ref, refValue, owner, rawRef.f, isUnmount);
7595
- }
7596
- else {
7597
- refs[ref] = value;
7598
- }
7599
- if (hasOwn(setupState, ref)) {
7600
- setupState[ref] = value;
7601
- }
7602
- };
7603
- // #1789: for non-null values, set them after render
7604
- // null values means this is unmount and it should not overwrite another
7605
- // ref with the same key
7606
- if (value) {
7607
- doSet.id = -1;
7608
- queuePostRenderEffect(doSet, parentSuspense);
7609
- }
7610
- else {
7611
- doSet();
7612
- }
7613
- }
7614
- else if (isRef(ref)) {
7615
- const doSet = () => {
7616
- ref.value = value;
7617
- };
7618
- if (value) {
7619
- doSet.id = -1;
7620
- queuePostRenderEffect(doSet, parentSuspense);
7621
- }
7622
- else {
7623
- doSet();
7624
- }
7625
- }
7626
- else if (isFunction(ref)) {
7627
- callWithErrorHandling(ref, owner, 12 /* FUNCTION_REF */, [value, refs]);
7628
- }
7629
- else if ((process.env.NODE_ENV !== 'production')) {
7630
- warn$1('Invalid template ref type:', value, `(${typeof value})`);
7631
- }
7632
- }
7633
- function invokeVNodeHook(hook, instance, vnode, prevVNode = null) {
7634
- callWithAsyncErrorHandling(hook, instance, 7 /* VNODE_HOOK */, [
7635
- vnode,
7636
- prevVNode
7637
- ]);
7618
+ function toggleRecurse({ effect, update }, allowed) {
7619
+ effect.allowRecurse = update.allowRecurse = allowed;
7638
7620
  }
7639
7621
  /**
7640
7622
  * #1156
@@ -8287,6 +8269,7 @@ function convertLegacyFunctionalComponent(comp) {
8287
8269
  };
8288
8270
  Func.props = comp.props;
8289
8271
  Func.displayName = comp.name;
8272
+ Func.compatConfig = comp.compatConfig;
8290
8273
  // v2 functional components do not inherit attrs
8291
8274
  Func.inheritAttrs = false;
8292
8275
  normalizedFunctionalComponentMap.set(comp, Func);
@@ -8433,10 +8416,10 @@ const createVNodeWithArgsTransform = (...args) => {
8433
8416
  };
8434
8417
  const InternalObjectKey = `__vInternal`;
8435
8418
  const normalizeKey = ({ key }) => key != null ? key : null;
8436
- const normalizeRef = ({ ref }) => {
8419
+ const normalizeRef = ({ ref, ref_key, ref_for }) => {
8437
8420
  return (ref != null
8438
8421
  ? isString(ref) || isRef(ref) || isFunction(ref)
8439
- ? { i: currentRenderingInstance, r: ref }
8422
+ ? { i: currentRenderingInstance, r: ref, k: ref_key, f: !!ref_for }
8440
8423
  : ref
8441
8424
  : null);
8442
8425
  };
@@ -8504,7 +8487,6 @@ function createBaseVNode(type, props = null, children = null, patchFlag = 0, dyn
8504
8487
  }
8505
8488
  {
8506
8489
  convertLegacyVModelProps(vnode);
8507
- convertLegacyRefInFor(vnode);
8508
8490
  defineLegacyVNodeProperties(vnode);
8509
8491
  }
8510
8492
  return vnode;
@@ -8790,6 +8772,12 @@ function mergeProps(...args) {
8790
8772
  }
8791
8773
  }
8792
8774
  return ret;
8775
+ }
8776
+ function invokeVNodeHook(hook, instance, vnode, prevVNode = null) {
8777
+ callWithAsyncErrorHandling(hook, instance, 7 /* VNODE_HOOK */, [
8778
+ vnode,
8779
+ prevVNode
8780
+ ]);
8793
8781
  }
8794
8782
 
8795
8783
  function getCompatChildren(instance) {
@@ -9223,23 +9211,23 @@ const PublicInstanceProxyHandlers = {
9223
9211
  const n = accessCache[key];
9224
9212
  if (n !== undefined) {
9225
9213
  switch (n) {
9226
- case 0 /* SETUP */:
9214
+ case 1 /* SETUP */:
9227
9215
  return setupState[key];
9228
- case 1 /* DATA */:
9216
+ case 2 /* DATA */:
9229
9217
  return data[key];
9230
- case 3 /* CONTEXT */:
9218
+ case 4 /* CONTEXT */:
9231
9219
  return ctx[key];
9232
- case 2 /* PROPS */:
9220
+ case 3 /* PROPS */:
9233
9221
  return props[key];
9234
9222
  // default: just fallthrough
9235
9223
  }
9236
9224
  }
9237
9225
  else if (setupState !== EMPTY_OBJ && hasOwn(setupState, key)) {
9238
- accessCache[key] = 0 /* SETUP */;
9226
+ accessCache[key] = 1 /* SETUP */;
9239
9227
  return setupState[key];
9240
9228
  }
9241
9229
  else if (data !== EMPTY_OBJ && hasOwn(data, key)) {
9242
- accessCache[key] = 1 /* DATA */;
9230
+ accessCache[key] = 2 /* DATA */;
9243
9231
  return data[key];
9244
9232
  }
9245
9233
  else if (
@@ -9247,15 +9235,15 @@ const PublicInstanceProxyHandlers = {
9247
9235
  // props
9248
9236
  (normalizedProps = instance.propsOptions[0]) &&
9249
9237
  hasOwn(normalizedProps, key)) {
9250
- accessCache[key] = 2 /* PROPS */;
9238
+ accessCache[key] = 3 /* PROPS */;
9251
9239
  return props[key];
9252
9240
  }
9253
9241
  else if (ctx !== EMPTY_OBJ && hasOwn(ctx, key)) {
9254
- accessCache[key] = 3 /* CONTEXT */;
9242
+ accessCache[key] = 4 /* CONTEXT */;
9255
9243
  return ctx[key];
9256
9244
  }
9257
9245
  else if (!__VUE_OPTIONS_API__ || shouldCacheAccess) {
9258
- accessCache[key] = 4 /* OTHER */;
9246
+ accessCache[key] = 0 /* OTHER */;
9259
9247
  }
9260
9248
  }
9261
9249
  const publicGetter = publicPropertiesMap[key];
@@ -9276,7 +9264,7 @@ const PublicInstanceProxyHandlers = {
9276
9264
  }
9277
9265
  else if (ctx !== EMPTY_OBJ && hasOwn(ctx, key)) {
9278
9266
  // user may set custom properties to `this` that start with `$`
9279
- accessCache[key] = 3 /* CONTEXT */;
9267
+ accessCache[key] = 4 /* CONTEXT */;
9280
9268
  return ctx[key];
9281
9269
  }
9282
9270
  else if (
@@ -9347,7 +9335,7 @@ const PublicInstanceProxyHandlers = {
9347
9335
  },
9348
9336
  has({ _: { data, setupState, accessCache, ctx, appContext, propsOptions } }, key) {
9349
9337
  let normalizedProps;
9350
- return (accessCache[key] !== undefined ||
9338
+ return (!!accessCache[key] ||
9351
9339
  (data !== EMPTY_OBJ && hasOwn(data, key)) ||
9352
9340
  (setupState !== EMPTY_OBJ && hasOwn(setupState, key)) ||
9353
9341
  ((normalizedProps = propsOptions[0]) && hasOwn(normalizedProps, key)) ||
@@ -9453,6 +9441,7 @@ function createComponentInstance(vnode, parent, suspense) {
9453
9441
  root: null,
9454
9442
  next: null,
9455
9443
  subTree: null,
9444
+ effect: null,
9456
9445
  update: null,
9457
9446
  scope: new EffectScope(true /* detached */),
9458
9447
  render: null,
@@ -10972,7 +10961,7 @@ function isMemoSame(cached, memo) {
10972
10961
  }
10973
10962
 
10974
10963
  // Core API ------------------------------------------------------------------
10975
- const version = "3.2.22";
10964
+ const version = "3.2.26";
10976
10965
  const _ssrUtils = {
10977
10966
  createComponentInstance,
10978
10967
  setupComponent,
@@ -11247,12 +11236,19 @@ prevChildren, parentComponent, parentSuspense, unmountChildren) {
11247
11236
  el[key] = value == null ? '' : value;
11248
11237
  return;
11249
11238
  }
11250
- if (key === 'value' && el.tagName !== 'PROGRESS') {
11239
+ if (key === 'value' &&
11240
+ el.tagName !== 'PROGRESS' &&
11241
+ // custom elements may use _value internally
11242
+ !el.tagName.includes('-')) {
11251
11243
  // store value as _value as well since
11252
11244
  // non-string values will be stringified.
11253
11245
  el._value = value;
11254
11246
  const newValue = value == null ? '' : value;
11255
- if (el.value !== newValue) {
11247
+ if (el.value !== newValue ||
11248
+ // #4956: always set for OPTION elements because its value falls back to
11249
+ // textContent if no value attribute is present. And setting .value for
11250
+ // OPTION has no side effect
11251
+ el.tagName === 'OPTION') {
11256
11252
  el.value = newValue;
11257
11253
  }
11258
11254
  if (value == null) {
@@ -11649,7 +11645,7 @@ class VueElement extends BaseClass {
11649
11645
  // HMR
11650
11646
  if ((process.env.NODE_ENV !== 'production')) {
11651
11647
  instance.ceReload = newStyles => {
11652
- // alawys reset styles
11648
+ // always reset styles
11653
11649
  if (this._styles) {
11654
11650
  this._styles.forEach(s => this.shadowRoot.removeChild(s));
11655
11651
  this._styles.length = 0;