@linkdesk/contracts 0.1.32 → 0.1.33
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 +15 -7
- package/package.json +24 -24
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;
|
|
@@ -3024,6 +3030,8 @@ export type SettingsUiHint = "themePicker" | "select" | "accentSource" | "slider
|
|
|
3024
3030
|
* `readonly` 只读状态行(值来自 `statusCommand` 运行时数据源,不来自配置存储);
|
|
3025
3031
|
* `action` 操作按钮(文案 = `description`,点击执行 `actionCommand`);`color` 色块预览
|
|
3026
3032
|
* (壳 `app.accentColor` / `app.glassTint` 在用)。同 uiHint:声明面保持开放 `string`,未知值降级。
|
|
3033
|
+
* 🆕 设置行案 2.1(2026-10-04 · 伴生声明正交化):`readonly`/`action` 是「**主控件就是它**」的简写;
|
|
3034
|
+
* `statusCommand`/`actionCommand` 可与**任何**主控件共存(渲染 `[主控件][伴生按钮][伴生只读]`)。
|
|
3027
3035
|
*/
|
|
3028
3036
|
export type SettingsRenderHint = "readonly" | "action" | "color";
|
|
3029
3037
|
/** 图标映射条目——字体 glyph 形态(单色/带色字体,seti 类每图标一色;codicon 即保底单色) */
|
package/package.json
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@linkdesk/contracts",
|
|
3
|
-
"version": "0.1.
|
|
4
|
-
"description": "LinkDesk 插件契约类型——window.linkdesk.* 全量类型定义(E5.8 契约生成产物)。第三方插件作者唯一合法类型消费路径。",
|
|
5
|
-
"type": "module",
|
|
6
|
-
"types": "./linkdesk.d.ts",
|
|
7
|
-
"files": [
|
|
8
|
-
"linkdesk.d.ts"
|
|
9
|
-
],
|
|
10
|
-
"sideEffects": false,
|
|
11
|
-
"publishConfig": {
|
|
12
|
-
"access": "public"
|
|
13
|
-
},
|
|
14
|
-
"scripts": {
|
|
15
|
-
"prepack": "node ../scripts/generate-contract.mjs"
|
|
16
|
-
},
|
|
17
|
-
"keywords": [
|
|
18
|
-
"linkdesk",
|
|
19
|
-
"plugin",
|
|
20
|
-
"types",
|
|
21
|
-
"contract"
|
|
22
|
-
],
|
|
23
|
-
"license": "MIT"
|
|
24
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@linkdesk/contracts",
|
|
3
|
+
"version": "0.1.33",
|
|
4
|
+
"description": "LinkDesk 插件契约类型——window.linkdesk.* 全量类型定义(E5.8 契约生成产物)。第三方插件作者唯一合法类型消费路径。",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"types": "./linkdesk.d.ts",
|
|
7
|
+
"files": [
|
|
8
|
+
"linkdesk.d.ts"
|
|
9
|
+
],
|
|
10
|
+
"sideEffects": false,
|
|
11
|
+
"publishConfig": {
|
|
12
|
+
"access": "public"
|
|
13
|
+
},
|
|
14
|
+
"scripts": {
|
|
15
|
+
"prepack": "node ../scripts/generate-contract.mjs"
|
|
16
|
+
},
|
|
17
|
+
"keywords": [
|
|
18
|
+
"linkdesk",
|
|
19
|
+
"plugin",
|
|
20
|
+
"types",
|
|
21
|
+
"contract"
|
|
22
|
+
],
|
|
23
|
+
"license": "MIT"
|
|
24
|
+
}
|