storybook 10.1.0-alpha.0 → 10.1.0-alpha.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (91) hide show
  1. package/dist/_browser-chunks/{Color-7ZNS6F6B.js → Color-FQNEU7YS.js} +79 -60
  2. package/dist/_browser-chunks/{chunk-BOOOPFZF.js → WithTooltip-6NHN2GXF.js} +25 -17
  3. package/dist/_browser-chunks/{chunk-RNE2IUTB.js → chunk-AW46NMGV.js} +9 -1
  4. package/dist/_browser-chunks/{chunk-C4XOKMDU.js → chunk-QMY4G4R2.js} +49 -49
  5. package/dist/_browser-chunks/{syntaxhighlighter-DK2ODWXH.js → syntaxhighlighter-RJZASWHL.js} +5 -5
  6. package/dist/_node-chunks/{builder-manager-OTO33TIA.js → builder-manager-HA7CYFCK.js} +32 -12
  7. package/dist/_node-chunks/camelcase-QALD4XFE.js +18 -0
  8. package/dist/_node-chunks/{chunk-O4KUWXD6.js → chunk-2XY53ALL.js} +8 -8
  9. package/dist/_node-chunks/{chunk-Q4CZSEBO.js → chunk-3CBQMG2A.js} +7 -7
  10. package/dist/_node-chunks/{chunk-L5WAZZY3.js → chunk-3WDAPZYQ.js} +7 -7
  11. package/dist/_node-chunks/{chunk-6C7OBGYG.js → chunk-4ZB555EJ.js} +7 -7
  12. package/dist/_node-chunks/{chunk-RKANIOER.js → chunk-52DXKXY3.js} +8 -8
  13. package/dist/_node-chunks/{chunk-HYNQ2IX4.js → chunk-5OVB4A6F.js} +7 -7
  14. package/dist/_node-chunks/chunk-AGHGNXGH.js +18 -0
  15. package/dist/_node-chunks/{chunk-OYGAWJQE.js → chunk-B23X5ZCK.js} +7 -7
  16. package/dist/_node-chunks/{chunk-HHTKRAIE.js → chunk-B2DAHWJK.js} +25 -7
  17. package/dist/_node-chunks/{chunk-FDDQACQD.js → chunk-CC4PW5MJ.js} +7 -7
  18. package/dist/_node-chunks/{chunk-Q6QFW2Y7.js → chunk-D7NIZELR.js} +67 -59
  19. package/dist/_node-chunks/{chunk-EFJRT54D.js → chunk-DO5Q3H4L.js} +7 -7
  20. package/dist/_node-chunks/{chunk-VW3GGAQI.js → chunk-ECK7WVFX.js} +12 -12
  21. package/dist/_node-chunks/{chunk-XI2VU32X.js → chunk-EUH3NHXA.js} +7 -7
  22. package/dist/_node-chunks/{chunk-YS6OLN4N.js → chunk-F3XOPI6H.js} +7 -7
  23. package/dist/_node-chunks/{chunk-NTB3C5XQ.js → chunk-FOQHPHCV.js} +7 -7
  24. package/dist/_node-chunks/{chunk-HIGKW2KB.js → chunk-G6EL47NS.js} +7 -7
  25. package/dist/_node-chunks/{chunk-QOI32MCO.js → chunk-GFLS4TJB.js} +7 -7
  26. package/dist/_node-chunks/{chunk-2WZNP46P.js → chunk-J3XZKWHE.js} +8 -8
  27. package/dist/_node-chunks/{chunk-LOF6SIRE.js → chunk-LE63EHJ5.js} +12 -12
  28. package/dist/_node-chunks/{chunk-RR6Q3657.js → chunk-M47XA42S.js} +9 -9
  29. package/dist/_node-chunks/{chunk-VL6WDGIU.js → chunk-OOI74AL3.js} +6 -6
  30. package/dist/_node-chunks/{chunk-AITYHU22.js → chunk-OVXB5GGT.js} +7 -7
  31. package/dist/_node-chunks/chunk-PRJHT3GJ.js +61 -0
  32. package/dist/_node-chunks/{chunk-SV7ZHC5Z.js → chunk-Q52PVUSU.js} +7 -7
  33. package/dist/_node-chunks/{chunk-NTAOH664.js → chunk-RMHAL25C.js} +9 -9
  34. package/dist/_node-chunks/{chunk-A6T2YN75.js → chunk-SDCF5RNN.js} +15 -15
  35. package/dist/_node-chunks/{chunk-3ICYWJ3N.js → chunk-UJ5SJ23M.js} +7 -7
  36. package/dist/_node-chunks/{chunk-FWW4IJCM.js → chunk-UPHK4ETU.js} +19 -17
  37. package/dist/_node-chunks/{chunk-O3OJUFKU.js → chunk-V7VURIPB.js} +8 -8
  38. package/dist/_node-chunks/{chunk-6M2IPO4E.js → chunk-VPR5IBMG.js} +6 -6
  39. package/dist/_node-chunks/{chunk-27W6KHQ2.js → chunk-X4XU27M6.js} +7 -7
  40. package/dist/_node-chunks/{chunk-ZFRTME73.js → chunk-ZHSCUGNP.js} +1467 -148
  41. package/dist/_node-chunks/{dist-BA2GAJJB.js → dist-6TXHNR5C.js} +9 -9
  42. package/dist/_node-chunks/{globby-4HAI4KJH.js → globby-PBTV6PX6.js} +9 -9
  43. package/dist/_node-chunks/{lib-ITRY6RT7.js → lib-4RTDZVGX.js} +7 -7
  44. package/dist/_node-chunks/{mdx-N42X6CFJ-7PULFTZI.js → mdx-N42X6CFJ-COWEH7KR.js} +8 -8
  45. package/dist/_node-chunks/{p-limit-63FY4KTG.js → p-limit-PBVZQOFY.js} +7 -7
  46. package/dist/_node-chunks/{plugin-2BSKCSMA.js → plugin-6ZPCS4LI.js} +10 -10
  47. package/dist/_node-chunks/{plugin-JEBMTDIB.js → plugin-EOZKYZAG.js} +10 -10
  48. package/dist/_node-chunks/{webpack-inject-mocker-runtime-plugin-AZ7YPMMD.js → webpack-inject-mocker-runtime-plugin-35HMSMR5.js} +10 -10
  49. package/dist/_node-chunks/{webpack-mock-plugin-7IF6PA2O.js → webpack-mock-plugin-GT3MA5E2.js} +9 -9
  50. package/dist/babel/index.js +11 -11
  51. package/dist/bin/core.js +11 -11
  52. package/dist/bin/dispatcher.js +11 -11
  53. package/dist/bin/loader.js +9 -9
  54. package/dist/cli/index.js +50 -74
  55. package/dist/common/index.d.ts +210 -3
  56. package/dist/common/index.js +28 -20
  57. package/dist/components/index.d.ts +472 -280
  58. package/dist/components/index.js +20367 -75
  59. package/dist/core-server/index.js +1128 -247
  60. package/dist/core-server/presets/common-manager.js +1143 -2230
  61. package/dist/core-server/presets/common-override-preset.js +9 -9
  62. package/dist/core-server/presets/common-preset.js +27 -27
  63. package/dist/core-server/presets/webpack/loaders/storybook-mock-transform-loader.js +9 -9
  64. package/dist/core-server/presets/webpack/loaders/webpack-automock-loader.js +10 -10
  65. package/dist/csf/index.js +13 -6
  66. package/dist/csf-tools/index.d.ts +15 -4
  67. package/dist/csf-tools/index.js +9 -9
  68. package/dist/manager/globals-runtime.js +40951 -26253
  69. package/dist/manager/runtime.js +1688 -2693
  70. package/dist/manager-api/index.d.ts +11 -3
  71. package/dist/manager-api/index.js +53 -6
  72. package/dist/node-logger/index.d.ts +1 -1
  73. package/dist/node-logger/index.js +473 -448
  74. package/dist/preview/runtime.js +903 -896
  75. package/dist/preview-api/index.d.ts +68 -67
  76. package/dist/preview-api/index.js +5 -5
  77. package/dist/server-errors.js +10 -10
  78. package/dist/telemetry/index.js +24 -24
  79. package/dist/test/index.js +547 -547
  80. package/dist/theming/create.d.ts +4 -2
  81. package/dist/theming/create.js +1 -1
  82. package/dist/theming/index.d.ts +9 -6
  83. package/dist/theming/index.js +13 -6
  84. package/dist/types/index.d.ts +50 -5
  85. package/package.json +14 -6
  86. package/dist/_browser-chunks/WithTooltip-SK46ZJ2J.js +0 -13
  87. package/dist/_browser-chunks/chunk-I74EUU5O.js +0 -5809
  88. package/dist/_node-chunks/camelcase-HURSU73A.js +0 -18
  89. package/dist/_node-chunks/chunk-P7ZABCRS.js +0 -18
  90. package/dist/_node-chunks/chunk-QWBT2XCX.js +0 -61
  91. package/dist/_browser-chunks/{chunk-W4QKLQSC.js → chunk-RW5PKMWM.js} +5 -5
