storybook 10.2.0-alpha.15 → 10.2.0-alpha.16
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/_node-chunks/{builder-manager-SOKYB5NF.js → builder-manager-DQ6DNDHX.js} +12 -12
- package/dist/_node-chunks/{camelcase-SXQWF7PW.js → camelcase-ILOVTISA.js} +7 -7
- package/dist/_node-chunks/{chunk-5KEIALUH.js → chunk-3PMH6BEP.js} +6 -6
- package/dist/_node-chunks/{chunk-RGWB6DD7.js → chunk-47ZRY4XW.js} +6 -6
- package/dist/_node-chunks/{chunk-2BHD5YKF.js → chunk-5E2HAJXY.js} +6 -6
- package/dist/_node-chunks/{chunk-MD52RVZX.js → chunk-6QEWR44T.js} +7 -7
- package/dist/_node-chunks/{chunk-BRW7NFUP.js → chunk-CFXIZS6A.js} +7 -7
- package/dist/_node-chunks/chunk-DGLVYUKY.js +61 -0
- package/dist/_node-chunks/{chunk-T57UCO67.js → chunk-FNQ5WLS5.js} +7 -7
- package/dist/_node-chunks/{chunk-KNGN3UEO.js → chunk-IVYTDHSW.js} +7 -7
- package/dist/_node-chunks/{chunk-Q6WUEJ4S.js → chunk-JXU4P6K3.js} +6 -6
- package/dist/_node-chunks/{chunk-TN3Q52LO.js → chunk-K6FMM5LS.js} +6 -6
- package/dist/_node-chunks/{chunk-2FQAOAQ6.js → chunk-KAAWGCHX.js} +12 -12
- package/dist/_node-chunks/{chunk-4GKVZO2T.js → chunk-LOJ73E6E.js} +9 -9
- package/dist/_node-chunks/{chunk-274OMYGE.js → chunk-M6AUSQA3.js} +20 -20
- package/dist/_node-chunks/chunk-MSK3YTQT.js +23 -0
- package/dist/_node-chunks/{chunk-MQZLLJRG.js → chunk-OKUHCLLJ.js} +8 -8
- package/dist/_node-chunks/{chunk-BOY3TNPC.js → chunk-PGYIGHRK.js} +9 -9
- package/dist/_node-chunks/{chunk-E3Y5MHXD.js → chunk-RIEIAV32.js} +7 -7
- package/dist/_node-chunks/chunk-SPPXK6CQ.js +18 -0
- package/dist/_node-chunks/{chunk-HFKM7JHQ.js → chunk-SWN4HCJE.js} +6 -6
- package/dist/_node-chunks/{chunk-6SIUW3HU.js → chunk-TDBTCAEB.js} +12 -12
- package/dist/_node-chunks/{chunk-SZWIX5YC.js → chunk-TLGG6YAX.js} +29 -26
- package/dist/_node-chunks/{chunk-AIIQJ6UR.js → chunk-TTACLBSG.js} +7 -7
- package/dist/_node-chunks/{chunk-K4YVLJRS.js → chunk-WIOSV6HC.js} +6 -6
- package/dist/_node-chunks/{chunk-45UIB4YF.js → chunk-WVXPIXUS.js} +7 -7
- package/dist/_node-chunks/{chunk-PI7P5HFH.js → chunk-XJMJA2L4.js} +13 -13
- package/dist/_node-chunks/{chunk-FKBWQGIF.js → chunk-XWGABQX7.js} +6 -6
- package/dist/_node-chunks/{chunk-QPKBPYOY.js → chunk-YFUVKP3W.js} +7 -7
- package/dist/_node-chunks/{chunk-ENNDE4GC.js → chunk-ZN5DGHF3.js} +10 -10
- package/dist/_node-chunks/{globby-LGQ5P2JB.js → globby-A35XB3PP.js} +9 -9
- package/dist/_node-chunks/{lib-5LBLULG3.js → lib-D5I6ETBH.js} +7 -7
- package/dist/_node-chunks/{mdx-N42X6CFJ-TAPL5IEO.js → mdx-N42X6CFJ-DZ4EAFAE.js} +8 -8
- package/dist/_node-chunks/{p-limit-GTMOHYQF.js → p-limit-2CRKZRXN.js} +7 -7
- package/dist/babel/index.js +10 -10
- package/dist/bin/core.js +12 -12
- package/dist/bin/dispatcher.js +11 -11
- package/dist/bin/loader.js +9 -9
- package/dist/cli/index.js +18 -18
- package/dist/common/index.js +19 -19
- package/dist/core-server/index.js +34 -34
- package/dist/core-server/presets/common-override-preset.js +9 -9
- package/dist/core-server/presets/common-preset.js +25 -25
- package/dist/csf/index.d.ts +124 -6
- package/dist/csf/index.js +4 -1
- package/dist/csf-tools/index.js +10 -10
- package/dist/manager/globals-runtime.js +1 -1
- package/dist/manager-api/index.js +1 -1
- package/dist/mocking-utils/index.js +8 -8
- package/dist/node-logger/index.js +9 -9
- package/dist/server-errors.js +11 -11
- package/dist/telemetry/index.js +22 -22
- package/package.json +1 -1
- package/dist/_node-chunks/chunk-MM7Z4SG7.js +0 -23
- package/dist/_node-chunks/chunk-TYSSQECX.js +0 -61
- package/dist/_node-chunks/chunk-YP34ARUD.js +0 -18
package/dist/bin/loader.js
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_4zwbyhk64wx from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_4zwbyhk64wx from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_4zwbyhk64wx from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_4zwbyhk64wx.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_4zwbyhk64wx.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_4zwbyhk64wx.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
11
11
|
// ------------------------------------------------------------
|
|
12
12
|
import {
|
|
13
13
|
NODE_TARGET
|
|
14
|
-
} from "../_node-chunks/chunk-
|
|
14
|
+
} from "../_node-chunks/chunk-WIOSV6HC.js";
|
|
15
15
|
import {
|
|
16
16
|
require_dist
|
|
17
|
-
} from "../_node-chunks/chunk-
|
|
17
|
+
} from "../_node-chunks/chunk-YFUVKP3W.js";
|
|
18
18
|
import {
|
|
19
19
|
__toESM
|
|
20
|
-
} from "../_node-chunks/chunk-
|
|
20
|
+
} from "../_node-chunks/chunk-3PMH6BEP.js";
|
|
21
21
|
|
|
22
22
|
// src/bin/loader.ts
|
|
23
23
|
var import_ts_dedent = __toESM(require_dist(), 1);
|
package/dist/cli/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_4zwbyhk64wx from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_4zwbyhk64wx from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_4zwbyhk64wx from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_4zwbyhk64wx.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_4zwbyhk64wx.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_4zwbyhk64wx.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
@@ -33,24 +33,24 @@ import {
|
|
|
33
33
|
readFileAsJson,
|
|
34
34
|
suggestESLintPlugin,
|
|
35
35
|
writeFileAsJson
|
|
36
|
-
} from "../_node-chunks/chunk-
|
|
36
|
+
} from "../_node-chunks/chunk-KAAWGCHX.js";
|
|
37
37
|
import {
|
|
38
38
|
detectPnp
|
|
39
|
-
} from "../_node-chunks/chunk-
|
|
39
|
+
} from "../_node-chunks/chunk-MSK3YTQT.js";
|
|
40
40
|
import {
|
|
41
41
|
Settings,
|
|
42
42
|
_clearGlobalSettings,
|
|
43
43
|
globalSettings
|
|
44
|
-
} from "../_node-chunks/chunk-
|
|
45
|
-
import "../_node-chunks/chunk-
|
|
46
|
-
import "../_node-chunks/chunk-
|
|
47
|
-
import "../_node-chunks/chunk-
|
|
48
|
-
import "../_node-chunks/chunk-
|
|
49
|
-
import "../_node-chunks/chunk-
|
|
50
|
-
import "../_node-chunks/chunk-
|
|
51
|
-
import "../_node-chunks/chunk-
|
|
52
|
-
import "../_node-chunks/chunk-
|
|
53
|
-
import "../_node-chunks/chunk-
|
|
44
|
+
} from "../_node-chunks/chunk-LOJ73E6E.js";
|
|
45
|
+
import "../_node-chunks/chunk-JXU4P6K3.js";
|
|
46
|
+
import "../_node-chunks/chunk-SWN4HCJE.js";
|
|
47
|
+
import "../_node-chunks/chunk-RIEIAV32.js";
|
|
48
|
+
import "../_node-chunks/chunk-XWGABQX7.js";
|
|
49
|
+
import "../_node-chunks/chunk-YFUVKP3W.js";
|
|
50
|
+
import "../_node-chunks/chunk-PGYIGHRK.js";
|
|
51
|
+
import "../_node-chunks/chunk-WVXPIXUS.js";
|
|
52
|
+
import "../_node-chunks/chunk-FNQ5WLS5.js";
|
|
53
|
+
import "../_node-chunks/chunk-3PMH6BEP.js";
|
|
54
54
|
export {
|
|
55
55
|
ANGULAR_JSON_PATH,
|
|
56
56
|
AddonVitestService,
|
package/dist/common/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_4zwbyhk64wx from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_4zwbyhk64wx from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_4zwbyhk64wx from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_4zwbyhk64wx.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_4zwbyhk64wx.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_4zwbyhk64wx.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
@@ -102,29 +102,29 @@ import {
|
|
|
102
102
|
validateConfigurationFiles,
|
|
103
103
|
validateFrameworkName,
|
|
104
104
|
wrapValueWithGetAbsolutePathWrapper
|
|
105
|
-
} from "../_node-chunks/chunk-
|
|
105
|
+
} from "../_node-chunks/chunk-M6AUSQA3.js";
|
|
106
106
|
import {
|
|
107
107
|
versions_default
|
|
108
|
-
} from "../_node-chunks/chunk-
|
|
109
|
-
import "../_node-chunks/chunk-
|
|
110
|
-
import "../_node-chunks/chunk-
|
|
111
|
-
import "../_node-chunks/chunk-
|
|
108
|
+
} from "../_node-chunks/chunk-DGLVYUKY.js";
|
|
109
|
+
import "../_node-chunks/chunk-TTACLBSG.js";
|
|
110
|
+
import "../_node-chunks/chunk-OKUHCLLJ.js";
|
|
111
|
+
import "../_node-chunks/chunk-JXU4P6K3.js";
|
|
112
112
|
import {
|
|
113
113
|
groupBy,
|
|
114
114
|
invariant
|
|
115
|
-
} from "../_node-chunks/chunk-
|
|
115
|
+
} from "../_node-chunks/chunk-SWN4HCJE.js";
|
|
116
116
|
import {
|
|
117
117
|
importMetaResolve,
|
|
118
118
|
importModule,
|
|
119
119
|
resolvePackageDir,
|
|
120
120
|
safeResolveModule
|
|
121
|
-
} from "../_node-chunks/chunk-
|
|
122
|
-
import "../_node-chunks/chunk-
|
|
123
|
-
import "../_node-chunks/chunk-
|
|
124
|
-
import "../_node-chunks/chunk-
|
|
125
|
-
import "../_node-chunks/chunk-
|
|
126
|
-
import "../_node-chunks/chunk-
|
|
127
|
-
import "../_node-chunks/chunk-
|
|
121
|
+
} from "../_node-chunks/chunk-RIEIAV32.js";
|
|
122
|
+
import "../_node-chunks/chunk-XWGABQX7.js";
|
|
123
|
+
import "../_node-chunks/chunk-6QEWR44T.js";
|
|
124
|
+
import "../_node-chunks/chunk-47ZRY4XW.js";
|
|
125
|
+
import "../_node-chunks/chunk-YFUVKP3W.js";
|
|
126
|
+
import "../_node-chunks/chunk-FNQ5WLS5.js";
|
|
127
|
+
import "../_node-chunks/chunk-3PMH6BEP.js";
|
|
128
128
|
export {
|
|
129
129
|
DEFAULT_FILES_PATTERN,
|
|
130
130
|
FileSystemCache,
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_4zwbyhk64wx from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_4zwbyhk64wx from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_4zwbyhk64wx from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_4zwbyhk64wx.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_4zwbyhk64wx.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_4zwbyhk64wx.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 "../_node-chunks/chunk-
|
|
14
|
+
} from "../_node-chunks/chunk-IVYTDHSW.js";
|
|
15
15
|
import {
|
|
16
16
|
StatusTypeIdMismatchError
|
|
17
|
-
} from "../_node-chunks/chunk-
|
|
17
|
+
} from "../_node-chunks/chunk-ZN5DGHF3.js";
|
|
18
18
|
import {
|
|
19
19
|
debounce,
|
|
20
20
|
getErrorLevel,
|
|
@@ -24,68 +24,68 @@ import {
|
|
|
24
24
|
sendTelemetryError,
|
|
25
25
|
useStatics,
|
|
26
26
|
withTelemetry
|
|
27
|
-
} from "../_node-chunks/chunk-
|
|
27
|
+
} from "../_node-chunks/chunk-XJMJA2L4.js";
|
|
28
28
|
import {
|
|
29
29
|
detectPnp
|
|
30
|
-
} from "../_node-chunks/chunk-
|
|
31
|
-
import "../_node-chunks/chunk-
|
|
30
|
+
} from "../_node-chunks/chunk-MSK3YTQT.js";
|
|
31
|
+
import "../_node-chunks/chunk-CFXIZS6A.js";
|
|
32
32
|
import {
|
|
33
33
|
StorybookError
|
|
34
|
-
} from "../_node-chunks/chunk-
|
|
34
|
+
} from "../_node-chunks/chunk-K6FMM5LS.js";
|
|
35
35
|
import {
|
|
36
36
|
telemetry
|
|
37
|
-
} from "../_node-chunks/chunk-
|
|
38
|
-
import "../_node-chunks/chunk-
|
|
37
|
+
} from "../_node-chunks/chunk-TDBTCAEB.js";
|
|
38
|
+
import "../_node-chunks/chunk-SPPXK6CQ.js";
|
|
39
39
|
import {
|
|
40
40
|
optionalEnvToBoolean,
|
|
41
41
|
require_cross_spawn,
|
|
42
42
|
resolveImport,
|
|
43
43
|
supportedExtensions,
|
|
44
44
|
userOrAutoTitleFromSpecifier
|
|
45
|
-
} from "../_node-chunks/chunk-
|
|
46
|
-
import "../_node-chunks/chunk-
|
|
47
|
-
import "../_node-chunks/chunk-
|
|
45
|
+
} from "../_node-chunks/chunk-M6AUSQA3.js";
|
|
46
|
+
import "../_node-chunks/chunk-DGLVYUKY.js";
|
|
47
|
+
import "../_node-chunks/chunk-TTACLBSG.js";
|
|
48
48
|
import {
|
|
49
49
|
require_pretty_hrtime
|
|
50
|
-
} from "../_node-chunks/chunk-
|
|
51
|
-
import "../_node-chunks/chunk-
|
|
50
|
+
} from "../_node-chunks/chunk-OKUHCLLJ.js";
|
|
51
|
+
import "../_node-chunks/chunk-LOJ73E6E.js";
|
|
52
52
|
import {
|
|
53
53
|
invariant,
|
|
54
54
|
up2 as up
|
|
55
|
-
} from "../_node-chunks/chunk-
|
|
56
|
-
import "../_node-chunks/chunk-
|
|
55
|
+
} from "../_node-chunks/chunk-JXU4P6K3.js";
|
|
56
|
+
import "../_node-chunks/chunk-SWN4HCJE.js";
|
|
57
57
|
import {
|
|
58
58
|
importModule,
|
|
59
59
|
resolvePackageDir
|
|
60
|
-
} from "../_node-chunks/chunk-
|
|
60
|
+
} from "../_node-chunks/chunk-RIEIAV32.js";
|
|
61
61
|
import {
|
|
62
62
|
dirname,
|
|
63
63
|
join,
|
|
64
64
|
relative,
|
|
65
65
|
resolve
|
|
66
|
-
} from "../_node-chunks/chunk-
|
|
67
|
-
import "../_node-chunks/chunk-
|
|
66
|
+
} from "../_node-chunks/chunk-XWGABQX7.js";
|
|
67
|
+
import "../_node-chunks/chunk-6QEWR44T.js";
|
|
68
68
|
import {
|
|
69
69
|
slash
|
|
70
|
-
} from "../_node-chunks/chunk-
|
|
70
|
+
} from "../_node-chunks/chunk-47ZRY4XW.js";
|
|
71
71
|
import {
|
|
72
72
|
Tag
|
|
73
|
-
} from "../_node-chunks/chunk-
|
|
73
|
+
} from "../_node-chunks/chunk-5E2HAJXY.js";
|
|
74
74
|
import {
|
|
75
75
|
require_dist
|
|
76
|
-
} from "../_node-chunks/chunk-
|
|
76
|
+
} from "../_node-chunks/chunk-YFUVKP3W.js";
|
|
77
77
|
import {
|
|
78
78
|
require_lib,
|
|
79
79
|
require_src
|
|
80
|
-
} from "../_node-chunks/chunk-
|
|
80
|
+
} from "../_node-chunks/chunk-WVXPIXUS.js";
|
|
81
81
|
import {
|
|
82
82
|
require_picocolors
|
|
83
|
-
} from "../_node-chunks/chunk-
|
|
83
|
+
} from "../_node-chunks/chunk-FNQ5WLS5.js";
|
|
84
84
|
import {
|
|
85
85
|
__commonJS,
|
|
86
86
|
__require,
|
|
87
87
|
__toESM
|
|
88
|
-
} from "../_node-chunks/chunk-
|
|
88
|
+
} from "../_node-chunks/chunk-3PMH6BEP.js";
|
|
89
89
|
|
|
90
90
|
// ../../node_modules/glob-to-regexp/index.js
|
|
91
91
|
var require_glob_to_regexp = __commonJS({
|
|
@@ -4542,7 +4542,7 @@ function print(p) {
|
|
|
4542
4542
|
// src/core-server/utils/get-builders.ts
|
|
4543
4543
|
import { MissingBuilderError } from "storybook/internal/server-errors";
|
|
4544
4544
|
async function getManagerBuilder() {
|
|
4545
|
-
return await import("../_node-chunks/builder-manager-
|
|
4545
|
+
return await import("../_node-chunks/builder-manager-DQ6DNDHX.js");
|
|
4546
4546
|
}
|
|
4547
4547
|
async function getPreviewBuilder(resolvedPreviewBuilder) {
|
|
4548
4548
|
return await importModule(resolvedPreviewBuilder);
|
|
@@ -4606,7 +4606,7 @@ function watchStorySpecifiers(specifiers, options, onInvalidate) {
|
|
|
4606
4606
|
// files can be e.g. '**/foo/*/*.js' so we just want the last bit,
|
|
4607
4607
|
// because the directory could already be within the files part (e.g. './x/foo/bar')
|
|
4608
4608
|
basename(specifier.files)
|
|
4609
|
-
), { globby } = await import("../_node-chunks/globby-
|
|
4609
|
+
), { globby } = await import("../_node-chunks/globby-A35XB3PP.js");
|
|
4610
4610
|
(await globby(slash(dirGlob), commonGlobOptions(dirGlob))).forEach((filePath) => {
|
|
4611
4611
|
let fileImportPath = toImportPath(filePath);
|
|
4612
4612
|
specifier.importPathMatcher.exec(fileImportPath) && onInvalidate(fileImportPath, removed);
|
|
@@ -5625,7 +5625,7 @@ var getAttr = (elt, what) => elt.attributes.find((n) => n.type === "JSXAttribute
|
|
|
5625
5625
|
isTemplate: !1,
|
|
5626
5626
|
metaTags: void 0,
|
|
5627
5627
|
imports: void 0
|
|
5628
|
-
}, { compile } = await import("../_node-chunks/mdx-N42X6CFJ-
|
|
5628
|
+
}, { compile } = await import("../_node-chunks/mdx-N42X6CFJ-DZ4EAFAE.js");
|
|
5629
5629
|
await compile(code, {
|
|
5630
5630
|
rehypePlugins: [[plugin, store]]
|
|
5631
5631
|
});
|
|
@@ -5770,7 +5770,7 @@ var makeAbsolute = (otherImport, normalizedPath, workingDir) => otherImport.star
|
|
|
5770
5770
|
let cacheKey = this.getFindMatchingFilesCacheKey(specifier, workingDir, ignoreWarnings), cached = this.findMatchingFilesCache.get(cacheKey);
|
|
5771
5771
|
if (cached)
|
|
5772
5772
|
return cached;
|
|
5773
|
-
let pathToSubIndex = {}, globCwd = slash(resolve3(workingDir, specifier.directory)), globPattern = specifier.files.startsWith("!") ? `./${specifier.files}` : specifier.files, { globby } = await import("../_node-chunks/globby-
|
|
5773
|
+
let pathToSubIndex = {}, globCwd = slash(resolve3(workingDir, specifier.directory)), globPattern = specifier.files.startsWith("!") ? `./${specifier.files}` : specifier.files, { globby } = await import("../_node-chunks/globby-A35XB3PP.js"), files = await globby(globPattern, {
|
|
5774
5774
|
absolute: !0,
|
|
5775
5775
|
cwd: globCwd,
|
|
5776
5776
|
...commonGlobOptions2(globPattern)
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_4zwbyhk64wx from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_4zwbyhk64wx from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_4zwbyhk64wx from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_4zwbyhk64wx.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_4zwbyhk64wx.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_4zwbyhk64wx.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
|
glob
|
|
14
|
-
} from "../../_node-chunks/chunk-
|
|
14
|
+
} from "../../_node-chunks/chunk-6QEWR44T.js";
|
|
15
15
|
import {
|
|
16
16
|
slash
|
|
17
|
-
} from "../../_node-chunks/chunk-
|
|
18
|
-
import "../../_node-chunks/chunk-
|
|
17
|
+
} from "../../_node-chunks/chunk-47ZRY4XW.js";
|
|
18
|
+
import "../../_node-chunks/chunk-3PMH6BEP.js";
|
|
19
19
|
|
|
20
20
|
// src/core-server/utils/remove-mdx-entries.ts
|
|
21
21
|
import { isAbsolute, join, relative } from "node:path";
|
|
@@ -1,54 +1,54 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_4zwbyhk64wx from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_4zwbyhk64wx from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_4zwbyhk64wx from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_4zwbyhk64wx.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_4zwbyhk64wx.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_4zwbyhk64wx.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
11
11
|
// ------------------------------------------------------------
|
|
12
|
-
import "../../_node-chunks/chunk-
|
|
12
|
+
import "../../_node-chunks/chunk-KAAWGCHX.js";
|
|
13
13
|
import {
|
|
14
14
|
parseStaticDir,
|
|
15
15
|
sendTelemetryError,
|
|
16
16
|
throttle
|
|
17
|
-
} from "../../_node-chunks/chunk-
|
|
18
|
-
import "../../_node-chunks/chunk-
|
|
19
|
-
import "../../_node-chunks/chunk-
|
|
20
|
-
import "../../_node-chunks/chunk-
|
|
17
|
+
} from "../../_node-chunks/chunk-XJMJA2L4.js";
|
|
18
|
+
import "../../_node-chunks/chunk-MSK3YTQT.js";
|
|
19
|
+
import "../../_node-chunks/chunk-CFXIZS6A.js";
|
|
20
|
+
import "../../_node-chunks/chunk-K6FMM5LS.js";
|
|
21
21
|
import {
|
|
22
22
|
globalSettings
|
|
23
|
-
} from "../../_node-chunks/chunk-
|
|
23
|
+
} from "../../_node-chunks/chunk-LOJ73E6E.js";
|
|
24
24
|
import {
|
|
25
25
|
invariant
|
|
26
|
-
} from "../../_node-chunks/chunk-
|
|
27
|
-
import "../../_node-chunks/chunk-
|
|
26
|
+
} from "../../_node-chunks/chunk-JXU4P6K3.js";
|
|
27
|
+
import "../../_node-chunks/chunk-SWN4HCJE.js";
|
|
28
28
|
import {
|
|
29
29
|
resolvePackageDir
|
|
30
|
-
} from "../../_node-chunks/chunk-
|
|
30
|
+
} from "../../_node-chunks/chunk-RIEIAV32.js";
|
|
31
31
|
import {
|
|
32
32
|
isAbsolute,
|
|
33
33
|
join
|
|
34
|
-
} from "../../_node-chunks/chunk-
|
|
34
|
+
} from "../../_node-chunks/chunk-XWGABQX7.js";
|
|
35
35
|
import {
|
|
36
36
|
loadConfig
|
|
37
|
-
} from "../../_node-chunks/chunk-
|
|
38
|
-
import "../../_node-chunks/chunk-
|
|
37
|
+
} from "../../_node-chunks/chunk-TLGG6YAX.js";
|
|
38
|
+
import "../../_node-chunks/chunk-5E2HAJXY.js";
|
|
39
39
|
import {
|
|
40
40
|
require_dist
|
|
41
|
-
} from "../../_node-chunks/chunk-
|
|
42
|
-
import "../../_node-chunks/chunk-
|
|
43
|
-
import "../../_node-chunks/chunk-
|
|
41
|
+
} from "../../_node-chunks/chunk-YFUVKP3W.js";
|
|
42
|
+
import "../../_node-chunks/chunk-PGYIGHRK.js";
|
|
43
|
+
import "../../_node-chunks/chunk-WVXPIXUS.js";
|
|
44
44
|
import {
|
|
45
45
|
require_picocolors
|
|
46
|
-
} from "../../_node-chunks/chunk-
|
|
46
|
+
} from "../../_node-chunks/chunk-FNQ5WLS5.js";
|
|
47
47
|
import {
|
|
48
48
|
__commonJS,
|
|
49
49
|
__require,
|
|
50
50
|
__toESM
|
|
51
|
-
} from "../../_node-chunks/chunk-
|
|
51
|
+
} from "../../_node-chunks/chunk-3PMH6BEP.js";
|
|
52
52
|
|
|
53
53
|
// ../../node_modules/shell-quote/quote.js
|
|
54
54
|
var require_quote = __commonJS({
|
|
@@ -516,7 +516,7 @@ import { isCsfFactoryPreview } from "storybook/internal/csf-tools";
|
|
|
516
516
|
var import_ts_dedent = __toESM(require_dist(), 1);
|
|
517
517
|
|
|
518
518
|
// src/core-server/utils/get-component-variable-name.ts
|
|
519
|
-
var getComponentVariableName = async (name) => (await import("../../_node-chunks/camelcase-
|
|
519
|
+
var getComponentVariableName = async (name) => (await import("../../_node-chunks/camelcase-ILOVTISA.js")).default(name.replace(/^[^a-zA-Z_$]*/, ""), { pascalCase: !0 }).replace(/[^a-zA-Z_$]+/, "");
|
|
520
520
|
|
|
521
521
|
// src/core-server/utils/new-story-templates/csf-factory-template.ts
|
|
522
522
|
async function getCsfFactoryTemplateForNewStoryFile(data) {
|
|
@@ -781,7 +781,7 @@ async function searchFiles({
|
|
|
781
781
|
ignoredFiles = IGNORED_FILES,
|
|
782
782
|
fileExtensions = FILE_EXTENSIONS
|
|
783
783
|
}) {
|
|
784
|
-
let { globby, isDynamicPattern } = await import("../../_node-chunks/globby-
|
|
784
|
+
let { globby, isDynamicPattern } = await import("../../_node-chunks/globby-A35XB3PP.js"), hasSearchSpecialGlobChars = isDynamicPattern(searchQuery, { cwd }), searchQueryHasExtension = /(\.[a-z]+)$/i.test(searchQuery), fileExtensionsPattern = `{${fileExtensions.join(",")}}`, globbedSearchQuery = hasSearchSpecialGlobChars ? searchQuery : searchQueryHasExtension ? [`**/*${searchQuery}*`, `**/*${searchQuery}*/**`] : [
|
|
785
785
|
`**/*${searchQuery}*.${fileExtensionsPattern}`,
|
|
786
786
|
`**/*${searchQuery}*/**/*.${fileExtensionsPattern}`
|
|
787
787
|
];
|
package/dist/csf/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { StorybookTypes, Renderer as Renderer$1, ProjectAnnotations as ProjectAnnotations$1, NormalizedProjectAnnotations,
|
|
1
|
+
import { StorybookTypes, Renderer as Renderer$1, ProjectAnnotations as ProjectAnnotations$1, NormalizedProjectAnnotations, ComponentAnnotations as ComponentAnnotations$1, StoryAnnotations as StoryAnnotations$1, ComposedStoryFn, TestFunction as TestFunction$1 } from 'storybook/internal/types';
|
|
2
2
|
import { AddonTypes as AddonTypes$1, StoryContext as StoryContext$1 } from 'storybook/internal/csf';
|
|
3
3
|
|
|
4
4
|
declare global {
|
|
@@ -7,6 +7,74 @@ declare global {
|
|
|
7
7
|
}
|
|
8
8
|
}
|
|
9
9
|
|
|
10
|
+
/**
|
|
11
|
+
Returns a boolean for whether the two given types are equal.
|
|
12
|
+
|
|
13
|
+
@link https://github.com/microsoft/TypeScript/issues/27024#issuecomment-421529650
|
|
14
|
+
@link https://stackoverflow.com/questions/68961864/how-does-the-equals-work-in-typescript/68963796#68963796
|
|
15
|
+
*/
|
|
16
|
+
type IsEqual<T, U> =
|
|
17
|
+
(<G>() => G extends T ? 1 : 2) extends
|
|
18
|
+
(<G>() => G extends U ? 1 : 2)
|
|
19
|
+
? true
|
|
20
|
+
: false;
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
Filter out keys from an object.
|
|
24
|
+
|
|
25
|
+
Returns `never` if `Exclude` is strictly equal to `Key`.
|
|
26
|
+
Returns `never` if `Key` extends `Exclude`.
|
|
27
|
+
Returns `Key` otherwise.
|
|
28
|
+
|
|
29
|
+
@example
|
|
30
|
+
```
|
|
31
|
+
type Filtered = Filter<'foo', 'foo'>;
|
|
32
|
+
//=> never
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
@example
|
|
36
|
+
```
|
|
37
|
+
type Filtered = Filter<'bar', string>;
|
|
38
|
+
//=> never
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
@example
|
|
42
|
+
```
|
|
43
|
+
type Filtered = Filter<'bar', 'foo'>;
|
|
44
|
+
//=> 'bar'
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
@see {Except}
|
|
48
|
+
*/
|
|
49
|
+
type Filter<KeyType, ExcludeType> = IsEqual<KeyType, ExcludeType> extends true ? never : (KeyType extends ExcludeType ? never : KeyType);
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
Create a type from an object type without certain keys.
|
|
53
|
+
|
|
54
|
+
This type is a stricter version of [`Omit`](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-5.html#the-omit-helper-type). The `Omit` type does not restrict the omitted keys to be keys present on the given type, while `Except` does. The benefits of a stricter type are avoiding typos and allowing the compiler to pick up on rename refactors automatically.
|
|
55
|
+
|
|
56
|
+
This type was proposed to the TypeScript team, which declined it, saying they prefer that libraries implement stricter versions of the built-in types ([microsoft/TypeScript#30825](https://github.com/microsoft/TypeScript/issues/30825#issuecomment-523668235)).
|
|
57
|
+
|
|
58
|
+
@example
|
|
59
|
+
```
|
|
60
|
+
import type {Except} from 'type-fest';
|
|
61
|
+
|
|
62
|
+
type Foo = {
|
|
63
|
+
a: number;
|
|
64
|
+
b: string;
|
|
65
|
+
c: boolean;
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
type FooWithoutA = Except<Foo, 'a' | 'c'>;
|
|
69
|
+
//=> {b: string};
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
@category Object
|
|
73
|
+
*/
|
|
74
|
+
type Except<ObjectType, KeysType extends keyof ObjectType> = {
|
|
75
|
+
[KeyType in keyof ObjectType as Filter<KeyType, KeysType>]: ObjectType[KeyType];
|
|
76
|
+
};
|
|
77
|
+
|
|
10
78
|
/**
|
|
11
79
|
@see Simplify
|
|
12
80
|
*/
|
|
@@ -196,6 +264,39 @@ type RemoveIndexSignature<ObjectType> = {
|
|
|
196
264
|
: KeyType]: ObjectType[KeyType];
|
|
197
265
|
};
|
|
198
266
|
|
|
267
|
+
/**
|
|
268
|
+
Create a type that makes the given keys optional. The remaining keys are kept as is. The sister of the `SetRequired` type.
|
|
269
|
+
|
|
270
|
+
Use-case: You want to define a single model where the only thing that changes is whether or not some of the keys are optional.
|
|
271
|
+
|
|
272
|
+
@example
|
|
273
|
+
```
|
|
274
|
+
import type {SetOptional} from 'type-fest';
|
|
275
|
+
|
|
276
|
+
type Foo = {
|
|
277
|
+
a: number;
|
|
278
|
+
b?: string;
|
|
279
|
+
c: boolean;
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
type SomeOptional = SetOptional<Foo, 'b' | 'c'>;
|
|
283
|
+
// type SomeOptional = {
|
|
284
|
+
// a: number;
|
|
285
|
+
// b?: string; // Was already optional and still is.
|
|
286
|
+
// c?: boolean; // Is now optional.
|
|
287
|
+
// }
|
|
288
|
+
```
|
|
289
|
+
|
|
290
|
+
@category Object
|
|
291
|
+
*/
|
|
292
|
+
type SetOptional<BaseType, Keys extends keyof BaseType> =
|
|
293
|
+
Simplify<
|
|
294
|
+
// Pick just the keys that are readonly from the base type.
|
|
295
|
+
Except<BaseType, Keys> &
|
|
296
|
+
// Pick the keys that should be mutable from the base type and make them mutable.
|
|
297
|
+
Partial<Pick<BaseType, Keys>>
|
|
298
|
+
>;
|
|
299
|
+
|
|
199
300
|
/**
|
|
200
301
|
Convert a union type to an intersection type using [distributive conditional types](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-2-8.html#distributive-conditional-types).
|
|
201
302
|
|
|
@@ -721,7 +822,23 @@ interface GlobalTypes {
|
|
|
721
822
|
interface StrictGlobalTypes {
|
|
722
823
|
[name: string]: StrictInputType;
|
|
723
824
|
}
|
|
825
|
+
/**
|
|
826
|
+
* AddonTypes allows addons to extend the type system with additional args, parameters, and globals.
|
|
827
|
+
*
|
|
828
|
+
* Addons can use `definePreviewAddon<AddonTypes>()` to declare additional types that will be merged
|
|
829
|
+
* into the story context. For example, an addon that provides a `theme` arg could declare:
|
|
830
|
+
*
|
|
831
|
+
* ```ts
|
|
832
|
+
* const themeAddon = definePreviewAddon<{ args: { theme: 'light' | 'dark' } }>({
|
|
833
|
+
* decorators: [(Story, { args }) => <ThemeProvider theme={args.theme}><Story /></ThemeProvider>]
|
|
834
|
+
* });
|
|
835
|
+
* ```
|
|
836
|
+
*
|
|
837
|
+
* When users include this addon in their preview config, the `theme` arg becomes available and
|
|
838
|
+
* type-checked across all stories.
|
|
839
|
+
*/
|
|
724
840
|
interface AddonTypes {
|
|
841
|
+
args?: unknown;
|
|
725
842
|
parameters?: Record<string, any>;
|
|
726
843
|
globals?: Record<string, any>;
|
|
727
844
|
}
|
|
@@ -991,11 +1108,12 @@ interface Preview<TRenderer extends Renderer$1 = Renderer$1> {
|
|
|
991
1108
|
addons?: PreviewAddon<never>[];
|
|
992
1109
|
};
|
|
993
1110
|
composed: NormalizedProjectAnnotations<TRenderer>;
|
|
994
|
-
meta<TArgs
|
|
1111
|
+
meta<TArgs, TInput extends ComponentAnnotations$1<TRenderer & {
|
|
995
1112
|
args: TArgs;
|
|
996
|
-
}, TArgs>>(input: TInput): Meta<TRenderer & {
|
|
1113
|
+
}, TArgs & TRenderer['args']>>(input: TInput): Meta<TRenderer & {
|
|
997
1114
|
args: TArgs;
|
|
998
1115
|
}, TInput>;
|
|
1116
|
+
type<T>(): Preview<TRenderer & T>;
|
|
999
1117
|
}
|
|
1000
1118
|
type InferTypes<T extends PreviewAddon<never>[]> = T extends PreviewAddon<infer C>[] ? C & {
|
|
1001
1119
|
csf4: true;
|
|
@@ -1007,14 +1125,14 @@ interface PreviewAddon<in TExtraContext extends AddonTypes$1 = AddonTypes$1> ext
|
|
|
1007
1125
|
}
|
|
1008
1126
|
declare function definePreviewAddon<TExtraContext extends AddonTypes$1 = AddonTypes$1>(preview: ProjectAnnotations$1<Renderer$1>): PreviewAddon<TExtraContext>;
|
|
1009
1127
|
declare function isPreview(input: unknown): input is Preview<Renderer$1>;
|
|
1010
|
-
interface Meta<TRenderer extends Renderer$1,
|
|
1128
|
+
interface Meta<TRenderer extends Renderer$1, TMetaInput extends ComponentAnnotations$1<TRenderer, TRenderer['args']> = ComponentAnnotations$1<TRenderer, TRenderer['args']>> {
|
|
1011
1129
|
readonly _tag: 'Meta';
|
|
1012
|
-
input:
|
|
1130
|
+
input: TMetaInput;
|
|
1013
1131
|
preview: Preview<TRenderer>;
|
|
1014
1132
|
story(input?: () => TRenderer['storyResult']): Story<TRenderer, {
|
|
1015
1133
|
render: () => TRenderer['storyResult'];
|
|
1016
1134
|
}>;
|
|
1017
|
-
story<TInput extends StoryAnnotations$1<TRenderer, TRenderer['args']
|
|
1135
|
+
story<TInput extends StoryAnnotations$1<TRenderer, TRenderer['args'], SetOptional<TRenderer['args'], keyof TRenderer['args'] & keyof TMetaInput['args']>>>(input?: TInput): Story<TRenderer, TInput>;
|
|
1018
1136
|
}
|
|
1019
1137
|
declare function isMeta(input: unknown): input is Meta<Renderer$1>;
|
|
1020
1138
|
interface Story<TRenderer extends Renderer$1, TInput extends StoryAnnotations$1<TRenderer, TRenderer['args']> = StoryAnnotations$1<TRenderer, TRenderer['args']>> {
|
package/dist/csf/index.js
CHANGED
|
@@ -1825,6 +1825,9 @@ function definePreview(input) {
|
|
|
1825
1825
|
composeConfigs([...getCoreAnnotations(), ...addons2 ?? [], rest])
|
|
1826
1826
|
), composed;
|
|
1827
1827
|
},
|
|
1828
|
+
type() {
|
|
1829
|
+
return this;
|
|
1830
|
+
},
|
|
1828
1831
|
meta(meta) {
|
|
1829
1832
|
return defineMeta(meta, this);
|
|
1830
1833
|
}
|
|
@@ -1843,7 +1846,7 @@ function isMeta(input) {
|
|
|
1843
1846
|
function defineMeta(input, preview) {
|
|
1844
1847
|
return {
|
|
1845
1848
|
_tag: "Meta",
|
|
1846
|
-
input,
|
|
1849
|
+
input: { ...input, parameters: { ...input.parameters, csfFactory: !0 } },
|
|
1847
1850
|
preview,
|
|
1848
1851
|
// @ts-expect-error hard
|
|
1849
1852
|
story(story = {}) {
|