storybook 10.0.0-beta.4 → 10.0.0-beta.5

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 (97) hide show
  1. package/dist/_browser-chunks/Color-KPLIACXP.js +1569 -0
  2. package/dist/_browser-chunks/{chunk-YY5GICNT.js → chunk-6E2SHJSL.js} +175 -32
  3. package/dist/_browser-chunks/{chunk-MZNYTCNT.js → chunk-AM4PZYVQ.js} +10 -63
  4. package/dist/_browser-chunks/{chunk-YWDKX534.js → chunk-FA42P6MO.js} +49 -4
  5. package/dist/_browser-chunks/chunk-G33S6YM3.js +521 -0
  6. package/dist/_browser-chunks/chunk-GJ67EE65.js +67 -0
  7. package/dist/_browser-chunks/{chunk-4QPX7WIQ.js → chunk-JJZMHC3A.js} +57 -166
  8. package/dist/_browser-chunks/{chunk-MD2FTHCZ.js → chunk-JVSKG4YS.js} +3 -16
  9. package/dist/_browser-chunks/{chunk-E7VLET3C.js → chunk-KSCAWCCE.js} +3947 -4291
  10. package/dist/_browser-chunks/chunk-QK3L5AXO.js +372 -0
  11. package/dist/_browser-chunks/chunk-VUAFL5XK.js +20 -0
  12. package/dist/_browser-chunks/{chunk-T7RCAJIX.js → chunk-Y3M7TW6K.js} +43 -47
  13. package/dist/_browser-chunks/{chunk-PYK5ZTFK.js → chunk-YQV3EGQ5.js} +5 -5
  14. package/dist/_browser-chunks/{syntaxhighlighter-YYAA4CS4.js → syntaxhighlighter-RJW7FE3A.js} +3 -2
  15. package/dist/_node-chunks/{builder-manager-IKHPPPFE.js → builder-manager-ZTS4EIKQ.js} +18 -13
  16. package/dist/_node-chunks/camelcase-K3BM7RII.js +18 -0
  17. package/dist/_node-chunks/{chunk-MOO2Y4GI.js → chunk-2VMDKLSW.js} +6 -6
  18. package/dist/_node-chunks/{chunk-7IIAUEWB.js → chunk-3VVGIILJ.js} +8 -8
  19. package/dist/_node-chunks/{chunk-SF2IETZ2.js → chunk-4KRR46V2.js} +36 -23
  20. package/dist/_node-chunks/{chunk-4VGW2SQA.js → chunk-4VDRH7SM.js} +7 -7
  21. package/dist/_node-chunks/chunk-7LG5CLCT.js +18 -0
  22. package/dist/_node-chunks/{chunk-AC3BNULF.js → chunk-ACUNHBEO.js} +22 -22
  23. package/dist/_node-chunks/{camelcase-O2O7JODG.js → chunk-AK5PHLUA.js} +9 -8
  24. package/dist/_node-chunks/{chunk-4FMOVB65.js → chunk-D7SDB4XE.js} +223 -243
  25. package/dist/_node-chunks/chunk-DWJ7TV2O.js +62 -0
  26. package/dist/_node-chunks/{chunk-JSSBBVU5.js → chunk-DZJNLBBL.js} +7 -7
  27. package/dist/_node-chunks/{chunk-YRPXGWKW.js → chunk-EIHJ5J3O.js} +8 -8
  28. package/dist/_node-chunks/{chunk-HAVE6SGK.js → chunk-F3WE3456.js} +7 -7
  29. package/dist/_node-chunks/{chunk-TTQRDWDJ.js → chunk-F7YW5W6B.js} +12 -12
  30. package/dist/_node-chunks/{chunk-AXFNB3AN.js → chunk-H52PBBSK.js} +7 -7
  31. package/dist/_node-chunks/{chunk-OL2HWCBH.js → chunk-J3DQMIO4.js} +7 -7
  32. package/dist/_node-chunks/{chunk-XT6O5CVI.js → chunk-K4YETNYJ.js} +30 -21
  33. package/dist/_node-chunks/{chunk-TBAIXCHN.js → chunk-KU3JBNPY.js} +8 -8
  34. package/dist/_node-chunks/{chunk-6COBULLV.js → chunk-KZB7ELL6.js} +162 -103
  35. package/dist/_node-chunks/{chunk-JECCFKKM.js → chunk-OC3TVLYU.js} +7 -7
  36. package/dist/_node-chunks/{chunk-N3GFXZDP.js → chunk-P3TWEOO5.js} +7 -7
  37. package/dist/_node-chunks/{chunk-NOSGJ5PL.js → chunk-P7YMEOXF.js} +7 -7
  38. package/dist/_node-chunks/{chunk-IB5AEYPX.js → chunk-PIKDGR3O.js} +7 -7
  39. package/dist/_node-chunks/{chunk-FWFQ2GU7.js → chunk-QHIU5I7C.js} +6 -6
  40. package/dist/_node-chunks/{chunk-NF3GXIEK.js → chunk-SW3VZAH7.js} +9 -9
  41. package/dist/_node-chunks/{chunk-XA4TAMUS.js → chunk-TBWOUVTA.js} +10 -9
  42. package/dist/_node-chunks/{chunk-YJHXEN7U.js → chunk-TKN5TEZV.js} +583 -180
  43. package/dist/_node-chunks/{chunk-JP4LEAXM.js → chunk-TVKUJ3SE.js} +623 -750
  44. package/dist/_node-chunks/{chunk-TYGVOW7L.js → chunk-UTCFHTQH.js} +8 -8
  45. package/dist/_node-chunks/{chunk-DCHFG5TX.js → chunk-VQN4WAIA.js} +7 -7
  46. package/dist/_node-chunks/{chunk-USDZSU5L.js → chunk-VWSUFVUF.js} +7 -7
  47. package/dist/_node-chunks/{chunk-3J7DQ6TI.js → chunk-VX5P3IYA.js} +7 -7
  48. package/dist/_node-chunks/{chunk-5OILJTZE.js → chunk-WCSHG2QT.js} +7 -7
  49. package/dist/_node-chunks/{default-browser-id-J4OIAAJ5.js → default-browser-id-4RZZMHJE.js} +7 -7
  50. package/dist/_node-chunks/{dist-BMKSKYDI.js → dist-OGRBL76N.js} +9 -9
  51. package/dist/_node-chunks/{globby-DASPUXWI.js → globby-65LOULA6.js} +9 -9
  52. package/dist/_node-chunks/{lib-L6BIH4EV.js → lib-TF7JCT3A.js} +36 -12
  53. package/dist/_node-chunks/{mdx-N42X6CFJ-2COTUDSL.js → mdx-N42X6CFJ-6ZJEUZMZ.js} +8 -8
  54. package/dist/_node-chunks/{p-limit-HVR3I7TJ.js → p-limit-PF7JSPDT.js} +7 -7
  55. package/dist/_node-chunks/{plugin-2XPSFYWZ.js → plugin-A6XAWMXN.js} +10 -10
  56. package/dist/_node-chunks/{plugin-FZOHPRK7.js → plugin-LGHGAC6J.js} +10 -10
  57. package/dist/_node-chunks/{webpack-inject-mocker-runtime-plugin-FGQM2EPC.js → webpack-inject-mocker-runtime-plugin-HDSEOU3Z.js} +1307 -847
  58. package/dist/_node-chunks/{webpack-mock-plugin-4HOAIYSX.js → webpack-mock-plugin-ZJJVMJUS.js} +9 -9
  59. package/dist/babel/index.d.ts +1 -1
  60. package/dist/babel/index.js +11 -11
  61. package/dist/bin/core.js +638 -187
  62. package/dist/bin/dispatcher.js +11 -11
  63. package/dist/bin/loader.js +8 -8
  64. package/dist/cli/index.d.ts +61 -74
  65. package/dist/cli/index.js +50 -43
  66. package/dist/common/index.js +21 -21
  67. package/dist/components/index.js +24 -20
  68. package/dist/core-server/index.js +3541 -3216
  69. package/dist/core-server/presets/common-manager.js +440 -720
  70. package/dist/core-server/presets/common-override-preset.js +9 -9
  71. package/dist/core-server/presets/common-preset.js +22 -22
  72. package/dist/core-server/presets/webpack/loaders/storybook-mock-transform-loader.js +9 -9
  73. package/dist/core-server/presets/webpack/loaders/webpack-automock-loader.js +10 -10
  74. package/dist/csf/index.js +6 -6
  75. package/dist/csf-tools/index.js +9 -9
  76. package/dist/docs-tools/index.js +4 -4
  77. package/dist/instrumenter/index.js +1 -1
  78. package/dist/manager/globals-runtime.js +8910 -18107
  79. package/dist/manager/runtime.js +3256 -2945
  80. package/dist/manager-api/index.js +23 -20
  81. package/dist/node-logger/index.d.ts +1 -1
  82. package/dist/node-logger/index.js +1136 -661
  83. package/dist/preview/runtime.js +12061 -21584
  84. package/dist/preview-api/index.d.ts +68 -67
  85. package/dist/preview-api/index.js +6 -6
  86. package/dist/router/index.js +2 -2
  87. package/dist/server-errors.js +10 -10
  88. package/dist/telemetry/index.js +24 -24
  89. package/dist/test/index.js +1872 -4023
  90. package/dist/theming/index.d.ts +2 -2
  91. package/dist/theming/index.js +6 -6
  92. package/package.json +3 -3
  93. package/dist/_browser-chunks/Color-SFYJJKWL.js +0 -605
  94. package/dist/_browser-chunks/chunk-DHO2SA6L.js +0 -12
  95. package/dist/_browser-chunks/chunk-WPHPDNUA.js +0 -974
  96. package/dist/_node-chunks/chunk-CHJLO2LV.js +0 -62
  97. package/dist/_node-chunks/chunk-MNG223PY.js +0 -18
