@vue/runtime-core 3.3.0-beta.2 → 3.3.0-beta.4

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.
@@ -6717,6 +6717,9 @@ const normalizeRef = ({
6717
6717
  ref_key,
6718
6718
  ref_for
6719
6719
  }) => {
6720
+ if (typeof ref === "number") {
6721
+ ref = "" + ref;
6722
+ }
6720
6723
  return ref != null ? shared.isString(ref) || reactivity.isRef(ref) || shared.isFunction(ref) ? { i: currentRenderingInstance, r: ref, k: ref_key, f: !!ref_for } : ref : null;
6721
6724
  };
6722
6725
  function createBaseVNode(type, props = null, children = null, patchFlag = 0, dynamicProps = null, shapeFlag = type === Fragment ? 0 : 1, isBlockNode = false, needFullChildrenNormalization = false) {
@@ -7322,14 +7325,6 @@ function getSlotsProxy(instance) {
7322
7325
  get(target, key) {
7323
7326
  reactivity.track(instance, "get", "$slots");
7324
7327
  return target[key];
7325
- },
7326
- set() {
7327
- warn(`setupContext.slots is readonly.`);
7328
- return false;
7329
- },
7330
- deleteProperty() {
7331
- warn(`setupContext.slots is readonly.`);
7332
- return false;
7333
7328
  }
7334
7329
  }));
7335
7330
  }
@@ -7662,7 +7657,7 @@ function isMemoSame(cached, memo) {
7662
7657
  return true;
7663
7658
  }
7664
7659
 
