@linkdesk/plugin-sdk 0.1.69 → 0.1.71

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
@@ -18,7 +18,7 @@ npm install -D @linkdesk/plugin-sdk
18
18
  > 自动生成,**勿手改**——由 `scripts/generate-api-cheatsheet.mjs` 从 `@linkdesk/contracts` 的 `linkdesk.d.ts` 现读产出,
19
19
  > `npm run check` 机械盯漂。完整签名与逐方法说明见 `linkdesk.d.ts` 本体(IDE 里可直接跳转)。
20
20
 
21
- **15 个域接口 → 46 个命名空间 / 252 个方法**,全部经 `window.linkdesk.<命名空间>.<方法>` 调用。 (plus 1 deprecated alias/es `config`, not counted twice)
21
+ **16 个域接口 → 47 个命名空间 / 254 个方法**,全部经 `window.linkdesk.<命名空间>.<方法>` 调用。 (plus 1 deprecated alias/es `config`, not counted twice)
22
22
 
23
23
  | Namespace | Methods | Method | Notes |
24
24
  |:--|:--:|:--|:--|
@@ -28,6 +28,7 @@ npm install -D @linkdesk/plugin-sdk
28
28
  | `theme` | 11 | `getCurrent` `getAvailable` `apply` `listRecipes` `getActive` `getEffectiveTokens` `setRecipe` `setColorway` `resetAppearance` `resetMix` `getBaselineSeeds` | —— |
29
29
  | `language` | 5 | `getCurrent` `getAvailable` `set` `getInitial` `onChange` | —— |
