@storybook/react 8.6.14 → 10.0.4
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/README.md +2 -0
- package/dist/_browser-chunks/chunk-7HDTOAND.js +279 -0
- package/dist/_browser-chunks/chunk-BUAOEMNB.js +14 -0
- package/dist/_browser-chunks/chunk-HBQ5Y6GW.js +209 -0
- package/dist/_browser-chunks/chunk-L5NVL7MD.js +37 -0
- package/dist/_browser-chunks/chunk-O24TFCLO.js +43 -0
- package/dist/_browser-chunks/chunk-SKEPQA2F.js +12031 -0
- package/dist/_browser-chunks/chunk-VVH2AMAL.js +1075 -0
- package/dist/entry-preview-argtypes.js +10 -0
- package/dist/entry-preview-docs.js +13 -47
- package/dist/entry-preview-rsc.js +11 -1
- package/dist/entry-preview.js +21 -1
- package/dist/index.d.ts +452 -9
- package/dist/index.js +79 -47
- package/dist/playwright.d.ts +1 -1
- package/dist/playwright.js +7 -1
- package/dist/preset.js +511 -1
- package/dist/preview.d.ts +247 -21
- package/dist/preview.js +12 -47
- package/package.json +25 -68
- package/preset.js +1 -1
- package/preview.js +1 -0
- package/template/cli/js/Button.stories.js +2 -2
- package/template/cli/js/Header.stories.js +1 -1
- package/template/cli/js/Page.stories.js +2 -2
- package/template/cli/{ts-4-9 → ts}/Button.stories.ts +3 -2
- package/template/cli/{ts-4-9 → ts}/Header.stories.ts +2 -1
- package/template/cli/{ts-4-9 → ts}/Page.stories.ts +3 -2
- package/template/components/index.js +1 -1
- package/dist/chunk-EWIU6LHT.mjs +0 -56
- package/dist/chunk-TENYCC3B.mjs +0 -8
- package/dist/chunk-XP5HYGXS.mjs +0 -3
- package/dist/chunk-ZGTCCPPZ.mjs +0 -7
- package/dist/entry-preview-docs.d.ts +0 -20
- package/dist/entry-preview-docs.mjs +0 -2
- package/dist/entry-preview-rsc.d.ts +0 -7
- package/dist/entry-preview-rsc.mjs +0 -5
- package/dist/entry-preview.d.ts +0 -19
- package/dist/entry-preview.mjs +0 -2
- package/dist/index.mjs +0 -11
- package/dist/playwright.mjs +0 -2
- package/dist/preset.d.ts +0 -18
- package/dist/preview.mjs +0 -4
- package/dist/public-types-f2c70f25.d.ts +0 -230
- package/dist/types-5617c98e.d.ts +0 -27
- package/template/cli/ts-3-8/Button.stories.ts +0 -53
- package/template/cli/ts-3-8/Header.stories.ts +0 -33
- package/template/cli/ts-3-8/Page.stories.ts +0 -32
- package/template/cli/ts-3-8/Page.tsx +0 -73
- package/template/cli/ts-4-9/Button.tsx +0 -37
- package/template/cli/ts-4-9/Header.tsx +0 -56
- /package/template/cli/{ts-3-8 → ts}/Button.tsx +0 -0
- /package/template/cli/{ts-3-8 → ts}/Header.tsx +0 -0
- /package/template/cli/{ts-4-9 → ts}/Page.tsx +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@storybook/react",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "10.0.4",
|
|
4
4
|
"description": "Storybook React renderer",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"storybook"
|
|
@@ -19,42 +19,25 @@
|
|
|
19
19
|
"url": "https://opencollective.com/storybook"
|
|
20
20
|
},
|
|
21
21
|
"license": "MIT",
|
|
22
|
+
"type": "module",
|
|
22
23
|
"exports": {
|
|
23
24
|
".": {
|
|
24
25
|
"types": "./dist/index.d.ts",
|
|
25
|
-
"
|
|
26
|
-
"require": "./dist/index.js"
|
|
27
|
-
},
|
|
28
|
-
"./preview": {
|
|
29
|
-
"types": "./dist/preview.d.ts",
|
|
30
|
-
"import": "./dist/preview.mjs",
|
|
31
|
-
"require": "./dist/preview.js"
|
|
26
|
+
"default": "./dist/index.js"
|
|
32
27
|
},
|
|
28
|
+
"./entry-preview": "./dist/entry-preview.js",
|
|
29
|
+
"./entry-preview-argtypes": "./dist/entry-preview-argtypes.js",
|
|
30
|
+
"./entry-preview-docs": "./dist/entry-preview-docs.js",
|
|
31
|
+
"./entry-preview-rsc": "./dist/entry-preview-rsc.js",
|
|
33
32
|
"./experimental-playwright": {
|
|
34
33
|
"types": "./dist/playwright.d.ts",
|
|
35
|
-
"
|
|
36
|
-
"require": "./dist/playwright.js"
|
|
34
|
+
"default": "./dist/playwright.js"
|
|
37
35
|
},
|
|
38
|
-
"./
|
|
39
|
-
"./
|
|
40
|
-
"./
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
},
|
|
44
|
-
"main": "dist/index.js",
|
|
45
|
-
"module": "dist/index.mjs",
|
|
46
|
-
"types": "dist/index.d.ts",
|
|
47
|
-
"typesVersions": {
|
|
48
|
-
"*": {
|
|
49
|
-
"*": [
|
|
50
|
-
"dist/index.d.ts"
|
|
51
|
-
],
|
|
52
|
-
"preview": [
|
|
53
|
-
"dist/preview.d.ts"
|
|
54
|
-
],
|
|
55
|
-
"experimental-playwright": [
|
|
56
|
-
"dist/playwright.d.ts"
|
|
57
|
-
]
|
|
36
|
+
"./package.json": "./package.json",
|
|
37
|
+
"./preset": "./dist/preset.js",
|
|
38
|
+
"./preview": {
|
|
39
|
+
"types": "./dist/preview.d.ts",
|
|
40
|
+
"default": "./dist/preview.js"
|
|
58
41
|
}
|
|
59
42
|
},
|
|
60
43
|
"files": [
|
|
@@ -66,71 +49,45 @@
|
|
|
66
49
|
"!src/**/*"
|
|
67
50
|
],
|
|
68
51
|
"scripts": {
|
|
69
|
-
"check": "jiti ../../../scripts/
|
|
70
|
-
"prep": "jiti ../../../scripts/
|
|
52
|
+
"check": "jiti ../../../scripts/check/check-package.ts",
|
|
53
|
+
"prep": "jiti ../../../scripts/build/build-package.ts"
|
|
71
54
|
},
|
|
72
55
|
"dependencies": {
|
|
73
|
-
"@storybook/components": "8.6.14",
|
|
74
56
|
"@storybook/global": "^5.0.0",
|
|
75
|
-
"@storybook/
|
|
76
|
-
"@storybook/preview-api": "8.6.14",
|
|
77
|
-
"@storybook/react-dom-shim": "8.6.14",
|
|
78
|
-
"@storybook/theming": "8.6.14"
|
|
57
|
+
"@storybook/react-dom-shim": "10.0.4"
|
|
79
58
|
},
|
|
80
59
|
"devDependencies": {
|
|
81
|
-
"@
|
|
82
|
-
"@types/babel-plugin-react-docgen": "^4",
|
|
60
|
+
"@types/babel-plugin-react-docgen": "^4.2.3",
|
|
83
61
|
"@types/escodegen": "^0.0.6",
|
|
84
|
-
"@types/estree": "^
|
|
62
|
+
"@types/estree": "^1.0.6",
|
|
85
63
|
"@types/node": "^22.0.0",
|
|
86
|
-
"@types/semver": "^7.3.4",
|
|
87
64
|
"acorn": "^7.4.1",
|
|
88
65
|
"acorn-jsx": "^5.3.1",
|
|
89
66
|
"acorn-walk": "^7.2.0",
|
|
90
67
|
"babel-plugin-react-docgen": "^4.2.1",
|
|
91
|
-
"es-toolkit": "^1.
|
|
68
|
+
"es-toolkit": "^1.36.0",
|
|
92
69
|
"escodegen": "^2.1.0",
|
|
93
70
|
"expect-type": "^0.15.0",
|
|
94
71
|
"html-tags": "^3.1.0",
|
|
95
72
|
"prop-types": "^15.7.2",
|
|
96
|
-
"react-element-to-jsx-string": "
|
|
73
|
+
"react-element-to-jsx-string": "npm:@7rulnik/react-element-to-jsx-string@15.0.1",
|
|
97
74
|
"require-from-string": "^2.0.2",
|
|
98
|
-
"semver": "^7.3.7",
|
|
99
75
|
"ts-dedent": "^2.0.0",
|
|
100
76
|
"type-fest": "~2.19"
|
|
101
77
|
},
|
|
102
78
|
"peerDependencies": {
|
|
103
|
-
"
|
|
104
|
-
"react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0
|
|
105
|
-
"
|
|
106
|
-
"
|
|
107
|
-
"typescript": ">= 4.2.x"
|
|
79
|
+
"react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
|
|
80
|
+
"react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
|
|
81
|
+
"storybook": "^10.0.4",
|
|
82
|
+
"typescript": ">= 4.9.x"
|
|
108
83
|
},
|
|
109
84
|
"peerDependenciesMeta": {
|
|
110
|
-
"@storybook/test": {
|
|
111
|
-
"optional": true
|
|
112
|
-
},
|
|
113
85
|
"typescript": {
|
|
114
86
|
"optional": true
|
|
115
87
|
}
|
|
116
88
|
},
|
|
117
|
-
"engines": {
|
|
118
|
-
"node": ">=18.0.0"
|
|
119
|
-
},
|
|
120
89
|
"publishConfig": {
|
|
121
90
|
"access": "public"
|
|
122
91
|
},
|
|
123
|
-
"
|
|
124
|
-
"entries": [
|
|
125
|
-
"./src/index.ts",
|
|
126
|
-
"./src/preset.ts",
|
|
127
|
-
"./src/preview.tsx",
|
|
128
|
-
"./src/entry-preview.tsx",
|
|
129
|
-
"./src/entry-preview-docs.ts",
|
|
130
|
-
"./src/entry-preview-rsc.tsx",
|
|
131
|
-
"./src/playwright.ts"
|
|
132
|
-
],
|
|
133
|
-
"platform": "browser"
|
|
134
|
-
},
|
|
135
|
-
"gitHead": "e6a7fd8a655c69780bc20b9749c2699e44beae16"
|
|
92
|
+
"gitHead": "a8e7fd8a655c69780bc20b9749d2699e45beae16"
|
|
136
93
|
}
|
package/preset.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
export * from './dist/preset.js';
|
package/preview.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './dist/preview.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { fn } from '
|
|
1
|
+
import { fn } from 'storybook/test';
|
|
2
2
|
|
|
3
3
|
import { Button } from './Button';
|
|
4
4
|
|
|
@@ -16,7 +16,7 @@ export default {
|
|
|
16
16
|
argTypes: {
|
|
17
17
|
backgroundColor: { control: 'color' },
|
|
18
18
|
},
|
|
19
|
-
// Use `fn` to spy on the onClick arg, which will appear in the actions panel once invoked: https://storybook.js.org/docs/essentials/actions#
|
|
19
|
+
// Use `fn` to spy on the onClick arg, which will appear in the actions panel once invoked: https://storybook.js.org/docs/essentials/actions#story-args
|
|
20
20
|
args: { onClick: fn() },
|
|
21
21
|
};
|
|
22
22
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { expect, userEvent, within } from '
|
|
1
|
+
import { expect, userEvent, within } from 'storybook/test';
|
|
2
2
|
|
|
3
3
|
import { Page } from './Page';
|
|
4
4
|
|
|
@@ -13,7 +13,7 @@ export default {
|
|
|
13
13
|
|
|
14
14
|
export const LoggedOut = {};
|
|
15
15
|
|
|
16
|
-
// More on component testing: https://storybook.js.org/docs/writing-tests/
|
|
16
|
+
// More on component testing: https://storybook.js.org/docs/writing-tests/interaction-testing
|
|
17
17
|
export const LoggedIn = {
|
|
18
18
|
play: async ({ canvasElement }) => {
|
|
19
19
|
const canvas = within(canvasElement);
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
-
|
|
2
|
+
|
|
3
|
+
import { fn } from 'storybook/test';
|
|
3
4
|
|
|
4
5
|
import { Button } from './Button';
|
|
5
6
|
|
|
@@ -17,7 +18,7 @@ const meta = {
|
|
|
17
18
|
argTypes: {
|
|
18
19
|
backgroundColor: { control: 'color' },
|
|
19
20
|
},
|
|
20
|
-
// Use `fn` to spy on the onClick arg, which will appear in the actions panel once invoked: https://storybook.js.org/docs/essentials/actions#
|
|
21
|
+
// Use `fn` to spy on the onClick arg, which will appear in the actions panel once invoked: https://storybook.js.org/docs/essentials/actions#story-args
|
|
21
22
|
args: { onClick: fn() },
|
|
22
23
|
} satisfies Meta<typeof Button>;
|
|
23
24
|
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
-
|
|
2
|
+
|
|
3
|
+
import { expect, userEvent, within } from 'storybook/test';
|
|
3
4
|
|
|
4
5
|
import { Page } from './Page';
|
|
5
6
|
|
|
@@ -17,7 +18,7 @@ type Story = StoryObj<typeof meta>;
|
|
|
17
18
|
|
|
18
19
|
export const LoggedOut: Story = {};
|
|
19
20
|
|
|
20
|
-
// More on component testing: https://storybook.js.org/docs/writing-tests/
|
|
21
|
+
// More on component testing: https://storybook.js.org/docs/writing-tests/interaction-testing
|
|
21
22
|
export const LoggedIn: Story = {
|
|
22
23
|
play: async ({ canvasElement }) => {
|
|
23
24
|
const canvas = within(canvasElement);
|
|
@@ -5,5 +5,5 @@ import { Form } from './Form.jsx';
|
|
|
5
5
|
import { Html } from './Html.jsx';
|
|
6
6
|
import { Pre } from './Pre.jsx';
|
|
7
7
|
|
|
8
|
-
globalThis.
|
|
8
|
+
globalThis.__TEMPLATE_COMPONENTS__ = { Button, Pre, Form, Html };
|
|
9
9
|
globalThis.storybookRenderer = 'react';
|