@opentui/core 0.1.79 → 0.1.81

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.js CHANGED
@@ -6,7 +6,7 @@ import {
6
6
  __export,
7
7
  __require,
8
8
  __toESM
9
- } from "./index-zrvzvh6r.js";
9
+ } from "./index-ve2seej0.js";
10
10
 
11
11
  // ../../node_modules/.bun/omggif@1.0.10/node_modules/omggif/omggif.js
12
12
  var require_omggif = __commonJS((exports) => {
@@ -0,0 +1,41 @@
1
+ import { type Pointer } from "bun:ffi";
2
+ import type { NativeSpanFeedOptions } from "./zig-structs";
3
+ export type { GrowthPolicy, NativeSpanFeedOptions, NativeSpanFeedStats } from "./zig-structs";
4
+ export type DataHandler = (data: Uint8Array) => void | Promise<void>;
5
+ /**
6
+ * Zero-copy wrapper over Zig memory; not a full stream interface.
7
+ */
8
+ export declare class NativeSpanFeed {
9
+ static create(options?: NativeSpanFeedOptions): NativeSpanFeed;
10
+ static attach(streamPtr: bigint | number, _options?: NativeSpanFeedOptions): NativeSpanFeed;
11
+ readonly streamPtr: Pointer;
12
+ private readonly lib;
13
+ private readonly eventHandler;
14
+ private chunkMap;
15
+ private chunkSizes;
16
+ private dataHandlers;
17
+ private errorHandlers;
18
+ private drainBuffer;
19
+ private stateBuffer;
20
+ private closed;
21
+ private destroyed;
22
+ private draining;
23
+ private pendingDataAvailable;
24
+ private pendingClose;
25
+ private closing;
26
+ private pendingAsyncHandlers;
27
+ private inCallback;
28
+ private closeQueued;
29
+ private constructor();
30
+ private ensureDrainBuffer;
31
+ onData(handler: DataHandler): () => void;
32
+ onError(handler: (code: number) => void): () => void;
33
+ close(): void;
34
+ private processPendingClose;
35
+ private performClose;
36
+ private finalizeDestroy;
37
+ private handleEvent;
38
+ private decrementRefcount;
39
+ private drainOnce;
40
+ drainAll(): void;
41
+ }
package/README.md CHANGED
@@ -1,7 +1,6 @@
1
1
  # OpenTUI Core
2
2
 
3
- OpenTUI Core is a TypeScript library for building terminal user interfaces (TUIs). It is currently in
4
- development and is not ready for production use.
3
+ OpenTUI is a native terminal UI core written in Zig with TypeScript bindings. The native core exposes a C ABI and can be used from any language. OpenTUI powers OpenCode in production today and will also power terminal.shop. It is an extensible core with a focus on correctness, stability, and high performance. It provides a component-based architecture with flexible layout capabilities, allowing you to create complex terminal applications.
5
4
 
6
5
  ## Documentation
7
6
 
@@ -42,6 +41,10 @@ bun run bench:native
42
41
 
43
42
  See [src/zig/bench.zig](src/zig/bench.zig) for available options like `--filter` and `--mem`.
44
43
 
44
+ NativeSpanFeed TypeScript benchmarks:
45
+
46
+ - [src/benchmark/native-span-feed-benchmark.md](src/benchmark/native-span-feed-benchmark.md)
47
+
45
48
  ## CLI Renderer
46
49
 
47
50
  ### Renderables