storybook 10.0.0-beta.0 → 10.0.0-beta.10

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.
Files changed (126) hide show
  1. package/assets/server/openBrowser.applescript +94 -0
  2. package/dist/_browser-chunks/Color-KPLIACXP.js +1569 -0
  3. package/dist/_browser-chunks/{WithTooltip-2E62HIBN.js → WithTooltip-SK46ZJ2J.js} +1 -1
  4. package/dist/_browser-chunks/{chunk-YY5GICNT.js → chunk-6E2SHJSL.js} +175 -32
  5. package/dist/_browser-chunks/{chunk-FWKO3E35.js → chunk-BOOOPFZF.js} +10 -3
  6. package/dist/_browser-chunks/{chunk-YWDKX534.js → chunk-FA42P6MO.js} +49 -4
  7. package/dist/_browser-chunks/chunk-G33S6YM3.js +521 -0
  8. package/dist/_browser-chunks/{chunk-MZNYTCNT.js → chunk-HMIIJ6UD.js} +6 -6
  9. package/dist/_browser-chunks/{chunk-4QPX7WIQ.js → chunk-JJZMHC3A.js} +57 -166
  10. package/dist/_browser-chunks/{chunk-MD2FTHCZ.js → chunk-JVSKG4YS.js} +3 -16
  11. package/dist/_browser-chunks/{chunk-E7VLET3C.js → chunk-KSCAWCCE.js} +3947 -4291
  12. package/dist/_browser-chunks/{chunk-PYK5ZTFK.js → chunk-PS3AOQI4.js} +48 -25
  13. package/dist/_browser-chunks/chunk-QK3L5AXO.js +372 -0
  14. package/dist/_browser-chunks/chunk-SHR3NNR3.js +5810 -0
  15. package/dist/_browser-chunks/{chunk-O5R5CGFA.js → chunk-TMDZCWME.js} +1 -2
  16. package/dist/_browser-chunks/chunk-VUAFL5XK.js +20 -0
  17. package/dist/_browser-chunks/{chunk-T7RCAJIX.js → chunk-Y3M7TW6K.js} +43 -47
  18. package/dist/_browser-chunks/{syntaxhighlighter-YYAA4CS4.js → syntaxhighlighter-R46XOLMC.js} +1 -1
  19. package/dist/_node-chunks/{builder-manager-OW6YGKXV.js → builder-manager-SJGIDEN6.js} +45 -155
  20. package/dist/_node-chunks/camelcase-VZHWABQV.js +18 -0
  21. package/dist/_node-chunks/{chunk-6JSVPEAU.js → chunk-6CZW7AGN.js} +7 -7
  22. package/dist/_node-chunks/{chunk-CD3IP6HA.js → chunk-6XT5OLNL.js} +12 -12
  23. package/dist/_node-chunks/{chunk-2H7LZ2SD.js → chunk-AHRH5RPR.js} +7 -7
  24. package/dist/_node-chunks/{chunk-5HLANIBM.js → chunk-AOH6ABSV.js} +7 -7
  25. package/dist/_node-chunks/chunk-C5V22GP7.js +79 -0
  26. package/dist/_node-chunks/{chunk-IBXERYDG.js → chunk-FIROF4DV.js} +7 -7
  27. package/dist/_node-chunks/{chunk-I3YCPGZJ.js → chunk-GUJVZUYI.js} +7 -7
  28. package/dist/_node-chunks/chunk-IHPLRRAR.js +4741 -0
  29. package/dist/_node-chunks/{chunk-7TISOZS6.js → chunk-JMXKCRWR.js} +30 -21
  30. package/dist/_node-chunks/{chunk-YWGNEBRO.js → chunk-JUMUXWEV.js} +162 -103
  31. package/dist/_node-chunks/{chunk-UIREEOC7.js → chunk-KGX33KXX.js} +7 -7
  32. package/dist/_node-chunks/{chunk-3QB3ZG6H.js → chunk-KLVABNEU.js} +7 -7
  33. package/dist/_node-chunks/{chunk-H5LTFJHQ.js → chunk-OL6DY6BT.js} +631 -752
  34. package/dist/_node-chunks/{chunk-X5GAZ3EW.js → chunk-ONJV3K2L.js} +399 -116
  35. package/dist/_node-chunks/{chunk-LKB7KRSV.js → chunk-PTHTD4RO.js} +223 -243
  36. package/dist/_node-chunks/{chunk-UHHZPSP7.js → chunk-QQ3Z5KGJ.js} +6 -6
  37. package/dist/_node-chunks/{chunk-MUD3GH3L.js → chunk-QRTDDTZJ.js} +9 -9
  38. package/dist/_node-chunks/chunk-R54K4KSM.js +1540 -0
  39. package/dist/_node-chunks/{chunk-IQAUGVYR.js → chunk-S2LZC6JK.js} +8 -8
  40. package/dist/_node-chunks/chunk-SFJFSPRT.js +62 -0
  41. package/dist/_node-chunks/{chunk-LH3BEEIR.js → chunk-SSN5PKIY.js} +6 -6
  42. package/dist/_node-chunks/{chunk-NOQITS3C.js → chunk-SXR2DITB.js} +7 -7
  43. package/dist/_node-chunks/{chunk-FWUE7SRE.js → chunk-TH5QVQRL.js} +7 -7
  44. package/dist/_node-chunks/chunk-U34NWAU2.js +18 -0
  45. package/dist/_node-chunks/{chunk-FBMMEEO4.js → chunk-UV3CZ3KS.js} +7 -7
  46. package/dist/_node-chunks/{chunk-NZGJJABJ.js → chunk-UVUGJDAI.js} +60 -102
  47. package/dist/_node-chunks/{chunk-GZUNYRFU.js → chunk-VOUNSD2E.js} +7 -7
  48. package/dist/_node-chunks/chunk-WFCPBKQJ.js +64656 -0
  49. package/dist/_node-chunks/{chunk-BFXER3XW.js → chunk-XHF3WWNP.js} +623 -750
  50. package/dist/_node-chunks/{chunk-ANEKBWDX.js → chunk-XU45KXNQ.js} +16 -25
  51. package/dist/_node-chunks/{camelcase-2K3EMR6G.js → chunk-YHO6XR7U.js} +9 -8
  52. package/dist/_node-chunks/{dist-465RSKRC.js → dist-IIC5PBL7.js} +9 -9
  53. package/dist/_node-chunks/{globby-LJ3MVB6M.js → globby-CJACC3HJ.js} +17 -13
  54. package/dist/_node-chunks/{lib-OW3DENXB.js → lib-ZY4TKSOR.js} +40 -16
  55. package/dist/_node-chunks/{mdx-N42X6CFJ-PYX2IFUO.js → mdx-N42X6CFJ-3XNW3DFO.js} +8 -8
  56. package/dist/_node-chunks/{p-limit-X4OG45RB.js → p-limit-R2OFT5HE.js} +76 -10
  57. package/dist/_node-chunks/{plugin-ALTIQMDE.js → plugin-5XD5R2KD.js} +10 -10
  58. package/dist/_node-chunks/{plugin-GE36R32R.js → plugin-WAWVQMVR.js} +10 -12
  59. package/dist/_node-chunks/{webpack-inject-mocker-runtime-plugin-NLCAF7S6.js → webpack-inject-mocker-runtime-plugin-SCRGJLIS.js} +1307 -847
  60. package/dist/_node-chunks/{webpack-mock-plugin-BRYODMCC.js → webpack-mock-plugin-3VAXEGG2.js} +9 -11
  61. package/dist/babel/index.d.ts +1 -1
  62. package/dist/babel/index.js +11 -12
  63. package/dist/bin/core.js +638 -187
  64. package/dist/bin/dispatcher.js +11 -11
  65. package/dist/bin/loader.js +8 -8
  66. package/dist/cli/index.d.ts +62 -75
  67. package/dist/cli/index.js +66 -56
  68. package/dist/common/index.d.ts +3 -1
  69. package/dist/common/index.js +22 -22
  70. package/dist/components/index.d.ts +234 -2
  71. package/dist/components/index.js +74 -5741
  72. package/dist/core-events/index.d.ts +18 -2
  73. package/dist/core-events/index.js +7 -1
  74. package/dist/core-server/index.d.ts +540 -39
  75. package/dist/core-server/index.js +4647 -4182
  76. package/dist/core-server/presets/common-manager.js +1570 -1272
  77. package/dist/core-server/presets/common-override-preset.js +9 -9
  78. package/dist/core-server/presets/common-preset.js +691 -38
  79. package/dist/core-server/presets/webpack/loaders/storybook-mock-transform-loader.js +9 -11
  80. package/dist/core-server/presets/webpack/loaders/webpack-automock-loader.js +10 -12
  81. package/dist/csf/index.d.ts +9 -4
  82. package/dist/csf/index.js +50 -15
  83. package/dist/csf-tools/index.d.ts +47 -6
  84. package/dist/csf-tools/index.js +9 -9
  85. package/dist/docs-tools/index.js +4 -4
  86. package/dist/instrumenter/index.js +1 -1
  87. package/dist/manager/globals-runtime.js +9233 -18113
  88. package/dist/manager/globals.d.ts +0 -4
  89. package/dist/manager/globals.js +1 -6
  90. package/dist/manager/runtime.js +13396 -11518
  91. package/dist/manager-api/index.d.ts +540 -32
  92. package/dist/manager-api/index.js +364 -90
  93. package/dist/manager-errors.d.ts +527 -0
  94. package/dist/node-logger/index.d.ts +1 -1
  95. package/dist/node-logger/index.js +1136 -662
  96. package/dist/preview/globals.js +1 -1
  97. package/dist/preview/runtime.js +12103 -21579
  98. package/dist/preview-api/index.d.ts +3 -3
  99. package/dist/preview-api/index.js +10 -10
  100. package/dist/preview-errors.d.ts +527 -0
  101. package/dist/router/index.d.ts +668 -10
  102. package/dist/router/index.js +2 -2
  103. package/dist/server-errors.d.ts +527 -0
  104. package/dist/server-errors.js +10 -10
  105. package/dist/telemetry/index.d.ts +1 -1
  106. package/dist/telemetry/index.js +23 -25
  107. package/dist/test/index.js +1874 -4024
  108. package/dist/theming/index.d.ts +2 -2
  109. package/dist/theming/index.js +6 -6
  110. package/dist/types/index.d.ts +553 -16
  111. package/dist/viewport/index.d.ts +36 -4
  112. package/dist/viewport/index.js +1 -1
  113. package/package.json +9 -46
  114. package/dist/_browser-chunks/Color-SFYJJKWL.js +0 -605
  115. package/dist/_browser-chunks/chunk-DHO2SA6L.js +0 -12
  116. package/dist/_browser-chunks/chunk-WPHPDNUA.js +0 -974
  117. package/dist/_node-chunks/chunk-27W2Z6VL.js +0 -28502
  118. package/dist/_node-chunks/chunk-G46DWX7Z.js +0 -266
  119. package/dist/_node-chunks/chunk-GZZDIJIB.js +0 -80
  120. package/dist/_node-chunks/chunk-JDKH3XYB.js +0 -9845
  121. package/dist/_node-chunks/chunk-R7RKO2DC.js +0 -35783
  122. package/dist/_node-chunks/chunk-T23YQHYB.js +0 -62
  123. package/dist/_node-chunks/chunk-VKKLKNFC.js +0 -2377
  124. package/dist/_node-chunks/chunk-W6GKFQ7F.js +0 -87
  125. package/dist/_node-chunks/chunk-YUYBO6S7.js +0 -18
  126. package/dist/_node-chunks/default-browser-id-Z6WQ7DZA.js +0 -1719
