@opentui/core 0.2.1 → 0.2.2
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 +2 -2
- package/buffer.d.ts +3 -3
- package/edit-buffer.d.ts +1 -1
- package/editor-view.d.ts +1 -1
- package/{index-hxymw48q.js → index-d07rkqtc.js} +9 -12
- package/{index-hxymw48q.js.map → index-d07rkqtc.js.map} +3 -3
- package/{index-b9g14b8c.js → index-jv9g79dk.js} +1700 -1534
- package/{index-b9g14b8c.js.map → index-jv9g79dk.js.map} +16 -16
- package/index-p147fdyc.js +44 -0
- package/index-p147fdyc.js.map +10 -0
- package/{index-htg1x5tj.js → index-yedf4bn5.js} +3 -3
- package/index.js +2 -2
- package/lib/clipboard.d.ts +1 -1
- package/lib/terminal-palette.d.ts +12 -5
- package/package.json +13 -8
- package/platform/ffi.d.ts +5 -5
- package/renderer.d.ts +10 -4
- package/runtime-plugin-support-configure.d.ts +4 -0
- package/runtime-plugin-support-configure.js +18 -0
- package/runtime-plugin-support-configure.js.map +9 -0
- package/runtime-plugin-support.d.ts +3 -3
- package/runtime-plugin-support.js +7 -16
- package/runtime-plugin-support.js.map +3 -3
- package/runtime-plugin.js +3 -3
- package/syntax-style.d.ts +1 -1
- package/testing.js +1 -1
- package/text-buffer-view.d.ts +1 -1
- package/text-buffer.d.ts +1 -1
- package/zig-structs.d.ts +2 -2
- package/zig.d.ts +1 -1
- /package/{index-htg1x5tj.js.map → index-yedf4bn5.js.map} +0 -0
package/NativeSpanFeed.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type Pointer } from "
|
|
1
|
+
import { type Pointer } from "./platform/ffi.js";
|
|
2
2
|
import type { NativeSpanFeedOptions } from "./zig-structs.js";
|
|
3
3
|
export type { GrowthPolicy, NativeSpanFeedOptions, NativeSpanFeedStats } from "./zig-structs.js";
|
|
4
4
|
export type DataHandler = (data: Uint8Array) => void | Promise<void>;
|
|
@@ -7,7 +7,7 @@ export type DataHandler = (data: Uint8Array) => void | Promise<void>;
|
|
|
7
7
|
*/
|
|
8
8
|
export declare class NativeSpanFeed {
|
|
9
9
|
static create(options?: NativeSpanFeedOptions): NativeSpanFeed;
|
|
10
|
-
static attach(streamPtr:
|
|
10
|
+
static attach(streamPtr: Pointer, _options?: NativeSpanFeedOptions): NativeSpanFeed;
|
|
11
11
|
readonly streamPtr: Pointer;
|
|
12
12
|
private readonly lib;
|
|
13
13
|
private readonly eventHandler;
|
package/buffer.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { RGBA } from "./lib/index.js";
|
|
2
2
|
import { type RenderLib } from "./zig.js";
|
|
3
|
-
import { type Pointer } from "
|
|
3
|
+
import { type Pointer, type PointerInput } from "./platform/ffi.js";
|
|
4
4
|
import { type BorderStyle, type BorderSides } from "./lib/index.js";
|
|
5
5
|
import { TargetChannel, type WidthMethod, type CapturedLine } from "./types.js";
|
|
6
6
|
import type { TextBufferView } from "./text-buffer-view.js";
|
|
@@ -57,8 +57,8 @@ export declare class OptimizedBuffer {
|
|
|
57
57
|
destroy(): void;
|
|
58
58
|
drawTextBuffer(textBufferView: TextBufferView, x: number, y: number): void;
|
|
59
59
|
drawEditorView(editorView: EditorView, x: number, y: number): void;
|
|
60
|
-
drawSuperSampleBuffer(x: number, y: number, pixelDataPtr:
|
|
61
|
-
drawPackedBuffer(dataPtr:
|
|
60
|
+
drawSuperSampleBuffer(x: number, y: number, pixelDataPtr: PointerInput, pixelDataLength: number, format: "bgra8unorm" | "rgba8unorm", alignedBytesPerRow: number): void;
|
|
61
|
+
drawPackedBuffer(dataPtr: PointerInput, dataLen: number, posX: number, posY: number, terminalWidthCells: number, terminalHeightCells: number): void;
|
|
62
62
|
drawGrayscaleBuffer(posX: number, posY: number, intensities: Float32Array, srcWidth: number, srcHeight: number, fg?: RGBA | null, bg?: RGBA | null): void;
|
|
63
63
|
drawGrayscaleBufferSupersampled(posX: number, posY: number, intensities: Float32Array, srcWidth: number, srcHeight: number, fg?: RGBA | null, bg?: RGBA | null): void;
|
|
64
64
|
resize(width: number, height: number): void;
|
package/edit-buffer.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type LogicalCursor, type RenderLib } from "./zig.js";
|
|
2
|
-
import { type Pointer } from "
|
|
2
|
+
import { type Pointer } from "./platform/ffi.js";
|
|
3
3
|
import { type WidthMethod, type Highlight } from "./types.js";
|
|
4
4
|
import { RGBA } from "./lib/RGBA.js";
|
|
5
5
|
import { EventEmitter } from "events";
|
package/editor-view.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { RGBA } from "./lib/RGBA.js";
|
|
2
2
|
import { type RenderLib, type VisualCursor, type LineInfo } from "./zig.js";
|
|
3
|
-
import { type Pointer } from "
|
|
3
|
+
import { type Pointer } from "./platform/ffi.js";
|
|
4
4
|
import type { EditBuffer } from "./edit-buffer.js";
|
|
5
5
|
export interface Viewport {
|
|
6
6
|
offsetY: number;
|
|
@@ -175,7 +175,7 @@ import {
|
|
|
175
175
|
stripAnsiSequences,
|
|
176
176
|
t,
|
|
177
177
|
terminalNamedSingleStrokeKeys,
|
|
178
|
-
|
|
178
|
+
toArrayBuffer,
|
|
179
179
|
treeSitterToStyledText,
|
|
180
180
|
treeSitterToTextChunks,
|
|
181
181
|
underline,
|
|
@@ -183,7 +183,7 @@ import {
|
|
|
183
183
|
white,
|
|
184
184
|
wrapWithDelegates,
|
|
185
185
|
yellow
|
|
186
|
-
} from "./index-
|
|
186
|
+
} from "./index-jv9g79dk.js";
|
|
187
187
|
|
|
188
188
|
// src/index.ts
|
|
189
189
|
var exports_src2 = {};
|
|
@@ -2771,8 +2771,6 @@ class SlotRenderable extends Renderable {
|
|
|
2771
2771
|
}
|
|
2772
2772
|
}
|
|
2773
2773
|
// src/NativeSpanFeed.ts
|
|
2774
|
-
import { toArrayBuffer } from "bun:ffi";
|
|
2775
|
-
var toPointer2 = toPointer;
|
|
2776
2774
|
function toNumber(value) {
|
|
2777
2775
|
return typeof value === "bigint" ? Number(value) : value;
|
|
2778
2776
|
}
|
|
@@ -2793,12 +2791,11 @@ class NativeSpanFeed {
|
|
|
2793
2791
|
}
|
|
2794
2792
|
static attach(streamPtr, _options) {
|
|
2795
2793
|
const lib = resolveRenderLib();
|
|
2796
|
-
const
|
|
2797
|
-
|
|
2798
|
-
lib.
|
|
2799
|
-
const status = lib.attachNativeSpanFeed(ptr);
|
|
2794
|
+
const stream = new NativeSpanFeed(streamPtr);
|
|
2795
|
+
lib.registerNativeSpanFeedStream(streamPtr, stream.eventHandler);
|
|
2796
|
+
const status = lib.attachNativeSpanFeed(streamPtr);
|
|
2800
2797
|
if (status !== 0) {
|
|
2801
|
-
lib.unregisterNativeSpanFeedStream(
|
|
2798
|
+
lib.unregisterNativeSpanFeedStream(streamPtr);
|
|
2802
2799
|
throw new Error(`Failed to attach stream: ${status}`);
|
|
2803
2800
|
}
|
|
2804
2801
|
return stream;
|
|
@@ -2932,7 +2929,7 @@ class NativeSpanFeed {
|
|
|
2932
2929
|
break;
|
|
2933
2930
|
}
|
|
2934
2931
|
case 6 /* Error */: {
|
|
2935
|
-
const code = arg0;
|
|
2932
|
+
const code = toNumber(arg0);
|
|
2936
2933
|
for (const handler of this.errorHandlers)
|
|
2937
2934
|
handler(code);
|
|
2938
2935
|
break;
|
|
@@ -10992,5 +10989,5 @@ class TimeToFirstDrawRenderable extends Renderable {
|
|
|
10992
10989
|
}
|
|
10993
10990
|
export { DistortionEffect, VignetteEffect, CloudsEffect, FlamesEffect, CRTRollingBarEffect, RainbowTextEffect, applyScanlines, applyInvert, applyNoise, applyChromaticAberration, applyAsciiArt, applyBrightness, applyGain, applySaturation, BloomEffect, SEPIA_MATRIX, PROTANOPIA_SIM_MATRIX, DEUTERANOPIA_SIM_MATRIX, TRITANOPIA_SIM_MATRIX, ACHROMATOPSIA_MATRIX, PROTANOPIA_COMP_MATRIX, DEUTERANOPIA_COMP_MATRIX, TRITANOPIA_COMP_MATRIX, TECHNICOLOR_MATRIX, SOLARIZATION_MATRIX, SYNTHWAVE_MATRIX, GREENSCALE_MATRIX, GRAYSCALE_MATRIX, INVERT_MATRIX, Timeline, engine, createTimeline, SlotRegistry, createSlotRegistry, createCoreSlotRegistry, registerCorePlugin, resolveCoreSlot, SlotRenderable, NativeSpanFeed, FrameBufferRenderable, ASCIIFontRenderable, Generic, Box, Text, ASCIIFont, Input, Select, TabSelect, FrameBuffer, Code, ScrollBox, vstyles, VRenderable, LineNumberRenderable, DiffRenderable, defaultTextareaKeyBindings, TextareaRenderable, InputRenderableEvents, InputRenderable, TextTableRenderable, MarkdownRenderable, SliderRenderable, ScrollBarRenderable, ArrowRenderable, ScrollBoxRenderable, SelectRenderableEvents, SelectRenderable, TabSelectRenderableEvents, TabSelectRenderable, TimeToFirstDrawRenderable, exports_src2 as exports_src };
|
|
10994
10991
|
|
|
10995
|
-
//# debugId=
|
|
10996
|
-
//# sourceMappingURL=index-
|
|
10992
|
+
//# debugId=C6958AB1304EEF3C64756E2164756E21
|
|
10993
|
+
//# sourceMappingURL=index-d07rkqtc.js.map
|