@dsh-cc/pi-tui 0.5.0
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/LICENSE +21 -0
- package/PORTING.md +18 -0
- package/README.md +7 -0
- package/lib/alt-screen-search.d.ts +26 -0
- package/lib/alt-screen-search.d.ts.map +1 -0
- package/lib/alt-screen-search.js +122 -0
- package/lib/alt-screen-search.js.map +1 -0
- package/lib/autocomplete.d.ts +56 -0
- package/lib/autocomplete.d.ts.map +1 -0
- package/lib/autocomplete.js +632 -0
- package/lib/autocomplete.js.map +1 -0
- package/lib/components/alt-screen-flash.d.ts +13 -0
- package/lib/components/alt-screen-flash.d.ts.map +1 -0
- package/lib/components/alt-screen-flash.js +37 -0
- package/lib/components/alt-screen-flash.js.map +1 -0
- package/lib/components/box.d.ts +22 -0
- package/lib/components/box.d.ts.map +1 -0
- package/lib/components/box.js +104 -0
- package/lib/components/box.js.map +1 -0
- package/lib/components/cancellable-loader.d.ts +22 -0
- package/lib/components/cancellable-loader.d.ts.map +1 -0
- package/lib/components/cancellable-loader.js +35 -0
- package/lib/components/cancellable-loader.js.map +1 -0
- package/lib/components/editor.d.ts +255 -0
- package/lib/components/editor.d.ts.map +1 -0
- package/lib/components/editor.js +1961 -0
- package/lib/components/editor.js.map +1 -0
- package/lib/components/h-stack.d.ts +7 -0
- package/lib/components/h-stack.d.ts.map +1 -0
- package/lib/components/h-stack.js +43 -0
- package/lib/components/h-stack.js.map +1 -0
- package/lib/components/image.d.ts +28 -0
- package/lib/components/image.d.ts.map +1 -0
- package/lib/components/image.js +90 -0
- package/lib/components/image.js.map +1 -0
- package/lib/components/input.d.ts +37 -0
- package/lib/components/input.d.ts.map +1 -0
- package/lib/components/input.js +378 -0
- package/lib/components/input.js.map +1 -0
- package/lib/components/loader.d.ts +31 -0
- package/lib/components/loader.d.ts.map +1 -0
- package/lib/components/loader.js +69 -0
- package/lib/components/loader.js.map +1 -0
- package/lib/components/markdown.d.ts +103 -0
- package/lib/components/markdown.d.ts.map +1 -0
- package/lib/components/markdown.js +811 -0
- package/lib/components/markdown.js.map +1 -0
- package/lib/components/scroll-view.d.ts +56 -0
- package/lib/components/scroll-view.d.ts.map +1 -0
- package/lib/components/scroll-view.js +189 -0
- package/lib/components/scroll-view.js.map +1 -0
- package/lib/components/select-list.d.ts +50 -0
- package/lib/components/select-list.d.ts.map +1 -0
- package/lib/components/select-list.js +159 -0
- package/lib/components/select-list.js.map +1 -0
- package/lib/components/settings-list.d.ts +56 -0
- package/lib/components/settings-list.d.ts.map +1 -0
- package/lib/components/settings-list.js +202 -0
- package/lib/components/settings-list.js.map +1 -0
- package/lib/components/spacer.d.ts +12 -0
- package/lib/components/spacer.d.ts.map +1 -0
- package/lib/components/spacer.js +23 -0
- package/lib/components/spacer.js.map +1 -0
- package/lib/components/stack.d.ts +32 -0
- package/lib/components/stack.d.ts.map +1 -0
- package/lib/components/stack.js +111 -0
- package/lib/components/stack.js.map +1 -0
- package/lib/components/text.d.ts +19 -0
- package/lib/components/text.d.ts.map +1 -0
- package/lib/components/text.js +90 -0
- package/lib/components/text.js.map +1 -0
- package/lib/components/truncated-text.d.ts +13 -0
- package/lib/components/truncated-text.d.ts.map +1 -0
- package/lib/components/truncated-text.js +51 -0
- package/lib/components/truncated-text.js.map +1 -0
- package/lib/components/v-stack.d.ts +8 -0
- package/lib/components/v-stack.d.ts.map +1 -0
- package/lib/components/v-stack.js +26 -0
- package/lib/components/v-stack.js.map +1 -0
- package/lib/editor-component.d.ts +39 -0
- package/lib/editor-component.d.ts.map +1 -0
- package/lib/editor-component.js +2 -0
- package/lib/editor-component.js.map +1 -0
- package/lib/fuzzy.d.ts +16 -0
- package/lib/fuzzy.d.ts.map +1 -0
- package/lib/fuzzy.js +110 -0
- package/lib/fuzzy.js.map +1 -0
- package/lib/index.d.ts +31 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +42 -0
- package/lib/index.js.map +1 -0
- package/lib/keybindings.d.ts +273 -0
- package/lib/keybindings.d.ts.map +1 -0
- package/lib/keybindings.js +233 -0
- package/lib/keybindings.js.map +1 -0
- package/lib/keys.d.ts +184 -0
- package/lib/keys.d.ts.map +1 -0
- package/lib/keys.js +1174 -0
- package/lib/keys.js.map +1 -0
- package/lib/kill-ring.d.ts +28 -0
- package/lib/kill-ring.d.ts.map +1 -0
- package/lib/kill-ring.js +44 -0
- package/lib/kill-ring.js.map +1 -0
- package/lib/latex.d.ts +10 -0
- package/lib/latex.d.ts.map +1 -0
- package/lib/latex.js +1271 -0
- package/lib/latex.js.map +1 -0
- package/lib/layout-node.d.ts +40 -0
- package/lib/layout-node.d.ts.map +1 -0
- package/lib/layout-node.js +6 -0
- package/lib/layout-node.js.map +1 -0
- package/lib/layout.d.ts +40 -0
- package/lib/layout.d.ts.map +1 -0
- package/lib/layout.js +321 -0
- package/lib/layout.js.map +1 -0
- package/lib/native-modifiers.d.ts +3 -0
- package/lib/native-modifiers.d.ts.map +1 -0
- package/lib/native-modifiers.js +54 -0
- package/lib/native-modifiers.js.map +1 -0
- package/lib/native-module-path.d.ts +7 -0
- package/lib/native-module-path.d.ts.map +1 -0
- package/lib/native-module-path.js +19 -0
- package/lib/native-module-path.js.map +1 -0
- package/lib/stdin-buffer.d.ts +56 -0
- package/lib/stdin-buffer.d.ts.map +1 -0
- package/lib/stdin-buffer.js +366 -0
- package/lib/stdin-buffer.js.map +1 -0
- package/lib/terminal-colors.d.ts +10 -0
- package/lib/terminal-colors.d.ts.map +1 -0
- package/lib/terminal-colors.js +59 -0
- package/lib/terminal-colors.js.map +1 -0
- package/lib/terminal-image.d.ts +116 -0
- package/lib/terminal-image.d.ts.map +1 -0
- package/lib/terminal-image.js +518 -0
- package/lib/terminal-image.js.map +1 -0
- package/lib/terminal.d.ts +117 -0
- package/lib/terminal.d.ts.map +1 -0
- package/lib/terminal.js +447 -0
- package/lib/terminal.js.map +1 -0
- package/lib/tui-alt-screen.d.ts +118 -0
- package/lib/tui-alt-screen.d.ts.map +1 -0
- package/lib/tui-alt-screen.js +1148 -0
- package/lib/tui-alt-screen.js.map +1 -0
- package/lib/tui-main-screen.d.ts +39 -0
- package/lib/tui-main-screen.d.ts.map +1 -0
- package/lib/tui-main-screen.js +533 -0
- package/lib/tui-main-screen.js.map +1 -0
- package/lib/tui.d.ts +308 -0
- package/lib/tui.d.ts.map +1 -0
- package/lib/tui.js +941 -0
- package/lib/tui.js.map +1 -0
- package/lib/undo-stack.d.ts +17 -0
- package/lib/undo-stack.d.ts.map +1 -0
- package/lib/undo-stack.js +25 -0
- package/lib/undo-stack.js.map +1 -0
- package/lib/utils.d.ts +96 -0
- package/lib/utils.d.ts.map +1 -0
- package/lib/utils.js +1191 -0
- package/lib/utils.js.map +1 -0
- package/lib/word-navigation.d.ts +25 -0
- package/lib/word-navigation.d.ts.map +1 -0
- package/lib/word-navigation.js +96 -0
- package/lib/word-navigation.js.map +1 -0
- package/package.json +42 -0
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { allocateStackSizes, Stack, visibleStackEntries } from "./stack.js";
|
|
2
|
+
export class VStack extends Stack {
|
|
3
|
+
layoutType = "vstack";
|
|
4
|
+
constructor(children = [], options = {}) {
|
|
5
|
+
super(children, options);
|
|
6
|
+
}
|
|
7
|
+
render(width) {
|
|
8
|
+
const viewport = { width: Math.max(1, width), height: Number.MAX_SAFE_INTEGER };
|
|
9
|
+
const entries = visibleStackEntries(this.entries, viewport);
|
|
10
|
+
const rendered = entries.map((entry) => entry.component.render(viewport.width));
|
|
11
|
+
const sizes = allocateStackSizes(entries, rendered.map((lines) => lines.length), undefined, this.gap);
|
|
12
|
+
const lines = [];
|
|
13
|
+
for (let index = 0; index < entries.length; index++) {
|
|
14
|
+
if (index > 0) {
|
|
15
|
+
for (let gap = 0; gap < this.gap; gap++)
|
|
16
|
+
lines.push("");
|
|
17
|
+
}
|
|
18
|
+
const childLines = rendered[index].slice(0, sizes[index]);
|
|
19
|
+
lines.push(...childLines);
|
|
20
|
+
for (let padding = childLines.length; padding < sizes[index]; padding++)
|
|
21
|
+
lines.push("");
|
|
22
|
+
}
|
|
23
|
+
return lines;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=v-stack.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"v-stack.js","sourceRoot":"","sources":["../../src/components/v-stack.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,KAAK,EAAsC,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAEhH,MAAM,OAAO,MAAO,SAAQ,KAAK;IACb,UAAU,GAAG,QAAiB,CAAC;IAElD,YAAY,WAAyB,EAAE,EAAE,UAAwB,EAAE;QAClE,KAAK,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;IAC1B,CAAC;IAEQ,MAAM,CAAC,KAAa;QAC5B,MAAM,QAAQ,GAAG,EAAE,KAAK,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,KAAK,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,gBAAgB,EAAE,CAAC;QAChF,MAAM,OAAO,GAAG,mBAAmB,CAAC,IAAI,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;QAC5D,MAAM,QAAQ,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,SAAS,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC;QAChF,MAAM,KAAK,GAAG,kBAAkB,CAC/B,OAAO,EACP,QAAQ,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC,EACrC,SAAS,EACT,IAAI,CAAC,GAAG,CACR,CAAC;QACF,MAAM,KAAK,GAAa,EAAE,CAAC;QAC3B,KAAK,IAAI,KAAK,GAAG,CAAC,EAAE,KAAK,GAAG,OAAO,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE,CAAC;YACrD,IAAI,KAAK,GAAG,CAAC,EAAE,CAAC;gBACf,KAAK,IAAI,GAAG,GAAG,CAAC,EAAE,GAAG,GAAG,IAAI,CAAC,GAAG,EAAE,GAAG,EAAE;oBAAE,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;YACzD,CAAC;YACD,MAAM,UAAU,GAAG,QAAQ,CAAC,KAAK,CAAE,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC;YAC3D,KAAK,CAAC,IAAI,CAAC,GAAG,UAAU,CAAC,CAAC;YAC1B,KAAK,IAAI,OAAO,GAAG,UAAU,CAAC,MAAM,EAAE,OAAO,GAAG,KAAK,CAAC,KAAK,CAAE,EAAE,OAAO,EAAE;gBAAE,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QAC1F,CAAC;QACD,OAAO,KAAK,CAAC;IACd,CAAC;CACD"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type { AutocompleteProvider } from "./autocomplete.ts";
|
|
2
|
+
import type { Component } from "./tui.ts";
|
|
3
|
+
/**
|
|
4
|
+
* Interface for custom editor components.
|
|
5
|
+
*
|
|
6
|
+
* This allows extensions to provide their own editor implementation
|
|
7
|
+
* (e.g., vim mode, emacs mode, custom keybindings) while maintaining
|
|
8
|
+
* compatibility with the core application.
|
|
9
|
+
*/
|
|
10
|
+
export interface EditorComponent extends Component {
|
|
11
|
+
/** Get the current text content */
|
|
12
|
+
getText(): string;
|
|
13
|
+
/** Set the text content */
|
|
14
|
+
setText(text: string): void;
|
|
15
|
+
/** Handle raw terminal input (key presses, paste sequences, etc.) */
|
|
16
|
+
handleInput(data: string): void;
|
|
17
|
+
/** Called when user submits (e.g., Enter key) */
|
|
18
|
+
onSubmit?: (text: string) => void;
|
|
19
|
+
/** Called when text changes */
|
|
20
|
+
onChange?: (text: string) => void;
|
|
21
|
+
/** Add text to history for up/down navigation */
|
|
22
|
+
addToHistory?(text: string): void;
|
|
23
|
+
/** Insert text at current cursor position */
|
|
24
|
+
insertTextAtCursor?(text: string): void;
|
|
25
|
+
/**
|
|
26
|
+
* Get text with any markers expanded (e.g., paste markers).
|
|
27
|
+
* Falls back to getText() if not implemented.
|
|
28
|
+
*/
|
|
29
|
+
getExpandedText?(): string;
|
|
30
|
+
/** Set the autocomplete provider */
|
|
31
|
+
setAutocompleteProvider?(provider: AutocompleteProvider): void;
|
|
32
|
+
/** Border color function */
|
|
33
|
+
borderColor?: (str: string) => string;
|
|
34
|
+
/** Set horizontal padding */
|
|
35
|
+
setPaddingX?(padding: number): void;
|
|
36
|
+
/** Set max visible items in autocomplete dropdown */
|
|
37
|
+
setAutocompleteMaxVisible?(maxVisible: number): void;
|
|
38
|
+
}
|
|
39
|
+
//# sourceMappingURL=editor-component.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"editor-component.d.ts","sourceRoot":"","sources":["../src/editor-component.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAC9D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAE1C;;;;;;GAMG;AACH,MAAM,WAAW,eAAgB,SAAQ,SAAS;IAKjD,mCAAmC;IACnC,OAAO,IAAI,MAAM,CAAC;IAElB,2BAA2B;IAC3B,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IAE5B,qEAAqE;IACrE,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IAMhC,iDAAiD;IACjD,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAElC,+BAA+B;IAC/B,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAMlC,iDAAiD;IACjD,YAAY,CAAC,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IAMlC,6CAA6C;IAC7C,kBAAkB,CAAC,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IAExC;;;OAGG;IACH,eAAe,CAAC,IAAI,MAAM,CAAC;IAM3B,oCAAoC;IACpC,uBAAuB,CAAC,CAAC,QAAQ,EAAE,oBAAoB,GAAG,IAAI,CAAC;IAM/D,4BAA4B;IAC5B,WAAW,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,MAAM,CAAC;IAEtC,6BAA6B;IAC7B,WAAW,CAAC,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IAEpC,qDAAqD;IACrD,yBAAyB,CAAC,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;CACrD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"editor-component.js","sourceRoot":"","sources":["../src/editor-component.ts"],"names":[],"mappings":""}
|
package/lib/fuzzy.d.ts
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Fuzzy matching utilities.
|
|
3
|
+
* Matches if all query characters appear in order (not necessarily consecutive).
|
|
4
|
+
* Lower score = better match.
|
|
5
|
+
*/
|
|
6
|
+
export interface FuzzyMatch {
|
|
7
|
+
matches: boolean;
|
|
8
|
+
score: number;
|
|
9
|
+
}
|
|
10
|
+
export declare function fuzzyMatch(query: string, text: string): FuzzyMatch;
|
|
11
|
+
/**
|
|
12
|
+
* Filter and sort items by fuzzy match quality (best matches first).
|
|
13
|
+
* Supports whitespace- and slash-separated tokens: all tokens must match.
|
|
14
|
+
*/
|
|
15
|
+
export declare function fuzzyFilter<T>(items: T[], query: string, getText: (item: T) => string): T[];
|
|
16
|
+
//# sourceMappingURL=fuzzy.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fuzzy.d.ts","sourceRoot":"","sources":["../src/fuzzy.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,MAAM,WAAW,UAAU;IAC1B,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;CACd;AAED,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,UAAU,CAiFlE;AAED;;;GAGG;AACH,wBAAgB,WAAW,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,MAAM,GAAG,CAAC,EAAE,CAsC3F"}
|
package/lib/fuzzy.js
ADDED
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Fuzzy matching utilities.
|
|
3
|
+
* Matches if all query characters appear in order (not necessarily consecutive).
|
|
4
|
+
* Lower score = better match.
|
|
5
|
+
*/
|
|
6
|
+
export function fuzzyMatch(query, text) {
|
|
7
|
+
const queryLower = query.toLowerCase();
|
|
8
|
+
const textLower = text.toLowerCase();
|
|
9
|
+
const matchQuery = (normalizedQuery) => {
|
|
10
|
+
if (normalizedQuery.length === 0) {
|
|
11
|
+
return { matches: true, score: 0 };
|
|
12
|
+
}
|
|
13
|
+
if (normalizedQuery.length > textLower.length) {
|
|
14
|
+
return { matches: false, score: 0 };
|
|
15
|
+
}
|
|
16
|
+
let queryIndex = 0;
|
|
17
|
+
let score = 0;
|
|
18
|
+
let lastMatchIndex = -1;
|
|
19
|
+
let consecutiveMatches = 0;
|
|
20
|
+
for (let i = 0; i < textLower.length && queryIndex < normalizedQuery.length; i++) {
|
|
21
|
+
if (textLower[i] === normalizedQuery[queryIndex]) {
|
|
22
|
+
const isWordBoundary = i === 0 || /[\s\-_./:]/.test(textLower[i - 1]);
|
|
23
|
+
// Reward consecutive matches
|
|
24
|
+
if (lastMatchIndex === i - 1) {
|
|
25
|
+
consecutiveMatches++;
|
|
26
|
+
score -= consecutiveMatches * 5;
|
|
27
|
+
}
|
|
28
|
+
else {
|
|
29
|
+
consecutiveMatches = 0;
|
|
30
|
+
// Penalize gaps
|
|
31
|
+
if (lastMatchIndex >= 0) {
|
|
32
|
+
score += (i - lastMatchIndex - 1) * 2;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
// Reward word boundary matches
|
|
36
|
+
if (isWordBoundary) {
|
|
37
|
+
score -= 10;
|
|
38
|
+
}
|
|
39
|
+
// Slight penalty for later matches
|
|
40
|
+
score += i * 0.1;
|
|
41
|
+
lastMatchIndex = i;
|
|
42
|
+
queryIndex++;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
if (queryIndex < normalizedQuery.length) {
|
|
46
|
+
return { matches: false, score: 0 };
|
|
47
|
+
}
|
|
48
|
+
if (normalizedQuery === textLower) {
|
|
49
|
+
score -= 100;
|
|
50
|
+
}
|
|
51
|
+
return { matches: true, score };
|
|
52
|
+
};
|
|
53
|
+
const primaryMatch = matchQuery(queryLower);
|
|
54
|
+
if (primaryMatch.matches) {
|
|
55
|
+
return primaryMatch;
|
|
56
|
+
}
|
|
57
|
+
const alphaNumericMatch = queryLower.match(/^(?<letters>[a-z]+)(?<digits>[0-9]+)$/);
|
|
58
|
+
const numericAlphaMatch = queryLower.match(/^(?<digits>[0-9]+)(?<letters>[a-z]+)$/);
|
|
59
|
+
const swappedQuery = alphaNumericMatch
|
|
60
|
+
? `${alphaNumericMatch.groups?.digits ?? ""}${alphaNumericMatch.groups?.letters ?? ""}`
|
|
61
|
+
: numericAlphaMatch
|
|
62
|
+
? `${numericAlphaMatch.groups?.letters ?? ""}${numericAlphaMatch.groups?.digits ?? ""}`
|
|
63
|
+
: "";
|
|
64
|
+
if (!swappedQuery) {
|
|
65
|
+
return primaryMatch;
|
|
66
|
+
}
|
|
67
|
+
const swappedMatch = matchQuery(swappedQuery);
|
|
68
|
+
if (!swappedMatch.matches) {
|
|
69
|
+
return primaryMatch;
|
|
70
|
+
}
|
|
71
|
+
return { matches: true, score: swappedMatch.score + 5 };
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Filter and sort items by fuzzy match quality (best matches first).
|
|
75
|
+
* Supports whitespace- and slash-separated tokens: all tokens must match.
|
|
76
|
+
*/
|
|
77
|
+
export function fuzzyFilter(items, query, getText) {
|
|
78
|
+
if (!query.trim()) {
|
|
79
|
+
return items;
|
|
80
|
+
}
|
|
81
|
+
const tokens = query
|
|
82
|
+
.trim()
|
|
83
|
+
.split(/[\s/]+/)
|
|
84
|
+
.filter((t) => t.length > 0);
|
|
85
|
+
if (tokens.length === 0) {
|
|
86
|
+
return items;
|
|
87
|
+
}
|
|
88
|
+
const results = [];
|
|
89
|
+
for (const item of items) {
|
|
90
|
+
const text = getText(item);
|
|
91
|
+
let totalScore = 0;
|
|
92
|
+
let allMatch = true;
|
|
93
|
+
for (const token of tokens) {
|
|
94
|
+
const match = fuzzyMatch(token, text);
|
|
95
|
+
if (match.matches) {
|
|
96
|
+
totalScore += match.score;
|
|
97
|
+
}
|
|
98
|
+
else {
|
|
99
|
+
allMatch = false;
|
|
100
|
+
break;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
if (allMatch) {
|
|
104
|
+
results.push({ item, totalScore });
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
results.sort((a, b) => a.totalScore - b.totalScore);
|
|
108
|
+
return results.map((r) => r.item);
|
|
109
|
+
}
|
|
110
|
+
//# sourceMappingURL=fuzzy.js.map
|
package/lib/fuzzy.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fuzzy.js","sourceRoot":"","sources":["../src/fuzzy.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAOH,MAAM,UAAU,UAAU,CAAC,KAAa,EAAE,IAAY;IACrD,MAAM,UAAU,GAAG,KAAK,CAAC,WAAW,EAAE,CAAC;IACvC,MAAM,SAAS,GAAG,IAAI,CAAC,WAAW,EAAE,CAAC;IAErC,MAAM,UAAU,GAAG,CAAC,eAAuB,EAAc,EAAE;QAC1D,IAAI,eAAe,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YAClC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AAC,CAAC,UAAU,CAAC,CAAC;IACpD,OAAO,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;AACnC,CAAC"}
|
package/lib/index.d.ts
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
export { Marked, type Token, type Tokens } from "marked";
|
|
2
|
+
export { type AutocompleteItem, type AutocompleteProvider, type AutocompleteSuggestions, CombinedAutocompleteProvider, type SlashCommand, } from "./autocomplete.ts";
|
|
3
|
+
export { Box } from "./components/box.ts";
|
|
4
|
+
export { CancellableLoader } from "./components/cancellable-loader.ts";
|
|
5
|
+
export { Editor, type EditorOptions, type EditorTheme } from "./components/editor.ts";
|
|
6
|
+
export { HStack } from "./components/h-stack.ts";
|
|
7
|
+
export { Image, type ImageOptions, type ImageTheme } from "./components/image.ts";
|
|
8
|
+
export { Input } from "./components/input.ts";
|
|
9
|
+
export { Loader, type LoaderIndicatorOptions } from "./components/loader.ts";
|
|
10
|
+
export { type DefaultTextStyle, Markdown, type MarkdownOptions, type MarkdownTheme } from "./components/markdown.ts";
|
|
11
|
+
export { ScrollView, type ScrollViewOptions, type ScrollViewScrollbar, type ScrollViewScrollToOptions, } from "./components/scroll-view.ts";
|
|
12
|
+
export { type SelectItem, SelectList, type SelectListLayoutOptions, type SelectListTheme, type SelectListTruncatePrimaryContext, } from "./components/select-list.ts";
|
|
13
|
+
export { type SettingItem, SettingsList, type SettingsListTheme } from "./components/settings-list.ts";
|
|
14
|
+
export { Spacer } from "./components/spacer.ts";
|
|
15
|
+
export { Text } from "./components/text.ts";
|
|
16
|
+
export { TruncatedText } from "./components/truncated-text.ts";
|
|
17
|
+
export { type StackChild, type StackEntry, type StackEntryOptions, type StackOptions, VStack, } from "./components/v-stack.ts";
|
|
18
|
+
export type { EditorComponent } from "./editor-component.ts";
|
|
19
|
+
export { type FuzzyMatch, fuzzyFilter, fuzzyMatch } from "./fuzzy.ts";
|
|
20
|
+
export { getKeybindings, type Keybinding, type KeybindingConflict, type KeybindingDefinition, type KeybindingDefinitions, type Keybindings, type KeybindingsConfig, KeybindingsManager, setKeybindings, TUI_KEYBINDINGS, } from "./keybindings.ts";
|
|
21
|
+
export { decodeKittyPrintable, isKeyRelease, isKeyRepeat, isKittyProtocolActive, Key, type KeyEventType, type KeyId, matchesKey, parseKey, setKittyProtocolActive, } from "./keys.ts";
|
|
22
|
+
export { type RenderLatexOptions, renderLatex } from "./latex.ts";
|
|
23
|
+
export { StdinBuffer, type StdinBufferEventMap, type StdinBufferOptions } from "./stdin-buffer.ts";
|
|
24
|
+
export { ProcessTerminal, type Terminal } from "./terminal.ts";
|
|
25
|
+
export { parseOsc11BackgroundColor, parseTerminalColorSchemeReport, type RgbColor, type TerminalColorScheme, } from "./terminal-colors.ts";
|
|
26
|
+
export { allocateImageId, type CellDimensions, calculateImageRows, deleteAllKittyImages, deleteKittyImage, detectCapabilities, encodeITerm2, encodeKitty, getCapabilities, getCellDimensions, getGifDimensions, getImageDimensions, getJpegDimensions, getPngDimensions, getWebpDimensions, hyperlink, type ImageDimensions, type ImageProtocol, type ImageRenderOptions, imageFallback, renderImage, resetCapabilitiesCache, setCapabilities, setCellDimensions, type TerminalCapabilities, } from "./terminal-image.ts";
|
|
27
|
+
export { type Component, Container, CURSOR_MARKER, compositeTuiLine, type Focusable, isFocusable, isViewportTUI, type OverlayAnchor, type OverlayHandle, type OverlayMargin, type OverlayOptions, type OverlayUnfocusOptions, type SizeValue, type TUI, type TuiInputListener, type TuiInputListenerResult, type TuiMode, type TuiStopOptions, type ViewportTUI, } from "./tui.ts";
|
|
28
|
+
export { TuiAltScreen, type TuiAltScreenOptions } from "./tui-alt-screen.ts";
|
|
29
|
+
export { TuiMainScreen, type TuiMainScreenRenderState } from "./tui-main-screen.ts";
|
|
30
|
+
export { getOsc8LinkAtColumn, sliceByColumn, stripTerminalSequences, truncateToWidth, visibleWidth, wrapTextWithAnsi, } from "./utils.ts";
|
|
31
|
+
//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,EACX,eAAe,EACf,iBAAiB,EACjB,gBAAgB,EAChB,kBAAkB,EAClB,iBAAiB,EACjB,gBAAgB,EAChB,iBAAiB,EACjB,SAAS,EACT,KAAK,eAAe,EACpB,KAAK,aAAa,EAClB,KAAK,kBAAkB,EACvB,aAAa,EACb,WAAW,EACX,sBAAsB,EACtB,eAAe,EACf,iBAAiB,EACjB,KAAK,oBAAoB,GACzB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACN,KAAK,SAAS,EACd,SAAS,EACT,aAAa,EACb,gBAAgB,EAChB,KAAK,SAAS,EACd,WAAW,EACX,aAAa,EACb,KAAK,aAAa,EAClB,KAAK,aAAa,EAClB,KAAK,aAAa,EAClB,KAAK,cAAc,EACnB,KAAK,qBAAqB,EAC1B,KAAK,SAAS,EACd,KAAK,GAAG,EACR,KAAK,gBAAgB,EACrB,KAAK,sBAAsB,EAC3B,KAAK,OAAO,EACZ,KAAK,cAAc,EACnB,KAAK,WAAW,GAChB,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,YAAY,EAAE,KAAK,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAC7E,OAAO,EAAE,aAAa,EAAE,KAAK,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAEpF,OAAO,EACN,mBAAmB,EACnB,aAAa,EACb,sBAAsB,EACtB,eAAe,EACf,YAAY,EACZ,gBAAgB,GAChB,MAAM,YAAY,CAAC"}
|
package/lib/index.js
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
// Core TUI interfaces and classes
|
|
2
|
+
export { Marked } from "marked";
|
|
3
|
+
// Autocomplete support
|
|
4
|
+
export { CombinedAutocompleteProvider, } from "./autocomplete.js";
|
|
5
|
+
// Components
|
|
6
|
+
export { Box } from "./components/box.js";
|
|
7
|
+
export { CancellableLoader } from "./components/cancellable-loader.js";
|
|
8
|
+
export { Editor } from "./components/editor.js";
|
|
9
|
+
export { HStack } from "./components/h-stack.js";
|
|
10
|
+
export { Image } from "./components/image.js";
|
|
11
|
+
export { Input } from "./components/input.js";
|
|
12
|
+
export { Loader } from "./components/loader.js";
|
|
13
|
+
export { Markdown } from "./components/markdown.js";
|
|
14
|
+
export { ScrollView, } from "./components/scroll-view.js";
|
|
15
|
+
export { SelectList, } from "./components/select-list.js";
|
|
16
|
+
export { SettingsList } from "./components/settings-list.js";
|
|
17
|
+
export { Spacer } from "./components/spacer.js";
|
|
18
|
+
export { Text } from "./components/text.js";
|
|
19
|
+
export { TruncatedText } from "./components/truncated-text.js";
|
|
20
|
+
export { VStack, } from "./components/v-stack.js";
|
|
21
|
+
// Fuzzy matching
|
|
22
|
+
export { fuzzyFilter, fuzzyMatch } from "./fuzzy.js";
|
|
23
|
+
// Keybindings
|
|
24
|
+
export { getKeybindings, KeybindingsManager, setKeybindings, TUI_KEYBINDINGS, } from "./keybindings.js";
|
|
25
|
+
// Keyboard input handling
|
|
26
|
+
export { decodeKittyPrintable, isKeyRelease, isKeyRepeat, isKittyProtocolActive, Key, matchesKey, parseKey, setKittyProtocolActive, } from "./keys.js";
|
|
27
|
+
// LaTeX rendering
|
|
28
|
+
export { renderLatex } from "./latex.js";
|
|
29
|
+
// Input buffering for batch splitting
|
|
30
|
+
export { StdinBuffer } from "./stdin-buffer.js";
|
|
31
|
+
// Terminal interface and implementations
|
|
32
|
+
export { ProcessTerminal } from "./terminal.js";
|
|
33
|
+
// Terminal colors
|
|
34
|
+
export { parseOsc11BackgroundColor, parseTerminalColorSchemeReport, } from "./terminal-colors.js";
|
|
35
|
+
// Terminal image support
|
|
36
|
+
export { allocateImageId, calculateImageRows, deleteAllKittyImages, deleteKittyImage, detectCapabilities, encodeITerm2, encodeKitty, getCapabilities, getCellDimensions, getGifDimensions, getImageDimensions, getJpegDimensions, getPngDimensions, getWebpDimensions, hyperlink, imageFallback, renderImage, resetCapabilitiesCache, setCapabilities, setCellDimensions, } from "./terminal-image.js";
|
|
37
|
+
export { Container, CURSOR_MARKER, compositeTuiLine, isFocusable, isViewportTUI, } from "./tui.js";
|
|
38
|
+
export { TuiAltScreen } from "./tui-alt-screen.js";
|
|
39
|
+
export { TuiMainScreen } from "./tui-main-screen.js";
|
|
40
|
+
// Utilities
|
|
41
|
+
export { getOsc8LinkAtColumn, sliceByColumn, stripTerminalSequences, truncateToWidth, visibleWidth, wrapTextWithAnsi, } from "./utils.js";
|
|
42
|
+
//# sourceMappingURL=index.js.map
|
package/lib/index.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,kCAAkC;AAElC,OAAO,EAAE,MAAM,EAA2B,MAAM,QAAQ,CAAC;AACzD,uBAAuB;AACvB,OAAO,EAIN,4BAA4B,GAE5B,MAAM,mBAAmB,CAAC;AAC3B,aAAa;AACb,OAAO,EAAE,GAAG,EAAE,MAAM,qBAAqB,CAAC;AAC1C,OAAO,EAAE,iBAAiB,EAAE,MAAM,oCAAoC,CAAC;AACvE,OAAO,EAAE,MAAM,EAAwC,MAAM,wBAAwB,CAAC;AACtF,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AACjD,OAAO,EAAE,KAAK,EAAsC,MAAM,uBAAuB,CAAC;AAClF,OAAO,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAC9C,OAAO,EAAE,MAAM,EAA+B,MAAM,wBAAwB,CAAC;AAC7E,OAAO,EAAyB,QAAQ,EAA4C,MAAM,0BAA0B,CAAC;AACrH,OAAO,EACN,UAAU,GAIV,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAEN,UAAU,GAIV,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAoB,YAAY,EAA0B,MAAM,+BAA+B,CAAC;AACvG,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAChD,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAC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ACtB,eAAe,EACf,YAAY,EACZ,gBAAgB,GAChB,MAAM,YAAY,CAAC"}
|
|
@@ -0,0 +1,273 @@
|
|
|
1
|
+
import { type KeyId } from "./keys.ts";
|
|
2
|
+
/**
|
|
3
|
+
* Global keybinding registry.
|
|
4
|
+
* Downstream packages can add keybindings via declaration merging.
|
|
5
|
+
*/
|
|
6
|
+
export interface Keybindings {
|
|
7
|
+
"tui.editor.cursorUp": true;
|
|
8
|
+
"tui.editor.cursorDown": true;
|
|
9
|
+
"tui.editor.historyPrevious": true;
|
|
10
|
+
"tui.editor.historyNext": true;
|
|
11
|
+
"tui.editor.cursorLeft": true;
|
|
12
|
+
"tui.editor.cursorRight": true;
|
|
13
|
+
"tui.editor.cursorWordLeft": true;
|
|
14
|
+
"tui.editor.cursorWordRight": true;
|
|
15
|
+
"tui.editor.cursorLineStart": true;
|
|
16
|
+
"tui.editor.cursorLineEnd": true;
|
|
17
|
+
"tui.editor.jumpForward": true;
|
|
18
|
+
"tui.editor.jumpBackward": true;
|
|
19
|
+
"tui.editor.pageUp": true;
|
|
20
|
+
"tui.editor.pageDown": true;
|
|
21
|
+
"tui.editor.deleteCharBackward": true;
|
|
22
|
+
"tui.editor.deleteCharForward": true;
|
|
23
|
+
"tui.editor.deleteWordBackward": true;
|
|
24
|
+
"tui.editor.deleteWordForward": true;
|
|
25
|
+
"tui.editor.deleteToLineStart": true;
|
|
26
|
+
"tui.editor.deleteToLineEnd": true;
|
|
27
|
+
"tui.editor.yank": true;
|
|
28
|
+
"tui.editor.yankPop": true;
|
|
29
|
+
"tui.editor.undo": true;
|
|
30
|
+
"tui.input.newLine": true;
|
|
31
|
+
"tui.input.submit": true;
|
|
32
|
+
"tui.input.tab": true;
|
|
33
|
+
"tui.input.copy": true;
|
|
34
|
+
"tui.select.up": true;
|
|
35
|
+
"tui.select.down": true;
|
|
36
|
+
"tui.select.pageUp": true;
|
|
37
|
+
"tui.select.pageDown": true;
|
|
38
|
+
"tui.select.confirm": true;
|
|
39
|
+
"tui.select.cancel": true;
|
|
40
|
+
"tui.altScreen.pageUp": true;
|
|
41
|
+
"tui.altScreen.pageDown": true;
|
|
42
|
+
"tui.altScreen.halfPageUp": true;
|
|
43
|
+
"tui.altScreen.halfPageDown": true;
|
|
44
|
+
"tui.altScreen.lineUp": true;
|
|
45
|
+
"tui.altScreen.lineDown": true;
|
|
46
|
+
"tui.altScreen.previousPrompt": true;
|
|
47
|
+
"tui.altScreen.nextPrompt": true;
|
|
48
|
+
"tui.altScreen.search": true;
|
|
49
|
+
"tui.altScreen.searchNext": true;
|
|
50
|
+
"tui.altScreen.searchPrevious": true;
|
|
51
|
+
"tui.altScreen.searchClose": true;
|
|
52
|
+
"tui.altScreen.top": true;
|
|
53
|
+
"tui.altScreen.bottom": true;
|
|
54
|
+
}
|
|
55
|
+
export type Keybinding = keyof Keybindings;
|
|
56
|
+
export interface KeybindingDefinition {
|
|
57
|
+
defaultKeys: KeyId | KeyId[];
|
|
58
|
+
description?: string;
|
|
59
|
+
}
|
|
60
|
+
export type KeybindingDefinitions = Record<string, KeybindingDefinition>;
|
|
61
|
+
export type KeybindingsConfig = Record<string, KeyId | KeyId[] | undefined>;
|
|
62
|
+
export declare const TUI_KEYBINDINGS: {
|
|
63
|
+
readonly "tui.editor.cursorUp": {
|
|
64
|
+
readonly defaultKeys: "up";
|
|
65
|
+
readonly description: "Move cursor up";
|
|
66
|
+
};
|
|
67
|
+
readonly "tui.editor.cursorDown": {
|
|
68
|
+
readonly defaultKeys: "down";
|
|
69
|
+
readonly description: "Move cursor down";
|
|
70
|
+
};
|
|
71
|
+
readonly "tui.editor.historyPrevious": {
|
|
72
|
+
readonly defaultKeys: [];
|
|
73
|
+
readonly description: "Select previous prompt history entry";
|
|
74
|
+
};
|
|
75
|
+
readonly "tui.editor.historyNext": {
|
|
76
|
+
readonly defaultKeys: [];
|
|
77
|
+
readonly description: "Select next prompt history entry";
|
|
78
|
+
};
|
|
79
|
+
readonly "tui.editor.cursorLeft": {
|
|
80
|
+
readonly defaultKeys: ["left", "ctrl+b"];
|
|
81
|
+
readonly description: "Move cursor left";
|
|
82
|
+
};
|
|
83
|
+
readonly "tui.editor.cursorRight": {
|
|
84
|
+
readonly defaultKeys: ["right", "ctrl+f"];
|
|
85
|
+
readonly description: "Move cursor right";
|
|
86
|
+
};
|
|
87
|
+
readonly "tui.editor.cursorWordLeft": {
|
|
88
|
+
readonly defaultKeys: ["alt+left", "ctrl+left", "alt+b"];
|
|
89
|
+
readonly description: "Move cursor word left";
|
|
90
|
+
};
|
|
91
|
+
readonly "tui.editor.cursorWordRight": {
|
|
92
|
+
readonly defaultKeys: ["alt+right", "ctrl+right", "alt+f"];
|
|
93
|
+
readonly description: "Move cursor word right";
|
|
94
|
+
};
|
|
95
|
+
readonly "tui.editor.cursorLineStart": {
|
|
96
|
+
readonly defaultKeys: ["home", "ctrl+home", "ctrl+a"];
|
|
97
|
+
readonly description: "Move to line start";
|
|
98
|
+
};
|
|
99
|
+
readonly "tui.editor.cursorLineEnd": {
|
|
100
|
+
readonly defaultKeys: ["end", "ctrl+end", "ctrl+e"];
|
|
101
|
+
readonly description: "Move to line end";
|
|
102
|
+
};
|
|
103
|
+
readonly "tui.editor.jumpForward": {
|
|
104
|
+
readonly defaultKeys: "ctrl+]";
|
|
105
|
+
readonly description: "Jump forward to character";
|
|
106
|
+
};
|
|
107
|
+
readonly "tui.editor.jumpBackward": {
|
|
108
|
+
readonly defaultKeys: "ctrl+alt+]";
|
|
109
|
+
readonly description: "Jump backward to character";
|
|
110
|
+
};
|
|
111
|
+
readonly "tui.editor.pageUp": {
|
|
112
|
+
readonly defaultKeys: ["pageUp", "ctrl+pageUp"];
|
|
113
|
+
readonly description: "Page up";
|
|
114
|
+
};
|
|
115
|
+
readonly "tui.editor.pageDown": {
|
|
116
|
+
readonly defaultKeys: ["pageDown", "ctrl+pageDown"];
|
|
117
|
+
readonly description: "Page down";
|
|
118
|
+
};
|
|
119
|
+
readonly "tui.editor.deleteCharBackward": {
|
|
120
|
+
readonly defaultKeys: "backspace";
|
|
121
|
+
readonly description: "Delete character backward";
|
|
122
|
+
};
|
|
123
|
+
readonly "tui.editor.deleteCharForward": {
|
|
124
|
+
readonly defaultKeys: ["delete", "ctrl+d"];
|
|
125
|
+
readonly description: "Delete character forward";
|
|
126
|
+
};
|
|
127
|
+
readonly "tui.editor.deleteWordBackward": {
|
|
128
|
+
readonly defaultKeys: ["ctrl+w", "alt+backspace"];
|
|
129
|
+
readonly description: "Delete word backward";
|
|
130
|
+
};
|
|
131
|
+
readonly "tui.editor.deleteWordForward": {
|
|
132
|
+
readonly defaultKeys: ["alt+d", "alt+delete"];
|
|
133
|
+
readonly description: "Delete word forward";
|
|
134
|
+
};
|
|
135
|
+
readonly "tui.editor.deleteToLineStart": {
|
|
136
|
+
readonly defaultKeys: "ctrl+u";
|
|
137
|
+
readonly description: "Delete to line start";
|
|
138
|
+
};
|
|
139
|
+
readonly "tui.editor.deleteToLineEnd": {
|
|
140
|
+
readonly defaultKeys: "ctrl+k";
|
|
141
|
+
readonly description: "Delete to line end";
|
|
142
|
+
};
|
|
143
|
+
readonly "tui.editor.yank": {
|
|
144
|
+
readonly defaultKeys: "ctrl+y";
|
|
145
|
+
readonly description: "Yank";
|
|
146
|
+
};
|
|
147
|
+
readonly "tui.editor.yankPop": {
|
|
148
|
+
readonly defaultKeys: "alt+y";
|
|
149
|
+
readonly description: "Yank pop";
|
|
150
|
+
};
|
|
151
|
+
readonly "tui.editor.undo": {
|
|
152
|
+
readonly defaultKeys: "ctrl+-";
|
|
153
|
+
readonly description: "Undo";
|
|
154
|
+
};
|
|
155
|
+
readonly "tui.input.newLine": {
|
|
156
|
+
readonly defaultKeys: ["shift+enter", "ctrl+j"];
|
|
157
|
+
readonly description: "Insert newline";
|
|
158
|
+
};
|
|
159
|
+
readonly "tui.input.submit": {
|
|
160
|
+
readonly defaultKeys: "enter";
|
|
161
|
+
readonly description: "Submit input";
|
|
162
|
+
};
|
|
163
|
+
readonly "tui.input.tab": {
|
|
164
|
+
readonly defaultKeys: "tab";
|
|
165
|
+
readonly description: "Tab / autocomplete";
|
|
166
|
+
};
|
|
167
|
+
readonly "tui.input.copy": {
|
|
168
|
+
readonly defaultKeys: "ctrl+c";
|
|
169
|
+
readonly description: "Copy selection";
|
|
170
|
+
};
|
|
171
|
+
readonly "tui.select.up": {
|
|
172
|
+
readonly defaultKeys: "up";
|
|
173
|
+
readonly description: "Move selection up";
|
|
174
|
+
};
|
|
175
|
+
readonly "tui.select.down": {
|
|
176
|
+
readonly defaultKeys: "down";
|
|
177
|
+
readonly description: "Move selection down";
|
|
178
|
+
};
|
|
179
|
+
readonly "tui.select.pageUp": {
|
|
180
|
+
readonly defaultKeys: "pageUp";
|
|
181
|
+
readonly description: "Selection page up";
|
|
182
|
+
};
|
|
183
|
+
readonly "tui.select.pageDown": {
|
|
184
|
+
readonly defaultKeys: "pageDown";
|
|
185
|
+
readonly description: "Selection page down";
|
|
186
|
+
};
|
|
187
|
+
readonly "tui.select.confirm": {
|
|
188
|
+
readonly defaultKeys: "enter";
|
|
189
|
+
readonly description: "Confirm selection";
|
|
190
|
+
};
|
|
191
|
+
readonly "tui.select.cancel": {
|
|
192
|
+
readonly defaultKeys: ["escape", "ctrl+c"];
|
|
193
|
+
readonly description: "Cancel selection";
|
|
194
|
+
};
|
|
195
|
+
readonly "tui.altScreen.pageUp": {
|
|
196
|
+
readonly defaultKeys: "pageUp";
|
|
197
|
+
readonly description: "Scroll viewport up one page";
|
|
198
|
+
};
|
|
199
|
+
readonly "tui.altScreen.pageDown": {
|
|
200
|
+
readonly defaultKeys: "pageDown";
|
|
201
|
+
readonly description: "Scroll viewport down one page";
|
|
202
|
+
};
|
|
203
|
+
readonly "tui.altScreen.halfPageUp": {
|
|
204
|
+
readonly defaultKeys: [];
|
|
205
|
+
readonly description: "Scroll viewport up half a page";
|
|
206
|
+
};
|
|
207
|
+
readonly "tui.altScreen.halfPageDown": {
|
|
208
|
+
readonly defaultKeys: [];
|
|
209
|
+
readonly description: "Scroll viewport down half a page";
|
|
210
|
+
};
|
|
211
|
+
readonly "tui.altScreen.lineUp": {
|
|
212
|
+
readonly defaultKeys: [];
|
|
213
|
+
readonly description: "Scroll viewport up one line";
|
|
214
|
+
};
|
|
215
|
+
readonly "tui.altScreen.lineDown": {
|
|
216
|
+
readonly defaultKeys: [];
|
|
217
|
+
readonly description: "Scroll viewport down one line";
|
|
218
|
+
};
|
|
219
|
+
readonly "tui.altScreen.previousPrompt": {
|
|
220
|
+
readonly defaultKeys: ["ctrl+shift+up", "ctrl+up"];
|
|
221
|
+
readonly description: "Jump to previous semantic prompt";
|
|
222
|
+
};
|
|
223
|
+
readonly "tui.altScreen.nextPrompt": {
|
|
224
|
+
readonly defaultKeys: ["ctrl+shift+down", "ctrl+down"];
|
|
225
|
+
readonly description: "Jump to next semantic prompt";
|
|
226
|
+
};
|
|
227
|
+
readonly "tui.altScreen.search": {
|
|
228
|
+
readonly defaultKeys: "ctrl+shift+f";
|
|
229
|
+
readonly description: "Search the primary scroll view";
|
|
230
|
+
};
|
|
231
|
+
readonly "tui.altScreen.searchNext": {
|
|
232
|
+
readonly defaultKeys: ["enter", "ctrl+g"];
|
|
233
|
+
readonly description: "Select the next search match";
|
|
234
|
+
};
|
|
235
|
+
readonly "tui.altScreen.searchPrevious": {
|
|
236
|
+
readonly defaultKeys: ["shift+enter", "ctrl+shift+g"];
|
|
237
|
+
readonly description: "Select the previous search match";
|
|
238
|
+
};
|
|
239
|
+
readonly "tui.altScreen.searchClose": {
|
|
240
|
+
readonly defaultKeys: "escape";
|
|
241
|
+
readonly description: "Close transcript search";
|
|
242
|
+
};
|
|
243
|
+
readonly "tui.altScreen.top": {
|
|
244
|
+
readonly defaultKeys: "home";
|
|
245
|
+
readonly description: "Scroll viewport to top";
|
|
246
|
+
};
|
|
247
|
+
readonly "tui.altScreen.bottom": {
|
|
248
|
+
readonly defaultKeys: "end";
|
|
249
|
+
readonly description: "Scroll viewport to bottom";
|
|
250
|
+
};
|
|
251
|
+
};
|
|
252
|
+
export interface KeybindingConflict {
|
|
253
|
+
key: KeyId;
|
|
254
|
+
keybindings: string[];
|
|
255
|
+
}
|
|
256
|
+
export declare class KeybindingsManager {
|
|
257
|
+
private definitions;
|
|
258
|
+
private userBindings;
|
|
259
|
+
private keysById;
|
|
260
|
+
private conflicts;
|
|
261
|
+
constructor(definitions: KeybindingDefinitions, userBindings?: KeybindingsConfig);
|
|
262
|
+
private rebuild;
|
|
263
|
+
matches(data: string, keybinding: Keybinding): boolean;
|
|
264
|
+
getKeys(keybinding: Keybinding): KeyId[];
|
|
265
|
+
getDefinition(keybinding: Keybinding): KeybindingDefinition;
|
|
266
|
+
getConflicts(): KeybindingConflict[];
|
|
267
|
+
setUserBindings(userBindings: KeybindingsConfig): void;
|
|
268
|
+
getUserBindings(): KeybindingsConfig;
|
|
269
|
+
getResolvedBindings(): KeybindingsConfig;
|
|
270
|
+
}
|
|
271
|
+
export declare function setKeybindings(keybindings: KeybindingsManager): void;
|
|
272
|
+
export declare function getKeybindings(): KeybindingsManager;
|
|
273
|
+
//# sourceMappingURL=keybindings.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"keybindings.d.ts","sourceRoot":"","sources":["../src/keybindings.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,KAAK,EAAc,MAAM,WAAW,CAAC;AAEnD;;;GAGG;AACH,MAAM,WAAW,WAAW;IAE3B,qBAAqB,EAAE,IAAI,CAAC;IAC5B,uBAAuB,EAAE,IAAI,CAAC;IAC9B,4BAA4B,EAAE,IAAI,CAAC;IACnC,wBAAwB,EAAE,IAAI,CAAC;IAC/B,uBAAuB,EAAE,IAAI,CAAC;IAC9B,wBAAwB,EAAE,IAAI,CAAC;IAC/B,2BAA2B,EAAE,IAAI,CAAC;IAClC,4BAA4B,EAAE,IAAI,CAAC;IACnC,4BAA4B,EAAE,IAAI,CAAC;IACnC,0BAA0B,EAAE,IAAI,CAA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