storybook 10.0.0-rc.2 → 10.0.0-rc.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_node-chunks/{builder-manager-ZNPRP22E.js → builder-manager-CMPC7SCH.js} +12 -12
- package/dist/_node-chunks/camelcase-PH4ACE3G.js +18 -0
- package/dist/_node-chunks/{chunk-62KDMWXX.js → chunk-2JIAOYKO.js} +7 -7
- package/dist/_node-chunks/{chunk-DOCRBDQH.js → chunk-4TLOQYBC.js} +7 -7
- package/dist/_node-chunks/{chunk-D5WSRTEX.js → chunk-A3UOLOFM.js} +7 -7
- package/dist/_node-chunks/{chunk-X35XJZ7G.js → chunk-AA6WD3A7.js} +7 -7
- package/dist/_node-chunks/chunk-AHFZBAQF.js +61 -0
- package/dist/_node-chunks/{chunk-VDCU2LFF.js → chunk-AS5N7GY5.js} +7 -7
- package/dist/_node-chunks/{chunk-LUDM5RD2.js → chunk-BEHPCFQ2.js} +8 -8
- package/dist/_node-chunks/{chunk-VHPYGR5X.js → chunk-BSVBH2ZA.js} +7 -7
- package/dist/_node-chunks/{chunk-WD2QJDGV.js → chunk-BZXQJZUK.js} +7 -7
- package/dist/_node-chunks/{chunk-6VEWXDI5.js → chunk-DLIUMR5R.js} +6 -6
- package/dist/_node-chunks/{chunk-K5GJVTVF.js → chunk-E7XUDQ3W.js} +7 -7
- package/dist/_node-chunks/{chunk-H6J6LJQQ.js → chunk-EJGHDAYE.js} +6 -6
- package/dist/_node-chunks/{chunk-VSPERFYF.js → chunk-JGDH6YYG.js} +20 -20
- package/dist/_node-chunks/{chunk-XJRUDTSD.js → chunk-JPPACTL4.js} +7 -7
- package/dist/_node-chunks/{chunk-SSK6CTPD.js → chunk-MC6BOBJJ.js} +12 -12
- package/dist/_node-chunks/{chunk-54MOKOMZ.js → chunk-MQY4ZI62.js} +8 -8
- package/dist/_node-chunks/{chunk-SF4YWMS2.js → chunk-NCKTVDON.js} +37 -35
- package/dist/_node-chunks/{chunk-QD4TA2GK.js → chunk-OJSXOILA.js} +7 -7
- package/dist/_node-chunks/{chunk-BPYW7SFB.js → chunk-OOXEC2LP.js} +7 -7
- package/dist/_node-chunks/{chunk-M2Y5JVSX.js → chunk-P7GFT5HG.js} +8 -8
- package/dist/_node-chunks/{chunk-OCPCEJ7D.js → chunk-PCQGHIXN.js} +7 -7
- package/dist/_node-chunks/{chunk-TR7IYGK4.js → chunk-PJCDP6ZD.js} +7 -7
- package/dist/_node-chunks/{chunk-MTIN3LKM.js → chunk-PW2V2I6I.js} +7 -7
- package/dist/_node-chunks/{chunk-2IEV7XG2.js → chunk-QK5IGJ3H.js} +9 -9
- package/dist/_node-chunks/{chunk-ZZMPRSOL.js → chunk-RZ77GUAF.js} +10 -10
- package/dist/_node-chunks/{chunk-LR47LSEQ.js → chunk-SN3TDU74.js} +8 -8
- package/dist/_node-chunks/{chunk-AFW3U6QG.js → chunk-SX2UZK74.js} +7 -7
- package/dist/_node-chunks/{chunk-FXGD2HHQ.js → chunk-USMWLOGR.js} +7 -7
- package/dist/_node-chunks/chunk-VBFCHLFV.js +1518 -0
- package/dist/_node-chunks/{chunk-6SGQF6CF.js → chunk-VWIHOMFU.js} +8 -8
- package/dist/_node-chunks/chunk-XQN3THEO.js +18 -0
- package/dist/_node-chunks/{chunk-J34Y4L4Q.js → chunk-YW2UKPPH.js} +9 -9
- package/dist/_node-chunks/{chunk-FWBLOTP7.js → chunk-ZW5XA6KG.js} +7 -7
- package/dist/_node-chunks/{dist-47EE2CMC.js → dist-U664B537.js} +9 -9
- package/dist/_node-chunks/{globby-ZEUQ6QPC.js → globby-HQ3ESL52.js} +9 -9
- package/dist/_node-chunks/{lib-LCU5VXJS.js → lib-2IOH44LB.js} +7 -7
- package/dist/_node-chunks/{mdx-N42X6CFJ-7LUZM4HR.js → mdx-N42X6CFJ-M54WITPV.js} +8 -8
- package/dist/_node-chunks/{p-limit-XJGTO6H5.js → p-limit-PBXTEA6N.js} +7 -7
- package/dist/_node-chunks/{plugin-ZN5KCYM2.js → plugin-34QU2FG7.js} +10 -10
- package/dist/_node-chunks/{plugin-YZRPWYO5.js → plugin-RSI6B3JI.js} +10 -10
- package/dist/_node-chunks/{webpack-inject-mocker-runtime-plugin-CRH6N7YZ.js → webpack-inject-mocker-runtime-plugin-UMXHXRC2.js} +10 -10
- package/dist/_node-chunks/{webpack-mock-plugin-NQXGMVTF.js → webpack-mock-plugin-6GKO2XIO.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 +136 -1561
- package/dist/common/index.js +20 -20
- package/dist/core-server/index.js +48 -35
- package/dist/core-server/presets/common-manager.js +1 -0
- package/dist/core-server/presets/common-override-preset.js +9 -9
- package/dist/core-server/presets/common-preset.js +38 -26
- 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.js +9 -9
- package/dist/instrumenter/index.js +1 -1
- package/dist/manager/globals-runtime.js +9 -6
- package/dist/manager-api/index.d.ts +1 -1
- package/dist/manager-api/index.js +1 -1
- package/dist/node-logger/index.js +14 -14
- package/dist/preview/runtime.js +8 -5
- package/dist/preview-api/index.d.ts +67 -68
- package/dist/server-errors.js +10 -10
- package/dist/telemetry/index.d.ts +21 -1
- package/dist/telemetry/index.js +24 -24
- package/dist/test/index.js +7 -4
- package/dist/types/index.d.ts +3 -1
- package/package.json +1 -1
- package/dist/_node-chunks/camelcase-EY6MYFU4.js +0 -18
- package/dist/_node-chunks/chunk-JT5JXOKC.js +0 -61
- package/dist/_node-chunks/chunk-N4S7XZKB.js +0 -18
package/dist/common/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_me0y3sd4o2e from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_me0y3sd4o2e from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_me0y3sd4o2e from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_me0y3sd4o2e.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_me0y3sd4o2e.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_me0y3sd4o2e.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
@@ -83,11 +83,11 @@ import {
|
|
|
83
83
|
transformImportFiles,
|
|
84
84
|
validateConfigurationFiles,
|
|
85
85
|
validateFrameworkName
|
|
86
|
-
} from "../_node-chunks/chunk-
|
|
87
|
-
import "../_node-chunks/chunk-
|
|
86
|
+
} from "../_node-chunks/chunk-NCKTVDON.js";
|
|
87
|
+
import "../_node-chunks/chunk-JPPACTL4.js";
|
|
88
88
|
import {
|
|
89
89
|
versions_default
|
|
90
|
-
} from "../_node-chunks/chunk-
|
|
90
|
+
} from "../_node-chunks/chunk-AHFZBAQF.js";
|
|
91
91
|
import {
|
|
92
92
|
findFilesUp,
|
|
93
93
|
getProjectRoot,
|
|
@@ -99,22 +99,22 @@ import {
|
|
|
99
99
|
optionalEnvToBoolean,
|
|
100
100
|
stringifyEnvs,
|
|
101
101
|
stringifyProcessEnvs
|
|
102
|
-
} from "../_node-chunks/chunk-
|
|
103
|
-
import "../_node-chunks/chunk-
|
|
104
|
-
import "../_node-chunks/chunk-
|
|
102
|
+
} from "../_node-chunks/chunk-YW2UKPPH.js";
|
|
103
|
+
import "../_node-chunks/chunk-USMWLOGR.js";
|
|
104
|
+
import "../_node-chunks/chunk-AA6WD3A7.js";
|
|
105
105
|
import {
|
|
106
106
|
importMetaResolve,
|
|
107
107
|
importModule,
|
|
108
108
|
resolvePackageDir,
|
|
109
109
|
safeResolveModule
|
|
110
|
-
} from "../_node-chunks/chunk-
|
|
111
|
-
import "../_node-chunks/chunk-
|
|
112
|
-
import "../_node-chunks/chunk-
|
|
113
|
-
import "../_node-chunks/chunk-
|
|
114
|
-
import "../_node-chunks/chunk-
|
|
115
|
-
import "../_node-chunks/chunk-
|
|
116
|
-
import "../_node-chunks/chunk-
|
|
117
|
-
import "../_node-chunks/chunk-
|
|
110
|
+
} from "../_node-chunks/chunk-VWIHOMFU.js";
|
|
111
|
+
import "../_node-chunks/chunk-OJSXOILA.js";
|
|
112
|
+
import "../_node-chunks/chunk-SX2UZK74.js";
|
|
113
|
+
import "../_node-chunks/chunk-PJCDP6ZD.js";
|
|
114
|
+
import "../_node-chunks/chunk-ZW5XA6KG.js";
|
|
115
|
+
import "../_node-chunks/chunk-BSVBH2ZA.js";
|
|
116
|
+
import "../_node-chunks/chunk-4TLOQYBC.js";
|
|
117
|
+
import "../_node-chunks/chunk-EJGHDAYE.js";
|
|
118
118
|
export {
|
|
119
119
|
COMMON_ENV_VARS,
|
|
120
120
|
DEFAULT_FILES_PATTERN,
|
|
@@ -1,26 +1,29 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_me0y3sd4o2e from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_me0y3sd4o2e from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_me0y3sd4o2e from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_me0y3sd4o2e.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_me0y3sd4o2e.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_me0y3sd4o2e.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 {
|
|
13
|
+
detectPnp
|
|
14
|
+
} from "../_node-chunks/chunk-VBFCHLFV.js";
|
|
12
15
|
import {
|
|
13
16
|
require_pretty_hrtime
|
|
14
|
-
} from "../_node-chunks/chunk-
|
|
17
|
+
} from "../_node-chunks/chunk-AS5N7GY5.js";
|
|
15
18
|
import {
|
|
16
19
|
boxen,
|
|
17
20
|
require_string_width
|
|
18
|
-
} from "../_node-chunks/chunk-
|
|
19
|
-
import "../_node-chunks/chunk-
|
|
21
|
+
} from "../_node-chunks/chunk-BEHPCFQ2.js";
|
|
22
|
+
import "../_node-chunks/chunk-OOXEC2LP.js";
|
|
20
23
|
import {
|
|
21
24
|
StatusTypeIdMismatchError,
|
|
22
25
|
StorybookError
|
|
23
|
-
} from "../_node-chunks/chunk-
|
|
26
|
+
} from "../_node-chunks/chunk-QK5IGJ3H.js";
|
|
24
27
|
import {
|
|
25
28
|
getErrorLevel,
|
|
26
29
|
mapStaticDir,
|
|
@@ -28,59 +31,59 @@ import {
|
|
|
28
31
|
sendTelemetryError,
|
|
29
32
|
useStatics,
|
|
30
33
|
withTelemetry
|
|
31
|
-
} from "../_node-chunks/chunk-
|
|
32
|
-
import "../_node-chunks/chunk-
|
|
34
|
+
} from "../_node-chunks/chunk-MC6BOBJJ.js";
|
|
35
|
+
import "../_node-chunks/chunk-2JIAOYKO.js";
|
|
33
36
|
import {
|
|
34
37
|
telemetry
|
|
35
|
-
} from "../_node-chunks/chunk-
|
|
36
|
-
import "../_node-chunks/chunk-
|
|
38
|
+
} from "../_node-chunks/chunk-JGDH6YYG.js";
|
|
39
|
+
import "../_node-chunks/chunk-XQN3THEO.js";
|
|
37
40
|
import {
|
|
38
41
|
userOrAutoTitleFromSpecifier
|
|
39
|
-
} from "../_node-chunks/chunk-
|
|
40
|
-
import "../_node-chunks/chunk-
|
|
41
|
-
import "../_node-chunks/chunk-
|
|
42
|
-
import "../_node-chunks/chunk-
|
|
42
|
+
} from "../_node-chunks/chunk-NCKTVDON.js";
|
|
43
|
+
import "../_node-chunks/chunk-JPPACTL4.js";
|
|
44
|
+
import "../_node-chunks/chunk-AHFZBAQF.js";
|
|
45
|
+
import "../_node-chunks/chunk-SN3TDU74.js";
|
|
43
46
|
import {
|
|
44
47
|
optionalEnvToBoolean,
|
|
45
48
|
require_cross_spawn
|
|
46
|
-
} from "../_node-chunks/chunk-
|
|
49
|
+
} from "../_node-chunks/chunk-YW2UKPPH.js";
|
|
47
50
|
import {
|
|
48
51
|
up2 as up
|
|
49
|
-
} from "../_node-chunks/chunk-
|
|
50
|
-
import "../_node-chunks/chunk-
|
|
52
|
+
} from "../_node-chunks/chunk-USMWLOGR.js";
|
|
53
|
+
import "../_node-chunks/chunk-PW2V2I6I.js";
|
|
51
54
|
import {
|
|
52
55
|
invariant
|
|
53
|
-
} from "../_node-chunks/chunk-
|
|
56
|
+
} from "../_node-chunks/chunk-AA6WD3A7.js";
|
|
54
57
|
import {
|
|
55
58
|
importModule,
|
|
56
59
|
resolvePackageDir
|
|
57
|
-
} from "../_node-chunks/chunk-
|
|
60
|
+
} from "../_node-chunks/chunk-VWIHOMFU.js";
|
|
58
61
|
import {
|
|
59
62
|
resolve
|
|
60
|
-
} from "../_node-chunks/chunk-
|
|
63
|
+
} from "../_node-chunks/chunk-OJSXOILA.js";
|
|
61
64
|
import {
|
|
62
65
|
require_prompts
|
|
63
|
-
} from "../_node-chunks/chunk-
|
|
64
|
-
import "../_node-chunks/chunk-
|
|
66
|
+
} from "../_node-chunks/chunk-SX2UZK74.js";
|
|
67
|
+
import "../_node-chunks/chunk-PJCDP6ZD.js";
|
|
65
68
|
import {
|
|
66
69
|
slash
|
|
67
|
-
} from "../_node-chunks/chunk-
|
|
70
|
+
} from "../_node-chunks/chunk-ZW5XA6KG.js";
|
|
68
71
|
import {
|
|
69
72
|
require_dist
|
|
70
|
-
} from "../_node-chunks/chunk-
|
|
73
|
+
} from "../_node-chunks/chunk-BSVBH2ZA.js";
|
|
71
74
|
import {
|
|
72
75
|
require_lib,
|
|
73
76
|
require_src
|
|
74
|
-
} from "../_node-chunks/chunk-
|
|
77
|
+
} from "../_node-chunks/chunk-E7XUDQ3W.js";
|
|
75
78
|
import {
|
|
76
79
|
require_picocolors
|
|
77
|
-
} from "../_node-chunks/chunk-
|
|
80
|
+
} from "../_node-chunks/chunk-4TLOQYBC.js";
|
|
78
81
|
import {
|
|
79
82
|
__commonJS,
|
|
80
83
|
__name,
|
|
81
84
|
__require,
|
|
82
85
|
__toESM
|
|
83
|
-
} from "../_node-chunks/chunk-
|
|
86
|
+
} from "../_node-chunks/chunk-EJGHDAYE.js";
|
|
84
87
|
|
|
85
88
|
// ../node_modules/tsconfig-paths/lib/filesystem.js
|
|
86
89
|
var require_filesystem = __commonJS({
|
|
@@ -8715,7 +8718,7 @@ var StoryIndexGenerator = class _StoryIndexGenerator {
|
|
|
8715
8718
|
}
|
|
8716
8719
|
const pathToSubIndex = {};
|
|
8717
8720
|
const fullGlob = slash(join(specifier.directory, specifier.files));
|
|
8718
|
-
const { globby } = await import("../_node-chunks/globby-
|
|
8721
|
+
const { globby } = await import("../_node-chunks/globby-HQ3ESL52.js");
|
|
8719
8722
|
const files = await globby(fullGlob, {
|
|
8720
8723
|
absolute: true,
|
|
8721
8724
|
cwd: workingDir,
|
|
@@ -8973,7 +8976,7 @@ var StoryIndexGenerator = class _StoryIndexGenerator {
|
|
|
8973
8976
|
const normalizedPath = normalizeStoryPath(relativePath);
|
|
8974
8977
|
const importPath = slash(normalizedPath);
|
|
8975
8978
|
const content = await readFile(absolutePath, { encoding: "utf8" });
|
|
8976
|
-
const { analyze } = await import("../_node-chunks/dist-
|
|
8979
|
+
const { analyze } = await import("../_node-chunks/dist-U664B537.js");
|
|
8977
8980
|
const result = await analyze(content);
|
|
8978
8981
|
if (result.isTemplate) {
|
|
8979
8982
|
return false;
|
|
@@ -9316,7 +9319,7 @@ __name(print, "print");
|
|
|
9316
9319
|
// src/core-server/utils/get-builders.ts
|
|
9317
9320
|
import { MissingBuilderError } from "storybook/internal/server-errors";
|
|
9318
9321
|
async function getManagerBuilder() {
|
|
9319
|
-
return await import("../_node-chunks/builder-manager-
|
|
9322
|
+
return await import("../_node-chunks/builder-manager-CMPC7SCH.js");
|
|
9320
9323
|
}
|
|
9321
9324
|
__name(getManagerBuilder, "getManagerBuilder");
|
|
9322
9325
|
async function getPreviewBuilder(resolvedPreviewBuilder) {
|
|
@@ -9555,7 +9558,7 @@ function watchStorySpecifiers(specifiers, options, onInvalidate) {
|
|
|
9555
9558
|
// because the directory could already be within the files part (e.g. './x/foo/bar')
|
|
9556
9559
|
basename2(specifier.files)
|
|
9557
9560
|
);
|
|
9558
|
-
const { globby } = await import("../_node-chunks/globby-
|
|
9561
|
+
const { globby } = await import("../_node-chunks/globby-HQ3ESL52.js");
|
|
9559
9562
|
const addedFiles = await globby(slash(dirGlob), commonGlobOptions2(dirGlob));
|
|
9560
9563
|
addedFiles.forEach((filePath) => {
|
|
9561
9564
|
const fileImportPath = toImportPath(filePath);
|
|
@@ -11671,6 +11674,7 @@ async function storybookDevServer(options) {
|
|
|
11671
11674
|
app.use(getAccessControlMiddleware(core2?.crossOriginIsolated ?? false));
|
|
11672
11675
|
app.use(getCachingMiddleware());
|
|
11673
11676
|
(await getMiddleware(options.configDir))(app);
|
|
11677
|
+
await options.presets.apply("experimental_devServer", app);
|
|
11674
11678
|
const { port, host, initialPath } = options;
|
|
11675
11679
|
invariant(port, "expected options to have a port");
|
|
11676
11680
|
const proto = options.https ? "https" : "http";
|
|
@@ -12126,6 +12130,15 @@ async function buildDevStandalone(options) {
|
|
|
12126
12130
|
options.cacheKey = cacheKey;
|
|
12127
12131
|
options.outputDir = outputDir;
|
|
12128
12132
|
options.serverChannelUrl = getServerChannelUrl(port, options);
|
|
12133
|
+
options.pnp = await detectPnp();
|
|
12134
|
+
if (options.pnp) {
|
|
12135
|
+
deprecate(import_ts_dedent8.dedent`
|
|
12136
|
+
As of Storybook 10.0, PnP is deprecated.
|
|
12137
|
+
If you are using PnP, you can continue to use Storybook 10.0, but we recommend migrating to a different package manager or linker-mode.
|
|
12138
|
+
|
|
12139
|
+
In future versions, PnP compatibility will be removed.
|
|
12140
|
+
`);
|
|
12141
|
+
}
|
|
12129
12142
|
const config = await loadMainConfig2(options);
|
|
12130
12143
|
const { framework } = config;
|
|
12131
12144
|
const corePresets = [];
|
|
@@ -6957,6 +6957,7 @@ var INTERNAL_RENDER_CALL_ID = "internal_render_call";
|
|
|
6957
6957
|
// ../addons/a11y/src/constants.ts
|
|
6958
6958
|
var ADDON_ID8 = "storybook/a11y";
|
|
6959
6959
|
var PANEL_ID3 = `${ADDON_ID8}/panel`;
|
|
6960
|
+
var UI_STATE_ID = `${ADDON_ID8}/ui`;
|
|
6960
6961
|
var RESULT = `${ADDON_ID8}/result`;
|
|
6961
6962
|
var REQUEST = `${ADDON_ID8}/request`;
|
|
6962
6963
|
var RUNNING = `${ADDON_ID8}/running`;
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_me0y3sd4o2e from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_me0y3sd4o2e from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_me0y3sd4o2e from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_me0y3sd4o2e.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_me0y3sd4o2e.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_me0y3sd4o2e.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-PJCDP6ZD.js";
|
|
15
15
|
import {
|
|
16
16
|
slash
|
|
17
|
-
} from "../../_node-chunks/chunk-
|
|
17
|
+
} from "../../_node-chunks/chunk-ZW5XA6KG.js";
|
|
18
18
|
import {
|
|
19
19
|
__name
|
|
20
|
-
} from "../../_node-chunks/chunk-
|
|
20
|
+
} from "../../_node-chunks/chunk-EJGHDAYE.js";
|
|
21
21
|
|
|
22
22
|
// src/core-server/utils/remove-mdx-entries.ts
|
|
23
23
|
import { isAbsolute, join, relative } from "node:path";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_me0y3sd4o2e from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_me0y3sd4o2e from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_me0y3sd4o2e from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_me0y3sd4o2e.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_me0y3sd4o2e.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_me0y3sd4o2e.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
@@ -12,37 +12,37 @@ var require = CJS_COMPAT_NODE_MODULE_oali8g6joqi.createRequire(import.meta.url);
|
|
|
12
12
|
import {
|
|
13
13
|
parseStaticDir,
|
|
14
14
|
sendTelemetryError
|
|
15
|
-
} from "../../_node-chunks/chunk-
|
|
16
|
-
import "../../_node-chunks/chunk-
|
|
15
|
+
} from "../../_node-chunks/chunk-MC6BOBJJ.js";
|
|
16
|
+
import "../../_node-chunks/chunk-2JIAOYKO.js";
|
|
17
17
|
import {
|
|
18
18
|
getLastEvents,
|
|
19
19
|
getSessionId
|
|
20
|
-
} from "../../_node-chunks/chunk-
|
|
20
|
+
} from "../../_node-chunks/chunk-PW2V2I6I.js";
|
|
21
21
|
import {
|
|
22
22
|
invariant
|
|
23
|
-
} from "../../_node-chunks/chunk-
|
|
23
|
+
} from "../../_node-chunks/chunk-AA6WD3A7.js";
|
|
24
24
|
import {
|
|
25
25
|
resolvePackageDir
|
|
26
|
-
} from "../../_node-chunks/chunk-
|
|
26
|
+
} from "../../_node-chunks/chunk-VWIHOMFU.js";
|
|
27
27
|
import {
|
|
28
28
|
join
|
|
29
|
-
} from "../../_node-chunks/chunk-
|
|
30
|
-
import "../../_node-chunks/chunk-
|
|
29
|
+
} from "../../_node-chunks/chunk-OJSXOILA.js";
|
|
30
|
+
import "../../_node-chunks/chunk-SX2UZK74.js";
|
|
31
31
|
import {
|
|
32
32
|
loadConfig
|
|
33
|
-
} from "../../_node-chunks/chunk-
|
|
33
|
+
} from "../../_node-chunks/chunk-MQY4ZI62.js";
|
|
34
34
|
import {
|
|
35
35
|
require_dist
|
|
36
|
-
} from "../../_node-chunks/chunk-
|
|
36
|
+
} from "../../_node-chunks/chunk-BSVBH2ZA.js";
|
|
37
37
|
import {
|
|
38
38
|
require_picocolors
|
|
39
|
-
} from "../../_node-chunks/chunk-
|
|
39
|
+
} from "../../_node-chunks/chunk-4TLOQYBC.js";
|
|
40
40
|
import {
|
|
41
41
|
__commonJS,
|
|
42
42
|
__name,
|
|
43
43
|
__require,
|
|
44
44
|
__toESM
|
|
45
|
-
} from "../../_node-chunks/chunk-
|
|
45
|
+
} from "../../_node-chunks/chunk-EJGHDAYE.js";
|
|
46
46
|
|
|
47
47
|
// ../node_modules/shell-quote/quote.js
|
|
48
48
|
var require_quote = __commonJS({
|
|
@@ -703,7 +703,7 @@ var import_ts_dedent = __toESM(require_dist(), 1);
|
|
|
703
703
|
|
|
704
704
|
// src/core-server/utils/get-component-variable-name.ts
|
|
705
705
|
var getComponentVariableName = /* @__PURE__ */ __name(async (name) => {
|
|
706
|
-
const camelCase = await import("../../_node-chunks/camelcase-
|
|
706
|
+
const camelCase = await import("../../_node-chunks/camelcase-PH4ACE3G.js");
|
|
707
707
|
const camelCased = camelCase.default(name.replace(/^[^a-zA-Z_$]*/, ""), { pascalCase: true });
|
|
708
708
|
const sanitized = camelCased.replace(/[^a-zA-Z_$]+/, "");
|
|
709
709
|
return sanitized;
|
|
@@ -1050,7 +1050,7 @@ async function searchFiles({
|
|
|
1050
1050
|
ignoredFiles = IGNORED_FILES,
|
|
1051
1051
|
fileExtensions = FILE_EXTENSIONS
|
|
1052
1052
|
}) {
|
|
1053
|
-
const { globby, isDynamicPattern } = await import("../../_node-chunks/globby-
|
|
1053
|
+
const { globby, isDynamicPattern } = await import("../../_node-chunks/globby-HQ3ESL52.js");
|
|
1054
1054
|
const hasSearchSpecialGlobChars = isDynamicPattern(searchQuery, { cwd });
|
|
1055
1055
|
const hasFileExtensionRegex = /(\.[a-z]+)$/i;
|
|
1056
1056
|
const searchQueryHasExtension = hasFileExtensionRegex.test(searchQuery);
|
|
@@ -1200,6 +1200,19 @@ __name(initOpenInEditorChannel, "initOpenInEditorChannel");
|
|
|
1200
1200
|
// src/core-server/server-channel/preview-initialized-channel.ts
|
|
1201
1201
|
import { PREVIEW_INITIALIZED } from "storybook/internal/core-events";
|
|
1202
1202
|
import { telemetry as telemetry4 } from "storybook/internal/telemetry";
|
|
1203
|
+
var makePayload = /* @__PURE__ */ __name((userAgent, lastInit, sessionId) => {
|
|
1204
|
+
let timeSinceInit;
|
|
1205
|
+
const payload = {
|
|
1206
|
+
userAgent,
|
|
1207
|
+
isNewUser: false,
|
|
1208
|
+
timeSinceInit
|
|
1209
|
+
};
|
|
1210
|
+
if (sessionId && lastInit?.body?.sessionId === sessionId) {
|
|
1211
|
+
payload.timeSinceInit = Date.now() - lastInit.timestamp;
|
|
1212
|
+
payload.isNewUser = !!lastInit.body.payload.newUser;
|
|
1213
|
+
}
|
|
1214
|
+
return payload;
|
|
1215
|
+
}, "makePayload");
|
|
1203
1216
|
function initPreviewInitializedChannel(channel, options, _coreConfig) {
|
|
1204
1217
|
channel.on(PREVIEW_INITIALIZED, async ({ userAgent }) => {
|
|
1205
1218
|
if (!options.disableTelemetry) {
|
|
@@ -1209,9 +1222,8 @@ function initPreviewInitializedChannel(channel, options, _coreConfig) {
|
|
|
1209
1222
|
const lastInit = lastEvents.init;
|
|
1210
1223
|
const lastPreviewFirstLoad = lastEvents["preview-first-load"];
|
|
1211
1224
|
if (!lastPreviewFirstLoad) {
|
|
1212
|
-
const
|
|
1213
|
-
|
|
1214
|
-
telemetry4("preview-first-load", { timeSinceInit, isInitSession, userAgent });
|
|
1225
|
+
const payload = makePayload(userAgent, lastInit, sessionId);
|
|
1226
|
+
telemetry4("preview-first-load", payload);
|
|
1215
1227
|
}
|
|
1216
1228
|
} catch (e) {
|
|
1217
1229
|
}
|
|
@@ -1821,8 +1833,8 @@ var viteFinal = /* @__PURE__ */ __name(async (existing, options) => {
|
|
|
1821
1833
|
if (!previewConfigPath) {
|
|
1822
1834
|
return existing;
|
|
1823
1835
|
}
|
|
1824
|
-
const { viteInjectMockerRuntime } = await import("../../_node-chunks/plugin-
|
|
1825
|
-
const { viteMockPlugin } = await import("../../_node-chunks/plugin-
|
|
1836
|
+
const { viteInjectMockerRuntime } = await import("../../_node-chunks/plugin-RSI6B3JI.js");
|
|
1837
|
+
const { viteMockPlugin } = await import("../../_node-chunks/plugin-34QU2FG7.js");
|
|
1826
1838
|
const coreOptions = await options.presets.apply("core");
|
|
1827
1839
|
return {
|
|
1828
1840
|
...existing,
|
|
@@ -1840,8 +1852,8 @@ var webpackFinal = /* @__PURE__ */ __name(async (config, options) => {
|
|
|
1840
1852
|
if (!previewConfigPath) {
|
|
1841
1853
|
return config;
|
|
1842
1854
|
}
|
|
1843
|
-
const { WebpackMockPlugin } = await import("../../_node-chunks/webpack-mock-plugin-
|
|
1844
|
-
const { WebpackInjectMockerRuntimePlugin } = await import("../../_node-chunks/webpack-inject-mocker-runtime-plugin-
|
|
1855
|
+
const { WebpackMockPlugin } = await import("../../_node-chunks/webpack-mock-plugin-6GKO2XIO.js");
|
|
1856
|
+
const { WebpackInjectMockerRuntimePlugin } = await import("../../_node-chunks/webpack-inject-mocker-runtime-plugin-UMXHXRC2.js");
|
|
1845
1857
|
config.plugins = config.plugins || [];
|
|
1846
1858
|
config.module.rules.push({
|
|
1847
1859
|
test: /preview\.(t|j)sx?$/,
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_me0y3sd4o2e from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_me0y3sd4o2e from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_me0y3sd4o2e from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_me0y3sd4o2e.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_me0y3sd4o2e.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_me0y3sd4o2e.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
|
rewriteSbMockImportCalls
|
|
14
|
-
} from "../../../../_node-chunks/chunk-
|
|
15
|
-
import "../../../../_node-chunks/chunk-
|
|
14
|
+
} from "../../../../_node-chunks/chunk-P7GFT5HG.js";
|
|
15
|
+
import "../../../../_node-chunks/chunk-OJSXOILA.js";
|
|
16
16
|
import {
|
|
17
17
|
__name
|
|
18
|
-
} from "../../../../_node-chunks/chunk-
|
|
18
|
+
} from "../../../../_node-chunks/chunk-EJGHDAYE.js";
|
|
19
19
|
|
|
20
20
|
// src/core-server/presets/webpack/loaders/storybook-mock-transform-loader.ts
|
|
21
21
|
import { logger } from "storybook/internal/node-logger";
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_me0y3sd4o2e from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_me0y3sd4o2e from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_me0y3sd4o2e from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_me0y3sd4o2e.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_me0y3sd4o2e.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_me0y3sd4o2e.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
|
getAutomockCode
|
|
14
|
-
} from "../../../../_node-chunks/chunk-
|
|
14
|
+
} from "../../../../_node-chunks/chunk-BZXQJZUK.js";
|
|
15
15
|
import {
|
|
16
16
|
babelParser
|
|
17
|
-
} from "../../../../_node-chunks/chunk-
|
|
18
|
-
import "../../../../_node-chunks/chunk-
|
|
17
|
+
} from "../../../../_node-chunks/chunk-P7GFT5HG.js";
|
|
18
|
+
import "../../../../_node-chunks/chunk-OJSXOILA.js";
|
|
19
19
|
import {
|
|
20
20
|
__name
|
|
21
|
-
} from "../../../../_node-chunks/chunk-
|
|
21
|
+
} from "../../../../_node-chunks/chunk-EJGHDAYE.js";
|
|
22
22
|
|
|
23
23
|
// src/core-server/presets/webpack/loaders/webpack-automock-loader.ts
|
|
24
24
|
function webpackAutomockLoader(source) {
|
package/dist/csf-tools/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_me0y3sd4o2e from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_me0y3sd4o2e from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_me0y3sd4o2e from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_me0y3sd4o2e.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_me0y3sd4o2e.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_me0y3sd4o2e.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
@@ -38,9 +38,9 @@ import {
|
|
|
38
38
|
vitestTransform,
|
|
39
39
|
writeConfig,
|
|
40
40
|
writeCsf
|
|
41
|
-
} from "../_node-chunks/chunk-
|
|
42
|
-
import "../_node-chunks/chunk-
|
|
43
|
-
import "../_node-chunks/chunk-
|
|
41
|
+
} from "../_node-chunks/chunk-MQY4ZI62.js";
|
|
42
|
+
import "../_node-chunks/chunk-BSVBH2ZA.js";
|
|
43
|
+
import "../_node-chunks/chunk-EJGHDAYE.js";
|
|
44
44
|
export {
|
|
45
45
|
BadMetaError,
|
|
46
46
|
ConfigFile,
|
|
@@ -179,7 +179,7 @@ var _Instrumenter = class _Instrumenter {
|
|
|
179
179
|
}) => {
|
|
180
180
|
const { isDebugging } = this.getState(storyId);
|
|
181
181
|
if (newPhase === "preparing" && isDebugging) {
|
|
182
|
-
return resetState({ storyId, renderPhase: newPhase });
|
|
182
|
+
return resetState({ storyId, renderPhase: newPhase, isDebugging });
|
|
183
183
|
} else if (newPhase === "playing") {
|
|
184
184
|
return resetState({ storyId, renderPhase: newPhase, isDebugging });
|
|
185
185
|
}
|
|
@@ -57136,7 +57136,7 @@ var _Instrumenter = class _Instrumenter {
|
|
|
57136
57136
|
}) => {
|
|
57137
57137
|
const { isDebugging } = this.getState(storyId);
|
|
57138
57138
|
if (newPhase === "preparing" && isDebugging) {
|
|
57139
|
-
return resetState({ storyId, renderPhase: newPhase });
|
|
57139
|
+
return resetState({ storyId, renderPhase: newPhase, isDebugging });
|
|
57140
57140
|
} else if (newPhase === "playing") {
|
|
57141
57141
|
return resetState({ storyId, renderPhase: newPhase, isDebugging });
|
|
57142
57142
|
}
|
|
@@ -75336,10 +75336,13 @@ var testingLibrary = instrument(
|
|
|
75336
75336
|
);
|
|
75337
75337
|
testingLibrary.screen = new Proxy(testingLibrary.screen, {
|
|
75338
75338
|
get(target, prop, receiver) {
|
|
75339
|
-
|
|
75340
|
-
|
|
75341
|
-
|
|
75342
|
-
|
|
75339
|
+
if (typeof window !== "undefined" && globalThis.location?.href?.includes("viewMode=docs")) {
|
|
75340
|
+
once.warn(dedent`
|
|
75341
|
+
You are using Testing Library's \`screen\` object while the story is rendered in docs mode. This will likely lead to issues, as multiple stories are rendered in the same page and therefore screen will potentially find multiple elements. Use the \`canvas\` utility from the story context instead, which will scope the queries to each story's canvas.
|
|
75342
|
+
|
|
75343
|
+
More info: https://storybook.js.org/docs/writing-tests/interaction-testing?ref=error#querying-the-canvas
|
|
75344
|
+
`);
|
|
75345
|
+
}
|
|
75343
75346
|
return Reflect.get(target, prop, receiver);
|
|
75344
75347
|
}
|
|
75345
75348
|
});
|
|
@@ -82699,7 +82702,7 @@ var import_memoizerific10 = __toESM(require_memoizerific(), 1);
|
|
|
82699
82702
|
var import_semver = __toESM(require_semver2(), 1);
|
|
82700
82703
|
|
|
82701
82704
|
// src/manager-api/version.ts
|
|
82702
|
-
var version = "10.0.0-rc.
|
|
82705
|
+
var version = "10.0.0-rc.4";
|
|
82703
82706
|
|
|
82704
82707
|
// src/manager-api/modules/versions.ts
|
|
82705
82708
|
var { VERSIONCHECK } = scope;
|
|
@@ -393,7 +393,7 @@ interface SubState$5 {
|
|
|
393
393
|
|
|
394
394
|
declare const isMacLike: () => boolean;
|
|
395
395
|
declare const controlOrMetaSymbol: () => "⌘" | "ctrl";
|
|
396
|
-
declare const controlOrMetaKey: () => "
|
|
396
|
+
declare const controlOrMetaKey: () => "meta" | "control";
|
|
397
397
|
declare const optionOrAltSymbol: () => "⌥" | "alt";
|
|
398
398
|
declare const isShortcutTaken: (arr1: string[], arr2: string[]) => boolean;
|
|
399
399
|
type KeyboardEventLike = Pick<KeyboardEvent, 'altKey' | 'ctrlKey' | 'metaKey' | 'shiftKey' | 'key' | 'code' | 'keyCode' | 'preventDefault'>;
|
|
@@ -3262,7 +3262,7 @@ import { global as global8 } from "@storybook/global";
|
|
|
3262
3262
|
import semver from "semver";
|
|
3263
3263
|
|
|
3264
3264
|
// src/manager-api/version.ts
|
|
3265
|
-
var version = "10.0.0-rc.
|
|
3265
|
+
var version = "10.0.0-rc.4";
|
|
3266
3266
|
|
|
3267
3267
|
// src/manager-api/modules/versions.ts
|
|
3268
3268
|
var { VERSIONCHECK } = global8;
|