@pi-unipi/footer 2.10.2 → 2.12.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.
@@ -50,8 +50,14 @@ const overlay = new OverlayTheme();
50
50
 
51
51
  // ─── Show the footer settings overlay ──────────────────────────────────
52
52
 
53
- export function showFooterSettings(ctx: ExtensionCommandContext, groups: FooterGroup[], onSettingsChanged?: () => void): void {
54
- ctx.ui.custom<void>(
53
+ /**
54
+ * Returns the overlay's promise so callers can run post-close actions
55
+ * (e.g. the glance editor swap) AFTER focus has returned to the editor —
56
+ * setEditorComponent() steals keyboard focus and would strand this very
57
+ * overlay unclosable if invoked from onSettingsChanged while it is open.
58
+ */
59
+ export function showFooterSettings(ctx: ExtensionCommandContext, groups: FooterGroup[], onSettingsChanged?: () => void): Promise<void> {
60
+ return ctx.ui.custom<void>(
55
61
  (tui, _theme, _keybindings, done) => {
56
62
  const overlay = new FooterSettingsOverlay(groups, onSettingsChanged);
57
63
  overlay.onClose = () => done();
@@ -214,6 +220,13 @@ class FooterSettingsOverlay {
214
220
 
215
221
  private buildAppearanceList(): void {
216
222
  const items: SettingItem[] = [
223
+ {
224
+ id: "glanceMode",
225
+ label: "Glance Footer",
226
+ description: "Experimental: framed input box + session strip (replaces classic row)",
227
+ currentValue: this.settings.glanceMode !== false ? "on" : "off",
228
+ values: ["on", "off"],
229
+ },
217
230
  {
218
231
  id: "preset",
219
232
  label: "Preset",
@@ -352,6 +365,9 @@ class FooterSettingsOverlay {
352
365
 
353
366
  private onAppearanceChange(id: string, newValue: string): void {
354
367
  switch (id) {
368
+ case "glanceMode":
369
+ this.settings.glanceMode = newValue === "on";
370
+ break;
355
371
  case "preset":
356
372
  this.settings.preset = newValue;
357
373
  break;
package/src/types.ts CHANGED
@@ -15,7 +15,9 @@ export type SegmentZone = "left" | "center" | "right";
15
15
  /** Semantic color names mapped to segment groups */
16
16
  export type SemanticColor =
17
17
  // ── Model & Identity (Left zone) ──
18
+ | "brand"
18
19
  | "model"
20
+ | "directory"
19
21
  | "path"
20
22
  | "git"
21
23
  | "gitClean"
@@ -181,6 +183,8 @@ export interface FooterSettings {
181
183
  enabled: boolean;
182
184
  /** Active preset name */
183
185
  preset: string;
186
+ /** Glance-style experiment: frame input box + session strip, suppress classic row */
187
+ glanceMode?: boolean;
184
188
  /** Separator style */
185
189
  separator: SeparatorStyle;
186
190
  /** Icon style: nerd (Nerd Font glyphs), emoji (Unicode emoji), text (plain labels) */