@opentui/core 0.6.1 → 0.6.3
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/NativeSession.d.ts +3 -0
- package/{chunk-bun-wsqkxxm5.js → chunk-bun-e2gttx65.js} +106 -3
- package/chunk-bun-e2gttx65.js.map +35 -0
- package/{chunk-bun-ww65h9av.js → chunk-bun-qphgryjx.js} +30 -6
- package/{chunk-bun-ww65h9av.js.map → chunk-bun-qphgryjx.js.map} +7 -7
- package/{chunk-node-f7c1g447.js → chunk-node-6rc18den.js} +106 -3
- package/chunk-node-6rc18den.js.map +34 -0
- package/{chunk-node-jh6t3wnm.js → chunk-node-j1h89sfg.js} +30 -6
- package/{chunk-node-jh6t3wnm.js.map → chunk-node-j1h89sfg.js.map} +7 -7
- package/edit-buffer.d.ts +11 -1
- package/index.bun.js +38 -3
- package/index.bun.js.map +3 -3
- package/index.node.js +38 -3
- package/index.node.js.map +3 -3
- package/lib/terminal-capability-detection.d.ts +1 -0
- package/native-abi.generated.d.ts +70 -0
- package/package.json +9 -9
- package/renderer.d.ts +8 -1
- package/testing.bun.js +4 -3
- package/testing.bun.js.map +3 -3
- package/testing.js +4 -3
- package/testing.js.map +3 -3
- package/types.d.ts +32 -0
- package/yoga.bun.js +1 -1
- package/yoga.js +1 -1
- package/zig.d.ts +6 -1
- package/chunk-bun-wsqkxxm5.js.map +0 -35
- package/chunk-node-f7c1g447.js.map +0 -34
package/types.d.ts
CHANGED
|
@@ -81,10 +81,41 @@ export interface TerminalCapabilities {
|
|
|
81
81
|
notifications: boolean;
|
|
82
82
|
explicit_cursor_positioning: boolean;
|
|
83
83
|
remote: boolean;
|
|
84
|
+
/** The terminal answered the OSC 7501 program status query. */
|
|
85
|
+
program_status: boolean;
|
|
84
86
|
multiplexer: TerminalMultiplexer;
|
|
85
87
|
image_protocol?: ImageRenderProtocol;
|
|
86
88
|
terminal: TerminalInfo;
|
|
87
89
|
}
|
|
90
|
+
export type ProgramStatusKind = "permission" | "question" | "auth";
|
|
91
|
+
interface ProgramStatusRecord {
|
|
92
|
+
/** Record path such as `build/test`. Omit it to address the root record. */
|
|
93
|
+
id?: string;
|
|
94
|
+
/** Stable program identifier such as `cargo` or `terraform`. */
|
|
95
|
+
app?: string;
|
|
96
|
+
/** Short label for the record. */
|
|
97
|
+
title?: string;
|
|
98
|
+
/** One line that says what the record is doing, waiting for, or finished. */
|
|
99
|
+
message?: string;
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* One OSC 7501 Program Status Protocol report. Each report replaces its record:
|
|
103
|
+
* a field missing from the report is missing from the record afterwards.
|
|
104
|
+
* `clear` removes the addressed record and every record beneath it.
|
|
105
|
+
*/
|
|
106
|
+
export type ProgramStatus = (ProgramStatusRecord & {
|
|
107
|
+
state: "idle" | "done" | "error";
|
|
108
|
+
}) | (ProgramStatusRecord & {
|
|
109
|
+
state: "working";
|
|
110
|
+
progress?: number;
|
|
111
|
+
}) | (ProgramStatusRecord & {
|
|
112
|
+
state: "blocked";
|
|
113
|
+
kind?: ProgramStatusKind;
|
|
114
|
+
progress?: number;
|
|
115
|
+
}) | {
|
|
116
|
+
state: "clear";
|
|
117
|
+
id?: string;
|
|
118
|
+
};
|
|
88
119
|
export interface RendererEvents {
|
|
89
120
|
resize: (width: number, height: number) => void;
|
|
90
121
|
key: (data: Buffer) => void;
|
|
@@ -191,3 +222,4 @@ export interface CapturedFrame {
|
|
|
191
222
|
cursor: [number, number];
|
|
192
223
|
lines: CapturedLine[];
|
|
193
224
|
}
|
|
225
|
+
export {};
|
package/yoga.bun.js
CHANGED
package/yoga.js
CHANGED
package/zig.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type FFICallbackInstance, type Pointer, type PointerInput } from "./platform/ffi.js";
|
|
2
|
-
import { type CursorStyle, type CursorStyleOptions, type SelectionOccupancy, type SelectionBehavior, type DebugOverlayCorner, type WidthMethod, type TerminalCapabilities, type Highlight, type LineInfo, type MousePointerStyle, type ImageRenderProtocol } from "./types.js";
|
|
2
|
+
import { type CursorStyle, type CursorStyleOptions, type SelectionOccupancy, type SelectionBehavior, type DebugOverlayCorner, type WidthMethod, type TerminalCapabilities, type Highlight, type LineInfo, type MousePointerStyle, type ImageRenderProtocol, type ProgramStatus } from "./types.js";
|
|
3
3
|
export type { LineInfo, AllocatorStats, AudioStreamCreateOptions, BuildOptions, NativeAudioCaptureStats, NativeAudioStreamStats, NativeRenderStats, };
|
|
4
4
|
import { RGBA } from "./lib/RGBA.js";
|
|
5
5
|
import { type StyledText } from "./lib/styled-text.js";
|
|
@@ -619,6 +619,9 @@ export type NativeSessionControl = {
|
|
|
619
619
|
} | {
|
|
620
620
|
kind: "kitty-keyboard-flags";
|
|
621
621
|
flags: number;
|
|
622
|
+
} | {
|
|
623
|
+
kind: "program-status";
|
|
624
|
+
status: ProgramStatus;
|
|
622
625
|
} | {
|
|
623
626
|
kind: "restore-modes" | "query-pixel-resolution" | "query-theme-colors" | "reset-background";
|
|
624
627
|
};
|
|
@@ -961,6 +964,7 @@ export declare class FFIRenderLib {
|
|
|
961
964
|
private clipboardServices;
|
|
962
965
|
private clipboardOperations;
|
|
963
966
|
private audioEngines;
|
|
967
|
+
private editMeasureContext?;
|
|
964
968
|
private readonly invalidStandaloneHandle;
|
|
965
969
|
readonly encoder: TextEncoder;
|
|
966
970
|
private readonly emptyBytes;
|
|
@@ -1082,6 +1086,7 @@ export declare class FFIRenderLib {
|
|
|
1082
1086
|
contextEditBufferGetPosition(context: NativeContextHandle, editBuffer: ContextEditBufferHandle, query: NativeEditPositionQuery, a?: number, b?: number): LogicalCursor | null;
|
|
1083
1087
|
contextEditBufferGetRange(context: NativeContextHandle, editBuffer: ContextEditBufferHandle, byCoords: boolean, startRow: number, startCol: number, endRow: number, endCol: number): string;
|
|
1084
1088
|
contextEditBufferMeasureText(context: NativeContextHandle, editBuffer: ContextEditBufferHandle, bytes: Uint8Array): number;
|
|
1089
|
+
editMeasureText(bytes: Uint8Array, widthMethod: WidthMethod, tabWidth: number): number;
|
|
1085
1090
|
contextEditBufferSetDefaults(context: NativeContextHandle, editBuffer: ContextEditBufferHandle, mask: NativeEditorStyleMask, style: NativeEditorStyle): void;
|
|
1086
1091
|
contextSyntaxStyleRegister(context: NativeContextHandle, style: ContextSyntaxStyleHandle, name: string, definition: NativeEditorStyle): number;
|
|
1087
1092
|
contextSyntaxStyleResolveByName(context: NativeContextHandle, style: ContextSyntaxStyleHandle, name: string): number | null;
|