@coze-arch/cli 0.0.12-alpha.208357 → 0.0.12-alpha.3cee6f
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.
|
@@ -152,17 +152,25 @@ export default function TabLayout() {
|
|
|
152
152
|
'--color-border',
|
|
153
153
|
]) as string[];
|
|
154
154
|
|
|
155
|
+
let tabBarStyle = {
|
|
156
|
+
backgroundColor: background,
|
|
157
|
+
borderTopWidth: 1,
|
|
158
|
+
borderTopColor: border,
|
|
159
|
+
};
|
|
160
|
+
|
|
161
|
+
// 用于修复 Web 上高度异常的问题(这个 if 逻辑必须添加)
|
|
162
|
+
if (Platform.OS === 'web') {
|
|
163
|
+
tabBarStyle = {
|
|
164
|
+
...tabBarStyle,
|
|
165
|
+
height: 'auto',
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
|
|
155
169
|
return (
|
|
156
170
|
<Tabs
|
|
157
171
|
screenOptions={{
|
|
158
172
|
headerShown: false,
|
|
159
|
-
tabBarStyle
|
|
160
|
-
backgroundColor: background,
|
|
161
|
-
borderTopWidth: 1,
|
|
162
|
-
borderTopColor: border,
|
|
163
|
-
// 通过固定宽度 55 来修正 Web 上的表现
|
|
164
|
-
height: Platform.OS === 'web' ? 55 : 50 + insets.bottom,
|
|
165
|
-
},
|
|
173
|
+
tabBarStyle,
|
|
166
174
|
tabBarActiveTintColor: accent,
|
|
167
175
|
tabBarInactiveTintColor: muted,
|
|
168
176
|
}}
|
|
@@ -152,17 +152,25 @@ export default function TabLayout() {
|
|
|
152
152
|
'--color-border',
|
|
153
153
|
]) as string[];
|
|
154
154
|
|
|
155
|
+
let tabBarStyle = {
|
|
156
|
+
backgroundColor: background,
|
|
157
|
+
borderTopWidth: 1,
|
|
158
|
+
borderTopColor: border,
|
|
159
|
+
};
|
|
160
|
+
|
|
161
|
+
// 用于修复 Web 上高度异常的问题(这个 if 逻辑必须添加)
|
|
162
|
+
if (Platform.OS === 'web') {
|
|
163
|
+
tabBarStyle = {
|
|
164
|
+
...tabBarStyle,
|
|
165
|
+
height: 'auto',
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
|
|
155
169
|
return (
|
|
156
170
|
<Tabs
|
|
157
171
|
screenOptions={{
|
|
158
172
|
headerShown: false,
|
|
159
|
-
tabBarStyle
|
|
160
|
-
backgroundColor: background,
|
|
161
|
-
borderTopWidth: 1,
|
|
162
|
-
borderTopColor: border,
|
|
163
|
-
// 通过固定宽度 55 来修正 Web 上的表现
|
|
164
|
-
height: Platform.OS === 'web' ? 55 : 50 + insets.bottom,
|
|
165
|
-
},
|
|
173
|
+
tabBarStyle,
|
|
166
174
|
tabBarActiveTintColor: accent,
|
|
167
175
|
tabBarInactiveTintColor: muted,
|
|
168
176
|
}}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { useEffect, ReactNode } from 'react';
|
|
2
|
+
import { Platform } from 'react-native';
|
|
3
|
+
|
|
4
|
+
const STYLE_ID = 'coze-pretty-scrollbar';
|
|
5
|
+
|
|
6
|
+
function WebOnlyPrettyScrollbar({ children }: { children: ReactNode }) {
|
|
7
|
+
useEffect(() => {
|
|
8
|
+
if (Platform.OS === 'web') {
|
|
9
|
+
let style = document.getElementById(STYLE_ID);
|
|
10
|
+
if (!style) {
|
|
11
|
+
style = document.createElement('style');
|
|
12
|
+
style.id = STYLE_ID;
|
|
13
|
+
style.textContent = `
|
|
14
|
+
::-webkit-scrollbar {
|
|
15
|
+
width: 4px;
|
|
16
|
+
height: 4px;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
::-webkit-scrollbar-track {
|
|
20
|
+
background: transparent;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
::-webkit-scrollbar-thumb {
|
|
24
|
+
background: rgba(0, 0, 0, 0.2);
|
|
25
|
+
border-radius: 2px;
|
|
26
|
+
}
|
|
27
|
+
`;
|
|
28
|
+
document.head.appendChild(style);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
return () => {
|
|
32
|
+
const existingStyle = document.getElementById(STYLE_ID);
|
|
33
|
+
if (existingStyle) {
|
|
34
|
+
existingStyle.remove();
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}, []);
|
|
39
|
+
|
|
40
|
+
return <>{children}</>
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export { WebOnlyPrettyScrollbar }
|
|
@@ -2,17 +2,20 @@ import { AuthProvider } from '@/contexts/AuthContext';
|
|
|
2
2
|
import { type ReactNode } from 'react';
|
|
3
3
|
import { GestureHandlerRootView } from 'react-native-gesture-handler';
|
|
4
4
|
import { WebOnlyColorSchemeUpdater } from './ColorSchemeUpdater';
|
|
5
|
+
import { WebOnlyPrettyScrollbar } from './PrettyScrollbar'
|
|
5
6
|
import { HeroUINativeProvider } from '@/heroui';
|
|
6
7
|
|
|
7
8
|
function Provider({ children }: { children: ReactNode }) {
|
|
8
9
|
return <WebOnlyColorSchemeUpdater>
|
|
9
|
-
<
|
|
10
|
-
<
|
|
11
|
-
<
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
10
|
+
<WebOnlyPrettyScrollbar>
|
|
11
|
+
<AuthProvider>
|
|
12
|
+
<GestureHandlerRootView style={{ flex: 1 }}>
|
|
13
|
+
<HeroUINativeProvider>
|
|
14
|
+
{children}
|
|
15
|
+
</HeroUINativeProvider>
|
|
16
|
+
</GestureHandlerRootView>
|
|
17
|
+
</AuthProvider>
|
|
18
|
+
</WebOnlyPrettyScrollbar>
|
|
16
19
|
</WebOnlyColorSchemeUpdater>
|
|
17
20
|
}
|
|
18
21
|
|
package/lib/cli.js
CHANGED
|
@@ -2107,7 +2107,7 @@ const EventBuilder = {
|
|
|
2107
2107
|
};
|
|
2108
2108
|
|
|
2109
2109
|
var name = "@coze-arch/cli";
|
|
2110
|
-
var version = "0.0.12-alpha.
|
|
2110
|
+
var version = "0.0.12-alpha.3cee6f";
|
|
2111
2111
|
var description = "coze coding devtools cli";
|
|
2112
2112
|
var license = "MIT";
|
|
2113
2113
|
var author = "fanwenjie.fe@bytedance.com";
|