@linkdesk/plugin-sdk 0.1.77 → 0.1.78
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/README.md
CHANGED
|
@@ -51,7 +51,7 @@ npm install -D @linkdesk/plugin-sdk
|
|
|
51
51
|
| `search` | 1 | `searchFiles` | 文件搜索——全文搜索/替换(IPC 到壳/主进程执行) |
|
|
52
52
|
| `encoding` | 4 | `detect` `decode` `encode` `isBinary` | 编码检测/转换(主进程 EncodingService) |
|
|
53
53
|
| `decorations` | 4 | `registerProvider` `unregisterProvider` `getDecoration` `onDidChange` | 文件装饰——池内本地注册表(零 IPC) |
|
|
54
|
-
| `fileAssociation` |
|
|
54
|
+
| `fileAssociation` | 4 | `getPluginFor` `listHandlersFor` `setDefault` `setDefaultBulk` | 文件关联——扩展名→插件 ID(主进程 FileAssociationService 直答) |
|
|
55
55
|
| `langDef` | 1 | `get` | langDef——语言定义注册表(主进程直答) |
|
|
56
56
|
| `lsp` | 4 | `spawn` `write` `dispose` `onData` | LSP 桥——自动补全/F12/诊断/重命名 |
|
|
57
57
|
| `protocol` | 3 | `listProtocols` `getActiveProtocolId` `setActiveProtocolId` | protocol——协议注册表(主进程直答) |
|
|
@@ -242,6 +242,7 @@ export const linkdeskMock: Record<string, unknown> = {
|
|
|
242
242
|
getPluginFor: async (..._args: unknown[]) => { console.info("[linkdesk-mock] fileAssociation.getPluginFor", ..._args); },
|
|
243
243
|
listHandlersFor: async (..._args: unknown[]) => { console.info("[linkdesk-mock] fileAssociation.listHandlersFor", ..._args); return []; },
|
|
244
244
|
setDefault: async (..._args: unknown[]) => { console.info("[linkdesk-mock] fileAssociation.setDefault", ..._args); },
|
|
245
|
+
setDefaultBulk: async (..._args: unknown[]) => { console.info("[linkdesk-mock] fileAssociation.setDefaultBulk", ..._args); },
|
|
245
246
|
},
|
|
246
247
|
langDef: {
|
|
247
248
|
get: async (..._args: unknown[]) => { console.info("[linkdesk-mock] langDef.get", ..._args); },
|
package/package.json
CHANGED
|
@@ -1,97 +1,97 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@linkdesk/plugin-sdk",
|
|
3
|
-
"version": "0.1.
|
|
4
|
-
"description": "@linkdesk/plugin-sdk——LinkDesk 插件作者 SDK(对标 @types/vscode):window.linkdesk.* 类型 + 一键 build(.linkdesk-plugin) + dev 宿主 + plugin.json 验证 + eslint 门禁(E6#54d)。作者 npm i 后零壳源码依赖。",
|
|
5
|
-
"type": "module",
|
|
6
|
-
"main": "./dist/index.js",
|
|
7
|
-
"types": "./dist/index.d.ts",
|
|
8
|
-
"exports": {
|
|
9
|
-
".": {
|
|
10
|
-
"types": "./dist/index.d.ts",
|
|
11
|
-
"default": "./dist/index.js"
|
|
12
|
-
},
|
|
13
|
-
"./eslint": {
|
|
14
|
-
"types": "./dist/eslint/index.d.ts",
|
|
15
|
-
"default": "./dist/eslint/index.js"
|
|
16
|
-
},
|
|
17
|
-
"./vitest-setup": {
|
|
18
|
-
"types": "./dist/vitest-setup.d.ts",
|
|
19
|
-
"default": "./dist/vitest-setup.js"
|
|
20
|
-
},
|
|
21
|
-
"./test-audit": {
|
|
22
|
-
"types": "./test-audit.d.ts",
|
|
23
|
-
"default": "./test-audit.mjs"
|
|
24
|
-
},
|
|
25
|
-
"./svg-wellformed": {
|
|
26
|
-
"types": "./svg-wellformed.d.ts",
|
|
27
|
-
"default": "./svg-wellformed.mjs"
|
|
28
|
-
},
|
|
29
|
-
"./package.json": "./package.json",
|
|
30
|
-
"./own-dict-coverage": {
|
|
31
|
-
"types": "./own-dict-coverage.d.ts",
|
|
32
|
-
"default": "./own-dict-coverage.mjs"
|
|
33
|
-
},
|
|
34
|
-
"./check-config-titles": {
|
|
35
|
-
"types": "./check-config-titles.d.ts",
|
|
36
|
-
"default": "./check-config-titles.mjs"
|
|
37
|
-
}
|
|
38
|
-
},
|
|
39
|
-
"files": [
|
|
40
|
-
"dist",
|
|
41
|
-
"schemas",
|
|
42
|
-
"dev-host",
|
|
43
|
-
"test-audit.mjs",
|
|
44
|
-
"test-audit.d.ts",
|
|
45
|
-
"svg-wellformed.mjs",
|
|
46
|
-
"svg-wellformed.d.ts",
|
|
47
|
-
"own-dict-coverage.mjs",
|
|
48
|
-
"own-dict-coverage.d.ts",
|
|
49
|
-
"check-config-titles.mjs",
|
|
50
|
-
"check-config-titles.d.ts"
|
|
51
|
-
],
|
|
52
|
-
"sideEffects": false,
|
|
53
|
-
"bin": {
|
|
54
|
-
"linkdesk-plugin-sdk": "./dist/bin.js"
|
|
55
|
-
},
|
|
56
|
-
"publishConfig": {
|
|
57
|
-
"access": "public"
|
|
58
|
-
},
|
|
59
|
-
"engines": {
|
|
60
|
-
"node": ">=20.0.0"
|
|
61
|
-
},
|
|
62
|
-
"scripts": {
|
|
63
|
-
"build": "node -e \"require('node:fs').rmSync('dist',{recursive:true,force:true})\" && tsc -p tsconfig.build.json",
|
|
64
|
-
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
65
|
-
"prepack": "npm run build"
|
|
66
|
-
},
|
|
67
|
-
"dependencies": {
|
|
68
|
-
"@linkdesk/contracts": "^0.1.1",
|
|
69
|
-
"@typescript-eslint/eslint-plugin": "^8.0.0",
|
|
70
|
-
"@typescript-eslint/parser": "^8.0.0",
|
|
71
|
-
"@vitejs/plugin-react": "^4.3.4",
|
|
72
|
-
"ajv": "^8.17.1",
|
|
73
|
-
"eslint": "^9.0.0",
|
|
74
|
-
"eslint-import-resolver-typescript": "^4.4.5",
|
|
75
|
-
"eslint-plugin-import-x": "^4.17.1",
|
|
76
|
-
"eslint-plugin-react-hooks": "^7.1.1",
|
|
77
|
-
"i18next": "^26.3.6",
|
|
78
|
-
"jsonc-parser": "^3.3.1",
|
|
79
|
-
"jszip": "^3.10.1",
|
|
80
|
-
"react": "^18.3.1",
|
|
81
|
-
"react-dom": "^18.3.1",
|
|
82
|
-
"react-i18next": "^17.0.10",
|
|
83
|
-
"saxes": "^6.0.0",
|
|
84
|
-
"vite": "^6.0.0"
|
|
85
|
-
},
|
|
86
|
-
"devDependencies": {
|
|
87
|
-
"@types/node": "^24.0.0",
|
|
88
|
-
"typescript": "^5.9.0"
|
|
89
|
-
},
|
|
90
|
-
"keywords": [
|
|
91
|
-
"linkdesk",
|
|
92
|
-
"plugin",
|
|
93
|
-
"sdk",
|
|
94
|
-
"vite"
|
|
95
|
-
],
|
|
96
|
-
"license": "MIT"
|
|
97
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@linkdesk/plugin-sdk",
|
|
3
|
+
"version": "0.1.78",
|
|
4
|
+
"description": "@linkdesk/plugin-sdk——LinkDesk 插件作者 SDK(对标 @types/vscode):window.linkdesk.* 类型 + 一键 build(.linkdesk-plugin) + dev 宿主 + plugin.json 验证 + eslint 门禁(E6#54d)。作者 npm i 后零壳源码依赖。",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./dist/index.js",
|
|
7
|
+
"types": "./dist/index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"types": "./dist/index.d.ts",
|
|
11
|
+
"default": "./dist/index.js"
|
|
12
|
+
},
|
|
13
|
+
"./eslint": {
|
|
14
|
+
"types": "./dist/eslint/index.d.ts",
|
|
15
|
+
"default": "./dist/eslint/index.js"
|
|
16
|
+
},
|
|
17
|
+
"./vitest-setup": {
|
|
18
|
+
"types": "./dist/vitest-setup.d.ts",
|
|
19
|
+
"default": "./dist/vitest-setup.js"
|
|
20
|
+
},
|
|
21
|
+
"./test-audit": {
|
|
22
|
+
"types": "./test-audit.d.ts",
|
|
23
|
+
"default": "./test-audit.mjs"
|
|
24
|
+
},
|
|
25
|
+
"./svg-wellformed": {
|
|
26
|
+
"types": "./svg-wellformed.d.ts",
|
|
27
|
+
"default": "./svg-wellformed.mjs"
|
|
28
|
+
},
|
|
29
|
+
"./package.json": "./package.json",
|
|
30
|
+
"./own-dict-coverage": {
|
|
31
|
+
"types": "./own-dict-coverage.d.ts",
|
|
32
|
+
"default": "./own-dict-coverage.mjs"
|
|
33
|
+
},
|
|
34
|
+
"./check-config-titles": {
|
|
35
|
+
"types": "./check-config-titles.d.ts",
|
|
36
|
+
"default": "./check-config-titles.mjs"
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
"files": [
|
|
40
|
+
"dist",
|
|
41
|
+
"schemas",
|
|
42
|
+
"dev-host",
|
|
43
|
+
"test-audit.mjs",
|
|
44
|
+
"test-audit.d.ts",
|
|
45
|
+
"svg-wellformed.mjs",
|
|
46
|
+
"svg-wellformed.d.ts",
|
|
47
|
+
"own-dict-coverage.mjs",
|
|
48
|
+
"own-dict-coverage.d.ts",
|
|
49
|
+
"check-config-titles.mjs",
|
|
50
|
+
"check-config-titles.d.ts"
|
|
51
|
+
],
|
|
52
|
+
"sideEffects": false,
|
|
53
|
+
"bin": {
|
|
54
|
+
"linkdesk-plugin-sdk": "./dist/bin.js"
|
|
55
|
+
},
|
|
56
|
+
"publishConfig": {
|
|
57
|
+
"access": "public"
|
|
58
|
+
},
|
|
59
|
+
"engines": {
|
|
60
|
+
"node": ">=20.0.0"
|
|
61
|
+
},
|
|
62
|
+
"scripts": {
|
|
63
|
+
"build": "node -e \"require('node:fs').rmSync('dist',{recursive:true,force:true})\" && tsc -p tsconfig.build.json",
|
|
64
|
+
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
65
|
+
"prepack": "npm run build"
|
|
66
|
+
},
|
|
67
|
+
"dependencies": {
|
|
68
|
+
"@linkdesk/contracts": "^0.1.1",
|
|
69
|
+
"@typescript-eslint/eslint-plugin": "^8.0.0",
|
|
70
|
+
"@typescript-eslint/parser": "^8.0.0",
|
|
71
|
+
"@vitejs/plugin-react": "^4.3.4",
|
|
72
|
+
"ajv": "^8.17.1",
|
|
73
|
+
"eslint": "^9.0.0",
|
|
74
|
+
"eslint-import-resolver-typescript": "^4.4.5",
|
|
75
|
+
"eslint-plugin-import-x": "^4.17.1",
|
|
76
|
+
"eslint-plugin-react-hooks": "^7.1.1",
|
|
77
|
+
"i18next": "^26.3.6",
|
|
78
|
+
"jsonc-parser": "^3.3.1",
|
|
79
|
+
"jszip": "^3.10.1",
|
|
80
|
+
"react": "^18.3.1",
|
|
81
|
+
"react-dom": "^18.3.1",
|
|
82
|
+
"react-i18next": "^17.0.10",
|
|
83
|
+
"saxes": "^6.0.0",
|
|
84
|
+
"vite": "^6.0.0"
|
|
85
|
+
},
|
|
86
|
+
"devDependencies": {
|
|
87
|
+
"@types/node": "^24.0.0",
|
|
88
|
+
"typescript": "^5.9.0"
|
|
89
|
+
},
|
|
90
|
+
"keywords": [
|
|
91
|
+
"linkdesk",
|
|
92
|
+
"plugin",
|
|
93
|
+
"sdk",
|
|
94
|
+
"vite"
|
|
95
|
+
],
|
|
96
|
+
"license": "MIT"
|
|
97
|
+
}
|
|
@@ -372,7 +372,7 @@
|
|
|
372
372
|
"enumDescriptions": { "type": "object", "description": "enum value → display name mapping" },
|
|
373
373
|
"description": { "type": "string" },
|
|
374
374
|
"title": { "type": "string", "description": "Row display name — the short human-readable label shown as the settings row name and on the marketplace features tab (optional — omitted = the settings row falls back to showing the configuration key). Value convention matches description: the Chinese source text IS the i18n key; English translations go in your plugin's i18n/en.json. Keep it a noun phrase (≤12 characters, drop the plugin-name prefix); rows with renderHint \"action\" take a verb-phrase name instead (it reads as a button label)." },
|
|
375
|
-
"uiHint": { "type": "string", "description": "Settings editor rendering hint — SettingsView picks the control from the hint. Known hints: slider, fontSize, color, fontFamily, file, directory, image, segmented, fontTone, accentSource, themePicker, select, stringList. A hint the installed renderer does not know is shown read-only — the current value plus a tooltip saying the declared control is unsupported (no editable fallback control, no error thrown). The value is an open string, so third parties may declare new hint names." },
|
|
375
|
+
"uiHint": { "type": "string", "description": "Settings editor rendering hint — SettingsView picks the control from the hint. Known hints: slider, fontSize, color, fontFamily, file, directory, image, segmented, fontTone, accentSource, themePicker, select, stringList, fileAssociationsManager. A hint the installed renderer does not know is shown read-only — the current value plus a tooltip saying the declared control is unsupported (no editable fallback control, no error thrown). The value is an open string, so third parties may declare new hint names." },
|
|
376
376
|
"renderHint": { "type": "string", "description": "Rendering hint for special rows — \"action\" renders a button (its text comes from description, clicking runs actionCommand); \"readonly\" renders a read-only status line whose value comes from executing statusCommand; \"color\" renders a read-only color row (swatch + value). \"readonly\"/\"action\" are shorthands meaning the row's primary control IS the status line/button: statusCommand and actionCommand may also be declared alongside any primary control, rendering as companions to its right ([primary control][companion button][companion readonly]). Known hints: readonly, action, color. An unknown hint is shown read-only (current value + explanatory tooltip). Open string." },
|
|
377
377
|
"actionCommand": { "type": "string", "description": "Command executed when an \"action\" button is clicked — a shell command id or one of your own (resolved when clicked). May be declared alongside any primary control: it then renders as a companion button to the right of that control, with its text taken from description." },
|
|
378
378
|
"actionDisabledAll": { "type": "array", "description": "Disable the \"action\" button while every entry matches the current configuration value (omit the field entirely — or pass an empty list — to keep the button always enabled)", "items": { "type": "object", "required": ["key", "value"], "properties": { "key": { "type": "string" }, "value": {} }, "additionalProperties": false } },
|