@opentui/core 0.7.0 → 0.8.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.
Files changed (45) hide show
  1. package/NativeScene.d.ts +9 -3
  2. package/Renderable.d.ts +20 -2
  3. package/animation/Timeline.d.ts +9 -0
  4. package/buffer.d.ts +6 -2
  5. package/{chunk-bun-zevtbcf6.js → chunk-bun-6kxdhkdc.js} +407 -259
  6. package/chunk-bun-6kxdhkdc.js.map +70 -0
  7. package/{chunk-bun-qkpm62w1.js → chunk-bun-x6cz4jyg.js} +263 -21
  8. package/chunk-bun-x6cz4jyg.js.map +35 -0
  9. package/{chunk-node-7bcmqh18.js → chunk-node-q5ccgbk5.js} +407 -259
  10. package/{chunk-bun-zevtbcf6.js.map → chunk-node-q5ccgbk5.js.map} +15 -15
  11. package/{chunk-node-mzgnr3sw.js → chunk-node-y0w0hq5m.js} +263 -21
  12. package/chunk-node-y0w0hq5m.js.map +34 -0
  13. package/edit-buffer.d.ts +4 -0
  14. package/index.bun.js +788 -473
  15. package/index.bun.js.map +11 -10
  16. package/index.d.ts +1 -1
  17. package/index.node.js +788 -473
  18. package/index.node.js.map +11 -9
  19. package/lib/extmarks.d.ts +3 -1
  20. package/lib/stdin-parser-native.d.ts +2 -0
  21. package/lib/stdin-parser.d.ts +2 -0
  22. package/lib/terminal-capability-detection.d.ts +6 -1
  23. package/native-abi.generated.d.ts +307 -3
  24. package/package.json +9 -9
  25. package/renderables/FrameBuffer.d.ts +1 -0
  26. package/renderables/ScrollBar.d.ts +6 -0
  27. package/renderables/ScrollBox.d.ts +83 -43
  28. package/renderables/ScrollBoxParts.d.ts +165 -0
  29. package/renderables/index.d.ts +1 -1
  30. package/renderer-theme-mode.d.ts +1 -6
  31. package/renderer.d.ts +22 -3
  32. package/testing/test-renderer.d.ts +2 -0
  33. package/testing.bun.js +7 -6
  34. package/testing.bun.js.map +3 -3
  35. package/testing.js +7 -6
  36. package/testing.js.map +3 -3
  37. package/types.d.ts +11 -0
  38. package/yoga.bun.js +1 -1
  39. package/yoga.internal.d.ts +3 -3
  40. package/yoga.js +1 -1
  41. package/zig-structs.d.ts +1 -0
  42. package/zig.d.ts +78 -8
  43. package/chunk-bun-qkpm62w1.js.map +0 -35
  44. package/chunk-node-7bcmqh18.js.map +0 -70
  45. package/chunk-node-mzgnr3sw.js.map +0 -34
