@vue/compat 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.
package/dist/vue.cjs.js CHANGED
@@ -2301,6 +2301,7 @@ function emit(event, ...args) {
2301
2301
  }
2302
2302
  }
2303
2303
  function setDevtoolsHook(hook, target) {
2304
+ var _a, _b;
2304
2305
  devtools = hook;
2305
2306
  if (devtools) {
2306
2307
  devtools.enabled = true;
@@ -2315,7 +2316,7 @@ function setDevtoolsHook(hook, target) {
2315
2316
  // some envs mock window but not fully
2316
2317
  window.HTMLElement &&
2317
2318
  // also exclude jsdom
2318
- !window.navigator?.userAgent?.includes('jsdom')) {
2319
+ !((_b = (_a = window.navigator) === null || _a === void 0 ? void 0 : _a.userAgent) === null || _b === void 0 ? void 0 : _b.includes('jsdom'))) {
2319
2320
  const replay = (target.__VUE_DEVTOOLS_HOOK_REPLAY__ =
2320
2321
  target.__VUE_DEVTOOLS_HOOK_REPLAY__ || []);
2321
2322
  replay.push((newHook) => {
@@ -5185,7 +5186,7 @@ function resolveAsset(type, name, warnMissing = true, maybeSelfReference = false
5185
5186
  const Component = instance.type;
5186
5187
  // explicit self name has highest priority
5187
5188
  if (type === COMPONENTS) {
5188
- const selfName = getComponentName(Component);
5189
+ const selfName = getComponentName(Component, false /* do not include inferred name to avoid breaking existing code */);
5189
5190
  if (selfName &&
5190
5191
  (selfName === name ||
5191
5192
  selfName === camelize(name) ||
@@ -7280,7 +7281,7 @@ function createCompatVue(createApp, createSingletonApp) {
7280
7281
  return vm;
7281
7282
  }
7282
7283
  }
7283
- Vue.version = `2.6.14-compat:${"3.2.34"}`;
7284
+ Vue.version = `2.6.14-compat:${"3.2.37"}`;
7284
7285
  Vue.config = singletonApp.config;
7285
7286
  Vue.use = (p, ...options) => {
7286
7287
  if (p && isFunction(p.install)) {
@@ -7446,9 +7447,11 @@ function installLegacyAPIs(app) {
7446
7447
  });
7447
7448
  }
7448
7449
  function applySingletonAppMutations(app) {
7449
- ['mixins', 'components', 'directives', 'filters', 'deopt'].forEach(key => {
7450
+ // copy over asset registries and deopt flag
7451
+ app._context.mixins = [...singletonApp._context.mixins];
7452
+ ['components', 'directives', 'filters'].forEach(key => {
7450
7453
  // @ts-ignore
7451
- app._context[key] = singletonApp._context[key];
7454
+ app._context[key] = Object.create(singletonApp._context[key]);
7452
7455
  });
7453
7456
  // copy over global config mutations
7454
7457
  isCopyingConfig = true;
@@ -7461,7 +7464,7 @@ function applySingletonAppMutations(app) {
7461
7464
  }
7462
7465
  const val = singletonApp.config[key];
7463
7466
  // @ts-ignore
7464
- app.config[key] = val;
7467
+ app.config[key] = isObject(val) ? Object.create(val) : val;
7465
7468
  // compat for runtime ignoredElements -> isCustomElement
7466
7469
  if (key === 'ignoredElements' &&
7467
7470
  isCompatEnabled("CONFIG_IGNORED_ELEMENTS" /* CONFIG_IGNORED_ELEMENTS */, null) &&
@@ -7934,7 +7937,7 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
7934
7937
  setupState[ref] = value;
7935
7938
  }
7936
7939
  }
7937
- else if (isRef(ref)) {
7940
+ else if (_isRef) {
7938
7941
  ref.value = value;
7939
7942
  if (rawRef.k)
7940
7943
  refs[rawRef.k] = value;
@@ -7973,11 +7976,13 @@ function createHydrationFunctions(rendererInternals) {
7973
7976
  `Performing full mount instead.`);
7974
7977
  patch(null, vnode, container);
7975
7978
  flushPostFlushCbs();
7979
+ container._vnode = vnode;
7976
7980
  return;
7977
7981
  }
7978
7982
  hasMismatch = false;
7979
7983
  hydrateNode(container.firstChild, vnode, null, null, null);
7980
7984
  flushPostFlushCbs();
7985
+ container._vnode = vnode;
7981
7986
  if (hasMismatch && !false) {
7982
7987
  // this error should show up in production
7983
7988
  console.error(`Hydration completed but contains mismatches.`);
@@ -8000,7 +8005,7 @@ function createHydrationFunctions(rendererInternals) {
8000
8005
  // #5728 empty text node inside a slot can cause hydration failure
8001
8006
  // because the server rendered HTML won't contain a text node
8002
8007
  if (vnode.children === '') {
8003
- insert((vnode.el = createText('')), node.parentElement, node);
8008
+ insert((vnode.el = createText('')), parentNode(node), node);
8004
8009
  nextNode = node;
8005
8010
  }
8006
8011
  else {
@@ -8027,7 +8032,7 @@ function createHydrationFunctions(rendererInternals) {
8027
8032
  }
8028
8033
  break;
8029
8034
  case Static:
8030
- if (domType !== 1 /* ELEMENT */) {
8035
+ if (domType !== 1 /* ELEMENT */ && domType !== 3 /* TEXT */) {
8031
8036
  nextNode = onMismatch();
8032
8037
  }
8033
8038
  else {
@@ -8038,7 +8043,10 @@ function createHydrationFunctions(rendererInternals) {
8038
8043
  const needToAdoptContent = !vnode.children.length;
8039
8044
  for (let i = 0; i < vnode.staticCount; i++) {
8040
8045
  if (needToAdoptContent)
8041
- vnode.children += nextNode.outerHTML;
8046
+ vnode.children +=
8047
+ nextNode.nodeType === 1 /* ELEMENT */
8048
+ ? nextNode.outerHTML
8049
+ : nextNode.data;
8042
8050
  if (i === vnode.staticCount - 1) {
8043
8051
  vnode.anchor = nextNode;
8044
8052
  }
@@ -10573,6 +10581,7 @@ function setupComponent(instance, isSSR = false) {
10573
10581
  return setupResult;
10574
10582
  }
10575
10583
  function setupStatefulComponent(instance, isSSR) {
10584
+ var _a;
10576
10585
  const Component = instance.type;
10577
10586
  {
10578
10587
  if (Component.name) {
@@ -10631,7 +10640,7 @@ function setupStatefulComponent(instance, isSSR) {
10631
10640
  // bail here and wait for re-entry.
10632
10641
  instance.asyncDep = setupResult;
10633
10642
  if (!instance.suspense) {
10634
- const name = Component.name ?? 'Anonymous';
10643
+ const name = (_a = Component.name) !== null && _a !== void 0 ? _a : 'Anonymous';
10635
10644
  warn$1(`Component <${name}>: setup function returned a promise, but no ` +
10636
10645
  `<Suspense> boundary was found in the parent component tree. ` +
10637
10646
  `A component with async setup() must be nested in a <Suspense> ` +
@@ -10825,10 +10834,10 @@ function getExposeProxy(instance) {
10825
10834
  }
10826
10835
  const classifyRE = /(?:^|[-_])(\w)/g;
10827
10836
  const classify = (str) => str.replace(classifyRE, c => c.toUpperCase()).replace(/[-_]/g, '');
10828
- function getComponentName(Component) {
10837
+ function getComponentName(Component, includeInferred = true) {
10829
10838
  return isFunction(Component)
10830
10839
  ? Component.displayName || Component.name
10831
- : Component.name;
10840
+ : Component.name || (includeInferred && Component.__name);
10832
10841
  }
10833
10842
  /* istanbul ignore next */
10834
10843
  function formatComponentName(instance, Component, isRoot = false) {
@@ -11272,7 +11281,7 @@ function isMemoSame(cached, memo) {
11272
11281
  }
11273
11282
 
11274
11283
  // Core API ------------------------------------------------------------------
11275
- const version = "3.2.34";
11284
+ const version = "3.2.37";
11276
11285
  const _ssrUtils = {
11277
11286
  createComponentInstance,
11278
11287
  setupComponent,
@@ -11282,7 +11291,7 @@ const _ssrUtils = {
11282
11291
  normalizeVNode
11283
11292
  };
11284
11293
  /**
11285
- * SSR utils for \@vue/server-renderer. Only exposed in cjs builds.
11294
+ * SSR utils for \@vue/server-renderer. Only exposed in ssr-possible builds.
11286
11295
  * @internal
11287
11296
  */
11288
11297
  const ssrUtils = (_ssrUtils );
@@ -11636,7 +11645,7 @@ const [_getNow, skipTimestampCheck] = /*#__PURE__*/ (() => {
11636
11645
  // if the low-res timestamp which is bigger than the event timestamp
11637
11646
  // (which is evaluated AFTER) it means the event is using a hi-res timestamp,
11638
11647
  // and we need to use the hi-res version for event listeners as well.
11639
- _getNow = () => performance.now();
11648
+ _getNow = performance.now.bind(performance);
11640
11649
  }
11641
11650
  // #3485: Firefox <= 53 has incorrect Event.timeStamp implementation
11642
11651
  // and does not fire microtasks in between event propagation, so safe to exclude.
@@ -12136,9 +12145,8 @@ function resolveTransitionProps(rawProps) {
12136
12145
  removeTransitionClass(el, isAppear ? appearActiveClass : enterActiveClass);
12137
12146
  done && done();
12138
12147
  };
12139
- let isLeaving = false;
12140
12148
  const finishLeave = (el, done) => {
12141
- isLeaving = false;
12149
+ el._isLeaving = false;
12142
12150
  removeTransitionClass(el, leaveFromClass);
12143
12151
  removeTransitionClass(el, leaveToClass);
12144
12152
  removeTransitionClass(el, leaveActiveClass);
@@ -12181,7 +12189,7 @@ function resolveTransitionProps(rawProps) {
12181
12189
  onEnter: makeEnterHook(false),
12182
12190
  onAppear: makeEnterHook(true),
12183
12191
  onLeave(el, done) {
12184
- isLeaving = true;
12192
+ el._isLeaving = true;
12185
12193
  const resolve = () => finishLeave(el, done);
12186
12194
  addTransitionClass(el, leaveFromClass);
12187
12195
  if (legacyClassEnabled) {
@@ -12191,7 +12199,7 @@ function resolveTransitionProps(rawProps) {
12191
12199
  forceReflow();
12192
12200
  addTransitionClass(el, leaveActiveClass);
12193
12201
  nextFrame(() => {
12194
- if (!isLeaving) {
12202
+ if (!el._isLeaving) {
12195
12203
  // cancelled
12196
12204
  return;
12197
12205
  }
@@ -14901,6 +14909,14 @@ function getConstantType(node, context) {
14901
14909
  // static then they don't need to be blocks since there will be no
14902
14910
  // nested updates.
14903
14911
  if (codegenNode.isBlock) {
14912
+ // except set custom directives.
14913
+ for (let i = 0; i < node.props.length; i++) {
14914
+ const p = node.props[i];
14915
+ if (p.type === 7 /* DIRECTIVE */) {
14916
+ constantCache.set(node, 0 /* NOT_CONSTANT */);
14917
+ return 0 /* NOT_CONSTANT */;
14918
+ }
14919
+ }
14904
14920
  context.removeHelper(OPEN_BLOCK);
14905
14921
  context.removeHelper(getVNodeBlockHelper(context.inSSR, codegenNode.isComponent));
14906
14922
  codegenNode.isBlock = false;
@@ -16361,7 +16377,7 @@ function isReferenced(node, parent, grandparent) {
16361
16377
  // no: export { NODE as foo } from "foo";
16362
16378
  case 'ExportSpecifier':
16363
16379
  // @ts-expect-error
16364
- if (grandparent?.source) {
16380
+ if (grandparent === null || grandparent === void 0 ? void 0 : grandparent.source) {
16365
16381
  return false;
16366
16382
  }
16367
16383
  return parent.local === node;
@@ -1909,6 +1909,7 @@ function flushJobs(seen) {
1909
1909
  let devtools;
1910
1910
  let buffer = [];
1911
1911
  function setDevtoolsHook(hook, target) {
1912
+ var _a, _b;
1912
1913
  devtools = hook;
1913
1914
  if (devtools) {
1914
1915
  devtools.enabled = true;
@@ -1923,7 +1924,7 @@ function setDevtoolsHook(hook, target) {
1923
1924
  // some envs mock window but not fully
1924
1925
  window.HTMLElement &&
1925
1926
  // also exclude jsdom
1926
- !window.navigator?.userAgent?.includes('jsdom')) {
1927
+ !((_b = (_a = window.navigator) === null || _a === void 0 ? void 0 : _a.userAgent) === null || _b === void 0 ? void 0 : _b.includes('jsdom'))) {
1927
1928
  const replay = (target.__VUE_DEVTOOLS_HOOK_REPLAY__ =
1928
1929
  target.__VUE_DEVTOOLS_HOOK_REPLAY__ || []);
1929
1930
  replay.push((newHook) => {
@@ -4167,7 +4168,7 @@ function resolveAsset(type, name, warnMissing = true, maybeSelfReference = false
4167
4168
  const Component = instance.type;
4168
4169
  // explicit self name has highest priority
4169
4170
  if (type === COMPONENTS) {
4170
- const selfName = getComponentName(Component);
4171
+ const selfName = getComponentName(Component, false /* do not include inferred name to avoid breaking existing code */);
4171
4172
  if (selfName &&
4172
4173
  (selfName === name ||
4173
4174
  selfName === camelize(name) ||
@@ -5851,7 +5852,7 @@ function createCompatVue(createApp, createSingletonApp) {
5851
5852
  return vm;
5852
5853
  }
5853
5854
  }
5854
- Vue.version = `2.6.14-compat:${"3.2.34"}`;
5855
+ Vue.version = `2.6.14-compat:${"3.2.37"}`;
5855
5856
  Vue.config = singletonApp.config;
5856
5857
  Vue.use = (p, ...options) => {
5857
5858
  if (p && isFunction(p.install)) {
@@ -6012,9 +6013,11 @@ function installLegacyAPIs(app) {
6012
6013
  });
6013
6014
  }
6014
6015
  function applySingletonAppMutations(app) {
6015
- ['mixins', 'components', 'directives', 'filters', 'deopt'].forEach(key => {
6016
+ // copy over asset registries and deopt flag
6017
+ app._context.mixins = [...singletonApp._context.mixins];
6018
+ ['components', 'directives', 'filters'].forEach(key => {
6016
6019
  // @ts-ignore
6017
- app._context[key] = singletonApp._context[key];
6020
+ app._context[key] = Object.create(singletonApp._context[key]);
6018
6021
  });
6019
6022
  for (const key in singletonApp.config) {
6020
6023
  if (key === 'isNativeTag')
@@ -6025,7 +6028,7 @@ function applySingletonAppMutations(app) {
6025
6028
  }
6026
6029
  const val = singletonApp.config[key];
6027
6030
  // @ts-ignore
6028
- app.config[key] = val;
6031
+ app.config[key] = isObject(val) ? Object.create(val) : val;
6029
6032
  // compat for runtime ignoredElements -> isCustomElement
6030
6033
  if (key === 'ignoredElements' &&
6031
6034
  isCompatEnabled("CONFIG_IGNORED_ELEMENTS" /* CONFIG_IGNORED_ELEMENTS */, null) &&
@@ -6402,7 +6405,7 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
6402
6405
  setupState[ref] = value;
6403
6406
  }
6404
6407
  }
6405
- else if (isRef(ref)) {
6408
+ else if (_isRef) {
6406
6409
  ref.value = value;
6407
6410
  if (rawRef.k)
6408
6411
  refs[rawRef.k] = value;
@@ -6434,11 +6437,13 @@ function createHydrationFunctions(rendererInternals) {
6434
6437
  if (!container.hasChildNodes()) {
6435
6438
  patch(null, vnode, container);
6436
6439
  flushPostFlushCbs();
6440
+ container._vnode = vnode;
6437
6441
  return;
6438
6442
  }
6439
6443
  hasMismatch = false;
6440
6444
  hydrateNode(container.firstChild, vnode, null, null, null);
6441
6445
  flushPostFlushCbs();
6446
+ container._vnode = vnode;
6442
6447
  if (hasMismatch && !false) {
6443
6448
  // this error should show up in production
6444
6449
  console.error(`Hydration completed but contains mismatches.`);
@@ -6461,7 +6466,7 @@ function createHydrationFunctions(rendererInternals) {
6461
6466
  // #5728 empty text node inside a slot can cause hydration failure
6462
6467
  // because the server rendered HTML won't contain a text node
6463
6468
  if (vnode.children === '') {
6464
- insert((vnode.el = createText('')), node.parentElement, node);
6469
+ insert((vnode.el = createText('')), parentNode(node), node);
6465
6470
  nextNode = node;
6466
6471
  }
6467
6472
  else {
@@ -6485,7 +6490,7 @@ function createHydrationFunctions(rendererInternals) {
6485
6490
  }
6486
6491
  break;
6487
6492
  case Static:
6488
- if (domType !== 1 /* ELEMENT */) {
6493
+ if (domType !== 1 /* ELEMENT */ && domType !== 3 /* TEXT */) {
6489
6494
  nextNode = onMismatch();
6490
6495
  }
6491
6496
  else {
@@ -6496,7 +6501,10 @@ function createHydrationFunctions(rendererInternals) {
6496
6501
  const needToAdoptContent = !vnode.children.length;
6497
6502
  for (let i = 0; i < vnode.staticCount; i++) {
6498
6503
  if (needToAdoptContent)
6499
- vnode.children += nextNode.outerHTML;
6504
+ vnode.children +=
6505
+ nextNode.nodeType === 1 /* ELEMENT */
6506
+ ? nextNode.outerHTML
6507
+ : nextNode.data;
6500
6508
  if (i === vnode.staticCount - 1) {
6501
6509
  vnode.anchor = nextNode;
6502
6510
  }
@@ -8906,10 +8914,10 @@ function getExposeProxy(instance) {
8906
8914
  }
8907
8915
  const classifyRE = /(?:^|[-_])(\w)/g;
8908
8916
  const classify = (str) => str.replace(classifyRE, c => c.toUpperCase()).replace(/[-_]/g, '');
8909
- function getComponentName(Component) {
8917
+ function getComponentName(Component, includeInferred = true) {
8910
8918
  return isFunction(Component)
8911
8919
  ? Component.displayName || Component.name
8912
- : Component.name;
8920
+ : Component.name || (includeInferred && Component.__name);
8913
8921
  }
8914
8922
  /* istanbul ignore next */
8915
8923
  function formatComponentName(instance, Component, isRoot = false) {
@@ -9146,7 +9154,7 @@ function isMemoSame(cached, memo) {
9146
9154
  }
9147
9155
 
9148
9156
  // Core API ------------------------------------------------------------------
9149
- const version = "3.2.34";
9157
+ const version = "3.2.37";
9150
9158
  const _ssrUtils = {
9151
9159
  createComponentInstance,
9152
9160
  setupComponent,
@@ -9156,7 +9164,7 @@ const _ssrUtils = {
9156
9164
  normalizeVNode
9157
9165
  };
9158
9166
  /**
9159
- * SSR utils for \@vue/server-renderer. Only exposed in cjs builds.
9167
+ * SSR utils for \@vue/server-renderer. Only exposed in ssr-possible builds.
9160
9168
  * @internal
9161
9169
  */
9162
9170
  const ssrUtils = (_ssrUtils );
@@ -9505,7 +9513,7 @@ const [_getNow, skipTimestampCheck] = /*#__PURE__*/ (() => {
9505
9513
  // if the low-res timestamp which is bigger than the event timestamp
9506
9514
  // (which is evaluated AFTER) it means the event is using a hi-res timestamp,
9507
9515
  // and we need to use the hi-res version for event listeners as well.
9508
- _getNow = () => performance.now();
9516
+ _getNow = performance.now.bind(performance);
9509
9517
  }
9510
9518
  // #3485: Firefox <= 53 has incorrect Event.timeStamp implementation
9511
9519
  // and does not fire microtasks in between event propagation, so safe to exclude.
@@ -9976,9 +9984,8 @@ function resolveTransitionProps(rawProps) {
9976
9984
  removeTransitionClass(el, isAppear ? appearActiveClass : enterActiveClass);
9977
9985
  done && done();
9978
9986
  };
9979
- let isLeaving = false;
9980
9987
  const finishLeave = (el, done) => {
9981
- isLeaving = false;
9988
+ el._isLeaving = false;
9982
9989
  removeTransitionClass(el, leaveFromClass);
9983
9990
  removeTransitionClass(el, leaveToClass);
9984
9991
  removeTransitionClass(el, leaveActiveClass);
@@ -10021,7 +10028,7 @@ function resolveTransitionProps(rawProps) {
10021
10028
  onEnter: makeEnterHook(false),
10022
10029
  onAppear: makeEnterHook(true),
10023
10030
  onLeave(el, done) {
10024
- isLeaving = true;
10031
+ el._isLeaving = true;
10025
10032
  const resolve = () => finishLeave(el, done);
10026
10033
  addTransitionClass(el, leaveFromClass);
10027
10034
  if (legacyClassEnabled) {
@@ -10031,7 +10038,7 @@ function resolveTransitionProps(rawProps) {
10031
10038
  forceReflow();
10032
10039
  addTransitionClass(el, leaveActiveClass);
10033
10040
  nextFrame(() => {
10034
- if (!isLeaving) {
10041
+ if (!el._isLeaving) {
10035
10042
  // cancelled
10036
10043
  return;
10037
10044
  }
@@ -12557,6 +12564,14 @@ function getConstantType(node, context) {
12557
12564
  // static then they don't need to be blocks since there will be no
12558
12565
  // nested updates.
12559
12566
  if (codegenNode.isBlock) {
12567
+ // except set custom directives.
12568
+ for (let i = 0; i < node.props.length; i++) {
12569
+ const p = node.props[i];
12570
+ if (p.type === 7 /* DIRECTIVE */) {
12571
+ constantCache.set(node, 0 /* NOT_CONSTANT */);
12572
+ return 0 /* NOT_CONSTANT */;
12573
+ }
12574
+ }
12560
12575
  context.removeHelper(OPEN_BLOCK);
12561
12576
  context.removeHelper(getVNodeBlockHelper(context.inSSR, codegenNode.isComponent));
12562
12577
  codegenNode.isBlock = false;
@@ -13981,7 +13996,7 @@ function isReferenced(node, parent, grandparent) {
13981
13996
  // no: export { NODE as foo } from "foo";
13982
13997
  case 'ExportSpecifier':
13983
13998
  // @ts-expect-error
13984
- if (grandparent?.source) {
13999
+ if (grandparent === null || grandparent === void 0 ? void 0 : grandparent.source) {
13985
14000
  return false;
13986
14001
  }
13987
14002
  return parent.local === node;
@@ -5013,7 +5013,7 @@ function resolveAsset(type, name, warnMissing = true, maybeSelfReference = false
5013
5013
  const Component = instance.type;
5014
5014
  // explicit self name has highest priority
5015
5015
  if (type === COMPONENTS) {
5016
- const selfName = getComponentName(Component);
5016
+ const selfName = getComponentName(Component, false /* do not include inferred name to avoid breaking existing code */);
5017
5017
  if (selfName &&
5018
5018
  (selfName === name ||
5019
5019
  selfName === camelize(name) ||
@@ -7108,7 +7108,7 @@ function createCompatVue(createApp, createSingletonApp) {
7108
7108
  return vm;
7109
7109
  }
7110
7110
  }
7111
- Vue.version = `2.6.14-compat:${"3.2.34"}`;
7111
+ Vue.version = `2.6.14-compat:${"3.2.37"}`;
7112
7112
  Vue.config = singletonApp.config;
7113
7113
  Vue.use = (p, ...options) => {
7114
7114
  if (p && isFunction(p.install)) {
@@ -7274,9 +7274,11 @@ function installLegacyAPIs(app) {
7274
7274
  });
7275
7275
  }
7276
7276
  function applySingletonAppMutations(app) {
7277
- ['mixins', 'components', 'directives', 'filters', 'deopt'].forEach(key => {
7277
+ // copy over asset registries and deopt flag
7278
+ app._context.mixins = [...singletonApp._context.mixins];
7279
+ ['components', 'directives', 'filters'].forEach(key => {
7278
7280
  // @ts-ignore
7279
- app._context[key] = singletonApp._context[key];
7281
+ app._context[key] = Object.create(singletonApp._context[key]);
7280
7282
  });
7281
7283
  // copy over global config mutations
7282
7284
  isCopyingConfig = true;
@@ -7289,7 +7291,7 @@ function applySingletonAppMutations(app) {
7289
7291
  }
7290
7292
  const val = singletonApp.config[key];
7291
7293
  // @ts-ignore
7292
- app.config[key] = val;
7294
+ app.config[key] = isObject(val) ? Object.create(val) : val;
7293
7295
  // compat for runtime ignoredElements -> isCustomElement
7294
7296
  if (key === 'ignoredElements' &&
7295
7297
  isCompatEnabled("CONFIG_IGNORED_ELEMENTS" /* CONFIG_IGNORED_ELEMENTS */, null) &&
@@ -7762,7 +7764,7 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
7762
7764
  setupState[ref] = value;
7763
7765
  }
7764
7766
  }
7765
- else if (isRef(ref)) {
7767
+ else if (_isRef) {
7766
7768
  ref.value = value;
7767
7769
  if (rawRef.k)
7768
7770
  refs[rawRef.k] = value;
@@ -7801,11 +7803,13 @@ function createHydrationFunctions(rendererInternals) {
7801
7803
  `Performing full mount instead.`);
7802
7804
  patch(null, vnode, container);
7803
7805
  flushPostFlushCbs();
7806
+ container._vnode = vnode;
7804
7807
  return;
7805
7808
  }
7806
7809
  hasMismatch = false;
7807
7810
  hydrateNode(container.firstChild, vnode, null, null, null);
7808
7811
  flushPostFlushCbs();
7812
+ container._vnode = vnode;
7809
7813
  if (hasMismatch && !false) {
7810
7814
  // this error should show up in production
7811
7815
  console.error(`Hydration completed but contains mismatches.`);
@@ -7828,7 +7832,7 @@ function createHydrationFunctions(rendererInternals) {
7828
7832
  // #5728 empty text node inside a slot can cause hydration failure
7829
7833
  // because the server rendered HTML won't contain a text node
7830
7834
  if (vnode.children === '') {
7831
- insert((vnode.el = createText('')), node.parentElement, node);
7835
+ insert((vnode.el = createText('')), parentNode(node), node);
7832
7836
  nextNode = node;
7833
7837
  }
7834
7838
  else {
@@ -7855,7 +7859,7 @@ function createHydrationFunctions(rendererInternals) {
7855
7859
  }
7856
7860
  break;
7857
7861
  case Static:
7858
- if (domType !== 1 /* ELEMENT */) {
7862
+ if (domType !== 1 /* ELEMENT */ && domType !== 3 /* TEXT */) {
7859
7863
  nextNode = onMismatch();
7860
7864
  }
7861
7865
  else {
@@ -7866,7 +7870,10 @@ function createHydrationFunctions(rendererInternals) {
7866
7870
  const needToAdoptContent = !vnode.children.length;
7867
7871
  for (let i = 0; i < vnode.staticCount; i++) {
7868
7872
  if (needToAdoptContent)
7869
- vnode.children += nextNode.outerHTML;
7873
+ vnode.children +=
7874
+ nextNode.nodeType === 1 /* ELEMENT */
7875
+ ? nextNode.outerHTML
7876
+ : nextNode.data;
7870
7877
  if (i === vnode.staticCount - 1) {
7871
7878
  vnode.anchor = nextNode;
7872
7879
  }
@@ -10650,10 +10657,10 @@ function getExposeProxy(instance) {
10650
10657
  }
10651
10658
  const classifyRE = /(?:^|[-_])(\w)/g;
10652
10659
  const classify = (str) => str.replace(classifyRE, c => c.toUpperCase()).replace(/[-_]/g, '');
10653
- function getComponentName(Component) {
10660
+ function getComponentName(Component, includeInferred = true) {
10654
10661
  return isFunction(Component)
10655
10662
  ? Component.displayName || Component.name
10656
- : Component.name;
10663
+ : Component.name || (includeInferred && Component.__name);
10657
10664
  }
10658
10665
  /* istanbul ignore next */
10659
10666
  function formatComponentName(instance, Component, isRoot = false) {
@@ -11097,9 +11104,9 @@ function isMemoSame(cached, memo) {
11097
11104
  }
11098
11105
 
11099
11106
  // Core API ------------------------------------------------------------------
11100
- const version = "3.2.34";
11107
+ const version = "3.2.37";
11101
11108
  /**
11102
- * SSR utils for \@vue/server-renderer. Only exposed in cjs builds.
11109
+ * SSR utils for \@vue/server-renderer. Only exposed in ssr-possible builds.
11103
11110
  * @internal
11104
11111
  */
11105
11112
  const ssrUtils = (null);
@@ -11453,7 +11460,7 @@ const [_getNow, skipTimestampCheck] = /*#__PURE__*/ (() => {
11453
11460
  // if the low-res timestamp which is bigger than the event timestamp
11454
11461
  // (which is evaluated AFTER) it means the event is using a hi-res timestamp,
11455
11462
  // and we need to use the hi-res version for event listeners as well.
11456
- _getNow = () => performance.now();
11463
+ _getNow = performance.now.bind(performance);
11457
11464
  }
11458
11465
  // #3485: Firefox <= 53 has incorrect Event.timeStamp implementation
11459
11466
  // and does not fire microtasks in between event propagation, so safe to exclude.
@@ -12003,9 +12010,8 @@ function resolveTransitionProps(rawProps) {
12003
12010
  removeTransitionClass(el, isAppear ? appearActiveClass : enterActiveClass);
12004
12011
  done && done();
12005
12012
  };
12006
- let isLeaving = false;
12007
12013
  const finishLeave = (el, done) => {
12008
- isLeaving = false;
12014
+ el._isLeaving = false;
12009
12015
  removeTransitionClass(el, leaveFromClass);
12010
12016
  removeTransitionClass(el, leaveToClass);
12011
12017
  removeTransitionClass(el, leaveActiveClass);
@@ -12048,7 +12054,7 @@ function resolveTransitionProps(rawProps) {
12048
12054
  onEnter: makeEnterHook(false),
12049
12055
  onAppear: makeEnterHook(true),
12050
12056
  onLeave(el, done) {
12051
- isLeaving = true;
12057
+ el._isLeaving = true;
12052
12058
  const resolve = () => finishLeave(el, done);
12053
12059
  addTransitionClass(el, leaveFromClass);
12054
12060
  if (legacyClassEnabled) {
@@ -12058,7 +12064,7 @@ function resolveTransitionProps(rawProps) {
12058
12064
  forceReflow();
12059
12065
  addTransitionClass(el, leaveActiveClass);
12060
12066
  nextFrame(() => {
12061
- if (!isLeaving) {
12067
+ if (!el._isLeaving) {
12062
12068
  // cancelled
12063
12069
  return;
12064
12070
  }
@@ -14749,6 +14755,14 @@ function getConstantType(node, context) {
14749
14755
  // static then they don't need to be blocks since there will be no
14750
14756
  // nested updates.
14751
14757
  if (codegenNode.isBlock) {
14758
+ // except set custom directives.
14759
+ for (let i = 0; i < node.props.length; i++) {
14760
+ const p = node.props[i];
14761
+ if (p.type === 7 /* DIRECTIVE */) {
14762
+ constantCache.set(node, 0 /* NOT_CONSTANT */);
14763
+ return 0 /* NOT_CONSTANT */;
14764
+ }
14765
+ }
14752
14766
  context.removeHelper(OPEN_BLOCK);
14753
14767
  context.removeHelper(getVNodeBlockHelper(context.inSSR, codegenNode.isComponent));
14754
14768
  codegenNode.isBlock = false;