@opentui/core 0.6.7 → 0.7.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 (48) hide show
  1. package/NativeScene.d.ts +5 -26
  2. package/Renderable.d.ts +27 -32
  3. package/audio.d.ts +1 -0
  4. package/{chunk-bun-ehr9v0n8.js → chunk-bun-qkpm62w1.js} +257 -69
  5. package/chunk-bun-qkpm62w1.js.map +35 -0
  6. package/{chunk-bun-rk6266v5.js → chunk-bun-zevtbcf6.js} +851 -786
  7. package/chunk-bun-zevtbcf6.js.map +70 -0
  8. package/{chunk-node-y5p1g2pb.js → chunk-node-7bcmqh18.js} +851 -786
  9. package/chunk-node-7bcmqh18.js.map +70 -0
  10. package/{chunk-node-jhq62x0c.js → chunk-node-mzgnr3sw.js} +257 -69
  11. package/chunk-node-mzgnr3sw.js.map +34 -0
  12. package/index.bun.js +313 -91
  13. package/index.bun.js.map +12 -11
  14. package/index.node.js +313 -91
  15. package/index.node.js.map +12 -10
  16. package/lib/detect-links.d.ts +2 -0
  17. package/lib/parse.keypress-kitty.d.ts +2 -0
  18. package/lib/scroll-chain.d.ts +16 -0
  19. package/lib/stdin-parser-native.d.ts +88 -0
  20. package/native-abi.generated.d.ts +394 -5
  21. package/package.json +9 -9
  22. package/renderables/Box.d.ts +2 -2
  23. package/renderables/Code.d.ts +2 -1
  24. package/renderables/Diff.d.ts +2 -2
  25. package/renderables/EditBufferRenderable.d.ts +2 -2
  26. package/renderables/EmbeddedTerminal.d.ts +2 -2
  27. package/renderables/FrameBuffer.d.ts +3 -3
  28. package/renderables/Image.d.ts +2 -2
  29. package/renderables/Markdown.d.ts +2 -2
  30. package/renderables/ScrollBar.d.ts +3 -3
  31. package/renderables/ScrollBox.d.ts +6 -3
  32. package/renderables/Slider.d.ts +2 -2
  33. package/renderables/Text.d.ts +2 -2
  34. package/renderables/TextBufferRenderable.d.ts +2 -4
  35. package/renderer.d.ts +8 -4
  36. package/testing/test-renderer.d.ts +2 -0
  37. package/testing.bun.js +11 -4
  38. package/testing.bun.js.map +3 -3
  39. package/testing.js +11 -4
  40. package/testing.js.map +3 -3
  41. package/yoga.bun.js +1 -1
  42. package/yoga.js +1 -1
  43. package/zig-structs.d.ts +25 -0
  44. package/zig.d.ts +20 -7
  45. package/chunk-bun-ehr9v0n8.js.map +0 -35
  46. package/chunk-bun-rk6266v5.js.map +0 -69
  47. package/chunk-node-jhq62x0c.js.map +0 -34
  48. package/chunk-node-y5p1g2pb.js.map +0 -69
@@ -1,3 +1,4 @@
1
+ import type { SyntaxStyle } from "../syntax-style.js";
1
2
  import type { TextChunk } from "../text-buffer.js";
2
3
  import type { SimpleHighlight } from "./tree-sitter/types.js";
3
4
  export declare function normalizeMarkdownLinkTarget(destination: string): string;
@@ -8,4 +9,5 @@ export declare function detectLinks(chunks: TextChunk[], context: {
8
9
  start: number;
9
10
  end: number;
10
11
  }>;
12
+ syntaxStyle?: SyntaxStyle;
11
13
  }): TextChunk[];
@@ -1,3 +1,5 @@
1
1
  import type { ParsedKey } from "./parse.keypress.js";
2
+ export declare const kittyKeyMap: Record<number, string>;
2
3
  export declare const kittyNamedSingleStrokeKeys: string[];
4
+ export declare const printableKeypadText: Record<string, string>;
3
5
  export declare function parseKittyKeyboard(sequence: string): ParsedKey | null;
