@storybook/react-native-web-vite 11.0.0-alpha.7 → 11.0.0-alpha.9
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-chunks/{chunk-M3P3VEOZ.js → chunk-6MCIJ66T.js} +7 -7
- package/dist/_node-chunks/{chunk-HNXU5UUI.js → chunk-7Q4P3VDO.js} +6 -6
- package/dist/node/index.js +7 -7
- package/dist/preset.js +8 -8
- package/dist/vite-plugin.js +8 -8
- package/package.json +6 -11
- package/template/cli/js/Button.jsx +11 -24
- package/template/cli/js/Header.jsx +7 -14
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_lr4b7q9xxf from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_lr4b7q9xxf from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_lr4b7q9xxf from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_lr4b7q9xxf.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_lr4b7q9xxf.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_lr4b7q9xxf.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
__commonJS,
|
|
14
14
|
__require,
|
|
15
15
|
__toESM
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-7Q4P3VDO.js";
|
|
17
17
|
|
|
18
18
|
// ../../../node_modules/ms/index.js
|
|
19
19
|
var require_ms = __commonJS({
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_lr4b7q9xxf from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_lr4b7q9xxf from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_lr4b7q9xxf from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_lr4b7q9xxf.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_lr4b7q9xxf.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_lr4b7q9xxf.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
package/dist/node/index.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_lr4b7q9xxf from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_lr4b7q9xxf from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_lr4b7q9xxf from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_lr4b7q9xxf.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_lr4b7q9xxf.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_lr4b7q9xxf.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
11
11
|
// ------------------------------------------------------------
|
|
12
|
-
import "../_node-chunks/chunk-
|
|
12
|
+
import "../_node-chunks/chunk-7Q4P3VDO.js";
|
|
13
13
|
|
|
14
14
|
// src/node/index.ts
|
|
15
15
|
function defineMain(config) {
|
package/dist/preset.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_lr4b7q9xxf from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_lr4b7q9xxf from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_lr4b7q9xxf from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_lr4b7q9xxf.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_lr4b7q9xxf.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_lr4b7q9xxf.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
11
11
|
// ------------------------------------------------------------
|
|
12
12
|
import {
|
|
13
13
|
src_default
|
|
14
|
-
} from "./_node-chunks/chunk-
|
|
15
|
-
import "./_node-chunks/chunk-
|
|
14
|
+
} from "./_node-chunks/chunk-6MCIJ66T.js";
|
|
15
|
+
import "./_node-chunks/chunk-7Q4P3VDO.js";
|
|
16
16
|
|
|
17
17
|
// src/preset.ts
|
|
18
18
|
import { viteFinal as reactViteFinal } from "@storybook/react-vite/preset";
|
package/dist/vite-plugin.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_lr4b7q9xxf from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_lr4b7q9xxf from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_lr4b7q9xxf from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_lr4b7q9xxf.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_lr4b7q9xxf.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_lr4b7q9xxf.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
11
11
|
// ------------------------------------------------------------
|
|
12
12
|
import {
|
|
13
13
|
src_default
|
|
14
|
-
} from "./_node-chunks/chunk-
|
|
15
|
-
import "./_node-chunks/chunk-
|
|
14
|
+
} from "./_node-chunks/chunk-6MCIJ66T.js";
|
|
15
|
+
import "./_node-chunks/chunk-7Q4P3VDO.js";
|
|
16
16
|
|
|
17
17
|
// src/vite-plugin.ts
|
|
18
18
|
import { rnw } from "vite-plugin-rnw";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@storybook/react-native-web-vite",
|
|
3
|
-
"version": "11.0.0-alpha.
|
|
3
|
+
"version": "11.0.0-alpha.9",
|
|
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": "11.0.0-alpha.
|
|
55
|
-
"@storybook/react": "11.0.0-alpha.
|
|
56
|
-
"@storybook/react-vite": "11.0.0-alpha.
|
|
54
|
+
"@storybook/builder-vite": "11.0.0-alpha.9",
|
|
55
|
+
"@storybook/react": "11.0.0-alpha.9",
|
|
56
|
+
"@storybook/react-vite": "11.0.0-alpha.9",
|
|
57
57
|
"vite-plugin-rnw": "~0.0.12"
|
|
58
58
|
},
|
|
59
59
|
"devDependencies": {
|
|
@@ -66,15 +66,10 @@
|
|
|
66
66
|
"react-dom": "^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": "^11.0.0-alpha.
|
|
70
|
-
"typescript": "
|
|
69
|
+
"storybook": "^11.0.0-alpha.9",
|
|
70
|
+
"typescript": "^5.9.0 || ^6.0.0 || ^7.0.0",
|
|
71
71
|
"vite": "^6.3.0 || ^7.0.0 || ^8.0.0"
|
|
72
72
|
},
|
|
73
|
-
"peerDependenciesMeta": {
|
|
74
|
-
"typescript": {
|
|
75
|
-
"optional": true
|
|
76
|
-
}
|
|
77
|
-
},
|
|
78
73
|
"publishConfig": {
|
|
79
74
|
"access": "public"
|
|
80
75
|
},
|
|
@@ -1,7 +1,16 @@
|
|
|
1
|
-
import PropTypes from 'prop-types';
|
|
2
1
|
import { StyleSheet, Text, TouchableOpacity, View } from 'react-native';
|
|
3
2
|
|
|
4
|
-
/**
|
|
3
|
+
/**
|
|
4
|
+
* Primary UI component for user interaction
|
|
5
|
+
*
|
|
6
|
+
* @param {object} props
|
|
7
|
+
* @param {boolean} [props.primary=false] Is this the principal call to action on the page?
|
|
8
|
+
* @param {string} [props.backgroundColor] What background color to use
|
|
9
|
+
* @param {'small' | 'medium' | 'large'} [props.size='medium'] How large should the button be?
|
|
10
|
+
* @param {string} props.label Button contents
|
|
11
|
+
* @param {() => void} [props.onPress] Optional click handler
|
|
12
|
+
* @param {object} [props.style] Optional extra styles
|
|
13
|
+
*/
|
|
5
14
|
export const Button = ({
|
|
6
15
|
primary = false,
|
|
7
16
|
size = 'medium',
|
|
@@ -86,25 +95,3 @@ const textSizeStyles = {
|
|
|
86
95
|
medium: styles.mediumText,
|
|
87
96
|
large: styles.largeText,
|
|
88
97
|
};
|
|
89
|
-
|
|
90
|
-
Button.propTypes = {
|
|
91
|
-
/** Is this the principal call to action on the page? */
|
|
92
|
-
primary: PropTypes.bool,
|
|
93
|
-
/** What background color to use */
|
|
94
|
-
backgroundColor: PropTypes.string,
|
|
95
|
-
/** How large should the button be? */
|
|
96
|
-
size: PropTypes.oneOf(['small', 'medium', 'large']),
|
|
97
|
-
/** Button contents */
|
|
98
|
-
label: PropTypes.string.isRequired,
|
|
99
|
-
/** Optional click handler */
|
|
100
|
-
onPress: PropTypes.func,
|
|
101
|
-
/** Optional extra styles */
|
|
102
|
-
style: PropTypes.object,
|
|
103
|
-
};
|
|
104
|
-
|
|
105
|
-
Button.defaultProps = {
|
|
106
|
-
backgroundColor: null,
|
|
107
|
-
primary: false,
|
|
108
|
-
size: 'medium',
|
|
109
|
-
onClick: undefined,
|
|
110
|
-
};
|
|
@@ -1,8 +1,14 @@
|
|
|
1
|
-
import PropTypes from 'prop-types';
|
|
2
1
|
import { StyleSheet, Text, View } from 'react-native';
|
|
3
2
|
|
|
4
3
|
import { Button } from './Button';
|
|
5
4
|
|
|
5
|
+
/**
|
|
6
|
+
* @param {object} props
|
|
7
|
+
* @param {{ name: string }} [props.user] The signed-in user, if any
|
|
8
|
+
* @param {() => void} props.onLogin Called when the user presses Log in
|
|
9
|
+
* @param {() => void} props.onLogout Called when the user presses Log out
|
|
10
|
+
* @param {() => void} props.onCreateAccount Called when the user presses Sign up
|
|
11
|
+
*/
|
|
6
12
|
export const Header = ({ user, onLogin, onLogout, onCreateAccount }) => (
|
|
7
13
|
<View>
|
|
8
14
|
<View style={styles.wrapper}>
|
|
@@ -68,16 +74,3 @@ const styles = StyleSheet.create({
|
|
|
68
74
|
fontWeight: '700',
|
|
69
75
|
},
|
|
70
76
|
});
|
|
71
|
-
|
|
72
|
-
Header.propTypes = {
|
|
73
|
-
user: PropTypes.shape({
|
|
74
|
-
name: PropTypes.string.isRequired,
|
|
75
|
-
}),
|
|
76
|
-
onLogin: PropTypes.func.isRequired,
|
|
77
|
-
onLogout: PropTypes.func.isRequired,
|
|
78
|
-
onCreateAccount: PropTypes.func.isRequired,
|
|
79
|
-
};
|
|
80
|
-
|
|
81
|
-
Header.defaultProps = {
|
|
82
|
-
user: null,
|
|
83
|
-
};
|