@@ -1,10 +1,10 @@
1
- import CJS_COMPAT_NODE_URL_viqf41uklqm from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_viqf41uklqm from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_viqf41uklqm from "node:module";
1
+ import CJS_COMPAT_NODE_URL_8vqew0zn9si from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_8vqew0zn9si from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_8vqew0zn9si from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_viqf41uklqm.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_viqf41uklqm.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_viqf41uklqm.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_8vqew0zn9si.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_8vqew0zn9si.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_8vqew0zn9si.createRequire(import.meta.url);
8
8
 
9
9
  // ------------------------------------------------------------
10
10
  // end of CJS compatibility banner, injected by Storybook's esbuild configuration
@@ -16,10 +16,10 @@ import {
16
16
  join,
17
17
  normalize,
18
18
  resolve
19
- } from "./chunk-HHTKRAIE.js";
19
+ } from "./chunk-B2DAHWJK.js";
20
20
  import {
21
21
  __name
22
- } from "./chunk-VL6WDGIU.js";
22
+ } from "./chunk-OOI74AL3.js";
23
23
 
24
24
  // src/core-server/mocking-utils/resolve.ts
25
25
  import { readFileSync as readFileSync2, realpathSync } from "node:fs";
@@ -1,10 +1,10 @@
1
- import CJS_COMPAT_NODE_URL_viqf41uklqm from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_viqf41uklqm from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_viqf41uklqm from "node:module";
1
+ import CJS_COMPAT_NODE_URL_8vqew0zn9si from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_8vqew0zn9si from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_8vqew0zn9si from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_viqf41uklqm.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_viqf41uklqm.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_viqf41uklqm.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_8vqew0zn9si.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_8vqew0zn9si.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_8vqew0zn9si.createRequire(import.meta.url);
8
8
 
