@storybook/react-webpack5 7.0.19 → 7.0.21
Sign up to get free protection for your applications and to get access to all the features.
- package/package.json +6 -6
- package/src/typings.d.ts +44 -0
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@storybook/react-webpack5",
|
3
|
-
"version": "7.0.
|
3
|
+
"version": "7.0.21",
|
4
4
|
"description": "Storybook for React: Develop React Component in isolation with Hot Reloading.",
|
5
5
|
"keywords": [
|
6
6
|
"storybook"
|
@@ -47,9 +47,9 @@
|
|
47
47
|
"prep": "../../../scripts/prepare/bundle.ts"
|
48
48
|
},
|
49
49
|
"dependencies": {
|
50
|
-
"@storybook/builder-webpack5": "7.0.
|
51
|
-
"@storybook/preset-react-webpack": "7.0.
|
52
|
-
"@storybook/react": "7.0.
|
50
|
+
"@storybook/builder-webpack5": "7.0.21",
|
51
|
+
"@storybook/preset-react-webpack": "7.0.21",
|
52
|
+
"@storybook/react": "7.0.21",
|
53
53
|
"@types/node": "^16.0.0"
|
54
54
|
},
|
55
55
|
"devDependencies": {
|
@@ -82,5 +82,5 @@
|
|
82
82
|
],
|
83
83
|
"platform": "node"
|
84
84
|
},
|
85
|
-
"gitHead": "
|
86
|
-
}
|
85
|
+
"gitHead": "9fb2573aa274f3f69d3358050e8df9c903e8245f"
|
86
|
+
}
|
package/src/typings.d.ts
ADDED
@@ -0,0 +1,44 @@
|
|
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
|
+
}
|