@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.
- package/{chunk-bun-2956gvaq.js → chunk-bun-9gqvxy8c.js} +46 -12
- package/{chunk-bun-2956gvaq.js.map → chunk-bun-9gqvxy8c.js.map} +4 -4
- package/{chunk-bun-b3exa82d.js → chunk-bun-bb3k0yt8.js} +146 -47
- package/chunk-bun-bb3k0yt8.js.map +32 -0
- package/{chunk-node-kr27pp2p.js → chunk-node-6bg8r2m7.js} +146 -47
- package/chunk-node-6bg8r2m7.js.map +32 -0
- package/{chunk-node-mfda59vq.js → chunk-node-f647ts9q.js} +46 -12
- package/{chunk-node-mfda59vq.js.map → chunk-node-f647ts9q.js.map} +4 -4
- package/edit-buffer.d.ts +2 -0
- package/image.d.ts +25 -1
- package/index.bun.js +121 -9
- package/index.bun.js.map +6 -6
- package/index.node.js +121 -9
- package/index.node.js.map +6 -6
- package/package.json +9 -9
- package/post/effects.d.ts +2 -0
- package/renderer.d.ts +21 -2
- package/testing.bun.js +2 -2
- package/testing.js +2 -2
- package/text-buffer.d.ts +0 -1
- package/yoga.bun.js +1 -1
- package/yoga.js +1 -1
- package/zig.d.ts +12 -1
- package/chunk-bun-b3exa82d.js.map +0 -32
- package/chunk-node-kr27pp2p.js.map +0 -32
|
@@ -11576,7 +11576,6 @@ class TextBuffer {
|
|
|
11576
11576
|
bufferPtr;
|
|
11577
11577
|
_length = 0;
|
|
11578
11578
|
_byteSize = 0;
|
|
11579
|
-
_lineInfo;
|
|
11580
11579
|
_destroyed = false;
|
|
11581
11580
|
_syntaxStyle;
|
|
11582
11581
|
_textBytes;
|
|
@@ -11605,7 +11604,6 @@ class TextBuffer {
|
|
|
11605
11604
|
this.lib.textBufferSetTextFromMem(this.bufferPtr, this._memId);
|
|
11606
11605
|
this._length = this.lib.textBufferGetLength(this.bufferPtr);
|
|
11607
11606
|
this._byteSize = this.lib.textBufferGetByteSize(this.bufferPtr);
|
|
11608
|
-
this._lineInfo = undefined;
|
|
11609
11607
|
this._appendedChunks = [];
|
|
11610
11608
|
}
|
|
11611
11609
|
append(text) {
|
|
@@ -11615,7 +11613,6 @@ class TextBuffer {
|
|
|
11615
11613
|
this.lib.textBufferAppend(this.bufferPtr, textBytes);
|
|
11616
11614
|
this._length = this.lib.textBufferGetLength(this.bufferPtr);
|
|
11617
11615
|
this._byteSize = this.lib.textBufferGetByteSize(this.bufferPtr);
|
|
11618
|
-
this._lineInfo = undefined;
|
|
11619
11616
|
}
|
|
11620
11617
|
loadFile(path3) {
|
|
11621
11618
|
this.guard();
|
|
@@ -11625,7 +11622,6 @@ class TextBuffer {
|
|
|
11625
11622
|
}
|
|
11626
11623
|
this._length = this.lib.textBufferGetLength(this.bufferPtr);
|
|
11627
11624
|
this._byteSize = this.lib.textBufferGetByteSize(this.bufferPtr);
|
|
11628
|
-
this._lineInfo = undefined;
|
|
11629
11625
|
this._textBytes = undefined;
|
|
11630
11626
|
}
|
|
11631
11627
|
setStyledText(text) {
|
|
@@ -11633,7 +11629,6 @@ class TextBuffer {
|
|
|
11633
11629
|
this.lib.textBufferSetStyledText(this.bufferPtr, text.chunks);
|
|
11634
11630
|
this._length = this.lib.textBufferGetLength(this.bufferPtr);
|
|
11635
11631
|
this._byteSize = this.lib.textBufferGetByteSize(this.bufferPtr);
|
|
11636
|
-
this._lineInfo = undefined;
|
|
11637
11632
|
}
|
|
11638
11633
|
setDefaultFg(fg2) {
|
|
11639
11634
|
this.guard();
|
|
@@ -11728,6 +11723,7 @@ class TextBuffer {
|
|
|
11728
11723
|
setTabWidth(width) {
|
|
11729
11724
|
this.guard();
|
|
11730
11725
|
this.lib.textBufferSetTabWidth(this.bufferPtr, width);
|
|
11726
|
+
this._length = this.lib.textBufferGetLength(this.bufferPtr);
|
|
11731
11727
|
}
|
|
11732
11728
|
getTabWidth() {
|
|
11733
11729
|
this.guard();
|
|
@@ -11738,7 +11734,6 @@ class TextBuffer {
|
|
|
11738
11734
|
this.lib.textBufferClear(this.bufferPtr);
|
|
11739
11735
|
this._length = 0;
|
|
11740
11736
|
this._byteSize = 0;
|
|
11741
|
-
this._lineInfo = undefined;
|
|
11742
11737
|
this._textBytes = undefined;
|
|
11743
11738
|
this._appendedChunks = [];
|
|
11744
11739
|
}
|
|
@@ -11747,7 +11742,6 @@ class TextBuffer {
|
|
|
11747
11742
|
this.lib.textBufferReset(this.bufferPtr);
|
|
11748
11743
|
this._length = 0;
|
|
11749
11744
|
this._byteSize = 0;
|
|
11750
|
-
this._lineInfo = undefined;
|
|
11751
11745
|
this._textBytes = undefined;
|
|
11752
11746
|
this._memId = undefined;
|
|
11753
11747
|
this._appendedChunks = [];
|
|
@@ -14433,7 +14427,7 @@ function getOpenTUILib(libPath) {
|
|
|
14433
14427
|
},
|
|
14434
14428
|
editorViewGetViewport: {
|
|
14435
14429
|
args: ["u32", "buffer", "buffer", "buffer", "buffer"],
|
|
14436
|
-
returns: "
|
|
14430
|
+
returns: "bool"
|
|
14437
14431
|
},
|
|
14438
14432
|
editorViewSetScrollMargin: {
|
|
14439
14433
|
args: ["u32", "f32"],
|
|
@@ -14563,6 +14557,10 @@ function getOpenTUILib(libPath) {
|
|
|
14563
14557
|
args: ["u32"],
|
|
14564
14558
|
returns: "u32"
|
|
14565
14559
|
},
|
|
14560
|
+
editBufferSetTabWidth: {
|
|
14561
|
+
args: ["u32", "u8"],
|
|
14562
|
+
returns: "void"
|
|
14563
|
+
},
|
|
14566
14564
|
editBufferDebugLogRope: {
|
|
14567
14565
|
args: ["u32"],
|
|
14568
14566
|
returns: "void"
|
|
@@ -14773,6 +14771,8 @@ function getOpenTUILib(libPath) {
|
|
|
14773
14771
|
imageTestFailIccProfileCopyAllocationOnce: { args: [], returns: "void" },
|
|
14774
14772
|
imageDecode: { args: ["ptr", "u32", "buffer"], returns: "u32" },
|
|
14775
14773
|
imageCreateFromRgba: { args: ["ptr", "u64", "u32", "u32", "u32", "buffer"], returns: "u32" },
|
|
14774
|
+
imageCreateFromPixels: { args: ["buffer", "u64", "u32", "u32", "u32", "u32", "u32", "buffer"], returns: "u32" },
|
|
14775
|
+
imageUpdatePixels: { args: ["u32", "buffer", "u64", "u32", "u32", "u32"], returns: "u32" },
|
|
14776
14776
|
imageDestroy: { args: ["u32"], returns: "void" },
|
|
14777
14777
|
imageRetain: { args: ["u32", "buffer"], returns: "u32" },
|
|
14778
14778
|
imageGetInfo: { args: ["u32", "ptr"], returns: "u32" },
|
|
@@ -14794,6 +14794,11 @@ function getOpenTUILib(libPath) {
|
|
|
14794
14794
|
args: ["u32", "ptr", "u32"],
|
|
14795
14795
|
returns: "void"
|
|
14796
14796
|
},
|
|
14797
|
+
setKittyImageTransport: { args: ["u32", "u32"], returns: "u32" },
|
|
14798
|
+
getKittyImageTransport: { args: ["u32", "buffer"], returns: "void" },
|
|
14799
|
+
pollKittyImageTransport: { args: ["u32"], returns: "u32" },
|
|
14800
|
+
cancelKittyImageTransport: { args: ["u32", "u32"], returns: "void" },
|
|
14801
|
+
processKittyImageReply: { args: ["u32", "buffer", "u32"], returns: "u32" },
|
|
14797
14802
|
encodeUnicode: {
|
|
14798
14803
|
args: ["ptr", "u32", "ptr", "ptr", "u8"],
|
|
14799
14804
|
returns: "bool"
|
|
@@ -15999,8 +16004,8 @@ class FFIRenderLib {
|
|
|
15999
16004
|
repaintSplitFooter(renderer, pinnedRenderOffset, force) {
|
|
16000
16005
|
return this.unpackRenderOperationResult(this.opentui.symbols.repaintSplitFooter(renderer, pinnedRenderOffset, ffiBool(force)));
|
|
16001
16006
|
}
|
|
16002
|
-
commitSplitFooterSnapshot(renderer, snapshot, rowColumns, startOnNewLine, trailingNewline, pinnedRenderOffset, force, beginFrame = true, finalizeFrame = true) {
|
|
16003
|
-
const flags = ffiBool(startOnNewLine) | ffiBool(trailingNewline) << 1 | ffiBool(force) << 2 | ffiBool(beginFrame) << 3 | ffiBool(finalizeFrame) << 4;
|
|
16007
|
+
commitSplitFooterSnapshot(renderer, snapshot, rowColumns, startOnNewLine, trailingNewline, pinnedRenderOffset, force, beginFrame = true, finalizeFrame = true, controlOutput = false) {
|
|
16008
|
+
const flags = ffiBool(startOnNewLine) | ffiBool(trailingNewline) << 1 | ffiBool(force) << 2 | ffiBool(beginFrame) << 3 | ffiBool(finalizeFrame) << 4 | ffiBool(controlOutput) << 5;
|
|
16004
16009
|
return this.unpackRenderOperationResult(this.opentui.symbols.commitSplitFooterSnapshot(renderer, snapshot.ptr, rowColumns, flags, pinnedRenderOffset));
|
|
16005
16010
|
}
|
|
16006
16011
|
createOptimizedBuffer(width, height, widthMethod, respectAlpha = false, id) {
|
|
@@ -16893,6 +16898,9 @@ class FFIRenderLib {
|
|
|
16893
16898
|
}
|
|
16894
16899
|
return result;
|
|
16895
16900
|
}
|
|
16901
|
+
editBufferSetTabWidth(buffer, width) {
|
|
16902
|
+
this.opentui.symbols.editBufferSetTabWidth(buffer, width);
|
|
16903
|
+
}
|
|
16896
16904
|
editBufferDebugLogRope(buffer) {
|
|
16897
16905
|
this.opentui.symbols.editBufferDebugLogRope(buffer);
|
|
16898
16906
|
}
|
|
@@ -17154,6 +17162,24 @@ class FFIRenderLib {
|
|
|
17154
17162
|
const responseBytes = this.encoder.encode(response);
|
|
17155
17163
|
this.opentui.symbols.processCapabilityResponse(renderer, viewOrNull(responseBytes), responseBytes.byteLength);
|
|
17156
17164
|
}
|
|
17165
|
+
setKittyImageTransport(renderer, mode) {
|
|
17166
|
+
return this.opentui.symbols.setKittyImageTransport(renderer, mode) !== 0;
|
|
17167
|
+
}
|
|
17168
|
+
getKittyImageTransport(renderer) {
|
|
17169
|
+
const status = new Uint32Array(6);
|
|
17170
|
+
this.opentui.symbols.getKittyImageTransport(renderer, status);
|
|
17171
|
+
return status;
|
|
17172
|
+
}
|
|
17173
|
+
pollKittyImageTransport(renderer) {
|
|
17174
|
+
return this.opentui.symbols.pollKittyImageTransport(renderer) !== 0;
|
|
17175
|
+
}
|
|
17176
|
+
cancelKittyImageTransport(renderer, failed) {
|
|
17177
|
+
this.opentui.symbols.cancelKittyImageTransport(renderer, failed ? 1 : 0);
|
|
17178
|
+
}
|
|
17179
|
+
processKittyImageReply(renderer, response) {
|
|
17180
|
+
const bytes = this.encoder.encode(response);
|
|
17181
|
+
return this.opentui.symbols.processKittyImageReply(renderer, bytes, bytes.byteLength);
|
|
17182
|
+
}
|
|
17157
17183
|
encodeUnicode(text, widthMethod) {
|
|
17158
17184
|
const textBytes = this.encoder.encode(text);
|
|
17159
17185
|
const outPtrBuffer = new ArrayBuffer(8);
|
|
@@ -17533,6 +17559,14 @@ class FFIRenderLib {
|
|
|
17533
17559
|
const status = this.opentui.symbols.imageCreateFromRgba(pixels.byteLength === 0 ? null : pixels, BigInt(pixels.byteLength), width, height, stride, output);
|
|
17534
17560
|
return this.imageHandleResult(status, output);
|
|
17535
17561
|
}
|
|
17562
|
+
imageCreateFromPixels(pixels, width, height, stride, format, alpha) {
|
|
17563
|
+
const output = new Uint32Array(1);
|
|
17564
|
+
const status = this.opentui.symbols.imageCreateFromPixels(pixels, BigInt(pixels.byteLength), width, height, stride, format, alpha, output);
|
|
17565
|
+
return this.imageHandleResult(status, output);
|
|
17566
|
+
}
|
|
17567
|
+
imageUpdatePixels(image, pixels, stride, format, alpha) {
|
|
17568
|
+
return this.opentui.symbols.imageUpdatePixels(image, pixels, BigInt(pixels.byteLength), stride, format, alpha);
|
|
17569
|
+
}
|
|
17536
17570
|
imageDestroy(image) {
|
|
17537
17571
|
this.opentui.symbols.imageDestroy(image);
|
|
17538
17572
|
}
|
|
@@ -18609,5 +18643,5 @@ var yoga_default = Yoga;
|
|
|
18609
18643
|
|
|
18610
18644
|
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 };
|
|
18611
18645
|
|
|
18612
|
-
//# debugId=
|
|
18613
|
-
//# sourceMappingURL=chunk-bun-
|
|
18646
|
+
//# debugId=48207211452E894064756E2164756E21
|
|
18647
|
+
//# sourceMappingURL=chunk-bun-9gqvxy8c.js.map
|