9
9
  // ------------------------------------------------------------
10
10
  // end of CJS compatibility banner, injected by Storybook's esbuild configuration
@@ -13,7 +13,7 @@ import {
13
13
  __commonJS,
14
14
  __name,
15
15
  __toESM
16
- } from "./chunk-VL6WDGIU.js";
16
+ } from "./chunk-OOI74AL3.js";
17
17
 
18
18
  // ../node_modules/balanced-match/index.js
19
19
  var require_balanced_match = __commonJS({
@@ -1,17 +1,17 @@
1
- import CJS_COMPAT_NODE_URL_viqf41uklqm from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_viqf41uklqm from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_viqf41uklqm from "node:module";
1
+ import CJS_COMPAT_NODE_URL_8vqew0zn9si from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_8vqew0zn9si from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_8vqew0zn9si from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_viqf41uklqm.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_viqf41uklqm.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_viqf41uklqm.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_8vqew0zn9si.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_8vqew0zn9si.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_8vqew0zn9si.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
  __name
14
- } from "./chunk-VL6WDGIU.js";
14
+ } from "./chunk-OOI74AL3.js";
15
15
 
16
16
  // ../node_modules/slash/index.js
17
17
  function slash(path) {
@@ -1,10 +1,10 @@
1
- import CJS_COMPAT_NODE_URL_viqf41uklqm from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_viqf41uklqm from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_viqf41uklqm from "node:module";
1
+ import CJS_COMPAT_NODE_URL_8vqew0zn9si from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_8vqew0zn9si from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_8vqew0zn9si from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_viqf41uklqm.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_viqf41uklqm.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_viqf41uklqm.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_8vqew0zn9si.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_8vqew0zn9si.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_8vqew0zn9si.createRequire(import.meta.url);
8
8
 
9
9
  // ------------------------------------------------------------
10
10
  // end of CJS compatibility banner, injected by Storybook's esbuild configuration
@@ -13,7 +13,7 @@ import {
13
13
  __commonJS,
14
14
  __name,
15
15
  __require
16
- } from "./chunk-VL6WDGIU.js";
16
+ } from "./chunk-OOI74AL3.js";
17
17
 
18
18
  // ../node_modules/totalist/sync/index.js
