storybook 10.1.0-alpha.2 → 10.1.0-alpha.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (76) hide show
  1. package/dist/_node-chunks/{builder-manager-XRIDLU42.js → builder-manager-P652CU5Z.js} +12 -12
  2. package/dist/_node-chunks/camelcase-VADCJSEY.js +18 -0
  3. package/dist/_node-chunks/{chunk-D43KJFPO.js → chunk-3GTBPTCZ.js} +7 -7
  4. package/dist/_node-chunks/chunk-3OPGVNKX.js +18 -0
  5. package/dist/_node-chunks/{chunk-QFET4WIW.js → chunk-5A6EYMRK.js} +6 -6
  6. package/dist/_node-chunks/{chunk-ZN2EDLIJ.js → chunk-5E5YDTCQ.js} +7 -7
  7. package/dist/_node-chunks/{chunk-FWBIPR34.js → chunk-5NGUGC3U.js} +7 -7
  8. package/dist/_node-chunks/{chunk-2L3QAN3W.js → chunk-6DHXOOK2.js} +7 -7
  9. package/dist/_node-chunks/{chunk-BB3ZKTWJ.js → chunk-6VWT3H7R.js} +7 -7
  10. package/dist/_node-chunks/{chunk-GWSFLQQQ.js → chunk-7332Y23R.js} +1466 -148
  11. package/dist/_node-chunks/{chunk-EKPHXLN6.js → chunk-7C52H6S6.js} +7 -7
  12. package/dist/_node-chunks/{chunk-BAE27Z3H.js → chunk-7NSBLADO.js} +8 -8
  13. package/dist/_node-chunks/{chunk-VEZ6C62C.js → chunk-BHHNQ5GJ.js} +36 -43
  14. package/dist/_node-chunks/{chunk-Q5JSLT56.js → chunk-CAKHJEH6.js} +7 -7
  15. package/dist/_node-chunks/{chunk-ZI3WVJBS.js → chunk-CPI4IKLK.js} +8 -8
  16. package/dist/_node-chunks/{chunk-QS5MMNF7.js → chunk-FMLH3V5B.js} +7 -7
  17. package/dist/_node-chunks/{chunk-HFHQNHRU.js → chunk-FU2KCZJG.js} +9 -9
  18. package/dist/_node-chunks/{chunk-RIPSSVT6.js → chunk-GDOIF7E6.js} +7 -7
  19. package/dist/_node-chunks/{chunk-IK3K67LJ.js → chunk-HPERTMWB.js} +7 -7
  20. package/dist/_node-chunks/{chunk-OM4TBMP7.js → chunk-ICT62CX5.js} +7 -7
  21. package/dist/_node-chunks/{chunk-5RN3IJGF.js → chunk-JS5I7ZY6.js} +7 -7
  22. package/dist/_node-chunks/{chunk-ZTHTAFLY.js → chunk-K3K6H2BF.js} +12 -12
  23. package/dist/_node-chunks/{chunk-RQKELEE4.js → chunk-LPBJHVNR.js} +7 -7
  24. package/dist/_node-chunks/{chunk-FI6CLUVL.js → chunk-OXPHRY7P.js} +15 -15
  25. package/dist/_node-chunks/{chunk-3AR5SJTX.js → chunk-PCXGFAQ3.js} +7 -7
  26. package/dist/_node-chunks/{chunk-6TX2TV3E.js → chunk-PW7ECOTU.js} +12 -12
  27. package/dist/_node-chunks/{chunk-BYQZFXRF.js → chunk-RFAREF3S.js} +8 -8
  28. package/dist/_node-chunks/{chunk-XVXUF5GE.js → chunk-T6VOUSIY.js} +7 -7
  29. package/dist/_node-chunks/{chunk-LJPS53G5.js → chunk-TFBHPN6J.js} +7 -7
  30. package/dist/_node-chunks/{chunk-S6RYOO4I.js → chunk-TXDBGO2X.js} +9 -9
  31. package/dist/_node-chunks/{chunk-RUJOX3JR.js → chunk-VAAX75EL.js} +6 -6
  32. package/dist/_node-chunks/chunk-VCC35ZLQ.js +61 -0
  33. package/dist/_node-chunks/{chunk-L5J4RBU5.js → chunk-XCTASIYK.js} +8 -8
  34. package/dist/_node-chunks/{chunk-WHOPLOGE.js → chunk-XPBE544K.js} +7 -7
  35. package/dist/_node-chunks/{chunk-6WXUZSNC.js → chunk-YXC7LAMZ.js} +10 -10
  36. package/dist/_node-chunks/{dist-Q25SOSXX.js → dist-MCOAOC3B.js} +9 -9
  37. package/dist/_node-chunks/{globby-I54LIY47.js → globby-L3NPKIS7.js} +9 -9
  38. package/dist/_node-chunks/{lib-KQD2WJWJ.js → lib-ITTSFFC5.js} +7 -7
  39. package/dist/_node-chunks/{mdx-N42X6CFJ-CT3A7SBK.js → mdx-N42X6CFJ-YP4YCIZM.js} +8 -8
  40. package/dist/_node-chunks/{p-limit-2NBKFARM.js → p-limit-TTLWUU6D.js} +7 -7
  41. package/dist/_node-chunks/{plugin-RF5FICSG.js → plugin-C2OCVZYN.js} +10 -10
  42. package/dist/_node-chunks/{plugin-2CCCBGGB.js → plugin-OC5KWEJQ.js} +10 -10
  43. package/dist/_node-chunks/{webpack-inject-mocker-runtime-plugin-RY56E77L.js → webpack-inject-mocker-runtime-plugin-IRAPT6HV.js} +10 -10
  44. package/dist/_node-chunks/{webpack-mock-plugin-6VDFRSC4.js → webpack-mock-plugin-CFITLD44.js} +9 -9
  45. package/dist/babel/index.js +11 -11
  46. package/dist/bin/core.js +11 -11
  47. package/dist/bin/dispatcher.js +11 -11
  48. package/dist/bin/loader.js +9 -9
  49. package/dist/cli/index.js +21 -21
  50. package/dist/common/index.d.ts +190 -2
  51. package/dist/common/index.js +26 -20
  52. package/dist/components/index.js +5744 -73
  53. package/dist/core-server/index.js +833 -46
  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 +1 -1
  63. package/dist/manager-api/index.js +1 -1
  64. package/dist/node-logger/index.js +14 -14
  65. package/dist/preview-api/index.d.ts +68 -67
  66. package/dist/preview-api/index.js +5 -5
  67. package/dist/server-errors.js +10 -10
  68. package/dist/telemetry/index.js +24 -24
  69. package/dist/types/index.d.ts +4 -2
  70. package/package.json +2 -1
  71. package/dist/_browser-chunks/chunk-B3S3ROIP.js +0 -5810
  72. package/dist/_node-chunks/camelcase-3IIGGJ6N.js +0 -18
  73. package/dist/_node-chunks/chunk-N3ZE2FCS.js +0 -61
  74. package/dist/_node-chunks/chunk-U6VJQXTG.js +0 -18
  75. package/dist/_browser-chunks/{chunk-W4QKLQSC.js → chunk-RW5PKMWM.js} +5 -5
  76. package/dist/_browser-chunks/{syntaxhighlighter-DK2ODWXH.js → syntaxhighlighter-CAVLW7PM.js} +4 -4
