storybook 10.1.0-alpha.12 → 10.1.0-alpha.13
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-74YHFU5B.js → chunk-2XZMBGTA.js} +1 -1
- package/dist/_browser-chunks/{chunk-EBHB6RPS.js → chunk-FQ7SLVLR.js} +6 -1
- package/dist/_browser-chunks/{chunk-X3DUQ5RA.js → chunk-GFY5R5EY.js} +1 -1
- package/dist/_node-chunks/{builder-manager-YUOHSIUB.js → builder-manager-DWDUVXZM.js} +27 -22
- package/dist/_node-chunks/{chunk-B6JWY6PC.js → camelcase-EETCRTJX.js} +8 -8
- package/dist/_node-chunks/{chunk-CZ5GHJCC.js → chunk-2W4GZCLE.js} +7 -7
- package/dist/_node-chunks/{chunk-E5FJS66Z.js → chunk-447655DM.js} +6 -6
- package/dist/_node-chunks/{chunk-WFLWJO24.js → chunk-4EJUC2SD.js} +4998 -1685
- package/dist/_node-chunks/chunk-4ZJOH2UN.js +61 -0
- package/dist/_node-chunks/chunk-654SJIMS.js +23 -0
- package/dist/_node-chunks/{chunk-2DMESZFJ.js → chunk-7IAVT2FU.js} +7 -7
- package/dist/_node-chunks/{chunk-5KLIDWFN.js → chunk-7KFHRNOT.js} +7 -7
- package/dist/_node-chunks/{chunk-XXPJ7XR3.js → chunk-AZIPBEBK.js} +6 -6
- package/dist/_node-chunks/{chunk-WUXQMQCB.js → chunk-B76FDKVB.js} +6 -6
- package/dist/_node-chunks/chunk-B7PGKETD.js +3781 -0
- package/dist/_node-chunks/{chunk-EZWWR7AR.js → chunk-CLUBH2LP.js} +55 -36
- package/dist/_node-chunks/{chunk-DUXPWBOK.js → chunk-CMYD2JNN.js} +7 -7
- package/dist/_node-chunks/{chunk-QCO2ZM7F.js → chunk-DIPKXLEP.js} +55 -32
- package/dist/_node-chunks/{chunk-DWXTZT3D.js → chunk-DPFYWXEA.js} +6 -6
- package/dist/_node-chunks/{chunk-FZLRAH4N.js → chunk-FCVNHU2F.js} +7 -7
- package/dist/_node-chunks/{chunk-QYQIZBS6.js → chunk-JQ7RQS5Q.js} +6 -6
- package/dist/_node-chunks/chunk-LEL5OSY3.js +18 -0
- package/dist/_node-chunks/{chunk-WA6KZQZ2.js → chunk-LPKSBF62.js} +6 -6
- package/dist/_node-chunks/chunk-LYEZOJ43.js +78 -0
- package/dist/_node-chunks/{chunk-JARUEMEP.js → chunk-MIA5324I.js} +7 -7
- package/dist/_node-chunks/{chunk-A4APXFQ2.js → chunk-MJM4TEMP.js} +14 -8
- package/dist/_node-chunks/{chunk-NAOYEL54.js → chunk-OVVZIUHS.js} +7 -7
- package/dist/_node-chunks/{chunk-5HV3B5OP.js → chunk-RUUNVQ6W.js} +1104 -13
- package/dist/_node-chunks/{chunk-2D2IODUU.js → chunk-URLNGLC2.js} +51 -71
- package/dist/_node-chunks/{chunk-OP3INKUD.js → chunk-WC2YEQHJ.js} +6 -6
- package/dist/_node-chunks/{chunk-4FT2DHGE.js → chunk-XKRVQL2G.js} +8 -8
- package/dist/_node-chunks/{chunk-SEMIAAWG.js → chunk-Z2OWEMX3.js} +8 -8
- package/dist/_node-chunks/{dist-DS2B5A3J.js → dist-22CLJ4BC.js} +9 -9
- package/dist/_node-chunks/{globby-6THB7HVX.js → globby-GR24TGSK.js} +9 -9
- package/dist/_node-chunks/{lib-5NKX4YGG.js → lib-G2LGVRPC.js} +7 -7
- package/dist/_node-chunks/{mdx-N42X6CFJ-ZLT3QOFF.js → mdx-N42X6CFJ-W6P6IDDW.js} +8 -8
- package/dist/_node-chunks/{p-limit-PDMWNG7W.js → p-limit-K4FZHG2F.js} +7 -7
- package/dist/babel/index.js +10 -11
- package/dist/bin/core.js +32 -26
- package/dist/bin/dispatcher.js +31 -20
- package/dist/bin/loader.js +10 -13
- package/dist/cli/index.d.ts +692 -133
- package/dist/cli/index.js +1005 -177
- package/dist/common/index.d.ts +139 -62
- package/dist/common/index.js +63 -49
- package/dist/core-server/index.d.ts +3 -2
- package/dist/core-server/index.js +96 -1413
- package/dist/core-server/presets/common-override-preset.js +9 -9
- package/dist/core-server/presets/common-preset.js +25 -65
- package/dist/csf-tools/index.js +9 -9
- package/dist/manager/globals-runtime.js +32 -3
- package/dist/manager/runtime.js +1 -1
- package/dist/manager-api/index.d.ts +1 -1
- package/dist/manager-api/index.js +4 -4
- package/dist/manager-errors.d.ts +6 -0
- package/dist/manager-errors.js +2 -2
- package/dist/mocking-utils/index.d.ts +1126 -0
- package/dist/{_node-chunks/chunk-ZXSD6L3S.js → mocking-utils/index.js} +441 -16
- package/dist/node-logger/index.d.ts +192 -24
- package/dist/node-logger/index.js +23 -3148
- package/dist/preview/runtime.js +31 -2
- package/dist/preview-api/index.d.ts +69 -68
- package/dist/preview-errors.d.ts +6 -0
- package/dist/preview-errors.js +2 -2
- package/dist/server-errors.d.ts +31 -1
- package/dist/server-errors.js +17 -10
- package/dist/telemetry/index.d.ts +23 -2
- package/dist/telemetry/index.js +25 -24
- package/dist/types/index.d.ts +71 -8
- package/dist/types/index.js +25 -1
- package/package.json +7 -9
- package/dist/_node-chunks/camelcase-JREIL7NV.js +0 -18
- package/dist/_node-chunks/chunk-FDXFVHIL.js +0 -1114
- package/dist/_node-chunks/chunk-HZG65SU3.js +0 -34
- package/dist/_node-chunks/chunk-IXVYNBMD.js +0 -18
- package/dist/_node-chunks/chunk-LIH7MTP7.js +0 -3214
- package/dist/_node-chunks/chunk-N5GIRUP5.js +0 -1047
- package/dist/_node-chunks/chunk-O5DA7YLO.js +0 -3171
- package/dist/_node-chunks/chunk-TS2UUH2J.js +0 -301
- package/dist/_node-chunks/chunk-Y4E6IGQF.js +0 -61
- package/dist/_node-chunks/chunk-ZL3AFKRX.js +0 -1029
- package/dist/_node-chunks/plugin-6XMWOGPO.js +0 -123
- package/dist/_node-chunks/plugin-LTOXVT6A.js +0 -109
- package/dist/_node-chunks/webpack-inject-mocker-runtime-plugin-2SFE5LQS.js +0 -46582
- package/dist/_node-chunks/webpack-mock-plugin-CX5J2U56.js +0 -92
- package/dist/core-server/presets/webpack/loaders/storybook-mock-transform-loader.js +0 -32
- package/dist/core-server/presets/webpack/loaders/webpack-automock-loader.js +0 -28
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_h0pwn2pcb57 from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_h0pwn2pcb57 from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_h0pwn2pcb57 from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_h0pwn2pcb57.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_h0pwn2pcb57.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_h0pwn2pcb57.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-MIA5324I.js";
|
|
15
15
|
import {
|
|
16
16
|
slash
|
|
17
|
-
} from "../../_node-chunks/chunk-
|
|
18
|
-
import "../../_node-chunks/chunk-
|
|
17
|
+
} from "../../_node-chunks/chunk-447655DM.js";
|
|
18
|
+
import "../../_node-chunks/chunk-WC2YEQHJ.js";
|
|
19
19
|
|
|
20
20
|
// src/core-server/utils/remove-mdx-entries.ts
|
|
21
21
|
import { isAbsolute, join, relative } from "node:path";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_h0pwn2pcb57 from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_h0pwn2pcb57 from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_h0pwn2pcb57 from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_h0pwn2pcb57.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_h0pwn2pcb57.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_h0pwn2pcb57.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_57ru1wfqqjv.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-DIPKXLEP.js";
|
|
16
|
+
import "../../_node-chunks/chunk-2W4GZCLE.js";
|
|
17
|
+
import "../../_node-chunks/chunk-LYEZOJ43.js";
|
|
17
18
|
import {
|
|
18
19
|
getLastEvents,
|
|
19
20
|
getSessionId
|
|
20
|
-
} from "../../_node-chunks/chunk-
|
|
21
|
+
} from "../../_node-chunks/chunk-B76FDKVB.js";
|
|
21
22
|
import {
|
|
22
23
|
invariant
|
|
23
|
-
} from "../../_node-chunks/chunk-
|
|
24
|
+
} from "../../_node-chunks/chunk-JQ7RQS5Q.js";
|
|
24
25
|
import {
|
|
25
26
|
resolvePackageDir
|
|
26
|
-
} from "../../_node-chunks/chunk-
|
|
27
|
+
} from "../../_node-chunks/chunk-MJM4TEMP.js";
|
|
27
28
|
import {
|
|
28
29
|
isAbsolute,
|
|
29
30
|
join
|
|
30
|
-
} from "../../_node-chunks/chunk-
|
|
31
|
-
import "../../_node-chunks/chunk-LIH7MTP7.js";
|
|
31
|
+
} from "../../_node-chunks/chunk-LPKSBF62.js";
|
|
32
32
|
import {
|
|
33
33
|
loadConfig
|
|
34
|
-
} from "../../_node-chunks/chunk-
|
|
34
|
+
} from "../../_node-chunks/chunk-Z2OWEMX3.js";
|
|
35
35
|
import {
|
|
36
36
|
require_dist
|
|
37
|
-
} from "../../_node-chunks/chunk-
|
|
37
|
+
} from "../../_node-chunks/chunk-CMYD2JNN.js";
|
|
38
38
|
import {
|
|
39
39
|
require_picocolors
|
|
40
|
-
} from "../../_node-chunks/chunk-
|
|
40
|
+
} from "../../_node-chunks/chunk-OVVZIUHS.js";
|
|
41
41
|
import {
|
|
42
42
|
__commonJS,
|
|
43
43
|
__require,
|
|
44
44
|
__toESM
|
|
45
|
-
} from "../../_node-chunks/chunk-
|
|
45
|
+
} from "../../_node-chunks/chunk-WC2YEQHJ.js";
|
|
46
46
|
|
|
47
47
|
// ../node_modules/shell-quote/quote.js
|
|
48
48
|
var require_quote = __commonJS({
|
|
@@ -468,11 +468,9 @@ var require_launch_editor = __commonJS({
|
|
|
468
468
|
// src/core-server/presets/common-preset.ts
|
|
469
469
|
import { existsSync as existsSync3 } from "node:fs";
|
|
470
470
|
import { readFile as readFile3 } from "node:fs/promises";
|
|
471
|
-
import { fileURLToPath } from "node:url";
|
|
472
471
|
import { optionalEnvToBoolean } from "storybook/internal/common";
|
|
473
472
|
import {
|
|
474
473
|
JsPackageManagerFactory,
|
|
475
|
-
findConfigFile as findConfigFile3,
|
|
476
474
|
getDirectoryFromWorkingDir,
|
|
477
475
|
getPreviewBodyTemplate,
|
|
478
476
|
getPreviewHeadTemplate,
|
|
@@ -500,7 +498,7 @@ import { existsSync } from "node:fs";
|
|
|
500
498
|
import { readFile } from "node:fs/promises";
|
|
501
499
|
import { basename, dirname, extname, join as join2 } from "node:path";
|
|
502
500
|
import {
|
|
503
|
-
|
|
501
|
+
extractFrameworkPackageName,
|
|
504
502
|
findConfigFile,
|
|
505
503
|
getFrameworkName,
|
|
506
504
|
getProjectRoot
|
|
@@ -511,7 +509,7 @@ import { isCsfFactoryPreview } from "storybook/internal/csf-tools";
|
|
|
511
509
|
var import_ts_dedent = __toESM(require_dist(), 1);
|
|
512
510
|
|
|
513
511
|
// src/core-server/utils/get-component-variable-name.ts
|
|
514
|
-
var getComponentVariableName = async (name) => (await import("../../_node-chunks/camelcase-
|
|
512
|
+
var getComponentVariableName = async (name) => (await import("../../_node-chunks/camelcase-EETCRTJX.js")).default(name.replace(/^[^a-zA-Z_$]*/, ""), { pascalCase: !0 }).replace(/[^a-zA-Z_$]+/, "");
|
|
515
513
|
|
|
516
514
|
// src/core-server/utils/new-story-templates/csf-factory-template.ts
|
|
517
515
|
async function getCsfFactoryTemplateForNewStoryFile(data) {
|
|
@@ -574,7 +572,7 @@ async function getNewStoryFile({
|
|
|
574
572
|
componentIsDefaultExport,
|
|
575
573
|
componentExportCount
|
|
576
574
|
}, options) {
|
|
577
|
-
let frameworkPackageName = await getFrameworkName(options), sanitizedFrameworkPackageName =
|
|
575
|
+
let frameworkPackageName = await getFrameworkName(options), sanitizedFrameworkPackageName = extractFrameworkPackageName(frameworkPackageName), base = basename(componentFilePath), extension = extname(componentFilePath), basenameWithoutExtension = base.replace(extension, ""), dir = dirname(componentFilePath), { storyFileName, isTypescript, storyFileExtension } = getStoryMetadata(componentFilePath), storyFileNameWithExtension = `${storyFileName}.${storyFileExtension}`, alternativeStoryFileNameWithExtension = `${basenameWithoutExtension}.${componentExportName}.stories.${storyFileExtension}`, exportedStoryName = "Default", useCsfFactory = !1;
|
|
578
576
|
try {
|
|
579
577
|
let previewConfig = findConfigFile("preview", options.configDir);
|
|
580
578
|
if (previewConfig) {
|
|
@@ -665,11 +663,7 @@ function initCreateNewStoryChannel(channel, options, coreOptions) {
|
|
|
665
663
|
// src/core-server/server-channel/file-search-channel.ts
|
|
666
664
|
import { readFile as readFile2 } from "node:fs/promises";
|
|
667
665
|
import { dirname as dirname2, join as join3 } from "node:path";
|
|
668
|
-
import {
|
|
669
|
-
extractProperRendererNameFromFramework,
|
|
670
|
-
getFrameworkName as getFrameworkName2,
|
|
671
|
-
getProjectRoot as getProjectRoot2
|
|
672
|
-
} from "storybook/internal/common";
|
|
666
|
+
import { extractRenderer, getFrameworkName as getFrameworkName2, getProjectRoot as getProjectRoot2 } from "storybook/internal/common";
|
|
673
667
|
import {
|
|
674
668
|
FILE_COMPONENT_SEARCH_REQUEST,
|
|
675
669
|
FILE_COMPONENT_SEARCH_RESPONSE
|
|
@@ -780,7 +774,7 @@ async function searchFiles({
|
|
|
780
774
|
ignoredFiles = IGNORED_FILES,
|
|
781
775
|
fileExtensions = FILE_EXTENSIONS
|
|
782
776
|
}) {
|
|
783
|
-
let { globby, isDynamicPattern } = await import("../../_node-chunks/globby-
|
|
777
|
+
let { globby, isDynamicPattern } = await import("../../_node-chunks/globby-GR24TGSK.js"), hasSearchSpecialGlobChars = isDynamicPattern(searchQuery, { cwd }), searchQueryHasExtension = /(\.[a-z]+)$/i.test(searchQuery), fileExtensionsPattern = `{${fileExtensions.join(",")}}`, globbedSearchQuery = hasSearchSpecialGlobChars ? searchQuery : searchQueryHasExtension ? [`**/*${searchQuery}*`, `**/*${searchQuery}*/**`] : [
|
|
784
778
|
`**/*${searchQuery}*.${fileExtensionsPattern}`,
|
|
785
779
|
`**/*${searchQuery}*/**/*.${fileExtensionsPattern}`
|
|
786
780
|
];
|
|
@@ -802,9 +796,7 @@ async function initFileSearchChannel(channel, options, coreOptions) {
|
|
|
802
796
|
try {
|
|
803
797
|
if (!searchQuery)
|
|
804
798
|
return;
|
|
805
|
-
let frameworkName = await getFrameworkName2(options), rendererName = await
|
|
806
|
-
frameworkName
|
|
807
|
-
), entries = (await searchFiles({
|
|
799
|
+
let frameworkName = await getFrameworkName2(options), rendererName = await extractRenderer(frameworkName), entries = (await searchFiles({
|
|
808
800
|
searchQuery,
|
|
809
801
|
cwd: getProjectRoot2()
|
|
810
802
|
})).map(async (file) => {
|
|
@@ -1348,37 +1340,7 @@ var interpolate = (string, data = {}) => Object.entries(data).reduce((acc, [k, v
|
|
|
1348
1340
|
}, managerEntries = async (existing) => [
|
|
1349
1341
|
join(resolvePackageDir("storybook"), "dist/core-server/presets/common-manager.js"),
|
|
1350
1342
|
...existing || []
|
|
1351
|
-
]
|
|
1352
|
-
let previewConfigPath = findConfigFile3("preview", options.configDir);
|
|
1353
|
-
if (!previewConfigPath)
|
|
1354
|
-
return existing;
|
|
1355
|
-
let { viteInjectMockerRuntime } = await import("../../_node-chunks/plugin-LTOXVT6A.js"), { viteMockPlugin } = await import("../../_node-chunks/plugin-6XMWOGPO.js"), coreOptions = await options.presets.apply("core");
|
|
1356
|
-
return {
|
|
1357
|
-
...existing,
|
|
1358
|
-
plugins: [
|
|
1359
|
-
...existing.plugins ?? [],
|
|
1360
|
-
...previewConfigPath ? [
|
|
1361
|
-
viteInjectMockerRuntime({ previewConfigPath }),
|
|
1362
|
-
viteMockPlugin({ previewConfigPath, coreOptions, configDir: options.configDir })
|
|
1363
|
-
] : []
|
|
1364
|
-
]
|
|
1365
|
-
};
|
|
1366
|
-
}, webpackFinal = async (config, options) => {
|
|
1367
|
-
let previewConfigPath = findConfigFile3("preview", options.configDir);
|
|
1368
|
-
if (!previewConfigPath)
|
|
1369
|
-
return config;
|
|
1370
|
-
let { WebpackMockPlugin } = await import("../../_node-chunks/webpack-mock-plugin-CX5J2U56.js"), { WebpackInjectMockerRuntimePlugin } = await import("../../_node-chunks/webpack-inject-mocker-runtime-plugin-2SFE5LQS.js");
|
|
1371
|
-
return config.plugins = config.plugins || [], config.module.rules.push({
|
|
1372
|
-
test: /preview\.(t|j)sx?$/,
|
|
1373
|
-
use: [
|
|
1374
|
-
{
|
|
1375
|
-
loader: fileURLToPath(
|
|
1376
|
-
import.meta.resolve("storybook/webpack/loaders/storybook-mock-transform-loader")
|
|
1377
|
-
)
|
|
1378
|
-
}
|
|
1379
|
-
]
|
|
1380
|
-
}), config.plugins.push(new WebpackMockPlugin({ previewConfigPath })), config.plugins.push(new WebpackInjectMockerRuntimePlugin()), config;
|
|
1381
|
-
};
|
|
1343
|
+
];
|
|
1382
1344
|
export {
|
|
1383
1345
|
babel,
|
|
1384
1346
|
core,
|
|
@@ -1398,7 +1360,5 @@ export {
|
|
|
1398
1360
|
resolvedReact,
|
|
1399
1361
|
staticDirs,
|
|
1400
1362
|
title,
|
|
1401
|
-
typescript
|
|
1402
|
-
viteFinal,
|
|
1403
|
-
webpackFinal
|
|
1363
|
+
typescript
|
|
1404
1364
|
};
|
package/dist/csf-tools/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_h0pwn2pcb57 from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_h0pwn2pcb57 from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_h0pwn2pcb57 from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_h0pwn2pcb57.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_h0pwn2pcb57.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_h0pwn2pcb57.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-Z2OWEMX3.js";
|
|
42
|
+
import "../_node-chunks/chunk-CMYD2JNN.js";
|
|
43
|
+
import "../_node-chunks/chunk-WC2YEQHJ.js";
|
|
44
44
|
export {
|
|
45
45
|
BadMetaError,
|
|
46
46
|
ConfigFile,
|
|
@@ -45837,12 +45837,36 @@ init_client_logger();
|
|
|
45837
45837
|
// src/types/index.ts
|
|
45838
45838
|
var types_exports = {};
|
|
45839
45839
|
__export(types_exports, {
|
|
45840
|
-
Addon_TypesEnum: () => Addon_TypesEnum
|
|
45840
|
+
Addon_TypesEnum: () => Addon_TypesEnum,
|
|
45841
|
+
CoreWebpackCompiler: () => CoreWebpackCompiler,
|
|
45842
|
+
Feature: () => Feature,
|
|
45843
|
+
SupportedBuilder: () => SupportedBuilder,
|
|
45844
|
+
SupportedFramework: () => SupportedFramework,
|
|
45845
|
+
SupportedLanguage: () => SupportedLanguage,
|
|
45846
|
+
SupportedRenderer: () => SupportedRenderer
|
|
45841
45847
|
});
|
|
45842
45848
|
|
|
45843
45849
|
// src/types/modules/addons.ts
|
|
45844
45850
|
var Addon_TypesEnum = /* @__PURE__ */ ((Addon_TypesEnum2) => (Addon_TypesEnum2.TAB = "tab", Addon_TypesEnum2.PANEL = "panel", Addon_TypesEnum2.TOOL = "tool", Addon_TypesEnum2.TOOLEXTRA = "toolextra", Addon_TypesEnum2.PREVIEW = "preview", Addon_TypesEnum2.experimental_PAGE = "page", Addon_TypesEnum2.experimental_TEST_PROVIDER = "test-provider", Addon_TypesEnum2))(Addon_TypesEnum || {});
|
|
45845
45851
|
|
|
45852
|
+
// src/types/modules/frameworks.ts
|
|
45853
|
+
var SupportedFramework = /* @__PURE__ */ ((SupportedFramework2) => (SupportedFramework2.ANGULAR = "angular", SupportedFramework2.EMBER = "ember", SupportedFramework2.HTML_VITE = "html-vite", SupportedFramework2.NEXTJS = "nextjs", SupportedFramework2.NEXTJS_VITE = "nextjs-vite", SupportedFramework2.PREACT_VITE = "preact-vite", SupportedFramework2.REACT_NATIVE_WEB_VITE = "react-native-web-vite", SupportedFramework2.REACT_VITE = "react-vite", SupportedFramework2.REACT_WEBPACK5 = "react-webpack5", SupportedFramework2.SERVER_WEBPACK5 = "server-webpack5", SupportedFramework2.SVELTE_VITE = "svelte-vite", SupportedFramework2.SVELTEKIT = "sveltekit", SupportedFramework2.VUE3_VITE = "vue3-vite", SupportedFramework2.WEB_COMPONENTS_VITE = "web-components-vite", SupportedFramework2.HTML_RSBUILD = "html-rsbuild", SupportedFramework2.NUXT = "nuxt", SupportedFramework2.QWIK = "qwik", SupportedFramework2.REACT_RSBUILD = "react-rsbuild", SupportedFramework2.SOLID = "solid", SupportedFramework2.VUE3_RSBUILD = "vue3-rsbuild", SupportedFramework2.WEB_COMPONENTS_RSBUILD = "web-components-rsbuild", SupportedFramework2))(SupportedFramework || {});
|
|
45854
|
+
|
|
45855
|
+
// src/types/modules/renderers.ts
|
|
45856
|
+
var SupportedRenderer = /* @__PURE__ */ ((SupportedRenderer2) => (SupportedRenderer2.REACT = "react", SupportedRenderer2.REACT_NATIVE = "react-native", SupportedRenderer2.VUE3 = "vue3", SupportedRenderer2.ANGULAR = "angular", SupportedRenderer2.EMBER = "ember", SupportedRenderer2.PREACT = "preact", SupportedRenderer2.SVELTE = "svelte", SupportedRenderer2.QWIK = "qwik", SupportedRenderer2.HTML = "html", SupportedRenderer2.WEB_COMPONENTS = "web-components", SupportedRenderer2.SERVER = "server", SupportedRenderer2.SOLID = "solid", SupportedRenderer2.NUXT = "nuxt", SupportedRenderer2))(SupportedRenderer || {});
|
|
45857
|
+
|
|
45858
|
+
// src/types/modules/webpack.ts
|
|
45859
|
+
var CoreWebpackCompiler = /* @__PURE__ */ ((CoreWebpackCompiler2) => (CoreWebpackCompiler2.Babel = "babel", CoreWebpackCompiler2.SWC = "swc", CoreWebpackCompiler2))(CoreWebpackCompiler || {});
|
|
45860
|
+
|
|
45861
|
+
// src/types/modules/builders.ts
|
|
45862
|
+
var SupportedBuilder = /* @__PURE__ */ ((SupportedBuilder2) => (SupportedBuilder2.WEBPACK5 = "webpack5", SupportedBuilder2.VITE = "vite", SupportedBuilder2.RSBUILD = "rsbuild", SupportedBuilder2))(SupportedBuilder || {});
|
|
45863
|
+
|
|
45864
|
+
// src/types/modules/features.ts
|
|
45865
|
+
var Feature = /* @__PURE__ */ ((Feature2) => (Feature2.DOCS = "docs", Feature2.TEST = "test", Feature2.ONBOARDING = "onboarding", Feature2.A11Y = "a11y", Feature2))(Feature || {});
|
|
45866
|
+
|
|
45867
|
+
// src/types/modules/languages.ts
|
|
45868
|
+
var SupportedLanguage = /* @__PURE__ */ ((SupportedLanguage2) => (SupportedLanguage2.JAVASCRIPT = "javascript", SupportedLanguage2.TYPESCRIPT = "typescript", SupportedLanguage2))(SupportedLanguage || {});
|
|
45869
|
+
|
|
45846
45870
|
// src/manager-api/lib/addons.ts
|
|
45847
45871
|
init_dist();
|
|
45848
45872
|
|
|
@@ -46172,7 +46196,12 @@ var StorybookError = class _StorybookError extends Error {
|
|
|
46172
46196
|
this.data = {};
|
|
46173
46197
|
/** Flag used to easily determine if the error originates from Storybook. */
|
|
46174
46198
|
this.fromStorybook = !0;
|
|
46175
|
-
|
|
46199
|
+
/**
|
|
46200
|
+
* Flag used to determine if the error is handled by us and should therefore not be shown to the
|
|
46201
|
+
* user.
|
|
46202
|
+
*/
|
|
46203
|
+
this.isHandledError = !1;
|
|
46204
|
+
this.category = props.category, this.documentation = props.documentation ?? !1, this.code = props.code, this.isHandledError = props.isHandledError ?? !1, this.name = props.name;
|
|
46176
46205
|
}
|
|
46177
46206
|
get fullErrorCode() {
|
|
46178
46207
|
return parseErrorCode({ code: this.code, category: this.category });
|
|
@@ -66835,7 +66864,7 @@ init_dist();
|
|
|
66835
66864
|
var import_memoizerific8 = __toESM(require_memoizerific(), 1), import_semver = __toESM(require_semver2(), 1);
|
|
66836
66865
|
|
|
66837
66866
|
// src/manager-api/version.ts
|
|
66838
|
-
var version = "10.1.0-alpha.
|
|
66867
|
+
var version = "10.1.0-alpha.13";
|
|
66839
66868
|
|
|
66840
66869
|
// src/manager-api/modules/versions.ts
|
|
66841
66870
|
var { VERSIONCHECK } = scope, getVersionCheckData = (0, import_memoizerific8.default)(1)(() => {
|
package/dist/manager/runtime.js
CHANGED
|
@@ -4574,7 +4574,7 @@ var MINIMUM_CONTENT_WIDTH_PX = 100, layoutStateIsEqual = (state, other) => state
|
|
|
4574
4574
|
);
|
|
4575
4575
|
|
|
4576
4576
|
// global-externals:storybook/internal/types
|
|
4577
|
-
var types_default = __STORYBOOK_TYPES__, { Addon_TypesEnum } = __STORYBOOK_TYPES__;
|
|
4577
|
+
var types_default = __STORYBOOK_TYPES__, { Addon_TypesEnum, CoreWebpackCompiler, Feature, SupportedBuilder, SupportedFramework, SupportedLanguage, SupportedRenderer } = __STORYBOOK_TYPES__;
|
|
4578
4578
|
|
|
4579
4579
|
// src/core-events/index.ts
|
|
4580
4580
|
var events = /* @__PURE__ */ ((events2) => (events2.CHANNEL_WS_DISCONNECT = "channelWSDisconnect", events2.CHANNEL_CREATED = "channelCreated", events2.CONFIG_ERROR = "configError", events2.STORY_INDEX_INVALIDATED = "storyIndexInvalidated", events2.STORY_SPECIFIED = "storySpecified", events2.SET_CONFIG = "setConfig", events2.SET_STORIES = "setStories", events2.SET_INDEX = "setIndex", events2.SET_CURRENT_STORY = "setCurrentStory", events2.CURRENT_STORY_WAS_SET = "currentStoryWasSet", events2.FORCE_RE_RENDER = "forceReRender", events2.FORCE_REMOUNT = "forceRemount", events2.PRELOAD_ENTRIES = "preloadStories", events2.STORY_PREPARED = "storyPrepared", events2.DOCS_PREPARED = "docsPrepared", events2.STORY_CHANGED = "storyChanged", events2.STORY_UNCHANGED = "storyUnchanged", events2.STORY_RENDERED = "storyRendered", events2.STORY_FINISHED = "storyFinished", events2.STORY_MISSING = "storyMissing", events2.STORY_ERRORED = "storyErrored", events2.STORY_THREW_EXCEPTION = "storyThrewException", events2.STORY_RENDER_PHASE_CHANGED = "storyRenderPhaseChanged", events2.STORY_HOT_UPDATED = "storyHotUpdated", events2.PLAY_FUNCTION_THREW_EXCEPTION = "playFunctionThrewException", events2.UNHANDLED_ERRORS_WHILE_PLAYING = "unhandledErrorsWhilePlaying", events2.UPDATE_STORY_ARGS = "updateStoryArgs", events2.STORY_ARGS_UPDATED = "storyArgsUpdated", events2.RESET_STORY_ARGS = "resetStoryArgs", events2.SET_FILTER = "setFilter", events2.SET_GLOBALS = "setGlobals", events2.UPDATE_GLOBALS = "updateGlobals", events2.GLOBALS_UPDATED = "globalsUpdated", events2.REGISTER_SUBSCRIPTION = "registerSubscription", events2.PREVIEW_INITIALIZED = "previewInitialized", events2.PREVIEW_KEYDOWN = "previewKeydown", events2.PREVIEW_BUILDER_PROGRESS = "preview_builder_progress", events2.SELECT_STORY = "selectStory", events2.STORIES_COLLAPSE_ALL = "storiesCollapseAll", events2.STORIES_EXPAND_ALL = "storiesExpandAll", events2.DOCS_RENDERED = "docsRendered", events2.SHARED_STATE_CHANGED = "sharedStateChanged", events2.SHARED_STATE_SET = "sharedStateSet", events2.NAVIGATE_URL = "navigateUrl", events2.UPDATE_QUERY_PARAMS = "updateQueryParams", events2.REQUEST_WHATS_NEW_DATA = "requestWhatsNewData", events2.RESULT_WHATS_NEW_DATA = "resultWhatsNewData", events2.SET_WHATS_NEW_CACHE = "setWhatsNewCache", events2.TOGGLE_WHATS_NEW_NOTIFICATIONS = "toggleWhatsNewNotifications", events2.TELEMETRY_ERROR = "telemetryError", events2.FILE_COMPONENT_SEARCH_REQUEST = "fileComponentSearchRequest", events2.FILE_COMPONENT_SEARCH_RESPONSE = "fileComponentSearchResponse", events2.SAVE_STORY_REQUEST = "saveStoryRequest", events2.SAVE_STORY_RESPONSE = "saveStoryResponse", events2.ARGTYPES_INFO_REQUEST = "argtypesInfoRequest", events2.ARGTYPES_INFO_RESPONSE = "argtypesInfoResponse", events2.CREATE_NEW_STORYFILE_REQUEST = "createNewStoryfileRequest", events2.CREATE_NEW_STORYFILE_RESPONSE = "createNewStoryfileResponse", events2.OPEN_IN_EDITOR_REQUEST = "openInEditorRequest", events2.OPEN_IN_EDITOR_RESPONSE = "openInEditorResponse", events2))(events || {});
|
|
@@ -392,7 +392,7 @@ interface SubState$5 {
|
|
|
392
392
|
}
|
|
393
393
|
|
|
394
394
|
declare const controlOrMetaSymbol: () => "⌘" | "ctrl";
|
|
395
|
-
declare const controlOrMetaKey: () => "
|
|
395
|
+
declare const controlOrMetaKey: () => "control" | "meta";
|
|
396
396
|
declare const optionOrAltSymbol: () => "⌥" | "alt";
|
|
397
397
|
declare const isShortcutTaken: (arr1: string[], arr2: string[]) => boolean;
|
|
398
398
|
type KeyboardEventLike = Pick<KeyboardEvent, 'altKey' | 'ctrlKey' | 'metaKey' | 'shiftKey' | 'key' | 'code' | 'keyCode' | 'preventDefault'>;
|
|
@@ -5,13 +5,13 @@ import {
|
|
|
5
5
|
} from "../_browser-chunks/chunk-UD6FQLAF.js";
|
|
6
6
|
import {
|
|
7
7
|
StatusTypeIdMismatchError
|
|
8
|
-
} from "../_browser-chunks/chunk-
|
|
8
|
+
} from "../_browser-chunks/chunk-GFY5R5EY.js";
|
|
9
9
|
import {
|
|
10
10
|
StatusTypeIdMismatchError as StatusTypeIdMismatchError2
|
|
11
|
-
} from "../_browser-chunks/chunk-
|
|
11
|
+
} from "../_browser-chunks/chunk-2XZMBGTA.js";
|
|
12
12
|
import {
|
|
13
13
|
StorybookError
|
|
14
|
-
} from "../_browser-chunks/chunk-
|
|
14
|
+
} from "../_browser-chunks/chunk-FQ7SLVLR.js";
|
|
15
15
|
import {
|
|
16
16
|
countBy,
|
|
17
17
|
dequal,
|
|
@@ -2325,7 +2325,7 @@ import { global as global8 } from "@storybook/global";
|
|
|
2325
2325
|
import semver from "semver";
|
|
2326
2326
|
|
|
2327
2327
|
// src/manager-api/version.ts
|
|
2328
|
-
var version = "10.1.0-alpha.
|
|
2328
|
+
var version = "10.1.0-alpha.13";
|
|
2329
2329
|
|
|
2330
2330
|
// src/manager-api/modules/versions.ts
|
|
2331
2331
|
var { VERSIONCHECK } = global8, getVersionCheckData = (0, import_memoizerific2.default)(1)(() => {
|
package/dist/manager-errors.d.ts
CHANGED
|
@@ -561,6 +561,11 @@ declare abstract class StorybookError extends Error {
|
|
|
561
561
|
readonly documentation: boolean | string | string[];
|
|
562
562
|
/** Flag used to easily determine if the error originates from Storybook. */
|
|
563
563
|
readonly fromStorybook: true;
|
|
564
|
+
/**
|
|
565
|
+
* Flag used to determine if the error is handled by us and should therefore not be shown to the
|
|
566
|
+
* user.
|
|
567
|
+
*/
|
|
568
|
+
isHandledError: boolean;
|
|
564
569
|
get fullErrorCode(): `SB_${string}_${string}`;
|
|
565
570
|
/** Overrides the default `Error.name` property in the format: SB_<CATEGORY>_<CODE>. */
|
|
566
571
|
get name(): string;
|
|
@@ -570,6 +575,7 @@ declare abstract class StorybookError extends Error {
|
|
|
570
575
|
code: number;
|
|
571
576
|
message: string;
|
|
572
577
|
documentation?: boolean | string | string[];
|
|
578
|
+
isHandledError?: boolean;
|
|
573
579
|
name: string;
|
|
574
580
|
});
|
|
575
581
|
/** Generates the error message along with additional documentation link (if applicable). */
|
package/dist/manager-errors.js
CHANGED
|
@@ -3,8 +3,8 @@ import {
|
|
|
3
3
|
ProviderDoesNotExtendBaseProviderError,
|
|
4
4
|
StatusTypeIdMismatchError,
|
|
5
5
|
UncaughtManagerError
|
|
6
|
-
} from "./_browser-chunks/chunk-
|
|
7
|
-
import "./_browser-chunks/chunk-
|
|
6
|
+
} from "./_browser-chunks/chunk-GFY5R5EY.js";
|
|
7
|
+
import "./_browser-chunks/chunk-FQ7SLVLR.js";
|
|
8
8
|
import "./_browser-chunks/chunk-A242L54C.js";
|
|
9
9
|
export {
|
|
10
10
|
Category,
|