storybook 10.0.0-beta.9 → 10.0.0-rc.0
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-AM4PZYVQ.js → chunk-HMIIJ6UD.js} +59 -6
- package/dist/_browser-chunks/chunk-SHR3NNR3.js +5810 -0
- package/dist/_browser-chunks/{syntaxhighlighter-RJW7FE3A.js → syntaxhighlighter-R46XOLMC.js} +2 -3
- package/dist/_node-chunks/{builder-manager-ZMBCXQXV.js → builder-manager-5DZV3NH5.js} +12 -12
- package/dist/_node-chunks/camelcase-KM3CILTP.js +18 -0
- package/dist/_node-chunks/{chunk-NEEUVKLS.js → chunk-2IRRHUY6.js} +8 -8
- package/dist/_node-chunks/{chunk-U3TBYKZA.js → chunk-3KLEDJFU.js} +8 -8
- package/dist/_node-chunks/{chunk-VM3IJPAW.js → chunk-4JI3GYTR.js} +7 -7
- package/dist/_node-chunks/{chunk-2RLHFYFA.js → chunk-4T2EX3QY.js} +7 -7
- package/dist/_node-chunks/{chunk-V6E6RSUO.js → chunk-6KTXQPVV.js} +7 -7
- package/dist/_node-chunks/{chunk-R4BIB4NX.js → chunk-73JE2442.js} +8 -8
- package/dist/_node-chunks/{chunk-U3LOLMF3.js → chunk-7GOR4BTB.js} +7 -7
- package/dist/_node-chunks/{chunk-CALGSUC5.js → chunk-7L4E5FAU.js} +6 -6
- package/dist/_node-chunks/{chunk-BUQRXXWE.js → chunk-ATTQ5B3H.js} +7 -7
- package/dist/_node-chunks/{chunk-LTKYC6VP.js → chunk-B3BVSZUX.js} +7 -7
- package/dist/_node-chunks/{chunk-A33ZDBWG.js → chunk-BGGGKRRK.js} +7 -7
- package/dist/_node-chunks/{chunk-75N2O5FL.js → chunk-CZLSJXUC.js} +7 -7
- package/dist/_node-chunks/{chunk-AV6DOLF6.js → chunk-DXXS374Q.js} +29 -26
- package/dist/_node-chunks/{chunk-XBOE5GD4.js → chunk-G3DNEVQF.js} +6 -6
- package/dist/_node-chunks/{chunk-XHXUIPIC.js → chunk-H3EQM2KY.js} +12 -12
- package/dist/_node-chunks/{chunk-Z6UKYBDV.js → chunk-IDR56JX5.js} +8 -8
- package/dist/_node-chunks/{chunk-V5DK6ZKU.js → chunk-KNGDROKF.js} +7 -7
- package/dist/_node-chunks/{chunk-AEVVTNDL.js → chunk-L7POFJNQ.js} +7 -7
- package/dist/_node-chunks/{chunk-I5NPNO3G.js → chunk-MDI6XQQU.js} +7 -7
- package/dist/_node-chunks/chunk-MG4NC3KA.js +61 -0
- package/dist/_node-chunks/chunk-MOBEL6SU.js +18 -0
- package/dist/_node-chunks/{chunk-NRBIODYE.js → chunk-NEHX365L.js} +7 -7
- package/dist/_node-chunks/{chunk-O2AHQDZJ.js → chunk-OAWO55XX.js} +7 -7
- package/dist/_node-chunks/{chunk-JVFB6XG6.js → chunk-OYXXB4OM.js} +14 -10
- package/dist/_node-chunks/{chunk-JIERQ4FU.js → chunk-PVOTH5U7.js} +9 -9
- package/dist/_node-chunks/{chunk-GEDTSFBQ.js → chunk-R4L65Z37.js} +7 -7
- package/dist/_node-chunks/{chunk-XYRZ6AGE.js → chunk-VAUJQGO5.js} +10 -10
- package/dist/_node-chunks/{chunk-UOCLAXMF.js → chunk-WEVLMQUC.js} +7 -7
- package/dist/_node-chunks/{chunk-B5W4OROC.js → chunk-WFKQH23S.js} +9 -9
- package/dist/_node-chunks/{chunk-TO3ARZYO.js → chunk-XKXC26XV.js} +18 -15
- package/dist/_node-chunks/{chunk-IXMF5FBT.js → chunk-ZH4LFYU3.js} +7 -7
- package/dist/_node-chunks/{dist-HAF4OXIQ.js → dist-UT73SVAT.js} +9 -9
- package/dist/_node-chunks/{globby-HUMXQF7C.js → globby-ZQ3RX3ZV.js} +9 -9
- package/dist/_node-chunks/{lib-TOFZQAVG.js → lib-HX5MMWWS.js} +7 -7
- package/dist/_node-chunks/{mdx-N42X6CFJ-LCPMSYGS.js → mdx-N42X6CFJ-MCLYGNM2.js} +8 -8
- package/dist/_node-chunks/{p-limit-JSCSHFNF.js → p-limit-WFKT3URN.js} +7 -7
- package/dist/_node-chunks/{plugin-4OW72VQ5.js → plugin-MYXI4RLY.js} +11 -11
- package/dist/_node-chunks/{plugin-XRJQD5ND.js → plugin-ZWOPAFXY.js} +10 -10
- package/dist/_node-chunks/{webpack-inject-mocker-runtime-plugin-XI7KJK6X.js → webpack-inject-mocker-runtime-plugin-QKV56QIS.js} +10 -10
- package/dist/_node-chunks/{webpack-mock-plugin-6BAMUAJ3.js → webpack-mock-plugin-I6AWAO5P.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 +77 -12
- package/dist/cli/index.js +21 -20
- package/dist/common/index.d.ts +5 -3
- package/dist/common/index.js +20 -20
- package/dist/components/index.js +74 -5746
- package/dist/core-server/index.js +49 -40
- package/dist/core-server/presets/common-manager.js +523 -29
- 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 +2 -2
- package/dist/csf-tools/index.js +9 -9
- package/dist/manager/globals-runtime.js +24 -21
- package/dist/manager/runtime.js +68 -45
- package/dist/manager-api/index.js +24 -21
- package/dist/node-logger/index.js +18 -15
- package/dist/preview-api/index.d.ts +68 -67
- package/dist/preview-api/index.js +5 -5
- package/dist/server-errors.js +10 -10
- package/dist/telemetry/index.js +23 -23
- package/dist/types/index.d.ts +3 -1
- package/package.json +1 -1
- package/dist/_browser-chunks/chunk-GJ67EE65.js +0 -67
- package/dist/_node-chunks/camelcase-JMK43JMF.js +0 -18
- package/dist/_node-chunks/chunk-5G7GJHS7.js +0 -62
- package/dist/_node-chunks/chunk-7VDHEICM.js +0 -18
- package/dist/_browser-chunks/{chunk-OQ6NCFPL.js → chunk-PS3AOQI4.js} +5 -5
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_puee7uitcer from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_puee7uitcer from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_puee7uitcer from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_puee7uitcer.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_puee7uitcer.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_puee7uitcer.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_pretty_hrtime
|
|
14
|
-
} from "../_node-chunks/chunk-
|
|
14
|
+
} from "../_node-chunks/chunk-CZLSJXUC.js";
|
|
15
15
|
import {
|
|
16
16
|
boxen,
|
|
17
17
|
require_string_width
|
|
18
|
-
} from "../_node-chunks/chunk-
|
|
19
|
-
import "../_node-chunks/chunk-
|
|
18
|
+
} from "../_node-chunks/chunk-IDR56JX5.js";
|
|
19
|
+
import "../_node-chunks/chunk-4JI3GYTR.js";
|
|
20
20
|
import {
|
|
21
21
|
StatusTypeIdMismatchError,
|
|
22
22
|
StorybookError
|
|
23
|
-
} from "../_node-chunks/chunk-
|
|
23
|
+
} from "../_node-chunks/chunk-WFKQH23S.js";
|
|
24
24
|
import {
|
|
25
25
|
getErrorLevel,
|
|
26
26
|
mapStaticDir,
|
|
@@ -28,59 +28,59 @@ import {
|
|
|
28
28
|
sendTelemetryError,
|
|
29
29
|
useStatics,
|
|
30
30
|
withTelemetry
|
|
31
|
-
} from "../_node-chunks/chunk-
|
|
32
|
-
import "../_node-chunks/chunk-
|
|
31
|
+
} from "../_node-chunks/chunk-H3EQM2KY.js";
|
|
32
|
+
import "../_node-chunks/chunk-BGGGKRRK.js";
|
|
33
33
|
import {
|
|
34
34
|
telemetry
|
|
35
|
-
} from "../_node-chunks/chunk-
|
|
36
|
-
import "../_node-chunks/chunk-
|
|
35
|
+
} from "../_node-chunks/chunk-XKXC26XV.js";
|
|
36
|
+
import "../_node-chunks/chunk-MOBEL6SU.js";
|
|
37
37
|
import {
|
|
38
38
|
userOrAutoTitleFromSpecifier
|
|
39
|
-
} from "../_node-chunks/chunk-
|
|
40
|
-
import "../_node-chunks/chunk-
|
|
41
|
-
import "../_node-chunks/chunk-
|
|
42
|
-
import "../_node-chunks/chunk-
|
|
39
|
+
} from "../_node-chunks/chunk-DXXS374Q.js";
|
|
40
|
+
import "../_node-chunks/chunk-6KTXQPVV.js";
|
|
41
|
+
import "../_node-chunks/chunk-MG4NC3KA.js";
|
|
42
|
+
import "../_node-chunks/chunk-73JE2442.js";
|
|
43
43
|
import {
|
|
44
44
|
optionalEnvToBoolean,
|
|
45
45
|
require_cross_spawn
|
|
46
|
-
} from "../_node-chunks/chunk-
|
|
46
|
+
} from "../_node-chunks/chunk-PVOTH5U7.js";
|
|
47
47
|
import {
|
|
48
48
|
up2 as up
|
|
49
|
-
} from "../_node-chunks/chunk-
|
|
49
|
+
} from "../_node-chunks/chunk-OAWO55XX.js";
|
|
50
50
|
import {
|
|
51
51
|
invariant
|
|
52
|
-
} from "../_node-chunks/chunk-
|
|
52
|
+
} from "../_node-chunks/chunk-ATTQ5B3H.js";
|
|
53
53
|
import {
|
|
54
54
|
importModule,
|
|
55
55
|
resolvePackageDir
|
|
56
|
-
} from "../_node-chunks/chunk-
|
|
56
|
+
} from "../_node-chunks/chunk-OYXXB4OM.js";
|
|
57
57
|
import {
|
|
58
58
|
resolve
|
|
59
|
-
} from "../_node-chunks/chunk-
|
|
59
|
+
} from "../_node-chunks/chunk-ZH4LFYU3.js";
|
|
60
60
|
import {
|
|
61
61
|
require_prompts
|
|
62
|
-
} from "../_node-chunks/chunk-
|
|
63
|
-
import "../_node-chunks/chunk-
|
|
62
|
+
} from "../_node-chunks/chunk-KNGDROKF.js";
|
|
63
|
+
import "../_node-chunks/chunk-NEHX365L.js";
|
|
64
64
|
import {
|
|
65
65
|
slash
|
|
66
|
-
} from "../_node-chunks/chunk-
|
|
66
|
+
} from "../_node-chunks/chunk-R4L65Z37.js";
|
|
67
67
|
import {
|
|
68
68
|
require_dist
|
|
69
|
-
} from "../_node-chunks/chunk-
|
|
69
|
+
} from "../_node-chunks/chunk-B3BVSZUX.js";
|
|
70
70
|
import {
|
|
71
71
|
require_lib,
|
|
72
72
|
require_src
|
|
73
|
-
} from "../_node-chunks/chunk-
|
|
73
|
+
} from "../_node-chunks/chunk-L7POFJNQ.js";
|
|
74
74
|
import {
|
|
75
75
|
require_picocolors
|
|
76
|
-
} from "../_node-chunks/chunk-
|
|
76
|
+
} from "../_node-chunks/chunk-4T2EX3QY.js";
|
|
77
77
|
import {
|
|
78
78
|
__commonJS,
|
|
79
79
|
__export,
|
|
80
80
|
__name,
|
|
81
81
|
__require,
|
|
82
82
|
__toESM
|
|
83
|
-
} from "../_node-chunks/chunk-
|
|
83
|
+
} from "../_node-chunks/chunk-7L4E5FAU.js";
|
|
84
84
|
|
|
85
85
|
// ../node_modules/tsconfig-paths/lib/filesystem.js
|
|
86
86
|
var require_filesystem = __commonJS({
|
|
@@ -8715,7 +8715,7 @@ var StoryIndexGenerator = class _StoryIndexGenerator {
|
|
|
8715
8715
|
}
|
|
8716
8716
|
const pathToSubIndex = {};
|
|
8717
8717
|
const fullGlob = slash(join(specifier.directory, specifier.files));
|
|
8718
|
-
const { globby } = await import("../_node-chunks/globby-
|
|
8718
|
+
const { globby } = await import("../_node-chunks/globby-ZQ3RX3ZV.js");
|
|
8719
8719
|
const files = await globby(fullGlob, {
|
|
8720
8720
|
absolute: true,
|
|
8721
8721
|
cwd: workingDir,
|
|
@@ -8889,7 +8889,9 @@ var StoryIndexGenerator = class _StoryIndexGenerator {
|
|
|
8889
8889
|
}, "defaultMakeTitle");
|
|
8890
8890
|
const indexer = this.options.indexers.find((ind) => ind.test.exec(absolutePath));
|
|
8891
8891
|
invariant(indexer, `No matching indexer found for ${absolutePath}`);
|
|
8892
|
-
const indexInputs = await indexer.createIndex(absolutePath, {
|
|
8892
|
+
const indexInputs = await indexer.createIndex(absolutePath, {
|
|
8893
|
+
makeTitle: defaultMakeTitle
|
|
8894
|
+
});
|
|
8893
8895
|
const tsconfigPath = up("tsconfig.json", {
|
|
8894
8896
|
cwd: this.options.workingDir,
|
|
8895
8897
|
last: getProjectRoot()
|
|
@@ -8910,9 +8912,10 @@ var StoryIndexGenerator = class _StoryIndexGenerator {
|
|
|
8910
8912
|
const title = input.title ?? defaultMakeTitle();
|
|
8911
8913
|
const id = input.__id ?? toId(input.metaId ?? title, storyNameFromExport(input.exportName));
|
|
8912
8914
|
const tags = combineTags(...projectTags, ...input.tags ?? []);
|
|
8913
|
-
|
|
8915
|
+
const subtype = input.subtype ?? "story";
|
|
8916
|
+
const entry = {
|
|
8914
8917
|
type: "story",
|
|
8915
|
-
subtype
|
|
8918
|
+
subtype,
|
|
8916
8919
|
id,
|
|
8917
8920
|
extra: {
|
|
8918
8921
|
metaId: input.metaId,
|
|
@@ -8922,10 +8925,16 @@ var StoryIndexGenerator = class _StoryIndexGenerator {
|
|
|
8922
8925
|
title,
|
|
8923
8926
|
importPath,
|
|
8924
8927
|
componentPath,
|
|
8925
|
-
tags
|
|
8926
|
-
...input.type === "story" && input.subtype === "test" ? { parent: input.parent, parentName: input.parentName } : {},
|
|
8927
|
-
...input.exportName ? { exportName: input.exportName } : {}
|
|
8928
|
+
tags
|
|
8928
8929
|
};
|
|
8930
|
+
if (subtype === "test") {
|
|
8931
|
+
entry.parent = input.parent;
|
|
8932
|
+
entry.parentName = input.parentName;
|
|
8933
|
+
}
|
|
8934
|
+
if (input.exportName) {
|
|
8935
|
+
entry.exportName = input.exportName;
|
|
8936
|
+
}
|
|
8937
|
+
return entry;
|
|
8929
8938
|
}
|
|
8930
8939
|
);
|
|
8931
8940
|
const hasAutodocsTag = storyEntries.some((entry) => entry.tags.includes(AUTODOCS_TAG));
|
|
@@ -8964,7 +8973,7 @@ var StoryIndexGenerator = class _StoryIndexGenerator {
|
|
|
8964
8973
|
const normalizedPath = normalizeStoryPath(relativePath);
|
|
8965
8974
|
const importPath = slash(normalizedPath);
|
|
8966
8975
|
const content = await readFile(absolutePath, { encoding: "utf8" });
|
|
8967
|
-
const { analyze } = await import("../_node-chunks/dist-
|
|
8976
|
+
const { analyze } = await import("../_node-chunks/dist-UT73SVAT.js");
|
|
8968
8977
|
const result2 = await analyze(content);
|
|
8969
8978
|
if (result2.isTemplate) {
|
|
8970
8979
|
return false;
|
|
@@ -9307,7 +9316,7 @@ __name(print, "print");
|
|
|
9307
9316
|
// src/core-server/utils/get-builders.ts
|
|
9308
9317
|
import { MissingBuilderError } from "storybook/internal/server-errors";
|
|
9309
9318
|
async function getManagerBuilder() {
|
|
9310
|
-
return await import("../_node-chunks/builder-manager-
|
|
9319
|
+
return await import("../_node-chunks/builder-manager-5DZV3NH5.js");
|
|
9311
9320
|
}
|
|
9312
9321
|
__name(getManagerBuilder, "getManagerBuilder");
|
|
9313
9322
|
async function getPreviewBuilder(resolvedPreviewBuilder) {
|
|
@@ -16551,7 +16560,7 @@ function watchStorySpecifiers(specifiers, options, onInvalidate) {
|
|
|
16551
16560
|
// because the directory could already be within the files part (e.g. './x/foo/bar')
|
|
16552
16561
|
basename2(specifier.files)
|
|
16553
16562
|
);
|
|
16554
|
-
const { globby } = await import("../_node-chunks/globby-
|
|
16563
|
+
const { globby } = await import("../_node-chunks/globby-ZQ3RX3ZV.js");
|
|
16555
16564
|
const addedFiles = await globby(slash(dirGlob), commonGlobOptions2(dirGlob));
|
|
16556
16565
|
addedFiles.forEach((filePath) => {
|
|
16557
16566
|
const fileImportPath = toImportPath(filePath);
|