@vue/runtime-core 3.6.0-beta.7 → 3.6.0-beta.9

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,12 +1,14 @@
1
1
  /**
2
- * @vue/runtime-core v3.6.0-beta.7
2
+ * @vue/runtime-core v3.6.0-beta.9
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
6
- Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
6
+ Object.defineProperties(exports, {
7
+ __esModule: { value: true },
8
+ [Symbol.toStringTag]: { value: "Module" }
9
+ });
7
10
  let _vue_reactivity = require("@vue/reactivity");
8
11
  let _vue_shared = require("@vue/shared");
9
-
10
12
  //#region packages/runtime-core/src/warning.ts
11
13
  const stack = [];
12
14
  /**
@@ -26,7 +28,6 @@ function popWarningContext() {
26
28
  */
27
29
  function assertNumber(val, type) {}
28
30
  /* v8 ignore stop */
29
-
30
31
  //#endregion
31
32
  //#region packages/runtime-core/src/errorHandling.ts
32
33
  const ErrorCodes = {
@@ -143,7 +144,6 @@ function logError(err, type, instance, throwInDev = true, throwInProd = false) {
143
144
  if (throwInProd) throw err;
144
145
  else console.error(err);
145
146
  }
146
-
147
147
  //#endregion
148
148
  //#region packages/runtime-core/src/scheduler.ts
149
149
  const jobs = [];
@@ -278,7 +278,6 @@ function flushJobs(seen) {
278
278
  if (jobsLength || postJobs.length) flushJobs(seen);
279
279
  }
280
280
  }
281
-
282
281
  //#endregion
283
282
  //#region packages/runtime-core/src/componentRenderContext.ts
284
283
  /**
@@ -347,7 +346,6 @@ function withCtx(fn, ctx = currentRenderingInstance, isNonScopedSlot) {
347
346
  renderFnWithContext._d = true;
348
347
  return renderFnWithContext;
349
348
  }
350
-
351
349
  //#endregion
352
350
  //#region packages/runtime-core/src/directives.ts
353
351
  /**
@@ -396,7 +394,6 @@ function invokeDirectiveHook(vnode, prevVNode, instance, name) {
396
394
  }
397
395
  }
398
396
  }
399
-
400
397
  //#endregion
401
398
  //#region packages/runtime-core/src/apiInject.ts
402
399
  function provide(key, value) {
@@ -423,7 +420,6 @@ function inject(key, defaultValue, treatDefaultAsFactory = false) {
423
420
  function hasInjectionContext() {
424
421
  return !!(getCurrentGenericInstance() || currentApp);
425
422
  }
426
-
427
423
  //#endregion
428
424
  //#region packages/runtime-core/src/helpers/useSsrContext.ts
429
425
  const ssrContextKey = Symbol.for("v-scx");
@@ -434,7 +430,6 @@ const useSSRContext = () => {
434
430
  return ctx;
435
431
  }
436
432
  };
437
-
438
433
  //#endregion
439
434
  //#region packages/runtime-core/src/apiWatch.ts
440
435
  function watchEffect(effect, options) {
@@ -528,7 +523,6 @@ function createPathGetter(ctx, path) {
528
523
  return cur;
529
524
  };
530
525
  }
531
-
532
526
  //#endregion
533
527
  //#region packages/runtime-core/src/components/Teleport.ts
534
528
  const TeleportEndKey = Symbol("_vte");
@@ -575,25 +569,26 @@ const TeleportImpl = {
575
569
  mount(container, mainAnchor);
576
570
  updateCssVars(n2, true);
577
571
  }
578
- if (isTeleportDeferred(n2.props)) {
572
+ if (isTeleportDeferred(n2.props) || parentSuspense && parentSuspense.pendingBranch) {
579
573
  n2.el.__isMounted = false;
580
574
  queuePostRenderEffect(() => {
575
+ if (n2.el.__isMounted !== false) return;
581
576
  mountToTarget();
582
577
  delete n2.el.__isMounted;
583
578
  }, void 0, parentSuspense);
584
579
  } else mountToTarget();
585
580
  } else {
586
- if (isTeleportDeferred(n2.props) && n1.el.__isMounted === false) {
587
- queuePostRenderEffect(() => {
588
- TeleportImpl.process(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, internals);
589
- }, void 0, parentSuspense);
590
- return;
591
- }
592
581
  n2.el = n1.el;
593
582
  n2.targetStart = n1.targetStart;
594
583
  const mainAnchor = n2.anchor = n1.anchor;
595
584
  const target = n2.target = n1.target;
596
585
  const targetAnchor = n2.targetAnchor = n1.targetAnchor;
586
+ if (n1.el.__isMounted === false) {
587
+ queuePostRenderEffect(() => {
588
+ TeleportImpl.process(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, internals);
589
+ }, void 0, parentSuspense);
590
+ return;
591
+ }
597
592
  const wasDisabled = isTeleportDisabled(n1.props);
598
593
  const currentContainer = wasDisabled ? container : target;
599
594
  const currentAnchor = wasDisabled ? mainAnchor : targetAnchor;
@@ -614,11 +609,9 @@ const TeleportImpl = {
614
609
  }
615
610
  },
616
611
  remove(vnode, parentComponent, parentSuspense, { um: unmount, o: { remove: hostRemove } }, doRemove) {
617
- const { shapeFlag, children, anchor, targetStart, targetAnchor, target, props } = vnode;
618
- if (target) {
619
- hostRemove(targetStart);
620
- hostRemove(targetAnchor);
621
- }
612
+ const { shapeFlag, children, anchor, targetStart, targetAnchor, props } = vnode;
613
+ if (targetStart) hostRemove(targetStart);
614
+ if (targetAnchor) hostRemove(targetAnchor);
622
615
  doRemove && hostRemove(anchor);
623
616
  if (shapeFlag & 16) {
624
617
  const shouldRemove = doRemove || !isTeleportDisabled(props);
@@ -712,7 +705,6 @@ function prepareAnchor(target, vnode, createText, insert, anchor = null) {
712
705
  }
713
706
  return targetAnchor;
714
707
  }
715
-
716
708
  //#endregion
717
709
  //#region packages/runtime-core/src/components/BaseTransition.ts
718
710
  const leaveCbKey = Symbol("_leaveCb");
@@ -766,7 +758,6 @@ const BaseTransitionImpl = {
766
758
  const child = findNonCommentChild(children);
767
759
  const rawProps = (0, _vue_reactivity.toRaw)(props);
768
760
  const { mode } = rawProps;
769
- /* @__PURE__ */ checkTransitionMode(mode);
770
761
  if (state.isLeaving) return emptyPlaceholder(child);
