@vue/runtime-core 3.3.1 → 3.3.3

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.
@@ -7664,7 +7664,7 @@ function isMemoSame(cached, memo) {
7664
7664
  return true;
7665
7665
  }
7666
7666
 
7667
- const version = "3.3.1";
7667
+ const version = "3.3.3";
7668
7668
  const _ssrUtils = {
7669
7669
  createComponentInstance,
7670
7670
  setupComponent,
@@ -6015,7 +6015,7 @@ function isMemoSame(cached, memo) {
6015
6015
  return true;
6016
6016
  }
6017
6017
 
6018
- const version = "3.3.1";
6018
+ const version = "3.3.3";
6019
6019
  const _ssrUtils = {
6020
6020
  createComponentInstance,
6021
6021
  setupComponent,
@@ -1297,9 +1297,9 @@ export declare function defineProps<PropNames extends string = string>(props: Pr
1297
1297
  [key in PropNames]?: any;
1298
1298
  }>>;
1299
1299
  export declare function defineProps<PP extends ComponentObjectPropsOptions = ComponentObjectPropsOptions>(props: PP): Prettify<Readonly<ExtractPropTypes<PP>>>;
1300
- export declare function defineProps<TypeProps>(): DefineProps<TypeProps>;
1301
- type DefineProps<T> = Readonly<T> & {
1302
- readonly [K in BooleanKey<T>]-?: boolean;
1300
+ export declare function defineProps<TypeProps>(): DefineProps<TypeProps, BooleanKey<TypeProps>>;
1301
+ type DefineProps<T, BKeys extends keyof T> = Readonly<T> & {
1302
+ readonly [K in BKeys]-?: boolean;
1303
1303
  };
1304
1304
  type BooleanKey<T, K extends keyof T = keyof T> = K extends any ? [T[K]] extends [boolean | undefined] ? K : never : never;
1305
1305
  /**
@@ -1352,7 +1352,7 @@ export declare function defineExpose<Exposed extends Record<string, any> = Recor
1352
1352
  /**
1353
1353
  * Vue `<script setup>` compiler macro for declaring a component's additional
1354
1354
  * options. This should be used only for options that cannot be expressed via
1355
- * Composition API - e.g. `inhertiAttrs`.
1355
+ * Composition API - e.g. `inheritAttrs`.
1356
1356
  *
1357
1357
  * @see {@link https://vuejs.org/api/sfc-script-setup.html#defineoptions}
1358
1358
  */
@@ -1416,11 +1416,14 @@ interface DefineModelOptions {
1416
1416
  }
1417
1417
  type NotUndefined<T> = T extends undefined ? never : T;
1418
1418
  type InferDefaults<T> = {
1419
- [K in keyof T]?: InferDefault<T, NotUndefined<T[K]>>;
1419
+ [K in keyof T]?: InferDefault<T, T[K]>;
1420
1420
  };
1421
- type InferDefault<P, T> = T extends null | number | string | boolean | symbol | Function ? T | ((props: P) => T) : (props: P) => T;
1422
- type PropsWithDefaults<Base, Defaults> = Base & {
1423
- [K in keyof Defaults]: K extends keyof Base ? Defaults[K] extends undefined ? Base[K] : NotUndefined<Base[K]> : never;
1421
+ type NativeType = null | number | string | boolean | symbol | Function;
1422
+ type InferDefault<P, T> = ((props: P) => T & {}) | (T extends NativeType ? T : never);
1423
+ type PropsWithDefaults<T, Defaults extends InferDefaults<T>, BKeys extends keyof T> = Omit<T, keyof Defaults> & {
1424
+ [K in keyof Defaults]-?: K extends keyof T ? Defaults[K] extends undefined ? T[K] : NotUndefined<T[K]> : never;
1425
+ } & {
1426
+ readonly [K in BKeys]-?: boolean;
1424
1427
  };
1425
1428
  /**
1426
1429
  * Vue `<script setup>` compiler macro for providing props default values when
@@ -1442,7 +1445,7 @@ type PropsWithDefaults<Base, Defaults> = Base & {
1442
1445
  *
1443
1446
  * @see {@link https://vuejs.org/guide/typescript/composition-api.html#typing-component-props}
1444
1447
  */
1445
- export declare function withDefaults<Props, Defaults extends InferDefaults<Props>>(props: Props, defaults: Defaults): PropsWithDefaults<Props, Defaults>;
1448
+ export declare function withDefaults<T, BKeys extends keyof T, Defaults extends InferDefaults<T>>(props: DefineProps<T, BKeys>, defaults: Defaults): PropsWithDefaults<T, Defaults, BKeys>;
1446
1449
  export declare function useSlots(): SetupContext['slots'];
1447
1450
  export declare function useAttrs(): SetupContext['attrs'];
1448
1451
  export declare function useModel<T extends Record<string, any>, K extends keyof T>(props: T, name: K, options?: {
@@ -11,7 +11,7 @@ function popWarningContext() {
11
11
  stack.pop();
12
12
  }
13
13
  function warn(msg, ...args) {
14
- if (!process.env.NODE_ENV !== "production")
14
+ if (!(process.env.NODE_ENV !== "production"))
15
15
  return;
16
16
  pauseTracking();
17
17
  const instance = stack.length ? stack[stack.length - 1].component : null;
@@ -110,7 +110,7 @@ function formatProp(key, value, raw) {
110
110
  }
111
111
  }
112
112
  function assertNumber(val, type) {
113
- if (!process.env.NODE_ENV !== "production")
113
+ if (!(process.env.NODE_ENV !== "production"))
114
114
  return;
115
115
  if (val === void 0) {
116
116
  return;
@@ -1708,8 +1708,7 @@ function doWatch(source, cb, { immediate, deep, flush, onTrack, onTrigger } = EM
1708
1708
  };
1709
1709
  }
1710
1710
  } else {
1711
- getter = NOOP;
1712
- process.env.NODE_ENV !== "production" && warnInvalidSource(source);
1711
+ getter = NOOP(process.env.NODE_ENV !== "production") && warnInvalidSource(source);
1713
1712
  }
1714
1713
  if (cb && deep) {
1715
1714
  const baseGetter = getter;
@@ -1983,7 +1982,7 @@ const BaseTransitionImpl = {
1983
1982
  }
1984
1983
  child = c;
1985
1984
  hasFound = true;
1986
- if (!process.env.NODE_ENV !== "production")
1985
+ if (!(process.env.NODE_ENV !== "production"))
1987
1986
  break;
1988
1987
  }
1989
1988
  }
@@ -2937,8 +2936,7 @@ const PublicInstanceProxyHandlers = {
2937
2936
  let cssModule, globalProperties;
2938
2937
  if (publicGetter) {
2939
2938
  if (key === "$attrs") {
2940
- track(instance, "get", key);
2941
- process.env.NODE_ENV !== "production" && markAttrsAccessed();
2939
+ track(instance, "get", key)(process.env.NODE_ENV !== "production") && markAttrsAccessed();
2942
2940
  } else if (process.env.NODE_ENV !== "production" && key === "$slots") {
2943
2941
  track(instance, "get", key);
2944
2942
  }
@@ -4554,8 +4552,7 @@ function createHydrationFunctions(rendererInternals) {
4554
4552
  }
4555
4553
  } else {
4556
4554
  if (node.data !== vnode.children) {
4557
- hasMismatch = true;
4558
- process.env.NODE_ENV !== "production" && warn(
4555
+ hasMismatch = true(process.env.NODE_ENV !== "production") && warn(
4559
4556
  `Hydration text mismatch:
4560
4557
  - Client: ${JSON.stringify(node.data)}
4561
4558
  - Server: ${JSON.stringify(vnode.children)}`
@@ -4758,8 +4755,7 @@ function createHydrationFunctions(rendererInternals) {
4758
4755
  }
4759
4756
  } else if (shapeFlag & 8) {
4760
4757
  if (el.textContent !== vnode.children) {
4761
- hasMismatch = true;
4762
- process.env.NODE_ENV !== "production" && warn(
4758
+ hasMismatch = true(process.env.NODE_ENV !== "production") && warn(
4763
4759
  `Hydration text content mismatch in <${vnode.type}>:
4764
4760
  - Client: ${el.textContent}
4765
4761
  - Server: ${vnode.children}`
@@ -4834,8 +4830,7 @@ function createHydrationFunctions(rendererInternals) {
4834
4830
  }
4835
4831
  };
4836
4832
  const handleMismatch = (node, vnode, parentComponent, parentSuspense, slotScopeIds, isFragment) => {
4837
- hasMismatch = true;
4838
- process.env.NODE_ENV !== "production" && warn(
4833
+ hasMismatch = true(process.env.NODE_ENV !== "production") && warn(
4839
4834
  `Hydration node mismatch:
4840
4835
  - Client vnode:`,
4841
4836
  vnode.type,
@@ -7524,7 +7519,7 @@ function isShallow(value) {
7524
7519
  }
7525
7520
 
7526
7521
  function initCustomFormatter() {
7527
- if (!process.env.NODE_ENV !== "production" || typeof window === "undefined") {
7522
+ if (!(process.env.NODE_ENV !== "production") || typeof window === "undefined") {
7528
7523
  return;
7529
7524
  }
7530
7525
  const vueStyle = { style: "color:#3ba776" };
@@ -7724,7 +7719,7 @@ function isMemoSame(cached, memo) {
7724
7719
  return true;
7725
7720
  }
7726
7721
 
7727
- const version = "3.3.1";
7722
+ const version = "3.3.3";
7728
7723
  const _ssrUtils = {
7729
7724
  createComponentInstance,
7730
7725
  setupComponent,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vue/runtime-core",
3
- "version": "3.3.1",
3
+ "version": "3.3.3",
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.1",
36
- "@vue/reactivity": "3.3.1"
35
+ "@vue/shared": "3.3.3",
36
+ "@vue/reactivity": "3.3.3"
37
37
  }
38
38
  }