@storybook/react 7.1.0-alpha.29 → 7.1.0-alpha.30

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@storybook/react",
3
- "version": "7.1.0-alpha.29",
3
+ "version": "7.1.0-alpha.30",
4
4
  "description": "Storybook React renderer",
5
5
  "keywords": [
6
6
  "storybook"
@@ -52,13 +52,13 @@
52
52
  "prep": "../../../scripts/prepare/bundle.ts"
53
53
  },
54
54
  "dependencies": {
55
- "@storybook/client-logger": "7.1.0-alpha.29",
56
- "@storybook/core-client": "7.1.0-alpha.29",
57
- "@storybook/docs-tools": "7.1.0-alpha.29",
55
+ "@storybook/client-logger": "7.1.0-alpha.30",
56
+ "@storybook/core-client": "7.1.0-alpha.30",
57
+ "@storybook/docs-tools": "7.1.0-alpha.30",
58
58
  "@storybook/global": "^5.0.0",
59
- "@storybook/preview-api": "7.1.0-alpha.29",
60
- "@storybook/react-dom-shim": "7.1.0-alpha.29",
61
- "@storybook/types": "7.1.0-alpha.29",
59
+ "@storybook/preview-api": "7.1.0-alpha.30",
60
+ "@storybook/react-dom-shim": "7.1.0-alpha.30",
61
+ "@storybook/types": "7.1.0-alpha.30",
62
62
  "@types/escodegen": "^0.0.6",
63
63
  "@types/estree": "^0.0.51",
64
64
  "@types/node": "^16.0.0",
@@ -71,14 +71,14 @@
71
71
  "prop-types": "^15.7.2",
72
72
  "react-element-to-jsx-string": "^15.0.0",
73
73
  "ts-dedent": "^2.0.0",
74
- "type-fest": "^2.19.0",
74
+ "type-fest": "^3.11.0",
75
75
  "util-deprecate": "^1.0.2"
76
76
  },
77
77
  "devDependencies": {
78
78
  "@babel/core": "^7.22.0",
79
79
  "@types/util-deprecate": "^1.0.0",
80
- "expect-type": "^0.14.2",
81
- "jest-specific-snapshot": "^7.0.0",
80
+ "expect-type": "^0.15.0",
81
+ "jest-specific-snapshot": "^8.0.0",
82
82
  "require-from-string": "^2.0.2",
83
83
  "typescript": "~4.9.3"
84
84
  },
@@ -106,4 +106,4 @@
106
106
  "platform": "browser"
107
107
  },
108
108
  "gitHead": "e6a7fd8a655c69780bc20b9749c2699e44beae16"
109
- }
109
+ }
@@ -0,0 +1,3 @@
1
+ ## Integration tests for @storybook/react.
2
+
3
+ As these tests are implemented as stories, we may consider moving them inside the `template/stories` folder.
@@ -0,0 +1,48 @@
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
+ }
45
+
46
+ declare var STORYBOOK_ENV: 'react';
47
+ declare var FRAMEWORK_OPTIONS: any;
48
+ declare var LOGLEVEL: 'trace' | 'debug' | 'info' | 'warn' | 'error' | 'silent' | undefined;