30
30
  | `appearance` | 2 | `importImage` `revealStorage` | 外观资产——本地选图拷贝入库(受控来源——用户任选路径不能 file:// 直读) |
31
+ | `storage` ⚠️ | 2 | `revealCache` `cacheDir` | —— |
31
32
  | `tabs` | 9 | `create` `openOrFocus` `focus` `close` `focusBySourceId` `updateLabelBySourceId` `closeBySourceId` `onDidChangeActiveTab` `list` | —— |
32
33
  | `keybindings` | 12 | `getKeybindings` `getConflicts` `registerKeybinding` `saveUserKeybindings` `removeKeybindingForCommand` `resetKeybindingToDefault` `findKeybindingForCommand` `setKeybindingCaptureActive` `keyboardEventToKeyString` `onChange` `syncToMainProcess`° `onForwardedEvent`° | —— |
33
34
  | `notifications` | 3 | `show` `list` `subscribe` | 通知——插件弹通知(唯一通知面 = 铃铛宽通知面板,右下窄卡链路已整删),对标 VS Code vscode.wind… |
@@ -69,7 +70,7 @@ npm install -D @linkdesk/plugin-sdk
69
70
  | `app` | 1 | `getVersion` | app 命名空间——只读产品身份 |
70
71
  | `update` | 1 | `getState` | update 命名空间——只读更新状态(供「关于」类插件读宿主版本/更新态) |
71
72
 
72
- ⚠️ = optional namespace in the contract (injected on one side only): `bridge` `hotExit` — check for existence before calling; on the other side it is undefined.
73
+ ⚠️ = optional namespace in the contract (injected on one side only): `storage` `bridge` `hotExit` — check for existence before calling; on the other side it is undefined.
73
74
  ° = member marked `?` in the contract: injected in one side's preload only (almost always shell-side). **Your plugin runs in the pool** — check for existence before calling.
74
75
 
75
76
  <!-- END API-CHEATSHEET -->
@@ -0,0 +1,58 @@
1
+ /**
2
+ * @linkdesk/plugin-sdk/check-config-titles 的类型声明(实现 = 同目录 check-config-titles.mjs,免构建直发)。
3
+ * 三族判据与 severity 归属见 .mjs 头注——那里是单一真源,这里不重述。
4
+ */
5
+
6
+ export interface TitleGapBase {
7
+ /** 配置键(contributes.configuration.properties 的键) */
8
+ key: string;
9
+ /** 声明的节名(group,未声明 = 空串) */
10
+ group: string;
11
+ }
12
+
13
+ export interface NoTitleGap extends TitleGapBase {}
14
+
15
+ export interface MissingEnGap extends TitleGapBase {
16
+ /** 声明的 title 原文(中文原文 = i18n key) */
17
+ title: string;
18
+ }
19
+
20
+ export interface MissingEnumDescriptionsGap extends TitleGapBase {
21
+ /** enum 档位数 */
22
+ enumCount: number;
23
+ }
24
+
25
+ export interface ConfigTitleGaps {
26
+ scanned: { properties: number; enums: number };
27
+ /** ① 无 title */
28
+ noTitle: NoTitleGap[];
29
+ /** ② title 缺本仓字典译名(dictKeys 未传 = 空数组——⑧ 段 own-dict 红管辖同域) */
30
+ missingEn: MissingEnGap[];
31
+ /** ③ 有 enum 缺 enumDescriptions */
32
+ missingEnumDescriptions: MissingEnumDescriptionsGap[];
33
+ /** 是否存在非空 contributes.configuration.properties(false = 无判据对象) */
34
+ hasConfiguration: boolean;
35
+ }
36
+
37
+ /**
38
+ * 三族缺口收集——**纯函数**(不读盘)。dictKeys = 本仓自有字典 key 集(⑧ 段 cov.dict.keys);
39
+ * 不传 = 跳过 ② 族(无字典可对,缺译归 ⑧ 红)。
40
+ */
41
+ export declare function collectConfigTitleGaps(
42
+ manifest: unknown,
43
+ options?: { dictKeys?: Set<string> },
44
+ ): ConfigTitleGaps;
45
+
46
+ /** 黄单一行——三族同款格式(两轴打印同款,免得同一条错两种说法)。 */
47
+ export declare function formatTitleGap(
48
+ family: "noTitle" | "missingEn" | "missingEnumDescriptions",
49
+ gap: TitleGapBase & Partial<MissingEnGap & MissingEnumDescriptionsGap>,
50
+ ): string;
51
+
52
+ /** 修法指路——按族给因。 */
53
+ export declare function titleGapHint(
54
+ family: "noTitle" | "missingEn" | "missingEnumDescriptions",
55
+ ): string;
56
+
57
+ /** 口径一句话——门禁与文档互钉用。 */
58
+ export declare const CONFIG_TITLES_CALIBER: string;
@@ -0,0 +1,91 @@
1
+ /**
2
+ * `check-config-titles`——配置项短名(`contributes.configuration.properties.*.title`)三族判据。
3
+ * **D6 分级门禁的插件侧「黄灯腿」判据本体**(2026-10-04 配置项短名案,层 1)。
4
+ *
5
+ * ── 三族判据(01 层 1)──
6
+ * ① 无 `title` —— 声明了 configuration.properties 却没给行名短名 ⇒ 黄
7
+ * (设置页/市场功能页只能裸显英文配置键,D1 的「人话行名」缺位)
8
+ * ② 有 `title` 缺译名 —— title 值(中文原文 = i18n key)不在本仓自有字典 ⇒ 黄
9
+ * ⚠️ **本族与 own-dict-coverage ⑧ 段同域**——⑧ 对「可渲染串缺译」判**红**
10
+ * (manifest 腿),此处只作黄灯汇总;且 ⑧ 连「本仓零字典声明」的形态一起管。
11
+ * 调用方把 ⑧ 的 `dict.keys` 传进来即可复用(⛔ 不在两处各自读盘,两把尺子同一份实现)。
12
+ * ③ 有 enum 缺 `enumDescriptions` —— 枚举值无显示名 ⇒ 设置页下拉裸显英文值(取证 ⑦)
13
+ *
14
+ * ── severity 归调用方 ──
15
+ * 本模块是**纯判据**(无 fs、无 process.exit):官方各仓 CI(ci-verify ⑨ 段)内测期按 **warn** 消费
16
+ * ——列黄单不判红;预留 `--strict`(v1 正式版统一切红,E21——黄单清零前 ⛔ 无预告判红)。
17
+ * 壳是软件本体、一步红灯不设黄灯——壳侧红门禁(壳 scripts/check-config-titles.mjs 默认模式)
18
+ * 只借本模块的 `--plugin` 模式(同一份三族判据),壳四文件的 TS 提取与「无 title 判红」住壳侧脚本。
19
+ *
20
+ * 自测口径(⛔ 空转判据 ≠ 零存量):真缺 title 的 fixture 必须出黄、齐全 fixture 必须安静
21
+ * ——见 src/check-config-titles.test.ts。
22
+ */
23
+
24
+ /** 一句话口径——报错文案与文档同源引用 */
25
+ export const CONFIG_TITLES_CALIBER =
26
+ "配置项短名(title)= 设置页与市场功能页的行级人话名——谁的声明谁补名,缺省时渲染回退显配置键(D1/D2)。";
27
+
28
+ /**
29
+ * 从 manifest 收集三族缺口。**纯函数**(不读盘):
30
+ * @param manifest 已解析的 plugin.json(任意形状——形状不对按「无 configuration」处理)
31
+ * @param options.dictKeys 本仓自有字典的 key 集合(⑧ 段 cov.dict.keys);不传 = 跳过 ② 族(无字典可对)
32
+ * @returns {{ scanned: {properties: number, enums: number}, noTitle: Array<{key: string, group: string}>,
33
+ * missingEn: Array<{key: string, title: string}>, missingEnumDescriptions: Array<{key: string, group: string, enumCount: number}>,
34
+ * hasConfiguration: boolean }}
35
+ */
36
+ export function collectConfigTitleGaps(manifest, options = {}) {
37
+ const props = manifest?.contributes?.configuration?.properties;
38
+ const out = {
39
+ scanned: { properties: 0, enums: 0 },
40
+ noTitle: [],
41
+ missingEn: [],
42
+ missingEnumDescriptions: [],
43
+ hasConfiguration: Boolean(
44
+ props && typeof props === "object" && Object.keys(props).length > 0,
45
+ ),
46
+ };
47
+ if (!out.hasConfiguration) return out;
48
+ const dictKeys = options.dictKeys instanceof Set ? options.dictKeys : null;
49
+ for (const [key, prop] of Object.entries(props)) {
50
+ // E6#151 同口径:形状不可信——非对象条目剔出判域(manifest 校验拦形状,这里不重复报)
51
+ if (!prop || typeof prop !== "object" || Array.isArray(prop)) continue;
52
+ out.scanned.properties += 1;
53
+ const group = typeof prop.group === "string" ? prop.group : "";
54
+ if (typeof prop.title !== "string" || prop.title.trim() === "") {
55
+ out.noTitle.push({ key, group });
56
+ } else if (dictKeys && !dictKeys.has(prop.title)) {
57
+ out.missingEn.push({ key, title: prop.title });
58
+ }
59
+ const hasEnum = Array.isArray(prop.enum) && prop.enum.length > 0;
60
+ if (hasEnum) {
61
+ out.scanned.enums += 1;
62
+ const ed = prop.enumDescriptions;
63
+ // 空对象/空数组 = 没给(占位也算缺——下拉照样裸显英文值)
64
+ const edUsable =
65
+ Array.isArray(ed)
66
+ ? ed.length > 0
67
+ : ed !== null && typeof ed === "object" && Object.keys(ed).length > 0;
68
+ if (!edUsable) {
69
+ out.missingEnumDescriptions.push({ key, group, enumCount: prop.enum.length });
70
+ }
71
+ }
72
+ }
73
+ return out;
74
+ }
75
+
76
+ /** 黄单一行——三族同款格式(key 打头,组名随行) */
77
+ export function formatTitleGap(family, gap) {
78
+ const at = gap.group ? `(节:${gap.group})` : "";
79
+ if (family === "noTitle") return `无 title——设置页/市场只能裸显配置键:${gap.key}${at}`;
80
+ if (family === "missingEn") return `title「${gap.title}」缺 en 译名(配置键 ${gap.key})——英文界面回退显中文`;
81
+ return `enum ${gap.enumCount} 档全无 enumDescriptions——下拉裸显英文值:${gap.key}${at}`;
82
+ }
83
+
84
+ /** 修法指路——三族各一句(文案与 own-dict 的 hint 同风格:说清落点,不让人猜) */
85
+ export function titleGapHint(family) {
86
+ if (family === "noTitle")
87
+ return `在本仓 plugin.json 的该条声明里加 "title": "<中文短名>"(≤12 字名词短语、去插件前缀;renderHint "action" 行按按钮语义起动词名),en 译名进本仓 i18n/en.json。`;
88
+ if (family === "missingEn")
89
+ return `把 title 的中文原文作为 key 补进本仓 i18n/en.json(谁声明谁供译——英译不进壳的语言包)。`;
90
+ return `给该条声明补 "enumDescriptions"(对象形态:enum 值 → 中文显示名),en 译名同笔进 i18n/en.json。`;
91
+ }
@@ -28,8 +28,9 @@
28
28
  --border: #3C3C3C;
29
29
  --separator: #474747;
30
30
  --icon-inactive: #858585;
31
- --icon-filter-inactive: brightness(0) saturate(100%) invert(52%);
32
- --icon-filter-active: brightness(0) saturate(100%) invert(100%);
31
+ --icon-ink: color-mix(in srgb, var(--text-primary) 78%, transparent);
32
+ --icon-ink-hover: color-mix(in srgb, var(--text-primary) 92%, transparent);
33
+ --icon-ink-active: var(--text-primary);
33
34
  --system-log: #6A6A6A;
34
35
  --sent-echo: #0078D4;
35
36
  --status-connected: #4EC9B0;
@@ -81,6 +81,10 @@ export const linkdeskMock: Record<string, unknown> = {
81
81
  importImage: async (..._args: unknown[]) => { console.info("[linkdesk-mock] appearance.importImage", ..._args); return ""; },
82
82
  revealStorage: async (..._args: unknown[]) => { console.info("[linkdesk-mock] appearance.revealStorage", ..._args); },
83
83
  },
84
+ storage: {
85
+ revealCache: async (..._args: unknown[]) => { console.info("[linkdesk-mock] storage.revealCache", ..._args); },
86
+ cacheDir: async (..._args: unknown[]) => { console.info("[linkdesk-mock] storage.cacheDir", ..._args); return ""; },
87
+ },
84
88
  tabs: {
85
89
  create: async (..._args: unknown[]) => { console.info("[linkdesk-mock] tabs.create", ..._args); },
86
90
  openOrFocus: async (..._args: unknown[]) => { console.info("[linkdesk-mock] tabs.openOrFocus", ..._args); },
@@ -106,6 +106,11 @@ export const RENDERABLE_MANIFEST_FIELDS = [
106
106
  field: "description",
107
107
  consumer: "设置项说明(settings 仓 t(prop.description))",
108
108
  },
109
+ {
110
+ steps: ["contributes", "configuration", "properties", "*"],
111
+ field: "title",
112
+ consumer: "设置项行名短名(配置项短名案 D1/D4,2026-10-04——settings 仓 t(prop.title),缺省回退显配置键)",
113
+ },
109
114
  {
110
115
  steps: ["contributes", "configuration", "properties", "*"],
111
116
  field: "group",
package/package.json CHANGED
@@ -1,91 +1,97 @@
1
- {
2
- "name": "@linkdesk/plugin-sdk",
3
- "version": "0.1.69",
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
- },
35
- "files": [
36
- "dist",
37
- "schemas",
38
- "dev-host",
39
- "test-audit.mjs",
40
- "test-audit.d.ts",
41
- "svg-wellformed.mjs",
42
- "svg-wellformed.d.ts",
43
- "own-dict-coverage.mjs",
44
- "own-dict-coverage.d.ts"
45
- ],
46
- "sideEffects": false,
47
- "bin": {
48
- "linkdesk-plugin-sdk": "./dist/bin.js"
49
- },
50
- "publishConfig": {
51
- "access": "public"
52
- },
53
- "engines": {
54
- "node": ">=20.0.0"
55
- },
56
- "scripts": {
57
- "build": "node -e \"require('node:fs').rmSync('dist',{recursive:true,force:true})\" && tsc -p tsconfig.build.json",
58
- "typecheck": "tsc -p tsconfig.json --noEmit",
59
- "prepack": "npm run build"
60
- },
61
- "dependencies": {
62
- "@linkdesk/contracts": "^0.1.1",
63
- "@typescript-eslint/eslint-plugin": "^8.0.0",
64
- "@typescript-eslint/parser": "^8.0.0",
65
- "@vitejs/plugin-react": "^4.3.4",
66
- "ajv": "^8.17.1",
67
- "eslint": "^9.0.0",
68
- "eslint-import-resolver-typescript": "^4.4.5",
69
- "eslint-plugin-import-x": "^4.17.1",
70
- "eslint-plugin-react-hooks": "^7.1.1",
71
- "i18next": "^26.3.6",
72
- "jsonc-parser": "^3.3.1",
73
- "jszip": "^3.10.1",
74
- "react": "^18.3.1",
75
- "react-dom": "^18.3.1",
76
- "react-i18next": "^17.0.10",
77
- "saxes": "^6.0.0",
78
- "vite": "^6.0.0"
79
- },
80
- "devDependencies": {
81
- "@types/node": "^24.0.0",
82
- "typescript": "^5.9.0"
83
- },
84
- "keywords": [
85
- "linkdesk",
86
- "plugin",
87
- "sdk",
88
- "vite"
89
- ],
90
- "license": "MIT"
91
- }
1
+ {
2
+ "name": "@linkdesk/plugin-sdk",
3
+ "version": "0.1.71",
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
+ }
@@ -757,6 +757,10 @@
757
757
  "ldk-dialog-host-title",
758
758
  "ldk-drop-glass-zone",
759
759
  "ldk-dropdown-card",
760
+ "ldk-effective-badge",
761
+ "ldk-effective-badge-label",
762
+ "ldk-effective-badge-value",
763
+ "ldk-effective-swatch",
760
764
  "ldk-empty-stage",
761
765
  "ldk-empty-stage-mark",
762
766
  "ldk-empty-stage-sr",
@@ -795,10 +799,13 @@
795
799
  "ldk-icon-bar",
796
800
  "ldk-icon-bar-bottom",
797
801
  "ldk-icon-bar-item-wrapper",
802
+ "ldk-icon-bar-plugin-icon",
798
803
  "ldk-icon-bar-top",
799
804
  "ldk-icon-btn",
800
805
  "ldk-icon-drag-preview",
801
806
  "ldk-icon-drop-indicator",
807
+ "ldk-image-picker",
808
+ "ldk-image-picker__path",
802
809
  "ldk-inline-input",
803
810
  "ldk-inline-input--compact",
804
811
  "ldk-inline-input--normal",
@@ -866,6 +873,7 @@
866
873
  "ldk-notif-task-section-rule",
867
874
  "ldk-number-input",
868
875
  "ldk-number-input-btn",
876
+ "ldk-number-input-cell",
869
877
  "ldk-number-input-field",
870
878
  "ldk-number-input-unit",
871
879
  "ldk-panel-content",
@@ -990,6 +998,12 @@
990
998
  "ldk-rn-w90",
991
999
  "ldk-scroll-y",
992
1000
  "ldk-section-subtitle",
1001
+ "ldk-segment-preview",
1002
+ "ldk-segment-preview--accent",
1003
+ "ldk-segment-preview--split",
1004
+ "ldk-segment-preview__half",
1005
+ "ldk-segment-preview__half--deep",
1006
+ "ldk-segment-preview__half--light",
993
1007
  "ldk-segmented-radio",
994
1008
  "ldk-segmented-radio__label",
995
1009
  "ldk-segmented-radio__option",
@@ -1048,6 +1062,9 @@
1048
1062
  "ldk-slider-root",
1049
1063
  "ldk-slider-step",
1050
1064
  "ldk-slider-value",
1065
+ "ldk-source-badge",
1066
+ "ldk-source-badge--mix",
1067
+ "ldk-source-badge--user",
1051
1068
  "ldk-split-handle",
1052
1069
  "ldk-status-bar",
1053
1070
  "ldk-status-bar-btn",
@@ -36,6 +36,8 @@
36
36
  "app.osIntegration.fileAssoc",
37
37
  "app.osIntegration.fileMenu",
38
38
  "app.schemaVersion",
39
+ "app.storage.cacheDir",
40
+ "app.storage.openCacheDir",
39
41
  "app.surfaceRadius",
40
42
  "app.theme",
41
43
  "app.themeColor",
@@ -57,6 +59,7 @@
57
59
  "editorCount",
58
60
  "editorHasSelection",
59
61
  "inputFocus",
62
+ "settingsActiveIsBuiltin",
60
63
  "settingsSlotFilled",
61
64
  "sidebarPosition",
62
65
  "updateActionable",
@@ -126,6 +129,15 @@
126
129
  "replacedBy": "(无——关闭即当帧消失,无退场动画;关闭前 120ms 等待同笔删除)",
127
130
  "landing": "src/pool/shared/group-tab-bar/GroupTabBar.css",
128
131
  "approvedBy": "用户 · 2026-09-27"
132
+ },
133
+ {
134
+ "name": "app.storage.cacheDir",
135
+ "kind": "configKey",
136
+ "since": "2026-10-04",
137
+ "why": "04-软件更新〔设置行-控制只读同行〕D3(2026-10-03 用户拍板「合并回一行」):缓存目录两行并成一行——主件 app.storage.openCacheDir 同载 actionCommand + statusCommand(伴生声明正交化,01 §1.2 表第 ③ 行 `[按钮][只读路径]`)。本键的「缓存在哪」只读语义改由主键的**伴生只读**承载;描述串「缓存目录——缓存文件实际存放的位置(只读,软件内不可改)」一并退役(合并行的按钮文案与行说明**共用主键 description**,长句会把按钮撑成横条)",
138
+ "replacedBy": "app.storage.openCacheDir(同键伴生 statusCommand: storage.cacheDirStatus)",
139
+ "landing": "electron/ipc/handlers/storage-handlers.ts:26(resolveEffectiveCacheDir 仍读 settings.json 平键;界面侧改读 storage.cacheDirStatus 命令)",
140
+ "approvedBy": "用户 · 2026-10-03"
129
141
  }
130
142
  ]
