vue 3.4.36 → 3.4.38

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.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * vue v3.4.36
2
+ * vue v3.4.38
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -1,5 +1,5 @@
1
1
  /**
2
- * vue v3.4.36
2
+ * vue v3.4.38
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -820,7 +820,7 @@ var Vue = (function (exports) {
820
820
  return isShallow2;
821
821
  } else if (key === "__v_raw") {
822
822
  if (receiver === (isReadonly2 ? isShallow2 ? shallowReadonlyMap : readonlyMap : isShallow2 ? shallowReactiveMap : reactiveMap).get(target) || // receiver is not the reactive proxy, but has the same prototype
823
- // this means the reciever is a user proxy of the reactive proxy
823
+ // this means the receiver is a user proxy of the reactive proxy
824
824
  Object.getPrototypeOf(target) === Object.getPrototypeOf(receiver)) {
825
825
  return target;
826
826
  }
@@ -2939,7 +2939,7 @@ getter: `, this.getter);
2939
2939
  }
2940
2940
  function pruneCacheEntry(key) {
2941
2941
  const cached = cache.get(key);
2942
- if (!current || !isSameVNodeType(cached, current)) {
2942
+ if (cached && (!current || !isSameVNodeType(cached, current))) {
2943
2943
  unmount(cached);
2944
2944
  } else if (current) {
2945
2945
  resetShapeFlag(current);
@@ -3001,6 +3001,10 @@ getter: `, this.getter);
3001
3001
  return rawVNode;
3002
3002
  }
3003
3003
  let vnode = getInnerChild(rawVNode);
3004
+ if (vnode.type === Comment) {
3005
+ current = null;
3006
+ return vnode;
3007
+ }
3004
3008
  const comp = vnode.type;
3005
3009
  const name = getComponentName(
3006
3010
  isAsyncWrapper(vnode) ? vnode.type.__asyncResolved || {} : comp
@@ -4293,7 +4297,7 @@ If you want to remount the same app, move your app creation logic into a factory
4293
4297
  function inject(key, defaultValue, treatDefaultAsFactory = false) {
4294
4298
  const instance = currentInstance || currentRenderingInstance;
4295
4299
  if (instance || currentApp) {
4296
- const provides = instance ? instance.parent == null ? instance.vnode.appContext && instance.vnode.appContext.provides : instance.parent.provides : currentApp._context.provides;
4300
+ const provides = currentApp ? currentApp._context.provides : instance ? instance.parent == null ? instance.vnode.appContext && instance.vnode.appContext.provides : instance.parent.provides : void 0;
4297
4301
  if (provides && key in provides) {
4298
4302
  return provides[key];
4299
4303
  } else if (arguments.length > 1) {
@@ -7193,13 +7197,13 @@ Server rendered element contains fewer child nodes than client vdom.`
7193
7197
  namespace
7194
7198
  );
7195
7199
  }
7200
+ container._vnode = vnode;
7196
7201
  if (!isFlushing) {
7197
7202
  isFlushing = true;
7198
7203
  flushPreFlushCbs();
7199
7204
  flushPostFlushCbs();
7200
7205
  isFlushing = false;
7201
7206
  }
7202
- container._vnode = vnode;
7203
7207
  };
7204
7208
  const internals = {
7205
7209
  p: patch,
@@ -7601,7 +7605,8 @@ Server rendered element contains fewer child nodes than client vdom.`
7601
7605
  return options.get ? options.get(localValue) : localValue;
7602
7606
  },
7603
7607
  set(value) {
7604
- if (!hasChanged(value, localValue) && !(prevSetValue !== EMPTY_OBJ && hasChanged(value, prevSetValue))) {
7608
+ const emittedValue = options.set ? options.set(value) : value;
7609
+ if (!hasChanged(emittedValue, localValue) && !(prevSetValue !== EMPTY_OBJ && hasChanged(value, prevSetValue))) {
7605
7610
  return;
7606
7611
  }
7607
7612
  const rawProps = i.vnode.props;
@@ -7610,7 +7615,6 @@ Server rendered element contains fewer child nodes than client vdom.`
7610
7615
  localValue = value;
7611
7616
  trigger();
7612
7617
  }
7613
- const emittedValue = options.set ? options.set(value) : value;
7614
7618
  i.emit(`update:${name}`, emittedValue);
7615
7619
  if (hasChanged(value, emittedValue) && hasChanged(value, prevSetValue) && !hasChanged(emittedValue, prevEmittedValue)) {
7616
7620
  trigger();
@@ -7648,9 +7652,9 @@ Server rendered element contains fewer child nodes than client vdom.`
7648
7652
  } = instance;
7649
7653
  if (emitsOptions) {
7650
7654
  if (!(event in emitsOptions) && true) {
7651
- if (!propsOptions || !(toHandlerKey(event) in propsOptions)) {
7655
+ if (!propsOptions || !(toHandlerKey(camelize(event)) in propsOptions)) {
7652
7656
  warn$1(
7653
- `Component emitted event "${event}" but it is neither declared in the emits option nor as an "${toHandlerKey(event)}" prop.`
7657
+ `Component emitted event "${event}" but it is neither declared in the emits option nor as an "${toHandlerKey(camelize(event))}" prop.`
7654
7658
  );
7655
7659
  }
7656
7660
  } else {
@@ -9676,7 +9680,7 @@ Component that was made reactive: `,
9676
9680
  return true;
9677
9681
  }
9678
9682
 
9679
- const version = "3.4.36";
9683
+ const version = "3.4.38";
9680
9684
  const warn = warn$1 ;
9681
9685
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
9682
9686
  const devtools = devtools$1 ;
@@ -10099,8 +10103,10 @@ Component that was made reactive: `,
10099
10103
  setVarsOnVNode(instance.subTree, vars);
10100
10104
  updateTeleports(vars);
10101
10105
  };
10102
- onMounted(() => {
10106
+ onBeforeMount(() => {
10103
10107
  watchPostEffect(setVars);
10108
+ });
10109
+ onMounted(() => {
10104
10110
  const ob = new MutationObserver(setVars);
10105
10111
  ob.observe(instance.subTree.el.parentNode, { childList: true });
10106
10112
  onUnmounted(() => ob.disconnect());
@@ -12375,8 +12381,9 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
12375
12381
  const validFirstIdentCharRE = /[A-Za-z_$\xA0-\uFFFF]/;
12376
12382
  const validIdentCharRE = /[\.\?\w$\xA0-\uFFFF]/;
12377
12383
  const whitespaceRE = /\s+[.[]\s*|\s*[.[]\s+/g;
12378
- const isMemberExpressionBrowser = (path) => {
12379
- path = path.trim().replace(whitespaceRE, (s) => s.trim());
12384
+ const getExpSource = (exp) => exp.type === 4 ? exp.content : exp.loc.source;
12385
+ const isMemberExpressionBrowser = (exp) => {
12386
+ const path = getExpSource(exp).trim().replace(whitespaceRE, (s) => s.trim());
12380
12387
  let state = 0 /* inMemberExp */;
