storybook 10.1.0-alpha.0 → 10.1.0-alpha.2
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-I74EUU5O.js → chunk-B3S3ROIP.js} +2 -1
- package/dist/_node-chunks/{builder-manager-OTO33TIA.js → builder-manager-XRIDLU42.js} +12 -12
- package/dist/_node-chunks/camelcase-3IIGGJ6N.js +18 -0
- package/dist/_node-chunks/{chunk-27W6KHQ2.js → chunk-2L3QAN3W.js} +7 -7
- package/dist/_node-chunks/{chunk-XI2VU32X.js → chunk-3AR5SJTX.js} +7 -7
- package/dist/_node-chunks/{chunk-SV7ZHC5Z.js → chunk-5RN3IJGF.js} +7 -7
- package/dist/_node-chunks/{chunk-LOF6SIRE.js → chunk-6TX2TV3E.js} +12 -12
- package/dist/_node-chunks/{chunk-FWW4IJCM.js → chunk-6WXUZSNC.js} +10 -10
- package/dist/_node-chunks/{chunk-O4KUWXD6.js → chunk-BAE27Z3H.js} +8 -8
- package/dist/_node-chunks/{chunk-3ICYWJ3N.js → chunk-BB3ZKTWJ.js} +7 -7
- package/dist/_node-chunks/{chunk-2WZNP46P.js → chunk-BYQZFXRF.js} +8 -8
- package/dist/_node-chunks/{chunk-FDDQACQD.js → chunk-D43KJFPO.js} +7 -7
- package/dist/_node-chunks/{chunk-L5WAZZY3.js → chunk-EKPHXLN6.js} +7 -7
- package/dist/_node-chunks/{chunk-A6T2YN75.js → chunk-FI6CLUVL.js} +15 -15
- package/dist/_node-chunks/{chunk-NTB3C5XQ.js → chunk-FWBIPR34.js} +7 -7
- package/dist/_node-chunks/{chunk-ZFRTME73.js → chunk-GWSFLQQQ.js} +22 -21
- package/dist/_node-chunks/{chunk-NTAOH664.js → chunk-HFHQNHRU.js} +9 -9
- package/dist/_node-chunks/{chunk-HYNQ2IX4.js → chunk-IK3K67LJ.js} +7 -7
- package/dist/_node-chunks/{chunk-RKANIOER.js → chunk-L5J4RBU5.js} +8 -8
- package/dist/_node-chunks/{chunk-HHTKRAIE.js → chunk-LJPS53G5.js} +25 -7
- package/dist/_node-chunks/chunk-N3ZE2FCS.js +61 -0
- package/dist/_node-chunks/{chunk-HIGKW2KB.js → chunk-OM4TBMP7.js} +7 -7
- package/dist/_node-chunks/{chunk-Q4CZSEBO.js → chunk-Q5JSLT56.js} +7 -7
- package/dist/_node-chunks/{chunk-6M2IPO4E.js → chunk-QFET4WIW.js} +6 -6
- package/dist/_node-chunks/{chunk-YS6OLN4N.js → chunk-QS5MMNF7.js} +7 -7
- package/dist/_node-chunks/{chunk-AITYHU22.js → chunk-RIPSSVT6.js} +7 -7
- package/dist/_node-chunks/{chunk-6C7OBGYG.js → chunk-RQKELEE4.js} +7 -7
- package/dist/_node-chunks/{chunk-VL6WDGIU.js → chunk-RUJOX3JR.js} +6 -6
- package/dist/_node-chunks/{chunk-RR6Q3657.js → chunk-S6RYOO4I.js} +9 -9
- package/dist/_node-chunks/chunk-U6VJQXTG.js +18 -0
- package/dist/_node-chunks/{chunk-Q6QFW2Y7.js → chunk-VEZ6C62C.js} +39 -24
- package/dist/_node-chunks/{chunk-EFJRT54D.js → chunk-WHOPLOGE.js} +7 -7
- package/dist/_node-chunks/{chunk-OYGAWJQE.js → chunk-XVXUF5GE.js} +7 -7
- package/dist/_node-chunks/{chunk-O3OJUFKU.js → chunk-ZI3WVJBS.js} +8 -8
- package/dist/_node-chunks/{chunk-QOI32MCO.js → chunk-ZN2EDLIJ.js} +7 -7
- package/dist/_node-chunks/{chunk-VW3GGAQI.js → chunk-ZTHTAFLY.js} +12 -12
- package/dist/_node-chunks/{dist-BA2GAJJB.js → dist-Q25SOSXX.js} +9 -9
- package/dist/_node-chunks/{globby-4HAI4KJH.js → globby-I54LIY47.js} +9 -9
- package/dist/_node-chunks/{lib-ITRY6RT7.js → lib-KQD2WJWJ.js} +7 -7
- package/dist/_node-chunks/{mdx-N42X6CFJ-7PULFTZI.js → mdx-N42X6CFJ-CT3A7SBK.js} +8 -8
- package/dist/_node-chunks/{p-limit-63FY4KTG.js → p-limit-2NBKFARM.js} +7 -7
- package/dist/_node-chunks/{plugin-JEBMTDIB.js → plugin-2CCCBGGB.js} +10 -10
- package/dist/_node-chunks/{plugin-2BSKCSMA.js → plugin-RF5FICSG.js} +10 -10
- package/dist/_node-chunks/{webpack-inject-mocker-runtime-plugin-AZ7YPMMD.js → webpack-inject-mocker-runtime-plugin-RY56E77L.js} +10 -10
- package/dist/_node-chunks/{webpack-mock-plugin-7IF6PA2O.js → webpack-mock-plugin-6VDFRSC4.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 +21 -21
- package/dist/common/index.d.ts +21 -2
- package/dist/common/index.js +22 -20
- package/dist/components/index.js +1 -1
- package/dist/core-server/index.js +150 -103
- package/dist/core-server/presets/common-manager.js +1 -1
- package/dist/core-server/presets/common-override-preset.js +9 -9
- package/dist/core-server/presets/common-preset.js +27 -27
- 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.d.ts +8 -4
- package/dist/csf-tools/index.js +9 -9
- package/dist/manager/globals-runtime.js +5 -4
- 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 +2 -2
- package/dist/server-errors.js +10 -10
- package/dist/telemetry/index.js +24 -24
- package/dist/test/index.js +2 -2
- package/dist/types/index.d.ts +45 -5
- package/package.json +1 -1
- package/dist/_node-chunks/camelcase-HURSU73A.js +0 -18
- package/dist/_node-chunks/chunk-P7ZABCRS.js +0 -18
- package/dist/_node-chunks/chunk-QWBT2XCX.js +0 -61
package/dist/common/index.d.ts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import * as storybook_internal_types from 'storybook/internal/types';
|
|
2
|
-
import {
|
|
2
|
+
import { CLIOptions, LoadOptions, BuilderOptions, StorybookConfigRaw, PresetConfig, CoreCommon_ResolvedAddonPreset, CoreCommon_ResolvedAddonVirtual, LoadedPreset, Presets, PackageJson, CoreCommon_AddonInfo, SupportedFrameworks, SupportedRenderers, Options as Options$1, CoreCommon_StorybookInfo, Ref, StorybookConfig, StoriesEntry, NormalizedStoriesSpecifier } from 'storybook/internal/types';
|
|
3
3
|
export { PackageJson } from 'storybook/internal/types';
|
|
4
4
|
import { WriteStream } from 'node:fs';
|
|
5
5
|
import { Buffer } from 'node:buffer';
|
|
6
6
|
import { ChildProcess } from 'node:child_process';
|
|
7
7
|
import { Readable, Writable, Stream } from 'node:stream';
|
|
8
|
+
import * as prettier from 'prettier';
|
|
8
9
|
import { ConfigFile } from 'storybook/internal/csf-tools';
|
|
9
10
|
|
|
10
11
|
declare const _default: {
|
|
@@ -1187,6 +1188,24 @@ declare function validateConfigurationFiles(configDir: string, cwd?: string): Pr
|
|
|
1187
1188
|
/** Mimicking the satisfies operator until we can upgrade to TS4.9 */
|
|
1188
1189
|
declare function satisfies<A>(): <T extends A>(x: T) => T;
|
|
1189
1190
|
|
|
1191
|
+
declare function getPrettier(): Promise<{
|
|
1192
|
+
resolveConfig: () => Promise<null>;
|
|
1193
|
+
format: (content: string) => string;
|
|
1194
|
+
} | {
|
|
1195
|
+
default: typeof prettier;
|
|
1196
|
+
format(source: string, options?: prettier.Options): Promise<string>;
|
|
1197
|
+
check(source: string, options?: prettier.Options): Promise<boolean>;
|
|
1198
|
+
formatWithCursor(source: string, options: prettier.CursorOptions): Promise<prettier.CursorResult>;
|
|
1199
|
+
resolveConfig(fileUrlOrPath: string | URL, options?: prettier.ResolveConfigOptions): Promise<prettier.Options | null>;
|
|
1200
|
+
resolveConfigFile(fileUrlOrPath?: string | URL): Promise<string | null>;
|
|
1201
|
+
clearConfigCache(): Promise<void>;
|
|
1202
|
+
getFileInfo(file: string | URL, options?: prettier.FileInfoOptions): Promise<prettier.FileInfoResult>;
|
|
1203
|
+
getSupportInfo(options?: prettier.SupportInfoOptions): Promise<prettier.SupportInfo>;
|
|
1204
|
+
doc: typeof prettier.doc;
|
|
1205
|
+
AstPath: typeof prettier.AstPath;
|
|
1206
|
+
version: string;
|
|
1207
|
+
util: typeof prettier.util;
|
|
1208
|
+
}>;
|
|
1190
1209
|
/**
|
|
1191
1210
|
* Format the content of a file using prettier. If prettier is not available in the user's project,
|
|
1192
1211
|
* it will fallback to use editorconfig settings if available and formats the file by a
|
|
@@ -1305,4 +1324,4 @@ declare const safeResolveModule: ({ specifier, parent, extensions, }: {
|
|
|
1305
1324
|
extensions?: string[];
|
|
1306
1325
|
}) => string | undefined;
|
|
1307
1326
|
|
|
1308
|
-
export { COMMON_ENV_VARS, DEFAULT_FILES_PATTERN, type FileOptions, FileSystemCache, HandledError, type InstallationMetadata, JsPackageManager, JsPackageManagerFactory, type PackageJsonInfo, type PackageJsonWithDepsAndDevDeps, type PackageJsonWithMaybeDeps, type PackageManagerName, type PackageMetadata, type RemoveAddonOptions, builderPackages, cache, checkAddonOrder, codeLog, commandLog, commonGlobOptions, createFileSystemCache, createLogStream, extractProperFrameworkName, extractProperRendererNameFromFramework, filterPresetsConfig, findConfigFile, findFilesUp, formatFileContent, frameworkPackages, frameworkToRenderer, getAddonNames, getAutoRefs, getBuilderOptions, getChars, getCoercedStorybookVersion, getConfigInfo, getDirectoryFromWorkingDir, getEnvConfig, getFrameworkName, getInterpretedFile, getPackageDetails, getPresets, getPreviewBodyTemplate, getPreviewHeadTemplate, getProjectRoot, getRefs, getRendererName, getStoryId, getStoryTitle, getStorybookConfiguration, getStorybookInfo, getSyncedStorybookAddons, globToRegexp, importMetaResolve, importModule, interpolate, invalidateProjectRootCache, isCI, isCorePackage, isPreservingSymlinks, isSatelliteAddon, loadAllPresets, loadEnvs, loadMainConfig, loadManagerOrAddonsFile, loadPreset, loadPreviewOrConfigFile, logConfig, nodePathsToArray, normalizeStories, normalizeStoriesEntry, normalizeStoryPath, optionalEnvToBoolean, paddedLog, parseList, posix, readTemplate, removeAddon, rendererPackages, resolveAddonName, resolvePackageDir, resolvePathInStorybookCache, safeResolveModule, satisfies, scanAndTransformFiles, serverRequire, stringifyEnvs, stringifyProcessEnvs, supportedExtensions, syncStorybookAddons, temporaryDirectory, temporaryFile, transformImportFiles, validateConfigurationFiles, validateFrameworkName, _default as versions };
|
|
1327
|
+
export { COMMON_ENV_VARS, DEFAULT_FILES_PATTERN, type FileOptions, FileSystemCache, HandledError, type InstallationMetadata, type InterPresetOptions, JsPackageManager, JsPackageManagerFactory, type PackageJsonInfo, type PackageJsonWithDepsAndDevDeps, type PackageJsonWithMaybeDeps, type PackageManagerName, type PackageMetadata, type RemoveAddonOptions, builderPackages, cache, checkAddonOrder, codeLog, commandLog, commonGlobOptions, createFileSystemCache, createLogStream, extractProperFrameworkName, extractProperRendererNameFromFramework, filterPresetsConfig, findConfigFile, findFilesUp, formatFileContent, frameworkPackages, frameworkToRenderer, getAddonNames, getAutoRefs, getBuilderOptions, getChars, getCoercedStorybookVersion, getConfigInfo, getDirectoryFromWorkingDir, getEnvConfig, getFrameworkName, getInterpretedFile, getPackageDetails, getPresets, getPrettier, getPreviewBodyTemplate, getPreviewHeadTemplate, getProjectRoot, getRefs, getRendererName, getStoryId, getStoryTitle, getStorybookConfiguration, getStorybookInfo, getSyncedStorybookAddons, globToRegexp, importMetaResolve, importModule, interpolate, invalidateProjectRootCache, isCI, isCorePackage, isPreservingSymlinks, isSatelliteAddon, loadAllPresets, loadEnvs, loadMainConfig, loadManagerOrAddonsFile, loadPreset, loadPreviewOrConfigFile, logConfig, nodePathsToArray, normalizeStories, normalizeStoriesEntry, normalizeStoryPath, optionalEnvToBoolean, paddedLog, parseList, posix, readTemplate, removeAddon, rendererPackages, resolveAddonName, resolvePackageDir, resolvePathInStorybookCache, safeResolveModule, satisfies, scanAndTransformFiles, serverRequire, stringifyEnvs, stringifyProcessEnvs, supportedExtensions, syncStorybookAddons, temporaryDirectory, temporaryFile, transformImportFiles, validateConfigurationFiles, validateFrameworkName, _default as versions };
|
package/dist/common/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_gimmxetvr7 from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_gimmxetvr7 from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_gimmxetvr7 from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_gimmxetvr7.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_gimmxetvr7.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_gimmxetvr7.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
@@ -43,6 +43,7 @@ import {
|
|
|
43
43
|
getInterpretedFile,
|
|
44
44
|
getPackageDetails,
|
|
45
45
|
getPresets,
|
|
46
|
+
getPrettier,
|
|
46
47
|
getPreviewBodyTemplate,
|
|
47
48
|
getPreviewHeadTemplate,
|
|
48
49
|
getRefs,
|
|
@@ -83,11 +84,11 @@ import {
|
|
|
83
84
|
transformImportFiles,
|
|
84
85
|
validateConfigurationFiles,
|
|
85
86
|
validateFrameworkName
|
|
86
|
-
} from "../_node-chunks/chunk-
|
|
87
|
-
import "../_node-chunks/chunk-
|
|
87
|
+
} from "../_node-chunks/chunk-GWSFLQQQ.js";
|
|
88
|
+
import "../_node-chunks/chunk-XVXUF5GE.js";
|
|
88
89
|
import {
|
|
89
90
|
versions_default
|
|
90
|
-
} from "../_node-chunks/chunk-
|
|
91
|
+
} from "../_node-chunks/chunk-N3ZE2FCS.js";
|
|
91
92
|
import {
|
|
92
93
|
findFilesUp,
|
|
93
94
|
getProjectRoot,
|
|
@@ -99,22 +100,22 @@ import {
|
|
|
99
100
|
optionalEnvToBoolean,
|
|
100
101
|
stringifyEnvs,
|
|
101
102
|
stringifyProcessEnvs
|
|
102
|
-
} from "../_node-chunks/chunk-
|
|
103
|
-
import "../_node-chunks/chunk-
|
|
104
|
-
import "../_node-chunks/chunk-
|
|
103
|
+
} from "../_node-chunks/chunk-S6RYOO4I.js";
|
|
104
|
+
import "../_node-chunks/chunk-3AR5SJTX.js";
|
|
105
|
+
import "../_node-chunks/chunk-D43KJFPO.js";
|
|
105
106
|
import {
|
|
106
107
|
importMetaResolve,
|
|
107
108
|
importModule,
|
|
108
109
|
resolvePackageDir,
|
|
109
110
|
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-
|
|
111
|
+
} from "../_node-chunks/chunk-ZI3WVJBS.js";
|
|
112
|
+
import "../_node-chunks/chunk-LJPS53G5.js";
|
|
113
|
+
import "../_node-chunks/chunk-BB3ZKTWJ.js";
|
|
114
|
+
import "../_node-chunks/chunk-Q5JSLT56.js";
|
|
115
|
+
import "../_node-chunks/chunk-EKPHXLN6.js";
|
|
116
|
+
import "../_node-chunks/chunk-IK3K67LJ.js";
|
|
117
|
+
import "../_node-chunks/chunk-2L3QAN3W.js";
|
|
118
|
+
import "../_node-chunks/chunk-RUJOX3JR.js";
|
|
118
119
|
export {
|
|
119
120
|
COMMON_ENV_VARS,
|
|
120
121
|
DEFAULT_FILES_PATTERN,
|
|
@@ -150,6 +151,7 @@ export {
|
|
|
150
151
|
getInterpretedFile,
|
|
151
152
|
getPackageDetails,
|
|
152
153
|
getPresets,
|
|
154
|
+
getPrettier,
|
|
153
155
|
getPreviewBodyTemplate,
|
|
154
156
|
getPreviewHeadTemplate,
|
|
155
157
|
getProjectRoot,
|