@danypops/pi-packed 0.13.0 → 0.13.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.
@@ -8,9 +8,11 @@
8
8
  * extensions, c jump to full resource config, f find/install new
9
9
  * packages, s settings. The panel itself is a real bordered (rounded)
10
10
  * floating overlay (`ctx.ui.custom` with overlay:true, Malevich's
11
- * Envelope for the box), anchored to the top so its header stays put and
12
- * only the footer moves as content height changes. Enter opens a second,
13
- * smaller overlay action menu on top of it. U's batch update stays on
11
+ * Envelope for the box), positioned at 40% of terminal height (pi-tui's
12
+ * own row percentage, not a fixed row count -- scales with the real
13
+ * terminal, unlike the anchor:"top-center"+offsetY this replaced, which
14
+ * was pinned 1 row below the absolute top on any terminal size). Enter
15
+ * opens a second, smaller overlay action menu on top of it. U's batch update stays on
14
16
  * this same package list -- progress renders inline next to the row
15
17
  * currently being updated, not as a separate screen. Rows render through
16
18
  * Malevich's Table (real column-aligned Package/Version/status cells,
@@ -464,11 +466,18 @@ function renderPanel(ctx: ExtensionCommandContext, natives: Natives, initialRows
464
466
 
465
467
  // Real bordered box (rounded corners), not just a horizontal rule --
466
468
  // title carries the live update badge/status instead of a header line.
469
+ // measure must be explicit: Envelope's own default is ASCII-only (raw
470
+ // .length, blind to ANSI escape codes) and every line below is styled
471
+ // through theme.fg/theme.bold -- without this, Envelope pads each line
472
+ // against its own escape-code-inflated "length" instead of its real
473
+ // visible width, so the right border lands at a different column on
474
+ // every line depending on how much styling that particular line has.
467
475
  const envelope = new Envelope({
468
476
  title: panelTitle(),
469
477
  borderStyle: "rounded",
470
478
  style: (s) => theme.fg("border", s),
471
479
  titleStyle: (s) => theme.bold(theme.fg("accent", s)),
480
+ measure,
472
481
  });
473
482
  const body = {
474
483
  invalidate() { header.invalidate(); list.invalidate(); },
@@ -569,5 +578,14 @@ function renderPanel(ctx: ExtensionCommandContext, natives: Natives, initialRows
569
578
  tui.requestRender();
570
579
  },
571
580
  };
572
- }, { overlay: true, overlayOptions: { width: "70%", maxHeight: "70%", anchor: "top-center", offsetY: 1 } });
581
+ // row is a real percentage of terminal height (0%=top, 100%=bottom) --
582
+ // unlike anchor:"top-center"+offsetY (a fixed row count, effectively
583
+ // pinned to the very top on any terminal size), this scales with the
584
+ // actual screen. anchor:"center" still governs horizontal centering
585
+ // (row overrides only the vertical resolution). Note this isn't fully
586
+ // content-height-independent -- pi-tui's own row-percentage formula
587
+ // interpolates over the range of positions that still fit the current
588
+ // content height, so a shorter/taller row count shifts this somewhat;
589
+ // only exactly 0%/100% are perfectly jitter-free in that library.
590
+ }, { overlay: true, overlayOptions: { width: "70%", maxHeight: "70%", anchor: "center", row: "40%" } });
573
591
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@danypops/pi-packed",
3
- "version": "0.13.0",
3
+ "version": "0.13.2",
4
4
  "description": "Pi package tools, commands, profiles, and TUI for the Packed daemon",
5
5
  "type": "module",
6
6
  "keywords": ["pi-package"],