@pi-kaush/pi-content-layout 0.1.8 → 0.1.9

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 CHANGED
@@ -2,9 +2,9 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
- - Give the submitted-prompt box an explicit right padding column inside the
6
- surface, matching the one already on the left of the text, so wrapped
7
- content no longer sits flush against the box's right edge.
5
+ - Pad the submitted-prompt box with two columns on the right of the text so
6
+ it matches the two-column visual gap the quarter-block rail leaves on the
7
+ left; previously wrapped content sat one column off the right edge.
8
8
 
9
9
  - Reference semantic tokens for the remaining extension-colored elements:
10
10
  the intercom sender name rides `customMessageLabel`, the submitted-prompt
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-kaush/pi-content-layout",
3
- "version": "0.1.8",
3
+ "version": "0.1.9",
4
4
  "description": "Inset Pi's conversation surface and style active and submitted prompts as matching blocks.",
5
5
  "license": "MIT",
6
6
  "author": "Kaushik Gopal",
package/src/render.ts CHANGED
@@ -258,13 +258,14 @@ export function renderSubmittedUserLines(
258
258
  const { controls, content } = splitLeadingSemanticControls(line);
259
259
  const recolored = replaceBackground(content, surfaceBg);
260
260
  const rail = theme.fg(railColor, PROMPT_RAIL);
261
- // One column of side padding inside the box on both edges, so submitted
262
- // text sits two columns right of the rail and one column off the right
263
- // edge — matching the active editor's side padding.
264
- const padding = " ".repeat(ACTIVE_SIDE_PADDING);
265
- const innerWidth = Math.max(1, bodyWidth - ACTIVE_SIDE_PADDING * 2);
261
+ // The rail glyph (▎) fills only the left quarter of its cell, so one
262
+ // column of left padding already reads as a two-column visual gap.
263
+ // Give the right edge two columns so both sides of the text read equal.
264
+ const leftPadding = " ".repeat(ACTIVE_SIDE_PADDING);
265
+ const rightPadding = " ".repeat(ACTIVE_SIDE_PADDING + 1);
266
+ const innerWidth = Math.max(1, bodyWidth - ACTIVE_SIDE_PADDING * 2 - 1);
266
267
  const body = paintBackground(
267
- `${padding}${fitLine(recolored, innerWidth)}${padding}`,
268
+ `${leftPadding}${fitLine(recolored, innerWidth)}${rightPadding}`,
268
269
  bodyWidth,
269
270
  surfaceBg,
270
271
  );