@standardagents/code-plugin-sdk 1.0.0-alpha.8-title.0 → 1.0.0-alpha.9-icons.0
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 +14 -10
- package/package.json +1 -1
- package/src/index.d.ts +2 -0
- package/src/manifest.mjs +3 -0
package/README.md
CHANGED
|
@@ -11,8 +11,8 @@ Its `package.json` includes a static `standardPlugin` manifest.
|
|
|
11
11
|
{
|
|
12
12
|
"name": "example-status",
|
|
13
13
|
"type": "module",
|
|
14
|
-
"peerDependencies": { "@standardagents/code-plugin-sdk": "^1.0.0-alpha.
|
|
15
|
-
"devDependencies": { "@standardagents/code-plugin-sdk": "^1.0.0-alpha.
|
|
14
|
+
"peerDependencies": { "@standardagents/code-plugin-sdk": "^1.0.0-alpha.9-icons.0" },
|
|
15
|
+
"devDependencies": { "@standardagents/code-plugin-sdk": "^1.0.0-alpha.9-icons.0" },
|
|
16
16
|
"standardPlugin": {
|
|
17
17
|
"apiVersion": 1,
|
|
18
18
|
"id": "example-status",
|
|
@@ -195,14 +195,14 @@ The Standard Code build workflow publishes this package when the version in
|
|
|
195
195
|
under `latest`. Feature branches publish under their product branch tag. Authors
|
|
196
196
|
can install a published prerelease by its exact version.
|
|
197
197
|
|
|
198
|
-
##
|
|
199
|
-
|
|
200
|
-
MIT. See `LICENSE`.
|
|
198
|
+
## Sidebar card titles
|
|
201
199
|
|
|
202
|
-
Sidebar card titles use muted, regular-weight text.
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
200
|
+
Sidebar card titles use muted, regular-weight text. A card declaration may
|
|
201
|
+
supply an `icon` containing one Nerd Font private-use glyph, for example
|
|
202
|
+
`"icon": "\uDB81\uDCC5"` (a gauge). The author chooses the card's topic icon.
|
|
203
|
+
The host shows it only on the viewer's Nerd Font tier. Other tiers omit the
|
|
204
|
+
icon and its spacing. Omitted icons have no fallback. This applies to bordered
|
|
205
|
+
and borderless cards. Empty titles remain empty.
|
|
206
206
|
|
|
207
207
|
A card view may replace its declared title through
|
|
208
208
|
`ui.view(root, { title: [{ text: 'Builds ' }, { text: '●', foreground: 'green' }] })`.
|
|
@@ -214,4 +214,8 @@ Actions, control characters, and bidi formatting are rejected. Each replacement
|
|
|
214
214
|
updates the body and title together. Omitting `title` restores the manifest title.
|
|
215
215
|
This option belongs to card views. Plugins own the meaning and color of any
|
|
216
216
|
status light; the SDK adds no health indicator. Host title styling and supported
|
|
217
|
-
Nerd Font
|
|
217
|
+
author-selected Nerd Font icons apply around the author-supplied spans.
|
|
218
|
+
|
|
219
|
+
## License
|
|
220
|
+
|
|
221
|
+
MIT. See `LICENSE`.
|
package/package.json
CHANGED
package/src/index.d.ts
CHANGED
|
@@ -16,6 +16,8 @@ export interface ContributionDeclaration {
|
|
|
16
16
|
anchor: Anchor;
|
|
17
17
|
/** Sidebar card border. Defaults to true; false retains the title and content padding. */
|
|
18
18
|
border?: boolean;
|
|
19
|
+
/** One author-selected Nerd Font glyph; omitted on non-Nerd viewer tiers. */
|
|
20
|
+
icon?: string;
|
|
19
21
|
title?: string;
|
|
20
22
|
merge?: 'by-machine' | 'by-identity';
|
|
21
23
|
width?: 'full' | 'half';
|
package/src/manifest.mjs
CHANGED
|
@@ -76,6 +76,9 @@ export function validateManifest(value) {
|
|
|
76
76
|
ensure(object(declaration) && identifier(declaration.id) && !ids.has(declaration.id) &&
|
|
77
77
|
SURFACE_KINDS.includes(declaration.kind) && ANCHORS.includes(declaration.anchor), 'invalid_manifest', 'Invalid contribution declaration')
|
|
78
78
|
ids.add(declaration.id)
|
|
79
|
+
ensure(declaration.icon === undefined || (declaration.kind === 'card' && typeof declaration.icon === 'string' &&
|
|
80
|
+
/^[\uE000-\uF8FF\u{F0000}-\u{FFFFD}\u{100000}-\u{10FFFD}]$/u.test(declaration.icon)),
|
|
81
|
+
'invalid_manifest', 'Card icon must be one Nerd Font private-use glyph')
|
|
79
82
|
ensure(declaration.border === undefined || (typeof declaration.border === 'boolean' && declaration.kind === 'card'),
|
|
80
83
|
'invalid_manifest', 'Only sidebar cards declare a boolean border preference')
|
|
81
84
|
for (const [key, choices] of Object.entries({ merge: ['by-machine', 'by-identity'], width: ['full', 'half'],
|