@allbluecn/web-app 0.27.14 → 0.27.15
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/package.json
CHANGED
|
@@ -179,6 +179,28 @@ export function useToolbarOverflow(args: UseToolbarOverflowArgs): OverflowResult
|
|
|
179
179
|
}
|
|
180
180
|
}, [containerRef, measure, apply])
|
|
181
181
|
|
|
182
|
+
// 窗口 resize 兜底:Electron/PeekPanel 场景下容器 RO 可能被布局事务推迟,
|
|
183
|
+
// 表现为拖完窗口后 toolbar 仍按旧宽度堆叠,直到下一次交互 re-render 才更新。
|
|
184
|
+
// rAF 合并(拖拽期每帧最多一次),在布局稳定后再测一次,保证 resize 结束
|
|
185
|
+
// 即收敛到正确收起状态。
|
|
186
|
+
useEffect(() => {
|
|
187
|
+
if (typeof window === "undefined") return
|
|
188
|
+
let frame = 0
|
|
189
|
+
const schedule = () => {
|
|
190
|
+
if (frame !== 0) return
|
|
191
|
+
frame = window.requestAnimationFrame(() => {
|
|
192
|
+
frame = 0
|
|
193
|
+
const next = measure()
|
|
194
|
+
if (next) apply(next)
|
|
195
|
+
})
|
|
196
|
+
}
|
|
197
|
+
window.addEventListener("resize", schedule)
|
|
198
|
+
return () => {
|
|
199
|
+
window.removeEventListener("resize", schedule)
|
|
200
|
+
if (frame !== 0) window.cancelAnimationFrame(frame)
|
|
201
|
+
}
|
|
202
|
+
}, [measure, apply])
|
|
203
|
+
|
|
182
204
|
return result
|
|
183
205
|
}
|
|
184
206
|
|
|
@@ -112,7 +112,7 @@ export const SDK_GROUPS: SdkGroup[] = [
|
|
|
112
112
|
"items": [
|
|
113
113
|
{
|
|
114
114
|
"name": "@allbluecn/web-app",
|
|
115
|
-
"version": "v0.27.
|
|
115
|
+
"version": "v0.27.15",
|
|
116
116
|
"lastUpdate": "Nov 6, 2026",
|
|
117
117
|
"source": "apps/web/package.json",
|
|
118
118
|
"docsUrl": "https://github.com/allbluecn/allblue"
|