@linkdesk/contracts 0.1.32 → 0.1.34
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/linkdesk.d.ts +17 -7
- package/package.json +1 -1
package/linkdesk.d.ts
CHANGED
|
@@ -50,6 +50,10 @@ export interface LinkDeskConfigProperty {
|
|
|
50
50
|
type: string;
|
|
51
51
|
default?: unknown;
|
|
52
52
|
description?: string;
|
|
53
|
+
/** 🆕 配置项短名(D1/D2,2026-10-04):行级显示名——设置页行名与市场功能页上行取它渲染(optional)。
|
|
54
|
+
* 值域惯例同 description:中文原文 = i18n key,en 译名由声明方供给(插件仓 i18n/en.json/壳侧 lang-defaults);
|
|
55
|
+
* 未声明 = 渲染回退显配置键(D2/——第三方存量零影响,导出面只加不删)。 */
|
|
56
|
+
title?: string;
|
|
53
57
|
enum?: string[];
|
|
54
58
|
enumDescriptions?: string[];
|
|
55
59
|
/** 控件提示——uiHint 优先:plugin.json 声明式控件选择(renderControl 读它切控件)。
|
|
@@ -75,10 +79,12 @@ export interface LinkDeskConfigProperty {
|
|
|
75
79
|
optionsFrom?: string;
|
|
76
80
|
/** 混搭来源域过滤——optionsFrom "theme.sources" 时按此域过滤 RecipeMeta.domains(10 §2 六域) */
|
|
77
81
|
optionsFromDomain?: ThemeDomain;
|
|
78
|
-
/**
|
|
82
|
+
/** 按钮动作——点击执行此壳命令(第三方设置 UI 经 commands.executeCommand 触发)。
|
|
83
|
+
* 设置行案 2.1:**伴生声明**——与任何主控件共存 ⇒ 主控件右侧的伴生按钮(文案 = `description`)。 */
|
|
79
84
|
actionCommand?: string;
|
|
80
|
-
/**
|
|
81
|
-
* (返回 string
|
|
85
|
+
/** 只读状态的运行时数据源——渲染时执行此壳命令取值
|
|
86
|
+
* (返回 string;显示话术由命令侧拼装)。值来自命令、不来自配置存储——通用能力,任何插件可用。
|
|
87
|
+
* 设置行案 2.1:**伴生声明**——与任何主控件共存 ⇒ 主控件右侧的伴生只读(复用只读底座轮询)。 */
|
|
82
88
|
statusCommand?: string;
|
|
83
89
|
/** renderHint "action" 按钮禁用条件——全部 {key,value} 匹配当前配置值时禁用 */
|
|
84
90
|
actionDisabledAll?: Array<{
|
|
@@ -362,12 +368,12 @@ export interface PoolMenuItem {
|
|
|
362
368
|
* ⚠️ 子菜单 children 上的 group 会被 ContextMenu 换成父项 group(mapChildren 语义)——分组只在**顶层菜单项**生效。
|
|
363
369
|
*/
|
|
364
370
|
group?: string;
|
|
365
|
-
/**
|
|
371
|
+
/** 快捷键文本(formatKeyLabel 后)——顶栏与汉堡**都**显示(2026-10-04 恢复顶栏键帽);无绑定不带此字段 */
|
|
366
372
|
shortcut?: string;
|
|
367
373
|
/** 当前项 √(显隐勾选菜单)——壳 buildTitleBarMenuGroups/汉堡经 resolveVisibilityChecked
|
|
368
374
|
* 序列化(zone 可见 = ✓)。显示文本铁律:池哑渲染原文,壳只推布尔。 */
|
|
369
375
|
checked?: boolean;
|
|
370
|
-
/** 子菜单——titlebar 仅 command+children
|
|
376
|
+
/** 子菜单——titlebar 仅 command+children 父项携带;汉堡:组标签容器保留为父项,同组成员折进它(2026-10-04) */
|
|
371
377
|
children?: PoolMenuItem[];
|
|
372
378
|
}
|
|
373
379
|
/** 菜单组——titlebar 每个 group = 顶栏一个按钮(如"文件""查看");汉堡 = 分组区块 */
|
|
@@ -461,7 +467,7 @@ export interface IconBarLayout {
|
|
|
461
467
|
hamburgerVisible: boolean;
|
|
462
468
|
/** 导航 aria-label——壳 t("导航")(显示文本铁律) */
|
|
463
469
|
navLabel: string;
|
|
464
|
-
/** ☰ 下拉——壳 MenuRenderer showGroups+showKeybindings+checkWhen
|
|
470
|
+
/** ☰ 下拉——壳 MenuRenderer showGroups+showKeybindings+checkWhen 语义:组标签容器保留为父项、同组成员折进它(2026-10-04);仅 hamburgerVisible 时推 */
|
|
465
471
|
hamburger?: {
|
|
466
472
|
/** ☰ tooltip——壳 t("菜单") */
|
|
467
473
|
title: string;
|
|
@@ -904,7 +910,7 @@ export interface PanelSwitcherItem {
|
|
|
904
910
|
viewId: string;
|
|
905
911
|
/** 视图名——壳 t() 已解析(显示文本铁律) */
|
|
906
912
|
title: string;
|
|
907
|
-
/** 所属插件 ID——sub 标签(如 "
|
|
913
|
+
/** 所属插件 ID——sub 标签(如 "demo-plugin") */
|
|
908
914
|
pluginId: string;
|
|
909
915
|
/** 当前可见性——✓ 勾选 = 可见 */
|
|
910
916
|
visible: boolean;
|
|
@@ -1896,6 +1902,8 @@ export interface WorkspaceAPI {
|
|
|
1896
1902
|
detect(buffer: Uint8Array): Promise<string>;
|
|
1897
1903
|
decode(buffer: Uint8Array, encoding: string): Promise<string>;
|
|
1898
1904
|
encode(text: string, encoding: string): Promise<Uint8Array>;
|
|
1905
|
+
/** T1 二进制守卫:纯启发式判定(判定归壳,一处真相源;旧壳无此方法 ⇒ 插件须特性探测降级) */
|
|
1906
|
+
isBinary(buffer: Uint8Array): Promise<boolean>;
|
|
1899
1907
|
};
|
|
1900
1908
|
}
|
|
1901
1909
|
/** 文件装饰——池内本地注册表。形状对标插件 API 契约 §3.24 */
|
|
@@ -3024,6 +3032,8 @@ export type SettingsUiHint = "themePicker" | "select" | "accentSource" | "slider
|
|
|
3024
3032
|
* `readonly` 只读状态行(值来自 `statusCommand` 运行时数据源,不来自配置存储);
|
|
3025
3033
|
* `action` 操作按钮(文案 = `description`,点击执行 `actionCommand`);`color` 色块预览
|
|
3026
3034
|
* (壳 `app.accentColor` / `app.glassTint` 在用)。同 uiHint:声明面保持开放 `string`,未知值降级。
|
|
3035
|
+
* 🆕 设置行案 2.1(2026-10-04 · 伴生声明正交化):`readonly`/`action` 是「**主控件就是它**」的简写;
|
|
3036
|
+
* `statusCommand`/`actionCommand` 可与**任何**主控件共存(渲染 `[主控件][伴生按钮][伴生只读]`)。
|
|
3027
3037
|
*/
|
|
3028
3038
|
export type SettingsRenderHint = "readonly" | "action" | "color";
|
|
3029
3039
|
/** 图标映射条目——字体 glyph 形态(单色/带色字体,seti 类每图标一色;codicon 即保底单色) */
|