@@ -1,31 +1,31 @@
1
1
  #!/usr/bin/env node
2
- import CJS_COMPAT_NODE_URL_bdftjtsviyb from 'node:url';
3
- import CJS_COMPAT_NODE_PATH_bdftjtsviyb from 'node:path';
4
- import CJS_COMPAT_NODE_MODULE_bdftjtsviyb from "node:module";
2
+ import CJS_COMPAT_NODE_URL_0oz6lpav6bgq from 'node:url';
3
+ import CJS_COMPAT_NODE_PATH_0oz6lpav6bgq from 'node:path';
4
+ import CJS_COMPAT_NODE_MODULE_0oz6lpav6bgq from "node:module";
5
5
 
6
- var __filename = CJS_COMPAT_NODE_URL_bdftjtsviyb.fileURLToPath(import.meta.url);
7
- var __dirname = CJS_COMPAT_NODE_PATH_bdftjtsviyb.dirname(__filename);
8
- var require = CJS_COMPAT_NODE_MODULE_bdftjtsviyb.createRequire(import.meta.url);
6
+ var __filename = CJS_COMPAT_NODE_URL_0oz6lpav6bgq.fileURLToPath(import.meta.url);
7
+ var __dirname = CJS_COMPAT_NODE_PATH_0oz6lpav6bgq.dirname(__filename);
8
+ var require = CJS_COMPAT_NODE_MODULE_0oz6lpav6bgq.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-CHJLO2LV.js";
15
+ } from "../_node-chunks/chunk-DWJ7TV2O.js";
16
16
  import {
17
17
  resolvePackageDir
18
- } from "../_node-chunks/chunk-TBAIXCHN.js";
18
+ } from "../_node-chunks/chunk-KU3JBNPY.js";
19
19
  import {
20
20
  join
21
- } from "../_node-chunks/chunk-4VGW2SQA.js";
21
+ } from "../_node-chunks/chunk-4VDRH7SM.js";
22
22
  import {
23
23
  require_dist
24
- } from "../_node-chunks/chunk-NOSGJ5PL.js";
24
+ } from "../_node-chunks/chunk-P7YMEOXF.js";
25
25
  import {
26
26
  __name,
27
27
  __toESM
28
- } from "../_node-chunks/chunk-MOO2Y4GI.js";
28
+ } from "../_node-chunks/chunk-2VMDKLSW.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_bdftjtsviyb from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_bdftjtsviyb from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_bdftjtsviyb from "node:module";
1
+ import CJS_COMPAT_NODE_URL_0oz6lpav6bgq from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_0oz6lpav6bgq from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_0oz6lpav6bgq from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_bdftjtsviyb.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_bdftjtsviyb.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_bdftjtsviyb.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_0oz6lpav6bgq.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_0oz6lpav6bgq.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_0oz6lpav6bgq.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-FWFQ2GU7.js";
14
+ } from "../_node-chunks/chunk-QHIU5I7C.js";
15
15
  import {
16
16
  __name
17
- } from "../_node-chunks/chunk-MOO2Y4GI.js";
17
+ } from "../_node-chunks/chunk-2VMDKLSW.js";
18
18
 