131
143
  }
@@ -371,11 +371,12 @@
371
371
  "enum": { "type": "array" },
372
372
  "enumDescriptions": { "type": "object", "description": "enum value → display name mapping" },
373
373
  "description": { "type": "string" },
374
- "uiHint": { "type": "string", "description": "Settings editor rendering hint. SettingsView picks the control from the hint. An unknown hint falls back to the default rendering for its type — no error is thrown. The value is an open string, so third parties may declare new hint names." },
375
- "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. Open string — an unknown hint falls back to the default rendering for the type." },
376
- "actionCommand": { "type": "string", "description": "Command executed when an \"action\" button is clicked — a shell command id or one of your own (resolved when clicked)" },
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." },
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
+ "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." },
377
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 } },
378
- "statusCommand": { "type": "string", "description": "Command whose return value (a string) is shown by a \"readonly\" status line — the value comes from the command, not from configuration storage, so a status row can show live runtime state. Shell command id or one of your own." },
379
+ "statusCommand": { "type": "string", "description": "Command whose return value (a string) is shown by a \"readonly\" status line — the value comes from the command, not from configuration storage, so a status row can show live runtime state. The settings view polls it (every 3s by default; polling pauses while the window is hidden). Shell command id or one of your own. The command must be cheap, idempotent and side-effect free — it may be called repeatedly in the background. May be declared alongside any primary control: it then renders as a companion read-only line to the right of that control. Without a primary control, declare renderHint \"readonly\" so the status line becomes the row's main control." },
379
380
  "monoOnly": { "type": "boolean", "description": "Monospace only — meaningful only with uiHint \"fontFamily\". true/omitted = list monospace families only (editor fonts); false = all families (UI fonts)." },
380
381
  "minimum": { "type": "number", "description": "Numeric lower bound — applies when type is number (range of the slider/numeric control)" },
381
382
  "maximum": { "type": "number", "description": "Numeric upper bound — applies when type is number (range of the slider/numeric control)" },