@fungi.computer/parakeet 0.11.7 → 0.11.8
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.
|
@@ -56,7 +56,7 @@ export function parakeetBuiltinCommands(runtime, options) {
|
|
|
56
56
|
handler: async (input) => {
|
|
57
57
|
const keys = keyBindings(runtime.snapshot());
|
|
58
58
|
if (input.interaction === undefined)
|
|
59
|
-
return keys.map((row) => `${row.keys} ${row.title}`);
|
|
59
|
+
return keys.map((row) => `${row.keys} ${row.title}${row.description === undefined ? "" : ` · ${row.description}`}`);
|
|
60
60
|
if (keys.length === 0) {
|
|
61
61
|
input.interaction.notify({
|
|
62
62
|
type: "info",
|
|
@@ -70,7 +70,9 @@ export function parakeetBuiltinCommands(runtime, options) {
|
|
|
70
70
|
options: keys.map((row) => ({
|
|
71
71
|
value: row.commandId,
|
|
72
72
|
label: row.title,
|
|
73
|
-
description: row.keys,
|
|
73
|
+
description: [row.keys, row.description]
|
|
74
|
+
.filter((part) => part !== undefined)
|
|
75
|
+
.join(" · "),
|
|
74
76
|
})),
|
|
75
77
|
});
|
|
76
78
|
runAfter(runtime, keys.find((row) => row.commandId === chosen)?.command, input.origin);
|
package/dist/commands/slash.d.ts
CHANGED
|
@@ -34,6 +34,8 @@ export type KeyBindingRow = Readonly<{
|
|
|
34
34
|
keys: string;
|
|
35
35
|
/** What the key does. */
|
|
36
36
|
title: string;
|
|
37
|
+
/** The command owner's context or current availability explanation. */
|
|
38
|
+
description?: string | undefined;
|
|
37
39
|
/** Surface order supplied by the command owner. */
|
|
38
40
|
order: number;
|
|
39
41
|
}>;
|
package/dist/commands/slash.js
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
/** Human key labels from Whistle bindings, with the platform's modifier name. */
|
|
2
2
|
export function keyLabel(binding, mac = /Mac|iPhone|iPad/u.test(globalThis.navigator.userAgent)) {
|
|
3
|
-
if (binding.startsWith("<leader>"))
|
|
4
|
-
|
|
3
|
+
if (binding.startsWith("<leader>")) {
|
|
4
|
+
const sequence = binding.replaceAll("<leader>", "Ctrl K ").trimEnd();
|
|
5
|
+
return binding.endsWith(" ") ? `${sequence} Space` : sequence;
|
|
6
|
+
}
|
|
5
7
|
return binding
|
|
6
8
|
.split(" ")
|
|
7
9
|
.map((chord) => {
|
|
@@ -54,6 +56,14 @@ export function keyBindings(snapshot) {
|
|
|
54
56
|
? keyLabel(row.binding)
|
|
55
57
|
: `${current.keys}, ${keyLabel(row.binding)}`,
|
|
56
58
|
title: row.title,
|
|
59
|
+
description: [
|
|
60
|
+
row.description,
|
|
61
|
+
...(row.availability.status === "unavailable"
|
|
62
|
+
? [row.availability.reason]
|
|
63
|
+
: []),
|
|
64
|
+
]
|
|
65
|
+
.filter((part) => part !== undefined)
|
|
66
|
+
.join(" · ") || undefined,
|
|
57
67
|
order: current?.order ?? row.order,
|
|
58
68
|
});
|
|
59
69
|
}
|
package/dist/styles.css
CHANGED
|
@@ -16513,6 +16513,13 @@
|
|
|
16513
16513
|
.empty-state-panel .empty-state-primary {
|
|
16514
16514
|
justify-items: center;
|
|
16515
16515
|
}
|
|
16516
|
+
.empty-state-action-row {
|
|
16517
|
+
display: flex;
|
|
16518
|
+
flex-wrap: wrap;
|
|
16519
|
+
align-items: center;
|
|
16520
|
+
justify-content: center;
|
|
16521
|
+
gap: var(--spacing-sm);
|
|
16522
|
+
}
|
|
16516
16523
|
.empty-state-reason {
|
|
16517
16524
|
color: var(--stipe-fg-muted);
|
|
16518
16525
|
font-size: var(--text-sm);
|
|
@@ -40,6 +40,7 @@ type KeyBindingRow = Readonly<{
|
|
|
40
40
|
command: WhistleCommandKey;
|
|
41
41
|
keys: string;
|
|
42
42
|
title: string;
|
|
43
|
+
description?: string;
|
|
43
44
|
order: number;
|
|
44
45
|
}>;
|
|
45
46
|
```
|
|
@@ -235,6 +236,7 @@ function keyBindings(snapshot): readonly Readonly<{
|
|
|
235
236
|
command: WhistleCommandKey;
|
|
236
237
|
keys: string;
|
|
237
238
|
title: string;
|
|
239
|
+
description?: string;
|
|
238
240
|
order: number;
|
|
239
241
|
}>[];
|
|
240
242
|
```
|
|
@@ -250,7 +252,8 @@ Every bound key in the live graph, grouped by command.
|
|
|
250
252
|
#### Returns
|
|
251
253
|
|
|
252
254
|
readonly `Readonly`\<\{ `commandId`: `string`; `command`: `WhistleCommandKey`;
|
|
253
|
-
`keys`: `string`; `title`: `string`; `
|
|
255
|
+
`keys`: `string`; `title`: `string`; `description?`: `string`; `order`:
|
|
256
|
+
`number`; \}\>[]
|
|
254
257
|
|
|
255
258
|
---
|
|
256
259
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fungi.computer/parakeet",
|
|
3
|
-
"version": "0.11.
|
|
3
|
+
"version": "0.11.8",
|
|
4
4
|
"author": "Levi <levi@technomancy.dev>",
|
|
5
5
|
"private": false,
|
|
6
6
|
"description": "Standalone React composer for a typed Shiitake Session",
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
"@fungi.computer/agar": "0.9.1",
|
|
64
64
|
"@fungi.computer/bird-dog": "0.3.6",
|
|
65
65
|
"@fungi.computer/cairn": "0.1.0",
|
|
66
|
-
"@fungi.computer/caps": "0.10.
|
|
66
|
+
"@fungi.computer/caps": "0.10.4",
|
|
67
67
|
"@fungi.computer/gills": "0.3.0",
|
|
68
68
|
"@fungi.computer/knapsack": "0.4.9",
|
|
69
69
|
"@fungi.computer/shiitake": "0.12.4",
|