vue 3.4.35 → 3.4.37

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/README.md CHANGED
@@ -5,8 +5,9 @@
5
5
  ### From CDN or without a Bundler
6
6
 
7
7
  - **`vue(.runtime).global(.prod).js`**:
8
+
8
9
  - For direct use via `<script src="...">` in the browser. Exposes the `Vue` global.
9
- - Note that global builds are not [UMD](https://github.com/umdjs/umd) builds. They are built as [IIFEs](https://developer.mozilla.org/en-US/docs/Glossary/IIFE) and is only meant for direct use via `<script src="...">`.
10
+ - Note that global builds are not [UMD](https://github.com/umdjs/umd) builds. They are built as [IIFEs](https://developer.mozilla.org/en-US/docs/Glossary/IIFE) and is only meant for direct use via `<script src="...">`.
10
11
  - In-browser template compilation:
11
12
  - **`vue.global.js`** is the "full" build that includes both the compiler and the runtime so it supports compiling templates on the fly.
12
13
  - **`vue.runtime.global.js`** contains only the runtime and requires templates to be pre-compiled during a build step.
@@ -38,10 +39,12 @@
38
39
  `esm-bundler` builds of Vue expose global feature flags that can be overwritten at compile time:
39
40
 
40
41
  - `__VUE_OPTIONS_API__`
42
+
41
43
  - Default: `true`
42
44
  - Enable / disable Options API support
43
45
 
44
46
  - `__VUE_PROD_DEVTOOLS__`
47
+
45
48
  - Default: `false`
46
49
  - Enable / disable devtools support in production
47
50
 
package/dist/vue.cjs.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * vue v3.4.35
2
+ * vue v3.4.37
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.35
2
+ * vue v3.4.37
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.35
2
+ * vue v3.4.37
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -817,7 +817,7 @@ class BaseReactiveHandler {
817
817
  return isShallow2;
818
818
  } else if (key === "__v_raw") {
819
819
  if (receiver === (isReadonly2 ? isShallow2 ? shallowReadonlyMap : readonlyMap : isShallow2 ? shallowReactiveMap : reactiveMap).get(target) || // receiver is not the reactive proxy, but has the same prototype
820
- // this means the reciever is a user proxy of the reactive proxy
820
+ // this means the receiver is a user proxy of the reactive proxy
821
821
  Object.getPrototypeOf(target) === Object.getPrototypeOf(receiver)) {
822
822
  return target;
823
823
  }
@@ -2936,7 +2936,7 @@ const KeepAliveImpl = {
2936
2936
  }
2937
2937
  function pruneCacheEntry(key) {
2938
2938
  const cached = cache.get(key);
2939
- if (!current || !isSameVNodeType(cached, current)) {
2939
+ if (cached && (!current || !isSameVNodeType(cached, current))) {
2940
2940
  unmount(cached);
2941
2941
  } else if (current) {
2942
2942
  resetShapeFlag(current);
@@ -2998,6 +2998,10 @@ const KeepAliveImpl = {
2998
2998
  return rawVNode;
2999
2999
  }
3000
3000
  let vnode = getInnerChild(rawVNode);
3001
+ if (vnode.type === Comment) {
3002
+ current = null;
3003
+ return vnode;
3004
+ }
3001
3005
  const comp = vnode.type;
3002
3006
  const name = getComponentName(
3003
3007
  isAsyncWrapper(vnode) ? vnode.type.__asyncResolved || {} : comp
@@ -4290,7 +4294,7 @@ function provide(key, value) {
4290
4294
  function inject(key, defaultValue, treatDefaultAsFactory = false) {
4291
4295
  const instance = currentInstance || currentRenderingInstance;
4292
4296
  if (instance || currentApp) {
4293
- const provides = instance ? instance.parent == null ? instance.vnode.appContext && instance.vnode.appContext.provides : instance.parent.provides : currentApp._context.provides;
4297
+ const provides = currentApp ? currentApp._context.provides : instance ? instance.parent == null ? instance.vnode.appContext && instance.vnode.appContext.provides : instance.parent.provides : void 0;
4294
4298
  if (provides && key in provides) {
4295
4299
  return provides[key];
4296
4300
  } else if (arguments.length > 1) {
@@ -5484,6 +5488,7 @@ Server rendered element contains more child nodes than client vdom.`
5484
5488
  }
5485
5489
  if (props) {
5486
5490
  {
5491
+ const isCustomElement = el.tagName.includes("-");
5487
5492
  for (const key in props) {
5488
5493
  if (// #11189 skip if this node has directives that have created hooks
5489
5494
  // as it could have mutated the DOM in any possible way
@@ -5491,7 +5496,7 @@ Server rendered element contains more child nodes than client vdom.`
5491
5496
  logMismatchError();
5492
5497
  }
5493
5498
  if (forcePatch && (key.endsWith("value") || key === "indeterminate") || isOn(key) && !isReservedProp(key) || // force hydrate v-bind with .prop modifiers
5494
- key[0] === ".") {
5499
+ key[0] === "." || isCustomElement) {
5495
5500
  patchProp(el, key, null, props[key], void 0, parentComponent);
5496
5501
  }
5497
5502
  }
@@ -7189,13 +7194,13 @@ function baseCreateRenderer(options, createHydrationFns) {
7189
7194
  namespace
7190
7195
  );
7191
7196
  }
7197
+ container._vnode = vnode;
7192
7198
  if (!isFlushing) {
7193
7199
  isFlushing = true;
7194
7200
  flushPreFlushCbs();
7195
7201
  flushPostFlushCbs();
7196
7202
  isFlushing = false;
7197
7203
  }
7198
- container._vnode = vnode;
7199
7204
  };
7200
7205
  const internals = {
7201
7206
  p: patch,
@@ -7603,7 +7608,8 @@ function useModel(props, name, options = EMPTY_OBJ) {
7603
7608
  return options.get ? options.get(localValue) : localValue;
7604
7609
  },
7605
7610
  set(value) {
7606
- if (!hasChanged(value, localValue) && !(prevSetValue !== EMPTY_OBJ && hasChanged(value, prevSetValue))) {
7611
+ const emittedValue = options.set ? options.set(value) : value;
7612
+ if (!hasChanged(emittedValue, localValue) && !(prevSetValue !== EMPTY_OBJ && hasChanged(value, prevSetValue))) {
7607
7613
  return;
7608
7614
  }
7609
7615
  const rawProps = i.vnode.props;
@@ -7612,7 +7618,6 @@ function useModel(props, name, options = EMPTY_OBJ) {
7612
7618
  localValue = value;
7613
7619
  trigger();
7614
7620
  }
7615
- const emittedValue = options.set ? options.set(value) : value;
7616
7621
  i.emit(`update:${name}`, emittedValue);
7617
7622
  if (hasChanged(value, emittedValue) && hasChanged(value, prevSetValue) && !hasChanged(emittedValue, prevEmittedValue)) {
7618
7623
  trigger();
@@ -7650,9 +7655,9 @@ function emit(instance, event, ...rawArgs) {
7650
7655
  } = instance;
7651
7656
  if (emitsOptions) {
7652
7657
  if (!(event in emitsOptions) && true) {
7653
- if (!propsOptions || !(toHandlerKey(event) in propsOptions)) {
7658
+ if (!propsOptions || !(toHandlerKey(camelize(event)) in propsOptions)) {
7654
7659
  warn$1(
7655
- `Component emitted event "${event}" but it is neither declared in the emits option nor as an "${toHandlerKey(event)}" prop.`
7660
+ `Component emitted event "${event}" but it is neither declared in the emits option nor as an "${toHandlerKey(camelize(event))}" prop.`
7656
7661
  );
7657
7662
  }
7658
7663
  } else {
@@ -9678,7 +9683,7 @@ function isMemoSame(cached, memo) {
9678
9683
  return true;
9679
9684
  }
9680
9685
 
9681
- const version = "3.4.35";
9686
+ const version = "3.4.37";
9682
9687
  const warn = warn$1 ;
9683
9688
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
9684
9689
  const devtools = devtools$1 ;
@@ -10101,8 +10106,10 @@ function useCssVars(getter) {
10101
10106
  setVarsOnVNode(instance.subTree, vars);
10102
10107
  updateTeleports(vars);
10103
10108
  };
10104
- onMounted(() => {
10109
+ onBeforeMount(() => {
10105
10110
  watchPostEffect(setVars);
10111
+ });
10112
+ onMounted(() => {
10106
10113
  const ob = new MutationObserver(setVars);
10107
10114
  ob.observe(instance.subTree.el.parentNode, { childList: true });
10108
10115
  onUnmounted(() => ob.disconnect());
@@ -15445,7 +15452,7 @@ function resolveComponentType(node, context, ssr = false) {
15445
15452
  } else {
15446
15453
  exp = isProp.exp;
15447
15454
  if (!exp) {
15448
- exp = createSimpleExpression(`is`, false, isProp.loc);
15455
+ exp = createSimpleExpression(`is`, false, isProp.arg.loc);
15449
15456
  }
15450
15457
  }
15451
15458
  if (exp) {