@opentui/core 0.5.17 → 0.6.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/NativeScene.d.ts +185 -0
- package/NativeSession.d.ts +134 -0
- package/NativeSpanFeed.d.ts +1 -4
- package/README.md +5 -3
- package/Renderable.d.ts +162 -67
- package/animation/Timeline.d.ts +11 -1
- package/assets/typescriptreact/highlights.scm +758 -0
- package/assets/typescriptreact/tree-sitter-tsx.wasm +0 -0
- package/buffer.d.ts +76 -36
- package/chunk-bun-s01c2jyn.js +24914 -0
- package/chunk-bun-s01c2jyn.js.map +69 -0
- package/chunk-bun-tsc14mt5.js +12515 -0
- package/chunk-bun-tsc14mt5.js.map +35 -0
- package/chunk-node-df90qrqc.js +12495 -0
- package/chunk-node-df90qrqc.js.map +34 -0
- package/chunk-node-hjr2tm60.js +24913 -0
- package/chunk-node-hjr2tm60.js.map +69 -0
- package/edit-buffer.d.ts +18 -20
- package/editor-view.d.ts +13 -5
- package/image.d.ts +18 -7
- package/index.bun.js +2387 -2899
- package/index.bun.js.map +20 -22
- package/index.d.ts +6 -2
- package/index.node.js +2387 -2899
- package/index.node.js.map +20 -24
- package/lib/buffer-access.d.ts +6 -0
- package/lib/clipboard.d.ts +0 -9
- package/lib/extmarks.d.ts +4 -1
- package/lib/tree-sitter/parsers-config.d.ts +9 -9
- package/native-abi.generated.d.ts +5496 -0
- package/node-assets.js +6 -2
- package/node-assets.js.map +3 -3
- package/package.json +10 -10
- package/parser.worker.js +14 -2
- package/parser.worker.js.map +3 -3
- package/renderables/ASCIIFont.d.ts +5 -5
- package/renderables/Box.d.ts +8 -8
- package/renderables/Code.d.ts +6 -2
- package/renderables/Diff.d.ts +4 -2
- package/renderables/EditBufferRenderable.d.ts +8 -10
- package/renderables/EmbeddedTerminal.d.ts +4 -2
- package/renderables/FrameBuffer.d.ts +3 -1
- package/renderables/Image.d.ts +3 -1
- package/renderables/Input.d.ts +0 -5
- package/renderables/LineNumberRenderable.d.ts +3 -1
- package/renderables/Markdown.d.ts +5 -2
- package/renderables/ScrollBar.d.ts +7 -1
- package/renderables/ScrollBox.d.ts +4 -6
- package/renderables/Select.d.ts +2 -1
- package/renderables/Slider.d.ts +7 -5
- package/renderables/TabSelect.d.ts +2 -1
- package/renderables/Text.d.ts +5 -4
- package/renderables/TextBufferRenderable.d.ts +10 -9
- package/renderables/TextNode.d.ts +8 -0
- package/renderables/TextTable.d.ts +1 -1
- package/renderables/Textarea.d.ts +1 -1
- package/renderables/index.d.ts +1 -1
- package/renderer.d.ts +90 -67
- package/session-buffer.d.ts +4 -0
- package/syntax-style.d.ts +9 -7
- package/testing/harness.d.ts +33 -0
- package/testing/manual-clock.d.ts +2 -0
- package/testing/test-renderer.d.ts +3 -0
- package/testing/test-streams.d.ts +20 -2
- package/testing.bun.js +60 -49
- package/testing.bun.js.map +6 -6
- package/testing.js +60 -49
- package/testing.js.map +6 -6
- package/tests/native-log-worker-child.d.ts +1 -0
- package/tests/native-symbol-stubs.d.ts +5 -0
- package/tests/yoga-callback-boundary-child.d.ts +1 -0
- package/tests/yoga-default-config-worker-child.d.ts +1 -0
- package/text-buffer-view.d.ts +11 -4
- package/text-buffer.d.ts +24 -9
- package/types.d.ts +4 -4
- package/yoga.bun.js +6 -2
- package/yoga.bun.js.map +1 -1
- package/yoga.d.ts +91 -56
- package/yoga.internal.d.ts +78 -0
- package/yoga.js +6 -2
- package/yoga.js.map +1 -1
- package/zig-structs.d.ts +13 -98
- package/zig.d.ts +1304 -583
- package/chunk-bun-6rvkxs1v.js +0 -18862
- package/chunk-bun-6rvkxs1v.js.map +0 -64
- package/chunk-bun-h3ggawd9.js +0 -10533
- package/chunk-bun-h3ggawd9.js.map +0 -32
- package/chunk-node-kc1sqq2a.js +0 -10532
- package/chunk-node-kc1sqq2a.js.map +0 -32
- package/chunk-node-tfvyz31s.js +0 -18844
- package/chunk-node-tfvyz31s.js.map +0 -63
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { BufferAccess } from "../buffer.js";
|
|
2
|
+
import type { NativeContextBufferLease, NativeContextHandle, RenderLib } from "../zig.js";
|
|
3
|
+
type BufferSnapshot = Omit<NativeContextBufferLease, "handle">;
|
|
4
|
+
export declare function withBufferAccess<T>(lib: RenderLib, context: NativeContextHandle, lease: NativeContextBufferLease, callback: (cells: BufferAccess) => T): T;
|
|
5
|
+
export declare function withLazyBufferAccess<T>(snapshot: BufferSnapshot | (() => BufferSnapshot), callback: (getCells: () => BufferAccess) => T, validate: () => void): T;
|
|
6
|
+
export {};
|
package/lib/clipboard.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type { RendererHandle, RenderLib } from "../zig.js";
|
|
2
1
|
export interface ClipboardRepresentation {
|
|
3
2
|
readonly mimeType: string;
|
|
4
3
|
readonly bytes: Uint8Array;
|
|
@@ -124,11 +123,3 @@ export interface RendererClipboardBoundary {
|
|
|
124
123
|
clearClipboardOSC52(target?: ClipboardTarget): boolean;
|
|
125
124
|
}
|
|
126
125
|
export declare const createRendererClipboardAdapter: (renderer: RendererClipboardBoundary) => TerminalClipboardAdapter;
|
|
127
|
-
export declare class Clipboard {
|
|
128
|
-
private lib;
|
|
129
|
-
private rendererPtr;
|
|
130
|
-
constructor(lib: RenderLib, rendererPtr: RendererHandle);
|
|
131
|
-
copyToClipboardOSC52(text: string, target?: ClipboardTarget): boolean;
|
|
132
|
-
clearClipboardOSC52(target?: ClipboardTarget): boolean;
|
|
133
|
-
isOsc52Supported(): boolean;
|
|
134
|
-
}
|
package/lib/extmarks.d.ts
CHANGED
|
@@ -53,8 +53,10 @@ export declare class ExtmarksController {
|
|
|
53
53
|
private originalNewLine;
|
|
54
54
|
private originalDeleteLine;
|
|
55
55
|
private originalEditorViewDeleteSelectedText;
|
|
56
|
+
private originalEditorViewReplaceSelectedText;
|
|
56
57
|
private originalUndo;
|
|
57
58
|
private originalRedo;
|
|
59
|
+
private readonly contentChangeListener;
|
|
58
60
|
constructor(editBuffer: EditBuffer, editorView: EditorView);
|
|
59
61
|
private wrapCursorMovement;
|
|
60
62
|
private wrapDeletion;
|
|
@@ -64,7 +66,7 @@ export declare class ExtmarksController {
|
|
|
64
66
|
private deleteExtmarkById;
|
|
65
67
|
private findVirtualExtmarkContaining;
|
|
66
68
|
private adjustExtmarksAfterInsertion;
|
|
67
|
-
adjustExtmarksAfterDeletion(deleteOffset: number, length: number): void;
|
|
69
|
+
adjustExtmarksAfterDeletion(deleteOffset: number, length: number, updateHighlights?: boolean): void;
|
|
68
70
|
private offsetToPosition;
|
|
69
71
|
private positionToOffset;
|
|
70
72
|
private getNextCursorOffset;
|
|
@@ -79,6 +81,7 @@ export declare class ExtmarksController {
|
|
|
79
81
|
getAllForTypeId(typeId: number): Extmark[];
|
|
80
82
|
clear(): void;
|
|
81
83
|
private saveSnapshot;
|
|
84
|
+
private snapshotExtmarks;
|
|
82
85
|
private restoreSnapshot;
|
|
83
86
|
private wrapUndoRedo;
|
|
84
87
|
registerType(typeName: string): number;
|
|
@@ -13,6 +13,15 @@ declare const _default: {
|
|
|
13
13
|
injections?: undefined;
|
|
14
14
|
};
|
|
15
15
|
injectionMapping?: undefined;
|
|
16
|
+
} | {
|
|
17
|
+
filetype: string;
|
|
18
|
+
wasm: string;
|
|
19
|
+
queries: {
|
|
20
|
+
highlights: string[];
|
|
21
|
+
injections?: undefined;
|
|
22
|
+
};
|
|
23
|
+
aliases?: undefined;
|
|
24
|
+
injectionMapping?: undefined;
|
|
16
25
|
} | {
|
|
17
26
|
filetype: string;
|
|
18
27
|
wasm: string;
|
|
@@ -39,15 +48,6 @@ declare const _default: {
|
|
|
39
48
|
};
|
|
40
49
|
};
|
|
41
50
|
aliases?: undefined;
|
|
42
|
-
} | {
|
|
43
|
-
filetype: string;
|
|
44
|
-
wasm: string;
|
|
45
|
-
queries: {
|
|
46
|
-
highlights: string[];
|
|
47
|
-
injections?: undefined;
|
|
48
|
-
};
|
|
49
|
-
aliases?: undefined;
|
|
50
|
-
injectionMapping?: undefined;
|
|
51
51
|
})[];
|
|
52
52
|
};
|
|
53
53
|
export default _default;
|