package/lib/extmarks.d.ts CHANGED
@@ -69,7 +69,9 @@ export declare class ExtmarksController {
69
69
  adjustExtmarksAfterDeletion(deleteOffset: number, length: number, updateHighlights?: boolean): void;
70
70
  private offsetToPosition;
71
71
  private positionToOffset;
72
- private getNextCursorOffset;
72
+ /** Cells an edit adds to the document, negative when it removes them. A grapheme rejoined across the edit changes widths, so measure the end. */
73
+ private measureChange;
74
+ private shiftExtmarks;
73
75
  private updateHighlights;
74
76
  private offsetExcludingNewlines;
75
77
  create(options: ExtmarkOptions): number;
@@ -38,6 +38,8 @@ export declare class NativeStdinParser {
38
38
  private destroyed;
39
39
  constructor(options?: NativeStdinParserOptions);
40
40
  updateProtocolContext(patch: Partial<StdinParserProtocolContext>): void;
41
+ /** A bracketed paste has started and not yet ended. */
42
+ get pasting(): boolean;
41
43
  push(data: Uint8Array): void;
42
44
  read(): StdinEvent | null;
43
45
  drain(onEvent: (event: StdinEvent) => void): void;
@@ -28,6 +28,8 @@ export interface StdinParserProtocolContext {
28
28
  pixelResolutionQueryActive: boolean;
29
29
  explicitWidthCprActive: boolean;
30
30
  startupCursorCprActive: boolean;
31
+ /** Native only: a query batch's DA1 reply is outstanding, so split replies wait for it without a deadline. */
32
+ replySentinelActive: boolean;
31
33
  }
32
34
  export interface StdinParserOptions {
33
35
  timeoutMs?: number;
@@ -3,7 +3,6 @@
3
3
  *
4
4
  * Detects various terminal capability response sequences:
5
5
  * - DECRPM (DEC Request Mode): ESC[?...;N$y where N is 0,1,2,3,4
6
- * - CPR (Cursor Position Report): ESC[row;colR (used for width detection)
7
6
  * - XTVersion: ESC P >| ... ESC \
8
7
  * - Kitty Graphics: ESC _ G ... ESC \
9
8
  * - Kitty Keyboard Query: ESC[?Nu where N is 0,1,2,etc
@@ -18,6 +17,12 @@
18
17
  * Returns true if the sequence matches any known capability response pattern.
19
18
  */
20
19
  export declare function isCapabilityResponse(sequence: string): boolean;
20
+ /**
21
+ * Check if a cursor position report answers the explicit width or scaled text probe: ESC[1;NR with N >= 2.
22
+ * ESC[1;1R means the cursor did not move, so the terminal has no width support. Shift, Alt and Ctrl+F3 send the
23
+ * same bytes, so only a report the parser classified as one may be checked.
24
+ */
25
+ export declare function isExplicitWidthReport(sequence: string): boolean;
21
26
  /**
22
27
  * Check if a sequence is a pixel resolution response.
23
28
  * Format: ESC[4;height;widtht
@@ -67,6 +67,26 @@ export declare const nativeSymbols: {
67
67
  readonly args: readonly ["ptr", "buffer", "ptr"];
68
68
  readonly returns: "i32";
69
69
  };
70
+ readonly ot_scene_set_scroll: {
71
+ readonly args: readonly ["ptr", "buffer", "buffer"];
72
+ readonly returns: "i32";
73
+ };
74
+ readonly ot_scene_set_scroll_arrow: {
75
+ readonly args: readonly ["ptr", "buffer", "u32", "u32", "buffer", "ptr", "u32"];
76
+ readonly returns: "i32";
77
+ };
78
+ readonly ot_scene_scroll_to: {
79
+ readonly args: readonly ["ptr", "buffer", "f64", "f64", "u32", "ptr"];
80
+ readonly returns: "i32";
81
+ };
82
+ readonly ot_scene_scroll_request: {
83
+ readonly args: readonly ["ptr", "buffer", "u32", "ptr", "u32", "u32", "ptr"];
84
+ readonly returns: "i32";
85
+ };
86
+ readonly ot_scene_get_scroll: {
87
+ readonly args: readonly ["ptr", "buffer", "buffer"];
88
+ readonly returns: "i32";
89
+ };
70
90
  readonly ot_scene_set_focus: {
71
91
  readonly args: readonly ["ptr", "buffer", "u32"];
72
92
  readonly returns: "i32";
@@ -631,7 +651,7 @@ export declare const nativeSymbols: {
631
651
  readonly args: readonly ["ptr", "buffer", "ptr", "buffer", "i32", "i32"];
632
652
  readonly returns: "i32";
633
653
  };
634
- readonly ot_buffer_draw_scene_text: {
654
+ readonly ot_buffer_draw_scene_body: {
635
655
  readonly args: readonly ["ptr", "buffer", "ptr", "buffer", "i32", "i32"];
636
656
  readonly returns: "i32";
637
657
  };
@@ -1887,7 +1907,7 @@ export declare const nativeLayouts: {
1887
1907
  readonly alignment: 4;
1888
1908
  readonly type: "u32";
1889
1909
  };
1890
- readonly reserved: {
1910
+ readonly damage_rows: {
1891
1911
  readonly offset: 220;
1892
1912
  readonly size: 4;
1893
1913
  readonly alignment: 4;
@@ -2357,6 +2377,246 @@ export declare const nativeLayouts: {
2357
2377
  };
2358
2378
  };
2359
2379
  };
2380
+ readonly ot_scene_scroll_bar_options: {
2381
+ readonly size: 40;
2382
+ readonly alignment: 4;
2383
+ readonly fields: {
2384
+ readonly policy: {
2385
+ readonly offset: 0;
2386
+ readonly size: 4;
2387
+ readonly alignment: 4;
2388
+ readonly type: "u32";
2389
+ };
2390
+ readonly placement: {
2391
+ readonly offset: 4;
2392
+ readonly size: 4;
2393
+ readonly alignment: 4;
2394
+ readonly type: "u32";
2395
+ };
2396
+ readonly thickness: {
2397
+ readonly offset: 8;
2398
+ readonly size: 4;
2399
+ readonly alignment: 4;
2400
+ readonly type: "u32";
2401
+ };
2402
+ readonly gap: {
2403
+ readonly offset: 12;
2404
+ readonly size: 4;
2405
+ readonly alignment: 4;
2406
+ readonly type: "u32";
2407
+ };
2408
+ readonly arrows: {
2409
+ readonly offset: 16;
2410
+ readonly size: 4;
2411
+ readonly alignment: 4;
2412
+ readonly type: "u32";
2413
+ };
2414
+ readonly reserved: {
2415
+ readonly offset: 20;
2416
+ readonly size: 4;
2417
+ readonly alignment: 4;
2418
+ readonly type: "u32";
2419
+ };
2420
+ readonly track_foreground: {
2421
+ readonly offset: 24;
2422
+ readonly size: 8;
2423
+ readonly alignment: 2;
2424
+ readonly type: "[4]u16";
2425
+ };
2426
+ readonly track_background: {
2427
+ readonly offset: 32;
2428
+ readonly size: 8;
2429
+ readonly alignment: 2;
2430
+ readonly type: "[4]u16";
2431
+ };
2432
+ };
2433
+ };
2434
+ readonly ot_scene_scroll_options: {
2435
+ readonly size: 144;
2436
+ readonly alignment: 4;
2437
+ readonly fields: {
2438
+ readonly struct_size: {
2439
+ readonly offset: 0;
2440
+ readonly size: 4;
2441
+ readonly alignment: 4;
2442
+ readonly type: "u32";
2443
+ };
2444
+ readonly abi_version: {
2445
+ readonly offset: 4;
2446
+ readonly size: 4;
2447
+ readonly alignment: 4;
2448
+ readonly type: "u32";
2449
+ };
2450
+ readonly axes: {
2451
+ readonly offset: 8;
2452
+ readonly size: 4;
2453
+ readonly alignment: 4;
2454
+ readonly type: "u32";
2455
+ };
2456
+ readonly follow: {
2457
+ readonly offset: 12;
2458
+ readonly size: 4;
2459
+ readonly alignment: 4;
2460
+ readonly type: "u32";
2461
+ };
2462
+ readonly culling: {
2463
+ readonly offset: 16;
2464
+ readonly size: 4;
2465
+ readonly alignment: 4;
2466
+ readonly type: "u32";
2467
+ };
2468
+ readonly fills: {
2469
+ readonly offset: 20;
2470
+ readonly size: 4;
2471
+ readonly alignment: 4;
2472
+ readonly type: "u32";
2473
+ };
2474
+ readonly padding: {
2475
+ readonly offset: 24;
2476
+ readonly size: 16;
2477
+ readonly alignment: 4;
2478
+ readonly type: "[4]f32";
2479
+ };
2480
+ readonly wrapper_background: {
2481
+ readonly offset: 40;
2482
+ readonly size: 8;
2483
+ readonly alignment: 2;
2484
+ readonly type: "[4]u16";
2485
+ };
2486
+ readonly viewport_background: {
2487
+ readonly offset: 48;
2488
+ readonly size: 8;
2489
+ readonly alignment: 2;
2490
+ readonly type: "[4]u16";
2491
+ };
2492
+ readonly content_background: {
2493
+ readonly offset: 56;
2494
+ readonly size: 8;
2495
+ readonly alignment: 2;
2496
+ readonly type: "[4]u16";
2497
+ };
2498
+ readonly bars: {
2499
+ readonly offset: 64;
2500
+ readonly size: 80;
2501
+ readonly alignment: 4;
2502
+ readonly type: "[2]ot_scene_scroll_bar_options";
2503
+ };
2504
+ };
2505
+ };
2506
+ readonly ot_scene_scroll_bar_state: {
2507
+ readonly size: 120;
2508
+ readonly alignment: 8;
2509
+ readonly fields: {
2510
+ readonly visible: {
2511
+ readonly offset: 0;
2512
+ readonly size: 4;
2513
+ readonly alignment: 4;
2514
+ readonly type: "u32";
2515
+ };
2516
+ readonly reserved: {
2517
+ readonly offset: 4;
2518
+ readonly size: 4;
2519
+ readonly alignment: 4;
2520
+ readonly type: "u32";
2521
+ };
2522
+ readonly track: {
2523
+ readonly offset: 8;
2524
+ readonly size: 32;
2525
+ readonly alignment: 8;
2526
+ readonly type: "[4]f64";
2527
+ };
2528
+ readonly start_arrow: {
2529
+ readonly offset: 40;
2530
+ readonly size: 32;
2531
+ readonly alignment: 8;
2532
+ readonly type: "[4]f64";
2533
+ };
2534
+ readonly end_arrow: {
2535
+ readonly offset: 72;
2536
+ readonly size: 32;
2537
+ readonly alignment: 8;
2538
+ readonly type: "[4]f64";
2539
+ };
2540
+ readonly thumb_start: {
2541
+ readonly offset: 104;
2542
+ readonly size: 8;
2543
+ readonly alignment: 8;
2544
+ readonly type: "f64";
2545
+ };
2546
+ readonly thumb_size: {
2547
+ readonly offset: 112;
2548
+ readonly size: 8;
2549
+ readonly alignment: 8;
2550
+ readonly type: "f64";
2551
+ };
2552
+ };
2553
+ };
2554
+ readonly ot_scene_scroll_state: {
2555
+ readonly size: 360;
2556
+ readonly alignment: 8;
2557
+ readonly fields: {
2558
+ readonly struct_size: {
2559
+ readonly offset: 0;
2560
+ readonly size: 4;
2561
+ readonly alignment: 4;
2562
+ readonly type: "u32";
2563
+ };
2564
+ readonly abi_version: {
2565
+ readonly offset: 4;
2566
+ readonly size: 4;
2567
+ readonly alignment: 4;
2568
+ readonly type: "u32";
2569
+ };
2570
+ readonly stuck: {
2571
+ readonly offset: 8;
2572
+ readonly size: 4;
2573
+ readonly alignment: 4;
2574
+ readonly type: "u32";
2575
+ };
2576
+ readonly changes: {
2577
+ readonly offset: 12;
2578
+ readonly size: 4;
2579
+ readonly alignment: 4;
2580
+ readonly type: "u32";
2581
+ };
2582
+ readonly generation: {
2583
+ readonly offset: 16;
2584
+ readonly size: 8;
2585
+ readonly alignment: 8;
2586
+ readonly type: "u64";
2587
+ };
2588
+ readonly offset: {
2589
+ readonly offset: 24;
2590
+ readonly size: 16;
2591
+ readonly alignment: 8;
2592
+ readonly type: "[2]f64";
2593
+ };
2594
+ readonly max: {
2595
+ readonly offset: 40;
2596
+ readonly size: 16;
2597
+ readonly alignment: 8;
2598
+ readonly type: "[2]f64";
2599
+ };
2600
+ readonly content: {
2601
+ readonly offset: 56;
2602
+ readonly size: 32;
2603
+ readonly alignment: 8;
2604
+ readonly type: "[4]f64";
2605
+ };
2606
+ readonly viewport: {
2607
+ readonly offset: 88;
2608
+ readonly size: 32;
2609
+ readonly alignment: 8;
2610
+ readonly type: "[4]f64";
2611
+ };
2612
+ readonly bars: {
2613
+ readonly offset: 120;
2614
+ readonly size: 240;
2615
+ readonly alignment: 8;
2616
+ readonly type: "[2]ot_scene_scroll_bar_state";
2617
+ };
2618
+ };
2619
+ };
2360
2620
  readonly ot_session_options: {
2361
2621
  readonly size: 32;
2362
2622
  readonly alignment: 8;
@@ -5372,6 +5632,7 @@ export declare const nativeConstants: {
5372
5632
  readonly OT_STYLE_BORDER_WIDTH: 0;
5373
5633
  readonly OT_STYLE_FLAGS_NONE: 0;
5374
5634
  readonly OT_STYLE_DISABLE_FLEX_SHRINK: 1;
5635
+ readonly OT_STYLE_CONTENT: 2;
5375
5636
  readonly OT_STYLE_ENUM_DIRECTION: 0;
5376
5637
  readonly OT_STYLE_ENUM_FLEX_DIRECTION: 1;
5377
5638
  readonly OT_STYLE_ENUM_JUSTIFY_CONTENT: 2;
@@ -5499,6 +5760,10 @@ export declare const nativeConstants: {
5499
5760
  readonly OT_SCENE_FULL_PATH_FORCED: 1;
5500
5761
  readonly OT_SCENE_FULL_PATH_SCREEN: 2;
5501
5762
  readonly OT_SCENE_FULL_PATH_IMAGES: 4;
5763
+ readonly OT_SCENE_FULL_PATH_TAINTED: 8;
5764
+ readonly OT_SCENE_FULL_PATH_UNRETAINED: 16;
5765
+ readonly OT_SCENE_FULL_PATH_OPTIONS: 32;
5766
+ readonly OT_SCENE_FULL_PATH_NON_LOCAL: 64;
5502
5767
  readonly OT_SCENE_HOOK_UPDATE: 1;
5503
5768
  readonly OT_SCENE_HOOK_RESIZE: 2;
5504
5769
  readonly OT_SCENE_HOOK_LAYOUT_CHANGED: 4;
@@ -5506,11 +5771,13 @@ export declare const nativeConstants: {
5506
5771
  readonly OT_SCENE_HOOK_RENDER_AFTER: 16;
5507
5772
  readonly OT_SCENE_HOOK_RENDER_SELF: 32;
5508
5773
  readonly OT_SCENE_HOOK_IDLE_UPDATE: 64;
5774
+ readonly OT_SCENE_HOOK_SCROLL: 128;
5509
5775
  readonly OT_SCENE_FRAME_DONE: 0;
5510
5776
  readonly OT_SCENE_FRAME_UPDATE: 1;
5511
5777
  readonly OT_SCENE_FRAME_RESIZE: 2;
5512
5778
  readonly OT_SCENE_FRAME_LAYOUT_CHANGED: 3;
5513
5779
  readonly OT_SCENE_FRAME_RECORD: 4;
5780
+ readonly OT_SCENE_FRAME_SCROLL: 5;
5514
5781
  readonly OT_SCENE_GEOMETRY_PAINT: 1;
5515
5782
  readonly OT_SCENE_GEOMETRY_PUBLIC: 2;
5516
5783
  readonly OT_SCENE_PROPERTY_Z_INDEX: 1;
@@ -5528,7 +5795,37 @@ export declare const nativeConstants: {
5528
5795
  readonly OT_SCENE_PROPERTY_RESET_BORDER_CHARACTERS: 4096;
5529
5796
  readonly OT_SCENE_PROPERTY_RECORD_MAX: 88;
5530
5797
  readonly OT_SCENE_PROPERTY_BYTES_MAX: 360448;
5798
+ readonly OT_SCENE_SCROLL_X: 1;
5799
+ readonly OT_SCENE_SCROLL_Y: 2;
5800
+ readonly OT_SCENE_SCROLL_FOLLOW_NONE: 0;
5801
+ readonly OT_SCENE_SCROLL_FOLLOW_TOP: 1;
5802
+ readonly OT_SCENE_SCROLL_FOLLOW_BOTTOM: 2;
5803
+ readonly OT_SCENE_SCROLL_FOLLOW_LEFT: 3;
5804
+ readonly OT_SCENE_SCROLL_FOLLOW_RIGHT: 4;
5805
+ readonly OT_SCENE_SCROLL_FILL_WRAPPER: 1;
5806
+ readonly OT_SCENE_SCROLL_FILL_VIEWPORT: 2;
5807
+ readonly OT_SCENE_SCROLL_FILL_CONTENT: 4;
5808
+ readonly OT_SCENE_SCROLL_BAR_AUTO: 0;
5809
+ readonly OT_SCENE_SCROLL_BAR_ALWAYS: 1;
5810
+ readonly OT_SCENE_SCROLL_BAR_NEVER: 2;
5811
+ readonly OT_SCENE_SCROLL_BAR_INSET: 0;
5812
+ readonly OT_SCENE_SCROLL_BAR_OVERLAY: 1;
5813
+ readonly OT_SCENE_SCROLL_RELATIVE_X: 1;
5814
+ readonly OT_SCENE_SCROLL_RELATIVE_Y: 2;
5815
+ readonly OT_SCENE_SCROLL_REAPPLY: 4;
5816
+ readonly OT_SCENE_SCROLL_REQUEST_INTO_VIEW: 0;
5817
+ readonly OT_SCENE_SCROLL_REQUEST_ANCHOR: 1;
5818
+ readonly OT_SCENE_SCROLL_REQUEST_LAYOUT: 2;
5819
+ readonly OT_SCENE_SCROLL_ALIGN_NEAREST: 0;
5820
+ readonly OT_SCENE_SCROLL_ALIGN_START: 1;
5821
+ readonly OT_SCENE_SCROLL_ALIGN_END: 2;
5822
+ readonly OT_SCENE_SCROLL_CHANGED_OFFSET_X: 1;
5823
+ readonly OT_SCENE_SCROLL_CHANGED_OFFSET_Y: 2;
5824
+ readonly OT_SCENE_SCROLL_CHANGED_CONTENT: 4;
5825
+ readonly OT_SCENE_SCROLL_CHANGED_VIEWPORT: 8;
5826
+ readonly OT_SCENE_SCROLL_CHANGED_LAYOUT: 16;
5531
5827
  readonly OT_SCENE_DEBUG_FULL_FRAME: 1;
5828
+ readonly OT_SCENE_DEBUG_VERIFY: 2;
5532
5829
  readonly OT_SESSION_OPEN: 0;
5533
5830
  readonly OT_SESSION_CLOSING: 1;
5534
5831
  readonly OT_SESSION_CLOSED_STATE: 2;
@@ -5615,6 +5912,8 @@ export declare const nativeConstants: {
5615
5912
  readonly OT_EDIT_POSITION_OFFSET: 4;
5616
5913
  readonly OT_EDIT_POSITION_COORDS: 5;
5617
5914
  readonly OT_EDIT_POSITION_LINE_START: 6;
5915
+ readonly OT_EDIT_POSITION_END: 7;
5916
+ readonly OT_EDIT_POSITION_PREV_CHAR: 8;
5618
5917
  readonly OT_EDITOR_STYLE_FOREGROUND: 1;
5619
5918
  readonly OT_EDITOR_STYLE_BACKGROUND: 2;
5620
5919
  readonly OT_EDITOR_STYLE_ATTRIBUTES: 4;
@@ -5732,6 +6031,10 @@ export declare const nativeConstants: {
5732
6031
  readonly OT_TERMINAL_MOUSE: 2;
5733
6032
  readonly OT_TERMINAL_MOUSE_MOVEMENT: 4;
5734
6033
  readonly OT_TERMINAL_CLEAR_ON_CLOSE: 8;
6034
+ readonly OT_TERMINAL_REPLY_SENTINEL: 16;
6035
+ readonly OT_TERMINAL_SYNC_ALWAYS: 32;
6036
+ readonly OT_TERMINAL_SYNC_NEVER: 64;
6037
+ readonly OT_TERMINAL_HOST_MULTIPLEXER: 128;
5735
6038
  readonly OT_CONTROL_CAPABILITY_RESPONSE: 1;
5736
6039
  readonly OT_CONTROL_TITLE: 2;
5737
6040
  readonly OT_CONTROL_MOUSE: 3;
@@ -5899,6 +6202,7 @@ export declare const nativeConstants: {
5899
6202
  readonly OT_INPUT_EXPECT_REPLIES: 1;
5900
6203
  readonly OT_INPUT_EXPECT_KITTY_KEYBOARD: 2;
5901
6204
  readonly OT_INPUT_EXPECT_CURSOR_POSITION: 4;
6205
+ readonly OT_INPUT_EXPECT_SENTINEL: 8;
5902
6206
  readonly OT_INPUT_EVENTS_MIN: 4;
5903
6207
  readonly OT_INPUT_PAYLOAD_BYTES_MIN: 4384;
5904
6208
  readonly OT_INPUT_TIMEOUT_NS: 20000000;
@@ -5918,7 +6222,7 @@ export declare const nativeConstants: {
5918
6222
  readonly OT_SCENE_RECORD_COLOR_MATRIX: 7;
5919
6223
  readonly OT_SCENE_RECORD_TEXT_VIEW: 8;
5920
6224
  readonly OT_SCENE_RECORD_EDITOR_VIEW: 9;
5921
- readonly OT_SCENE_RECORD_SCENE_TEXT: 10;
6225
+ readonly OT_SCENE_RECORD_SCENE_BODY: 10;
5922
6226
  readonly OT_SCENE_RECORD_IMAGE: 11;
5923
6227
  readonly OT_SCENE_RECORD_UNICODE: 12;
5924
6228
  readonly OT_SCENE_RECORD_GRAYSCALE_FOREGROUND: 1;
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "main": "index.node.js",
5
5
  "types": "index.d.ts",
6
6
  "type": "module",
7
- "version": "0.7.0",
7
+ "version": "0.8.0",
8
8
  "description": "OpenTUI is a TypeScript library on a native Zig core for building terminal user interfaces (TUIs)",
9
9
  "license": "MIT",
10
10
  "repository": {
@@ -78,13 +78,13 @@
78
78
  "web-tree-sitter": "0.25.10"
79
79
  },
80
80
  "optionalDependencies": {
81
- "@opentui/core-darwin-x64": "0.7.0",
82
- "@opentui/core-darwin-arm64": "0.7.0",
83
- "@opentui/core-linux-x64": "0.7.0",
84
- "@opentui/core-linux-arm64": "0.7.0",
85
- "@opentui/core-win32-x64": "0.7.0",
86
- "@opentui/core-win32-arm64": "0.7.0",
87
- "@opentui/core-linux-x64-musl": "0.7.0",
88
- "@opentui/core-linux-arm64-musl": "0.7.0"
81
+ "@opentui/core-darwin-x64": "0.8.0",
82
+ "@opentui/core-darwin-arm64": "0.8.0",
83
+ "@opentui/core-linux-x64": "0.8.0",
84
+ "@opentui/core-linux-arm64": "0.8.0",
85
+ "@opentui/core-win32-x64": "0.8.0",
86
+ "@opentui/core-win32-arm64": "0.8.0",
87
+ "@opentui/core-linux-x64-musl": "0.8.0",
88
+ "@opentui/core-linux-arm64-musl": "0.8.0"
89
89
  }
90
90
  }
@@ -4,6 +4,7 @@ import type { RenderContext } from "../types.js";
4
4
  export interface FrameBufferOptions extends RenderableOptions<FrameBufferRenderable> {
5
5
  width: number;
6
6
  height: number;
7
+ /** Blend the buffer's cells into the frame. Without it, the cells are copied, transparent ones too. */
7
8
  respectAlpha?: boolean;
8
9
  }
9
10
  export declare class FrameBufferRenderable extends Renderable {
@@ -83,3 +83,9 @@ export declare class ArrowRenderable extends Renderable {
83
83
  private glyphWidth;
84
84
  private getArrowChar;
85
85
  }
86
+ /** @internal Cells per unit of a scrollbar's `scrollBy`. */
87
+ export declare function scrollUnitSize(bar: {
88
+ viewportSize: number;
89
+ scrollSize: number;
90
+ scrollStep?: number | null;
91
+ }, unit: ScrollUnit): number;