@storybook/react-webpack5 7.4.0-alpha.0 → 7.4.0-alpha.1
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/preset.d.ts +14 -13
- package/package.json +6 -6
- package/src/typings.d.ts +0 -44
package/dist/preset.d.ts
CHANGED
@@ -729,6 +729,19 @@ interface Parameters {
|
|
729
729
|
[name: string]: any;
|
730
730
|
}
|
731
731
|
|
732
|
+
interface Options$1 {
|
733
|
+
allowRegExp: boolean;
|
734
|
+
allowFunction: boolean;
|
735
|
+
allowSymbol: boolean;
|
736
|
+
allowDate: boolean;
|
737
|
+
allowUndefined: boolean;
|
738
|
+
allowClass: boolean;
|
739
|
+
allowError: boolean;
|
740
|
+
maxDepth: number;
|
741
|
+
space: number | undefined;
|
742
|
+
lazyEval: boolean;
|
743
|
+
}
|
744
|
+
|
732
745
|
type ExportName = string;
|
733
746
|
type MetaId = string;
|
734
747
|
interface StoriesSpecifier {
|
@@ -841,19 +854,6 @@ type DocsIndexInput = BaseIndexInput & {
|
|
841
854
|
storiesImports?: Path[];
|
842
855
|
};
|
843
856
|
type IndexInput = StoryIndexInput | DocsIndexInput;
|
844
|
-
type Path = string;
|
845
|
-
|
846
|
-
interface Options$1 {
|
847
|
-
allowRegExp: boolean;
|
848
|
-
allowFunction: boolean;
|
849
|
-
allowSymbol: boolean;
|
850
|
-
allowDate: boolean;
|
851
|
-
allowUndefined: boolean;
|
852
|
-
allowClass: boolean;
|
853
|
-
maxDepth: number;
|
854
|
-
space: number | undefined;
|
855
|
-
lazyEval: boolean;
|
856
|
-
}
|
857
857
|
|
858
858
|
/**
|
859
859
|
* ⚠️ This file contains internal WIP types they MUST NOT be exported outside this package for now!
|
@@ -1153,6 +1153,7 @@ interface StorybookConfig {
|
|
1153
1153
|
type PresetValue<T> = T | ((config: T, options: Options) => T | Promise<T>);
|
1154
1154
|
type PresetProperty<K, TStorybookConfig = StorybookConfig> = TStorybookConfig[K extends keyof TStorybookConfig ? K : never] | PresetPropertyFn<K, TStorybookConfig>;
|
1155
1155
|
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]>;
|
1156
|
+
type Path = string;
|
1156
1157
|
|
1157
1158
|
declare const addons: PresetProperty<'addons', StorybookConfig$1>;
|
1158
1159
|
declare const frameworkOptions: (_: never, options: Options) => Promise<StorybookConfig$1['framework']>;
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@storybook/react-webpack5",
|
3
|
-
"version": "7.4.0-alpha.
|
3
|
+
"version": "7.4.0-alpha.1",
|
4
4
|
"description": "Storybook for React: Develop React Component in isolation with Hot Reloading.",
|
5
5
|
"keywords": [
|
6
6
|
"storybook"
|
@@ -37,19 +37,19 @@
|
|
37
37
|
"types": "dist/index.d.ts",
|
38
38
|
"files": [
|
39
39
|
"dist/**/*",
|
40
|
-
"template/**/*",
|
41
40
|
"README.md",
|
42
41
|
"*.js",
|
43
|
-
"*.d.ts"
|
42
|
+
"*.d.ts",
|
43
|
+
"!src/**/*"
|
44
44
|
],
|
45
45
|
"scripts": {
|
46
46
|
"check": "../../../scripts/prepare/check.ts",
|
47
47
|
"prep": "../../../scripts/prepare/bundle.ts"
|
48
48
|
},
|
49
49
|
"dependencies": {
|
50
|
-
"@storybook/builder-webpack5": "7.4.0-alpha.
|
51
|
-
"@storybook/preset-react-webpack": "7.4.0-alpha.
|
52
|
-
"@storybook/react": "7.4.0-alpha.
|
50
|
+
"@storybook/builder-webpack5": "7.4.0-alpha.1",
|
51
|
+
"@storybook/preset-react-webpack": "7.4.0-alpha.1",
|
52
|
+
"@storybook/react": "7.4.0-alpha.1",
|
53
53
|
"@types/node": "^16.0.0"
|
54
54
|
},
|
55
55
|
"devDependencies": {
|
package/src/typings.d.ts
DELETED
@@ -1,44 +0,0 @@
|
|
1
|
-
// TODO: Replace, as soon as @types/react-dom 17.0.14 is used
|
2
|
-
// Source: https://github.com/DefinitelyTyped/DefinitelyTyped/blob/fb0f14b7a35cde26ffaa82e7536c062e593e9ae6/types/react-dom/client.d.ts
|
3
|
-
declare module 'react-dom/client' {
|
4
|
-
import React = require('react');
|
5
|
-
|
6
|
-
export interface HydrationOptions {
|
7
|
-
onHydrated?(suspenseInstance: Comment): void;
|
8
|
-
onDeleted?(suspenseInstance: Comment): void;
|
9
|
-
/**
|
10
|
-
* Prefix for `useId`.
|
11
|
-
*/
|
12
|
-
identifierPrefix?: string;
|
13
|
-
onRecoverableError?: (error: unknown) => void;
|
14
|
-
}
|
15
|
-
|
16
|
-
export interface RootOptions {
|
17
|
-
/**
|
18
|
-
* Prefix for `useId`.
|
19
|
-
*/
|
20
|
-
identifierPrefix?: string;
|
21
|
-
onRecoverableError?: (error: unknown) => void;
|
22
|
-
}
|
23
|
-
|
24
|
-
export interface Root {
|
25
|
-
render(children: React.ReactChild | Iterable<React.ReactNode>): void;
|
26
|
-
unmount(): void;
|
27
|
-
}
|
28
|
-
|
29
|
-
/**
|
30
|
-
* Replaces `ReactDOM.render` when the `.render` method is called and enables Concurrent Mode.
|
31
|
-
*
|
32
|
-
* @see https://reactjs.org/docs/concurrent-mode-reference.html#createroot
|
33
|
-
*/
|
34
|
-
export function createRoot(
|
35
|
-
container: Element | Document | DocumentFragment | Comment,
|
36
|
-
options?: RootOptions
|
37
|
-
): Root;
|
38
|
-
|
39
|
-
export function hydrateRoot(
|
40
|
-
container: Element | Document | DocumentFragment | Comment,
|
41
|
-
initialChildren: React.ReactChild | Iterable<React.ReactNode>,
|
42
|
-
options?: HydrationOptions
|
43
|
-
): Root;
|
44
|
-
}
|