@@ -1,10 +1,10 @@
1
- import CJS_COMPAT_NODE_URL_gimmxetvr7 from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_gimmxetvr7 from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_gimmxetvr7 from "node:module";
1
+ import CJS_COMPAT_NODE_URL_1ale42sn21 from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_1ale42sn21 from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_1ale42sn21 from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_gimmxetvr7.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_gimmxetvr7.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_gimmxetvr7.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_1ale42sn21.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_1ale42sn21.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_1ale42sn21.createRequire(import.meta.url);
8
8
 
9
9
  // ------------------------------------------------------------
10
10
  // end of CJS compatibility banner, injected by Storybook's esbuild configuration
@@ -22,11 +22,11 @@ import {
22
22
  recast,
23
23
  traverse,
24
24
  types
25
- } from "../_node-chunks/chunk-6WXUZSNC.js";
26
- import "../_node-chunks/chunk-FWBIPR34.js";
27
- import "../_node-chunks/chunk-QS5MMNF7.js";
28
- import "../_node-chunks/chunk-2L3QAN3W.js";
29
- import "../_node-chunks/chunk-RUJOX3JR.js";
25
+ } from "../_node-chunks/chunk-YXC7LAMZ.js";
26
+ import "../_node-chunks/chunk-5NGUGC3U.js";
27
+ import "../_node-chunks/chunk-FMLH3V5B.js";
28
+ import "../_node-chunks/chunk-6DHXOOK2.js";
29
+ import "../_node-chunks/chunk-VAAX75EL.js";
30
30
  var export_transformSync = import_core.transformSync;