771
762
  const innerChild = getInnerChild$1(child);
772
763
  if (!innerChild) return emptyPlaceholder(child);
@@ -964,18 +955,12 @@ function getTransitionRawChildren(children, keepComment = false, parentKey) {
964
955
  if (keyedFragmentCount > 1) for (let i = 0; i < ret.length; i++) ret[i].patchFlag = -2;
965
956
  return ret;
966
957
  }
967
- /**
968
- * dev-only
969
- */
970
- function checkTransitionMode(mode) {}
971
-
972
958
  //#endregion
973
959
  //#region packages/runtime-core/src/apiDefineComponent.ts
974
960
  /* @__NO_SIDE_EFFECTS__ */
975
961
  function defineComponent(options, extraOptions) {
976
962
  return (0, _vue_shared.isFunction)(options) ? (0, _vue_shared.extend)({ name: options.name }, extraOptions, { setup: options }) : options;
977
963
  }
978
-
979
964
  //#endregion
980
965
  //#region packages/runtime-core/src/helpers/useId.ts
981
966
  function useId() {
@@ -996,7 +981,6 @@ function markAsyncBoundary(instance) {
996
981
  0
997
982
  ];
998
983
  }
999
-
1000
984
  //#endregion
1001
985
  //#region packages/runtime-core/src/helpers/useTemplateRef.ts
1002
986
  function useTemplateRef(key) {
@@ -1016,7 +1000,6 @@ function isTemplateRefKey(refs, key) {
1016
1000
  let desc;
1017
1001
  return !!((desc = Object.getOwnPropertyDescriptor(refs, key)) && !desc.configurable);
1018
1002
  }
1019
-
1020
1003
  //#endregion
1021
1004
  //#region packages/runtime-core/src/rendererTemplateRef.ts
1022
1005
  const pendingSetRefMap = /* @__PURE__ */ new WeakMap();
@@ -1108,20 +1091,12 @@ function invalidatePendingSetRef(rawRef) {
1108
1091
  pendingSetRefMap.delete(rawRef);
1109
1092
  }
1110
1093
  }
1111
-
1112
1094
  //#endregion
1113
1095
  //#region packages/runtime-core/src/hydration.ts
1114
1096
  let isHydratingEnabled = false;
1115
1097
  function setIsHydratingEnabled(value) {
1116
1098
  isHydratingEnabled = value;
1117
1099
  }
1118
- /**
1119
- * VDOM hydration state.
1120
- * Also used by vapor interop plugin for tree-shaking:
1121
- * In non-hydration builds, this is never set to true, so the logic in
1122
- * vaporInteropImpl's hydrate/hydrateSlot can be tree-shaken.
1123
- */
1124
- let isHydrating = false;
1125
1100
  let hasLoggedMismatchError = false;
