@storybook/react-native-web-vite 9.0.0-alpha.2 → 9.0.0-alpha.21

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/index.d.ts CHANGED
@@ -2,6 +2,7 @@ import { CompatibleString } from 'storybook/internal/types';
2
2
  import { FrameworkOptions as FrameworkOptions$1, StorybookConfig as StorybookConfig$1 } from '@storybook/react-vite';
3
3
  import { Options, BabelOptions } from '@vitejs/plugin-react';
4
4
  import { BabelPluginOptions } from 'vite-plugin-babel';
5
+ export * from '@storybook/react';
5
6
  export { __definePreview as definePreview } from '@storybook/react';
6
7
 
7
8
  type FrameworkOptions = FrameworkOptions$1 & {
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- "use strict";var __defProp=Object.defineProperty;var __getOwnPropDesc=Object.getOwnPropertyDescriptor;var __getOwnPropNames=Object.getOwnPropertyNames;var __hasOwnProp=Object.prototype.hasOwnProperty;var __export=(target,all)=>{for(var name in all)__defProp(target,name,{get:all[name],enumerable:!0})},__copyProps=(to,from,except,desc)=>{if(from&&typeof from=="object"||typeof from=="function")for(let key of __getOwnPropNames(from))!__hasOwnProp.call(to,key)&&key!==except&&__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable});return to};var __toCommonJS=mod=>__copyProps(__defProp({},"__esModule",{value:!0}),mod);var index_exports={};__export(index_exports,{definePreview:()=>import_react.__definePreview});module.exports=__toCommonJS(index_exports);var import_react=require("@storybook/react");0&&(module.exports={definePreview});
1
+ "use strict";var __defProp=Object.defineProperty;var __getOwnPropDesc=Object.getOwnPropertyDescriptor;var __getOwnPropNames=Object.getOwnPropertyNames;var __hasOwnProp=Object.prototype.hasOwnProperty;var __export=(target,all)=>{for(var name in all)__defProp(target,name,{get:all[name],enumerable:!0})},__copyProps=(to,from,except,desc)=>{if(from&&typeof from=="object"||typeof from=="function")for(let key of __getOwnPropNames(from))!__hasOwnProp.call(to,key)&&key!==except&&__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable});return to},__reExport=(target,mod,secondTarget)=>(__copyProps(target,mod,"default"),secondTarget&&__copyProps(secondTarget,mod,"default"));var __toCommonJS=mod=>__copyProps(__defProp({},"__esModule",{value:!0}),mod);var index_exports={};__export(index_exports,{definePreview:()=>import_react.__definePreview});module.exports=__toCommonJS(index_exports);var import_react=require("@storybook/react");__reExport(index_exports,require("@storybook/react"),module.exports);0&&(module.exports={definePreview,...require("@storybook/react")});
package/dist/index.mjs CHANGED
@@ -1 +1,2 @@
1
+ export * from '@storybook/react';
1
2
  export { __definePreview as definePreview } from '@storybook/react';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@storybook/react-native-web-vite",
3
- "version": "9.0.0-alpha.2",
3
+ "version": "9.0.0-alpha.21",
4
4
  "description": "Develop react-native components an isolated web environment with hot reloading.",
5
5
  "keywords": [
6
6
  "storybook"
@@ -63,9 +63,9 @@
63
63
  "@babel/preset-react": "^7.26.3",
64
64
  "@bunchtogether/vite-plugin-flow": "^1.0.2",
65
65
  "@joshwooding/vite-plugin-react-docgen-typescript": "0.5.0",
66
- "@storybook/builder-vite": "9.0.0-alpha.2",
67
- "@storybook/react": "9.0.0-alpha.2",
68
- "@storybook/react-vite": "9.0.0-alpha.2",
66
+ "@storybook/builder-vite": "9.0.0-alpha.21",
67
+ "@storybook/react": "9.0.0-alpha.21",
68
+ "@storybook/react-vite": "9.0.0-alpha.21",
69
69
  "@vitejs/plugin-react": "^4.3.2",
70
70
  "vite-plugin-babel": "^1.3.0",
71
71
  "vite-plugin-commonjs": "^0.10.4",
@@ -80,11 +80,11 @@
80
80
  "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0-beta",
81
81
  "react-native": ">=0.74.5",
82
82
  "react-native-web": "^0.19.12",
83
- "storybook": "^9.0.0-alpha.2",
83
+ "storybook": "^9.0.0-alpha.21",
84
84
  "vite": "^5.0.0 || ^6.0.0"
85
85
  },
86
86
  "engines": {
87
- "node": ">=18.0.0"
87
+ "node": ">=20.0.0"
88
88
  },