12381
12388
  let stateStack = [];
12382
12389
  let currentOpenBracketCount = 0;
@@ -12438,6 +12445,9 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
12438
12445
  return !currentOpenBracketCount && !currentOpenParensCount;
12439
12446
  };
12440
12447
  const isMemberExpression = isMemberExpressionBrowser ;
12448
+ const fnExpRE = /^\s*(async\s*)?(\([^)]*?\)|[\w$_]+)\s*(:[^=]+)?=>|^\s*(async\s+)?function(?:\s+[\w$]+)?\s*\(/;
12449
+ const isFnExpressionBrowser = (exp) => fnExpRE.test(getExpSource(exp));
12450
+ const isFnExpression = isFnExpressionBrowser ;
12441
12451
  function assert(condition, msg) {
12442
12452
  if (!condition) {
12443
12453
  throw new Error(msg || `unexpected compiler condition`);
@@ -15269,7 +15279,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
15269
15279
  } else {
15270
15280
  exp = isProp.exp;
15271
15281
  if (!exp) {
15272
- exp = createSimpleExpression(`is`, false, isProp.loc);
15282
+ exp = createSimpleExpression(`is`, false, isProp.arg.loc);
15273
15283
  }
15274
15284
  }
15275
15285
  if (exp) {
@@ -15737,7 +15747,6 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
15737
15747
  };
15738
15748
  }
15739
15749
 
15740
- const fnExpRE = /^\s*(async\s*)?(\([^)]*?\)|[\w$_]+)\s*(:[^=]+)?=>|^\s*(async\s+)?function(?:\s+[\w$]+)?\s*\(/;
15741
15750
  const transformOn$1 = (dir, node, context, augmentor) => {
15742
15751
  const { loc, modifiers, arg } = dir;
15743
15752
  if (!dir.exp && !modifiers.length) {
@@ -15781,8 +15790,8 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
15781
15790
  }
15782
15791
  let shouldCache = context.cacheHandlers && !exp && !context.inVOnce;
15783
15792
  if (exp) {
15784
- const isMemberExp = isMemberExpression(exp.content);
15785
- const isInlineStatement = !(isMemberExp || fnExpRE.test(exp.content));
15793
+ const isMemberExp = isMemberExpression(exp);
15794
+ const isInlineStatement = !(isMemberExp || isFnExpression(exp));
15786
15795
  const hasMultipleStatements = exp.content.includes(`;`);
15787
15796
  {
15788
15797
  validateBrowserExpression(
@@ -15930,7 +15939,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
15930
15939
  return createTransformProps();
15931
15940
  }
15932
15941
  const maybeRef = false;
15933
- if (!expString.trim() || !isMemberExpression(expString) && !maybeRef) {
15942
+ if (!expString.trim() || !isMemberExpression(exp) && !maybeRef) {
15934
15943
  context.onError(
15935
15944
  createCompilerError(42, exp.loc)
15936
15945
  );