@storybook/react-native 9.0.0-alpha.2 → 9.0.0-alpha.8
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/babel.config.js +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +3 -2
- package/jest.config.js +4 -9
- package/package.json +12 -9
- package/preset.js +2 -0
- package/scripts/generate.test.js +2 -0
package/babel.config.js
CHANGED
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -1164,10 +1164,11 @@ function prepareStories({
|
|
|
1164
1164
|
const exportValue = fileExports[key];
|
|
1165
1165
|
if (!exportValue)
|
|
1166
1166
|
return;
|
|
1167
|
-
const name = (0, import_csf2.storyNameFromExport)(key);
|
|
1168
1167
|
const title = makeTitle(filename, specifier, meta.title);
|
|
1169
1168
|
if (title) {
|
|
1170
|
-
const
|
|
1169
|
+
const nameFromExport = (0, import_csf2.storyNameFromExport)(key);
|
|
1170
|
+
const id = (0, import_csf2.toId)(title, nameFromExport);
|
|
1171
|
+
const name = exportValue?.name || exportValue?.storyName || nameFromExport;
|
|
1171
1172
|
index.entries[id] = {
|
|
1172
1173
|
type: "story",
|
|
1173
1174
|
id,
|
package/jest.config.js
CHANGED
|
@@ -1,13 +1,8 @@
|
|
|
1
1
|
/** @type {import('jest').Config} */
|
|
2
2
|
const config = {
|
|
3
|
-
preset: '
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
setupFilesAfterEnv: ['<rootDir>/../../node_modules/react-native-gesture-handler/jestSetup.js'],
|
|
8
|
-
transform: {
|
|
9
|
-
'^.+\\.(js)$': ['babel-jest', { plugins: ['babel-plugin-syntax-hermes-parser'] }],
|
|
10
|
-
'^.+\\.(ts|tsx)$': 'babel-jest',
|
|
11
|
-
},
|
|
3
|
+
preset: 'jest-expo',
|
|
4
|
+
transformIgnorePatterns: [
|
|
5
|
+
'node_modules/(?!((jest-)?react-native|@react-native(-community)?)|expo(nent)?|@expo(nent)?/.*|@expo-google-fonts/.*|react-navigation|@react-navigation/.*|@sentry/react-native|native-base|react-native-svg|storybook/.*|@storybook/.*|uuid)',
|
|
6
|
+
],
|
|
12
7
|
};
|
|
13
8
|
module.exports = config;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@storybook/react-native",
|
|
3
|
-
"version": "9.0.0-alpha.
|
|
3
|
+
"version": "9.0.0-alpha.8",
|
|
4
4
|
"description": "A better way to develop React Native Components for your app",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -25,7 +25,8 @@
|
|
|
25
25
|
".": "./dist/index.js",
|
|
26
26
|
"./metro/withStorybook": "./dist/metro/withStorybook.js",
|
|
27
27
|
"./preview": "./dist/preview.js",
|
|
28
|
-
"./scripts/generate": "./scripts/generate.js"
|
|
28
|
+
"./scripts/generate": "./scripts/generate.js",
|
|
29
|
+
"./preset": "./preset.js"
|
|
29
30
|
},
|
|
30
31
|
"files": [
|
|
31
32
|
"bin/**/*",
|
|
@@ -47,16 +48,15 @@
|
|
|
47
48
|
"dependencies": {
|
|
48
49
|
"@storybook/csf": "^0.1.13",
|
|
49
50
|
"@storybook/global": "^5.0.0",
|
|
50
|
-
"@storybook/react": "9.0.0-alpha.
|
|
51
|
-
"@storybook/react-native-theming": "^9.0.0-alpha.
|
|
52
|
-
"@storybook/react-native-ui": "^9.0.0-alpha.
|
|
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",
|
|
53
54
|
"commander": "^8.2.0",
|
|
54
55
|
"dedent": "^1.5.1",
|
|
55
56
|
"deepmerge": "^4.3.0",
|
|
56
57
|
"prettier": "^2.4.1",
|
|
57
58
|
"react-native-url-polyfill": "^2.0.0",
|
|
58
59
|
"setimmediate": "^1.0.5",
|
|
59
|
-
"storybook": "9.0.0-alpha.3",
|
|
60
60
|
"type-fest": "~2.19",
|
|
61
61
|
"util": "^0.12.4",
|
|
62
62
|
"ws": "^8.18.0"
|
|
@@ -65,12 +65,14 @@
|
|
|
65
65
|
"@types/jest": "^29.4.3",
|
|
66
66
|
"@types/react": "~18.3.12",
|
|
67
67
|
"babel-jest": "^29.7.0",
|
|
68
|
-
"babel-
|
|
68
|
+
"babel-preset-expo": "^12.0.9",
|
|
69
69
|
"jest": "^29.7.0",
|
|
70
|
+
"jest-expo": "~52.0.6",
|
|
70
71
|
"jotai": "^2.6.2",
|
|
71
72
|
"react": "18.3.1",
|
|
72
73
|
"react-native": "0.76.7",
|
|
73
74
|
"react-test-renderer": "^18.3.1",
|
|
75
|
+
"storybook": "9.0.0-alpha.8",
|
|
74
76
|
"tsup": "^7.2.0",
|
|
75
77
|
"typescript": "^5.3.3"
|
|
76
78
|
},
|
|
@@ -79,7 +81,8 @@
|
|
|
79
81
|
"react": "*",
|
|
80
82
|
"react-native": ">=0.72.0",
|
|
81
83
|
"react-native-gesture-handler": ">=2",
|
|
82
|
-
"react-native-safe-area-context": "*"
|
|
84
|
+
"react-native-safe-area-context": "*",
|
|
85
|
+
"storybook": "9.0.0-alpha.8"
|
|
83
86
|
},
|
|
84
87
|
"engines": {
|
|
85
88
|
"node": ">=8.0.0"
|
|
@@ -87,5 +90,5 @@
|
|
|
87
90
|
"publishConfig": {
|
|
88
91
|
"access": "public"
|
|
89
92
|
},
|
|
90
|
-
"gitHead": "
|
|
93
|
+
"gitHead": "16659266d8aa9816490af41d0a840579a2f96805"
|
|
91
94
|
}
|
package/preset.js
ADDED
package/scripts/generate.test.js
CHANGED