@opentui/core 0.1.96 → 0.1.98
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/3d.js +1 -1
- package/Renderable.d.ts +3 -0
- package/buffer.d.ts +2 -0
- package/console.d.ts +2 -1
- package/{index-vy1rm1x3.js → index-e4g80551.js} +176 -119
- package/{index-vy1rm1x3.js.map → index-e4g80551.js.map} +16 -16
- package/{index-dg6qsc3m.js → index-ks829haj.js} +35 -33
- package/{index-dg6qsc3m.js.map → index-ks829haj.js.map} +8 -8
- package/index-qs64hr08.js +411 -0
- package/index-qs64hr08.js.map +10 -0
- package/index.js +2 -2
- package/lib/border.d.ts +2 -0
- package/lib/keymapping.d.ts +10 -2
- package/lib/tree-sitter/default-parsers.d.ts +1 -1
- package/package.json +7 -7
- package/renderables/Box.d.ts +9 -0
- package/renderables/Slider.d.ts +4 -1
- package/renderables/TextNode.d.ts +1 -1
- package/renderer.d.ts +1 -0
- package/runtime-plugin-support.js +3 -3
- package/runtime-plugin.js +3 -3
- package/testing.js +7 -2
- package/testing.js.map +3 -3
- package/types.d.ts +1 -0
- package/zig.d.ts +1 -1
- package/index-ahc2zd0v.js +0 -208
- package/index-ahc2zd0v.js.map +0 -10
|
@@ -103,7 +103,7 @@ import {
|
|
|
103
103
|
getBorderSides,
|
|
104
104
|
getCharacterPositions,
|
|
105
105
|
getDataPaths,
|
|
106
|
-
|
|
106
|
+
getKeyBindingAction,
|
|
107
107
|
getLinkId,
|
|
108
108
|
getObjectsInViewport,
|
|
109
109
|
getTreeSitterClient,
|
|
@@ -167,7 +167,7 @@ import {
|
|
|
167
167
|
white,
|
|
168
168
|
wrapWithDelegates,
|
|
169
169
|
yellow
|
|
170
|
-
} from "./index-
|
|
170
|
+
} from "./index-e4g80551.js";
|
|
171
171
|
|
|
172
172
|
// src/index.ts
|
|
173
173
|
var exports_src2 = {};
|
|
@@ -3526,6 +3526,8 @@ class BoxRenderable extends Renderable {
|
|
|
3526
3526
|
shouldFill;
|
|
3527
3527
|
_title;
|
|
3528
3528
|
_titleAlignment;
|
|
3529
|
+
_bottomTitle;
|
|
3530
|
+
_bottomTitleAlignment;
|
|
3529
3531
|
_defaultOptions = {
|
|
3530
3532
|
backgroundColor: "transparent",
|
|
3531
3533
|
borderStyle: "single",
|
|
@@ -3533,6 +3535,7 @@ class BoxRenderable extends Renderable {
|
|
|
3533
3535
|
borderColor: "#FFFFFF",
|
|
3534
3536
|
shouldFill: true,
|
|
3535
3537
|
titleAlignment: "left",
|
|
3538
|
+
bottomTitleAlignment: "left",
|
|
3536
3539
|
focusedBorderColor: "#00AAFF"
|
|
3537
3540
|
};
|
|
3538
3541
|
constructor(ctx, options) {
|
|
@@ -3554,6 +3557,8 @@ class BoxRenderable extends Renderable {
|
|
|
3554
3557
|
this.shouldFill = options.shouldFill ?? this._defaultOptions.shouldFill;
|
|
3555
3558
|
this._title = options.title;
|
|
3556
3559
|
this._titleAlignment = options.titleAlignment || this._defaultOptions.titleAlignment;
|
|
3560
|
+
this._bottomTitle = options.bottomTitle;
|
|
3561
|
+
this._bottomTitleAlignment = options.bottomTitleAlignment || this._defaultOptions.bottomTitleAlignment;
|
|
3557
3562
|
this.applyYogaBorders();
|
|
3558
3563
|
const hasInitialGapProps = options.gap !== undefined || options.rowGap !== undefined || options.columnGap !== undefined;
|
|
3559
3564
|
if (hasInitialGapProps) {
|
|
@@ -3650,8 +3655,27 @@ class BoxRenderable extends Renderable {
|
|
|
3650
3655
|
this.requestRender();
|
|
3651
3656
|
}
|
|
3652
3657
|
}
|
|
3658
|
+
get bottomTitle() {
|
|
3659
|
+
return this._bottomTitle;
|
|
3660
|
+
}
|
|
3661
|
+
set bottomTitle(value) {
|
|
3662
|
+
if (this._bottomTitle !== value) {
|
|
3663
|
+
this._bottomTitle = value;
|
|
3664
|
+
this.requestRender();
|
|
3665
|
+
}
|
|
3666
|
+
}
|
|
3667
|
+
get bottomTitleAlignment() {
|
|
3668
|
+
return this._bottomTitleAlignment;
|
|
3669
|
+
}
|
|
3670
|
+
set bottomTitleAlignment(value) {
|
|
3671
|
+
if (this._bottomTitleAlignment !== value) {
|
|
3672
|
+
this._bottomTitleAlignment = value;
|
|
3673
|
+
this.requestRender();
|
|
3674
|
+
}
|
|
3675
|
+
}
|
|
3653
3676
|
renderSelf(buffer) {
|
|
3654
|
-
const
|
|
3677
|
+
const hasFocusWithin = this._focusable && (this._focused || this._hasFocusedDescendant);
|
|
3678
|
+
const currentBorderColor = hasFocusWithin ? this._focusedBorderColor : this._borderColor;
|
|
3655
3679
|
buffer.drawBox({
|
|
3656
3680
|
x: this.x,
|
|
3657
3681
|
y: this.y,
|
|
@@ -3664,7 +3688,9 @@ class BoxRenderable extends Renderable {
|
|
|
3664
3688
|
backgroundColor: this._backgroundColor,
|
|
3665
3689
|
shouldFill: this.shouldFill,
|
|
3666
3690
|
title: this._title,
|
|
3667
|
-
titleAlignment: this._titleAlignment
|
|
3691
|
+
titleAlignment: this._titleAlignment,
|
|
3692
|
+
bottomTitle: this._bottomTitle,
|
|
3693
|
+
bottomTitleAlignment: this._bottomTitleAlignment
|
|
3668
3694
|
});
|
|
3669
3695
|
}
|
|
3670
3696
|
getScissorRect() {
|
|
@@ -6554,15 +6580,7 @@ class TextareaRenderable extends EditBufferRenderable {
|
|
|
6554
6580
|
this.insertText(stripAnsiSequences(decodePasteBytes(event.bytes)));
|
|
6555
6581
|
}
|
|
6556
6582
|
handleKeyPress(key) {
|
|
6557
|
-
const
|
|
6558
|
-
name: key.name,
|
|
6559
|
-
ctrl: key.ctrl,
|
|
6560
|
-
shift: key.shift,
|
|
6561
|
-
meta: key.meta,
|
|
6562
|
-
super: key.super,
|
|
6563
|
-
action: "move-left"
|
|
6564
|
-
});
|
|
6565
|
-
const action = this._keyBindingsMap.get(bindingKey);
|
|
6583
|
+
const action = getKeyBindingAction(this._keyBindingsMap, key);
|
|
6566
6584
|
if (action) {
|
|
6567
6585
|
const handler = this._actionHandlers.get(action);
|
|
6568
6586
|
if (handler) {
|
|
@@ -11490,15 +11508,7 @@ class SelectRenderable extends Renderable {
|
|
|
11490
11508
|
this.requestRender();
|
|
11491
11509
|
}
|
|
11492
11510
|
handleKeyPress(key) {
|
|
11493
|
-
const
|
|
11494
|
-
name: key.name,
|
|
11495
|
-
ctrl: key.ctrl,
|
|
11496
|
-
shift: key.shift,
|
|
11497
|
-
meta: key.meta,
|
|
11498
|
-
super: key.super,
|
|
11499
|
-
action: "move-up"
|
|
11500
|
-
});
|
|
11501
|
-
const action = this._keyBindingsMap.get(bindingKey);
|
|
11511
|
+
const action = getKeyBindingAction(this._keyBindingsMap, key);
|
|
11502
11512
|
if (action) {
|
|
11503
11513
|
switch (action) {
|
|
11504
11514
|
case "move-up":
|
|
@@ -11858,15 +11868,7 @@ class TabSelectRenderable extends Renderable {
|
|
|
11858
11868
|
return this._tabWidth;
|
|
11859
11869
|
}
|
|
11860
11870
|
handleKeyPress(key) {
|
|
11861
|
-
const
|
|
11862
|
-
name: key.name,
|
|
11863
|
-
ctrl: key.ctrl,
|
|
11864
|
-
shift: key.shift,
|
|
11865
|
-
meta: key.meta,
|
|
11866
|
-
super: key.super,
|
|
11867
|
-
action: "move-left"
|
|
11868
|
-
});
|
|
11869
|
-
const action = this._keyBindingsMap.get(bindingKey);
|
|
11871
|
+
const action = getKeyBindingAction(this._keyBindingsMap, key);
|
|
11870
11872
|
if (action) {
|
|
11871
11873
|
switch (action) {
|
|
11872
11874
|
case "move-left":
|
|
@@ -12044,5 +12046,5 @@ class TimeToFirstDrawRenderable extends Renderable {
|
|
|
12044
12046
|
}
|
|
12045
12047
|
export { TextBufferView, convertThemeToStyles, SyntaxStyle, DistortionEffect, VignetteEffect, CloudsEffect, FlamesEffect, CRTRollingBarEffect, RainbowTextEffect, applyScanlines, applyInvert, applyNoise, applyChromaticAberration, applyAsciiArt, applyBrightness, applyGain, applySaturation, BloomEffect, SEPIA_MATRIX, PROTANOPIA_SIM_MATRIX, DEUTERANOPIA_SIM_MATRIX, TRITANOPIA_SIM_MATRIX, ACHROMATOPSIA_MATRIX, PROTANOPIA_COMP_MATRIX, DEUTERANOPIA_COMP_MATRIX, TRITANOPIA_COMP_MATRIX, TECHNICOLOR_MATRIX, SOLARIZATION_MATRIX, SYNTHWAVE_MATRIX, GREENSCALE_MATRIX, GRAYSCALE_MATRIX, INVERT_MATRIX, Timeline, engine, createTimeline, SlotRegistry, createSlotRegistry, createCoreSlotRegistry, registerCorePlugin, resolveCoreSlot, SlotRenderable, NativeSpanFeed, FrameBufferRenderable, ASCIIFontRenderable, BoxRenderable, TextBufferRenderable, CodeRenderable, isTextNodeRenderable, TextNodeRenderable, RootTextNodeRenderable, Generic, Box, Text, ASCIIFont, Input, Select, TabSelect, FrameBuffer, Code, ScrollBox, vstyles, VRenderable, LineNumberRenderable, TextRenderable, DiffRenderable, TextareaRenderable, InputRenderableEvents, InputRenderable, TextTableRenderable, MarkdownRenderable, SliderRenderable, ScrollBarRenderable, ArrowRenderable, ScrollBoxRenderable, SelectRenderableEvents, SelectRenderable, TabSelectRenderableEvents, TabSelectRenderable, TimeToFirstDrawRenderable, exports_src2 as exports_src };
|
|
12046
12048
|
|
|
12047
|
-
//# debugId=
|
|
12048
|
-
//# sourceMappingURL=index-
|
|
12049
|
+
//# debugId=6AE52EECCE364CE864756E2164756E21
|
|
12050
|
+
//# sourceMappingURL=index-ks829haj.js.map
|