avtc-claude-settings-ui 1.0.12 → 1.0.13
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/dist/pane/tree.d.ts +4 -0
- package/dist/pane/tree.js +30 -13
- package/package.json +1 -1
package/dist/pane/tree.d.ts
CHANGED
|
@@ -12,5 +12,9 @@ export interface PaneTreeOptions {
|
|
|
12
12
|
bodyColumns: number;
|
|
13
13
|
/** A dirty marker in the footer (the unsaved-changes hint). */
|
|
14
14
|
dirty?: boolean;
|
|
15
|
+
/** The surface drawing the pane (e.surface). Keyboard-driven hints are
|
|
16
|
+
* drawn only on surfaces whose controls take the keyboard (the desktop
|
|
17
|
+
* drives the pane with the pointer). */
|
|
18
|
+
surface?: string;
|
|
15
19
|
}
|
|
16
20
|
export declare function buildPaneTree(els: PaneElements, controller: PaneController, options: PaneTreeOptions): unknown;
|
package/dist/pane/tree.js
CHANGED
|
@@ -38,6 +38,9 @@ function settingRow(els, controller, row, _index, labelWidth, ringRowId) {
|
|
|
38
38
|
columnGap: 1,
|
|
39
39
|
children: [
|
|
40
40
|
els.Text({
|
|
41
|
+
// the padded label column needs the monospaced face on surfaces whose
|
|
42
|
+
// UI face is proportional (the terminal ignores the prop)
|
|
43
|
+
mono: true,
|
|
41
44
|
children: [`${marker}${row.label.padEnd(labelWidth)}`],
|
|
42
45
|
...(ringRowId === row.id ? { color: "claude" } : {}),
|
|
43
46
|
}),
|
|
@@ -57,7 +60,7 @@ function descriptionBox(els, row, bodyColumns) {
|
|
|
57
60
|
}
|
|
58
61
|
while (lines.length < DESCRIPTION_LINES)
|
|
59
62
|
lines.push("");
|
|
60
|
-
return els.Text({ children: [lines.join("\n")], dimColor: true });
|
|
63
|
+
return els.Text({ mono: true, children: [lines.join("\n")], dimColor: true });
|
|
61
64
|
}
|
|
62
65
|
/** The value picker (pi's filter-first picker): the picking row's title, a
|
|
63
66
|
* filter field, the filtered preset options as buttons, a custom-value
|
|
@@ -110,7 +113,9 @@ function pickerBody(els, controller, options, pickingRow, pickerFilter, pickerEp
|
|
|
110
113
|
key: "picker-back",
|
|
111
114
|
label: "← Back",
|
|
112
115
|
onPress: () => controller.closePicker(),
|
|
113
|
-
}),
|
|
116
|
+
}), ...(options.surface === "desktop"
|
|
117
|
+
? []
|
|
118
|
+
: [els.Text({ children: [" Enter to select · Esc to go back"], dimColor: true })]), els.Text({ children: [" "] }), els.Box({
|
|
114
119
|
key: "picker-description",
|
|
115
120
|
flexDirection: "column",
|
|
116
121
|
children: [descriptionBox(els, pickingRow, options.bodyColumns)],
|
|
@@ -140,6 +145,9 @@ export function buildPaneTree(els, controller, options) {
|
|
|
140
145
|
key: `${TAB_KEY_PREFIX}${index}`,
|
|
141
146
|
label: `${index === activeTabIndex ? ACTIVE_TAB_MARKER : INACTIVE_TAB_MARKER} ${tab.label}`,
|
|
142
147
|
dimColor: index !== activeTabIndex,
|
|
148
|
+
// the first tab owns the pane's initial focus ring (a surface that
|
|
149
|
+
// focuses the last actable drawn otherwise starts there)
|
|
150
|
+
...(index === 0 ? { autoFocus: true } : {}),
|
|
143
151
|
onPress: () => controller.switchTab(index),
|
|
144
152
|
}));
|
|
145
153
|
// The page chords' RECEIVERS, in the tab lane where page controls live:
|
|
@@ -161,7 +169,11 @@ export function buildPaneTree(els, controller, options) {
|
|
|
161
169
|
onPress: () => controller.pageTurnDirect(1),
|
|
162
170
|
}));
|
|
163
171
|
const labelWidth = Math.max(...visibleSettings.map((row) => row.label.length), 1);
|
|
164
|
-
const rows = visibleSettings.map((row, index) => settingRow(els, controller, row, index, labelWidth,
|
|
172
|
+
const rows = visibleSettings.map((row, index) => settingRow(els, controller, row, index, labelWidth,
|
|
173
|
+
// the selection marker names the keyboard walk's seat; a pointer-driven
|
|
174
|
+
// surface has no walk, and no hook follows its hover — the marker
|
|
175
|
+
// would point at a row the pointer never chose
|
|
176
|
+
options.surface === "desktop" ? null : ringRowId));
|
|
165
177
|
const footerActions = [];
|
|
166
178
|
const liveSave = storageLevels.length === 1 && storageLevels[0] !== "session";
|
|
167
179
|
if (!liveSave && storageLevels.includes("project")) {
|
|
@@ -227,19 +239,24 @@ export function buildPaneTree(els, controller, options) {
|
|
|
227
239
|
children: [descriptionBox(els, describedRow, options.bodyColumns)],
|
|
228
240
|
}),
|
|
229
241
|
els.Box({ key: "settings-footer", flexDirection: "row", columnGap: 1, children: footerActions }),
|
|
230
|
-
// The keybind legend (pi-style footer note)
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
els.
|
|
242
|
+
// The keybind legend (pi-style footer note) — only where the keyboard
|
|
243
|
+
// drives the pane; pointer-driven surfaces draw nothing
|
|
244
|
+
...(options.surface === "desktop"
|
|
245
|
+
? []
|
|
246
|
+
: [
|
|
247
|
+
els.Box({
|
|
248
|
+
key: "settings-legend",
|
|
249
|
+
flexDirection: "row",
|
|
236
250
|
children: [
|
|
237
|
-
|
|
251
|
+
els.Text({
|
|
252
|
+
children: [
|
|
253
|
+
" Esc | ↑↓: navigate | ←→: filter cursor | Ctrl+←/→: switch tab | Enter: change | Ctrl+S: save project | Ctrl+G: save global",
|
|
254
|
+
],
|
|
255
|
+
dimColor: true,
|
|
256
|
+
}),
|
|
238
257
|
],
|
|
239
|
-
dimColor: true,
|
|
240
258
|
}),
|
|
241
|
-
],
|
|
242
|
-
}),
|
|
259
|
+
]),
|
|
243
260
|
],
|
|
244
261
|
});
|
|
245
262
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "avtc-claude-settings-ui",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.13",
|
|
4
4
|
"description": "A schema-driven settings UI for Claude mods — define your settings, get a tabbed pane, a /<name>-settings command, and layered persistence.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|