@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
|
@@ -63,7 +63,7 @@ import {
|
|
|
63
63
|
PositionType2,
|
|
64
64
|
Unit2,
|
|
65
65
|
Wrap2
|
|
66
|
-
} from "./chunk-node-
|
|
66
|
+
} from "./chunk-node-jhq62x0c.js";
|
|
67
67
|
|
|
68
68
|
// src/lib/border.ts
|
|
69
69
|
var VALID_BORDER_STYLES = ["single", "double", "rounded", "heavy"];
|
|
@@ -10570,6 +10570,7 @@ var RenderableEvents2;
|
|
|
10570
10570
|
RenderableEvents["BLURRED"] = "blurred";
|
|
10571
10571
|
RenderableEvents["DESTROYED"] = "destroyed";
|
|
10572
10572
|
})(RenderableEvents2 ||= {});
|
|
10573
|
+
var positionKeys = ["left", "top", "right", "bottom"];
|
|
10573
10574
|
function isRenderable2(obj) {
|
|
10574
10575
|
return !!obj?.[BrandedRenderable];
|
|
10575
10576
|
}
|
|
@@ -10788,6 +10789,7 @@ class Renderable2 extends BaseRenderable2 {
|
|
|
10788
10789
|
return isRowFlexDirection(this.getFlexDirection()) ? "row" : "column";
|
|
10789
10790
|
}
|
|
10790
10791
|
set visible(value) {
|
|
10792
|
+
value ??= true;
|
|
10791
10793
|
if (this._visible === value)
|
|
10792
10794
|
return;
|
|
10793
10795
|
this.runMutation(() => {
|
|
@@ -11012,32 +11014,32 @@ class Renderable2 extends BaseRenderable2 {
|
|
|
11012
11014
|
return this._position.top;
|
|
11013
11015
|
}
|
|
11014
11016
|
set top(value) {
|
|
11015
|
-
if (isPositionType(value) || value
|
|
11016
|
-
this.setPosition({ top: value });
|
|
11017
|
+
if (isPositionType(value) || value == null) {
|
|
11018
|
+
this.setPosition({ top: value ?? undefined });
|
|
11017
11019
|
}
|
|
11018
11020
|
}
|
|
11019
11021
|
get right() {
|
|
11020
11022
|
return this._position.right;
|
|
11021
11023
|
}
|
|
11022
11024
|
set right(value) {
|
|
11023
|
-
if (isPositionType(value) || value
|
|
11024
|
-
this.setPosition({ right: value });
|
|
11025
|
+
if (isPositionType(value) || value == null) {
|
|
11026
|
+
this.setPosition({ right: value ?? undefined });
|
|
11025
11027
|
}
|
|
11026
11028
|
}
|
|
11027
11029
|
get bottom() {
|
|
11028
11030
|
return this._position.bottom;
|
|
11029
11031
|
}
|
|
11030
11032
|
set bottom(value) {
|
|
11031
|
-
if (isPositionType(value) || value
|
|
11032
|
-
this.setPosition({ bottom: value });
|
|
11033
|
+
if (isPositionType(value) || value == null) {
|
|
11034
|
+
this.setPosition({ bottom: value ?? undefined });
|
|
11033
11035
|
}
|
|
11034
11036
|
}
|
|
11035
11037
|
get left() {
|
|
11036
11038
|
return this._position.left;
|
|
11037
11039
|
}
|
|
11038
11040
|
set left(value) {
|
|
11039
|
-
if (isPositionType(value) || value
|
|
11040
|
-
this.setPosition({ left: value });
|
|
11041
|
+
if (isPositionType(value) || value == null) {
|
|
11042
|
+
this.setPosition({ left: value ?? undefined });
|
|
11041
11043
|
}
|
|
11042
11044
|
}
|
|
11043
11045
|
get y() {
|
|
@@ -11060,10 +11062,7 @@ class Renderable2 extends BaseRenderable2 {
|
|
|
11060
11062
|
return this._destroyedLayout?.width ?? this.styledDimension("width");
|
|
11061
11063
|
}
|
|
11062
11064
|
set width(value) {
|
|
11063
|
-
|
|
11064
|
-
return;
|
|
11065
|
-
}
|
|
11066
|
-
this.setDimension(Dimension2.Width, value);
|
|
11065
|
+
this.setDimension("width", value);
|
|
11067
11066
|
}
|
|
11068
11067
|
get height() {
|
|
11069
11068
|
if (!this.isFreed()) {
|
|
@@ -11072,6 +11071,9 @@ class Renderable2 extends BaseRenderable2 {
|
|
|
11072
11071
|
}
|
|
11073
11072
|
return this._destroyedLayout?.height ?? this.styledDimension("height");
|
|
11074
11073
|
}
|
|
11074
|
+
defaultDimension(_kind) {
|
|
11075
|
+
return "auto";
|
|
11076
|
+
}
|
|
11075
11077
|
styledDimension(kind) {
|
|
11076
11078
|
const value = kind === "width" ? this._width : this._height;
|
|
11077
11079
|
return typeof value === "number" ? value : 0;
|
|
@@ -11097,15 +11099,18 @@ class Renderable2 extends BaseRenderable2 {
|
|
|
11097
11099
|
return layout;
|
|
11098
11100
|
}
|
|
11099
11101
|
set height(value) {
|
|
11100
|
-
|
|
11101
|
-
return;
|
|
11102
|
-
}
|
|
11103
|
-
this.setDimension(Dimension2.Height, value);
|
|
11102
|
+
this.setDimension("height", value);
|
|
11104
11103
|
}
|
|
11105
|
-
setDimension(
|
|
11104
|
+
setDimension(kind, input) {
|
|
11105
|
+
if (this.isFreed())
|
|
11106
|
+
return;
|
|
11107
|
+
const value = input ?? this.defaultDimension(kind);
|
|
11108
|
+
const key = kind === "width" ? "_width" : "_height";
|
|
11109
|
+
if (!isDimensionType(value) || this[key] === value)
|
|
11110
|
+
return;
|
|
11106
11111
|
this.runMutation(() => {
|
|
11107
|
-
const key = dimension === Dimension2.Width ? "_width" : "_height";
|
|
11108
11112
|
const disableShrink = typeof value === "number" && this._flexShrink === 1;
|
|
11113
|
+
const dimension = kind === "width" ? Dimension2.Width : Dimension2.Height;
|
|
11109
11114
|
sceneSetDimension(this._ctx.nativeScene, this, dimension, value, disableShrink);
|
|
11110
11115
|
this[key] = value;
|
|
11111
11116
|
if (disableShrink)
|
|
@@ -11299,20 +11304,6 @@ class Renderable2 extends BaseRenderable2 {
|
|
|
11299
11304
|
getGap(gutter) {
|
|
11300
11305
|
return this.yogaGetValue(YogaValueKind.Gap, gutter);
|
|
11301
11306
|
}
|
|
11302
|
-
setPositions(positions) {
|
|
11303
|
-
const units = new Uint32Array(Edge2.Bottom + 1);
|
|
11304
|
-
const values = new Float32Array(Edge2.Bottom + 1);
|
|
11305
|
-
let mask = 0;
|
|
11306
|
-
for (let edge = 0;edge <= Edge2.Bottom; edge++) {
|
|
11307
|
-
if (positions[edge] === undefined)
|
|
11308
|
-
continue;
|
|
11309
|
-
const value = parseYogaValue(positions[edge]);
|
|
11310
|
-
mask |= 1 << edge;
|
|
11311
|
-
units[edge] = value.unit;
|
|
11312
|
-
values[edge] = value.value;
|
|
11313
|
-
}
|
|
11314
|
-
this._ctx.nativeScene.setPositions(this, mask, units, values);
|
|
11315
|
-
}
|
|
11316
11307
|
getComputedLayout() {
|
|
11317
11308
|
const scene = this._ctx.nativeScene;
|
|
11318
11309
|
const revision = scene.observedLayoutRevision;
|
|
@@ -11445,6 +11436,7 @@ class Renderable2 extends BaseRenderable2 {
|
|
|
11445
11436
|
}
|
|
11446
11437
|
}
|
|
11447
11438
|
set position(positionType) {
|
|
11439
|
+
positionType ??= "relative";
|
|
11448
11440
|
if (!isPositionTypeType(positionType) || this._positionType === positionType)
|
|
11449
11441
|
return;
|
|
11450
11442
|
this.runMutation(() => {
|
|
@@ -11457,6 +11449,7 @@ class Renderable2 extends BaseRenderable2 {
|
|
|
11457
11449
|
return this._overflow;
|
|
11458
11450
|
}
|
|
11459
11451
|
set overflow(overflow) {
|
|
11452
|
+
overflow ??= "visible";
|
|
11460
11453
|
if (!isOverflowType(overflow) || this._overflow === overflow)
|
|
11461
11454
|
return;
|
|
11462
11455
|
this.runMutation(() => {
|
|
@@ -11473,13 +11466,20 @@ class Renderable2 extends BaseRenderable2 {
|
|
|
11473
11466
|
});
|
|
11474
11467
|
}
|
|
11475
11468
|
updateYogaPosition(position) {
|
|
11476
|
-
const
|
|
11477
|
-
|
|
11478
|
-
|
|
11479
|
-
|
|
11480
|
-
|
|
11481
|
-
|
|
11482
|
-
|
|
11469
|
+
const units = new Uint32Array(positionKeys.length);
|
|
11470
|
+
const values = new Float32Array(positionKeys.length);
|
|
11471
|
+
let mask = 0;
|
|
11472
|
+
for (let edge = 0;edge < positionKeys.length; edge++) {
|
|
11473
|
+
const key = positionKeys[edge];
|
|
11474
|
+
const input = position[key] ?? undefined;
|
|
11475
|
+
if (!(key in position) || input !== undefined && !isPositionType(input))
|
|
11476
|
+
continue;
|
|
11477
|
+
const value = parseYogaValue(input);
|
|
11478
|
+
mask |= 1 << edge;
|
|
11479
|
+
units[edge] = value.unit;
|
|
11480
|
+
values[edge] = value.value;
|
|
11481
|
+
}
|
|
11482
|
+
this._ctx.nativeScene.setPositions(this, mask, units, values);
|
|
11483
11483
|
}
|
|
11484
11484
|
set flexGrow(grow) {
|
|
11485
11485
|
if (grow == null) {
|
|
@@ -11518,121 +11518,70 @@ class Renderable2 extends BaseRenderable2 {
|
|
|
11518
11518
|
this.requestRender();
|
|
11519
11519
|
}
|
|
11520
11520
|
set flexBasis(basis) {
|
|
11521
|
-
|
|
11522
|
-
this.setFlexBasis(basis);
|
|
11523
|
-
this.requestRender();
|
|
11524
|
-
}
|
|
11521
|
+
this.setStyleValue(YogaValueKind.FlexBasis, NATIVE_EDGE_NONE2, basis, isFlexBasisType);
|
|
11525
11522
|
}
|
|
11526
11523
|
set minWidth(minWidth) {
|
|
11527
|
-
|
|
11528
|
-
this.setMinWidth(minWidth);
|
|
11529
|
-
this.requestRender();
|
|
11530
|
-
}
|
|
11524
|
+
this.setStyleValue(YogaValueKind.MinWidth, NATIVE_EDGE_NONE2, minWidth, isSizeType);
|
|
11531
11525
|
}
|
|
11532
11526
|
set maxWidth(maxWidth) {
|
|
11533
|
-
|
|
11534
|
-
this.setMaxWidth(maxWidth);
|
|
11535
|
-
this.requestRender();
|
|
11536
|
-
}
|
|
11527
|
+
this.setStyleValue(YogaValueKind.MaxWidth, NATIVE_EDGE_NONE2, maxWidth, isSizeType);
|
|
11537
11528
|
}
|
|
11538
11529
|
set minHeight(minHeight) {
|
|
11539
|
-
|
|
11540
|
-
this.setMinHeight(minHeight);
|
|
11541
|
-
this.requestRender();
|
|
11542
|
-
}
|
|
11530
|
+
this.setStyleValue(YogaValueKind.MinHeight, NATIVE_EDGE_NONE2, minHeight, isSizeType);
|
|
11543
11531
|
}
|
|
11544
11532
|
set maxHeight(maxHeight) {
|
|
11545
|
-
|
|
11546
|
-
this.setMaxHeight(maxHeight);
|
|
11547
|
-
this.requestRender();
|
|
11548
|
-
}
|
|
11533
|
+
this.setStyleValue(YogaValueKind.MaxHeight, NATIVE_EDGE_NONE2, maxHeight, isSizeType);
|
|
11549
11534
|
}
|
|
11550
11535
|
set margin(margin) {
|
|
11551
|
-
|
|
11552
|
-
this.setMargin(Edge2.All, margin);
|
|
11553
|
-
this.requestRender();
|
|
11554
|
-
}
|
|
11536
|
+
this.setStyleValue(YogaValueKind.Margin, Edge2.All, margin, isMarginType);
|
|
11555
11537
|
}
|
|
11556
11538
|
set marginX(marginX) {
|
|
11557
|
-
|
|
11558
|
-
this.setMargin(Edge2.Horizontal, marginX);
|
|
11559
|
-
this.requestRender();
|
|
11560
|
-
}
|
|
11539
|
+
this.setStyleValue(YogaValueKind.Margin, Edge2.Horizontal, marginX, isMarginType);
|
|
11561
11540
|
}
|
|
11562
11541
|
set marginY(marginY) {
|
|
11563
|
-
|
|
11564
|
-
this.setMargin(Edge2.Vertical, marginY);
|
|
11565
|
-
this.requestRender();
|
|
11566
|
-
}
|
|
11542
|
+
this.setStyleValue(YogaValueKind.Margin, Edge2.Vertical, marginY, isMarginType);
|
|
11567
11543
|
}
|
|
11568
11544
|
set marginTop(margin) {
|
|
11569
|
-
|
|
11570
|
-
this.setMargin(Edge2.Top, margin);
|
|
11571
|
-
this.requestRender();
|
|
11572
|
-
}
|
|
11545
|
+
this.setStyleValue(YogaValueKind.Margin, Edge2.Top, margin, isMarginType);
|
|
11573
11546
|
}
|
|
11574
11547
|
get marginTop() {
|
|
11575
11548
|
return this.getMargin(Edge2.Top).value;
|
|
11576
11549
|
}
|
|
11577
11550
|
set marginRight(margin) {
|
|
11578
|
-
|
|
11579
|
-
this.setMargin(Edge2.Right, margin);
|
|
11580
|
-
this.requestRender();
|
|
11581
|
-
}
|
|
11551
|
+
this.setStyleValue(YogaValueKind.Margin, Edge2.Right, margin, isMarginType);
|
|
11582
11552
|
}
|
|
11583
11553
|
set marginBottom(margin) {
|
|
11584
|
-
|
|
11585
|
-
this.setMargin(Edge2.Bottom, margin);
|
|
11586
|
-
this.requestRender();
|
|
11587
|
-
}
|
|
11554
|
+
this.setStyleValue(YogaValueKind.Margin, Edge2.Bottom, margin, isMarginType);
|
|
11588
11555
|
}
|
|
11589
11556
|
set marginLeft(margin) {
|
|
11590
|
-
|
|
11591
|
-
this.setMargin(Edge2.Left, margin);
|
|
11592
|
-
this.requestRender();
|
|
11593
|
-
}
|
|
11557
|
+
this.setStyleValue(YogaValueKind.Margin, Edge2.Left, margin, isMarginType);
|
|
11594
11558
|
}
|
|
11595
11559
|
set padding(padding) {
|
|
11596
|
-
|
|
11597
|
-
this.setPadding(Edge2.All, padding);
|
|
11598
|
-
this.requestRender();
|
|
11599
|
-
}
|
|
11560
|
+
this.setStyleValue(YogaValueKind.Padding, Edge2.All, padding, isPaddingType);
|
|
11600
11561
|
}
|
|
11601
11562
|
set paddingX(paddingX) {
|
|
11602
|
-
|
|
11603
|
-
this.setPadding(Edge2.Horizontal, paddingX);
|
|
11604
|
-
this.requestRender();
|
|
11605
|
-
}
|
|
11563
|
+
this.setStyleValue(YogaValueKind.Padding, Edge2.Horizontal, paddingX, isPaddingType);
|
|
11606
11564
|
}
|
|
11607
11565
|
set paddingY(paddingY) {
|
|
11608
|
-
|
|
11609
|
-
this.setPadding(Edge2.Vertical, paddingY);
|
|
11610
|
-
this.requestRender();
|
|
11611
|
-
}
|
|
11566
|
+
this.setStyleValue(YogaValueKind.Padding, Edge2.Vertical, paddingY, isPaddingType);
|
|
11612
11567
|
}
|
|
11613
11568
|
set paddingTop(padding) {
|
|
11614
|
-
|
|
11615
|
-
this.setPadding(Edge2.Top, padding);
|
|
11616
|
-
this.requestRender();
|
|
11617
|
-
}
|
|
11569
|
+
this.setStyleValue(YogaValueKind.Padding, Edge2.Top, padding, isPaddingType);
|
|
11618
11570
|
}
|
|
11619
11571
|
set paddingRight(padding) {
|
|
11620
|
-
|
|
11621
|
-
this.setPadding(Edge2.Right, padding);
|
|
11622
|
-
this.requestRender();
|
|
11623
|
-
}
|
|
11572
|
+
this.setStyleValue(YogaValueKind.Padding, Edge2.Right, padding, isPaddingType);
|
|
11624
11573
|
}
|
|
11625
11574
|
set paddingBottom(padding) {
|
|
11626
|
-
|
|
11627
|
-
this.setPadding(Edge2.Bottom, padding);
|
|
11628
|
-
this.requestRender();
|
|
11629
|
-
}
|
|
11575
|
+
this.setStyleValue(YogaValueKind.Padding, Edge2.Bottom, padding, isPaddingType);
|
|
11630
11576
|
}
|
|
11631
11577
|
set paddingLeft(padding) {
|
|
11632
|
-
|
|
11633
|
-
|
|
11634
|
-
|
|
11635
|
-
|
|
11578
|
+
this.setStyleValue(YogaValueKind.Padding, Edge2.Left, padding, isPaddingType);
|
|
11579
|
+
}
|
|
11580
|
+
setStyleValue(kind, edge, value, isValid) {
|
|
11581
|
+
if (value != null && !isValid(value))
|
|
11582
|
+
return;
|
|
11583
|
+
this.yogaSetValue(kind, edge, value ?? undefined);
|
|
11584
|
+
this.requestRender();
|
|
11636
11585
|
}
|
|
11637
11586
|
setMeasureProvider(provider) {
|
|
11638
11587
|
if (this.isFreed())
|
|
@@ -14558,22 +14507,19 @@ class BoxRenderable2 extends Renderable2 {
|
|
|
14558
14507
|
}
|
|
14559
14508
|
}
|
|
14560
14509
|
set gap(gap) {
|
|
14561
|
-
|
|
14562
|
-
this.setGap(Gutter2.All, gap);
|
|
14563
|
-
this.requestRender();
|
|
14564
|
-
}
|
|
14510
|
+
this.setGapStyle(Gutter2.All, gap);
|
|
14565
14511
|
}
|
|
14566
14512
|
set rowGap(rowGap) {
|
|
14567
|
-
|
|
14568
|
-
this.setGap(Gutter2.Row, rowGap);
|
|
14569
|
-
this.requestRender();
|
|
14570
|
-
}
|
|
14513
|
+
this.setGapStyle(Gutter2.Row, rowGap);
|
|
14571
14514
|
}
|
|
14572
14515
|
set columnGap(columnGap) {
|
|
14573
|
-
|
|
14574
|
-
|
|
14575
|
-
|
|
14576
|
-
|
|
14516
|
+
this.setGapStyle(Gutter2.Column, columnGap);
|
|
14517
|
+
}
|
|
14518
|
+
setGapStyle(gutter, gap) {
|
|
14519
|
+
if (gap != null && !isGapType(gap))
|
|
14520
|
+
return;
|
|
14521
|
+
this.setGap(gutter, gap ?? undefined);
|
|
14522
|
+
this.requestRender();
|
|
14577
14523
|
}
|
|
14578
14524
|
}
|
|
14579
14525
|
|
|
@@ -17840,7 +17786,10 @@ function getKeyBindingKey(binding) {
|
|
|
17840
17786
|
return `${binding.name}:${binding.ctrl ? 1 : 0}:${binding.shift ? 1 : 0}:${binding.meta ? 1 : 0}:${binding.super ? 1 : 0}`;
|
|
17841
17787
|
}
|
|
17842
17788
|
function getBaseCodeKeyName({ name: typedName, baseCode }) {
|
|
17843
|
-
if (
|
|
17789
|
+
if (baseCode === undefined || baseCode <= 32 || baseCode === 127) {
|
|
17790
|
+
return;
|
|
17791
|
+
}
|
|
17792
|
+
if (!/^[^\x00-\x7f]$/u.test(typedName) && (baseCode < 48 || baseCode > 57)) {
|
|
17844
17793
|
return;
|
|
17845
17794
|
}
|
|
17846
17795
|
try {
|
|
@@ -21385,6 +21334,7 @@ class CliRenderer2 extends EventEmitter8 {
|
|
|
21385
21334
|
_suspendedMouseEnabled = false;
|
|
21386
21335
|
_previousControlState = "idle" /* IDLE */;
|
|
21387
21336
|
capturedRenderable;
|
|
21337
|
+
pressedRenderable;
|
|
21388
21338
|
lastOverRenderableNum = 0;
|
|
21389
21339
|
lastOverRenderable;
|
|
21390
21340
|
currentSelection = null;
|
|
@@ -21834,12 +21784,6 @@ Captured external output:
|
|
|
21834
21784
|
if (failure)
|
|
21835
21785
|
throw failure.error;
|
|
21836
21786
|
}
|
|
21837
|
-
setCapturedRenderable(renderable) {
|
|
21838
|
-
if (this.capturedRenderable === renderable) {
|
|
21839
|
-
return;
|
|
21840
|
-
}
|
|
21841
|
-
this.capturedRenderable = renderable;
|
|
21842
|
-
}
|
|
21843
21787
|
get widthMethod() {
|
|
21844
21788
|
return this.capabilities?.unicode ?? this.nextRenderBuffer.widthMethod;
|
|
21845
21789
|
}
|
|
@@ -22982,7 +22926,7 @@ Captured external output:
|
|
|
22982
22926
|
this.nativeSession.control({ kind: "mouse", mode: "disabled" });
|
|
22983
22927
|
}
|
|
22984
22928
|
this._useMouse = false;
|
|
22985
|
-
this.
|
|
22929
|
+
this.capturedRenderable = undefined;
|
|
22986
22930
|
this.stdinParser?.resetMouseState();
|
|
22987
22931
|
}
|
|
22988
22932
|
enableKittyKeyboard(flags = 3) {
|
|
@@ -23345,6 +23289,10 @@ Captured external output:
|
|
|
23345
23289
|
}
|
|
23346
23290
|
}
|
|
23347
23291
|
processSingleMouseEvent(mouseEvent) {
|
|
23292
|
+
const pressed = this.pressedRenderable;
|
|
23293
|
+
const left = mouseEvent.button === 0 /* LEFT */;
|
|
23294
|
+
if (left && (mouseEvent.type === "down" || mouseEvent.type === "up"))
|
|
23295
|
+
this.pressedRenderable = undefined;
|
|
23348
23296
|
if (this._splitHeight > 0) {
|
|
23349
23297
|
if (mouseEvent.y < this.renderOffset) {
|
|
23350
23298
|
return false;
|
|
@@ -23440,35 +23388,29 @@ Captured external output:
|
|
|
23440
23388
|
return true;
|
|
23441
23389
|
}
|
|
23442
23390
|
if (this.capturedRenderable && mouseEvent.type === "up") {
|
|
23443
|
-
const
|
|
23444
|
-
|
|
23445
|
-
|
|
23446
|
-
|
|
23447
|
-
this.
|
|
23448
|
-
this.
|
|
23391
|
+
const source = this.capturedRenderable;
|
|
23392
|
+
this.sendMouseEvent(source, new MouseEvent2(source, { ...mouseEvent, type: "drag-end" }));
|
|
23393
|
+
this.sendMouseEvent(source, new MouseEvent2(source, mouseEvent));
|
|
23394
|
+
this.lastOverRenderable = source;
|
|
23395
|
+
this.lastOverRenderableNum = source.num;
|
|
23396
|
+
this.capturedRenderable = undefined;
|
|
23397
|
+
this.requestRender();
|
|
23398
|
+
if (maybeRenderable && this.isWithinContainer(maybeRenderable, source))
|
|
23399
|
+
return true;
|
|
23449
23400
|
if (maybeRenderable) {
|
|
23450
|
-
|
|
23451
|
-
...mouseEvent,
|
|
23452
|
-
type: "drop",
|
|
23453
|
-
source: this.capturedRenderable
|
|
23454
|
-
});
|
|
23455
|
-
this.sendMouseEvent(maybeRenderable, event);
|
|
23401
|
+
this.sendMouseEvent(maybeRenderable, new MouseEvent2(maybeRenderable, { ...mouseEvent, type: "drop", source }));
|
|
23456
23402
|
}
|
|
23457
|
-
this.lastOverRenderable = this.capturedRenderable;
|
|
23458
|
-
this.lastOverRenderableNum = this.capturedRenderable.num;
|
|
23459
|
-
this.setCapturedRenderable(undefined);
|
|
23460
|
-
this.requestRender();
|
|
23461
23403
|
}
|
|
23404
|
+
const isLeftDrag = left && mouseEvent.type === "drag";
|
|
23405
|
+
const target = isLeftDrag && pressed && !pressed.isDestroyed ? pressed : maybeRenderable;
|
|
23462
23406
|
let event;
|
|
23463
|
-
if (
|
|
23464
|
-
if (
|
|
23465
|
-
this.
|
|
23466
|
-
|
|
23467
|
-
this.
|
|
23468
|
-
|
|
23469
|
-
event = this.dispatchMouseEvent(maybeRenderable, mouseEvent);
|
|
23407
|
+
if (target) {
|
|
23408
|
+
if (isLeftDrag)
|
|
23409
|
+
this.capturedRenderable = target;
|
|
23410
|
+
else if (left && mouseEvent.type === "down")
|
|
23411
|
+
this.pressedRenderable = target;
|
|
23412
|
+
event = this.dispatchMouseEvent(target, mouseEvent);
|
|
23470
23413
|
} else {
|
|
23471
|
-
this.setCapturedRenderable(undefined);
|
|
23472
23414
|
this.lastOverRenderable = undefined;
|
|
23473
23415
|
}
|
|
23474
23416
|
if (!event?.defaultPrevented && mouseEvent.type === "down" && mouseEvent.button === 0 /* LEFT */ && this.currentSelection) {
|
|
@@ -23699,7 +23641,7 @@ Captured external output:
|
|
|
23699
23641
|
this.height = nextGeometry.renderHeight;
|
|
23700
23642
|
this._resolution = null;
|
|
23701
23643
|
this.lib.sessionSetImageResolution(this.nativeSession.context, this.nativeSession.session, 0, 0, 0, 0);
|
|
23702
|
-
this.
|
|
23644
|
+
this.capturedRenderable = undefined;
|
|
23703
23645
|
this.stdinParser?.resetMouseState();
|
|
23704
23646
|
if (splitFooterActive) {
|
|
23705
23647
|
this.forceFullRepaintRequested = true;
|
|
@@ -24148,7 +24090,7 @@ Captured external output:
|
|
|
24148
24090
|
this.handleStdinParserFailure(error);
|
|
24149
24091
|
}
|
|
24150
24092
|
this._useMouse = false;
|
|
24151
|
-
this.
|
|
24093
|
+
this.capturedRenderable = undefined;
|
|
24152
24094
|
this.removeCleanupListener(this.stdin, "data", this.stdinListener);
|
|
24153
24095
|
this.stopTerminalKeepAlive();
|
|
24154
24096
|
if (this.stdin.setRawMode) {
|
|
@@ -24936,5 +24878,5 @@ Captured external output:
|
|
|
24936
24878
|
|
|
24937
24879
|
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 };
|
|
24938
24880
|
|
|
24939
|
-
//# debugId=
|
|
24940
|
-
//# sourceMappingURL=chunk-node-
|
|
24881
|
+
//# debugId=61919B83A1CBC72664756E2164756E21
|
|
24882
|
+
//# sourceMappingURL=chunk-node-y5p1g2pb.js.map
|