@xynogen/pix-display 0.1.3 → 0.1.4
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/package.json +1 -1
- package/src/paste-chips.ts +10 -4
package/package.json
CHANGED
package/src/paste-chips.ts
CHANGED
|
@@ -21,6 +21,7 @@ import { CustomEditor } from "@earendil-works/pi-coding-agent";
|
|
|
21
21
|
import type { EditorTheme, TUI } from "@earendil-works/pi-tui";
|
|
22
22
|
import { truncateToWidth, visibleWidth } from "@earendil-works/pi-tui";
|
|
23
23
|
import { BOLD, FG_BLUE, FG_DIM, FG_GREEN, RST } from "@xynogen/pix-pretty/ansi";
|
|
24
|
+
import { icon } from "@xynogen/pix-pretty/icon-catalog";
|
|
24
25
|
|
|
25
26
|
// Upstream stopped re-exporting `EditorFactory` from the package entry point,
|
|
26
27
|
// so we reconstruct its signature locally from the still-exported primitives.
|
|
@@ -166,15 +167,20 @@ export function restyleMarkers(line: string, imageIds: Set<number>): string {
|
|
|
166
167
|
(_full, idStr, _g2, _g3, linesStr, charsStr) => {
|
|
167
168
|
const id = Number.parseInt(idStr, 10);
|
|
168
169
|
if (imageIds.has(id)) {
|
|
169
|
-
return chip(FG_BLUE, "
|
|
170
|
+
return chip(FG_BLUE, icon("paste.image"), "image", `#${id}`);
|
|
170
171
|
}
|
|
171
172
|
if (linesStr) {
|
|
172
|
-
return chip(FG_GREEN, "
|
|
173
|
+
return chip(FG_GREEN, icon("paste.text"), "text", `${linesStr} lines`);
|
|
173
174
|
}
|
|
174
175
|
if (charsStr) {
|
|
175
|
-
return chip(
|
|
176
|
+
return chip(
|
|
177
|
+
FG_GREEN,
|
|
178
|
+
icon("paste.text"),
|
|
179
|
+
"text",
|
|
180
|
+
`${compactNumber(charsStr)} chars`,
|
|
181
|
+
);
|
|
176
182
|
}
|
|
177
|
-
return chip(FG_GREEN, "
|
|
183
|
+
return chip(FG_GREEN, icon("paste.text"), "text", `#${id}`);
|
|
178
184
|
},
|
|
179
185
|
);
|
|
180
186
|
}
|