@storybook/react-native-web-vite 10.3.0-alpha.8 → 10.3.0-beta.0
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/node/index.js +6 -6
- package/dist/preset.js +6 -6
- package/dist/vite-plugin.js +6 -6
- package/package.json +6 -6
- package/template/cli/js/Button.jsx +2 -1
- package/template/cli/js/Page.jsx +3 -2
- package/template/cli/js/Page.stories.jsx +0 -1
- package/template/cli/ts/Button.tsx +2 -1
- package/template/cli/ts/Page.stories.tsx +9 -6
- package/template/cli/ts/Page.tsx +3 -2
package/dist/node/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_kxdmnyn32p from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_kxdmnyn32p from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_kxdmnyn32p from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_kxdmnyn32p.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_kxdmnyn32p.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_kxdmnyn32p.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
package/dist/preset.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_kxdmnyn32p from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_kxdmnyn32p from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_kxdmnyn32p from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_kxdmnyn32p.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_kxdmnyn32p.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_kxdmnyn32p.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
package/dist/vite-plugin.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_kxdmnyn32p from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_kxdmnyn32p from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_kxdmnyn32p from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_kxdmnyn32p.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_kxdmnyn32p.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_kxdmnyn32p.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@storybook/react-native-web-vite",
|
|
3
|
-
"version": "10.3.0-
|
|
3
|
+
"version": "10.3.0-beta.0",
|
|
4
4
|
"description": "Storybook for React Native Web and Vite: Develop, document, and test UI components in isolation",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"storybook",
|
|
@@ -51,9 +51,9 @@
|
|
|
51
51
|
"!src/**/*"
|
|
52
52
|
],
|
|
53
53
|
"dependencies": {
|
|
54
|
-
"@storybook/builder-vite": "10.3.0-
|
|
55
|
-
"@storybook/react": "10.3.0-
|
|
56
|
-
"@storybook/react-vite": "10.3.0-
|
|
54
|
+
"@storybook/builder-vite": "10.3.0-beta.0",
|
|
55
|
+
"@storybook/react": "10.3.0-beta.0",
|
|
56
|
+
"@storybook/react-vite": "10.3.0-beta.0",
|
|
57
57
|
"vite-plugin-rnw": "^0.0.10",
|
|
58
58
|
"vite-tsconfig-paths": "^5.1.4"
|
|
59
59
|
},
|
|
@@ -66,8 +66,8 @@
|
|
|
66
66
|
"react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
|
|
67
67
|
"react-native": ">=0.74.5",
|
|
68
68
|
"react-native-web": "^0.19.12 || ^0.20.0 || ^0.21.0",
|
|
69
|
-
"storybook": "^10.3.0-
|
|
70
|
-
"vite": "^5.0.0 || ^6.0.0 || ^7.0.0"
|
|
69
|
+
"storybook": "^10.3.0-beta.0",
|
|
70
|
+
"vite": "^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0"
|
|
71
71
|
},
|
|
72
72
|
"publishConfig": {
|
|
73
73
|
"access": "public"
|
|
@@ -44,7 +44,7 @@ const styles = StyleSheet.create({
|
|
|
44
44
|
lineHeight: 1,
|
|
45
45
|
},
|
|
46
46
|
primary: {
|
|
47
|
-
backgroundColor: '#
|
|
47
|
+
backgroundColor: '#555ab9',
|
|
48
48
|
},
|
|
49
49
|
primaryText: {
|
|
50
50
|
color: 'white',
|
|
@@ -52,6 +52,7 @@ const styles = StyleSheet.create({
|
|
|
52
52
|
secondary: {
|
|
53
53
|
backgroundColor: 'transparent',
|
|
54
54
|
borderColor: 'rgba(0, 0, 0, 0.15)',
|
|
55
|
+
color: '#333',
|
|
55
56
|
borderWidth: 1,
|
|
56
57
|
},
|
|
57
58
|
secondaryText: {
|
package/template/cli/js/Page.jsx
CHANGED
|
@@ -116,7 +116,8 @@ const styles = StyleSheet.create({
|
|
|
116
116
|
},
|
|
117
117
|
|
|
118
118
|
a: {
|
|
119
|
-
color: '#
|
|
119
|
+
color: '#1a237e',
|
|
120
|
+
textDecorationLine: 'underline',
|
|
120
121
|
},
|
|
121
122
|
|
|
122
123
|
ul: {
|
|
@@ -141,7 +142,7 @@ const styles = StyleSheet.create({
|
|
|
141
142
|
fontSize: 11,
|
|
142
143
|
lineHeight: 12,
|
|
143
144
|
fontWeight: '700',
|
|
144
|
-
color: '#
|
|
145
|
+
color: '#1a237e',
|
|
145
146
|
},
|
|
146
147
|
|
|
147
148
|
tipWrapper: {
|
|
@@ -15,7 +15,6 @@ export const LoggedIn = {
|
|
|
15
15
|
const loginButton = canvas.getByRole('button', { name: /Log in/i });
|
|
16
16
|
await expect(loginButton).toBeInTheDocument();
|
|
17
17
|
await userEvent.click(loginButton);
|
|
18
|
-
// FIXME: await expect(loginButton).not.toBeInTheDocument();
|
|
19
18
|
|
|
20
19
|
const logoutButton = canvas.getByRole('button', { name: /Log out/i });
|
|
21
20
|
await expect(logoutButton).toBeInTheDocument();
|
|
@@ -58,7 +58,7 @@ const styles = StyleSheet.create({
|
|
|
58
58
|
lineHeight: 1,
|
|
59
59
|
},
|
|
60
60
|
primary: {
|
|
61
|
-
backgroundColor: '#
|
|
61
|
+
backgroundColor: '#555ab9',
|
|
62
62
|
},
|
|
63
63
|
primaryText: {
|
|
64
64
|
color: 'white',
|
|
@@ -66,6 +66,7 @@ const styles = StyleSheet.create({
|
|
|
66
66
|
secondary: {
|
|
67
67
|
backgroundColor: 'transparent',
|
|
68
68
|
borderColor: 'rgba(0, 0, 0, 0.15)',
|
|
69
|
+
color: '#333',
|
|
69
70
|
borderWidth: 1,
|
|
70
71
|
},
|
|
71
72
|
secondaryText: {
|
|
@@ -1,25 +1,28 @@
|
|
|
1
|
-
import type { Meta } from '@storybook/react-native-web-vite';
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react-native-web-vite';
|
|
2
2
|
|
|
3
3
|
import { expect, userEvent, within } from 'storybook/test';
|
|
4
4
|
|
|
5
5
|
import { Page } from './Page';
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
const meta = {
|
|
8
8
|
title: 'Example/Page',
|
|
9
9
|
component: Page,
|
|
10
|
-
}
|
|
10
|
+
} satisfies Meta<typeof Page>;
|
|
11
11
|
|
|
12
|
-
export
|
|
12
|
+
export default meta;
|
|
13
|
+
|
|
14
|
+
type Story = StoryObj<typeof meta>;
|
|
15
|
+
|
|
16
|
+
export const LoggedIn: Story = {
|
|
13
17
|
play: async ({ canvasElement }) => {
|
|
14
18
|
const canvas = within(canvasElement);
|
|
15
19
|
const loginButton = canvas.getByRole('button', { name: /Log in/i });
|
|
16
20
|
await expect(loginButton).toBeInTheDocument();
|
|
17
21
|
await userEvent.click(loginButton);
|
|
18
|
-
// FIXME: await expect(loginButton).not.toBeInTheDocument();
|
|
19
22
|
|
|
20
23
|
const logoutButton = canvas.getByRole('button', { name: /Log out/i });
|
|
21
24
|
await expect(logoutButton).toBeInTheDocument();
|
|
22
25
|
},
|
|
23
26
|
};
|
|
24
27
|
|
|
25
|
-
export const LoggedOut = {};
|
|
28
|
+
export const LoggedOut: Story = {};
|
package/template/cli/ts/Page.tsx
CHANGED
|
@@ -108,7 +108,8 @@ const styles = StyleSheet.create({
|
|
|
108
108
|
},
|
|
109
109
|
|
|
110
110
|
a: {
|
|
111
|
-
color: '#
|
|
111
|
+
color: '#1a237e',
|
|
112
|
+
textDecorationLine: 'underline',
|
|
112
113
|
},
|
|
113
114
|
|
|
114
115
|
ul: {
|
|
@@ -133,7 +134,7 @@ const styles = StyleSheet.create({
|
|
|
133
134
|
fontSize: 11,
|
|
134
135
|
lineHeight: 12,
|
|
135
136
|
fontWeight: '700',
|
|
136
|
-
color: '#
|
|
137
|
+
color: '#1a237e',
|
|
137
138
|
},
|
|
138
139
|
|
|
139
140
|
tipWrapper: {
|