@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
@@ -153,6 +153,24 @@ __export(exports_yoga, {
153
153
  });
154
154
 
155
155
  // src/native-abi.generated.ts
156
+ var OT_DISPLAY_FLEX = 0;
157
+ var OT_DISPLAY_NONE = 1;
158
+ var OT_DISPLAY_CONTENTS = 2;
159
+ var OT_YOGA_ERRATA_NONE = 0;
160
+ var OT_YOGA_ERRATA_STRETCH_FLEX_BASIS = 1;
161
+ var OT_YOGA_ERRATA_ABSOLUTE_POSITION_WITHOUT_INSETS_EXCLUDES_PADDING = 2;
162
+ var OT_YOGA_ERRATA_ABSOLUTE_PERCENT_AGAINST_INNER_SIZE = 4;
163
+ var OT_YOGA_ERRATA_ALL = 2147483647;
164
+ var OT_YOGA_ERRATA_CLASSIC = 2147483646;
165
+ var OT_YOGA_EXPERIMENTAL_FEATURE_WEB_FLEX_BASIS = 0;
166
+ var OT_YOGA_LOG_LEVEL_ERROR = 0;
167
+ var OT_YOGA_LOG_LEVEL_WARN = 1;
168
+ var OT_YOGA_LOG_LEVEL_INFO = 2;
169
+ var OT_YOGA_LOG_LEVEL_DEBUG = 3;
170
+ var OT_YOGA_LOG_LEVEL_VERBOSE = 4;
171
+ var OT_YOGA_LOG_LEVEL_FATAL = 5;
172
+ var OT_YOGA_NODE_TYPE_DEFAULT = 0;
173
+ var OT_YOGA_NODE_TYPE_TEXT = 1;
156
174
  var nativeSymbols = {
157
175
  ot_scene_set_hooks: { args: ["ptr", "buffer", "buffer"], returns: "i32" },
158
176
  ot_scene_frame_step_with_geometry: {
@@ -164,8 +182,11 @@ var nativeSymbols = {
164
182
  ot_scene_create_node: { args: ["ptr", "buffer", "u32", "u32", "buffer"], returns: "i32" },
165
183
  ot_scene_destroy_node: { args: ["ptr", "buffer"], returns: "i32" },
166
184
  ot_scene_move_node: { args: ["ptr", "buffer", "ptr", "u32"], returns: "i32" },
185
+ ot_scene_clear_children: { args: ["ptr", "buffer"], returns: "i32" },
167
186
  ot_scene_set_measure: { args: ["ptr", "buffer", "ptr"], returns: "i32" },
168
187
  ot_scene_has_measure: { args: ["ptr", "buffer", "buffer"], returns: "i32" },
188
+ ot_scene_reaches_hooks: { args: ["ptr", "buffer", "buffer"], returns: "i32" },
189
+ ot_scene_painted: { args: ["ptr", "buffer", "buffer"], returns: "i32" },
169
190
  ot_scene_mark_dirty: { args: ["ptr", "buffer"], returns: "i32" },
170
191
  ot_scene_set_style: { args: ["ptr", "buffer", "u32", "u32", "u32", "u32", "f32", "u32"], returns: "i32" },
171
192
  ot_scene_get_style: { args: ["ptr", "buffer", "u32", "u32", "u32", "buffer"], returns: "i32" },
@@ -192,9 +213,11 @@ var nativeSymbols = {
192
213
  ot_scene_get_text: { args: ["ptr", "buffer", "ptr", "u32", "buffer"], returns: "i32" },
193
214
  ot_scene_get_text_info: { args: ["ptr", "buffer", "buffer"], returns: "i32" },
194
215
  ot_scene_get_text_lines: { args: ["ptr", "buffer", "u32", "ptr", "u32", "buffer"], returns: "i32" },
216
+ ot_scene_get_text_byte_at: { args: ["ptr", "buffer", "i32", "i32", "buffer"], returns: "i32" },
195
217
  ot_scene_get_layout: { args: ["ptr", "buffer", "u32", "buffer"], returns: "i32" },
196
218
  ot_scene_paint: { args: ["ptr", "buffer", "buffer", "u32", "u32", "buffer"], returns: "i32" },
197
219
  ot_scene_hit_test: { args: ["ptr", "buffer", "i32", "i32", "buffer"], returns: "i32" },
220
+ ot_scene_hit_test_excluding: { args: ["ptr", "buffer", "i32", "i32", "u32", "buffer"], returns: "i32" },
198
221
  ot_scene_get_stats: { args: ["ptr", "buffer", "buffer"], returns: "i32" },
199
222
  ot_scene_set_debug_flags: { args: ["ptr", "buffer", "u32"], returns: "i32" },
200
223
  ot_scene_get_cursor_state: { args: ["ptr", "buffer", "buffer"], returns: "i32" },
@@ -250,6 +273,7 @@ var nativeSymbols = {
250
273
  args: ["ptr", "buffer", "u32", "u32", "u32", "u32", "u32", "ptr", "u32", "buffer"],
251
274
  returns: "i32"
252
275
  },
276
+ ot_edit_buffer_convert_offset: { args: ["ptr", "buffer", "u32", "u32", "buffer"], returns: "i32" },
253
277
  ot_edit_buffer_measure_text: { args: ["ptr", "buffer", "ptr", "u32", "buffer"], returns: "i32" },
254
278
  ot_edit_measure_text: { args: ["ptr", "ptr", "u32", "u32", "u32", "buffer"], returns: "i32" },
255
279
  ot_edit_buffer_set_defaults: { args: ["ptr", "buffer", "u32", "buffer"], returns: "i32" },
@@ -258,6 +282,24 @@ var nativeSymbols = {
258
282
  ot_syntax_style_get_count: { args: ["ptr", "buffer", "buffer"], returns: "i32" },
259
283
  ot_edit_buffer_highlight: { args: ["ptr", "buffer", "u32", "u32", "ptr"], returns: "i32" },
260
284
  ot_edit_buffer_get_highlights: { args: ["ptr", "buffer", "u32", "ptr", "u32", "buffer"], returns: "i32" },
285
+ ot_context_group_set: { args: ["ptr", "buffer", "u32", "buffer", "u32", "buffer"], returns: "i32" },
286
+ ot_edit_buffer_set_layer: { args: ["ptr", "buffer", "u32", "u32", "u32", "ptr", "u32"], returns: "i32" },
287
+ ot_edit_buffer_mark: { args: ["ptr", "buffer", "u32", "ptr", "ptr"], returns: "i32" },
288
+ ot_edit_buffer_get_marks: { args: ["ptr", "buffer", "u32", "u32", "ptr", "u32", "buffer"], returns: "i32" },
289
+ ot_markdown_create: { args: ["ptr", "buffer", "buffer"], returns: "i32" },
290
+ ot_markdown_destroy: { args: ["ptr", "buffer"], returns: "i32" },
291
+ ot_markdown_set_options: { args: ["ptr", "buffer", "buffer", "buffer"], returns: "i32" },
292
+ ot_markdown_append: { args: ["ptr", "buffer", "ptr", "u32", "buffer"], returns: "i32" },
293
+ ot_markdown_set: { args: ["ptr", "buffer", "ptr", "u32", "buffer"], returns: "i32" },
294
+ ot_markdown_finish: { args: ["ptr", "buffer", "buffer"], returns: "i32" },
295
+ ot_markdown_get_source: { args: ["ptr", "buffer", "buffer", "buffer"], returns: "i32" },
296
+ ot_markdown_read_changes: { args: ["ptr", "buffer", "ptr", "u32", "buffer"], returns: "i32" },
297
+ ot_markdown_read_source: { args: ["ptr", "buffer", "u32", "ptr", "u32", "buffer"], returns: "i32" },
298
+ ot_markdown_read_leaf: {
299
+ args: ["ptr", "buffer", "u32", "ptr", "u32", "buffer", "ptr", "ptr", "u32", "buffer", "ptr", "u32", "buffer"],
300
+ returns: "i32"
301
+ },
302
+ ot_markdown_bind: { args: ["ptr", "buffer", "u32", "buffer"], returns: "i32" },
261
303
  ot_editor_view_set_viewport: { args: ["ptr", "buffer", "buffer", "u32", "u32"], returns: "i32" },
262
304
  ot_editor_view_get_viewport: { args: ["ptr", "buffer", "buffer"], returns: "i32" },
263
305
  ot_editor_view_set_scroll_margin: { args: ["ptr", "buffer", "f32"], returns: "i32" },
@@ -346,6 +388,7 @@ var nativeSymbols = {
346
388
  ot_text_buffer_set_tab_width: { args: ["ptr", "buffer", "u32"], returns: "i32" },
347
389
  ot_text_buffer_highlight: { args: ["ptr", "buffer", "u32", "u32", "ptr"], returns: "i32" },
348
390
  ot_text_buffer_get_highlights: { args: ["ptr", "buffer", "u32", "ptr", "u32", "buffer"], returns: "i32" },
391
+ ot_text_buffer_set_layer: { args: ["ptr", "buffer", "u32", "u32", "u32", "ptr", "u32"], returns: "i32" },
349
392
  ot_text_buffer_view_set_viewport: { args: ["ptr", "buffer", "buffer", "u32"], returns: "i32" },
350
393
  ot_text_buffer_view_command: { args: ["ptr", "buffer", "u32", "u32"], returns: "i32" },
351
394
  ot_text_buffer_view_set_tab_color: { args: ["ptr", "buffer", "ptr"], returns: "i32" },
@@ -1122,6 +1165,71 @@ var nativeLayouts = {
1122
1165
  ref: { offset: 16, size: 4, alignment: 4, type: "u32" }
1123
1166
  }
1124
1167
  },
1168
+ ot_highlight_run: {
1169
+ size: 12,
1170
+ alignment: 4,
1171
+ fields: {
1172
+ start_byte: { offset: 0, size: 4, alignment: 4, type: "u32" },
1173
+ end_byte: { offset: 4, size: 4, alignment: 4, type: "u32" },
1174
+ group_set: { offset: 8, size: 4, alignment: 4, type: "u32" }
1175
+ }
1176
+ },
1177
+ ot_edit_mark: {
1178
+ size: 76,
1179
+ alignment: 4,
1180
+ fields: {
1181
+ struct_size: { offset: 0, size: 4, alignment: 4, type: "u32" },
1182
+ abi_version: { offset: 4, size: 4, alignment: 4, type: "u32" },
1183
+ id: { offset: 8, size: 4, alignment: 4, type: "u32" },
1184
+ kind: { offset: 12, size: 4, alignment: 4, type: "u32" },
1185
+ flags: { offset: 16, size: 4, alignment: 4, type: "u32" },
1186
+ style: { offset: 20, size: 4, alignment: 4, type: "u32" },
1187
+ value: { offset: 24, size: 32, alignment: 4, type: "ot_editor_style" },
1188
+ priority: { offset: 56, size: 4, alignment: 4, type: "u32" },
1189
+ start: { offset: 60, size: 4, alignment: 4, type: "u32" },
1190
+ end: { offset: 64, size: 4, alignment: 4, type: "u32" },
1191
+ start_byte: { offset: 68, size: 4, alignment: 4, type: "u32" },
1192
+ end_byte: { offset: 72, size: 4, alignment: 4, type: "u32" }
1193
+ }
1194
+ },
1195
+ ot_markdown_options: {
1196
+ size: 296,
1197
+ alignment: 8,
1198
+ fields: {
1199
+ struct_size: { offset: 0, size: 4, alignment: 4, type: "u32" },
1200
+ abi_version: { offset: 4, size: 4, alignment: 4, type: "u32" },
1201
+ flags: { offset: 8, size: 4, alignment: 4, type: "u32" },
1202
+ source_byte_limit: { offset: 12, size: 4, alignment: 4, type: "u32" },
1203
+ syntax_style: { offset: 16, size: 16, alignment: 8, type: "ot_handle" },
1204
+ hook_filter_byte_count: { offset: 32, size: 4, alignment: 4, type: "u32" },
1205
+ reserved: { offset: 36, size: 4, alignment: 4, type: "u32" },
1206
+ hook_filter: { offset: 40, size: 256, alignment: 1, type: "[256]u8" }
1207
+ }
1208
+ },
1209
+ ot_markdown_result: {
1210
+ size: 12,
1211
+ alignment: 4,
1212
+ fields: {
1213
+ changed_block_count: { offset: 0, size: 4, alignment: 4, type: "u32" },
1214
+ committed_top_level_count: { offset: 4, size: 4, alignment: 4, type: "u32" },
1215
+ removed_from_index: { offset: 8, size: 4, alignment: 4, type: "u32" }
1216
+ }
1217
+ },
1218
+ ot_markdown_block: {
1219
+ size: 32,
1220
+ alignment: 4,
1221
+ fields: {
1222
+ index: { offset: 0, size: 4, alignment: 4, type: "u32" },
1223
+ parent_index: { offset: 4, size: 4, alignment: 4, type: "u32" },
1224
+ kind: { offset: 8, size: 2, alignment: 2, type: "u16" },
1225
+ flags: { offset: 10, size: 2, alignment: 2, type: "u16" },
1226
+ source_start_byte: { offset: 12, size: 4, alignment: 4, type: "u32" },
1227
+ source_end_byte: { offset: 16, size: 4, alignment: 4, type: "u32" },
1228
+ info_start_byte: { offset: 20, size: 4, alignment: 4, type: "u32" },
1229
+ info_end_byte: { offset: 24, size: 4, alignment: 4, type: "u32" },
1230
+ number: { offset: 28, size: 4, alignment: 4, type: "u32" }
1231
+ }
1232
+ },
1125
1233
  ot_editor_viewport: {
1126
1234
  size: 24,
1127
1235
  alignment: 4,
@@ -1724,6 +1832,27 @@ var nativeLayouts = {
1724
1832
  foreground: { offset: 40, size: 8, alignment: 2, type: "[4]u16" },
1725
1833
  background: { offset: 48, size: 8, alignment: 2, type: "[4]u16" }
1726
1834
  }
1835
+ },
1836
+ ot_scene_cell: {
1837
+ size: 24,
1838
+ alignment: 4,
1839
+ fields: {
1840
+ character: { offset: 0, size: 4, alignment: 4, type: "u32" },
1841
+ attributes: { offset: 4, size: 4, alignment: 4, type: "u32" },
1842
+ foreground: { offset: 8, size: 8, alignment: 2, type: "[4]u16" },
1843
+ background: { offset: 16, size: 8, alignment: 2, type: "[4]u16" }
1844
+ }
1845
+ },
1846
+ ot_scene_record_cells: {
1847
+ size: 24,
1848
+ alignment: 4,
1849
+ fields: {
1850
+ header: { offset: 0, size: 8, alignment: 4, type: "ot_scene_record_header" },
1851
+ x: { offset: 8, size: 4, alignment: 4, type: "i32" },
1852
+ y: { offset: 12, size: 4, alignment: 4, type: "i32" },
1853
+ width: { offset: 16, size: 4, alignment: 4, type: "u32" },
1854
+ count: { offset: 20, size: 4, alignment: 4, type: "u32" }
1855
+ }
1727
1856
  }
1728
1857
  };
1729
1858
  var nativeConstants = {
@@ -1804,6 +1933,7 @@ var nativeConstants = {
1804
1933
  OT_STYLE_ENUM_OVERFLOW: 8,
1805
1934
  OT_STYLE_ENUM_DISPLAY: 9,
1806
1935
  OT_STYLE_ENUM_BOX_SIZING: 10,
1936
+ OT_STYLE_ENUM_LAYOUT_MODE: 11,
1807
1937
  OT_STYLE_FLOAT_FLEX: 0,
1808
1938
  OT_STYLE_FLOAT_FLEX_GROW: 1,
1809
1939
  OT_STYLE_FLOAT_FLEX_SHRINK: 2,
@@ -1873,6 +2003,24 @@ var nativeConstants = {
1873
2003
  OT_DISPLAY_NONE: 1,
1874
2004
  OT_BOX_SIZING_BORDER_BOX: 0,
1875
2005
  OT_BOX_SIZING_CONTENT_BOX: 1,
2006
+ OT_LAYOUT_MODE_FLEX: 0,
2007
+ OT_LAYOUT_MODE_LIST: 1,
2008
+ OT_DISPLAY_CONTENTS: 2,
2009
+ OT_YOGA_ERRATA_NONE: 0,
2010
+ OT_YOGA_ERRATA_STRETCH_FLEX_BASIS: 1,
2011
+ OT_YOGA_ERRATA_ABSOLUTE_POSITION_WITHOUT_INSETS_EXCLUDES_PADDING: 2,
2012
+ OT_YOGA_ERRATA_ABSOLUTE_PERCENT_AGAINST_INNER_SIZE: 4,
2013
+ OT_YOGA_ERRATA_ALL: 2147483647,
2014
+ OT_YOGA_ERRATA_CLASSIC: 2147483646,
2015
+ OT_YOGA_EXPERIMENTAL_FEATURE_WEB_FLEX_BASIS: 0,
2016
+ OT_YOGA_LOG_LEVEL_ERROR: 0,
2017
+ OT_YOGA_LOG_LEVEL_WARN: 1,
2018
+ OT_YOGA_LOG_LEVEL_INFO: 2,
2019
+ OT_YOGA_LOG_LEVEL_DEBUG: 3,
2020
+ OT_YOGA_LOG_LEVEL_VERBOSE: 4,
2021
+ OT_YOGA_LOG_LEVEL_FATAL: 5,
2022
+ OT_YOGA_NODE_TYPE_DEFAULT: 0,
2023
+ OT_YOGA_NODE_TYPE_TEXT: 1,
1876
2024
  OT_STYLE_ENUM_DIRECTION_MAX: 2,
1877
2025
  OT_STYLE_ENUM_FLEX_DIRECTION_MAX: 3,
1878
2026
  OT_STYLE_ENUM_JUSTIFY_CONTENT_MAX: 5,
@@ -1884,12 +2032,14 @@ var nativeConstants = {
1884
2032
  OT_STYLE_ENUM_OVERFLOW_MAX: 2,
1885
2033
  OT_STYLE_ENUM_DISPLAY_MAX: 1,
1886
2034
  OT_STYLE_ENUM_BOX_SIZING_MAX: 1,
2035
+ OT_STYLE_ENUM_LAYOUT_MODE_MAX: 1,
1887
2036
  OT_MEASURE_UNDEFINED: 0,
1888
2037
  OT_MEASURE_EXACTLY: 1,
1889
2038
  OT_MEASURE_AT_MOST: 2,
1890
2039
  OT_LAYOUT_PUBLIC: 0,
1891
2040
  OT_LAYOUT_YOGA: 1,
1892
2041
  OT_LAYOUT_PAINT: 2,
2042
+ OT_LAYOUT_CONTENT: 3,
1893
2043
  OT_BORDER_NONE: 0,
1894
2044
  OT_BORDER_LEFT: 1,
1895
2045
  OT_BORDER_BOTTOM: 2,
@@ -1905,6 +2055,37 @@ var nativeConstants = {
1905
2055
  OT_COLOR_DEFAULT: 2,
1906
2056
  OT_COLOR_CHANNEL_MASK: 255,
1907
2057
  OT_COLOR_META_SHIFT: 8,
2058
+ OT_COLOR_ANSI_0: 0,
2059
+ OT_COLOR_ANSI_1: 8388608,
2060
+ OT_COLOR_ANSI_2: 32768,
2061
+ OT_COLOR_ANSI_3: 8421376,
2062
+ OT_COLOR_ANSI_4: 128,
2063
+ OT_COLOR_ANSI_5: 8388736,
2064
+ OT_COLOR_ANSI_6: 32896,
2065
+ OT_COLOR_ANSI_7: 12632256,
2066
+ OT_COLOR_ANSI_8: 8421504,
2067
+ OT_COLOR_ANSI_9: 16711680,
2068
+ OT_COLOR_ANSI_10: 65280,
2069
+ OT_COLOR_ANSI_11: 16776960,
2070
+ OT_COLOR_ANSI_12: 255,
2071
+ OT_COLOR_ANSI_13: 16711935,
2072
+ OT_COLOR_ANSI_14: 65535,
2073
+ OT_COLOR_ANSI_15: 16777215,
2074
+ OT_COLOR_CUBE_BASE: 55,
2075
+ OT_COLOR_CUBE_STEP: 40,
2076
+ OT_COLOR_GRAY_BASE: 8,
2077
+ OT_COLOR_GRAY_STEP: 10,
2078
+ OT_ATTR_BOLD: 1,
2079
+ OT_ATTR_DIM: 2,
2080
+ OT_ATTR_ITALIC: 4,
2081
+ OT_ATTR_UNDERLINE: 8,
2082
+ OT_ATTR_BLINK: 16,
2083
+ OT_ATTR_INVERSE: 32,
2084
+ OT_ATTR_HIDDEN: 64,
2085
+ OT_ATTR_STRIKETHROUGH: 128,
2086
+ OT_ATTR_BASE_MASK: 255,
2087
+ OT_ATTR_LINK_SHIFT: 8,
2088
+ OT_ATTR_LINK_MASK: 16777215,
1908
2089
  OT_SCENE_TEXT_SELECTION_RESET: 0,
1909
2090
  OT_SCENE_TEXT_SELECTION_SET: 1,
1910
2091
  OT_SCENE_TEXT_SELECTION_UPDATE: 2,
@@ -1924,6 +2105,10 @@ var nativeConstants = {
1924
2105
  OT_SCENE_FULL_PATH_UNRETAINED: 16,
1925
2106
  OT_SCENE_FULL_PATH_OPTIONS: 32,
1926
2107
  OT_SCENE_FULL_PATH_NON_LOCAL: 64,
2108
+ OT_CURSOR_STYLE_BLOCK: 0,
2109
+ OT_CURSOR_STYLE_LINE: 1,
2110
+ OT_CURSOR_STYLE_UNDERLINE: 2,
2111
+ OT_CURSOR_STYLE_DEFAULT: 3,
1927
2112
  OT_SCENE_HOOK_UPDATE: 1,
1928
2113
  OT_SCENE_HOOK_RESIZE: 2,
1929
2114
  OT_SCENE_HOOK_LAYOUT_CHANGED: 4,
@@ -1979,6 +2164,7 @@ var nativeConstants = {
1979
2164
  OT_SCENE_SCROLL_ALIGN_NEAREST: 0,
1980
2165
  OT_SCENE_SCROLL_ALIGN_START: 1,
1981
2166
  OT_SCENE_SCROLL_ALIGN_END: 2,
2167
+ OT_SCENE_SCROLL_PADDING_MAX: 65535,
1982
2168
  OT_SCENE_SCROLL_CHANGED_OFFSET_X: 1,
1983
2169
  OT_SCENE_SCROLL_CHANGED_OFFSET_Y: 2,
1984
2170
  OT_SCENE_SCROLL_CHANGED_CONTENT: 4,
@@ -2000,6 +2186,7 @@ var nativeConstants = {
2000
2186
  OT_RENDER_PENDING: 1,
2001
2187
  OT_RENDER_SKIPPED: 2,
2002
2188
  OT_RENDER_FAILED: 3,
2189
+ OT_SPLIT_SNAPSHOTS_MAX: 64,
2003
2190
  OT_SESSION_BUFFER_CURRENT: 0,
2004
2191
  OT_SESSION_BUFFER_NEXT: 1,
2005
2192
  OT_WIDTH_METHOD_WCWIDTH: 0,
@@ -2007,10 +2194,37 @@ var nativeConstants = {
2007
2194
  OT_WIDTH_METHOD_NO_ZWJ: 2,
2008
2195
  OT_WIDTH_METHOD_UNICODE_WIDE: 3,
2009
2196
  OT_BUFFER_RESPECT_ALPHA: 1,
2197
+ OT_EMBEDDED_TERMINAL_CURSOR_BAR: 0,
2198
+ OT_EMBEDDED_TERMINAL_CURSOR_BLOCK: 1,
2199
+ OT_EMBEDDED_TERMINAL_CURSOR_UNDERLINE: 2,
2200
+ OT_EMBEDDED_TERMINAL_CURSOR_BLOCK_HOLLOW: 3,
2201
+ OT_EMBEDDED_TERMINAL_MOD_SHIFT: 1,
2202
+ OT_EMBEDDED_TERMINAL_MOD_CTRL: 2,
2203
+ OT_EMBEDDED_TERMINAL_MOD_ALT: 4,
2204
+ OT_EMBEDDED_TERMINAL_MOD_SUPER: 8,
2205
+ OT_EMBEDDED_TERMINAL_MOD_CAPS_LOCK: 16,
2206
+ OT_EMBEDDED_TERMINAL_MOD_NUM_LOCK: 32,
2207
+ OT_EMBEDDED_TERMINAL_KEY_RELEASE: 0,
2208
+ OT_EMBEDDED_TERMINAL_KEY_PRESS: 1,
2209
+ OT_EMBEDDED_TERMINAL_KEY_REPEAT: 2,
2210
+ OT_EMBEDDED_TERMINAL_MOUSE_PRESS: 0,
2211
+ OT_EMBEDDED_TERMINAL_MOUSE_RELEASE: 1,
2212
+ OT_EMBEDDED_TERMINAL_MOUSE_MOTION: 2,
2213
+ OT_EMBEDDED_TERMINAL_BUTTON_NONE: -1,
2214
+ OT_EMBEDDED_TERMINAL_BUTTON_UNKNOWN: 0,
2215
+ OT_EMBEDDED_TERMINAL_BUTTON_LEFT: 1,
2216
+ OT_EMBEDDED_TERMINAL_BUTTON_RIGHT: 2,
2217
+ OT_EMBEDDED_TERMINAL_BUTTON_MIDDLE: 3,
2218
+ OT_EMBEDDED_TERMINAL_BUTTON_FOUR: 4,
2219
+ OT_EMBEDDED_TERMINAL_BUTTON_FIVE: 5,
2220
+ OT_EMBEDDED_TERMINAL_BUTTON_SIX: 6,
2221
+ OT_EMBEDDED_TERMINAL_BUTTON_SEVEN: 7,
2222
+ OT_EMBEDDED_TERMINAL_INPUT_BYTES_MAX: 1048576,
2010
2223
  OT_EMBEDDED_TERMINAL_INVALIDATE: 0,
2011
2224
  OT_EMBEDDED_TERMINAL_SCROLL: 1,
2012
2225
  OT_EMBEDDED_TERMINAL_CLEAR_SELECTION: 2,
2013
2226
  OT_EMBEDDED_TERMINAL_SET_TRANSPARENT_BACKGROUND: 3,
2227
+ OT_EMBEDDED_TERMINAL_RESPONSE_BYTES_MAX: 1048576,
2014
2228
  OT_EDIT_CURSOR_CHANGED: 1,
2015
2229
  OT_EDIT_CONTENT_CHANGED: 2,
2016
2230
  OT_EDIT_HISTORY_CURSOR_CHANGED: 4,
@@ -2065,6 +2279,9 @@ var nativeConstants = {
2065
2279
  OT_EDIT_CLEAR: 10,
2066
2280
  OT_EDIT_CLEAR_HISTORY: 11,
2067
2281
  OT_EDIT_DEBUG_ROPE: 12,
2282
+ OT_EDIT_CURSOR_OFFSET_ATOMIC: 13,
2283
+ OT_EDIT_KEEP_OUTSIDE: 14,
2284
+ OT_EDIT_ATOMIC: 1,
2068
2285
  OT_EDIT_POSITION_CURSOR: 0,
2069
2286
  OT_EDIT_POSITION_NEXT_WORD: 1,
2070
2287
  OT_EDIT_POSITION_PREV_WORD: 2,
@@ -2074,15 +2291,60 @@ var nativeConstants = {
2074
2291
  OT_EDIT_POSITION_LINE_START: 6,
2075
2292
  OT_EDIT_POSITION_END: 7,
2076
2293
  OT_EDIT_POSITION_PREV_CHAR: 8,
2294
+ OT_EDIT_BYTE_TO_CELL: 0,
2295
+ OT_EDIT_CELL_TO_BYTE: 1,
2296
+ OT_EDIT_UTF16_TO_CELL: 2,
2297
+ OT_EDIT_CELL_TO_UTF16: 3,
2077
2298
  OT_EDITOR_STYLE_FOREGROUND: 1,
2078
2299
  OT_EDITOR_STYLE_BACKGROUND: 2,
2079
2300
  OT_EDITOR_STYLE_ATTRIBUTES: 4,
2301
+ OT_EDITOR_STYLE_ATTRIBUTE_MASK: 8,
2080
2302
  OT_EDIT_HIGHLIGHT_ADD_LINE: 0,
2081
2303
  OT_EDIT_HIGHLIGHT_ADD_RANGE: 1,
2082
2304
  OT_EDIT_HIGHLIGHT_REMOVE_REF: 2,
2083
2305
  OT_EDIT_HIGHLIGHT_CLEAR_LINE: 3,
2084
2306
  OT_EDIT_HIGHLIGHT_CLEAR_ALL: 4,
2085
2307
  OT_STYLE_RUN_FLAG: 2147483648,
2308
+ OT_GROUP_SET_NAME_COUNT_MAX: 16,
2309
+ OT_GROUP_SET_NAME_BYTE_COUNT_MAX: 64,
2310
+ OT_EDIT_MARK_ADD: 0,
2311
+ OT_EDIT_MARK_REMOVE: 1,
2312
+ OT_EDIT_MARK_CLEAR: 2,
2313
+ OT_EDIT_MARK_ATOMIC: 1,
2314
+ OT_EDIT_MARK_STYLE_VALUE: 2,
2315
+ OT_EDIT_MARK_ANY_KIND: 4294967295,
2316
+ OT_MD_CONCEAL: 1,
2317
+ OT_MD_HYPERLINKS: 2,
2318
+ OT_MD_MATH: 4,
2319
+ OT_MD_HOOK: 8,
2320
+ OT_MD_HOOK_FILTER_BYTE_COUNT_MAX: 256,
2321
+ OT_MD_PARAGRAPH: 0,
2322
+ OT_MD_HEADING: 1,
2323
+ OT_MD_CODE: 2,
2324
+ OT_MD_HTML: 3,
2325
+ OT_MD_RULE: 4,
2326
+ OT_MD_TABLE: 5,
2327
+ OT_MD_TABLE_ROW: 6,
2328
+ OT_MD_TABLE_CELL: 7,
2329
+ OT_MD_QUOTE: 8,
2330
+ OT_MD_LIST: 9,
2331
+ OT_MD_ITEM: 10,
2332
+ OT_MD_BLOCK_CLOSED: 1,
2333
+ OT_MD_BLOCK_SETEXT: 2,
2334
+ OT_MD_BLOCK_ORDERED: 4,
2335
+ OT_MD_BLOCK_TIGHT: 8,
2336
+ OT_MD_BLOCK_TASK: 16,
2337
+ OT_MD_BLOCK_CHECKED: 32,
2338
+ OT_MD_BLOCK_BLANK_AFTER: 64,
2339
+ OT_MD_BLOCK_FENCED: 128,
2340
+ OT_MD_BLOCK_HOOKED: 256,
2341
+ OT_MD_BLOCK_MATH: 512,
2342
+ OT_MD_BLOCK_HEADER: 1024,
2343
+ OT_MD_BLOCK_OPEN: 2048,
2344
+ OT_MD_BLOCK_ALIGN_LEFT: 4096,
2345
+ OT_MD_BLOCK_ALIGN_RIGHT: 8192,
2346
+ OT_MD_SPAN_CODE: 1,
2347
+ OT_MD_SPAN_MATH: 2,
2086
2348
  OT_EDITOR_MOVE_UP: 0,
2087
2349
  OT_EDITOR_MOVE_DOWN: 1,
2088
2350
  OT_EDITOR_GOTO_LINE_END: 2,
@@ -2126,6 +2388,7 @@ var nativeConstants = {
2126
2388
  OT_IMAGE_PROTOCOL_BLOCKS: 3,
2127
2389
  OT_IMAGE_DRAW_SOURCE_WIDTH: 1,
2128
2390
  OT_IMAGE_DRAW_SOURCE_HEIGHT: 2,
2391
+ OT_IMAGE_ENCODED_BYTES_MAX: 67108864,
2129
2392
  OT_IMAGE_FORMAT_UNKNOWN: 0,
2130
2393
  OT_IMAGE_FORMAT_PNG: 1,
2131
2394
  OT_IMAGE_FORMAT_RGBA: 2,
@@ -2195,6 +2458,10 @@ var nativeConstants = {
2195
2458
  OT_BUFFER_STACK_CLEAR_OPACITY: 6,
2196
2459
  OT_BUFFER_GRID_INNER: 1,
2197
2460
  OT_BUFFER_GRID_OUTER: 2,
2461
+ OT_CELL_CHAR_KIND_MASK: 3221225472,
2462
+ OT_CELL_CHAR_IMAGE: 1073741824,
2463
+ OT_CELL_CHAR_GRAPHEME: 2147483648,
2464
+ OT_CELL_CHAR_CONTINUATION: 3221225472,
2198
2465
  OT_SESSION_CONTROL_PACKET_BYTES: 4096,
2199
2466
  OT_TERMINAL_ALTERNATE_SCREEN: 1,
2200
2467
  OT_TERMINAL_MOUSE: 2,
@@ -2204,6 +2471,12 @@ var nativeConstants = {
2204
2471
  OT_TERMINAL_SYNC_ALWAYS: 32,
2205
2472
  OT_TERMINAL_SYNC_NEVER: 64,
2206
2473
  OT_TERMINAL_HOST_MULTIPLEXER: 128,
2474
+ OT_KITTY_KEYBOARD_DISAMBIGUATE: 1,
2475
+ OT_KITTY_KEYBOARD_EVENT_TYPES: 2,
2476
+ OT_KITTY_KEYBOARD_ALTERNATE_KEYS: 4,
2477
+ OT_KITTY_KEYBOARD_ALL_KEYS_AS_ESCAPES: 8,
2478
+ OT_KITTY_KEYBOARD_REPORT_TEXT: 16,
2479
+ OT_KITTY_KEYBOARD_ALL: 31,
2207
2480
  OT_CONTROL_CAPABILITY_RESPONSE: 1,
2208
2481
  OT_CONTROL_TITLE: 2,
2209
2482
  OT_CONTROL_MOUSE: 3,
@@ -2215,6 +2488,7 @@ var nativeConstants = {
2215
2488
  OT_CONTROL_RESET_BACKGROUND: 9,
2216
2489
  OT_CONTROL_PALETTE_QUERY: 10,
2217
2490
  OT_CONTROL_PROGRAM_STATUS: 11,
2491
+ OT_CONTROL_END_REPLY_SENTINEL: 12,
2218
2492
  OT_CURSOR_POSITION: 1,
2219
2493
  OT_CURSOR_STYLE: 2,
2220
2494
  OT_CURSOR_BLINKING: 4,
@@ -2375,11 +2649,13 @@ var nativeConstants = {
2375
2649
  OT_INPUT_EXPECT_KITTY_KEYBOARD: 2,
2376
2650
  OT_INPUT_EXPECT_CURSOR_POSITION: 4,
2377
2651
  OT_INPUT_EXPECT_SENTINEL: 8,
2652
+ OT_INPUT_EXPECT_ESCAPE_PREFIX: 16,
2378
2653
  OT_INPUT_EVENTS_MIN: 4,
2379
2654
  OT_INPUT_PAYLOAD_BYTES_MIN: 4384,
2380
2655
  OT_INPUT_TIMEOUT_NS: 20000000,
2381
2656
  OT_DIAGNOSTIC_MESSAGE_BYTES: 4096,
2382
2657
  OT_DIAGNOSTIC_TRUNCATED: 1,
2658
+ OT_DIAGNOSTIC_QUEUE_MAX: 64,
2383
2659
  OT_SCENE_RECORD_BYTES_MAX: 67108864,
2384
2660
  OT_SCENE_RECORD_PHASE_BEFORE: 0,
2385
2661
  OT_SCENE_RECORD_PHASE_SELF: 1,
@@ -2397,6 +2673,7 @@ var nativeConstants = {
2397
2673
  OT_SCENE_RECORD_SCENE_BODY: 10,
2398
2674
  OT_SCENE_RECORD_IMAGE: 11,
2399
2675
  OT_SCENE_RECORD_UNICODE: 12,
2676
+ OT_SCENE_RECORD_CELLS: 13,
2400
2677
  OT_SCENE_RECORD_GRAYSCALE_FOREGROUND: 1,
2401
2678
  OT_SCENE_RECORD_GRAYSCALE_BACKGROUND: 2,
2402
2679
  OT_SCENE_RECORD_GRAYSCALE_SUPERSAMPLED: 4,
@@ -3586,19 +3863,20 @@ function setGlobalWorkerMessageHandler(handler) {
3586
3863
  import { existsSync as existsSync2, writeFileSync } from "fs";
3587
3864
 
3588
3865
  // src/types.ts
3866
+ var attributeBits = nativeConstants;
3589
3867
  var TextAttributes2 = {
3590
3868
  NONE: 0,
3591
- BOLD: 1 << 0,
3592
- DIM: 1 << 1,
3593
- ITALIC: 1 << 2,
3594
- UNDERLINE: 1 << 3,
3595
- BLINK: 1 << 4,
3596
- INVERSE: 1 << 5,
3597
- HIDDEN: 1 << 6,
3598
- STRIKETHROUGH: 1 << 7
3869
+ BOLD: attributeBits.OT_ATTR_BOLD,
3870
+ DIM: attributeBits.OT_ATTR_DIM,
3871
+ ITALIC: attributeBits.OT_ATTR_ITALIC,
3872
+ UNDERLINE: attributeBits.OT_ATTR_UNDERLINE,
3873
+ BLINK: attributeBits.OT_ATTR_BLINK,
3874
+ INVERSE: attributeBits.OT_ATTR_INVERSE,
3875
+ HIDDEN: attributeBits.OT_ATTR_HIDDEN,
3876
+ STRIKETHROUGH: attributeBits.OT_ATTR_STRIKETHROUGH
3599
3877
  };
3600
- var ATTRIBUTE_BASE_BITS2 = 8;
3601
- var ATTRIBUTE_BASE_MASK2 = 255;
3878
+ var ATTRIBUTE_BASE_BITS2 = nativeConstants.OT_ATTR_LINK_SHIFT;
3879
+ var ATTRIBUTE_BASE_MASK2 = nativeConstants.OT_ATTR_BASE_MASK;
3602
3880
  function getBaseAttributes2(attr) {
3603
3881
  return attr & ATTRIBUTE_BASE_MASK2;
3604
3882
  }
@@ -3619,29 +3897,15 @@ var TargetChannel2;
3619
3897
  // src/lib/RGBA.ts
3620
3898
  var DEFAULT_FOREGROUND_RGB2 = [255, 255, 255];
3621
3899
  var DEFAULT_BACKGROUND_RGB2 = [0, 0, 0];
3622
- var INTENT_RGB = 0;
3623
- var INTENT_INDEXED = 1;
3624
- var INTENT_DEFAULT = 2;
3900
+ var INTENT_RGB = nativeConstants.OT_COLOR_RGB;
3901
+ var INTENT_INDEXED = nativeConstants.OT_COLOR_INDEXED;
3902
+ var INTENT_DEFAULT = nativeConstants.OT_COLOR_DEFAULT;
3625
3903
  var ZERO_RGBA_BUFFER = new Uint16Array(4);
3626
- var ANSI16_RGB = [
3627
- [0, 0, 0],
3628
- [128, 0, 0],
3629
- [0, 128, 0],
3630
- [128, 128, 0],
3631
- [0, 0, 128],
3632
- [128, 0, 128],
3633
- [0, 128, 128],
3634
- [192, 192, 192],
3635
- [128, 128, 128],
3636
- [255, 0, 0],
3637
- [0, 255, 0],
3638
- [255, 255, 0],
3639
- [0, 0, 255],
3640
- [255, 0, 255],
3641
- [0, 255, 255],
3642
- [255, 255, 255]
3643
- ];
3644
- var ANSI_256_CUBE_LEVELS = [0, 95, 135, 175, 215, 255];
3904
+ var ANSI16_RGB = Array.from({ length: 16 }, (_, slot) => {
3905
+ const rgb = nativeConstants[`OT_COLOR_ANSI_${slot}`];
3906
+ return [rgb >>> 16, rgb >>> 8 & 255, rgb & 255];
3907
+ });
3908
+ 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);
3645
3909
  function packMeta(intent, slot = 0) {
3646
3910
  return (slot & 255 | (intent & 255) << 8) >>> 0;
3647
3911
  }
@@ -3681,7 +3945,7 @@ function ansi256IndexToRgb2(index) {
3681
3945
  const b = cubeIndex % 6;
3682
3946
  return [ANSI_256_CUBE_LEVELS[r], ANSI_256_CUBE_LEVELS[g], ANSI_256_CUBE_LEVELS[b]];
3683
3947
  }
3684
- const value = 8 + (normalizedIndex - 232) * 10;
3948
+ const value = nativeConstants.OT_COLOR_GRAY_BASE + (normalizedIndex - 232) * nativeConstants.OT_COLOR_GRAY_STEP;
3685
3949
  return [value, value, value];
3686
3950
  }
3687
3951
 
@@ -3928,9 +4192,9 @@ function createTextAttributes2({
3928
4192
  attributes |= TextAttributes2.STRIKETHROUGH;
3929
4193
  return attributes;
3930
4194
  }
3931
- var ATTRIBUTE_BASE_MASK = 255;
3932
- var LINK_ID_SHIFT = 8;
3933
- var LINK_ID_PAYLOAD_MASK = 16777215;
4195
+ var ATTRIBUTE_BASE_MASK = nativeConstants.OT_ATTR_BASE_MASK;
4196
+ var LINK_ID_SHIFT = nativeConstants.OT_ATTR_LINK_SHIFT;
4197
+ var LINK_ID_PAYLOAD_MASK = nativeConstants.OT_ATTR_LINK_MASK;
3934
4198
  function attributesWithLink2(baseAttributes, linkId) {
3935
4199
  const base = baseAttributes & ATTRIBUTE_BASE_MASK;
3936
4200
  const linkBits = (linkId & LINK_ID_PAYLOAD_MASK) << LINK_ID_SHIFT;
@@ -4095,7 +4359,8 @@ var YogaEnumKind = {
4095
4359
  FlexWrap: nativeConstants.OT_STYLE_ENUM_FLEX_WRAP,
4096
4360
  Overflow: nativeConstants.OT_STYLE_ENUM_OVERFLOW,
4097
4361
  Display: nativeConstants.OT_STYLE_ENUM_DISPLAY,
4098
- BoxSizing: nativeConstants.OT_STYLE_ENUM_BOX_SIZING
4362
+ BoxSizing: nativeConstants.OT_STYLE_ENUM_BOX_SIZING,
4363
+ LayoutMode: nativeConstants.OT_STYLE_ENUM_LAYOUT_MODE
4099
4364
  };
4100
4365
  var YogaFloatKind = {
4101
4366
  Flex: nativeConstants.OT_STYLE_FLOAT_FLEX,
@@ -5831,7 +6096,10 @@ var NativeEditCommand2;
5831
6096
  NativeEditCommand[NativeEditCommand["Clear"] = 10] = "Clear";
5832
6097
  NativeEditCommand[NativeEditCommand["ClearHistory"] = 11] = "ClearHistory";
5833
6098
  NativeEditCommand[NativeEditCommand["DebugRope"] = 12] = "DebugRope";
6099
+ NativeEditCommand[NativeEditCommand["CursorOffsetAtomic"] = 13] = "CursorOffsetAtomic";
6100
+ NativeEditCommand[NativeEditCommand["KeepOutside"] = 14] = "KeepOutside";
5834
6101
  })(NativeEditCommand2 ||= {});
6102
+ var NativeEditAtomic = 1;
5835
6103
  var NativeEditPositionQuery2;
5836
6104
  ((NativeEditPositionQuery) => {
5837
6105
  NativeEditPositionQuery[NativeEditPositionQuery["Cursor"] = 0] = "Cursor";
@@ -6193,8 +6461,15 @@ registerEnvVar2({
6193
6461
  type: "string",
6194
6462
  required: false
6195
6463
  });
6196
- var CURSOR_STYLE_TO_ID = { block: 0, line: 1, underline: 2, default: 3 };
6197
- var CURSOR_ID_TO_STYLE = ["block", "line", "underline", "default"];
6464
+ var CURSOR_STYLE_TO_ID = {
6465
+ block: nativeConstants.OT_CURSOR_STYLE_BLOCK,
6466
+ line: nativeConstants.OT_CURSOR_STYLE_LINE,
6467
+ underline: nativeConstants.OT_CURSOR_STYLE_UNDERLINE,
6468
+ default: nativeConstants.OT_CURSOR_STYLE_DEFAULT
6469
+ };
6470
+ var CURSOR_ID_TO_STYLE = [];
6471
+ for (const [style, id] of Object.entries(CURSOR_STYLE_TO_ID))
6472
+ CURSOR_ID_TO_STYLE[id] = style;
6198
6473
  var PROGRAM_STATE_TO_ID = {
6199
6474
  idle: nativeConstants.OT_PROGRAM_STATE_IDLE,
6200
6475
  working: nativeConstants.OT_PROGRAM_STATE_WORKING,
@@ -6535,7 +6810,7 @@ function encodeDrawColors(colors, fields, options, base = 0) {
6535
6810
  contextBufferColor(background, colors, (base + fields.background.offset) / 2);
6536
6811
  return background !== undefined;
6537
6812
  }
6538
- var DIAGNOSTIC_QUEUE_MAX = 64;
6813
+ var DIAGNOSTIC_QUEUE_MAX = nativeConstants.OT_DIAGNOSTIC_QUEUE_MAX;
6539
6814
  var DIAGNOSTIC_BATCH = 8;
6540
6815
  function createDiagnosticDrainRecord() {
6541
6816
  const layout = nativeLayouts.ot_diagnostic_drain;
@@ -6716,7 +6991,28 @@ function encodeImageDrawOptions(options, words, signed, base) {
6716
6991
  function viewOrNull(value) {
6717
6992
  return value.byteLength === 0 ? null : value;
6718
6993
  }
6719
- var EMBEDDED_TERMINAL_IO_BYTES_MAX = 1024 * 1024;
6994
+ var EMBEDDED_TERMINAL_IO_BYTES_MAX = nativeConstants.OT_EMBEDDED_TERMINAL_INPUT_BYTES_MAX;
6995
+ var EMBEDDED_TERMINAL_KEY_ACTIONS = new Map([
6996
+ ["release", nativeConstants.OT_EMBEDDED_TERMINAL_KEY_RELEASE],
6997
+ ["press", nativeConstants.OT_EMBEDDED_TERMINAL_KEY_PRESS],
6998
+ ["repeat", nativeConstants.OT_EMBEDDED_TERMINAL_KEY_REPEAT]
6999
+ ]);
7000
+ var EMBEDDED_TERMINAL_MOUSE_ACTIONS = new Map([
7001
+ ["press", nativeConstants.OT_EMBEDDED_TERMINAL_MOUSE_PRESS],
7002
+ ["release", nativeConstants.OT_EMBEDDED_TERMINAL_MOUSE_RELEASE],
7003
+ ["motion", nativeConstants.OT_EMBEDDED_TERMINAL_MOUSE_MOTION]
7004
+ ]);
7005
+ var EMBEDDED_TERMINAL_BUTTONS = new Map([
7006
+ [undefined, nativeConstants.OT_EMBEDDED_TERMINAL_BUTTON_NONE],
7007
+ ["unknown", nativeConstants.OT_EMBEDDED_TERMINAL_BUTTON_UNKNOWN],
7008
+ ["left", nativeConstants.OT_EMBEDDED_TERMINAL_BUTTON_LEFT],
7009
+ ["right", nativeConstants.OT_EMBEDDED_TERMINAL_BUTTON_RIGHT],
7010
+ ["middle", nativeConstants.OT_EMBEDDED_TERMINAL_BUTTON_MIDDLE],
7011
+ ["four", nativeConstants.OT_EMBEDDED_TERMINAL_BUTTON_FOUR],
7012
+ ["five", nativeConstants.OT_EMBEDDED_TERMINAL_BUTTON_FIVE],
7013
+ ["six", nativeConstants.OT_EMBEDDED_TERMINAL_BUTTON_SIX],
7014
+ ["seven", nativeConstants.OT_EMBEDDED_TERMINAL_BUTTON_SEVEN]
7015
+ ]);
6720
7016
  function embeddedTerminalDimension(value, name) {
6721
7017
  if (!Number.isInteger(value) || value < 1 || value > 65535) {
6722
7018
  throw new RangeError(`Embedded terminal ${name} must be an integer between 1 and 65535`);
@@ -6736,7 +7032,9 @@ function contextBufferColor(value, color = new Uint16Array(4), offset = 0) {
6736
7032
  color[offset + index] = channel;
6737
7033
  }
6738
7034
  const intent = color[offset + 1] >>> 8;
6739
- if (color[offset + 2] > 255 || color[offset + 3] > 255 || intent > 2 || intent !== 1 && color[offset] > 255) {
7035
+ const indexed = intent === nativeConstants.OT_COLOR_INDEXED;
7036
+ const known = indexed || intent === nativeConstants.OT_COLOR_RGB || intent === nativeConstants.OT_COLOR_DEFAULT;
7037
+ if (color[offset + 2] > 255 || color[offset + 3] > 255 || !known || !indexed && color[offset] > 255) {
6740
7038
  throw new RangeError("Invalid terminal color intent");
6741
7039
  }
6742
7040
  return color;
@@ -7577,11 +7875,14 @@ function recordedPixels(data, length) {
7577
7875
  throw new RangeError("Pixel byte count exceeds the supplied view");
7578
7876
  return input.subarray(0, count);
7579
7877
  }
7878
+ function isAttributeByte(value) {
7879
+ return Number.isInteger(value) && value >= 0 && value <= 255;
7880
+ }
7580
7881
  function encodeEditorStyle(style) {
7581
7882
  const layout = nativeLayouts.ot_editor_style;
7582
7883
  const record = new Uint32Array(layout.size / 4);
7583
7884
  const colors = new Uint16Array(record.buffer);
7584
- const { fg, bg, attributes } = style;
7885
+ const { fg, bg, attributes, suppliedAttributes } = style;
7585
7886
  record[layout.fields.struct_size.offset / 4] = layout.size;
7586
7887
  record[layout.fields.abi_version.offset / 4] = nativeConstants.OT_CONTEXT_ABI_VERSION;
7587
7888
  if (fg != null) {
@@ -7596,6 +7897,13 @@ function encodeEditorStyle(style) {
7596
7897
  record[layout.fields.flags.offset / 4] |= 4 /* Attributes */;
7597
7898
  record[layout.fields.attributes.offset / 4] = toSafeFFIU32Length(attributes, "Editor style attributes");
7598
7899
  }
7900
+ if (suppliedAttributes != null) {
7901
+ if (!isAttributeByte(attributes) || !isAttributeByte(suppliedAttributes)) {
7902
+ throw new RangeError("Masked editor style attributes must be integers from 0 to 255");
7903
+ }
7904
+ record[layout.fields.flags.offset / 4] |= nativeConstants.OT_EDITOR_STYLE_ATTRIBUTE_MASK;
7905
+ record[layout.fields.attributes.offset / 4] |= suppliedAttributes << 16;
7906
+ }
7599
7907
  return record;
7600
7908
  }
7601
7909
  function drawTextString(text) {
@@ -7610,6 +7918,7 @@ function drawRecordBottomTitle(options) {
7610
7918
  return options.operation === "box" && options.bottomTitle ? drawTextString(options.bottomTitle) : "";
7611
7919
  }
7612
7920
  var drawTextEncoder = new TextEncoder;
7921
+ var markdownDecoder = new TextDecoder("utf-8", { ignoreBOM: true });
7613
7922
  function encodeDrawText(text, output) {
7614
7923
  if (text === "")
7615
7924
  return 0;
@@ -7708,9 +8017,9 @@ function widthMethodId(widthMethod, label) {
7708
8017
  return id;
7709
8018
  }
7710
8019
  function widthMethodFromCode(code) {
7711
- if (code === 0)
8020
+ if (code === nativeConstants.OT_WIDTH_METHOD_WCWIDTH)
7712
8021
  return "wcwidth";
7713
- return code === 3 ? "unicode-wide" : "unicode";
8022
+ return code === nativeConstants.OT_WIDTH_METHOD_UNICODE_WIDE ? "unicode-wide" : "unicode";
7714
8023
  }
7715
8024
  var yogaSymbols = {
7716
8025
  yogaConfigCreateChecked: { args: ["buffer"], returns: "u32" },
@@ -8180,6 +8489,7 @@ class FFIRenderLib2 {
8180
8489
  sceneFlushApplied = new Uint32Array(1);
8181
8490
  editorSelectionRecord = createEditorSelectionRecord();
8182
8491
  editorViewInfoRecord = createContextRecord(nativeLayouts.ot_editor_view_info);
8492
+ markRecords = new Uint32Array(16 * nativeLayouts.ot_edit_mark.size / 4);
8183
8493
  videoStateRecord = new Uint8Array(nativeLayouts.ot_video_state.size);
8184
8494
  videoStateView = new DataView(this.videoStateRecord.buffer);
8185
8495
  selectionResetRecord = encodeEditorSelection({ operation: 2 /* Reset */ });
@@ -8229,6 +8539,7 @@ class FFIRenderLib2 {
8229
8539
  encoder = new TextEncoder;
8230
8540
  emptyBytes = new Uint8Array(0);
8231
8541
  decoder = new TextDecoder;
8542
+ textDecoder = new TextDecoder("utf-8", { ignoreBOM: true });
8232
8543
  logCallbackWrapper = null;
8233
8544
  diagnosticDrain;
8234
8545
  nativeSpanFeedCallbackWrapper = null;
@@ -8343,8 +8654,9 @@ class FFIRenderLib2 {
8343
8654
  const handle = encodeContextHandle(context, session);
8344
8655
  const ticket = frame ? encodeSceneFrameRequest(context, frame) : null;
8345
8656
  const count = toSafeFFIU32Length(snapshots.length, "Split snapshot count");
8346
- if (count > 64)
8347
- throw new RangeError("At most 64 split snapshots can be submitted together");
8657
+ const max = nativeConstants.OT_SPLIT_SNAPSHOTS_MAX;
8658
+ if (count > max)
8659
+ throw new RangeError(`At most ${max} split snapshots can be submitted together`);
8348
8660
  const records = new BigUint64Array(count * (layout.size / 8));
8349
8661
  const fields = new Uint32Array(records.buffer);
8350
8662
  for (let index = 0;index < count; index++) {
@@ -8581,9 +8893,8 @@ class FFIRenderLib2 {
8581
8893
  const layout = nativeLayouts.ot_embedded_terminal_key;
8582
8894
  this.getYogaHost().assertMutable();
8583
8895
  const handle = encodeContextHandle(context, terminal);
8584
- const action = key.action ?? "press";
8585
- const actionCode = ["release", "press", "repeat"].indexOf(action);
8586
- if (actionCode < 0)
8896
+ const actionCode = EMBEDDED_TERMINAL_KEY_ACTIONS.get(key.action ?? "press");
8897
+ if (actionCode === undefined)
8587
8898
  throw new TypeError("Unknown embedded terminal key action");
8588
8899
  const record = createContextRecord(layout);
8589
8900
  record[layout.fields.action.offset / 4] = actionCode;
@@ -8602,10 +8913,9 @@ class FFIRenderLib2 {
8602
8913
  const layout = nativeLayouts.ot_embedded_terminal_mouse;
8603
8914
  this.getYogaHost().assertMutable();
8604
8915
  const handle = encodeContextHandle(context, terminal);
8605
- const action = ["press", "release", "motion"].indexOf(mouse.action);
8606
- const buttonName = mouse.button;
8607
- const button = buttonName === undefined ? -1 : ["unknown", "left", "right", "middle", "four", "five", "six", "seven"].indexOf(buttonName);
8608
- if (action < 0 || buttonName !== undefined && button < 0)
8916
+ const action = EMBEDDED_TERMINAL_MOUSE_ACTIONS.get(mouse.action);
8917
+ const button = EMBEDDED_TERMINAL_BUTTONS.get(mouse.button);
8918
+ if (action === undefined || button === undefined)
8609
8919
  throw new TypeError("Unknown embedded terminal mouse action or button");
8610
8920
  const record = createContextRecord(layout);
8611
8921
  record[layout.fields.action.offset / 4] = action;
@@ -8639,7 +8949,7 @@ class FFIRenderLib2 {
8639
8949
  contextEmbeddedTerminalDrainResponses(context, terminal) {
8640
8950
  this.getYogaHost().assertMutable();
8641
8951
  const handle = encodeContextHandle(context, terminal);
8642
- const output = this.embeddedTerminalResponses ??= new Uint8Array(EMBEDDED_TERMINAL_IO_BYTES_MAX);
8952
+ const output = this.embeddedTerminalResponses ??= new Uint8Array(nativeConstants.OT_EMBEDDED_TERMINAL_RESPONSE_BYTES_MAX);
8643
8953
  const count = new Uint32Array(1);
8644
8954
  const pointer = this.nativeContextPointer(context, "ot_embedded_terminal_drain_responses");
8645
8955
  let status = this.opentui.symbols.ot_embedded_terminal_drain_responses(pointer, handle, output, output.length, count);
@@ -8799,7 +9109,7 @@ class FFIRenderLib2 {
8799
9109
  if (count[0] !== bytes.length) {
8800
9110
  throw new NativeError2(operation, -5 /* InternalError */);
8801
9111
  }
8802
- return this.decoder.decode(bytes);
9112
+ return this.textDecoder.decode(bytes);
8803
9113
  }
8804
9114
  contextTextBufferGetText(context, text) {
8805
9115
  const handle = encodeContextHandle(context, text);
@@ -8840,6 +9150,23 @@ class FFIRenderLib2 {
8840
9150
  nativeResult("ot_text_buffer_highlight", this.opentui.symbols.ot_text_buffer_highlight(pointer, handle, selector, value, record));
8841
9151
  });
8842
9152
  }
9153
+ contextGroupSet(context, names) {
9154
+ const encoded = names.map((name) => this.encoder.encode(name));
9155
+ const ends = new Uint32Array(encoded.length);
9156
+ const bytes = new Uint8Array(encoded.reduce((end, name, index) => ends[index] = end + name.length, 0));
9157
+ encoded.forEach((name, index) => bytes.set(name, ends[index] - name.length));
9158
+ const output = new Uint32Array(1);
9159
+ const pointer = this.nativeContextPointer(context, "ot_context_group_set");
9160
+ nativeResult("ot_context_group_set", this.opentui.symbols.ot_context_group_set(pointer, viewOrNull(bytes), bytes.length, viewOrNull(ends), ends.length, output));
9161
+ return output[0];
9162
+ }
9163
+ contextTextBufferSetLayer(context, text, layerId, start, end, runs) {
9164
+ const handle = encodeContextHandle(context, text);
9165
+ this.getYogaHost().runMutation(() => {
9166
+ const pointer = this.nativeContextPointer(context, "ot_text_buffer_set_layer");
9167
+ nativeResult("ot_text_buffer_set_layer", this.opentui.symbols.ot_text_buffer_set_layer(pointer, handle, layerId, start, end, viewOrNull(runs), runs.length / 3));
9168
+ });
9169
+ }
8843
9170
  contextTextBufferGetHighlights(context, text, line) {
8844
9171
  const handle = encodeContextHandle(context, text);
8845
9172
  const row = toSafeFFIU32Length(line, "Highlight line");
@@ -9186,6 +9513,16 @@ class FFIRenderLib2 {
9186
9513
  const pointer = this.nativeContextPointer(context, "ot_edit_buffer_get_range");
9187
9514
  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));
9188
9515
  }
9516
+ contextEditBufferConvertOffset(context, editBuffer, value, toCell) {
9517
+ const operation = "ot_edit_buffer_convert_offset";
9518
+ const handle = encodeContextHandle(context, editBuffer);
9519
+ const input = toSafeFFIU32Length(value, "Edit buffer index or offset");
9520
+ const conversion = toCell ? nativeConstants.OT_EDIT_UTF16_TO_CELL : nativeConstants.OT_EDIT_CELL_TO_UTF16;
9521
+ const output = new Uint32Array(1);
9522
+ const pointer = this.nativeContextPointer(context, operation);
9523
+ nativeResult(operation, this.opentui.symbols.ot_edit_buffer_convert_offset(pointer, handle, conversion, input, output));
9524
+ return output[0];
9525
+ }
9189
9526
  contextEditBufferMeasureText(context, editBuffer, bytes) {
9190
9527
  const handle = encodeContextHandle(context, editBuffer);
9191
9528
  const input = sessionBytes(bytes, "Edit buffer measure length");
@@ -9269,6 +9606,62 @@ class FFIRenderLib2 {
9269
9606
  throw new NativeError2("ot_edit_buffer_get_highlights", -5 /* InternalError */);
9270
9607
  return decodeContextHighlights(records);
9271
9608
  }
9609
+ contextEditBufferMark(context, editBuffer, operation, mark) {
9610
+ const layout = nativeLayouts.ot_edit_mark;
9611
+ const handle = encodeContextHandle(context, editBuffer);
9612
+ const fields = layout.fields;
9613
+ let record = null;
9614
+ if (mark) {
9615
+ record = createContextRecord(layout);
9616
+ record[fields.id.offset / 4] = toSafeFFIU32Length(mark.id ?? 0, "Mark id");
9617
+ record[fields.kind.offset / 4] = toSafeFFIU32Length(mark.kind ?? 0, "Mark type id");
9618
+ record[fields.flags.offset / 4] = mark.atomic ? nativeConstants.OT_EDIT_MARK_ATOMIC : 0;
9619
+ record[fields.style.offset / 4] = toSafeFFIU32Length(mark.style ?? 0, "Mark style ID");
9620
+ record[fields.priority.offset / 4] = toSafeFFIU32Length(mark.priority ?? 0, "Mark priority");
9621
+ record[fields.start.offset / 4] = toSafeFFIU32Length(mark.start ?? 0, "Mark start");
9622
+ record[fields.end.offset / 4] = toSafeFFIU32Length(mark.end ?? 0, "Mark end");
9623
+ }
9624
+ const output = record && new Uint32Array(1);
9625
+ this.getYogaHost().runMutation(() => {
9626
+ const pointer = this.nativeContextPointer(context, "ot_edit_buffer_mark");
9627
+ nativeResult("ot_edit_buffer_mark", this.opentui.symbols.ot_edit_buffer_mark(pointer, handle, operation, record, output));
9628
+ });
9629
+ return output?.[0] ?? 0;
9630
+ }
9631
+ contextEditBufferGetMarks(context, editBuffer, id = 0, kind = nativeConstants.OT_EDIT_MARK_ANY_KIND) {
9632
+ const layout = nativeLayouts.ot_edit_mark;
9633
+ const handle = encodeContextHandle(context, editBuffer);
9634
+ const markId = toSafeFFIU32Length(id, "Mark id");
9635
+ const markKind = toSafeFFIU32Length(kind, "Mark type id");
9636
+ const count = new Uint32Array(1);
9637
+ const pointer = this.nativeContextPointer(context, "ot_edit_buffer_get_marks");
9638
+ const words = layout.size / 4;
9639
+ const copy = () => this.opentui.symbols.ot_edit_buffer_get_marks(pointer, handle, markId, markKind, this.markRecords, this.markRecords.length / words, count);
9640
+ let status = copy();
9641
+ if (status !== 0 /* Ok */) {
9642
+ nativeResult("ot_edit_buffer_get_marks", this.opentui.symbols.ot_edit_buffer_get_marks(pointer, handle, markId, markKind, null, 0, count));
9643
+ if (count[0] * words <= this.markRecords.length)
9644
+ nativeResult("ot_edit_buffer_get_marks", status);
9645
+ this.markRecords = new Uint32Array(count[0] * 2 * words);
9646
+ status = copy();
9647
+ nativeResult("ot_edit_buffer_get_marks", status);
9648
+ }
9649
+ const records = this.markRecords;
9650
+ const marks = [];
9651
+ for (let offset = 0;offset < count[0] * words; offset += words) {
9652
+ const field = (name) => records[offset + layout.fields[name].offset / 4];
9653
+ marks.push({
9654
+ id: field("id"),
9655
+ kind: field("kind"),
9656
+ atomic: (field("flags") & nativeConstants.OT_EDIT_MARK_ATOMIC) !== 0,
9657
+ style: field("style"),
9658
+ priority: field("priority"),
9659
+ start: field("start"),
9660
+ end: field("end")
9661
+ });
9662
+ }
9663
+ return marks;
9664
+ }
9272
9665
  contextEditorViewSetViewport(context, view, viewport, sizeOnly = false, moveCursor = false) {
9273
9666
  const layout = nativeLayouts.ot_editor_viewport;
9274
9667
  const handle = encodeContextHandle(context, view);
@@ -10102,7 +10495,7 @@ class FFIRenderLib2 {
10102
10495
  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);
10103
10496
  const record = createContextRecord(layout);
10104
10497
  record[layout.fields.flags.offset / 4] = flags;
10105
- record[layout.fields.kitty_keyboard_flags.offset / 4] = toSafeFFIU32Length(options.kittyKeyboardFlags ?? 5, "Session kittyKeyboardFlags");
10498
+ record[layout.fields.kitty_keyboard_flags.offset / 4] = toSafeFFIU32Length(options.kittyKeyboardFlags ?? nativeConstants.OT_KITTY_KEYBOARD_DISAMBIGUATE | nativeConstants.OT_KITTY_KEYBOARD_ALTERNATE_KEYS, "Session kittyKeyboardFlags");
10106
10499
  const pointer = this.nativeContextPointer(context, "ot_session_setup_terminal");
10107
10500
  nativeResult("ot_session_setup_terminal", this.opentui.symbols.ot_session_setup_terminal(pointer, handle, record));
10108
10501
  }
@@ -10198,6 +10591,7 @@ class FFIRenderLib2 {
10198
10591
  break;
10199
10592
  case "palette-query":
10200
10593
  record[kind] = nativeConstants.OT_CONTROL_PALETTE_QUERY;
10594
+ record[layout.fields.argument.offset / 4] = command.sentinel ? 1 : 0;
10201
10595
  bytes = sessionBytes(command.bytes, "Session palette query length");
10202
10596
  break;
10203
10597
  case "title": {
@@ -10237,10 +10631,14 @@ class FFIRenderLib2 {
10237
10631
  break;
10238
10632
  case "query-theme-colors":
10239
10633
  record[kind] = nativeConstants.OT_CONTROL_QUERY_THEME_COLORS;
10634
+ record[layout.fields.argument.offset / 4] = command.sentinel ? 1 : 0;
10240
10635
  break;
10241
10636
  case "reset-background":
10242
10637
  record[kind] = nativeConstants.OT_CONTROL_RESET_BACKGROUND;
10243
10638
  break;
10639
+ case "end-reply-sentinel":
10640
+ record[kind] = nativeConstants.OT_CONTROL_END_REPLY_SENTINEL;
10641
+ break;
10244
10642
  default:
10245
10643
  throw new TypeError("Unknown Session control kind");
10246
10644
  }
@@ -10539,6 +10937,20 @@ class FFIRenderLib2 {
10539
10937
  nativeResult("ot_scene_has_measure", this.opentui.symbols.ot_scene_has_measure(pointer, handle, output));
10540
10938
  return output[0] !== 0;
10541
10939
  }
10940
+ sceneReachesHooks(context, node) {
10941
+ const handle = encodeContextHandle(context, node);
10942
+ const output = new Uint32Array(1);
10943
+ const pointer = this.nativeContextPointer(context, "ot_scene_reaches_hooks");
10944
+ nativeResult("ot_scene_reaches_hooks", this.opentui.symbols.ot_scene_reaches_hooks(pointer, handle, output));
10945
+ return output[0] !== 0;
10946
+ }
10947
+ scenePainted(context, node) {
10948
+ const handle = encodeContextHandle(context, node);
10949
+ const output = new Uint32Array(1);
10950
+ const pointer = this.nativeContextPointer(context, "ot_scene_painted");
10951
+ nativeResult("ot_scene_painted", this.opentui.symbols.ot_scene_painted(pointer, handle, output));
10952
+ return output[0] !== 0;
10953
+ }
10542
10954
  sceneMarkDirty(context, node) {
10543
10955
  this.getYogaHost().assertMutable();
10544
10956
  const handle = encodeContextHandle(context, node);
@@ -10672,6 +11084,155 @@ class FFIRenderLib2 {
10672
11084
  const pointer = this.nativeContextPointer(context, "ot_scene_set_styled_text");
10673
11085
  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));
10674
11086
  }
11087
+ sceneGetTextByteAt(context, node, x, y) {
11088
+ const output = new Uint32Array(1);
11089
+ const pointer = this.nativeContextPointer(context, "ot_scene_get_text_byte_at");
11090
+ nativeResult("ot_scene_get_text_byte_at", this.opentui.symbols.ot_scene_get_text_byte_at(pointer, encodeContextHandle(context, node), x, y, output));
11091
+ return output[0] === 4294967295 ? undefined : output[0];
11092
+ }
11093
+ markdownOptions(context, options) {
11094
+ const { fields } = nativeLayouts.ot_markdown_options;
11095
+ const record = createContextRecord(nativeLayouts.ot_markdown_options);
11096
+ record[fields.flags.offset / 4] = options.flags;
11097
+ record[fields.source_byte_limit.offset / 4] = options.sourceByteLimit ?? 0;
11098
+ if (options.syntaxStyle)
11099
+ record.set(encodeContextHandle(context, options.syntaxStyle), fields.syntax_style.offset / 4);
11100
+ const filter = this.encoder.encode((options.hookFilter ?? []).join("\x00"));
11101
+ if (filter.length > fields.hook_filter.size)
11102
+ throw new RangeError("Markdown hook filter is too long");
11103
+ new Uint8Array(record.buffer, fields.hook_filter.offset).set(filter);
11104
+ record[fields.hook_filter_byte_count.offset / 4] = filter.length;
11105
+ return record;
11106
+ }
11107
+ markdownCall(context, operation, call) {
11108
+ const output = new Uint32Array(3);
11109
+ this.getYogaHost().runMutation(() => nativeResult(operation, call(this.nativeContextPointer(context, operation), output)));
11110
+ const removed = output[2];
11111
+ return { changed: output[0], committed: output[1], removedFrom: removed === 4294967295 ? undefined : removed };
11112
+ }
11113
+ markdownCreate(context, options) {
11114
+ const record = this.markdownOptions(context, options);
11115
+ const output = new Uint32Array(handleWords);
11116
+ this.getYogaHost().runMutation(() => {
11117
+ const pointer = this.nativeContextPointer(context, "ot_markdown_create");
11118
+ nativeResult("ot_markdown_create", this.opentui.symbols.ot_markdown_create(pointer, record, output));
11119
+ });
11120
+ return decodeContextHandle(context, output);
11121
+ }
11122
+ markdownDestroy(context, doc) {
11123
+ this.destroyContextObject(context, doc, "ot_markdown_destroy");
11124
+ }
11125
+ markdownSetOptions(context, doc, options) {
11126
+ const record = this.markdownOptions(context, options);
11127
+ const handle = encodeContextHandle(context, doc);
11128
+ return this.markdownCall(context, "ot_markdown_set_options", (pointer, output) => this.opentui.symbols.ot_markdown_set_options(pointer, handle, record, output));
11129
+ }
11130
+ markdownWrite(context, doc, bytes, replace) {
11131
+ const handle = encodeContextHandle(context, doc);
11132
+ const input = sessionBytes(bytes, "Markdown byte count");
11133
+ const operation = replace ? "ot_markdown_set" : "ot_markdown_append";
11134
+ return this.markdownCall(context, operation, (pointer, output) => this.opentui.symbols[operation](pointer, handle, viewOrNull(input), input.length, output));
11135
+ }
11136
+ markdownFinish(context, doc) {
11137
+ const handle = encodeContextHandle(context, doc);
11138
+ return this.markdownCall(context, "ot_markdown_finish", (pointer, output) => this.opentui.symbols.ot_markdown_finish(pointer, handle, output));
11139
+ }
11140
+ markdownGetSource(context, doc, start = 0, end) {
11141
+ const bytes = new BigUint64Array(1);
11142
+ const count = new Uint32Array(1);
11143
+ const pointer = this.nativeContextPointer(context, "ot_markdown_get_source");
11144
+ nativeResult("ot_markdown_get_source", this.opentui.symbols.ot_markdown_get_source(pointer, encodeContextHandle(context, doc), bytes, count));
11145
+ const to = Math.min(end ?? count[0], count[0]);
11146
+ if (to <= start)
11147
+ return "";
11148
+ return markdownDecoder.decode(new Uint8Array(toArrayBuffer(Number(bytes[0]), start, to - start)));
11149
+ }
11150
+ markdownReadChanges(context, doc, count) {
11151
+ const layout = nativeLayouts.ot_markdown_block;
11152
+ const words = new Uint32Array(count * layout.size / 4);
11153
+ const halves = new Uint16Array(words.buffer);
11154
+ const output = new Uint32Array(1);
11155
+ const handle = encodeContextHandle(context, doc);
11156
+ const pointer = this.nativeContextPointer(context, "ot_markdown_read_changes");
11157
+ nativeResult("ot_markdown_read_changes", this.opentui.symbols.ot_markdown_read_changes(pointer, handle, viewOrNull(words), count, output));
11158
+ if (output[0] > count)
11159
+ throw new NativeError2("ot_markdown_read_changes", -1 /* InvalidArgument */);
11160
+ const { fields: f } = layout;
11161
+ const blocks = [];
11162
+ for (let at = 0;at < output[0] * (layout.size / 4); at += layout.size / 4) {
11163
+ const parent = words[at + f.parent_index.offset / 4];
11164
+ blocks.push({
11165
+ index: words[at + f.index.offset / 4],
11166
+ parent: parent === 4294967295 ? undefined : parent,
11167
+ kind: halves[at * 2 + f.kind.offset / 2],
11168
+ flags: halves[at * 2 + f.flags.offset / 2],
11169
+ sourceStart: words[at + f.source_start_byte.offset / 4],
11170
+ sourceEnd: words[at + f.source_end_byte.offset / 4],
11171
+ infoStart: words[at + f.info_start_byte.offset / 4],
11172
+ infoEnd: words[at + f.info_end_byte.offset / 4],
11173
+ number: words[at + f.number.offset / 4]
11174
+ });
11175
+ }
11176
+ return blocks;
11177
+ }
11178
+ markdownReadSource(context, doc, block) {
11179
+ const handle = encodeContextHandle(context, doc);
11180
+ const count = new Uint32Array(1);
11181
+ const pointer = this.nativeContextPointer(context, "ot_markdown_read_source");
11182
+ nativeResult("ot_markdown_read_source", this.opentui.symbols.ot_markdown_read_source(pointer, handle, block, null, 0, count));
11183
+ if (count[0] === 0)
11184
+ return "";
11185
+ const bytes = new Uint8Array(count[0]);
11186
+ nativeResult("ot_markdown_read_source", this.opentui.symbols.ot_markdown_read_source(pointer, handle, block, bytes, bytes.length, count));
11187
+ return markdownDecoder.decode(bytes);
11188
+ }
11189
+ markdownReadLeaf(context, doc, block) {
11190
+ const handle = encodeContextHandle(context, doc);
11191
+ const counts = new Uint32Array(3);
11192
+ const [byteCount, chunkCount, urlCount] = [counts.subarray(0, 1), counts.subarray(1, 2), counts.subarray(2, 3)];
11193
+ const pointer = this.nativeContextPointer(context, "ot_markdown_read_leaf");
11194
+ 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));
11195
+ read(null, null, null, null);
11196
+ const layout = nativeLayouts.ot_styled_text_chunk;
11197
+ const stride = layout.size / 4;
11198
+ const bytes = new Uint8Array(byteCount[0]);
11199
+ const records = new Uint32Array(chunkCount[0] * stride);
11200
+ const spans = new Uint32Array(chunkCount[0]);
11201
+ const urls = new Uint8Array(urlCount[0]);
11202
+ if (chunkCount[0] > 0)
11203
+ read(viewOrNull(bytes), records, spans, viewOrNull(urls));
11204
+ const colors = new Uint16Array(records.buffer);
11205
+ const chunks = [];
11206
+ let at = 0;
11207
+ for (let index = 0;index < chunkCount[0]; index++) {
11208
+ const base = index * stride;
11209
+ const flags = records[base + layout.fields.flags.offset / 4];
11210
+ const end = at + records[base + layout.fields.byte_count.offset / 4];
11211
+ const color = (offset) => RGBA2.fromArray(colors.slice(base * 2 + offset / 2, base * 2 + offset / 2 + 4));
11212
+ const chunk = { __isChunk: true, text: markdownDecoder.decode(bytes.subarray(at, end)) };
11213
+ if (flags & nativeConstants.OT_SCENE_TEXT_FOREGROUND)
11214
+ chunk.fg = color(layout.fields.foreground.offset);
11215
+ if (flags & nativeConstants.OT_SCENE_TEXT_BACKGROUND)
11216
+ chunk.bg = color(layout.fields.background.offset);
11217
+ chunk.attributes = records[base + layout.fields.attributes.offset / 4];
11218
+ if (flags & nativeConstants.OT_SCENE_TEXT_LINK) {
11219
+ const offset = records[base + layout.fields.link_offset.offset / 4];
11220
+ const url = urls.subarray(offset, offset + records[base + layout.fields.link_byte_count.offset / 4]);
11221
+ chunk.link = { url: markdownDecoder.decode(url) };
11222
+ }
11223
+ chunks.push(chunk);
11224
+ at = end;
11225
+ }
11226
+ return { chunks, spans };
11227
+ }
11228
+ markdownBind(context, doc, block, node) {
11229
+ const handle = encodeContextHandle(context, doc);
11230
+ const target = encodeContextHandle(context, node);
11231
+ this.getYogaHost().runMutation(() => {
11232
+ const pointer = this.nativeContextPointer(context, "ot_markdown_bind");
11233
+ nativeResult("ot_markdown_bind", this.opentui.symbols.ot_markdown_bind(pointer, handle, block, target));
11234
+ });
11235
+ }
10675
11236
  encodeStyledText(content, allowLinks = true, preserveChunkOrdinals = false) {
10676
11237
  if (typeof content !== "object" || content === null || isStyledText2(content) !== true) {
10677
11238
  throw new TypeError("Native scene text requires a string or branded StyledText");
@@ -11020,7 +11581,7 @@ class FFIRenderLib2 {
11020
11581
  this.sceneLayoutRecord = undefined;
11021
11582
  try {
11022
11583
  const handle = encodeContextHandle(context, node, scratch.handle.record, scratch.handle.words);
11023
- const mode = observation === "paint" ? nativeConstants.OT_LAYOUT_PAINT : toFFIBool(observation, "Scene Yoga layout observation") ? nativeConstants.OT_LAYOUT_YOGA : nativeConstants.OT_LAYOUT_PUBLIC;
11584
+ 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;
11024
11585
  const { output, values, coordinates } = scratch;
11025
11586
  output[layout.fields.struct_size.offset / 4] = layout.size;
11026
11587
  output[layout.fields.abi_version.offset / 4] = nativeConstants.OT_CONTEXT_ABI_VERSION;
@@ -11198,13 +11759,14 @@ class FFIRenderLib2 {
11198
11759
  const pointer = this.nativeContextPointer(context, "ot_scene_frame_cancel");
11199
11760
  nativeResult("ot_scene_frame_cancel", this.opentui.symbols.ot_scene_frame_cancel(pointer, handle, id));
11200
11761
  }
11201
- sceneHitTest(context, session, x, y) {
11762
+ sceneHitTest(context, session, x, y, excluded = 0) {
11202
11763
  const handle = encodeContextHandle(context, session);
11203
11764
  toFFII32(x, "Scene hit x");
11204
11765
  toFFII32(y, "Scene hit y");
11766
+ toSafeFFIU32Length(excluded, "Scene hit exclusion");
11205
11767
  const output = this.hitTestOutput;
11206
- const pointer = this.nativeContextPointer(context, "ot_scene_hit_test");
11207
- nativeResult("ot_scene_hit_test", this.opentui.symbols.ot_scene_hit_test(pointer, handle, x, y, output));
11768
+ const pointer = this.nativeContextPointer(context, "ot_scene_hit_test_excluding");
11769
+ nativeResult("ot_scene_hit_test_excluding", this.opentui.symbols.ot_scene_hit_test_excluding(pointer, handle, x, y, excluded, output));
11208
11770
  return output[0];
11209
11771
  }
11210
11772
  sceneSetDebugFlags(context, session, flags) {
@@ -12377,9 +12939,9 @@ var Direction2;
12377
12939
  })(Direction2 ||= {});
12378
12940
  var Display2;
12379
12941
  ((Display) => {
12380
- Display[Display["Flex"] = 0] = "Flex";
12381
- Display[Display["None"] = 1] = "None";
12382
- Display[Display["Contents"] = 2] = "Contents";
12942
+ Display[Display["Flex"] = OT_DISPLAY_FLEX] = "Flex";
12943
+ Display[Display["None"] = OT_DISPLAY_NONE] = "None";
12944
+ Display[Display["Contents"] = OT_DISPLAY_CONTENTS] = "Contents";
12383
12945
  })(Display2 ||= {});
12384
12946
  var Edge2;
12385
12947
  ((Edge) => {
@@ -12395,16 +12957,16 @@ var Edge2;
12395
12957
  })(Edge2 ||= {});
12396
12958
  var Errata2;
12397
12959
  ((Errata) => {
12398
- Errata[Errata["None"] = 0] = "None";
12399
- Errata[Errata["StretchFlexBasis"] = 1] = "StretchFlexBasis";
12400
- Errata[Errata["AbsolutePositionWithoutInsetsExcludesPadding"] = 2] = "AbsolutePositionWithoutInsetsExcludesPadding";
12401
- Errata[Errata["AbsolutePercentAgainstInnerSize"] = 4] = "AbsolutePercentAgainstInnerSize";
12402
- Errata[Errata["All"] = 2147483647] = "All";
12403
- Errata[Errata["Classic"] = 2147483646] = "Classic";
12960
+ Errata[Errata["None"] = OT_YOGA_ERRATA_NONE] = "None";
12961
+ Errata[Errata["StretchFlexBasis"] = OT_YOGA_ERRATA_STRETCH_FLEX_BASIS] = "StretchFlexBasis";
12962
+ Errata[Errata["AbsolutePositionWithoutInsetsExcludesPadding"] = OT_YOGA_ERRATA_ABSOLUTE_POSITION_WITHOUT_INSETS_EXCLUDES_PADDING] = "AbsolutePositionWithoutInsetsExcludesPadding";
12963
+ Errata[Errata["AbsolutePercentAgainstInnerSize"] = OT_YOGA_ERRATA_ABSOLUTE_PERCENT_AGAINST_INNER_SIZE] = "AbsolutePercentAgainstInnerSize";
12964
+ Errata[Errata["All"] = OT_YOGA_ERRATA_ALL] = "All";
12965
+ Errata[Errata["Classic"] = OT_YOGA_ERRATA_CLASSIC] = "Classic";
12404
12966
  })(Errata2 ||= {});
12405
12967
  var ExperimentalFeature2;
12406
12968
  ((ExperimentalFeature) => {
12407
- ExperimentalFeature[ExperimentalFeature["WebFlexBasis"] = 0] = "WebFlexBasis";
12969
+ ExperimentalFeature[ExperimentalFeature["WebFlexBasis"] = OT_YOGA_EXPERIMENTAL_FEATURE_WEB_FLEX_BASIS] = "WebFlexBasis";
12408
12970
  })(ExperimentalFeature2 ||= {});
12409
12971
  var FlexDirection2;
12410
12972
  ((FlexDirection) => {
@@ -12430,12 +12992,12 @@ var Justify2;
12430
12992
  })(Justify2 ||= {});
12431
12993
  var LogLevel3;
12432
12994
  ((LogLevel) => {
12433
- LogLevel[LogLevel["Error"] = 0] = "Error";
12434
- LogLevel[LogLevel["Warn"] = 1] = "Warn";
12435
- LogLevel[LogLevel["Info"] = 2] = "Info";
12436
- LogLevel[LogLevel["Debug"] = 3] = "Debug";
12437
- LogLevel[LogLevel["Verbose"] = 4] = "Verbose";
12438
- LogLevel[LogLevel["Fatal"] = 5] = "Fatal";
12995
+ LogLevel[LogLevel["Error"] = OT_YOGA_LOG_LEVEL_ERROR] = "Error";
12996
+ LogLevel[LogLevel["Warn"] = OT_YOGA_LOG_LEVEL_WARN] = "Warn";
12997
+ LogLevel[LogLevel["Info"] = OT_YOGA_LOG_LEVEL_INFO] = "Info";
12998
+ LogLevel[LogLevel["Debug"] = OT_YOGA_LOG_LEVEL_DEBUG] = "Debug";
12999
+ LogLevel[LogLevel["Verbose"] = OT_YOGA_LOG_LEVEL_VERBOSE] = "Verbose";
13000
+ LogLevel[LogLevel["Fatal"] = OT_YOGA_LOG_LEVEL_FATAL] = "Fatal";
12439
13001
  })(LogLevel3 ||= {});
12440
13002
  var MeasureMode2;
12441
13003
  ((MeasureMode) => {
@@ -12445,8 +13007,8 @@ var MeasureMode2;
12445
13007
  })(MeasureMode2 ||= {});
12446
13008
  var NodeType2;
12447
13009
  ((NodeType) => {
12448
- NodeType[NodeType["Default"] = 0] = "Default";
12449
- NodeType[NodeType["Text"] = 1] = "Text";
13010
+ NodeType[NodeType["Default"] = OT_YOGA_NODE_TYPE_DEFAULT] = "Default";
13011
+ NodeType[NodeType["Text"] = OT_YOGA_NODE_TYPE_TEXT] = "Text";
12450
13012
  })(NodeType2 ||= {});
12451
13013
  var Overflow2;
12452
13014
  ((Overflow) => {
@@ -12489,9 +13051,9 @@ var DIMENSION_HEIGHT2 = Dimension2.Height;
12489
13051
  var DIRECTION_INHERIT2 = Direction2.Inherit;
12490
13052
  var DIRECTION_LTR2 = Direction2.LTR;
12491
13053
  var DIRECTION_RTL2 = Direction2.RTL;
12492
- var DISPLAY_FLEX2 = 0 /* Flex */;
12493
- var DISPLAY_NONE2 = 1 /* None */;
12494
- var DISPLAY_CONTENTS2 = 2 /* Contents */;
13054
+ var DISPLAY_FLEX2 = Display2.Flex;
13055
+ var DISPLAY_NONE2 = Display2.None;
13056
+ var DISPLAY_CONTENTS2 = Display2.Contents;
12495
13057
  var EDGE_LEFT2 = Edge2.Left;
12496
13058
  var EDGE_TOP2 = Edge2.Top;
12497
13059
  var EDGE_RIGHT2 = Edge2.Right;
@@ -12501,13 +13063,13 @@ var EDGE_END2 = Edge2.End;
12501
13063
  var EDGE_HORIZONTAL2 = Edge2.Horizontal;
12502
13064
  var EDGE_VERTICAL2 = Edge2.Vertical;
12503
13065
  var EDGE_ALL2 = Edge2.All;
12504
- var ERRATA_NONE2 = 0 /* None */;
12505
- var ERRATA_STRETCH_FLEX_BASIS2 = 1 /* StretchFlexBasis */;
12506
- var ERRATA_ABSOLUTE_POSITION_WITHOUT_INSETS_EXCLUDES_PADDING2 = 2 /* AbsolutePositionWithoutInsetsExcludesPadding */;
12507
- var ERRATA_ABSOLUTE_PERCENT_AGAINST_INNER_SIZE2 = 4 /* AbsolutePercentAgainstInnerSize */;
12508
- var ERRATA_ALL2 = 2147483647 /* All */;
12509
- var ERRATA_CLASSIC2 = 2147483646 /* Classic */;
12510
- var EXPERIMENTAL_FEATURE_WEB_FLEX_BASIS2 = 0 /* WebFlexBasis */;
13066
+ var ERRATA_NONE2 = Errata2.None;
13067
+ var ERRATA_STRETCH_FLEX_BASIS2 = Errata2.StretchFlexBasis;
13068
+ var ERRATA_ABSOLUTE_POSITION_WITHOUT_INSETS_EXCLUDES_PADDING2 = Errata2.AbsolutePositionWithoutInsetsExcludesPadding;
13069
+ var ERRATA_ABSOLUTE_PERCENT_AGAINST_INNER_SIZE2 = Errata2.AbsolutePercentAgainstInnerSize;
13070
+ var ERRATA_ALL2 = Errata2.All;
13071
+ var ERRATA_CLASSIC2 = Errata2.Classic;
13072
+ var EXPERIMENTAL_FEATURE_WEB_FLEX_BASIS2 = ExperimentalFeature2.WebFlexBasis;
12511
13073
  var FLEX_DIRECTION_COLUMN2 = FlexDirection2.Column;
12512
13074
  var FLEX_DIRECTION_COLUMN_REVERSE2 = FlexDirection2.ColumnReverse;
12513
13075
  var FLEX_DIRECTION_ROW2 = FlexDirection2.Row;
@@ -12521,17 +13083,17 @@ var JUSTIFY_FLEX_END2 = Justify2.FlexEnd;
12521
13083
  var JUSTIFY_SPACE_BETWEEN2 = Justify2.SpaceBetween;
12522
13084
  var JUSTIFY_SPACE_AROUND2 = Justify2.SpaceAround;
12523
13085
  var JUSTIFY_SPACE_EVENLY2 = Justify2.SpaceEvenly;
12524
- var LOG_LEVEL_ERROR2 = 0 /* Error */;
12525
- var LOG_LEVEL_WARN2 = 1 /* Warn */;
12526
- var LOG_LEVEL_INFO2 = 2 /* Info */;
12527
- var LOG_LEVEL_DEBUG2 = 3 /* Debug */;
12528
- var LOG_LEVEL_VERBOSE2 = 4 /* Verbose */;
12529
- var LOG_LEVEL_FATAL2 = 5 /* Fatal */;
13086
+ var LOG_LEVEL_ERROR2 = LogLevel3.Error;
13087
+ var LOG_LEVEL_WARN2 = LogLevel3.Warn;
13088
+ var LOG_LEVEL_INFO2 = LogLevel3.Info;
13089
+ var LOG_LEVEL_DEBUG2 = LogLevel3.Debug;
13090
+ var LOG_LEVEL_VERBOSE2 = LogLevel3.Verbose;
13091
+ var LOG_LEVEL_FATAL2 = LogLevel3.Fatal;
12530
13092
  var MEASURE_MODE_UNDEFINED2 = MeasureMode2.Undefined;
12531
13093
  var MEASURE_MODE_EXACTLY2 = MeasureMode2.Exactly;
12532
13094
  var MEASURE_MODE_AT_MOST2 = MeasureMode2.AtMost;
12533
- var NODE_TYPE_DEFAULT2 = 0 /* Default */;
12534
- var NODE_TYPE_TEXT2 = 1 /* Text */;
13095
+ var NODE_TYPE_DEFAULT2 = NodeType2.Default;
13096
+ var NODE_TYPE_TEXT2 = NodeType2.Text;
12535
13097
  var OVERFLOW_VISIBLE2 = Overflow2.Visible;
12536
13098
  var OVERFLOW_HIDDEN2 = Overflow2.Hidden;
12537
13099
  var OVERFLOW_SCROLL2 = Overflow2.Scroll;
@@ -12688,7 +13250,7 @@ class Config2 {
12688
13250
  }
12689
13251
  getErrata() {
12690
13252
  if (this.freed)
12691
- return 0 /* None */;
13253
+ return Errata2.None;
12692
13254
  return this.renderLib.yogaConfigGetErrata(this.ptr);
12693
13255
  }
12694
13256
  setExperimentalFeatureEnabled(feature, enabled) {
@@ -12938,7 +13500,7 @@ class Node2 {
12938
13500
  this.setEnum(YogaEnumKind.Display, display);
12939
13501
  }
12940
13502
  getDisplay() {
12941
- return this.getEnum(YogaEnumKind.Display, 0 /* Flex */);
13503
+ return this.getEnum(YogaEnumKind.Display, Display2.Flex);
12942
13504
  }
12943
13505
  setBoxSizing(boxSizing) {
12944
13506
  this.setEnum(YogaEnumKind.BoxSizing, boxSizing);
@@ -13307,7 +13869,7 @@ var Yoga = {
13307
13869
  };
13308
13870
  var yoga_default = Yoga;
13309
13871
 
13310
- 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 };
13872
+ 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 };
13311
13873
 
13312
- //# debugId=573F82F80683226364756E2164756E21
13313
- //# sourceMappingURL=chunk-node-88t8pbzy.js.map
13874
+ //# debugId=990E799710D3272C64756E2164756E21
13875
+ //# sourceMappingURL=chunk-node-k5s8s41v.js.map