restty 0.1.16 → 0.1.17

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.
Files changed (43) hide show
  1. package/dist/app/atlas-builder.d.ts +38 -0
  2. package/dist/app/font-sources.d.ts +2 -0
  3. package/dist/app/index.js +234 -90
  4. package/dist/app/pane-app-manager.d.ts +43 -0
  5. package/dist/app/panes-context-menu.d.ts +10 -0
  6. package/dist/app/panes-styles.d.ts +5 -0
  7. package/dist/app/panes-types.d.ts +89 -0
  8. package/dist/app/panes.d.ts +10 -0
  9. package/dist/app/restty.d.ts +20 -0
  10. package/dist/app/session.d.ts +6 -0
  11. package/dist/app/types.d.ts +123 -0
  12. package/dist/fonts/index.js +2 -1
  13. package/dist/fonts/manager.d.ts +25 -0
  14. package/dist/fonts/nerd-constraints.d.ts +4 -0
  15. package/dist/fonts/nerd-ranges.d.ts +2 -0
  16. package/dist/fonts/types.d.ts +51 -0
  17. package/dist/grid/grid.d.ts +22 -0
  18. package/dist/grid/types.d.ts +32 -0
  19. package/dist/ime/ime.d.ts +13 -0
  20. package/dist/ime/types.d.ts +8 -0
  21. package/dist/index.js +234 -90
  22. package/dist/input/ansi.d.ts +3 -0
  23. package/dist/input/index.js +5 -1
  24. package/dist/input/mouse.d.ts +10 -0
  25. package/dist/input/output.d.ts +11 -0
  26. package/dist/input/types.d.ts +7 -0
  27. package/dist/internal.js +234 -90
  28. package/dist/pty/kitty-media.d.ts +3 -0
  29. package/dist/pty/pty.d.ts +11 -0
  30. package/dist/pty/types.d.ts +49 -0
  31. package/dist/renderer/box-drawing-map.d.ts +4 -0
  32. package/dist/renderer/index.js +145 -42
  33. package/dist/renderer/shaders.d.ts +7 -0
  34. package/dist/renderer/shapes.d.ts +43 -0
  35. package/dist/renderer/types.d.ts +43 -0
  36. package/dist/renderer/webgpu.d.ts +11 -0
  37. package/dist/selection/selection.d.ts +24 -0
  38. package/dist/selection/types.d.ts +13 -0
  39. package/dist/theme/catalog.d.ts +5 -0
  40. package/dist/theme/ghostty.d.ts +18 -0
  41. package/dist/wasm/embedded.d.ts +1 -0
  42. package/dist/wasm/runtime.d.ts +29 -0
  43. package/package.json +1 -1
@@ -1,7 +1,15 @@
1
+ /**
2
+ * WASM ABI variant identifier.
3
+ * - info: render state via single info struct
4
+ * - render: render state via separate pointer exports
5
+ * - cells: cell state via separate pointer exports
6
+ */
1
7
  export type WasmAbiKind = "info" | "render" | "cells";
8
+ /** WASM ABI variant descriptor. */
2
9
  export type WasmAbi = {
3
10
  kind: WasmAbiKind;
4
11
  };
12
+ /** Cursor state from WASM terminal core. */
5
13
  export type CursorInfo = {
6
14
  row: number;
7
15
  col: number;
@@ -11,6 +19,7 @@ export type CursorInfo = {
11
19
  wideTail: number;
12
20
  color: number;
13
21
  };
22
+ /** Kitty graphics protocol image placement descriptor. */
14
23
  export type KittyPlacement = {
15
24
  imageId: number;
16
25
  imageFormat: number;
@@ -30,6 +39,7 @@ export type KittyPlacement = {
30
39
  sourceWidth: number;
31
40
  sourceHeight: number;
32
41
  };
42
+ /** Terminal render state snapshot with typed array views into WASM memory. */
33
43
  export type RenderState = {
34
44
  rows: number;
35
45
  cols: number;
@@ -54,6 +64,7 @@ export type RenderState = {
54
64
  selectionEnd: Int16Array | null;
55
65
  cursor: CursorInfo | null;
56
66
  };
67
+ /** WASM module exports for terminal core API. */
57
68
  export type ResttyWasmExports = WebAssembly.Exports & {
58
69
  memory: WebAssembly.Memory;
59
70
  restty_create: (cols: number, rows: number, maxScrollback: number) => number;
@@ -126,30 +137,48 @@ export type ResttyWasmExports = WebAssembly.Exports & {
126
137
  restty_kitty_placement_count?: (handle: number) => number;
127
138
  restty_kitty_placements_ptr?: (handle: number) => number;
128
139
  };
140
+ /** Construction options for WASM runtime. */
129
141
  export type ResttyWasmOptions = {
130
142
  log?: (message: string) => void;
131
143
  };
144
+ /** WASM terminal core runtime with memory management and typed array caching. */
132
145
  export declare class ResttyWasm {
133
146
  readonly exports: ResttyWasmExports;
134
147
  readonly abi: WasmAbi;
135
148
  readonly memory: WebAssembly.Memory;
136
149
  private readonly renderViewCaches;
137
150
  private constructor();
151
+ /** Load and instantiate the embedded WASM module. */
138
152
  static load(options?: ResttyWasmOptions): Promise<ResttyWasm>;
153
+ /** Create a new terminal instance and return its handle. */
139
154
  create(cols: number, rows: number, maxScrollback: number): number;
155
+ /** Destroy a terminal instance and free its resources. */
140
156
  destroy(handle: number): void;
141
157
  private getRenderViewCache;
158
+ /** Resize the terminal grid. */
142
159
  resize(handle: number, cols: number, rows: number): void;
160
+ /** Set pixel dimensions for Kitty graphics protocol. */
143
161
  setPixelSize(handle: number, widthPx: number, heightPx: number): void;
162
+ /** Update internal render buffers after state changes. */
144
163
  renderUpdate(handle: number): void;
164
+ /** Scroll the viewport by delta rows. */
145
165
  scrollViewport(handle: number, delta: number): void;
166
+ /** Read and clear pending output replies from terminal. */
146
167
  drainOutput(handle: number): string;
168
+ /** Get active Kitty keyboard protocol flags. */
147
169
  getKittyKeyboardFlags(handle: number): number;
170
+ /** Get all active Kitty graphics placements. */
148
171
  getKittyPlacements(handle: number): KittyPlacement[];
172
+ /** Write text to terminal for processing. */
149
173
  write(handle: number, text: string): void;
174
+ /** Set default colors for terminal (RGB packed as 0xRRGGBB). */
150
175
  setDefaultColors(handle: number, fg: number, bg: number, cursor: number): void;
176
+ /** Set terminal color palette (RGB triples). */
151
177
  setPalette(handle: number, colors: Uint8Array, count: number): void;
178
+ /** Reset terminal palette to defaults. */
152
179
  resetPalette(handle: number): void;
180
+ /** Get current render state with cached typed array views. */
153
181
  getRenderState(handle: number): RenderState | null;
154
182
  }
183
+ /** Load and instantiate the embedded WASM module (convenience function). */
155
184
  export declare function loadResttyWasm(options?: ResttyWasmOptions): Promise<ResttyWasm>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "restty",
3
- "version": "0.1.16",
3
+ "version": "0.1.17",
4
4
  "description": "Browser terminal rendering library powered by WASM, WebGPU/WebGL2, and TypeScript text shaping.",
5
5
  "keywords": [
6
6
  "terminal",