storybook 10.1.0-alpha.3 → 10.1.0-alpha.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 (83) hide show
  1. package/dist/_browser-chunks/{chunk-C4XOKMDU.js → chunk-OWPZQM2D.js} +6 -3
  2. package/dist/_node-chunks/{builder-manager-GBWCUYRR.js → builder-manager-HXWPSC26.js} +13 -12
  3. package/dist/_node-chunks/camelcase-EPBTPRKM.js +18 -0
  4. package/dist/_node-chunks/chunk-5J4A3TMT.js +61 -0
  5. package/dist/_node-chunks/{chunk-YFBIEJ33.js → chunk-5N5IOGP5.js} +7 -7
  6. package/dist/_node-chunks/{chunk-JKWP2FKQ.js → chunk-6PMHAMVH.js} +7 -7
  7. package/dist/_node-chunks/{chunk-GMO24NTJ.js → chunk-AGAEDIW3.js} +7 -7
  8. package/dist/_node-chunks/{chunk-2JHIUWIN.js → chunk-ALUDPZO7.js} +7 -7
  9. package/dist/_node-chunks/{chunk-TZ7GUTJ4.js → chunk-B2ZH4DAZ.js} +7 -7
  10. package/dist/_node-chunks/{chunk-YJJWZPL7.js → chunk-BI2ELK6M.js} +36 -43
  11. package/dist/_node-chunks/{chunk-NYXHMPY4.js → chunk-BTM6MC3G.js} +7 -7
  12. package/dist/_node-chunks/{chunk-AX2PCJZ2.js → chunk-BXVT2NM5.js} +6 -6
  13. package/dist/_node-chunks/{chunk-NTX43F34.js → chunk-C7ZCWXID.js} +7 -7
  14. package/dist/_node-chunks/{chunk-5X7FGASE.js → chunk-CACFLAKV.js} +7 -7
  15. package/dist/_node-chunks/{chunk-5KDXQR2J.js → chunk-CPKCCBQ2.js} +7 -7
  16. package/dist/_node-chunks/{chunk-MDXYV4OF.js → chunk-E4M5YSPI.js} +15 -15
  17. package/dist/_node-chunks/{chunk-RLMJDF6S.js → chunk-ENL6NO7V.js} +8 -8
  18. package/dist/_node-chunks/{chunk-BNO5FB6B.js → chunk-F74NOPTY.js} +8 -8
  19. package/dist/_node-chunks/{chunk-HH57J4TX.js → chunk-GHP33MSW.js} +8 -8
  20. package/dist/_node-chunks/{chunk-TDLKTACT.js → chunk-H7C65LNN.js} +7 -7
  21. package/dist/_node-chunks/{chunk-C4UVY6FF.js → chunk-I7KSYHUC.js} +7 -7
  22. package/dist/_node-chunks/{chunk-SQAKXWVV.js → chunk-IQY7L7HV.js} +7 -7
  23. package/dist/_node-chunks/{chunk-ZQY3BNST.js → chunk-LNNX4NF3.js} +12 -12
  24. package/dist/_node-chunks/{chunk-N7XYNLCJ.js → chunk-MK7DAIA6.js} +7 -7
  25. package/dist/_node-chunks/{chunk-NCHBSJG3.js → chunk-MRNEYOX6.js} +21 -21
  26. package/dist/_node-chunks/{chunk-CKXP5RYA.js → chunk-N6PPZW7K.js} +9 -9
  27. package/dist/_node-chunks/{chunk-APKZWRTX.js → chunk-NAJMTFFS.js} +7 -7
  28. package/dist/_node-chunks/{chunk-TSKLBMF3.js → chunk-NBNSA2WK.js} +8 -8
  29. package/dist/_node-chunks/{chunk-B63HGQAB.js → chunk-PNFSTYNY.js} +9 -9
  30. package/dist/_node-chunks/{chunk-MPUDYIDW.js → chunk-R4SSZN6U.js} +7 -7
  31. package/dist/_node-chunks/{chunk-6U2QTN2E.js → chunk-TCQ4YEBJ.js} +7 -7
  32. package/dist/_node-chunks/{chunk-S32G4TCP.js → chunk-TKJXOGPC.js} +7 -7
  33. package/dist/_node-chunks/{chunk-FJWQKOXX.js → chunk-VGEK4ULN.js} +10 -10
  34. package/dist/_node-chunks/{chunk-NTH76OZA.js → chunk-Y3HWBQFU.js} +12 -12
  35. package/dist/_node-chunks/chunk-YEG4ZWC4.js +18 -0
  36. package/dist/_node-chunks/{chunk-T7KB265F.js → chunk-ZHTORJLU.js} +6 -6
  37. package/dist/_node-chunks/{dist-SQENNWFY.js → dist-5OMEVXWG.js} +9 -9
  38. package/dist/_node-chunks/{globby-CVPDLQ5Z.js → globby-JOCJRFYY.js} +9 -9
  39. package/dist/_node-chunks/{lib-4BTTMYE2.js → lib-DK7FCOVF.js} +7 -7
  40. package/dist/_node-chunks/{mdx-N42X6CFJ-ENVHI6CC.js → mdx-N42X6CFJ-2ORYN25H.js} +8 -8
  41. package/dist/_node-chunks/{p-limit-I2XW6GST.js → p-limit-ORC5I6UZ.js} +7 -7
  42. package/dist/_node-chunks/{plugin-O5PHZ367.js → plugin-CSHCSNVB.js} +10 -10
  43. package/dist/_node-chunks/{plugin-4NIE24IO.js → plugin-UGAK7KQM.js} +10 -10
  44. package/dist/_node-chunks/{webpack-inject-mocker-runtime-plugin-SVBN7WFH.js → webpack-inject-mocker-runtime-plugin-QALMSMBH.js} +10 -10
  45. package/dist/_node-chunks/{webpack-mock-plugin-XBV3VXVD.js → webpack-mock-plugin-OI4E4SOX.js} +9 -9
  46. package/dist/babel/index.js +11 -11
  47. package/dist/bin/core.js +11 -11
  48. package/dist/bin/dispatcher.js +11 -11
  49. package/dist/bin/loader.js +9 -9
  50. package/dist/cli/index.js +21 -21
  51. package/dist/common/index.js +20 -20
  52. package/dist/components/index.js +5744 -73
  53. package/dist/core-server/index.js +418 -251
  54. package/dist/core-server/presets/common-manager.js +14 -20
  55. package/dist/core-server/presets/common-override-preset.js +9 -9
  56. package/dist/core-server/presets/common-preset.js +23 -23
  57. package/dist/core-server/presets/webpack/loaders/storybook-mock-transform-loader.js +9 -9
  58. package/dist/core-server/presets/webpack/loaders/webpack-automock-loader.js +10 -10
  59. package/dist/csf/index.js +2 -2
  60. package/dist/csf-tools/index.d.ts +7 -0
  61. package/dist/csf-tools/index.js +9 -9
  62. package/dist/manager/globals-runtime.js +9 -5
  63. package/dist/manager/runtime.js +1 -1
  64. package/dist/manager-api/index.d.ts +1 -1
  65. package/dist/manager-api/index.js +1 -1
  66. package/dist/node-logger/index.d.ts +1 -1
  67. package/dist/node-logger/index.js +19 -19
  68. package/dist/preview-api/index.d.ts +68 -67
  69. package/dist/preview-api/index.js +5 -5
  70. package/dist/server-errors.js +10 -10
  71. package/dist/telemetry/index.js +24 -24
  72. package/dist/theming/create.d.ts +3 -2
  73. package/dist/theming/create.js +1 -1
  74. package/dist/theming/index.d.ts +5 -3
  75. package/dist/theming/index.js +2 -1
  76. package/dist/types/index.d.ts +4 -2
  77. package/package.json +1 -1
  78. package/dist/_browser-chunks/chunk-B3S3ROIP.js +0 -5810
  79. package/dist/_node-chunks/camelcase-2N6MD2HZ.js +0 -18
  80. package/dist/_node-chunks/chunk-D3NGJQDZ.js +0 -18
  81. package/dist/_node-chunks/chunk-LPNJ7PJY.js +0 -61
  82. package/dist/_browser-chunks/{chunk-W4QKLQSC.js → chunk-RW5PKMWM.js} +5 -5
  83. package/dist/_browser-chunks/{syntaxhighlighter-DK2ODWXH.js → syntaxhighlighter-CAVLW7PM.js} +4 -4
@@ -1,29 +1,29 @@
1
- import CJS_COMPAT_NODE_URL_bqgqh4d46dd from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_bqgqh4d46dd from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_bqgqh4d46dd from "node:module";
1
+ import CJS_COMPAT_NODE_URL_m7rjtu9xiiq from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_m7rjtu9xiiq from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_m7rjtu9xiiq from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_bqgqh4d46dd.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_bqgqh4d46dd.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_bqgqh4d46dd.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_m7rjtu9xiiq.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_m7rjtu9xiiq.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_m7rjtu9xiiq.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
  detectPnp
