vue 3.2.34 → 3.2.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.
@@ -4372,7 +4372,7 @@ var Vue = (function (exports) {
4372
4372
  const Component = instance.type;
4373
4373
  // explicit self name has highest priority
4374
4374
  if (type === COMPONENTS) {
4375
- const selfName = getComponentName(Component);
4375
+ const selfName = getComponentName(Component, false /* do not include inferred name to avoid breaking existing code */);
4376
4376
  if (selfName &&
4377
4377
  (selfName === name ||
4378
4378
  selfName === camelize(name) ||
@@ -6043,7 +6043,7 @@ var Vue = (function (exports) {
6043
6043
  setupState[ref] = value;
6044
6044
  }
6045
6045
  }
6046
- else if (isRef(ref)) {
6046
+ else if (_isRef) {
6047
6047
  ref.value = value;
6048
6048
  if (rawRef.k)
6049
6049
  refs[rawRef.k] = value;
@@ -6082,11 +6082,13 @@ var Vue = (function (exports) {
6082
6082
  `Performing full mount instead.`);
6083
6083
  patch(null, vnode, container);
6084
6084
  flushPostFlushCbs();
6085
+ container._vnode = vnode;
6085
6086
  return;
6086
6087
  }
6087
6088
  hasMismatch = false;
6088
6089
  hydrateNode(container.firstChild, vnode, null, null, null);
6089
6090
  flushPostFlushCbs();
6091
+ container._vnode = vnode;
6090
6092
  if (hasMismatch && !false) {
6091
6093
  // this error should show up in production
6092
6094
  console.error(`Hydration completed but contains mismatches.`);
@@ -6109,7 +6111,7 @@ var Vue = (function (exports) {
6109
6111
  // #5728 empty text node inside a slot can cause hydration failure
6110
6112
  // because the server rendered HTML won't contain a text node
6111
6113
  if (vnode.children === '') {
6112
- insert((vnode.el = createText('')), node.parentElement, node);
6114
+ insert((vnode.el = createText('')), parentNode(node), node);
6113
6115
  nextNode = node;
6114
6116
  }
6115
6117
  else {
@@ -6136,7 +6138,7 @@ var Vue = (function (exports) {
6136
6138
  }
6137
6139
  break;
6138
6140
  case Static:
6139
- if (domType !== 1 /* ELEMENT */) {
6141
+ if (domType !== 1 /* ELEMENT */ && domType !== 3 /* TEXT */) {
6140
6142
  nextNode = onMismatch();
6141
6143
  }
6142
6144
  else {
@@ -6147,7 +6149,10 @@ var Vue = (function (exports) {
6147
6149
  const needToAdoptContent = !vnode.children.length;
6148
6150
  for (let i = 0; i < vnode.staticCount; i++) {
6149
6151
  if (needToAdoptContent)
6150
- vnode.children += nextNode.outerHTML;
6152
+ vnode.children +=
6153
+ nextNode.nodeType === 1 /* ELEMENT */
6154
+ ? nextNode.outerHTML
6155
+ : nextNode.data;
6151
6156
  if (i === vnode.staticCount - 1) {
6152
6157
  vnode.anchor = nextNode;
6153
6158
  }
@@ -8820,10 +8825,10 @@ var Vue = (function (exports) {
8820
8825
  }
8821
8826
  const classifyRE = /(?:^|[-_])(\w)/g;
8822
8827
  const classify = (str) => str.replace(classifyRE, c => c.toUpperCase()).replace(/[-_]/g, '');
8823
- function getComponentName(Component) {
8828
+ function getComponentName(Component, includeInferred = true) {
8824
8829
  return isFunction(Component)
8825
8830
  ? Component.displayName || Component.name
8826
- : Component.name;
8831
+ : Component.name || (includeInferred && Component.__name);
8827
8832
  }
8828
8833
  /* istanbul ignore next */
8829
8834
  function formatComponentName(instance, Component, isRoot = false) {
@@ -9262,9 +9267,9 @@ var Vue = (function (exports) {
9262
9267
  }
9263
9268
 
9264
9269
  // Core API ------------------------------------------------------------------
9265
- const version = "3.2.34";
9270
+ const version = "3.2.37";
9266
9271
  /**
9267
- * SSR utils for \@vue/server-renderer. Only exposed in cjs builds.
9272
+ * SSR utils for \@vue/server-renderer. Only exposed in ssr-possible builds.
9268
9273
  * @internal
9269
9274
  */
9270
9275
  const ssrUtils = (null);
@@ -9573,7 +9578,7 @@ var Vue = (function (exports) {
9573
9578
  // if the low-res timestamp which is bigger than the event timestamp
9574
9579
  // (which is evaluated AFTER) it means the event is using a hi-res timestamp,
9575
9580
  // and we need to use the hi-res version for event listeners as well.
9576
- _getNow = () => performance.now();
9581
+ _getNow = performance.now.bind(performance);
9577
9582
  }
9578
9583
  // #3485: Firefox <= 53 has incorrect Event.timeStamp implementation
9579
9584
  // and does not fire microtasks in between event propagation, so safe to exclude.
@@ -10091,9 +10096,8 @@ var Vue = (function (exports) {
10091
10096
  removeTransitionClass(el, isAppear ? appearActiveClass : enterActiveClass);
10092
10097
  done && done();
10093
10098
  };
10094
- let isLeaving = false;
10095
10099
  const finishLeave = (el, done) => {
10096
- isLeaving = false;
10100
+ el._isLeaving = false;
10097
10101
  removeTransitionClass(el, leaveFromClass);
10098
10102
  removeTransitionClass(el, leaveToClass);
10099
10103
  removeTransitionClass(el, leaveActiveClass);
@@ -10127,14 +10131,14 @@ var Vue = (function (exports) {
10127
10131
  onEnter: makeEnterHook(false),
10128
10132
  onAppear: makeEnterHook(true),
10129
10133
  onLeave(el, done) {
10130
- isLeaving = true;
10134
+ el._isLeaving = true;
10131
10135
  const resolve = () => finishLeave(el, done);
10132
10136
  addTransitionClass(el, leaveFromClass);
10133
10137
  // force reflow so *-leave-from classes immediately take effect (#2593)
10134
10138
  forceReflow();
10135
10139
  addTransitionClass(el, leaveActiveClass);
10136
10140
  nextFrame(() => {
10137
- if (!isLeaving) {
10141
+ if (!el._isLeaving) {
10138
10142
  // cancelled
10139
10143
  return;
10140
10144
  }
@@ -12541,6 +12545,14 @@ var Vue = (function (exports) {
12541
12545
  // static then they don't need to be blocks since there will be no
12542
12546
  // nested updates.
12543
12547
  if (codegenNode.isBlock) {
12548
+ // except set custom directives.
12549
+ for (let i = 0; i < node.props.length; i++) {
12550
+ const p = node.props[i];
12551
+ if (p.type === 7 /* DIRECTIVE */) {
12552
+ constantCache.set(node, 0 /* NOT_CONSTANT */);
12553
+ return 0 /* NOT_CONSTANT */;
12554
+ }
12555
+ }
12544
12556
  context.removeHelper(OPEN_BLOCK);
12545
12557
  context.removeHelper(getVNodeBlockHelper(context.inSSR, codegenNode.isComponent));
12546
12558
  codegenNode.isBlock = false;