@@ -0,0 +1,16 @@
1
+ import type { ScrollInfo } from "./parse.mouse.js";
2
+ type Node = {
3
+ parent: Node | null;
4
+ };
5
+ /** The axis direction of a wheel step: Shift turns vertical steps sideways and sideways steps vertical. */
6
+ export declare function wheelDirection(event: {
7
+ scroll?: ScrollInfo;
8
+ modifiers?: {
9
+ shift: boolean;
10
+ };
11
+ }): ScrollInfo["direction"] | undefined;
12
+ /** A wheel step belongs to the innermost scroller on its path that can still move that way. Runs `scroll` unless a
13
+ * scroller inside `scroller` already took this event; `scroll` returns whether `scroller` takes it. Listeners further
14
+ * out still see the event; only scrolling stops. */
15
+ export declare function scrollOnce(event: object, scroller: Node, scroll: () => boolean): void;
16
+ export {};
@@ -0,0 +1,88 @@
1
+ import { type NativeContextHandle, type RenderLib, type SessionHandle } from "../zig.js";
2
+ import type { StdinEvent, StdinParserOptions, StdinParserProtocolContext } from "./stdin-parser.js";
3
+ export interface NativeInputSession {
4
+ lib: RenderLib;
5
+ context: NativeContextHandle;
6
+ session: SessionHandle;
7
+ }
8
+ export interface NativeStdinParserOptions extends Pick<StdinParserOptions, "armTimeouts" | "onTimeoutFlush" | "protocolContext" | "clock"> {
9
+ /** Parse through this Session's input parser. Without one, the parser owns a private Context and Session. */
10
+ session?: NativeInputSession;
11
+ }
12
+ /**
13
+ * Same surface as StdinParser for renderer.ts, without the hooks that coordinated
14
+ * parser and renderer state: a deferred reply has no deadline, so CPR aborts and
15
+ * pixel queries need no special handling; suspension needs only suspend and resume.
16
+ */
17
+ export declare class NativeStdinParser {
18
+ private readonly lib;
19
+ private readonly context;
20
+ private readonly session;
21
+ private readonly ownsContext;
22
+ private readonly records;
23
+ private readonly words;
24
+ private readonly halves;
25
+ private readonly payload;
26
+ private readonly events;
27
+ private readonly clock;
28
+ private readonly armTimeouts;
29
+ private readonly onTimeoutFlush;
30
+ private protocolContext;
31
+ private appliedExpectations;
32
+ private timeoutId;
33
+ private deadlineNs;
34
+ private lastNs;
35
+ private paste;
36
+ private suspended;
37
+ private sessionGone;
38
+ private destroyed;
39
+ constructor(options?: NativeStdinParserOptions);
40
+ updateProtocolContext(patch: Partial<StdinParserProtocolContext>): void;
41
+ push(data: Uint8Array): void;
42
+ read(): StdinEvent | null;
43
+ drain(onEvent: (event: StdinEvent) => void): void;
44
+ /** Resolves a partial unit whose deadline has passed at `nowMsValue`. */
45
+ flushTimeout(nowMsValue?: number): void;
46
+ /** Stops input time and the timer: a unit pending at suspension can still complete on resume. */
47
+ suspend(): void;
48
+ /**
49
+ * Call after feeding the input drained on resume. Input sent before suspension has
50
+ * arrived, so a unit still pending is stale (another process may have read its rest)
51
+ * and is dropped. Only the prefix of a reply the host still awaits keeps waiting.
52
+ */
53
+ resume(): void;
54
+ reset(): void;
55
+ destroy(): void;
56
+ private ensureAlive;
57
+ /** Runs a native call. A Session or Context that closed, failed, or was destroyed ends parsing quietly. */
58
+ private native;
59
+ private destroyContext;
60
+ private applyExpectations;
61
+ private toNs;
62
+ private nowNs;
63
+ private feed;
64
+ private reconcileTimeout;
65
+ private clearTimeout;
66
+ private span;
67
+ private translate;
68
+ }
69
+ /**
70
+ * Pairs the events of the delivering parser with the events of a parser that only
71
+ * sees the same input (OTUI_NATIVE_INPUT_SHADOW) and logs one line per difference.
72
+ * Events pair in order, so the parsers' separate timers cannot misalign them. After
73
+ * a difference, pairing resumes once each side has reported its next event.
74
+ */
75
+ export declare class StdinShadowComparator {
76
+ private readonly primaryName;
77
+ private readonly log;
78
+ private readonly delivered;
79
+ private readonly shadowed;
80
+ constructor(primaryName: "legacy" | "native", log: (line: string) => void);
81
+ primary(event: StdinEvent): void;
82
+ shadow(event: StdinEvent): void;
83
+ /** Reports every event still unpaired. Call when both parsers have stopped. */
84
+ flush(): void;
85
+ private queue;
86
+ private pair;
87
+ private report;
88
+ }
@@ -4,7 +4,7 @@ export declare const nativeSymbols: {
4
4
  readonly returns: "i32";
5
5
  };
6
6
  readonly ot_scene_frame_step_with_geometry: {
7
- readonly args: readonly ["ptr", "buffer", "ptr", "buffer", "u32", "ptr", "u32", "buffer", "buffer"];
7
+ readonly args: readonly ["ptr", "buffer", "ptr", "buffer", "ptr", "u32", "buffer", "buffer"];
8
8
  readonly returns: "i32";
9
9
  };
