@co0ontty/wand 1.25.1 → 1.25.2
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.
|
@@ -151,14 +151,26 @@
|
|
|
151
151
|
Android 自 targetSdk=35 起强制边到边, WebView 内容会绘制到状态栏底下,
|
|
152
152
|
但 Android WebView 不会主动把 WindowInsets 暴露给 env(safe-area-inset-*),
|
|
153
153
|
所以纯 env() 在绝大多数 Android 机器上回落到 0 -> 顶部直接撞到状态栏。
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
154
|
+
这里给旧版 Wand APK 兜一个 32px 最小值, 确保它们的顶部抽屉/模态不撞
|
|
155
|
+
状态栏。新版 APK 已经在原生层 setPadding 把 WebView 整体往里缩 (见
|
|
156
|
+
MainActivity.installWindowInsetsBridge) 并注入 .is-wand-app-native-insets
|
|
157
|
+
类来关掉这个兜底, 否则会双重 inset 浪费空间。*/
|
|
157
158
|
.is-wand-app {
|
|
158
159
|
--wand-safe-top: max(var(--app-inset-top), env(safe-area-inset-top, 0px), 32px);
|
|
159
160
|
--wand-safe-bottom: max(var(--app-inset-bottom), env(safe-area-inset-bottom, 0px), 0px);
|
|
160
161
|
}
|
|
161
162
|
|
|
163
|
+
/* 新版 APK 原生已经 padding 过, 不需要 CSS 再加任何 safe-area。把所有
|
|
164
|
+
--wand-safe-* / --pwa-safe-top 全部归零, 让顶部抽屉 / 模态 / 顶栏直接顶
|
|
165
|
+
到 WebView 内容上沿 (= 状态栏下沿)。*/
|
|
166
|
+
.is-wand-app-native-insets {
|
|
167
|
+
--wand-safe-top: 0px;
|
|
168
|
+
--wand-safe-bottom: 0px;
|
|
169
|
+
--wand-safe-left: 0px;
|
|
170
|
+
--wand-safe-right: 0px;
|
|
171
|
+
--pwa-safe-top: 0px;
|
|
172
|
+
}
|
|
173
|
+
|
|
162
174
|
/* 在普通移动浏览器 / Android WebView 边到边渲染 / 旋转后地址栏隐藏等场景下,
|
|
163
175
|
.app-container 同样需要消费 safe-area-inset-top, 否则 .main-header-row
|
|
164
176
|
会被状态栏挡住。inset 为 0 的设备上为 0px, 不影响桌面。*/
|
|
@@ -10824,10 +10836,10 @@
|
|
|
10824
10836
|
.file-preview-modal {
|
|
10825
10837
|
width: 100vw;
|
|
10826
10838
|
max-width: 100vw;
|
|
10827
|
-
height
|
|
10828
|
-
|
|
10829
|
-
|
|
10830
|
-
max-height: 100dvh;
|
|
10839
|
+
/* 键盘弹起时跟随 --app-viewport-height (= visualViewport.height) 收缩,
|
|
10840
|
+
否则 100dvh 不响应键盘, 编辑文本框会被键盘盖住。 */
|
|
10841
|
+
height: var(--app-viewport-height, 100dvh);
|
|
10842
|
+
max-height: var(--app-viewport-height, 100dvh);
|
|
10831
10843
|
border-radius: 0;
|
|
10832
10844
|
border: none;
|
|
10833
10845
|
box-shadow: none;
|