@opentui/core 0.8.0 → 0.8.1

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.
@@ -295,6 +295,19 @@ var nativeSymbols = {
295
295
  ot_image_take_pixels: { args: ["ptr", "buffer", "buffer"], returns: "i32" },
296
296
  ot_image_pixels_release: { args: ["ptr", "buffer"], returns: "i32" },
297
297
  ot_scene_set_image: { args: ["ptr", "buffer", "ptr", "u32", "u32", "ptr"], returns: "i32" },
298
+ ot_scene_set_crop: { args: ["ptr", "buffer", "u32", "u32", "u32", "u32"], returns: "i32" },
299
+ ot_scene_set_video: { args: ["ptr", "buffer", "u32", "ptr"], returns: "i32" },
300
+ ot_video_open: { args: ["ptr", "buffer", "ptr", "u32", "u32", "buffer"], returns: "i32" },
301
+ ot_video_play: { args: ["ptr", "buffer"], returns: "i32" },
302
+ ot_video_pause: { args: ["ptr", "buffer"], returns: "i32" },
303
+ ot_video_seek: { args: ["ptr", "buffer", "i64"], returns: "i32" },
304
+ ot_video_set_loop: { args: ["ptr", "buffer", "u32"], returns: "i32" },
305
+ ot_video_set_muted: { args: ["ptr", "buffer", "u32"], returns: "i32" },
306
+ ot_video_set_volume: { args: ["ptr", "buffer", "f32"], returns: "i32" },
307
+ ot_video_set_av_sync_offset: { args: ["ptr", "buffer", "i64"], returns: "i32" },
308
+ ot_video_set_max_fps: { args: ["ptr", "buffer", "u32"], returns: "i32" },
309
+ ot_video_get_state: { args: ["ptr", "buffer", "buffer"], returns: "i32" },
310
+ ot_video_get_error: { args: ["ptr", "buffer", "ptr", "u32", "buffer"], returns: "i32" },
298
311
  ot_buffer_draw_image: { args: ["ptr", "buffer", "ptr", "buffer", "buffer", "buffer"], returns: "i32" },
299
312
  ot_session_set_image_resolution: { args: ["ptr", "buffer", "u32", "u32", "u32", "u32"], returns: "i32" },
300
313
  ot_session_set_kitty_image_transport: { args: ["ptr", "buffer", "u32"], returns: "i32" },
@@ -409,8 +422,10 @@ var nativeSymbols = {
409
422
  ot_session_read_output: { args: ["ptr", "buffer", "ptr", "u32", "buffer"], returns: "i32" },
410
423
  ot_session_drain_output: { args: ["ptr", "buffer", "u32", "buffer", "ptr", "ptr"], returns: "i32" },
411
424
  ot_session_drain_stdout: { args: ["ptr", "buffer", "u32", "buffer"], returns: "i32" },
425
+ ot_session_post_stdout: { args: ["ptr", "buffer", "u32", "u32", "buffer", "buffer"], returns: "i32" },
412
426
  ot_session_complete_output: { args: ["ptr", "buffer", "buffer", "u32"], returns: "i32" },
413
427
  ot_session_close: { args: ["ptr", "buffer"], returns: "i32" },
428
+ ot_session_drop_output: { args: ["ptr", "buffer"], returns: "i32" },
414
429
  ot_session_pump_exit: { args: ["ptr", "buffer", "buffer"], returns: "i32" },
415
430
  ot_terminal_flush_input: { args: [], returns: "i32" },
416
431
  ot_session_cancel: { args: ["ptr", "buffer"], returns: "i32" },
@@ -914,7 +929,7 @@ var nativeLayouts = {
914
929
  }
915
930
  },
916
931
  ot_session_renderer_state: {
917
- size: 32,
932
+ size: 40,
918
933
  alignment: 8,
919
934
  fields: {
920
935
  struct_size: { offset: 0, size: 4, alignment: 4, type: "u32" },
@@ -923,7 +938,9 @@ var nativeLayouts = {
923
938
  height: { offset: 12, size: 4, alignment: 4, type: "u32" },
924
939
  frame_count: { offset: 16, size: 8, alignment: 8, type: "u64" },
925
940
  frame_pending: { offset: 24, size: 4, alignment: 4, type: "u32" },
926
- reserved: { offset: 28, size: 4, alignment: 4, type: "u32" }
941
+ image_uploads_pending: { offset: 28, size: 4, alignment: 4, type: "u32" },
942
+ dropped_frames: { offset: 32, size: 4, alignment: 4, type: "u32" },
943
+ dropped_frame_bytes: { offset: 36, size: 4, alignment: 4, type: "u32" }
927
944
  }
928
945
  },
929
946
  ot_buffer_options: {
@@ -1177,6 +1194,29 @@ var nativeLayouts = {
1177
1194
  byte_count: { offset: 24, size: 8, alignment: 8, type: "u64" }
1178
1195
  }
1179
1196
  },
1197
+ ot_video_info: {
1198
+ size: 32,
1199
+ alignment: 8,
1200
+ fields: {
1201
+ duration_us: { offset: 0, size: 8, alignment: 8, type: "i64" },
1202
+ width: { offset: 8, size: 4, alignment: 4, type: "u32" },
1203
+ height: { offset: 12, size: 4, alignment: 4, type: "u32" },
1204
+ fps_num: { offset: 16, size: 4, alignment: 4, type: "u32" },
1205
+ fps_den: { offset: 20, size: 4, alignment: 4, type: "u32" },
1206
+ has_audio: { offset: 24, size: 4, alignment: 4, type: "u32" },
1207
+ reserved: { offset: 28, size: 4, alignment: 4, type: "u32" }
1208
+ }
1209
+ },
1210
+ ot_video_state: {
1211
+ size: 24,
1212
+ alignment: 8,
1213
+ fields: {
1214
+ current_time_us: { offset: 0, size: 8, alignment: 8, type: "i64" },
1215
+ frame_pts_us: { offset: 8, size: 8, alignment: 8, type: "i64" },
1216
+ flags: { offset: 16, size: 4, alignment: 4, type: "u32" },
1217
+ quality_tier: { offset: 20, size: 4, alignment: 4, type: "u32" }
1218
+ }
1219
+ },
1180
1220
  ot_image_draw_options: {
1181
1221
  size: 64,
1182
1222
  alignment: 4,
@@ -1280,7 +1320,7 @@ var nativeLayouts = {
1280
1320
  }
1281
1321
  },
1282
1322
  ot_buffer_draw_text_record: {
1283
- size: 44,
1323
+ size: 48,
1284
1324
  alignment: 4,
1285
1325
  fields: {
1286
1326
  header: { offset: 0, size: 16, alignment: 4, type: "ot_buffer_draw_header" },
@@ -1288,7 +1328,8 @@ var nativeLayouts = {
1288
1328
  y: { offset: 20, size: 4, alignment: 4, type: "i32" },
1289
1329
  attributes: { offset: 24, size: 4, alignment: 4, type: "u32" },
1290
1330
  foreground: { offset: 28, size: 8, alignment: 2, type: "[4]u16" },
1291
- background: { offset: 36, size: 8, alignment: 2, type: "[4]u16" }
1331
+ background: { offset: 36, size: 8, alignment: 2, type: "[4]u16" },
1332
+ max_width: { offset: 44, size: 4, alignment: 4, type: "u32" }
1292
1333
  }
1293
1334
  },
1294
1335
  ot_buffer_draw_cell: {
@@ -1702,6 +1743,7 @@ var nativeConstants = {
1702
1743
  OT_IMAGE_OUTPUT_TOO_SMALL: -45,
1703
1744
  OT_IMAGE_UNSUPPORTED_FEATURE: -46,
1704
1745
  OT_IMAGE_BUSY: -47,
1746
+ OT_VIDEO_FAILED: -60,
1705
1747
  OT_SCENE_ROOT: 0,
1706
1748
  OT_SCENE_BOX: 1,
1707
1749
  OT_SCENE_TEXT: 2,
@@ -1711,6 +1753,7 @@ var nativeConstants = {
1711
1753
  OT_SCENE_CUSTOM: 6,
1712
1754
  OT_SCENE_TEXT_VIEW: 7,
1713
1755
  OT_SCENE_IMAGE: 8,
1756
+ OT_SCENE_VIDEO: 9,
1714
1757
  OT_SCENE_WRAP_NONE: 0,
1715
1758
  OT_SCENE_WRAP_CHAR: 1,
1716
1759
  OT_SCENE_WRAP_WORD: 2,
@@ -2086,6 +2129,13 @@ var nativeConstants = {
2086
2129
  OT_IMAGE_BLEND_SOURCE_OVER: 0,
2087
2130
  OT_IMAGE_BLEND_SOURCE: 1,
2088
2131
  OT_IMAGE_BLEND_DESTINATION_OVER: 2,
2132
+ OT_VIDEO_OPEN_NO_AUDIO: 1,
2133
+ OT_VIDEO_PLAYING: 1,
2134
+ OT_VIDEO_ENDED: 2,
2135
+ OT_VIDEO_BUFFERING: 4,
2136
+ OT_VIDEO_AUDIO: 8,
2137
+ OT_VIDEO_HAS_FRAME: 16,
2138
+ OT_VIDEO_ERROR: 32,
2089
2139
  OT_TEXT_VIEW_WRAP_WIDTH: 0,
2090
2140
  OT_TEXT_VIEW_WRAP_MODE: 1,
2091
2141
  OT_TEXT_VIEW_FIRST_LINE_OFFSET: 2,
@@ -2109,6 +2159,7 @@ var nativeConstants = {
2109
2159
  OT_BUFFER_DRAW_HAS_BACKGROUND: 1,
2110
2160
  OT_BUFFER_DRAW_HAS_SOURCE_WIDTH: 2,
2111
2161
  OT_BUFFER_DRAW_HAS_SOURCE_HEIGHT: 4,
2162
+ OT_BUFFER_DRAW_FIT_ELLIPSIS: 16,
2112
2163
  OT_BUFFER_STACK_DEPTH_MAX: 256,
2113
2164
  OT_BUFFER_STACK_GET_OPACITY: 0,
2114
2165
  OT_BUFFER_STACK_PUSH_SCISSOR: 1,
@@ -2187,6 +2238,8 @@ var nativeConstants = {
2187
2238
  OT_PUMP_OUTPUT_PENDING: 2,
2188
2239
  OT_PUMP_WAIT_UNTIL: 3,
2189
2240
  OT_PUMP_CLOSED: 4,
2241
+ OT_STDOUT_IDLE: 0,
2242
+ OT_STDOUT_IN_FLIGHT: 1,
2190
2243
  OT_INPUT_KEY: 1,
2191
2244
  OT_INPUT_MOUSE: 2,
2192
2245
  OT_INPUT_PASTE: 3,
@@ -5962,6 +6015,7 @@ var NativeStatus2;
5962
6015
  NativeStatus[NativeStatus["LayoutLimit"] = -26] = "LayoutLimit";
5963
6016
  NativeStatus[NativeStatus["FrameBusy"] = -27] = "FrameBusy";
5964
6017
  NativeStatus[NativeStatus["FrameRequestLimit"] = -28] = "FrameRequestLimit";
6018
+ NativeStatus[NativeStatus["VideoFailed"] = -60] = "VideoFailed";
5965
6019
  })(NativeStatus2 ||= {});
5966
6020
 
5967
6021
  class NativeError2 extends Error {
@@ -6093,6 +6147,12 @@ registerEnvVar2({
6093
6147
  type: "string",
6094
6148
  required: false
6095
6149
  });
6150
+ registerEnvVar2({
6151
+ name: "OPENTUI_EXPERIMENTAL_VIDEO_HWACCEL",
6152
+ description: "Experimental: decode video with VideoToolbox on macOS when set to exactly 1 or true; otherwise or on failure, decode in software",
6153
+ type: "string",
6154
+ required: false
6155
+ });
6096
6156
  var CURSOR_STYLE_TO_ID = { block: 0, line: 1, underline: 2, default: 3 };
6097
6157
  var CURSOR_ID_TO_STYLE = ["block", "line", "underline", "default"];
6098
6158
  var PROGRAM_STATE_TO_ID = {
@@ -6149,7 +6209,18 @@ var MOUSE_STYLE_TO_ID = {
6149
6209
  var SCENE_BORDER_STYLES = ["single", "double", "rounded", "heavy"];
6150
6210
  var SCENE_TEXT_WRAP_MODES = ["none", "char", "word"];
6151
6211
  var SCENE_TEXT_ALIGNS = ["left", "center", "right"];
6152
- var SCENE_NODE_KINDS = ["root", "box", "text", "slider", "arrow", "editor", "custom", "text_view", "image"];
6212
+ var SCENE_NODE_KINDS = [
6213
+ "root",
6214
+ "box",
6215
+ "text",
6216
+ "slider",
6217
+ "arrow",
6218
+ "editor",
6219
+ "custom",
6220
+ "text_view",
6221
+ "image",
6222
+ "video"
6223
+ ];
6153
6224
  var IMAGE_PROTOCOL_TO_ID = { auto: 0, kitty: 1, sixel: 2, blocks: 3 };
6154
6225
  var IMAGE_FITS = ["fit", "cover", "fill"];
6155
6226
  var BUFFER_DRAW_OPERATIONS = new Map([
@@ -6526,8 +6597,8 @@ function encodeBufferDrawRecord(context, options, words, signed, colors, base, s
6526
6597
  const fields = nativeLayouts.ot_buffer_draw_text_record.fields;
6527
6598
  encodeDrawPosition(signed, fields, options, base);
6528
6599
  words[word + fields.attributes.offset / 4] = toSafeFFIU32Length(options.attributes ?? 0, "Buffer attributes");
6529
- if (encodeDrawColors(colors, fields, options, base))
6530
- words[word + header.flags.offset / 4] = nativeConstants.OT_BUFFER_DRAW_HAS_BACKGROUND;
6600
+ words[word + fields.max_width.offset / 4] = toSafeFFIU32Length(options.maxWidth ?? 0, "Buffer text width");
6601
+ words[word + header.flags.offset / 4] = (encodeDrawColors(colors, fields, options, base) ? nativeConstants.OT_BUFFER_DRAW_HAS_BACKGROUND : 0) | (options.ellipsis ? nativeConstants.OT_BUFFER_DRAW_FIT_ELLIPSIS : 0);
6531
6602
  break;
6532
6603
  }
6533
6604
  case "cell":
@@ -8064,6 +8135,8 @@ class FFIRenderLib2 {
8064
8135
  sceneFlushApplied = new Uint32Array(1);
8065
8136
  editorSelectionRecord = createEditorSelectionRecord();
8066
8137
  editorViewInfoRecord = createContextRecord(nativeLayouts.ot_editor_view_info);
8138
+ videoStateRecord = new Uint8Array(nativeLayouts.ot_video_state.size);
8139
+ videoStateView = new DataView(this.videoStateRecord.buffer);
8067
8140
  selectionResetRecord = encodeEditorSelection({ operation: 2 /* Reset */ });
8068
8141
  localSelectionResetRecord = encodeEditorSelection({
8069
8142
  operation: 5 /* LocalReset */
@@ -9409,6 +9482,129 @@ class FFIRenderLib2 {
9409
9482
  nativeResult("ot_scene_set_image", this.opentui.symbols.ot_scene_set_image(pointer, handle, source, fitId, protocolId, storage));
9410
9483
  });
9411
9484
  }
9485
+ sceneSetVideo(context, node, fit, buffer) {
9486
+ const handle = encodeContextHandle(context, node);
9487
+ const storage = buffer === null ? null : encodeContextHandle(context, buffer);
9488
+ const fitId = IMAGE_FITS.indexOf(fit);
9489
+ if (fitId < 0)
9490
+ throw new TypeError("Unknown video fit");
9491
+ this.getYogaHost().runMutation(() => {
9492
+ const pointer = this.nativeContextPointer(context, "ot_scene_set_video");
9493
+ nativeResult("ot_scene_set_video", this.opentui.symbols.ot_scene_set_video(pointer, handle, fitId, storage));
9494
+ });
9495
+ }
9496
+ sceneSetCrop(context, node, crop) {
9497
+ const handle = encodeContextHandle(context, node);
9498
+ const { left = 0, top = 0, width = 0, height = 0 } = crop ?? {};
9499
+ this.getYogaHost().runMutation(() => {
9500
+ const pointer = this.nativeContextPointer(context, "ot_scene_set_crop");
9501
+ nativeResult("ot_scene_set_crop", this.opentui.symbols.ot_scene_set_crop(pointer, handle, left, top, width, height));
9502
+ });
9503
+ }
9504
+ videoOpen(context, node, path, audio) {
9505
+ const handle = encodeContextHandle(context, node);
9506
+ const bytes = path.length === 0 ? null : sessionBytes(this.encoder.encode(path), "Video path length");
9507
+ const layout = nativeLayouts.ot_video_info;
9508
+ const output = new Uint8Array(layout.size);
9509
+ const flags = audio ? 0 : nativeConstants.OT_VIDEO_OPEN_NO_AUDIO;
9510
+ this.getYogaHost().runMutation(() => {
9511
+ const pointer = this.nativeContextPointer(context, "ot_video_open");
9512
+ nativeResult("ot_video_open", this.opentui.symbols.ot_video_open(pointer, handle, bytes, bytes?.byteLength ?? 0, flags, output));
9513
+ });
9514
+ const view = new DataView(output.buffer);
9515
+ const fields = layout.fields;
9516
+ return {
9517
+ durationUs: view.getBigInt64(fields.duration_us.offset, true),
9518
+ width: view.getUint32(fields.width.offset, true),
9519
+ height: view.getUint32(fields.height.offset, true),
9520
+ fpsNum: view.getUint32(fields.fps_num.offset, true),
9521
+ fpsDen: view.getUint32(fields.fps_den.offset, true),
9522
+ hasAudio: view.getUint32(fields.has_audio.offset, true) !== 0
9523
+ };
9524
+ }
9525
+ videoCall(context, node, operation) {
9526
+ const handle = encodeContextHandle(context, node);
9527
+ this.getYogaHost().runMutation(() => {
9528
+ const pointer = this.nativeContextPointer(context, operation);
9529
+ nativeResult(operation, this.opentui.symbols[operation](pointer, handle));
9530
+ });
9531
+ }
9532
+ videoSeek(context, node, timeUs) {
9533
+ const handle = encodeContextHandle(context, node);
9534
+ this.getYogaHost().runMutation(() => {
9535
+ const pointer = this.nativeContextPointer(context, "ot_video_seek");
9536
+ nativeResult("ot_video_seek", this.opentui.symbols.ot_video_seek(pointer, handle, timeUs));
9537
+ });
9538
+ }
9539
+ videoSetLoop(context, node, loop) {
9540
+ const handle = encodeContextHandle(context, node);
9541
+ const value = toFFIBool(loop, "Video loop");
9542
+ this.getYogaHost().runMutation(() => {
9543
+ const pointer = this.nativeContextPointer(context, "ot_video_set_loop");
9544
+ nativeResult("ot_video_set_loop", this.opentui.symbols.ot_video_set_loop(pointer, handle, value));
9545
+ });
9546
+ }
9547
+ videoSetMuted(context, node, muted) {
9548
+ const handle = encodeContextHandle(context, node);
9549
+ const value = toFFIBool(muted, "Video muted");
9550
+ this.getYogaHost().runMutation(() => {
9551
+ const pointer = this.nativeContextPointer(context, "ot_video_set_muted");
9552
+ nativeResult("ot_video_set_muted", this.opentui.symbols.ot_video_set_muted(pointer, handle, value));
9553
+ });
9554
+ }
9555
+ videoSetVolume(context, node, volume) {
9556
+ const handle = encodeContextHandle(context, node);
9557
+ const value = toFFIF32(volume, "Video volume");
9558
+ this.getYogaHost().runMutation(() => {
9559
+ const pointer = this.nativeContextPointer(context, "ot_video_set_volume");
9560
+ nativeResult("ot_video_set_volume", this.opentui.symbols.ot_video_set_volume(pointer, handle, value));
9561
+ });
9562
+ }
9563
+ videoSetAvSyncOffset(context, node, offsetUs) {
9564
+ const handle = encodeContextHandle(context, node);
9565
+ this.getYogaHost().runMutation(() => {
9566
+ const pointer = this.nativeContextPointer(context, "ot_video_set_av_sync_offset");
9567
+ nativeResult("ot_video_set_av_sync_offset", this.opentui.symbols.ot_video_set_av_sync_offset(pointer, handle, offsetUs));
9568
+ });
9569
+ }
9570
+ videoSetMaxFps(context, node, fps) {
9571
+ const handle = encodeContextHandle(context, node);
9572
+ if (!isFFIU32(fps))
9573
+ throw new RangeError("Video maxFps must be a u32");
9574
+ this.getYogaHost().runMutation(() => {
9575
+ const pointer = this.nativeContextPointer(context, "ot_video_set_max_fps");
9576
+ nativeResult("ot_video_set_max_fps", this.opentui.symbols.ot_video_set_max_fps(pointer, handle, fps));
9577
+ });
9578
+ }
9579
+ videoGetState(context, node) {
9580
+ const handle = encodeContextHandle(context, node);
9581
+ const layout = nativeLayouts.ot_video_state;
9582
+ const output = this.videoStateRecord;
9583
+ this.getYogaHost().runMutation(() => {
9584
+ const pointer = this.nativeContextPointer(context, "ot_video_get_state");
9585
+ nativeResult("ot_video_get_state", this.opentui.symbols.ot_video_get_state(pointer, handle, output));
9586
+ });
9587
+ const view = this.videoStateView;
9588
+ const flags = view.getUint32(layout.fields.flags.offset, true);
9589
+ return {
9590
+ currentTimeUs: view.getBigInt64(layout.fields.current_time_us.offset, true),
9591
+ framePtsUs: view.getBigInt64(layout.fields.frame_pts_us.offset, true),
9592
+ playing: (flags & nativeConstants.OT_VIDEO_PLAYING) !== 0,
9593
+ ended: (flags & nativeConstants.OT_VIDEO_ENDED) !== 0,
9594
+ buffering: (flags & nativeConstants.OT_VIDEO_BUFFERING) !== 0,
9595
+ audio: (flags & nativeConstants.OT_VIDEO_AUDIO) !== 0,
9596
+ hasFrame: (flags & nativeConstants.OT_VIDEO_HAS_FRAME) !== 0,
9597
+ failed: (flags & nativeConstants.OT_VIDEO_ERROR) !== 0,
9598
+ qualityTier: view.getUint32(layout.fields.quality_tier.offset, true)
9599
+ };
9600
+ }
9601
+ videoGetError(context, node) {
9602
+ const handle = encodeContextHandle(context, node);
9603
+ return this.getYogaHost().runMutation(() => {
9604
+ const pointer = this.nativeContextPointer(context, "ot_video_get_error");
9605
+ return this.readText("ot_video_get_error", (bytes, capacity, count) => this.opentui.symbols.ot_video_get_error(pointer, handle, bytes, capacity, count));
9606
+ });
9607
+ }
9412
9608
  contextDrawImage({ context, target, frame }, image, options) {
9413
9609
  const layout = nativeLayouts.ot_image_draw_options;
9414
9610
  const handle = encodeContextHandle(context, target);
@@ -9761,7 +9957,10 @@ class FFIRenderLib2 {
9761
9957
  width: words[layout.fields.width.offset / 4],
9762
9958
  height: words[layout.fields.height.offset / 4],
9763
9959
  frameCount: output[layout.fields.frame_count.offset / 8],
9764
- framePending: words[layout.fields.frame_pending.offset / 4] !== 0
9960
+ framePending: words[layout.fields.frame_pending.offset / 4] !== 0,
9961
+ imageUploadsPending: words[layout.fields.image_uploads_pending.offset / 4],
9962
+ droppedFrames: words[layout.fields.dropped_frames.offset / 4],
9963
+ droppedFrameBytes: words[layout.fields.dropped_frame_bytes.offset / 4]
9765
9964
  };
9766
9965
  }
9767
9966
  sessionAcquireBufferLease(context, session, which) {
@@ -10142,6 +10341,15 @@ class FFIRenderLib2 {
10142
10341
  nativeResult("ot_session_drain_stdout", this.opentui.symbols.ot_session_drain_stdout(pointer, handle, limit, output));
10143
10342
  return output[0];
10144
10343
  }
10344
+ sessionPostStdout(context, session, maxBytes, wait) {
10345
+ const handle = encodeContextHandle(context, session);
10346
+ const limit = toSafeFFIU32Length(maxBytes, "Stdout byte limit");
10347
+ const state = new Uint32Array(1);
10348
+ const written = new Uint32Array(1);
10349
+ const pointer = this.nativeContextPointer(context, "ot_session_post_stdout");
10350
+ nativeResult("ot_session_post_stdout", this.opentui.symbols.ot_session_post_stdout(pointer, handle, limit, wait ? 1 : 0, state, written));
10351
+ return { written: written[0], inFlight: state[0] === 1 };
10352
+ }
10145
10353
  sessionCompleteOutput(context, session, ticket, success) {
10146
10354
  const layout = nativeLayouts.ot_output_ticket;
10147
10355
  const written = toFFIBool(success, "Session output success");
@@ -10157,6 +10365,10 @@ class FFIRenderLib2 {
10157
10365
  const handle = encodeContextHandle(context, session);
10158
10366
  nativeResult("ot_session_close", this.opentui.symbols.ot_session_close(this.nativeContextPointer(context, "ot_session_close"), handle));
10159
10367
  }
10368
+ sessionDropOutput(context, session) {
10369
+ const handle = encodeContextHandle(context, session);
10370
+ nativeResult("ot_session_drop_output", this.opentui.symbols.ot_session_drop_output(this.nativeContextPointer(context, "ot_session_drop_output"), handle));
10371
+ }
10160
10372
  sessionCancel(context, session) {
10161
10373
  const handle = encodeContextHandle(context, session);
10162
10374
  nativeResult("ot_session_cancel", this.opentui.symbols.ot_session_cancel(this.nativeContextPointer(context, "ot_session_cancel"), handle));
@@ -13039,5 +13251,5 @@ var yoga_default = Yoga;
13039
13251
 
13040
13252
  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 };
13041
13253
 
13042
- //# debugId=52FA770DF9A57B5D64756E2164756E21
13043
- //# sourceMappingURL=chunk-node-y0w0hq5m.js.map
13254
+ //# debugId=47188A1A60507D9B64756E2164756E21
13255
+ //# sourceMappingURL=chunk-node-m8mjyx7h.js.map