14
- } from "../_node-chunks/chunk-NTH76OZA.js";
14
+ } from "../_node-chunks/chunk-Y3HWBQFU.js";
15
15
  import {
16
16
  require_pretty_hrtime
17
- } from "../_node-chunks/chunk-GMO24NTJ.js";
17
+ } from "../_node-chunks/chunk-AGAEDIW3.js";
18
18
  import {
19
19
  boxen,
20
20
  require_string_width
21
- } from "../_node-chunks/chunk-RLMJDF6S.js";
22
- import "../_node-chunks/chunk-NTX43F34.js";
21
+ } from "../_node-chunks/chunk-ENL6NO7V.js";
22
+ import "../_node-chunks/chunk-C7ZCWXID.js";
23
23
  import {
24
24
  StatusTypeIdMismatchError,
25
25
  StorybookError
26
- } from "../_node-chunks/chunk-CKXP5RYA.js";
26
+ } from "../_node-chunks/chunk-N6PPZW7K.js";
27
27
  import {
28
28
  getErrorLevel,
29
29
  mapStaticDir,
@@ -31,63 +31,63 @@ import {
31
31
  sendTelemetryError,
32
32
  useStatics,
33
33
  withTelemetry
34
- } from "../_node-chunks/chunk-ZQY3BNST.js";
35
- import "../_node-chunks/chunk-N7XYNLCJ.js";
34
+ } from "../_node-chunks/chunk-LNNX4NF3.js";
35
+ import "../_node-chunks/chunk-MK7DAIA6.js";
36
36
  import {
37
37
  telemetry
38
- } from "../_node-chunks/chunk-MDXYV4OF.js";
39
- import "../_node-chunks/chunk-D3NGJQDZ.js";
38
+ } from "../_node-chunks/chunk-E4M5YSPI.js";
39
+ import "../_node-chunks/chunk-YEG4ZWC4.js";
40
40
  import {
41
41
  resolveImport,
42
42
  supportedExtensions,
43
43
  userOrAutoTitleFromSpecifier
44
- } from "../_node-chunks/chunk-NCHBSJG3.js";
45
- import "../_node-chunks/chunk-TZ7GUTJ4.js";
46
- import "../_node-chunks/chunk-LPNJ7PJY.js";
47
- import "../_node-chunks/chunk-HH57J4TX.js";
44
+ } from "../_node-chunks/chunk-MRNEYOX6.js";
45
+ import "../_node-chunks/chunk-B2ZH4DAZ.js";
46
+ import "../_node-chunks/chunk-5J4A3TMT.js";
47
+ import "../_node-chunks/chunk-GHP33MSW.js";
48
48
  import {
49
49
  optionalEnvToBoolean,
50
50
  require_cross_spawn
51
- } from "../_node-chunks/chunk-B63HGQAB.js";
51
+ } from "../_node-chunks/chunk-PNFSTYNY.js";
52
52
  import {
53
53
  up2 as up
54
- } from "../_node-chunks/chunk-5KDXQR2J.js";
55
- import "../_node-chunks/chunk-SQAKXWVV.js";
54
+ } from "../_node-chunks/chunk-CPKCCBQ2.js";
55
+ import "../_node-chunks/chunk-IQY7L7HV.js";
56
56
  import {
57
57
  invariant
58
- } from "../_node-chunks/chunk-5X7FGASE.js";
58
+ } from "../_node-chunks/chunk-CACFLAKV.js";
59
59
  import {
60
60
  importModule,
61
61
  resolvePackageDir
62
- } from "../_node-chunks/chunk-TSKLBMF3.js";
62
+ } from "../_node-chunks/chunk-NBNSA2WK.js";
63
63
  import {
64
64
  join,
65
65
  relative,
66
66
  resolve
67
- } from "../_node-chunks/chunk-6U2QTN2E.js";
67
+ } from "../_node-chunks/chunk-TCQ4YEBJ.js";
68
68
  import {
69
69
  require_prompts
70
- } from "../_node-chunks/chunk-NYXHMPY4.js";
71
- import "../_node-chunks/chunk-JKWP2FKQ.js";
70
+ } from "../_node-chunks/chunk-BTM6MC3G.js";
71
+ import "../_node-chunks/chunk-6PMHAMVH.js";
72
72
  import {
73
73
  slash
74
- } from "../_node-chunks/chunk-MPUDYIDW.js";
74
+ } from "../_node-chunks/chunk-R4SSZN6U.js";
75
75
  import {
76
76
  require_dist
77
- } from "../_node-chunks/chunk-S32G4TCP.js";
77
+ } from "../_node-chunks/chunk-TKJXOGPC.js";
78
78
  import {
79
79
  require_lib,
80
80
  require_src
81
- } from "../_node-chunks/chunk-TDLKTACT.js";
81
+ } from "../_node-chunks/chunk-H7C65LNN.js";
82
82
  import {
83
83
  require_picocolors
84
- } from "../_node-chunks/chunk-2JHIUWIN.js";
84
+ } from "../_node-chunks/chunk-ALUDPZO7.js";
85
85
  import {
86
86
  __commonJS,
87
87
  __name,
88
88
  __require,
89
89
  __toESM
90
- } from "../_node-chunks/chunk-T7KB265F.js";
90
+ } from "../_node-chunks/chunk-ZHTORJLU.js";
91
91
 
92
92
  // ../node_modules/tsconfig-paths/lib/filesystem.js