19
19
  // src/bin/loader.ts
20
20
  import { readFile } from "node:fs/promises";
@@ -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 {
package/dist/cli/index.js CHANGED
@@ -1,56 +1,57 @@
1
- import CJS_COMPAT_NODE_URL_bdftjtsviyb from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_bdftjtsviyb from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_bdftjtsviyb from "node:module";
1
+ import CJS_COMPAT_NODE_URL_0oz6lpav6bgq from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_0oz6lpav6bgq from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_0oz6lpav6bgq from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_bdftjtsviyb.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_bdftjtsviyb.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_bdftjtsviyb.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_0oz6lpav6bgq.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_0oz6lpav6bgq.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_0oz6lpav6bgq.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
  boxen
14
- } from "../_node-chunks/chunk-JP4LEAXM.js";
14
+ } from "../_node-chunks/chunk-TVKUJ3SE.js";
15
+ import "../_node-chunks/chunk-AK5PHLUA.js";
15
16
  import {
16
17
  Settings,
17
18
  _clearGlobalSettings,
18
19
  globalSettings
19
- } from "../_node-chunks/chunk-4FMOVB65.js";
20
+ } from "../_node-chunks/chunk-D7SDB4XE.js";
20
21
  import {
21
22
  any,
22
23
  up2 as up
23
- } from "../_node-chunks/chunk-JSSBBVU5.js";
24
+ } from "../_node-chunks/chunk-DZJNLBBL.js";
24
25
  import {
25
26
  invariant
26
- } from "../_node-chunks/chunk-USDZSU5L.js";
27
+ } from "../_node-chunks/chunk-VWSUFVUF.js";
27
28
  import {
28
29
  resolvePackageDir
29
- } from "../_node-chunks/chunk-TBAIXCHN.js";
30
- import "../_node-chunks/chunk-4VGW2SQA.js";
30
+ } from "../_node-chunks/chunk-KU3JBNPY.js";
31
+ import "../_node-chunks/chunk-4VDRH7SM.js";
31
32
  import {
32
33
  require_prompts
33
- } from "../_node-chunks/chunk-3J7DQ6TI.js";
34
+ } from "../_node-chunks/chunk-VX5P3IYA.js";
34
35
  import {
35
36
  require_dist
36
- } from "../_node-chunks/chunk-NOSGJ5PL.js";
37
+ } from "../_node-chunks/chunk-P7YMEOXF.js";
37
38
  import {
38
39
  babelParse,
39
40
  recast,
40
41
  traverse,
41
42
  types
42
- } from "../_node-chunks/chunk-YJHXEN7U.js";
43
- import "../_node-chunks/chunk-6COBULLV.js";
44
- import "../_node-chunks/chunk-AXFNB3AN.js";
43
+ } from "../_node-chunks/chunk-TKN5TEZV.js";
44
+ import "../_node-chunks/chunk-KZB7ELL6.js";
45
+ import "../_node-chunks/chunk-H52PBBSK.js";
45
46
  import {
46
47
  require_picocolors
47
- } from "../_node-chunks/chunk-N3GFXZDP.js";
48
+ } from "../_node-chunks/chunk-P3TWEOO5.js";
48
49
  import {
49
50
  __commonJS,
50
51
  __name,
51
52
  __require,
52
53
  __toESM
53
- } from "../_node-chunks/chunk-MOO2Y4GI.js";
54
+ } from "../_node-chunks/chunk-2VMDKLSW.js";
54
55
 
