@storybook/react-native 9.0.0-alpha.8 → 9.0.0-beta.7

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
@@ -27,6 +27,7 @@ type InitialSelection = `${StoryKind}--${StoryName}` | {
27
27
  type DeepPartial<T> = T extends object ? {
28
28
  [P in keyof T]?: DeepPartial<T[P]>;
29
29
  } : T;
30
+ type ThemePartial = DeepPartial<Theme>;
30
31
  type Params = {
31
32
  onDeviceUI?: boolean;
32
33
  enableWebsockets?: boolean;
@@ -36,7 +37,7 @@ type Params = {
36
37
  secured?: boolean;
37
38
  initialSelection?: InitialSelection;
38
39
  shouldPersistSelection?: boolean;
39
- theme: DeepPartial<Theme>;
40
+ theme: ThemePartial;
40
41
  storage?: Storage;
41
42
  };
42
43
  declare class View {
@@ -103,4 +104,4 @@ interface StorybookConfig {
103
104
  framework?: '@storybook/react-native';
104
105
  }
105
106
 
106
- export { StorybookConfig, getProjectAnnotations, prepareStories, start, updateView };
107
+ export { InitialSelection, Params, Storage, StorybookConfig, ThemePartial, View, getProjectAnnotations, prepareStories, start, updateView };
package/dist/index.js CHANGED
@@ -1077,7 +1077,7 @@ var View3 = class {
1077
1077
  return {};
1078
1078
  }
1079
1079
  return (0, import_react_native_ui.transformStoryIndexToStoriesHash)(this._storyIndex, {
1080
- docsOptions: { docsMode: false, autodocs: false, defaultName: "" },
1080
+ docsOptions: { docsMode: false, defaultName: "" },
1081
1081
  filters: {},
1082
1082
  status: {},
1083
1083
  provider: {
@@ -1119,6 +1119,14 @@ if (import_react_native4.Platform.OS !== "web") {
1119
1119
  setupURLPolyfill();
1120
1120
  }
1121
1121
  }
1122
+ globalThis.FEATURES = {
1123
+ measure: false,
1124
+ outline: false,
1125
+ interactions: false,
1126
+ viewport: false,
1127
+ highlight: false,
1128
+ backgrounds: false
1129
+ };
1122
1130
  if (import_react_native4.Platform.OS === "web" && typeof globalThis.setImmediate === "undefined") {
1123
1131
  require("setimmediate");
1124
1132
  }
@@ -199,14 +199,14 @@ var require_generate = __commonJS({
199
199
  const annotations = `[${enhancers.join(", ")}]`;
200
200
  const globalTypes = `
201
201
  declare global {
202
- var view: ReturnType<typeof start>;
202
+ var view: View;
203
203
  var STORIES: typeof normalizedStories;
204
204
  }
205
205
  `;
206
206
  const fileContent = `
207
207
  /* do not change this file, it is auto generated by storybook. */
208
208
 
209
- import { start, updateView } from '@storybook/react-native';
209
+ import { start, updateView${useJs ? "" : ", View"} } from '@storybook/react-native';
210
210
 
211
211
  ${registerAddons}
212
212
 
@@ -233,7 +233,7 @@ var require_generate = __commonJS({
233
233
  updateView(global.view, annotations, normalizedStories, ${options});
234
234
  }
235
235
 
236
- export const view = global.view;
236
+ export const view${useJs ? "" : ": View"} = global.view;
237
237
  `;
238
238
  const formattedFileContent = prettier.format(fileContent, { parser: "babel-ts" });
239
239
  fs.writeFileSync(storybookRequiresLocation, formattedFileContent, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@storybook/react-native",
3
- "version": "9.0.0-alpha.8",
3
+ "version": "9.0.0-beta.7",
4
4
  "description": "A better way to develop React Native Components for your app",
5
5
  "keywords": [
6
6
  "react",
@@ -48,9 +48,9 @@
48
48
  "dependencies": {
49
49
  "@storybook/csf": "^0.1.13",
50
50
  "@storybook/global": "^5.0.0",
51
- "@storybook/react": "9.0.0-alpha.8",
52
- "@storybook/react-native-theming": "^9.0.0-alpha.8",
53
- "@storybook/react-native-ui": "^9.0.0-alpha.8",
51
+ "@storybook/react": "9.0.0-beta.7",
52
+ "@storybook/react-native-theming": "^9.0.0-beta.7",
53
+ "@storybook/react-native-ui": "^9.0.0-beta.7",
54
54
  "commander": "^8.2.0",
55
55
  "dedent": "^1.5.1",
56
56
  "deepmerge": "^4.3.0",
@@ -63,18 +63,18 @@
63
63
  },
64
64
  "devDependencies": {
65
65
  "@types/jest": "^29.4.3",
66
- "@types/react": "~18.3.12",
66
+ "@types/react": "~19.0.10",
67
67
  "babel-jest": "^29.7.0",
68
68
  "babel-preset-expo": "^12.0.9",
69
69
  "jest": "^29.7.0",
70
- "jest-expo": "~52.0.6",
70
+ "jest-expo": "~53.0.2",
71
71
  "jotai": "^2.6.2",
72
- "react": "18.3.1",
73
- "react-native": "0.76.7",
74
- "react-test-renderer": "^18.3.1",
75
- "storybook": "9.0.0-alpha.8",
72
+ "react": "19.0.0",
73
+ "react-native": "0.79.1",
74
+ "react-test-renderer": "^19.1.0",
75
+ "storybook": "9.0.0-beta.7",
76
76
  "tsup": "^7.2.0",
77
- "typescript": "^5.3.3"
77
+ "typescript": "~5.8.3"
78
78
  },
79
79
  "peerDependencies": {
80
80
  "@gorhom/bottom-sheet": ">=4",
@@ -82,7 +82,7 @@
82
82
  "react-native": ">=0.72.0",
83
83
  "react-native-gesture-handler": ">=2",
84
84
  "react-native-safe-area-context": "*",
85
- "storybook": "9.0.0-alpha.8"
85
+ "storybook": "9.0.0-beta.7"
86
86
  },
87
87
  "engines": {
88
88
  "node": ">=8.0.0"
@@ -90,5 +90,5 @@
90
90
  "publishConfig": {
91
91
  "access": "public"
92
92
  },
93
- "gitHead": "16659266d8aa9816490af41d0a840579a2f96805"
93
+ "gitHead": "032d8572f55e61fe7870e383b7bcd5206be0206c"
94
94
  }
@@ -4,7 +4,7 @@ exports[`loader writeRequires when there are different file extensions writes th
4
4
  "
5
5
  /* do not change this file, it is auto generated by storybook. */
6
6
 
7
- import { start, updateView } from '@storybook/react-native';
7
+ import { start, updateView, View } from '@storybook/react-native';
8
8
 
9
9
  import "@storybook/addon-ondevice-notes/register";
10
10
  import "@storybook/addon-ondevice-controls/register";
@@ -23,7 +23,7 @@ import "@storybook/addon-ondevice-actions/register";
23
23
 
24
24
 
25
25
  declare global {
26
- var view: ReturnType<typeof start>;
26
+ var view: View;
27
27
  var STORIES: typeof normalizedStories;
28
28
  }
29
29
 
@@ -47,7 +47,7 @@ import "@storybook/addon-ondevice-actions/register";
47
47
  updateView(global.view, annotations, normalizedStories, );
48
48
  }
49
49
 
50
- export const view = global.view;
50
+ export const view: View = global.view;
51
51
  "
52
52
  `;
53
53
 
@@ -55,7 +55,7 @@ exports[`loader writeRequires when there is a configuration object writes the st
55
55
  "
56
56
  /* do not change this file, it is auto generated by storybook. */
57
57
 
58
- import { start, updateView } from '@storybook/react-native';
58
+ import { start, updateView, View } from '@storybook/react-native';
59
59
 
60
60
  import "@storybook/addon-ondevice-notes/register";
61
61
  import "@storybook/addon-ondevice-controls/register";
@@ -74,7 +74,7 @@ import "@storybook/addon-ondevice-actions/register";
74
74
 
75
75
 
76
76
  declare global {
77
- var view: ReturnType<typeof start>;
77
+ var view: View;
78
78
  var STORIES: typeof normalizedStories;
79
79
  }
80
80
 
@@ -98,7 +98,7 @@ import "@storybook/addon-ondevice-actions/register";
98
98
  updateView(global.view, annotations, normalizedStories, );
99
99
  }
100
100
 
101
- export const view = global.view;
101
+ export const view: View = global.view;
102
102
  "
103
103
  `;
104
104
 
@@ -106,7 +106,7 @@ exports[`loader writeRequires when there is a story glob writes the story import
106
106
  "
107
107
  /* do not change this file, it is auto generated by storybook. */
108
108
 
109
- import { start, updateView } from '@storybook/react-native';
109
+ import { start, updateView, View } from '@storybook/react-native';
110
110
 
111
111
  import "@storybook/addon-ondevice-notes/register";
112
112
  import "@storybook/addon-ondevice-controls/register";
@@ -125,7 +125,7 @@ import "@storybook/addon-ondevice-actions/register";
125
125
 
126
126
 
127
127
  declare global {
128
- var view: ReturnType<typeof start>;
128
+ var view: View;
129
129
  var STORIES: typeof normalizedStories;
130
130
  }
131
131
 
@@ -149,7 +149,7 @@ import "@storybook/addon-ondevice-actions/register";
149
149
  updateView(global.view, annotations, normalizedStories, );
150
150
  }
151
151
 
152
- export const view = global.view;
152
+ export const view: View = global.view;
153
153
  "
154
154
  `;
155
155
 
@@ -157,7 +157,7 @@ exports[`loader writeRequires when there is no preview does not add preview rela
157
157
  "
158
158
  /* do not change this file, it is auto generated by storybook. */
159
159
 
160
- import { start, updateView } from '@storybook/react-native';
160
+ import { start, updateView, View } from '@storybook/react-native';
161
161
 
162
162
  import "@storybook/addon-ondevice-notes/register";
163
163
  import "@storybook/addon-ondevice-controls/register";
@@ -176,7 +176,7 @@ import "@storybook/addon-ondevice-actions/register";
176
176
 
177
177
 
178
178
  declare global {
179
- var view: ReturnType<typeof start>;
179
+ var view: View;
180
180
  var STORIES: typeof normalizedStories;
181
181
  }
182
182
 
@@ -200,7 +200,7 @@ import "@storybook/addon-ondevice-actions/register";
200
200
  updateView(global.view, annotations, normalizedStories, );
201
201
  }
202
202
 
203
- export const view = global.view;
203
+ export const view: View = global.view;
204
204
  "
205
205
  `;
206
206
 
@@ -100,7 +100,7 @@ function generate({ configPath, absolute = false, useJs = false }) {
100
100
 
101
101
  const globalTypes = `
102
102
  declare global {
103
- var view: ReturnType<typeof start>;
103
+ var view: View;
104
104
  var STORIES: typeof normalizedStories;
105
105
  }
106
106
  `;
@@ -108,7 +108,7 @@ function generate({ configPath, absolute = false, useJs = false }) {
108
108
  const fileContent = `
109
109
  /* do not change this file, it is auto generated by storybook. */
110
110
 
111
- import { start, updateView } from '@storybook/react-native';
111
+ import { start, updateView${useJs ? '' : ', View'} } from '@storybook/react-native';
112
112
 
113
113
  ${registerAddons}
114
114
 
@@ -135,7 +135,7 @@ function generate({ configPath, absolute = false, useJs = false }) {
135
135
  updateView(global.view, annotations, normalizedStories, ${options});
136
136
  }
137
137
 
138
- export const view = global.view;
138
+ export const view${useJs ? '' : ': View'} = global.view;
139
139
  `;
140
140
 
141
141
  const formattedFileContent = prettier.format(fileContent, { parser: 'babel-ts' });