@linkdesk/contracts 0.1.33 → 0.1.35

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.
Files changed (2) hide show
  1. package/linkdesk.d.ts +6 -0
  2. package/package.json +24 -24
package/linkdesk.d.ts CHANGED
@@ -1264,6 +1264,10 @@ export interface KeybindingsAPI {
1264
1264
  saveUserKeybindings(): Promise<void>;
1265
1265
  removeKeybindingForCommand(commandId: string): Promise<void>;
1266
1266
  resetKeybindingToDefault(commandId: string): Promise<void>;
1267
+ /** 清空该命令的绑定——「这条命令不要键」:删现存全部 + 抑制内置/插件默认(重启后仍无键),
1268
+ * 直到用户重新绑定或「恢复为默认」。⚠️ 与 resetKeybindingToDefault 的区别=「作者声明过键」时
1269
+ * reset 会把那个键顶回来(回退),本方法不会。需 LinkDesk 0.2.46+(旧壳上无此方法 ⇒ 调用方先探测) */
1270
+ clearKeybindingForCommand(commandId: string): Promise<void>;
1267
1271
  findKeybindingForCommand(commandId: string): Promise<Keybinding | undefined>;
1268
1272
  setKeybindingCaptureActive(active: boolean): Promise<void>;
1269
1273
  // 纯数据形参——contextBridge 结构化克隆丢 KeyboardEvent 原生属性(.key/.code 是 C++ getter),
@@ -1902,6 +1906,8 @@ export interface WorkspaceAPI {
1902
1906
  detect(buffer: Uint8Array): Promise<string>;
1903
1907
  decode(buffer: Uint8Array, encoding: string): Promise<string>;
1904
1908
  encode(text: string, encoding: string): Promise<Uint8Array>;
1909
+ /** T1 二进制守卫:纯启发式判定(判定归壳,一处真相源;旧壳无此方法 ⇒ 插件须特性探测降级) */
1910
+ isBinary(buffer: Uint8Array): Promise<boolean>;
1905
1911
  };
1906
1912
  }
1907
1913
  /** 文件装饰——池内本地注册表。形状对标插件 API 契约 §3.24 */
package/package.json CHANGED
@@ -1,24 +1,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
- }
1
+ {
2
+ "name": "@linkdesk/contracts",
3
+ "version": "0.1.35",
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
+ }