@coze-arch/cli 0.0.1-alpha.f626fa → 0.0.1-alpha.f91253

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.
@@ -26,6 +26,8 @@
26
26
  │ │ └── Screen.tsx # 页面容器组件(必用)
27
27
  │ ├── hooks/ # 自定义 Hooks
28
28
  │ ├── contexts/ # React Context 代码
29
+ │ ├── constants/ # 常量定义(如主题配置)
30
+ │ ├── utils/ # 工具函数
29
31
  │ ├── assets/ # 静态资源
30
32
  | └── package.json # Expo 应用 package.json
31
33
  ├── package.json
@@ -197,26 +197,10 @@ export const Screen = ({
197
197
  // 强制禁用 iOS 自动调整内容区域,完全由手动 padding 控制,消除系统自动计算带来的多余空白
198
198
  const contentInsetBehaviorIOS = 'never';
199
199
 
200
- // 1. 外层容器样式
201
- // 负责:背景色、Top/Left/Right 安全区、以及非滚动模式下的 Bottom 安全区
202
- const childArray = React.Children.toArray(children);
203
- let firstChild: React.ReactElement<any, any> | null = null;
204
- for (let i = 0; i < childArray.length; i++) {
205
- const el = childArray[i];
206
- if (React.isValidElement(el)) { firstChild = el as React.ReactElement<any, any>; break; }
207
- }
208
- const firstChildHasInlinePaddingTop = (() => {
209
- if (!firstChild) return false;
210
- const st: any = (firstChild as any).props?.style;
211
- const arr = Array.isArray(st) ? st : st ? [st] : [];
212
- return arr.some((s) => s && typeof s === 'object' && typeof (s as any).paddingTop === 'number' && (s as any).paddingTop > 10);
213
- })();
214
- const applyTopInset = hasTop && !firstChildHasInlinePaddingTop;
215
-
216
200
  const wrapperStyle: ViewStyle = {
217
201
  flex: 1,
218
202
  backgroundColor,
219
- paddingTop: applyTopInset ? insets.top : 0,
203
+ paddingTop: hasTop ? insets.top : 0,
220
204
  paddingLeft: hasLeft ? insets.left : 0,
221
205
  paddingRight: hasRight ? insets.right : 0,
222
206
  // 当页面不使用外层 ScrollView 时(子树本身可滚动),由外层 View 负责底部安全区