storybook 10.1.0-alpha.1 → 10.1.0-alpha.3
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.
- package/dist/_browser-chunks/{chunk-I74EUU5O.js → chunk-B3S3ROIP.js} +2 -1
- package/dist/_node-chunks/{builder-manager-6UBDPV7P.js → builder-manager-GBWCUYRR.js} +12 -12
- package/dist/_node-chunks/camelcase-2N6MD2HZ.js +18 -0
- package/dist/_node-chunks/{chunk-QNUGJO6L.js → chunk-2JHIUWIN.js} +7 -7
- package/dist/_node-chunks/{chunk-TXHNWNH4.js → chunk-5KDXQR2J.js} +7 -7
- package/dist/_node-chunks/{chunk-WNOSTIYP.js → chunk-5X7FGASE.js} +7 -7
- package/dist/_node-chunks/{chunk-BYVQZ2HU.js → chunk-6U2QTN2E.js} +7 -7
- package/dist/_node-chunks/{chunk-X67VGZN4.js → chunk-APKZWRTX.js} +7 -7
- package/dist/_node-chunks/{chunk-3FPF5Y2F.js → chunk-AX2PCJZ2.js} +6 -6
- package/dist/_node-chunks/{chunk-7TNUMFKR.js → chunk-B63HGQAB.js} +9 -9
- package/dist/_node-chunks/{chunk-6GD23U64.js → chunk-BNO5FB6B.js} +8 -8
- package/dist/_node-chunks/{chunk-3JCSHYSU.js → chunk-C4UVY6FF.js} +7 -7
- package/dist/_node-chunks/{chunk-J7N7PD5Q.js → chunk-CKXP5RYA.js} +9 -9
- package/dist/_node-chunks/chunk-D3NGJQDZ.js +18 -0
- package/dist/_node-chunks/{chunk-5SEHHENC.js → chunk-FJWQKOXX.js} +10 -10
- package/dist/_node-chunks/{chunk-HORWITP7.js → chunk-GMO24NTJ.js} +7 -7
- package/dist/_node-chunks/{chunk-BCDHUXAJ.js → chunk-HH57J4TX.js} +8 -8
- package/dist/_node-chunks/{chunk-VYRFXLRO.js → chunk-JKWP2FKQ.js} +7 -7
- package/dist/_node-chunks/chunk-LPNJ7PJY.js +61 -0
- package/dist/_node-chunks/{chunk-ULWNTI6M.js → chunk-MDXYV4OF.js} +15 -15
- package/dist/_node-chunks/{chunk-II4AFH3V.js → chunk-MPUDYIDW.js} +7 -7
- package/dist/_node-chunks/{chunk-GD2FXWDF.js → chunk-N7XYNLCJ.js} +7 -7
- package/dist/_node-chunks/{chunk-SCTKVDWR.js → chunk-NCHBSJG3.js} +1467 -148
- package/dist/_node-chunks/{chunk-RVE4UTVQ.js → chunk-NTH76OZA.js} +12 -12
- package/dist/_node-chunks/{chunk-DAMVKHAC.js → chunk-NTX43F34.js} +7 -7
- package/dist/_node-chunks/{chunk-MF2PUEWG.js → chunk-NYXHMPY4.js} +7 -7
- package/dist/_node-chunks/{chunk-FEOC7OX2.js → chunk-RLMJDF6S.js} +8 -8
- package/dist/_node-chunks/{chunk-TUFWZUTO.js → chunk-S32G4TCP.js} +7 -7
- package/dist/_node-chunks/{chunk-XW7YMR7I.js → chunk-SQAKXWVV.js} +7 -7
- package/dist/_node-chunks/{chunk-XCEBYOA4.js → chunk-T7KB265F.js} +6 -6
- package/dist/_node-chunks/{chunk-LAU7VVPC.js → chunk-TDLKTACT.js} +7 -7
- package/dist/_node-chunks/{chunk-6OAXYS5T.js → chunk-TSKLBMF3.js} +8 -8
- package/dist/_node-chunks/{chunk-4GE6Q4MX.js → chunk-TZ7GUTJ4.js} +7 -7
- package/dist/_node-chunks/{chunk-CJHAP7SE.js → chunk-YFBIEJ33.js} +7 -7
- package/dist/_node-chunks/{chunk-FY7XZPLY.js → chunk-YJJWZPL7.js} +39 -24
- package/dist/_node-chunks/{chunk-2RIKHYCS.js → chunk-ZQY3BNST.js} +12 -12
- package/dist/_node-chunks/{dist-APCKHSY3.js → dist-SQENNWFY.js} +9 -9
- package/dist/_node-chunks/{globby-TSGXGDA2.js → globby-CVPDLQ5Z.js} +9 -9
- package/dist/_node-chunks/{lib-DZ5TVIU5.js → lib-4BTTMYE2.js} +7 -7
- package/dist/_node-chunks/{mdx-N42X6CFJ-Z6BYQCPN.js → mdx-N42X6CFJ-ENVHI6CC.js} +8 -8
- package/dist/_node-chunks/{p-limit-MLJNGG2K.js → p-limit-I2XW6GST.js} +7 -7
- package/dist/_node-chunks/{plugin-J3JI3ZKJ.js → plugin-4NIE24IO.js} +10 -10
- package/dist/_node-chunks/{plugin-HJLCLGNT.js → plugin-O5PHZ367.js} +10 -10
- package/dist/_node-chunks/{webpack-inject-mocker-runtime-plugin-3QHNTM5B.js → webpack-inject-mocker-runtime-plugin-SVBN7WFH.js} +10 -10
- package/dist/_node-chunks/{webpack-mock-plugin-4Y3MWPJ6.js → webpack-mock-plugin-XBV3VXVD.js} +9 -9
- package/dist/babel/index.js +11 -11
- package/dist/bin/core.js +11 -11
- package/dist/bin/dispatcher.js +11 -11
- package/dist/bin/loader.js +9 -9
- package/dist/cli/index.js +21 -21
- package/dist/common/index.d.ts +210 -3
- package/dist/common/index.js +28 -20
- package/dist/components/index.js +1 -1
- package/dist/core-server/index.js +766 -52
- package/dist/core-server/presets/common-manager.js +1 -1
- package/dist/core-server/presets/common-override-preset.js +9 -9
- package/dist/core-server/presets/common-preset.js +23 -23
- package/dist/core-server/presets/webpack/loaders/storybook-mock-transform-loader.js +9 -9
- package/dist/core-server/presets/webpack/loaders/webpack-automock-loader.js +10 -10
- package/dist/csf-tools/index.d.ts +8 -4
- package/dist/csf-tools/index.js +9 -9
- package/dist/manager/globals-runtime.js +5 -4
- package/dist/manager-api/index.js +1 -1
- package/dist/node-logger/index.js +14 -14
- package/dist/preview/runtime.js +2 -2
- package/dist/preview-api/index.d.ts +67 -68
- package/dist/server-errors.js +10 -10
- package/dist/telemetry/index.js +24 -24
- package/dist/test/index.js +2 -2
- package/dist/types/index.d.ts +47 -5
- package/package.json +2 -1
- package/dist/_node-chunks/camelcase-WKJOVNPM.js +0 -18
- package/dist/_node-chunks/chunk-HM6B7FE5.js +0 -18
- package/dist/_node-chunks/chunk-ZRFYQ46H.js +0 -61
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
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";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
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);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
@@ -12,23 +12,23 @@ var require = CJS_COMPAT_NODE_MODULE_in4hyfgp7kn.createRequire(import.meta.url);
|
|
|
12
12
|
import {
|
|
13
13
|
any,
|
|
14
14
|
up2 as up
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-5KDXQR2J.js";
|
|
16
16
|
import {
|
|
17
17
|
invariant
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-5X7FGASE.js";
|
|
19
19
|
import {
|
|
20
20
|
resolvePackageDir
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-TSKLBMF3.js";
|
|
22
22
|
import {
|
|
23
23
|
require_prompts
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-NYXHMPY4.js";
|
|
25
25
|
import {
|
|
26
26
|
require_picocolors
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-2JHIUWIN.js";
|
|
28
28
|
import {
|
|
29
29
|
__name,
|
|
30
30
|
__toESM
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-T7KB265F.js";
|
|
32
32
|
|
|
33
33
|
// src/cli/project_types.ts
|
|
34
34
|
import { minVersion, validRange } from "semver";
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
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";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
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);
|
|
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-
|
|
14
|
+
} from "./chunk-T7KB265F.js";
|
|
15
15
|
|
|
16
16
|
// ../node_modules/camelcase/index.js
|
|
17
17
|
var UPPERCASE = /[\p{Lu}]/u;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
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";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
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);
|
|
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-
|
|
16
|
+
} from "./chunk-T7KB265F.js";
|
|
17
17
|
|
|
18
18
|
// ../node_modules/kleur/index.js
|
|
19
19
|
var require_kleur = __commonJS({
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
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";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
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);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
11
11
|
// ------------------------------------------------------------
|
|
12
12
|
import {
|
|
13
13
|
camelCase
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-NTX43F34.js";
|
|
15
15
|
import {
|
|
16
16
|
__commonJS,
|
|
17
17
|
__name,
|
|
18
18
|
__toESM
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-T7KB265F.js";
|
|
20
20
|
|
|
21
21
|
// ../node_modules/boxen/node_modules/emoji-regex/index.js
|
|
22
22
|
var require_emoji_regex = __commonJS({
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
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";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
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);
|
|
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_in4hyfgp7kn.createRequire(import.meta.url);
|
|
|
12
12
|
import {
|
|
13
13
|
__commonJS,
|
|
14
14
|
__name
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-T7KB265F.js";
|
|
16
16
|
|
|
17
17
|
// ../node_modules/ts-dedent/dist/index.js
|
|
18
18
|
var require_dist = __commonJS({
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
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";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
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);
|
|
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-
|
|
14
|
+
} from "./chunk-T7KB265F.js";
|
|
15
15
|
|
|
16
16
|
// src/telemetry/event-cache.ts
|
|
17
17
|
import { cache } from "storybook/internal/common";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
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";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
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);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
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";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
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);
|
|
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-
|
|
16
|
+
} from "./chunk-T7KB265F.js";
|
|
17
17
|
|
|
18
18
|
// ../node_modules/ms/index.js
|
|
19
19
|
var require_ms = __commonJS({
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
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";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
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);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
@@ -12,10 +12,10 @@ var require = CJS_COMPAT_NODE_MODULE_in4hyfgp7kn.createRequire(import.meta.url);
|
|
|
12
12
|
import {
|
|
13
13
|
dirname,
|
|
14
14
|
join
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-6U2QTN2E.js";
|
|
16
16
|
import {
|
|
17
17
|
__name
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-T7KB265F.js";
|
|
19
19
|
|
|
20
20
|
// ../node_modules/exsolve/dist/index.mjs
|
|
21
21
|
import fs, { realpathSync, statSync, lstatSync } from "node:fs";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
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";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
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);
|
|
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-
|
|
16
|
+
} from "./chunk-T7KB265F.js";
|
|
17
17
|
|
|
18
18
|
// ../node_modules/picomatch/lib/constants.js
|
|
19
19
|
var require_constants = __commonJS({
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
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";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
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);
|
|
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_in4hyfgp7kn.createRequire(import.meta.url);
|
|
|
12
12
|
import {
|
|
13
13
|
__name,
|
|
14
14
|
__require
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-T7KB265F.js";
|
|
16
16
|
|
|
17
17
|
// ../node_modules/@storybook/docs-mdx/dist/chunk-H6DQNFQR.js
|
|
18
18
|
var __create = Object.create;
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
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";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
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);
|
|
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-
|
|
14
|
+
} from "./chunk-S32G4TCP.js";
|
|
15
15
|
import {
|
|
16
16
|
__name,
|
|
17
17
|
__toESM
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-T7KB265F.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
|
-
|
|
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
|
|
353
|
-
self.
|
|
354
|
-
(
|
|
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
|
-
|
|
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 (
|
|
395
|
-
declarations =
|
|
396
|
-
} else if (
|
|
397
|
-
declarations = [
|
|
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((
|
|
401
|
-
|
|
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 } =
|
|
404
|
-
if (exportName === "__namedExportsOrder" &&
|
|
405
|
-
self._namedExportsOrder = parseExportsOrder(
|
|
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(
|
|
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);
|
|
@@ -1932,8 +1946,9 @@ var enrichCsfMeta = /* @__PURE__ */ __name((csf, csfSource, options) => {
|
|
|
1932
1946
|
}
|
|
1933
1947
|
}
|
|
1934
1948
|
}, "enrichCsfMeta");
|
|
1935
|
-
var enrichCsf = /* @__PURE__ */ __name((csf, csfSource, options) => {
|
|
1949
|
+
var enrichCsf = /* @__PURE__ */ __name(async (csf, csfSource, options) => {
|
|
1936
1950
|
enrichCsfMeta(csf, csfSource, options);
|
|
1951
|
+
await options?.enrichCsf?.(csf, csfSource);
|
|
1937
1952
|
Object.keys(csf._storyExports).forEach((key) => {
|
|
1938
1953
|
enrichCsfStory(csf, csfSource, key, options);
|
|
1939
1954
|
});
|
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
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";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
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);
|
|
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-
|
|
14
|
+
} from "./chunk-N7XYNLCJ.js";
|
|
15
15
|
import {
|
|
16
16
|
resolvePackageDir
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-TSKLBMF3.js";
|
|
18
18
|
import {
|
|
19
19
|
require_prompts
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-NYXHMPY4.js";
|
|
21
21
|
import {
|
|
22
22
|
require_dist
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-S32G4TCP.js";
|
|
24
24
|
import {
|
|
25
25
|
require_picocolors
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-2JHIUWIN.js";
|
|
27
27
|
import {
|
|
28
28
|
__name,
|
|
29
29
|
__toESM
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-T7KB265F.js";
|
|
31
31
|
|
|
32
32
|
// src/core-server/utils/server-statics.ts
|
|
33
33
|
var import_picocolors = __toESM(require_picocolors(), 1);
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
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";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
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);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
11
11
|
// ------------------------------------------------------------
|
|
12
12
|
import {
|
|
13
13
|
toEstree
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-YFBIEJ33.js";
|
|
15
15
|
import {
|
|
16
16
|
__name
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-T7KB265F.js";
|
|
18
18
|
|
|
19
19
|
// ../node_modules/@storybook/docs-mdx/dist/index.js
|
|
20
20
|
var getAttr = /* @__PURE__ */ __name((elt, what) => elt.attributes.find((n) => n.type === "JSXAttribute" && n.name.name === what), "getAttr");
|
|
@@ -161,7 +161,7 @@ var analyze = /* @__PURE__ */ __name(async (code) => {
|
|
|
161
161
|
metaTags: void 0,
|
|
162
162
|
imports: void 0
|
|
163
163
|
};
|
|
164
|
-
const { compile } = await import("./mdx-N42X6CFJ-
|
|
164
|
+
const { compile } = await import("./mdx-N42X6CFJ-ENVHI6CC.js");
|
|
165
165
|
await compile(code, {
|
|
166
166
|
rehypePlugins: [[plugin, store]]
|
|
167
167
|
});
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
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";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
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);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
@@ -12,16 +12,16 @@ var require = CJS_COMPAT_NODE_MODULE_in4hyfgp7kn.createRequire(import.meta.url);
|
|
|
12
12
|
import {
|
|
13
13
|
require_picomatch,
|
|
14
14
|
require_utils
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-TZ7GUTJ4.js";
|
|
16
16
|
import {
|
|
17
17
|
slash
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-MPUDYIDW.js";
|
|
19
19
|
import {
|
|
20
20
|
__commonJS,
|
|
21
21
|
__name,
|
|
22
22
|
__require,
|
|
23
23
|
__toESM
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-T7KB265F.js";
|
|
25
25
|
|
|
26
26
|
// ../node_modules/fast-glob/out/utils/array.js
|
|
27
27
|
var require_array = __commonJS({
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
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";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
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);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
__name,
|
|
15
15
|
__require,
|
|
16
16
|
__toESM
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-T7KB265F.js";
|
|
18
18
|
|
|
19
19
|
// ../node_modules/app-root-dir/lib/index.js
|
|
20
20
|
var require_lib = __commonJS({
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
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";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
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);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
@@ -23,10 +23,10 @@ import {
|
|
|
23
23
|
start,
|
|
24
24
|
toEstree,
|
|
25
25
|
unreachable
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-YFBIEJ33.js";
|
|
27
27
|
import {
|
|
28
28
|
__name
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-T7KB265F.js";
|
|
30
30
|
|
|
31
31
|
// ../node_modules/@storybook/docs-mdx/dist/mdx-N42X6CFJ.js
|
|
32
32
|
import { default as default2 } from "path";
|