1126
1101
  const logMismatchError = () => {
1127
1102
  if (hasLoggedMismatchError) return;
@@ -1146,9 +1121,7 @@ function createHydrationFunctions(rendererInternals) {
1146
1121
  container._vnode = vnode;
1147
1122
  return;
1148
1123
  }
1149
- isHydrating = true;
1150
1124
  hydrateNode(container.firstChild, vnode, null, null, null);
1151
- isHydrating = false;
1152
1125
  flushPostFlushCbs();
1153
1126
  container._vnode = vnode;
1154
1127
  };
@@ -1388,7 +1361,6 @@ function isMismatchAllowed(el, allowedType) {
1388
1361
  return list.includes(MismatchTypeString[allowedType]);
1389
1362
  }
1390
1363
  }
1391
-
1392
1364
  //#endregion
1393
1365
  //#region packages/runtime-core/src/hydrationStrategies.ts
1394
1366
  let requestIdleCallback;
@@ -1477,7 +1449,6 @@ function forEachElement(node, cb) {
1477
1449
  }
1478
1450
  } else cb(node);
1479
1451
  }
1480
-
1481
1452
  //#endregion
1482
1453
  //#region packages/runtime-core/src/apiAsyncComponent.ts
1483
1454
  const isAsyncWrapper = (i) => !!i.type.__asyncLoader;
@@ -1606,11 +1577,10 @@ function performAsyncHydrate(el, instance, hydrate, getResolvedComp, load, hydra
1606
1577
  if (getResolvedComp()) doHydrate();
1607
1578
  else load().then(() => !instance.isUnmounted && doHydrate());
1608
1579
  }
1609
-
1610
1580
  //#endregion
1611
1581
  //#region packages/runtime-core/src/components/KeepAlive.ts
1612
1582
  const isKeepAlive = (vnode) => vnode.type.__isKeepAlive;
1613
- const KeepAliveImpl = {
1583
+ const KeepAlive = {
1614
1584
  name: `KeepAlive`,
1615
1585
  __isKeepAlive: true,
1616
1586
  props: {
@@ -1746,7 +1716,6 @@ const KeepAliveImpl = {
1746
1716
  };
1747
1717
  }
1748
1718
  };
1749
- const KeepAlive = KeepAliveImpl;
1750
1719
  function matches(pattern, name) {
1751
1720
  if ((0, _vue_shared.isArray)(pattern)) return pattern.some((p) => matches(p, name));
1752
1721
  else if ((0, _vue_shared.isString)(pattern)) return pattern.split(",").includes(name);
@@ -1824,7 +1793,6 @@ function deactivate(vnode, container, { m: move }, parentComponent, parentSuspen
1824
1793
  instance.isDeactivated = true;
1825
1794
  }, void 0, parentSuspense);
1826
1795
  }
1827
-
1828
1796
  //#endregion
1829
1797
  //#region packages/runtime-core/src/apiLifecycle.ts
