dlaoshi-outfit 2.2.1 → 2.2.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.
- package/CHANGELOG.md +9 -0
- package/client.js +13 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 2.2.2 — 2026-10-23
|
|
4
|
+
|
|
5
|
+
立牌隐藏判据补强,设置页也会隐藏了。
|
|
6
|
+
|
|
7
|
+
- 由只认 `[role="dialog"][aria-modal="true"]` 改为认任意 `[role="dialog"]` / `[role="alertdialog"]`
|
|
8
|
+
- 新增遮挡测试:用 `elementFromPoint` 检查会话区中心是否真的位于最上层,
|
|
9
|
+
整页式的设置/插件页面(会话被盖住但仍挂载)也会判定为“不在聊天页”
|
|
10
|
+
- 回到聊天页自动恢复
|
|
11
|
+
|
|
3
12
|
## 2.2.1 — 2026-10-22
|
|
4
13
|
|
|
5
14
|
立牌只出现在聊天页。
|
package/client.js
CHANGED
|
@@ -992,7 +992,9 @@ html.${SKIN_CLASS} body[data-ds-dark-theme] [data-turn-process-answer] {
|
|
|
992
992
|
const check = () => {
|
|
993
993
|
let visible = true
|
|
994
994
|
try {
|
|
995
|
-
|
|
995
|
+
// Any dialog counts: settings, plugins and other secondary pages are
|
|
996
|
+
// dialogs, and not all of them carry aria-modal.
|
|
997
|
+
if (document.querySelector('[role="dialog"], [role="alertdialog"]')) visible = false
|
|
996
998
|
if (visible) {
|
|
997
999
|
const content = document.querySelector('[data-conversation-content]')
|
|
998
1000
|
if (content) {
|
|
@@ -1000,6 +1002,16 @@ html.${SKIN_CLASS} body[data-ds-dark-theme] [data-turn-process-answer] {
|
|
|
1000
1002
|
? content.getBoundingClientRect()
|
|
1001
1003
|
: null
|
|
1002
1004
|
visible = rect === null || (rect.width > 0 && rect.height > 0)
|
|
1005
|
+
// A full-page settings view can keep the conversation mounted
|
|
1006
|
+
// behind it. Ask the browser what is actually on top at the
|
|
1007
|
+
// chat's own centre; if it is not the conversation, the chat is
|
|
1008
|
+
// covered and the standee has no business floating there.
|
|
1009
|
+
if (visible && rect && typeof document.elementFromPoint === 'function' && typeof window !== 'undefined') {
|
|
1010
|
+
const x = Math.min(window.innerWidth - 4, Math.max(4, rect.left + rect.width / 2))
|
|
1011
|
+
const y = Math.min(window.innerHeight - 4, Math.max(4, rect.top + 60))
|
|
1012
|
+
const hit = document.elementFromPoint(x, y)
|
|
1013
|
+
if (hit && !content.contains(hit)) visible = false
|
|
1014
|
+
}
|
|
1003
1015
|
}
|
|
1004
1016
|
}
|
|
1005
1017
|
} catch (err) { visible = true }
|