@@ -1,31 +1,31 @@
1
1
  #!/usr/bin/env node
2
- import CJS_COMPAT_NODE_URL_qlimw951jq from 'node:url';
3
- import CJS_COMPAT_NODE_PATH_qlimw951jq from 'node:path';
4
- import CJS_COMPAT_NODE_MODULE_qlimw951jq from "node:module";
2
+ import CJS_COMPAT_NODE_URL_kzg6jc8bd2 from 'node:url';
3
+ import CJS_COMPAT_NODE_PATH_kzg6jc8bd2 from 'node:path';
4
+ import CJS_COMPAT_NODE_MODULE_kzg6jc8bd2 from "node:module";
5
5
 
6
- var __filename = CJS_COMPAT_NODE_URL_qlimw951jq.fileURLToPath(import.meta.url);
7
- var __dirname = CJS_COMPAT_NODE_PATH_qlimw951jq.dirname(__filename);
8
- var require = CJS_COMPAT_NODE_MODULE_qlimw951jq.createRequire(import.meta.url);
6
+ var __filename = CJS_COMPAT_NODE_URL_kzg6jc8bd2.fileURLToPath(import.meta.url);
7
+ var __dirname = CJS_COMPAT_NODE_PATH_kzg6jc8bd2.dirname(__filename);
8
+ var require = CJS_COMPAT_NODE_MODULE_kzg6jc8bd2.createRequire(import.meta.url);
9
9
 
