@wayofmono/wo-tui 1.0.0 → 1.0.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/autocomplete.d.ts +54 -0
- package/dist/autocomplete.d.ts.map +1 -0
- package/dist/autocomplete.js +632 -0
- package/dist/autocomplete.js.map +1 -0
- package/dist/components/box.d.ts +22 -0
- package/dist/components/box.d.ts.map +1 -0
- package/dist/components/box.js +104 -0
- package/dist/components/box.js.map +1 -0
- package/dist/components/cancellable-loader.d.ts +22 -0
- package/dist/components/cancellable-loader.d.ts.map +1 -0
- package/dist/components/cancellable-loader.js +35 -0
- package/dist/components/cancellable-loader.js.map +1 -0
- package/dist/components/editor.d.ts +249 -0
- package/dist/components/editor.d.ts.map +1 -0
- package/dist/components/editor.js +1916 -0
- package/dist/components/editor.js.map +1 -0
- package/dist/components/image.d.ts +28 -0
- package/dist/components/image.d.ts.map +1 -0
- package/dist/components/image.js +85 -0
- package/dist/components/image.js.map +1 -0
- package/dist/components/input.d.ts +37 -0
- package/dist/components/input.d.ts.map +1 -0
- package/dist/components/input.js +426 -0
- package/dist/components/input.js.map +1 -0
- package/dist/components/loader.d.ts +31 -0
- package/dist/components/loader.d.ts.map +1 -0
- package/dist/components/loader.js +69 -0
- package/dist/components/loader.js.map +1 -0
- package/dist/components/markdown.d.ts +90 -0
- package/dist/components/markdown.d.ts.map +1 -0
- package/dist/components/markdown.js +634 -0
- package/dist/components/markdown.js.map +1 -0
- package/dist/components/select-list.d.ts +50 -0
- package/dist/components/select-list.d.ts.map +1 -0
- package/dist/components/select-list.js +159 -0
- package/dist/components/select-list.js.map +1 -0
- package/dist/components/settings-list.d.ts +50 -0
- package/dist/components/settings-list.d.ts.map +1 -0
- package/dist/components/settings-list.js +185 -0
- package/dist/components/settings-list.js.map +1 -0
- package/dist/components/spacer.d.ts +12 -0
- package/dist/components/spacer.d.ts.map +1 -0
- package/dist/components/spacer.js +23 -0
- package/dist/components/spacer.js.map +1 -0
- package/dist/components/text.d.ts +19 -0
- package/dist/components/text.d.ts.map +1 -0
- package/dist/components/text.js +89 -0
- package/dist/components/text.js.map +1 -0
- package/dist/components/truncated-text.d.ts +13 -0
- package/dist/components/truncated-text.d.ts.map +1 -0
- package/dist/components/truncated-text.js +51 -0
- package/dist/components/truncated-text.js.map +1 -0
- package/dist/editor-component.d.ts +39 -0
- package/dist/editor-component.d.ts.map +1 -0
- package/dist/editor-component.js +2 -0
- package/dist/editor-component.js.map +1 -0
- package/dist/fuzzy.d.ts +16 -0
- package/dist/fuzzy.d.ts.map +1 -0
- package/dist/fuzzy.js +110 -0
- package/dist/fuzzy.js.map +1 -0
- package/dist/index.d.ts +23 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js.map +1 -0
- package/dist/keybindings.d.ts +193 -0
- package/dist/keybindings.d.ts.map +1 -0
- package/dist/keybindings.js +174 -0
- package/dist/keybindings.js.map +1 -0
- package/dist/keys.d.ts +184 -0
- package/dist/keys.d.ts.map +1 -0
- package/dist/keys.js +1173 -0
- package/dist/keys.js.map +1 -0
- package/dist/kill-ring.d.ts +28 -0
- package/dist/kill-ring.d.ts.map +1 -0
- package/dist/kill-ring.js +44 -0
- package/dist/kill-ring.js.map +1 -0
- package/dist/stdin-buffer.d.ts +50 -0
- package/dist/stdin-buffer.d.ts.map +1 -0
- package/dist/stdin-buffer.js +339 -0
- package/dist/stdin-buffer.js.map +1 -0
- package/dist/terminal-image.d.ts +85 -0
- package/dist/terminal-image.d.ts.map +1 -0
- package/dist/terminal-image.js +324 -0
- package/dist/terminal-image.js.map +1 -0
- package/dist/terminal.d.ts +88 -0
- package/dist/terminal.d.ts.map +1 -0
- package/dist/terminal.js +315 -0
- package/dist/terminal.js.map +1 -0
- package/dist/tui.d.ts +227 -0
- package/dist/tui.d.ts.map +1 -0
- package/dist/tui.js +1077 -0
- package/dist/tui.js.map +1 -0
- package/dist/undo-stack.d.ts +17 -0
- package/dist/undo-stack.d.ts.map +1 -0
- package/dist/undo-stack.js +25 -0
- package/dist/undo-stack.js.map +1 -0
- package/dist/utils.d.ts +79 -0
- package/dist/utils.d.ts.map +1 -0
- package/dist/utils.js +1017 -0
- package/dist/utils.js.map +1 -0
- package/package.json +2 -1
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { applyBackgroundToLine, visibleWidth, wrapTextWithAnsi } from "../utils.js";
|
|
2
|
+
/**
|
|
3
|
+
* Text component - displays multi-line text with word wrapping
|
|
4
|
+
*/
|
|
5
|
+
export class Text {
|
|
6
|
+
text;
|
|
7
|
+
paddingX; // Left/right padding
|
|
8
|
+
paddingY; // Top/bottom padding
|
|
9
|
+
customBgFn;
|
|
10
|
+
// Cache for rendered output
|
|
11
|
+
cachedText;
|
|
12
|
+
cachedWidth;
|
|
13
|
+
cachedLines;
|
|
14
|
+
constructor(text = "", paddingX = 1, paddingY = 1, customBgFn) {
|
|
15
|
+
this.text = text;
|
|
16
|
+
this.paddingX = paddingX;
|
|
17
|
+
this.paddingY = paddingY;
|
|
18
|
+
this.customBgFn = customBgFn;
|
|
19
|
+
}
|
|
20
|
+
setText(text) {
|
|
21
|
+
this.text = text;
|
|
22
|
+
this.cachedText = undefined;
|
|
23
|
+
this.cachedWidth = undefined;
|
|
24
|
+
this.cachedLines = undefined;
|
|
25
|
+
}
|
|
26
|
+
setCustomBgFn(customBgFn) {
|
|
27
|
+
this.customBgFn = customBgFn;
|
|
28
|
+
this.cachedText = undefined;
|
|
29
|
+
this.cachedWidth = undefined;
|
|
30
|
+
this.cachedLines = undefined;
|
|
31
|
+
}
|
|
32
|
+
invalidate() {
|
|
33
|
+
this.cachedText = undefined;
|
|
34
|
+
this.cachedWidth = undefined;
|
|
35
|
+
this.cachedLines = undefined;
|
|
36
|
+
}
|
|
37
|
+
render(width) {
|
|
38
|
+
// Check cache
|
|
39
|
+
if (this.cachedLines && this.cachedText === this.text && this.cachedWidth === width) {
|
|
40
|
+
return this.cachedLines;
|
|
41
|
+
}
|
|
42
|
+
// Don't render anything if there's no actual text
|
|
43
|
+
if (!this.text || this.text.trim() === "") {
|
|
44
|
+
const result = [];
|
|
45
|
+
this.cachedText = this.text;
|
|
46
|
+
this.cachedWidth = width;
|
|
47
|
+
this.cachedLines = result;
|
|
48
|
+
return result;
|
|
49
|
+
}
|
|
50
|
+
// Replace tabs with 3 spaces
|
|
51
|
+
const normalizedText = this.text.replace(/\t/g, " ");
|
|
52
|
+
// Calculate content width (subtract left/right margins)
|
|
53
|
+
const contentWidth = Math.max(1, width - this.paddingX * 2);
|
|
54
|
+
// Wrap text (this preserves ANSI codes but does NOT pad)
|
|
55
|
+
const wrappedLines = wrapTextWithAnsi(normalizedText, contentWidth);
|
|
56
|
+
// Add margins and background to each line
|
|
57
|
+
const leftMargin = " ".repeat(this.paddingX);
|
|
58
|
+
const rightMargin = " ".repeat(this.paddingX);
|
|
59
|
+
const contentLines = [];
|
|
60
|
+
for (const line of wrappedLines) {
|
|
61
|
+
// Add margins
|
|
62
|
+
const lineWithMargins = leftMargin + line + rightMargin;
|
|
63
|
+
// Apply background if specified (this also pads to full width)
|
|
64
|
+
if (this.customBgFn) {
|
|
65
|
+
contentLines.push(applyBackgroundToLine(lineWithMargins, width, this.customBgFn));
|
|
66
|
+
}
|
|
67
|
+
else {
|
|
68
|
+
// No background - just pad to width with spaces
|
|
69
|
+
const visibleLen = visibleWidth(lineWithMargins);
|
|
70
|
+
const paddingNeeded = Math.max(0, width - visibleLen);
|
|
71
|
+
contentLines.push(lineWithMargins + " ".repeat(paddingNeeded));
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
// Add top/bottom padding (empty lines)
|
|
75
|
+
const emptyLine = " ".repeat(width);
|
|
76
|
+
const emptyLines = [];
|
|
77
|
+
for (let i = 0; i < this.paddingY; i++) {
|
|
78
|
+
const line = this.customBgFn ? applyBackgroundToLine(emptyLine, width, this.customBgFn) : emptyLine;
|
|
79
|
+
emptyLines.push(line);
|
|
80
|
+
}
|
|
81
|
+
const result = [...emptyLines, ...contentLines, ...emptyLines];
|
|
82
|
+
// Update cache
|
|
83
|
+
this.cachedText = this.text;
|
|
84
|
+
this.cachedWidth = width;
|
|
85
|
+
this.cachedLines = result;
|
|
86
|
+
return result.length > 0 ? result : [""];
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
//# sourceMappingURL=text.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"text.js","sourceRoot":"","sources":["../../src/components/text.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,qBAAqB,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAEpF;;GAEG;AACH,MAAM,OAAO,IAAI;IACR,IAAI,CAAS;IACb,QAAQ,CAAS,CAAC,qBAAqB;IACvC,QAAQ,CAAS,CAAC,qBAAqB;IACvC,UAAU,CAA4B;IAE9C,4BAA4B;IACpB,UAAU,CAAU;IACpB,WAAW,CAAU;IACrB,WAAW,CAAY;IAE/B,YAAY,OAAe,EAAE,EAAE,WAAmB,CAAC,EAAE,WAAmB,CAAC,EAAE,UAAqC;QAC/G,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;IAC9B,CAAC;IAED,OAAO,CAAC,IAAY;QACnB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,UAAU,GAAG,SAAS,CAAC;QAC5B,IAAI,CAAC,WAAW,GAAG,SAAS,CAAC;QAC7B,IAAI,CAAC,WAAW,GAAG,SAAS,CAAC;IAC9B,CAAC;IAED,aAAa,CAAC,UAAqC;QAClD,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;QAC7B,IAAI,CAAC,UAAU,GAAG,SAAS,CAAC;QAC5B,IAAI,CAAC,WAAW,GAAG,SAAS,CAAC;QAC7B,IAAI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GAAG,KAAK,CAAC;QACzB,IAAI,CAAC,WAAW,GAAG,MAAM,CAAC;QAE1B,OAAO,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;IAC1C,CAAC;CACD"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { Component } from "../tui.js";
|
|
2
|
+
/**
|
|
3
|
+
* Text component that truncates to fit viewport width
|
|
4
|
+
*/
|
|
5
|
+
export declare class TruncatedText implements Component {
|
|
6
|
+
private text;
|
|
7
|
+
private paddingX;
|
|
8
|
+
private paddingY;
|
|
9
|
+
constructor(text: string, paddingX?: number, paddingY?: number);
|
|
10
|
+
invalidate(): void;
|
|
11
|
+
render(width: number): string[];
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=truncated-text.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"truncated-text.d.ts","sourceRoot":"","sources":["../../src/components/truncated-text.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAG3C;;GAEG;AACH,qBAAa,aAAc,YAAW,SAAS;IAC9C,OAAO,CAAC,IAAI,CAAS;IACrB,OAAO,CAAC,QAAQ,CAAS;IACzB,OAAO,CAAC,QAAQ,CAAS;gBAEb,IAAI,EAAE,MAAM,EAAE,QAAQ,GAAE,MAAU,EAAE,QAAQ,GAAE,MAAU;IAMpE,UAAU,IAAI,IAAI;IAIlB,MAAM,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE;CA2C/B"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { truncateToWidth, visibleWidth } from "../utils.js";
|
|
2
|
+
/**
|
|
3
|
+
* Text component that truncates to fit viewport width
|
|
4
|
+
*/
|
|
5
|
+
export class TruncatedText {
|
|
6
|
+
text;
|
|
7
|
+
paddingX;
|
|
8
|
+
paddingY;
|
|
9
|
+
constructor(text, paddingX = 0, paddingY = 0) {
|
|
10
|
+
this.text = text;
|
|
11
|
+
this.paddingX = paddingX;
|
|
12
|
+
this.paddingY = paddingY;
|
|
13
|
+
}
|
|
14
|
+
invalidate() {
|
|
15
|
+
// No cached state to invalidate currently
|
|
16
|
+
}
|
|
17
|
+
render(width) {
|
|
18
|
+
const result = [];
|
|
19
|
+
// Empty line padded to width
|
|
20
|
+
const emptyLine = " ".repeat(width);
|
|
21
|
+
// Add vertical padding above
|
|
22
|
+
for (let i = 0; i < this.paddingY; i++) {
|
|
23
|
+
result.push(emptyLine);
|
|
24
|
+
}
|
|
25
|
+
// Calculate available width after horizontal padding
|
|
26
|
+
const availableWidth = Math.max(1, width - this.paddingX * 2);
|
|
27
|
+
// Take only the first line (stop at newline)
|
|
28
|
+
let singleLineText = this.text;
|
|
29
|
+
const newlineIndex = this.text.indexOf("\n");
|
|
30
|
+
if (newlineIndex !== -1) {
|
|
31
|
+
singleLineText = this.text.substring(0, newlineIndex);
|
|
32
|
+
}
|
|
33
|
+
// Truncate text if needed (accounting for ANSI codes)
|
|
34
|
+
const displayText = truncateToWidth(singleLineText, availableWidth);
|
|
35
|
+
// Add horizontal padding
|
|
36
|
+
const leftPadding = " ".repeat(this.paddingX);
|
|
37
|
+
const rightPadding = " ".repeat(this.paddingX);
|
|
38
|
+
const lineWithPadding = leftPadding + displayText + rightPadding;
|
|
39
|
+
// Pad line to exactly width characters
|
|
40
|
+
const lineVisibleWidth = visibleWidth(lineWithPadding);
|
|
41
|
+
const paddingNeeded = Math.max(0, width - lineVisibleWidth);
|
|
42
|
+
const finalLine = lineWithPadding + " ".repeat(paddingNeeded);
|
|
43
|
+
result.push(finalLine);
|
|
44
|
+
// Add vertical padding below
|
|
45
|
+
for (let i = 0; i < this.paddingY; i++) {
|
|
46
|
+
result.push(emptyLine);
|
|
47
|
+
}
|
|
48
|
+
return result;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
//# sourceMappingURL=truncated-text.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ACvD,CAAC;QAED,sDAAsD;QACtD,MAAM,WAAW,GAAG,eAAe,CAAC,cAAc,EAAE,cAAc,CAAC,CAAC;QAEpE,yBAAyB;QACzB,MAAM,WAAW,GAAG,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QAC9C,MAAM,YAAY,GAAG,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QAC/C,MAAM,eAAe,GAAG,WAAW,GAAG,WAAW,GAAG,YAAY,CAAC;QAEjE,uCAAuC;QACvC,MAAM,gBAAgB,GAAG,YAAY,CAAC,eAAe,CAAC,CAAC;QACvD,MAAM,aAAa,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,KAAK,GAAG,gBAAgB,CAAC,CAAC;QAC5D,MAAM,SAAS,GAAG,eAAe,GAAG,GAAG,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC;QAE9D,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QAEvB,6BAA6B;QAC7B,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,QAAQ,EAAE,CAAC,EAAE,EAAE,CAAC;YACxC,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QACxB,CAAC;QAED,OAAO,MAAM,CAAC;IACf,CAAC;CACD"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type { AutocompleteProvider } from "./autocomplete.js";
|
|
2
|
+
import type { Component } from "./tui.js";
|
|
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/dist/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 space-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/dist/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 space-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
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fuzzy.js","sourceRoot":"","sources":["../src/fuzzy.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAOH,MAAM,UAAU,UAAU,CAAC,KAAa,EA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,CAAC;QAED,IAAI,QAAQ,EAAE,CAAC;YACd,OAAO,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,CAAC,CAAC;QACpC,CAAC;IACF,CAAC;IAED,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,UAAU,GAAG,CAAC,CAAC,UAAU,CAAC,CAAC;IACpD,OAAO,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;AACnC,CAAC"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export { type AutocompleteItem, type AutocompleteProvider, type AutocompleteSuggestions, CombinedAutocompleteProvider, type SlashCommand, } from "./autocomplete.js";
|
|
2
|
+
export { Box } from "./components/box.js";
|
|
3
|
+
export { CancellableLoader } from "./components/cancellable-loader.js";
|
|
4
|
+
export { Editor, type EditorOptions, type EditorTheme } from "./components/editor.js";
|
|
5
|
+
export { Image, type ImageOptions, type ImageTheme } from "./components/image.js";
|
|
6
|
+
export { Input } from "./components/input.js";
|
|
7
|
+
export { Loader, type LoaderIndicatorOptions } from "./components/loader.js";
|
|
8
|
+
export { type DefaultTextStyle, Markdown, type MarkdownTheme } from "./components/markdown.js";
|
|
9
|
+
export { type SelectItem, SelectList, type SelectListLayoutOptions, type SelectListTheme, type SelectListTruncatePrimaryContext, } from "./components/select-list.js";
|
|
10
|
+
export { type SettingItem, SettingsList, type SettingsListTheme } from "./components/settings-list.js";
|
|
11
|
+
export { Spacer } from "./components/spacer.js";
|
|
12
|
+
export { Text } from "./components/text.js";
|
|
13
|
+
export { TruncatedText } from "./components/truncated-text.js";
|
|
14
|
+
export type { EditorComponent } from "./editor-component.js";
|
|
15
|
+
export { type FuzzyMatch, fuzzyFilter, fuzzyMatch } from "./fuzzy.js";
|
|
16
|
+
export { getKeybindings, type Keybinding, type KeybindingConflict, type KeybindingDefinition, type KeybindingDefinitions, type Keybindings, type KeybindingsConfig, KeybindingsManager, setKeybindings, TUI_KEYBINDINGS, } from "./keybindings.js";
|
|
17
|
+
export { decodeKittyPrintable, isKeyRelease, isKeyRepeat, isKittyProtocolActive, Key, type KeyEventType, type KeyId, matchesKey, parseKey, setKittyProtocolActive, } from "./keys.js";
|
|
18
|
+
export { StdinBuffer, type StdinBufferEventMap, type StdinBufferOptions } from "./stdin-buffer.js";
|
|
19
|
+
export { ProcessTerminal, type Terminal } from "./terminal.js";
|
|
20
|
+
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.js";
|
|
21
|
+
export { type Component, Container, CURSOR_MARKER, type Focusable, isFocusable, type OverlayAnchor, type OverlayHandle, type OverlayMargin, type OverlayOptions, type SizeValue, TUI, } from "./tui.js";
|
|
22
|
+
export { truncateToWidth, visibleWidth, wrapTextWithAnsi } from "./utils.js";
|
|
23
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAGA,OAAO,EACN,KAAK,gBAAgB,EACrB,KAAK,oBAAoB,EACzB,KAAK,uBAAuB,EAC5B,4BAA4B,EAC5B,KAAK,YAAY,GACjB,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EAAE,GAAG,EAAE,MAAM,qBAAqB,CAAC;AAC1C,OAAO,EAAE,iBAAiB,EAAE,MAAM,oCAAoC,CAAC;AACvE,OAAO,EAAE,MAAM,EAAE,KAAK,aAAa,EAAE,KAAK,WAAW,EAAE,MAAM,wBAAwB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;AACZ,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC"}
|
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
import { type KeyId } from "./keys.js";
|
|
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.cursorLeft": true;
|
|
10
|
+
"tui.editor.cursorRight": true;
|
|
11
|
+
"tui.editor.cursorWordLeft": true;
|
|
12
|
+
"tui.editor.cursorWordRight": true;
|
|
13
|
+
"tui.editor.cursorLineStart": true;
|
|
14
|
+
"tui.editor.cursorLineEnd": true;
|
|
15
|
+
"tui.editor.jumpForward": true;
|
|
16
|
+
"tui.editor.jumpBackward": true;
|
|
17
|
+
"tui.editor.pageUp": true;
|
|
18
|
+
"tui.editor.pageDown": true;
|
|
19
|
+
"tui.editor.deleteCharBackward": true;
|
|
20
|
+
"tui.editor.deleteCharForward": true;
|
|
21
|
+
"tui.editor.deleteWordBackward": true;
|
|
22
|
+
"tui.editor.deleteWordForward": true;
|
|
23
|
+
"tui.editor.deleteToLineStart": true;
|
|
24
|
+
"tui.editor.deleteToLineEnd": true;
|
|
25
|
+
"tui.editor.yank": true;
|
|
26
|
+
"tui.editor.yankPop": true;
|
|
27
|
+
"tui.editor.undo": true;
|
|
28
|
+
"tui.input.newLine": true;
|
|
29
|
+
"tui.input.submit": true;
|
|
30
|
+
"tui.input.tab": true;
|
|
31
|
+
"tui.input.copy": true;
|
|
32
|
+
"tui.select.up": true;
|
|
33
|
+
"tui.select.down": true;
|
|
34
|
+
"tui.select.pageUp": true;
|
|
35
|
+
"tui.select.pageDown": true;
|
|
36
|
+
"tui.select.confirm": true;
|
|
37
|
+
"tui.select.cancel": true;
|
|
38
|
+
}
|
|
39
|
+
export type Keybinding = keyof Keybindings;
|
|
40
|
+
export interface KeybindingDefinition {
|
|
41
|
+
defaultKeys: KeyId | KeyId[];
|
|
42
|
+
description?: string;
|
|
43
|
+
}
|
|
44
|
+
export type KeybindingDefinitions = Record<string, KeybindingDefinition>;
|
|
45
|
+
export type KeybindingsConfig = Record<string, KeyId | KeyId[] | undefined>;
|
|
46
|
+
export declare const TUI_KEYBINDINGS: {
|
|
47
|
+
readonly "tui.editor.cursorUp": {
|
|
48
|
+
readonly defaultKeys: "up";
|
|
49
|
+
readonly description: "Move cursor up";
|
|
50
|
+
};
|
|
51
|
+
readonly "tui.editor.cursorDown": {
|
|
52
|
+
readonly defaultKeys: "down";
|
|
53
|
+
readonly description: "Move cursor down";
|
|
54
|
+
};
|
|
55
|
+
readonly "tui.editor.cursorLeft": {
|
|
56
|
+
readonly defaultKeys: ["left", "ctrl+b"];
|
|
57
|
+
readonly description: "Move cursor left";
|
|
58
|
+
};
|
|
59
|
+
readonly "tui.editor.cursorRight": {
|
|
60
|
+
readonly defaultKeys: ["right", "ctrl+f"];
|
|
61
|
+
readonly description: "Move cursor right";
|
|
62
|
+
};
|
|
63
|
+
readonly "tui.editor.cursorWordLeft": {
|
|
64
|
+
readonly defaultKeys: ["alt+left", "ctrl+left", "alt+b"];
|
|
65
|
+
readonly description: "Move cursor word left";
|
|
66
|
+
};
|
|
67
|
+
readonly "tui.editor.cursorWordRight": {
|
|
68
|
+
readonly defaultKeys: ["alt+right", "ctrl+right", "alt+f"];
|
|
69
|
+
readonly description: "Move cursor word right";
|
|
70
|
+
};
|
|
71
|
+
readonly "tui.editor.cursorLineStart": {
|
|
72
|
+
readonly defaultKeys: ["home", "ctrl+a"];
|
|
73
|
+
readonly description: "Move to line start";
|
|
74
|
+
};
|
|
75
|
+
readonly "tui.editor.cursorLineEnd": {
|
|
76
|
+
readonly defaultKeys: ["end", "ctrl+e"];
|
|
77
|
+
readonly description: "Move to line end";
|
|
78
|
+
};
|
|
79
|
+
readonly "tui.editor.jumpForward": {
|
|
80
|
+
readonly defaultKeys: "ctrl+]";
|
|
81
|
+
readonly description: "Jump forward to character";
|
|
82
|
+
};
|
|
83
|
+
readonly "tui.editor.jumpBackward": {
|
|
84
|
+
readonly defaultKeys: "ctrl+alt+]";
|
|
85
|
+
readonly description: "Jump backward to character";
|
|
86
|
+
};
|
|
87
|
+
readonly "tui.editor.pageUp": {
|
|
88
|
+
readonly defaultKeys: "pageUp";
|
|
89
|
+
readonly description: "Page up";
|
|
90
|
+
};
|
|
91
|
+
readonly "tui.editor.pageDown": {
|
|
92
|
+
readonly defaultKeys: "pageDown";
|
|
93
|
+
readonly description: "Page down";
|
|
94
|
+
};
|
|
95
|
+
readonly "tui.editor.deleteCharBackward": {
|
|
96
|
+
readonly defaultKeys: "backspace";
|
|
97
|
+
readonly description: "Delete character backward";
|
|
98
|
+
};
|
|
99
|
+
readonly "tui.editor.deleteCharForward": {
|
|
100
|
+
readonly defaultKeys: ["delete", "ctrl+d"];
|
|
101
|
+
readonly description: "Delete character forward";
|
|
102
|
+
};
|
|
103
|
+
readonly "tui.editor.deleteWordBackward": {
|
|
104
|
+
readonly defaultKeys: ["ctrl+w", "alt+backspace"];
|
|
105
|
+
readonly description: "Delete word backward";
|
|
106
|
+
};
|
|
107
|
+
readonly "tui.editor.deleteWordForward": {
|
|
108
|
+
readonly defaultKeys: ["alt+d", "alt+delete"];
|
|
109
|
+
readonly description: "Delete word forward";
|
|
110
|
+
};
|
|
111
|
+
readonly "tui.editor.deleteToLineStart": {
|
|
112
|
+
readonly defaultKeys: "ctrl+u";
|
|
113
|
+
readonly description: "Delete to line start";
|
|
114
|
+
};
|
|
115
|
+
readonly "tui.editor.deleteToLineEnd": {
|
|
116
|
+
readonly defaultKeys: "ctrl+k";
|
|
117
|
+
readonly description: "Delete to line end";
|
|
118
|
+
};
|
|
119
|
+
readonly "tui.editor.yank": {
|
|
120
|
+
readonly defaultKeys: "ctrl+y";
|
|
121
|
+
readonly description: "Yank";
|
|
122
|
+
};
|
|
123
|
+
readonly "tui.editor.yankPop": {
|
|
124
|
+
readonly defaultKeys: "alt+y";
|
|
125
|
+
readonly description: "Yank pop";
|
|
126
|
+
};
|
|
127
|
+
readonly "tui.editor.undo": {
|
|
128
|
+
readonly defaultKeys: "ctrl+-";
|
|
129
|
+
readonly description: "Undo";
|
|
130
|
+
};
|
|
131
|
+
readonly "tui.input.newLine": {
|
|
132
|
+
readonly defaultKeys: "shift+enter";
|
|
133
|
+
readonly description: "Insert newline";
|
|
134
|
+
};
|
|
135
|
+
readonly "tui.input.submit": {
|
|
136
|
+
readonly defaultKeys: "enter";
|
|
137
|
+
readonly description: "Submit input";
|
|
138
|
+
};
|
|
139
|
+
readonly "tui.input.tab": {
|
|
140
|
+
readonly defaultKeys: "tab";
|
|
141
|
+
readonly description: "Tab / autocomplete";
|
|
142
|
+
};
|
|
143
|
+
readonly "tui.input.copy": {
|
|
144
|
+
readonly defaultKeys: "ctrl+c";
|
|
145
|
+
readonly description: "Copy selection";
|
|
146
|
+
};
|
|
147
|
+
readonly "tui.select.up": {
|
|
148
|
+
readonly defaultKeys: "up";
|
|
149
|
+
readonly description: "Move selection up";
|
|
150
|
+
};
|
|
151
|
+
readonly "tui.select.down": {
|
|
152
|
+
readonly defaultKeys: "down";
|
|
153
|
+
readonly description: "Move selection down";
|
|
154
|
+
};
|
|
155
|
+
readonly "tui.select.pageUp": {
|
|
156
|
+
readonly defaultKeys: "pageUp";
|
|
157
|
+
readonly description: "Selection page up";
|
|
158
|
+
};
|
|
159
|
+
readonly "tui.select.pageDown": {
|
|
160
|
+
readonly defaultKeys: "pageDown";
|
|
161
|
+
readonly description: "Selection page down";
|
|
162
|
+
};
|
|
163
|
+
readonly "tui.select.confirm": {
|
|
164
|
+
readonly defaultKeys: "enter";
|
|
165
|
+
readonly description: "Confirm selection";
|
|
166
|
+
};
|
|
167
|
+
readonly "tui.select.cancel": {
|
|
168
|
+
readonly defaultKeys: ["escape", "ctrl+c"];
|
|
169
|
+
readonly description: "Cancel selection";
|
|
170
|
+
};
|
|
171
|
+
};
|
|
172
|
+
export interface KeybindingConflict {
|
|
173
|
+
key: KeyId;
|
|
174
|
+
keybindings: string[];
|
|
175
|
+
}
|
|
176
|
+
export declare class KeybindingsManager {
|
|
177
|
+
private definitions;
|
|
178
|
+
private userBindings;
|
|
179
|
+
private keysById;
|
|
180
|
+
private conflicts;
|
|
181
|
+
constructor(definitions: KeybindingDefinitions, userBindings?: KeybindingsConfig);
|
|
182
|
+
private rebuild;
|
|
183
|
+
matches(data: string, keybinding: Keybinding): boolean;
|
|
184
|
+
getKeys(keybinding: Keybinding): KeyId[];
|
|
185
|
+
getDefinition(keybinding: Keybinding): KeybindingDefinition;
|
|
186
|
+
getConflicts(): KeybindingConflict[];
|
|
187
|
+
setUserBindings(userBindings: KeybindingsConfig): void;
|
|
188
|
+
getUserBindings(): KeybindingsConfig;
|
|
189
|
+
getResolvedBindings(): KeybindingsConfig;
|
|
190
|
+
}
|
|
191
|
+
export declare function setKeybindings(keybindings: KeybindingsManager): void;
|
|
192
|
+
export declare function getKeybindings(): KeybindingsManager;
|
|
193
|
+
//# 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,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,CAAC;IACjC,wBAAwB,EAAE,IAAI,CAAC;IAC/B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