@opentui/core 0.3.2 → 0.3.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/NativeSpanFeed.d.ts +1 -0
- package/buffer.d.ts +4 -3
- package/edit-buffer.d.ts +3 -4
- package/editor-view.d.ts +3 -4
- package/{index-vdnak5x1.js → index-jh82sd41.js} +2 -2
- package/{index-m0bc6bw1.js → index-mbck6rbg.js} +3 -3
- package/{index-218h9p3f.js → index-mn090kzf.js} +328 -279
- package/{index-218h9p3f.js.map → index-mn090kzf.js.map} +13 -13
- package/{index-3mx8q5t1.js → index-qndc8vq8.js} +2 -2
- package/{index-3mx8q5t1.js.map → index-qndc8vq8.js.map} +2 -2
- package/index.js +2 -2
- package/lib/clipboard.d.ts +2 -3
- package/package.json +9 -9
- package/renderables/Box.d.ts +4 -0
- package/renderer.d.ts +2 -3
- package/runtime-plugin-support-configure.js +4 -4
- package/runtime-plugin-support.js +4 -4
- package/runtime-plugin.js +3 -3
- package/syntax-style.d.ts +3 -4
- package/testing.js +1 -1
- package/text-buffer-view.d.ts +3 -4
- package/text-buffer.d.ts +3 -4
- package/zig.d.ts +264 -252
- /package/{index-vdnak5x1.js.map → index-jh82sd41.js.map} +0 -0
- /package/{index-m0bc6bw1.js.map → index-mbck6rbg.js.map} +0 -0
package/index.js
CHANGED
|
@@ -72,7 +72,7 @@ import {
|
|
|
72
72
|
resolveCoreSlot,
|
|
73
73
|
setupAudio,
|
|
74
74
|
vstyles
|
|
75
|
-
} from "./index-
|
|
75
|
+
} from "./index-qndc8vq8.js";
|
|
76
76
|
import {
|
|
77
77
|
ASCIIFontSelectionHelper,
|
|
78
78
|
ATTRIBUTE_BASE_BITS,
|
|
@@ -247,7 +247,7 @@ import {
|
|
|
247
247
|
white,
|
|
248
248
|
wrapWithDelegates,
|
|
249
249
|
yellow
|
|
250
|
-
} from "./index-
|
|
250
|
+
} from "./index-mn090kzf.js";
|
|
251
251
|
export {
|
|
252
252
|
yellow,
|
|
253
253
|
wrapWithDelegates,
|
package/lib/clipboard.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type { RenderLib } from "../zig.js";
|
|
1
|
+
import type { RendererHandle, RenderLib } from "../zig.js";
|
|
3
2
|
export declare enum ClipboardTarget {
|
|
4
3
|
Clipboard = 0,
|
|
5
4
|
Primary = 1,
|
|
@@ -10,7 +9,7 @@ export declare function encodeOsc52Payload(text: string, encoder?: TextEncoder):
|
|
|
10
9
|
export declare class Clipboard {
|
|
11
10
|
private lib;
|
|
12
11
|
private rendererPtr;
|
|
13
|
-
constructor(lib: RenderLib, rendererPtr:
|
|
12
|
+
constructor(lib: RenderLib, rendererPtr: RendererHandle);
|
|
14
13
|
copyToClipboardOSC52(text: string, target?: ClipboardTarget): boolean;
|
|
15
14
|
clearClipboardOSC52(target?: ClipboardTarget): boolean;
|
|
16
15
|
isOsc52Supported(): boolean;
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"types": "index.d.ts",
|
|
6
6
|
"type": "module",
|
|
7
|
-
"version": "0.3.
|
|
7
|
+
"version": "0.3.3",
|
|
8
8
|
"description": "OpenTUI is a TypeScript library on a native Zig core for building terminal user interfaces (TUIs)",
|
|
9
9
|
"license": "MIT",
|
|
10
10
|
"repository": {
|
|
@@ -69,13 +69,13 @@
|
|
|
69
69
|
"web-tree-sitter": "0.25.10"
|
|
70
70
|
},
|
|
71
71
|
"optionalDependencies": {
|
|
72
|
-
"@opentui/core-darwin-x64": "0.3.
|
|
73
|
-
"@opentui/core-darwin-arm64": "0.3.
|
|
74
|
-
"@opentui/core-linux-x64": "0.3.
|
|
75
|
-
"@opentui/core-linux-arm64": "0.3.
|
|
76
|
-
"@opentui/core-win32-x64": "0.3.
|
|
77
|
-
"@opentui/core-win32-arm64": "0.3.
|
|
78
|
-
"@opentui/core-linux-x64-musl": "0.3.
|
|
79
|
-
"@opentui/core-linux-arm64-musl": "0.3.
|
|
72
|
+
"@opentui/core-darwin-x64": "0.3.3",
|
|
73
|
+
"@opentui/core-darwin-arm64": "0.3.3",
|
|
74
|
+
"@opentui/core-linux-x64": "0.3.3",
|
|
75
|
+
"@opentui/core-linux-arm64": "0.3.3",
|
|
76
|
+
"@opentui/core-win32-x64": "0.3.3",
|
|
77
|
+
"@opentui/core-win32-arm64": "0.3.3",
|
|
78
|
+
"@opentui/core-linux-x64-musl": "0.3.3",
|
|
79
|
+
"@opentui/core-linux-arm64-musl": "0.3.3"
|
|
80
80
|
}
|
|
81
81
|
}
|
package/renderables/Box.d.ts
CHANGED
|
@@ -11,6 +11,7 @@ export interface BoxOptions<TRenderable extends Renderable = BoxRenderable> exte
|
|
|
11
11
|
customBorderChars?: BorderCharacters;
|
|
12
12
|
shouldFill?: boolean;
|
|
13
13
|
title?: string;
|
|
14
|
+
titleColor?: string | RGBA;
|
|
14
15
|
titleAlignment?: "left" | "center" | "right";
|
|
15
16
|
bottomTitle?: string;
|
|
16
17
|
bottomTitleAlignment?: "left" | "center" | "right";
|
|
@@ -31,6 +32,7 @@ export declare class BoxRenderable extends Renderable {
|
|
|
31
32
|
protected borderSides: BorderSidesConfig;
|
|
32
33
|
shouldFill: boolean;
|
|
33
34
|
protected _title?: string;
|
|
35
|
+
protected _titleColor?: RGBA;
|
|
34
36
|
protected _titleAlignment: "left" | "center" | "right";
|
|
35
37
|
protected _bottomTitle?: string;
|
|
36
38
|
protected _bottomTitleAlignment: "left" | "center" | "right";
|
|
@@ -60,6 +62,8 @@ export declare class BoxRenderable extends Renderable {
|
|
|
60
62
|
set focusedBorderColor(value: RGBA | string);
|
|
61
63
|
get title(): string | undefined;
|
|
62
64
|
set title(value: string | undefined);
|
|
65
|
+
get titleColor(): RGBA | undefined;
|
|
66
|
+
set titleColor(value: string | RGBA | undefined);
|
|
63
67
|
get titleAlignment(): "left" | "center" | "right";
|
|
64
68
|
set titleAlignment(value: "left" | "center" | "right");
|
|
65
69
|
get bottomTitle(): string | undefined;
|
package/renderer.d.ts
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { Renderable, RootRenderable } from "./Renderable.js";
|
|
2
2
|
import { DebugOverlayCorner, type CursorStyleOptions, type MousePointerStyle, type RenderContext, type TerminalCapabilities, type ThemeMode, type WidthMethod } from "./types.js";
|
|
3
3
|
import { RGBA, type ColorInput } from "./lib/RGBA.js";
|
|
4
|
-
import type { Pointer } from "./platform/ffi.js";
|
|
5
4
|
import { OptimizedBuffer } from "./buffer.js";
|
|
6
|
-
import { type NativeBufferedOutput, type NativeRenderStats } from "./zig.js";
|
|
5
|
+
import { type NativeBufferedOutput, type NativeRenderStats, type RendererHandle } from "./zig.js";
|
|
7
6
|
import { TerminalConsole, type ConsoleOptions } from "./console.js";
|
|
8
7
|
import { type MouseEventType, type RawMouseEvent, type ScrollInfo } from "./lib/parse.mouse.js";
|
|
9
8
|
import { Selection } from "./lib/selection.js";
|
|
@@ -203,7 +202,7 @@ export declare enum RendererControlState {
|
|
|
203
202
|
export declare class CliRenderer extends EventEmitter implements RenderContext {
|
|
204
203
|
private static animationFrameId;
|
|
205
204
|
private lib;
|
|
206
|
-
rendererPtr:
|
|
205
|
+
rendererPtr: RendererHandle;
|
|
207
206
|
stdin: NodeJS.ReadStream;
|
|
208
207
|
private stdout;
|
|
209
208
|
private exitOnCtrlC;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
3
|
ensureRuntimePluginSupport
|
|
4
|
-
} from "./index-
|
|
4
|
+
} from "./index-jh82sd41.js";
|
|
5
5
|
import {
|
|
6
6
|
createRuntimePlugin,
|
|
7
7
|
runtimeModuleIdForSpecifier
|
|
8
|
-
} from "./index-
|
|
9
|
-
import"./index-
|
|
10
|
-
import"./index-
|
|
8
|
+
} from "./index-mbck6rbg.js";
|
|
9
|
+
import"./index-qndc8vq8.js";
|
|
10
|
+
import"./index-mn090kzf.js";
|
|
11
11
|
export {
|
|
12
12
|
runtimeModuleIdForSpecifier,
|
|
13
13
|
ensureRuntimePluginSupport,
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
3
|
ensureRuntimePluginSupport
|
|
4
|
-
} from "./index-
|
|
4
|
+
} from "./index-jh82sd41.js";
|
|
5
5
|
import {
|
|
6
6
|
createRuntimePlugin,
|
|
7
7
|
runtimeModuleIdForSpecifier
|
|
8
|
-
} from "./index-
|
|
9
|
-
import"./index-
|
|
10
|
-
import"./index-
|
|
8
|
+
} from "./index-mbck6rbg.js";
|
|
9
|
+
import"./index-qndc8vq8.js";
|
|
10
|
+
import"./index-mn090kzf.js";
|
|
11
11
|
// src/runtime-plugin-support.ts
|
|
12
12
|
ensureRuntimePluginSupport();
|
|
13
13
|
export {
|
package/runtime-plugin.js
CHANGED
|
@@ -3,9 +3,9 @@ import {
|
|
|
3
3
|
createRuntimePlugin,
|
|
4
4
|
isCoreRuntimeModuleSpecifier,
|
|
5
5
|
runtimeModuleIdForSpecifier
|
|
6
|
-
} from "./index-
|
|
7
|
-
import"./index-
|
|
8
|
-
import"./index-
|
|
6
|
+
} from "./index-mbck6rbg.js";
|
|
7
|
+
import"./index-qndc8vq8.js";
|
|
8
|
+
import"./index-mn090kzf.js";
|
|
9
9
|
export {
|
|
10
10
|
runtimeModuleIdForSpecifier,
|
|
11
11
|
isCoreRuntimeModuleSpecifier,
|
package/syntax-style.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { RGBA, type ColorInput } from "./lib/RGBA.js";
|
|
2
|
-
import { type RenderLib } from "./zig.js";
|
|
3
|
-
import { type Pointer } from "./platform/ffi.js";
|
|
2
|
+
import { type RenderLib, type SyntaxStyleHandle } from "./zig.js";
|
|
4
3
|
export interface StyleDefinition {
|
|
5
4
|
fg?: RGBA;
|
|
6
5
|
bg?: RGBA;
|
|
@@ -41,7 +40,7 @@ export declare class SyntaxStyle {
|
|
|
41
40
|
private nameCache;
|
|
42
41
|
private styleDefs;
|
|
43
42
|
private mergedCache;
|
|
44
|
-
constructor(lib: RenderLib, ptr:
|
|
43
|
+
constructor(lib: RenderLib, ptr: SyntaxStyleHandle);
|
|
45
44
|
static create(): SyntaxStyle;
|
|
46
45
|
static fromTheme(theme: ThemeTokenStyle[]): SyntaxStyle;
|
|
47
46
|
static fromStyles(styles: Record<string, StyleDefinitionInput>): SyntaxStyle;
|
|
@@ -49,7 +48,7 @@ export declare class SyntaxStyle {
|
|
|
49
48
|
registerStyle(name: string, style: StyleDefinitionInput): number;
|
|
50
49
|
resolveStyleId(name: string): number | null;
|
|
51
50
|
getStyleId(name: string): number | null;
|
|
52
|
-
get ptr():
|
|
51
|
+
get ptr(): SyntaxStyleHandle;
|
|
53
52
|
getStyleCount(): number;
|
|
54
53
|
clearNameCache(): void;
|
|
55
54
|
getStyle(name: string): StyleDefinition | undefined;
|
package/testing.js
CHANGED
package/text-buffer-view.d.ts
CHANGED
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
import { RGBA } from "./lib/RGBA.js";
|
|
2
|
-
import { type LineInfo, type RenderLib } from "./zig.js";
|
|
3
|
-
import { type Pointer } from "./platform/ffi.js";
|
|
2
|
+
import { type LineInfo, type RenderLib, type TextBufferViewHandle } from "./zig.js";
|
|
4
3
|
import type { TextBuffer } from "./text-buffer.js";
|
|
5
4
|
export declare class TextBufferView {
|
|
6
5
|
private lib;
|
|
7
6
|
private viewPtr;
|
|
8
7
|
private textBuffer;
|
|
9
8
|
private _destroyed;
|
|
10
|
-
constructor(lib: RenderLib, ptr:
|
|
9
|
+
constructor(lib: RenderLib, ptr: TextBufferViewHandle, textBuffer: TextBuffer);
|
|
11
10
|
static create(textBuffer: TextBuffer): TextBufferView;
|
|
12
11
|
private guard;
|
|
13
|
-
get ptr():
|
|
12
|
+
get ptr(): TextBufferViewHandle;
|
|
14
13
|
setSelection(start: number, end: number, bgColor?: RGBA, fgColor?: RGBA): void;
|
|
15
14
|
updateSelection(end: number, bgColor?: RGBA, fgColor?: RGBA): void;
|
|
16
15
|
resetSelection(): void;
|
package/text-buffer.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import type { StyledText } from "./lib/styled-text.js";
|
|
2
2
|
import { RGBA } from "./lib/RGBA.js";
|
|
3
|
-
import { type RenderLib } from "./zig.js";
|
|
4
|
-
import { type Pointer } from "./platform/ffi.js";
|
|
3
|
+
import { type RenderLib, type TextBufferHandle } from "./zig.js";
|
|
5
4
|
import { type WidthMethod, type Highlight } from "./types.js";
|
|
6
5
|
import type { SyntaxStyle } from "./syntax-style.js";
|
|
7
6
|
export interface TextChunk {
|
|
@@ -25,7 +24,7 @@ export declare class TextBuffer {
|
|
|
25
24
|
private _textBytes?;
|
|
26
25
|
private _memId?;
|
|
27
26
|
private _appendedChunks;
|
|
28
|
-
constructor(lib: RenderLib, ptr:
|
|
27
|
+
constructor(lib: RenderLib, ptr: TextBufferHandle);
|
|
29
28
|
static create(widthMethod: WidthMethod): TextBuffer;
|
|
30
29
|
private guard;
|
|
31
30
|
setText(text: string): void;
|
|
@@ -39,7 +38,7 @@ export declare class TextBuffer {
|
|
|
39
38
|
getLineCount(): number;
|
|
40
39
|
get length(): number;
|
|
41
40
|
get byteSize(): number;
|
|
42
|
-
get ptr():
|
|
41
|
+
get ptr(): TextBufferHandle;
|
|
43
42
|
getPlainText(): string;
|
|
44
43
|
getTextRange(startOffset: number, endOffset: number): string;
|
|
45
44
|
/**
|