@storybook/react-webpack5 7.0.0-alpha.50 → 7.0.0-alpha.52
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/index.d.ts
CHANGED
package/dist/preset.d.ts
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
import { FileSystemCache } from 'file-system-cache';
|
2
2
|
import { TransformOptions } from '@babel/core';
|
3
3
|
import { Server } from 'http';
|
4
|
-
import { S as StorybookConfig$1 } from './types-
|
4
|
+
import { S as StorybookConfig$1 } from './types-8ecfde1d.js';
|
5
5
|
import '@storybook/preset-react-webpack';
|
6
6
|
import '@storybook/builder-webpack5';
|
7
7
|
|
@@ -740,8 +740,8 @@ interface Options$1 {
|
|
740
740
|
/**
|
741
741
|
* ⚠️ This file contains internal WIP types they MUST NOT be exported outside this package for now!
|
742
742
|
*/
|
743
|
-
|
744
|
-
|
743
|
+
type BuilderName = 'webpack5' | '@storybook/builder-webpack5' | string;
|
744
|
+
type RendererName = string;
|
745
745
|
interface CoreConfig {
|
746
746
|
builder?: BuilderName | {
|
747
747
|
name: BuilderName;
|
@@ -805,7 +805,7 @@ interface ReleaseNotesData {
|
|
805
805
|
currentVersion: string;
|
806
806
|
showOnFirstLaunch: boolean;
|
807
807
|
}
|
808
|
-
|
808
|
+
type PackageJson = PackageJson$1 & Record<string, any>;
|
809
809
|
interface LoadOptions {
|
810
810
|
packageJson: PackageJson;
|
811
811
|
outputDir?: string;
|
@@ -862,7 +862,7 @@ interface StorybookConfigOptions {
|
|
862
862
|
presets: Presets;
|
863
863
|
presetsList?: LoadedPreset[];
|
864
864
|
}
|
865
|
-
|
865
|
+
type Options = LoadOptions & StorybookConfigOptions & CLIOptions & BuilderOptions;
|
866
866
|
interface CoreCommon_IndexerOptions {
|
867
867
|
makeTitle: (userTitle?: string) => string;
|
868
868
|
}
|
@@ -916,8 +916,8 @@ interface CoreCommon_StoriesSpecifier {
|
|
916
916
|
*/
|
917
917
|
files?: string;
|
918
918
|
}
|
919
|
-
|
920
|
-
|
919
|
+
type CoreCommon_StoriesEntry = string | CoreCommon_StoriesSpecifier;
|
920
|
+
type Preset = string | {
|
921
921
|
name: string;
|
922
922
|
options?: any;
|
923
923
|
};
|
@@ -925,14 +925,14 @@ declare type Preset = string | {
|
|
925
925
|
* An additional script that gets injected into the
|
926
926
|
* preview or the manager,
|
927
927
|
*/
|
928
|
-
|
929
|
-
|
928
|
+
type Entry = string;
|
929
|
+
type CoreCommon_StorybookRefs = Record<string, {
|
930
930
|
title: string;
|
931
931
|
url: string;
|
932
932
|
} | {
|
933
933
|
disable: boolean;
|
934
934
|
}>;
|
935
|
-
|
935
|
+
type DocsOptions = {
|
936
936
|
/**
|
937
937
|
* Should we generate docs entries at all under any circumstances? (i.e. can they be rendered)
|
938
938
|
*/
|
@@ -1062,8 +1062,8 @@ interface StorybookConfig {
|
|
1062
1062
|
previewHead?: (head: string, options: Options) => string;
|
1063
1063
|
previewBody?: (body: string, options: Options) => string;
|
1064
1064
|
}
|
1065
|
-
|
1066
|
-
|
1065
|
+
type PresetProperty<K, TStorybookConfig = StorybookConfig> = TStorybookConfig[K extends keyof TStorybookConfig ? K : never] | PresetPropertyFn<K, TStorybookConfig>;
|
1066
|
+
type PresetPropertyFn<K, TStorybookConfig = StorybookConfig, TOptions = {}> = (config: TStorybookConfig[K extends keyof TStorybookConfig ? K : never], options: Options & TOptions) => TStorybookConfig[K extends keyof TStorybookConfig ? K : never] | Promise<TStorybookConfig[K extends keyof TStorybookConfig ? K : never]>;
|
1067
1067
|
|
1068
1068
|
declare const addons: PresetProperty<'addons', StorybookConfig$1>;
|
1069
1069
|
declare const frameworkOptions: (_: never, options: Options) => Promise<StorybookConfig$1['framework']>;
|
@@ -1,12 +1,12 @@
|
|
1
1
|
import { ReactOptions, StorybookConfig as StorybookConfig$1, TypescriptOptions as TypescriptOptions$1 } from '@storybook/preset-react-webpack';
|
2
2
|
import { BuilderOptions, StorybookConfigWebpack, TypescriptOptions } from '@storybook/builder-webpack5';
|
3
3
|
|
4
|
-
|
5
|
-
|
6
|
-
|
4
|
+
type FrameworkName = '@storybook/react-webpack5';
|
5
|
+
type BuilderName = '@storybook/builder-webpack5';
|
6
|
+
type FrameworkOptions = ReactOptions & {
|
7
7
|
builder?: BuilderOptions;
|
8
8
|
};
|
9
|
-
|
9
|
+
type StorybookConfigFramework = {
|
10
10
|
framework: FrameworkName | {
|
11
11
|
name: FrameworkName;
|
12
12
|
options: FrameworkOptions;
|
@@ -22,6 +22,6 @@ declare type StorybookConfigFramework = {
|
|
22
22
|
/**
|
23
23
|
* The interface for Storybook configuration in `main.ts` files.
|
24
24
|
*/
|
25
|
-
|
25
|
+
type StorybookConfig = Omit<StorybookConfig$1, keyof StorybookConfigWebpack | keyof StorybookConfigFramework> & StorybookConfigWebpack & StorybookConfigFramework;
|
26
26
|
|
27
27
|
export { FrameworkOptions as F, StorybookConfig as S };
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@storybook/react-webpack5",
|
3
|
-
"version": "7.0.0-alpha.
|
3
|
+
"version": "7.0.0-alpha.52",
|
4
4
|
"description": "Storybook for React: Develop React Component in isolation with Hot Reloading.",
|
5
5
|
"keywords": [
|
6
6
|
"storybook"
|
@@ -51,14 +51,14 @@
|
|
51
51
|
"prep": "../../../scripts/prepare/bundle.ts"
|
52
52
|
},
|
53
53
|
"dependencies": {
|
54
|
-
"@storybook/builder-webpack5": "7.0.0-alpha.
|
55
|
-
"@storybook/preset-react-webpack": "7.0.0-alpha.
|
56
|
-
"@storybook/react": "7.0.0-alpha.
|
57
|
-
"@types/node": "^16.0.0"
|
54
|
+
"@storybook/builder-webpack5": "7.0.0-alpha.52",
|
55
|
+
"@storybook/preset-react-webpack": "7.0.0-alpha.52",
|
56
|
+
"@storybook/react": "7.0.0-alpha.52",
|
57
|
+
"@types/node": "^16.0.0 || ^18.0.0"
|
58
58
|
},
|
59
59
|
"devDependencies": {
|
60
60
|
"jest-specific-snapshot": "^6.0.0",
|
61
|
-
"typescript": "
|
61
|
+
"typescript": "^4.9.3"
|
62
62
|
},
|
63
63
|
"peerDependencies": {
|
64
64
|
"@babel/core": "^7.11.5",
|
@@ -86,5 +86,5 @@
|
|
86
86
|
],
|
87
87
|
"platform": "node"
|
88
88
|
},
|
89
|
-
"gitHead": "
|
89
|
+
"gitHead": "d2494e3f51ce0f55bcb1ef693a6477c669fbe666"
|
90
90
|
}
|