storybook 10.1.0-alpha.9 → 10.1.0-beta.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/Color-FTG7SQDA.js +1097 -0
- package/dist/_browser-chunks/WithTooltip-LMROHDUP.js +1651 -0
- package/dist/_browser-chunks/chunk-2FRVAXCZ.js +7 -0
- package/dist/_browser-chunks/{chunk-FDWKXLBI.js → chunk-2XZMBGTA.js} +44 -109
- package/dist/_browser-chunks/chunk-3IAH5M2U.js +171 -0
- package/dist/_browser-chunks/chunk-3OXGAGBE.js +779 -0
- package/dist/_browser-chunks/{chunk-TMDZCWME.js → chunk-3PJE6VLG.js} +1 -3
- package/dist/_browser-chunks/{chunk-VAMFPZY3.js → chunk-45UGUKRX.js} +2 -7
- package/dist/_browser-chunks/chunk-6XWLIJQL.js +11 -0
- package/dist/_browser-chunks/{chunk-MM7DTO55.js → chunk-A242L54C.js} +10 -16
- package/dist/_browser-chunks/chunk-AIOS4NGK.js +252 -0
- package/dist/_browser-chunks/chunk-AS2HQEYC.js +14 -0
- package/dist/_browser-chunks/chunk-AXG2BOBL.js +836 -0
- package/dist/_browser-chunks/{chunk-MH6AXFXB.js → chunk-CHUV5WSW.js} +0 -5
- package/dist/_browser-chunks/chunk-EUVGDK4H.js +93 -0
- package/dist/_browser-chunks/chunk-EZSQOHRI.js +18 -0
- package/dist/_browser-chunks/{chunk-CADGRH3P.js → chunk-FNXWN6IK.js} +3 -8
- package/dist/_browser-chunks/chunk-FQ7SLVLR.js +66 -0
- package/dist/_browser-chunks/chunk-GFLS4VP3.js +64 -0
- package/dist/_browser-chunks/chunk-GFY5R5EY.js +47 -0
- package/dist/_browser-chunks/{chunk-L2D73C6Z.js → chunk-H6XK3RSC.js} +13 -21
- package/dist/_browser-chunks/chunk-IPA5A322.js +71 -0
- package/dist/_browser-chunks/chunk-JP7NCOJX.js +37 -0
- package/dist/_browser-chunks/chunk-KJHJLCBK.js +11 -0
- package/dist/_browser-chunks/{chunk-OWPZQM2D.js → chunk-L4RMQ7D7.js} +60 -110
- package/dist/_browser-chunks/chunk-P4F4UVXX.js +951 -0
- package/dist/_browser-chunks/{chunk-AB7OOPUX.js → chunk-QKODTO7K.js} +0 -5
- package/dist/_browser-chunks/chunk-RP5RXKFU.js +2491 -0
- package/dist/_browser-chunks/chunk-SL75JR6Y.js +9 -0
- package/dist/_browser-chunks/chunk-SS2NHR7W.js +2969 -0
- package/dist/_browser-chunks/chunk-UD6FQLAF.js +1481 -0
- package/dist/_browser-chunks/chunk-VYJQ7RU5.js +2853 -0
- package/dist/_browser-chunks/chunk-WJYERY3R.js +136 -0
- package/dist/_browser-chunks/chunk-XJNX76GA.js +85 -0
- package/dist/_browser-chunks/{chunk-F4Q6SGTB.js → chunk-YKE5S47A.js} +177 -399
- package/dist/_browser-chunks/{chunk-SN4J4IQ3.js → chunk-ZUWEVLDX.js} +1 -7
- package/dist/_browser-chunks/{formatter-OMEEQ6HG.js → formatter-QJ4M4OGQ.js} +4 -9
- package/dist/_browser-chunks/{syntaxhighlighter-CAVLW7PM.js → syntaxhighlighter-IQDEPFLK.js} +704 -1848
- package/dist/_node-chunks/{builder-manager-SM3UWERX.js → builder-manager-BDAQHXFI.js} +510 -1019
- package/dist/_node-chunks/camelcase-3C7DZZPX.js +37 -0
- package/dist/_node-chunks/chunk-2IIQTGNE.js +6024 -0
- package/dist/_node-chunks/chunk-56U5LEMP.js +3043 -0
- package/dist/_node-chunks/chunk-7LIRCAQE.js +20 -0
- package/dist/_node-chunks/chunk-7RN6TXKP.js +603 -0
- package/dist/_node-chunks/chunk-7SJ7PZNL.js +4523 -0
- package/dist/_node-chunks/{chunk-HHSTA6QS.js → chunk-BG4RDXG7.js} +8 -10
- package/dist/_node-chunks/chunk-CBQKMXLQ.js +18 -0
- package/dist/_node-chunks/chunk-CN2IW2KQ.js +1564 -0
- package/dist/_node-chunks/chunk-CQMAU6UQ.js +943 -0
- package/dist/_node-chunks/{chunk-EBUEXRH5.js → chunk-D6ND3TVY.js} +116 -276
- package/dist/_node-chunks/chunk-DC355CYB.js +61 -0
- package/dist/_node-chunks/{chunk-SGM3ZCCT.js → chunk-EVK2SBW5.js} +292 -688
- package/dist/_node-chunks/chunk-IXWEUXJ2.js +119 -0
- package/dist/_node-chunks/{chunk-F6EFOEC7.js → chunk-KVRF22SH.js} +469 -983
- package/dist/_node-chunks/chunk-LEDP4QQW.js +919 -0
- package/dist/_node-chunks/{chunk-GHIBZRKD.js → chunk-MMVV6DGG.js} +8133 -8887
- package/dist/_node-chunks/chunk-O5CGEVRI.js +29 -0
- package/dist/_node-chunks/chunk-OZZO56XN.js +299 -0
- package/dist/_node-chunks/chunk-POT2EVGD.js +78 -0
- package/dist/_node-chunks/chunk-R5YGFSTV.js +3781 -0
- package/dist/_node-chunks/chunk-SQCTM2OS.js +23 -0
- package/dist/_node-chunks/chunk-UFOFO5H7.js +54 -0
- package/dist/_node-chunks/chunk-VBF7ALJF.js +72 -0
- package/dist/_node-chunks/chunk-W6MAMTUF.js +70 -0
- package/dist/_node-chunks/chunk-WURL4XOT.js +46662 -0
- package/dist/_node-chunks/chunk-XGK6MVKR.js +61 -0
- package/dist/_node-chunks/chunk-YV3GDSDT.js +765 -0
- package/dist/_node-chunks/{chunk-ATDHMMIZ.js → chunk-YWV55YW3.js} +15 -24
- package/dist/_node-chunks/dist-KEP4IFRN.js +121 -0
- package/dist/_node-chunks/globby-4WUBTDCN.js +3452 -0
- package/dist/_node-chunks/lib-JVOEKTYM.js +366 -0
- package/dist/_node-chunks/mdx-N42X6CFJ-C5WFYYXR.js +14329 -0
- package/dist/_node-chunks/p-limit-LDY632RS.js +116 -0
- package/dist/actions/decorator.js +21 -42
- package/dist/actions/index.js +3 -3
- package/dist/babel/index.d.ts +671 -335
- package/dist/babel/index.js +10 -11
- package/dist/bin/core.js +601 -1548
- package/dist/bin/dispatcher.js +36 -36
- package/dist/bin/loader.js +24 -38
- package/dist/channels/index.js +98 -234
- package/dist/cli/index.d.ts +1479 -133
- package/dist/cli/index.js +30 -8540
- package/dist/client-logger/index.js +31 -61
- package/dist/common/index.d.ts +139 -62
- package/dist/common/index.js +66 -51
- package/dist/components/index.d.ts +575 -273
- package/dist/components/index.js +14863 -4313
- package/dist/core-events/index.js +2 -66
- package/dist/core-server/index.d.ts +3 -2
- package/dist/core-server/index.js +2908 -8518
- package/dist/core-server/presets/common-manager.css +2 -2
- package/dist/core-server/presets/common-manager.js +2521 -5233
- package/dist/core-server/presets/common-override-preset.js +31 -60
- package/dist/core-server/presets/common-preset.js +663 -962
- package/dist/csf/index.js +534 -1179
- package/dist/csf-tools/index.js +9 -9
- package/dist/docs-tools/index.js +6 -6
- package/dist/highlight/index.js +2 -2
- package/dist/instrumenter/index.js +199 -415
- package/dist/manager/globals-runtime.js +59044 -67141
- package/dist/manager/globals.js +2 -3
- package/dist/manager/manager-stores.d.ts +1 -0
- package/dist/manager/manager-stores.js +23 -0
- package/dist/manager/runtime.js +11511 -10953
- package/dist/manager-api/index.d.ts +1811 -2
- package/dist/manager-api/index.js +1348 -2401
- package/dist/manager-errors.d.ts +9 -0
- package/dist/manager-errors.js +3 -3
- package/dist/mocking-utils/index.d.ts +1126 -0
- package/dist/mocking-utils/index.js +1181 -0
- package/dist/node-logger/index.d.ts +192 -24
- package/dist/node-logger/index.js +23 -4471
- package/dist/preview/globals.js +2 -3
- package/dist/preview/runtime.js +10799 -22393
- package/dist/preview-api/index.d.ts +68 -69
- package/dist/preview-api/index.js +13 -13
- package/dist/preview-errors.d.ts +9 -0
- package/dist/preview-errors.js +4 -4
- package/dist/router/index.js +347 -899
- package/dist/server-errors.d.ts +34 -1
- package/dist/server-errors.js +17 -10
- package/dist/telemetry/index.d.ts +24 -3
- package/dist/telemetry/index.js +25 -24
- package/dist/test/index.js +6131 -11916
- package/dist/theming/create.d.ts +1 -0
- package/dist/theming/create.js +4 -4
- package/dist/theming/index.d.ts +3366 -2599
- package/dist/theming/index.js +501 -1091
- package/dist/types/index.d.ts +72 -8
- package/dist/types/index.js +27 -12
- package/dist/viewport/index.js +3 -3
- package/package.json +26 -17
- package/dist/_browser-chunks/Color-7ZNS6F6B.js +0 -1676
- package/dist/_browser-chunks/WithTooltip-SK46ZJ2J.js +0 -13
- package/dist/_browser-chunks/chunk-6A7OIVEL.js +0 -66
- package/dist/_browser-chunks/chunk-B4A3ADP3.js +0 -3816
- package/dist/_browser-chunks/chunk-BOOOPFZF.js +0 -2335
- package/dist/_browser-chunks/chunk-FSBVR7H5.js +0 -106
- package/dist/_browser-chunks/chunk-FUOHXXZT.js +0 -23
- package/dist/_browser-chunks/chunk-GTKOCWCT.js +0 -17
- package/dist/_browser-chunks/chunk-HHW4FUMO.js +0 -12
- package/dist/_browser-chunks/chunk-JVSKG4YS.js +0 -4052
- package/dist/_browser-chunks/chunk-LASUB7TL.js +0 -76
- package/dist/_browser-chunks/chunk-LYCSRYYR.js +0 -101
- package/dist/_browser-chunks/chunk-NVV6MIOE.js +0 -243
- package/dist/_browser-chunks/chunk-OBXWFEPB.js +0 -852
- package/dist/_browser-chunks/chunk-OPCDBBL3.js +0 -48
- package/dist/_browser-chunks/chunk-PB6FZ3WE.js +0 -130
- package/dist/_browser-chunks/chunk-RNE2IUTB.js +0 -1300
- package/dist/_browser-chunks/chunk-RW5PKMWM.js +0 -4182
- package/dist/_browser-chunks/chunk-SYS437NN.js +0 -122
- package/dist/_browser-chunks/chunk-U46RQHA4.js +0 -12
- package/dist/_browser-chunks/chunk-UTNZYD2N.js +0 -311
- package/dist/_browser-chunks/chunk-VUAFL5XK.js +0 -20
- package/dist/_browser-chunks/chunk-XDGMHOV7.js +0 -2197
- package/dist/_browser-chunks/chunk-XW6KSYKF.js +0 -16
- package/dist/_browser-chunks/chunk-Y3M7TW6K.js +0 -1041
- package/dist/_browser-chunks/chunk-ZNRFDIVA.js +0 -233
- package/dist/_node-chunks/camelcase-H5QSGQLK.js +0 -18
- package/dist/_node-chunks/chunk-3THWHQOC.js +0 -61
- package/dist/_node-chunks/chunk-45YUOLTU.js +0 -69
- package/dist/_node-chunks/chunk-4QSNCPAU.js +0 -64656
- package/dist/_node-chunks/chunk-744PQSOU.js +0 -79
- package/dist/_node-chunks/chunk-74Z2U7QG.js +0 -1544
- package/dist/_node-chunks/chunk-7MB7TFPO.js +0 -1198
- package/dist/_node-chunks/chunk-A7GS4RFT.js +0 -697
- package/dist/_node-chunks/chunk-BIA3A5UM.js +0 -61
- package/dist/_node-chunks/chunk-C5G7CLWX.js +0 -1657
- package/dist/_node-chunks/chunk-DLFUKMYJ.js +0 -1531
- package/dist/_node-chunks/chunk-EMRGRXKT.js +0 -111
- package/dist/_node-chunks/chunk-EX46EHHY.js +0 -420
- package/dist/_node-chunks/chunk-F76QKNOJ.js +0 -304
- package/dist/_node-chunks/chunk-HDCRUTEF.js +0 -220
- package/dist/_node-chunks/chunk-HUYAOIPH.js +0 -90
- package/dist/_node-chunks/chunk-IBJZQZJC.js +0 -101
- package/dist/_node-chunks/chunk-KZN2RDDT.js +0 -6712
- package/dist/_node-chunks/chunk-LYUNFU3F.js +0 -4741
- package/dist/_node-chunks/chunk-N44SIS6K.js +0 -28
- package/dist/_node-chunks/chunk-NILZM6KR.js +0 -18
- package/dist/_node-chunks/chunk-PC4ZRP6W.js +0 -34
- package/dist/_node-chunks/chunk-TJNGOQUH.js +0 -4272
- package/dist/_node-chunks/chunk-UBSYLHIL.js +0 -1250
- package/dist/_node-chunks/chunk-UTCLXPOC.js +0 -1518
- package/dist/_node-chunks/chunk-WOXXODXP.js +0 -5029
- package/dist/_node-chunks/chunk-XC4MEUA6.js +0 -1586
- package/dist/_node-chunks/chunk-YRXXMKRR.js +0 -2256
- package/dist/_node-chunks/dist-SL73W244.js +0 -175
- package/dist/_node-chunks/globby-ZSHAUQZ5.js +0 -5222
- package/dist/_node-chunks/lib-U2VIPUTI.js +0 -518
- package/dist/_node-chunks/mdx-N42X6CFJ-ZLHD33JK.js +0 -22017
- package/dist/_node-chunks/p-limit-K5BS5MSV.js +0 -168
- package/dist/_node-chunks/plugin-5PD4YIUH.js +0 -129
- package/dist/_node-chunks/plugin-MONDT2WL.js +0 -159
- package/dist/_node-chunks/webpack-inject-mocker-runtime-plugin-EUZJRG3W.js +0 -69102
- package/dist/_node-chunks/webpack-mock-plugin-T4LDXEHE.js +0 -124
- package/dist/core-server/presets/webpack/loaders/storybook-mock-transform-loader.js +0 -36
- package/dist/core-server/presets/webpack/loaders/webpack-automock-loader.js +0 -33
package/dist/server-errors.d.ts
CHANGED
|
@@ -540,6 +540,7 @@ interface Status {
|
|
|
540
540
|
}
|
|
541
541
|
|
|
542
542
|
declare abstract class StorybookError extends Error {
|
|
543
|
+
private _name;
|
|
543
544
|
/** Category of the error. Used to classify the type of error, e.g., 'PREVIEW_API'. */
|
|
544
545
|
readonly category: string;
|
|
545
546
|
/** Code representing the error. Used to uniquely identify the error, e.g., 1. */
|
|
@@ -560,14 +561,22 @@ declare abstract class StorybookError extends Error {
|
|
|
560
561
|
readonly documentation: boolean | string | string[];
|
|
561
562
|
/** Flag used to easily determine if the error originates from Storybook. */
|
|
562
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;
|
|
563
569
|
get fullErrorCode(): `SB_${string}_${string}`;
|
|
564
570
|
/** Overrides the default `Error.name` property in the format: SB_<CATEGORY>_<CODE>. */
|
|
565
571
|
get name(): string;
|
|
572
|
+
set name(name: string);
|
|
566
573
|
constructor(props: {
|
|
567
574
|
category: string;
|
|
568
575
|
code: number;
|
|
569
576
|
message: string;
|
|
570
577
|
documentation?: boolean | string | string[];
|
|
578
|
+
isHandledError?: boolean;
|
|
579
|
+
name: string;
|
|
571
580
|
});
|
|
572
581
|
/** Generates the error message along with additional documentation link (if applicable). */
|
|
573
582
|
static getFullMessage({ documentation, code, category, message, }: ConstructorParameters<typeof StorybookError>[0]): string;
|
|
@@ -770,6 +779,22 @@ declare class GenerateNewProjectOnInitError extends StorybookError {
|
|
|
770
779
|
projectType: string;
|
|
771
780
|
});
|
|
772
781
|
}
|
|
782
|
+
declare class AddonVitestPostinstallPrerequisiteCheckError extends StorybookError {
|
|
783
|
+
data: {
|
|
784
|
+
reasons: string[];
|
|
785
|
+
};
|
|
786
|
+
constructor(data: {
|
|
787
|
+
reasons: string[];
|
|
788
|
+
});
|
|
789
|
+
}
|
|
790
|
+
declare class AddonVitestPostinstallError extends StorybookError {
|
|
791
|
+
data: {
|
|
792
|
+
errors: string[];
|
|
793
|
+
};
|
|
794
|
+
constructor(data: {
|
|
795
|
+
errors: string[];
|
|
796
|
+
});
|
|
797
|
+
}
|
|
773
798
|
declare class UpgradeStorybookToLowerVersionError extends StorybookError {
|
|
774
799
|
data: {
|
|
775
800
|
beforeVersion: string;
|
|
@@ -819,5 +844,13 @@ declare class SavingGlobalSettingsFileError extends StorybookError {
|
|
|
819
844
|
declare class CommonJsConfigNotSupportedError extends StorybookError {
|
|
820
845
|
constructor();
|
|
821
846
|
}
|
|
847
|
+
declare class AutomigrateError extends StorybookError {
|
|
848
|
+
data: {
|
|
849
|
+
errors: Array<Error | unknown>;
|
|
850
|
+
};
|
|
851
|
+
constructor(data: {
|
|
852
|
+
errors: Array<Error | unknown>;
|
|
853
|
+
});
|
|
854
|
+
}
|
|
822
855
|
|
|
823
|
-
export { AngularLegacyBuildOptionsError, Category, CommonJsConfigNotSupportedError, ConflictingStaticDirConfigError, CouldNotEvaluateFrameworkError, CriticalPresetLoadError, FindPackageVersionsError, GenerateNewProjectOnInitError, GoogleFontsDownloadError, GoogleFontsLoadingError, IncompatiblePostCssConfigError, InvalidFrameworkNameError, InvalidStoriesEntryError, MainFileEvaluationError, MainFileMissingError, MissingAngularJsonError, MissingBuilderError, MissingFrameworkFieldError, NoMatchingExportError, NoStatsForViteDevError, NxProjectDetectedError, SavingGlobalSettingsFileError, StatusTypeIdMismatchError, SvelteViteWithSvelteKitError, UpgradeStorybookToLowerVersionError, UpgradeStorybookUnknownCurrentVersionError, WebpackCompilationError, WebpackInvocationError, WebpackMissingStatsError };
|
|
856
|
+
export { AddonVitestPostinstallError, AddonVitestPostinstallPrerequisiteCheckError, AngularLegacyBuildOptionsError, AutomigrateError, Category, CommonJsConfigNotSupportedError, ConflictingStaticDirConfigError, CouldNotEvaluateFrameworkError, CriticalPresetLoadError, FindPackageVersionsError, GenerateNewProjectOnInitError, GoogleFontsDownloadError, GoogleFontsLoadingError, IncompatiblePostCssConfigError, InvalidFrameworkNameError, InvalidStoriesEntryError, MainFileEvaluationError, MainFileMissingError, MissingAngularJsonError, MissingBuilderError, MissingFrameworkFieldError, NoMatchingExportError, NoStatsForViteDevError, NxProjectDetectedError, SavingGlobalSettingsFileError, StatusTypeIdMismatchError, SvelteViteWithSvelteKitError, UpgradeStorybookToLowerVersionError, UpgradeStorybookUnknownCurrentVersionError, WebpackCompilationError, WebpackInvocationError, WebpackMissingStatsError };
|
package/dist/server-errors.js
CHANGED
|
@@ -1,16 +1,19 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_hjmvusgt1gv from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_hjmvusgt1gv from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_hjmvusgt1gv from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_hjmvusgt1gv.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_hjmvusgt1gv.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_hjmvusgt1gv.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
|
+
AddonVitestPostinstallError,
|
|
14
|
+
AddonVitestPostinstallPrerequisiteCheckError,
|
|
13
15
|
AngularLegacyBuildOptionsError,
|
|
16
|
+
AutomigrateError,
|
|
14
17
|
Category,
|
|
15
18
|
CommonJsConfigNotSupportedError,
|
|
16
19
|
ConflictingStaticDirConfigError,
|
|
@@ -39,12 +42,16 @@ import {
|
|
|
39
42
|
WebpackCompilationError,
|
|
40
43
|
WebpackInvocationError,
|
|
41
44
|
WebpackMissingStatsError
|
|
42
|
-
} from "./_node-chunks/chunk-
|
|
43
|
-
import "./_node-chunks/chunk-
|
|
44
|
-
import "./_node-chunks/chunk-
|
|
45
|
-
import "./_node-chunks/chunk-
|
|
45
|
+
} from "./_node-chunks/chunk-D6ND3TVY.js";
|
|
46
|
+
import "./_node-chunks/chunk-POT2EVGD.js";
|
|
47
|
+
import "./_node-chunks/chunk-XGK6MVKR.js";
|
|
48
|
+
import "./_node-chunks/chunk-YWV55YW3.js";
|
|
49
|
+
import "./_node-chunks/chunk-UFOFO5H7.js";
|
|
46
50
|
export {
|
|
51
|
+
AddonVitestPostinstallError,
|
|
52
|
+
AddonVitestPostinstallPrerequisiteCheckError,
|
|
47
53
|
AngularLegacyBuildOptionsError,
|
|
54
|
+
AutomigrateError,
|
|
48
55
|
Category,
|
|
49
56
|
CommonJsConfigNotSupportedError,
|
|
50
57
|
ConflictingStaticDirConfigError,
|
|
@@ -32,7 +32,7 @@ declare const monorepoConfigs: {
|
|
|
32
32
|
};
|
|
33
33
|
type MonorepoType = keyof typeof monorepoConfigs | 'Workspaces' | undefined;
|
|
34
34
|
|
|
35
|
-
type EventType = 'boot' | 'dev' | 'build' | 'index' | 'upgrade' | 'multi-upgrade' | 'init' | 'init-step' | 'scaffolded-empty' | 'browser' | 'canceled' | 'error' | 'error-metadata' | 'version-update' | 'core-config' | 'remove' | 'save-story' | 'create-new-story-file' | 'create-new-story-file-search' | 'open-in-editor' | 'testing-module-watch-mode' | 'testing-module-completed-report' | 'testing-module-crash-report' | 'addon-test' | 'test-run' | 'addon-onboarding' | 'onboarding-survey' | 'mocking' | 'preview-first-load';
|
|
35
|
+
type EventType = 'boot' | 'add' | 'dev' | 'build' | 'index' | 'upgrade' | 'multi-upgrade' | 'init' | 'init-step' | 'scaffolded-empty' | 'browser' | 'canceled' | 'error' | 'error-metadata' | 'version-update' | 'core-config' | 'remove' | 'save-story' | 'create-new-story-file' | 'create-new-story-file-search' | 'open-in-editor' | 'testing-module-watch-mode' | 'testing-module-completed-report' | 'testing-module-crash-report' | 'addon-test' | 'test-run' | 'addon-onboarding' | 'onboarding-survey' | 'onboarding-checklist' | 'mocking' | 'automigrate' | 'migrate' | 'preview-first-load' | 'doctor';
|
|
36
36
|
interface Dependency {
|
|
37
37
|
version: string | undefined;
|
|
38
38
|
versionSpecifier?: string;
|
|
@@ -47,7 +47,7 @@ type StorybookMetadata = {
|
|
|
47
47
|
userSince?: number;
|
|
48
48
|
language: 'typescript' | 'javascript';
|
|
49
49
|
framework?: {
|
|
50
|
-
name
|
|
50
|
+
name?: string;
|
|
51
51
|
options?: any;
|
|
52
52
|
};
|
|
53
53
|
builder?: string;
|
|
@@ -139,6 +139,27 @@ declare function removeAnsiEscapeCodes(input?: string): string;
|
|
|
139
139
|
declare function cleanPaths(str: string, separator?: string): string;
|
|
140
140
|
declare function sanitizeError(error: Error, pathSeparator?: string): any;
|
|
141
141
|
|
|
142
|
+
/**
|
|
143
|
+
* Service for collecting errors during Storybook initialization.
|
|
144
|
+
*
|
|
145
|
+
* This singleton class exists to accumulate non-fatal errors that occur during the Storybook's
|
|
146
|
+
* processes. Instead of immediately reporting errors to telemetry (which could interrupt the
|
|
147
|
+
* process), errors are collected here and then batch-reported at the end of initialization via the
|
|
148
|
+
* telemetry system.
|
|
149
|
+
*
|
|
150
|
+
* This allows Storybook to continue e.g. initialization even when non-critical errors occur,
|
|
151
|
+
* ensuring a better user experience while still capturing all errors for telemetry and debugging
|
|
152
|
+
* purposes.
|
|
153
|
+
*/
|
|
154
|
+
declare class ErrorCollector {
|
|
155
|
+
private static instance;
|
|
156
|
+
private errors;
|
|
157
|
+
private constructor();
|
|
158
|
+
static getInstance(): ErrorCollector;
|
|
159
|
+
static addError(error: unknown): void;
|
|
160
|
+
static getErrors(): unknown[];
|
|
161
|
+
}
|
|
162
|
+
|
|
142
163
|
interface UpgradeSummary {
|
|
143
164
|
timestamp: number;
|
|
144
165
|
eventType?: EventType;
|
|
@@ -153,4 +174,4 @@ declare const addToGlobalContext: (key: string, value: any) => void;
|
|
|
153
174
|
declare const isExampleStoryId: (storyId: string) => boolean;
|
|
154
175
|
declare const telemetry: (eventType: EventType, payload?: Payload, options?: Partial<Options>) => Promise<void>;
|
|
155
176
|
|
|
156
|
-
export { type Context, type Dependency, type EventType, type IErrorWithStdErrAndStdOut, type InitPayload, type Options, type Payload, type StorybookAddon, type StorybookMetadata, type TelemetryData, type TelemetryEvent, addToGlobalContext, cleanPaths, computeStorybookMetadata, getPrecedingUpgrade, getStorybookMetadata, isExampleStoryId, metaFrameworks, oneWayHash, removeAnsiEscapeCodes, sanitizeAddonName, sanitizeError, telemetry };
|
|
177
|
+
export { type Context, type Dependency, ErrorCollector, type EventType, type IErrorWithStdErrAndStdOut, type InitPayload, type Options, type Payload, type StorybookAddon, type StorybookMetadata, type TelemetryData, type TelemetryEvent, addToGlobalContext, cleanPaths, computeStorybookMetadata, getPrecedingUpgrade, getStorybookMetadata, isExampleStoryId, metaFrameworks, oneWayHash, removeAnsiEscapeCodes, sanitizeAddonName, sanitizeError, telemetry };
|
package/dist/telemetry/index.js
CHANGED
|
@@ -1,15 +1,16 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_hjmvusgt1gv from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_hjmvusgt1gv from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_hjmvusgt1gv from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_hjmvusgt1gv.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_hjmvusgt1gv.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_hjmvusgt1gv.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
|
+
ErrorCollector,
|
|
13
14
|
addToGlobalContext,
|
|
14
15
|
cleanPaths,
|
|
15
16
|
computeStorybookMetadata,
|
|
@@ -21,27 +22,27 @@ import {
|
|
|
21
22
|
sanitizeAddonName,
|
|
22
23
|
sanitizeError,
|
|
23
24
|
telemetry
|
|
24
|
-
} from "../_node-chunks/chunk-
|
|
25
|
-
import "../_node-chunks/chunk-
|
|
26
|
-
import "../_node-chunks/chunk-
|
|
27
|
-
import "../_node-chunks/chunk-
|
|
28
|
-
import "../_node-chunks/chunk-
|
|
29
|
-
import "../_node-chunks/chunk-
|
|
30
|
-
import "../_node-chunks/chunk-LYUNFU3F.js";
|
|
31
|
-
import "../_node-chunks/chunk-744PQSOU.js";
|
|
25
|
+
} from "../_node-chunks/chunk-LEDP4QQW.js";
|
|
26
|
+
import "../_node-chunks/chunk-CBQKMXLQ.js";
|
|
27
|
+
import "../_node-chunks/chunk-MMVV6DGG.js";
|
|
28
|
+
import "../_node-chunks/chunk-DC355CYB.js";
|
|
29
|
+
import "../_node-chunks/chunk-CQMAU6UQ.js";
|
|
30
|
+
import "../_node-chunks/chunk-R5YGFSTV.js";
|
|
32
31
|
import {
|
|
33
32
|
getPrecedingUpgrade
|
|
34
|
-
} from "../_node-chunks/chunk-
|
|
35
|
-
import "../_node-chunks/chunk-
|
|
36
|
-
import "../_node-chunks/chunk-
|
|
37
|
-
import "../_node-chunks/chunk-
|
|
38
|
-
import "../_node-chunks/chunk-
|
|
39
|
-
import "../_node-chunks/chunk-
|
|
40
|
-
import "../_node-chunks/chunk-
|
|
41
|
-
import "../_node-chunks/chunk-
|
|
42
|
-
import "../_node-chunks/chunk-
|
|
43
|
-
import "../_node-chunks/chunk-
|
|
33
|
+
} from "../_node-chunks/chunk-VBF7ALJF.js";
|
|
34
|
+
import "../_node-chunks/chunk-56U5LEMP.js";
|
|
35
|
+
import "../_node-chunks/chunk-W6MAMTUF.js";
|
|
36
|
+
import "../_node-chunks/chunk-YV3GDSDT.js";
|
|
37
|
+
import "../_node-chunks/chunk-O5CGEVRI.js";
|
|
38
|
+
import "../_node-chunks/chunk-IXWEUXJ2.js";
|
|
39
|
+
import "../_node-chunks/chunk-7SJ7PZNL.js";
|
|
40
|
+
import "../_node-chunks/chunk-7LIRCAQE.js";
|
|
41
|
+
import "../_node-chunks/chunk-XGK6MVKR.js";
|
|
42
|
+
import "../_node-chunks/chunk-YWV55YW3.js";
|
|
43
|
+
import "../_node-chunks/chunk-UFOFO5H7.js";
|
|
44
44
|
export {
|
|
45
|
+
ErrorCollector,
|
|
45
46
|
addToGlobalContext,
|
|
46
47
|
cleanPaths,
|
|
47
48
|
computeStorybookMetadata,
|