@itcase/storybook-config 1.3.5 → 1.3.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/config/addons/addonsReactNativeWeb.d.ts +11 -1
- package/dist/config/addons/addonsReactNativeWeb.js +2 -1
- package/dist/config/config/mainConfigReactNative.js +4 -2
- package/dist/config/config/mainConfigReactNativeWeb.d.ts +11 -1
- package/dist/config/config/mainConfigReactNativeWeb.js +39 -13
- package/package.json +22 -23
|
@@ -1,2 +1,12 @@
|
|
|
1
|
-
declare const ADDONS_REACT_NATIVE_WEB: string
|
|
1
|
+
declare const ADDONS_REACT_NATIVE_WEB: (string | {
|
|
2
|
+
name: string;
|
|
3
|
+
options: {
|
|
4
|
+
endpoint: string;
|
|
5
|
+
toolsets: {
|
|
6
|
+
dev: boolean;
|
|
7
|
+
docs: boolean;
|
|
8
|
+
test: boolean;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
})[];
|
|
2
12
|
export { ADDONS_REACT_NATIVE_WEB };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import svgr from 'vite-plugin-svgr';
|
|
2
|
-
import tsconfigPaths from 'vite-tsconfig-paths';
|
|
3
2
|
const MAIN_CONFIG_REACT_NATIVE = {
|
|
4
3
|
viteFinal: async (config) => {
|
|
5
4
|
const { mergeConfig } = await import('vite');
|
|
@@ -10,7 +9,10 @@ const MAIN_CONFIG_REACT_NATIVE = {
|
|
|
10
9
|
optimizeDeps: {
|
|
11
10
|
exclude: ['react-native'],
|
|
12
11
|
},
|
|
13
|
-
plugins: [
|
|
12
|
+
plugins: [svgr({ include: '**/*.svg' })],
|
|
13
|
+
resolve: {
|
|
14
|
+
tsconfigPaths: true,
|
|
15
|
+
},
|
|
14
16
|
});
|
|
15
17
|
},
|
|
16
18
|
core: {
|
|
@@ -1,6 +1,16 @@
|
|
|
1
1
|
declare const MAIN_CONFIG_REACT_NATIVE_WEB: {
|
|
2
2
|
viteFinal: (viteConfig: any) => Promise<Record<string, any>>;
|
|
3
|
-
addons: string
|
|
3
|
+
addons: (string | {
|
|
4
|
+
name: string;
|
|
5
|
+
options: {
|
|
6
|
+
endpoint: string;
|
|
7
|
+
toolsets: {
|
|
8
|
+
dev: boolean;
|
|
9
|
+
docs: boolean;
|
|
10
|
+
test: boolean;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
})[];
|
|
4
14
|
core: {
|
|
5
15
|
disableTelemetry: boolean;
|
|
6
16
|
disableWhatsNewNotifications: boolean;
|
|
@@ -1,22 +1,48 @@
|
|
|
1
|
-
import path from 'path';
|
|
2
|
-
import { fileURLToPath } from 'url';
|
|
3
1
|
import { mergeConfig } from 'vite';
|
|
4
|
-
import
|
|
5
|
-
|
|
2
|
+
import svgr from 'vite-plugin-svgr';
|
|
3
|
+
import { ADDONS_REACT_NATIVE_WEB } from '../addons/addonsReactNativeWeb.js';
|
|
4
|
+
const REACT_NATIVE_WEB_EXTENSIONS = [
|
|
5
|
+
'.web.tsx',
|
|
6
|
+
'.web.ts',
|
|
7
|
+
'.web.jsx',
|
|
8
|
+
'.web.js',
|
|
9
|
+
'.tsx',
|
|
10
|
+
'.ts',
|
|
11
|
+
'.jsx',
|
|
12
|
+
'.js',
|
|
13
|
+
];
|
|
6
14
|
const MAIN_CONFIG_REACT_NATIVE_WEB = {
|
|
7
15
|
viteFinal: async (viteConfig) => {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
16
|
+
// @storybook/react-native-web-vite still injects vite-tsconfig-paths;
|
|
17
|
+
// Vite 8 supports this natively and warns if the plugin is present.
|
|
18
|
+
const plugins = (viteConfig.plugins ?? [])
|
|
19
|
+
.flat(Infinity)
|
|
20
|
+
.filter((plugin) => plugin?.name !== 'vite-tsconfig-paths');
|
|
21
|
+
return mergeConfig({
|
|
22
|
+
...viteConfig,
|
|
23
|
+
plugins,
|
|
24
|
+
}, {
|
|
25
|
+
optimizeDeps: {
|
|
26
|
+
esbuildOptions: {
|
|
27
|
+
resolveExtensions: REACT_NATIVE_WEB_EXTENSIONS,
|
|
28
|
+
},
|
|
29
|
+
exclude: ['react-native'],
|
|
30
|
+
include: ['react-native-web', 'react-native-svg'],
|
|
31
|
+
},
|
|
32
|
+
plugins: [svgr({ include: '**/*.svg' })],
|
|
33
|
+
resolve: {
|
|
34
|
+
alias: [
|
|
35
|
+
{
|
|
36
|
+
find: /^react-native$/,
|
|
37
|
+
replacement: 'react-native-web',
|
|
14
38
|
},
|
|
15
|
-
|
|
16
|
-
|
|
39
|
+
],
|
|
40
|
+
dedupe: ['react', 'react-dom', 'react-native', 'react-native-web'],
|
|
41
|
+
extensions: REACT_NATIVE_WEB_EXTENSIONS,
|
|
42
|
+
},
|
|
17
43
|
});
|
|
18
44
|
},
|
|
19
|
-
addons:
|
|
45
|
+
addons: ADDONS_REACT_NATIVE_WEB,
|
|
20
46
|
core: {
|
|
21
47
|
disableTelemetry: true,
|
|
22
48
|
disableWhatsNewNotifications: true,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@itcase/storybook-config",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.7",
|
|
4
4
|
"author": "ITCase",
|
|
5
5
|
"description": "Storybook configuration package",
|
|
6
6
|
"engines": {
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"build": "npm run build-js",
|
|
11
11
|
"build-js": "rm -rf dist && tsc -p tsconfig.build.json && NODE_ENV=production rollup -c",
|
|
12
12
|
"typecheck": "tsc --noEmit --pretty -p tsconfig.json",
|
|
13
|
-
"prepare": "
|
|
13
|
+
"prepare": "husky && node node_modules/@itcase/config/husky-hooks/install-launcher.js",
|
|
14
14
|
"prepack": "npm run build",
|
|
15
15
|
"ios": "react-native run-ios -- --reset-cache",
|
|
16
16
|
"android": "react-native run-android -- --reset-cache",
|
|
@@ -99,13 +99,13 @@
|
|
|
99
99
|
},
|
|
100
100
|
"dependencies": {
|
|
101
101
|
"@gorhom/bottom-sheet": "^5.2.14",
|
|
102
|
-
"@itcase/config": "^1.6.
|
|
102
|
+
"@itcase/config": "^1.6.69",
|
|
103
103
|
"@itcase/storybook-addon-auth": "^1.0.5",
|
|
104
104
|
"@react-native-async-storage/async-storage": "^3.1.1",
|
|
105
105
|
"@react-native-community/datetimepicker": "^9.1.0",
|
|
106
106
|
"@storybook/addon-designs": "^11.1.4",
|
|
107
|
-
"@storybook/addon-docs": "^10.5.
|
|
108
|
-
"@storybook/addon-links": "^10.5.
|
|
107
|
+
"@storybook/addon-docs": "^10.5.8",
|
|
108
|
+
"@storybook/addon-links": "^10.5.8",
|
|
109
109
|
"@storybook/addon-mcp": "^0.7.0",
|
|
110
110
|
"@storybook/addon-ondevice-actions": "10.5.4",
|
|
111
111
|
"@storybook/addon-ondevice-backgrounds": "10.5.4",
|
|
@@ -113,19 +113,19 @@
|
|
|
113
113
|
"@storybook/addon-ondevice-notes": "^10.5.4",
|
|
114
114
|
"@storybook/addon-react-native-web": "^0.0.29",
|
|
115
115
|
"@storybook/addon-styling-webpack": "^3.0.2",
|
|
116
|
-
"@storybook/addon-themes": "^10.5.
|
|
117
|
-
"@storybook/addon-vitest": "^10.5.
|
|
116
|
+
"@storybook/addon-themes": "^10.5.8",
|
|
117
|
+
"@storybook/addon-vitest": "^10.5.8",
|
|
118
118
|
"@storybook/addon-webpack5-compiler-swc": "^4.0.3",
|
|
119
|
-
"@storybook/builder-vite": "^10.5.
|
|
119
|
+
"@storybook/builder-vite": "^10.5.8",
|
|
120
120
|
"@storybook/mcp": "0.8.0",
|
|
121
|
-
"@storybook/nextjs": "^10.5.
|
|
122
|
-
"@storybook/nextjs-vite": "^10.5.
|
|
123
|
-
"@storybook/react": "^10.5.
|
|
121
|
+
"@storybook/nextjs": "^10.5.8",
|
|
122
|
+
"@storybook/nextjs-vite": "^10.5.8",
|
|
123
|
+
"@storybook/react": "^10.5.8",
|
|
124
124
|
"@storybook/react-native": "10.5.4",
|
|
125
125
|
"@storybook/react-native-ui-lite": "10.5.4",
|
|
126
|
-
"@storybook/react-native-web-vite": "^10.5.
|
|
127
|
-
"@storybook/react-vite": "^10.5.
|
|
128
|
-
"@storybook/react-webpack5": "^10.5.
|
|
126
|
+
"@storybook/react-native-web-vite": "^10.5.8",
|
|
127
|
+
"@storybook/react-vite": "^10.5.8",
|
|
128
|
+
"@storybook/react-webpack5": "^10.5.8",
|
|
129
129
|
"@vitejs/plugin-react": "^6.0.5",
|
|
130
130
|
"@vitest/browser-playwright": "^4.1.10",
|
|
131
131
|
"babel-loader": "^10.1.1",
|
|
@@ -136,19 +136,18 @@
|
|
|
136
136
|
"http-proxy-middleware": "^4.2.0",
|
|
137
137
|
"msw": "^2.15.0",
|
|
138
138
|
"msw-storybook-addon": "^3.0.0",
|
|
139
|
-
"react-native-gesture-handler": "^3.1
|
|
139
|
+
"react-native-gesture-handler": "^3.2.1",
|
|
140
140
|
"react-native-reanimated": "^4.5.3",
|
|
141
141
|
"react-native-safe-area-context": "^5.9.0",
|
|
142
142
|
"react-native-svg": "^15.15.5",
|
|
143
143
|
"react-native-web": "^0.21.2",
|
|
144
144
|
"react-native-worklets": "^0.11.4",
|
|
145
145
|
"srvx": "^0.12.5",
|
|
146
|
-
"storybook": "^10.5.
|
|
146
|
+
"storybook": "^10.5.8",
|
|
147
147
|
"storybook-addon-source-link": "^2.0.1",
|
|
148
148
|
"vite": "^8.2.1",
|
|
149
149
|
"vite-plugin-babel": "^1.7.3",
|
|
150
150
|
"vite-plugin-svgr": "^5.2.0",
|
|
151
|
-
"vite-tsconfig-paths": "^6.1.1",
|
|
152
151
|
"vitest": "^4.1.10"
|
|
153
152
|
},
|
|
154
153
|
"devDependencies": {
|
|
@@ -159,10 +158,10 @@
|
|
|
159
158
|
"@babel/runtime": "^8.0.0",
|
|
160
159
|
"@commitlint/cli": "^21.2.2",
|
|
161
160
|
"@commitlint/config-conventional": "^21.2.2",
|
|
162
|
-
"@itcase/common": "^1.2.
|
|
163
|
-
"@itcase/lint": "^1.1.
|
|
164
|
-
"@itcase/ui-core": "^1.10.
|
|
165
|
-
"@itcase/ui-web": "^1.10.
|
|
161
|
+
"@itcase/common": "^1.2.53",
|
|
162
|
+
"@itcase/lint": "^1.1.122",
|
|
163
|
+
"@itcase/ui-core": "^1.10.78",
|
|
164
|
+
"@itcase/ui-web": "^1.10.78",
|
|
166
165
|
"@react-native-community/cli": "20.2.0",
|
|
167
166
|
"@react-native-community/cli-platform-android": "20.2.0",
|
|
168
167
|
"@react-native-community/cli-platform-ios": "20.2.0",
|
|
@@ -174,7 +173,7 @@
|
|
|
174
173
|
"@rollup/plugin-commonjs": "^29.0.3",
|
|
175
174
|
"@rollup/plugin-json": "^6.1.0",
|
|
176
175
|
"@rollup/plugin-node-resolve": "^16.0.3",
|
|
177
|
-
"@storybook/addon-docs": "^10.5.
|
|
176
|
+
"@storybook/addon-docs": "^10.5.8",
|
|
178
177
|
"@types/react": "^18",
|
|
179
178
|
"@types/react-dom": "^18",
|
|
180
179
|
"babel-plugin-transform-inline-environment-variables": "^0.4.4",
|
|
@@ -183,7 +182,7 @@
|
|
|
183
182
|
"glob": "^13.0.6",
|
|
184
183
|
"husky": "^9.1.7",
|
|
185
184
|
"lint-staged": "^17.3.0",
|
|
186
|
-
"next": "^16.3.
|
|
185
|
+
"next": "^16.3.1",
|
|
187
186
|
"prettier": "^3.9.6",
|
|
188
187
|
"react": "^18",
|
|
189
188
|
"react-docgen": "^8.0.3",
|