@vue/runtime-dom 3.3.0-alpha.9 → 3.3.0-beta.1

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.
@@ -97,7 +97,7 @@ const getGlobalThis = () => {
97
97
  return _globalThis || (_globalThis = typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : {});
98
98
  };
99
99
 
100
- const GLOBALS_WHITE_LISTED = "Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt";
100
+ const GLOBALS_WHITE_LISTED = "Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console";
101
101
  const isGloballyWhitelisted = /* @__PURE__ */ makeMap(GLOBALS_WHITE_LISTED);
102
102
 
103
103
  function normalizeStyle(value) {
@@ -1856,6 +1856,8 @@ function reload(id, newComp) {
1856
1856
  }
1857
1857
  hmrDirtyComponents.add(oldComp);
1858
1858
  }
1859
+ instance.appContext.propsCache.delete(instance.type);
1860
+ instance.appContext.emitsCache.delete(instance.type);
1859
1861
  instance.appContext.optionsCache.delete(instance.type);
1860
1862
  if (instance.ceReload) {
1861
1863
  hmrDirtyComponents.add(oldComp);
@@ -2698,7 +2700,8 @@ function patchSuspense(n1, n2, container, anchor, parentComponent, isSVG, slotSc
2698
2700
  }
2699
2701
  }
2700
2702
  let hasWarned = false;
