@opentui/core 0.5.7 → 0.5.9
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/README.md +44 -37
- package/{chunk-bun-xmsp0nqq.js → chunk-bun-b0662dgp.js} +33 -22
- package/{chunk-bun-xmsp0nqq.js.map → chunk-bun-b0662dgp.js.map} +7 -7
- package/{chunk-bun-z4gs6jzg.js → chunk-bun-jxfx3h5k.js} +24 -13
- package/chunk-bun-jxfx3h5k.js.map +32 -0
- package/{chunk-node-591ssncm.js → chunk-node-dcyj0dm5.js} +24 -13
- package/chunk-node-dcyj0dm5.js.map +32 -0
- package/{chunk-node-267dafd8.js → chunk-node-zcz10bhr.js} +33 -22
- package/{chunk-node-267dafd8.js.map → chunk-node-zcz10bhr.js.map} +7 -7
- package/edit-buffer.d.ts +2 -0
- package/index.bun.js +44 -6
- package/index.bun.js.map +4 -4
- package/index.node.js +44 -6
- package/index.node.js.map +4 -4
- package/package.json +9 -9
- package/post/effects.d.ts +2 -0
- package/testing.bun.js +2 -2
- package/testing.js +2 -2
- package/text-buffer.d.ts +0 -1
- package/types.d.ts +1 -1
- package/yoga.bun.js +1 -1
- package/yoga.js +1 -1
- package/zig-structs.d.ts +1 -0
- package/zig.d.ts +1 -0
- package/chunk-bun-z4gs6jzg.js.map +0 -32
- package/chunk-node-591ssncm.js.map +0 -32
|
@@ -40,7 +40,7 @@ import {
|
|
|
40
40
|
toArrayBuffer,
|
|
41
41
|
treeSitterToTextChunks,
|
|
42
42
|
yoga_default
|
|
43
|
-
} from "./chunk-node-
|
|
43
|
+
} from "./chunk-node-zcz10bhr.js";
|
|
44
44
|
|
|
45
45
|
// src/Renderable.ts
|
|
46
46
|
import { EventEmitter } from "events";
|
|
@@ -1149,8 +1149,8 @@ class Renderable extends BaseRenderable {
|
|
|
1149
1149
|
y: scissorRect.y,
|
|
1150
1150
|
width: scissorRect.width,
|
|
1151
1151
|
height: scissorRect.height,
|
|
1152
|
-
screenX: this._screenX,
|
|
1153
|
-
screenY: this._screenY
|
|
1152
|
+
screenX: this.buffered ? this._screenX : scissorRect.x,
|
|
1153
|
+
screenY: this.buffered ? this._screenY : scissorRect.y
|
|
1154
1154
|
});
|
|
1155
1155
|
}
|
|
1156
1156
|
if (!this._hasVisibleChildFilter()) {
|
|
@@ -1868,6 +1868,14 @@ class EditBuffer extends EventEmitter2 {
|
|
|
1868
1868
|
this.guard();
|
|
1869
1869
|
return this.lib.textBufferGetLineCount(this.textBufferPtr);
|
|
1870
1870
|
}
|
|
1871
|
+
setTabWidth(width) {
|
|
1872
|
+
this.guard();
|
|
1873
|
+
this.lib.editBufferSetTabWidth(this.bufferPtr, width);
|
|
1874
|
+
}
|
|
1875
|
+
getTabWidth() {
|
|
1876
|
+
this.guard();
|
|
1877
|
+
return this.lib.textBufferGetTabWidth(this.textBufferPtr);
|
|
1878
|
+
}
|
|
1871
1879
|
getText() {
|
|
1872
1880
|
this.guard();
|
|
1873
1881
|
const maxSize = 1024 * 1024;
|
|
@@ -7194,9 +7202,10 @@ class CliRenderer extends EventEmitter5 {
|
|
|
7194
7202
|
realStdoutWrite;
|
|
7195
7203
|
_useConsole = true;
|
|
7196
7204
|
sigwinchHandler = (() => {
|
|
7197
|
-
const width = this.stdout.columns
|
|
7198
|
-
const height = this.stdout.rows
|
|
7199
|
-
|
|
7205
|
+
const width = this.stdout.columns;
|
|
7206
|
+
const height = this.stdout.rows;
|
|
7207
|
+
if (width > 0 && height > 0)
|
|
7208
|
+
this.handleResize(width, height);
|
|
7200
7209
|
}).bind(this);
|
|
7201
7210
|
_capabilities = null;
|
|
7202
7211
|
_latestPointer = { x: 0, y: 0 };
|
|
@@ -7607,8 +7616,7 @@ Captured external output:
|
|
|
7607
7616
|
this.lib.hitGridClearScissorRects(this.rendererPtr);
|
|
7608
7617
|
}
|
|
7609
7618
|
get widthMethod() {
|
|
7610
|
-
|
|
7611
|
-
return caps?.unicode === "wcwidth" ? "wcwidth" : "unicode";
|
|
7619
|
+
return this.capabilities?.unicode ?? this.nextRenderBuffer.widthMethod;
|
|
7612
7620
|
}
|
|
7613
7621
|
get frameId() {
|
|
7614
7622
|
return this._frameId;
|
|
@@ -9167,7 +9175,7 @@ Captured external output:
|
|
|
9167
9175
|
}
|
|
9168
9176
|
return true;
|
|
9169
9177
|
}
|
|
9170
|
-
if (mouseEvent.type === "up" && this.currentSelection?.isDragging) {
|
|
9178
|
+
if (mouseEvent.type === "up" && mouseEvent.button === 0 /* LEFT */ && this.currentSelection?.isDragging) {
|
|
9171
9179
|
if (maybeRenderable) {
|
|
9172
9180
|
const event2 = new MouseEvent(maybeRenderable, {
|
|
9173
9181
|
...mouseEvent,
|
|
@@ -9240,7 +9248,7 @@ Captured external output:
|
|
|
9240
9248
|
this.setCapturedRenderable(undefined);
|
|
9241
9249
|
this.lastOverRenderable = undefined;
|
|
9242
9250
|
}
|
|
9243
|
-
if (!event?.defaultPrevented && mouseEvent.type === "down" && this.currentSelection) {
|
|
9251
|
+
if (!event?.defaultPrevented && mouseEvent.type === "down" && mouseEvent.button === 0 /* LEFT */ && this.currentSelection) {
|
|
9244
9252
|
this.clearSelection();
|
|
9245
9253
|
}
|
|
9246
9254
|
return true;
|
|
@@ -9830,6 +9838,7 @@ Captured external output:
|
|
|
9830
9838
|
async loop() {
|
|
9831
9839
|
if (this.rendering || this._isDestroyed)
|
|
9832
9840
|
return;
|
|
9841
|
+
const startedWhileRunning = this._isRunning;
|
|
9833
9842
|
if (this.renderTimeout) {
|
|
9834
9843
|
this.clock.clearTimeout(this.renderTimeout);
|
|
9835
9844
|
this.renderTimeout = null;
|
|
@@ -9919,7 +9928,9 @@ Captured external output:
|
|
|
9919
9928
|
this.renderTimeout = null;
|
|
9920
9929
|
}
|
|
9921
9930
|
} else if (nativeStatus === "backpressured") {
|
|
9922
|
-
this.
|
|
9931
|
+
if (!startedWhileRunning || this._isRunning || this.immediateRerenderRequested) {
|
|
9932
|
+
this.scheduleRenderAfterBackpressure();
|
|
9933
|
+
}
|
|
9923
9934
|
} else if (nativeStatus === "retryable-skip") {
|
|
9924
9935
|
this.immediateRerenderRequested = false;
|
|
9925
9936
|
this.renderTimeout = null;
|
|
@@ -10309,5 +10320,5 @@ Captured external output:
|
|
|
10309
10320
|
|
|
10310
10321
|
export { h, isVNode, maybeMakeRenderable, wrapWithDelegates, instantiate, delegate, LayoutEvents, RenderableEvents, isRenderable, BaseRenderable, Renderable, RootRenderable, TextBufferView, EditBuffer, EditorView, convertThemeToStyles, SyntaxStyle, ANSI, BoxRenderable, TextBufferRenderable, CodeRenderable, isTextNodeRenderable, TextNodeRenderable, RootTextNodeRenderable, TextRenderable, NativeSpanFeed, defaultKeyAliases, mergeKeyAliases, mergeKeyBindings, getKeyBindingAction, buildKeyBindingsMap, capture, ConsolePosition, TerminalConsole, getObjectsInViewport, EditBufferRenderableEvents, isEditBufferRenderable, EditBufferRenderable, buildKittyKeyboardFlags, MouseEvent, MouseButton, createCliRenderer, CliRenderEvents, RendererControlState, CliRenderer };
|
|
10311
10322
|
|
|
10312
|
-
//# debugId=
|
|
10313
|
-
//# sourceMappingURL=chunk-node-
|
|
10323
|
+
//# debugId=D42CCC457901BBBF64756E2164756E21
|
|
10324
|
+
//# sourceMappingURL=chunk-node-dcyj0dm5.js.map
|