@opentui/core 0.5.8 → 0.5.10

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.
@@ -11555,7 +11555,6 @@ class TextBuffer {
11555
11555
  bufferPtr;
11556
11556
  _length = 0;
11557
11557
  _byteSize = 0;
11558
- _lineInfo;
11559
11558
  _destroyed = false;
11560
11559
  _syntaxStyle;
11561
11560
  _textBytes;
@@ -11584,7 +11583,6 @@ class TextBuffer {
11584
11583
  this.lib.textBufferSetTextFromMem(this.bufferPtr, this._memId);
11585
11584
  this._length = this.lib.textBufferGetLength(this.bufferPtr);
11586
11585
  this._byteSize = this.lib.textBufferGetByteSize(this.bufferPtr);
11587
- this._lineInfo = undefined;
11588
11586
  this._appendedChunks = [];
11589
11587
  }
11590
11588
  append(text) {
@@ -11594,7 +11592,6 @@ class TextBuffer {
11594
11592
  this.lib.textBufferAppend(this.bufferPtr, textBytes);
11595
11593
  this._length = this.lib.textBufferGetLength(this.bufferPtr);
11596
11594
  this._byteSize = this.lib.textBufferGetByteSize(this.bufferPtr);
11597
- this._lineInfo = undefined;
11598
11595
  }
11599
11596
  loadFile(path3) {
11600
11597
  this.guard();
@@ -11604,7 +11601,6 @@ class TextBuffer {
11604
11601
  }
11605
11602
  this._length = this.lib.textBufferGetLength(this.bufferPtr);
11606
11603
  this._byteSize = this.lib.textBufferGetByteSize(this.bufferPtr);
11607
- this._lineInfo = undefined;
11608
11604
  this._textBytes = undefined;
11609
11605
  }
11610
11606
  setStyledText(text) {
@@ -11612,7 +11608,6 @@ class TextBuffer {
11612
11608
  this.lib.textBufferSetStyledText(this.bufferPtr, text.chunks);
11613
11609
  this._length = this.lib.textBufferGetLength(this.bufferPtr);
11614
11610
  this._byteSize = this.lib.textBufferGetByteSize(this.bufferPtr);
11615
- this._lineInfo = undefined;
11616
11611
  }
11617
11612
  setDefaultFg(fg2) {
11618
11613
  this.guard();
@@ -11707,6 +11702,7 @@ class TextBuffer {
11707
11702
  setTabWidth(width) {
11708
11703
  this.guard();
11709
11704
  this.lib.textBufferSetTabWidth(this.bufferPtr, width);
11705
+ this._length = this.lib.textBufferGetLength(this.bufferPtr);
11710
11706
  }
11711
11707
  getTabWidth() {
11712
11708
  this.guard();
@@ -11717,7 +11713,6 @@ class TextBuffer {
11717
11713
  this.lib.textBufferClear(this.bufferPtr);
11718
11714
  this._length = 0;
11719
11715
  this._byteSize = 0;
11720
- this._lineInfo = undefined;
11721
11716
  this._textBytes = undefined;
11722
11717
  this._appendedChunks = [];
11723
11718
  }
@@ -11726,7 +11721,6 @@ class TextBuffer {
11726
11721
  this.lib.textBufferReset(this.bufferPtr);
11727
11722
  this._length = 0;
11728
11723
  this._byteSize = 0;
11729
- this._lineInfo = undefined;
11730
11724
  this._textBytes = undefined;
11731
11725
  this._memId = undefined;
11732
11726
  this._appendedChunks = [];
@@ -14412,7 +14406,7 @@ function getOpenTUILib(libPath) {
14412
14406
  },
14413
14407
  editorViewGetViewport: {
14414
14408
  args: ["u32", "buffer", "buffer", "buffer", "buffer"],
14415
- returns: "void"
14409
+ returns: "bool"
14416
14410
  },
14417
14411
  editorViewSetScrollMargin: {
14418
14412
  args: ["u32", "f32"],
@@ -14542,6 +14536,10 @@ function getOpenTUILib(libPath) {
14542
14536
  args: ["u32"],
14543
14537
  returns: "u32"
14544
14538
  },
14539
+ editBufferSetTabWidth: {
14540
+ args: ["u32", "u8"],
14541
+ returns: "void"
14542
+ },
14545
14543
  editBufferDebugLogRope: {
14546
14544
  args: ["u32"],
14547
14545
  returns: "void"
@@ -14752,6 +14750,8 @@ function getOpenTUILib(libPath) {
14752
14750
  imageTestFailIccProfileCopyAllocationOnce: { args: [], returns: "void" },
14753
14751
  imageDecode: { args: ["ptr", "u32", "buffer"], returns: "u32" },
14754
14752
  imageCreateFromRgba: { args: ["ptr", "u64", "u32", "u32", "u32", "buffer"], returns: "u32" },
14753
+ imageCreateFromPixels: { args: ["buffer", "u64", "u32", "u32", "u32", "u32", "u32", "buffer"], returns: "u32" },
14754
+ imageUpdatePixels: { args: ["u32", "buffer", "u64", "u32", "u32", "u32"], returns: "u32" },
14755
14755
  imageDestroy: { args: ["u32"], returns: "void" },
14756
14756
  imageRetain: { args: ["u32", "buffer"], returns: "u32" },
14757
14757
  imageGetInfo: { args: ["u32", "ptr"], returns: "u32" },
@@ -14773,6 +14773,11 @@ function getOpenTUILib(libPath) {
14773
14773
  args: ["u32", "ptr", "u32"],
14774
14774
  returns: "void"
14775
14775
  },
14776
+ setKittyImageTransport: { args: ["u32", "u32"], returns: "u32" },
14777
+ getKittyImageTransport: { args: ["u32", "buffer"], returns: "void" },
14778
+ pollKittyImageTransport: { args: ["u32"], returns: "u32" },
14779
+ cancelKittyImageTransport: { args: ["u32", "u32"], returns: "void" },
14780
+ processKittyImageReply: { args: ["u32", "buffer", "u32"], returns: "u32" },
14776
14781
  encodeUnicode: {
14777
14782
  args: ["ptr", "u32", "ptr", "ptr", "u8"],
14778
14783
  returns: "bool"
@@ -15978,8 +15983,8 @@ class FFIRenderLib {
15978
15983
  repaintSplitFooter(renderer, pinnedRenderOffset, force) {
15979
15984
  return this.unpackRenderOperationResult(this.opentui.symbols.repaintSplitFooter(renderer, pinnedRenderOffset, ffiBool(force)));
15980
15985
  }
15981
- commitSplitFooterSnapshot(renderer, snapshot, rowColumns, startOnNewLine, trailingNewline, pinnedRenderOffset, force, beginFrame = true, finalizeFrame = true) {
15982
- const flags = ffiBool(startOnNewLine) | ffiBool(trailingNewline) << 1 | ffiBool(force) << 2 | ffiBool(beginFrame) << 3 | ffiBool(finalizeFrame) << 4;
15986
+ commitSplitFooterSnapshot(renderer, snapshot, rowColumns, startOnNewLine, trailingNewline, pinnedRenderOffset, force, beginFrame = true, finalizeFrame = true, controlOutput = false) {
15987
+ const flags = ffiBool(startOnNewLine) | ffiBool(trailingNewline) << 1 | ffiBool(force) << 2 | ffiBool(beginFrame) << 3 | ffiBool(finalizeFrame) << 4 | ffiBool(controlOutput) << 5;
15983
15988
  return this.unpackRenderOperationResult(this.opentui.symbols.commitSplitFooterSnapshot(renderer, snapshot.ptr, rowColumns, flags, pinnedRenderOffset));
15984
15989
  }
15985
15990
  createOptimizedBuffer(width, height, widthMethod, respectAlpha = false, id) {
@@ -16872,6 +16877,9 @@ class FFIRenderLib {
16872
16877
  }
16873
16878
  return result;
16874
16879
  }
16880
+ editBufferSetTabWidth(buffer, width) {
16881
+ this.opentui.symbols.editBufferSetTabWidth(buffer, width);
16882
+ }
16875
16883
  editBufferDebugLogRope(buffer) {
16876
16884
  this.opentui.symbols.editBufferDebugLogRope(buffer);
16877
16885
  }
@@ -17133,6 +17141,24 @@ class FFIRenderLib {
17133
17141
  const responseBytes = this.encoder.encode(response);
17134
17142
  this.opentui.symbols.processCapabilityResponse(renderer, viewOrNull(responseBytes), responseBytes.byteLength);
17135
17143
  }
17144
+ setKittyImageTransport(renderer, mode) {
17145
+ return this.opentui.symbols.setKittyImageTransport(renderer, mode) !== 0;
17146
+ }
17147
+ getKittyImageTransport(renderer) {
17148
+ const status = new Uint32Array(6);
17149
+ this.opentui.symbols.getKittyImageTransport(renderer, status);
17150
+ return status;
17151
+ }
17152
+ pollKittyImageTransport(renderer) {
17153
+ return this.opentui.symbols.pollKittyImageTransport(renderer) !== 0;
17154
+ }
17155
+ cancelKittyImageTransport(renderer, failed) {
17156
+ this.opentui.symbols.cancelKittyImageTransport(renderer, failed ? 1 : 0);
17157
+ }
17158
+ processKittyImageReply(renderer, response) {
17159
+ const bytes = this.encoder.encode(response);
17160
+ return this.opentui.symbols.processKittyImageReply(renderer, bytes, bytes.byteLength);
17161
+ }
17136
17162
  encodeUnicode(text, widthMethod) {
17137
17163
  const textBytes = this.encoder.encode(text);
17138
17164
  const outPtrBuffer = new ArrayBuffer(8);
@@ -17512,6 +17538,14 @@ class FFIRenderLib {
17512
17538
  const status = this.opentui.symbols.imageCreateFromRgba(pixels.byteLength === 0 ? null : pixels, BigInt(pixels.byteLength), width, height, stride, output);
17513
17539
  return this.imageHandleResult(status, output);
17514
17540
  }
17541
+ imageCreateFromPixels(pixels, width, height, stride, format, alpha) {
17542
+ const output = new Uint32Array(1);
17543
+ const status = this.opentui.symbols.imageCreateFromPixels(pixels, BigInt(pixels.byteLength), width, height, stride, format, alpha, output);
17544
+ return this.imageHandleResult(status, output);
17545
+ }
17546
+ imageUpdatePixels(image, pixels, stride, format, alpha) {
17547
+ return this.opentui.symbols.imageUpdatePixels(image, pixels, BigInt(pixels.byteLength), stride, format, alpha);
17548
+ }
17515
17549
  imageDestroy(image) {
17516
17550
  this.opentui.symbols.imageDestroy(image);
17517
17551
  }
@@ -18588,5 +18622,5 @@ var yoga_default = Yoga;
18588
18622
 
18589
18623
  export { toArrayBuffer, singleton, envRegistry, registerEnvVar, clearEnvCache, generateEnvMarkdown, generateEnvColored, env, sleep, stringWidth2 as stringWidth, resolveBundledFilePath, DEFAULT_FOREGROUND_RGB, DEFAULT_BACKGROUND_RGB, normalizeIndexedColorIndex, ansi256IndexToRgb, RGBA, normalizeColorValue, hexToRgb, rgbToHex, hsvToRgb, parseColor, isValidBorderStyle, parseBorderStyle, BorderChars, getBorderFromSides, getBorderSides, borderCharsToArray, BorderCharArrays, KeyEvent, PasteEvent, KeyHandler, InternalKeyHandler, fonts, measureText, getCharacterPositions, coordinateToCharacterIndex, renderFontToFrameBuffer, TextAttributes, ATTRIBUTE_BASE_BITS, ATTRIBUTE_BASE_MASK, getBaseAttributes, DebugOverlayCorner, TargetChannel, createTextAttributes, attributesWithLink, getLinkId, visualizeRenderableTree, isStyledText, StyledText, stringToStyledText, black, red, green, yellow, blue, magenta, cyan, white, brightBlack, brightRed, brightGreen, brightYellow, brightBlue, brightMagenta, brightCyan, brightWhite, bgBlack, bgRed, bgGreen, bgYellow, bgBlue, bgMagenta, bgCyan, bgWhite, bold, italic, underline, strikethrough, dim, reverse, blink, fg, bg, link, t, hastToStyledText, SystemClock, nonAlphanumericKeys, terminalNamedSingleStrokeKeys, parseKeypress, LinearScrollAccel, MacOSScrollAccel, parseAlign, parseAlignItems, parseBoxSizing, parseDimension, parseDirection, parseDisplay, parseEdge, parseFlexDirection, parseGutter, parseJustify, parseLogLevel, parseMeasureMode, parseOverflow, parsePositionType, parseUnit, parseWrap, MouseParser, Selection, convertGlobalToLocalSelection, ASCIIFontSelectionHelper, StdinParser, treeSitterToTextChunks, treeSitterToStyledText, addDefaultParsers, TreeSitterClient, DataPathsManager, getDataPaths, extensionToFiletype, basenameToFiletype, extToFiletype, pathToFiletype, infoStringToFiletype, getTreeSitterClient, destroyTreeSitterClient, ExtmarksController, createExtmarksController, TerminalPalette, createTerminalPalette, normalizeTerminalPalette, buildTerminalPaletteSignature, decodePasteBytes, stripAnsiSequences, createHostClipboard, createClipboard, ClipboardTarget, createRendererClipboardAdapter, Clipboard, detectLinks, OptimizedBuffer, TextBuffer, SpanInfoStruct, NativeAudioStreamFormat, NativeAudioStreamState, NativeAudioStreamStateNames, NativeAudioStreamCloseReason, NativeAudioStreamState2 as NativeAudioStreamState1, NativeAudioStreamCloseReason2 as NativeAudioStreamCloseReason1, NativeAudioStreamFormat2 as NativeAudioStreamFormat1, NativeClipboardOperationStatus, NativeClipboardStartStatus, NativeClipboardCancelStatus, NativeClipboardCopyStatus, NativeClipboardDestroyStatus, NativeClipboardShutdownStatus, LogLevel2 as LogLevel, NativeMeasureTargetKind, setRenderLibPath, resolveRenderLib, Align, BoxSizing, Dimension, Direction, Display, Edge, Errata, ExperimentalFeature, FlexDirection, Gutter, Justify, LogLevel as LogLevel1, MeasureMode, NodeType, Overflow, PositionType, Unit, Wrap, ALIGN_AUTO, ALIGN_FLEX_START, ALIGN_CENTER, ALIGN_FLEX_END, ALIGN_STRETCH, ALIGN_BASELINE, ALIGN_SPACE_BETWEEN, ALIGN_SPACE_AROUND, ALIGN_SPACE_EVENLY, BOX_SIZING_BORDER_BOX, BOX_SIZING_CONTENT_BOX, DIMENSION_WIDTH, DIMENSION_HEIGHT, DIRECTION_INHERIT, DIRECTION_LTR, DIRECTION_RTL, DISPLAY_FLEX, DISPLAY_NONE, DISPLAY_CONTENTS, EDGE_LEFT, EDGE_TOP, EDGE_RIGHT, EDGE_BOTTOM, EDGE_START, EDGE_END, EDGE_HORIZONTAL, EDGE_VERTICAL, EDGE_ALL, ERRATA_NONE, ERRATA_STRETCH_FLEX_BASIS, ERRATA_ABSOLUTE_POSITION_WITHOUT_INSETS_EXCLUDES_PADDING, ERRATA_ABSOLUTE_PERCENT_AGAINST_INNER_SIZE, ERRATA_ALL, ERRATA_CLASSIC, EXPERIMENTAL_FEATURE_WEB_FLEX_BASIS, FLEX_DIRECTION_COLUMN, FLEX_DIRECTION_COLUMN_REVERSE, FLEX_DIRECTION_ROW, FLEX_DIRECTION_ROW_REVERSE, GUTTER_COLUMN, GUTTER_ROW, GUTTER_ALL, JUSTIFY_FLEX_START, JUSTIFY_CENTER, JUSTIFY_FLEX_END, JUSTIFY_SPACE_BETWEEN, JUSTIFY_SPACE_AROUND, JUSTIFY_SPACE_EVENLY, LOG_LEVEL_ERROR, LOG_LEVEL_WARN, LOG_LEVEL_INFO, LOG_LEVEL_DEBUG, LOG_LEVEL_VERBOSE, LOG_LEVEL_FATAL, MEASURE_MODE_UNDEFINED, MEASURE_MODE_EXACTLY, MEASURE_MODE_AT_MOST, NODE_TYPE_DEFAULT, NODE_TYPE_TEXT, OVERFLOW_VISIBLE, OVERFLOW_HIDDEN, OVERFLOW_SCROLL, POSITION_TYPE_STATIC, POSITION_TYPE_RELATIVE, POSITION_TYPE_ABSOLUTE, UNIT_UNDEFINED, UNIT_POINT, UNIT_PERCENT, UNIT_AUTO, WRAP_NO_WRAP, WRAP_WRAP, WRAP_WRAP_REVERSE, Config, Node, exports_yoga, yoga_default };
18590
18624
 
18591
- //# debugId=C4207D33D39A542764756E2164756E21
18592
- //# sourceMappingURL=chunk-node-mfda59vq.js.map
18625
+ //# debugId=379FA7D2639D063564756E2164756E21
18626
+ //# sourceMappingURL=chunk-node-f647ts9q.js.map