19
19
  var require_sync = __commonJS({
@@ -1,22 +1,22 @@
1
- import CJS_COMPAT_NODE_URL_viqf41uklqm from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_viqf41uklqm from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_viqf41uklqm from "node:module";
1
+ import CJS_COMPAT_NODE_URL_8vqew0zn9si from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_8vqew0zn9si from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_8vqew0zn9si from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_viqf41uklqm.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_viqf41uklqm.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_viqf41uklqm.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_8vqew0zn9si.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_8vqew0zn9si.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_8vqew0zn9si.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
  require_dist
14
- } from "./chunk-HYNQ2IX4.js";
14
+ } from "./chunk-5OVB4A6F.js";
15
15
  import {
16
16
  __export,
17
17
  __name,
18
18
  __toESM
19
- } from "./chunk-VL6WDGIU.js";
19
+ } from "./chunk-OOI74AL3.js";
20
20
 
21
21
  // src/cli/globalSettings.ts
22
22
  var import_ts_dedent = __toESM(require_dist(), 1);
@@ -1,10 +1,10 @@
1
- import CJS_COMPAT_NODE_URL_viqf41uklqm from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_viqf41uklqm from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_viqf41uklqm from "node:module";
1
+ import CJS_COMPAT_NODE_URL_8vqew0zn9si from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_8vqew0zn9si from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_8vqew0zn9si from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_viqf41uklqm.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_viqf41uklqm.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_viqf41uklqm.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_8vqew0zn9si.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_8vqew0zn9si.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_8vqew0zn9si.createRequire(import.meta.url);
8
8
 
9
9
  // ------------------------------------------------------------
10
10
  // end of CJS compatibility banner, injected by Storybook's esbuild configuration
@@ -12,7 +12,7 @@ var require = CJS_COMPAT_NODE_MODULE_viqf41uklqm.createRequire(import.meta.url);
12
12
  import {
13
13
  __commonJS,
14
14
  __name
15
- } from "./chunk-VL6WDGIU.js";
15
+ } from "./chunk-OOI74AL3.js";
16
16
 
17
17
  // ../node_modules/ts-dedent/dist/index.js
