@linkdesk/plugin-docs 0.1.17 → 0.1.23
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/docs/05-ui-conventions.md +15 -2
- package/docs/16-naming-conventions.md +48 -0
- package/docs/19-component-cheatsheet.md +1 -0
- package/docs/zh/05-/346/217/222/344/273/266UI/345/206/231/346/263/225/350/247/204/347/272/246.md +6 -2
- package/docs/zh/16-/345/221/275/345/220/215/350/247/204/350/214/203.md +37 -0
- package/docs/zh/19-/347/273/204/344/273/266/351/200/237/346/237/245.md +1 -0
- package/package.json +1 -1
|
@@ -550,7 +550,7 @@ both stylesheets land on the same element.
|
|
|
550
550
|
| Source | Reserved names | Notes |
|
|
551
551
|
|---|---|---|
|
|
552
552
|
| The input-box utility the host **gives you** | `.ldk-input` | Input-box utility—**just use it** (it exists for your inputs). ⚠️ It is the **one** name in the whole `ldk-` family you're encouraged to **consume** (every other `ldk-` name means "hands off"; this one means "take it") |
|
|
553
|
-
| Shared component classes + host container classes | **the whole `ldk-` namespace**—today: `ldk-badge`, `ldk-button`, `ldk-combobox`, `ldk-mdv`, `ldk-selectbox`, `ldk-sle`, `ldk-slider`, `ldk-toggle` (shared components), plus the host's own container classes such as `ldk-titlebar`, `ldk-input`, `ldk-setting-group` | Class names of the badge / button / combobox / Markdown container / select / string-list editor / slider / toggle components in `@linkdesk/ui`. **You don't have to memorize them**—remember one thing: **anything starting with `ldk-` belongs to the host itself (shared components + host UI containers), so don't put it on your own elements** (the one exception is `.ldk-input` on the row above: that one is **for you**) |
|
|
553
|
+
| Shared component classes + host container classes | **the whole `ldk-` namespace**—today: `ldk-badge`, `ldk-button`, `ldk-combobox`, `ldk-mdv`, `ldk-selectbox`, `ldk-sle`, `ldk-slider`, `ldk-toggle`, `ldk-hint-card` (2026-09-19, hover hint card) (shared components), plus the host's own container classes such as `ldk-titlebar`, `ldk-input`, `ldk-setting-group` | Class names of the badge / button / combobox / Markdown container / select / string-list editor / slider / toggle components in `@linkdesk/ui`. **You don't have to memorize them**—remember one thing: **anything starting with `ldk-` belongs to the host itself (shared components + host UI containers), so don't put it on your own elements** (the one exception is `.ldk-input` on the row above: that one is **for you**) |
|
|
554
554
|
|
|
555
555
|
**`@keyframes` names work the same way**—the host already uses the animation names below, so avoid them when naming your own animations. A collision has the same consequence as a class name (the later definition wins, the earlier one is dropped), and it is equally **silent**: one of the two animations simply stops playing, with nothing in the console.
|
|
556
556
|
|
|
@@ -565,6 +565,17 @@ both stylesheets land on the same element.
|
|
|
565
565
|
| `ldk-notif-icon-spin` | the notification icon's spin |
|
|
566
566
|
| `ldk-notif-progress-scan` | the notification progress scan |
|
|
567
567
|
|
|
568
|
+
**The name you reference has to exist somewhere**—rule 2 above says "when you rename, change the reference in
|
|
569
|
+
the same commit"; this is the other half, and **the machine checks it**: the name you write in
|
|
570
|
+
`animation` / `animation-name` must either be defined by an `@keyframes` **in your own CSS** or be one of the
|
|
571
|
+
names in **the reserved table above** (referencing the host's animations is **legitimate consumption**—you will
|
|
572
|
+
not be flagged). Reference a name **nobody defined** and the animation **reports nothing, warns nothing, it
|
|
573
|
+
just does not run**—the symptom is "why isn't my animation working", while the console stays silent (other
|
|
574
|
+
plugins and the host are running in the same window, so it is hard to spot at a glance).
|
|
575
|
+
From `@linkdesk/plugin-sdk` **≥ 0.1.37**, the plugin lint reports these **dangling references** one by one
|
|
576
|
+
(**file name + line number + the name**); if you genuinely need a name the gate cannot see (say the animation
|
|
577
|
+
is injected at runtime), use a standard `eslint-disable` comment stating why.
|
|
578
|
+
|
|
568
579
|
> 🔧 **Maintainer note (authors can skip this)**—the **Reserved names** and **Reserved keyframe names** columns in the two tables above are **machine-read**: the gate
|
|
569
580
|
> in `npm run check` (`scripts/check-reserved-names-doc-sync.mjs`) cross-checks them **both ways** against the
|
|
570
581
|
> registry `packages/plugin-sdk/schemas/reserved-class-names.json`—every registry name must appear here, and
|
|
@@ -666,7 +677,9 @@ component. **Nothing to do before you upgrade; when you upgrade, it's one prefix
|
|
|
666
677
|
|
|
667
678
|
- **Who is affected**: again **only your own CSS**'s descendant selectors that point at those components (e.g. `.settings-row:has(.theme-picker)`). **The components' own styling does not change, and your own class names stay as they are.** The whole point is that the shared components' names now all live in the `ldk-` namespace, whose rule you already know: **anything starting with `ldk-` belongs to the host—don't put it on your own elements** (the one exception is `.ldk-input`, the utility that is **for you**).
|
|
668
679
|
- **What happens if you don't**: exactly the silent failure described in 12.1—the selector just stops matching and those few rules quietly stop applying. **No error.**
|
|
680
|
+
- 🔴 **Whenever the host renames a shared name, there are always two steps on your side: ① bump the `@linkdesk/ui` dependency, ② rebuild (repack) your plugin.** The dependency is **inlined into your bundle** (it is not resolved at runtime), so step ① without step ② changes nothing—the package still ships the old set of names. That is the only reason a plugin can lag behind a host that was fixed long ago.
|
|
669
681
|
- **When you must change it**: when you move to **`@linkdesk/ui` 0.3.0**. `^0.2.0` does not resolve `0.3.0` (that's how 0.x ranges work), so nothing breaks until you upgrade deliberately. **Grep your own CSS for the old names** after upgrading: an official plugin (`settings`) had exactly one such spot and it was fixed in the same release batch.
|
|
682
|
+
- **You get the same ruler** (`@linkdesk/plugin-sdk` 0.1.40 onward): your repo's lint ships with a dangling-name check—when the host renames a shared name and you didn't follow, **your own CI calls it out** (usage and fixes in [16-naming-conventions §7.6](16-naming-conventions.md)).
|
|
670
683
|
|
|
671
684
|
### 12.5 The **scope** of custom properties—`--x:` written under `:root` is written for the whole application
|
|
672
685
|
|
|
@@ -744,7 +757,7 @@ button { border: none; }
|
|
|
744
757
|
|
|
745
758
|
**Migration**: **zero instances today**—a full re-check of the 18 official plugins plus the in-repo fixtures (the "anchorless S2 / cross-party S3" columns of `npm run audit:plugin-prefix -- --all`) is **0** ⇒ **you have nothing to change**; this rule is **preventive**.
|
|
746
759
|
|
|
747
|
-
> 🔧 **Maintainer note (authors may skip)**: the rule text (R0 scope / R1 host baseline / R2 / R3) plus the decision formulas and negative controls live in `docs/02-Electron架构/E6_插件生态与发布/01-插件独立构建/样式命名空间归一化/32-任务-选择器形态轴门禁与落地.md`; the host side is guarded by criteria ⑩⑪ of `scripts/check-css-namespace.mjs` (plus the runtime mirror on axis ④ of the probe), and the plugin side by the **fourth
|
|
760
|
+
> 🔧 **Maintainer note (authors may skip)**: the rule text (R0 scope / R1 host baseline / R2 / R3) plus the decision formulas and negative controls live in `docs/02-Electron架构/E6_插件生态与发布/01-插件独立构建/样式命名空间归一化/32-任务-选择器形态轴门禁与落地.md`; the host side is guarded by criteria ⑩⑪ of `scripts/check-css-namespace.mjs` (plus the runtime mirror on axis ④ of the probe), and the plugin side by the **fourth and fifth criteria** of the SDK's `check-css-namespace` leg (`checks/selector-form.ts` for S2/S3, and `checks/keyframe-refs.ts` for dangling keyframe references—the latter in place since **2026-09-18**, SDK `≥ 0.1.37`).
|
|
748
761
|
|
|
749
762
|
---
|
|
750
763
|
|
|
@@ -146,6 +146,54 @@ Renames on the host side **all come with migrations**, so users don't reconfigur
|
|
|
146
146
|
|
|
147
147
|
Your only takeaway as a plugin author: **don't invent compatibility aliases for old host names** — old-name mapping is the shell's job. Just declare names in the **new shape**.
|
|
148
148
|
|
|
149
|
+
### 7.5 Host names do get retired—you are never forced to upgrade
|
|
150
|
+
|
|
151
|
+
The host also **retires its own names**: a **rename** (the name changed), a **changed meaning** (same name, different
|
|
152
|
+
meaning) and a **changed value domain** (same name and meaning, different accepted values) all count as retirement-level
|
|
153
|
+
actions. Only three things matter to you:
|
|
154
|
+
|
|
155
|
+
1. **You are never auto-uninstalled, and never refused**: retirement is the host's own business—the shell does not
|
|
156
|
+
uninstall or refuse to load you because you reference a retired name, and it is never used to gate `minAppVersion`.
|
|
157
|
+
Your plugin keeps running, on the semantics of the **new** name.
|
|
158
|
+
2. **If you reference a retired name, you get a hint in your own repo** (`@linkdesk/plugin-sdk` **0.1.40** onward,
|
|
159
|
+
usage in 7.6): `linkdesk-plugin-sdk lint` and your repo's CI scan your sources and `plugin.json` for references
|
|
160
|
+
to retired names and report each one with since-when and what replaced it (`file:line`). 🔴 It is **only a
|
|
161
|
+
hint**—it never enters any failing leg and will never block your build or release (retired ≠ deleted; the host
|
|
162
|
+
does not refuse to load you over it).
|
|
163
|
+
3. **Two steps to fix**: ① bump your `@linkdesk/plugin-sdk` dependency; ② ship a new release (`npm run publish`).
|
|
164
|
+
⛔ Don't shim the old name yourself—retired names **do not free up their slot**: taking one over only overwrites the
|
|
165
|
+
host's **historical data** (see the config-key rows in 7.1).
|
|
166
|
+
|
|
167
|
+
Retired names are **on the record**: the host ledger (`retired[]` in `scripts/host-reserved.json`) plus the
|
|
168
|
+
**byte-identical** copy inside the SDK package, each entry stating since when, why, what replaced it and where a live
|
|
169
|
+
reference still remains. That ledger is **co-read** by host maintainers and authors, and 🔴 **it is not a blacklist**—it
|
|
170
|
+
only states facts, and no gate will ever use it to block you.
|
|
171
|
+
|
|
172
|
+
> 🔧 **Maintainer note (authors can skip)**: the ledger's source of truth and shape live in
|
|
173
|
+
> `scripts/lib/retired-ledger.mjs` (7 fields + the kind vocabulary + `approvedBy` which must be a date signed by the
|
|
174
|
+
> **user**); its internal consistency is guarded by `scripts/check-retired-ledger.mjs` (wired into `npm run check`), and
|
|
175
|
+
> the single outlet for "surface taken away but registered ⇒ pass" is `scripts/check-api-surface-additive.mjs`.
|
|
176
|
+
|
|
177
|
+
### 7.6 Run the "dangling name" self-check in your own repo (`@linkdesk/plugin-sdk` 0.1.40 onward)
|
|
178
|
+
|
|
179
|
+
Your repo's CI (the strict lint leg of `ci-verify`) and `linkdesk-plugin-sdk lint` ship with a **dangling name**
|
|
180
|
+
check: it takes every `ldk-*` name your sources shout plus every keyframe name your CSS references via `animation:`,
|
|
181
|
+
and matches them against **two definition sets**—① the definitions in your own CSS; ② the host definition set
|
|
182
|
+
shipped with the package (`schemas/host-css-names.json` inside the SDK). A name in neither set is reported as
|
|
183
|
+
dangling (name + `file:line`), because that style **silently disappears after publishing** (zero errors—this is the
|
|
184
|
+
mechanical reminder for "the host renamed it and you didn't follow"; the thing §12.4 describes now has someone
|
|
185
|
+
watching it for you).
|
|
186
|
+
|
|
187
|
+
- **How to fix a red (two steps)**: ① switch to a name that really exists in the host, or define it in your repo
|
|
188
|
+
(your own class names start with `<pluginId>-`; `ldk-*` belongs to the host); ② re-pack and ship.
|
|
189
|
+
- **No false alarms**: dynamically composed names (`` className={`x-${v}`} ``) are **skipped and counted**, never
|
|
190
|
+
judged; third-party built-ins (Monaco / codicon—the name and its rules live in their own bundled styles) and DOM
|
|
191
|
+
hook names are **not judged**; test and mock files are not scanned.
|
|
192
|
+
- **Informed bypass**: `// eslint-disable-next-line linkdesk/no-reserved-class-name -- reason` (same id as the
|
|
193
|
+
namespace leg).
|
|
194
|
+
- **Host definition set unreadable** ⇒ the leg reports "**unverified**" instead of "0 issues"—that means a broken
|
|
195
|
+
install; reinstall `@linkdesk/plugin-sdk`.
|
|
196
|
+
|
|
149
197
|
---
|
|
150
198
|
|
|
151
199
|
> **← Index:** [00-readme](00-readme.md) · **Related:** [15-multi-repo-and-local-workspace](15-multi-repo-and-local-workspace.md) · [06-plugin-json-spec](06-plugin-json-spec.md) · [plugin-source-externalization/09-naming-conventions.md](https://github.com/Encaron/linkdesk/blob/electron/docs/02-Electron架构/E6_插件生态与发布/插件源码外移层/09-命名规范.md) (decision rationale)
|
|
@@ -65,6 +65,7 @@ import { Button, Toggle, ContextMenu } from "@linkdesk/ui";
|
|
|
65
65
|
| `ContextMenu` | Context menu component | Works with `contributes.menus` — see [05-UI Conventions](05-ui-conventions.md) |
|
|
66
66
|
| `InlineInput` | Inline input (imperative handle) | Renaming in place in a tree/list (grab the `ref` and call `InlineInputHandle`) |
|
|
67
67
|
| `OverlayPortal` | Overlay portal host | Use it when a custom-drawn dialog needs to portal to body; don't scatter bare `createPortal` calls everywhere |
|
|
68
|
+
| `HintCard` | Anchored hover hint card (non-interactive) | For "hover a small badge, see a short explanation card": give `lines` (1–3 sentences) and the anchor element; triggering/positioning/glass are all handled by the shell; ⛔ no links or buttons inside the card |
|
|
68
69
|
|
|
69
70
|
> The list follows the package's actual export surface (`packages/linkdesk-ui/src/index.ts` is the single source of truth) — if this page disagrees with the package, **the package wins**.
|
|
70
71
|
|
package/docs/zh/05-/346/217/222/344/273/266UI/345/206/231/346/263/225/350/247/204/347/272/246.md
CHANGED
|
@@ -545,7 +545,7 @@ monaco 当前背景不透明、只二态跟随(亮/暗)是**过渡态绕开
|
|
|
545
545
|
| 来源 | 保留名 | 说明 |
|
|
546
546
|
|---|---|---|
|
|
547
547
|
| 宿主**给你的**输入框工具类 | `.ldk-input` | 输入框工具类——**直接用即可**(它本来就是给你的输入框用的)。⚠️ 它是整个 `ldk-` 家族里**唯一**鼓励你**消费**的一个(其余的 `ldk-` 名是「别碰」,它是「拿去用」) |
|
|
548
|
-
| 共享组件类名 + 宿主容器类名 | **整个 `ldk-` 命名空间**——今天有 `ldk-badge`、`ldk-button`、`ldk-combobox`、`ldk-mdv`、`ldk-selectbox`、`ldk-sle`、`ldk-slider`、`ldk-toggle
|
|
548
|
+
| 共享组件类名 + 宿主容器类名 | **整个 `ldk-` 命名空间**——今天有 `ldk-badge`、`ldk-button`、`ldk-combobox`、`ldk-mdv`、`ldk-selectbox`、`ldk-sle`、`ldk-slider`、`ldk-toggle`、`ldk-hint-card`(2026-09-19 起,悬停说明卡)等(共享组件),另含宿主自己的容器类(如 `ldk-titlebar`、`ldk-input`、`ldk-setting-group`) | 分别是 `@linkdesk/ui` 里徽标 / 按钮 / 组合输入 / Markdown 容器 / 下拉 / 数组编辑器 / 滑杆 / 开关的类名。**你不用记这些名字**——记一条就够:**凡 `ldk-` 开头都是宿主自己的(共享组件 + 宿主界面容器),不要拿给自己的元素用**(唯一的例外是上一行的 `.ldk-input`:那个是**给你用的**) |
|
|
549
549
|
|
|
550
550
|
**`@keyframes` 的名字同理**——宿主自己也用着下面这些动画名,给你的动画起名时避开它们。重名的后果和类名一样(后加载的那份顶掉先加载的),而且同样是**静默**的:你的动画或宿主的动画有一个不播了,控制台没有任何报错。
|
|
551
551
|
|
|
@@ -658,7 +658,11 @@ lint 会把这种**悬空引用**逐条报出来(**文件名 + 行号 +
|
|
|
658
658
|
|
|
659
659
|
- **谁受影响**:还是**只有你自己 CSS 里**指向这些组件的后代选择器(例如 `.settings-row:has(.theme-picker)`)。**组件自己的样式不受影响,你自己的类名也不用改。** 这件事的意义是共享组件的名字现在全在 `ldk-` 命名空间里——而那条纪律你已经知道:**凡 `ldk-` 开头都是宿主的,别拿给自己的元素用**(唯一例外是 `.ldk-input`,那个是**给你用的**工具类)。
|
|
660
660
|
- **不改会怎样**:与 12.1 完全相同——选择器匹配不上,那几条规则悄悄不再生效。**不报错。**
|
|
661
|
+
- 🔴 **宿主以后改共享名,你这边的动作永远是两件:① 升 `@linkdesk/ui` 依赖 ② 重新打包。** 依赖是
|
|
662
|
+
**内联进你的 bundle** 的(不是运行时去解析),所以只做①不做②等于没做——包里跑的还是旧名字那一套;
|
|
663
|
+
这也是「宿主明明改好很久了,我的插件却没跟上」的唯一原因。两件都做完,界面才和新壳一致。
|
|
661
664
|
- **什么时候必须改**:升到 **`@linkdesk/ui` 0.3.0** 时。`^0.2.0` 不会解析到 `0.3.0`(0.x 的范围就是这么算的),所以你不主动升级就不会坏。升级后**拿上表里的旧族名 grep 一遍自己的 CSS**:官方插件里只有 `settings` 有 1 处,已在同一批发版改好。
|
|
665
|
+
- **这把尺子你也有**(`@linkdesk/plugin-sdk` 0.1.40 起):你仓里的 lint 自带「悬空名」判据——宿主改了共享名、你没跟上时,**你自己的 CI 会替你喊**(用法与修法见 [16-命名规范 §7.6](16-命名规范.md))。
|
|
662
666
|
|
|
663
667
|
### 12.5 自定义属性的**作用域**——`--x:` 写在 `:root` 里就等于写给整个软件
|
|
664
668
|
|
|
@@ -752,7 +756,7 @@ button { border: none; }
|
|
|
752
756
|
> `docs/02-Electron架构/E6_插件生态与发布/01-插件独立构建/样式命名空间归一化/32-任务-选择器形态轴门禁与落地.md`;
|
|
753
757
|
> 宿主侧由 `scripts/check-css-namespace.mjs` 的判据⑩⑪(+ 探针轴 ④ 的运行时镜像)守着,
|
|
754
758
|
> 插件侧由 SDK 的 `check-css-namespace` 腿的**第四、第五条判据**守着(`checks/selector-form.ts` 的 S2/S3,
|
|
755
|
-
> 与 `checks/keyframe-refs.ts` 的关键帧引用悬空 —— 后者 **
|
|
759
|
+
> 与 `checks/keyframe-refs.ts` 的关键帧引用悬空 —— 后者 **2026-09-18 起**在位,SDK `≥ 0.1.37`)。
|
|
756
760
|
|
|
757
761
|
---
|
|
758
762
|
|
|
@@ -155,6 +155,43 @@ node_modules/@linkdesk/plugin-sdk/schemas/host-reserved.json
|
|
|
155
155
|
|
|
156
156
|
对你(插件作者)的影响只有一条:**别自己发明宿主的旧名做兼容**——旧名映射是壳的事,你声明**新形状**的名字即可。
|
|
157
157
|
|
|
158
|
+
### 7.5 宿主的名字会退役,你不会被强制升级
|
|
159
|
+
|
|
160
|
+
宿主也会**退役自己的名字**——**改名**(名字变了)、**改含义**(同名但意思变了)、**改取值域**(同名同义但
|
|
161
|
+
接受的值变了)三种都算退役级动作。对你的影响只有三条:
|
|
162
|
+
|
|
163
|
+
1. **你不会被自动卸载,也不会被拒绝**:退役是宿主**自己**的事——壳不会因为你引用了某个退役名字就卸载你、
|
|
164
|
+
拒载你,也不会拿它去卡 `minAppVersion`。你的插件照旧跑,跑的是**新名字**那套语义。
|
|
165
|
+
2. **引用了已退役的名字,你能在自己仓里跑出提示**(`@linkdesk/plugin-sdk` **0.1.40** 起,用法见 7.6):
|
|
166
|
+
`linkdesk-plugin-sdk lint` + 插件仓 CI 会在你的源码与 `plugin.json` 里找已退役名字的引用,逐条提示
|
|
167
|
+
「哪天退的休、替身是谁」(`文件:行`)。🔴 它**只是提示**——不进任何判红腿、永远不会拦你的构建与发布
|
|
168
|
+
(退役 ≠ 删除,宿主不因它拒载你)。
|
|
169
|
+
3. **改法两步**:① 升依赖(`@linkdesk/plugin-sdk` 升到最新);② 重发一版(`npm run publish`)。
|
|
170
|
+
⛔ 别自己给旧名做兼容——退役名**不腾位**,你占它只会顶掉宿主的**历史数据**(见 7.1 表里配置键那几行)。
|
|
171
|
+
|
|
172
|
+
退役名是**登记在册**的:宿主侧的账(`scripts/host-reserved.json` 的 `retired[]`)+ SDK 包里那份**逐字节相同**的
|
|
173
|
+
副本,每条写明「从哪天起、为什么、替身是谁、还剩哪个活口」。这份账是宿主维护者与作者**共读**的,
|
|
174
|
+
🔴 **它不是黑名单**——它只陈述事实,**不会**被任何门禁拿去拦你。
|
|
175
|
+
|
|
176
|
+
> 🔧 **维护者注(作者可跳过)**:账的真源与形状见 `scripts/lib/retired-ledger.mjs`(7 字段 + kind 词表 +
|
|
177
|
+
> `approvedBy` 必须是**用户本人**签的日期);它的自洽由 `scripts/check-retired-ledger.mjs` 守(跑在 `npm run check` 里),
|
|
178
|
+
> 「面被拿走但有登记 ⇒ 放行」的唯一出口在 `scripts/check-api-surface-additive.mjs`。
|
|
179
|
+
|
|
180
|
+
### 7.6 在自己仓里跑「悬空名」自检(`@linkdesk/plugin-sdk` 0.1.40 起)
|
|
181
|
+
|
|
182
|
+
你仓里的 CI(`ci-verify` 的 lint 严格腿)和 `linkdesk-plugin-sdk lint` 自带一条**悬空名**判据:它把你源码里
|
|
183
|
+
喊的 `ldk-*` 名 + CSS `animation:` 引用的关键帧名,跟**两个定义集**对——① 你自己 CSS 里的定义;
|
|
184
|
+
② 随包下发的宿主定义集(SDK 包内 `schemas/host-css-names.json`)。两边都没有 ⇒ 报悬空(名字 + `文件:行`),
|
|
185
|
+
因为那条样式**发布后会静默消失**(零报错——这正是「宿主改了名、你没跟上」的机械提醒,§12.4 说的那件事
|
|
186
|
+
从此有人替你盯着)。
|
|
187
|
+
|
|
188
|
+
- **报红了怎么修(两步)**:① 换成宿主真实存在的名字,或在你仓里补定义(自有类名以 `<pluginId>-` 开头;
|
|
189
|
+
`ldk-*` 只许宿主定义);② 重新打包发版。
|
|
190
|
+
- **不用怕假红**:动态拼出来的名字(`` className={`x-${v}`} ``)**跳过并计数**、不判;第三方自带的
|
|
191
|
+
(Monaco / codicon 那一类,名字+规则都在它随包样式里)与 DOM 钩子名**不计悬空**;测试与 mock 文件不扫。
|
|
192
|
+
- **知情绕行**:`// eslint-disable-next-line linkdesk/no-reserved-class-name -- 理由`(与命名空间腿同一 id)。
|
|
193
|
+
- **宿主定义集读不到** ⇒ 判据报「**未核验**」而不是「0 处通过」——那是包不完整,重装 `@linkdesk/plugin-sdk`。
|
|
194
|
+
|
|
158
195
|
---
|
|
159
196
|
|
|
160
197
|
> **← 索引:** [00-README](00-README.md) · **相关:** [15-多仓开发与本地工作区](15-多仓开发与本地工作区.md) · [06-plugin.json规范](06-plugin.json规范.md) · [插件源码外移层/09-命名规范.md](https://github.com/Encaron/linkdesk/blob/electron/docs/02-Electron架构/E6_插件生态与发布/插件源码外移层/09-命名规范.md)(决策论证)
|
|
@@ -65,6 +65,7 @@ import { Button, Toggle, ContextMenu } from "@linkdesk/ui";
|
|
|
65
65
|
| `ContextMenu` | 右键菜单组件 | 配合 `contributes.menus` —— 见 [05-插件UI写法规约](05-插件UI写法规约.md) |
|
|
66
66
|
| `InlineInput` | 行内输入(命令式句柄) | 树/列表里就地改名(拿 `ref` 调 `InlineInputHandle`) |
|
|
67
67
|
| `OverlayPortal` | 弹层 portal 宿主 | 自绘弹窗要 portal 到 body 时用它,别裸写 `createPortal` 到处飘 |
|
|
68
|
+
| `HintCard` | 贴锚的悬停说明卡(非交互) | 「停在某个小标上出一张说明卡」——给 `lines`(1–3 句)与锚元素,触发/定位/玻璃全归壳;⛔ 卡内不放链接按钮 |
|
|
68
69
|
|
|
69
70
|
> 清单以包的实际导出面为准(`packages/linkdesk-ui/src/index.ts` 是唯一真相源)——本页若与包不一致,**以包为准**。
|
|
70
71
|
|