10
10
  // ------------------------------------------------------------
11
11
  // end of CJS compatibility banner, injected by Storybook's esbuild configuration
12
12
  // ------------------------------------------------------------
13
13
  import {
14
14
  versions_default
15
- } from "../_node-chunks/chunk-T23YQHYB.js";
15
+ } from "../_node-chunks/chunk-SFJFSPRT.js";
16
16
  import {
17
17
  resolvePackageDir
18
- } from "../_node-chunks/chunk-GZZDIJIB.js";
18
+ } from "../_node-chunks/chunk-R54K4KSM.js";
19
19
  import {
20
20
  join
21
- } from "../_node-chunks/chunk-5HLANIBM.js";
21
+ } from "../_node-chunks/chunk-AOH6ABSV.js";
22
22
  import {
23
23
  require_dist
24
- } from "../_node-chunks/chunk-I3YCPGZJ.js";
24
+ } from "../_node-chunks/chunk-GUJVZUYI.js";
25
25
  import {
26
26
  __name,
27
27
  __toESM
28
- } from "../_node-chunks/chunk-LH3BEEIR.js";
28
+ } from "../_node-chunks/chunk-SSN5PKIY.js";
29
29
 
30
30
  // src/bin/dispatcher.ts
31
31
  import { spawn } from "node:child_process";
@@ -1,20 +1,20 @@
1
- import CJS_COMPAT_NODE_URL_qlimw951jq from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_qlimw951jq from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_qlimw951jq from "node:module";
1
+ import CJS_COMPAT_NODE_URL_kzg6jc8bd2 from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_kzg6jc8bd2 from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_kzg6jc8bd2 from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_qlimw951jq.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_qlimw951jq.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_qlimw951jq.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_kzg6jc8bd2.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_kzg6jc8bd2.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_kzg6jc8bd2.createRequire(import.meta.url);
8
8
 
9
9
  // ------------------------------------------------------------
10
10
  // end of CJS compatibility banner, injected by Storybook's esbuild configuration
11
11
  // ------------------------------------------------------------
12
12
  import {
13
13
  NODE_TARGET
14
- } from "../_node-chunks/chunk-UHHZPSP7.js";
14
+ } from "../_node-chunks/chunk-QQ3Z5KGJ.js";
15
15
  import {
16
16
  __name
17
- } from "../_node-chunks/chunk-LH3BEEIR.js";
17
+ } from "../_node-chunks/chunk-SSN5PKIY.js";
18
18
 
19
19
  // src/bin/loader.ts
20
20
  import { readFile } from "node:fs/promises";
