@capyclaw/caption-map 0.4.1 → 0.4.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/client/client.chat.js +13 -9
- package/package.json +1 -1
package/client/client.chat.js
CHANGED
|
@@ -48,14 +48,13 @@ window.__ModuleLoader__.load({
|
|
|
48
48
|
var module = { exports: {} }
|
|
49
49
|
var exports = module.exports
|
|
50
50
|
|
|
51
|
-
/* 底座依赖:几何探针 +
|
|
52
|
-
*
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
WINDOW_KIT = (function () {
|
|
51
|
+
/* 底座依赖:几何探针 + 页面账本在 @capyclaw/window-kit。win32 / 纯 web 外部模块在场且
|
|
52
|
+
* 有效时直接用它(单一真源)。macOS 的 boot graph 不含 window-kit(dsh.client.external
|
|
53
|
+
* 只负责排序、不会把模块加进去),且 require 缺失模块时可能返回 undefined / 不完整对象
|
|
54
|
+
* 而非抛错——只靠 catch 兜底会漏。故先无条件构建内联最小面(与 window-kit 同判据:
|
|
55
|
+
* largestVisible / mainPanel / sidebarPanel / conversationRoot / effect),仅当外部模块
|
|
56
|
+
* 三个关键面齐全才覆盖。这正是 0.1.x mac「侧栏空白、聊天窗没搬」的根因修复。 */
|
|
57
|
+
var INLINE_KIT = (function () {
|
|
59
58
|
function largestVisible(selector, minWidth, minHeight, map) {
|
|
60
59
|
var list = []
|
|
61
60
|
try { list = document.querySelectorAll ? Array.prototype.slice.call(document.querySelectorAll(selector)) : [] } catch (error) { list = [] }
|
|
@@ -165,7 +164,12 @@ window.__ModuleLoader__.load({
|
|
|
165
164
|
effect: pageEffect,
|
|
166
165
|
}
|
|
167
166
|
})()
|
|
168
|
-
|
|
167
|
+
var WINDOW_KIT = INLINE_KIT
|
|
168
|
+
try {
|
|
169
|
+
var ext = require('@capyclaw/window-kit')
|
|
170
|
+
if (ext && typeof ext.effect === 'function' && typeof ext.conversationRoot === 'function'
|
|
171
|
+
&& typeof ext.sidebarPanel === 'function') WINDOW_KIT = ext
|
|
172
|
+
} catch (error) { /* 外部缺席 / 抛错 → 保留内联最小面 */ }
|
|
169
173
|
|
|
170
174
|
var SLOT_ATTR = 'data-capyclaw-chat-slot'
|
|
171
175
|
var PANEL_ATTR = 'data-capyclaw-chat-panel'
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@capyclaw/caption-map",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.2",
|
|
4
4
|
"description": "区域映射 + 侧栏宽度固定 + 聊天窗停靠:把侧栏底部入口行与面板列表映射到标题栏(Windows 原生 / macOS 经标题栏壳归一,单一真源按系统自适应);侧栏宽度锁定为拖拽上限(可配置);并把会话面板整块搬进侧栏底部的槽里(跨平台常驻)。纯页面改动,停用即还原。",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./index.js",
|