1830
1798
  function injectHook(type, hook, target = currentInstance, prepend = false) {
@@ -1860,23 +1828,19 @@ const onRenderTracked = /* @__PURE__ */ createHook("rtc");
1860
1828
  function onErrorCaptured(hook, target = currentInstance) {
1861
1829
  injectHook("ec", hook, target);
1862
1830
  }
1863
-
1864
- //#endregion
1865
- //#region packages/runtime-core/src/helpers/resolveAssets.ts
1866
- const COMPONENTS = "components";
1867
1831
  const DIRECTIVES = "directives";
1868
1832
  /**
1869
1833
  * @private
1870
1834
  */
1871
1835
  function resolveComponent(name, maybeSelfReference) {
1872
- return resolveAsset(COMPONENTS, name, true, maybeSelfReference) || name;
1836
+ return resolveAsset("components", name, true, maybeSelfReference) || name;
1873
1837
  }
1874
1838
  const NULL_DYNAMIC_COMPONENT = Symbol.for("v-ndc");
1875
1839
  /**
1876
1840
  * @private
1877
1841
  */
1878
1842
  function resolveDynamicComponent(component) {
1879
- if ((0, _vue_shared.isString)(component)) return resolveAsset(COMPONENTS, component, false) || component;
1843
+ if ((0, _vue_shared.isString)(component)) return resolveAsset("components", component, false) || component;
1880
1844
  else return component || NULL_DYNAMIC_COMPONENT;
1881
1845
  }
1882
1846
  /**
@@ -1889,7 +1853,7 @@ function resolveAsset(type, name, warnMissing = true, maybeSelfReference = false
1889
1853
  const instance = currentRenderingInstance || currentInstance;
1890
1854
  if (instance) {
1891
1855
  const Component = instance.type;
1892
- if (type === COMPONENTS) {
1856
+ if (type === "components") {
1893
1857
  const selfName = getComponentName(Component, false);
1894
1858
  if (selfName && (selfName === name || selfName === (0, _vue_shared.camelize)(name) || selfName === (0, _vue_shared.capitalize)((0, _vue_shared.camelize)(name)))) return Component;
1895
1859
  }
@@ -1901,7 +1865,6 @@ function resolveAsset(type, name, warnMissing = true, maybeSelfReference = false
1901
1865
  function resolve(registry, name) {
1902
1866
  return registry && (registry[name] || registry[(0, _vue_shared.camelize)(name)] || registry[(0, _vue_shared.capitalize)((0, _vue_shared.camelize)(name))]);
1903
1867
  }
1904
-
1905
1868
  //#endregion
1906
1869
  //#region packages/runtime-core/src/helpers/renderList.ts
1907
1870
  /**
@@ -1938,7 +1901,6 @@ function renderList(source, renderItem, cache, index) {
1938
1901
  if (cache) cache[index] = ret;
1939
1902
  return ret;
1940
1903
  }
1941
-
1942
1904
  //#endregion
1943
1905
  //#region packages/runtime-core/src/helpers/createSlots.ts
1944
1906
  /**
@@ -1957,7 +1919,6 @@ function createSlots(slots, dynamicSlots) {
1957
1919
  }
1958
1920
  return slots;
1959
1921
  }
1960
-
1961
1922
  //#endregion
1962
1923
  //#region packages/runtime-core/src/helpers/renderSlot.ts
1963
1924
  /**
@@ -2004,7 +1965,6 @@ function ensureVaporSlotFallback(vnodes, fallback) {
2004
1965
  if (!vaporSlot.fallback && fallback) vaporSlot.fallback = fallback;
2005
1966
  }
2006
1967
  }
2007
-
2008
1968
  //#endregion
2009
1969
  //#region packages/runtime-core/src/helpers/toHandlers.ts
2010
1970
  /**
@@ -2016,7 +1976,6 @@ function toHandlers(obj, preserveCaseIfNecessary) {
2016
1976
  for (const key in obj) ret[preserveCaseIfNecessary && /[A-Z]/.test(key) ? `on:${key}` : (0, _vue_shared.toHandlerKey)(key)] = obj[key];
2017
1977
  return ret;
2018
1978
  }
2019
-
2020
1979
  //#endregion
2021
1980
  //#region packages/runtime-core/src/componentPublicInstance.ts
2022
1981
  /**
@@ -2122,7 +2081,6 @@ const RuntimeCompiledPublicInstanceProxyHandlers = /* @__PURE__ */ (0, _vue_shar
2122
2081
  return key[0] !== "_" && !(0, _vue_shared.isGloballyAllowed)(key);
2123
2082
  }
2124
2083
  });
2125
-
2126
2084
  //#endregion
2127
2085
  //#region packages/runtime-core/src/apiSetupHelpers.ts