@@ -891,7 +891,7 @@ declare abstract class JsPackageManager {
891
891
  type NpmOptions = Parameters<JsPackageManager['addDependencies']>[0];
892
892
 
893
893
  declare const SUPPORTED_ESLINT_EXTENSIONS: string[];
894
- declare const findEslintFile: (instanceDir: string) => Promise<string | undefined>;
894
+ declare const findEslintFile: (instanceDir: string) => string | undefined;
895
895
  declare const configureFlatConfig: (code: string) => Promise<string>;
896
896
  declare function extractEslintInfo(packageManager: JsPackageManager$1): Promise<{
897
897
  hasEslint: boolean;
@@ -913,13 +913,16 @@ type Primitive = string | number | symbol | bigint | boolean | null | undefined;
913
913
  declare namespace util {
914
914
  type AssertEqual<T, U> = (<V>() => V extends T ? 1 : 2) extends <V>() => V extends U ? 1 : 2 ? true : false;
915
915
  export type isAny<T> = 0 extends 1 & T ? true : false;
916
- export const assertEqual: <A, B>(val: AssertEqual<A, B>) => AssertEqual<A, B>;
916
+ export const assertEqual: <A, B>(_: AssertEqual<A, B>) => void;
917
917
  export function assertIs<T>(_arg: T): void;
918
918
  export function assertNever(_x: never): never;
919
919
  export type Omit<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>;
920
920
  export type OmitKeys<T, K extends string> = Pick<T, Exclude<keyof T, K>>;
921
921
  export type MakePartial<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>>;
922
922
  export type Exactly<T, X> = T & Record<Exclude<keyof X, keyof T>, never>;
923
+ export type InexactPartial<T> = {
924
+ [k in keyof T]?: T[k] | undefined;
925
+ };
923
926
  export const arrayToEnum: <T extends string, U extends [T, ...T[]]>(items: U) => { [k in U[number]]: k; };
924
927
  export const getValidEnumValues: (obj: any) => any[];
925
928
  export const objectValues: (obj: any) => any[];
@@ -970,24 +973,24 @@ declare namespace objectUtil {
970
973
  }
971
974
  declare const ZodParsedType: {
972
975
  string: "string";
973
- number: "number";
974
- bigint: "bigint";
975
- boolean: "boolean";
976
- symbol: "symbol";
977
- undefined: "undefined";
978
- object: "object";
979
- function: "function";
980
- map: "map";
981
976
  nan: "nan";
977
+ number: "number";
982
978
  integer: "integer";
983
979
  float: "float";
980
+ boolean: "boolean";
984
981
  date: "date";
982
+ bigint: "bigint";
983
+ symbol: "symbol";
984
+ function: "function";
985
+ undefined: "undefined";
985
986
  null: "null";
986
987
  array: "array";
988
+ object: "object";
987
989
  unknown: "unknown";
988
990
  promise: "promise";
989
991
  void: "void";
990
992
  never: "never";
993
+ map: "map";
991
994
  set: "set";
992
995
  };
993
996
  type ZodParsedType = keyof typeof ZodParsedType;
@@ -1020,7 +1023,7 @@ declare const ZodIssueCode: {
1020
1023
  type ZodIssueCode = keyof typeof ZodIssueCode;
1021
1024
  type ZodIssueBase = {
1022
1025
  path: (string | number)[];
1023
- message?: string;
1026
+ message?: string | undefined;
1024
1027
  };
1025
1028
  interface ZodInvalidTypeIssue extends ZodIssueBase {
1026
1029
  code: typeof ZodIssueCode.invalid_type;
@@ -1062,7 +1065,7 @@ interface ZodInvalidDateIssue extends ZodIssueBase {
1062
1065
  }
1063
1066
  type StringValidation = "email" | "url" | "emoji" | "uuid" | "nanoid" | "regex" | "cuid" | "cuid2" | "ulid" | "datetime" | "date" | "time" | "duration" | "ip" | "cidr" | "base64" | "jwt" | "base64url" | {
1064
1067
  includes: string;
1065
- position?: number;
1068
+ position?: number | undefined;
1066
1069
  } | {
1067
1070
  startsWith: string;
1068
1071
  } | {
@@ -1104,7 +1107,7 @@ interface ZodCustomIssue extends ZodIssueBase {
1104
1107
  }
1105
1108
  type ZodIssueOptionalMessage = ZodInvalidTypeIssue | ZodInvalidLiteralIssue | ZodUnrecognizedKeysIssue | ZodInvalidUnionIssue | ZodInvalidUnionDiscriminatorIssue | ZodInvalidEnumValueIssue | ZodInvalidArgumentsIssue | ZodInvalidReturnTypeIssue | ZodInvalidDateIssue | ZodInvalidStringIssue | ZodTooSmallIssue | ZodTooBigIssue | ZodInvalidIntersectionTypesIssue | ZodNotMultipleOfIssue | ZodNotFiniteIssue | ZodCustomIssue;
1106
1109
  type ZodIssue = ZodIssueOptionalMessage & {
1107
- fatal?: boolean;
1110
+ fatal?: boolean | undefined;
1108
1111
  message: string;
1109
1112
  };
1110
1113
  type recursiveZodFormattedError<T> = T extends [any, ...any[]] ? {
@@ -1137,7 +1140,7 @@ declare class ZodError<T = any> extends Error {
1137
1140
  type stripPath<T extends object> = T extends any ? util.OmitKeys<T, "path"> : never;
1138
1141
  type IssueData = stripPath<ZodIssueOptionalMessage> & {
1139
1142
  path?: (string | number)[];
1140
- fatal?: boolean;
1143
+ fatal?: boolean | undefined;
1141
1144
  };
1142
1145
  type ErrorMapCtx = {
1143
1146
  defaultError: string;
@@ -1157,11 +1160,11 @@ type ParsePath = ParsePathComponent[];
1157
1160
  interface ParseContext {
1158
1161
  readonly common: {
1159
1162
  readonly issues: ZodIssue[];
1160
- readonly contextualErrorMap?: ZodErrorMap;
1163
+ readonly contextualErrorMap?: ZodErrorMap | undefined;
1161
1164
  readonly async: boolean;
1162
1165
  };
1163
1166
  readonly path: ParsePath;
1164
- readonly schemaErrorMap?: ZodErrorMap;
1167
+ readonly schemaErrorMap?: ZodErrorMap | undefined;
1165
1168
  readonly parent: ParseContext | null;
1166
1169
  readonly data: any;
1167
1170
  readonly parsedType: ZodParsedType;
@@ -1215,7 +1218,7 @@ declare namespace enumUtil {
1215
1218
 
1216
1219
  declare namespace errorUtil {
1217
1220
  type ErrMessage = string | {
1218
- message?: string;
1221
+ message?: string | undefined;
1219
1222
  };
1220
1223
  const errToObj: (message?: ErrMessage) => {
1221
1224
  message?: string | undefined;
@@ -1348,15 +1351,15 @@ type output<T extends ZodType<any, any, any>> = T["_output"];
1348
1351
 
1349
1352
  type CustomErrorParams = Partial<util.Omit<ZodCustomIssue, "code">>;
1350
1353
  interface ZodTypeDef {
1351
- errorMap?: ZodErrorMap;
1352
- description?: string;
1354
+ errorMap?: ZodErrorMap | undefined;
1355
+ description?: string | undefined;
1353
1356
  }
1354
1357
  type RawCreateParams = {
1355
- errorMap?: ZodErrorMap;
1356
- invalid_type_error?: string;
1357
- required_error?: string;
1358
- message?: string;
1359
- description?: string;
1358
+ errorMap?: ZodErrorMap | undefined;
1359
+ invalid_type_error?: string | undefined;
1360
+ required_error?: string | undefined;
1361
+ message?: string | undefined;
1362
+ description?: string | undefined;
1360
1363
  } | undefined;
1361
1364
  type SafeParseSuccess<Output> = {
1362
1365
  success: true;
@@ -1385,13 +1388,13 @@ declare abstract class ZodType<Output = any, Def extends ZodTypeDef = ZodTypeDef
1385
1388
  };
1386
1389
  _parseSync(input: ParseInput): SyncParseReturnType<Output>;
1387
1390
  _parseAsync(input: ParseInput): AsyncParseReturnType<Output>;
1388
- parse(data: unknown, params?: Partial<ParseParams>): Output;
1389
- safeParse(data: unknown, params?: Partial<ParseParams>): SafeParseReturnType<Input, Output>;
1391
+ parse(data: unknown, params?: util.InexactPartial<ParseParams>): Output;
1392
+ safeParse(data: unknown, params?: util.InexactPartial<ParseParams>): SafeParseReturnType<Input, Output>;
1390
1393
  "~validate"(data: unknown): StandardSchemaV1.Result<Output> | Promise<StandardSchemaV1.Result<Output>>;
1391
- parseAsync(data: unknown, params?: Partial<ParseParams>): Promise<Output>;
1392
- safeParseAsync(data: unknown, params?: Partial<ParseParams>): Promise<SafeParseReturnType<Input, Output>>;
1394
+ parseAsync(data: unknown, params?: util.InexactPartial<ParseParams>): Promise<Output>;
1395
+ safeParseAsync(data: unknown, params?: util.InexactPartial<ParseParams>): Promise<SafeParseReturnType<Input, Output>>;
1393
1396
  /** Alias of safeParseAsync */
1394
- spa: (data: unknown, params?: Partial<ParseParams>) => Promise<SafeParseReturnType<Input, Output>>;
1397
+ spa: (data: unknown, params?: util.InexactPartial<ParseParams>) => Promise<SafeParseReturnType<Input, Output>>;
1395
1398
  refine<RefinedOutput extends Output>(check: (arg: Output) => arg is RefinedOutput, message?: string | CustomErrorParams | ((arg: Output) => CustomErrorParams)): ZodEffects<this, RefinedOutput, Input>;
1396
1399
  refine(check: (arg: Output) => unknown | Promise<unknown>, message?: string | CustomErrorParams | ((arg: Output) => CustomErrorParams)): ZodEffects<this, Output, Input>;
1397
1400
  refinement<RefinedOutput extends Output>(check: (arg: Output) => arg is RefinedOutput, refinementData: IssueData | ((arg: Output, ctx: RefinementCtx) => IssueData)): ZodEffects<this, RefinedOutput, Input>;
@@ -1427,22 +1430,22 @@ type ZodNumberCheck = {
1427
1430
  kind: "min";
1428
1431
  value: number;
1429
1432
  inclusive: boolean;
1430
- message?: string;
1433
+ message?: string | undefined;
1431
1434
  } | {
1432
1435
  kind: "max";
1433
1436
  value: number;
1434
1437
  inclusive: boolean;
1435
- message?: string;
1438
+ message?: string | undefined;
1436
1439
  } | {
1437
1440
  kind: "int";
1438
- message?: string;
1441
+ message?: string | undefined;
1439
1442
  } | {
1440
1443
  kind: "multipleOf";
1441
1444
  value: number;
1442
- message?: string;
1445
+ message?: string | undefined;
1443
1446
  } | {
1444
1447
  kind: "finite";
1445
- message?: string;
1448
+ message?: string | undefined;
1446
1449
  };
1447
1450
  interface ZodNumberDef extends ZodTypeDef {
1448
1451
  checks: ZodNumberCheck[];
@@ -1491,15 +1494,15 @@ interface ZodArrayDef<T extends ZodTypeAny = ZodTypeAny> extends ZodTypeDef {
1491
1494
  typeName: ZodFirstPartyTypeKind.ZodArray;
1492
1495
  exactLength: {
1493
1496
  value: number;
1494
- message?: string;
1497
+ message?: string | undefined;
1495
1498
  } | null;
1496
1499
  minLength: {
1497
1500
  value: number;
1498
- message?: string;
1501
+ message?: string | undefined;
1499
1502
  } | null;
1500
1503
  maxLength: {
1501
1504
  value: number;
1502
- message?: string;
1505
+ message?: string | undefined;
1503
1506
  } | null;
1504
1507
  }
1505
1508
  type ArrayCardinality = "many" | "atleastone";
@@ -1511,7 +1514,7 @@ declare class ZodArray<T extends ZodTypeAny, Cardinality extends ArrayCardinalit
1511
1514
  max(maxLength: number, message?: errorUtil.ErrMessage): this;
1512
1515
  length(len: number, message?: errorUtil.ErrMessage): this;
1513
1516
  nonempty(message?: errorUtil.ErrMessage): ZodArray<T, "atleastone">;
1514
- static create: <T_1 extends ZodTypeAny>(schema: T_1, params?: RawCreateParams) => ZodArray<T_1, "many">;
1517
+ static create: <El extends ZodTypeAny>(schema: El, params?: RawCreateParams) => ZodArray<El>;
1515
1518
  }
1516
1519
  type UnknownKeysParam = "passthrough" | "strict" | "strip";
1517
1520
  interface ZodObjectDef<T extends ZodRawShape = ZodRawShape, UnknownKeys extends UnknownKeysParam = UnknownKeysParam, Catchall extends ZodTypeAny = ZodTypeAny> extends ZodTypeDef {
@@ -1596,24 +1599,20 @@ declare class ZodObject<T extends ZodRawShape, UnknownKeys extends UnknownKeysPa
1596
1599
  [k in keyof T]: k extends keyof Mask ? deoptional<T[k]> : T[k];
1597
1600
  }>, UnknownKeys, Catchall>;
1598
1601
  keyof(): ZodEnum<enumUtil.UnionToTupleString<keyof T>>;
1599
- static create: <T_1 extends ZodRawShape>(shape: T_1, params?: RawCreateParams) => ZodObject<T_1, "strip", ZodTypeAny, objectUtil.addQuestionMarks<baseObjectOutputType<T_1>, any> extends infer T_2 ? { [k in keyof T_2]: objectUtil.addQuestionMarks<baseObjectOutputType<T_1>, any>[k]; } : never, baseObjectInputType<T_1> extends infer T_3 ? { [k_1 in keyof T_3]: baseObjectInputType<T_1>[k_1]; } : never>;
1600
- static strictCreate: <T_1 extends ZodRawShape>(shape: T_1, params?: RawCreateParams) => ZodObject<T_1, "strict", ZodTypeAny, objectUtil.addQuestionMarks<baseObjectOutputType<T_1>, any> extends infer T_2 ? { [k in keyof T_2]: objectUtil.addQuestionMarks<baseObjectOutputType<T_1>, any>[k]; } : never, baseObjectInputType<T_1> extends infer T_3 ? { [k_1 in keyof T_3]: baseObjectInputType<T_1>[k_1]; } : never>;
1601
- static lazycreate: <T_1 extends ZodRawShape>(shape: () => T_1, params?: RawCreateParams) => ZodObject<T_1, "strip", ZodTypeAny, objectUtil.addQuestionMarks<baseObjectOutputType<T_1>, any> extends infer T_2 ? { [k in keyof T_2]: objectUtil.addQuestionMarks<baseObjectOutputType<T_1>, any>[k]; } : never, baseObjectInputType<T_1> extends infer T_3 ? { [k_1 in keyof T_3]: baseObjectInputType<T_1>[k_1]; } : never>;
1602
+ static create: <Shape extends ZodRawShape>(shape: Shape, params?: RawCreateParams) => ZodObject<Shape, "strip", ZodTypeAny, objectOutputType<Shape, ZodTypeAny, "strip">, objectInputType<Shape, ZodTypeAny, "strip">>;
1603
+ static strictCreate: <Shape extends ZodRawShape>(shape: Shape, params?: RawCreateParams) => ZodObject<Shape, "strict">;
1604
+ static lazycreate: <Shape extends ZodRawShape>(shape: () => Shape, params?: RawCreateParams) => ZodObject<Shape, "strip">;
1602
1605
  }
1603
1606
  type AnyZodObject = ZodObject<any, any, any>;
1604
1607
  type ZodUnionOptions = Readonly<[ZodTypeAny, ...ZodTypeAny[]]>;
1605
- interface ZodUnionDef<T extends ZodUnionOptions = Readonly<[
1606
- ZodTypeAny,
1607
- ZodTypeAny,
1608
- ...ZodTypeAny[]
1609
- ]>> extends ZodTypeDef {
1608
+ interface ZodUnionDef<T extends ZodUnionOptions = Readonly<[ZodTypeAny, ZodTypeAny, ...ZodTypeAny[]]>> extends ZodTypeDef {
1610
1609
  options: T;
1611
1610
  typeName: ZodFirstPartyTypeKind.ZodUnion;
1612
1611
  }
1613
1612
  declare class ZodUnion<T extends ZodUnionOptions> extends ZodType<T[number]["_output"], ZodUnionDef<T>, T[number]["_input"]> {
1614
1613
  _parse(input: ParseInput): ParseReturnType<this["_output"]>;
1615
1614
  get options(): T;
1616
- static create: <T_1 extends readonly [ZodTypeAny, ZodTypeAny, ...ZodTypeAny[]]>(types: T_1, params?: RawCreateParams) => ZodUnion<T_1>;
1615
+ static create: <Options extends Readonly<[ZodTypeAny, ZodTypeAny, ...ZodTypeAny[]]>>(types: Options, params?: RawCreateParams) => ZodUnion<Options>;
1617
1616
  }
1618
1617
  interface ZodIntersectionDef<T extends ZodTypeAny = ZodTypeAny, U extends ZodTypeAny = ZodTypeAny> extends ZodTypeDef {
1619
1618
  left: T;
@@ -1622,7 +1621,7 @@ interface ZodIntersectionDef<T extends ZodTypeAny = ZodTypeAny, U extends ZodTyp
1622
1621
  }
1623
1622
  declare class ZodIntersection<T extends ZodTypeAny, U extends ZodTypeAny> extends ZodType<T["_output"] & U["_output"], ZodIntersectionDef<T, U>, T["_input"] & U["_input"]> {
1624
1623
  _parse(input: ParseInput): ParseReturnType<this["_output"]>;
1625
- static create: <T_1 extends ZodTypeAny, U_1 extends ZodTypeAny>(left: T_1, right: U_1, params?: RawCreateParams) => ZodIntersection<T_1, U_1>;
1624
+ static create: <TSchema extends ZodTypeAny, USchema extends ZodTypeAny>(left: TSchema, right: USchema, params?: RawCreateParams) => ZodIntersection<TSchema, USchema>;
1626
1625
  }
1627
1626
  type ZodTupleItems = [ZodTypeAny, ...ZodTypeAny[]];
1628
1627
  type AssertArray<T> = T extends any[] ? T : never;
@@ -1639,11 +1638,11 @@ interface ZodTupleDef<T extends ZodTupleItems | [] = ZodTupleItems, Rest extends
1639
1638
  rest: Rest;
1640
1639
  typeName: ZodFirstPartyTypeKind.ZodTuple;
1641
1640
  }
1642
- declare class ZodTuple<T extends [ZodTypeAny, ...ZodTypeAny[]] | [] = [ZodTypeAny, ...ZodTypeAny[]], Rest extends ZodTypeAny | null = null> extends ZodType<OutputTypeOfTupleWithRest<T, Rest>, ZodTupleDef<T, Rest>, InputTypeOfTupleWithRest<T, Rest>> {
1641
+ declare class ZodTuple<T extends ZodTupleItems | [] = ZodTupleItems, Rest extends ZodTypeAny | null = null> extends ZodType<OutputTypeOfTupleWithRest<T, Rest>, ZodTupleDef<T, Rest>, InputTypeOfTupleWithRest<T, Rest>> {
1643
1642
  _parse(input: ParseInput): ParseReturnType<this["_output"]>;
1644
1643
  get items(): T;
1645
- rest<Rest extends ZodTypeAny>(rest: Rest): ZodTuple<T, Rest>;
1646
- static create: <T_1 extends [] | [ZodTypeAny, ...ZodTypeAny[]]>(schemas: T_1, params?: RawCreateParams) => ZodTuple<T_1, null>;
1644
+ rest<RestSchema extends ZodTypeAny>(rest: RestSchema): ZodTuple<T, RestSchema>;
1645
+ static create: <Items extends [ZodTypeAny, ...ZodTypeAny[]] | []>(schemas: Items, params?: RawCreateParams) => ZodTuple<Items, null>;
1647
1646
  }
1648
1647
  type EnumValues<T extends string = string> = readonly [T, ...T[]];
1649
1648
  type Values<T extends EnumValues> = {
@@ -1661,7 +1660,7 @@ type typecast<A, T> = A extends T ? A : never;
1661
1660
  declare function createZodEnum<U extends string, T extends Readonly<[U, ...U[]]>>(values: T, params?: RawCreateParams): ZodEnum<Writeable<T>>;
1662
1661
  declare function createZodEnum<U extends string, T extends [U, ...U[]]>(values: T, params?: RawCreateParams): ZodEnum<T>;
1663
1662
  declare class ZodEnum<T extends [string, ...string[]]> extends ZodType<T[number], ZodEnumDef<T>, T[number]> {
1664
- #private;
1663
+ _cache: Set<T[number]> | undefined;
1665
1664
  _parse(input: ParseInput): ParseReturnType<this["_output"]>;
1666
1665
  get options(): T;
1667
1666
  get enum(): Values<T>;
@@ -1678,7 +1677,7 @@ interface ZodPromiseDef<T extends ZodTypeAny = ZodTypeAny> extends ZodTypeDef {
1678
1677
  declare class ZodPromise<T extends ZodTypeAny> extends ZodType<Promise<T["_output"]>, ZodPromiseDef<T>, Promise<T["_input"]>> {
1679
1678
  unwrap(): T;
1680
1679
  _parse(input: ParseInput): ParseReturnType<this["_output"]>;
1681
- static create: <T_1 extends ZodTypeAny>(schema: T_1, params?: RawCreateParams) => ZodPromise<T_1>;
1680
+ static create: <Inner extends ZodTypeAny>(schema: Inner, params?: RawCreateParams) => ZodPromise<Inner>;
1682
1681
  }
1683
1682
  type RefinementEffect<T> = {
1684
1683
  type: "refinement";
@@ -1713,7 +1712,7 @@ interface ZodOptionalDef<T extends ZodTypeAny = ZodTypeAny> extends ZodTypeDef {
1713
1712
  declare class ZodOptional<T extends ZodTypeAny> extends ZodType<T["_output"] | undefined, ZodOptionalDef<T>, T["_input"] | undefined> {
1714
1713
  _parse(input: ParseInput): ParseReturnType<this["_output"]>;
1715
1714
  unwrap(): T;
1716
- static create: <T_1 extends ZodTypeAny>(type: T_1, params?: RawCreateParams) => ZodOptional<T_1>;
1715
+ static create: <Inner extends ZodTypeAny>(type: Inner, params?: RawCreateParams) => ZodOptional<Inner>;
1717
1716
  }
1718
1717
  interface ZodNullableDef<T extends ZodTypeAny = ZodTypeAny> extends ZodTypeDef {
1719
1718
  innerType: T;
@@ -1722,7 +1721,7 @@ interface ZodNullableDef<T extends ZodTypeAny = ZodTypeAny> extends ZodTypeDef {
1722
1721
  declare class ZodNullable<T extends ZodTypeAny> extends ZodType<T["_output"] | null, ZodNullableDef<T>, T["_input"] | null> {
1723
1722
  _parse(input: ParseInput): ParseReturnType<this["_output"]>;
1724
1723
  unwrap(): T;
1725
- static create: <T_1 extends ZodTypeAny>(type: T_1, params?: RawCreateParams) => ZodNullable<T_1>;
1724
+ static create: <Inner extends ZodTypeAny>(type: Inner, params?: RawCreateParams) => ZodNullable<Inner>;
1726
1725
  }
1727
1726
  interface ZodDefaultDef<T extends ZodTypeAny = ZodTypeAny> extends ZodTypeDef {
1728
1727
  innerType: T;
@@ -1732,15 +1731,9 @@ interface ZodDefaultDef<T extends ZodTypeAny = ZodTypeAny> extends ZodTypeDef {
1732
1731
  declare class ZodDefault<T extends ZodTypeAny> extends ZodType<util.noUndefined<T["_output"]>, ZodDefaultDef<T>, T["_input"] | undefined> {
1733
1732
  _parse(input: ParseInput): ParseReturnType<this["_output"]>;
1734
1733
  removeDefault(): T;
1735
- static create: <T_1 extends ZodTypeAny>(type: T_1, params: {
1736
- errorMap?: ZodErrorMap | undefined;
1737
- invalid_type_error?: string | undefined;
1738
- required_error?: string | undefined;
1739
- message?: string | undefined;
1740
- description?: string | undefined;
1741
- } & {
1742
- default: T_1["_input"] | (() => util.noUndefined<T_1["_input"]>);
1743
- }) => ZodDefault<T_1>;
1734
+ static create: <Inner extends ZodTypeAny>(type: Inner, params: RawCreateParams & {
1735
+ default: Inner["_input"] | (() => util.noUndefined<Inner["_input"]>);
1736
+ }) => ZodDefault<Inner>;
1744
1737
  }
1745
1738
  interface ZodCatchDef<T extends ZodTypeAny = ZodTypeAny> extends ZodTypeDef {
1746
1739
  innerType: T;
@@ -1753,15 +1746,9 @@ interface ZodCatchDef<T extends ZodTypeAny = ZodTypeAny> extends ZodTypeDef {
1753
1746
  declare class ZodCatch<T extends ZodTypeAny> extends ZodType<T["_output"], ZodCatchDef<T>, unknown> {
1754
1747
  _parse(input: ParseInput): ParseReturnType<this["_output"]>;
1755
1748
  removeCatch(): T;
1756
- static create: <T_1 extends ZodTypeAny>(type: T_1, params: {
1757
- errorMap?: ZodErrorMap | undefined;
1758
- invalid_type_error?: string | undefined;
1759
- required_error?: string | undefined;
1760
- message?: string | undefined;
1761
- description?: string | undefined;
1762
- } & {
1763
- catch: T_1["_output"] | (() => T_1["_output"]);
1764
- }) => ZodCatch<T_1>;
1749
+ static create: <Inner extends ZodTypeAny>(type: Inner, params: RawCreateParams & {
1750
+ catch: Inner["_output"] | (() => Inner["_output"]);
1751
+ }) => ZodCatch<Inner>;
1765
1752
  }
1766
1753
  interface ZodBrandedDef<T extends ZodTypeAny> extends ZodTypeDef {
1767
1754
  type: T;
@@ -1784,7 +1771,7 @@ interface ZodPipelineDef<A extends ZodTypeAny, B extends ZodTypeAny> extends Zod
1784
1771
  }
1785
1772
  declare class ZodPipeline<A extends ZodTypeAny, B extends ZodTypeAny> extends ZodType<B["_output"], ZodPipelineDef<A, B>, A["_input"]> {
1786
1773
  _parse(input: ParseInput): ParseReturnType<any>;
1787
- static create<A extends ZodTypeAny, B extends ZodTypeAny>(a: A, b: B): ZodPipeline<A, B>;
1774
+ static create<ASchema extends ZodTypeAny, BSchema extends ZodTypeAny>(a: ASchema, b: BSchema): ZodPipeline<ASchema, BSchema>;
1788
1775
  }
1789
1776
  type BuiltIn = (((...args: any[]) => any) | (new (...args: any[]) => any)) | {
1790
1777
  readonly [Symbol.toStringTag]: string;
@@ -1796,7 +1783,7 @@ interface ZodReadonlyDef<T extends ZodTypeAny = ZodTypeAny> extends ZodTypeDef {
1796
1783
  }
1797
1784
  declare class ZodReadonly<T extends ZodTypeAny> extends ZodType<MakeReadonly<T["_output"]>, ZodReadonlyDef<T>, MakeReadonly<T["_input"]>> {
1798
1785
  _parse(input: ParseInput): ParseReturnType<this["_output"]>;
1799
- static create: <T_1 extends ZodTypeAny>(type: T_1, params?: RawCreateParams) => ZodReadonly<T_1>;
1786
+ static create: <Inner extends ZodTypeAny>(type: Inner, params?: RawCreateParams) => ZodReadonly<Inner>;
1800
1787
  unwrap(): T;
1801
1788
  }
1802
1789
  declare enum ZodFirstPartyTypeKind {