@opentui/core 0.5.12 → 0.5.13
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-91mz470w.js → chunk-bun-awdjbppg.js} +16 -5
- package/{chunk-bun-91mz470w.js.map → chunk-bun-awdjbppg.js.map} +4 -4
- package/{chunk-bun-8f4q4e2m.js → chunk-bun-sjw2d9bq.js} +25 -11
- package/{chunk-bun-8f4q4e2m.js.map → chunk-bun-sjw2d9bq.js.map} +3 -3
- package/{chunk-node-1zjyxy5y.js → chunk-node-80p7e6t6.js} +25 -11
- package/{chunk-node-1zjyxy5y.js.map → chunk-node-80p7e6t6.js.map} +3 -3
- package/{chunk-node-fyb4fckk.js → chunk-node-fz19wge8.js} +16 -5
- package/{chunk-node-fyb4fckk.js.map → chunk-node-fz19wge8.js.map} +4 -4
- package/index.bun.js +2 -2
- package/index.node.js +2 -2
- package/package.json +9 -9
- package/testing.bun.js +2 -2
- package/testing.js +2 -2
- package/text-buffer-view.d.ts +1 -0
- package/yoga.bun.js +1 -1
- package/yoga.js +1 -1
|
@@ -41,7 +41,7 @@ import {
|
|
|
41
41
|
NativeMeasureTargetKind2,
|
|
42
42
|
resolveRenderLib2,
|
|
43
43
|
yoga_default
|
|
44
|
-
} from "./chunk-node-
|
|
44
|
+
} from "./chunk-node-80p7e6t6.js";
|
|
45
45
|
|
|
46
46
|
// src/syntax-style.ts
|
|
47
47
|
function convertThemeToStyles2(theme) {
|
|
@@ -1110,8 +1110,8 @@ class Renderable2 extends BaseRenderable2 {
|
|
|
1110
1110
|
const parentScreenY = this.parent ? this.parent._screenY : 0;
|
|
1111
1111
|
this._screenX = parentScreenX + this._x + this._translateX;
|
|
1112
1112
|
this._screenY = parentScreenY + this._y + this._translateY;
|
|
1113
|
-
const newWidth = Math.max(layout.width, 1);
|
|
1114
|
-
const newHeight = Math.max(layout.height, 1);
|
|
1113
|
+
const newWidth = Number.isNaN(layout.width) ? oldWidth : Math.max(layout.width, 1);
|
|
1114
|
+
const newHeight = Number.isNaN(layout.height) ? oldHeight : Math.max(layout.height, 1);
|
|
1115
1115
|
const sizeChanged = oldWidth !== newWidth || oldHeight !== newHeight;
|
|
1116
1116
|
this._widthValue = newWidth;
|
|
1117
1117
|
this._heightValue = newHeight;
|
|
@@ -1843,6 +1843,7 @@ class TextBufferView2 {
|
|
|
1843
1843
|
viewPtr;
|
|
1844
1844
|
textBuffer;
|
|
1845
1845
|
_destroyed = false;
|
|
1846
|
+
selectionClear = true;
|
|
1846
1847
|
constructor(lib, ptr, textBuffer) {
|
|
1847
1848
|
this.lib = lib;
|
|
1848
1849
|
this.viewPtr = ptr;
|
|
@@ -1863,15 +1864,20 @@ class TextBufferView2 {
|
|
|
1863
1864
|
}
|
|
1864
1865
|
setSelection(start, end, bgColor, fgColor) {
|
|
1865
1866
|
this.guard();
|
|
1867
|
+
this.selectionClear = false;
|
|
1866
1868
|
this.lib.textBufferViewSetSelection(this.viewPtr, start, end, bgColor || null, fgColor || null);
|
|
1867
1869
|
}
|
|
1868
1870
|
updateSelection(end, bgColor, fgColor) {
|
|
1869
1871
|
this.guard();
|
|
1872
|
+
this.selectionClear = false;
|
|
1870
1873
|
this.lib.textBufferViewUpdateSelection(this.viewPtr, end, bgColor || null, fgColor || null);
|
|
1871
1874
|
}
|
|
1872
1875
|
resetSelection() {
|
|
1873
1876
|
this.guard();
|
|
1877
|
+
if (this.selectionClear)
|
|
1878
|
+
return;
|
|
1874
1879
|
this.lib.textBufferViewResetSelection(this.viewPtr);
|
|
1880
|
+
this.selectionClear = true;
|
|
1875
1881
|
}
|
|
1876
1882
|
getSelection() {
|
|
1877
1883
|
this.guard();
|
|
@@ -1883,15 +1889,20 @@ class TextBufferView2 {
|
|
|
1883
1889
|
}
|
|
1884
1890
|
setLocalSelection(anchorX, anchorY, focusX, focusY, bgColor, fgColor, behavior = "cell") {
|
|
1885
1891
|
this.guard();
|
|
1892
|
+
this.selectionClear = false;
|
|
1886
1893
|
return this.lib.textBufferViewSetLocalSelection(this.viewPtr, anchorX, anchorY, focusX, focusY, bgColor || null, fgColor || null, behavior);
|
|
1887
1894
|
}
|
|
1888
1895
|
updateLocalSelection(anchorX, anchorY, focusX, focusY, bgColor, fgColor, behavior = "cell") {
|
|
1889
1896
|
this.guard();
|
|
1897
|
+
this.selectionClear = false;
|
|
1890
1898
|
return this.lib.textBufferViewUpdateLocalSelection(this.viewPtr, anchorX, anchorY, focusX, focusY, bgColor || null, fgColor || null, behavior);
|
|
1891
1899
|
}
|
|
1892
1900
|
resetLocalSelection() {
|
|
1893
1901
|
this.guard();
|
|
1902
|
+
if (this.selectionClear)
|
|
1903
|
+
return;
|
|
1894
1904
|
this.lib.textBufferViewResetLocalSelection(this.viewPtr);
|
|
1905
|
+
this.selectionClear = true;
|
|
1895
1906
|
}
|
|
1896
1907
|
setSelectionOccupancy(occupancy) {
|
|
1897
1908
|
this.guard();
|
|
@@ -10502,5 +10513,5 @@ Captured external output:
|
|
|
10502
10513
|
|
|
10503
10514
|
export { convertThemeToStyles2, SyntaxStyle2, h2, isVNode2, maybeMakeRenderable2, wrapWithDelegates2, instantiate2, delegate2, LayoutEvents2, RenderableEvents2, isRenderable2, BaseRenderable2, Renderable2, RootRenderable2, TextBufferView2, EditBuffer2, EditorView2, ANSI, BoxRenderable2, TextBufferRenderable2, CodeRenderable2, isTextNodeRenderable2, TextNodeRenderable2, RootTextNodeRenderable2, TextRenderable2, NativeSpanFeed2, defaultKeyAliases, mergeKeyAliases, mergeKeyBindings, getKeyBindingAction, buildKeyBindingsMap, capture2, ConsolePosition2, TerminalConsole2, getObjectsInViewport, EditBufferRenderableEvents2, isEditBufferRenderable2, EditBufferRenderable2, buildKittyKeyboardFlags2, MouseEvent2, MouseButton2, createCliRenderer2, CliRenderEvents2, RendererControlState2, CliRenderer2 };
|
|
10504
10515
|
|
|
10505
|
-
//# debugId=
|
|
10506
|
-
//# sourceMappingURL=chunk-node-
|
|
10516
|
+
//# debugId=1E9C4A614B22FBD464756E2164756E21
|
|
10517
|
+
//# sourceMappingURL=chunk-node-fz19wge8.js.map
|