2128
2086
  function defineProps() {
@@ -2154,6 +2112,22 @@ function defineExpose(exposed) {}
2154
2112
  * @see {@link https://vuejs.org/api/sfc-script-setup.html#defineoptions}
2155
2113
  */
2156
2114
  function defineOptions(options) {}
2115
+ /**
2116
+ * Vue `<script setup>` compiler macro for providing type hints to IDEs for
2117
+ * slot name and slot props type checking.
2118
+ *
2119
+ * Example usage:
2120
+ * ```ts
2121
+ * const slots = defineSlots<{
2122
+ * default(props: { msg: string }): any
2123
+ * }>()
2124
+ * ```
2125
+ *
2126
+ * This is only usable inside `<script setup>`, is compiled away in the
2127
+ * output and should **not** be actually called at runtime.
2128
+ *
2129
+ * @see {@link https://vuejs.org/api/sfc-script-setup.html#defineslots}
2130
+ */
2157
2131
  function defineSlots() {
2158
2132
  return null;
2159
2133
  }
@@ -2264,20 +2238,28 @@ function createPropsRestProxy(props, excludedKeys) {
2264
2238
  */
2265
2239
  function withAsyncContext(getAwaitable) {
2266
2240
  const ctx = getCurrentGenericInstance();
2241
+ const inSSRSetup = isInSSRComponentSetup;
2267
2242
  let awaitable = getAwaitable();
2268
2243
  setCurrentInstance(null, void 0);
2269
- const cleanup = () => setCurrentInstance(null, void 0);
2270
- if ((0, _vue_shared.isPromise)(awaitable)) awaitable = awaitable.catch((e) => {
2244
+ if (inSSRSetup) setInSSRSetupState(false);
2245
+ const restore = () => {
2271
2246
  setCurrentInstance(ctx);
2247
+ if (inSSRSetup) setInSSRSetupState(true);
2248
+ };
2249
+ const cleanup = () => {
2250
+ setCurrentInstance(null, void 0);
2251
+ if (inSSRSetup) setInSSRSetupState(false);
2252
+ };
2253
+ if ((0, _vue_shared.isPromise)(awaitable)) awaitable = awaitable.catch((e) => {
2254
+ restore();
2272
2255
  Promise.resolve().then(() => Promise.resolve().then(cleanup));
2273
2256
  throw e;
2274
2257
  });
2275
2258
  return [awaitable, () => {
2276
- setCurrentInstance(ctx);
2259
+ restore();
2277
2260
  Promise.resolve().then(cleanup);
2278
2261
  }];
2279
2262
  }
2280
-
2281
2263
  //#endregion
2282
2264
  //#region packages/runtime-core/src/componentOptions.ts
2283
2265
  let shouldCacheAccess = true;
@@ -2480,7 +2462,6 @@ function mergeWatchOptions(to, from) {
2480
2462
  for (const key in from) merged[key] = mergeAsArray(to[key], from[key]);
2481
2463
  return merged;
2482
2464
  }
2483
-
2484
2465
  //#endregion
2485
2466
  //#region packages/runtime-core/src/apiCreateApp.ts
2486
2467
  function createAppContext() {
@@ -2593,7 +2574,6 @@ function createAppAPI(mount, unmount, getPublicInstance, render) {
2593
2574
  * `app.runWithContext()`.
2594
2575
  */
2595
2576
  let currentApp = null;
2596
-
2597
2577
  //#endregion
2598
2578
  //#region packages/runtime-core/src/helpers/useModel.ts
2599
2579
  function useModel(props, name, options = _vue_shared.EMPTY_OBJ) {
@@ -2658,7 +2638,6 @@ function useModel(props, name, options = _vue_shared.EMPTY_OBJ) {
2658
2638
  const getModelModifiers = (props, modelName, getter) => {
2659
2639
  return getter(props, (0, _vue_shared.getModifierPropName)(modelName)) || getter(props, `${(0, _vue_shared.camelize)(modelName)}Modifiers`) || getter(props, `${(0, _vue_shared.hyphenate)(modelName)}Modifiers`);
2660
2640
  };
2661
-
2662
2641
  //#endregion
2663
2642
  //#region packages/runtime-core/src/componentEmits.ts
2664
2643
  function emit(instance, event, ...rawArgs) {
@@ -2732,7 +2711,6 @@ function isEmitListener(options, key) {
2732
2711
  key = key.slice(2).replace(/Once$/, "");
2733
2712
  return (0, _vue_shared.hasOwn)(options, key[0].toLowerCase() + key.slice(1)) || (0, _vue_shared.hasOwn)(options, (0, _vue_shared.hyphenate)(key)) || (0, _vue_shared.hasOwn)(options, key);
2734
2713
  }
2735
-
2736
2714
  //#endregion
2737
2715
  //#region packages/runtime-core/src/componentRenderUtils.ts
2738
2716
  function renderComponentRoot(instance) {
@@ -2844,17 +2822,20 @@ function hasPropValueChanged(nextProps, prevProps, key) {
2844
2822
  if (key === "style" && (0, _vue_shared.isObject)(nextProp) && (0, _vue_shared.isObject)(prevProp)) return !(0, _vue_shared.looseEqual)(nextProp, prevProp);
2845
2823
  return nextProp !== prevProp;
2846
2824
  }
2847
- function updateHOCHostEl({ vnode, parent }, el) {
2825
+ function updateHOCHostEl({ vnode, parent, suspense }, el) {
2848
2826
  while (parent && !parent.vapor) {
2849
2827
  const root = parent.subTree;
2850
- if (root.suspense && root.suspense.activeBranch === vnode) root.el = vnode.el;
2828
+ if (root.suspense && root.suspense.activeBranch === vnode) {
2829
+ root.suspense.vnode.el = root.el = el;
2830
+ vnode = root;
2831
+ }
2851
2832
  if (root === vnode) {
2852
2833
  (vnode = parent.vnode).el = el;
2853
2834
  parent = parent.parent;
2854
2835
  } else break;
2855
2836
  }
2837
+ if (suspense && suspense.activeBranch === vnode) suspense.vnode.el = el;
2856
2838
  }
2857
-
2858
2839
  //#endregion
2859
2840
  //#region packages/runtime-core/src/internalObject.ts
2860
2841
  /**
@@ -2866,7 +2847,6 @@ function updateHOCHostEl({ vnode, parent }, el) {
2866
2847
  const internalObjectProto = {};
2867
2848
  const createInternalObject = () => Object.create(internalObjectProto);
2868
2849
  const isInternalObject = (obj) => Object.getPrototypeOf(obj) === internalObjectProto;
2869
-
2870
2850
  //#endregion
2871
2851
  //#region packages/runtime-core/src/componentProps.ts
2872
2852
  function initProps(instance, rawProps, isStateful, isSSR = false) {
@@ -3046,7 +3026,6 @@ function validatePropName(key) {
3046
3026
  if (key[0] !== "$" && !(0, _vue_shared.isReservedProp)(key)) return true;
3047
3027
  return false;
3048
3028
  }
3049
-
3050
3029
  //#endregion
3051
3030
  //#region packages/runtime-core/src/componentSlots.ts
3052
3031
  const isInternalKey = (key) => key === "_" || key === "_ctx" || key === "$stable";
@@ -3109,7 +3088,6 @@ const updateSlots = (instance, children, optimized) => {
3109
3088
  for (const key in slots) if (!isInternalKey(key) && deletionComparisonTarget[key] == null) delete slots[key];
3110
3089
  }
3111
3090
  };
3112
-
3113
3091
  //#endregion
3114
3092
  //#region packages/runtime-core/src/renderer.ts
3115
3093
  const MoveType = {
@@ -3255,8 +3233,10 @@ function baseCreateRenderer(options, createHydrationFns) {
3255
3233
  if (transition) performTransitionEnter(el, transition, () => hostInsert(el, container, anchor), parentSuspense);
3256
3234
  else hostInsert(el, container, anchor);
3257
3235
  if ((vnodeHook = props && props.onVnodeMounted) || dirs) queuePostRenderEffect(() => {
3258
- vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode);
3259
- dirs && invokeDirectiveHook(vnode, null, parentComponent, "mounted");
3236
+ try {
3237
+ vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode);
3238
+ dirs && invokeDirectiveHook(vnode, null, parentComponent, "mounted");
3239
+ } finally {}
3260
3240
  }, void 0, parentSuspense);
3261
3241
  };
3262
3242
  const setScopeId = (el, vnode, scopeId, slotScopeIds, parentComponent) => {
@@ -3448,7 +3428,7 @@ function baseCreateRenderer(options, createHydrationFns) {
3448
3428
  if (isAsyncWrapperVNode && type.__asyncHydrate) type.__asyncHydrate(el, instance, hydrateSubTree);
3449
3429
  else hydrateSubTree();
3450
3430
  } else {
3451
- if (root.ce && root.ce._hasShadowRoot()) root.ce._injectChildStyle(type);
3431
+ if (root.ce && root.ce._hasShadowRoot()) root.ce._injectChildStyle(type, instance.parent ? instance.parent.type : void 0);
3452
3432
  const subTree = instance.subTree = renderComponentRoot(instance);
3453
3433
  patch(null, subTree, container, anchor, instance, parentSuspense, namespace);
3454
3434
  initialVNode.el = subTree.el;
@@ -3684,7 +3664,7 @@ function baseCreateRenderer(options, createHydrationFns) {
3684
3664
  else hostInsert(el, container, anchor);
3685
3665
  };
3686
3666
  const unmount = (vnode, parentComponent, parentSuspense, doRemove = false, optimized = false) => {
3687
- const { type, props, ref, children, dynamicChildren, shapeFlag, patchFlag, dirs, cacheIndex } = vnode;
3667
+ const { type, props, ref, children, dynamicChildren, shapeFlag, patchFlag, dirs, cacheIndex, memo } = vnode;
3688
3668
  if (patchFlag === -2) optimized = false;
3689
3669
  if (ref != null) {
3690
3670
  const prevSub = (0, _vue_reactivity.setActiveSub)();
@@ -3722,9 +3702,11 @@ function baseCreateRenderer(options, createHydrationFns) {
3722
3702
  }
3723
3703
  if (doRemove) remove(vnode);
3724
3704
  }
3725
- if (shouldInvokeVnodeHook && (vnodeHook = props && props.onVnodeUnmounted) || shouldInvokeDirs) queuePostRenderEffect(() => {
3705
+ const shouldInvalidateMemo = memo != null && cacheIndex == null;
3706
+ if (shouldInvokeVnodeHook && (vnodeHook = props && props.onVnodeUnmounted) || shouldInvokeDirs || shouldInvalidateMemo) queuePostRenderEffect(() => {
3726
3707
  vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode);
3727
3708
  shouldInvokeDirs && invokeDirectiveHook(vnode, null, parentComponent, "unmounted");
3709
+ if (shouldInvalidateMemo) vnode.el = null;
3728
3710
  }, void 0, parentSuspense);
3729
3711
  };
3730
3712
  const remove = (vnode) => {
@@ -3931,12 +3913,11 @@ function resolveAsyncComponentPlaceholder(anchorVnode) {
3931
3913
  if (instance) return resolveAsyncComponentPlaceholder(instance.subTree);
3932
3914
  return null;
3933
3915
  }
3934
-
3935
3916
  //#endregion
3936
3917
  //#region packages/runtime-core/src/components/Suspense.ts
3937
3918
  const isSuspense = (type) => type.__isSuspense;
3938
3919
  let suspenseId = 0;
3939
- const SuspenseImpl = {
3920
+ const Suspense = {
3940
3921
  name: "Suspense",
3941
3922
  __isSuspense: true,
3942
3923
  process(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals) {
@@ -3954,7 +3935,6 @@ const SuspenseImpl = {
3954
3935
  hydrate: hydrateSuspense,
3955
3936
  normalize: normalizeSuspenseChildren
3956
3937
  };
3957
- const Suspense = SuspenseImpl;
3958
3938
  function triggerEvent(vnode, name) {
3959
3939
  const eventListener = vnode.props && vnode.props[name];
3960
3940
  if ((0, _vue_shared.isFunction)(eventListener)) eventListener();
@@ -4056,6 +4036,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
4056
4036
  pendingId: suspenseId++,
4057
4037
  timeout: typeof timeout === "number" ? timeout : -1,
4058
4038
  activeBranch: null,
4039
+ isFallbackMountPending: false,
4059
4040
  pendingBranch: null,
4060
4041
  isInFallback: !isHydrating,
4061
4042
  isHydrating,
@@ -4074,13 +4055,14 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
4074
4055
  if (isInFallback && vnode.ssFallback) vnode.ssFallback.el = null;
4075
4056
  }
4076
4057
  };
4077
- if (activeBranch) {
4058
+ if (activeBranch && !suspense.isFallbackMountPending) {
4078
4059
  if (parentNode(activeBranch.el) === container) anchor = next(activeBranch);
4079
4060
  unmount(activeBranch, parentComponent, suspense, true);
4080
4061
  if (!delayEnter && isInFallback && vnode.ssFallback) queuePostRenderEffect(() => vnode.ssFallback.el = null, void 0, suspense);
4081
4062
  }
4082
4063
  if (!delayEnter) move(pendingBranch, container, anchor, 0, parentComponent);
4083
4064
  }
4065
+ suspense.isFallbackMountPending = false;
4084
4066
  setActiveBranch(suspense, pendingBranch);
4085
4067
  suspense.pendingBranch = null;
4086
4068
  suspense.isInFallback = false;
@@ -4110,12 +4092,16 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
4110
4092
  triggerEvent(vnode, "onFallback");
4111
4093
  const anchor = next(activeBranch);
4112
4094
  const mountFallback = () => {
4095
+ suspense.isFallbackMountPending = false;
4113
4096
  if (!suspense.isInFallback) return;
4114
4097
  patch(null, fallbackVNode, container, anchor, parentComponent, null, namespace, slotScopeIds, optimized);
4115
4098
  setActiveBranch(suspense, fallbackVNode);
4116
4099
  };
4117
4100
  const delayEnter = fallbackVNode.transition && fallbackVNode.transition.mode === "out-in";
4118
- if (delayEnter) activeBranch.transition.afterLeave = mountFallback;
4101
+ if (delayEnter) {
4102
+ suspense.isFallbackMountPending = true;
4103
+ activeBranch.transition.afterLeave = mountFallback;
4104
+ }
4119
4105
  suspense.isInFallback = true;
4120
4106
  unmount(activeBranch, parentComponent, null, true);
4121
4107
  if (!delayEnter) mountFallback();
@@ -4202,7 +4188,6 @@ function isVNodeSuspensible(vnode) {
4202
4188
  const suspensible = vnode.props && vnode.props.suspensible;
4203
4189
  return suspensible != null && suspensible !== false;
4204
4190
  }
4205
-
4206
4191
  //#endregion
4207
4192
  //#region packages/runtime-core/src/vnode.ts
4208
4193
  const Fragment = Symbol.for("v-fgt");
@@ -4482,6 +4467,7 @@ function mergeProps(...args) {
4482
4467
  const existing = ret[key];
4483
4468
  const incoming = toMerge[key];
4484
4469
  if (incoming && existing !== incoming && !((0, _vue_shared.isArray)(existing) && existing.includes(incoming))) ret[key] = existing ? [].concat(existing, incoming) : incoming;
4470
+ else if (incoming == null && existing == null && !(0, _vue_shared.isModelListener)(key)) ret[key] = incoming;
4485
4471
  } else if (key !== "") ret[key] = toMerge[key];
4486
4472
  }
4487
4473
  return ret;
@@ -4489,7 +4475,6 @@ function mergeProps(...args) {
4489
4475
  function invokeVNodeHook(hook, instance, vnode, prevVNode = null) {
4490
4476
  callWithAsyncErrorHandling(hook, instance, 7, [vnode, prevVNode]);
4491
4477
  }
4492
-
4493
4478
  //#endregion
4494
4479
  //#region packages/runtime-core/src/componentCurrentInstance.ts
4495
4480
  /**
@@ -4551,7 +4536,6 @@ const useInstanceOption = (key, silent = false) => {
4551
4536
  value: instance[key]
4552
4537
  };
4553
4538
  };
4554
-
4555
4539
  //#endregion
4556
4540
  //#region packages/runtime-core/src/component.ts
4557
4541
  const emptyAppContext = /* @__PURE__ */ createAppContext();
@@ -4761,13 +4745,11 @@ function getComponentName(Component, includeInferred = true) {
4761
4745
  function isClassComponent(value) {
4762
4746
  return (0, _vue_shared.isFunction)(value) && "__vccOpts" in value;
4763
4747
  }
4764
-
4765
4748
  //#endregion
4766
4749
  //#region packages/runtime-core/src/apiComputed.ts
4767
4750
  const computed = (getterOrOptions, debugOptions) => {
4768
4751
  return (0, _vue_reactivity.computed)(getterOrOptions, debugOptions, isInSSRComponentSetup);
4769
4752
  };
4770
-
4771
4753
  //#endregion
4772
4754
  //#region packages/runtime-core/src/h.ts
4773
4755
  function h(type, propsOrChildren, children) {
@@ -4787,7 +4769,6 @@ function h(type, propsOrChildren, children) {
4787
4769
  setBlockTracking(1);
4788
4770
  }
4789
4771
  }
4790
-
4791
4772
  //#endregion
4792
4773
  //#region packages/runtime-core/src/customFormatter.ts
4793
4774
  function initCustomFormatter() {
@@ -4799,7 +4780,6 @@ function initCustomFormatter() {
4799
4780
  if (Comp.mixins && Comp.mixins.some((m) => isKeyOfType(m, key, type))) return true;
4800
4781
  }
4801
4782
  }
4802
-
4803
4783
  //#endregion
4804
4784
  //#region packages/runtime-core/src/helpers/withMemo.ts
4805
4785
  function withMemo(memo, render, cache, index) {
@@ -4817,10 +4797,9 @@ function isMemoSame(cached, memo) {
4817
4797
  if (isBlockTreeEnabled > 0 && currentBlock) currentBlock.push(cached);
4818
4798
  return true;
4819
4799
  }
4820
-
4821
4800
  //#endregion
4822
4801
  //#region packages/runtime-core/src/index.ts
4823
- const version = "3.6.0-beta.7";
4802
+ const version = "3.6.0-beta.9";
4824
4803
  const warn = _vue_shared.NOOP;
4825
4804
  /**
4826
4805
  * Runtime error messages. Only exposed in dev or esm builds.
@@ -4829,7 +4808,11 @@ const warn = _vue_shared.NOOP;
4829
4808
  const ErrorTypeStrings = ErrorTypeStrings$1;
4830
4809
  const devtools = void 0;
4831
4810
  const setDevtoolsHook = _vue_shared.NOOP;
4832
- const _ssrUtils = {
4811
+ /**
4812
+ * SSR utils for \@vue/server-renderer. Only exposed in ssr-possible builds.
4813
+ * @internal
4814
+ */
4815
+ const ssrUtils = {
4833
4816
  createComponentInstance,
4834
4817
  setupComponent,
4835
4818
  renderComponentRoot,
@@ -4842,11 +4825,6 @@ const _ssrUtils = {
4842
4825
  popWarningContext
4843
4826
  };
4844
4827
  /**
4845
- * SSR utils for \@vue/server-renderer. Only exposed in ssr-possible builds.
4846
- * @internal
4847
- */
4848
- const ssrUtils = _ssrUtils;
4849
- /**
4850
4828
  * @internal only exposed in compat builds
4851
4829
  */
4852
4830
  const resolveFilter = null;
@@ -4855,7 +4833,6 @@ const resolveFilter = null;
4855
4833
  */
4856
4834
  const compatUtils = null;
4857
4835
  const DeprecationTypes = null;
4858
-
4859
4836
  //#endregion
4860
4837
  exports.BaseTransition = BaseTransition;
4861
4838
  exports.BaseTransitionPropsValidators = BaseTransitionPropsValidators;
@@ -5006,4 +4983,4 @@ exports.withCtx = withCtx;
5006
4983
  exports.withDefaults = withDefaults;
5007
4984
  exports.withDirectives = withDirectives;
5008
4985
  exports.withMemo = withMemo;
5009
- exports.withScopeId = withScopeId;
4986
+ exports.withScopeId = withScopeId;