31
31
  export {
32
32
  BabelFileClass,
package/dist/bin/core.js CHANGED
@@ -1,32 +1,32 @@
1
- import CJS_COMPAT_NODE_URL_gimmxetvr7 from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_gimmxetvr7 from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_gimmxetvr7 from "node:module";
1
+ import CJS_COMPAT_NODE_URL_1ale42sn21 from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_1ale42sn21 from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_1ale42sn21 from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_gimmxetvr7.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_gimmxetvr7.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_gimmxetvr7.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_1ale42sn21.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_1ale42sn21.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_1ale42sn21.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
  version
14
- } from "../_node-chunks/chunk-U6VJQXTG.js";
14
+ } from "../_node-chunks/chunk-3OPGVNKX.js";
15
15
  import {
16
16
  globalSettings
17
- } from "../_node-chunks/chunk-L5J4RBU5.js";
17
+ } from "../_node-chunks/chunk-XCTASIYK.js";
18
18
  import {
19
19
  require_dist
20
- } from "../_node-chunks/chunk-IK3K67LJ.js";
20
+ } from "../_node-chunks/chunk-HPERTMWB.js";
21
21
  import {
22
22
  require_picocolors
23
- } from "../_node-chunks/chunk-2L3QAN3W.js";
23
+ } from "../_node-chunks/chunk-6DHXOOK2.js";
24
24
  import {
25
25
  __commonJS,
26
26
  __name,
27
27
  __require,
28
28
  __toESM
29
- } from "../_node-chunks/chunk-RUJOX3JR.js";
29
+ } from "../_node-chunks/chunk-VAAX75EL.js";
30
30
 
31
31
  // ../node_modules/commander/lib/error.js
32
32
  var require_error = __commonJS({
@@ -1,31 +1,31 @@
1
1
  #!/usr/bin/env node
2
- import CJS_COMPAT_NODE_URL_gimmxetvr7 from 'node:url';
3
- import CJS_COMPAT_NODE_PATH_gimmxetvr7 from 'node:path';
4
- import CJS_COMPAT_NODE_MODULE_gimmxetvr7 from "node:module";
2
+ import CJS_COMPAT_NODE_URL_1ale42sn21 from 'node:url';
3
+ import CJS_COMPAT_NODE_PATH_1ale42sn21 from 'node:path';
4
+ import CJS_COMPAT_NODE_MODULE_1ale42sn21 from "node:module";
5
5
 
6
- var __filename = CJS_COMPAT_NODE_URL_gimmxetvr7.fileURLToPath(import.meta.url);
7
- var __dirname = CJS_COMPAT_NODE_PATH_gimmxetvr7.dirname(__filename);
8
- var require = CJS_COMPAT_NODE_MODULE_gimmxetvr7.createRequire(import.meta.url);
6
+ var __filename = CJS_COMPAT_NODE_URL_1ale42sn21.fileURLToPath(import.meta.url);
7
+ var __dirname = CJS_COMPAT_NODE_PATH_1ale42sn21.dirname(__filename);
8
+ var require = CJS_COMPAT_NODE_MODULE_1ale42sn21.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-N3ZE2FCS.js";
15
+ } from "../_node-chunks/chunk-VCC35ZLQ.js";
16
16
  import {
17
17
  resolvePackageDir
18
- } from "../_node-chunks/chunk-ZI3WVJBS.js";
18
+ } from "../_node-chunks/chunk-CPI4IKLK.js";
19
19
  import {
20
20
  join
21
- } from "../_node-chunks/chunk-LJPS53G5.js";
21
+ } from "../_node-chunks/chunk-TFBHPN6J.js";
22
22
  import {
23
23
  require_dist
24
- } from "../_node-chunks/chunk-IK3K67LJ.js";
24
+ } from "../_node-chunks/chunk-HPERTMWB.js";
25
25
  import {
26
26
  __name,
27
27
  __toESM
28
- } from "../_node-chunks/chunk-RUJOX3JR.js";
28
+ } from "../_node-chunks/chunk-VAAX75EL.js";
29
29
 
30
30
  // src/bin/dispatcher.ts
31
31
  import { spawn } from "node:child_process";
@@ -1,24 +1,24 @@
1
- import CJS_COMPAT_NODE_URL_gimmxetvr7 from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_gimmxetvr7 from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_gimmxetvr7 from "node:module";
1
+ import CJS_COMPAT_NODE_URL_1ale42sn21 from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_1ale42sn21 from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_1ale42sn21 from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_gimmxetvr7.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_gimmxetvr7.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_gimmxetvr7.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_1ale42sn21.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_1ale42sn21.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_1ale42sn21.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-QFET4WIW.js";
14
+ } from "../_node-chunks/chunk-5A6EYMRK.js";
15
15
  import {
16
16
  require_dist
17
- } from "../_node-chunks/chunk-IK3K67LJ.js";
17
+ } from "../_node-chunks/chunk-HPERTMWB.js";
18
18
  import {
19
19
  __name,
20
20
  __toESM
21
- } from "../_node-chunks/chunk-RUJOX3JR.js";
21
+ } from "../_node-chunks/chunk-VAAX75EL.js";
22
22
 