55
56
  // ../node_modules/wrappy/wrappy.js
56
57
  var require_wrappy = __commonJS({
@@ -136,6 +137,7 @@ var require_end_of_stream = __commonJS({
136
137
  var once = require_once();
137
138
  var noop = /* @__PURE__ */ __name(function() {
138
139
  }, "noop");
140
+ var qnt = global.Bare ? queueMicrotask : process.nextTick.bind(process);
139
141
  var isRequest = /* @__PURE__ */ __name(function(stream) {
140
142
  return stream.setHeader && typeof stream.abort === "function";
141
143
  }, "isRequest");
@@ -169,7 +171,7 @@ var require_end_of_stream = __commonJS({
169
171
  callback.call(stream, err);
170
172
  }, "onerror");
171
173
  var onclose = /* @__PURE__ */ __name(function() {
172
- process.nextTick(onclosenexttick);
174
+ qnt(onclosenexttick);
173
175
  }, "onclose");
174
176
  var onclosenexttick = /* @__PURE__ */ __name(function() {
175
177
  if (cancelled) return;
@@ -224,7 +226,7 @@ var require_pump = __commonJS({
224
226
  }
225
227
  var noop = /* @__PURE__ */ __name(function() {
226
228
  }, "noop");
227
- var ancient = /^v?\.0/.test(process.version);
229
+ var ancient = typeof process === "undefined" ? false : /^v?\.0/.test(process.version);
228
230
  var isFn = /* @__PURE__ */ __name(function(fn) {
229
231
  return typeof fn === "function";
230
232
  }, "isFn");
@@ -4651,12 +4653,15 @@ var require_tar_fs = __commonJS({
4651
4653
  if (win32) return next();
4652
4654
  xfs.unlink(name, function() {
4653
4655
  var srcpath = path.join(cwd, path.join("/", header.linkname));
4654
- xfs.link(srcpath, name, function(err) {
4655
- if (err && err.code === "EPERM" && opts.hardlinkAsFilesFallback) {
4656
- stream = xfs.createReadStream(srcpath);
4657
- return onfile();
4658
- }
4659
- stat(err);
4656
+ xfs.realpath(srcpath, function(err, dst) {
4657
+ if (err || !dst.startsWith(path.resolve(cwd))) return next(new Error(name + " is not a valid hardlink"));
4658
+ xfs.link(dst, name, function(err2) {
4659
+ if (err2 && err2.code === "EPERM" && opts.hardlinkAsFilesFallback) {
4660
+ stream = xfs.createReadStream(srcpath);
4661
+ return onfile();
4662
+ }
4663
+ stat(err2);
4664
+ });
4660
4665
  });
4661
4666
  });
4662
4667
  }, "onlink");
@@ -27461,7 +27466,7 @@ import { coerce, satisfies } from "semver";
27461
27466
  var singleComment = Symbol("singleComment");
27462
27467
  var multiComment = Symbol("multiComment");
27463
27468
  var stripWithoutWhitespace = /* @__PURE__ */ __name(() => "", "stripWithoutWhitespace");
27464
- var stripWithWhitespace = /* @__PURE__ */ __name((string, start, end) => string.slice(start, end).replace(/\S/g, " "), "stripWithWhitespace");
27469
+ var stripWithWhitespace = /* @__PURE__ */ __name((string, start, end) => string.slice(start, end).replace(/[^ \t\r\n]/g, " "), "stripWithWhitespace");
27465
27470
  var isEscaped = /* @__PURE__ */ __name((jsonString, quotePosition) => {
27466
27471
  let index = quotePosition - 1;
27467
27472
  let backslashCount = 0;
@@ -27542,7 +27547,8 @@ function stripJsonComments(jsonString, { whitespace = true, trailingCommas = fal
27542
27547
  }
27543
27548
  }
27544
27549
  }
27545
- return result + buffer + (isInsideComment ? strip(jsonString.slice(offset)) : jsonString.slice(offset));
27550
+ const remaining = isInsideComment === singleComment ? strip(jsonString, offset) : jsonString.slice(offset);
27551
+ return result + buffer + remaining;
27546
27552
  }
27547
27553
  __name(stripJsonComments, "stripJsonComments");
27548
27554
 
@@ -28323,6 +28329,10 @@ import { logger as logger4, prompt } from "storybook/internal/node-logger";
28323
28329
  var INDENT_REGEX = /^(?:( )+|\t+)/;
28324
28330
  var INDENT_TYPE_SPACE = "space";
28325
28331
  var INDENT_TYPE_TAB = "tab";
28332
+ function shouldIgnoreSingleSpace(ignoreSingleSpaces, indentType, value) {
28333
+ return ignoreSingleSpaces && indentType === INDENT_TYPE_SPACE && value === 1;
28334
+ }
28335
+ __name(shouldIgnoreSingleSpace, "shouldIgnoreSingleSpace");
28326
28336
  function makeIndentsMap(string, ignoreSingleSpaces) {
28327
28337
  const indents = /* @__PURE__ */ new Map();
28328
28338
  let previousSize = 0;
@@ -28332,39 +28342,36 @@ function makeIndentsMap(string, ignoreSingleSpaces) {
28332
28342
  if (!line) {
28333
28343
  continue;
28334
28344
  }
28335
- let indent;
28336
- let indentType;
28337
- let use;
28338
- let weight;
28339
- let entry;
28340
28345
  const matches = line.match(INDENT_REGEX);
28341
28346
  if (matches === null) {
28342
28347
  previousSize = 0;
28343
28348
  previousIndentType = "";
28344
28349
  } else {
28345
- indent = matches[0].length;
28346
- indentType = matches[1] ? INDENT_TYPE_SPACE : INDENT_TYPE_TAB;
28347
- if (ignoreSingleSpaces && indentType === INDENT_TYPE_SPACE && indent === 1) {
28350
+ const indent = matches[0].length;
28351
+ const indentType = matches[1] ? INDENT_TYPE_SPACE : INDENT_TYPE_TAB;
28352
+ if (shouldIgnoreSingleSpace(ignoreSingleSpaces, indentType, indent)) {
28348
28353
  continue;
28349
28354
  }
28350
28355
  if (indentType !== previousIndentType) {
28351
28356
  previousSize = 0;
28352
28357
  }
28353
28358
  previousIndentType = indentType;
28354
- use = 1;
28355
- weight = 0;
28359
+ let use = 1;
28360
+ let weight = 0;
28356
28361
  const indentDifference = indent - previousSize;
28357
28362
  previousSize = indent;
28358
28363
  if (indentDifference === 0) {
28359
28364
  use = 0;
28360
28365
  weight = 1;
28361
28366
  } else {
28362
- const absoluteIndentDifference = indentDifference > 0 ? indentDifference : -indentDifference;
28367
+ const absoluteIndentDifference = Math.abs(indentDifference);
28368
+ if (shouldIgnoreSingleSpace(ignoreSingleSpaces, indentType, absoluteIndentDifference)) {
28369
+ continue;
28370
+ }
28363
28371
  key = encodeIndentsKey(indentType, absoluteIndentDifference);
28364
28372
  }
28365
- entry = indents.get(key);
28366
- entry = entry === void 0 ? [1, 0] : [entry[0] + use, entry[1] + weight];
28367
- indents.set(key, entry);
28373
+ const entry = indents.get(key);
28374
+ indents.set(key, entry === void 0 ? [1, 0] : [entry[0] + use, entry[1] + weight]);
28368
28375
  }
28369
28376
  }
28370
28377
  return indents;