2701
- function createSuspenseBoundary(vnode, parent, parentComponent, container, hiddenContainer, anchor, isSVG, slotScopeIds, optimized, rendererInternals, isHydrating = false) {
2703
+ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, container, hiddenContainer, anchor, isSVG, slotScopeIds, optimized, rendererInternals, isHydrating = false) {
2704
+ var _a;
2702
2705
  if (!hasWarned) {
2703
2706
  hasWarned = true;
2704
2707
  console[console.info ? "info" : "log"](
@@ -2712,13 +2715,21 @@ function createSuspenseBoundary(vnode, parent, parentComponent, container, hidde
2712
2715
  n: next,
2713
2716
  o: { parentNode, remove }
2714
2717
  } = rendererInternals;
2718
+ let parentSuspenseId;
2719
+ const isSuspensible = ((_a = vnode.props) == null ? void 0 : _a.suspensible) != null && vnode.props.suspensible !== false;
2720
+ if (isSuspensible) {
2721
+ if (parentSuspense == null ? void 0 : parentSuspense.pendingBranch) {
2722
+ parentSuspenseId = parentSuspense == null ? void 0 : parentSuspense.pendingId;
2723
+ parentSuspense.deps++;
2724
+ }
2725
+ }
2715
2726
  const timeout = vnode.props ? toNumber(vnode.props.timeout) : void 0;
2716
2727
  {
2717
2728
  assertNumber(timeout, `Suspense timeout`);
2718
2729
  }
2719
2730
  const suspense = {
2720
2731
  vnode,
2721
- parent,
2732
+ parent: parentSuspense,
2722
2733
  parentComponent,
2723
2734
  isSVG,
2724
2735
  container,
@@ -2778,20 +2789,28 @@ function createSuspenseBoundary(vnode, parent, parentComponent, container, hidde
2778
2789
  setActiveBranch(suspense, pendingBranch);
2779
2790
  suspense.pendingBranch = null;
2780
2791
  suspense.isInFallback = false;
2781
- let parent2 = suspense.parent;
2792
+ let parent = suspense.parent;
2782
2793
  let hasUnresolvedAncestor = false;
2783
- while (parent2) {
2784
- if (parent2.pendingBranch) {
2785
- parent2.effects.push(...effects);
2794
+ while (parent) {
2795
+ if (parent.pendingBranch) {
2796
+ parent.effects.push(...effects);
2786
2797
  hasUnresolvedAncestor = true;
2787
2798
  break;
2788
2799
  }
2789
- parent2 = parent2.parent;
2800
+ parent = parent.parent;
2790
2801
  }
2791
2802
  if (!hasUnresolvedAncestor) {
2792
2803
  queuePostFlushCb(effects);
2793
2804
  }
2794
2805
  suspense.effects = [];
2806
+ if (isSuspensible) {
2807
+ if (parentSuspense && parentSuspense.pendingBranch && parentSuspenseId === parentSuspense.pendingId) {
2808
+ parentSuspense.deps--;
2809
+ if (parentSuspense.deps === 0) {
2810
+ parentSuspense.resolve();
2811
+ }
2812
+ }
2813
+ }
2795
2814
  triggerEvent(vnode2, "onResolve");
2796
2815
  },
2797
2816
  fallback(fallbackVNode) {
@@ -2891,13 +2910,13 @@ function createSuspenseBoundary(vnode, parent, parentComponent, container, hidde
2891
2910
  }
2892
2911
  });
2893
2912
  },
2894
- unmount(parentSuspense, doRemove) {
2913
+ unmount(parentSuspense2, doRemove) {
2895
2914
  suspense.isUnmounted = true;
2896
2915
  if (suspense.activeBranch) {
2897
2916
  unmount(
2898
2917
  suspense.activeBranch,
2899
2918
  parentComponent,
2900
- parentSuspense,
2919
+ parentSuspense2,
2901
2920
  doRemove
2902
2921
  );
2903
2922
  }
@@ -2905,7 +2924,7 @@ function createSuspenseBoundary(vnode, parent, parentComponent, container, hidde
2905
2924
  unmount(
2906
2925
  suspense.pendingBranch,
2907
2926
  parentComponent,
2908
- parentSuspense,
2927
+ parentSuspense2,
2909
2928
  doRemove
2910
2929
  );
2911
2930
  }
@@ -4287,6 +4306,8 @@ const PublicInstanceProxyHandlers = {
4287
4306
  if (key === "$attrs") {
4288
4307
  track(instance, "get", key);
4289
4308
  markAttrsAccessed();
4309
+ } else if (key === "$slots") {
4310
+ track(instance, "get", key);
4290
4311
  }
4291
4312
  return publicGetter(instance);
4292
4313
  } else if (
@@ -4456,6 +4477,161 @@ function exposeSetupStateOnRenderContext(instance) {
4456
4477
  });
4457
4478
  }
4458
4479
 
4480
+ const warnRuntimeUsage = (method) => warn(
4481
+ `${method}() is a compiler-hint helper that is only usable inside <script setup> of a single file component. Its arguments should be compiled away and passing it at runtime has no effect.`
4482
+ );
4483
+ function defineProps() {
4484
+ {
4485
+ warnRuntimeUsage(`defineProps`);
4486
+ }
4487
+ return null;
4488
+ }
4489
+ function defineEmits() {
4490
+ {
4491
+ warnRuntimeUsage(`defineEmits`);
4492
+ }
4493
+ return null;
4494
+ }
4495
+ function defineExpose(exposed) {
4496
+ {
4497
+ warnRuntimeUsage(`defineExpose`);
4498
+ }
4499
+ }
4500
+ function defineOptions(options) {
4501
+ {
4502
+ warnRuntimeUsage(`defineOptions`);
4503
+ }
4504
+ }
4505
+ function defineSlots() {
4506
+ {
4507
+ warnRuntimeUsage(`defineSlots`);
4508
+ }
4509
+ return null;
4510
+ }
4511
+ function defineModel() {
4512
+ {
4513
+ warnRuntimeUsage("defineModel");
4514
+ }
4515
+ }
4516
+ function withDefaults(props, defaults) {
4517
+ {
4518
+ warnRuntimeUsage(`withDefaults`);
4519
+ }
4520
+ return null;
4521
+ }
4522
+ function useSlots() {
4523
+ return getContext().slots;
4524
+ }
4525
+ function useAttrs() {
4526
+ return getContext().attrs;
4527
+ }
4528
+ function useModel(props, name, options) {
4529
+ const i = getCurrentInstance();
4530
+ if (!i) {
4531
+ warn(`useModel() called without active instance.`);
4532
+ return ref();
4533
+ }
4534
+ if (!i.propsOptions[0][name]) {
4535
+ warn(`useModel() called with prop "${name}" which is not declared.`);
4536
+ return ref();
4537
+ }
4538
+ if (options && options.local) {
4539
+ const proxy = ref(props[name]);
4540
+ watch(
4541
+ () => props[name],
4542
+ (v) => proxy.value = v
4543
+ );
4544
+ watch(proxy, (value) => {
4545
+ if (value !== props[name]) {
4546
+ i.emit(`update:${name}`, value);
4547
+ }
4548
+ });
4549
+ return proxy;
4550
+ } else {
4551
+ return {
4552
+ __v_isRef: true,
4553
+ get value() {
4554
+ return props[name];
4555
+ },
4556
+ set value(value) {
4557
+ i.emit(`update:${name}`, value);
4558
+ }
4559
+ };
4560
+ }
4561
+ }
4562
+ function getContext() {
4563
+ const i = getCurrentInstance();
4564
+ if (!i) {
4565
+ warn(`useContext() called without active instance.`);
4566
+ }
4567
+ return i.setupContext || (i.setupContext = createSetupContext(i));
4568
+ }
4569
+ function normalizePropsOrEmits(props) {
4570
+ return isArray(props) ? props.reduce(
4571
+ (normalized, p) => (normalized[p] = null, normalized),
4572
+ {}
4573
+ ) : props;
4574
+ }
4575
+ function mergeDefaults(raw, defaults) {
4576
+ const props = normalizePropsOrEmits(raw);
4577
+ for (const key in defaults) {
4578
+ if (key.startsWith("__skip"))
4579
+ continue;
4580
+ let opt = props[key];
4581
+ if (opt) {
4582
+ if (isArray(opt) || isFunction(opt)) {
4583
+ opt = props[key] = { type: opt, default: defaults[key] };
4584
+ } else {
4585
+ opt.default = defaults[key];
4586
+ }
4587
+ } else if (opt === null) {
4588
+ opt = props[key] = { default: defaults[key] };
4589
+ } else {
4590
+ warn(`props default key "${key}" has no corresponding declaration.`);
4591
+ }
4592
+ if (opt && defaults[`__skip_${key}`]) {
4593
+ opt.skipFactory = true;
4594
+ }
4595
+ }
4596
+ return props;
4597
+ }
4598
+ function mergeModels(a, b) {
4599
+ if (!a || !b)
4600
+ return a || b;
4601
+ if (isArray(a) && isArray(b))
4602
+ return a.concat(b);
4603
+ return extend({}, normalizePropsOrEmits(a), normalizePropsOrEmits(b));
4604
+ }
4605
+ function createPropsRestProxy(props, excludedKeys) {
4606
+ const ret = {};
4607
+ for (const key in props) {
4608
+ if (!excludedKeys.includes(key)) {
4609
+ Object.defineProperty(ret, key, {
4610
+ enumerable: true,
4611
+ get: () => props[key]
4612
+ });
4613
+ }
4614
+ }
4615
+ return ret;
4616
+ }
4617
+ function withAsyncContext(getAwaitable) {
4618
+ const ctx = getCurrentInstance();
4619
+ if (!ctx) {
4620
+ warn(
4621
+ `withAsyncContext called without active current instance. This is likely a bug.`
4622
+ );
4623
+ }
4624
+ let awaitable = getAwaitable();
4625
+ unsetCurrentInstance();
4626
+ if (isPromise(awaitable)) {
4627
+ awaitable = awaitable.catch((e) => {
4628
+ setCurrentInstance(ctx);
4629
+ throw e;
4630
+ });
4631
+ }
4632
+ return [awaitable, () => setCurrentInstance(ctx)];
4633
+ }
4634
+
4459
4635
  function createDuplicateChecker() {
4460
4636
  const cache = /* @__PURE__ */ Object.create(null);
4461
4637
  return (type, key) => {
@@ -4518,12 +4694,7 @@ function applyOptions(instance) {
4518
4694
  }
4519
4695
  }
4520
4696
  if (injectOptions) {
4521
- resolveInjections(
4522
- injectOptions,
4523
- ctx,
4524
- checkDuplicateProperties,
4525
- instance.appContext.config.unwrapInjectedRef
4526
- );
4697
+ resolveInjections(injectOptions, ctx, checkDuplicateProperties);
4527
4698
  }
4528
4699
  if (methods) {
4529
4700
  for (const key in methods) {
@@ -4663,7 +4834,7 @@ function applyOptions(instance) {
4663
4834
  if (directives)
4664
4835
  instance.directives = directives;
4665
4836
  }
4666
- function resolveInjections(injectOptions, ctx, checkDuplicateProperties = NOOP, unwrapRef = false) {
4837
+ function resolveInjections(injectOptions, ctx, checkDuplicateProperties = NOOP) {
4667
4838
  if (isArray(injectOptions)) {
4668
4839
  injectOptions = normalizeInject(injectOptions);
4669
4840
  }
@@ -4685,21 +4856,12 @@ function resolveInjections(injectOptions, ctx, checkDuplicateProperties = NOOP,
4685
4856
  injected = inject(opt);
4686
4857
  }
4687
4858
  if (isRef(injected)) {
4688
- if (unwrapRef) {
4689
- Object.defineProperty(ctx, key, {
4690
- enumerable: true,
4691
- configurable: true,
4692
- get: () => injected.value,
4693
- set: (v) => injected.value = v
4694
- });
4695
- } else {
4696
- {
4697
- warn(
4698
- `injected property "${key}" is a ref and will be auto-unwrapped and no longer needs \`.value\` in the next minor release. To opt-in to the new behavior now, set \`app.config.unwrapInjectedRef = true\` (this config is temporary and will not be needed in the future.)`
4699
- );
4700
- }
4701
- ctx[key] = injected;
4702
- }
4859
+ Object.defineProperty(ctx, key, {
4860
+ enumerable: true,
4861
+ configurable: true,
4862
+ get: () => injected.value,
4863
+ set: (v) => injected.value = v
4864
+ });
4703
4865
  } else {
4704
4866
  ctx[key] = injected;
4705
4867
  }
@@ -4795,10 +4957,8 @@ function mergeOptions(to, from, strats, asMixin = false) {
4795
4957
  }
4796
4958
  const internalOptionMergeStrats = {
4797
4959
  data: mergeDataFn,
4798
- props: mergeObjectOptions,
4799
- // TODO
4800
- emits: mergeObjectOptions,
4801
- // TODO
4960
+ props: mergeEmitsOrPropsOptions,
4961
+ emits: mergeEmitsOrPropsOptions,
4802
4962
  // objects
4803
4963
  methods: mergeObjectOptions,
4804
4964
  computed: mergeObjectOptions,
@@ -4857,7 +5017,21 @@ function mergeAsArray(to, from) {
4857
5017
  return to ? [...new Set([].concat(to, from))] : from;
4858
5018
  }
4859
5019
  function mergeObjectOptions(to, from) {
4860
- return to ? extend(extend(/* @__PURE__ */ Object.create(null), to), from) : from;
5020
+ return to ? extend(/* @__PURE__ */ Object.create(null), to, from) : from;
5021
+ }
5022
+ function mergeEmitsOrPropsOptions(to, from) {
5023
+ if (to) {
5024
+ if (isArray(to) && isArray(from)) {
5025
+ return [.../* @__PURE__ */ new Set([...to, ...from])];
5026
+ }
5027
+ return extend(
5028
+ /* @__PURE__ */ Object.create(null),
5029
+ normalizePropsOrEmits(to),
5030
+ normalizePropsOrEmits(from != null ? from : {})
5031
+ );
5032
+ } else {
5033
+ return from;
5034
+ }
4861
5035
  }
4862
5036
  function mergeWatchOptions(to, from) {
4863
5037
  if (!to)
@@ -4903,6 +5077,18 @@ function createAppAPI(render, hydrate) {
4903
5077
  rootProps = null;
4904
5078
  }
4905
5079
  const context = createAppContext();
5080
+ {
5081
+ Object.defineProperty(context.config, "unwrapInjectedRef", {
5082
+ get() {
5083
+ return true;
5084
+ },
5085
+ set() {
5086
+ warn(
5087
+ `app.config.unwrapInjectedRef has been deprecated. 3.3 now alawys unwraps injected refs in Options API.`
5088
+ );
5089
+ }
5090
+ });
5091
+ }
4906
5092
  const installedPlugins = /* @__PURE__ */ new Set();
4907
5093
  let isMounted = false;
4908
5094
  const app = context.app = {
@@ -5079,6 +5265,9 @@ function inject(key, defaultValue, treatDefaultAsFactory = false) {
5079
5265
  warn(`inject() can only be used inside setup() or functional components.`);
5080
5266
  }
5081
5267
  }
5268
+ function hasInjectionContext() {
5269
+ return !!(currentInstance || currentRenderingInstance || currentApp);
5270
+ }
5082
5271
 
5083
5272
  function initProps(instance, rawProps, isStateful, isSSR = false) {
5084
5273
  const props = {};
@@ -5547,6 +5736,7 @@ const updateSlots = (instance, children, optimized) => {
5547
5736
  if (type) {
5548
5737
  if (isHmrUpdating) {
5549
5738
  extend(slots, children);
5739
+ trigger(instance, "set", "$slots");
5550
5740
  } else if (optimized && type === 1) {
5551
5741
  needDeletionCheck = false;
5552
5742
  } else {
@@ -6475,7 +6665,7 @@ function baseCreateRenderer(options, createHydrationFns) {
6475
6665
  areChildrenSVG,
6476
6666
  slotScopeIds
6477
6667
  );
6478
- if (parentComponent && parentComponent.type.__hmrId) {
6668
+ {
6479
6669
  traverseStaticChildren(n1, n2);
6480
6670
  }
6481
6671
  } else if (!optimized) {
@@ -6671,21 +6861,8 @@ function baseCreateRenderer(options, createHydrationFns) {
6671
6861
  isSVG,
6672
6862
  slotScopeIds
6673
6863
  );
6674
- if (parentComponent && parentComponent.type.__hmrId) {
6864
+ {
6675
6865
  traverseStaticChildren(n1, n2);
6676
- } else if (
6677
- // #2080 if the stable fragment has a key, it's a <template v-for> that may
6678
- // get moved around. Make sure all root level vnodes inherit el.
6679
- // #2134 or if it's a component root, it may also get moved around
6680
- // as the component is being moved.
6681
- n2.key != null || parentComponent && n2 === parentComponent.subTree
6682
- ) {
6683
- traverseStaticChildren(
6684
- n1,
6685
- n2,
6686
- true
6687
- /* shallow */
6688
- );
6689
6866
  }
6690
6867
  } else {
6691
6868
  patchChildren(
@@ -8259,6 +8436,8 @@ function createComponentInstance(vnode, parent, suspense) {
8259
8436
  refs: EMPTY_OBJ,
8260
8437
  setupState: EMPTY_OBJ,
8261
8438
  setupContext: null,
8439
+ attrsProxy: null,
8440
+ slotsProxy: null,
8262
8441
  // suspense related
8263
8442
  suspense,
8264
8443
  suspenseId: suspense ? suspense.pendingId : 0,
@@ -8486,8 +8665,8 @@ function finishComponentSetup(instance, isSSR, skipOptions) {
8486
8665
  }
8487
8666
  }
8488
8667
  }
8489
- function createAttrsProxy(instance) {
8490
- return new Proxy(
8668
+ function getAttrsProxy(instance) {
8669
+ return instance.attrsProxy || (instance.attrsProxy = new Proxy(
8491
8670
  instance.attrs,
8492
8671
  {
8493
8672
  get(target, key) {
@@ -8504,7 +8683,23 @@ function createAttrsProxy(instance) {
8504
8683
  return false;
8505
8684
  }
8506
8685
  }
8507
- );
8686
+ ));
8687
+ }
8688
+ function getSlotsProxy(instance) {
8689
+ return instance.slotsProxy || (instance.slotsProxy = new Proxy(instance.slots, {
8690
+ get(target, key) {
8691
+ track(instance, "get", "$slots");
8692
+ return target[key];
8693
+ },
8694
+ set() {
8695
+ warn(`setupContext.slots is readonly.`);
8696
+ return false;
8697
+ },
8698
+ deleteProperty() {
8699
+ warn(`setupContext.slots is readonly.`);
8700
+ return false;
8701
+ }
8702
+ }));
8508
8703
  }
8509
8704
  function createSetupContext(instance) {
8510
8705
  const expose = (exposed) => {
@@ -8530,14 +8725,13 @@ function createSetupContext(instance) {
8530
8725
  }
8531
8726
  instance.exposed = exposed || {};
8532
8727
  };
8533
- let attrs;
8534
8728
  {
8535
8729
  return Object.freeze({
8536
8730
  get attrs() {
8537
- return attrs || (attrs = createAttrsProxy(instance));
8731
+ return getAttrsProxy(instance);
8538
8732
  },
8539
8733
  get slots() {
8540
- return shallowReadonly(instance.slots);
8734
+ return getSlotsProxy(instance);
8541
8735
  },
8542
8736
  get emit() {
8543
8737
  return (event, ...args) => instance.emit(event, ...args);
@@ -8597,161 +8791,6 @@ const computed = (getterOrOptions, debugOptions) => {
8597
8791
  return computed$1(getterOrOptions, debugOptions, isInSSRComponentSetup);
8598
8792
  };
8599
8793
 
8600
- const warnRuntimeUsage = (method) => warn(
8601
- `${method}() is a compiler-hint helper that is only usable inside <script setup> of a single file component. Its arguments should be compiled away and passing it at runtime has no effect.`
8602
- );
8603
- function defineProps() {
8604
- {
8605
- warnRuntimeUsage(`defineProps`);
8606
- }
8607
- return null;
8608
- }
8609
- function defineEmits() {
8610
- {
8611
- warnRuntimeUsage(`defineEmits`);
8612
- }
8613
- return null;
8614
- }
8615
- function defineExpose(exposed) {
8616
- {
8617
- warnRuntimeUsage(`defineExpose`);
8618
- }
8619
- }
8620
- function defineOptions(options) {
8621
- {
8622
- warnRuntimeUsage(`defineOptions`);
8623
- }
8624
- }
8625
- function defineSlots() {
8626
- {
8627
- warnRuntimeUsage(`defineSlots`);
8628
- }
8629
- return null;
8630
- }
8631
- function defineModel() {
8632
- {
8633
- warnRuntimeUsage("defineModel");
8634
- }
8635
- }
8636
- function withDefaults(props, defaults) {
8637
- {
8638
- warnRuntimeUsage(`withDefaults`);
8639
- }
8640
- return null;
8641
- }
8642
- function useSlots() {
8643
- return getContext().slots;
8644
- }
8645
- function useAttrs() {
8646
- return getContext().attrs;
8647
- }
8648
- function useModel(props, name, options) {
8649
- const i = getCurrentInstance();
8650
- if (!i) {
8651
- warn(`useModel() called without active instance.`);
8652
- return ref();
8653
- }
8654
- if (!i.propsOptions[0][name]) {
8655
- warn(`useModel() called with prop "${name}" which is not declared.`);
8656
- return ref();
8657
- }
8658
- if (options && options.local) {
8659
- const proxy = ref(props[name]);
8660
- watch(
8661
- () => props[name],
8662
- (v) => proxy.value = v
8663
- );
8664
- watch(proxy, (value) => {
8665
- if (value !== props[name]) {
8666
- i.emit(`update:${name}`, value);
8667
- }
8668
- });
8669
- return proxy;
8670
- } else {
8671
- return {
8672
- __v_isRef: true,
8673
- get value() {
8674
- return props[name];
8675
- },
8676
- set value(value) {
8677
- i.emit(`update:${name}`, value);
8678
- }
8679
- };
8680
- }
8681
- }
8682
- function getContext() {
8683
- const i = getCurrentInstance();
8684
- if (!i) {
8685
- warn(`useContext() called without active instance.`);
8686
- }
8687
- return i.setupContext || (i.setupContext = createSetupContext(i));
8688
- }
8689
- function normalizePropsOrEmits(props) {
8690
- return isArray(props) ? props.reduce(
8691
- (normalized, p) => (normalized[p] = {}, normalized),
8692
- {}
8693
- ) : props;
8694
- }
8695
- function mergeDefaults(raw, defaults) {
8696
- const props = normalizePropsOrEmits(raw);
8697
- for (const key in defaults) {
8698
- if (key.startsWith("__skip"))
8699
- continue;
8700
- let opt = props[key];
8701
- if (opt) {
8702
- if (isArray(opt) || isFunction(opt)) {
8703
- opt = props[key] = { type: opt, default: defaults[key] };
8704
- } else {
8705
- opt.default = defaults[key];
8706
- }
8707
- } else if (opt === null) {
8708
- opt = props[key] = { default: defaults[key] };
8709
- } else {
8710
- warn(`props default key "${key}" has no corresponding declaration.`);
8711
- }
8712
- if (opt && defaults[`__skip_${key}`]) {
8713
- opt.skipFactory = true;
8714
- }
8715
- }
8716
- return props;
8717
- }
8718
- function mergeModels(a, b) {
8719
- if (!a || !b)
8720
- return a || b;
8721
- if (isArray(a) && isArray(b))
8722
- return a.concat(b);
8723
- return extend({}, normalizePropsOrEmits(a), normalizePropsOrEmits(b));
8724
- }
8725
- function createPropsRestProxy(props, excludedKeys) {
8726
- const ret = {};
8727
- for (const key in props) {
8728
- if (!excludedKeys.includes(key)) {
8729
- Object.defineProperty(ret, key, {
8730
- enumerable: true,
8731
- get: () => props[key]
8732
- });
8733
- }
8734
- }
8735
- return ret;
8736
- }
8737
- function withAsyncContext(getAwaitable) {
8738
- const ctx = getCurrentInstance();
8739
- if (!ctx) {
8740
- warn(
8741
- `withAsyncContext called without active current instance. This is likely a bug.`
8742
- );
8743
- }
8744
- let awaitable = getAwaitable();
8745
- unsetCurrentInstance();
8746
- if (isPromise(awaitable)) {
8747
- awaitable = awaitable.catch((e) => {
8748
- setCurrentInstance(ctx);
8749
- throw e;
8750
- });
8751
- }
8752
- return [awaitable, () => setCurrentInstance(ctx)];
8753
- }
8754
-
8755
8794
  function h(type, propsOrChildren, children) {
8756
8795
  const l = arguments.length;
8757
8796
  if (l === 2) {
@@ -8987,7 +9026,7 @@ function isMemoSame(cached, memo) {
8987
9026
  return true;
8988
9027
  }
8989
9028
 
8990
- const version = "3.3.0-alpha.9";
9029
+ const version = "3.3.0-beta.1";
8991
9030
  const ssrUtils = null;
8992
9031
  const resolveFilter = null;
8993
9032
  const compatUtils = null;
@@ -10456,4 +10495,4 @@ function normalizeContainer(container) {
10456
10495
  }
10457
10496
  const initDirectivesForSSR = NOOP;
10458
10497
 
10459
- export { BaseTransition, BaseTransitionPropsValidators, Comment, EffectScope, Fragment, KeepAlive, ReactiveEffect, Static, Suspense, Teleport, Text, Transition, TransitionGroup, VueElement, assertNumber, callWithAsyncErrorHandling, callWithErrorHandling, camelize, capitalize, cloneVNode, compatUtils, computed, createApp, createBlock, createCommentVNode, createElementBlock, createBaseVNode as createElementVNode, createHydrationRenderer, createPropsRestProxy, createRenderer, createSSRApp, createSlots, createStaticVNode, createTextVNode, createVNode, customRef, defineAsyncComponent, defineComponent, defineCustomElement, defineEmits, defineExpose, defineModel, defineOptions, defineProps, defineSSRCustomElement, defineSlots, devtools, effect, effectScope, getCurrentInstance, getCurrentScope, getTransitionRawChildren, guardReactiveProps, h, handleError, hydrate, initCustomFormatter, initDirectivesForSSR, inject, isMemoSame, isProxy, isReactive, isReadonly, isRef, isRuntimeOnly, isShallow, isVNode, markRaw, mergeDefaults, mergeModels, mergeProps, nextTick, normalizeClass, normalizeProps, normalizeStyle, onActivated, onBeforeMount, onBeforeUnmount, onBeforeUpdate, onDeactivated, onErrorCaptured, onMounted, onRenderTracked, onRenderTriggered, onScopeDispose, onServerPrefetch, onUnmounted, onUpdated, openBlock, popScopeId, provide, proxyRefs, pushScopeId, queuePostFlushCb, reactive, readonly, ref, registerRuntimeCompiler, render, renderList, renderSlot, resolveComponent, resolveDirective, resolveDynamicComponent, resolveFilter, resolveTransitionHooks, setBlockTracking, setDevtoolsHook, setTransitionHooks, shallowReactive, shallowReadonly, shallowRef, ssrContextKey, ssrUtils, stop, toDisplayString, toHandlerKey, toHandlers, toRaw, toRef, toRefs, toValue, transformVNodeArgs, triggerRef, unref, useAttrs, useCssModule, useCssVars, useModel, useSSRContext, useSlots, useTransitionState, vModelCheckbox, vModelDynamic, vModelRadio, vModelSelect, vModelText, vShow, version, warn, watch, watchEffect, watchPostEffect, watchSyncEffect, withAsyncContext, withCtx, withDefaults, withDirectives, withKeys, withMemo, withModifiers, withScopeId };
10498
+ export { BaseTransition, BaseTransitionPropsValidators, Comment, EffectScope, Fragment, KeepAlive, ReactiveEffect, Static, Suspense, Teleport, Text, Transition, TransitionGroup, VueElement, assertNumber, callWithAsyncErrorHandling, callWithErrorHandling, camelize, capitalize, cloneVNode, compatUtils, computed, createApp, createBlock, createCommentVNode, createElementBlock, createBaseVNode as createElementVNode, createHydrationRenderer, createPropsRestProxy, createRenderer, createSSRApp, createSlots, createStaticVNode, createTextVNode, createVNode, customRef, defineAsyncComponent, defineComponent, defineCustomElement, defineEmits, defineExpose, defineModel, defineOptions, defineProps, defineSSRCustomElement, defineSlots, devtools, effect, effectScope, getCurrentInstance, getCurrentScope, getTransitionRawChildren, guardReactiveProps, h, handleError, hasInjectionContext, hydrate, initCustomFormatter, initDirectivesForSSR, inject, isMemoSame, isProxy, isReactive, isReadonly, isRef, isRuntimeOnly, isShallow, isVNode, markRaw, mergeDefaults, mergeModels, mergeProps, nextTick, normalizeClass, normalizeProps, normalizeStyle, onActivated, onBeforeMount, onBeforeUnmount, onBeforeUpdate, onDeactivated, onErrorCaptured, onMounted, onRenderTracked, onRenderTriggered, onScopeDispose, onServerPrefetch, onUnmounted, onUpdated, openBlock, popScopeId, provide, proxyRefs, pushScopeId, queuePostFlushCb, reactive, readonly, ref, registerRuntimeCompiler, render, renderList, renderSlot, resolveComponent, resolveDirective, resolveDynamicComponent, resolveFilter, resolveTransitionHooks, setBlockTracking, setDevtoolsHook, setTransitionHooks, shallowReactive, shallowReadonly, shallowRef, ssrContextKey, ssrUtils, stop, toDisplayString, toHandlerKey, toHandlers, toRaw, toRef, toRefs, toValue, transformVNodeArgs, triggerRef, unref, useAttrs, useCssModule, useCssVars, useModel, useSSRContext, useSlots, useTransitionState, vModelCheckbox, vModelDynamic, vModelRadio, vModelSelect, vModelText, vShow, version, warn, watch, watchEffect, watchPostEffect, watchSyncEffect, withAsyncContext, withCtx, withDefaults, withDirectives, withKeys, withMemo, withModifiers, withScopeId };