@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 +3 -3
- package/package.json +1 -1
- package/src/render.ts +7 -6
package/CHANGELOG.md
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
## Unreleased
|
|
4
4
|
|
|
5
|
-
-
|
|
6
|
-
|
|
7
|
-
content
|
|
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
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
|
-
//
|
|
262
|
-
//
|
|
263
|
-
// edge
|
|
264
|
-
const
|
|
265
|
-
const
|
|
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
|
-
`${
|
|
268
|
+
`${leftPadding}${fitLine(recolored, innerWidth)}${rightPadding}`,
|
|
268
269
|
bodyWidth,
|
|
269
270
|
surfaceBg,
|
|
270
271
|
);
|