@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
|
@@ -41,7 +41,7 @@ import {
|
|
|
41
41
|
toArrayBuffer,
|
|
42
42
|
treeSitterToTextChunks,
|
|
43
43
|
yoga_default
|
|
44
|
-
} from "./chunk-bun-
|
|
44
|
+
} from "./chunk-bun-b0662dgp.js";
|
|
45
45
|
|
|
46
46
|
// src/Renderable.ts
|
|
47
47
|
import { EventEmitter } from "events";
|
|
@@ -1150,8 +1150,8 @@ class Renderable extends BaseRenderable {
|
|
|
1150
1150
|
y: scissorRect.y,
|
|
1151
1151
|
width: scissorRect.width,
|
|
1152
1152
|
height: scissorRect.height,
|
|
1153
|
-
screenX: this._screenX,
|
|
1154
|
-
screenY: this._screenY
|
|
1153
|
+
screenX: this.buffered ? this._screenX : scissorRect.x,
|
|
1154
|
+
screenY: this.buffered ? this._screenY : scissorRect.y
|
|
1155
1155
|
});
|
|
1156
1156
|
}
|
|
1157
1157
|
if (!this._hasVisibleChildFilter()) {
|
|
@@ -1869,6 +1869,14 @@ class EditBuffer extends EventEmitter2 {
|
|
|
1869
1869
|
this.guard();
|
|
1870
1870
|
return this.lib.textBufferGetLineCount(this.textBufferPtr);
|
|
1871
1871
|
}
|
|
1872
|
+
setTabWidth(width) {
|
|
1873
|
+
this.guard();
|
|
1874
|
+
this.lib.editBufferSetTabWidth(this.bufferPtr, width);
|
|
1875
|
+
}
|
|
1876
|
+
getTabWidth() {
|
|
1877
|
+
this.guard();
|
|
1878
|
+
return this.lib.textBufferGetTabWidth(this.textBufferPtr);
|
|
1879
|
+
}
|
|
1872
1880
|
getText() {
|
|
1873
1881
|
this.guard();
|
|
1874
1882
|
const maxSize = 1024 * 1024;
|
|
@@ -7195,9 +7203,10 @@ class CliRenderer extends EventEmitter5 {
|
|
|
7195
7203
|
realStdoutWrite;
|
|
7196
7204
|
_useConsole = true;
|
|
7197
7205
|
sigwinchHandler = (() => {
|
|
7198
|
-
const width = this.stdout.columns
|
|
7199
|
-
const height = this.stdout.rows
|
|
7200
|
-
|
|
7206
|
+
const width = this.stdout.columns;
|
|
7207
|
+
const height = this.stdout.rows;
|
|
7208
|
+
if (width > 0 && height > 0)
|
|
7209
|
+
this.handleResize(width, height);
|
|
7201
7210
|
}).bind(this);
|
|
7202
7211
|
_capabilities = null;
|
|
7203
7212
|
_latestPointer = { x: 0, y: 0 };
|
|
@@ -7608,8 +7617,7 @@ Captured external output:
|
|
|
7608
7617
|
this.lib.hitGridClearScissorRects(this.rendererPtr);
|
|
7609
7618
|
}
|
|
7610
7619
|
get widthMethod() {
|
|
7611
|
-
|
|
7612
|
-
return caps?.unicode === "wcwidth" ? "wcwidth" : "unicode";
|
|
7620
|
+
return this.capabilities?.unicode ?? this.nextRenderBuffer.widthMethod;
|
|
7613
7621
|
}
|
|
7614
7622
|
get frameId() {
|
|
7615
7623
|
return this._frameId;
|
|
@@ -9168,7 +9176,7 @@ Captured external output:
|
|
|
9168
9176
|
}
|
|
9169
9177
|
return true;
|
|
9170
9178
|
}
|
|
9171
|
-
if (mouseEvent.type === "up" && this.currentSelection?.isDragging) {
|
|
9179
|
+
if (mouseEvent.type === "up" && mouseEvent.button === 0 /* LEFT */ && this.currentSelection?.isDragging) {
|
|
9172
9180
|
if (maybeRenderable) {
|
|
9173
9181
|
const event2 = new MouseEvent(maybeRenderable, {
|
|
9174
9182
|
...mouseEvent,
|
|
@@ -9241,7 +9249,7 @@ Captured external output:
|
|
|
9241
9249
|
this.setCapturedRenderable(undefined);
|
|
9242
9250
|
this.lastOverRenderable = undefined;
|
|
9243
9251
|
}
|
|
9244
|
-
if (!event?.defaultPrevented && mouseEvent.type === "down" && this.currentSelection) {
|
|
9252
|
+
if (!event?.defaultPrevented && mouseEvent.type === "down" && mouseEvent.button === 0 /* LEFT */ && this.currentSelection) {
|
|
9245
9253
|
this.clearSelection();
|
|
9246
9254
|
}
|
|
9247
9255
|
return true;
|
|
@@ -9831,6 +9839,7 @@ Captured external output:
|
|
|
9831
9839
|
async loop() {
|
|
9832
9840
|
if (this.rendering || this._isDestroyed)
|
|
9833
9841
|
return;
|
|
9842
|
+
const startedWhileRunning = this._isRunning;
|
|
9834
9843
|
if (this.renderTimeout) {
|
|
9835
9844
|
this.clock.clearTimeout(this.renderTimeout);
|
|
9836
9845
|
this.renderTimeout = null;
|
|
@@ -9920,7 +9929,9 @@ Captured external output:
|
|
|
9920
9929
|
this.renderTimeout = null;
|
|
9921
9930
|
}
|
|
9922
9931
|
} else if (nativeStatus === "backpressured") {
|
|
9923
|
-
this.
|
|
9932
|
+
if (!startedWhileRunning || this._isRunning || this.immediateRerenderRequested) {
|
|
9933
|
+
this.scheduleRenderAfterBackpressure();
|
|
9934
|
+
}
|
|
9924
9935
|
} else if (nativeStatus === "retryable-skip") {
|
|
9925
9936
|
this.immediateRerenderRequested = false;
|
|
9926
9937
|
this.renderTimeout = null;
|
|
@@ -10310,5 +10321,5 @@ Captured external output:
|
|
|
10310
10321
|
|
|
10311
10322
|
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 };
|
|
10312
10323
|
|
|
10313
|
-
//# debugId=
|
|
10314
|
-
//# sourceMappingURL=chunk-bun-
|
|
10324
|
+
//# debugId=3EFDC723C8276A6F64756E2164756E21
|
|
10325
|
+
//# sourceMappingURL=chunk-bun-jxfx3h5k.js.map
|