@oh-my-pi/pi-wire 18.14.1 → 18.14.2
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/CHANGELOG.md +7 -0
- package/dist/types/tsp.d.ts +33 -1
- package/package.json +1 -1
- package/src/tsp.ts +33 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
## [Unreleased]
|
|
4
4
|
|
|
5
|
+
## [18.14.2] - 2026-10-31
|
|
6
|
+
|
|
7
|
+
### Added
|
|
8
|
+
|
|
9
|
+
- Added `nums` to `code` props (`TspCodeProps`): each line's number, so one block can show non-contiguous lines with `…` gap rows where the numbers jump.
|
|
10
|
+
- Added the TSP `button` kind (`TspButtonProps`: label, icon, keycaps, `default`/`primary`/`quiet`/`danger` variants, `sm`/`md` sizes, pressed, disabled with a reason, busy) and `tabs` `variant: "segmented"`.
|
|
11
|
+
|
|
5
12
|
## [18.14.0] - 2026-10-29
|
|
6
13
|
|
|
7
14
|
### Added
|
package/dist/types/tsp.d.ts
CHANGED
|
@@ -28,7 +28,7 @@ export declare const TSP_DEFAULT_CREDITS = 2;
|
|
|
28
28
|
/** One-letter message verb. */
|
|
29
29
|
export type TspVerb = "q" | "o" | "f" | "b" | "x" | "r" | "e";
|
|
30
30
|
/** Every component kind in the v1 vocabulary. */
|
|
31
|
-
export declare const TSP_KINDS: readonly ["col", "row", "card", "section", "rule", "spacer", "text", "md", "code", "diff", "ansi", "math", "image", "media", "kv", "table", "tree", "json", "badge", "kbd", "icon", "spinner", "shimmer", "elapsed", "progress", "rate", "list", "item", "tabs", "editor", "input", "status", "seg", "overlay", "toast", "rows", "picker", "prefs", "tool", "checklist", "agent", "chart", "meter", "effort"];
|
|
31
|
+
export declare const TSP_KINDS: readonly ["col", "row", "card", "section", "rule", "spacer", "text", "md", "code", "diff", "ansi", "math", "image", "media", "kv", "table", "tree", "json", "badge", "kbd", "icon", "spinner", "shimmer", "elapsed", "progress", "rate", "list", "item", "tabs", "editor", "input", "button", "status", "seg", "overlay", "toast", "rows", "picker", "prefs", "tool", "checklist", "agent", "chart", "meter", "effort"];
|
|
32
32
|
export type TspKind = (typeof TSP_KINDS)[number];
|
|
33
33
|
/** Semantic colour of a node's chrome. */
|
|
34
34
|
export type TspTone = "neutral" | "accent" | "info" | "success" | "warning" | "error" | "pending" | "muted" | "user";
|
|
@@ -176,7 +176,15 @@ export interface TspCodeProps {
|
|
|
176
176
|
lang?: string;
|
|
177
177
|
/** The file the text comes from: the terminal picks the grammar from it (and heads a block outside a tool card with it). */
|
|
178
178
|
path?: string;
|
|
179
|
+
/** The first line's number; later lines count up from it. */
|
|
179
180
|
start?: number;
|
|
181
|
+
/**
|
|
182
|
+
* Each line's number (one per line of `text`, strictly ascending), for non-contiguous lines: replaces counting from
|
|
183
|
+
* `start`, and a `…` gap row is drawn before every line whose number is not the previous one's + 1. Marks' `line` and
|
|
184
|
+
* folds' `from`/`to` are in this numbering. Ignored (numbers count from `start`) when its length differs from the
|
|
185
|
+
* text's line count or it is not strictly ascending.
|
|
186
|
+
*/
|
|
187
|
+
nums?: readonly number[];
|
|
180
188
|
numbers?: boolean;
|
|
181
189
|
marks?: readonly {
|
|
182
190
|
line: number;
|
|
@@ -355,6 +363,29 @@ export interface TspTabsProps {
|
|
|
355
363
|
label: TspText;
|
|
356
364
|
}[];
|
|
357
365
|
active?: string;
|
|
366
|
+
/** `underline` (default): an accent underline under the active tab; `segmented`: a well with a raised thumb. */
|
|
367
|
+
variant?: "underline" | "segmented";
|
|
368
|
+
}
|
|
369
|
+
/**
|
|
370
|
+
* A push button. A click sends an `action` event with `actions.click` (else
|
|
371
|
+
* `click`); a disabled or busy button sends nothing. It never takes focus.
|
|
372
|
+
*/
|
|
373
|
+
export interface TspButtonProps {
|
|
374
|
+
/** Label; empty with an `icon` draws an icon-only button (give it a `title` or `aria`). */
|
|
375
|
+
text?: string;
|
|
376
|
+
/** Leading icon name. */
|
|
377
|
+
icon?: string;
|
|
378
|
+
/** Keycaps drawn after the label (the key names of `kbd`); display only. */
|
|
379
|
+
keys?: readonly string[];
|
|
380
|
+
variant?: "default" | "primary" | "quiet" | "danger";
|
|
381
|
+
/** `md` 28px (bars, heads, forms), `sm` 22px (inline, rows). */
|
|
382
|
+
size?: "sm" | "md";
|
|
383
|
+
/** A pressed toggle. */
|
|
384
|
+
on?: boolean;
|
|
385
|
+
/** Dimmed and inert; a string is the reason, shown as the tooltip. */
|
|
386
|
+
disabled?: boolean | string;
|
|
387
|
+
/** A spinner in the icon's place; inert. */
|
|
388
|
+
busy?: boolean;
|
|
358
389
|
}
|
|
359
390
|
export interface TspEditorDecoration {
|
|
360
391
|
from: number;
|
|
@@ -932,6 +963,7 @@ export interface TspPropsByKind {
|
|
|
932
963
|
tabs: TspTabsProps;
|
|
933
964
|
editor: TspEditorProps;
|
|
934
965
|
input: TspInputProps;
|
|
966
|
+
button: TspButtonProps;
|
|
935
967
|
status: TspStatusProps;
|
|
936
968
|
seg: TspSegProps;
|
|
937
969
|
overlay: TspOverlayProps;
|
package/package.json
CHANGED
package/src/tsp.ts
CHANGED
|
@@ -67,6 +67,7 @@ export const TSP_KINDS = [
|
|
|
67
67
|
"tabs",
|
|
68
68
|
"editor",
|
|
69
69
|
"input",
|
|
70
|
+
"button",
|
|
70
71
|
"status",
|
|
71
72
|
"seg",
|
|
72
73
|
"overlay",
|
|
@@ -228,7 +229,15 @@ export interface TspCodeProps {
|
|
|
228
229
|
lang?: string;
|
|
229
230
|
/** The file the text comes from: the terminal picks the grammar from it (and heads a block outside a tool card with it). */
|
|
230
231
|
path?: string;
|
|
232
|
+
/** The first line's number; later lines count up from it. */
|
|
231
233
|
start?: number;
|
|
234
|
+
/**
|
|
235
|
+
* Each line's number (one per line of `text`, strictly ascending), for non-contiguous lines: replaces counting from
|
|
236
|
+
* `start`, and a `…` gap row is drawn before every line whose number is not the previous one's + 1. Marks' `line` and
|
|
237
|
+
* folds' `from`/`to` are in this numbering. Ignored (numbers count from `start`) when its length differs from the
|
|
238
|
+
* text's line count or it is not strictly ascending.
|
|
239
|
+
*/
|
|
240
|
+
nums?: readonly number[];
|
|
232
241
|
numbers?: boolean;
|
|
233
242
|
marks?: readonly { line: number; tone: TspTone }[];
|
|
234
243
|
wrap?: boolean;
|
|
@@ -383,6 +392,29 @@ export interface TspItemProps {
|
|
|
383
392
|
export interface TspTabsProps {
|
|
384
393
|
items: readonly { id: string; label: TspText }[];
|
|
385
394
|
active?: string;
|
|
395
|
+
/** `underline` (default): an accent underline under the active tab; `segmented`: a well with a raised thumb. */
|
|
396
|
+
variant?: "underline" | "segmented";
|
|
397
|
+
}
|
|
398
|
+
/**
|
|
399
|
+
* A push button. A click sends an `action` event with `actions.click` (else
|
|
400
|
+
* `click`); a disabled or busy button sends nothing. It never takes focus.
|
|
401
|
+
*/
|
|
402
|
+
export interface TspButtonProps {
|
|
403
|
+
/** Label; empty with an `icon` draws an icon-only button (give it a `title` or `aria`). */
|
|
404
|
+
text?: string;
|
|
405
|
+
/** Leading icon name. */
|
|
406
|
+
icon?: string;
|
|
407
|
+
/** Keycaps drawn after the label (the key names of `kbd`); display only. */
|
|
408
|
+
keys?: readonly string[];
|
|
409
|
+
variant?: "default" | "primary" | "quiet" | "danger";
|
|
410
|
+
/** `md` 28px (bars, heads, forms), `sm` 22px (inline, rows). */
|
|
411
|
+
size?: "sm" | "md";
|
|
412
|
+
/** A pressed toggle. */
|
|
413
|
+
on?: boolean;
|
|
414
|
+
/** Dimmed and inert; a string is the reason, shown as the tooltip. */
|
|
415
|
+
disabled?: boolean | string;
|
|
416
|
+
/** A spinner in the icon's place; inert. */
|
|
417
|
+
busy?: boolean;
|
|
386
418
|
}
|
|
387
419
|
export interface TspEditorDecoration {
|
|
388
420
|
from: number;
|
|
@@ -897,6 +929,7 @@ export interface TspPropsByKind {
|
|
|
897
929
|
tabs: TspTabsProps;
|
|
898
930
|
editor: TspEditorProps;
|
|
899
931
|
input: TspInputProps;
|
|
932
|
+
button: TspButtonProps;
|
|
900
933
|
status: TspStatusProps;
|
|
901
934
|
seg: TspSegProps;
|
|
902
935
|
overlay: TspOverlayProps;
|