@capyclaw/caption-map 0.4.0 → 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.
@@ -48,14 +48,13 @@ window.__ModuleLoader__.load({
48
48
  var module = { exports: {} }
49
49
  var exports = module.exports
50
50
 
51
- /* 底座依赖:几何探针 + 页面账本都在 @capyclaw/window-kit。它没启用时本分块缺席,
52
- * 留一条明确告警,不牵连 caption-map 自己的标题栏映射。 */
53
- var WINDOW_KIT = null
54
- try { WINDOW_KIT = require('@capyclaw/window-kit') } catch (error) {
55
- /* macOS 的 boot graph 不含 window-kit(dsh.client.external 只负责排序、不会把模块加进去)→
56
- * 回退到内联最小面(与 window-kit 同判据:largestVisible / mainPanel / sidebarPanel /
57
- * conversationRoot / effect)。win32 / 纯 web 外部模块在场,此分支永不触发;单一真源。 */
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'
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@capyclaw/foundation",
3
- "version": "0.1.10",
3
+ "version": "0.1.11",
4
4
  "description": "dsh 插件基石层:接口 ABI、插件加载器与内核服务 ctx.os。应用插件只声明接口,不写装配代码。",
5
5
  "type": "module",
6
6
  "main": "./lib/host.mjs",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@capyclaw/plugin-kit",
3
- "version": "0.2.7",
3
+ "version": "0.2.8",
4
4
  "description": "DSH 插件基础设施标准件:HTTP/MCP、单实例锁、参数校验、技能 provider、journal 存储、编辑器传输与租约。",
5
5
  "type": "module",
6
6
  "main": "./src/index.mjs",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@capyclaw/window-kit",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "窗口几何与 dsh DOM 探针的唯一底座:fitRect 夹算式、frameLayout、mainPanel/conversationRoot 探针、Z 层序、mountOverlay 浮层样板。纯客户端模块包,@capyclaw/portal-hud 与 @capyclaw/chat-dock 都 require 它(彼此不依赖),单一真源、零重复实现。",
5
5
  "type": "module",
6
6
  "main": "./index.js",
@@ -59,4 +59,4 @@
59
59
  "publishConfig": {
60
60
  "access": "public"
61
61
  }
62
- }
62
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@capyclaw/caption-map",
3
- "version": "0.4.0",
3
+ "version": "0.4.2",
4
4
  "description": "区域映射 + 侧栏宽度固定 + 聊天窗停靠:把侧栏底部入口行与面板列表映射到标题栏(Windows 原生 / macOS 经标题栏壳归一,单一真源按系统自适应);侧栏宽度锁定为拖拽上限(可配置);并把会话面板整块搬进侧栏底部的槽里(跨平台常驻)。纯页面改动,停用即还原。",
5
5
  "type": "module",
6
6
  "main": "./index.js",