pi-extension-utils 0.7.0 → 0.7.2
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/dist/src/pane/overlay.js +3 -1
- package/dist/src/ui/client.d.ts +1 -0
- package/dist/src/ui/client.js +11 -4
- package/package.json +1 -1
package/dist/src/pane/overlay.js
CHANGED
|
@@ -397,8 +397,9 @@ export function paneOverlay(options) {
|
|
|
397
397
|
if (event.button === 64 || event.button === 65) {
|
|
398
398
|
if (event.y > maxRow)
|
|
399
399
|
return;
|
|
400
|
-
const
|
|
400
|
+
const direction = event.button === 64 ? -1 : 1;
|
|
401
401
|
if (inPrimaryColumn || (primaryWidth > 0 && event.x <= primaryWidth + 1)) {
|
|
402
|
+
const lines = direction * (event.shift ? 5 : 1);
|
|
402
403
|
focus = "primary";
|
|
403
404
|
applyPrimaryNav(bodyHeight, legendLineCount, (state, rows, viewportHeight) => {
|
|
404
405
|
if ((options.primary.mode ?? "scroll") === "cursor") {
|
|
@@ -418,6 +419,7 @@ export function paneOverlay(options) {
|
|
|
418
419
|
});
|
|
419
420
|
}
|
|
420
421
|
else {
|
|
422
|
+
const lines = direction * (event.shift ? 5 : 1);
|
|
421
423
|
focus = "detail";
|
|
422
424
|
markDetailManual();
|
|
423
425
|
detailState.scrollOffset = moveScrollOffset({ offset: detailState.scrollOffset, contentLength: detailRows.length, viewportHeight: Math.max(1, bodyHeight) }, lines);
|
package/dist/src/ui/client.d.ts
CHANGED
package/dist/src/ui/client.js
CHANGED
|
@@ -9,6 +9,9 @@ export function createTuiModeCapture() {
|
|
|
9
9
|
isFullscreenTui() {
|
|
10
10
|
return mode === "fullscreen";
|
|
11
11
|
},
|
|
12
|
+
isRegularTui() {
|
|
13
|
+
return mode === "regular";
|
|
14
|
+
},
|
|
12
15
|
};
|
|
13
16
|
}
|
|
14
17
|
export function createUiClient(fullscreen, ctx, capture = createTuiModeCapture()) {
|
|
@@ -29,12 +32,16 @@ export function createUiClient(fullscreen, ctx, capture = createTuiModeCapture()
|
|
|
29
32
|
// clips it while the transcript tail renders above it. Mount it as a
|
|
30
33
|
// full-screen overlay instead so the component owns the whole screen,
|
|
31
34
|
// matching the regular-TUI behavior it was designed for.
|
|
32
|
-
|
|
33
|
-
|
|
35
|
+
// Before any wrapped factory has rendered, the mode is unknown. Default
|
|
36
|
+
// that cold-start case to an overlay: it is the only mount that remains
|
|
37
|
+
// fullscreen and receives focus in the alt-screen TUI. Preserve the
|
|
38
|
+
// legacy editor-slot mount only when regular mode was positively seen.
|
|
39
|
+
const options = capture.isRegularTui()
|
|
40
|
+
? undefined
|
|
41
|
+
: {
|
|
34
42
|
overlay: true,
|
|
35
43
|
overlayOptions: { anchor: "top-left", width: "100%", maxHeight: "100%" },
|
|
36
|
-
}
|
|
37
|
-
: undefined;
|
|
44
|
+
};
|
|
38
45
|
return await ui.custom(wrapped, options);
|
|
39
46
|
}
|
|
40
47
|
finally {
|