89
89
  "publishConfig": {
90
90
  "access": "public"
@@ -1,6 +1,5 @@
1
- import { fn } from '@storybook/test';
2
-
3
1
  import { View } from 'react-native';
2
+ import { fn } from 'storybook/test';
4
3
 
5
4
  import { Button } from './Button';
6
5
 
@@ -13,10 +13,9 @@ export const Header = ({ user, onLogin, onLogout, onCreateAccount }) => (
13
13
  <View style={styles.buttonContainer}>
14
14
  {user ? (
15
15
  <>
16
- <>
17
- <Text>Welcome, </Text>
18
- <Text style={styles.userName}>{user.name}!</Text>
19
- </>
16
+ <Text>Welcome, </Text>
17
+ <Text style={styles.userName}>{user.name}!</Text>
18
+
20
19
  <Button style={styles.button} size="small" onPress={onLogout} label="Log out" />
21
20
  </>
22
21
  ) : (
@@ -42,15 +42,15 @@ export const Page = () => {
42
42
  </Text>
43
43
 
44
44
  <View>
45
- <View>
45
+ <Text>
46
46
  Use a higher-level connected component. Storybook helps you compose such data from the
47
47
  "args" of child component stories
48
- </View>
48
+ </Text>
49
49
 
50
- <View>
50
+ <Text>
51
51
  Assemble data in the page component from your services. You can mock these services out
52
52
  using Storybook.
53
- </View>
53
+ </Text>
54
54
  </View>
55
55
 
56
56
  <Text style={styles.p}>
@@ -1,4 +1,4 @@
1
- import { expect, userEvent, within } from '@storybook/test';
1
+ import { expect, userEvent, within } from 'storybook/test';
2
2
 
3
3
  import { Page } from './Page';
4
4
 
@@ -1,7 +1,7 @@
1
- import type { Meta, StoryObj } from '@storybook/react';
2
- import { fn } from '@storybook/test';
1
+ import type { Meta, StoryObj } from '@storybook/react-native-web-vite';
3
2
 
4
3
  import { View } from 'react-native';
4
+ import { fn } from 'storybook/test';
5
5
 
6
6
  import { Button } from './Button';
7
7
 
@@ -1,4 +1,4 @@
1
- import type { Meta, StoryObj } from '@storybook/react';
1
+ import type { Meta, StoryObj } from '@storybook/react-native-web-vite';
2
2
 
3
3
  import { Header } from './Header';
4
4
 
@@ -3,7 +3,7 @@ import { StyleSheet, Text, View } from 'react-native';
3
3
  import { Button } from './Button';
4
4
 
5
5
  export type HeaderProps = {
6
- user?: {};
6
+ user?: { name: string };
7
7
  onLogin: () => void;
8
8
  onLogout: () => void;
9
9
  onCreateAccount: () => void;
@@ -18,10 +18,9 @@ export const Header = ({ user, onLogin, onLogout, onCreateAccount }: HeaderProps
18
18
  <View style={styles.buttonContainer}>
19
19
  {user ? (
20
20
  <>
21
- <>
22
- <Text>Welcome, </Text>
23
- <Text style={styles.userName}>{user.name}!</Text>
24
- </>
21
+ <Text>Welcome, </Text>
22
+ <Text style={styles.userName}>{user.name}!</Text>
23
+
25
24
  <Button style={styles.button} size="small" onPress={onLogout} label="Log out" />
26
25
  </>
27
26
  ) : (
@@ -1,5 +1,6 @@
1
- import type { Meta } from '@storybook/react';
2
- import { expect, userEvent, within } from '@storybook/test';
1
+ import type { Meta } from '@storybook/react-native-web-vite';
2
+
3
+ import { expect, userEvent, within } from 'storybook/test';
3
4
 
4
5
  import { Page } from './Page';
5
6
 
@@ -5,7 +5,7 @@ import { Linking, StyleSheet, Text, View } from 'react-native';
5
5
  import { Header } from './Header';
6
6
 
7
7
  export const Page = () => {
8
- const [user, setUser] = useState();
8
+ const [user, setUser] = useState<{ name: string } | undefined>();
9
9
 
10
10
  return (
11
11
  <View>
@@ -39,14 +39,14 @@ export const Page = () => {
39
39
  data in Storybook:
40
40
  </Text>
41
41
  <View>
42
- <View>
42
+ <Text>
43
43
  Use a higher-level connected component. Storybook helps you compose such data from the
44
44
  "args" of child component stories
45
- </View>
46
- <View>
45
+ </Text>
46
+ <Text>
47
47
  Assemble data in the page component from your services. You can mock these services out
48
48
  using Storybook.
49
- </View>
49
+ </Text>
50
50
  </View>
51
51
  <Text style={styles.p}>
52
52
  Get a guided tutorial on component-driven development at{' '}
File without changes