@opentui/core 0.8.3 → 0.9.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 (87) hide show
  1. package/NativeScene.d.ts +13 -2
  2. package/Renderable.d.ts +16 -6
  3. package/ansi.d.ts +1 -1
  4. package/{chunk-bun-psdzwx7h.js → chunk-bun-rgb7yx3r.js} +8959 -9989
  5. package/chunk-bun-rgb7yx3r.js.map +68 -0
  6. package/{chunk-bun-12ttbayv.js → chunk-bun-ywheza3e.js} +664 -102
  7. package/chunk-bun-ywheza3e.js.map +35 -0
  8. package/{chunk-node-drh8dgw6.js → chunk-node-fcberveq.js} +8959 -9989
  9. package/chunk-node-fcberveq.js.map +68 -0
  10. package/{chunk-node-88t8pbzy.js → chunk-node-k5s8s41v.js} +664 -102
  11. package/chunk-node-k5s8s41v.js.map +34 -0
  12. package/edit-buffer.d.ts +40 -5
  13. package/editor-view.d.ts +28 -0
  14. package/index.bun.js +1252 -4790
  15. package/index.bun.js.map +18 -24
  16. package/index.node.js +1252 -4790
  17. package/index.node.js.map +19 -31
  18. package/lib/KeyHandler.d.ts +1 -1
  19. package/lib/extmarks.d.ts +15 -51
  20. package/lib/index.d.ts +1 -2
  21. package/lib/kitty-keys.d.ts +2 -0
  22. package/lib/parse.keypress.d.ts +8 -3
  23. package/lib/parse.mouse.d.ts +0 -13
  24. package/lib/stdin-parser-native.d.ts +36 -24
  25. package/lib/terminal-capability-detection.d.ts +3 -3
  26. package/lib/terminal-palette.d.ts +3 -0
  27. package/lib/tree-sitter/client.d.ts +14 -3
  28. package/lib/tree-sitter/types.d.ts +10 -0
  29. package/lib/tree-sitter-styled-text.d.ts +2 -0
  30. package/lib/yoga.options.d.ts +3 -0
  31. package/native-abi.generated.d.ts +1395 -0
  32. package/package.json +9 -10
  33. package/parser.worker.js +112 -29
  34. package/parser.worker.js.map +3 -3
  35. package/plugins/core-slot.d.ts +1 -1
  36. package/renderables/ASCIIFont.d.ts +5 -0
  37. package/renderables/Code.d.ts +25 -2
  38. package/renderables/Diff.d.ts +3 -1
  39. package/renderables/EditBufferRenderable.d.ts +30 -1
  40. package/renderables/EmbeddedTerminal.d.ts +1 -1
  41. package/renderables/Input.d.ts +6 -3
  42. package/renderables/LineNumberRenderable.d.ts +4 -0
  43. package/renderables/Markdown.d.ts +208 -124
  44. package/renderables/ScrollBox.d.ts +7 -2
  45. package/renderables/ScrollBoxParts.d.ts +4 -5
  46. package/renderables/Select.d.ts +2 -2
  47. package/renderables/TabSelect.d.ts +2 -2
  48. package/renderables/Text.d.ts +3 -1
  49. package/renderables/TextBufferRenderable.d.ts +2 -0
  50. package/renderables/TextTable.d.ts +6 -0
  51. package/renderables/Textarea.d.ts +2 -1
  52. package/renderables/__tests__/code-model-harness.d.ts +40 -0
  53. package/renderables/index.d.ts +1 -3
  54. package/renderables/markdown-document.d.ts +37 -0
  55. package/renderables/props.d.ts +10 -0
  56. package/renderer-theme-mode.d.ts +5 -1
  57. package/renderer.d.ts +23 -9
  58. package/runtime-plugin.js +32 -57
  59. package/runtime-plugin.js.map +1 -1
  60. package/syntax-style.d.ts +5 -0
  61. package/testing/mock-tree-sitter-client.d.ts +5 -0
  62. package/testing/model.d.ts +15 -0
  63. package/testing.bun.js +8 -31
  64. package/testing.bun.js.map +4 -4
  65. package/testing.js +8 -31
  66. package/testing.js.map +4 -4
  67. package/tests/shrink-same-check.d.ts +4 -0
  68. package/tests/yoga-upstream/tools/utils.d.ts +9 -2
  69. package/text-buffer.d.ts +4 -0
  70. package/types.d.ts +2 -2
  71. package/yoga.bun.js +1 -1
  72. package/yoga.internal.d.ts +1 -0
  73. package/yoga.js +1 -1
  74. package/zig.d.ts +104 -5
  75. package/chunk-bun-12ttbayv.js.map +0 -35
  76. package/chunk-bun-psdzwx7h.js.map +0 -70
  77. package/chunk-node-88t8pbzy.js.map +0 -34
  78. package/chunk-node-drh8dgw6.js.map +0 -70
  79. package/lib/debounce.d.ts +0 -42
  80. package/lib/extmarks-history.d.ts +0 -17
  81. package/lib/parse.keypress-kitty.d.ts +0 -5
  82. package/lib/queue.d.ts +0 -15
  83. package/lib/stdin-parser.d.ts +0 -97
  84. package/renderables/composition/VRenderable.d.ts +0 -16
  85. package/renderables/composition/constructs.d.ts +0 -35
  86. package/renderables/composition/vnode.d.ts +0 -46
  87. package/renderables/markdown-parser.d.ts +0 -12
@@ -115,6 +115,24 @@ __export(exports_yoga, {
115
115
  });
116
116
 
117
117
  // src/native-abi.generated.ts
