@pi-kaush/pi-content-layout 0.1.7 → 0.1.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.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,10 @@
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.
8
+
5
9
  - Reference semantic tokens for the remaining extension-colored elements:
6
10
  the intercom sender name rides `customMessageLabel`, the submitted-prompt
7
11
  rail rides `borderAccent`, and prompt surfaces paint with `userMessageBg`.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-kaush/pi-content-layout",
3
- "version": "0.1.7",
3
+ "version": "0.1.8",
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,10 +258,13 @@ 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 extra leading space inside the body, so submitted text sits two
262
- // columns right of the rail instead of one.
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);
263
266
  const body = paintBackground(
264
- ` ${fitLine(recolored, Math.max(1, bodyWidth - 1))}`,
267
+ `${padding}${fitLine(recolored, innerWidth)}${padding}`,
265
268
  bodyWidth,
266
269
  surfaceBg,
267
270
  );