storybook 10.0.0-beta.3 → 10.0.0-beta.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_browser-chunks/Color-KPLIACXP.js +1569 -0
- package/dist/_browser-chunks/{chunk-YY5GICNT.js → chunk-6E2SHJSL.js} +175 -32
- package/dist/_browser-chunks/{chunk-MZNYTCNT.js → chunk-AM4PZYVQ.js} +10 -63
- package/dist/_browser-chunks/{chunk-YWDKX534.js → chunk-FA42P6MO.js} +49 -4
- package/dist/_browser-chunks/chunk-G33S6YM3.js +521 -0
- package/dist/_browser-chunks/chunk-GJ67EE65.js +67 -0
- package/dist/_browser-chunks/{chunk-4QPX7WIQ.js → chunk-JJZMHC3A.js} +57 -166
- package/dist/_browser-chunks/{chunk-MD2FTHCZ.js → chunk-JVSKG4YS.js} +3 -16
- package/dist/_browser-chunks/{chunk-E7VLET3C.js → chunk-KSCAWCCE.js} +3947 -4291
- package/dist/_browser-chunks/chunk-QK3L5AXO.js +372 -0
- package/dist/_browser-chunks/chunk-VUAFL5XK.js +20 -0
- package/dist/_browser-chunks/{chunk-T7RCAJIX.js → chunk-Y3M7TW6K.js} +43 -47
- package/dist/_browser-chunks/{chunk-PYK5ZTFK.js → chunk-YQV3EGQ5.js} +5 -5
- package/dist/_browser-chunks/{syntaxhighlighter-YYAA4CS4.js → syntaxhighlighter-RJW7FE3A.js} +3 -2
- package/dist/_node-chunks/{builder-manager-DXAEQZJB.js → builder-manager-ZTS4EIKQ.js} +18 -13
- package/dist/_node-chunks/camelcase-K3BM7RII.js +18 -0
- package/dist/_node-chunks/{chunk-XRAB2RZN.js → chunk-2VMDKLSW.js} +6 -6
- package/dist/_node-chunks/{chunk-EI44VA3U.js → chunk-3VVGIILJ.js} +8 -8
- package/dist/_node-chunks/{chunk-KQXC7XVZ.js → chunk-4KRR46V2.js} +50 -89
- package/dist/_node-chunks/{chunk-EVY6P65U.js → chunk-4VDRH7SM.js} +7 -7
- package/dist/_node-chunks/chunk-7LG5CLCT.js +18 -0
- package/dist/_node-chunks/{chunk-DNOOZ2LS.js → chunk-ACUNHBEO.js} +552 -717
- package/dist/_node-chunks/{camelcase-CMMT6PHY.js → chunk-AK5PHLUA.js} +9 -8
- package/dist/_node-chunks/{chunk-RUCPXDO3.js → chunk-D7SDB4XE.js} +223 -243
- package/dist/_node-chunks/chunk-DWJ7TV2O.js +62 -0
- package/dist/_node-chunks/chunk-DZJNLBBL.js +79 -0
- package/dist/_node-chunks/{chunk-5XVEWBRA.js → chunk-EIHJ5J3O.js} +8 -8
- package/dist/_node-chunks/{chunk-3SUJKLRV.js → chunk-F3WE3456.js} +7 -7
- package/dist/_node-chunks/{chunk-QI3AVWUV.js → chunk-F7YW5W6B.js} +12 -12
- package/dist/_node-chunks/{chunk-6Z44ODDR.js → chunk-H52PBBSK.js} +7 -7
- package/dist/_node-chunks/{chunk-WRSYICUI.js → chunk-J3DQMIO4.js} +7 -7
- package/dist/_node-chunks/{chunk-PA26PSV2.js → chunk-K4YETNYJ.js} +30 -21
- package/dist/_node-chunks/{chunk-LRQFELIZ.js → chunk-KU3JBNPY.js} +8 -8
- package/dist/_node-chunks/{chunk-4TGAX5W7.js → chunk-KZB7ELL6.js} +162 -103
- package/dist/_node-chunks/{chunk-PAZJQ2GH.js → chunk-OC3TVLYU.js} +7 -7
- package/dist/_node-chunks/{chunk-7EGB7ALG.js → chunk-P3TWEOO5.js} +7 -7
- package/dist/_node-chunks/{chunk-BV4J7FF6.js → chunk-P7YMEOXF.js} +7 -7
- package/dist/_node-chunks/{chunk-CNKVQCQJ.js → chunk-PIKDGR3O.js} +7 -7
- package/dist/_node-chunks/{chunk-R6TLLF24.js → chunk-QHIU5I7C.js} +6 -6
- package/dist/_node-chunks/{chunk-AKW5OJ2T.js → chunk-SW3VZAH7.js} +9 -9
- package/dist/_node-chunks/chunk-TBWOUVTA.js +4967 -0
- package/dist/_node-chunks/{chunk-TL5RNPZW.js → chunk-TKN5TEZV.js} +583 -180
- package/dist/_node-chunks/{chunk-SHXAIHPO.js → chunk-TVKUJ3SE.js} +623 -750
- package/dist/_node-chunks/{chunk-MVPVYHBT.js → chunk-UTCFHTQH.js} +8 -8
- package/dist/_node-chunks/{chunk-PK6SVDYW.js → chunk-VQN4WAIA.js} +7 -7
- package/dist/_node-chunks/{chunk-IA7M33LK.js → chunk-VWSUFVUF.js} +7 -7
- package/dist/_node-chunks/{chunk-ICETGZAR.js → chunk-VX5P3IYA.js} +7 -7
- package/dist/_node-chunks/{chunk-ICFGNVW7.js → chunk-WCSHG2QT.js} +7 -7
- package/dist/_node-chunks/{default-browser-id-2X5XLPPS.js → default-browser-id-4RZZMHJE.js} +7 -7
- package/dist/_node-chunks/{dist-JSBOOVQK.js → dist-OGRBL76N.js} +9 -9
- package/dist/_node-chunks/{globby-YYTLHNUO.js → globby-65LOULA6.js} +9 -9
- package/dist/_node-chunks/{lib-DJHADRPZ.js → lib-TF7JCT3A.js} +36 -12
- package/dist/_node-chunks/{mdx-N42X6CFJ-WT6XCDU6.js → mdx-N42X6CFJ-6ZJEUZMZ.js} +8 -8
- package/dist/_node-chunks/{p-limit-HTXI4SGX.js → p-limit-PF7JSPDT.js} +76 -10
- package/dist/_node-chunks/{plugin-NNRMQ2YK.js → plugin-A6XAWMXN.js} +10 -10
- package/dist/_node-chunks/{plugin-W22F3FQV.js → plugin-LGHGAC6J.js} +10 -10
- package/dist/_node-chunks/{webpack-inject-mocker-runtime-plugin-VFNVWMAM.js → webpack-inject-mocker-runtime-plugin-HDSEOU3Z.js} +1307 -847
- package/dist/_node-chunks/{webpack-mock-plugin-Q4ED2M25.js → webpack-mock-plugin-ZJJVMJUS.js} +9 -9
- package/dist/babel/index.d.ts +1 -1
- package/dist/babel/index.js +11 -11
- package/dist/bin/core.js +638 -187
- package/dist/bin/dispatcher.js +11 -11
- package/dist/bin/loader.js +8 -8
- package/dist/cli/index.d.ts +62 -75
- package/dist/cli/index.js +60 -54
- package/dist/common/index.d.ts +3 -1
- package/dist/common/index.js +23 -22
- package/dist/components/index.js +24 -20
- package/dist/core-server/index.js +3544 -3220
- package/dist/core-server/presets/common-manager.js +440 -720
- package/dist/core-server/presets/common-override-preset.js +9 -9
- package/dist/core-server/presets/common-preset.js +22 -22
- 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/index.js +6 -6
- package/dist/csf-tools/index.js +9 -9
- package/dist/docs-tools/index.js +4 -4
- package/dist/instrumenter/index.js +1 -1
- package/dist/manager/globals-runtime.js +8910 -18107
- package/dist/manager/runtime.js +3256 -2945
- package/dist/manager-api/index.js +23 -20
- package/dist/node-logger/index.d.ts +1 -1
- package/dist/node-logger/index.js +1136 -662
- package/dist/preview/runtime.js +12061 -21584
- package/dist/preview-api/index.js +6 -6
- package/dist/router/index.js +2 -2
- package/dist/server-errors.js +10 -10
- package/dist/telemetry/index.js +24 -25
- package/dist/test/index.js +1872 -4023
- package/dist/theming/index.d.ts +2 -2
- package/dist/theming/index.js +6 -6
- package/package.json +4 -8
- package/dist/_browser-chunks/Color-SFYJJKWL.js +0 -605
- package/dist/_browser-chunks/chunk-DHO2SA6L.js +0 -12
- package/dist/_browser-chunks/chunk-WPHPDNUA.js +0 -974
- package/dist/_node-chunks/chunk-ALWVSNSK.js +0 -62
- package/dist/_node-chunks/chunk-MHNUEOON.js +0 -87
- package/dist/_node-chunks/chunk-VDFQYNPZ.js +0 -266
- package/dist/_node-chunks/chunk-WELIADWR.js +0 -2377
- package/dist/_node-chunks/chunk-YRXKNGPR.js +0 -18
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_0oz6lpav6bgq from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_0oz6lpav6bgq from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_0oz6lpav6bgq from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_0oz6lpav6bgq.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_0oz6lpav6bgq.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_0oz6lpav6bgq.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
@@ -13,23 +13,23 @@ import {
|
|
|
13
13
|
BROWSER_TARGETS,
|
|
14
14
|
NODE_TARGET,
|
|
15
15
|
SUPPORTED_FEATURES
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-QHIU5I7C.js";
|
|
17
17
|
import {
|
|
18
18
|
require_build
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-VQN4WAIA.js";
|
|
20
20
|
import {
|
|
21
21
|
resolveModulePath
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-WCSHG2QT.js";
|
|
23
23
|
import {
|
|
24
24
|
resolvePackageDir
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-KU3JBNPY.js";
|
|
26
26
|
import {
|
|
27
27
|
join,
|
|
28
28
|
parse
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-4VDRH7SM.js";
|
|
30
30
|
import {
|
|
31
31
|
slash
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-J3DQMIO4.js";
|
|
33
33
|
import {
|
|
34
34
|
__commonJS,
|
|
35
35
|
__esm,
|
|
@@ -38,7 +38,7 @@ import {
|
|
|
38
38
|
__require,
|
|
39
39
|
__toCommonJS,
|
|
40
40
|
__toESM
|
|
41
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-2VMDKLSW.js";
|
|
42
42
|
|
|
43
43
|
// ../node_modules/tslib/tslib.es6.mjs
|
|
44
44
|
var tslib_es6_exports = {};
|
|
@@ -1665,6 +1665,7 @@ var exports_default = {
|
|
|
1665
1665
|
"BoxIcon",
|
|
1666
1666
|
"BranchIcon",
|
|
1667
1667
|
"BrowserIcon",
|
|
1668
|
+
"BugIcon",
|
|
1668
1669
|
"ButtonIcon",
|
|
1669
1670
|
"CPUIcon",
|
|
1670
1671
|
"CalendarIcon",
|
|
@@ -1738,6 +1739,7 @@ var exports_default = {
|
|
|
1738
1739
|
"FolderIcon",
|
|
1739
1740
|
"FormIcon",
|
|
1740
1741
|
"GDriveIcon",
|
|
1742
|
+
"GiftIcon",
|
|
1741
1743
|
"GithubIcon",
|
|
1742
1744
|
"GitlabIcon",
|
|
1743
1745
|
"GlobeIcon",
|
|
@@ -1778,6 +1780,7 @@ var exports_default = {
|
|
|
1778
1780
|
"NutIcon",
|
|
1779
1781
|
"OutboxIcon",
|
|
1780
1782
|
"OutlineIcon",
|
|
1783
|
+
"PaintBrushAltIcon",
|
|
1781
1784
|
"PaintBrushIcon",
|
|
1782
1785
|
"PaperClipIcon",
|
|
1783
1786
|
"ParagraphIcon",
|
|
@@ -1821,6 +1824,8 @@ var exports_default = {
|
|
|
1821
1824
|
"SidebarAltToggleIcon",
|
|
1822
1825
|
"SidebarIcon",
|
|
1823
1826
|
"SidebarToggleIcon",
|
|
1827
|
+
"SortDownIcon",
|
|
1828
|
+
"SortUpIcon",
|
|
1824
1829
|
"SpeakerIcon",
|
|
1825
1830
|
"StackedIcon",
|
|
1826
1831
|
"StarHollowIcon",
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import CJS_COMPAT_NODE_URL_0oz6lpav6bgq from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_0oz6lpav6bgq from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_0oz6lpav6bgq from "node:module";
|
|
4
|
+
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_0oz6lpav6bgq.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_0oz6lpav6bgq.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_0oz6lpav6bgq.createRequire(import.meta.url);
|
|
8
|
+
|
|
9
|
+
// ------------------------------------------------------------
|
|
10
|
+
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
11
|
+
// ------------------------------------------------------------
|
|
12
|
+
import {
|
|
13
|
+
camelCase
|
|
14
|
+
} from "./chunk-AK5PHLUA.js";
|
|
15
|
+
import "./chunk-2VMDKLSW.js";
|
|
16
|
+
export {
|
|
17
|
+
camelCase as default
|
|
18
|
+
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_0oz6lpav6bgq from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_0oz6lpav6bgq from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_0oz6lpav6bgq from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_0oz6lpav6bgq.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_0oz6lpav6bgq.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_0oz6lpav6bgq.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_0oz6lpav6bgq from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_0oz6lpav6bgq from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_0oz6lpav6bgq from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_0oz6lpav6bgq.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_0oz6lpav6bgq.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_0oz6lpav6bgq.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
@@ -16,10 +16,10 @@ import {
|
|
|
16
16
|
join,
|
|
17
17
|
normalize,
|
|
18
18
|
resolve
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-4VDRH7SM.js";
|
|
20
20
|
import {
|
|
21
21
|
__name
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-2VMDKLSW.js";
|
|
23
23
|
|
|
24
24
|
// src/core-server/mocking-utils/resolve.ts
|
|
25
25
|
import { readFileSync as readFileSync2, realpathSync } from "node:fs";
|
|
@@ -1,48 +1,46 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_0oz6lpav6bgq from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_0oz6lpav6bgq from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_0oz6lpav6bgq from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_0oz6lpav6bgq.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_0oz6lpav6bgq.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_0oz6lpav6bgq.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
11
11
|
// ------------------------------------------------------------
|
|
12
12
|
import {
|
|
13
13
|
version
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-7LG5CLCT.js";
|
|
15
15
|
import {
|
|
16
16
|
createFileSystemCache,
|
|
17
|
-
resolvePathInStorybookCache
|
|
18
|
-
|
|
17
|
+
resolvePathInStorybookCache,
|
|
18
|
+
up
|
|
19
|
+
} from "./chunk-ACUNHBEO.js";
|
|
19
20
|
import {
|
|
20
21
|
globalSettings
|
|
21
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-D7SDB4XE.js";
|
|
22
23
|
import {
|
|
23
24
|
execaCommand,
|
|
24
25
|
getProjectRoot
|
|
25
|
-
} from "./chunk-
|
|
26
|
-
import {
|
|
27
|
-
findUp
|
|
28
|
-
} from "./chunk-VDFQYNPZ.js";
|
|
26
|
+
} from "./chunk-TBWOUVTA.js";
|
|
29
27
|
import {
|
|
30
28
|
resolvePackageDir
|
|
31
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-KU3JBNPY.js";
|
|
32
30
|
import {
|
|
33
31
|
join
|
|
34
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-4VDRH7SM.js";
|
|
35
33
|
import {
|
|
36
34
|
slash
|
|
37
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-J3DQMIO4.js";
|
|
38
36
|
import {
|
|
39
37
|
require_picocolors
|
|
40
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-P3TWEOO5.js";
|
|
41
39
|
import {
|
|
42
40
|
__commonJS,
|
|
43
41
|
__name,
|
|
44
42
|
__toESM
|
|
45
|
-
} from "./chunk-
|
|
43
|
+
} from "./chunk-2VMDKLSW.js";
|
|
46
44
|
|
|
47
45
|
// ../node_modules/fetch-retry/index.js
|
|
48
46
|
var require_fetch_retry = __commonJS({
|
|
@@ -96,19 +94,19 @@ var require_fetch_retry = __commonJS({
|
|
|
96
94
|
throw new ArgumentError("retryOn property expects an array or function");
|
|
97
95
|
}
|
|
98
96
|
}
|
|
99
|
-
return new Promise(function(
|
|
97
|
+
return new Promise(function(resolve, reject) {
|
|
100
98
|
var wrappedFetch = /* @__PURE__ */ __name(function(attempt) {
|
|
101
99
|
var _input = typeof Request !== "undefined" && input instanceof Request ? input.clone() : input;
|
|
102
100
|
fetch2(_input, init).then(function(response) {
|
|
103
101
|
if (Array.isArray(retryOn) && retryOn.indexOf(response.status) === -1) {
|
|
104
|
-
|
|
102
|
+
resolve(response);
|
|
105
103
|
} else if (typeof retryOn === "function") {
|
|
106
104
|
try {
|
|
107
105
|
return Promise.resolve(retryOn(attempt, null, response)).then(function(retryOnResponse) {
|
|
108
106
|
if (retryOnResponse) {
|
|
109
107
|
retry2(attempt, null, response);
|
|
110
108
|
} else {
|
|
111
|
-
|
|
109
|
+
resolve(response);
|
|
112
110
|
}
|
|
113
111
|
}).catch(reject);
|
|
114
112
|
} catch (error) {
|
|
@@ -118,7 +116,7 @@ var require_fetch_retry = __commonJS({
|
|
|
118
116
|
if (attempt < retries) {
|
|
119
117
|
retry2(attempt, null, response);
|
|
120
118
|
} else {
|
|
121
|
-
|
|
119
|
+
resolve(response);
|
|
122
120
|
}
|
|
123
121
|
}
|
|
124
122
|
}).catch(function(error) {
|
|
@@ -235,7 +233,8 @@ function sanitizeError(error, pathSeparator = path.sep) {
|
|
|
235
233
|
__name(sanitizeError, "sanitizeError");
|
|
236
234
|
|
|
237
235
|
// src/telemetry/storybook-metadata.ts
|
|
238
|
-
import {
|
|
236
|
+
import { readFile } from "node:fs/promises";
|
|
237
|
+
import { dirname } from "node:path";
|
|
239
238
|
import {
|
|
240
239
|
getStorybookConfiguration,
|
|
241
240
|
getStorybookInfo,
|
|
@@ -245,57 +244,6 @@ import {
|
|
|
245
244
|
} from "storybook/internal/common";
|
|
246
245
|
import { readConfig } from "storybook/internal/csf-tools";
|
|
247
246
|
|
|
248
|
-
// ../node_modules/walk-up-path/dist/mjs/index.js
|
|
249
|
-
import { dirname, resolve } from "path";
|
|
250
|
-
var walkUp = /* @__PURE__ */ __name(function* (path3) {
|
|
251
|
-
for (path3 = resolve(path3); path3; ) {
|
|
252
|
-
yield path3;
|
|
253
|
-
const pp = dirname(path3);
|
|
254
|
-
if (pp === path3) {
|
|
255
|
-
break;
|
|
256
|
-
} else {
|
|
257
|
-
path3 = pp;
|
|
258
|
-
}
|
|
259
|
-
}
|
|
260
|
-
}, "walkUp");
|
|
261
|
-
|
|
262
|
-
// ../node_modules/fd-package-json/dist/esm/main.js
|
|
263
|
-
import { resolve as resolve2 } from "node:path";
|
|
264
|
-
import { stat, readFile } from "node:fs/promises";
|
|
265
|
-
async function fileExists(path3) {
|
|
266
|
-
try {
|
|
267
|
-
const stats = await stat(path3);
|
|
268
|
-
return stats.isFile();
|
|
269
|
-
} catch (_err) {
|
|
270
|
-
return false;
|
|
271
|
-
}
|
|
272
|
-
}
|
|
273
|
-
__name(fileExists, "fileExists");
|
|
274
|
-
async function findPackagePath(cwd) {
|
|
275
|
-
for (const path3 of walkUp(cwd)) {
|
|
276
|
-
const packagePath = resolve2(path3, "package.json");
|
|
277
|
-
const hasPackageJson = await fileExists(packagePath);
|
|
278
|
-
if (hasPackageJson) {
|
|
279
|
-
return packagePath;
|
|
280
|
-
}
|
|
281
|
-
}
|
|
282
|
-
return null;
|
|
283
|
-
}
|
|
284
|
-
__name(findPackagePath, "findPackagePath");
|
|
285
|
-
async function findPackage(cwd) {
|
|
286
|
-
const packagePath = await findPackagePath(cwd);
|
|
287
|
-
if (!packagePath) {
|
|
288
|
-
return null;
|
|
289
|
-
}
|
|
290
|
-
try {
|
|
291
|
-
const source = await readFile(packagePath, { encoding: "utf8" });
|
|
292
|
-
return JSON.parse(source);
|
|
293
|
-
} catch (_err) {
|
|
294
|
-
return null;
|
|
295
|
-
}
|
|
296
|
-
}
|
|
297
|
-
__name(findPackage, "findPackage");
|
|
298
|
-
|
|
299
247
|
// src/telemetry/get-application-file-count.ts
|
|
300
248
|
import { sep } from "node:path";
|
|
301
249
|
|
|
@@ -396,7 +344,7 @@ var getActualPackageVersion = /* @__PURE__ */ __name(async (packageName) => {
|
|
|
396
344
|
}, "getActualPackageVersion");
|
|
397
345
|
var getActualPackageJson = /* @__PURE__ */ __name(async (packageName) => {
|
|
398
346
|
try {
|
|
399
|
-
let resolvedPackageJsonPath =
|
|
347
|
+
let resolvedPackageJsonPath = up({
|
|
400
348
|
cwd: fileURLToPath(import.meta.resolve(packageName, process.cwd()))
|
|
401
349
|
});
|
|
402
350
|
if (!resolvedPackageJsonPath) {
|
|
@@ -536,16 +484,16 @@ var getMonorepoType = /* @__PURE__ */ __name(() => {
|
|
|
536
484
|
}, "getMonorepoType");
|
|
537
485
|
|
|
538
486
|
// ../node_modules/package-manager-detector/dist/commands.mjs
|
|
539
|
-
function
|
|
487
|
+
function dashDashArg(agent, agentCommand) {
|
|
540
488
|
return (args) => {
|
|
541
489
|
if (args.length > 1) {
|
|
542
|
-
return [agent,
|
|
490
|
+
return [agent, agentCommand, args[0], "--", ...args.slice(1)];
|
|
543
491
|
} else {
|
|
544
|
-
return [agent,
|
|
492
|
+
return [agent, agentCommand, args[0]];
|
|
545
493
|
}
|
|
546
494
|
};
|
|
547
495
|
}
|
|
548
|
-
__name(
|
|
496
|
+
__name(dashDashArg, "dashDashArg");
|
|
549
497
|
function denoExecute() {
|
|
550
498
|
return (args) => {
|
|
551
499
|
return ["deno", "run", `npm:${args[0]}`, ...args.slice(1)];
|
|
@@ -554,7 +502,7 @@ function denoExecute() {
|
|
|
554
502
|
__name(denoExecute, "denoExecute");
|
|
555
503
|
var npm = {
|
|
556
504
|
"agent": ["npm", 0],
|
|
557
|
-
"run":
|
|
505
|
+
"run": dashDashArg("npm", "run"),
|
|
558
506
|
"install": ["npm", "i", 0],
|
|
559
507
|
"frozen": ["npm", "ci", 0],
|
|
560
508
|
"global": ["npm", "i", "-g", 0],
|
|
@@ -576,7 +524,7 @@ var yarn = {
|
|
|
576
524
|
"upgrade": ["yarn", "upgrade", 0],
|
|
577
525
|
"upgrade-interactive": ["yarn", "upgrade-interactive", 0],
|
|
578
526
|
"execute": ["npx", 0],
|
|
579
|
-
"execute-local":
|
|
527
|
+
"execute-local": dashDashArg("yarn", "exec"),
|
|
580
528
|
"uninstall": ["yarn", "remove", 0],
|
|
581
529
|
"global_uninstall": ["yarn", "global", "remove", 0]
|
|
582
530
|
};
|
|
@@ -641,7 +589,7 @@ var COMMANDS = {
|
|
|
641
589
|
// pnpm v6.x or below
|
|
642
590
|
"pnpm@6": {
|
|
643
591
|
...pnpm,
|
|
644
|
-
run:
|
|
592
|
+
run: dashDashArg("pnpm", "run")
|
|
645
593
|
},
|
|
646
594
|
"bun": bun,
|
|
647
595
|
"deno": deno
|
|
@@ -689,8 +637,8 @@ import path2 from "node:path";
|
|
|
689
637
|
import process2 from "node:process";
|
|
690
638
|
async function pathExists(path22, type) {
|
|
691
639
|
try {
|
|
692
|
-
const
|
|
693
|
-
return type === "file" ?
|
|
640
|
+
const stat = await fs.stat(path22);
|
|
641
|
+
return type === "file" ? stat.isFile() : stat.isDirectory();
|
|
694
642
|
} catch {
|
|
695
643
|
return false;
|
|
696
644
|
}
|
|
@@ -710,7 +658,18 @@ async function parsePackageJson(filepath, onUnknown) {
|
|
|
710
658
|
}
|
|
711
659
|
__name(parsePackageJson, "parsePackageJson");
|
|
712
660
|
async function detect(options = {}) {
|
|
713
|
-
const {
|
|
661
|
+
const {
|
|
662
|
+
cwd,
|
|
663
|
+
strategies = ["lockfile", "packageManager-field", "devEngines-field"],
|
|
664
|
+
onUnknown
|
|
665
|
+
} = options;
|
|
666
|
+
let stopDir;
|
|
667
|
+
if (typeof options.stopDir === "string") {
|
|
668
|
+
const resolved = path2.resolve(options.stopDir);
|
|
669
|
+
stopDir = /* @__PURE__ */ __name((dir) => dir === resolved, "stopDir");
|
|
670
|
+
} else {
|
|
671
|
+
stopDir = options.stopDir;
|
|
672
|
+
}
|
|
714
673
|
for (const directory of lookup(cwd)) {
|
|
715
674
|
for (const strategy of strategies) {
|
|
716
675
|
switch (strategy) {
|
|
@@ -747,6 +706,8 @@ async function detect(options = {}) {
|
|
|
747
706
|
}
|
|
748
707
|
}
|
|
749
708
|
}
|
|
709
|
+
if (stopDir?.(directory))
|
|
710
|
+
break;
|
|
750
711
|
}
|
|
751
712
|
return null;
|
|
752
713
|
}
|
|
@@ -1008,7 +969,7 @@ var computeStorybookMetadata = /* @__PURE__ */ __name(async ({
|
|
|
1008
969
|
} catch (e) {
|
|
1009
970
|
}
|
|
1010
971
|
const portableStoriesFileCount = await getPortableStoriesFileCount();
|
|
1011
|
-
const applicationFileCount = await getApplicationFileCount(
|
|
972
|
+
const applicationFileCount = await getApplicationFileCount(dirname(packageJsonPath));
|
|
1012
973
|
return {
|
|
1013
974
|
...metadata,
|
|
1014
975
|
...frameworkInfo,
|
|
@@ -1023,11 +984,11 @@ var computeStorybookMetadata = /* @__PURE__ */ __name(async ({
|
|
|
1023
984
|
};
|
|
1024
985
|
}, "computeStorybookMetadata");
|
|
1025
986
|
async function getPackageJsonDetails() {
|
|
1026
|
-
const packageJsonPath =
|
|
987
|
+
const packageJsonPath = up();
|
|
1027
988
|
if (packageJsonPath) {
|
|
1028
989
|
return {
|
|
1029
990
|
packageJsonPath,
|
|
1030
|
-
packageJson: await
|
|
991
|
+
packageJson: JSON.parse(await readFile(packageJsonPath, "utf8"))
|
|
1031
992
|
};
|
|
1032
993
|
}
|
|
1033
994
|
return {
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_0oz6lpav6bgq from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_0oz6lpav6bgq from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_0oz6lpav6bgq from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_0oz6lpav6bgq.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_0oz6lpav6bgq.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_0oz6lpav6bgq.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
11
11
|
// ------------------------------------------------------------
|
|
12
12
|
import {
|
|
13
13
|
__name
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-2VMDKLSW.js";
|
|
15
15
|
|
|
16
16
|
// ../node_modules/pathe/dist/shared/pathe.ff20891b.mjs
|
|
17
17
|
var _DRIVE_LETTER_START_RE = /^[A-Za-z]:\//;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import CJS_COMPAT_NODE_URL_0oz6lpav6bgq from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_0oz6lpav6bgq from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_0oz6lpav6bgq from "node:module";
|
|
4
|
+
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_0oz6lpav6bgq.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_0oz6lpav6bgq.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_0oz6lpav6bgq.createRequire(import.meta.url);
|
|
8
|
+
|
|
9
|
+
// ------------------------------------------------------------
|
|
10
|
+
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
11
|
+
// ------------------------------------------------------------
|
|
12
|
+
|
|
13
|
+
// package.json
|
|
14
|
+
var version = "10.0.0-beta.5";
|
|
15
|
+
|
|
16
|
+
export {
|
|
17
|
+
version
|
|
18
|
+
};
|