@opentui/core 0.6.5 → 0.6.7
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/Renderable.d.ts +9 -7
- package/{chunk-bun-gwy4vfr3.js → chunk-bun-ehr9v0n8.js} +59 -55
- package/chunk-bun-ehr9v0n8.js.map +35 -0
- package/{chunk-bun-2kxv0ysg.js → chunk-bun-rk6266v5.js} +106 -164
- package/{chunk-bun-2kxv0ysg.js.map → chunk-bun-rk6266v5.js.map} +7 -7
- package/{chunk-node-bjkm7vf5.js → chunk-node-jhq62x0c.js} +59 -55
- package/chunk-node-jhq62x0c.js.map +34 -0
- package/{chunk-node-ekhpjemz.js → chunk-node-y5p1g2pb.js} +106 -164
- package/{chunk-node-ekhpjemz.js.map → chunk-node-y5p1g2pb.js.map} +7 -7
- package/index.bun.js +95 -29
- package/index.bun.js.map +10 -10
- package/index.node.js +95 -29
- package/index.node.js.map +10 -10
- package/package.json +9 -9
- package/renderables/ASCIIFont.d.ts +1 -0
- package/renderables/Box.d.ts +4 -3
- package/renderables/Diff.d.ts +16 -0
- package/renderables/EmbeddedTerminal.d.ts +2 -0
- package/renderables/Input.d.ts +1 -0
- package/renderables/LineNumberRenderable.d.ts +13 -2
- package/renderables/ScrollBar.d.ts +2 -0
- package/renderables/TabSelect.d.ts +1 -0
- package/renderables/TimeToFirstDraw.d.ts +1 -0
- package/renderer.d.ts +1 -1
- package/testing.bun.js +2 -2
- package/testing.js +2 -2
- package/yoga.bun.js +1 -1
- package/yoga.js +1 -1
- package/zig.d.ts +3 -3
- package/chunk-bun-gwy4vfr3.js.map +0 -35
- package/chunk-node-bjkm7vf5.js.map +0 -34
|
@@ -64,7 +64,7 @@ import {
|
|
|
64
64
|
PositionType2,
|
|
65
65
|
Unit2,
|
|
66
66
|
Wrap2
|
|
67
|
-
} from "./chunk-bun-
|
|
67
|
+
} from "./chunk-bun-ehr9v0n8.js";
|
|
68
68
|
|
|
69
69
|
// src/lib/border.ts
|
|
70
70
|
var VALID_BORDER_STYLES = ["single", "double", "rounded", "heavy"];
|
|
@@ -10571,6 +10571,7 @@ var RenderableEvents2;
|
|
|
10571
10571
|
RenderableEvents["BLURRED"] = "blurred";
|
|
10572
10572
|
RenderableEvents["DESTROYED"] = "destroyed";
|
|
10573
10573
|
})(RenderableEvents2 ||= {});
|
|
10574
|
+
var positionKeys = ["left", "top", "right", "bottom"];
|
|
10574
10575
|
function isRenderable2(obj) {
|
|
10575
10576
|
return !!obj?.[BrandedRenderable];
|
|
10576
10577
|
}
|
|
@@ -10789,6 +10790,7 @@ class Renderable2 extends BaseRenderable2 {
|
|
|
10789
10790
|
return isRowFlexDirection(this.getFlexDirection()) ? "row" : "column";
|
|
10790
10791
|
}
|
|
10791
10792
|
set visible(value) {
|
|
10793
|
+
value ??= true;
|
|
10792
10794
|
if (this._visible === value)
|
|
10793
10795
|
return;
|
|
10794
10796
|
this.runMutation(() => {
|
|
@@ -11013,32 +11015,32 @@ class Renderable2 extends BaseRenderable2 {
|
|
|
11013
11015
|
return this._position.top;
|
|
11014
11016
|
}
|
|
11015
11017
|
set top(value) {
|
|
11016
|
-
if (isPositionType(value) || value
|
|
11017
|
-
this.setPosition({ top: value });
|
|
11018
|
+
if (isPositionType(value) || value == null) {
|
|
11019
|
+
this.setPosition({ top: value ?? undefined });
|
|
11018
11020
|
}
|
|
11019
11021
|
}
|
|
11020
11022
|
get right() {
|
|
11021
11023
|
return this._position.right;
|
|
11022
11024
|
}
|
|
11023
11025
|
set right(value) {
|
|
11024
|
-
if (isPositionType(value) || value
|
|
11025
|
-
this.setPosition({ right: value });
|
|
11026
|
+
if (isPositionType(value) || value == null) {
|
|
11027
|
+
this.setPosition({ right: value ?? undefined });
|
|
11026
11028
|
}
|
|
11027
11029
|
}
|
|
11028
11030
|
get bottom() {
|
|
11029
11031
|
return this._position.bottom;
|
|
11030
11032
|
}
|
|
11031
11033
|
set bottom(value) {
|
|
11032
|
-
if (isPositionType(value) || value
|
|
11033
|
-
this.setPosition({ bottom: value });
|
|
11034
|
+
if (isPositionType(value) || value == null) {
|
|
11035
|
+
this.setPosition({ bottom: value ?? undefined });
|
|
11034
11036
|
}
|
|
11035
11037
|
}
|
|
11036
11038
|
get left() {
|
|
11037
11039
|
return this._position.left;
|
|
11038
11040
|
}
|
|
11039
11041
|
set left(value) {
|
|
11040
|
-
if (isPositionType(value) || value
|
|
11041
|
-
this.setPosition({ left: value });
|
|
11042
|
+
if (isPositionType(value) || value == null) {
|
|
11043
|
+
this.setPosition({ left: value ?? undefined });
|
|
11042
11044
|
}
|
|
11043
11045
|
}
|
|
11044
11046
|
get y() {
|
|
@@ -11061,10 +11063,7 @@ class Renderable2 extends BaseRenderable2 {
|
|
|
11061
11063
|
return this._destroyedLayout?.width ?? this.styledDimension("width");
|
|
11062
11064
|
}
|
|
11063
11065
|
set width(value) {
|
|
11064
|
-
|
|
11065
|
-
return;
|
|
11066
|
-
}
|
|
11067
|
-
this.setDimension(Dimension2.Width, value);
|
|
11066
|
+
this.setDimension("width", value);
|
|
11068
11067
|
}
|
|
11069
11068
|
get height() {
|
|
11070
11069
|
if (!this.isFreed()) {
|
|
@@ -11073,6 +11072,9 @@ class Renderable2 extends BaseRenderable2 {
|
|
|
11073
11072
|
}
|
|
11074
11073
|
return this._destroyedLayout?.height ?? this.styledDimension("height");
|
|
11075
11074
|
}
|
|
11075
|
+
defaultDimension(_kind) {
|
|
11076
|
+
return "auto";
|
|
11077
|
+
}
|
|
11076
11078
|
styledDimension(kind) {
|
|
11077
11079
|
const value = kind === "width" ? this._width : this._height;
|
|
11078
11080
|
return typeof value === "number" ? value : 0;
|
|
@@ -11098,15 +11100,18 @@ class Renderable2 extends BaseRenderable2 {
|
|
|
11098
11100
|
return layout;
|
|
11099
11101
|
}
|
|
11100
11102
|
set height(value) {
|
|
11101
|
-
|
|
11102
|
-
return;
|
|
11103
|
-
}
|
|
11104
|
-
this.setDimension(Dimension2.Height, value);
|
|
11103
|
+
this.setDimension("height", value);
|
|
11105
11104
|
}
|
|
11106
|
-
setDimension(
|
|
11105
|
+
setDimension(kind, input) {
|
|
11106
|
+
if (this.isFreed())
|
|
11107
|
+
return;
|
|
11108
|
+
const value = input ?? this.defaultDimension(kind);
|
|
11109
|
+
const key = kind === "width" ? "_width" : "_height";
|
|
11110
|
+
if (!isDimensionType(value) || this[key] === value)
|
|
11111
|
+
return;
|
|
11107
11112
|
this.runMutation(() => {
|
|
11108
|
-
const key = dimension === Dimension2.Width ? "_width" : "_height";
|
|
11109
11113
|
const disableShrink = typeof value === "number" && this._flexShrink === 1;
|
|
11114
|
+
const dimension = kind === "width" ? Dimension2.Width : Dimension2.Height;
|
|
11110
11115
|
sceneSetDimension(this._ctx.nativeScene, this, dimension, value, disableShrink);
|
|
11111
11116
|
this[key] = value;
|
|
11112
11117
|
if (disableShrink)
|
|
@@ -11300,20 +11305,6 @@ class Renderable2 extends BaseRenderable2 {
|
|
|
11300
11305
|
getGap(gutter) {
|
|
11301
11306
|
return this.yogaGetValue(YogaValueKind.Gap, gutter);
|
|
11302
11307
|
}
|
|
11303
|
-
setPositions(positions) {
|
|
11304
|
-
const units = new Uint32Array(Edge2.Bottom + 1);
|
|
11305
|
-
const values = new Float32Array(Edge2.Bottom + 1);
|
|
11306
|
-
let mask = 0;
|
|
11307
|
-
for (let edge = 0;edge <= Edge2.Bottom; edge++) {
|
|
11308
|
-
if (positions[edge] === undefined)
|
|
11309
|
-
continue;
|
|
11310
|
-
const value = parseYogaValue(positions[edge]);
|
|
11311
|
-
mask |= 1 << edge;
|
|
11312
|
-
units[edge] = value.unit;
|
|
11313
|
-
values[edge] = value.value;
|
|
11314
|
-
}
|
|
11315
|
-
this._ctx.nativeScene.setPositions(this, mask, units, values);
|
|
11316
|
-
}
|
|
11317
11308
|
getComputedLayout() {
|
|
11318
11309
|
const scene = this._ctx.nativeScene;
|
|
11319
11310
|
const revision = scene.observedLayoutRevision;
|
|
@@ -11446,6 +11437,7 @@ class Renderable2 extends BaseRenderable2 {
|
|
|
11446
11437
|
}
|
|
11447
11438
|
}
|
|
11448
11439
|
set position(positionType) {
|
|
11440
|
+
positionType ??= "relative";
|
|
11449
11441
|
if (!isPositionTypeType(positionType) || this._positionType === positionType)
|
|
11450
11442
|
return;
|
|
11451
11443
|
this.runMutation(() => {
|
|
@@ -11458,6 +11450,7 @@ class Renderable2 extends BaseRenderable2 {
|
|
|
11458
11450
|
return this._overflow;
|
|
11459
11451
|
}
|
|
11460
11452
|
set overflow(overflow) {
|
|
11453
|
+
overflow ??= "visible";
|
|
11461
11454
|
if (!isOverflowType(overflow) || this._overflow === overflow)
|
|
11462
11455
|
return;
|
|
11463
11456
|
this.runMutation(() => {
|
|
@@ -11474,13 +11467,20 @@ class Renderable2 extends BaseRenderable2 {
|
|
|
11474
11467
|
});
|
|
11475
11468
|
}
|
|
11476
11469
|
updateYogaPosition(position) {
|
|
11477
|
-
const
|
|
11478
|
-
|
|
11479
|
-
|
|
11480
|
-
|
|
11481
|
-
|
|
11482
|
-
|
|
11483
|
-
|
|
11470
|
+
const units = new Uint32Array(positionKeys.length);
|
|
11471
|
+
const values = new Float32Array(positionKeys.length);
|
|
11472
|
+
let mask = 0;
|
|
11473
|
+
for (let edge = 0;edge < positionKeys.length; edge++) {
|
|
11474
|
+
const key = positionKeys[edge];
|
|
11475
|
+
const input = position[key] ?? undefined;
|
|
11476
|
+
if (!(key in position) || input !== undefined && !isPositionType(input))
|
|
11477
|
+
continue;
|
|
11478
|
+
const value = parseYogaValue(input);
|
|
11479
|
+
mask |= 1 << edge;
|
|
11480
|
+
units[edge] = value.unit;
|
|
11481
|
+
values[edge] = value.value;
|
|
11482
|
+
}
|
|
11483
|
+
this._ctx.nativeScene.setPositions(this, mask, units, values);
|
|
11484
11484
|
}
|
|
11485
11485
|
set flexGrow(grow) {
|
|
11486
11486
|
if (grow == null) {
|
|
@@ -11519,121 +11519,70 @@ class Renderable2 extends BaseRenderable2 {
|
|
|
11519
11519
|
this.requestRender();
|
|
11520
11520
|
}
|
|
11521
11521
|
set flexBasis(basis) {
|
|
11522
|
-
|
|
11523
|
-
this.setFlexBasis(basis);
|
|
11524
|
-
this.requestRender();
|
|
11525
|
-
}
|
|
11522
|
+
this.setStyleValue(YogaValueKind.FlexBasis, NATIVE_EDGE_NONE2, basis, isFlexBasisType);
|
|
11526
11523
|
}
|
|
11527
11524
|
set minWidth(minWidth) {
|
|
11528
|
-
|
|
11529
|
-
this.setMinWidth(minWidth);
|
|
11530
|
-
this.requestRender();
|
|
11531
|
-
}
|
|
11525
|
+
this.setStyleValue(YogaValueKind.MinWidth, NATIVE_EDGE_NONE2, minWidth, isSizeType);
|
|
11532
11526
|
}
|
|
11533
11527
|
set maxWidth(maxWidth) {
|
|
11534
|
-
|
|
11535
|
-
this.setMaxWidth(maxWidth);
|
|
11536
|
-
this.requestRender();
|
|
11537
|
-
}
|
|
11528
|
+
this.setStyleValue(YogaValueKind.MaxWidth, NATIVE_EDGE_NONE2, maxWidth, isSizeType);
|
|
11538
11529
|
}
|
|
11539
11530
|
set minHeight(minHeight) {
|
|
11540
|
-
|
|
11541
|
-
this.setMinHeight(minHeight);
|
|
11542
|
-
this.requestRender();
|
|
11543
|
-
}
|
|
11531
|
+
this.setStyleValue(YogaValueKind.MinHeight, NATIVE_EDGE_NONE2, minHeight, isSizeType);
|
|
11544
11532
|
}
|
|
11545
11533
|
set maxHeight(maxHeight) {
|
|
11546
|
-
|
|
11547
|
-
this.setMaxHeight(maxHeight);
|
|
11548
|
-
this.requestRender();
|
|
11549
|
-
}
|
|
11534
|
+
this.setStyleValue(YogaValueKind.MaxHeight, NATIVE_EDGE_NONE2, maxHeight, isSizeType);
|
|
11550
11535
|
}
|
|
11551
11536
|
set margin(margin) {
|
|
11552
|
-
|
|
11553
|
-
this.setMargin(Edge2.All, margin);
|
|
11554
|
-
this.requestRender();
|
|
11555
|
-
}
|
|
11537
|
+
this.setStyleValue(YogaValueKind.Margin, Edge2.All, margin, isMarginType);
|
|
11556
11538
|
}
|
|
11557
11539
|
set marginX(marginX) {
|
|
11558
|
-
|
|
11559
|
-
this.setMargin(Edge2.Horizontal, marginX);
|
|
11560
|
-
this.requestRender();
|
|
11561
|
-
}
|
|
11540
|
+
this.setStyleValue(YogaValueKind.Margin, Edge2.Horizontal, marginX, isMarginType);
|
|
11562
11541
|
}
|
|
11563
11542
|
set marginY(marginY) {
|
|
11564
|
-
|
|
11565
|
-
this.setMargin(Edge2.Vertical, marginY);
|
|
11566
|
-
this.requestRender();
|
|
11567
|
-
}
|
|
11543
|
+
this.setStyleValue(YogaValueKind.Margin, Edge2.Vertical, marginY, isMarginType);
|
|
11568
11544
|
}
|
|
11569
11545
|
set marginTop(margin) {
|
|
11570
|
-
|
|
11571
|
-
this.setMargin(Edge2.Top, margin);
|
|
11572
|
-
this.requestRender();
|
|
11573
|
-
}
|
|
11546
|
+
this.setStyleValue(YogaValueKind.Margin, Edge2.Top, margin, isMarginType);
|
|
11574
11547
|
}
|
|
11575
11548
|
get marginTop() {
|
|
11576
11549
|
return this.getMargin(Edge2.Top).value;
|
|
11577
11550
|
}
|
|
11578
11551
|
set marginRight(margin) {
|
|
11579
|
-
|
|
11580
|
-
this.setMargin(Edge2.Right, margin);
|
|
11581
|
-
this.requestRender();
|
|
11582
|
-
}
|
|
11552
|
+
this.setStyleValue(YogaValueKind.Margin, Edge2.Right, margin, isMarginType);
|
|
11583
11553
|
}
|
|
11584
11554
|
set marginBottom(margin) {
|
|
11585
|
-
|
|
11586
|
-
this.setMargin(Edge2.Bottom, margin);
|
|
11587
|
-
this.requestRender();
|
|
11588
|
-
}
|
|
11555
|
+
this.setStyleValue(YogaValueKind.Margin, Edge2.Bottom, margin, isMarginType);
|
|
11589
11556
|
}
|
|
11590
11557
|
set marginLeft(margin) {
|
|
11591
|
-
|
|
11592
|
-
this.setMargin(Edge2.Left, margin);
|
|
11593
|
-
this.requestRender();
|
|
11594
|
-
}
|
|
11558
|
+
this.setStyleValue(YogaValueKind.Margin, Edge2.Left, margin, isMarginType);
|
|
11595
11559
|
}
|
|
11596
11560
|
set padding(padding) {
|
|
11597
|
-
|
|
11598
|
-
this.setPadding(Edge2.All, padding);
|
|
11599
|
-
this.requestRender();
|
|
11600
|
-
}
|
|
11561
|
+
this.setStyleValue(YogaValueKind.Padding, Edge2.All, padding, isPaddingType);
|
|
11601
11562
|
}
|
|
11602
11563
|
set paddingX(paddingX) {
|
|
11603
|
-
|
|
11604
|
-
this.setPadding(Edge2.Horizontal, paddingX);
|
|
11605
|
-
this.requestRender();
|
|
11606
|
-
}
|
|
11564
|
+
this.setStyleValue(YogaValueKind.Padding, Edge2.Horizontal, paddingX, isPaddingType);
|
|
11607
11565
|
}
|
|
11608
11566
|
set paddingY(paddingY) {
|
|
11609
|
-
|
|
11610
|
-
this.setPadding(Edge2.Vertical, paddingY);
|
|
11611
|
-
this.requestRender();
|
|
11612
|
-
}
|
|
11567
|
+
this.setStyleValue(YogaValueKind.Padding, Edge2.Vertical, paddingY, isPaddingType);
|
|
11613
11568
|
}
|
|
11614
11569
|
set paddingTop(padding) {
|
|
11615
|
-
|
|
11616
|
-
this.setPadding(Edge2.Top, padding);
|
|
11617
|
-
this.requestRender();
|
|
11618
|
-
}
|
|
11570
|
+
this.setStyleValue(YogaValueKind.Padding, Edge2.Top, padding, isPaddingType);
|
|
11619
11571
|
}
|
|
11620
11572
|
set paddingRight(padding) {
|
|
11621
|
-
|
|
11622
|
-
this.setPadding(Edge2.Right, padding);
|
|
11623
|
-
this.requestRender();
|
|
11624
|
-
}
|
|
11573
|
+
this.setStyleValue(YogaValueKind.Padding, Edge2.Right, padding, isPaddingType);
|
|
11625
11574
|
}
|
|
11626
11575
|
set paddingBottom(padding) {
|
|
11627
|
-
|
|
11628
|
-
this.setPadding(Edge2.Bottom, padding);
|
|
11629
|
-
this.requestRender();
|
|
11630
|
-
}
|
|
11576
|
+
this.setStyleValue(YogaValueKind.Padding, Edge2.Bottom, padding, isPaddingType);
|
|
11631
11577
|
}
|
|
11632
11578
|
set paddingLeft(padding) {
|
|
11633
|
-
|
|
11634
|
-
|
|
11635
|
-
|
|
11636
|
-
|
|
11579
|
+
this.setStyleValue(YogaValueKind.Padding, Edge2.Left, padding, isPaddingType);
|
|
11580
|
+
}
|
|
11581
|
+
setStyleValue(kind, edge, value, isValid) {
|
|
11582
|
+
if (value != null && !isValid(value))
|
|
11583
|
+
return;
|
|
11584
|
+
this.yogaSetValue(kind, edge, value ?? undefined);
|
|
11585
|
+
this.requestRender();
|
|
11637
11586
|
}
|
|
11638
11587
|
setMeasureProvider(provider) {
|
|
11639
11588
|
if (this.isFreed())
|
|
@@ -14559,22 +14508,19 @@ class BoxRenderable2 extends Renderable2 {
|
|
|
14559
14508
|
}
|
|
14560
14509
|
}
|
|
14561
14510
|
set gap(gap) {
|
|
14562
|
-
|
|
14563
|
-
this.setGap(Gutter2.All, gap);
|
|
14564
|
-
this.requestRender();
|
|
14565
|
-
}
|
|
14511
|
+
this.setGapStyle(Gutter2.All, gap);
|
|
14566
14512
|
}
|
|
14567
14513
|
set rowGap(rowGap) {
|
|
14568
|
-
|
|
14569
|
-
this.setGap(Gutter2.Row, rowGap);
|
|
14570
|
-
this.requestRender();
|
|
14571
|
-
}
|
|
14514
|
+
this.setGapStyle(Gutter2.Row, rowGap);
|
|
14572
14515
|
}
|
|
14573
14516
|
set columnGap(columnGap) {
|
|
14574
|
-
|
|
14575
|
-
|
|
14576
|
-
|
|
14577
|
-
|
|
14517
|
+
this.setGapStyle(Gutter2.Column, columnGap);
|
|
14518
|
+
}
|
|
14519
|
+
setGapStyle(gutter, gap) {
|
|
14520
|
+
if (gap != null && !isGapType(gap))
|
|
14521
|
+
return;
|
|
14522
|
+
this.setGap(gutter, gap ?? undefined);
|
|
14523
|
+
this.requestRender();
|
|
14578
14524
|
}
|
|
14579
14525
|
}
|
|
14580
14526
|
|
|
@@ -17841,7 +17787,10 @@ function getKeyBindingKey(binding) {
|
|
|
17841
17787
|
return `${binding.name}:${binding.ctrl ? 1 : 0}:${binding.shift ? 1 : 0}:${binding.meta ? 1 : 0}:${binding.super ? 1 : 0}`;
|
|
17842
17788
|
}
|
|
17843
17789
|
function getBaseCodeKeyName({ name: typedName, baseCode }) {
|
|
17844
|
-
if (
|
|
17790
|
+
if (baseCode === undefined || baseCode <= 32 || baseCode === 127) {
|
|
17791
|
+
return;
|
|
17792
|
+
}
|
|
17793
|
+
if (!/^[^\x00-\x7f]$/u.test(typedName) && (baseCode < 48 || baseCode > 57)) {
|
|
17845
17794
|
return;
|
|
17846
17795
|
}
|
|
17847
17796
|
try {
|
|
@@ -21386,6 +21335,7 @@ class CliRenderer2 extends EventEmitter8 {
|
|
|
21386
21335
|
_suspendedMouseEnabled = false;
|
|
21387
21336
|
_previousControlState = "idle" /* IDLE */;
|
|
21388
21337
|
capturedRenderable;
|
|
21338
|
+
pressedRenderable;
|
|
21389
21339
|
lastOverRenderableNum = 0;
|
|
21390
21340
|
lastOverRenderable;
|
|
21391
21341
|
currentSelection = null;
|
|
@@ -21835,12 +21785,6 @@ Captured external output:
|
|
|
21835
21785
|
if (failure)
|
|
21836
21786
|
throw failure.error;
|
|
21837
21787
|
}
|
|
21838
|
-
setCapturedRenderable(renderable) {
|
|
21839
|
-
if (this.capturedRenderable === renderable) {
|
|
21840
|
-
return;
|
|
21841
|
-
}
|
|
21842
|
-
this.capturedRenderable = renderable;
|
|
21843
|
-
}
|
|
21844
21788
|
get widthMethod() {
|
|
21845
21789
|
return this.capabilities?.unicode ?? this.nextRenderBuffer.widthMethod;
|
|
21846
21790
|
}
|
|
@@ -22983,7 +22927,7 @@ Captured external output:
|
|
|
22983
22927
|
this.nativeSession.control({ kind: "mouse", mode: "disabled" });
|
|
22984
22928
|
}
|
|
22985
22929
|
this._useMouse = false;
|
|
22986
|
-
this.
|
|
22930
|
+
this.capturedRenderable = undefined;
|
|
22987
22931
|
this.stdinParser?.resetMouseState();
|
|
22988
22932
|
}
|
|
22989
22933
|
enableKittyKeyboard(flags = 3) {
|
|
@@ -23346,6 +23290,10 @@ Captured external output:
|
|
|
23346
23290
|
}
|
|
23347
23291
|
}
|
|
23348
23292
|
processSingleMouseEvent(mouseEvent) {
|
|
23293
|
+
const pressed = this.pressedRenderable;
|
|
23294
|
+
const left = mouseEvent.button === 0 /* LEFT */;
|
|
23295
|
+
if (left && (mouseEvent.type === "down" || mouseEvent.type === "up"))
|
|
23296
|
+
this.pressedRenderable = undefined;
|
|
23349
23297
|
if (this._splitHeight > 0) {
|
|
23350
23298
|
if (mouseEvent.y < this.renderOffset) {
|
|
23351
23299
|
return false;
|
|
@@ -23441,35 +23389,29 @@ Captured external output:
|
|
|
23441
23389
|
return true;
|
|
23442
23390
|
}
|
|
23443
23391
|
if (this.capturedRenderable && mouseEvent.type === "up") {
|
|
23444
|
-
const
|
|
23445
|
-
|
|
23446
|
-
|
|
23447
|
-
|
|
23448
|
-
this.
|
|
23449
|
-
this.
|
|
23392
|
+
const source = this.capturedRenderable;
|
|
23393
|
+
this.sendMouseEvent(source, new MouseEvent2(source, { ...mouseEvent, type: "drag-end" }));
|
|
23394
|
+
this.sendMouseEvent(source, new MouseEvent2(source, mouseEvent));
|
|
23395
|
+
this.lastOverRenderable = source;
|
|
23396
|
+
this.lastOverRenderableNum = source.num;
|
|
23397
|
+
this.capturedRenderable = undefined;
|
|
23398
|
+
this.requestRender();
|
|
23399
|
+
if (maybeRenderable && this.isWithinContainer(maybeRenderable, source))
|
|
23400
|
+
return true;
|
|
23450
23401
|
if (maybeRenderable) {
|
|
23451
|
-
|
|
23452
|
-
...mouseEvent,
|
|
23453
|
-
type: "drop",
|
|
23454
|
-
source: this.capturedRenderable
|
|
23455
|
-
});
|
|
23456
|
-
this.sendMouseEvent(maybeRenderable, event);
|
|
23402
|
+
this.sendMouseEvent(maybeRenderable, new MouseEvent2(maybeRenderable, { ...mouseEvent, type: "drop", source }));
|
|
23457
23403
|
}
|
|
23458
|
-
this.lastOverRenderable = this.capturedRenderable;
|
|
23459
|
-
this.lastOverRenderableNum = this.capturedRenderable.num;
|
|
23460
|
-
this.setCapturedRenderable(undefined);
|
|
23461
|
-
this.requestRender();
|
|
23462
23404
|
}
|
|
23405
|
+
const isLeftDrag = left && mouseEvent.type === "drag";
|
|
23406
|
+
const target = isLeftDrag && pressed && !pressed.isDestroyed ? pressed : maybeRenderable;
|
|
23463
23407
|
let event;
|
|
23464
|
-
if (
|
|
23465
|
-
if (
|
|
23466
|
-
this.
|
|
23467
|
-
|
|
23468
|
-
this.
|
|
23469
|
-
|
|
23470
|
-
event = this.dispatchMouseEvent(maybeRenderable, mouseEvent);
|
|
23408
|
+
if (target) {
|
|
23409
|
+
if (isLeftDrag)
|
|
23410
|
+
this.capturedRenderable = target;
|
|
23411
|
+
else if (left && mouseEvent.type === "down")
|
|
23412
|
+
this.pressedRenderable = target;
|
|
23413
|
+
event = this.dispatchMouseEvent(target, mouseEvent);
|
|
23471
23414
|
} else {
|
|
23472
|
-
this.setCapturedRenderable(undefined);
|
|
23473
23415
|
this.lastOverRenderable = undefined;
|
|
23474
23416
|
}
|
|
23475
23417
|
if (!event?.defaultPrevented && mouseEvent.type === "down" && mouseEvent.button === 0 /* LEFT */ && this.currentSelection) {
|
|
@@ -23700,7 +23642,7 @@ Captured external output:
|
|
|
23700
23642
|
this.height = nextGeometry.renderHeight;
|
|
23701
23643
|
this._resolution = null;
|
|
23702
23644
|
this.lib.sessionSetImageResolution(this.nativeSession.context, this.nativeSession.session, 0, 0, 0, 0);
|
|
23703
|
-
this.
|
|
23645
|
+
this.capturedRenderable = undefined;
|
|
23704
23646
|
this.stdinParser?.resetMouseState();
|
|
23705
23647
|
if (splitFooterActive) {
|
|
23706
23648
|
this.forceFullRepaintRequested = true;
|
|
@@ -24149,7 +24091,7 @@ Captured external output:
|
|
|
24149
24091
|
this.handleStdinParserFailure(error);
|
|
24150
24092
|
}
|
|
24151
24093
|
this._useMouse = false;
|
|
24152
|
-
this.
|
|
24094
|
+
this.capturedRenderable = undefined;
|
|
24153
24095
|
this.removeCleanupListener(this.stdin, "data", this.stdinListener);
|
|
24154
24096
|
this.stopTerminalKeepAlive();
|
|
24155
24097
|
if (this.stdin.setRawMode) {
|
|
@@ -24937,5 +24879,5 @@ Captured external output:
|
|
|
24937
24879
|
|
|
24938
24880
|
export { isValidBorderStyle2, parseBorderStyle2, BorderChars2, getBorderFromSides2, getBorderSides2, borderCharsToArray2, BorderCharArrays2, KeyEvent2, PasteEvent2, KeyHandler2, InternalKeyHandler2, fonts2, measureText2, getCharacterPositions2, coordinateToCharacterIndex2, renderFontToFrameBuffer2, convertThemeToStyles2, SyntaxStyle2, hastToStyledText2, SystemClock2, nonAlphanumericKeys2, terminalNamedSingleStrokeKeys2, parseKeypress2, LinearScrollAccel2, MacOSScrollAccel2, parseAlign2, parseAlignItems2, parseBoxSizing2, parseDimension2, parseDirection2, parseDisplay2, parseEdge2, parseFlexDirection2, parseGutter2, parseJustify2, parseLogLevel2, parseMeasureMode2, parseOverflow2, parsePositionType2, parseUnit2, parseWrap2, MouseParser2, Selection2, convertGlobalToLocalSelection2, ASCIIFontSelectionHelper2, StdinParser2, addDefaultParsers2, TreeSitterClient2, treeSitterToTextChunks2, treeSitterToStyledText2, DataPathsManager2, getDataPaths2, extensionToFiletype2, basenameToFiletype2, extToFiletype2, pathToFiletype2, infoStringToFiletype2, getTreeSitterClient2, destroyTreeSitterClient2, ExtmarksController2, createExtmarksController2, TerminalPalette2, createTerminalPalette2, normalizeTerminalPalette2, buildTerminalPaletteSignature2, decodePasteBytes2, stripAnsiSequences2, createHostClipboard2, createClipboard2, ClipboardTarget2, createRendererClipboardAdapter2, normalizeMarkdownLinkTarget, detectLinks2, acquireSessionBufferLease2, ResourceContext2, OptimizedBuffer2, h2, isVNode2, maybeMakeRenderable2, wrapWithDelegates2, instantiate2, delegate2, LayoutEvents2, RenderableEvents2, isRenderable2, BaseRenderable2, Renderable2, RootRenderable2, TextBuffer2, TextBufferView2, EditBuffer2, measureEditText2, EditorView2, Timeline2, engine2, getTimelineEngine2, createTimeline2, ANSI, BoxRenderable2, TextBufferRenderable2, CodeRenderable2, ImageLoadError2, ImageError2, imageInfo2, NativeImage2, NativeImagePool2, resolveImageRenderProtocol2, ImageRenderable2, isTextNodeRenderable2, TextNodeRenderable2, RootTextNodeRenderable2, TextRenderable2, NativeSession2, defaultKeyAliases, mergeKeyAliases, mergeKeyBindings, getKeyBindingAction, buildKeyBindingsMap, capture2, ConsolePosition2, TerminalConsole2, EditBufferRenderableEvents2, isEditBufferRenderable2, EditBufferRenderable2, buildKittyKeyboardFlags2, MouseEvent2, MouseButton2, createCliRenderer2, CliRenderEvents2, RendererControlState2, CliRenderer2 };
|
|
24939
24881
|
|
|
24940
|
-
//# debugId=
|
|
24941
|
-
//# sourceMappingURL=chunk-bun-
|
|
24882
|
+
//# debugId=D465285E915A2A8164756E2164756E21
|
|
24883
|
+
//# sourceMappingURL=chunk-bun-rk6266v5.js.map
|