@linkdesk/plugin-docs 0.1.53 → 0.1.55
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 +849 -847
- package/docs/06-plugin-json-spec.md +27 -0
- package/docs/19-component-cheatsheet.md +1 -1
- package/docs/zh/05-/346/217/222/344/273/266UI/345/206/231/346/263/225/350/247/204/347/272/246.md +850 -848
- package/docs/zh/06-plugin.json/350/247/204/350/214/203.md +27 -0
- package/docs/zh/19-/347/273/204/344/273/266/351/200/237/346/237/245.md +1 -1
- package/docs/zh/plugin.schema.json +1 -0
- package/package.json +1 -1
|
@@ -455,6 +455,33 @@ do not need it (`icon` *is* the identity image).
|
|
|
455
455
|
|
|
456
456
|
Views are loaded by ViewContainerService from `contributes.views[].render`, and the icon goes through the shell's component-less registration path. **For a sidebar-only plugin to get an icon = `appearsIn.iconBar` + a sidebar `viewsContainers`, with no `entry` and no `src/index.tsx` needed**; **only plugins that need tabs need `entry`**.
|
|
457
457
|
|
|
458
|
+
### Admission to the Start card and the [+] menu (appearsIn.standaloneOpenable)
|
|
459
|
+
|
|
460
|
+
> 🔴 **opt-IN, allow-list, default `false` (since 2026-10-02) — declaring `appearsIn.tabBar: true` alone no longer puts you in the welcome page's Start card or the tab bar's [+] create menu; add one more line, `standaloneOpenable: true`, to be admitted.**
|
|
461
|
+
|
|
462
|
+
**Why this field exists**: `tabBar` answers "**can** this plugin be opened as a tab" (capability), while the Start card and the [+] menu answer a different question — "**if I open it right now, is there anything to look at**". The two were long treated as one thing, which produced cases like "the editor shows up in the Start card, but clicking it opens an empty file-editor tab that errors with ENOENT": it has a tab form, but that form is a **per-resource** editor — with no file there is no content. `standaloneOpenable` turns the second question into a declarable field.
|
|
463
|
+
|
|
464
|
+
| What you declare | Start card / [+] menu | Command palette / recent / session restore / floating panel "open in main window" |
|
|
465
|
+
|---|---|---|
|
|
466
|
+
| `tabBar: true` (field omitted) | ❌ not listed | ✅ still opens |
|
|
467
|
+
| `tabBar: true` + `standaloneOpenable: true` | ✅ listed | ✅ still opens |
|
|
468
|
+
| `tabBar: true` + `standaloneOpenable: false` | ❌ not listed (explicit refusal) | ✅ still opens |
|
|
469
|
+
|
|
470
|
+
> ⚠️ **This field only governs whether those two menus list you. It is not a capability gate and not a permission gate.** Omitting it only removes the plugin from those two menus — users, commands and scripts can still open it, and recents and session restore keep working. **Turning it on = releasing one more entry point; leaving it off ≠ disabling the plugin.**
|
|
471
|
+
|
|
472
|
+
**When to declare `true`**: the plugin has an interface of **its own** that shows content the moment it opens — a serial monitor, a Git panel, a file tree, a settings page.
|
|
473
|
+
**When not to** (keep the default): the plugin's tab form is a **per-resource** editor (the user picks a file/object first), or the plugin is merely a base that provides data or view containers to others.
|
|
474
|
+
|
|
475
|
+
```json
|
|
476
|
+
// A plugin with content of its own — admitted to the Start card and the [+] menu
|
|
477
|
+
{ "entry": "src/index.tsx", "appearsIn": { "iconBar": "top", "tabBar": true, "standaloneOpenable": true } }
|
|
478
|
+
|
|
479
|
+
// A per-resource editor — has a tab form but stays out of those two menus
|
|
480
|
+
{ "entry": "src/index.tsx", "appearsIn": { "tabBar": true } }
|
|
481
|
+
```
|
|
482
|
+
|
|
483
|
+
> 🔴 **Breaking-change notice (for existing authors)**: this field defaults to `false`, so **plugins that previously declared only `tabBar: true` will disappear from the Start card and the [+] menu after upgrading** (every other open path is unaffected). If your plugin shows content the moment it opens, add one line `standaloneOpenable: true`, bump the version and `publish` again to restore it.
|
|
484
|
+
|
|
458
485
|
### The `contributes` field (Phase 5+) — aligned with VS Code
|
|
459
486
|
|
|
460
487
|
> **Once a plugin declares `contributes`, the system wires it up automatically — no core code changes needed.**
|
|
@@ -42,7 +42,7 @@ import { Button, Toggle, ContextMenu } from "@linkdesk/ui";
|
|
|
42
42
|
|
|
43
43
|
### 2.1 Self-driven versioning (no lookup table)
|
|
44
44
|
|
|
45
|
-
The version of `@linkdesk/ui` **moves on its own** (patch +1 per publish) and is unrelated to the shell version (🟢 since 2026-10-01
|
|
45
|
+
The version of `@linkdesk/ui` **moves on its own** (patch +1 per publish) and is unrelated to the shell version (🟢 since 2026-10-01).
|
|
46
46
|
|
|
47
47
|
- **Which one to install**: `npm i @linkdesk/ui@latest` gets you the newest. A new package is published only when the shared components actually change (checked at every shell release by the publish gate), so "latest package = the components inside the latest shell" holds by construction — nothing to look up.
|
|
48
48
|
- **No need to chase upgrades**: styles and behavior are **served at runtime by the shell pool** — a shell upgrade refreshes your plugin's UI automatically, no matter which package version you installed.
|