7665
- const version = "3.3.0-beta.2";
7660
+ const version = "3.3.0-beta.4";
7666
7661
  const _ssrUtils = {
7667
7662
  createComponentInstance,
7668
7663
  setupComponent,
@@ -5406,6 +5406,9 @@ const normalizeRef = ({
5406
5406
  ref_key,
5407
5407
  ref_for
5408
5408
  }) => {
5409
+ if (typeof ref === "number") {
5410
+ ref = "" + ref;
5411
+ }
5409
5412
  return ref != null ? shared.isString(ref) || reactivity.isRef(ref) || shared.isFunction(ref) ? { i: currentRenderingInstance, r: ref, k: ref_key, f: !!ref_for } : ref : null;
5410
5413
  };
5411
5414
  function createBaseVNode(type, props = null, children = null, patchFlag = 0, dynamicProps = null, shapeFlag = type === Fragment ? 0 : 1, isBlockNode = false, needFullChildrenNormalization = false) {
@@ -6005,7 +6008,7 @@ function isMemoSame(cached, memo) {
6005
6008
  return true;
6006
6009
  }
6007
6010
 
6008
- const version = "3.3.0-beta.2";
6011
+ const version = "3.3.0-beta.4";
6009
6012
  const _ssrUtils = {
6010
6013
  createComponentInstance,
6011
6014
  setupComponent,
@@ -169,6 +169,10 @@ declare const SuspenseImpl: {
169
169
  export declare const Suspense: {
170
170
  new (): {
171
171
  $props: VNodeProps & SuspenseProps;
172
+ $slots: {
173
+ default(): VNode[];
174
+ fallback(): VNode[];
175
+ };
172
176
  };
173
177
  __isSuspense: true;
174
178
  };
@@ -291,6 +295,9 @@ export interface KeepAliveProps {
291
295
  export declare const KeepAlive: {
292
296
  new (): {
293
297
  $props: VNodeProps & KeepAliveProps;
298
+ $slots: {
299
+ default(): VNode[];
300
+ };
294
301
  };
295
302
  __isKeepAlive: true;
296
303
  };
@@ -370,11 +377,36 @@ type InferPropType<T> = [T] extends [null] ? any : [T] extends [{
370
377
  }] ? Date : [T] extends [(infer U)[] | {
371
378
  type: (infer U)[];
372
379
  }] ? U extends DateConstructor ? Date | InferPropType<U> : InferPropType<U> : [T] extends [Prop<infer V, infer D>] ? unknown extends V ? IfAny<V, V, D> : V : T;
380
+ /**
381
+ * Extract prop types from a runtime props options object.
382
+ * The extracted types are **internal** - i.e. the resolved props received by
383
+ * the component.
384
+ * - Boolean props are always present
385
+ * - Props with default values are always present
386
+ *
387
+ * To extract accepted props from the parent, use {@link ExtractPublicPropTypes}.
388
+ */
373
389
  export type ExtractPropTypes<O> = {
374
390
  [K in keyof Pick<O, RequiredKeys<O>>]: InferPropType<O[K]>;
375
391
  } & {
376
392
  [K in keyof Pick<O, OptionalKeys<O>>]?: InferPropType<O[K]>;
377
393
  };
394
+ type PublicRequiredKeys<T> = {
395
+ [K in keyof T]: T[K] extends {
396
+ required: true;
397
+ } ? K : never;
398
+ }[keyof T];
399
+ type PublicOptionalKeys<T> = Exclude<keyof T, PublicRequiredKeys<T>>;
400
+ /**
401
+ * Extract prop types from a runtime props options object.
402
+ * The extracted types are **public** - i.e. the expected props that can be
403
+ * passed to component.
404
+ */
405
+ export type ExtractPublicPropTypes<O> = {
406
+ [K in keyof Pick<O, PublicRequiredKeys<O>>]: InferPropType<O[K]>;
407
+ } & {
408
+ [K in keyof Pick<O, PublicOptionalKeys<O>>]?: InferPropType<O[K]>;
409
+ };
378
410
  declare const enum BooleanFlags {
379
411
  shouldCast = 0,
380
412
  shouldCastTrue = 1
@@ -662,7 +694,7 @@ type OptionTypesType<P = {}, B = {}, D = {}, C extends ComputedOptions = {}, M e
662
694
 
663
695
  export interface InjectionKey<T> extends Symbol {
664
696
  }
665
- export declare function provide<T>(key: InjectionKey<T> | string | number, value: T): void;
697
+ export declare function provide<T, K = InjectionKey<T> | string | number>(key: K, value: K extends InjectionKey<infer V> ? V : T): void;
666
698
  export declare function inject<T>(key: InjectionKey<T> | string): T | undefined;
667
699
  export declare function inject<T>(key: InjectionKey<T> | string, defaultValue: T, treatDefaultAsFactory?: false): T;
668
700
  export declare function inject<T>(key: InjectionKey<T> | string, defaultValue: T | (() => T), treatDefaultAsFactory: true): T;
@@ -805,6 +837,9 @@ export declare const BaseTransitionPropsValidators: {
805
837
  };
806
838
  export declare const BaseTransition: new () => {
807
839
  $props: BaseTransitionProps<any>;
840
+ $slots: {
841
+ default(): VNode[];
842
+ };
808
843
  };
809
844
  export declare function resolveTransitionHooks(vnode: VNode, props: BaseTransitionProps<any>, state: TransitionState, instance: ComponentInternalInstance): TransitionHooks;
810
845
  export declare function setTransitionHooks(vnode: VNode, hooks: TransitionHooks): void;
@@ -832,6 +867,9 @@ declare function hydrateTeleport(node: Node, vnode: TeleportVNode, parentCompone
832
867
  export declare const Teleport: {
833
868
  new (): {
834
869
  $props: VNodeProps & TeleportProps;
870
+ $slots: {
871
+ default(): VNode[];
872
+ };
835
873
  };
836
874
  __isTeleport: true;
837
875
  };
@@ -6761,6 +6761,9 @@ const normalizeRef = ({
6761
6761
  ref_key,
6762
6762
  ref_for
6763
6763
  }) => {
6764
+ if (typeof ref === "number") {
6765
+ ref = "" + ref;
6766
+ }
6764
6767
  return ref != null ? isString(ref) || isRef(ref) || isFunction(ref) ? { i: currentRenderingInstance, r: ref, k: ref_key, f: !!ref_for } : ref : null;
6765
6768
  };
6766
6769
  function createBaseVNode(type, props = null, children = null, patchFlag = 0, dynamicProps = null, shapeFlag = type === Fragment ? 0 : 1, isBlockNode = false, needFullChildrenNormalization = false) {
@@ -7373,14 +7376,6 @@ function getSlotsProxy(instance) {
7373
7376
  get(target, key) {
7374
7377
  track(instance, "get", "$slots");
7375
7378
  return target[key];
7376
- },
7377
- set() {
7378
- warn(`setupContext.slots is readonly.`);
7379
- return false;
7380
- },
7381
- deleteProperty() {
7382
- warn(`setupContext.slots is readonly.`);
7383
- return false;
7384
7379
  }
7385
7380
  }));
7386
7381
  }
@@ -7722,7 +7717,7 @@ function isMemoSame(cached, memo) {
7722
7717
  return true;
7723
7718
  }
7724
7719
 
7725
- const version = "3.3.0-beta.2";
7720
+ const version = "3.3.0-beta.4";
7726
7721
  const _ssrUtils = {
7727
7722
  createComponentInstance,
7728
7723
  setupComponent,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vue/runtime-core",
3
- "version": "3.3.0-beta.2",
3
+ "version": "3.3.0-beta.4",
4
4
  "description": "@vue/runtime-core",
5
5
  "main": "index.js",
6
6
  "module": "dist/runtime-core.esm-bundler.js",
@@ -32,7 +32,7 @@
32
32
  },
33
33
  "homepage": "https://github.com/vuejs/core/tree/main/packages/runtime-core#readme",
34
34
  "dependencies": {
35
- "@vue/shared": "3.3.0-beta.2",
36
- "@vue/reactivity": "3.3.0-beta.2"
35
+ "@vue/shared": "3.3.0-beta.4",
36
+ "@vue/reactivity": "3.3.0-beta.4"
37
37
  }
38
38
  }