23
23
  // src/bin/loader.ts
24
24
  var import_ts_dedent = __toESM(require_dist(), 1);
package/dist/cli/index.js CHANGED
@@ -1,10 +1,10 @@
1
- import CJS_COMPAT_NODE_URL_gimmxetvr7 from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_gimmxetvr7 from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_gimmxetvr7 from "node:module";
1
+ import CJS_COMPAT_NODE_URL_1ale42sn21 from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_1ale42sn21 from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_1ale42sn21 from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_gimmxetvr7.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_gimmxetvr7.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_gimmxetvr7.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_1ale42sn21.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_1ale42sn21.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_1ale42sn21.createRequire(import.meta.url);
8
8
 
9
9
  // ------------------------------------------------------------
10
10
  // end of CJS compatibility banner, injected by Storybook's esbuild configuration
@@ -42,45 +42,45 @@ import {
42
42
  supportedTemplates,
43
43
  unsupportedTemplate,
44
44
  writeFileAsJson
45
- } from "../_node-chunks/chunk-6TX2TV3E.js";
45
+ } from "../_node-chunks/chunk-PW7ECOTU.js";
46
46
  import {
47
47
  boxen
48
- } from "../_node-chunks/chunk-BYQZFXRF.js";
49
- import "../_node-chunks/chunk-5RN3IJGF.js";
48
+ } from "../_node-chunks/chunk-RFAREF3S.js";
49
+ import "../_node-chunks/chunk-JS5I7ZY6.js";
50
50
  import {
51
51
  Settings,
52
52
  _clearGlobalSettings,
53
53
  globalSettings
54
- } from "../_node-chunks/chunk-L5J4RBU5.js";
54
+ } from "../_node-chunks/chunk-XCTASIYK.js";
55
55
  import {
56
56
  up2 as up
57
- } from "../_node-chunks/chunk-3AR5SJTX.js";
58
- import "../_node-chunks/chunk-D43KJFPO.js";
59
- import "../_node-chunks/chunk-ZI3WVJBS.js";
60
- import "../_node-chunks/chunk-LJPS53G5.js";
57
+ } from "../_node-chunks/chunk-PCXGFAQ3.js";
58
+ import "../_node-chunks/chunk-3GTBPTCZ.js";
59
+ import "../_node-chunks/chunk-CPI4IKLK.js";
60
+ import "../_node-chunks/chunk-TFBHPN6J.js";
61
61
  import {
62
62
  require_prompts
63
- } from "../_node-chunks/chunk-BB3ZKTWJ.js";
63
+ } from "../_node-chunks/chunk-6VWT3H7R.js";
64
64
  import {
65
65
  require_dist
66
- } from "../_node-chunks/chunk-IK3K67LJ.js";
66
+ } from "../_node-chunks/chunk-HPERTMWB.js";
67
67
  import {
68
68
  babelParse,
69
69
  recast,
70
70
  traverse,
71
71
  types
72
- } from "../_node-chunks/chunk-6WXUZSNC.js";
73
- import "../_node-chunks/chunk-FWBIPR34.js";
74
- import "../_node-chunks/chunk-QS5MMNF7.js";
72
+ } from "../_node-chunks/chunk-YXC7LAMZ.js";
73
+ import "../_node-chunks/chunk-5NGUGC3U.js";
74
+ import "../_node-chunks/chunk-FMLH3V5B.js";
75
75
  import {
76
76
  require_picocolors
77
- } from "../_node-chunks/chunk-2L3QAN3W.js";
77
+ } from "../_node-chunks/chunk-6DHXOOK2.js";
78
78
  import {
79
79
  __commonJS,
80
80
  __name,
81
81
  __require,
82
82
  __toESM
83
- } from "../_node-chunks/chunk-RUJOX3JR.js";
83
+ } from "../_node-chunks/chunk-VAAX75EL.js";
84
84
 
85
85
  // ../node_modules/esprima/dist/esprima.js