18
18
  var require_dist = __commonJS({
@@ -0,0 +1,18 @@
1
+ import CJS_COMPAT_NODE_URL_8vqew0zn9si from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_8vqew0zn9si from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_8vqew0zn9si from "node:module";
4
+
5
+ var __filename = CJS_COMPAT_NODE_URL_8vqew0zn9si.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_8vqew0zn9si.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_8vqew0zn9si.createRequire(import.meta.url);
8
+
9
+ // ------------------------------------------------------------
10
+ // end of CJS compatibility banner, injected by Storybook's esbuild configuration
11
+ // ------------------------------------------------------------
12
+
13
+ // package.json
14
+ var version = "10.1.0-alpha.10";
15
+
16
+ export {
17
+ version
18
+ };
@@ -1,10 +1,10 @@
1
- import CJS_COMPAT_NODE_URL_viqf41uklqm from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_viqf41uklqm from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_viqf41uklqm from "node:module";
1
+ import CJS_COMPAT_NODE_URL_8vqew0zn9si from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_8vqew0zn9si from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_8vqew0zn9si from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_viqf41uklqm.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_viqf41uklqm.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_viqf41uklqm.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_8vqew0zn9si.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_8vqew0zn9si.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_8vqew0zn9si.createRequire(import.meta.url);
8
8
 
9
9
  // ------------------------------------------------------------
10
10
  // end of CJS compatibility banner, injected by Storybook's esbuild configuration
@@ -13,7 +13,7 @@ import {
13
13
  __commonJS,
14
14
  __name,
15
15
  __require
16
- } from "./chunk-VL6WDGIU.js";
16
+ } from "./chunk-OOI74AL3.js";
17
17
 
18
18
  // ../node_modules/picomatch/lib/constants.js
19
19
  var require_constants = __commonJS({
@@ -1,17 +1,17 @@
1
- import CJS_COMPAT_NODE_URL_viqf41uklqm from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_viqf41uklqm from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_viqf41uklqm from "node:module";
1
+ import CJS_COMPAT_NODE_URL_8vqew0zn9si from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_8vqew0zn9si from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_8vqew0zn9si from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_viqf41uklqm.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_viqf41uklqm.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_viqf41uklqm.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_8vqew0zn9si.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_8vqew0zn9si.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_8vqew0zn9si.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
  __name
14
- } from "./chunk-VL6WDGIU.js";
14
+ } from "./chunk-OOI74AL3.js";
15
15
 
16
16
  // ../node_modules/pathe/dist/shared/pathe.ff20891b.mjs
17
17
  var _DRIVE_LETTER_START_RE = /^[A-Za-z]:\//;
@@ -25,6 +25,7 @@ __name(normalizeWindowsPath, "normalizeWindowsPath");
25
25
  var _UNC_REGEX = /^[/\\]{2}/;
26
26
  var _IS_ABSOLUTE_RE = /^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/;
27
27
  var _DRIVE_LETTER_RE = /^[A-Za-z]:$/;
28
+ var _ROOT_FOLDER_RE = /^\/([A-Za-z]:)?$/;
28
29
  var normalize = /* @__PURE__ */ __name(function(path2) {
29
30
  if (path2.length === 0) {
30
31
  return ".";
@@ -167,6 +168,22 @@ var extname = /* @__PURE__ */ __name(function(p) {
167
168
  const match = _EXTNAME_RE.exec(normalizeWindowsPath(p));
168
169
  return match && match[1] || "";
169
170
  }, "extname");
171
+ var relative = /* @__PURE__ */ __name(function(from, to) {
172
+ const _from = resolve(from).replace(_ROOT_FOLDER_RE, "$1").split("/");
173
+ const _to = resolve(to).replace(_ROOT_FOLDER_RE, "$1").split("/");
174
+ if (_to[0][1] === ":" && _from[0][1] === ":" && _from[0] !== _to[0]) {
175
+ return _to.join("/");
176
+ }
177
+ const _fromCopy = [..._from];
178
+ for (const segment of _fromCopy) {
179
+ if (_to[0] !== segment) {
180
+ break;
181
+ }
182
+ _from.shift();
183
+ _to.shift();
184
+ }
185
+ return [..._from.map(() => ".."), ..._to].join("/");
186
+ }, "relative");
170
187
  var dirname = /* @__PURE__ */ __name(function(p) {
171
188
  const segments = normalizeWindowsPath(p).replace(/\/$/, "").split("/").slice(0, -1);
172
189
  if (segments.length === 1 && _DRIVE_LETTER_RE.test(segments[0])) {
@@ -196,6 +213,7 @@ export {
196
213
  join,
197
214
  resolve,
198
215
  isAbsolute,
216
+ relative,
199
217
  dirname,
200
218
  basename,
201
219
  parse
@@ -1,17 +1,17 @@
1
- import CJS_COMPAT_NODE_URL_viqf41uklqm from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_viqf41uklqm from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_viqf41uklqm from "node:module";
1
+ import CJS_COMPAT_NODE_URL_8vqew0zn9si from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_8vqew0zn9si from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_8vqew0zn9si from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_viqf41uklqm.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_viqf41uklqm.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_viqf41uklqm.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_8vqew0zn9si.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_8vqew0zn9si.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_8vqew0zn9si.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
  __name
14
- } from "./chunk-VL6WDGIU.js";
14
+ } from "./chunk-OOI74AL3.js";
15
15
 
16
16
  // ../node_modules/tiny-invariant/dist/esm/tiny-invariant.js
17
17
  var isProduction = process.env.NODE_ENV === "production";
@@ -1,21 +1,21 @@
1
- import CJS_COMPAT_NODE_URL_viqf41uklqm from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_viqf41uklqm from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_viqf41uklqm from "node:module";
1
+ import CJS_COMPAT_NODE_URL_8vqew0zn9si from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_8vqew0zn9si from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_8vqew0zn9si from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_viqf41uklqm.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_viqf41uklqm.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_viqf41uklqm.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_8vqew0zn9si.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_8vqew0zn9si.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_8vqew0zn9si.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
  require_dist
14
- } from "./chunk-HYNQ2IX4.js";
14
+ } from "./chunk-5OVB4A6F.js";
15
15
  import {
16
16
  __name,
17
17
  __toESM
18
- } from "./chunk-VL6WDGIU.js";
18
+ } from "./chunk-OOI74AL3.js";
19
19
 
20
20
  // src/csf-tools/CsfFile.ts
21
21
  var import_ts_dedent = __toESM(require_dist(), 1);
@@ -240,6 +240,7 @@ var CsfFile = class {
240
240
  this._stories = {};
241
241
  this._metaAnnotations = {};
242
242
  this._storyExports = {};
243
+ this._storyDeclarationPath = {};
243
244
  this._storyPaths = {};
244
245
  this._storyStatements = {};
245
246
  this._storyAnnotations = {};
@@ -290,8 +291,12 @@ var CsfFile = class {
290
291
  );
291
292
  if (importStmt) {
292
293
  const { source } = importStmt;
293
- if (t2.isStringLiteral(source)) {
294
+ const specifier = importStmt.specifiers.find((spec) => spec.local.name === id);
295
+ if (t2.isStringLiteral(source) && specifier) {
294
296
  this._rawComponentPath = source.value;
297
+ if (t2.isImportSpecifier(specifier) || t2.isImportDefaultSpecifier(specifier)) {
298
+ this._componentImportSpecifier = specifier;
299
+ }
295
300
  }
296
301
  }
297
302
  }
@@ -349,15 +354,17 @@ var CsfFile = class {
349
354
  if (isVariableReference) {
350
355
  const variableName = node.declaration.name;
351
356
  self._metaVariableName = variableName;
352
- const isVariableDeclarator = /* @__PURE__ */ __name((declaration) => t2.isIdentifier(declaration.id) && declaration.id.name === variableName, "isVariableDeclarator");
353
- self._metaStatement = self._ast.program.body.find(
354
- (topLevelNode) => t2.isVariableDeclaration(topLevelNode) && topLevelNode.declarations.find(isVariableDeclarator)
357
+ const isMetaVariable = /* @__PURE__ */ __name((declaration) => t2.isIdentifier(declaration.id) && declaration.id.name === variableName, "isMetaVariable");
358
+ self._metaStatementPath = self._file.path.get("body").find(
359
+ (path2) => path2.isVariableDeclaration() && path2.node.declarations.some(isMetaVariable)
355
360
  );
361
+ self._metaStatement = self._metaStatementPath?.node;
356
362
  decl = (self?._metaStatement?.declarations || []).find(
357
- isVariableDeclarator
363
+ isMetaVariable
358
364
  )?.init;
359
365
  } else {
360
366
  self._metaStatement = node;
367
+ self._metaStatementPath = path;
361
368
  decl = node.declaration;
362
369
  }
363
370
  if (t2.isObjectExpression(decl)) {
@@ -390,22 +397,26 @@ var CsfFile = class {
390
397
  ExportNamedDeclaration: {
391
398
  enter(path) {
392
399
  const { node, parent } = path;
400
+ const declaration = path.get("declaration");
393
401
  let declarations;
394
- if (t2.isVariableDeclaration(node.declaration)) {
395
- declarations = node.declaration.declarations.filter((d) => t2.isVariableDeclarator(d));
396
- } else if (t2.isFunctionDeclaration(node.declaration)) {
397
- declarations = [node.declaration];
402
+ if (declaration.isVariableDeclaration()) {
403
+ declarations = declaration.get("declarations").filter((d) => d.isVariableDeclarator());
404
+ } else if (declaration.isFunctionDeclaration()) {
405
+ declarations = [declaration];
398
406
  }
399
407
  if (declarations) {
400
- declarations.forEach((decl) => {
401
- if (t2.isIdentifier(decl.id)) {
408
+ declarations.forEach((declPath) => {
409
+ const decl = declPath.node;
410
+ const id = declPath.node.id;
411
+ if (t2.isIdentifier(id)) {
402
412
  let storyIsFactory = false;
403
- const { name: exportName } = decl.id;
404
- if (exportName === "__namedExportsOrder" && t2.isVariableDeclarator(decl)) {
405
- self._namedExportsOrder = parseExportsOrder(decl.init);
413
+ const { name: exportName } = id;
414
+ if (exportName === "__namedExportsOrder" && declPath.isVariableDeclarator()) {
415
+ self._namedExportsOrder = parseExportsOrder(declPath.node.init);
406
416
  return;
407
417
  }
408
418
  self._storyExports[exportName] = decl;
419
+ self._storyDeclarationPath[exportName] = declPath;
409
420
  self._storyPaths[exportName] = path;
410
421
  self._storyStatements[exportName] = node;
411
422
  let name = storyNameFromExport(exportName);
@@ -787,7 +798,10 @@ var babelParseFile = /* @__PURE__ */ __name(({
787
798
  filename = "",
788
799
  ast
789
800
  }) => {
790
- return new BabelFileClass({ filename }, { code, ast: ast ?? babelParse(code) });
801
+ return new BabelFileClass(
802
+ { filename, highlightCode: false },
803
+ { code, ast: ast ?? babelParse(code) }
804
+ );
791
805
  }, "babelParseFile");
792
806
  var loadCsf = /* @__PURE__ */ __name((code, options) => {
793
807
  const ast = babelParse(code);
@@ -845,12 +859,6 @@ var propKey = /* @__PURE__ */ __name((p) => {
845
859
  }
846
860
  return null;
847
861
  }, "propKey");
848
- var unwrap = /* @__PURE__ */ __name((node) => {
849
- if (t3.isTSAsExpression(node) || t3.isTSSatisfiesExpression(node)) {
850
- return unwrap(node.expression);
851
- }
852
- return node;
853
- }, "unwrap");
854
862
  var _getPath = /* @__PURE__ */ __name((path, node) => {
855
863
  if (path.length === 0) {
856
864
  return node;
@@ -937,6 +945,25 @@ var ConfigFile = class {
937
945
  // for that. But rather than refactor the whole thing, we just use this as a stopgap.
938
946
  this._exportDecls = {};
939
947
  this.hasDefaultExport = false;
948
+ /** Unwraps TS assertions/satisfies from a node, to get the underlying node. */
949
+ this._unwrap = /* @__PURE__ */ __name((node) => {
950
+ if (t3.isTSAsExpression(node) || t3.isTSSatisfiesExpression(node)) {
951
+ return this._unwrap(node.expression);
952
+ }
953
+ return node;
954
+ }, "_unwrap");
955
+ /**
956
+ * Resolve a declaration node by unwrapping TS assertions/satisfies and following identifiers to
957
+ * resolve the correct node in case it's an identifier.
958
+ */
959
+ this._resolveDeclaration = /* @__PURE__ */ __name((node, parent = this._ast.program) => {
960
+ const decl = this._unwrap(node);
961
+ if (t3.isIdentifier(decl) && t3.isProgram(parent)) {
962
+ const initialization = _findVarInitialization(decl.name, parent);
963
+ return initialization ? this._unwrap(initialization) : decl;
964
+ }
965
+ return decl;
966
+ }, "_resolveDeclaration");
940
967
  this._ast = ast;
941
968
  this._code = code;
942
969
  this.fileName = fileName;
@@ -949,10 +976,7 @@ var ConfigFile = class {
949
976
  exportsObject.properties.forEach((p) => {
950
977
  const exportName = propKey(p);
951
978
  if (exportName) {
952
- let exportVal = p.value;
953
- if (t3.isIdentifier(exportVal)) {
954
- exportVal = _findVarInitialization(exportVal.name, this._ast.program);
955
- }
979
+ const exportVal = this._resolveDeclaration(p.value);
956
980
  this._exports[exportName] = exportVal;
957
981
  }
958
982
  });
@@ -963,8 +987,7 @@ var ConfigFile = class {
963
987
  ExportDefaultDeclaration: {
964
988
  enter({ node, parent }) {
965
989
  self.hasDefaultExport = true;
966
- let decl = t3.isIdentifier(node.declaration) && t3.isProgram(parent) ? _findVarInitialization(node.declaration.name, parent) : node.declaration;
967
- decl = unwrap(decl);
990
+ let decl = self._resolveDeclaration(node.declaration, parent);
968
991
  if (t3.isCallExpression(decl) && t3.isObjectExpression(decl.arguments[0])) {
969
992
  decl = decl.arguments[0];
970
993
  }
@@ -987,10 +1010,7 @@ var ConfigFile = class {
987
1010
  node.declaration.declarations.forEach((decl) => {
988
1011
  if (t3.isVariableDeclarator(decl) && t3.isIdentifier(decl.id)) {
989
1012
  const { name: exportName } = decl.id;
990
- let exportVal = decl.init;
991
- if (t3.isIdentifier(exportVal)) {
992
- exportVal = _findVarInitialization(exportVal.name, parent);
993
- }
1013
+ const exportVal = self._resolveDeclaration(decl.init, parent);
994
1014
  self._exports[exportName] = exportVal;
995
1015
  self._exportDecls[exportName] = decl;
996
1016
  }
@@ -1008,7 +1028,7 @@ var ConfigFile = class {
1008
1028
  const { name: exportName } = spec.exported;
1009
1029
  const decl = _findVarDeclarator(localName, parent);
1010
1030
  if (decl) {
1011
- self._exports[exportName] = decl.init;
1031
+ self._exports[exportName] = self._resolveDeclaration(decl.init, parent);
1012
1032
  self._exportDecls[exportName] = decl;
1013
1033
  }
1014
1034
  }
@@ -1030,22 +1050,13 @@ var ConfigFile = class {
1030
1050
  const { left, right } = node.expression;
1031
1051
  if (t3.isMemberExpression(left) && t3.isIdentifier(left.object) && left.object.name === "module" && t3.isIdentifier(left.property) && left.property.name === "exports") {
1032
1052
  let exportObject = right;
1033
- if (t3.isIdentifier(right)) {
1034
- exportObject = _findVarInitialization(right.name, parent);
1035
- }
1036
- exportObject = unwrap(exportObject);
1053
+ exportObject = self._resolveDeclaration(exportObject, parent);
1037
1054
  if (t3.isObjectExpression(exportObject)) {
1038
1055
  self._exportsObject = exportObject;
1039
1056
  exportObject.properties.forEach((p) => {
1040
1057
  const exportName = propKey(p);
1041
1058
  if (exportName) {
1042
- let exportVal = p.value;
1043
- if (t3.isIdentifier(exportVal)) {
1044
- exportVal = _findVarInitialization(
1045
- exportVal.name,
1046
- parent
1047
- );
1048
- }
1059
+ const exportVal = self._resolveDeclaration(p.value, parent);
1049
1060
  self._exports[exportName] = exportVal;
1050
1061
  }
1051
1062
  });
@@ -1256,13 +1267,9 @@ var ConfigFile = class {
1256
1267
  }
1257
1268
  }
1258
1269
  if (t3.isExportDefaultDeclaration(node)) {
1259
- let decl = node.declaration;
1260
- if (t3.isIdentifier(decl)) {
1261
- decl = _findVarInitialization(decl.name, this._ast.program);
1262
- }
1263
- decl = unwrap(decl);
1264
- if (t3.isObjectExpression(decl)) {
1265
- const properties2 = decl.properties;
1270
+ const resolved = this._resolveDeclaration(node.declaration);
1271
+ if (t3.isObjectExpression(resolved)) {
1272
+ const properties2 = resolved.properties;
1266
1273
  removeProperty(properties2, path[0]);
1267
1274
  removedRootProperty = true;
1268
1275
  }
@@ -1932,8 +1939,9 @@ var enrichCsfMeta = /* @__PURE__ */ __name((csf, csfSource, options) => {
1932
1939
  }
1933
1940
  }
1934
1941
  }, "enrichCsfMeta");
1935
- var enrichCsf = /* @__PURE__ */ __name((csf, csfSource, options) => {
1942
+ var enrichCsf = /* @__PURE__ */ __name(async (csf, csfSource, options) => {
1936
1943
  enrichCsfMeta(csf, csfSource, options);
1944
+ await options?.enrichCsf?.(csf, csfSource);
1937
1945
  Object.keys(csf._storyExports).forEach((key) => {
1938
1946
  enrichCsfStory(csf, csfSource, key, options);
1939
1947
  });
@@ -1,17 +1,17 @@
1
- import CJS_COMPAT_NODE_URL_viqf41uklqm from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_viqf41uklqm from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_viqf41uklqm from "node:module";
1
+ import CJS_COMPAT_NODE_URL_8vqew0zn9si from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_8vqew0zn9si from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_8vqew0zn9si from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_viqf41uklqm.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_viqf41uklqm.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_viqf41uklqm.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_8vqew0zn9si.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_8vqew0zn9si.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_8vqew0zn9si.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
  __name
14
- } from "./chunk-VL6WDGIU.js";
14
+ } from "./chunk-OOI74AL3.js";
15
15
 
16
16
  // ../node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs
17
17
  var comma = ",".charCodeAt(0);
@@ -1,33 +1,33 @@
1
- import CJS_COMPAT_NODE_URL_viqf41uklqm from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_viqf41uklqm from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_viqf41uklqm from "node:module";
1
+ import CJS_COMPAT_NODE_URL_8vqew0zn9si from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_8vqew0zn9si from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_8vqew0zn9si from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_viqf41uklqm.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_viqf41uklqm.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_viqf41uklqm.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_8vqew0zn9si.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_8vqew0zn9si.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_8vqew0zn9si.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
  require_build
14
- } from "./chunk-6C7OBGYG.js";
14
+ } from "./chunk-4ZB555EJ.js";
15
15
  import {
16
16
  resolvePackageDir
17
- } from "./chunk-O3OJUFKU.js";
17
+ } from "./chunk-V7VURIPB.js";
18
18
  import {
19
19
  require_prompts
20
- } from "./chunk-3ICYWJ3N.js";
20
+ } from "./chunk-UJ5SJ23M.js";
21
21
  import {
22
22
  require_dist
23
- } from "./chunk-HYNQ2IX4.js";
23
+ } from "./chunk-5OVB4A6F.js";
24
24
  import {
25
25
  require_picocolors
26
- } from "./chunk-27W6KHQ2.js";
26
+ } from "./chunk-X4XU27M6.js";
27
27
  import {
28
28
  __name,
29
29
  __toESM
30
- } from "./chunk-VL6WDGIU.js";
30
+ } from "./chunk-OOI74AL3.js";
31
31
 
32
32
  // src/core-server/utils/server-statics.ts
33
33
  var import_picocolors = __toESM(require_picocolors(), 1);