93
93
  var require_filesystem = __commonJS({
@@ -96,12 +96,12 @@ var require_filesystem = __commonJS({
96
96
  Object.defineProperty(exports, "__esModule", { value: true });
97
97
  exports.removeExtension = exports.fileExistsAsync = exports.readJsonFromDiskAsync = exports.readJsonFromDiskSync = exports.fileExistsSync = void 0;
98
98
  var fs6 = __require("fs");
99
- function fileExistsSync(path2) {
100
- if (!fs6.existsSync(path2)) {
99
+ function fileExistsSync(path3) {
100
+ if (!fs6.existsSync(path3)) {
101
101
  return false;
102
102
  }
103
103
  try {
104
- var stats = fs6.statSync(path2);
104
+ var stats = fs6.statSync(path3);
105
105
  return stats.isFile();
106
106
  } catch (err) {
107
107
  return false;
@@ -117,8 +117,8 @@ var require_filesystem = __commonJS({
117
117
  }
118
118
  __name(readJsonFromDiskSync, "readJsonFromDiskSync");
119
119
  exports.readJsonFromDiskSync = readJsonFromDiskSync;
120
- function readJsonFromDiskAsync(path2, callback) {
121
- fs6.readFile(path2, "utf8", function(err, result) {
120
+ function readJsonFromDiskAsync(path3, callback) {
121
+ fs6.readFile(path3, "utf8", function(err, result) {
122
122
  if (err || !result) {
123
123
  return callback();
124
124
  }
@@ -128,8 +128,8 @@ var require_filesystem = __commonJS({
128
128
  }
129
129
  __name(readJsonFromDiskAsync, "readJsonFromDiskAsync");
130
130
  exports.readJsonFromDiskAsync = readJsonFromDiskAsync;
131
- function fileExistsAsync(path2, callback2) {
132
- fs6.stat(path2, function(err, stats) {
131
+ function fileExistsAsync(path22, callback2) {
132
+ fs6.stat(path22, function(err, stats) {
133
133
  if (err) {
134
134
  return callback2(void 0, false);
135
135
  }
@@ -138,8 +138,8 @@ var require_filesystem = __commonJS({
138
138
  }
139
139
  __name(fileExistsAsync, "fileExistsAsync");
140
140
  exports.fileExistsAsync = fileExistsAsync;
141
- function removeExtension(path2) {
142
- return path2.substring(0, path2.lastIndexOf(".")) || path2;
141
+ function removeExtension(path3) {
142
+ return path3.substring(0, path3.lastIndexOf(".")) || path3;
143
143
  }
144
144
  __name(removeExtension, "removeExtension");
145
145
  exports.removeExtension = removeExtension;
@@ -152,7 +152,7 @@ var require_mapping_entry = __commonJS({
152
152
  "use strict";
153
153
  Object.defineProperty(exports, "__esModule", { value: true });
154
154
  exports.getAbsoluteMappingEntries = void 0;
155
- var path2 = __require("path");
155
+ var path3 = __require("path");
156
156
  function getAbsoluteMappingEntries(absoluteBaseUrl, paths, addMatchAll) {
157
157
  var sortedKeys = sortByLongestPrefix(Object.keys(paths));
158
158
  var absolutePaths = [];
@@ -161,7 +161,7 @@ var require_mapping_entry = __commonJS({
161
161
  absolutePaths.push({
162
162
  pattern: key,
163
163
  paths: paths[key].map(function(pathToResolve) {
164
- return path2.resolve(absoluteBaseUrl, pathToResolve);
164
+ return path3.resolve(absoluteBaseUrl, pathToResolve);
165
165
  })
166
166
  });
167
167
  }
@@ -195,7 +195,7 @@ var require_try_path = __commonJS({
195
195
  "use strict";
196
196
  Object.defineProperty(exports, "__esModule", { value: true });
197
197
  exports.exhaustiveTypeException = exports.getStrippedPath = exports.getPathsToTry = void 0;
198
- var path2 = __require("path");
198
+ var path3 = __require("path");
199
199
  var path_1 = __require("path");
200
200
  var filesystem_1 = require_filesystem();
201
201
  function getPathsToTry(extensions, absolutePathMappings, requestedModule) {
@@ -215,9 +215,9 @@ var require_try_path = __commonJS({
215
215
  }));
216
216
  pathsToTry.push({
217
217
  type: "package",
218
- path: path2.join(physicalPath, "/package.json")
218
+ path: path3.join(physicalPath, "/package.json")
219
219
  });
220
- var indexPath = path2.join(physicalPath, "/index");
220
+ var indexPath = path3.join(physicalPath, "/index");
221
221
  pathsToTry.push.apply(pathsToTry, extensions.map(function(e) {
222
222
  return { type: "index", path: indexPath + e };
223
223
  }));
@@ -273,7 +273,7 @@ var require_match_path_sync = __commonJS({
273
273
  "use strict";
274
274
  Object.defineProperty(exports, "__esModule", { value: true });
275
275
  exports.matchFromAbsolutePaths = exports.createMatchPath = void 0;
276
- var path2 = __require("path");
276
+ var path3 = __require("path");
277
277
  var Filesystem = require_filesystem();
278
278
  var MappingEntry = require_mapping_entry();
279
279
  var TryPath = require_try_path();
@@ -319,7 +319,7 @@ var require_match_path_sync = __commonJS({
319
319
  return obj[key];
320
320
  }, packageJson);
321
321
  if (candidateMapping && typeof candidateMapping === "string") {
322
- var candidateFilePath = path2.join(path2.dirname(packageJsonPath), candidateMapping);
322
+ var candidateFilePath = path3.join(path3.dirname(packageJsonPath), candidateMapping);
323
323
  if (fileExists2(candidateFilePath)) {
324
324
  return candidateFilePath;
325
325
  }
@@ -365,7 +365,7 @@ var require_match_path_async = __commonJS({
365
365
  "use strict";
366
366
  Object.defineProperty(exports, "__esModule", { value: true });
367
367
  exports.matchFromAbsolutePathsAsync = exports.createMatchPathAsync = void 0;
368
- var path2 = __require("path");
368
+ var path3 = __require("path");
369
369
  var TryPath = require_try_path();
370
370
  var MappingEntry = require_mapping_entry();
371
371
  var Filesystem = require_filesystem();
@@ -421,7 +421,7 @@ var require_match_path_async = __commonJS({
421
421
  if (typeof mainFieldMapping !== "string") {
422
422
  return tryNext();
423
423
  }
424
- var mappedFilePath = path2.join(path2.dirname(packageJsonPath), mainFieldMapping);
424
+ var mappedFilePath = path3.join(path3.dirname(packageJsonPath), mainFieldMapping);
425
425
  fileExistsAsync(mappedFilePath, function(err, exists) {
426
426
  if (err) {
427
427
  return doneCallback(err);
@@ -513,7 +513,7 @@ var require_tsconfig_loader = __commonJS({
513
513
  };
514
514
  Object.defineProperty(exports, "__esModule", { value: true });
515
515
  exports.loadTsconfig = exports.walkForTsConfig = exports.tsConfigLoader = void 0;
516
- var path2 = __require("path");
516
+ var path3 = __require("path");
517
517
  var fs6 = __require("fs");
518
518
  var JSON5 = require_lib();
519
519
  var StripBom = require_strip_bom();
@@ -545,14 +545,14 @@ var require_tsconfig_loader = __commonJS({
545
545
  __name(loadSyncDefault, "loadSyncDefault");
546
546
  function resolveConfigPath(cwd, filename) {
547
547
  if (filename) {
548
- var absolutePath = fs6.lstatSync(filename).isDirectory() ? path2.resolve(filename, "./tsconfig.json") : path2.resolve(cwd, filename);
548
+ var absolutePath = fs6.lstatSync(filename).isDirectory() ? path3.resolve(filename, "./tsconfig.json") : path3.resolve(cwd, filename);
549
549
  return absolutePath;
550
550
  }
551
551
  if (fs6.statSync(cwd).isFile()) {
552
- return path2.resolve(cwd);
552
+ return path3.resolve(cwd);
553
553
  }
554
554
  var configAbsolutePath = walkForTsConfig(cwd);
555
- return configAbsolutePath ? path2.resolve(configAbsolutePath) : void 0;
555
+ return configAbsolutePath ? path3.resolve(configAbsolutePath) : void 0;
556
556
  }
557
557
  __name(resolveConfigPath, "resolveConfigPath");
558
558
  function walkForTsConfig(directory, readdirSync2) {
@@ -564,10 +564,10 @@ var require_tsconfig_loader = __commonJS({
564
564
  for (var _i = 0, filesToCheck_1 = filesToCheck; _i < filesToCheck_1.length; _i++) {
565
565
  var fileToCheck = filesToCheck_1[_i];
566
566
  if (files.indexOf(fileToCheck) !== -1) {
567
- return path2.join(directory, fileToCheck);
567
+ return path3.join(directory, fileToCheck);
568
568
  }
569
569
  }
570
- var parentDirectory = path2.dirname(directory);
570
+ var parentDirectory = path3.dirname(directory);
571
571
  if (directory === parentDirectory) {
572
572
  return void 0;
573
573
  }
@@ -616,15 +616,15 @@ var require_tsconfig_loader = __commonJS({
616
616
  if (typeof extendedConfigValue === "string" && extendedConfigValue.indexOf(".json") === -1) {
617
617
  extendedConfigValue += ".json";
618
618
  }
619
- var currentDir = path2.dirname(configFilePath);
620
- var extendedConfigPath = path2.join(currentDir, extendedConfigValue);
619
+ var currentDir = path3.dirname(configFilePath);
620
+ var extendedConfigPath = path3.join(currentDir, extendedConfigValue);
621
621
  if (extendedConfigValue.indexOf("/") !== -1 && extendedConfigValue.indexOf(".") !== -1 && !existsSync3(extendedConfigPath)) {
622
- extendedConfigPath = path2.join(currentDir, "node_modules", extendedConfigValue);
622
+ extendedConfigPath = path3.join(currentDir, "node_modules", extendedConfigValue);
623
623
  }
624
624
  var config = loadTsconfig(extendedConfigPath, existsSync3, readFileSync) || {};
625
625
  if ((_a = config.compilerOptions) === null || _a === void 0 ? void 0 : _a.baseUrl) {
626
- var extendsDir = path2.dirname(extendedConfigValue);
627
- config.compilerOptions.baseUrl = path2.join(extendsDir, config.compilerOptions.baseUrl);
626
+ var extendsDir = path3.dirname(extendedConfigValue);
627
+ config.compilerOptions.baseUrl = path3.join(extendsDir, config.compilerOptions.baseUrl);
628
628
  }
629
629
  return config;
630
630
  }
@@ -645,7 +645,7 @@ var require_config_loader = __commonJS({
645
645
  Object.defineProperty(exports, "__esModule", { value: true });
646
646
  exports.configLoader = exports.loadConfig = void 0;
647
647
  var TsConfigLoader2 = require_tsconfig_loader();
648
- var path2 = __require("path");
648
+ var path3 = __require("path");
649
649
  function loadConfig3(cwd) {
650
650
  if (cwd === void 0) {
651
651
  cwd = process.cwd();
@@ -657,7 +657,7 @@ var require_config_loader = __commonJS({
657
657
  function configLoader(_a) {
658
658
  var cwd = _a.cwd, explicitParams = _a.explicitParams, _b = _a.tsConfigLoader, tsConfigLoader = _b === void 0 ? TsConfigLoader2.tsConfigLoader : _b;
659
659
  if (explicitParams) {
660
- var absoluteBaseUrl = path2.isAbsolute(explicitParams.baseUrl) ? explicitParams.baseUrl : path2.join(cwd, explicitParams.baseUrl);
660
+ var absoluteBaseUrl = path3.isAbsolute(explicitParams.baseUrl) ? explicitParams.baseUrl : path3.join(cwd, explicitParams.baseUrl);
661
661
  return {
662
662
  resultType: "success",
663
663
  configFileAbsolutePath: "",
@@ -684,7 +684,7 @@ var require_config_loader = __commonJS({
684
684
  resultType: "success",
685
685
  configFileAbsolutePath: loadResult.tsConfigPath,
686
686
  baseUrl: loadResult.baseUrl,
687
- absoluteBaseUrl: path2.resolve(path2.dirname(loadResult.tsConfigPath), loadResult.baseUrl || ""),
687
+ absoluteBaseUrl: path3.resolve(path3.dirname(loadResult.tsConfigPath), loadResult.baseUrl || ""),
688
688
  paths: loadResult.paths || {},
689
689
  addMatchAll: loadResult.baseUrl !== void 0
690
690
  };
@@ -2152,14 +2152,14 @@ var require_polyfills = __commonJS({
2152
2152
  fs6.fstatSync = statFixSync(fs6.fstatSync);
2153
2153
  fs6.lstatSync = statFixSync(fs6.lstatSync);
2154
2154
  if (fs6.chmod && !fs6.lchmod) {
2155
- fs6.lchmod = function(path2, mode, cb) {
2155
+ fs6.lchmod = function(path3, mode, cb) {
2156
2156
  if (cb) process.nextTick(cb);
2157
2157
  };
2158
2158
  fs6.lchmodSync = function() {
2159
2159
  };
2160
2160
  }
2161
2161
  if (fs6.chown && !fs6.lchown) {
2162
- fs6.lchown = function(path2, uid, gid, cb) {
2162
+ fs6.lchown = function(path3, uid, gid, cb) {
2163
2163
  if (cb) process.nextTick(cb);
2164
2164
  };
2165
2165
  fs6.lchownSync = function() {
@@ -2228,9 +2228,9 @@ var require_polyfills = __commonJS({
2228
2228
  };
2229
2229
  }(fs6.readSync);
2230
2230
  function patchLchmod(fs7) {
2231
- fs7.lchmod = function(path2, mode, callback) {
2231
+ fs7.lchmod = function(path3, mode, callback) {
2232
2232
  fs7.open(
2233
- path2,
2233
+ path3,
2234
2234
  constants.O_WRONLY | constants.O_SYMLINK,
2235
2235
  mode,
2236
2236
  function(err, fd) {
@@ -2246,8 +2246,8 @@ var require_polyfills = __commonJS({
2246
2246
  }
2247
2247
  );
2248
2248
  };
2249
- fs7.lchmodSync = function(path2, mode) {
2250
- var fd = fs7.openSync(path2, constants.O_WRONLY | constants.O_SYMLINK, mode);
2249
+ fs7.lchmodSync = function(path3, mode) {
2250
+ var fd = fs7.openSync(path3, constants.O_WRONLY | constants.O_SYMLINK, mode);
2251
2251
  var threw = true;
2252
2252
  var ret;
2253
2253
  try {
@@ -2269,8 +2269,8 @@ var require_polyfills = __commonJS({
2269
2269
  __name(patchLchmod, "patchLchmod");
2270
2270
  function patchLutimes(fs7) {
2271
2271
  if (constants.hasOwnProperty("O_SYMLINK") && fs7.futimes) {
2272
- fs7.lutimes = function(path2, at, mt, cb) {
2273
- fs7.open(path2, constants.O_SYMLINK, function(er, fd) {
2272
+ fs7.lutimes = function(path3, at, mt, cb) {
2273
+ fs7.open(path3, constants.O_SYMLINK, function(er, fd) {
2274
2274
  if (er) {
2275
2275
  if (cb) cb(er);
2276
2276
  return;
@@ -2282,8 +2282,8 @@ var require_polyfills = __commonJS({
2282
2282
  });
2283
2283
  });
2284
2284
  };
2285
- fs7.lutimesSync = function(path2, at, mt) {
2286
- var fd = fs7.openSync(path2, constants.O_SYMLINK);
2285
+ fs7.lutimesSync = function(path3, at, mt) {
2286
+ var fd = fs7.openSync(path3, constants.O_SYMLINK);
2287
2287
  var ret;
2288
2288
  var threw = true;
2289
2289
  try {
@@ -2411,11 +2411,11 @@ var require_legacy_streams = __commonJS({
2411
2411
  ReadStream,
2412
2412
  WriteStream
2413
2413
  };
2414
- function ReadStream(path2, options) {
2415
- if (!(this instanceof ReadStream)) return new ReadStream(path2, options);
2414
+ function ReadStream(path3, options) {
2415
+ if (!(this instanceof ReadStream)) return new ReadStream(path3, options);
2416
2416
  Stream.call(this);
2417
2417
  var self2 = this;
2418
- this.path = path2;
2418
+ this.path = path3;
2419
2419
  this.fd = null;
2420
2420
  this.readable = true;
2421
2421
  this.paused = false;
@@ -2461,10 +2461,10 @@ var require_legacy_streams = __commonJS({
2461
2461
  });
2462
2462
  }
2463
2463
  __name(ReadStream, "ReadStream");
2464
- function WriteStream(path2, options) {
2465
- if (!(this instanceof WriteStream)) return new WriteStream(path2, options);
2464
+ function WriteStream(path3, options) {
2465
+ if (!(this instanceof WriteStream)) return new WriteStream(path3, options);
2466
2466
  Stream.call(this);
2467
- this.path = path2;
2467
+ this.path = path3;
2468
2468
  this.fd = null;
2469
2469
  this.writable = true;
2470
2470
  this.flags = "w";
@@ -2614,14 +2614,14 @@ var require_graceful_fs = __commonJS({
2614
2614
  fs7.createWriteStream = createWriteStream2;
2615
2615
  var fs$readFile = fs7.readFile;
2616
2616
  fs7.readFile = readFile5;
2617
- function readFile5(path2, options, cb) {
2617
+ function readFile5(path3, options, cb) {
2618
2618
  if (typeof options === "function")
2619
2619
  cb = options, options = null;
2620
- return go$readFile(path2, options, cb);
2621
- function go$readFile(path3, options2, cb2, startTime) {
2622
- return fs$readFile(path3, options2, function(err) {
2620
+ return go$readFile(path3, options, cb);
2621
+ function go$readFile(path4, options2, cb2, startTime) {
2622
+ return fs$readFile(path4, options2, function(err) {
2623
2623
  if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
2624
- enqueue([go$readFile, [path3, options2, cb2], err, startTime || Date.now(), Date.now()]);
2624
+ enqueue([go$readFile, [path4, options2, cb2], err, startTime || Date.now(), Date.now()]);
2625
2625
  else {
2626
2626
  if (typeof cb2 === "function")
2627
2627
  cb2.apply(this, arguments);
@@ -2633,14 +2633,14 @@ var require_graceful_fs = __commonJS({
2633
2633
  __name(readFile5, "readFile");
2634
2634
  var fs$writeFile = fs7.writeFile;
2635
2635
  fs7.writeFile = writeFile5;
2636
- function writeFile5(path2, data, options, cb) {
2636
+ function writeFile5(path3, data, options, cb) {
2637
2637
  if (typeof options === "function")
2638
2638
  cb = options, options = null;
2639
- return go$writeFile(path2, data, options, cb);
2640
- function go$writeFile(path3, data2, options2, cb2, startTime) {
2641
- return fs$writeFile(path3, data2, options2, function(err) {
2639
+ return go$writeFile(path3, data, options, cb);
2640
+ function go$writeFile(path4, data2, options2, cb2, startTime) {
2641
+ return fs$writeFile(path4, data2, options2, function(err) {
2642
2642
  if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
2643
- enqueue([go$writeFile, [path3, data2, options2, cb2], err, startTime || Date.now(), Date.now()]);
2643
+ enqueue([go$writeFile, [path4, data2, options2, cb2], err, startTime || Date.now(), Date.now()]);
2644
2644
  else {
2645
2645
  if (typeof cb2 === "function")
2646
2646
  cb2.apply(this, arguments);
@@ -2653,14 +2653,14 @@ var require_graceful_fs = __commonJS({
2653
2653
  var fs$appendFile = fs7.appendFile;
2654
2654
  if (fs$appendFile)
2655
2655
  fs7.appendFile = appendFile;
2656
- function appendFile(path2, data, options, cb) {
2656
+ function appendFile(path3, data, options, cb) {
2657
2657
  if (typeof options === "function")
2658
2658
  cb = options, options = null;
2659
- return go$appendFile(path2, data, options, cb);
2660
- function go$appendFile(path3, data2, options2, cb2, startTime) {
2661
- return fs$appendFile(path3, data2, options2, function(err) {
2659
+ return go$appendFile(path3, data, options, cb);
2660
+ function go$appendFile(path4, data2, options2, cb2, startTime) {
2661
+ return fs$appendFile(path4, data2, options2, function(err) {
2662
2662
  if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
2663
- enqueue([go$appendFile, [path3, data2, options2, cb2], err, startTime || Date.now(), Date.now()]);
2663
+ enqueue([go$appendFile, [path4, data2, options2, cb2], err, startTime || Date.now(), Date.now()]);
2664
2664
  else {
2665
2665
  if (typeof cb2 === "function")
2666
2666
  cb2.apply(this, arguments);
@@ -2695,31 +2695,31 @@ var require_graceful_fs = __commonJS({
2695
2695
  var fs$readdir = fs7.readdir;
2696
2696
  fs7.readdir = readdir;
2697
2697
  var noReaddirOptionVersions = /^v[0-5]\./;
2698
- function readdir(path2, options, cb) {
2698
+ function readdir(path3, options, cb) {
2699
2699
  if (typeof options === "function")
2700
2700
  cb = options, options = null;
2701
- var go$readdir = noReaddirOptionVersions.test(process.version) ? /* @__PURE__ */ __name(function go$readdir2(path3, options2, cb2, startTime) {
2702
- return fs$readdir(path3, fs$readdirCallback(
2703
- path3,
2701
+ var go$readdir = noReaddirOptionVersions.test(process.version) ? /* @__PURE__ */ __name(function go$readdir2(path4, options2, cb2, startTime) {
2702
+ return fs$readdir(path4, fs$readdirCallback(
2703
+ path4,
2704
2704
  options2,
2705
2705
  cb2,
2706
2706
  startTime
2707
2707
  ));
2708
- }, "go$readdir") : /* @__PURE__ */ __name(function go$readdir2(path3, options2, cb2, startTime) {
2709
- return fs$readdir(path3, options2, fs$readdirCallback(
2710
- path3,
2708
+ }, "go$readdir") : /* @__PURE__ */ __name(function go$readdir2(path4, options2, cb2, startTime) {
2709
+ return fs$readdir(path4, options2, fs$readdirCallback(
2710
+ path4,
2711
2711
  options2,
2712
2712
  cb2,
2713
2713
  startTime
2714
2714
  ));
2715
2715
  }, "go$readdir");
2716
- return go$readdir(path2, options, cb);
2717
- function fs$readdirCallback(path3, options2, cb2, startTime) {
2716
+ return go$readdir(path3, options, cb);
2717
+ function fs$readdirCallback(path4, options2, cb2, startTime) {
2718
2718
  return function(err, files) {
2719
2719
  if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
2720
2720
  enqueue([
2721
2721
  go$readdir,
2722
- [path3, options2, cb2],
2722
+ [path4, options2, cb2],
2723
2723
  err,
2724
2724
  startTime || Date.now(),
2725
2725
  Date.now()
@@ -2792,7 +2792,7 @@ var require_graceful_fs = __commonJS({
2792
2792
  enumerable: true,
2793
2793
  configurable: true
2794
2794
  });
2795
- function ReadStream(path2, options) {
2795
+ function ReadStream(path3, options) {
2796
2796
  if (this instanceof ReadStream)
2797
2797
  return fs$ReadStream.apply(this, arguments), this;
2798
2798
  else
@@ -2814,7 +2814,7 @@ var require_graceful_fs = __commonJS({
2814
2814
  });
2815
2815
  }
2816
2816
  __name(ReadStream$open, "ReadStream$open");
2817
- function WriteStream(path2, options) {
2817
+ function WriteStream(path3, options) {
2818
2818
  if (this instanceof WriteStream)
2819
2819
  return fs$WriteStream.apply(this, arguments), this;
2820
2820
  else
@@ -2834,24 +2834,24 @@ var require_graceful_fs = __commonJS({
2834
2834
  });
2835
2835
  }
2836
2836
  __name(WriteStream$open, "WriteStream$open");
2837
- function createReadStream(path2, options) {
2838
- return new fs7.ReadStream(path2, options);
2837
+ function createReadStream(path3, options) {
2838
+ return new fs7.ReadStream(path3, options);
2839
2839
  }
2840
2840
  __name(createReadStream, "createReadStream");
2841
- function createWriteStream2(path2, options) {
2842
- return new fs7.WriteStream(path2, options);
2841
+ function createWriteStream2(path3, options) {
2842
+ return new fs7.WriteStream(path3, options);
2843
2843
  }
2844
2844
  __name(createWriteStream2, "createWriteStream");
2845
2845
  var fs$open = fs7.open;
2846
2846
  fs7.open = open2;
2847
- function open2(path2, flags, mode, cb) {
2847
+ function open2(path3, flags, mode, cb) {
2848
2848
  if (typeof mode === "function")
2849
2849
  cb = mode, mode = null;
2850
- return go$open(path2, flags, mode, cb);
2851
- function go$open(path3, flags2, mode2, cb2, startTime) {
2852
- return fs$open(path3, flags2, mode2, function(err, fd) {
2850
+ return go$open(path3, flags, mode, cb);
2851
+ function go$open(path4, flags2, mode2, cb2, startTime) {
2852
+ return fs$open(path4, flags2, mode2, function(err, fd) {
2853
2853
  if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
2854
- enqueue([go$open, [path3, flags2, mode2, cb2], err, startTime || Date.now(), Date.now()]);
2854
+ enqueue([go$open, [path4, flags2, mode2, cb2], err, startTime || Date.now(), Date.now()]);
2855
2855
  else {
2856
2856
  if (typeof cb2 === "function")
2857
2857
  cb2.apply(this, arguments);
@@ -2924,7 +2924,7 @@ var require_graceful_fs = __commonJS({
2924
2924
  var require_reducePlan = __commonJS({
2925
2925
  "../node_modules/watchpack/lib/reducePlan.js"(exports, module) {
2926
2926
  "use strict";
2927
- var path2 = __require("path");
2927
+ var path3 = __require("path");
2928
2928
  module.exports = (plan, limit) => {
2929
2929
  const treeMap = /* @__PURE__ */ new Map();
2930
2930
  for (const [filePath, value] of plan) {
@@ -2939,7 +2939,7 @@ var require_reducePlan = __commonJS({
2939
2939
  }
2940
2940
  let currentCount = treeMap.size;
2941
2941
  for (const node of treeMap.values()) {
2942
- const parentPath = path2.dirname(node.filePath);
2942
+ const parentPath = path3.dirname(node.filePath);
2943
2943
  if (parentPath !== node.filePath) {
2944
2944
  let parent = treeMap.get(parentPath);
2945
2945
  if (parent === void 0) {
@@ -3034,7 +3034,7 @@ var require_watchEventSource = __commonJS({
3034
3034
  "../node_modules/watchpack/lib/watchEventSource.js"(exports) {
3035
3035
  "use strict";
3036
3036
  var fs6 = __require("fs");
3037
- var path2 = __require("path");
3037
+ var path3 = __require("path");
3038
3038
  var { EventEmitter } = __require("events");
3039
3039
  var reducePlan = require_reducePlan();
3040
3040
  var IS_OSX = __require("os").platform() === "darwin";
@@ -3056,7 +3056,7 @@ var require_watchEventSource = __commonJS({
3056
3056
  __name(createEPERMError, "createEPERMError");
3057
3057
  function createHandleChangeEvent(watcher, filePath, handleChangeEvent) {
3058
3058
  return (type, filename) => {
3059
- if (type === "rename" && path2.isAbsolute(filename) && path2.basename(filename) === path2.basename(filePath)) {
3059
+ if (type === "rename" && path3.isAbsolute(filename) && path3.basename(filename) === path3.basename(filePath)) {
3060
3060
  if (!IS_OSX) {
3061
3061
  watcher.emit("error", createEPERMError(filename));
3062
3062
  }
@@ -3143,7 +3143,7 @@ var require_watchEventSource = __commonJS({
3143
3143
  w.emit("change", type);
3144
3144
  }
3145
3145
  } else {
3146
- const dir = path2.dirname(filename);
3146
+ const dir = path3.dirname(filename);
3147
3147
  const watchers = this.mapPathToWatchers.get(dir);
3148
3148
  if (recursiveWatcherLogging) {
3149
3149
  process.stderr.write(
@@ -3153,7 +3153,7 @@ var require_watchEventSource = __commonJS({
3153
3153
  }
3154
3154
  if (watchers === void 0) return;
3155
3155
  for (const w of watchers) {
3156
- w.emit("change", type, path2.basename(filename));
3156
+ w.emit("change", type, path3.basename(filename));
3157
3157
  }
3158
3158
  }
3159
3159
  });
@@ -3272,7 +3272,7 @@ var require_watchEventSource = __commonJS({
3272
3272
  }
3273
3273
  for (const watcher of recursiveWatchers.values()) {
3274
3274
  for (const [w, subpath] of watcher.getWatchers()) {
3275
- addWatcher(w, path2.join(watcher.rootPath, subpath));
3275
+ addWatcher(w, path3.join(watcher.rootPath, subpath));
3276
3276
  }
3277
3277
  }
3278
3278
  for (const watcher of directWatchers.values()) {
@@ -3328,7 +3328,7 @@ var require_watchEventSource = __commonJS({
3328
3328
  recursiveWatcher.add(filePath, watcher);
3329
3329
  return watcher;
3330
3330
  }
3331
- const parent = path2.dirname(current);
3331
+ const parent = path3.dirname(current);
3332
3332
  if (parent === current) break;
3333
3333
  current = parent;
3334
3334
  }
@@ -3359,7 +3359,7 @@ var require_DirectoryWatcher = __commonJS({
3359
3359
  "use strict";
3360
3360
  var EventEmitter = __require("events").EventEmitter;
3361
3361
  var fs6 = require_graceful_fs();
3362
- var path2 = __require("path");
3362
+ var path3 = __require("path");
3363
3363
  var watchEventSource = require_watchEventSource();
3364
3364
  var EXISTANCE_ONLY_TIME_ENTRY = Object.freeze({});
3365
3365
  var FS_ACCURACY = 2e3;
@@ -3455,8 +3455,8 @@ var require_DirectoryWatcher = __commonJS({
3455
3455
  this.onWatcherError(err);
3456
3456
  }
3457
3457
  }
3458
- forEachWatcher(path3, fn) {
3459
- const watchers = this.watchers.get(withoutCase(path3));
3458
+ forEachWatcher(path4, fn) {
3459
+ const watchers = this.watchers.get(withoutCase(path4));
3460
3460
  if (watchers !== void 0) {
3461
3461
  for (const w of watchers) {
3462
3462
  fn(w);
@@ -3684,7 +3684,7 @@ var require_DirectoryWatcher = __commonJS({
3684
3684
  this.doScan(false);
3685
3685
  return;
3686
3686
  }
3687
- const filePath = path2.join(this.path, filename);
3687
+ const filePath = path3.join(this.path, filename);
3688
3688
  if (this.ignored(filePath)) return;
3689
3689
  if (this._activeEvents.get(filename) === void 0) {
3690
3690
  this._activeEvents.set(filename, false);
@@ -3702,7 +3702,7 @@ var require_DirectoryWatcher = __commonJS({
3702
3702
  if (err.code !== "ENOENT" && err.code !== "EPERM" && err.code !== "EBUSY") {
3703
3703
  this.onStatsError(err);
3704
3704
  } else {
3705
- if (filename === path2.basename(this.path)) {
3705
+ if (filename === path3.basename(this.path)) {
3706
3706
  if (!fs6.existsSync(this.path)) {
3707
3707
  this.onDirectoryRemoved("stat failed");
3708
3708
  }
@@ -3782,8 +3782,8 @@ var require_DirectoryWatcher = __commonJS({
3782
3782
  }
3783
3783
  watchInParentDirectory() {
3784
3784
  if (!this.parentWatcher) {
3785
- const parentDir = path2.dirname(this.path);
3786
- if (path2.dirname(parentDir) === parentDir) return;
3785
+ const parentDir = path3.dirname(this.path);
3786
+ if (path3.dirname(parentDir) === parentDir) return;
3787
3787
  this.parentWatcher = this.watcherManager.watchFile(this.path, 1);
3788
3788
  this.parentWatcher.on("change", (mtime, type) => {
3789
3789
  if (this.closed) return;
@@ -3853,7 +3853,7 @@ var require_DirectoryWatcher = __commonJS({
3853
3853
  return;
3854
3854
  }
3855
3855
  const itemPaths = new Set(
3856
- items.map((item) => path2.join(this.path, item.normalize("NFC")))
3856
+ items.map((item) => path3.join(this.path, item.normalize("NFC")))
3857
3857
  );
3858
3858
  for (const file of this.files.keys()) {
3859
3859
  if (!itemPaths.has(file)) {
@@ -3962,9 +3962,9 @@ var require_DirectoryWatcher = __commonJS({
3962
3962
  if (!this.initialScan) {
3963
3963
  for (const watchers of this.watchers.values()) {
3964
3964
  for (const watcher of watchers) {
3965
- const path3 = watcher.path;
3966
- if (!Object.prototype.hasOwnProperty.call(obj, path3)) {
3967
- obj[path3] = null;
3965
+ const path4 = watcher.path;
3966
+ if (!Object.prototype.hasOwnProperty.call(obj, path4)) {
3967
+ obj[path4] = null;
3968
3968
  }
3969
3969
  }
3970
3970
  }
@@ -4004,9 +4004,9 @@ var require_DirectoryWatcher = __commonJS({
4004
4004
  if (!this.initialScan) {
4005
4005
  for (const watchers of this.watchers.values()) {
4006
4006
  for (const watcher of watchers) {
4007
- const path3 = watcher.path;
4008
- if (!fileTimestamps.has(path3)) {
4009
- fileTimestamps.set(path3, null);
4007
+ const path4 = watcher.path;
4008
+ if (!fileTimestamps.has(path4)) {
4009
+ fileTimestamps.set(path4, null);
4010
4010
  }
4011
4011
  }
4012
4012
  }
@@ -4057,7 +4057,7 @@ var require_DirectoryWatcher = __commonJS({
4057
4057
  var require_getWatcherManager = __commonJS({
4058
4058
  "../node_modules/watchpack/lib/getWatcherManager.js"(exports, module) {
4059
4059
  "use strict";
4060
- var path2 = __require("path");
4060
+ var path3 = __require("path");
4061
4061
  var DirectoryWatcher = require_DirectoryWatcher();
4062
4062
  var WatcherManager = class {
4063
4063
  static {
@@ -4080,7 +4080,7 @@ var require_getWatcherManager = __commonJS({
4080
4080
  return watcher;
4081
4081
  }
4082
4082
  watchFile(p, startTime) {
4083
- const directory = path2.dirname(p);
4083
+ const directory = path3.dirname(p);
4084
4084
  if (directory === p) return null;
4085
4085
  return this.getDirectoryWatcher(directory).watch(p, startTime);
4086
4086
  }
@@ -4105,7 +4105,7 @@ var require_LinkResolver = __commonJS({
4105
4105
  "../node_modules/watchpack/lib/LinkResolver.js"(exports, module) {
4106
4106
  "use strict";
4107
4107
  var fs6 = __require("fs");
4108
- var path2 = __require("path");
4108
+ var path3 = __require("path");
4109
4109
  var EXPECTED_ERRORS = /* @__PURE__ */ new Set(["EINVAL", "ENOENT"]);
4110
4110
  if (process.platform === "win32") EXPECTED_ERRORS.add("UNKNOWN");
4111
4111
  var LinkResolver = class {
@@ -4124,7 +4124,7 @@ var require_LinkResolver = __commonJS({
4124
4124
  if (cacheEntry !== void 0) {
4125
4125
  return cacheEntry;
4126
4126
  }
4127
- const parent = path2.dirname(file);
4127
+ const parent = path3.dirname(file);
4128
4128
  if (parent === file) {
4129
4129
  const result = Object.freeze([file]);
4130
4130
  this.cache.set(file, result);
@@ -4133,12 +4133,12 @@ var require_LinkResolver = __commonJS({
4133
4133
  const parentResolved = this.resolve(parent);
4134
4134
  let realFile = file;
4135
4135
  if (parentResolved[0] !== parent) {
4136
- const basename4 = path2.basename(file);
4137
- realFile = path2.resolve(parentResolved[0], basename4);
4136
+ const basename4 = path3.basename(file);
4137
+ realFile = path3.resolve(parentResolved[0], basename4);
4138
4138
  }
4139
4139
  try {
4140
4140
  const linkContent = fs6.readlinkSync(realFile);
4141
- const resolvedLink = path2.resolve(parentResolved[0], linkContent);
4141
+ const resolvedLink = path3.resolve(parentResolved[0], linkContent);
4142
4142
  const linkResolved = this.resolve(resolvedLink);
4143
4143
  let result;
4144
4144
  if (linkResolved.length > 1 && parentResolved.length > 1) {
@@ -4458,7 +4458,7 @@ var require_watchpack = __commonJS({
4458
4458
  const fileWatchers = this.fileWatchers;
4459
4459
  const directoryWatchers = this.directoryWatchers;
4460
4460
  const ignored = this.watcherOptions.ignored;
4461
- const filter = /* @__PURE__ */ __name((path2) => !ignored(path2), "filter");
4461
+ const filter = /* @__PURE__ */ __name((path3) => !ignored(path3), "filter");
4462
4462
  const addToMap = /* @__PURE__ */ __name((map, key, item) => {
4463
4463
  const list = map.get(key);
4464
4464
  if (list === void 0) {
@@ -6049,18 +6049,18 @@ var require_dist2 = __commonJS({
6049
6049
  }
6050
6050
  __name(toKey, "toKey");
6051
6051
  var toKey_default = toKey;
6052
- function baseGet(object, path2) {
6053
- path2 = castPath_default(path2, object);
6054
- var index = 0, length = path2.length;
6052
+ function baseGet(object, path3) {
6053
+ path3 = castPath_default(path3, object);
6054
+ var index = 0, length = path3.length;
6055
6055
  while (object != null && index < length) {
6056
- object = object[toKey_default(path2[index++])];
6056
+ object = object[toKey_default(path3[index++])];
6057
6057
  }
6058
6058
  return index && index == length ? object : void 0;
6059
6059
  }
6060
6060
  __name(baseGet, "baseGet");
6061
6061
  var baseGet_default = baseGet;
6062
- function get(object, path2, defaultValue) {
6063
- var result = object == null ? void 0 : baseGet_default(object, path2);
6062
+ function get(object, path3, defaultValue) {
6063
+ var result = object == null ? void 0 : baseGet_default(object, path3);
6064
6064
  return result === void 0 ? defaultValue : result;
6065
6065
  }
6066
6066
  __name(get, "get");
@@ -8490,6 +8490,7 @@ import { global as global2 } from "@storybook/global";
8490
8490
  var import_picocolors4 = __toESM(require_picocolors(), 1);
8491
8491
 
8492
8492
  // src/core-server/manifest.ts
8493
+ import path from "node:path";
8493
8494
  import { groupBy } from "storybook/internal/common";
8494
8495
  function renderManifestComponentsPage(manifest) {
8495
8496
  const entries = Object.entries(manifest?.components ?? {}).sort(
@@ -8498,22 +8499,22 @@ function renderManifestComponentsPage(manifest) {
8498
8499
  const analyses = entries.map(([, c]) => analyzeComponent(c));
8499
8500
  const totals = {
8500
8501
  components: entries.length,
8501
- componentsWithError: analyses.filter((a) => a.hasComponentError).length,
8502
- componentsWithWarnings: analyses.filter((a) => a.hasWarns).length,
8503
- examples: analyses.reduce((sum, a) => sum + a.totalExamples, 0),
8504
- exampleErrors: analyses.reduce((sum, a) => sum + a.exampleErrors, 0)
8502
+ componentsWithPropTypeError: analyses.filter((a) => a.hasPropTypeError).length,
8503
+ infos: analyses.filter((a) => a.hasWarns).length,
8504
+ stories: analyses.reduce((sum, a) => sum + a.totalStories, 0),
8505
+ storyErrors: analyses.reduce((sum, a) => sum + a.storyErrors, 0)
8505
8506
  };
8506
8507
  const allPill = `<a class="filter-pill all" data-k="all" href="#filter-all">All</a>`;
8507
- const compErrorsPill = totals.componentsWithError > 0 ? `<a class="filter-pill err" data-k="errors" href="#filter-errors">${totals.componentsWithError}/${totals.components} component ${plural(totals.componentsWithError, "error")}</a>` : `<span class="filter-pill ok" aria-disabled="true">${totals.components} components ok</span>`;
8508
- const compWarningsPill = totals.componentsWithWarnings > 0 ? `<a class="filter-pill warn" data-k="warnings" href="#filter-warnings">${totals.componentsWithWarnings}/${totals.components} component ${plural(totals.componentsWithWarnings, "warning")}</a>` : "";
8509
- const examplesPill = totals.exampleErrors > 0 ? `<a class="filter-pill err" data-k="example-errors" href="#filter-example-errors">${totals.exampleErrors}/${totals.examples} example errors</a>` : `<span class="filter-pill ok" aria-disabled="true">${totals.examples} examples ok</span>`;
8508
+ const compErrorsPill = totals.componentsWithPropTypeError > 0 ? `<a class="filter-pill err" data-k="errors" href="#filter-errors">${totals.componentsWithPropTypeError}/${totals.components} prop type ${plural(totals.componentsWithPropTypeError, "error")}</a>` : `<span class="filter-pill ok" aria-disabled="true">${totals.components} components ok</span>`;
8509
+ const compInfosPill = totals.infos > 0 ? `<a class="filter-pill info" data-k="infos" href="#filter-infos">${totals.infos}/${totals.components} ${plural(totals.infos, "info", "infos")}</a>` : "";
8510
+ const storiesPill = totals.storyErrors > 0 ? `<a class="filter-pill err" data-k="story-errors" href="#filter-story-errors">${totals.storyErrors}/${totals.stories} story errors</a>` : `<span class="filter-pill ok" aria-disabled="true">${totals.stories} ${plural(totals.stories, "story", "stories")} ok</span>`;
8510
8511
  const grid = entries.map(([key, c], idx) => renderComponentCard(key, c, `${idx}`)).join("");
8511
8512
  const errorGroups = Object.entries(
8512
8513
  groupBy(
8513
8514
  entries.map(([, it]) => it).filter((it) => it.error),
8514
8515
  (manifest2) => manifest2.error?.name ?? "Error"
8515
8516
  )
8516
- );
8517
+ ).sort(([, a], [, b]) => b.length - a.length);
8517
8518
  const errorGroupsHTML = errorGroups.map(([error, grouped]) => {
8518
8519
  const id = error.toLowerCase().replace(/[^a-z0-9]+/g, "-");
8519
8520
  const headerText = `${esc(error)}`;
@@ -8543,10 +8544,10 @@ function renderManifestComponentsPage(manifest) {
8543
8544
  --muted: #9aa0a6;
8544
8545
  --fg: #e8eaed;
8545
8546
  --ok: #22c55e;
8546
- --warn: #b08900;
8547
+ --info: #1e88e5;
8547
8548
  --err: #c62828;
8548
8549
  --ok-bg: #0c1a13;
8549
- --warn-bg: #1a1608;
8550
+ --info-bg: #0c1624;
8550
8551
  --err-bg: #1a0e0e;
8551
8552
  --chip: #1f2330;
8552
8553
  --border: #2b2f3a;
@@ -8622,10 +8623,10 @@ function renderManifestComponentsPage(manifest) {
8622
8623
  background: color-mix(in srgb, var(--ok) 18%, #000);
8623
8624
  }
8624
8625
 
8625
- .filter-pill.warn {
8626
- color: #ffd666;
8627
- border-color: color-mix(in srgb, var(--warn) 55%, var(--border));
8628
- background: var(--warn-bg);
8626
+ .filter-pill.info {
8627
+ color: #b3d9ff;
8628
+ border-color: color-mix(in srgb, var(--info) 55%, var(--border));
8629
+ background: var(--info-bg);
8629
8630
  }
8630
8631
 
8631
8632
  .filter-pill.err {
@@ -8654,8 +8655,8 @@ function renderManifestComponentsPage(manifest) {
8654
8655
  /* Selected top pill ring via :target */
8655
8656
  #filter-all:target ~ header .filter-pill[data-k='all'],
8656
8657
  #filter-errors:target ~ header .filter-pill[data-k='errors'],
8657
- #filter-warnings:target ~ header .filter-pill[data-k='warnings'],
8658
- #filter-example-errors:target ~ header .filter-pill[data-k='example-errors'] {
8658
+ #filter-infos:target ~ header .filter-pill[data-k='infos'],
8659
+ #filter-story-errors:target ~ header .filter-pill[data-k='story-errors'] {
8659
8660
  box-shadow: 0 0 0 var(--active-ring) currentColor;
8660
8661
  border-color: currentColor;
8661
8662
  }
@@ -8663,19 +8664,19 @@ function renderManifestComponentsPage(manifest) {
8663
8664
  /* Hidden targets for filtering */
8664
8665
  #filter-all,
8665
8666
  #filter-errors,
8666
- #filter-warnings,
8667
- #filter-example-errors {
8667
+ #filter-infos,
8668
+ #filter-story-errors {
8668
8669
  display: none;
8669
8670
  }
8670
8671
 
8671
8672
  main {
8672
- padding: 24px 0 40px;
8673
+ padding: 36px 0 40px;
8673
8674
  }
8674
8675
 
8675
8676
  .grid {
8676
8677
  display: grid;
8677
8678
  grid-template-columns: 1fr;
8678
- gap: 14px;
8679
+ gap: 18px;
8679
8680
  }
8680
8681
 
8681
8682
  /* one card per row */
@@ -8759,9 +8760,9 @@ function renderManifestComponentsPage(manifest) {
8759
8760
  border-color: color-mix(in srgb, var(--ok) 55%, var(--border));
8760
8761
  }
8761
8762
 
8762
- .badge.warn {
8763
- color: #ffd666;
8764
- border-color: color-mix(in srgb, var(--warn) 55%, var(--border));
8763
+ .badge.info {
8764
+ color: #b3d9ff;
8765
+ border-color: color-mix(in srgb, var(--info) 55%, var(--border));
8765
8766
  }
8766
8767
 
8767
8768
  .badge.err {
@@ -8775,8 +8776,9 @@ function renderManifestComponentsPage(manifest) {
8775
8776
 
8776
8777
  /* 1px ring on active toggle */
8777
8778
  .tg-err:checked + label.as-toggle,
8778
- .tg-warn:checked + label.as-toggle,
8779
- .tg-ex:checked + label.as-toggle {
8779
+ .tg-info:checked + label.as-toggle,
8780
+ .tg-stories:checked + label.as-toggle,
8781
+ .tg-props:checked + label.as-toggle {
8780
8782
  box-shadow: 0 0 0 var(--active-ring) currentColor;
8781
8783
  border-color: currentColor;
8782
8784
  }
@@ -8795,16 +8797,21 @@ function renderManifestComponentsPage(manifest) {
8795
8797
  display: grid;
8796
8798
  }
8797
8799
 
8798
- .tg-warn:checked ~ .panels .panel-warn {
8800
+ .tg-info:checked ~ .panels .panel-info {
8799
8801
  display: grid;
8800
8802
  gap: 8px;
8801
8803
  }
8802
8804
 
8803
- .tg-ex:checked ~ .panels .panel-ex {
8805
+ .tg-stories:checked ~ .panels .panel-stories {
8804
8806
  display: grid;
8807
+ gap: 8px;
8805
8808
  }
8806
8809
 
8807
- /* Colored notes for component error + warnings */
8810
+ .tg-props:checked ~ .panels .panel-props {
8811
+ display: grid;
8812
+ }
8813
+
8814
+ /* Colored notes for prop type error + info */
8808
8815
  .note {
8809
8816
  padding: 12px;
8810
8817
  border: 1px solid var(--border);
@@ -8817,10 +8824,16 @@ function renderManifestComponentsPage(manifest) {
8817
8824
  color: #ffd1d4;
8818
8825
  }
8819
8826
 
8820
- .note.warn {
8821
- border-color: color-mix(in srgb, var(--warn) 55%, var(--border));
8822
- background: var(--warn-bg);
8823
- color: #ffe9a6;
8827
+ .note.info {
8828
+ border-color: color-mix(in srgb, var(--info) 55%, var(--border));
8829
+ background: var(--info-bg);
8830
+ color: #d6e8ff;
8831
+ }
8832
+
8833
+ .note.ok {
8834
+ border-color: color-mix(in srgb, var(--ok) 55%, var(--border));
8835
+ background: var(--ok-bg);
8836
+ color: var(--fg);
8824
8837
  }
8825
8838
 
8826
8839
  .note-title {
@@ -8832,7 +8845,7 @@ function renderManifestComponentsPage(manifest) {
8832
8845
  white-space: normal;
8833
8846
  }
8834
8847
 
8835
- /* Example error cards */
8848
+ /* Story error cards */
8836
8849
  .ex {
8837
8850
  padding: 10px;
8838
8851
  border: 1px solid var(--border);
@@ -8942,15 +8955,15 @@ function renderManifestComponentsPage(manifest) {
8942
8955
  }
8943
8956
 
8944
8957
  /* CSS-only filtering of cards via top pills */
8945
- #filter-errors:target ~ main .card:not(.has-error):not(.has-example-error) {
8958
+ #filter-errors:target ~ main .card:not(.has-error):not(.has-story-error) {
8946
8959
  display: none;
8947
8960
  }
8948
8961
 
8949
- #filter-warnings:target ~ main .card:not(.has-warn) {
8962
+ #filter-infos:target ~ main .card:not(.has-info) {
8950
8963
  display: none;
8951
8964
  }
8952
8965
 
8953
- #filter-example-errors:target ~ main .card:not(.has-example-error) {
8966
+ #filter-story-errors:target ~ main .card:not(.has-story-error) {
8954
8967
  display: none;
8955
8968
  }
8956
8969
 
@@ -8972,36 +8985,64 @@ function renderManifestComponentsPage(manifest) {
8972
8985
  .card > .tg-err:checked ~ .panels .panel-err {
8973
8986
  display: grid;
8974
8987
  }
8975
-
8976
- .card > .tg-warn:checked ~ .panels .panel-warn {
8988
+
8989
+ .card > .tg-info:checked ~ .panels .panel-info {
8977
8990
  display: grid;
8978
8991
  }
8979
-
8980
- .card > .tg-ex:checked ~ .panels .panel-ex {
8992
+
8993
+ .card > .tg-stories:checked ~ .panels .panel-stories {
8981
8994
  display: grid;
8982
8995
  }
8983
8996
 
8997
+ /* Add vertical spacing around panels only when any panel is visible */
8998
+ .card > .tg-err:checked ~ .panels,
8999
+ .card > .tg-info:checked ~ .panels,
9000
+ .card > .tg-stories:checked ~ .panels,
9001
+ .card > .tg-props:checked ~ .panels {
9002
+ margin: 10px 0;
9003
+ }
9004
+
8984
9005
  /* Optional: a subtle 1px ring on the active badge, using :has() if available */
8985
9006
  @supports selector(.card:has(.tg-err:checked)) {
8986
9007
  .card:has(.tg-err:checked) label[for$='-err'],
8987
- .card:has(.tg-warn:checked) label[for$='-warn'],
8988
- .card:has(.tg-ex:checked) label[for$='-ex'] {
9008
+ .card:has(.tg-info:checked) label[for$='-info'],
9009
+ .card:has(.tg-stories:checked) label[for$='-stories'],
9010
+ .card:has(.tg-props:checked) label[for$='-props'] {
8989
9011
  box-shadow: 0 0 0 1px currentColor;
8990
9012
  border-color: currentColor;
8991
9013
  }
8992
9014
  }
9015
+
9016
+ /* Wrap long lines in code blocks at ~120 characters */
9017
+ pre, code {
9018
+ font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
9019
+ }
9020
+ pre {
9021
+ white-space: pre-wrap;
9022
+ overflow-wrap: anywhere;
9023
+ word-break: break-word;
9024
+ overflow-x: auto; /* fallback for extremely long tokens */
9025
+ margin: 8px 0 0;
9026
+ }
9027
+ pre > code {
9028
+ display: block;
9029
+ white-space: inherit;
9030
+ overflow-wrap: inherit;
9031
+ word-break: inherit;
9032
+ inline-size: min(100%, 120ch);
9033
+ }
8993
9034
  </style>
8994
9035
  </head>
8995
9036
  <body>
8996
9037
  <!-- Hidden targets for the top-level filters -->
8997
9038
  <span id="filter-all"></span>
8998
9039
  <span id="filter-errors"></span>
8999
- <span id="filter-warnings"></span>
9000
- <span id="filter-example-errors"></span>
9040
+ <span id="filter-infos"></span>
9041
+ <span id="filter-story-errors"></span>
9001
9042
  <header>
9002
9043
  <div class="wrap">
9003
9044
  <h1>Components Manifest</h1>
9004
- <div class="summary">${allPill}${compErrorsPill}${compWarningsPill}${examplesPill}</div>
9045
+ <div class="summary">${allPill}${compErrorsPill}${compInfosPill}${storiesPill}</div>
9005
9046
  </div>
9006
9047
  </header>
9007
9048
  <main>
@@ -9009,7 +9050,7 @@ function renderManifestComponentsPage(manifest) {
9009
9050
  <div class="grid" role="list">
9010
9051
  ${grid || `<div class="card"><div class="head"><div class="hint">No components.</div></div></div>`}
9011
9052
  </div>
9012
- ${errorGroups.length ? `<div class="error-groups" role="region" aria-label="Error groups">${errorGroupsHTML}</div>` : ""}
9053
+ ${errorGroups.length ? `<div class="error-groups" role="region" aria-label="Prop type error groups">${errorGroupsHTML}</div>` : ""}
9013
9054
  </div>
9014
9055
  </main>
9015
9056
  </body>
@@ -9022,30 +9063,28 @@ var esc = /* @__PURE__ */ __name((s) => String(s ?? "").replace(
9022
9063
  ), "esc");
9023
9064
  var plural = /* @__PURE__ */ __name((n, one, many = `${one}s`) => n === 1 ? one : many, "plural");
9024
9065
  function analyzeComponent(c) {
9025
- const hasComponentError = !!c.error;
9066
+ const hasPropTypeError = !!c.error;
9026
9067
  const warns = [];
9027
9068
  if (!c.description?.trim()) {
9028
- warns.push(
9029
- "No description found. Write a jsdoc comment such as /** Component description */ on your component or on your stories meta."
9030
- );
9069
+ warns.push("No description found. Write a jsdoc comment such as /** Component description */.");
9031
9070
  }
9032
9071
  if (!c.import?.trim()) {
9033
9072
  warns.push(
9034
9073
  `Specify an @import jsdoc tag on your component or your stories meta such as @import import { ${c.name} } from 'my-design-system';`
9035
9074
  );
9036
9075
  }
9037
- const totalExamples = c.examples?.length ?? 0;
9038
- const exampleErrors = (c.examples ?? []).filter((e) => !!e?.error).length;
9039
- const exampleOk = totalExamples - exampleErrors;
9040
- const hasAnyError = hasComponentError || exampleErrors > 0;
9076
+ const totalStories = c.stories?.length ?? 0;
9077
+ const storyErrors = (c.stories ?? []).filter((e) => !!e?.error).length;
9078
+ const storyOk = totalStories - storyErrors;
9079
+ const hasAnyError = hasPropTypeError || storyErrors > 0;
9041
9080
  return {
9042
- hasComponentError,
9081
+ hasPropTypeError,
9043
9082
  hasAnyError,
9044
9083
  hasWarns: warns.length > 0,
9045
9084
  warns,
9046
- totalExamples,
9047
- exampleErrors,
9048
- exampleOk
9085
+ totalStories,
9086
+ storyErrors,
9087
+ storyOk
9049
9088
  };
9050
9089
  }
9051
9090
  __name(analyzeComponent, "analyzeComponent");
@@ -9060,11 +9099,27 @@ __name(note, "note");
9060
9099
  function renderComponentCard(key, c, id) {
9061
9100
  const a = analyzeComponent(c);
9062
9101
  const statusDot = a.hasAnyError ? "dot-err" : "dot-ok";
9063
- const errorExamples = (c.examples ?? []).filter((ex) => !!ex?.error);
9102
+ const allStories = c.stories ?? [];
9103
+ const errorStories = allStories.filter((ex) => !!ex?.error);
9104
+ const okStories = allStories.filter((ex) => !ex?.error);
9064
9105
  const slug = `c-${id}-${(c.id || key).toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "")}`;
9065
- const componentErrorBadge = a.hasComponentError ? `<label for="${slug}-err" class="badge err as-toggle">component error</label>` : "";
9066
- const warningsBadge = a.hasWarns ? `<label for="${slug}-warn" class="badge warn as-toggle">${a.warns.length} ${plural(a.warns.length, "warning")}</label>` : "";
9067
- const examplesBadge = a.exampleErrors > 0 ? `<label for="${slug}-ex" class="badge err as-toggle">${a.exampleErrors}/${a.totalExamples} example errors</label>` : `<span class="badge ok">${a.totalExamples} examples ok</span>`;
9106
+ const componentErrorBadge = a.hasPropTypeError ? `<label for="${slug}-err" class="badge err as-toggle">prop type error</label>` : "";
9107
+ const infosBadge = a.hasWarns ? `<label for="${slug}-info" class="badge info as-toggle">${a.warns.length} ${plural(a.warns.length, "info", "infos")}</label>` : "";
9108
+ const storiesBadge = a.totalStories > 0 ? `<label for="${slug}-stories" class="badge ${a.storyErrors > 0 ? "err" : "ok"} as-toggle">${a.storyErrors > 0 ? `${a.storyErrors}/${a.totalStories} story errors` : `${a.totalStories} ${plural(a.totalStories, "story", "stories")}`}</label>` : "";
9109
+ const reactDocgen = !a.hasPropTypeError && "reactDocgen" in c && c.reactDocgen;
9110
+ const parsedDocgen = reactDocgen ? parseReactDocgen(reactDocgen) : void 0;
9111
+ const propEntries = parsedDocgen ? Object.entries(parsedDocgen.props ?? {}) : [];
9112
+ const propTypesBadge = !a.hasPropTypeError && propEntries.length > 0 ? `<label for="${slug}-props" class="badge ok as-toggle">${propEntries.length} ${plural(propEntries.length, "prop type")}</label>` : "";
9113
+ const primaryBadge = componentErrorBadge || propTypesBadge;
9114
+ const propsCode = propEntries.length > 0 ? propEntries.sort(([aName], [bName]) => aName.localeCompare(bName)).map(([propName, info]) => {
9115
+ const description = (info?.description ?? "").trim();
9116
+ const t = (info?.type ?? "any").trim();
9117
+ const optional = info?.required ? "" : "?";
9118
+ const defaultVal = (info?.defaultValue ?? "").trim();
9119
+ const def = defaultVal ? ` = ${defaultVal}` : "";
9120
+ const doc = ["/**", ...description.split("\n").map((line) => ` * ${line}`), " */"].join("\n") + "\n";
9121
+ return `${description ? doc : ""}${propName}${optional}: ${t}${def}`;
9122
+ }).join("\n\n") : "";
9068
9123
  const tags = c.jsDocTags && typeof c.jsDocTags === "object" ? Object.entries(c.jsDocTags).flatMap(
9069
9124
  ([k, v]) => (Array.isArray(v) ? v : [v]).map(
9070
9125
  (val) => `<span class="chip">${esc(k)}: ${esc(val)}</span>`
@@ -9074,18 +9129,18 @@ function renderComponentCard(key, c, id) {
9074
9129
  return `
9075
9130
  <article
9076
9131
  class="card
9077
- ${a.hasComponentError ? "has-error" : "no-error"}
9078
- ${a.hasWarns ? "has-warn" : "no-warn"}
9079
- ${a.exampleErrors ? "has-example-error" : "no-example-error"}"
9132
+ ${a.hasPropTypeError ? "has-error" : "no-error"}
9133
+ ${a.hasWarns ? "has-info" : "no-info"}
9134
+ ${a.storyErrors ? "has-story-error" : "no-story-error"}"
9080
9135
  role="listitem"
9081
9136
  aria-label="${esc(c.name || key)}">
9082
9137
  <div class="head">
9083
9138
  <div class="title">
9084
9139
  <h2><span class="status-dot ${statusDot}"></span> ${esc(c.name || key)}</h2>
9085
9140
  <div class="badges">
9086
- ${componentErrorBadge}
9087
- ${warningsBadge}
9088
- ${examplesBadge}
9141
+ ${primaryBadge}
9142
+ ${infosBadge}
9143
+ ${storiesBadge}
9089
9144
  </div>
9090
9145
  </div>
9091
9146
  <div class="meta" title="${esc(c.path)}">${esc(c.id)} \xB7 ${esc(c.path)}</div>
@@ -9095,38 +9150,149 @@ function renderComponentCard(key, c, id) {
9095
9150
  </div>
9096
9151
 
9097
9152
  <!-- \u2B07\uFE0F Hidden toggles must be siblings BEFORE .panels -->
9098
- ${a.hasComponentError ? `<input id="${slug}-err" class="tg tg-err" type="checkbox" hidden />` : ""}
9099
- ${a.hasWarns ? `<input id="${slug}-warn" class="tg tg-warn" type="checkbox" hidden />` : ""}
9100
- ${a.exampleErrors > 0 ? `<input id="${slug}-ex" class="tg tg-ex" type="checkbox" hidden />` : ""}
9153
+ ${a.hasPropTypeError ? `<input id="${slug}-err" class="tg tg-err" type="checkbox" hidden />` : ""}
9154
+ ${a.hasWarns ? `<input id="${slug}-info" class="tg tg-info" type="checkbox" hidden />` : ""}
9155
+ ${a.totalStories > 0 ? `<input id="${slug}-stories" class="tg tg-stories" type="checkbox" hidden />` : ""}
9156
+ ${!a.hasPropTypeError && propEntries.length > 0 ? `<input id="${slug}-props" class="tg tg-props" type="checkbox" hidden />` : ""}
9101
9157
 
9102
9158
  <div class="panels">
9103
- ${a.hasComponentError ? `
9159
+ ${a.hasPropTypeError ? `
9104
9160
  <div class="panel panel-err">
9105
- ${note("Component error", `<pre><code>${esc(c.error?.message || "Unknown error")}</code></pre>`, "err")}
9161
+ ${note("Prop type error", `<pre><code>${esc(c.error?.message || "Unknown error")}</code></pre>`, "err")}
9106
9162
  </div>` : ""}
9107
9163
  ${a.hasWarns ? `
9108
- <div class="panel panel-warn">
9109
- ${a.warns.map((w) => note("Warning", esc(w), "warn")).join("")}
9164
+ <div class="panel panel-info">
9165
+ ${a.warns.map((w) => note("Info", esc(w), "info")).join("")}
9166
+ </div>` : ""}
9167
+ ${!a.hasPropTypeError && propEntries.length > 0 ? `
9168
+ <div class="panel panel-props">
9169
+ <div class="note ok">
9170
+ <div class="row">
9171
+ <span class="ex-name">Prop types</span>
9172
+ <span class="badge ok">${propEntries.length} ${plural(propEntries.length, "prop type")}</span>
9173
+ </div>
9174
+ <pre><code>Component: ${reactDocgen?.definedInFile ? esc(path.relative(process.cwd(), reactDocgen.definedInFile)) : ""}${reactDocgen?.exportName ? "::" + esc(reactDocgen?.exportName) : ""}</code></pre>
9175
+ <pre><code>Props:</code></pre>
9176
+ <pre><code>${esc(propsCode)}</code></pre>
9177
+ </div>
9110
9178
  </div>` : ""}
9111
- ${a.exampleErrors > 0 ? `
9112
- <div class="panel panel-ex">
9113
- ${errorExamples.map(
9179
+ ${a.totalStories > 0 ? `
9180
+ <div class="panel panel-stories">
9181
+ ${errorStories.map(
9114
9182
  (ex, j) => `
9115
- <div class="ex err">
9183
+ <div class="note err">
9116
9184
  <div class="row">
9117
- <span class="status-dot dot-err"></span>
9118
- <span class="ex-name">${esc(ex?.name ?? `Example ${j + 1}`)}</span>
9119
- <span class="badge err">example error</span>
9185
+ <span class="ex-name">${esc(ex.name)}</span>
9186
+ <span class="badge err">story error</span>
9120
9187
  </div>
9188
+ ${ex?.summary ? `<div class="hint">Summary: ${esc(ex.summary)}</div>` : ""}
9189
+ ${ex?.description ? `<div class="hint">${esc(ex.description)}</div>` : ""}
9121
9190
  ${ex?.snippet ? `<pre><code>${esc(ex.snippet)}</code></pre>` : ""}
9122
9191
  ${ex?.error?.message ? `<pre><code>${esc(ex.error.message)}</code></pre>` : ""}
9123
9192
  </div>`
9124
9193
  ).join("")}
9194
+
9195
+
9196
+ ${c.import ? `<div class="note ok">
9197
+ <div class="row">
9198
+ <span class="ex-name">Imports</span>
9199
+ </div>
9200
+ <pre><code>${c.import}</code></pre>
9201
+ </div>` : ""}
9202
+
9203
+ ${okStories.map(
9204
+ (ex) => `
9205
+ <div class="note ok">
9206
+ <div class="row">
9207
+ <span class="ex-name">${esc(ex.name)}</span>
9208
+ <span class="badge ok">story ok</span>
9209
+ </div>
9210
+ ${ex?.summary ? `<div>${esc(ex.summary)}</div>` : ""}
9211
+ ${ex?.description ? `<div class="hint">${esc(ex.description)}</div>` : ""}
9212
+ ${ex?.snippet ? `<pre><code>${esc(ex.snippet)}</code></pre>` : ""}
9213
+ </div>`
9214
+ ).join("")}
9125
9215
  </div>` : ""}
9126
9216
  </div>
9127
9217
  </article>`;
9128
9218
  }
9129
9219
  __name(renderComponentCard, "renderComponentCard");
9220
+ var parseReactDocgen = /* @__PURE__ */ __name((reactDocgen) => {
9221
+ const props = reactDocgen?.props ?? {};
9222
+ return {
9223
+ props: Object.fromEntries(
9224
+ Object.entries(props).map(([propName, prop]) => [
9225
+ propName,
9226
+ {
9227
+ description: prop.description,
9228
+ type: serializeTsType(prop.tsType ?? prop.type),
9229
+ defaultValue: prop.defaultValue?.value,
9230
+ required: prop.required
9231
+ }
9232
+ ])
9233
+ )
9234
+ };
9235
+ }, "parseReactDocgen");
9236
+ function serializeTsType(tsType) {
9237
+ if (!tsType) {
9238
+ return void 0;
9239
+ }
9240
+ if ("raw" in tsType && typeof tsType.raw === "string" && tsType.raw.trim().length > 0) {
9241
+ return tsType.raw;
9242
+ }
9243
+ if (!tsType.name) {
9244
+ return void 0;
9245
+ }
9246
+ if ("elements" in tsType) {
9247
+ if (tsType.name === "union") {
9248
+ const parts = (tsType.elements ?? []).map((el) => serializeTsType(el) ?? "unknown");
9249
+ return parts.join(" | ");
9250
+ }
9251
+ if (tsType.name === "intersection") {
9252
+ const parts = (tsType.elements ?? []).map((el) => serializeTsType(el) ?? "unknown");
9253
+ return parts.join(" & ");
9254
+ }
9255
+ if (tsType.name === "Array") {
9256
+ const el = (tsType.elements ?? [])[0];
9257
+ const inner = serializeTsType(el) ?? "unknown";
9258
+ return `${inner}[]`;
9259
+ }
9260
+ if (tsType.name === "tuple") {
9261
+ const parts = (tsType.elements ?? []).map((el) => serializeTsType(el) ?? "unknown");
9262
+ return `[${parts.join(", ")}]`;
9263
+ }
9264
+ }
9265
+ if ("value" in tsType && tsType.name === "literal") {
9266
+ return tsType.value;
9267
+ }
9268
+ if ("signature" in tsType && tsType.name === "signature") {
9269
+ if (tsType.type === "function") {
9270
+ const args = (tsType.signature?.arguments ?? []).map((a) => {
9271
+ const argType = serializeTsType(a.type) ?? "any";
9272
+ return `${a.name}: ${argType}`;
9273
+ });
9274
+ const ret = serializeTsType(tsType.signature?.return) ?? "void";
9275
+ return `(${args.join(", ")}) => ${ret}`;
9276
+ }
9277
+ if (tsType.type === "object") {
9278
+ const props = (tsType.signature?.properties ?? []).map((p) => {
9279
+ const req = Boolean(p.value?.required);
9280
+ const propType = serializeTsType(p.value) ?? "any";
9281
+ return `${p.key}${req ? "" : "?"}: ${propType}`;
9282
+ });
9283
+ return `{ ${props.join("; ")} }`;
9284
+ }
9285
+ return "unknown";
9286
+ }
9287
+ if ("elements" in tsType) {
9288
+ const inner = (tsType.elements ?? []).map((el) => serializeTsType(el) ?? "unknown");
9289
+ if (inner.length > 0) {
9290
+ return `${tsType.name}<${inner.join(", ")}>`;
9291
+ }
9292
+ }
9293
+ return tsType.name;
9294
+ }
9295
+ __name(serializeTsType, "serializeTsType");
9130
9296
 
9131
9297
  // src/core-server/utils/StoryIndexGenerator.ts
9132
9298
  import { existsSync } from "node:fs";
@@ -9360,7 +9526,7 @@ var StoryIndexGenerator = class _StoryIndexGenerator {
9360
9526
  }
9361
9527
  const pathToSubIndex = {};
9362
9528
  const fullGlob = slash(join2(specifier.directory, specifier.files));
9363
- const { globby } = await import("../_node-chunks/globby-CVPDLQ5Z.js");
9529
+ const { globby } = await import("../_node-chunks/globby-JOCJRFYY.js");
9364
9530
  const files = await globby(fullGlob, {
9365
9531
  absolute: true,
9366
9532
  cwd: workingDir,
@@ -9616,7 +9782,7 @@ var StoryIndexGenerator = class _StoryIndexGenerator {
9616
9782
  const normalizedPath = normalizeStoryPath(relativePath);
9617
9783
  const importPath = slash(normalizedPath);
9618
9784
  const content = await readFile(absolutePath, { encoding: "utf8" });
9619
- const { analyze } = await import("../_node-chunks/dist-SQENNWFY.js");
9785
+ const { analyze } = await import("../_node-chunks/dist-5OMEVXWG.js");
9620
9786
  const result = await analyze(content);
9621
9787
  if (result.isTemplate) {
9622
9788
  return false;
@@ -9959,7 +10125,7 @@ __name(print, "print");
9959
10125
  // src/core-server/utils/get-builders.ts
9960
10126
  import { MissingBuilderError } from "storybook/internal/server-errors";
9961
10127
  async function getManagerBuilder() {
9962
- return await import("../_node-chunks/builder-manager-GBWCUYRR.js");
10128
+ return await import("../_node-chunks/builder-manager-HXWPSC26.js");
9963
10129
  }
9964
10130
  __name(getManagerBuilder, "getManagerBuilder");
9965
10131
  async function getPreviewBuilder(resolvedPreviewBuilder) {
@@ -10198,7 +10364,7 @@ function watchStorySpecifiers(specifiers, options, onInvalidate) {
10198
10364
  // because the directory could already be within the files part (e.g. './x/foo/bar')
10199
10365
  basename2(specifier.files)
10200
10366
  );
10201
- const { globby } = await import("../_node-chunks/globby-CVPDLQ5Z.js");
10367
+ const { globby } = await import("../_node-chunks/globby-JOCJRFYY.js");
10202
10368
  const addedFiles = await globby(slash(dirGlob), commonGlobOptions2(dirGlob));
10203
10369
  addedFiles.forEach((filePath) => {
10204
10370
  const fileImportPath = toImportPath(filePath);
@@ -10262,9 +10428,9 @@ function useStoriesJson({
10262
10428
  const maybeInvalidate = debounce(() => serverChannel.emit(STORY_INDEX_INVALIDATED), DEBOUNCE, {
10263
10429
  edges: ["leading", "trailing"]
10264
10430
  });
10265
- watchStorySpecifiers(normalizedStories, { workingDir }, async (specifier, path2, removed) => {
10431
+ watchStorySpecifiers(normalizedStories, { workingDir }, async (specifier, path3, removed) => {
10266
10432
  const generator = await initializedStoryIndexGenerator;
10267
- generator.invalidate(specifier, path2, removed);
10433
+ generator.invalidate(specifier, path3, removed);
10268
10434
  maybeInvalidate();
10269
10435
  });
10270
10436
  if (configDir) {
@@ -10887,14 +11053,14 @@ var Polka = class _Polka extends Trouter {
10887
11053
  return this;
10888
11054
  }
10889
11055
  handler(req, res, next) {
10890
- let info = this.parse(req), path2 = info.pathname;
10891
- let obj = this.find(req.method, req.path = path2);
10892
- req.url = path2 + info.search;
11056
+ let info = this.parse(req), path3 = info.pathname;
11057
+ let obj = this.find(req.method, req.path = path3);
11058
+ req.url = path3 + info.search;
10893
11059
  req.originalUrl = req.originalUrl || req.url;
10894
11060
  req.query = info.query || {};
10895
11061
  req.search = info.search;
10896
11062
  req.params = obj.params;
10897
- if (path2.length > 1 && path2.indexOf("%", 1) !== -1) {
11063
+ if (path3.length > 1 && path3.indexOf("%", 1) !== -1) {
10898
11064
  for (let k in req.params) {
10899
11065
  try {
10900
11066
  req.params[k] = decodeURIComponent(req.params[k]);
@@ -11598,7 +11764,7 @@ import { logger as logger5 } from "storybook/internal/node-logger";
11598
11764
  // ../node_modules/open/index.js
11599
11765
  import process7 from "node:process";
11600
11766
  import { Buffer as Buffer2 } from "node:buffer";
11601
- import path from "node:path";
11767
+ import path2 from "node:path";
11602
11768
  import { fileURLToPath } from "node:url";
11603
11769
  import { promisify as promisify5 } from "node:util";
11604
11770
  import childProcess from "node:child_process";
@@ -11851,8 +12017,8 @@ __name(defaultBrowser2, "defaultBrowser");
11851
12017
 
11852
12018
  // ../node_modules/open/index.js
11853
12019
  var execFile5 = promisify5(childProcess.execFile);
11854
- var __dirname2 = path.dirname(fileURLToPath(import.meta.url));
11855
- var localXdgOpenPath = path.join(__dirname2, "xdg-open");
12020
+ var __dirname2 = path2.dirname(fileURLToPath(import.meta.url));
12021
+ var localXdgOpenPath = path2.join(__dirname2, "xdg-open");
11856
12022
  var { platform, arch } = process7;
11857
12023
  async function getWindowsDefaultBrowserFromWsl() {
11858
12024
  const powershellPath = await powerShellPath();
@@ -12444,7 +12610,8 @@ async function storybookDevServer(options) {
12444
12610
  } catch (e) {
12445
12611
  res.statusCode = 500;
12446
12612
  res.setHeader("Content-Type", "text/html; charset=utf-8");
12447
- res.end(`<pre>${e instanceof Error ? e.toString() : String(e)}</pre>`);
12613
+ invariant(e instanceof Error);
12614
+ res.end(`<pre>${e.stack}</pre>`);
12448
12615
  }
12449
12616
  });
12450
12617
  }
@@ -12773,14 +12940,14 @@ async function warnWhenUsingArgTypesRegex(previewConfigPath, config) {
12773
12940
  { code: previewContent, ast: babelParse(previewContent) }
12774
12941
  );
12775
12942
  file.path.traverse({
12776
- Identifier: /* @__PURE__ */ __name((path2) => {
12777
- if (path2.node.name === "argTypesRegex") {
12943
+ Identifier: /* @__PURE__ */ __name((path3) => {
12944
+ if (path3.node.name === "argTypesRegex") {
12778
12945
  const message = import_ts_dedent7.dedent`
12779
12946
  ${import_picocolors9.default.bold("Attention")}: We've detected that you're using ${import_picocolors9.default.cyan(
12780
12947
  "actions.argTypesRegex"
12781
12948
  )} together with the visual test addon:
12782
12949
 
12783
- ${path2.buildCodeFrameError(previewConfigPath).message}
12950
+ ${path3.buildCodeFrameError(previewConfigPath).message}
12784
12951
 
12785
12952
  We recommend removing the ${import_picocolors9.default.cyan(
12786
12953
  "argTypesRegex"