86
86
  var require_esprima = __commonJS({
@@ -1101,8 +1101,193 @@ declare class HandledError extends Error {
1101
1101
  */
1102
1102
  declare const interpolate: (template: string, bindings: Record<string, string>) => string;
1103
1103
 
1104
- declare const supportedExtensions: readonly [".js", ".mjs", ".cjs", ".jsx", ".ts", ".mts", ".cts", ".tsx"];
1104
+ interface PackageMeta {
1105
+ name: string;
1106
+ version: string;
1107
+ [key: string]: any;
1108
+ }
1109
+
1110
+ interface ToString {
1111
+ toString(): string;
1112
+ }
1113
+
1114
+ type StringOrToString = string | ToString;
1115
+
1116
+ /**
1117
+ * Callback invoked when resolving asynchronously
1118
+ *
1119
+ * @param error
1120
+ * @param resolved Absolute path to resolved identifier
1121
+ */
1122
+ type resolveCallback = (err: Error | null, resolved?: string, pkg?: PackageMeta) => void;
1123
+
1124
+ /**
1125
+ * Callback invoked when checking if a file or directory exists
1126
+ *
1127
+ * @param error
1128
+ * @param exists If the given file or directory exists
1129
+ */
1130
+ type existsCallback = (err: Error | null, isFile?: boolean) => void;
1131
+
1132
+ /**
1133
+ * Callback invoked when reading a file
1134
+ *
1135
+ * @param error
1136
+ * @param isFile If the given file exists
1137
+ */
1138
+ type readFileCallback = (err: Error | null, file?: StringOrToString) => void;
1139
+
1140
+ /**
1141
+ * Callback invoked when resolving a potential symlink
1142
+ *
1143
+ * @param error
1144
+ * @param resolved Absolute path to the resolved file
1145
+ */
1146
+ type realpathCallback = (err: Error | null, resolved?: string) => void;
1147
+
1148
+ /**
1149
+ * Callback invoked when reading and parsing a package.json file
1150
+ *
1151
+ * @param error
1152
+ * @param resolved Absolute path to the resolved file
1153
+ */
1154
+ type readPackageCallback = (err: Error | null, package?: Record<string, unknown>) => void;
1155
+
1156
+ /**
1157
+ * Synchronously resolve the module path string id, returning the result and throwing an error when id can't be resolved.
1158
+ *
1159
+ * @param id Identifier to resolve
1160
+ * @param options Options to use for resolving, optional.
1161
+ */
1162
+ declare function resolveSync(id: string, opts?: resolve.SyncOpts): string;
1163
+
1164
+ /**
1165
+ * Return whether a package is in core
1166
+ */
1167
+ declare function resolveIsCore(id: string): boolean | undefined;
1168
+
1169
+ // https://github.com/Microsoft/TypeScript/issues/3496#issuecomment-128553540
1170
+ type JSONValue = string | number | boolean | JSONObject | JSONArray;
1171
+ interface JSONObject {
1172
+ [x: string]: JSONValue;
1173
+ }
1174
+ interface JSONArray extends Array<JSONValue> {}
1175
+
1176
+ /**
1177
+ * Asynchronously resolve the module path string id into cb(err, res [, pkg]), where pkg (if defined) is the data from package.json
1178
+ *
1179
+ * @param id Identifier to resolve
1180
+ * @param callback
1181
+ */
1182
+ declare function resolve(id: string, cb: resolveCallback): void;
1183
+
1184
+ /**
1185
+ * Asynchronously resolve the module path string id into cb(err, res [, pkg]), where pkg (if defined) is the data from package.json
1186
+ *
1187
+ * @param id Identifier to resolve
1188
+ * @param options Options to use for resolving, optional.
1189
+ * @param callback
1190
+ */
1191
+ declare function resolve(id: string, opts: resolve.AsyncOpts, cb: resolveCallback): void;
1192
+
1193
+ declare namespace resolve {
1194
+ export type PackageJSON = JSONObject;
1195
+
1196
+ interface Opts {
1197
+ /** directory to begin resolving from (defaults to __dirname) */
1198
+ basedir?: string | undefined;
1199
+ /** package.json data applicable to the module being loaded */
1200
+ package?: any;
1201
+ /** set to false to exclude node core modules (e.g. fs) from the search */
1202
+ includeCoreModules?: boolean | undefined;
1203
+ /** array of file extensions to search in order (defaults to ['.js']) */
1204
+ extensions?: string | readonly string[] | undefined;
1205
+ /** transform the parsed package.json contents before looking at the "main" field */
1206
+ packageFilter?: ((pkg: PackageJSON, pkgFile: string, dir: string) => PackageJSON) | undefined;
1207
+ /** transform a path within a package */
1208
+ pathFilter?: ((pkg: PackageJSON, path: string, relativePath: string) => string) | undefined;
1209
+ /** require.paths array to use if nothing is found on the normal node_modules recursive walk (probably don't use this) */
1210
+ paths?: string | readonly string[] | undefined;
1211
+ /** return the list of candidate paths where the packages sources may be found (probably don't use this) */
1212
+ packageIterator?:
1213
+ | ((request: string, start: string, getPackageCandidates: () => string[], opts: Opts) => string[])
1214
+ | undefined;
1215
+ /** directory (or directories) in which to recursively look for modules. (default to 'node_modules') */
1216
+ moduleDirectory?: string | readonly string[] | undefined;
1217
+ /**
1218
+ * if true, doesn't resolve `basedir` to real path before resolving.
1219
+ * This is the way Node resolves dependencies when executed with the --preserve-symlinks flag.
1220
+ *
1221
+ * Note: this property is currently true by default but it will be changed to false in the next major version because Node's resolution
1222
+ * algorithm does not preserve symlinks by default.
1223
+ */
1224
+ preserveSymlinks?: boolean | undefined;
1225
+ }
1226
+
1227
+ interface BaseAsyncOpts extends Opts {
1228
+ /** function to asynchronously test whether a file exists */
1229
+ isFile?: ((file: string, cb: existsCallback) => void) | undefined;
1230
+ /** function to asynchronously test whether a directory exists */
1231
+ isDirectory?: ((directory: string, cb: existsCallback) => void) | undefined;
1232
+ /** function to asynchronously resolve a potential symlink to its real path */
1233
+ realpath?: ((file: string, cb: realpathCallback) => void) | undefined;
1234
+ }
1235
+
1236
+ export type AsyncOpts =
1237
+ & BaseAsyncOpts
1238
+ & ({
1239
+ /** how to read files asynchronously (defaults to fs.readFile) */
1240
+ readFile?: ((file: string, cb: readFileCallback) => void) | undefined;
1241
+ /** function to asynchronously read and parse a package.json file */
1242
+ readPackage?: never | undefined;
1243
+ } | {
1244
+ /** how to read files asynchronously (defaults to fs.readFile) */
1245
+ readFile?: never | undefined;
1246
+ /** function to asynchronously read and parse a package.json file */
1247
+ readPackage?:
1248
+ | ((
1249
+ readFile: (file: string, cb: readFileCallback) => void,
1250
+ pkgfile: string,
1251
+ cb: readPackageCallback,
1252
+ ) => void)
1253
+ | undefined;
1254
+ });
1255
+
1256
+ interface BaseSyncOpts extends Opts {
1257
+ /** function to synchronously test whether a file exists */
1258
+ isFile?: ((file: string) => boolean) | undefined;
1259
+ /** function to synchronously test whether a directory exists */
1260
+ isDirectory?: ((directory: string) => boolean) | undefined;
1261
+ /** function to synchronously resolve a potential symlink to its real path */
1262
+ realpathSync?: ((file: string) => string) | undefined;
1263
+ }
1264
+
1265
+ export type SyncOpts =
1266
+ & BaseSyncOpts
1267
+ & ({
1268
+ /** how to read files synchronously (defaults to fs.readFileSync) */
1269
+ readFileSync?: ((file: string) => StringOrToString) | undefined;
1270
+ /** function to synchronously read and parse a package.json file */
1271
+ readPackageSync?: never | undefined;
1272
+ } | {
1273
+ /** how to read files synchronously (defaults to fs.readFileSync) */
1274
+ readFileSync?: never | undefined;
1275
+ /** function to synchronously read and parse a package.json file */
1276
+ readPackageSync?:
1277
+ | ((
1278
+ readFileSync: (file: string) => StringOrToString,
1279
+ pkgfile: string,
1280
+ ) => Record<string, unknown> | undefined)
1281
+ | undefined;
1282
+ });
1283
+
1284
+ export var sync: typeof resolveSync;
1285
+ export var isCore: typeof resolveIsCore;
1286
+ }
1287
+
1288
+ declare const supportedExtensions: readonly [".js", ".ts", ".jsx", ".tsx", ".mjs", ".mts", ".mtsx", ".cjs", ".cts", ".ctsx"];
1105
1289
  declare function getInterpretedFile(pathToFile: string): string | undefined;
1290
+ declare function resolveImport(id: string, options: resolve.SyncOpts): string;
1106
1291
 
1107
1292
  declare function serverRequire(filePath: string | string[]): Promise<any> | null;
1108
1293
 
@@ -1324,4 +1509,7 @@ declare const safeResolveModule: ({ specifier, parent, extensions, }: {
1324
1509
  extensions?: string[];
1325
1510
  }) => string | undefined;
1326
1511
 
1327
- export { COMMON_ENV_VARS, DEFAULT_FILES_PATTERN, type FileOptions, FileSystemCache, HandledError, type InstallationMetadata, type InterPresetOptions, JsPackageManager, JsPackageManagerFactory, type PackageJsonInfo, type PackageJsonWithDepsAndDevDeps, type PackageJsonWithMaybeDeps, type PackageManagerName, type PackageMetadata, type RemoveAddonOptions, builderPackages, cache, checkAddonOrder, codeLog, commandLog, commonGlobOptions, createFileSystemCache, createLogStream, extractProperFrameworkName, extractProperRendererNameFromFramework, filterPresetsConfig, findConfigFile, findFilesUp, formatFileContent, frameworkPackages, frameworkToRenderer, getAddonNames, getAutoRefs, getBuilderOptions, getChars, getCoercedStorybookVersion, getConfigInfo, getDirectoryFromWorkingDir, getEnvConfig, getFrameworkName, getInterpretedFile, getPackageDetails, getPresets, getPrettier, getPreviewBodyTemplate, getPreviewHeadTemplate, getProjectRoot, getRefs, getRendererName, getStoryId, getStoryTitle, getStorybookConfiguration, getStorybookInfo, getSyncedStorybookAddons, globToRegexp, importMetaResolve, importModule, interpolate, invalidateProjectRootCache, isCI, isCorePackage, isPreservingSymlinks, isSatelliteAddon, loadAllPresets, loadEnvs, loadMainConfig, loadManagerOrAddonsFile, loadPreset, loadPreviewOrConfigFile, logConfig, nodePathsToArray, normalizeStories, normalizeStoriesEntry, normalizeStoryPath, optionalEnvToBoolean, paddedLog, parseList, posix, readTemplate, removeAddon, rendererPackages, resolveAddonName, resolvePackageDir, resolvePathInStorybookCache, safeResolveModule, satisfies, scanAndTransformFiles, serverRequire, stringifyEnvs, stringifyProcessEnvs, supportedExtensions, syncStorybookAddons, temporaryDirectory, temporaryFile, transformImportFiles, validateConfigurationFiles, validateFrameworkName, _default as versions };
1512
+ declare const groupBy: <K extends PropertyKey, T>(items: T[], keySelector: (item: T, index: number) => K) => Record<K, T[]>;
1513
+ declare function invariant(condition: unknown, message?: string | (() => string)): asserts condition;
1514
+
1515
+ export { COMMON_ENV_VARS, DEFAULT_FILES_PATTERN, type FileOptions, FileSystemCache, HandledError, type InstallationMetadata, type InterPresetOptions, JsPackageManager, JsPackageManagerFactory, type PackageJsonInfo, type PackageJsonWithDepsAndDevDeps, type PackageJsonWithMaybeDeps, type PackageManagerName, type PackageMetadata, type RemoveAddonOptions, builderPackages, cache, checkAddonOrder, codeLog, commandLog, commonGlobOptions, createFileSystemCache, createLogStream, extractProperFrameworkName, extractProperRendererNameFromFramework, filterPresetsConfig, findConfigFile, findFilesUp, formatFileContent, frameworkPackages, frameworkToRenderer, getAddonNames, getAutoRefs, getBuilderOptions, getChars, getCoercedStorybookVersion, getConfigInfo, getDirectoryFromWorkingDir, getEnvConfig, getFrameworkName, getInterpretedFile, getPackageDetails, getPresets, getPrettier, getPreviewBodyTemplate, getPreviewHeadTemplate, getProjectRoot, getRefs, getRendererName, getStoryId, getStoryTitle, getStorybookConfiguration, getStorybookInfo, getSyncedStorybookAddons, globToRegexp, groupBy, importMetaResolve, importModule, interpolate, invalidateProjectRootCache, invariant, isCI, isCorePackage, isPreservingSymlinks, isSatelliteAddon, loadAllPresets, loadEnvs, loadMainConfig, loadManagerOrAddonsFile, loadPreset, loadPreviewOrConfigFile, logConfig, nodePathsToArray, normalizeStories, normalizeStoriesEntry, normalizeStoryPath, optionalEnvToBoolean, paddedLog, parseList, posix, readTemplate, removeAddon, rendererPackages, resolveAddonName, resolveImport, resolvePackageDir, resolvePathInStorybookCache, safeResolveModule, satisfies, scanAndTransformFiles, serverRequire, stringifyEnvs, stringifyProcessEnvs, supportedExtensions, syncStorybookAddons, temporaryDirectory, temporaryFile, transformImportFiles, validateConfigurationFiles, validateFrameworkName, _default as versions };
@@ -1,10 +1,10 @@
1
- import CJS_COMPAT_NODE_URL_gimmxetvr7 from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_gimmxetvr7 from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_gimmxetvr7 from "node:module";
1
+ import CJS_COMPAT_NODE_URL_1ale42sn21 from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_1ale42sn21 from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_1ale42sn21 from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_gimmxetvr7.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_gimmxetvr7.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_gimmxetvr7.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_1ale42sn21.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_1ale42sn21.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_1ale42sn21.createRequire(import.meta.url);
8
8
 
9
9
  // ------------------------------------------------------------
10
10
  // end of CJS compatibility banner, injected by Storybook's esbuild configuration
@@ -54,7 +54,9 @@ import {
54
54
  getStorybookInfo,
55
55
  getSyncedStorybookAddons,
56
56
  globToRegexp,
57
+ groupBy,
57
58
  interpolate,
59
+ invariant,
58
60
  isCorePackage,
59
61
  isPreservingSymlinks,
60
62
  isSatelliteAddon,
@@ -73,6 +75,7 @@ import {
73
75
  removeAddon,
74
76
  rendererPackages,
75
77
  resolveAddonName,
78
+ resolveImport,
76
79
  resolvePathInStorybookCache,
77
80
  satisfies,
78
81
  scanAndTransformFiles,
@@ -84,11 +87,11 @@ import {
84
87
  transformImportFiles,
85
88
  validateConfigurationFiles,
86
89
  validateFrameworkName
87
- } from "../_node-chunks/chunk-GWSFLQQQ.js";
88
- import "../_node-chunks/chunk-XVXUF5GE.js";
90
+ } from "../_node-chunks/chunk-7332Y23R.js";
91
+ import "../_node-chunks/chunk-T6VOUSIY.js";
89
92
  import {
90
93
  versions_default
91
- } from "../_node-chunks/chunk-N3ZE2FCS.js";
94
+ } from "../_node-chunks/chunk-VCC35ZLQ.js";
92
95
  import {
93
96
  findFilesUp,
94
97
  getProjectRoot,
@@ -100,22 +103,22 @@ import {
100
103
  optionalEnvToBoolean,
101
104
  stringifyEnvs,
102
105
  stringifyProcessEnvs
103
- } from "../_node-chunks/chunk-S6RYOO4I.js";
104
- import "../_node-chunks/chunk-3AR5SJTX.js";
105
- import "../_node-chunks/chunk-D43KJFPO.js";
106
+ } from "../_node-chunks/chunk-TXDBGO2X.js";
107
+ import "../_node-chunks/chunk-PCXGFAQ3.js";
108
+ import "../_node-chunks/chunk-3GTBPTCZ.js";
106
109
  import {
107
110
  importMetaResolve,
108
111
  importModule,
109
112
  resolvePackageDir,
110
113
  safeResolveModule
111
- } from "../_node-chunks/chunk-ZI3WVJBS.js";
112
- import "../_node-chunks/chunk-LJPS53G5.js";
113
- import "../_node-chunks/chunk-BB3ZKTWJ.js";
114
- import "../_node-chunks/chunk-Q5JSLT56.js";
115
- import "../_node-chunks/chunk-EKPHXLN6.js";
116
- import "../_node-chunks/chunk-IK3K67LJ.js";
117
- import "../_node-chunks/chunk-2L3QAN3W.js";
118
- import "../_node-chunks/chunk-RUJOX3JR.js";
114
+ } from "../_node-chunks/chunk-CPI4IKLK.js";
115
+ import "../_node-chunks/chunk-TFBHPN6J.js";
116
+ import "../_node-chunks/chunk-6VWT3H7R.js";
117
+ import "../_node-chunks/chunk-CAKHJEH6.js";
118
+ import "../_node-chunks/chunk-7C52H6S6.js";
119
+ import "../_node-chunks/chunk-HPERTMWB.js";
120
+ import "../_node-chunks/chunk-6DHXOOK2.js";
121
+ import "../_node-chunks/chunk-VAAX75EL.js";
119
122
  export {
120
123
  COMMON_ENV_VARS,
121
124
  DEFAULT_FILES_PATTERN,
@@ -163,10 +166,12 @@ export {
163
166
  getStorybookInfo,
164
167
  getSyncedStorybookAddons,
165
168
  globToRegexp,
169
+ groupBy,
166
170
  importMetaResolve,
167
171
  importModule,
168
172
  interpolate,
169
173
  invalidateProjectRootCache,
174
+ invariant,
170
175
  isCI,
171
176
  isCorePackage,
172
177
  isPreservingSymlinks,
@@ -190,6 +195,7 @@ export {
190
195
  removeAddon,
191
196
  rendererPackages,
192
197
  resolveAddonName,
198
+ resolveImport,
193
199
  resolvePackageDir,
194
200
  resolvePathInStorybookCache,
195
201
  safeResolveModule,