118
+ var OT_DISPLAY_FLEX = 0;
119
+ var OT_DISPLAY_NONE = 1;
120
+ var OT_DISPLAY_CONTENTS = 2;
121
+ var OT_YOGA_ERRATA_NONE = 0;
122
+ var OT_YOGA_ERRATA_STRETCH_FLEX_BASIS = 1;
123
+ var OT_YOGA_ERRATA_ABSOLUTE_POSITION_WITHOUT_INSETS_EXCLUDES_PADDING = 2;
124
+ var OT_YOGA_ERRATA_ABSOLUTE_PERCENT_AGAINST_INNER_SIZE = 4;
125
+ var OT_YOGA_ERRATA_ALL = 2147483647;
126
+ var OT_YOGA_ERRATA_CLASSIC = 2147483646;
127
+ var OT_YOGA_EXPERIMENTAL_FEATURE_WEB_FLEX_BASIS = 0;
128
+ var OT_YOGA_LOG_LEVEL_ERROR = 0;
129
+ var OT_YOGA_LOG_LEVEL_WARN = 1;
130
+ var OT_YOGA_LOG_LEVEL_INFO = 2;
131
+ var OT_YOGA_LOG_LEVEL_DEBUG = 3;
132
+ var OT_YOGA_LOG_LEVEL_VERBOSE = 4;
133
+ var OT_YOGA_LOG_LEVEL_FATAL = 5;
134
+ var OT_YOGA_NODE_TYPE_DEFAULT = 0;
135
+ var OT_YOGA_NODE_TYPE_TEXT = 1;
118
136
  var nativeSymbols = {
119
137
  ot_scene_set_hooks: { args: ["ptr", "buffer", "buffer"], returns: "i32" },
120
138
  ot_scene_frame_step_with_geometry: {
@@ -126,8 +144,11 @@ var nativeSymbols = {
126
144
  ot_scene_create_node: { args: ["ptr", "buffer", "u32", "u32", "buffer"], returns: "i32" },
127
145
  ot_scene_destroy_node: { args: ["ptr", "buffer"], returns: "i32" },
128
146
  ot_scene_move_node: { args: ["ptr", "buffer", "ptr", "u32"], returns: "i32" },
147
+ ot_scene_clear_children: { args: ["ptr", "buffer"], returns: "i32" },
129
148
  ot_scene_set_measure: { args: ["ptr", "buffer", "ptr"], returns: "i32" },
130
149
  ot_scene_has_measure: { args: ["ptr", "buffer", "buffer"], returns: "i32" },
150
+ ot_scene_reaches_hooks: { args: ["ptr", "buffer", "buffer"], returns: "i32" },
151
+ ot_scene_painted: { args: ["ptr", "buffer", "buffer"], returns: "i32" },
131
152
  ot_scene_mark_dirty: { args: ["ptr", "buffer"], returns: "i32" },
132
153
  ot_scene_set_style: { args: ["ptr", "buffer", "u32", "u32", "u32", "u32", "f32", "u32"], returns: "i32" },
133
154
  ot_scene_get_style: { args: ["ptr", "buffer", "u32", "u32", "u32", "buffer"], returns: "i32" },
@@ -154,9 +175,11 @@ var nativeSymbols = {
154
175
  ot_scene_get_text: { args: ["ptr", "buffer", "ptr", "u32", "buffer"], returns: "i32" },
155
176
  ot_scene_get_text_info: { args: ["ptr", "buffer", "buffer"], returns: "i32" },
156
177
  ot_scene_get_text_lines: { args: ["ptr", "buffer", "u32", "ptr", "u32", "buffer"], returns: "i32" },
178
+ ot_scene_get_text_byte_at: { args: ["ptr", "buffer", "i32", "i32", "buffer"], returns: "i32" },
157
179
  ot_scene_get_layout: { args: ["ptr", "buffer", "u32", "buffer"], returns: "i32" },
158
180
  ot_scene_paint: { args: ["ptr", "buffer", "buffer", "u32", "u32", "buffer"], returns: "i32" },
159
181
  ot_scene_hit_test: { args: ["ptr", "buffer", "i32", "i32", "buffer"], returns: "i32" },
182
+ ot_scene_hit_test_excluding: { args: ["ptr", "buffer", "i32", "i32", "u32", "buffer"], returns: "i32" },
160
183
  ot_scene_get_stats: { args: ["ptr", "buffer", "buffer"], returns: "i32" },
161
184
  ot_scene_set_debug_flags: { args: ["ptr", "buffer", "u32"], returns: "i32" },
162
185
  ot_scene_get_cursor_state: { args: ["ptr", "buffer", "buffer"], returns: "i32" },
@@ -212,6 +235,7 @@ var nativeSymbols = {
212
235
  args: ["ptr", "buffer", "u32", "u32", "u32", "u32", "u32", "ptr", "u32", "buffer"],
213
236
  returns: "i32"
214
237
  },
238
+ ot_edit_buffer_convert_offset: { args: ["ptr", "buffer", "u32", "u32", "buffer"], returns: "i32" },
215
239
  ot_edit_buffer_measure_text: { args: ["ptr", "buffer", "ptr", "u32", "buffer"], returns: "i32" },
216
240
  ot_edit_measure_text: { args: ["ptr", "ptr", "u32", "u32", "u32", "buffer"], returns: "i32" },
217
241
  ot_edit_buffer_set_defaults: { args: ["ptr", "buffer", "u32", "buffer"], returns: "i32" },
@@ -220,6 +244,24 @@ var nativeSymbols = {
220
244
  ot_syntax_style_get_count: { args: ["ptr", "buffer", "buffer"], returns: "i32" },
221
245
  ot_edit_buffer_highlight: { args: ["ptr", "buffer", "u32", "u32", "ptr"], returns: "i32" },
222
246
  ot_edit_buffer_get_highlights: { args: ["ptr", "buffer", "u32", "ptr", "u32", "buffer"], returns: "i32" },
247
+ ot_context_group_set: { args: ["ptr", "buffer", "u32", "buffer", "u32", "buffer"], returns: "i32" },
248
+ ot_edit_buffer_set_layer: { args: ["ptr", "buffer", "u32", "u32", "u32", "ptr", "u32"], returns: "i32" },
249
+ ot_edit_buffer_mark: { args: ["ptr", "buffer", "u32", "ptr", "ptr"], returns: "i32" },
250
+ ot_edit_buffer_get_marks: { args: ["ptr", "buffer", "u32", "u32", "ptr", "u32", "buffer"], returns: "i32" },
251
+ ot_markdown_create: { args: ["ptr", "buffer", "buffer"], returns: "i32" },
252
+ ot_markdown_destroy: { args: ["ptr", "buffer"], returns: "i32" },
253
+ ot_markdown_set_options: { args: ["ptr", "buffer", "buffer", "buffer"], returns: "i32" },
254
+ ot_markdown_append: { args: ["ptr", "buffer", "ptr", "u32", "buffer"], returns: "i32" },
255
+ ot_markdown_set: { args: ["ptr", "buffer", "ptr", "u32", "buffer"], returns: "i32" },
256
+ ot_markdown_finish: { args: ["ptr", "buffer", "buffer"], returns: "i32" },
257
+ ot_markdown_get_source: { args: ["ptr", "buffer", "buffer", "buffer"], returns: "i32" },
258
+ ot_markdown_read_changes: { args: ["ptr", "buffer", "ptr", "u32", "buffer"], returns: "i32" },
259
+ ot_markdown_read_source: { args: ["ptr", "buffer", "u32", "ptr", "u32", "buffer"], returns: "i32" },
260
+ ot_markdown_read_leaf: {
261
+ args: ["ptr", "buffer", "u32", "ptr", "u32", "buffer", "ptr", "ptr", "u32", "buffer", "ptr", "u32", "buffer"],
262
+ returns: "i32"
263
+ },
264
+ ot_markdown_bind: { args: ["ptr", "buffer", "u32", "buffer"], returns: "i32" },
223
265
  ot_editor_view_set_viewport: { args: ["ptr", "buffer", "buffer", "u32", "u32"], returns: "i32" },
224
266
  ot_editor_view_get_viewport: { args: ["ptr", "buffer", "buffer"], returns: "i32" },
225
267
  ot_editor_view_set_scroll_margin: { args: ["ptr", "buffer", "f32"], returns: "i32" },
@@ -308,6 +350,7 @@ var nativeSymbols = {
308
350
  ot_text_buffer_set_tab_width: { args: ["ptr", "buffer", "u32"], returns: "i32" },
309
351
  ot_text_buffer_highlight: { args: ["ptr", "buffer", "u32", "u32", "ptr"], returns: "i32" },
310
352
  ot_text_buffer_get_highlights: { args: ["ptr", "buffer", "u32", "ptr", "u32", "buffer"], returns: "i32" },
353
+ ot_text_buffer_set_layer: { args: ["ptr", "buffer", "u32", "u32", "u32", "ptr", "u32"], returns: "i32" },
311
354
  ot_text_buffer_view_set_viewport: { args: ["ptr", "buffer", "buffer", "u32"], returns: "i32" },
312
355
  ot_text_buffer_view_command: { args: ["ptr", "buffer", "u32", "u32"], returns: "i32" },
313
356
  ot_text_buffer_view_set_tab_color: { args: ["ptr", "buffer", "ptr"], returns: "i32" },
@@ -1084,6 +1127,71 @@ var nativeLayouts = {
1084
1127
  ref: { offset: 16, size: 4, alignment: 4, type: "u32" }
1085
1128
  }
1086
1129
  },
1130
+ ot_highlight_run: {
1131
+ size: 12,
1132
+ alignment: 4,
1133
+ fields: {
1134
+ start_byte: { offset: 0, size: 4, alignment: 4, type: "u32" },
1135
+ end_byte: { offset: 4, size: 4, alignment: 4, type: "u32" },
1136
+ group_set: { offset: 8, size: 4, alignment: 4, type: "u32" }
1137
+ }
1138
+ },
1139
+ ot_edit_mark: {
1140
+ size: 76,
1141
+ alignment: 4,
1142
+ fields: {
1143
+ struct_size: { offset: 0, size: 4, alignment: 4, type: "u32" },
1144
+ abi_version: { offset: 4, size: 4, alignment: 4, type: "u32" },
1145
+ id: { offset: 8, size: 4, alignment: 4, type: "u32" },
1146
+ kind: { offset: 12, size: 4, alignment: 4, type: "u32" },
1147
+ flags: { offset: 16, size: 4, alignment: 4, type: "u32" },
1148
+ style: { offset: 20, size: 4, alignment: 4, type: "u32" },
1149
+ value: { offset: 24, size: 32, alignment: 4, type: "ot_editor_style" },
1150
+ priority: { offset: 56, size: 4, alignment: 4, type: "u32" },
1151
+ start: { offset: 60, size: 4, alignment: 4, type: "u32" },
1152
+ end: { offset: 64, size: 4, alignment: 4, type: "u32" },
1153
+ start_byte: { offset: 68, size: 4, alignment: 4, type: "u32" },
1154
+ end_byte: { offset: 72, size: 4, alignment: 4, type: "u32" }
1155
+ }
1156
+ },
1157
+ ot_markdown_options: {
1158
+ size: 296,
1159
+ alignment: 8,
1160
+ fields: {
1161
+ struct_size: { offset: 0, size: 4, alignment: 4, type: "u32" },
1162
+ abi_version: { offset: 4, size: 4, alignment: 4, type: "u32" },
1163
+ flags: { offset: 8, size: 4, alignment: 4, type: "u32" },
1164
+ source_byte_limit: { offset: 12, size: 4, alignment: 4, type: "u32" },
1165
+ syntax_style: { offset: 16, size: 16, alignment: 8, type: "ot_handle" },
1166
+ hook_filter_byte_count: { offset: 32, size: 4, alignment: 4, type: "u32" },
1167
+ reserved: { offset: 36, size: 4, alignment: 4, type: "u32" },
1168
+ hook_filter: { offset: 40, size: 256, alignment: 1, type: "[256]u8" }
1169
+ }
1170
+ },
1171
+ ot_markdown_result: {
1172
+ size: 12,
1173
+ alignment: 4,
1174
+ fields: {
1175
+ changed_block_count: { offset: 0, size: 4, alignment: 4, type: "u32" },
1176
+ committed_top_level_count: { offset: 4, size: 4, alignment: 4, type: "u32" },
1177
+ removed_from_index: { offset: 8, size: 4, alignment: 4, type: "u32" }
1178
+ }
1179
+ },
1180
+ ot_markdown_block: {
1181
+ size: 32,
1182
+ alignment: 4,
1183
+ fields: {
1184
+ index: { offset: 0, size: 4, alignment: 4, type: "u32" },
1185
+ parent_index: { offset: 4, size: 4, alignment: 4, type: "u32" },
1186
+ kind: { offset: 8, size: 2, alignment: 2, type: "u16" },
1187
+ flags: { offset: 10, size: 2, alignment: 2, type: "u16" },
1188
+ source_start_byte: { offset: 12, size: 4, alignment: 4, type: "u32" },
1189
+ source_end_byte: { offset: 16, size: 4, alignment: 4, type: "u32" },
1190
+ info_start_byte: { offset: 20, size: 4, alignment: 4, type: "u32" },
1191
+ info_end_byte: { offset: 24, size: 4, alignment: 4, type: "u32" },
1192
+ number: { offset: 28, size: 4, alignment: 4, type: "u32" }
1193
+ }
1194
+ },
1087
1195
  ot_editor_viewport: {
1088
1196
  size: 24,
1089
1197
  alignment: 4,
@@ -1686,6 +1794,27 @@ var nativeLayouts = {
1686
1794
  foreground: { offset: 40, size: 8, alignment: 2, type: "[4]u16" },
1687
1795
  background: { offset: 48, size: 8, alignment: 2, type: "[4]u16" }
1688
1796
  }
1797
+ },
1798
+ ot_scene_cell: {
1799
+ size: 24,
1800
+ alignment: 4,
1801
+ fields: {
1802
+ character: { offset: 0, size: 4, alignment: 4, type: "u32" },
1803
+ attributes: { offset: 4, size: 4, alignment: 4, type: "u32" },
1804
+ foreground: { offset: 8, size: 8, alignment: 2, type: "[4]u16" },
1805
+ background: { offset: 16, size: 8, alignment: 2, type: "[4]u16" }
1806
+ }
1807
+ },
1808
+ ot_scene_record_cells: {
1809
+ size: 24,
1810
+ alignment: 4,
1811
+ fields: {
1812
+ header: { offset: 0, size: 8, alignment: 4, type: "ot_scene_record_header" },
1813
+ x: { offset: 8, size: 4, alignment: 4, type: "i32" },
1814
+ y: { offset: 12, size: 4, alignment: 4, type: "i32" },
1815
+ width: { offset: 16, size: 4, alignment: 4, type: "u32" },
1816
+ count: { offset: 20, size: 4, alignment: 4, type: "u32" }
1817
+ }
1689
1818
  }
1690
1819
  };
1691
1820
  var nativeConstants = {
@@ -1766,6 +1895,7 @@ var nativeConstants = {
1766
1895
  OT_STYLE_ENUM_OVERFLOW: 8,
1767
1896
  OT_STYLE_ENUM_DISPLAY: 9,
1768
1897
  OT_STYLE_ENUM_BOX_SIZING: 10,
1898
+ OT_STYLE_ENUM_LAYOUT_MODE: 11,
1769
1899
  OT_STYLE_FLOAT_FLEX: 0,
1770
1900
  OT_STYLE_FLOAT_FLEX_GROW: 1,
1771
1901
  OT_STYLE_FLOAT_FLEX_SHRINK: 2,
@@ -1835,6 +1965,24 @@ var nativeConstants = {
1835
1965
  OT_DISPLAY_NONE: 1,
1836
1966
  OT_BOX_SIZING_BORDER_BOX: 0,
1837
1967
  OT_BOX_SIZING_CONTENT_BOX: 1,
1968
+ OT_LAYOUT_MODE_FLEX: 0,
1969
+ OT_LAYOUT_MODE_LIST: 1,
1970
+ OT_DISPLAY_CONTENTS: 2,
1971
+ OT_YOGA_ERRATA_NONE: 0,
1972
+ OT_YOGA_ERRATA_STRETCH_FLEX_BASIS: 1,
1973
+ OT_YOGA_ERRATA_ABSOLUTE_POSITION_WITHOUT_INSETS_EXCLUDES_PADDING: 2,
1974
+ OT_YOGA_ERRATA_ABSOLUTE_PERCENT_AGAINST_INNER_SIZE: 4,
1975
+ OT_YOGA_ERRATA_ALL: 2147483647,
1976
+ OT_YOGA_ERRATA_CLASSIC: 2147483646,
1977
+ OT_YOGA_EXPERIMENTAL_FEATURE_WEB_FLEX_BASIS: 0,
1978
+ OT_YOGA_LOG_LEVEL_ERROR: 0,
1979
+ OT_YOGA_LOG_LEVEL_WARN: 1,
1980
+ OT_YOGA_LOG_LEVEL_INFO: 2,
1981
+ OT_YOGA_LOG_LEVEL_DEBUG: 3,
1982
+ OT_YOGA_LOG_LEVEL_VERBOSE: 4,
1983
+ OT_YOGA_LOG_LEVEL_FATAL: 5,
1984
+ OT_YOGA_NODE_TYPE_DEFAULT: 0,
1985
+ OT_YOGA_NODE_TYPE_TEXT: 1,
1838
1986
  OT_STYLE_ENUM_DIRECTION_MAX: 2,
1839
1987
  OT_STYLE_ENUM_FLEX_DIRECTION_MAX: 3,
1840
1988
  OT_STYLE_ENUM_JUSTIFY_CONTENT_MAX: 5,
@@ -1846,12 +1994,14 @@ var nativeConstants = {
1846
1994
  OT_STYLE_ENUM_OVERFLOW_MAX: 2,
1847
1995
  OT_STYLE_ENUM_DISPLAY_MAX: 1,
1848
1996
  OT_STYLE_ENUM_BOX_SIZING_MAX: 1,
1997
+ OT_STYLE_ENUM_LAYOUT_MODE_MAX: 1,
1849
1998
  OT_MEASURE_UNDEFINED: 0,
1850
1999
  OT_MEASURE_EXACTLY: 1,
1851
2000
  OT_MEASURE_AT_MOST: 2,
1852
2001
  OT_LAYOUT_PUBLIC: 0,
1853
2002
  OT_LAYOUT_YOGA: 1,
1854
2003
  OT_LAYOUT_PAINT: 2,
2004
+ OT_LAYOUT_CONTENT: 3,
1855
2005
  OT_BORDER_NONE: 0,
1856
2006
  OT_BORDER_LEFT: 1,
1857
2007
  OT_BORDER_BOTTOM: 2,
@@ -1867,6 +2017,37 @@ var nativeConstants = {
1867
2017
  OT_COLOR_DEFAULT: 2,
1868
2018
  OT_COLOR_CHANNEL_MASK: 255,
1869
2019
  OT_COLOR_META_SHIFT: 8,
2020
+ OT_COLOR_ANSI_0: 0,
2021
+ OT_COLOR_ANSI_1: 8388608,
2022
+ OT_COLOR_ANSI_2: 32768,
2023
+ OT_COLOR_ANSI_3: 8421376,
2024
+ OT_COLOR_ANSI_4: 128,
2025
+ OT_COLOR_ANSI_5: 8388736,
2026
+ OT_COLOR_ANSI_6: 32896,
2027
+ OT_COLOR_ANSI_7: 12632256,
2028
+ OT_COLOR_ANSI_8: 8421504,
2029
+ OT_COLOR_ANSI_9: 16711680,
2030
+ OT_COLOR_ANSI_10: 65280,
2031
+ OT_COLOR_ANSI_11: 16776960,
2032
+ OT_COLOR_ANSI_12: 255,
2033
+ OT_COLOR_ANSI_13: 16711935,
2034
+ OT_COLOR_ANSI_14: 65535,
2035
+ OT_COLOR_ANSI_15: 16777215,
2036
+ OT_COLOR_CUBE_BASE: 55,
2037
+ OT_COLOR_CUBE_STEP: 40,
2038
+ OT_COLOR_GRAY_BASE: 8,
2039
+ OT_COLOR_GRAY_STEP: 10,
2040
+ OT_ATTR_BOLD: 1,
2041
+ OT_ATTR_DIM: 2,
2042
+ OT_ATTR_ITALIC: 4,
2043
+ OT_ATTR_UNDERLINE: 8,
2044
+ OT_ATTR_BLINK: 16,
2045
+ OT_ATTR_INVERSE: 32,
2046
+ OT_ATTR_HIDDEN: 64,
2047
+ OT_ATTR_STRIKETHROUGH: 128,
2048
+ OT_ATTR_BASE_MASK: 255,
2049
+ OT_ATTR_LINK_SHIFT: 8,
2050
+ OT_ATTR_LINK_MASK: 16777215,
1870
2051
  OT_SCENE_TEXT_SELECTION_RESET: 0,
1871
2052
  OT_SCENE_TEXT_SELECTION_SET: 1,
1872
2053
  OT_SCENE_TEXT_SELECTION_UPDATE: 2,
@@ -1886,6 +2067,10 @@ var nativeConstants = {
1886
2067
  OT_SCENE_FULL_PATH_UNRETAINED: 16,
1887
2068
  OT_SCENE_FULL_PATH_OPTIONS: 32,
1888
2069
  OT_SCENE_FULL_PATH_NON_LOCAL: 64,
2070
+ OT_CURSOR_STYLE_BLOCK: 0,
2071
+ OT_CURSOR_STYLE_LINE: 1,
2072
+ OT_CURSOR_STYLE_UNDERLINE: 2,
2073
+ OT_CURSOR_STYLE_DEFAULT: 3,
1889
2074
  OT_SCENE_HOOK_UPDATE: 1,
1890
2075
  OT_SCENE_HOOK_RESIZE: 2,
1891
2076
  OT_SCENE_HOOK_LAYOUT_CHANGED: 4,
@@ -1941,6 +2126,7 @@ var nativeConstants = {
1941
2126
  OT_SCENE_SCROLL_ALIGN_NEAREST: 0,
1942
2127
  OT_SCENE_SCROLL_ALIGN_START: 1,
1943
2128
  OT_SCENE_SCROLL_ALIGN_END: 2,
2129
+ OT_SCENE_SCROLL_PADDING_MAX: 65535,
1944
2130
  OT_SCENE_SCROLL_CHANGED_OFFSET_X: 1,
1945
2131
  OT_SCENE_SCROLL_CHANGED_OFFSET_Y: 2,
1946
2132
  OT_SCENE_SCROLL_CHANGED_CONTENT: 4,
@@ -1962,6 +2148,7 @@ var nativeConstants = {
1962
2148
  OT_RENDER_PENDING: 1,
1963
2149
  OT_RENDER_SKIPPED: 2,
1964
2150
  OT_RENDER_FAILED: 3,
2151
+ OT_SPLIT_SNAPSHOTS_MAX: 64,
1965
2152
  OT_SESSION_BUFFER_CURRENT: 0,
1966
2153
  OT_SESSION_BUFFER_NEXT: 1,
1967
2154
  OT_WIDTH_METHOD_WCWIDTH: 0,
@@ -1969,10 +2156,37 @@ var nativeConstants = {
1969
2156
  OT_WIDTH_METHOD_NO_ZWJ: 2,
1970
2157
  OT_WIDTH_METHOD_UNICODE_WIDE: 3,
1971
2158
  OT_BUFFER_RESPECT_ALPHA: 1,
2159
+ OT_EMBEDDED_TERMINAL_CURSOR_BAR: 0,
2160
+ OT_EMBEDDED_TERMINAL_CURSOR_BLOCK: 1,
2161
+ OT_EMBEDDED_TERMINAL_CURSOR_UNDERLINE: 2,
2162
+ OT_EMBEDDED_TERMINAL_CURSOR_BLOCK_HOLLOW: 3,
2163
+ OT_EMBEDDED_TERMINAL_MOD_SHIFT: 1,
2164
+ OT_EMBEDDED_TERMINAL_MOD_CTRL: 2,
2165
+ OT_EMBEDDED_TERMINAL_MOD_ALT: 4,
2166
+ OT_EMBEDDED_TERMINAL_MOD_SUPER: 8,
2167
+ OT_EMBEDDED_TERMINAL_MOD_CAPS_LOCK: 16,
2168
+ OT_EMBEDDED_TERMINAL_MOD_NUM_LOCK: 32,
2169
+ OT_EMBEDDED_TERMINAL_KEY_RELEASE: 0,
2170
+ OT_EMBEDDED_TERMINAL_KEY_PRESS: 1,
2171
+ OT_EMBEDDED_TERMINAL_KEY_REPEAT: 2,
2172
+ OT_EMBEDDED_TERMINAL_MOUSE_PRESS: 0,
2173
+ OT_EMBEDDED_TERMINAL_MOUSE_RELEASE: 1,
2174
+ OT_EMBEDDED_TERMINAL_MOUSE_MOTION: 2,
2175
+ OT_EMBEDDED_TERMINAL_BUTTON_NONE: -1,
2176
+ OT_EMBEDDED_TERMINAL_BUTTON_UNKNOWN: 0,
2177
+ OT_EMBEDDED_TERMINAL_BUTTON_LEFT: 1,
2178
+ OT_EMBEDDED_TERMINAL_BUTTON_RIGHT: 2,
2179
+ OT_EMBEDDED_TERMINAL_BUTTON_MIDDLE: 3,
2180
+ OT_EMBEDDED_TERMINAL_BUTTON_FOUR: 4,
2181
+ OT_EMBEDDED_TERMINAL_BUTTON_FIVE: 5,
2182
+ OT_EMBEDDED_TERMINAL_BUTTON_SIX: 6,
2183
+ OT_EMBEDDED_TERMINAL_BUTTON_SEVEN: 7,
2184
+ OT_EMBEDDED_TERMINAL_INPUT_BYTES_MAX: 1048576,
1972
2185
  OT_EMBEDDED_TERMINAL_INVALIDATE: 0,
1973
2186
  OT_EMBEDDED_TERMINAL_SCROLL: 1,
1974
2187
  OT_EMBEDDED_TERMINAL_CLEAR_SELECTION: 2,
1975
2188
  OT_EMBEDDED_TERMINAL_SET_TRANSPARENT_BACKGROUND: 3,
2189
+ OT_EMBEDDED_TERMINAL_RESPONSE_BYTES_MAX: 1048576,
1976
2190
  OT_EDIT_CURSOR_CHANGED: 1,
1977
2191
  OT_EDIT_CONTENT_CHANGED: 2,
1978
2192
  OT_EDIT_HISTORY_CURSOR_CHANGED: 4,
@@ -2027,6 +2241,9 @@ var nativeConstants = {
2027
2241
  OT_EDIT_CLEAR: 10,
2028
2242
  OT_EDIT_CLEAR_HISTORY: 11,
2029
2243
  OT_EDIT_DEBUG_ROPE: 12,
2244
+ OT_EDIT_CURSOR_OFFSET_ATOMIC: 13,
2245
+ OT_EDIT_KEEP_OUTSIDE: 14,
2246
+ OT_EDIT_ATOMIC: 1,
2030
2247
  OT_EDIT_POSITION_CURSOR: 0,
2031
2248
  OT_EDIT_POSITION_NEXT_WORD: 1,
2032
2249
  OT_EDIT_POSITION_PREV_WORD: 2,
@@ -2036,15 +2253,60 @@ var nativeConstants = {
2036
2253
  OT_EDIT_POSITION_LINE_START: 6,
2037
2254
  OT_EDIT_POSITION_END: 7,
2038
2255
  OT_EDIT_POSITION_PREV_CHAR: 8,
2256
+ OT_EDIT_BYTE_TO_CELL: 0,
2257
+ OT_EDIT_CELL_TO_BYTE: 1,
2258
+ OT_EDIT_UTF16_TO_CELL: 2,
2259
+ OT_EDIT_CELL_TO_UTF16: 3,
2039
2260
  OT_EDITOR_STYLE_FOREGROUND: 1,
2040
2261
  OT_EDITOR_STYLE_BACKGROUND: 2,
2041
2262
  OT_EDITOR_STYLE_ATTRIBUTES: 4,
2263
+ OT_EDITOR_STYLE_ATTRIBUTE_MASK: 8,
2042
2264
  OT_EDIT_HIGHLIGHT_ADD_LINE: 0,
2043
2265
  OT_EDIT_HIGHLIGHT_ADD_RANGE: 1,
2044
2266
  OT_EDIT_HIGHLIGHT_REMOVE_REF: 2,
2045
2267
  OT_EDIT_HIGHLIGHT_CLEAR_LINE: 3,
2046
2268
  OT_EDIT_HIGHLIGHT_CLEAR_ALL: 4,
2047
2269
  OT_STYLE_RUN_FLAG: 2147483648,
2270
+ OT_GROUP_SET_NAME_COUNT_MAX: 16,
2271
+ OT_GROUP_SET_NAME_BYTE_COUNT_MAX: 64,
2272
+ OT_EDIT_MARK_ADD: 0,
2273
+ OT_EDIT_MARK_REMOVE: 1,
2274
+ OT_EDIT_MARK_CLEAR: 2,
2275
+ OT_EDIT_MARK_ATOMIC: 1,
2276
+ OT_EDIT_MARK_STYLE_VALUE: 2,
2277
+ OT_EDIT_MARK_ANY_KIND: 4294967295,
2278
+ OT_MD_CONCEAL: 1,
2279
+ OT_MD_HYPERLINKS: 2,
2280
+ OT_MD_MATH: 4,
2281
+ OT_MD_HOOK: 8,
2282
+ OT_MD_HOOK_FILTER_BYTE_COUNT_MAX: 256,
2283
+ OT_MD_PARAGRAPH: 0,
2284
+ OT_MD_HEADING: 1,
2285
+ OT_MD_CODE: 2,
2286
+ OT_MD_HTML: 3,
2287
+ OT_MD_RULE: 4,
2288
+ OT_MD_TABLE: 5,
2289
+ OT_MD_TABLE_ROW: 6,
2290
+ OT_MD_TABLE_CELL: 7,
2291
+ OT_MD_QUOTE: 8,
2292
+ OT_MD_LIST: 9,
2293
+ OT_MD_ITEM: 10,
2294
+ OT_MD_BLOCK_CLOSED: 1,
2295
+ OT_MD_BLOCK_SETEXT: 2,
2296
+ OT_MD_BLOCK_ORDERED: 4,
2297
+ OT_MD_BLOCK_TIGHT: 8,
2298
+ OT_MD_BLOCK_TASK: 16,
2299
+ OT_MD_BLOCK_CHECKED: 32,
2300
+ OT_MD_BLOCK_BLANK_AFTER: 64,
2301
+ OT_MD_BLOCK_FENCED: 128,
2302
+ OT_MD_BLOCK_HOOKED: 256,
2303
+ OT_MD_BLOCK_MATH: 512,
2304
+ OT_MD_BLOCK_HEADER: 1024,
2305
+ OT_MD_BLOCK_OPEN: 2048,
2306
+ OT_MD_BLOCK_ALIGN_LEFT: 4096,
2307
+ OT_MD_BLOCK_ALIGN_RIGHT: 8192,
2308
+ OT_MD_SPAN_CODE: 1,
2309
+ OT_MD_SPAN_MATH: 2,
2048
2310
  OT_EDITOR_MOVE_UP: 0,
2049
2311
  OT_EDITOR_MOVE_DOWN: 1,
2050
2312
  OT_EDITOR_GOTO_LINE_END: 2,
@@ -2088,6 +2350,7 @@ var nativeConstants = {
2088
2350
  OT_IMAGE_PROTOCOL_BLOCKS: 3,
2089
2351
  OT_IMAGE_DRAW_SOURCE_WIDTH: 1,
2090
2352
  OT_IMAGE_DRAW_SOURCE_HEIGHT: 2,
2353
+ OT_IMAGE_ENCODED_BYTES_MAX: 67108864,
2091
2354
  OT_IMAGE_FORMAT_UNKNOWN: 0,
2092
2355
  OT_IMAGE_FORMAT_PNG: 1,
2093
2356
  OT_IMAGE_FORMAT_RGBA: 2,
@@ -2157,6 +2420,10 @@ var nativeConstants = {
2157
2420
  OT_BUFFER_STACK_CLEAR_OPACITY: 6,
2158
2421
  OT_BUFFER_GRID_INNER: 1,
2159
2422
  OT_BUFFER_GRID_OUTER: 2,
2423
+ OT_CELL_CHAR_KIND_MASK: 3221225472,
2424
+ OT_CELL_CHAR_IMAGE: 1073741824,
2425
+ OT_CELL_CHAR_GRAPHEME: 2147483648,
2426
+ OT_CELL_CHAR_CONTINUATION: 3221225472,
2160
2427
  OT_SESSION_CONTROL_PACKET_BYTES: 4096,
2161
2428
  OT_TERMINAL_ALTERNATE_SCREEN: 1,
2162
2429
  OT_TERMINAL_MOUSE: 2,
@@ -2166,6 +2433,12 @@ var nativeConstants = {
2166
2433
  OT_TERMINAL_SYNC_ALWAYS: 32,
2167
2434
  OT_TERMINAL_SYNC_NEVER: 64,
2168
2435
  OT_TERMINAL_HOST_MULTIPLEXER: 128,
2436
+ OT_KITTY_KEYBOARD_DISAMBIGUATE: 1,
2437
+ OT_KITTY_KEYBOARD_EVENT_TYPES: 2,
2438
+ OT_KITTY_KEYBOARD_ALTERNATE_KEYS: 4,
2439
+ OT_KITTY_KEYBOARD_ALL_KEYS_AS_ESCAPES: 8,
2440
+ OT_KITTY_KEYBOARD_REPORT_TEXT: 16,
2441
+ OT_KITTY_KEYBOARD_ALL: 31,
2169
2442
  OT_CONTROL_CAPABILITY_RESPONSE: 1,
2170
2443
  OT_CONTROL_TITLE: 2,
2171
2444
  OT_CONTROL_MOUSE: 3,
@@ -2177,6 +2450,7 @@ var nativeConstants = {
2177
2450
  OT_CONTROL_RESET_BACKGROUND: 9,
2178
2451
  OT_CONTROL_PALETTE_QUERY: 10,
2179
2452
  OT_CONTROL_PROGRAM_STATUS: 11,
2453
+ OT_CONTROL_END_REPLY_SENTINEL: 12,
2180
2454
  OT_CURSOR_POSITION: 1,
2181
2455
  OT_CURSOR_STYLE: 2,
2182
2456
  OT_CURSOR_BLINKING: 4,
@@ -2337,11 +2611,13 @@ var nativeConstants = {
2337
2611
  OT_INPUT_EXPECT_KITTY_KEYBOARD: 2,
2338
2612
  OT_INPUT_EXPECT_CURSOR_POSITION: 4,
2339
2613
  OT_INPUT_EXPECT_SENTINEL: 8,
2614
+ OT_INPUT_EXPECT_ESCAPE_PREFIX: 16,
2340
2615
  OT_INPUT_EVENTS_MIN: 4,
2341
2616
  OT_INPUT_PAYLOAD_BYTES_MIN: 4384,
2342
2617
  OT_INPUT_TIMEOUT_NS: 20000000,
2343
2618
  OT_DIAGNOSTIC_MESSAGE_BYTES: 4096,
2344
2619
  OT_DIAGNOSTIC_TRUNCATED: 1,
2620
+ OT_DIAGNOSTIC_QUEUE_MAX: 64,
2345
2621
  OT_SCENE_RECORD_BYTES_MAX: 67108864,
2346
2622
  OT_SCENE_RECORD_PHASE_BEFORE: 0,
2347
2623
  OT_SCENE_RECORD_PHASE_SELF: 1,
@@ -2359,6 +2635,7 @@ var nativeConstants = {
2359
2635
  OT_SCENE_RECORD_SCENE_BODY: 10,
2360
2636
  OT_SCENE_RECORD_IMAGE: 11,
2361
2637
  OT_SCENE_RECORD_UNICODE: 12,
2638
+ OT_SCENE_RECORD_CELLS: 13,
2362
2639
  OT_SCENE_RECORD_GRAYSCALE_FOREGROUND: 1,
2363
2640
  OT_SCENE_RECORD_GRAYSCALE_BACKGROUND: 2,
2364
2641
  OT_SCENE_RECORD_GRAYSCALE_SUPERSAMPLED: 4,
@@ -3552,19 +3829,20 @@ function setGlobalWorkerMessageHandler(handler) {
3552
3829
  import { existsSync as existsSync2, writeFileSync } from "fs";
3553
3830
 
3554
3831
  // src/types.ts
3832
+ var attributeBits = nativeConstants;
3555
3833
  var TextAttributes2 = {
3556
3834
  NONE: 0,
3557
- BOLD: 1 << 0,
3558
- DIM: 1 << 1,
3559
- ITALIC: 1 << 2,
3560
- UNDERLINE: 1 << 3,
3561
- BLINK: 1 << 4,
3562
- INVERSE: 1 << 5,
3563
- HIDDEN: 1 << 6,
3564
- STRIKETHROUGH: 1 << 7
3835
+ BOLD: attributeBits.OT_ATTR_BOLD,
3836
+ DIM: attributeBits.OT_ATTR_DIM,
3837
+ ITALIC: attributeBits.OT_ATTR_ITALIC,
3838
+ UNDERLINE: attributeBits.OT_ATTR_UNDERLINE,
3839
+ BLINK: attributeBits.OT_ATTR_BLINK,
3840
+ INVERSE: attributeBits.OT_ATTR_INVERSE,
3841
+ HIDDEN: attributeBits.OT_ATTR_HIDDEN,
3842
+ STRIKETHROUGH: attributeBits.OT_ATTR_STRIKETHROUGH
3565
3843
  };
3566
- var ATTRIBUTE_BASE_BITS2 = 8;
3567
- var ATTRIBUTE_BASE_MASK2 = 255;
3844
+ var ATTRIBUTE_BASE_BITS2 = nativeConstants.OT_ATTR_LINK_SHIFT;
3845
+ var ATTRIBUTE_BASE_MASK2 = nativeConstants.OT_ATTR_BASE_MASK;
3568
3846
  function getBaseAttributes2(attr) {
3569
3847
  return attr & ATTRIBUTE_BASE_MASK2;
3570
3848
  }
@@ -3585,29 +3863,15 @@ var TargetChannel2;
3585
3863
  // src/lib/RGBA.ts
3586
3864
  var DEFAULT_FOREGROUND_RGB2 = [255, 255, 255];
3587
3865
  var DEFAULT_BACKGROUND_RGB2 = [0, 0, 0];
3588
- var INTENT_RGB = 0;
3589
- var INTENT_INDEXED = 1;
3590
- var INTENT_DEFAULT = 2;
3866
+ var INTENT_RGB = nativeConstants.OT_COLOR_RGB;
3867
+ var INTENT_INDEXED = nativeConstants.OT_COLOR_INDEXED;
3868
+ var INTENT_DEFAULT = nativeConstants.OT_COLOR_DEFAULT;
3591
3869
  var ZERO_RGBA_BUFFER = new Uint16Array(4);
3592
- var ANSI16_RGB = [
3593
- [0, 0, 0],
3594
- [128, 0, 0],
3595
- [0, 128, 0],
3596
- [128, 128, 0],
3597
- [0, 0, 128],
3598
- [128, 0, 128],
3599
- [0, 128, 128],
3600
- [192, 192, 192],
3601
- [128, 128, 128],
3602
- [255, 0, 0],
3603
- [0, 255, 0],
3604
- [255, 255, 0],
3605
- [0, 0, 255],
3606
- [255, 0, 255],
3607
- [0, 255, 255],
3608
- [255, 255, 255]
3609
- ];
3610
- var ANSI_256_CUBE_LEVELS = [0, 95, 135, 175, 215, 255];
3870
+ var ANSI16_RGB = Array.from({ length: 16 }, (_, slot) => {
3871
+ const rgb = nativeConstants[`OT_COLOR_ANSI_${slot}`];
3872
+ return [rgb >>> 16, rgb >>> 8 & 255, rgb & 255];
3873
+ });
3874
+ var ANSI_256_CUBE_LEVELS = [0, 1, 2, 3, 4, 5].map((level) => level === 0 ? 0 : nativeConstants.OT_COLOR_CUBE_BASE + nativeConstants.OT_COLOR_CUBE_STEP * level);
3611
3875
  function packMeta(intent, slot = 0) {
3612
3876
  return (slot & 255 | (intent & 255) << 8) >>> 0;
3613
3877
  }
@@ -3647,7 +3911,7 @@ function ansi256IndexToRgb2(index) {
3647
3911
  const b = cubeIndex % 6;
3648
3912
  return [ANSI_256_CUBE_LEVELS[r], ANSI_256_CUBE_LEVELS[g], ANSI_256_CUBE_LEVELS[b]];
3649
3913
  }
3650
- const value = 8 + (normalizedIndex - 232) * 10;
3914
+ const value = nativeConstants.OT_COLOR_GRAY_BASE + (normalizedIndex - 232) * nativeConstants.OT_COLOR_GRAY_STEP;
3651
3915
  return [value, value, value];
3652
3916
  }
3653
3917
 
@@ -3894,9 +4158,9 @@ function createTextAttributes2({
3894
4158
  attributes |= TextAttributes2.STRIKETHROUGH;
3895
4159
  return attributes;
3896
4160
  }
3897
- var ATTRIBUTE_BASE_MASK = 255;
3898
- var LINK_ID_SHIFT = 8;
3899
- var LINK_ID_PAYLOAD_MASK = 16777215;
4161
+ var ATTRIBUTE_BASE_MASK = nativeConstants.OT_ATTR_BASE_MASK;
4162
+ var LINK_ID_SHIFT = nativeConstants.OT_ATTR_LINK_SHIFT;
4163
+ var LINK_ID_PAYLOAD_MASK = nativeConstants.OT_ATTR_LINK_MASK;
3900
4164
  function attributesWithLink2(baseAttributes, linkId) {
3901
4165
  const base = baseAttributes & ATTRIBUTE_BASE_MASK;
3902
4166
  const linkBits = (linkId & LINK_ID_PAYLOAD_MASK) << LINK_ID_SHIFT;
@@ -4061,7 +4325,8 @@ var YogaEnumKind = {
4061
4325
  FlexWrap: nativeConstants.OT_STYLE_ENUM_FLEX_WRAP,
4062
4326
  Overflow: nativeConstants.OT_STYLE_ENUM_OVERFLOW,
4063
4327
  Display: nativeConstants.OT_STYLE_ENUM_DISPLAY,
4064
- BoxSizing: nativeConstants.OT_STYLE_ENUM_BOX_SIZING
4328
+ BoxSizing: nativeConstants.OT_STYLE_ENUM_BOX_SIZING,
4329
+ LayoutMode: nativeConstants.OT_STYLE_ENUM_LAYOUT_MODE
4065
4330
  };
4066
4331
  var YogaFloatKind = {
4067
4332
  Flex: nativeConstants.OT_STYLE_FLOAT_FLEX,
@@ -5851,7 +6116,10 @@ var NativeEditCommand2;
5851
6116
  NativeEditCommand[NativeEditCommand["Clear"] = 10] = "Clear";
5852
6117
  NativeEditCommand[NativeEditCommand["ClearHistory"] = 11] = "ClearHistory";
5853
6118
  NativeEditCommand[NativeEditCommand["DebugRope"] = 12] = "DebugRope";
6119
+ NativeEditCommand[NativeEditCommand["CursorOffsetAtomic"] = 13] = "CursorOffsetAtomic";
6120
+ NativeEditCommand[NativeEditCommand["KeepOutside"] = 14] = "KeepOutside";
5854
6121
  })(NativeEditCommand2 ||= {});
6122
+ var NativeEditAtomic = 1;
5855
6123
  var NativeEditPositionQuery2;
5856
6124
  ((NativeEditPositionQuery) => {
5857
6125
  NativeEditPositionQuery[NativeEditPositionQuery["Cursor"] = 0] = "Cursor";
@@ -6213,8 +6481,15 @@ registerEnvVar2({
6213
6481
  type: "string",
6214
6482
  required: false
6215
6483
  });
6216
- var CURSOR_STYLE_TO_ID = { block: 0, line: 1, underline: 2, default: 3 };
6217
- var CURSOR_ID_TO_STYLE = ["block", "line", "underline", "default"];
6484
+ var CURSOR_STYLE_TO_ID = {
6485
+ block: nativeConstants.OT_CURSOR_STYLE_BLOCK,
6486
+ line: nativeConstants.OT_CURSOR_STYLE_LINE,
6487
+ underline: nativeConstants.OT_CURSOR_STYLE_UNDERLINE,
6488
+ default: nativeConstants.OT_CURSOR_STYLE_DEFAULT
6489
+ };
6490
+ var CURSOR_ID_TO_STYLE = [];
6491
+ for (const [style, id] of Object.entries(CURSOR_STYLE_TO_ID))
6492
+ CURSOR_ID_TO_STYLE[id] = style;
6218
6493
  var PROGRAM_STATE_TO_ID = {
6219
6494
  idle: nativeConstants.OT_PROGRAM_STATE_IDLE,
6220
6495
  working: nativeConstants.OT_PROGRAM_STATE_WORKING,
@@ -6555,7 +6830,7 @@ function encodeDrawColors(colors, fields, options, base = 0) {
6555
6830
  contextBufferColor(background, colors, (base + fields.background.offset) / 2);
6556
6831
  return background !== undefined;
6557
6832
  }
6558
- var DIAGNOSTIC_QUEUE_MAX = 64;
6833
+ var DIAGNOSTIC_QUEUE_MAX = nativeConstants.OT_DIAGNOSTIC_QUEUE_MAX;
6559
6834
  var DIAGNOSTIC_BATCH = 8;
6560
6835
  function createDiagnosticDrainRecord() {
6561
6836
  const layout = nativeLayouts.ot_diagnostic_drain;
@@ -6736,7 +7011,28 @@ function encodeImageDrawOptions(options, words, signed, base) {
6736
7011
  function viewOrNull(value) {
6737
7012
  return value.byteLength === 0 ? null : value;
6738
7013
  }
6739
- var EMBEDDED_TERMINAL_IO_BYTES_MAX = 1024 * 1024;
7014
+ var EMBEDDED_TERMINAL_IO_BYTES_MAX = nativeConstants.OT_EMBEDDED_TERMINAL_INPUT_BYTES_MAX;
7015
+ var EMBEDDED_TERMINAL_KEY_ACTIONS = new Map([
7016
+ ["release", nativeConstants.OT_EMBEDDED_TERMINAL_KEY_RELEASE],
7017
+ ["press", nativeConstants.OT_EMBEDDED_TERMINAL_KEY_PRESS],
7018
+ ["repeat", nativeConstants.OT_EMBEDDED_TERMINAL_KEY_REPEAT]
7019
+ ]);
7020
+ var EMBEDDED_TERMINAL_MOUSE_ACTIONS = new Map([
7021
+ ["press", nativeConstants.OT_EMBEDDED_TERMINAL_MOUSE_PRESS],
7022
+ ["release", nativeConstants.OT_EMBEDDED_TERMINAL_MOUSE_RELEASE],
7023
+ ["motion", nativeConstants.OT_EMBEDDED_TERMINAL_MOUSE_MOTION]
7024
+ ]);
7025
+ var EMBEDDED_TERMINAL_BUTTONS = new Map([
7026
+ [undefined, nativeConstants.OT_EMBEDDED_TERMINAL_BUTTON_NONE],
7027
+ ["unknown", nativeConstants.OT_EMBEDDED_TERMINAL_BUTTON_UNKNOWN],
7028
+ ["left", nativeConstants.OT_EMBEDDED_TERMINAL_BUTTON_LEFT],
7029
+ ["right", nativeConstants.OT_EMBEDDED_TERMINAL_BUTTON_RIGHT],
7030
+ ["middle", nativeConstants.OT_EMBEDDED_TERMINAL_BUTTON_MIDDLE],
7031
+ ["four", nativeConstants.OT_EMBEDDED_TERMINAL_BUTTON_FOUR],
7032
+ ["five", nativeConstants.OT_EMBEDDED_TERMINAL_BUTTON_FIVE],
7033
+ ["six", nativeConstants.OT_EMBEDDED_TERMINAL_BUTTON_SIX],
7034
+ ["seven", nativeConstants.OT_EMBEDDED_TERMINAL_BUTTON_SEVEN]
7035
+ ]);
6740
7036
  function embeddedTerminalDimension(value, name) {
6741
7037
  if (!Number.isInteger(value) || value < 1 || value > 65535) {
6742
7038
  throw new RangeError(`Embedded terminal ${name} must be an integer between 1 and 65535`);
@@ -6756,7 +7052,9 @@ function contextBufferColor(value, color = new Uint16Array(4), offset = 0) {
6756
7052
  color[offset + index] = channel;
6757
7053
  }
6758
7054
  const intent = color[offset + 1] >>> 8;
6759
- if (color[offset + 2] > 255 || color[offset + 3] > 255 || intent > 2 || intent !== 1 && color[offset] > 255) {
7055
+ const indexed = intent === nativeConstants.OT_COLOR_INDEXED;
7056
+ const known = indexed || intent === nativeConstants.OT_COLOR_RGB || intent === nativeConstants.OT_COLOR_DEFAULT;
7057
+ if (color[offset + 2] > 255 || color[offset + 3] > 255 || !known || !indexed && color[offset] > 255) {
6760
7058
  throw new RangeError("Invalid terminal color intent");
6761
7059
  }
6762
7060
  return color;
@@ -7597,11 +7895,14 @@ function recordedPixels(data, length) {
7597
7895
  throw new RangeError("Pixel byte count exceeds the supplied view");
7598
7896
  return input.subarray(0, count);
7599
7897
  }
7898
+ function isAttributeByte(value) {
7899
+ return Number.isInteger(value) && value >= 0 && value <= 255;
7900
+ }
7600
7901
  function encodeEditorStyle(style) {
7601
7902
  const layout = nativeLayouts.ot_editor_style;
7602
7903
  const record = new Uint32Array(layout.size / 4);
7603
7904
  const colors = new Uint16Array(record.buffer);
7604
- const { fg, bg, attributes } = style;
7905
+ const { fg, bg, attributes, suppliedAttributes } = style;
7605
7906
  record[layout.fields.struct_size.offset / 4] = layout.size;
7606
7907
  record[layout.fields.abi_version.offset / 4] = nativeConstants.OT_CONTEXT_ABI_VERSION;
7607
7908
  if (fg != null) {
@@ -7616,6 +7917,13 @@ function encodeEditorStyle(style) {
7616
7917
  record[layout.fields.flags.offset / 4] |= 4 /* Attributes */;
7617
7918
  record[layout.fields.attributes.offset / 4] = toSafeFFIU32Length(attributes, "Editor style attributes");
7618
7919
  }
7920
+ if (suppliedAttributes != null) {
7921
+ if (!isAttributeByte(attributes) || !isAttributeByte(suppliedAttributes)) {
7922
+ throw new RangeError("Masked editor style attributes must be integers from 0 to 255");
7923
+ }
7924
+ record[layout.fields.flags.offset / 4] |= nativeConstants.OT_EDITOR_STYLE_ATTRIBUTE_MASK;
7925
+ record[layout.fields.attributes.offset / 4] |= suppliedAttributes << 16;
7926
+ }
7619
7927
  return record;
7620
7928
  }
7621
7929
  function drawTextString(text) {
@@ -7630,6 +7938,7 @@ function drawRecordBottomTitle(options) {
7630
7938
  return options.operation === "box" && options.bottomTitle ? drawTextString(options.bottomTitle) : "";
7631
7939
  }
7632
7940
  var drawTextEncoder = new TextEncoder;
7941
+ var markdownDecoder = new TextDecoder("utf-8", { ignoreBOM: true });
7633
7942
  function encodeDrawText(text, output) {
7634
7943
  if (text === "")
7635
7944
  return 0;
@@ -7728,9 +8037,9 @@ function widthMethodId(widthMethod, label) {
7728
8037
  return id;
7729
8038
  }
7730
8039
  function widthMethodFromCode(code) {
7731
- if (code === 0)
8040
+ if (code === nativeConstants.OT_WIDTH_METHOD_WCWIDTH)
7732
8041
  return "wcwidth";
7733
- return code === 3 ? "unicode-wide" : "unicode";
8042
+ return code === nativeConstants.OT_WIDTH_METHOD_UNICODE_WIDE ? "unicode-wide" : "unicode";
7734
8043
  }
7735
8044
  var yogaSymbols = {
7736
8045
  yogaConfigCreateChecked: { args: ["buffer"], returns: "u32" },
@@ -8200,6 +8509,7 @@ class FFIRenderLib2 {
8200
8509
  sceneFlushApplied = new Uint32Array(1);
8201
8510
  editorSelectionRecord = createEditorSelectionRecord();
8202
8511
  editorViewInfoRecord = createContextRecord(nativeLayouts.ot_editor_view_info);
8512
+ markRecords = new Uint32Array(16 * nativeLayouts.ot_edit_mark.size / 4);
8203
8513
  videoStateRecord = new Uint8Array(nativeLayouts.ot_video_state.size);
8204
8514
  videoStateView = new DataView(this.videoStateRecord.buffer);
8205
8515
  selectionResetRecord = encodeEditorSelection({ operation: 2 /* Reset */ });
@@ -8249,6 +8559,7 @@ class FFIRenderLib2 {
8249
8559
  encoder = new TextEncoder;
8250
8560
  emptyBytes = new Uint8Array(0);
8251
8561
  decoder = new TextDecoder;
8562
+ textDecoder = new TextDecoder("utf-8", { ignoreBOM: true });
8252
8563
  logCallbackWrapper = null;
8253
8564
  diagnosticDrain;
8254
8565
  nativeSpanFeedCallbackWrapper = null;
@@ -8363,8 +8674,9 @@ class FFIRenderLib2 {
8363
8674
  const handle = encodeContextHandle(context, session);
8364
8675
  const ticket = frame ? encodeSceneFrameRequest(context, frame) : null;
8365
8676
  const count = toSafeFFIU32Length(snapshots.length, "Split snapshot count");
8366
- if (count > 64)
8367
- throw new RangeError("At most 64 split snapshots can be submitted together");
8677
+ const max = nativeConstants.OT_SPLIT_SNAPSHOTS_MAX;
8678
+ if (count > max)
8679
+ throw new RangeError(`At most ${max} split snapshots can be submitted together`);
8368
8680
  const records = new BigUint64Array(count * (layout.size / 8));
8369
8681
  const fields = new Uint32Array(records.buffer);
8370
8682
  for (let index = 0;index < count; index++) {
@@ -8601,9 +8913,8 @@ class FFIRenderLib2 {
8601
8913
  const layout = nativeLayouts.ot_embedded_terminal_key;
8602
8914
  this.getYogaHost().assertMutable();
8603
8915
  const handle = encodeContextHandle(context, terminal);
8604
- const action = key.action ?? "press";
8605
- const actionCode = ["release", "press", "repeat"].indexOf(action);
8606
- if (actionCode < 0)
8916
+ const actionCode = EMBEDDED_TERMINAL_KEY_ACTIONS.get(key.action ?? "press");
8917
+ if (actionCode === undefined)
8607
8918
  throw new TypeError("Unknown embedded terminal key action");
8608
8919
  const record = createContextRecord(layout);
8609
8920
  record[layout.fields.action.offset / 4] = actionCode;
@@ -8622,10 +8933,9 @@ class FFIRenderLib2 {
8622
8933
  const layout = nativeLayouts.ot_embedded_terminal_mouse;
8623
8934
  this.getYogaHost().assertMutable();
8624
8935
  const handle = encodeContextHandle(context, terminal);
8625
- const action = ["press", "release", "motion"].indexOf(mouse.action);
8626
- const buttonName = mouse.button;
8627
- const button = buttonName === undefined ? -1 : ["unknown", "left", "right", "middle", "four", "five", "six", "seven"].indexOf(buttonName);
8628
- if (action < 0 || buttonName !== undefined && button < 0)
8936
+ const action = EMBEDDED_TERMINAL_MOUSE_ACTIONS.get(mouse.action);
8937
+ const button = EMBEDDED_TERMINAL_BUTTONS.get(mouse.button);
8938
+ if (action === undefined || button === undefined)
8629
8939
  throw new TypeError("Unknown embedded terminal mouse action or button");
8630
8940
  const record = createContextRecord(layout);
8631
8941
  record[layout.fields.action.offset / 4] = action;
@@ -8659,7 +8969,7 @@ class FFIRenderLib2 {
8659
8969
  contextEmbeddedTerminalDrainResponses(context, terminal) {
8660
8970
  this.getYogaHost().assertMutable();
8661
8971
  const handle = encodeContextHandle(context, terminal);
8662
- const output = this.embeddedTerminalResponses ??= new Uint8Array(EMBEDDED_TERMINAL_IO_BYTES_MAX);
8972
+ const output = this.embeddedTerminalResponses ??= new Uint8Array(nativeConstants.OT_EMBEDDED_TERMINAL_RESPONSE_BYTES_MAX);
8663
8973
  const count = new Uint32Array(1);
8664
8974
  const pointer = this.nativeContextPointer(context, "ot_embedded_terminal_drain_responses");
8665
8975
  let status = this.opentui.symbols.ot_embedded_terminal_drain_responses(pointer, handle, output, output.length, count);
@@ -8819,7 +9129,7 @@ class FFIRenderLib2 {
8819
9129
  if (count[0] !== bytes.length) {
8820
9130
  throw new NativeError2(operation, -5 /* InternalError */);
8821
9131
  }
8822
- return this.decoder.decode(bytes);
9132
+ return this.textDecoder.decode(bytes);
8823
9133
  }
8824
9134
  contextTextBufferGetText(context, text) {
8825
9135
  const handle = encodeContextHandle(context, text);
@@ -8860,6 +9170,23 @@ class FFIRenderLib2 {
8860
9170
  nativeResult("ot_text_buffer_highlight", this.opentui.symbols.ot_text_buffer_highlight(pointer, handle, selector, value, record));
8861
9171
  });
8862
9172
  }
9173
+ contextGroupSet(context, names) {
9174
+ const encoded = names.map((name) => this.encoder.encode(name));
9175
+ const ends = new Uint32Array(encoded.length);
9176
+ const bytes = new Uint8Array(encoded.reduce((end, name, index) => ends[index] = end + name.length, 0));
9177
+ encoded.forEach((name, index) => bytes.set(name, ends[index] - name.length));
9178
+ const output = new Uint32Array(1);
9179
+ const pointer = this.nativeContextPointer(context, "ot_context_group_set");
9180
+ nativeResult("ot_context_group_set", this.opentui.symbols.ot_context_group_set(pointer, viewOrNull(bytes), bytes.length, viewOrNull(ends), ends.length, output));
9181
+ return output[0];
9182
+ }
9183
+ contextTextBufferSetLayer(context, text, layerId, start, end, runs) {
9184
+ const handle = encodeContextHandle(context, text);
9185
+ this.getYogaHost().runMutation(() => {
9186
+ const pointer = this.nativeContextPointer(context, "ot_text_buffer_set_layer");
9187
+ nativeResult("ot_text_buffer_set_layer", this.opentui.symbols.ot_text_buffer_set_layer(pointer, handle, layerId, start, end, viewOrNull(runs), runs.length / 3));
9188
+ });
9189
+ }
8863
9190
  contextTextBufferGetHighlights(context, text, line) {
8864
9191
  const handle = encodeContextHandle(context, text);
8865
9192
  const row = toSafeFFIU32Length(line, "Highlight line");
@@ -9206,6 +9533,16 @@ class FFIRenderLib2 {
9206
9533
  const pointer = this.nativeContextPointer(context, "ot_edit_buffer_get_range");
9207
9534
  return this.readText("ot_edit_buffer_get_range", (bytes, capacity, count) => this.opentui.symbols.ot_edit_buffer_get_range(pointer, handle, coords, rowStart, colStart, rowEnd, colEnd, bytes, capacity, count));
9208
9535
  }
9536
+ contextEditBufferConvertOffset(context, editBuffer, value, toCell) {
9537
+ const operation = "ot_edit_buffer_convert_offset";
9538
+ const handle = encodeContextHandle(context, editBuffer);
9539
+ const input = toSafeFFIU32Length(value, "Edit buffer index or offset");
9540
+ const conversion = toCell ? nativeConstants.OT_EDIT_UTF16_TO_CELL : nativeConstants.OT_EDIT_CELL_TO_UTF16;
9541
+ const output = new Uint32Array(1);
9542
+ const pointer = this.nativeContextPointer(context, operation);
9543
+ nativeResult(operation, this.opentui.symbols.ot_edit_buffer_convert_offset(pointer, handle, conversion, input, output));
9544
+ return output[0];
9545
+ }
9209
9546
  contextEditBufferMeasureText(context, editBuffer, bytes) {
9210
9547
  const handle = encodeContextHandle(context, editBuffer);
9211
9548
  const input = sessionBytes(bytes, "Edit buffer measure length");
@@ -9289,6 +9626,62 @@ class FFIRenderLib2 {
9289
9626
  throw new NativeError2("ot_edit_buffer_get_highlights", -5 /* InternalError */);
9290
9627
  return decodeContextHighlights(records);
9291
9628
  }
9629
+ contextEditBufferMark(context, editBuffer, operation, mark) {
9630
+ const layout = nativeLayouts.ot_edit_mark;
9631
+ const handle = encodeContextHandle(context, editBuffer);
9632
+ const fields = layout.fields;
9633
+ let record = null;
9634
+ if (mark) {
9635
+ record = createContextRecord(layout);
9636
+ record[fields.id.offset / 4] = toSafeFFIU32Length(mark.id ?? 0, "Mark id");
9637
+ record[fields.kind.offset / 4] = toSafeFFIU32Length(mark.kind ?? 0, "Mark type id");
9638
+ record[fields.flags.offset / 4] = mark.atomic ? nativeConstants.OT_EDIT_MARK_ATOMIC : 0;
9639
+ record[fields.style.offset / 4] = toSafeFFIU32Length(mark.style ?? 0, "Mark style ID");
9640
+ record[fields.priority.offset / 4] = toSafeFFIU32Length(mark.priority ?? 0, "Mark priority");
9641
+ record[fields.start.offset / 4] = toSafeFFIU32Length(mark.start ?? 0, "Mark start");
9642
+ record[fields.end.offset / 4] = toSafeFFIU32Length(mark.end ?? 0, "Mark end");
9643
+ }
9644
+ const output = record && new Uint32Array(1);
9645
+ this.getYogaHost().runMutation(() => {
9646
+ const pointer = this.nativeContextPointer(context, "ot_edit_buffer_mark");
9647
+ nativeResult("ot_edit_buffer_mark", this.opentui.symbols.ot_edit_buffer_mark(pointer, handle, operation, record, output));
9648
+ });
9649
+ return output?.[0] ?? 0;
9650
+ }
9651
+ contextEditBufferGetMarks(context, editBuffer, id = 0, kind = nativeConstants.OT_EDIT_MARK_ANY_KIND) {
9652
+ const layout = nativeLayouts.ot_edit_mark;
9653
+ const handle = encodeContextHandle(context, editBuffer);
9654
+ const markId = toSafeFFIU32Length(id, "Mark id");
9655
+ const markKind = toSafeFFIU32Length(kind, "Mark type id");
9656
+ const count = new Uint32Array(1);
9657
+ const pointer = this.nativeContextPointer(context, "ot_edit_buffer_get_marks");
9658
+ const words = layout.size / 4;
9659
+ const copy = () => this.opentui.symbols.ot_edit_buffer_get_marks(pointer, handle, markId, markKind, this.markRecords, this.markRecords.length / words, count);
9660
+ let status = copy();
9661
+ if (status !== 0 /* Ok */) {
9662
+ nativeResult("ot_edit_buffer_get_marks", this.opentui.symbols.ot_edit_buffer_get_marks(pointer, handle, markId, markKind, null, 0, count));
9663
+ if (count[0] * words <= this.markRecords.length)
9664
+ nativeResult("ot_edit_buffer_get_marks", status);
9665
+ this.markRecords = new Uint32Array(count[0] * 2 * words);
9666
+ status = copy();
9667
+ nativeResult("ot_edit_buffer_get_marks", status);
9668
+ }
9669
+ const records = this.markRecords;
9670
+ const marks = [];
9671
+ for (let offset = 0;offset < count[0] * words; offset += words) {
9672
+ const field = (name) => records[offset + layout.fields[name].offset / 4];
9673
+ marks.push({
9674
+ id: field("id"),
9675
+ kind: field("kind"),
9676
+ atomic: (field("flags") & nativeConstants.OT_EDIT_MARK_ATOMIC) !== 0,
9677
+ style: field("style"),
9678
+ priority: field("priority"),
9679
+ start: field("start"),
9680
+ end: field("end")
9681
+ });
9682
+ }
9683
+ return marks;
9684
+ }
9292
9685
  contextEditorViewSetViewport(context, view, viewport, sizeOnly = false, moveCursor = false) {
9293
9686
  const layout = nativeLayouts.ot_editor_viewport;
9294
9687
  const handle = encodeContextHandle(context, view);
@@ -10122,7 +10515,7 @@ class FFIRenderLib2 {
10122
10515
  const flags = flag(options.useAlternateScreen, "useAlternateScreen", nativeConstants.OT_TERMINAL_ALTERNATE_SCREEN) | flag(options.mouse, "mouse", nativeConstants.OT_TERMINAL_MOUSE) | flag(options.mouseMovement, "mouseMovement", nativeConstants.OT_TERMINAL_MOUSE_MOVEMENT) | flag(options.clearOnClose, "clearOnClose", nativeConstants.OT_TERMINAL_CLEAR_ON_CLOSE) | (options.replySentinel ? nativeConstants.OT_TERMINAL_REPLY_SENTINEL : 0) | SYNCHRONIZED_OUTPUT_FLAGS[synchronizedOutput] | (options.hostMultiplexer ? nativeConstants.OT_TERMINAL_HOST_MULTIPLEXER : 0);
10123
10516
  const record = createContextRecord(layout);
10124
10517
  record[layout.fields.flags.offset / 4] = flags;
10125
- record[layout.fields.kitty_keyboard_flags.offset / 4] = toSafeFFIU32Length(options.kittyKeyboardFlags ?? 5, "Session kittyKeyboardFlags");
10518
+ record[layout.fields.kitty_keyboard_flags.offset / 4] = toSafeFFIU32Length(options.kittyKeyboardFlags ?? nativeConstants.OT_KITTY_KEYBOARD_DISAMBIGUATE | nativeConstants.OT_KITTY_KEYBOARD_ALTERNATE_KEYS, "Session kittyKeyboardFlags");
10126
10519
  const pointer = this.nativeContextPointer(context, "ot_session_setup_terminal");
10127
10520
  nativeResult("ot_session_setup_terminal", this.opentui.symbols.ot_session_setup_terminal(pointer, handle, record));
10128
10521
  }
@@ -10218,6 +10611,7 @@ class FFIRenderLib2 {
10218
10611
  break;
10219
10612
  case "palette-query":
10220
10613
  record[kind] = nativeConstants.OT_CONTROL_PALETTE_QUERY;
10614
+ record[layout.fields.argument.offset / 4] = command.sentinel ? 1 : 0;
10221
10615
  bytes = sessionBytes(command.bytes, "Session palette query length");
10222
10616
  break;
10223
10617
  case "title": {
@@ -10257,10 +10651,14 @@ class FFIRenderLib2 {
10257
10651
  break;
10258
10652
  case "query-theme-colors":
10259
10653
  record[kind] = nativeConstants.OT_CONTROL_QUERY_THEME_COLORS;
10654
+ record[layout.fields.argument.offset / 4] = command.sentinel ? 1 : 0;
10260
10655
  break;
10261
10656
  case "reset-background":
10262
10657
  record[kind] = nativeConstants.OT_CONTROL_RESET_BACKGROUND;
10263
10658
  break;
10659
+ case "end-reply-sentinel":
10660
+ record[kind] = nativeConstants.OT_CONTROL_END_REPLY_SENTINEL;
10661
+ break;
10264
10662
  default:
10265
10663
  throw new TypeError("Unknown Session control kind");
10266
10664
  }
@@ -10559,6 +10957,20 @@ class FFIRenderLib2 {
10559
10957
  nativeResult("ot_scene_has_measure", this.opentui.symbols.ot_scene_has_measure(pointer, handle, output));
10560
10958
  return output[0] !== 0;
10561
10959
  }
10960
+ sceneReachesHooks(context, node) {
10961
+ const handle = encodeContextHandle(context, node);
10962
+ const output = new Uint32Array(1);
10963
+ const pointer = this.nativeContextPointer(context, "ot_scene_reaches_hooks");
10964
+ nativeResult("ot_scene_reaches_hooks", this.opentui.symbols.ot_scene_reaches_hooks(pointer, handle, output));
10965
+ return output[0] !== 0;
10966
+ }
10967
+ scenePainted(context, node) {
10968
+ const handle = encodeContextHandle(context, node);
10969
+ const output = new Uint32Array(1);
10970
+ const pointer = this.nativeContextPointer(context, "ot_scene_painted");
10971
+ nativeResult("ot_scene_painted", this.opentui.symbols.ot_scene_painted(pointer, handle, output));
10972
+ return output[0] !== 0;
10973
+ }
10562
10974
  sceneMarkDirty(context, node) {
10563
10975
  this.getYogaHost().assertMutable();
10564
10976
  const handle = encodeContextHandle(context, node);
@@ -10692,6 +11104,155 @@ class FFIRenderLib2 {
10692
11104
  const pointer = this.nativeContextPointer(context, "ot_scene_set_styled_text");
10693
11105
  nativeResult("ot_scene_set_styled_text", this.opentui.symbols.ot_scene_set_styled_text(pointer, handle, viewOrNull(bytes), bytes.length, count === 0 ? null : records, count, viewOrNull(urlBytes), urlBytes.length));
10694
11106
  }
11107
+ sceneGetTextByteAt(context, node, x, y) {
11108
+ const output = new Uint32Array(1);
11109
+ const pointer = this.nativeContextPointer(context, "ot_scene_get_text_byte_at");
11110
+ nativeResult("ot_scene_get_text_byte_at", this.opentui.symbols.ot_scene_get_text_byte_at(pointer, encodeContextHandle(context, node), x, y, output));
11111
+ return output[0] === 4294967295 ? undefined : output[0];
11112
+ }
11113
+ markdownOptions(context, options) {
11114
+ const { fields } = nativeLayouts.ot_markdown_options;
11115
+ const record = createContextRecord(nativeLayouts.ot_markdown_options);
11116
+ record[fields.flags.offset / 4] = options.flags;
11117
+ record[fields.source_byte_limit.offset / 4] = options.sourceByteLimit ?? 0;
11118
+ if (options.syntaxStyle)
11119
+ record.set(encodeContextHandle(context, options.syntaxStyle), fields.syntax_style.offset / 4);
11120
+ const filter = this.encoder.encode((options.hookFilter ?? []).join("\x00"));
11121
+ if (filter.length > fields.hook_filter.size)
11122
+ throw new RangeError("Markdown hook filter is too long");
11123
+ new Uint8Array(record.buffer, fields.hook_filter.offset).set(filter);
11124
+ record[fields.hook_filter_byte_count.offset / 4] = filter.length;
11125
+ return record;
11126
+ }
11127
+ markdownCall(context, operation, call) {
11128
+ const output = new Uint32Array(3);
11129
+ this.getYogaHost().runMutation(() => nativeResult(operation, call(this.nativeContextPointer(context, operation), output)));
11130
+ const removed = output[2];
11131
+ return { changed: output[0], committed: output[1], removedFrom: removed === 4294967295 ? undefined : removed };
11132
+ }
11133
+ markdownCreate(context, options) {
11134
+ const record = this.markdownOptions(context, options);
11135
+ const output = new Uint32Array(handleWords);
11136
+ this.getYogaHost().runMutation(() => {
11137
+ const pointer = this.nativeContextPointer(context, "ot_markdown_create");
11138
+ nativeResult("ot_markdown_create", this.opentui.symbols.ot_markdown_create(pointer, record, output));
11139
+ });
11140
+ return decodeContextHandle(context, output);
11141
+ }
11142
+ markdownDestroy(context, doc) {
11143
+ this.destroyContextObject(context, doc, "ot_markdown_destroy");
11144
+ }
11145
+ markdownSetOptions(context, doc, options) {
11146
+ const record = this.markdownOptions(context, options);
11147
+ const handle = encodeContextHandle(context, doc);
11148
+ return this.markdownCall(context, "ot_markdown_set_options", (pointer, output) => this.opentui.symbols.ot_markdown_set_options(pointer, handle, record, output));
11149
+ }
11150
+ markdownWrite(context, doc, bytes, replace) {
11151
+ const handle = encodeContextHandle(context, doc);
11152
+ const input = sessionBytes(bytes, "Markdown byte count");
11153
+ const operation = replace ? "ot_markdown_set" : "ot_markdown_append";
11154
+ return this.markdownCall(context, operation, (pointer, output) => this.opentui.symbols[operation](pointer, handle, viewOrNull(input), input.length, output));
11155
+ }
11156
+ markdownFinish(context, doc) {
11157
+ const handle = encodeContextHandle(context, doc);
11158
+ return this.markdownCall(context, "ot_markdown_finish", (pointer, output) => this.opentui.symbols.ot_markdown_finish(pointer, handle, output));
11159
+ }
11160
+ markdownGetSource(context, doc, start = 0, end) {
11161
+ const bytes = new BigUint64Array(1);
11162
+ const count = new Uint32Array(1);
11163
+ const pointer = this.nativeContextPointer(context, "ot_markdown_get_source");
11164
+ nativeResult("ot_markdown_get_source", this.opentui.symbols.ot_markdown_get_source(pointer, encodeContextHandle(context, doc), bytes, count));
11165
+ const to = Math.min(end ?? count[0], count[0]);
11166
+ if (to <= start)
11167
+ return "";
11168
+ return markdownDecoder.decode(new Uint8Array(toArrayBuffer(Number(bytes[0]), start, to - start)));
11169
+ }
11170
+ markdownReadChanges(context, doc, count) {
11171
+ const layout = nativeLayouts.ot_markdown_block;
11172
+ const words = new Uint32Array(count * layout.size / 4);
11173
+ const halves = new Uint16Array(words.buffer);
11174
+ const output = new Uint32Array(1);
11175
+ const handle = encodeContextHandle(context, doc);
11176
+ const pointer = this.nativeContextPointer(context, "ot_markdown_read_changes");
11177
+ nativeResult("ot_markdown_read_changes", this.opentui.symbols.ot_markdown_read_changes(pointer, handle, viewOrNull(words), count, output));
11178
+ if (output[0] > count)
11179
+ throw new NativeError2("ot_markdown_read_changes", -1 /* InvalidArgument */);
11180
+ const { fields: f } = layout;
11181
+ const blocks = [];
11182
+ for (let at = 0;at < output[0] * (layout.size / 4); at += layout.size / 4) {
11183
+ const parent = words[at + f.parent_index.offset / 4];
11184
+ blocks.push({
11185
+ index: words[at + f.index.offset / 4],
11186
+ parent: parent === 4294967295 ? undefined : parent,
11187
+ kind: halves[at * 2 + f.kind.offset / 2],
11188
+ flags: halves[at * 2 + f.flags.offset / 2],
11189
+ sourceStart: words[at + f.source_start_byte.offset / 4],
11190
+ sourceEnd: words[at + f.source_end_byte.offset / 4],
11191
+ infoStart: words[at + f.info_start_byte.offset / 4],
11192
+ infoEnd: words[at + f.info_end_byte.offset / 4],
11193
+ number: words[at + f.number.offset / 4]
11194
+ });
11195
+ }
11196
+ return blocks;
11197
+ }
11198
+ markdownReadSource(context, doc, block) {
11199
+ const handle = encodeContextHandle(context, doc);
11200
+ const count = new Uint32Array(1);
11201
+ const pointer = this.nativeContextPointer(context, "ot_markdown_read_source");
11202
+ nativeResult("ot_markdown_read_source", this.opentui.symbols.ot_markdown_read_source(pointer, handle, block, null, 0, count));
11203
+ if (count[0] === 0)
11204
+ return "";
11205
+ const bytes = new Uint8Array(count[0]);
11206
+ nativeResult("ot_markdown_read_source", this.opentui.symbols.ot_markdown_read_source(pointer, handle, block, bytes, bytes.length, count));
11207
+ return markdownDecoder.decode(bytes);
11208
+ }
11209
+ markdownReadLeaf(context, doc, block) {
11210
+ const handle = encodeContextHandle(context, doc);
11211
+ const counts = new Uint32Array(3);
11212
+ const [byteCount, chunkCount, urlCount] = [counts.subarray(0, 1), counts.subarray(1, 2), counts.subarray(2, 3)];
11213
+ const pointer = this.nativeContextPointer(context, "ot_markdown_read_leaf");
11214
+ const read = (bytes, chunks, spans, urls) => nativeResult("ot_markdown_read_leaf", this.opentui.symbols.ot_markdown_read_leaf(pointer, handle, block, bytes, bytes?.length ?? 0, byteCount, chunks, spans, spans?.length ?? 0, chunkCount, urls, urls?.length ?? 0, urlCount));
11215
+ read(null, null, null, null);
11216
+ const layout = nativeLayouts.ot_styled_text_chunk;
11217
+ const stride = layout.size / 4;
11218
+ const bytes = new Uint8Array(byteCount[0]);
11219
+ const records = new Uint32Array(chunkCount[0] * stride);
11220
+ const spans = new Uint32Array(chunkCount[0]);
11221
+ const urls = new Uint8Array(urlCount[0]);
11222
+ if (chunkCount[0] > 0)
11223
+ read(viewOrNull(bytes), records, spans, viewOrNull(urls));
11224
+ const colors = new Uint16Array(records.buffer);
11225
+ const chunks = [];
11226
+ let at = 0;
11227
+ for (let index = 0;index < chunkCount[0]; index++) {
11228
+ const base = index * stride;
11229
+ const flags = records[base + layout.fields.flags.offset / 4];
11230
+ const end = at + records[base + layout.fields.byte_count.offset / 4];
11231
+ const color = (offset) => RGBA2.fromArray(colors.slice(base * 2 + offset / 2, base * 2 + offset / 2 + 4));
11232
+ const chunk = { __isChunk: true, text: markdownDecoder.decode(bytes.subarray(at, end)) };
11233
+ if (flags & nativeConstants.OT_SCENE_TEXT_FOREGROUND)
11234
+ chunk.fg = color(layout.fields.foreground.offset);
11235
+ if (flags & nativeConstants.OT_SCENE_TEXT_BACKGROUND)
11236
+ chunk.bg = color(layout.fields.background.offset);
11237
+ chunk.attributes = records[base + layout.fields.attributes.offset / 4];
11238
+ if (flags & nativeConstants.OT_SCENE_TEXT_LINK) {
11239
+ const offset = records[base + layout.fields.link_offset.offset / 4];
11240
+ const url = urls.subarray(offset, offset + records[base + layout.fields.link_byte_count.offset / 4]);
11241
+ chunk.link = { url: markdownDecoder.decode(url) };
11242
+ }
11243
+ chunks.push(chunk);
11244
+ at = end;
11245
+ }
11246
+ return { chunks, spans };
11247
+ }
11248
+ markdownBind(context, doc, block, node) {
11249
+ const handle = encodeContextHandle(context, doc);
11250
+ const target = encodeContextHandle(context, node);
11251
+ this.getYogaHost().runMutation(() => {
11252
+ const pointer = this.nativeContextPointer(context, "ot_markdown_bind");
11253
+ nativeResult("ot_markdown_bind", this.opentui.symbols.ot_markdown_bind(pointer, handle, block, target));
11254
+ });
11255
+ }
10695
11256
  encodeStyledText(content, allowLinks = true, preserveChunkOrdinals = false) {
10696
11257
  if (typeof content !== "object" || content === null || isStyledText2(content) !== true) {
10697
11258
  throw new TypeError("Native scene text requires a string or branded StyledText");
@@ -11040,7 +11601,7 @@ class FFIRenderLib2 {
11040
11601
  this.sceneLayoutRecord = undefined;
11041
11602
  try {
11042
11603
  const handle = encodeContextHandle(context, node, scratch.handle.record, scratch.handle.words);
11043
- const mode = observation === "paint" ? nativeConstants.OT_LAYOUT_PAINT : toFFIBool(observation, "Scene Yoga layout observation") ? nativeConstants.OT_LAYOUT_YOGA : nativeConstants.OT_LAYOUT_PUBLIC;
11604
+ const mode = observation === "paint" ? nativeConstants.OT_LAYOUT_PAINT : observation === "content" ? nativeConstants.OT_LAYOUT_CONTENT : toFFIBool(observation, "Scene Yoga layout observation") ? nativeConstants.OT_LAYOUT_YOGA : nativeConstants.OT_LAYOUT_PUBLIC;
11044
11605
  const { output, values, coordinates } = scratch;
11045
11606
  output[layout.fields.struct_size.offset / 4] = layout.size;
11046
11607
  output[layout.fields.abi_version.offset / 4] = nativeConstants.OT_CONTEXT_ABI_VERSION;
@@ -11218,13 +11779,14 @@ class FFIRenderLib2 {
11218
11779
  const pointer = this.nativeContextPointer(context, "ot_scene_frame_cancel");
11219
11780
  nativeResult("ot_scene_frame_cancel", this.opentui.symbols.ot_scene_frame_cancel(pointer, handle, id));
11220
11781
  }
11221
- sceneHitTest(context, session, x, y) {
11782
+ sceneHitTest(context, session, x, y, excluded = 0) {
11222
11783
  const handle = encodeContextHandle(context, session);
11223
11784
  toFFII32(x, "Scene hit x");
11224
11785
  toFFII32(y, "Scene hit y");
11786
+ toSafeFFIU32Length(excluded, "Scene hit exclusion");
11225
11787
  const output = this.hitTestOutput;
11226
- const pointer = this.nativeContextPointer(context, "ot_scene_hit_test");
11227
- nativeResult("ot_scene_hit_test", this.opentui.symbols.ot_scene_hit_test(pointer, handle, x, y, output));
11788
+ const pointer = this.nativeContextPointer(context, "ot_scene_hit_test_excluding");
11789
+ nativeResult("ot_scene_hit_test_excluding", this.opentui.symbols.ot_scene_hit_test_excluding(pointer, handle, x, y, excluded, output));
11228
11790
  return output[0];
11229
11791
  }
11230
11792
  sceneSetDebugFlags(context, session, flags) {
@@ -12397,9 +12959,9 @@ var Direction2;
12397
12959
  })(Direction2 ||= {});
12398
12960
  var Display2;
12399
12961
  ((Display) => {
12400
- Display[Display["Flex"] = 0] = "Flex";
12401
- Display[Display["None"] = 1] = "None";
12402
- Display[Display["Contents"] = 2] = "Contents";
12962
+ Display[Display["Flex"] = OT_DISPLAY_FLEX] = "Flex";
12963
+ Display[Display["None"] = OT_DISPLAY_NONE] = "None";
12964
+ Display[Display["Contents"] = OT_DISPLAY_CONTENTS] = "Contents";
12403
12965
  })(Display2 ||= {});
12404
12966
  var Edge2;
12405
12967
  ((Edge) => {
@@ -12415,16 +12977,16 @@ var Edge2;
12415
12977
  })(Edge2 ||= {});
12416
12978
  var Errata2;
12417
12979
  ((Errata) => {
12418
- Errata[Errata["None"] = 0] = "None";
12419
- Errata[Errata["StretchFlexBasis"] = 1] = "StretchFlexBasis";
12420
- Errata[Errata["AbsolutePositionWithoutInsetsExcludesPadding"] = 2] = "AbsolutePositionWithoutInsetsExcludesPadding";
12421
- Errata[Errata["AbsolutePercentAgainstInnerSize"] = 4] = "AbsolutePercentAgainstInnerSize";
12422
- Errata[Errata["All"] = 2147483647] = "All";
12423
- Errata[Errata["Classic"] = 2147483646] = "Classic";
12980
+ Errata[Errata["None"] = OT_YOGA_ERRATA_NONE] = "None";
12981
+ Errata[Errata["StretchFlexBasis"] = OT_YOGA_ERRATA_STRETCH_FLEX_BASIS] = "StretchFlexBasis";
12982
+ Errata[Errata["AbsolutePositionWithoutInsetsExcludesPadding"] = OT_YOGA_ERRATA_ABSOLUTE_POSITION_WITHOUT_INSETS_EXCLUDES_PADDING] = "AbsolutePositionWithoutInsetsExcludesPadding";
12983
+ Errata[Errata["AbsolutePercentAgainstInnerSize"] = OT_YOGA_ERRATA_ABSOLUTE_PERCENT_AGAINST_INNER_SIZE] = "AbsolutePercentAgainstInnerSize";
12984
+ Errata[Errata["All"] = OT_YOGA_ERRATA_ALL] = "All";
12985
+ Errata[Errata["Classic"] = OT_YOGA_ERRATA_CLASSIC] = "Classic";
12424
12986
  })(Errata2 ||= {});
12425
12987
  var ExperimentalFeature2;
12426
12988
  ((ExperimentalFeature) => {
12427
- ExperimentalFeature[ExperimentalFeature["WebFlexBasis"] = 0] = "WebFlexBasis";
12989
+ ExperimentalFeature[ExperimentalFeature["WebFlexBasis"] = OT_YOGA_EXPERIMENTAL_FEATURE_WEB_FLEX_BASIS] = "WebFlexBasis";
12428
12990
  })(ExperimentalFeature2 ||= {});
12429
12991
  var FlexDirection2;
12430
12992
  ((FlexDirection) => {
@@ -12450,12 +13012,12 @@ var Justify2;
12450
13012
  })(Justify2 ||= {});
12451
13013
  var LogLevel3;
12452
13014
  ((LogLevel) => {
12453
- LogLevel[LogLevel["Error"] = 0] = "Error";
12454
- LogLevel[LogLevel["Warn"] = 1] = "Warn";
12455
- LogLevel[LogLevel["Info"] = 2] = "Info";
12456
- LogLevel[LogLevel["Debug"] = 3] = "Debug";
12457
- LogLevel[LogLevel["Verbose"] = 4] = "Verbose";
12458
- LogLevel[LogLevel["Fatal"] = 5] = "Fatal";
13015
+ LogLevel[LogLevel["Error"] = OT_YOGA_LOG_LEVEL_ERROR] = "Error";
13016
+ LogLevel[LogLevel["Warn"] = OT_YOGA_LOG_LEVEL_WARN] = "Warn";
13017
+ LogLevel[LogLevel["Info"] = OT_YOGA_LOG_LEVEL_INFO] = "Info";
13018
+ LogLevel[LogLevel["Debug"] = OT_YOGA_LOG_LEVEL_DEBUG] = "Debug";
13019
+ LogLevel[LogLevel["Verbose"] = OT_YOGA_LOG_LEVEL_VERBOSE] = "Verbose";
13020
+ LogLevel[LogLevel["Fatal"] = OT_YOGA_LOG_LEVEL_FATAL] = "Fatal";
12459
13021
  })(LogLevel3 ||= {});
12460
13022
  var MeasureMode2;
12461
13023
  ((MeasureMode) => {
@@ -12465,8 +13027,8 @@ var MeasureMode2;
12465
13027
  })(MeasureMode2 ||= {});
12466
13028
  var NodeType2;
12467
13029
  ((NodeType) => {
12468
- NodeType[NodeType["Default"] = 0] = "Default";
12469
- NodeType[NodeType["Text"] = 1] = "Text";
13030
+ NodeType[NodeType["Default"] = OT_YOGA_NODE_TYPE_DEFAULT] = "Default";
13031
+ NodeType[NodeType["Text"] = OT_YOGA_NODE_TYPE_TEXT] = "Text";
12470
13032
  })(NodeType2 ||= {});
12471
13033
  var Overflow2;
12472
13034
  ((Overflow) => {
@@ -12509,9 +13071,9 @@ var DIMENSION_HEIGHT2 = Dimension2.Height;
12509
13071
  var DIRECTION_INHERIT2 = Direction2.Inherit;
12510
13072
  var DIRECTION_LTR2 = Direction2.LTR;
12511
13073
  var DIRECTION_RTL2 = Direction2.RTL;
12512
- var DISPLAY_FLEX2 = 0 /* Flex */;
12513
- var DISPLAY_NONE2 = 1 /* None */;
12514
- var DISPLAY_CONTENTS2 = 2 /* Contents */;
13074
+ var DISPLAY_FLEX2 = Display2.Flex;
13075
+ var DISPLAY_NONE2 = Display2.None;
13076
+ var DISPLAY_CONTENTS2 = Display2.Contents;
12515
13077
  var EDGE_LEFT2 = Edge2.Left;
12516
13078
  var EDGE_TOP2 = Edge2.Top;
12517
13079
  var EDGE_RIGHT2 = Edge2.Right;
@@ -12521,13 +13083,13 @@ var EDGE_END2 = Edge2.End;
12521
13083
  var EDGE_HORIZONTAL2 = Edge2.Horizontal;
12522
13084
  var EDGE_VERTICAL2 = Edge2.Vertical;
12523
13085
  var EDGE_ALL2 = Edge2.All;
12524
- var ERRATA_NONE2 = 0 /* None */;
12525
- var ERRATA_STRETCH_FLEX_BASIS2 = 1 /* StretchFlexBasis */;
12526
- var ERRATA_ABSOLUTE_POSITION_WITHOUT_INSETS_EXCLUDES_PADDING2 = 2 /* AbsolutePositionWithoutInsetsExcludesPadding */;
12527
- var ERRATA_ABSOLUTE_PERCENT_AGAINST_INNER_SIZE2 = 4 /* AbsolutePercentAgainstInnerSize */;
12528
- var ERRATA_ALL2 = 2147483647 /* All */;
12529
- var ERRATA_CLASSIC2 = 2147483646 /* Classic */;
12530
- var EXPERIMENTAL_FEATURE_WEB_FLEX_BASIS2 = 0 /* WebFlexBasis */;
13086
+ var ERRATA_NONE2 = Errata2.None;
13087
+ var ERRATA_STRETCH_FLEX_BASIS2 = Errata2.StretchFlexBasis;
13088
+ var ERRATA_ABSOLUTE_POSITION_WITHOUT_INSETS_EXCLUDES_PADDING2 = Errata2.AbsolutePositionWithoutInsetsExcludesPadding;
13089
+ var ERRATA_ABSOLUTE_PERCENT_AGAINST_INNER_SIZE2 = Errata2.AbsolutePercentAgainstInnerSize;
13090
+ var ERRATA_ALL2 = Errata2.All;
13091
+ var ERRATA_CLASSIC2 = Errata2.Classic;
13092
+ var EXPERIMENTAL_FEATURE_WEB_FLEX_BASIS2 = ExperimentalFeature2.WebFlexBasis;
12531
13093
  var FLEX_DIRECTION_COLUMN2 = FlexDirection2.Column;
12532
13094
  var FLEX_DIRECTION_COLUMN_REVERSE2 = FlexDirection2.ColumnReverse;
12533
13095
  var FLEX_DIRECTION_ROW2 = FlexDirection2.Row;
@@ -12541,17 +13103,17 @@ var JUSTIFY_FLEX_END2 = Justify2.FlexEnd;
12541
13103
  var JUSTIFY_SPACE_BETWEEN2 = Justify2.SpaceBetween;
12542
13104
  var JUSTIFY_SPACE_AROUND2 = Justify2.SpaceAround;
12543
13105
  var JUSTIFY_SPACE_EVENLY2 = Justify2.SpaceEvenly;
12544
- var LOG_LEVEL_ERROR2 = 0 /* Error */;
12545
- var LOG_LEVEL_WARN2 = 1 /* Warn */;
12546
- var LOG_LEVEL_INFO2 = 2 /* Info */;
12547
- var LOG_LEVEL_DEBUG2 = 3 /* Debug */;
12548
- var LOG_LEVEL_VERBOSE2 = 4 /* Verbose */;
12549
- var LOG_LEVEL_FATAL2 = 5 /* Fatal */;
13106
+ var LOG_LEVEL_ERROR2 = LogLevel3.Error;
13107
+ var LOG_LEVEL_WARN2 = LogLevel3.Warn;
13108
+ var LOG_LEVEL_INFO2 = LogLevel3.Info;
13109
+ var LOG_LEVEL_DEBUG2 = LogLevel3.Debug;
13110
+ var LOG_LEVEL_VERBOSE2 = LogLevel3.Verbose;
13111
+ var LOG_LEVEL_FATAL2 = LogLevel3.Fatal;
12550
13112
  var MEASURE_MODE_UNDEFINED2 = MeasureMode2.Undefined;
12551
13113
  var MEASURE_MODE_EXACTLY2 = MeasureMode2.Exactly;
12552
13114
  var MEASURE_MODE_AT_MOST2 = MeasureMode2.AtMost;
12553
- var NODE_TYPE_DEFAULT2 = 0 /* Default */;
12554
- var NODE_TYPE_TEXT2 = 1 /* Text */;
13115
+ var NODE_TYPE_DEFAULT2 = NodeType2.Default;
13116
+ var NODE_TYPE_TEXT2 = NodeType2.Text;
12555
13117
  var OVERFLOW_VISIBLE2 = Overflow2.Visible;
12556
13118
  var OVERFLOW_HIDDEN2 = Overflow2.Hidden;
12557
13119
  var OVERFLOW_SCROLL2 = Overflow2.Scroll;
@@ -12708,7 +13270,7 @@ class Config2 {
12708
13270
  }
12709
13271
  getErrata() {
12710
13272
  if (this.freed)
12711
- return 0 /* None */;
13273
+ return Errata2.None;
12712
13274
  return this.renderLib.yogaConfigGetErrata(this.ptr);
12713
13275
  }
12714
13276
  setExperimentalFeatureEnabled(feature, enabled) {
@@ -12958,7 +13520,7 @@ class Node2 {
12958
13520
  this.setEnum(YogaEnumKind.Display, display);
12959
13521
  }
12960
13522
  getDisplay() {
12961
- return this.getEnum(YogaEnumKind.Display, 0 /* Flex */);
13523
+ return this.getEnum(YogaEnumKind.Display, Display2.Flex);
12962
13524
  }
12963
13525
  setBoxSizing(boxSizing) {
12964
13526
  this.setEnum(YogaEnumKind.BoxSizing, boxSizing);
@@ -13327,7 +13889,7 @@ var Yoga = {
13327
13889
  };
13328
13890
  var yoga_default = Yoga;
13329
13891
 
13330
- export { nativeLayouts, nativeConstants, toArrayBuffer, singleton, getSingleton, destroySingleton, envRegistry2, registerEnvVar2, clearEnvCache2, generateEnvMarkdown2, generateEnvColored2, env2, stringWidth, resolveBundledFilePath2, Worker, TextAttributes2, ATTRIBUTE_BASE_BITS2, ATTRIBUTE_BASE_MASK2, getBaseAttributes2, DebugOverlayCorner2, TargetChannel2, DEFAULT_FOREGROUND_RGB2, DEFAULT_BACKGROUND_RGB2, normalizeIndexedColorIndex2, ansi256IndexToRgb2, RGBA2, normalizeColorValue2, hexToRgb2, rgbToHex2, hsvToRgb2, parseColor2, createTextAttributes2, attributesWithLink2, getLinkId2, visualizeRenderableTree2, isStyledText2, StyledText2, stringToStyledText2, black2, red2, green2, yellow2, blue2, magenta2, cyan2, white2, brightBlack2, brightRed2, brightGreen2, brightYellow2, brightBlue2, brightMagenta2, brightCyan2, brightWhite2, bgBlack2, bgRed2, bgGreen2, bgYellow2, bgBlue2, bgMagenta2, bgCyan2, bgWhite2, bold2, italic2, underline2, strikethrough2, dim2, reverse2, blink2, fg2, bg2, link2, t2, YogaEnumKind, YogaFloatKind, YogaValueKind, sceneSetEnum, sceneGetEnum, sceneSetFloat, sceneGetFloat, sceneSetValue, sceneGetValue, sceneSetDimension, UNDEFINED_VALUE, parseYogaValue, SpanInfoStruct, NativeAudioStreamFormat2, NativeAudioStreamState2, NativeAudioStreamStateNames, NativeAudioStreamCloseReason2, isBunfsPath, normalizeBunfsPath, resolveDefaultParserAsset, resolveDefaultTreeSitterWorkerPath, resolveTreeSitterWasm, NativeAudioStreamState3, NativeAudioStreamCloseReason3, NativeAudioStreamFormat3, MAX_LINK_URL_BYTES2, NativeTextViewCommand2, NativeEditCommand2, NativeEditPositionQuery2, NativeEditorStyleMask2, NativeEditHighlightOperation2, NativeEditorCommand2, NativeEditorSelectionOperation2, NativeEditorPositionQuery2, NativeEditEvent2, NativeStyleGroup, NativeStyleFlags, NATIVE_EDGE_NONE2, NativeBorder2, NativeSceneHook2, NativeSceneFrame2, NativeScenePaintPhase2, emptySceneScrollState, NATIVE_BUFFER_TEXT_BYTES_MAX2, NativeSessionState2, NativeSessionRenderStatus2, NATIVE_SESSION_CONTROL_PACKET_BYTES2, NativeSessionTerminalPhase2, NativeSessionPumpStatus2, NativeStatus2, NativeError2, NativeClipboardOperationStatus2, NativeClipboardStartStatus2, NativeClipboardCancelStatus2, NativeClipboardCopyStatus2, NativeClipboardDestroyStatus2, NativeClipboardShutdownStatus2, SceneStaging, NativePaintRecorder, LogLevel2, FFIRenderLib2, setRenderLibPath2, resolveRenderLib2, Align2, BoxSizing2, Dimension2, Direction2, Display2, Edge2, Errata2, ExperimentalFeature2, FlexDirection2, Gutter2, Justify2, LogLevel3, MeasureMode2, NodeType2, Overflow2, PositionType2, Unit2, Wrap2, ALIGN_AUTO2, ALIGN_FLEX_START2, ALIGN_CENTER2, ALIGN_FLEX_END2, ALIGN_STRETCH2, ALIGN_BASELINE2, ALIGN_SPACE_BETWEEN2, ALIGN_SPACE_AROUND2, ALIGN_SPACE_EVENLY2, BOX_SIZING_BORDER_BOX2, BOX_SIZING_CONTENT_BOX2, DIMENSION_WIDTH2, DIMENSION_HEIGHT2, DIRECTION_INHERIT2, DIRECTION_LTR2, DIRECTION_RTL2, DISPLAY_FLEX2, DISPLAY_NONE2, DISPLAY_CONTENTS2, EDGE_LEFT2, EDGE_TOP2, EDGE_RIGHT2, EDGE_BOTTOM2, EDGE_START2, EDGE_END2, EDGE_HORIZONTAL2, EDGE_VERTICAL2, EDGE_ALL2, ERRATA_NONE2, ERRATA_STRETCH_FLEX_BASIS2, ERRATA_ABSOLUTE_POSITION_WITHOUT_INSETS_EXCLUDES_PADDING2, ERRATA_ABSOLUTE_PERCENT_AGAINST_INNER_SIZE2, ERRATA_ALL2, ERRATA_CLASSIC2, EXPERIMENTAL_FEATURE_WEB_FLEX_BASIS2, FLEX_DIRECTION_COLUMN2, FLEX_DIRECTION_COLUMN_REVERSE2, FLEX_DIRECTION_ROW2, FLEX_DIRECTION_ROW_REVERSE2, GUTTER_COLUMN2, GUTTER_ROW2, GUTTER_ALL2, JUSTIFY_FLEX_START2, JUSTIFY_CENTER2, JUSTIFY_FLEX_END2, JUSTIFY_SPACE_BETWEEN2, JUSTIFY_SPACE_AROUND2, JUSTIFY_SPACE_EVENLY2, LOG_LEVEL_ERROR2, LOG_LEVEL_WARN2, LOG_LEVEL_INFO2, LOG_LEVEL_DEBUG2, LOG_LEVEL_VERBOSE2, LOG_LEVEL_FATAL2, MEASURE_MODE_UNDEFINED2, MEASURE_MODE_EXACTLY2, MEASURE_MODE_AT_MOST2, NODE_TYPE_DEFAULT2, NODE_TYPE_TEXT2, OVERFLOW_VISIBLE2, OVERFLOW_HIDDEN2, OVERFLOW_SCROLL2, POSITION_TYPE_STATIC2, POSITION_TYPE_RELATIVE2, POSITION_TYPE_ABSOLUTE2, UNIT_UNDEFINED2, UNIT_POINT2, UNIT_PERCENT2, UNIT_AUTO2, WRAP_NO_WRAP2, WRAP_WRAP2, WRAP_WRAP_REVERSE2, YogaStatus2, YogaError2, Config2, Node2, exports_yoga, yoga_default };
13892
+ export { nativeLayouts, nativeConstants, toArrayBuffer, singleton, getSingleton, destroySingleton, envRegistry2, registerEnvVar2, clearEnvCache2, generateEnvMarkdown2, generateEnvColored2, env2, stringWidth, resolveBundledFilePath2, Worker, TextAttributes2, ATTRIBUTE_BASE_BITS2, ATTRIBUTE_BASE_MASK2, getBaseAttributes2, DebugOverlayCorner2, TargetChannel2, DEFAULT_FOREGROUND_RGB2, DEFAULT_BACKGROUND_RGB2, normalizeIndexedColorIndex2, ansi256IndexToRgb2, RGBA2, normalizeColorValue2, hexToRgb2, rgbToHex2, hsvToRgb2, parseColor2, createTextAttributes2, attributesWithLink2, getLinkId2, visualizeRenderableTree2, isStyledText2, StyledText2, stringToStyledText2, black2, red2, green2, yellow2, blue2, magenta2, cyan2, white2, brightBlack2, brightRed2, brightGreen2, brightYellow2, brightBlue2, brightMagenta2, brightCyan2, brightWhite2, bgBlack2, bgRed2, bgGreen2, bgYellow2, bgBlue2, bgMagenta2, bgCyan2, bgWhite2, bold2, italic2, underline2, strikethrough2, dim2, reverse2, blink2, fg2, bg2, link2, t2, YogaEnumKind, YogaFloatKind, YogaValueKind, sceneSetEnum, sceneGetEnum, sceneSetFloat, sceneGetFloat, sceneSetValue, sceneGetValue, sceneSetDimension, UNDEFINED_VALUE, parseYogaValue, SpanInfoStruct, NativeAudioStreamFormat2, NativeAudioStreamState2, NativeAudioStreamStateNames, NativeAudioStreamCloseReason2, isBunfsPath, normalizeBunfsPath, resolveDefaultParserAsset, resolveDefaultTreeSitterWorkerPath, resolveTreeSitterWasm, NativeAudioStreamState3, NativeAudioStreamCloseReason3, NativeAudioStreamFormat3, MAX_LINK_URL_BYTES2, NativeTextViewCommand2, NativeEditCommand2, NativeEditAtomic, NativeEditPositionQuery2, NativeEditorStyleMask2, NativeEditHighlightOperation2, NativeEditorCommand2, NativeEditorSelectionOperation2, NativeEditorPositionQuery2, NativeEditEvent2, NativeStyleGroup, NativeStyleFlags, NATIVE_EDGE_NONE2, NativeBorder2, NativeSceneHook2, NativeSceneFrame2, NativeScenePaintPhase2, emptySceneScrollState, NATIVE_BUFFER_TEXT_BYTES_MAX2, NativeSessionState2, NativeSessionRenderStatus2, NATIVE_SESSION_CONTROL_PACKET_BYTES2, NativeSessionTerminalPhase2, NativeSessionPumpStatus2, NativeStatus2, NativeError2, NativeClipboardOperationStatus2, NativeClipboardStartStatus2, NativeClipboardCancelStatus2, NativeClipboardCopyStatus2, NativeClipboardDestroyStatus2, NativeClipboardShutdownStatus2, SceneStaging, NativePaintRecorder, LogLevel2, FFIRenderLib2, setRenderLibPath2, resolveRenderLib2, Align2, BoxSizing2, Dimension2, Direction2, Display2, Edge2, Errata2, ExperimentalFeature2, FlexDirection2, Gutter2, Justify2, LogLevel3, MeasureMode2, NodeType2, Overflow2, PositionType2, Unit2, Wrap2, ALIGN_AUTO2, ALIGN_FLEX_START2, ALIGN_CENTER2, ALIGN_FLEX_END2, ALIGN_STRETCH2, ALIGN_BASELINE2, ALIGN_SPACE_BETWEEN2, ALIGN_SPACE_AROUND2, ALIGN_SPACE_EVENLY2, BOX_SIZING_BORDER_BOX2, BOX_SIZING_CONTENT_BOX2, DIMENSION_WIDTH2, DIMENSION_HEIGHT2, DIRECTION_INHERIT2, DIRECTION_LTR2, DIRECTION_RTL2, DISPLAY_FLEX2, DISPLAY_NONE2, DISPLAY_CONTENTS2, EDGE_LEFT2, EDGE_TOP2, EDGE_RIGHT2, EDGE_BOTTOM2, EDGE_START2, EDGE_END2, EDGE_HORIZONTAL2, EDGE_VERTICAL2, EDGE_ALL2, ERRATA_NONE2, ERRATA_STRETCH_FLEX_BASIS2, ERRATA_ABSOLUTE_POSITION_WITHOUT_INSETS_EXCLUDES_PADDING2, ERRATA_ABSOLUTE_PERCENT_AGAINST_INNER_SIZE2, ERRATA_ALL2, ERRATA_CLASSIC2, EXPERIMENTAL_FEATURE_WEB_FLEX_BASIS2, FLEX_DIRECTION_COLUMN2, FLEX_DIRECTION_COLUMN_REVERSE2, FLEX_DIRECTION_ROW2, FLEX_DIRECTION_ROW_REVERSE2, GUTTER_COLUMN2, GUTTER_ROW2, GUTTER_ALL2, JUSTIFY_FLEX_START2, JUSTIFY_CENTER2, JUSTIFY_FLEX_END2, JUSTIFY_SPACE_BETWEEN2, JUSTIFY_SPACE_AROUND2, JUSTIFY_SPACE_EVENLY2, LOG_LEVEL_ERROR2, LOG_LEVEL_WARN2, LOG_LEVEL_INFO2, LOG_LEVEL_DEBUG2, LOG_LEVEL_VERBOSE2, LOG_LEVEL_FATAL2, MEASURE_MODE_UNDEFINED2, MEASURE_MODE_EXACTLY2, MEASURE_MODE_AT_MOST2, NODE_TYPE_DEFAULT2, NODE_TYPE_TEXT2, OVERFLOW_VISIBLE2, OVERFLOW_HIDDEN2, OVERFLOW_SCROLL2, POSITION_TYPE_STATIC2, POSITION_TYPE_RELATIVE2, POSITION_TYPE_ABSOLUTE2, UNIT_UNDEFINED2, UNIT_POINT2, UNIT_PERCENT2, UNIT_AUTO2, WRAP_NO_WRAP2, WRAP_WRAP2, WRAP_WRAP_REVERSE2, YogaStatus2, YogaError2, Config2, Node2, exports_yoga, yoga_default };
13331
13893
 
13332
- //# debugId=9E9B968FDB30B9B964756E2164756E21
13333
- //# sourceMappingURL=chunk-bun-12ttbayv.js.map
13894
+ //# debugId=CC184CCF119C49F064756E2164756E21
13895
+ //# sourceMappingURL=chunk-bun-ywheza3e.js.map