@opentui/core 0.1.86 → 0.1.88
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/ThreeRenderable.d.ts +4 -4
- package/3d/WGPURenderer.d.ts +4 -4
- package/3d/animation/ExplodingSpriteEffect.d.ts +2 -2
- package/3d/animation/PhysicsExplodingSpriteEffect.d.ts +3 -3
- package/3d/animation/SpriteAnimator.d.ts +1 -1
- package/3d/animation/SpriteParticleGenerator.d.ts +1 -1
- package/3d/canvas.d.ts +2 -2
- package/3d/index.d.ts +12 -12
- package/3d/physics/PlanckPhysicsAdapter.d.ts +1 -1
- package/3d/physics/RapierPhysicsAdapter.d.ts +1 -1
- package/3d.d.ts +1 -1
- package/3d.js +4 -3
- package/3d.js.map +15 -15
- package/Renderable.d.ts +7 -7
- package/animation/Timeline.d.ts +1 -1
- package/buffer.d.ts +6 -6
- package/console.d.ts +7 -4
- package/edit-buffer.d.ts +4 -4
- package/editor-view.d.ts +4 -4
- package/index-e4hzc2j2.js +113 -0
- package/index-e4hzc2j2.js.map +10 -0
- package/{index-4sjb8n0n.js → index-nkrr8a4c.js} +2476 -1743
- package/index-nkrr8a4c.js.map +64 -0
- package/index-nyw5p3ep.js +12619 -0
- package/index-nyw5p3ep.js.map +43 -0
- package/index.d.ts +20 -17
- package/index.js +83 -11490
- package/index.js.map +3 -34
- package/lib/KeyHandler.d.ts +8 -8
- package/lib/ascii.font.d.ts +2 -2
- package/lib/border.d.ts +1 -1
- package/lib/clipboard.d.ts +1 -1
- package/lib/clock.d.ts +15 -0
- package/lib/extmarks-history.d.ts +1 -1
- package/lib/extmarks.d.ts +2 -2
- package/lib/hast-styled-text.d.ts +3 -3
- package/lib/index.d.ts +21 -19
- package/lib/objects-in-viewport.d.ts +1 -1
- package/lib/parse.keypress-kitty.d.ts +1 -1
- package/lib/parse.mouse.d.ts +2 -2
- package/lib/paste.d.ts +7 -0
- package/lib/renderable.validations.d.ts +2 -2
- package/lib/selection.d.ts +2 -2
- package/lib/stdin-parser.d.ts +76 -0
- package/lib/styled-text.d.ts +2 -2
- package/lib/terminal-palette.d.ts +11 -4
- package/lib/tree-sitter/client.d.ts +1 -1
- package/lib/tree-sitter/default-parsers.d.ts +1 -1
- package/lib/tree-sitter/download-utils.d.ts +1 -1
- package/lib/tree-sitter/index.d.ts +7 -7
- package/lib/tree-sitter-styled-text.d.ts +5 -5
- package/package.json +17 -7
- package/parser.worker.js +7 -7
- package/parser.worker.js.map +4 -4
- package/plugins/core-slot.d.ts +72 -0
- package/plugins/registry.d.ts +38 -0
- package/plugins/types.d.ts +34 -0
- package/post/filters.d.ts +1 -1
- package/renderables/ASCIIFont.d.ts +6 -6
- package/renderables/Box.d.ts +5 -5
- package/renderables/Code.d.ts +10 -8
- package/renderables/Diff.d.ts +13 -6
- package/renderables/EditBufferRenderable.d.ts +8 -8
- package/renderables/FrameBuffer.d.ts +3 -3
- package/renderables/Input.d.ts +3 -3
- package/renderables/LineNumberRenderable.d.ts +4 -4
- package/renderables/Markdown.d.ts +9 -9
- package/renderables/ScrollBar.d.ts +6 -6
- package/renderables/ScrollBox.d.ts +9 -8
- package/renderables/Select.d.ts +7 -7
- package/renderables/Slider.d.ts +1 -1
- package/renderables/TabSelect.d.ts +6 -6
- package/renderables/Text.d.ts +7 -7
- package/renderables/TextBufferRenderable.d.ts +9 -9
- package/renderables/TextNode.d.ts +6 -6
- package/renderables/Textarea.d.ts +7 -7
- package/renderables/TimeToFirstDraw.d.ts +24 -0
- package/renderables/__tests__/renderable-test-utils.d.ts +8 -3
- package/renderables/composition/VRenderable.d.ts +3 -3
- package/renderables/composition/constructs.d.ts +14 -14
- package/renderables/composition/vnode.d.ts +2 -2
- package/renderables/index.d.ts +22 -21
- package/renderer.d.ts +26 -17
- package/runtime-plugin-support.d.ts +3 -0
- package/runtime-plugin-support.js +29 -0
- package/runtime-plugin-support.js.map +10 -0
- package/runtime-plugin.d.ts +11 -0
- package/runtime-plugin.js +16 -0
- package/runtime-plugin.js.map +9 -0
- package/syntax-style.d.ts +2 -2
- package/testing/manual-clock.d.ts +16 -0
- package/testing/mock-keys.d.ts +2 -1
- package/testing/mock-mouse.d.ts +1 -1
- package/testing/mock-tree-sitter-client.d.ts +2 -2
- package/testing/test-recorder.d.ts +1 -1
- package/testing/test-renderer.d.ts +4 -4
- package/testing.d.ts +6 -6
- package/testing.js +12 -7
- package/testing.js.map +7 -7
- package/text-buffer-view.d.ts +4 -4
- package/text-buffer.d.ts +5 -5
- package/types.d.ts +13 -8
- package/utils.d.ts +1 -1
- package/zig-structs.d.ts +7 -7
- package/zig.d.ts +6 -6
- package/index-4sjb8n0n.js.map +0 -62
- package/lib/stdin-buffer.d.ts +0 -44
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Renderable, type RenderableOptions } from "../Renderable";
|
|
2
|
-
import { OptimizedBuffer } from "../buffer";
|
|
3
|
-
import type { RenderContext, LineInfoProvider } from "../types";
|
|
4
|
-
import { RGBA } from "../lib/RGBA";
|
|
1
|
+
import { Renderable, type RenderableOptions } from "../Renderable.js";
|
|
2
|
+
import { OptimizedBuffer } from "../buffer.js";
|
|
3
|
+
import type { RenderContext, LineInfoProvider } from "../types.js";
|
|
4
|
+
import { RGBA } from "../lib/RGBA.js";
|
|
5
5
|
export interface LineSign {
|
|
6
6
|
before?: string;
|
|
7
7
|
beforeColor?: string | RGBA;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { Renderable, type RenderableOptions } from "../Renderable";
|
|
2
|
-
import { type RenderContext } from "../types";
|
|
3
|
-
import { SyntaxStyle } from "../syntax-style";
|
|
4
|
-
import type { BorderStyle } from "../lib/border";
|
|
5
|
-
import type { ColorInput } from "../lib/RGBA";
|
|
1
|
+
import { Renderable, type RenderableOptions } from "../Renderable.js";
|
|
2
|
+
import { type RenderContext } from "../types.js";
|
|
3
|
+
import { SyntaxStyle } from "../syntax-style.js";
|
|
4
|
+
import type { BorderStyle } from "../lib/border.js";
|
|
5
|
+
import type { ColorInput } from "../lib/RGBA.js";
|
|
6
6
|
import { type MarkedToken, type Token } from "marked";
|
|
7
|
-
import { type TextTableColumnFitter, type TextTableColumnWidthMode, type TextTableContent } from "./TextTable";
|
|
8
|
-
import type { TreeSitterClient } from "../lib/tree-sitter";
|
|
9
|
-
import { type ParseState } from "./markdown-parser";
|
|
10
|
-
import type { OptimizedBuffer } from "../buffer";
|
|
7
|
+
import { type TextTableColumnFitter, type TextTableColumnWidthMode, type TextTableContent } from "./TextTable.js";
|
|
8
|
+
import type { TreeSitterClient } from "../lib/tree-sitter/index.js";
|
|
9
|
+
import { type ParseState } from "./markdown-parser.js";
|
|
10
|
+
import type { OptimizedBuffer } from "../buffer.js";
|
|
11
11
|
export interface MarkdownTableOptions {
|
|
12
12
|
/**
|
|
13
13
|
* Strategy for sizing table columns.
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import type { OptimizedBuffer } from "../buffer";
|
|
2
|
-
import { RGBA, type ColorInput } from "../lib";
|
|
3
|
-
import type { KeyEvent } from "../lib/KeyHandler";
|
|
4
|
-
import { Renderable, type RenderableOptions } from "../Renderable";
|
|
5
|
-
import type { RenderContext } from "../types";
|
|
6
|
-
import { SliderRenderable, type SliderOptions } from "./Slider";
|
|
1
|
+
import type { OptimizedBuffer } from "../buffer.js";
|
|
2
|
+
import { RGBA, type ColorInput } from "../lib/index.js";
|
|
3
|
+
import type { KeyEvent } from "../lib/KeyHandler.js";
|
|
4
|
+
import { Renderable, type RenderableOptions } from "../Renderable.js";
|
|
5
|
+
import type { RenderContext } from "../types.js";
|
|
6
|
+
import { SliderRenderable, type SliderOptions } from "./Slider.js";
|
|
7
7
|
export interface ScrollBarOptions extends RenderableOptions<ScrollBarRenderable> {
|
|
8
8
|
orientation: "vertical" | "horizontal";
|
|
9
9
|
showArrows?: boolean;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { type KeyEvent } from "../lib";
|
|
2
|
-
import { type ScrollAcceleration } from "../lib/scroll-acceleration";
|
|
3
|
-
import type { Renderable, RenderableOptions } from "../Renderable";
|
|
4
|
-
import type { MouseEvent } from "../renderer";
|
|
5
|
-
import type { RenderContext } from "../types";
|
|
6
|
-
import { BoxRenderable, type BoxOptions } from "./Box";
|
|
7
|
-
import type { VNode } from "./composition/vnode";
|
|
8
|
-
import { ScrollBarRenderable, type ScrollBarOptions, type ScrollUnit } from "./ScrollBar";
|
|
1
|
+
import { type KeyEvent } from "../lib/index.js";
|
|
2
|
+
import { type ScrollAcceleration } from "../lib/scroll-acceleration.js";
|
|
3
|
+
import type { Renderable, RenderableOptions } from "../Renderable.js";
|
|
4
|
+
import type { MouseEvent } from "../renderer.js";
|
|
5
|
+
import type { RenderContext } from "../types.js";
|
|
6
|
+
import { BoxRenderable, type BoxOptions } from "./Box.js";
|
|
7
|
+
import type { VNode } from "./composition/vnode.js";
|
|
8
|
+
import { ScrollBarRenderable, type ScrollBarOptions, type ScrollUnit } from "./ScrollBar.js";
|
|
9
9
|
declare class ContentRenderable extends BoxRenderable {
|
|
10
10
|
private viewport;
|
|
11
11
|
private _viewportCulling;
|
|
@@ -79,6 +79,7 @@ export declare class ScrollBoxRenderable extends BoxRenderable {
|
|
|
79
79
|
x: number;
|
|
80
80
|
y: number;
|
|
81
81
|
}, unit?: ScrollUnit): void;
|
|
82
|
+
scrollChildIntoView(childId: string): void;
|
|
82
83
|
scrollTo(position: number | {
|
|
83
84
|
x: number;
|
|
84
85
|
y: number;
|
package/renderables/Select.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { OptimizedBuffer } from "../buffer";
|
|
2
|
-
import { fonts } from "../lib/ascii.font";
|
|
3
|
-
import type { KeyEvent } from "../lib/KeyHandler";
|
|
4
|
-
import { type ColorInput } from "../lib/RGBA";
|
|
5
|
-
import { Renderable, type RenderableOptions } from "../Renderable";
|
|
6
|
-
import type { RenderContext } from "../types";
|
|
7
|
-
import { type KeyBinding as BaseKeyBinding, type KeyAliasMap } from "../lib/keymapping";
|
|
1
|
+
import { OptimizedBuffer } from "../buffer.js";
|
|
2
|
+
import { fonts } from "../lib/ascii.font.js";
|
|
3
|
+
import type { KeyEvent } from "../lib/KeyHandler.js";
|
|
4
|
+
import { type ColorInput } from "../lib/RGBA.js";
|
|
5
|
+
import { Renderable, type RenderableOptions } from "../Renderable.js";
|
|
6
|
+
import type { RenderContext } from "../types.js";
|
|
7
|
+
import { type KeyBinding as BaseKeyBinding, type KeyAliasMap } from "../lib/keymapping.js";
|
|
8
8
|
export interface SelectOption {
|
|
9
9
|
name: string;
|
|
10
10
|
description: string;
|
package/renderables/Slider.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type ColorInput, OptimizedBuffer, Renderable, type RenderableOptions, type RenderContext, RGBA } from "../index";
|
|
1
|
+
import { type ColorInput, OptimizedBuffer, Renderable, type RenderableOptions, type RenderContext, RGBA } from "../index.js";
|
|
2
2
|
export interface SliderOptions extends RenderableOptions<SliderRenderable> {
|
|
3
3
|
orientation: "vertical" | "horizontal";
|
|
4
4
|
value?: number;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { Renderable, type RenderableOptions } from "../Renderable";
|
|
2
|
-
import { OptimizedBuffer } from "../buffer";
|
|
3
|
-
import { type ColorInput } from "../lib/RGBA";
|
|
4
|
-
import type { KeyEvent } from "../lib/KeyHandler";
|
|
5
|
-
import type { RenderContext } from "../types";
|
|
6
|
-
import { type KeyBinding as BaseKeyBinding, type KeyAliasMap } from "../lib/keymapping";
|
|
1
|
+
import { Renderable, type RenderableOptions } from "../Renderable.js";
|
|
2
|
+
import { OptimizedBuffer } from "../buffer.js";
|
|
3
|
+
import { type ColorInput } from "../lib/RGBA.js";
|
|
4
|
+
import type { KeyEvent } from "../lib/KeyHandler.js";
|
|
5
|
+
import type { RenderContext } from "../types.js";
|
|
6
|
+
import { type KeyBinding as BaseKeyBinding, type KeyAliasMap } from "../lib/keymapping.js";
|
|
7
7
|
export interface TabSelectOption {
|
|
8
8
|
name: string;
|
|
9
9
|
description: string;
|
package/renderables/Text.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { BaseRenderable } from "../Renderable";
|
|
2
|
-
import { StyledText } from "../lib/styled-text";
|
|
3
|
-
import { type TextChunk } from "../text-buffer";
|
|
4
|
-
import { RGBA } from "../lib/RGBA";
|
|
5
|
-
import { type RenderContext } from "../types";
|
|
6
|
-
import { RootTextNodeRenderable, TextNodeRenderable } from "./TextNode";
|
|
7
|
-
import { TextBufferRenderable, type TextBufferOptions } from "./TextBufferRenderable";
|
|
1
|
+
import { BaseRenderable } from "../Renderable.js";
|
|
2
|
+
import { StyledText } from "../lib/styled-text.js";
|
|
3
|
+
import { type TextChunk } from "../text-buffer.js";
|
|
4
|
+
import { RGBA } from "../lib/RGBA.js";
|
|
5
|
+
import { type RenderContext } from "../types.js";
|
|
6
|
+
import { RootTextNodeRenderable, TextNodeRenderable } from "./TextNode.js";
|
|
7
|
+
import { TextBufferRenderable, type TextBufferOptions } from "./TextBufferRenderable.js";
|
|
8
8
|
export interface TextOptions extends TextBufferOptions {
|
|
9
9
|
content?: StyledText | string;
|
|
10
10
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { Renderable, type RenderableOptions } from "../Renderable";
|
|
2
|
-
import { Selection, type LocalSelectionBounds } from "../lib/selection";
|
|
3
|
-
import { TextBuffer } from "../text-buffer";
|
|
4
|
-
import { TextBufferView } from "../text-buffer-view";
|
|
5
|
-
import { RGBA } from "../lib/RGBA";
|
|
6
|
-
import { type RenderContext, type LineInfoProvider } from "../types";
|
|
7
|
-
import type { OptimizedBuffer } from "../buffer";
|
|
8
|
-
import type { LineInfo } from "../zig";
|
|
9
|
-
import { SyntaxStyle } from "../syntax-style";
|
|
1
|
+
import { Renderable, type RenderableOptions } from "../Renderable.js";
|
|
2
|
+
import { Selection, type LocalSelectionBounds } from "../lib/selection.js";
|
|
3
|
+
import { TextBuffer } from "../text-buffer.js";
|
|
4
|
+
import { TextBufferView } from "../text-buffer-view.js";
|
|
5
|
+
import { RGBA } from "../lib/RGBA.js";
|
|
6
|
+
import { type RenderContext, type LineInfoProvider } from "../types.js";
|
|
7
|
+
import type { OptimizedBuffer } from "../buffer.js";
|
|
8
|
+
import type { LineInfo } from "../zig.js";
|
|
9
|
+
import { SyntaxStyle } from "../syntax-style.js";
|
|
10
10
|
export interface TextBufferOptions extends RenderableOptions<TextBufferRenderable> {
|
|
11
11
|
fg?: string | RGBA;
|
|
12
12
|
bg?: string | RGBA;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import type { TextRenderable } from ".";
|
|
2
|
-
import { BaseRenderable, type BaseRenderableOptions } from "../Renderable";
|
|
3
|
-
import { RGBA } from "../lib/RGBA";
|
|
4
|
-
import { StyledText } from "../lib/styled-text";
|
|
5
|
-
import { type TextChunk } from "../text-buffer";
|
|
6
|
-
import type { RenderContext } from "../types";
|
|
1
|
+
import type { TextRenderable } from "./index.js";
|
|
2
|
+
import { BaseRenderable, type BaseRenderableOptions } from "../Renderable.js";
|
|
3
|
+
import { RGBA } from "../lib/RGBA.js";
|
|
4
|
+
import { StyledText } from "../lib/styled-text.js";
|
|
5
|
+
import { type TextChunk } from "../text-buffer.js";
|
|
6
|
+
import type { RenderContext } from "../types.js";
|
|
7
7
|
export interface TextNodeOptions extends BaseRenderableOptions {
|
|
8
8
|
fg?: string | RGBA;
|
|
9
9
|
bg?: string | RGBA;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import { type KeyBinding as BaseKeyBinding, type KeyAliasMap } from "../lib/keymapping";
|
|
6
|
-
import { type StyledText } from "../lib/styled-text";
|
|
7
|
-
import type { ExtmarksController } from "../lib/extmarks";
|
|
1
|
+
import type { KeyEvent, PasteEvent } from "../lib/KeyHandler.js";
|
|
2
|
+
import { RGBA, type ColorInput } from "../lib/RGBA.js";
|
|
3
|
+
import { type RenderContext } from "../types.js";
|
|
4
|
+
import { EditBufferRenderable, type EditBufferOptions } from "./EditBufferRenderable.js";
|
|
5
|
+
import { type KeyBinding as BaseKeyBinding, type KeyAliasMap } from "../lib/keymapping.js";
|
|
6
|
+
import { type StyledText } from "../lib/styled-text.js";
|
|
7
|
+
import type { ExtmarksController } from "../lib/extmarks.js";
|
|
8
8
|
export type TextareaAction = "move-left" | "move-right" | "move-up" | "move-down" | "select-left" | "select-right" | "select-up" | "select-down" | "line-home" | "line-end" | "select-line-home" | "select-line-end" | "visual-line-home" | "visual-line-end" | "select-visual-line-home" | "select-visual-line-end" | "buffer-home" | "buffer-end" | "select-buffer-home" | "select-buffer-end" | "delete-line" | "delete-to-line-end" | "delete-to-line-start" | "backspace" | "delete" | "newline" | "undo" | "redo" | "word-forward" | "word-backward" | "select-word-forward" | "select-word-backward" | "delete-word-forward" | "delete-word-backward" | "select-all" | "submit";
|
|
9
9
|
export type KeyBinding = BaseKeyBinding<TextareaAction>;
|
|
10
10
|
export interface SubmitEvent {
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { OptimizedBuffer } from "../buffer";
|
|
2
|
+
import { type ColorInput } from "../lib/RGBA";
|
|
3
|
+
import { Renderable, type RenderableOptions } from "../Renderable";
|
|
4
|
+
import type { RenderContext } from "../types";
|
|
5
|
+
export interface TimeToFirstDrawOptions extends RenderableOptions<TimeToFirstDrawRenderable> {
|
|
6
|
+
fg?: ColorInput;
|
|
7
|
+
label?: string;
|
|
8
|
+
precision?: number;
|
|
9
|
+
}
|
|
10
|
+
export declare class TimeToFirstDrawRenderable extends Renderable {
|
|
11
|
+
private _runtimeMs;
|
|
12
|
+
private textColor;
|
|
13
|
+
private label;
|
|
14
|
+
private precision;
|
|
15
|
+
constructor(ctx: RenderContext, options?: TimeToFirstDrawOptions);
|
|
16
|
+
get runtimeMs(): number | null;
|
|
17
|
+
set fg(value: ColorInput);
|
|
18
|
+
set color(value: ColorInput);
|
|
19
|
+
set textLabel(value: string);
|
|
20
|
+
set decimals(value: number);
|
|
21
|
+
reset(): void;
|
|
22
|
+
protected renderSelf(buffer: OptimizedBuffer): void;
|
|
23
|
+
private normalizePrecision;
|
|
24
|
+
}
|
|
@@ -1,7 +1,12 @@
|
|
|
1
|
-
import { TextareaRenderable } from "../Textarea";
|
|
2
|
-
import { type TestRenderer } from "../../testing/test-renderer";
|
|
3
|
-
import { type TextareaOptions } from "../Textarea";
|
|
1
|
+
import { TextareaRenderable } from "../Textarea.js";
|
|
2
|
+
import { type TestRenderer } from "../../testing/test-renderer.js";
|
|
3
|
+
import { type TextareaOptions } from "../Textarea.js";
|
|
4
|
+
import type { DiffRenderable } from "../Diff.js";
|
|
5
|
+
import type { MockTreeSitterClient } from "../../testing/mock-tree-sitter-client.js";
|
|
6
|
+
import type { ManualClock } from "../../testing/manual-clock.js";
|
|
4
7
|
export declare function createTextareaRenderable(renderer: TestRenderer, renderOnce: () => Promise<void>, options: TextareaOptions): Promise<{
|
|
5
8
|
textarea: TextareaRenderable;
|
|
6
9
|
root: any;
|
|
7
10
|
}>;
|
|
11
|
+
export declare function settleDiffHighlighting(diff: DiffRenderable, client: MockTreeSitterClient, render: () => Promise<void>): Promise<void>;
|
|
12
|
+
export declare function simulateFrames(clock: ManualClock, renderOnce: () => Promise<void>, ms: number, frameInterval?: number): Promise<void>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Renderable, type RenderableOptions } from "../../Renderable";
|
|
2
|
-
import type { OptimizedBuffer } from "../../buffer";
|
|
3
|
-
import type { RenderContext } from "../../types";
|
|
1
|
+
import { Renderable, type RenderableOptions } from "../../Renderable.js";
|
|
2
|
+
import type { OptimizedBuffer } from "../../buffer.js";
|
|
3
|
+
import type { RenderContext } from "../../types.js";
|
|
4
4
|
export interface VRenderableOptions extends RenderableOptions<VRenderable> {
|
|
5
5
|
render?: (this: VRenderable | VRenderableOptions, buffer: OptimizedBuffer, deltaTime: number, renderable: VRenderable) => void;
|
|
6
6
|
}
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { ASCIIFontRenderable, BoxRenderable, CodeRenderable, InputRenderable, ScrollBoxRenderable, SelectRenderable, TabSelectRenderable, TextRenderable, VRenderable, FrameBufferRenderable, type ASCIIFontOptions, type BoxOptions, type CodeOptions, type TextOptions, type VRenderableOptions, type InputRenderableOptions, type ScrollBoxOptions, type SelectRenderableOptions, type TabSelectRenderableOptions, type FrameBufferOptions } from "
|
|
2
|
-
import { TextNodeRenderable } from "../TextNode";
|
|
3
|
-
import { type VChild } from "./vnode";
|
|
4
|
-
import type { RGBA } from "../../lib/RGBA";
|
|
5
|
-
export declare function Generic(props?: VRenderableOptions, ...children: VChild[]): import("./vnode").ProxiedVNode<typeof VRenderable>;
|
|
6
|
-
export declare function Box(props?: BoxOptions, ...children: VChild[]): import("./vnode").ProxiedVNode<typeof BoxRenderable>;
|
|
1
|
+
import { ASCIIFontRenderable, BoxRenderable, CodeRenderable, InputRenderable, ScrollBoxRenderable, SelectRenderable, TabSelectRenderable, TextRenderable, VRenderable, FrameBufferRenderable, type ASCIIFontOptions, type BoxOptions, type CodeOptions, type TextOptions, type VRenderableOptions, type InputRenderableOptions, type ScrollBoxOptions, type SelectRenderableOptions, type TabSelectRenderableOptions, type FrameBufferOptions } from "..//index.js";
|
|
2
|
+
import { TextNodeRenderable } from "../TextNode.js";
|
|
3
|
+
import { type VChild } from "./vnode.js";
|
|
4
|
+
import type { RGBA } from "../../lib/RGBA.js";
|
|
5
|
+
export declare function Generic(props?: VRenderableOptions, ...children: VChild[]): import("./vnode.js").ProxiedVNode<typeof VRenderable>;
|
|
6
|
+
export declare function Box(props?: BoxOptions, ...children: VChild[]): import("./vnode.js").ProxiedVNode<typeof BoxRenderable>;
|
|
7
7
|
export declare function Text(props?: TextOptions & {
|
|
8
8
|
content?: any;
|
|
9
|
-
}, ...children: VChild[] | TextNodeRenderable[]): import("./vnode").ProxiedVNode<typeof TextRenderable>;
|
|
10
|
-
export declare function ASCIIFont(props?: ASCIIFontOptions, ...children: VChild[]): import("./vnode").ProxiedVNode<typeof ASCIIFontRenderable>;
|
|
11
|
-
export declare function Input(props?: InputRenderableOptions, ...children: VChild[]): import("./vnode").ProxiedVNode<typeof InputRenderable>;
|
|
12
|
-
export declare function Select(props?: SelectRenderableOptions, ...children: VChild[]): import("./vnode").ProxiedVNode<typeof SelectRenderable>;
|
|
13
|
-
export declare function TabSelect(props?: TabSelectRenderableOptions, ...children: VChild[]): import("./vnode").ProxiedVNode<typeof TabSelectRenderable>;
|
|
14
|
-
export declare function FrameBuffer(props: FrameBufferOptions, ...children: VChild[]): import("./vnode").ProxiedVNode<typeof FrameBufferRenderable>;
|
|
15
|
-
export declare function Code(props: CodeOptions, ...children: VChild[]): import("./vnode").ProxiedVNode<typeof CodeRenderable>;
|
|
16
|
-
export declare function ScrollBox(props?: ScrollBoxOptions, ...children: VChild[]): import("./vnode").ProxiedVNode<typeof ScrollBoxRenderable>;
|
|
9
|
+
}, ...children: VChild[] | TextNodeRenderable[]): import("./vnode.js").ProxiedVNode<typeof TextRenderable>;
|
|
10
|
+
export declare function ASCIIFont(props?: ASCIIFontOptions, ...children: VChild[]): import("./vnode.js").ProxiedVNode<typeof ASCIIFontRenderable>;
|
|
11
|
+
export declare function Input(props?: InputRenderableOptions, ...children: VChild[]): import("./vnode.js").ProxiedVNode<typeof InputRenderable>;
|
|
12
|
+
export declare function Select(props?: SelectRenderableOptions, ...children: VChild[]): import("./vnode.js").ProxiedVNode<typeof SelectRenderable>;
|
|
13
|
+
export declare function TabSelect(props?: TabSelectRenderableOptions, ...children: VChild[]): import("./vnode.js").ProxiedVNode<typeof TabSelectRenderable>;
|
|
14
|
+
export declare function FrameBuffer(props: FrameBufferOptions, ...children: VChild[]): import("./vnode.js").ProxiedVNode<typeof FrameBufferRenderable>;
|
|
15
|
+
export declare function Code(props: CodeOptions, ...children: VChild[]): import("./vnode.js").ProxiedVNode<typeof CodeRenderable>;
|
|
16
|
+
export declare function ScrollBox(props?: ScrollBoxOptions, ...children: VChild[]): import("./vnode.js").ProxiedVNode<typeof ScrollBoxRenderable>;
|
|
17
17
|
export declare const vstyles: {
|
|
18
18
|
bold: (...children: (string | TextNodeRenderable)[]) => TextNodeRenderable;
|
|
19
19
|
italic: (...children: (string | TextNodeRenderable)[]) => TextNodeRenderable;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Renderable, type RenderableOptions } from "../../Renderable";
|
|
2
|
-
import type { RenderContext } from "../../types";
|
|
1
|
+
import { Renderable, type RenderableOptions } from "../../Renderable.js";
|
|
2
|
+
import type { RenderContext } from "../../types.js";
|
|
3
3
|
export type VChild = VNode | Renderable | VChild[] | null | undefined | false;
|
|
4
4
|
export interface PendingCall {
|
|
5
5
|
method: string;
|
package/renderables/index.d.ts
CHANGED
|
@@ -1,21 +1,22 @@
|
|
|
1
|
-
export * from "./ASCIIFont";
|
|
2
|
-
export * from "./Box";
|
|
3
|
-
export * from "./Code";
|
|
4
|
-
export * from "./composition/constructs";
|
|
5
|
-
export * from "./composition/VRenderable";
|
|
6
|
-
export * from "./composition/vnode";
|
|
7
|
-
export * from "./Diff";
|
|
8
|
-
export * from "./FrameBuffer";
|
|
9
|
-
export * from "./Input";
|
|
10
|
-
export * from "./LineNumberRenderable";
|
|
11
|
-
export * from "./Markdown";
|
|
12
|
-
export * from "./ScrollBar";
|
|
13
|
-
export * from "./ScrollBox";
|
|
14
|
-
export * from "./Select";
|
|
15
|
-
export * from "./Slider";
|
|
16
|
-
export * from "./TextTable";
|
|
17
|
-
export * from "./TabSelect";
|
|
18
|
-
export * from "./Text";
|
|
19
|
-
export * from "./
|
|
20
|
-
export * from "./
|
|
21
|
-
export * from "./
|
|
1
|
+
export * from "./ASCIIFont.js";
|
|
2
|
+
export * from "./Box.js";
|
|
3
|
+
export * from "./Code.js";
|
|
4
|
+
export * from "./composition/constructs.js";
|
|
5
|
+
export * from "./composition/VRenderable.js";
|
|
6
|
+
export * from "./composition/vnode.js";
|
|
7
|
+
export * from "./Diff.js";
|
|
8
|
+
export * from "./FrameBuffer.js";
|
|
9
|
+
export * from "./Input.js";
|
|
10
|
+
export * from "./LineNumberRenderable.js";
|
|
11
|
+
export * from "./Markdown.js";
|
|
12
|
+
export * from "./ScrollBar.js";
|
|
13
|
+
export * from "./ScrollBox.js";
|
|
14
|
+
export * from "./Select.js";
|
|
15
|
+
export * from "./Slider.js";
|
|
16
|
+
export * from "./TextTable.js";
|
|
17
|
+
export * from "./TabSelect.js";
|
|
18
|
+
export * from "./Text.js";
|
|
19
|
+
export * from "./TimeToFirstDraw.js";
|
|
20
|
+
export * from "./TextBufferRenderable.js";
|
|
21
|
+
export * from "./TextNode.js";
|
|
22
|
+
export * from "./Textarea.js";
|
package/renderer.d.ts
CHANGED
|
@@ -1,16 +1,17 @@
|
|
|
1
|
-
import { Renderable, RootRenderable } from "./Renderable";
|
|
2
|
-
import { DebugOverlayCorner, type CursorStyleOptions, type MousePointerStyle, type RenderContext, type ThemeMode, type WidthMethod } from "./types";
|
|
3
|
-
import { RGBA, type ColorInput } from "./lib/RGBA";
|
|
1
|
+
import { Renderable, RootRenderable } from "./Renderable.js";
|
|
2
|
+
import { DebugOverlayCorner, type CursorStyleOptions, type MousePointerStyle, type RenderContext, type ThemeMode, type WidthMethod } from "./types.js";
|
|
3
|
+
import { RGBA, type ColorInput } from "./lib/RGBA.js";
|
|
4
4
|
import type { Pointer } from "bun:ffi";
|
|
5
|
-
import { OptimizedBuffer } from "./buffer";
|
|
6
|
-
import { type RenderLib } from "./zig";
|
|
7
|
-
import { TerminalConsole, type ConsoleOptions } from "./console";
|
|
8
|
-
import { type MouseEventType, type RawMouseEvent, type ScrollInfo } from "./lib/parse.mouse";
|
|
9
|
-
import { Selection } from "./lib/selection";
|
|
10
|
-
import { type ClipboardTarget } from "./lib/clipboard";
|
|
5
|
+
import { OptimizedBuffer } from "./buffer.js";
|
|
6
|
+
import { type RenderLib } from "./zig.js";
|
|
7
|
+
import { TerminalConsole, type ConsoleOptions } from "./console.js";
|
|
8
|
+
import { type MouseEventType, type RawMouseEvent, type ScrollInfo } from "./lib/parse.mouse.js";
|
|
9
|
+
import { Selection } from "./lib/selection.js";
|
|
10
|
+
import { type ClipboardTarget } from "./lib/clipboard.js";
|
|
11
11
|
import { EventEmitter } from "events";
|
|
12
|
-
import { KeyHandler, InternalKeyHandler } from "./lib/KeyHandler";
|
|
13
|
-
import { type TerminalColors, type GetPaletteOptions } from "./lib/terminal-palette";
|
|
12
|
+
import { KeyHandler, InternalKeyHandler } from "./lib/KeyHandler.js";
|
|
13
|
+
import { type TerminalColors, type GetPaletteOptions } from "./lib/terminal-palette.js";
|
|
14
|
+
import { type Clock } from "./lib/clock.js";
|
|
14
15
|
export interface CliRendererConfig {
|
|
15
16
|
stdin?: NodeJS.ReadStream;
|
|
16
17
|
stdout?: NodeJS.WriteStream;
|
|
@@ -26,7 +27,7 @@ export interface CliRendererConfig {
|
|
|
26
27
|
useThread?: boolean;
|
|
27
28
|
gatherStats?: boolean;
|
|
28
29
|
maxStatSamples?: number;
|
|
29
|
-
consoleOptions?: ConsoleOptions
|
|
30
|
+
consoleOptions?: Omit<ConsoleOptions, "clock">;
|
|
30
31
|
postProcessFns?: ((buffer: OptimizedBuffer, deltaTime: number) => void)[];
|
|
31
32
|
enableMouseMovement?: boolean;
|
|
32
33
|
useMouse?: boolean;
|
|
@@ -38,6 +39,8 @@ export interface CliRendererConfig {
|
|
|
38
39
|
backgroundColor?: ColorInput;
|
|
39
40
|
openConsoleOnError?: boolean;
|
|
40
41
|
prependInputHandlers?: ((sequence: string) => boolean)[];
|
|
42
|
+
stdinParserMaxBufferBytes?: number;
|
|
43
|
+
clock?: Clock;
|
|
41
44
|
onDestroy?: () => void;
|
|
42
45
|
}
|
|
43
46
|
export type PixelResolution = {
|
|
@@ -143,6 +146,7 @@ export declare class CliRenderer extends EventEmitter implements RenderContext {
|
|
|
143
146
|
private postProcessFns;
|
|
144
147
|
private backgroundColor;
|
|
145
148
|
private waitingForPixelResolution;
|
|
149
|
+
private readonly clock;
|
|
146
150
|
private rendering;
|
|
147
151
|
private renderingNative;
|
|
148
152
|
private renderTimeout;
|
|
@@ -165,7 +169,9 @@ export declare class CliRenderer extends EventEmitter implements RenderContext {
|
|
|
165
169
|
private _console;
|
|
166
170
|
private _resolution;
|
|
167
171
|
private _keyHandler;
|
|
168
|
-
private
|
|
172
|
+
private stdinParser;
|
|
173
|
+
private readonly oscSubscribers;
|
|
174
|
+
private hasLoggedStdinParserError;
|
|
169
175
|
private animationRequest;
|
|
170
176
|
private resizeTimeoutId;
|
|
171
177
|
private capabilityTimeoutId;
|
|
@@ -190,7 +196,6 @@ export declare class CliRenderer extends EventEmitter implements RenderContext {
|
|
|
190
196
|
private realStdoutWrite;
|
|
191
197
|
private captureCallback;
|
|
192
198
|
private _useConsole;
|
|
193
|
-
private mouseParser;
|
|
194
199
|
private sigwinchHandler;
|
|
195
200
|
private _capabilities;
|
|
196
201
|
private _latestPointer;
|
|
@@ -205,7 +210,7 @@ export declare class CliRenderer extends EventEmitter implements RenderContext {
|
|
|
205
210
|
private _paletteDetectionPromise;
|
|
206
211
|
private _onDestroy?;
|
|
207
212
|
private _themeMode;
|
|
208
|
-
private
|
|
213
|
+
private sequenceHandlers;
|
|
209
214
|
private prependedInputHandlers;
|
|
210
215
|
private shouldRestoreModesOnNextFocus;
|
|
211
216
|
private idleResolvers;
|
|
@@ -274,12 +279,16 @@ export declare class CliRenderer extends EventEmitter implements RenderContext {
|
|
|
274
279
|
addInputHandler(handler: (sequence: string) => boolean): void;
|
|
275
280
|
prependInputHandler(handler: (sequence: string) => boolean): void;
|
|
276
281
|
removeInputHandler(handler: (sequence: string) => boolean): void;
|
|
282
|
+
subscribeOsc(handler: (sequence: string) => void): () => void;
|
|
277
283
|
private capabilityHandler;
|
|
278
284
|
private focusHandler;
|
|
279
285
|
private themeModeHandler;
|
|
286
|
+
private dispatchSequenceHandlers;
|
|
287
|
+
private drainStdinParser;
|
|
288
|
+
private handleStdinEvent;
|
|
289
|
+
private handleStdinParserFailure;
|
|
280
290
|
private setupInput;
|
|
281
291
|
private dispatchMouseEvent;
|
|
282
|
-
private handleMouseData;
|
|
283
292
|
private processSingleMouseEvent;
|
|
284
293
|
/**
|
|
285
294
|
* Recheck hover state after hit grid changes.
|
|
@@ -315,7 +324,7 @@ export declare class CliRenderer extends EventEmitter implements RenderContext {
|
|
|
315
324
|
setCursorPosition(x: number, y: number, visible?: boolean): void;
|
|
316
325
|
setCursorStyle(options: CursorStyleOptions): void;
|
|
317
326
|
setCursorColor(color: RGBA): void;
|
|
318
|
-
getCursorState(): import("./zig").CursorState;
|
|
327
|
+
getCursorState(): import("./zig.js").CursorState;
|
|
319
328
|
addPostProcessFn(processFn: (buffer: OptimizedBuffer, deltaTime: number) => void): void;
|
|
320
329
|
removePostProcessFn(processFn: (buffer: OptimizedBuffer, deltaTime: number) => void): void;
|
|
321
330
|
clearPostProcessFns(): void;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { createRuntimePlugin, runtimeModuleIdForSpecifier, type CreateRuntimePluginOptions, type RuntimeModuleEntry, type RuntimeModuleExports, type RuntimeModuleLoader } from "./runtime-plugin";
|
|
2
|
+
export declare function ensureRuntimePluginSupport(options?: CreateRuntimePluginOptions): boolean;
|
|
3
|
+
export { createRuntimePlugin, runtimeModuleIdForSpecifier, type CreateRuntimePluginOptions, type RuntimeModuleEntry, type RuntimeModuleExports, type RuntimeModuleLoader, };
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import {
|
|
3
|
+
createRuntimePlugin,
|
|
4
|
+
runtimeModuleIdForSpecifier
|
|
5
|
+
} from "./index-e4hzc2j2.js";
|
|
6
|
+
import"./index-nyw5p3ep.js";
|
|
7
|
+
import"./index-nkrr8a4c.js";
|
|
8
|
+
|
|
9
|
+
// src/runtime-plugin-support.ts
|
|
10
|
+
var {plugin: registerBunPlugin } = globalThis.Bun;
|
|
11
|
+
var runtimePluginSupportInstalledKey = "__opentuiCoreRuntimePluginSupportInstalled__";
|
|
12
|
+
function ensureRuntimePluginSupport(options = {}) {
|
|
13
|
+
const state = globalThis;
|
|
14
|
+
if (state[runtimePluginSupportInstalledKey]) {
|
|
15
|
+
return false;
|
|
16
|
+
}
|
|
17
|
+
registerBunPlugin(createRuntimePlugin(options));
|
|
18
|
+
state[runtimePluginSupportInstalledKey] = true;
|
|
19
|
+
return true;
|
|
20
|
+
}
|
|
21
|
+
ensureRuntimePluginSupport();
|
|
22
|
+
export {
|
|
23
|
+
runtimeModuleIdForSpecifier,
|
|
24
|
+
ensureRuntimePluginSupport,
|
|
25
|
+
createRuntimePlugin
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
//# debugId=7487C2BFD13C698664756E2164756E21
|
|
29
|
+
//# sourceMappingURL=runtime-plugin-support.js.map
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../src/runtime-plugin-support.ts"],
|
|
4
|
+
"sourcesContent": [
|
|
5
|
+
"import { plugin as registerBunPlugin } from \"bun\"\nimport {\n createRuntimePlugin,\n runtimeModuleIdForSpecifier,\n type CreateRuntimePluginOptions,\n type RuntimeModuleEntry,\n type RuntimeModuleExports,\n type RuntimeModuleLoader,\n} from \"./runtime-plugin\"\n\nconst runtimePluginSupportInstalledKey = \"__opentuiCoreRuntimePluginSupportInstalled__\"\n\ntype RuntimePluginSupportState = typeof globalThis & {\n [runtimePluginSupportInstalledKey]?: boolean\n}\n\nexport function ensureRuntimePluginSupport(options: CreateRuntimePluginOptions = {}): boolean {\n const state = globalThis as RuntimePluginSupportState\n\n if (state[runtimePluginSupportInstalledKey]) {\n return false\n }\n\n registerBunPlugin(createRuntimePlugin(options))\n\n state[runtimePluginSupportInstalledKey] = true\n return true\n}\n\nensureRuntimePluginSupport()\n\nexport {\n createRuntimePlugin,\n runtimeModuleIdForSpecifier,\n type CreateRuntimePluginOptions,\n type RuntimeModuleEntry,\n type RuntimeModuleExports,\n type RuntimeModuleLoader,\n}\n"
|
|
6
|
+
],
|
|
7
|
+
"mappings": ";;;;;;;;;AAAA;AAUA,IAAM,mCAAmC;AAMlC,SAAS,0BAA0B,CAAC,UAAsC,CAAC,GAAY;AAAA,EAC5F,MAAM,QAAQ;AAAA,EAEd,IAAI,MAAM,mCAAmC;AAAA,IAC3C,OAAO;AAAA,EACT;AAAA,EAEA,kBAAkB,oBAAoB,OAAO,CAAC;AAAA,EAE9C,MAAM,oCAAoC;AAAA,EAC1C,OAAO;AAAA;AAGT,2BAA2B;",
|
|
8
|
+
"debugId": "7487C2BFD13C698664756E2164756E21",
|
|
9
|
+
"names": []
|
|
10
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type BunPlugin } from "bun";
|
|
2
|
+
export type RuntimeModuleExports = Record<string, unknown>;
|
|
3
|
+
export type RuntimeModuleLoader = () => RuntimeModuleExports | Promise<RuntimeModuleExports>;
|
|
4
|
+
export type RuntimeModuleEntry = RuntimeModuleExports | RuntimeModuleLoader;
|
|
5
|
+
export interface CreateRuntimePluginOptions {
|
|
6
|
+
core?: RuntimeModuleEntry;
|
|
7
|
+
additional?: Record<string, RuntimeModuleEntry>;
|
|
8
|
+
}
|
|
9
|
+
export declare const isCoreRuntimeModuleSpecifier: (specifier: string) => boolean;
|
|
10
|
+
export declare const runtimeModuleIdForSpecifier: (specifier: string) => string;
|
|
11
|
+
export declare function createRuntimePlugin(input?: CreateRuntimePluginOptions): BunPlugin;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import {
|
|
3
|
+
createRuntimePlugin,
|
|
4
|
+
isCoreRuntimeModuleSpecifier,
|
|
5
|
+
runtimeModuleIdForSpecifier
|
|
6
|
+
} from "./index-e4hzc2j2.js";
|
|
7
|
+
import"./index-nyw5p3ep.js";
|
|
8
|
+
import"./index-nkrr8a4c.js";
|
|
9
|
+
export {
|
|
10
|
+
runtimeModuleIdForSpecifier,
|
|
11
|
+
isCoreRuntimeModuleSpecifier,
|
|
12
|
+
createRuntimePlugin
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
//# debugId=54AC4E2ADFC3366A64756E2164756E21
|
|
16
|
+
//# sourceMappingURL=runtime-plugin.js.map
|
package/syntax-style.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { RGBA, type ColorInput } from "./lib/RGBA";
|
|
2
|
-
import { type RenderLib } from "./zig";
|
|
1
|
+
import { RGBA, type ColorInput } from "./lib/RGBA.js";
|
|
2
|
+
import { type RenderLib } from "./zig.js";
|
|
3
3
|
import { type Pointer } from "bun:ffi";
|
|
4
4
|
export interface StyleDefinition {
|
|
5
5
|
fg?: RGBA;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { Clock, TimerHandle } from "../lib/clock";
|
|
2
|
+
export declare class ManualClock implements Clock {
|
|
3
|
+
private time;
|
|
4
|
+
private nextId;
|
|
5
|
+
private nextOrder;
|
|
6
|
+
private readonly timers;
|
|
7
|
+
now(): number;
|
|
8
|
+
setTimeout(fn: () => void, delayMs: number): TimerHandle;
|
|
9
|
+
clearTimeout(handle: TimerHandle): void;
|
|
10
|
+
setInterval(fn: () => void, delayMs: number): TimerHandle;
|
|
11
|
+
clearInterval(handle: TimerHandle): void;
|
|
12
|
+
advance(delayMs: number): void;
|
|
13
|
+
runAll(): void;
|
|
14
|
+
private schedule;
|
|
15
|
+
private peekNextTimer;
|
|
16
|
+
}
|
package/testing/mock-keys.d.ts
CHANGED
package/testing/mock-mouse.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { TreeSitterClient } from "../lib/tree-sitter";
|
|
2
|
-
import type { SimpleHighlight } from "../lib/tree-sitter/types";
|
|
1
|
+
import { TreeSitterClient } from "../lib/tree-sitter/index.js";
|
|
2
|
+
import type { SimpleHighlight } from "../lib/tree-sitter/types.js";
|
|
3
3
|
export declare class MockTreeSitterClient extends TreeSitterClient {
|
|
4
4
|
private _highlightPromises;
|
|
5
5
|
private _mockResult;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { CliRenderer, type CliRendererConfig } from "../renderer";
|
|
2
|
-
import { createMockKeys } from "./mock-keys";
|
|
3
|
-
import { createMockMouse } from "./mock-mouse";
|
|
4
|
-
import type { CapturedFrame } from "../types";
|
|
1
|
+
import { CliRenderer, type CliRendererConfig } from "../renderer.js";
|
|
2
|
+
import { createMockKeys } from "./mock-keys.js";
|
|
3
|
+
import { createMockMouse } from "./mock-mouse.js";
|
|
4
|
+
import type { CapturedFrame } from "../types.js";
|
|
5
5
|
export interface TestRendererOptions extends CliRendererConfig {
|
|
6
6
|
width?: number;
|
|
7
7
|
height?: number;
|