@xynogen/pix-9router 0.2.0 → 0.2.1
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/render.test.ts +2 -2
- package/src/render.ts +1 -1
package/package.json
CHANGED
package/src/render.test.ts
CHANGED
|
@@ -43,14 +43,14 @@ test("renderResult dims every line", () => {
|
|
|
43
43
|
test("renderResult caps preview when not expanded", () => {
|
|
44
44
|
const stub = stubComponent();
|
|
45
45
|
const rr = makeRenderResult();
|
|
46
|
-
const body = Array.from({ length:
|
|
46
|
+
const body = Array.from({ length: 37 }, (_, i) => `L${i}`).join("\n");
|
|
47
47
|
rr(
|
|
48
48
|
{ content: [{ type: "text", text: body }] } as never,
|
|
49
49
|
{ expanded: false, isPartial: false },
|
|
50
50
|
theme,
|
|
51
51
|
{ lastComponent: stub.component as never, isError: false },
|
|
52
52
|
);
|
|
53
|
-
expect(stub.get()).toContain("… 5 more lines");
|
|
53
|
+
expect(stub.get()).toContain("… 5 more lines"); // 37 lines − 32 cap
|
|
54
54
|
});
|
|
55
55
|
|
|
56
56
|
test("renderResult renders empty body marker", () => {
|
package/src/render.ts
CHANGED
|
@@ -33,7 +33,7 @@ type TextCtor = new (text?: string, padX?: number, padY?: number) => TextLike;
|
|
|
33
33
|
// Preview cap is intentionally generous — dimming already de-emphasises the
|
|
34
34
|
// body, so we only truncate to keep pathological multi-thousand-line dumps
|
|
35
35
|
// from flooding the viewport. Expanding shows everything.
|
|
36
|
-
const MAX_PREVIEW_LINES =
|
|
36
|
+
const MAX_PREVIEW_LINES = 32;
|
|
37
37
|
|
|
38
38
|
let TextComponent: TextCtor | undefined;
|
|
39
39
|
try {
|