10
10
  readonly ot_scene_frame_get_paint_slots: {
@@ -135,6 +135,10 @@ export declare const nativeSymbols: {
135
135
  readonly args: readonly ["ptr", "buffer", "buffer"];
136
136
  readonly returns: "i32";
137
137
  };
138
+ readonly ot_scene_set_debug_flags: {
139
+ readonly args: readonly ["ptr", "buffer", "u32"];
140
+ readonly returns: "i32";
141
+ };
138
142
  readonly ot_scene_get_cursor_state: {
139
143
  readonly args: readonly ["ptr", "buffer", "buffer"];
140
144
  readonly returns: "i32";
@@ -819,6 +823,18 @@ export declare const nativeSymbols: {
819
823
  readonly args: readonly ["ptr", "buffer", "u64", "u32", "buffer"];
820
824
  readonly returns: "i32";
821
825
  };
826
+ readonly ot_session_input_feed: {
827
+ readonly args: readonly ["ptr", "buffer", "ptr", "u32", "u64", "buffer", "u32", "buffer", "u32", "buffer"];
828
+ readonly returns: "i32";
829
+ };
830
+ readonly ot_session_input_expect: {
831
+ readonly args: readonly ["ptr", "buffer", "u32"];
832
+ readonly returns: "i32";
833
+ };
834
+ readonly ot_session_input_reset: {
835
+ readonly args: readonly ["ptr", "buffer", "u32"];
836
+ readonly returns: "i32";
837
+ };
822
838
  readonly ot_session_get_write_limit: {
823
839
  readonly args: readonly ["ptr", "buffer", "buffer"];
824
840
  readonly returns: "i32";
@@ -1676,7 +1692,7 @@ export declare const nativeLayouts: {
1676
1692
  };
1677
1693
  };
1678
1694
  readonly ot_scene_stats: {
1679
- readonly size: 64;
1695
+ readonly size: 224;
1680
1696
  readonly alignment: 8;
1681
1697
  readonly fields: {
1682
1698
  readonly struct_size: {
@@ -1745,6 +1761,138 @@ export declare const nativeLayouts: {
1745
1761
  readonly alignment: 4;
1746
1762
  readonly type: "u32";
1747
1763
  };
1764
+ readonly work_frame_id: {
1765
+ readonly offset: 64;
1766
+ readonly size: 8;
1767
+ readonly alignment: 8;
1768
+ readonly type: "u64";
1769
+ };
1770
+ readonly candidate_visits: {
1771
+ readonly offset: 72;
1772
+ readonly size: 8;
1773
+ readonly alignment: 8;
1774
+ readonly type: "u64";
1775
+ };
1776
+ readonly paint_visits: {
1777
+ readonly offset: 80;
1778
+ readonly size: 8;
1779
+ readonly alignment: 8;
1780
+ readonly type: "u64";
1781
+ };
1782
+ readonly view_preparations: {
1783
+ readonly offset: 88;
1784
+ readonly size: 8;
1785
+ readonly alignment: 8;
1786
+ readonly type: "u64";
1787
+ };
1788
+ readonly geometry_reads: {
1789
+ readonly offset: 96;
1790
+ readonly size: 8;
1791
+ readonly alignment: 8;
1792
+ readonly type: "u64";
1793
+ };
1794
+ readonly yoga_solves: {
1795
+ readonly offset: 104;
1796
+ readonly size: 8;
1797
+ readonly alignment: 8;
1798
+ readonly type: "u64";
1799
+ };
1800
+ readonly feedback_operations: {
1801
+ readonly offset: 112;
1802
+ readonly size: 8;
1803
+ readonly alignment: 8;
1804
+ readonly type: "u64";
1805
+ };
1806
+ readonly visibility_steps: {
1807
+ readonly offset: 120;
1808
+ readonly size: 8;
1809
+ readonly alignment: 8;
1810
+ readonly type: "u64";
1811
+ };
1812
+ readonly viewport_child_refreshes: {
1813
+ readonly offset: 128;
1814
+ readonly size: 8;
1815
+ readonly alignment: 8;
1816
+ readonly type: "u64";
1817
+ };
1818
+ readonly overlap_tests: {
1819
+ readonly offset: 136;
1820
+ readonly size: 8;
1821
+ readonly alignment: 8;
1822
+ readonly type: "u64";
1823
+ };
1824
+ readonly members_painted: {
1825
+ readonly offset: 144;
1826
+ readonly size: 8;
1827
+ readonly alignment: 8;
1828
+ readonly type: "u64";
1829
+ };
1830
+ readonly member_cells: {
1831
+ readonly offset: 152;
1832
+ readonly size: 8;
1833
+ readonly alignment: 8;
1834
+ readonly type: "u64";
1835
+ };
1836
+ readonly cells_cleared: {
1837
+ readonly offset: 160;
1838
+ readonly size: 8;
1839
+ readonly alignment: 8;
1840
+ readonly type: "u64";
1841
+ };
1842
+ readonly hit_cells_written: {
1843
+ readonly offset: 168;
1844
+ readonly size: 8;
1845
+ readonly alignment: 8;
1846
+ readonly type: "u64";
1847
+ };
1848
+ readonly hit_cells_cleared: {
1849
+ readonly offset: 176;
1850
+ readonly size: 8;
1851
+ readonly alignment: 8;
1852
+ readonly type: "u64";
1853
+ };
1854
+ readonly hit_cells_compared: {
1855
+ readonly offset: 184;
1856
+ readonly size: 8;
1857
+ readonly alignment: 8;
1858
+ readonly type: "u64";
1859
+ };
1860
+ readonly rows_compared: {
1861
+ readonly offset: 192;
1862
+ readonly size: 8;
1863
+ readonly alignment: 8;
1864
+ readonly type: "u64";
1865
+ };
1866
+ readonly rows_diffed: {
1867
+ readonly offset: 200;
1868
+ readonly size: 8;
1869
+ readonly alignment: 8;
1870
+ readonly type: "u64";
1871
+ };
1872
+ readonly full_path_reasons: {
1873
+ readonly offset: 208;
1874
+ readonly size: 4;
1875
+ readonly alignment: 4;
1876
+ readonly type: "u32";
1877
+ };
1878
+ readonly host_requests: {
1879
+ readonly offset: 212;
1880
+ readonly size: 4;
1881
+ readonly alignment: 4;
1882
+ readonly type: "u32";
1883
+ };
1884
+ readonly layout_rounds: {
1885
+ readonly offset: 216;
1886
+ readonly size: 4;
1887
+ readonly alignment: 4;
1888
+ readonly type: "u32";
1889
+ };
1890
+ readonly reserved: {
1891
+ readonly offset: 220;
1892
+ readonly size: 4;
1893
+ readonly alignment: 4;
1894
+ readonly type: "u32";
1895
+ };
1748
1896
  };
1749
1897
  };
1750
1898
  readonly ot_scene_cursor_state: {
@@ -4435,6 +4583,132 @@ export declare const nativeLayouts: {
4435
4583
  };
4436
4584
  };
4437
4585
  };
4586
+ readonly ot_input_event: {
4587
+ readonly size: 32;
4588
+ readonly alignment: 4;
4589
+ readonly fields: {
4590
+ readonly kind: {
4591
+ readonly offset: 0;
4592
+ readonly size: 1;
4593
+ readonly alignment: 1;
4594
+ readonly type: "u8";
4595
+ };
4596
+ readonly action: {
4597
+ readonly offset: 1;
4598
+ readonly size: 1;
4599
+ readonly alignment: 1;
4600
+ readonly type: "u8";
4601
+ };
4602
+ readonly modifiers: {
4603
+ readonly offset: 2;
4604
+ readonly size: 1;
4605
+ readonly alignment: 1;
4606
+ readonly type: "u8";
4607
+ };
4608
+ readonly flags: {
4609
+ readonly offset: 3;
4610
+ readonly size: 1;
4611
+ readonly alignment: 1;
4612
+ readonly type: "u8";
4613
+ };
4614
+ readonly code: {
4615
+ readonly offset: 4;
4616
+ readonly size: 4;
4617
+ readonly alignment: 4;
4618
+ readonly type: "u32";
4619
+ };
4620
+ readonly base_code: {
4621
+ readonly offset: 8;
4622
+ readonly size: 4;
4623
+ readonly alignment: 4;
4624
+ readonly type: "u32";
4625
+ };
4626
+ readonly x: {
4627
+ readonly offset: 12;
4628
+ readonly size: 2;
4629
+ readonly alignment: 2;
4630
+ readonly type: "u16";
4631
+ };
4632
+ readonly y: {
4633
+ readonly offset: 14;
4634
+ readonly size: 2;
4635
+ readonly alignment: 2;
4636
+ readonly type: "u16";
4637
+ };
4638
+ readonly raw_offset: {
4639
+ readonly offset: 16;
4640
+ readonly size: 4;
4641
+ readonly alignment: 4;
4642
+ readonly type: "u32";
4643
+ };
4644
+ readonly raw_len: {
4645
+ readonly offset: 20;
4646
+ readonly size: 4;
4647
+ readonly alignment: 4;
4648
+ readonly type: "u32";
4649
+ };
4650
+ readonly text_offset: {
4651
+ readonly offset: 24;
4652
+ readonly size: 4;
4653
+ readonly alignment: 4;
4654
+ readonly type: "u32";
4655
+ };
4656
+ readonly text_len: {
4657
+ readonly offset: 28;
4658
+ readonly size: 4;
4659
+ readonly alignment: 4;
4660
+ readonly type: "u32";
4661
+ };
4662
+ };
4663
+ };
4664
+ readonly ot_input_drain: {
4665
+ readonly size: 32;
4666
+ readonly alignment: 8;
4667
+ readonly fields: {
4668
+ readonly struct_size: {
4669
+ readonly offset: 0;
4670
+ readonly size: 4;
4671
+ readonly alignment: 4;
4672
+ readonly type: "u32";
4673
+ };
4674
+ readonly abi_version: {
4675
+ readonly offset: 4;
4676
+ readonly size: 4;
4677
+ readonly alignment: 4;
4678
+ readonly type: "u32";
4679
+ };
4680
+ readonly consumed: {
4681
+ readonly offset: 8;
4682
+ readonly size: 4;
4683
+ readonly alignment: 4;
4684
+ readonly type: "u32";
4685
+ };
4686
+ readonly count: {
4687
+ readonly offset: 12;
4688
+ readonly size: 4;
4689
+ readonly alignment: 4;
4690
+ readonly type: "u32";
4691
+ };
4692
+ readonly payload_len: {
4693
+ readonly offset: 16;
4694
+ readonly size: 4;
4695
+ readonly alignment: 4;
4696
+ readonly type: "u32";
4697
+ };
4698
+ readonly discarded: {
4699
+ readonly offset: 20;
4700
+ readonly size: 4;
4701
+ readonly alignment: 4;
4702
+ readonly type: "u32";
4703
+ };
4704
+ readonly deadline_ns: {
4705
+ readonly offset: 24;
4706
+ readonly size: 8;
4707
+ readonly alignment: 8;
4708
+ readonly type: "u64";
4709
+ };
4710
+ };
4711
+ };
4438
4712
  readonly ot_context_options: {
4439
4713
  readonly size: 32;
4440
4714
  readonly alignment: 4;
@@ -5037,7 +5311,7 @@ export declare const nativeLayouts: {
5037
5311
  };
5038
5312
  };
5039
5313
  export declare const nativeConstants: {
5040
- readonly OT_CONTEXT_ABI_VERSION: 1;
5314
+ readonly OT_CONTEXT_ABI_VERSION: 2;
5041
5315
  readonly OT_OK: 0;
5042
5316
  readonly OT_INVALID_ARGUMENT: -1;
5043
5317
  readonly OT_UNSUPPORTED_VERSION: -2;
@@ -5222,6 +5496,9 @@ export declare const nativeConstants: {
5222
5496
  readonly OT_SCENE_TEXT_BACKGROUND: 2;
5223
5497
  readonly OT_SCENE_TEXT_LINK: 4;
5224
5498
  readonly OT_SCENE_MUTATIONS_MAX: 4096;
5499
+ readonly OT_SCENE_FULL_PATH_FORCED: 1;
5500
+ readonly OT_SCENE_FULL_PATH_SCREEN: 2;
5501
+ readonly OT_SCENE_FULL_PATH_IMAGES: 4;
5225
5502
  readonly OT_SCENE_HOOK_UPDATE: 1;
5226
5503
  readonly OT_SCENE_HOOK_RESIZE: 2;
5227
5504
  readonly OT_SCENE_HOOK_LAYOUT_CHANGED: 4;
@@ -5234,7 +5511,6 @@ export declare const nativeConstants: {
5234
5511
  readonly OT_SCENE_FRAME_RESIZE: 2;
5235
5512
  readonly OT_SCENE_FRAME_LAYOUT_CHANGED: 3;
5236
5513
  readonly OT_SCENE_FRAME_RECORD: 4;
5237
- readonly OT_SCENE_FRAME_YIELD: 5;
5238
5514
  readonly OT_SCENE_GEOMETRY_PAINT: 1;
5239
5515
  readonly OT_SCENE_GEOMETRY_PUBLIC: 2;
5240
5516
  readonly OT_SCENE_PROPERTY_Z_INDEX: 1;
@@ -5252,6 +5528,7 @@ export declare const nativeConstants: {
5252
5528
  readonly OT_SCENE_PROPERTY_RESET_BORDER_CHARACTERS: 4096;
5253
5529
  readonly OT_SCENE_PROPERTY_RECORD_MAX: 88;
5254
5530
  readonly OT_SCENE_PROPERTY_BYTES_MAX: 360448;
5531
+ readonly OT_SCENE_DEBUG_FULL_FRAME: 1;
5255
5532
  readonly OT_SESSION_OPEN: 0;
5256
5533
  readonly OT_SESSION_CLOSING: 1;
5257
5534
  readonly OT_SESSION_CLOSED_STATE: 2;
@@ -5346,6 +5623,7 @@ export declare const nativeConstants: {
5346
5623
  readonly OT_EDIT_HIGHLIGHT_REMOVE_REF: 2;
5347
5624
  readonly OT_EDIT_HIGHLIGHT_CLEAR_LINE: 3;
5348
5625
  readonly OT_EDIT_HIGHLIGHT_CLEAR_ALL: 4;
5626
+ readonly OT_STYLE_RUN_FLAG: 2147483648;
5349
5627
  readonly OT_EDITOR_MOVE_UP: 0;
5350
5628
  readonly OT_EDITOR_MOVE_DOWN: 1;
5351
5629
  readonly OT_EDITOR_GOTO_LINE_END: 2;
@@ -5513,6 +5791,117 @@ export declare const nativeConstants: {
5513
5791
  readonly OT_PUMP_OUTPUT_PENDING: 2;
5514
5792
  readonly OT_PUMP_WAIT_UNTIL: 3;
5515
5793
  readonly OT_PUMP_CLOSED: 4;
5794
+ readonly OT_INPUT_KEY: 1;
5795
+ readonly OT_INPUT_MOUSE: 2;
5796
+ readonly OT_INPUT_PASTE: 3;
5797
+ readonly OT_INPUT_FOCUS: 4;
5798
+ readonly OT_INPUT_REPLY: 5;
5799
+ readonly OT_INPUT_KEY_PRESS: 1;
5800
+ readonly OT_INPUT_KEY_REPEAT: 2;
5801
+ readonly OT_INPUT_KEY_RELEASE: 3;
5802
+ readonly OT_INPUT_MOUSE_DOWN: 1;
5803
+ readonly OT_INPUT_MOUSE_UP: 2;
5804
+ readonly OT_INPUT_MOUSE_MOVE: 3;
5805
+ readonly OT_INPUT_MOUSE_DRAG: 4;
5806
+ readonly OT_INPUT_MOUSE_SCROLL: 5;
5807
+ readonly OT_INPUT_MOUSE_BUTTON_NONE: 255;
5808
+ readonly OT_INPUT_FOCUS_OUT: 0;
5809
+ readonly OT_INPUT_FOCUS_IN: 1;
5810
+ readonly OT_INPUT_MOD_SHIFT: 1;
5811
+ readonly OT_INPUT_MOD_ALT: 2;
5812
+ readonly OT_INPUT_MOD_CTRL: 4;
5813
+ readonly OT_INPUT_MOD_SUPER: 8;
5814
+ readonly OT_INPUT_MOD_HYPER: 16;
5815
+ readonly OT_INPUT_MOD_META: 32;
5816
+ readonly OT_INPUT_MOD_CAPS_LOCK: 64;
5817
+ readonly OT_INPUT_MOD_NUM_LOCK: 128;
5818
+ readonly OT_INPUT_KEY_KITTY: 1;
5819
+ readonly OT_INPUT_KEY_TEXT_TRUNCATED: 2;
5820
+ readonly OT_INPUT_PASTE_START: 1;
5821
+ readonly OT_INPUT_PASTE_END: 2;
5822
+ readonly OT_INPUT_REPLY_FRAGMENT: 1;
5823
+ readonly OT_INPUT_REPLY_CURSOR_POSITION: 2;
5824
+ readonly OT_INPUT_REPLY_CSI: 1;
5825
+ readonly OT_INPUT_REPLY_SS3: 2;
5826
+ readonly OT_INPUT_REPLY_OSC: 3;
5827
+ readonly OT_INPUT_REPLY_DCS: 4;
5828
+ readonly OT_INPUT_REPLY_APC: 5;
5829
+ readonly OT_INPUT_KEY_ESCAPE: 27;
5830
+ readonly OT_INPUT_KEY_ENTER: 13;
5831
+ readonly OT_INPUT_KEY_TAB: 9;
5832
+ readonly OT_INPUT_KEY_BACKSPACE: 127;
5833
+ readonly OT_INPUT_KEY_INSERT: 57348;
5834
+ readonly OT_INPUT_KEY_DELETE: 57349;
5835
+ readonly OT_INPUT_KEY_LEFT: 57350;
5836
+ readonly OT_INPUT_KEY_RIGHT: 57351;
5837
+ readonly OT_INPUT_KEY_UP: 57352;
5838
+ readonly OT_INPUT_KEY_DOWN: 57353;
5839
+ readonly OT_INPUT_KEY_PAGE_UP: 57354;
5840
+ readonly OT_INPUT_KEY_PAGE_DOWN: 57355;
5841
+ readonly OT_INPUT_KEY_HOME: 57356;
5842
+ readonly OT_INPUT_KEY_END: 57357;
5843
+ readonly OT_INPUT_KEY_CAPS_LOCK: 57358;
5844
+ readonly OT_INPUT_KEY_SCROLL_LOCK: 57359;
5845
+ readonly OT_INPUT_KEY_NUM_LOCK: 57360;
5846
+ readonly OT_INPUT_KEY_PRINT_SCREEN: 57361;
5847
+ readonly OT_INPUT_KEY_PAUSE: 57362;
5848
+ readonly OT_INPUT_KEY_MENU: 57363;
5849
+ readonly OT_INPUT_KEY_F1: 57364;
5850
+ readonly OT_INPUT_KEY_F35: 57398;
5851
+ readonly OT_INPUT_KEY_KP_0: 57399;
5852
+ readonly OT_INPUT_KEY_KP_9: 57408;
5853
+ readonly OT_INPUT_KEY_KP_DECIMAL: 57409;
5854
+ readonly OT_INPUT_KEY_KP_DIVIDE: 57410;
5855
+ readonly OT_INPUT_KEY_KP_MULTIPLY: 57411;
5856
+ readonly OT_INPUT_KEY_KP_SUBTRACT: 57412;
5857
+ readonly OT_INPUT_KEY_KP_ADD: 57413;
5858
+ readonly OT_INPUT_KEY_KP_ENTER: 57414;
5859
+ readonly OT_INPUT_KEY_KP_EQUAL: 57415;
5860
+ readonly OT_INPUT_KEY_KP_SEPARATOR: 57416;
5861
+ readonly OT_INPUT_KEY_KP_LEFT: 57417;
5862
+ readonly OT_INPUT_KEY_KP_RIGHT: 57418;
5863
+ readonly OT_INPUT_KEY_KP_UP: 57419;
5864
+ readonly OT_INPUT_KEY_KP_DOWN: 57420;
5865
+ readonly OT_INPUT_KEY_KP_PAGE_UP: 57421;
5866
+ readonly OT_INPUT_KEY_KP_PAGE_DOWN: 57422;
5867
+ readonly OT_INPUT_KEY_KP_HOME: 57423;
5868
+ readonly OT_INPUT_KEY_KP_END: 57424;
5869
+ readonly OT_INPUT_KEY_KP_INSERT: 57425;
5870
+ readonly OT_INPUT_KEY_KP_DELETE: 57426;
5871
+ readonly OT_INPUT_KEY_KP_BEGIN: 57427;
5872
+ readonly OT_INPUT_KEY_MEDIA_PLAY: 57428;
5873
+ readonly OT_INPUT_KEY_MEDIA_PAUSE: 57429;
5874
+ readonly OT_INPUT_KEY_MEDIA_PLAY_PAUSE: 57430;
5875
+ readonly OT_INPUT_KEY_MEDIA_REVERSE: 57431;
5876
+ readonly OT_INPUT_KEY_MEDIA_STOP: 57432;
5877
+ readonly OT_INPUT_KEY_MEDIA_FAST_FORWARD: 57433;
5878
+ readonly OT_INPUT_KEY_MEDIA_REWIND: 57434;
5879
+ readonly OT_INPUT_KEY_MEDIA_TRACK_NEXT: 57435;
5880
+ readonly OT_INPUT_KEY_MEDIA_TRACK_PREVIOUS: 57436;
5881
+ readonly OT_INPUT_KEY_MEDIA_RECORD: 57437;
5882
+ readonly OT_INPUT_KEY_LOWER_VOLUME: 57438;
5883
+ readonly OT_INPUT_KEY_RAISE_VOLUME: 57439;
5884
+ readonly OT_INPUT_KEY_MUTE_VOLUME: 57440;
5885
+ readonly OT_INPUT_KEY_LEFT_SHIFT: 57441;
5886
+ readonly OT_INPUT_KEY_LEFT_CONTROL: 57442;
5887
+ readonly OT_INPUT_KEY_LEFT_ALT: 57443;
5888
+ readonly OT_INPUT_KEY_LEFT_SUPER: 57444;
5889
+ readonly OT_INPUT_KEY_LEFT_HYPER: 57445;
5890
+ readonly OT_INPUT_KEY_LEFT_META: 57446;
5891
+ readonly OT_INPUT_KEY_RIGHT_SHIFT: 57447;
5892
+ readonly OT_INPUT_KEY_RIGHT_CONTROL: 57448;
5893
+ readonly OT_INPUT_KEY_RIGHT_ALT: 57449;
5894
+ readonly OT_INPUT_KEY_RIGHT_SUPER: 57450;
5895
+ readonly OT_INPUT_KEY_RIGHT_HYPER: 57451;
5896
+ readonly OT_INPUT_KEY_RIGHT_META: 57452;
5897
+ readonly OT_INPUT_KEY_ISO_LEVEL3_SHIFT: 57453;
5898
+ readonly OT_INPUT_KEY_ISO_LEVEL5_SHIFT: 57454;
5899
+ readonly OT_INPUT_EXPECT_REPLIES: 1;
5900
+ readonly OT_INPUT_EXPECT_KITTY_KEYBOARD: 2;
5901
+ readonly OT_INPUT_EXPECT_CURSOR_POSITION: 4;
5902
+ readonly OT_INPUT_EVENTS_MIN: 4;
5903
+ readonly OT_INPUT_PAYLOAD_BYTES_MIN: 4384;
5904
+ readonly OT_INPUT_TIMEOUT_NS: 20000000;
5516
5905
  readonly OT_DIAGNOSTIC_MESSAGE_BYTES: 4096;
5517
5906
  readonly OT_DIAGNOSTIC_TRUNCATED: 1;
5518
5907
  readonly OT_SCENE_RECORD_BYTES_MAX: 67108864;
@@ -5535,6 +5924,7 @@ export declare const nativeConstants: {
5535
5924
  readonly OT_SCENE_RECORD_GRAYSCALE_FOREGROUND: 1;
5536
5925
  readonly OT_SCENE_RECORD_GRAYSCALE_BACKGROUND: 2;
5537
5926
  readonly OT_SCENE_RECORD_GRAYSCALE_SUPERSAMPLED: 4;
5927
+ readonly OT_INPUT_RESET_KEEP_REPLY: 1;
5538
5928
  readonly OT_CLIPBOARD_OPERATION_PENDING: 0;
5539
5929
  readonly OT_CLIPBOARD_OPERATION_READ: 1;
5540
5930
  readonly OT_CLIPBOARD_OPERATION_EMPTY: 2;
@@ -5567,4 +5957,3 @@ export declare const nativeConstants: {
5567
5957
  readonly OT_CLIPBOARD_SHUTDOWN_READY: 1;
5568
5958
  readonly OT_CLIPBOARD_SHUTDOWN_INVALID_HANDLE: 2;
5569
5959
  };
5570
- export declare const nativeStyleEnumMaxima: readonly [2, 3, 5, 8, 8, 8, 2, 2, 2, 1, 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.6.7",
7
+ "version": "0.7.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.6.7",
82
- "@opentui/core-darwin-arm64": "0.6.7",
83
- "@opentui/core-linux-x64": "0.6.7",
84
- "@opentui/core-linux-arm64": "0.6.7",
85
- "@opentui/core-win32-x64": "0.6.7",
86
- "@opentui/core-win32-arm64": "0.6.7",
87
- "@opentui/core-linux-x64-musl": "0.6.7",
88
- "@opentui/core-linux-arm64-musl": "0.6.7"
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"
89
89
  }
90
90
  }
@@ -1,4 +1,4 @@
1
- import { type RenderableOptions, Renderable } from "../Renderable.js";
1
+ import { type RenderableOptions, Renderable, type NativeRenderableIntegration } from "../Renderable.js";
2
2
  import type { OptimizedBuffer } from "../buffer.js";
3
3
  import { type BorderCharacters, type BorderSides, type BorderSidesConfig, type BorderStyle } from "../lib/index.js";
4
4
  import { type ColorInput, RGBA } from "../lib/RGBA.js";
@@ -23,7 +23,7 @@ export interface BoxOptions<TRenderable extends Renderable = BoxRenderable> exte
23
23
  columnGap?: number | `${number}%`;
24
24
  }
25
25
  export declare class BoxRenderable extends Renderable {
26
- static readonly nativeIntegration: import("../Renderable.js").NativeRenderableIntegration;
26
+ static readonly nativeIntegration: NativeRenderableIntegration;
27
27
  protected _backgroundColor: RGBA;
28
28
  protected _border: boolean | BorderSides[];
29
29
  protected _borderStyle: BorderStyle;
@@ -3,6 +3,7 @@ import { StyledText } from "../lib/styled-text.js";
3
3
  import { SyntaxStyle } from "../syntax-style.js";
4
4
  import { TreeSitterClient } from "../lib/tree-sitter/index.js";
5
5
  import { TextBufferRenderable, type TextBufferOptions } from "./TextBufferRenderable.js";
6
+ import type { NativeRenderableIntegration } from "../Renderable.js";
6
7
  import type { OptimizedBuffer } from "../buffer.js";
7
8
  import type { SimpleHighlight } from "../lib/tree-sitter/types.js";
8
9
  import type { TextChunk } from "../text-buffer.js";
@@ -34,7 +35,7 @@ export interface CodeOptions extends TextBufferOptions {
34
35
  onChunks?: OnChunksCallback;
35
36
  }
36
37
  export declare class CodeRenderable extends TextBufferRenderable {
37
- static readonly nativeIntegration: import("../Renderable.js").NativeRenderableIntegration;
38
+ static readonly nativeIntegration: NativeRenderableIntegration;
38
39
  private _content;
39
40
  private _filetype?;
40
41
  private _syntaxStyle;