@opentui/core 0.1.86 → 0.1.87
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/3d.js +4 -3
- package/3d.js.map +3 -3
- package/editor-view.d.ts +1 -1
- package/{index-4sjb8n0n.js → index-0wbvecnk.js} +2299 -1635
- package/index-0wbvecnk.js.map +63 -0
- package/index.js +114 -9
- package/index.js.map +11 -10
- package/lib/KeyHandler.d.ts +1 -4
- package/lib/clock.d.ts +11 -0
- package/lib/index.d.ts +2 -1
- package/lib/parse.mouse.d.ts +2 -2
- package/lib/stdin-parser.d.ts +74 -0
- package/lib/terminal-palette.d.ts +9 -4
- package/lib/tree-sitter/download-utils.d.ts +1 -1
- package/package.json +7 -7
- package/parser.worker.js +7 -7
- package/parser.worker.js.map +3 -3
- package/renderables/Diff.d.ts +7 -0
- package/renderables/TimeToFirstDraw.d.ts +24 -0
- package/renderables/index.d.ts +1 -0
- package/renderer.d.ts +12 -4
- package/testing/manual-clock.d.ts +16 -0
- package/testing.js +1 -1
- package/text-buffer-view.d.ts +1 -1
- package/types.d.ts +9 -4
- package/zig-structs.d.ts +6 -6
- package/zig.d.ts +1 -1
- package/index-4sjb8n0n.js.map +0 -62
- package/lib/stdin-buffer.d.ts +0 -44
package/lib/stdin-buffer.d.ts
DELETED
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* StdinBuffer buffers input and emits complete sequences.
|
|
3
|
-
*
|
|
4
|
-
* This is necessary because stdin data events can arrive in partial chunks,
|
|
5
|
-
* especially for escape sequences like mouse events. Without buffering,
|
|
6
|
-
* partial sequences can be misinterpreted as regular keypresses.
|
|
7
|
-
*
|
|
8
|
-
* For example, the mouse SGR sequence `\x1b[<35;20;5m` might arrive as:
|
|
9
|
-
* - Event 1: `\x1b`
|
|
10
|
-
* - Event 2: `[<35`
|
|
11
|
-
* - Event 3: `;20;5m`
|
|
12
|
-
*
|
|
13
|
-
* The buffer accumulates these until a complete sequence is detected.
|
|
14
|
-
* Call the `process()` method to feed input data.
|
|
15
|
-
*/
|
|
16
|
-
import { EventEmitter } from "events";
|
|
17
|
-
export type StdinBufferOptions = {
|
|
18
|
-
/**
|
|
19
|
-
* Maximum time to wait for sequence completion (default: 10ms)
|
|
20
|
-
* After this time, the buffer is flushed even if incomplete
|
|
21
|
-
*/
|
|
22
|
-
timeout?: number;
|
|
23
|
-
};
|
|
24
|
-
export type StdinBufferEventMap = {
|
|
25
|
-
data: [string];
|
|
26
|
-
paste: [string];
|
|
27
|
-
};
|
|
28
|
-
/**
|
|
29
|
-
* Buffers stdin input and emits complete sequences via the 'data' event.
|
|
30
|
-
* Handles partial escape sequences that arrive across multiple chunks.
|
|
31
|
-
*/
|
|
32
|
-
export declare class StdinBuffer extends EventEmitter<StdinBufferEventMap> {
|
|
33
|
-
private buffer;
|
|
34
|
-
private timeout;
|
|
35
|
-
private readonly timeoutMs;
|
|
36
|
-
private pasteMode;
|
|
37
|
-
private pasteBuffer;
|
|
38
|
-
constructor(options?: StdinBufferOptions);
|
|
39
|
-
process(data: string | Buffer): void;
|
|
40
|
-
flush(): string[];
|
|
41
|
-
clear(): void;
|
|
42
|
-
getBuffer(): string;
|
|
43
|
-
destroy(): void;
|
|
44
|
-
}
|