@opentui/core 0.1.78 → 0.1.80
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/NativeSpanFeed.d.ts +41 -0
- package/README.md +4 -0
- package/{index-rje6z21e.js → index-vnvba6q9.js} +513 -204
- package/{index-rje6z21e.js.map → index-vnvba6q9.js.map} +8 -8
- package/index.d.ts +1 -0
- package/index.js +345 -9
- package/index.js.map +9 -8
- package/lib/parse.mouse.d.ts +7 -0
- package/package.json +8 -8
- package/renderables/Diff.d.ts +7 -0
- package/renderables/Input.d.ts +7 -0
- package/renderables/LineNumberRenderable.d.ts +2 -0
- package/renderer.d.ts +6 -3
- package/testing.js +1 -1
- package/types.d.ts +7 -3
- package/zig-structs.d.ts +79 -0
- package/zig.d.ts +20 -2
|
@@ -6074,8 +6074,23 @@ function extractCompleteSequences(buffer) {
|
|
|
6074
6074
|
return { sequences, remainder: remaining };
|
|
6075
6075
|
}
|
|
6076
6076
|
} else {
|
|
6077
|
-
|
|
6078
|
-
|
|
6077
|
+
const code = remaining.charCodeAt(0);
|
|
6078
|
+
if (code >= 55296 && code <= 56319) {
|
|
6079
|
+
if (remaining.length === 1) {
|
|
6080
|
+
return { sequences, remainder: remaining };
|
|
6081
|
+
}
|
|
6082
|
+
const next = remaining.charCodeAt(1);
|
|
6083
|
+
if (next >= 56320 && next <= 57343) {
|
|
6084
|
+
sequences.push(remaining.slice(0, 2));
|
|
6085
|
+
pos += 2;
|
|
6086
|
+
} else {
|
|
6087
|
+
sequences.push(remaining[0]);
|
|
6088
|
+
pos++;
|
|
6089
|
+
}
|
|
6090
|
+
} else {
|
|
6091
|
+
sequences.push(remaining[0]);
|
|
6092
|
+
pos++;
|
|
6093
|
+
}
|
|
6079
6094
|
}
|
|
6080
6095
|
}
|
|
6081
6096
|
return { sequences, remainder: "" };
|
|
@@ -6499,91 +6514,168 @@ class MouseParser {
|
|
|
6499
6514
|
reset() {
|
|
6500
6515
|
this.mouseButtonsPressed.clear();
|
|
6501
6516
|
}
|
|
6517
|
+
decodeInput(data) {
|
|
6518
|
+
return data.toString();
|
|
6519
|
+
}
|
|
6502
6520
|
parseMouseEvent(data) {
|
|
6503
|
-
const str =
|
|
6504
|
-
const
|
|
6505
|
-
|
|
6506
|
-
|
|
6507
|
-
|
|
6508
|
-
|
|
6509
|
-
|
|
6510
|
-
|
|
6511
|
-
|
|
6512
|
-
const
|
|
6513
|
-
|
|
6514
|
-
|
|
6515
|
-
|
|
6516
|
-
|
|
6517
|
-
|
|
6518
|
-
|
|
6519
|
-
|
|
6520
|
-
|
|
6521
|
-
|
|
6522
|
-
|
|
6523
|
-
|
|
6524
|
-
|
|
6525
|
-
|
|
6526
|
-
|
|
6527
|
-
|
|
6528
|
-
|
|
6529
|
-
|
|
6530
|
-
|
|
6531
|
-
|
|
6532
|
-
|
|
6521
|
+
const str = this.decodeInput(data);
|
|
6522
|
+
const parsed = this.parseMouseSequenceAt(str, 0);
|
|
6523
|
+
return parsed?.event ?? null;
|
|
6524
|
+
}
|
|
6525
|
+
parseAllMouseEvents(data) {
|
|
6526
|
+
const str = this.decodeInput(data);
|
|
6527
|
+
const events = [];
|
|
6528
|
+
let offset = 0;
|
|
6529
|
+
while (offset < str.length) {
|
|
6530
|
+
const parsed = this.parseMouseSequenceAt(str, offset);
|
|
6531
|
+
if (!parsed) {
|
|
6532
|
+
break;
|
|
6533
|
+
}
|
|
6534
|
+
events.push(parsed.event);
|
|
6535
|
+
offset += parsed.consumed;
|
|
6536
|
+
}
|
|
6537
|
+
return events;
|
|
6538
|
+
}
|
|
6539
|
+
parseMouseSequenceAt(str, offset) {
|
|
6540
|
+
if (!str.startsWith("\x1B[", offset))
|
|
6541
|
+
return null;
|
|
6542
|
+
const introducer = str[offset + 2];
|
|
6543
|
+
if (introducer === "<") {
|
|
6544
|
+
return this.parseSgrSequence(str, offset);
|
|
6545
|
+
}
|
|
6546
|
+
if (introducer === "M") {
|
|
6547
|
+
return this.parseBasicSequence(str, offset);
|
|
6548
|
+
}
|
|
6549
|
+
return null;
|
|
6550
|
+
}
|
|
6551
|
+
parseSgrSequence(str, offset) {
|
|
6552
|
+
let index = offset + 3;
|
|
6553
|
+
const values = [0, 0, 0];
|
|
6554
|
+
let part = 0;
|
|
6555
|
+
let hasDigit = false;
|
|
6556
|
+
while (index < str.length) {
|
|
6557
|
+
const char = str[index];
|
|
6558
|
+
const charCode = str.charCodeAt(index);
|
|
6559
|
+
if (charCode >= 48 && charCode <= 57) {
|
|
6560
|
+
hasDigit = true;
|
|
6561
|
+
values[part] = values[part] * 10 + (charCode - 48);
|
|
6562
|
+
index++;
|
|
6563
|
+
continue;
|
|
6564
|
+
}
|
|
6565
|
+
switch (char) {
|
|
6566
|
+
case ";": {
|
|
6567
|
+
if (!hasDigit || part >= 2)
|
|
6568
|
+
return null;
|
|
6569
|
+
part++;
|
|
6570
|
+
hasDigit = false;
|
|
6571
|
+
index++;
|
|
6572
|
+
break;
|
|
6533
6573
|
}
|
|
6534
|
-
|
|
6535
|
-
|
|
6536
|
-
|
|
6537
|
-
|
|
6538
|
-
|
|
6539
|
-
|
|
6574
|
+
case "M":
|
|
6575
|
+
case "m": {
|
|
6576
|
+
if (!hasDigit || part !== 2)
|
|
6577
|
+
return null;
|
|
6578
|
+
return {
|
|
6579
|
+
event: this.decodeSgrEvent(values[0], values[1], values[2], char),
|
|
6580
|
+
consumed: index - offset + 1
|
|
6581
|
+
};
|
|
6540
6582
|
}
|
|
6583
|
+
default:
|
|
6584
|
+
return null;
|
|
6541
6585
|
}
|
|
6542
|
-
return {
|
|
6543
|
-
type,
|
|
6544
|
-
button: button === 3 ? 0 : button,
|
|
6545
|
-
x: parseInt(x) - 1,
|
|
6546
|
-
y: parseInt(y) - 1,
|
|
6547
|
-
modifiers,
|
|
6548
|
-
scroll: scrollInfo
|
|
6549
|
-
};
|
|
6550
6586
|
}
|
|
6551
|
-
|
|
6552
|
-
|
|
6553
|
-
|
|
6554
|
-
|
|
6555
|
-
|
|
6556
|
-
|
|
6557
|
-
|
|
6558
|
-
|
|
6559
|
-
|
|
6560
|
-
|
|
6561
|
-
|
|
6587
|
+
return null;
|
|
6588
|
+
}
|
|
6589
|
+
parseBasicSequence(str, offset) {
|
|
6590
|
+
if (offset + 6 > str.length)
|
|
6591
|
+
return null;
|
|
6592
|
+
const buttonByte = str.charCodeAt(offset + 3) - 32;
|
|
6593
|
+
const x = str.charCodeAt(offset + 4) - 33;
|
|
6594
|
+
const y = str.charCodeAt(offset + 5) - 33;
|
|
6595
|
+
return {
|
|
6596
|
+
event: this.decodeBasicEvent(buttonByte, x, y),
|
|
6597
|
+
consumed: 6
|
|
6598
|
+
};
|
|
6599
|
+
}
|
|
6600
|
+
decodeSgrEvent(rawButtonCode, wireX, wireY, pressRelease) {
|
|
6601
|
+
const button = rawButtonCode & 3;
|
|
6602
|
+
const isScroll = (rawButtonCode & 64) !== 0;
|
|
6603
|
+
const scrollDirection = !isScroll ? undefined : MouseParser.SCROLL_DIRECTIONS[button];
|
|
6604
|
+
const isMotion = (rawButtonCode & 32) !== 0;
|
|
6605
|
+
const modifiers = {
|
|
6606
|
+
shift: (rawButtonCode & 4) !== 0,
|
|
6607
|
+
alt: (rawButtonCode & 8) !== 0,
|
|
6608
|
+
ctrl: (rawButtonCode & 16) !== 0
|
|
6609
|
+
};
|
|
6610
|
+
let type;
|
|
6611
|
+
let scrollInfo;
|
|
6612
|
+
if (isScroll && pressRelease === "M") {
|
|
6613
|
+
type = "scroll";
|
|
6614
|
+
scrollInfo = {
|
|
6615
|
+
direction: scrollDirection,
|
|
6616
|
+
delta: 1
|
|
6562
6617
|
};
|
|
6563
|
-
|
|
6564
|
-
|
|
6565
|
-
|
|
6566
|
-
|
|
6567
|
-
|
|
6568
|
-
|
|
6569
|
-
scrollInfo = {
|
|
6570
|
-
direction: scrollDirection,
|
|
6571
|
-
delta: 1
|
|
6572
|
-
};
|
|
6618
|
+
} else if (isMotion) {
|
|
6619
|
+
const isDragging = this.mouseButtonsPressed.size > 0;
|
|
6620
|
+
if (button === 3) {
|
|
6621
|
+
type = "move";
|
|
6622
|
+
} else if (isDragging) {
|
|
6623
|
+
type = "drag";
|
|
6573
6624
|
} else {
|
|
6574
|
-
type =
|
|
6575
|
-
actualButton = button === 3 ? 0 : button;
|
|
6625
|
+
type = "move";
|
|
6576
6626
|
}
|
|
6577
|
-
|
|
6578
|
-
|
|
6579
|
-
|
|
6580
|
-
|
|
6581
|
-
|
|
6582
|
-
|
|
6583
|
-
|
|
6627
|
+
} else {
|
|
6628
|
+
type = pressRelease === "M" ? "down" : "up";
|
|
6629
|
+
if (type === "down" && button !== 3) {
|
|
6630
|
+
this.mouseButtonsPressed.add(button);
|
|
6631
|
+
} else if (type === "up") {
|
|
6632
|
+
this.mouseButtonsPressed.clear();
|
|
6633
|
+
}
|
|
6634
|
+
}
|
|
6635
|
+
return {
|
|
6636
|
+
type,
|
|
6637
|
+
button: button === 3 ? 0 : button,
|
|
6638
|
+
x: wireX - 1,
|
|
6639
|
+
y: wireY - 1,
|
|
6640
|
+
modifiers,
|
|
6641
|
+
scroll: scrollInfo
|
|
6642
|
+
};
|
|
6643
|
+
}
|
|
6644
|
+
decodeBasicEvent(buttonByte, x, y) {
|
|
6645
|
+
const button = buttonByte & 3;
|
|
6646
|
+
const isScroll = (buttonByte & 64) !== 0;
|
|
6647
|
+
const isMotion = (buttonByte & 32) !== 0;
|
|
6648
|
+
const scrollDirection = !isScroll ? undefined : MouseParser.SCROLL_DIRECTIONS[button];
|
|
6649
|
+
const modifiers = {
|
|
6650
|
+
shift: (buttonByte & 4) !== 0,
|
|
6651
|
+
alt: (buttonByte & 8) !== 0,
|
|
6652
|
+
ctrl: (buttonByte & 16) !== 0
|
|
6653
|
+
};
|
|
6654
|
+
let type;
|
|
6655
|
+
let actualButton;
|
|
6656
|
+
let scrollInfo;
|
|
6657
|
+
if (isScroll) {
|
|
6658
|
+
type = "scroll";
|
|
6659
|
+
actualButton = 0;
|
|
6660
|
+
scrollInfo = {
|
|
6661
|
+
direction: scrollDirection,
|
|
6662
|
+
delta: 1
|
|
6584
6663
|
};
|
|
6664
|
+
} else if (isMotion) {
|
|
6665
|
+
type = "move";
|
|
6666
|
+
actualButton = button === 3 ? -1 : button;
|
|
6667
|
+
} else {
|
|
6668
|
+
type = button === 3 ? "up" : "down";
|
|
6669
|
+
actualButton = button === 3 ? 0 : button;
|
|
6585
6670
|
}
|
|
6586
|
-
return
|
|
6671
|
+
return {
|
|
6672
|
+
type,
|
|
6673
|
+
button: actualButton,
|
|
6674
|
+
x,
|
|
6675
|
+
y,
|
|
6676
|
+
modifiers,
|
|
6677
|
+
scroll: scrollInfo
|
|
6678
|
+
};
|
|
6587
6679
|
}
|
|
6588
6680
|
}
|
|
6589
6681
|
|
|
@@ -10311,6 +10403,59 @@ var CursorStateStruct = defineStruct([
|
|
|
10311
10403
|
["b", "f32"],
|
|
10312
10404
|
["a", "f32"]
|
|
10313
10405
|
]);
|
|
10406
|
+
var CursorStyleOptionsStruct = defineStruct([
|
|
10407
|
+
["style", "u8", { default: 255 }],
|
|
10408
|
+
["blinking", "u8", { default: 255 }],
|
|
10409
|
+
[
|
|
10410
|
+
"color",
|
|
10411
|
+
"pointer",
|
|
10412
|
+
{
|
|
10413
|
+
optional: true,
|
|
10414
|
+
packTransform: rgbaPackTransform,
|
|
10415
|
+
unpackTransform: rgbaUnpackTransform
|
|
10416
|
+
}
|
|
10417
|
+
],
|
|
10418
|
+
["cursor", "u8", { default: 255 }]
|
|
10419
|
+
]);
|
|
10420
|
+
var GrowthPolicyEnum = defineEnum({ grow: 0, block: 1 }, "u8");
|
|
10421
|
+
var NativeSpanFeedOptionsStruct = defineStruct([
|
|
10422
|
+
["chunkSize", "u32", { default: 64 * 1024 }],
|
|
10423
|
+
["initialChunks", "u32", { default: 2 }],
|
|
10424
|
+
["maxBytes", "u64", { default: 0n }],
|
|
10425
|
+
["growthPolicy", GrowthPolicyEnum, { default: "grow" }],
|
|
10426
|
+
["autoCommitOnFull", "bool_u8", { default: true }],
|
|
10427
|
+
["spanQueueCapacity", "u32", { default: 0 }]
|
|
10428
|
+
]);
|
|
10429
|
+
var NativeSpanFeedStatsStruct = defineStruct([
|
|
10430
|
+
["bytesWritten", "u64"],
|
|
10431
|
+
["spansCommitted", "u64"],
|
|
10432
|
+
["chunks", "u32"],
|
|
10433
|
+
["pendingSpans", "u32"]
|
|
10434
|
+
]);
|
|
10435
|
+
var SpanInfoStruct = defineStruct([
|
|
10436
|
+
["chunkPtr", "pointer"],
|
|
10437
|
+
["offset", "u32"],
|
|
10438
|
+
["len", "u32"],
|
|
10439
|
+
["chunkIndex", "u32"],
|
|
10440
|
+
["reserved", "u32", { default: 0 }]
|
|
10441
|
+
], {
|
|
10442
|
+
reduceValue: (value) => ({
|
|
10443
|
+
chunkPtr: value.chunkPtr,
|
|
10444
|
+
offset: value.offset,
|
|
10445
|
+
len: value.len,
|
|
10446
|
+
chunkIndex: value.chunkIndex
|
|
10447
|
+
})
|
|
10448
|
+
});
|
|
10449
|
+
var ReserveInfoStruct = defineStruct([
|
|
10450
|
+
["ptr", "pointer"],
|
|
10451
|
+
["len", "u32"],
|
|
10452
|
+
["reserved", "u32", { default: 0 }]
|
|
10453
|
+
], {
|
|
10454
|
+
reduceValue: (value) => ({
|
|
10455
|
+
ptr: value.ptr,
|
|
10456
|
+
len: value.len
|
|
10457
|
+
})
|
|
10458
|
+
});
|
|
10314
10459
|
|
|
10315
10460
|
// src/zig.ts
|
|
10316
10461
|
var module = await import(`@opentui/core-${process.platform}-${process.arch}/index.ts`);
|
|
@@ -10357,9 +10502,24 @@ registerEnvVar({
|
|
|
10357
10502
|
type: "boolean",
|
|
10358
10503
|
default: false
|
|
10359
10504
|
});
|
|
10505
|
+
var CURSOR_STYLE_TO_ID = { block: 0, line: 1, underline: 2 };
|
|
10506
|
+
var CURSOR_ID_TO_STYLE = ["block", "line", "underline"];
|
|
10507
|
+
var MOUSE_STYLE_TO_ID = { default: 0, pointer: 1, text: 2, crosshair: 3, move: 4, "not-allowed": 5 };
|
|
10360
10508
|
var globalTraceSymbols = null;
|
|
10361
10509
|
var globalFFILogWriter = null;
|
|
10362
10510
|
var exitHandlerRegistered = false;
|
|
10511
|
+
function toPointer(value) {
|
|
10512
|
+
if (typeof value === "bigint") {
|
|
10513
|
+
if (value > BigInt(Number.MAX_SAFE_INTEGER)) {
|
|
10514
|
+
throw new Error("Pointer exceeds safe integer range");
|
|
10515
|
+
}
|
|
10516
|
+
return Number(value);
|
|
10517
|
+
}
|
|
10518
|
+
return value;
|
|
10519
|
+
}
|
|
10520
|
+
function toNumber(value) {
|
|
10521
|
+
return typeof value === "bigint" ? Number(value) : value;
|
|
10522
|
+
}
|
|
10363
10523
|
function getOpenTUILib(libPath) {
|
|
10364
10524
|
const resolvedLibPath = libPath || targetLibPath;
|
|
10365
10525
|
const rawSymbols = dlopen(resolvedLibPath, {
|
|
@@ -10519,10 +10679,6 @@ function getOpenTUILib(libPath) {
|
|
|
10519
10679
|
args: ["ptr", "i32", "i32", "bool"],
|
|
10520
10680
|
returns: "void"
|
|
10521
10681
|
},
|
|
10522
|
-
setCursorStyle: {
|
|
10523
|
-
args: ["ptr", "ptr", "u32", "bool"],
|
|
10524
|
-
returns: "void"
|
|
10525
|
-
},
|
|
10526
10682
|
setCursorColor: {
|
|
10527
10683
|
args: ["ptr", "ptr"],
|
|
10528
10684
|
returns: "void"
|
|
@@ -10531,6 +10687,10 @@ function getOpenTUILib(libPath) {
|
|
|
10531
10687
|
args: ["ptr", "ptr"],
|
|
10532
10688
|
returns: "void"
|
|
10533
10689
|
},
|
|
10690
|
+
setCursorStyleOptions: {
|
|
10691
|
+
args: ["ptr", "ptr"],
|
|
10692
|
+
returns: "void"
|
|
10693
|
+
},
|
|
10534
10694
|
setDebugOverlay: {
|
|
10535
10695
|
args: ["ptr", "bool", "u8"],
|
|
10536
10696
|
returns: "void"
|
|
@@ -11258,6 +11418,54 @@ function getOpenTUILib(libPath) {
|
|
|
11258
11418
|
bufferDrawChar: {
|
|
11259
11419
|
args: ["ptr", "u32", "u32", "u32", "ptr", "ptr", "u32"],
|
|
11260
11420
|
returns: "void"
|
|
11421
|
+
},
|
|
11422
|
+
createNativeSpanFeed: {
|
|
11423
|
+
args: ["ptr"],
|
|
11424
|
+
returns: "ptr"
|
|
11425
|
+
},
|
|
11426
|
+
attachNativeSpanFeed: {
|
|
11427
|
+
args: ["ptr"],
|
|
11428
|
+
returns: "i32"
|
|
11429
|
+
},
|
|
11430
|
+
destroyNativeSpanFeed: {
|
|
11431
|
+
args: ["ptr"],
|
|
11432
|
+
returns: "void"
|
|
11433
|
+
},
|
|
11434
|
+
streamWrite: {
|
|
11435
|
+
args: ["ptr", "ptr", "u64"],
|
|
11436
|
+
returns: "i32"
|
|
11437
|
+
},
|
|
11438
|
+
streamCommit: {
|
|
11439
|
+
args: ["ptr"],
|
|
11440
|
+
returns: "i32"
|
|
11441
|
+
},
|
|
11442
|
+
streamDrainSpans: {
|
|
11443
|
+
args: ["ptr", "ptr", "u32"],
|
|
11444
|
+
returns: "u32"
|
|
11445
|
+
},
|
|
11446
|
+
streamClose: {
|
|
11447
|
+
args: ["ptr"],
|
|
11448
|
+
returns: "i32"
|
|
11449
|
+
},
|
|
11450
|
+
streamReserve: {
|
|
11451
|
+
args: ["ptr", "u32", "ptr"],
|
|
11452
|
+
returns: "i32"
|
|
11453
|
+
},
|
|
11454
|
+
streamCommitReserved: {
|
|
11455
|
+
args: ["ptr", "u32"],
|
|
11456
|
+
returns: "i32"
|
|
11457
|
+
},
|
|
11458
|
+
streamSetOptions: {
|
|
11459
|
+
args: ["ptr", "ptr"],
|
|
11460
|
+
returns: "i32"
|
|
11461
|
+
},
|
|
11462
|
+
streamGetStats: {
|
|
11463
|
+
args: ["ptr", "ptr"],
|
|
11464
|
+
returns: "i32"
|
|
11465
|
+
},
|
|
11466
|
+
streamSetCallback: {
|
|
11467
|
+
args: ["ptr", "ptr"],
|
|
11468
|
+
returns: "void"
|
|
11261
11469
|
}
|
|
11262
11470
|
});
|
|
11263
11471
|
if (env.OTUI_DEBUG_FFI || env.OTUI_TRACE_FFI) {
|
|
@@ -11423,6 +11631,8 @@ class FFIRenderLib {
|
|
|
11423
11631
|
eventCallbackWrapper;
|
|
11424
11632
|
_nativeEvents = new EventEmitter5;
|
|
11425
11633
|
_anyEventHandlers = [];
|
|
11634
|
+
nativeSpanFeedCallbackWrapper = null;
|
|
11635
|
+
nativeSpanFeedHandlers = new Map;
|
|
11426
11636
|
constructor(libPath) {
|
|
11427
11637
|
this.opentui = getOpenTUILib(libPath);
|
|
11428
11638
|
this.setupLogging();
|
|
@@ -11512,6 +11722,25 @@ class FFIRenderLib {
|
|
|
11512
11722
|
}
|
|
11513
11723
|
this.setEventCallback(eventCallback.ptr);
|
|
11514
11724
|
}
|
|
11725
|
+
ensureNativeSpanFeedCallback() {
|
|
11726
|
+
if (this.nativeSpanFeedCallbackWrapper) {
|
|
11727
|
+
return this.nativeSpanFeedCallbackWrapper;
|
|
11728
|
+
}
|
|
11729
|
+
const callback = new JSCallback((streamPtr, eventId, arg0, arg1) => {
|
|
11730
|
+
const handler = this.nativeSpanFeedHandlers.get(toPointer(streamPtr));
|
|
11731
|
+
if (handler) {
|
|
11732
|
+
handler(eventId, arg0, arg1);
|
|
11733
|
+
}
|
|
11734
|
+
}, {
|
|
11735
|
+
args: ["ptr", "u32", "ptr", "u64"],
|
|
11736
|
+
returns: "void"
|
|
11737
|
+
});
|
|
11738
|
+
this.nativeSpanFeedCallbackWrapper = callback;
|
|
11739
|
+
if (!callback.ptr) {
|
|
11740
|
+
throw new Error("Failed to create native span feed callback");
|
|
11741
|
+
}
|
|
11742
|
+
return callback;
|
|
11743
|
+
}
|
|
11515
11744
|
setEventCallback(callbackPtr) {
|
|
11516
11745
|
this.opentui.symbols.setEventCallback(callbackPtr);
|
|
11517
11746
|
}
|
|
@@ -11679,10 +11908,6 @@ class FFIRenderLib {
|
|
|
11679
11908
|
setCursorPosition(renderer, x, y, visible) {
|
|
11680
11909
|
this.opentui.symbols.setCursorPosition(renderer, x, y, visible);
|
|
11681
11910
|
}
|
|
11682
|
-
setCursorStyle(renderer, style, blinking) {
|
|
11683
|
-
const stylePtr = this.encoder.encode(style);
|
|
11684
|
-
this.opentui.symbols.setCursorStyle(renderer, stylePtr, style.length, blinking);
|
|
11685
|
-
}
|
|
11686
11911
|
setCursorColor(renderer, color) {
|
|
11687
11912
|
this.opentui.symbols.setCursorColor(renderer, color.buffer);
|
|
11688
11913
|
}
|
|
@@ -11690,20 +11915,22 @@ class FFIRenderLib {
|
|
|
11690
11915
|
const cursorBuffer = new ArrayBuffer(CursorStateStruct.size);
|
|
11691
11916
|
this.opentui.symbols.getCursorState(renderer, ptr4(cursorBuffer));
|
|
11692
11917
|
const struct = CursorStateStruct.unpack(cursorBuffer);
|
|
11693
|
-
const styleMap = {
|
|
11694
|
-
0: "block",
|
|
11695
|
-
1: "line",
|
|
11696
|
-
2: "underline"
|
|
11697
|
-
};
|
|
11698
11918
|
return {
|
|
11699
11919
|
x: struct.x,
|
|
11700
11920
|
y: struct.y,
|
|
11701
11921
|
visible: struct.visible,
|
|
11702
|
-
style:
|
|
11922
|
+
style: CURSOR_ID_TO_STYLE[struct.style] ?? "block",
|
|
11703
11923
|
blinking: struct.blinking,
|
|
11704
11924
|
color: RGBA.fromValues(struct.r, struct.g, struct.b, struct.a)
|
|
11705
11925
|
};
|
|
11706
11926
|
}
|
|
11927
|
+
setCursorStyleOptions(renderer, options) {
|
|
11928
|
+
const style = options.style != null ? CURSOR_STYLE_TO_ID[options.style] : 255;
|
|
11929
|
+
const blinking = options.blinking != null ? options.blinking ? 1 : 0 : 255;
|
|
11930
|
+
const cursor = options.cursor != null ? MOUSE_STYLE_TO_ID[options.cursor] : 255;
|
|
11931
|
+
const buffer = CursorStyleOptionsStruct.pack({ style, blinking, color: options.color, cursor });
|
|
11932
|
+
this.opentui.symbols.setCursorStyleOptions(renderer, ptr4(buffer));
|
|
11933
|
+
}
|
|
11707
11934
|
render(renderer, force) {
|
|
11708
11935
|
this.opentui.symbols.render(renderer, force);
|
|
11709
11936
|
}
|
|
@@ -12543,6 +12770,73 @@ class FFIRenderLib {
|
|
|
12543
12770
|
bufferDrawChar(buffer, char, x, y, fg2, bg2, attributes = 0) {
|
|
12544
12771
|
this.opentui.symbols.bufferDrawChar(buffer, char, x, y, fg2.buffer, bg2.buffer, attributes);
|
|
12545
12772
|
}
|
|
12773
|
+
registerNativeSpanFeedStream(stream, handler) {
|
|
12774
|
+
const callback = this.ensureNativeSpanFeedCallback();
|
|
12775
|
+
this.nativeSpanFeedHandlers.set(toPointer(stream), handler);
|
|
12776
|
+
this.opentui.symbols.streamSetCallback(stream, callback.ptr);
|
|
12777
|
+
}
|
|
12778
|
+
unregisterNativeSpanFeedStream(stream) {
|
|
12779
|
+
this.opentui.symbols.streamSetCallback(stream, null);
|
|
12780
|
+
this.nativeSpanFeedHandlers.delete(toPointer(stream));
|
|
12781
|
+
}
|
|
12782
|
+
createNativeSpanFeed(options) {
|
|
12783
|
+
const optionsBuffer = options == null ? null : NativeSpanFeedOptionsStruct.pack(options);
|
|
12784
|
+
const streamPtr = this.opentui.symbols.createNativeSpanFeed(optionsBuffer ? ptr4(optionsBuffer) : null);
|
|
12785
|
+
if (!streamPtr) {
|
|
12786
|
+
throw new Error("Failed to create stream");
|
|
12787
|
+
}
|
|
12788
|
+
return toPointer(streamPtr);
|
|
12789
|
+
}
|
|
12790
|
+
attachNativeSpanFeed(stream) {
|
|
12791
|
+
return this.opentui.symbols.attachNativeSpanFeed(stream);
|
|
12792
|
+
}
|
|
12793
|
+
destroyNativeSpanFeed(stream) {
|
|
12794
|
+
this.opentui.symbols.destroyNativeSpanFeed(stream);
|
|
12795
|
+
this.nativeSpanFeedHandlers.delete(toPointer(stream));
|
|
12796
|
+
}
|
|
12797
|
+
streamWrite(stream, data) {
|
|
12798
|
+
const bytes = typeof data === "string" ? this.encoder.encode(data) : data;
|
|
12799
|
+
return this.opentui.symbols.streamWrite(stream, ptr4(bytes), bytes.length);
|
|
12800
|
+
}
|
|
12801
|
+
streamCommit(stream) {
|
|
12802
|
+
return this.opentui.symbols.streamCommit(stream);
|
|
12803
|
+
}
|
|
12804
|
+
streamDrainSpans(stream, outBuffer, maxSpans) {
|
|
12805
|
+
const count = this.opentui.symbols.streamDrainSpans(stream, ptr4(outBuffer), maxSpans);
|
|
12806
|
+
return toNumber(count);
|
|
12807
|
+
}
|
|
12808
|
+
streamClose(stream) {
|
|
12809
|
+
return this.opentui.symbols.streamClose(stream);
|
|
12810
|
+
}
|
|
12811
|
+
streamSetOptions(stream, options) {
|
|
12812
|
+
const optionsBuffer = NativeSpanFeedOptionsStruct.pack(options);
|
|
12813
|
+
return this.opentui.symbols.streamSetOptions(stream, ptr4(optionsBuffer));
|
|
12814
|
+
}
|
|
12815
|
+
streamGetStats(stream) {
|
|
12816
|
+
const statsBuffer = new ArrayBuffer(NativeSpanFeedStatsStruct.size);
|
|
12817
|
+
const status = this.opentui.symbols.streamGetStats(stream, ptr4(statsBuffer));
|
|
12818
|
+
if (status !== 0) {
|
|
12819
|
+
return null;
|
|
12820
|
+
}
|
|
12821
|
+
const stats = NativeSpanFeedStatsStruct.unpack(statsBuffer);
|
|
12822
|
+
return {
|
|
12823
|
+
bytesWritten: typeof stats.bytesWritten === "bigint" ? stats.bytesWritten : BigInt(stats.bytesWritten),
|
|
12824
|
+
spansCommitted: typeof stats.spansCommitted === "bigint" ? stats.spansCommitted : BigInt(stats.spansCommitted),
|
|
12825
|
+
chunks: stats.chunks,
|
|
12826
|
+
pendingSpans: stats.pendingSpans
|
|
12827
|
+
};
|
|
12828
|
+
}
|
|
12829
|
+
streamReserve(stream, minLen) {
|
|
12830
|
+
const reserveBuffer = new ArrayBuffer(ReserveInfoStruct.size);
|
|
12831
|
+
const status = this.opentui.symbols.streamReserve(stream, minLen, ptr4(reserveBuffer));
|
|
12832
|
+
if (status !== 0) {
|
|
12833
|
+
return { status, info: null };
|
|
12834
|
+
}
|
|
12835
|
+
return { status, info: ReserveInfoStruct.unpack(reserveBuffer) };
|
|
12836
|
+
}
|
|
12837
|
+
streamCommitReserved(stream, length) {
|
|
12838
|
+
return this.opentui.symbols.streamCommitReserved(stream, length);
|
|
12839
|
+
}
|
|
12546
12840
|
createSyntaxStyle() {
|
|
12547
12841
|
const stylePtr = this.opentui.symbols.createSyntaxStyle();
|
|
12548
12842
|
if (!stylePtr) {
|
|
@@ -15822,6 +16116,7 @@ class CliRenderer extends EventEmitter9 {
|
|
|
15822
16116
|
_latestPointer = { x: 0, y: 0 };
|
|
15823
16117
|
_hasPointer = false;
|
|
15824
16118
|
_lastPointerModifiers = { shift: false, alt: false, ctrl: false };
|
|
16119
|
+
_currentMousePointerStyle = undefined;
|
|
15825
16120
|
_currentFocusedRenderable = null;
|
|
15826
16121
|
lifecyclePasses = new Set;
|
|
15827
16122
|
_openConsoleOnError = true;
|
|
@@ -16406,125 +16701,135 @@ Captured output:
|
|
|
16406
16701
|
return event;
|
|
16407
16702
|
}
|
|
16408
16703
|
handleMouseData(data) {
|
|
16409
|
-
const
|
|
16410
|
-
if (
|
|
16411
|
-
|
|
16412
|
-
|
|
16413
|
-
|
|
16414
|
-
|
|
16415
|
-
|
|
16416
|
-
}
|
|
16417
|
-
this._latestPointer.x = mouseEvent.x;
|
|
16418
|
-
this._latestPointer.y = mouseEvent.y;
|
|
16419
|
-
this._hasPointer = true;
|
|
16420
|
-
this._lastPointerModifiers = mouseEvent.modifiers;
|
|
16421
|
-
if (this._console.visible) {
|
|
16422
|
-
const consoleBounds = this._console.bounds;
|
|
16423
|
-
if (mouseEvent.x >= consoleBounds.x && mouseEvent.x < consoleBounds.x + consoleBounds.width && mouseEvent.y >= consoleBounds.y && mouseEvent.y < consoleBounds.y + consoleBounds.height) {
|
|
16424
|
-
const event2 = new MouseEvent(null, mouseEvent);
|
|
16425
|
-
const handled = this._console.handleMouse(event2);
|
|
16426
|
-
if (handled)
|
|
16427
|
-
return true;
|
|
16428
|
-
}
|
|
16704
|
+
const mouseEvents = this.mouseParser.parseAllMouseEvents(data);
|
|
16705
|
+
if (mouseEvents.length === 0)
|
|
16706
|
+
return false;
|
|
16707
|
+
let anyHandled = false;
|
|
16708
|
+
for (const mouseEvent of mouseEvents) {
|
|
16709
|
+
if (this.processSingleMouseEvent(mouseEvent)) {
|
|
16710
|
+
anyHandled = true;
|
|
16429
16711
|
}
|
|
16430
|
-
|
|
16431
|
-
|
|
16432
|
-
|
|
16433
|
-
|
|
16434
|
-
|
|
16435
|
-
|
|
16436
|
-
|
|
16437
|
-
return true;
|
|
16712
|
+
}
|
|
16713
|
+
return anyHandled;
|
|
16714
|
+
}
|
|
16715
|
+
processSingleMouseEvent(mouseEvent) {
|
|
16716
|
+
if (this._splitHeight > 0) {
|
|
16717
|
+
if (mouseEvent.y < this.renderOffset) {
|
|
16718
|
+
return false;
|
|
16438
16719
|
}
|
|
16439
|
-
|
|
16440
|
-
|
|
16441
|
-
|
|
16442
|
-
|
|
16443
|
-
|
|
16444
|
-
|
|
16445
|
-
|
|
16446
|
-
|
|
16720
|
+
mouseEvent.y -= this.renderOffset;
|
|
16721
|
+
}
|
|
16722
|
+
this._latestPointer.x = mouseEvent.x;
|
|
16723
|
+
this._latestPointer.y = mouseEvent.y;
|
|
16724
|
+
this._hasPointer = true;
|
|
16725
|
+
this._lastPointerModifiers = mouseEvent.modifiers;
|
|
16726
|
+
if (this._console.visible) {
|
|
16727
|
+
const consoleBounds = this._console.bounds;
|
|
16728
|
+
if (mouseEvent.x >= consoleBounds.x && mouseEvent.x < consoleBounds.x + consoleBounds.width && mouseEvent.y >= consoleBounds.y && mouseEvent.y < consoleBounds.y + consoleBounds.height) {
|
|
16729
|
+
const event2 = new MouseEvent(null, mouseEvent);
|
|
16730
|
+
const handled = this._console.handleMouse(event2);
|
|
16731
|
+
if (handled)
|
|
16447
16732
|
return true;
|
|
16448
|
-
}
|
|
16449
16733
|
}
|
|
16450
|
-
|
|
16451
|
-
|
|
16452
|
-
|
|
16453
|
-
|
|
16454
|
-
|
|
16455
|
-
|
|
16456
|
-
|
|
16734
|
+
}
|
|
16735
|
+
if (mouseEvent.type === "scroll") {
|
|
16736
|
+
const maybeRenderableId2 = this.hitTest(mouseEvent.x, mouseEvent.y);
|
|
16737
|
+
const maybeRenderable2 = Renderable.renderablesByNumber.get(maybeRenderableId2);
|
|
16738
|
+
const fallbackTarget = this._currentFocusedRenderable && !this._currentFocusedRenderable.isDestroyed && this._currentFocusedRenderable.focused ? this._currentFocusedRenderable : null;
|
|
16739
|
+
const scrollTarget = maybeRenderable2 ?? fallbackTarget;
|
|
16740
|
+
if (scrollTarget) {
|
|
16741
|
+
const event2 = new MouseEvent(scrollTarget, mouseEvent);
|
|
16742
|
+
scrollTarget.processMouseEvent(event2);
|
|
16457
16743
|
}
|
|
16458
|
-
|
|
16459
|
-
|
|
16460
|
-
|
|
16461
|
-
|
|
16462
|
-
|
|
16463
|
-
|
|
16744
|
+
return true;
|
|
16745
|
+
}
|
|
16746
|
+
const maybeRenderableId = this.hitTest(mouseEvent.x, mouseEvent.y);
|
|
16747
|
+
const sameElement = maybeRenderableId === this.lastOverRenderableNum;
|
|
16748
|
+
this.lastOverRenderableNum = maybeRenderableId;
|
|
16749
|
+
const maybeRenderable = Renderable.renderablesByNumber.get(maybeRenderableId);
|
|
16750
|
+
if (mouseEvent.type === "down" && mouseEvent.button === 0 /* LEFT */ && !this.currentSelection?.isDragging && !mouseEvent.modifiers.ctrl) {
|
|
16751
|
+
if (maybeRenderable && maybeRenderable.selectable && !maybeRenderable.isDestroyed && maybeRenderable.shouldStartSelection(mouseEvent.x, mouseEvent.y)) {
|
|
16752
|
+
this.startSelection(maybeRenderable, mouseEvent.x, mouseEvent.y);
|
|
16753
|
+
this.dispatchMouseEvent(maybeRenderable, mouseEvent);
|
|
16464
16754
|
return true;
|
|
16465
16755
|
}
|
|
16466
|
-
|
|
16467
|
-
|
|
16468
|
-
|
|
16469
|
-
|
|
16470
|
-
|
|
16471
|
-
|
|
16756
|
+
}
|
|
16757
|
+
if (mouseEvent.type === "drag" && this.currentSelection?.isDragging) {
|
|
16758
|
+
this.updateSelection(maybeRenderable, mouseEvent.x, mouseEvent.y);
|
|
16759
|
+
if (maybeRenderable) {
|
|
16760
|
+
const event2 = new MouseEvent(maybeRenderable, { ...mouseEvent, isDragging: true });
|
|
16761
|
+
maybeRenderable.processMouseEvent(event2);
|
|
16472
16762
|
}
|
|
16473
|
-
|
|
16474
|
-
|
|
16475
|
-
|
|
16476
|
-
|
|
16477
|
-
}
|
|
16478
|
-
|
|
16479
|
-
if (maybeRenderable) {
|
|
16480
|
-
const event2 = new MouseEvent(maybeRenderable, {
|
|
16481
|
-
...mouseEvent,
|
|
16482
|
-
type: "over",
|
|
16483
|
-
source: this.capturedRenderable
|
|
16484
|
-
});
|
|
16485
|
-
maybeRenderable.processMouseEvent(event2);
|
|
16486
|
-
}
|
|
16763
|
+
return true;
|
|
16764
|
+
}
|
|
16765
|
+
if (mouseEvent.type === "up" && this.currentSelection?.isDragging) {
|
|
16766
|
+
if (maybeRenderable) {
|
|
16767
|
+
const event2 = new MouseEvent(maybeRenderable, { ...mouseEvent, isDragging: true });
|
|
16768
|
+
maybeRenderable.processMouseEvent(event2);
|
|
16487
16769
|
}
|
|
16488
|
-
|
|
16489
|
-
|
|
16490
|
-
|
|
16770
|
+
this.finishSelection();
|
|
16771
|
+
return true;
|
|
16772
|
+
}
|
|
16773
|
+
if (mouseEvent.type === "down" && mouseEvent.button === 0 /* LEFT */ && this.currentSelection) {
|
|
16774
|
+
if (mouseEvent.modifiers.ctrl) {
|
|
16775
|
+
this.currentSelection.isDragging = true;
|
|
16776
|
+
this.updateSelection(maybeRenderable, mouseEvent.x, mouseEvent.y);
|
|
16491
16777
|
return true;
|
|
16492
16778
|
}
|
|
16493
|
-
|
|
16494
|
-
|
|
16495
|
-
|
|
16496
|
-
|
|
16497
|
-
|
|
16498
|
-
const event3 = new MouseEvent(maybeRenderable, {
|
|
16499
|
-
...mouseEvent,
|
|
16500
|
-
type: "drop",
|
|
16501
|
-
source: this.capturedRenderable
|
|
16502
|
-
});
|
|
16503
|
-
maybeRenderable.processMouseEvent(event3);
|
|
16504
|
-
}
|
|
16505
|
-
this.lastOverRenderable = this.capturedRenderable;
|
|
16506
|
-
this.lastOverRenderableNum = this.capturedRenderable.num;
|
|
16507
|
-
this.setCapturedRenderable(undefined);
|
|
16508
|
-
this.requestRender();
|
|
16779
|
+
}
|
|
16780
|
+
if (!sameElement && (mouseEvent.type === "drag" || mouseEvent.type === "move")) {
|
|
16781
|
+
if (this.lastOverRenderable && this.lastOverRenderable !== this.capturedRenderable) {
|
|
16782
|
+
const event2 = new MouseEvent(this.lastOverRenderable, { ...mouseEvent, type: "out" });
|
|
16783
|
+
this.lastOverRenderable.processMouseEvent(event2);
|
|
16509
16784
|
}
|
|
16510
|
-
|
|
16785
|
+
this.lastOverRenderable = maybeRenderable;
|
|
16511
16786
|
if (maybeRenderable) {
|
|
16512
|
-
|
|
16513
|
-
|
|
16514
|
-
|
|
16515
|
-
this.
|
|
16516
|
-
}
|
|
16517
|
-
|
|
16787
|
+
const event2 = new MouseEvent(maybeRenderable, {
|
|
16788
|
+
...mouseEvent,
|
|
16789
|
+
type: "over",
|
|
16790
|
+
source: this.capturedRenderable
|
|
16791
|
+
});
|
|
16792
|
+
maybeRenderable.processMouseEvent(event2);
|
|
16793
|
+
}
|
|
16794
|
+
}
|
|
16795
|
+
if (this.capturedRenderable && mouseEvent.type !== "up") {
|
|
16796
|
+
const event2 = new MouseEvent(this.capturedRenderable, mouseEvent);
|
|
16797
|
+
this.capturedRenderable.processMouseEvent(event2);
|
|
16798
|
+
return true;
|
|
16799
|
+
}
|
|
16800
|
+
if (this.capturedRenderable && mouseEvent.type === "up") {
|
|
16801
|
+
const event2 = new MouseEvent(this.capturedRenderable, { ...mouseEvent, type: "drag-end" });
|
|
16802
|
+
this.capturedRenderable.processMouseEvent(event2);
|
|
16803
|
+
this.capturedRenderable.processMouseEvent(new MouseEvent(this.capturedRenderable, mouseEvent));
|
|
16804
|
+
if (maybeRenderable) {
|
|
16805
|
+
const event3 = new MouseEvent(maybeRenderable, {
|
|
16806
|
+
...mouseEvent,
|
|
16807
|
+
type: "drop",
|
|
16808
|
+
source: this.capturedRenderable
|
|
16809
|
+
});
|
|
16810
|
+
maybeRenderable.processMouseEvent(event3);
|
|
16811
|
+
}
|
|
16812
|
+
this.lastOverRenderable = this.capturedRenderable;
|
|
16813
|
+
this.lastOverRenderableNum = this.capturedRenderable.num;
|
|
16814
|
+
this.setCapturedRenderable(undefined);
|
|
16815
|
+
this.requestRender();
|
|
16816
|
+
}
|
|
16817
|
+
let event;
|
|
16818
|
+
if (maybeRenderable) {
|
|
16819
|
+
if (mouseEvent.type === "drag" && mouseEvent.button === 0 /* LEFT */) {
|
|
16820
|
+
this.setCapturedRenderable(maybeRenderable);
|
|
16518
16821
|
} else {
|
|
16519
16822
|
this.setCapturedRenderable(undefined);
|
|
16520
|
-
this.lastOverRenderable = undefined;
|
|
16521
16823
|
}
|
|
16522
|
-
|
|
16523
|
-
|
|
16524
|
-
|
|
16525
|
-
|
|
16824
|
+
event = this.dispatchMouseEvent(maybeRenderable, mouseEvent);
|
|
16825
|
+
} else {
|
|
16826
|
+
this.setCapturedRenderable(undefined);
|
|
16827
|
+
this.lastOverRenderable = undefined;
|
|
16526
16828
|
}
|
|
16527
|
-
|
|
16829
|
+
if (!event?.defaultPrevented && mouseEvent.type === "down" && this.currentSelection) {
|
|
16830
|
+
this.clearSelection();
|
|
16831
|
+
}
|
|
16832
|
+
return true;
|
|
16528
16833
|
}
|
|
16529
16834
|
recheckHoverState() {
|
|
16530
16835
|
if (this._isDestroyed || !this._hasPointer)
|
|
@@ -16559,6 +16864,10 @@ Captured output:
|
|
|
16559
16864
|
hitRenderable.processMouseEvent(event);
|
|
16560
16865
|
}
|
|
16561
16866
|
}
|
|
16867
|
+
setMousePointer(style) {
|
|
16868
|
+
this._currentMousePointerStyle = style;
|
|
16869
|
+
this.lib.setCursorStyleOptions(this.rendererPtr, { cursor: style });
|
|
16870
|
+
}
|
|
16562
16871
|
hitTest(x, y) {
|
|
16563
16872
|
return this.lib.checkHit(this.rendererPtr, x, y);
|
|
16564
16873
|
}
|
|
@@ -16701,11 +17010,11 @@ Captured output:
|
|
|
16701
17010
|
const lib = resolveRenderLib();
|
|
16702
17011
|
lib.setCursorPosition(renderer.rendererPtr, x, y, visible);
|
|
16703
17012
|
}
|
|
16704
|
-
static setCursorStyle(renderer,
|
|
17013
|
+
static setCursorStyle(renderer, options) {
|
|
16705
17014
|
const lib = resolveRenderLib();
|
|
16706
|
-
lib.
|
|
16707
|
-
if (
|
|
16708
|
-
|
|
17015
|
+
lib.setCursorStyleOptions(renderer.rendererPtr, options);
|
|
17016
|
+
if (options.cursor !== undefined) {
|
|
17017
|
+
renderer._currentMousePointerStyle = options.cursor;
|
|
16709
17018
|
}
|
|
16710
17019
|
}
|
|
16711
17020
|
static setCursorColor(renderer, color) {
|
|
@@ -16715,10 +17024,10 @@ Captured output:
|
|
|
16715
17024
|
setCursorPosition(x, y, visible = true) {
|
|
16716
17025
|
this.lib.setCursorPosition(this.rendererPtr, x, y, visible);
|
|
16717
17026
|
}
|
|
16718
|
-
setCursorStyle(
|
|
16719
|
-
this.lib.
|
|
16720
|
-
if (
|
|
16721
|
-
this.
|
|
17027
|
+
setCursorStyle(options) {
|
|
17028
|
+
this.lib.setCursorStyleOptions(this.rendererPtr, options);
|
|
17029
|
+
if (options.cursor !== undefined) {
|
|
17030
|
+
this._currentMousePointerStyle = options.cursor;
|
|
16722
17031
|
}
|
|
16723
17032
|
}
|
|
16724
17033
|
setCursorColor(color) {
|
|
@@ -17193,7 +17502,7 @@ Captured output:
|
|
|
17193
17502
|
}
|
|
17194
17503
|
}
|
|
17195
17504
|
|
|
17196
|
-
export { __toESM, __commonJS, __export, __require, Edge, Gutter, MeasureMode, exports_src, isValidBorderStyle, parseBorderStyle, BorderChars, getBorderFromSides, getBorderSides, borderCharsToArray, BorderCharArrays, nonAlphanumericKeys, parseKeypress, KeyEvent, PasteEvent, KeyHandler, InternalKeyHandler, RGBA, hexToRgb, rgbToHex, hsvToRgb, parseColor, fonts, measureText, getCharacterPositions, coordinateToCharacterIndex, renderFontToFrameBuffer, TextAttributes, ATTRIBUTE_BASE_BITS, ATTRIBUTE_BASE_MASK, getBaseAttributes, DebugOverlayCorner, createTextAttributes, attributesWithLink, getLinkId, visualizeRenderableTree, isStyledText, StyledText, stringToStyledText, black, red, green, yellow, blue, magenta, cyan, white, brightBlack, brightRed, brightGreen, brightYellow, brightBlue, brightMagenta, brightCyan, brightWhite, bgBlack, bgRed, bgGreen, bgYellow, bgBlue, bgMagenta, bgCyan, bgWhite, bold, italic, underline, strikethrough, dim, reverse, blink, fg, bg, link, t, hastToStyledText, LinearScrollAccel, MacOSScrollAccel, StdinBuffer, parseAlign, parseAlignItems, parseBoxSizing, parseDimension, parseDirection, parseDisplay, parseEdge, parseFlexDirection, parseGutter, parseJustify, parseLogLevel, parseMeasureMode, parseOverflow, parsePositionType, parseUnit, parseWrap, MouseParser, Selection, convertGlobalToLocalSelection, ASCIIFontSelectionHelper, envRegistry, registerEnvVar, clearEnvCache, generateEnvMarkdown, generateEnvColored, env, treeSitterToTextChunks, treeSitterToStyledText, addDefaultParsers, TreeSitterClient, DataPathsManager, getDataPaths, extToFiletype, pathToFiletype, main, getTreeSitterClient, ExtmarksController, createExtmarksController, TerminalPalette, createTerminalPalette, TextBuffer, LogLevel2 as LogLevel, setRenderLibPath, resolveRenderLib, OptimizedBuffer, h, isVNode, maybeMakeRenderable, wrapWithDelegates, instantiate, delegate, isValidPercentage, LayoutEvents, RenderableEvents, isRenderable, BaseRenderable, Renderable, RootRenderable, ANSI, defaultKeyAliases, mergeKeyAliases, mergeKeyBindings, getKeyBindingKey, buildKeyBindingsMap, capture, ConsolePosition, TerminalConsole, getObjectsInViewport, buildKittyKeyboardFlags, MouseEvent, MouseButton, createCliRenderer, CliRenderEvents, RendererControlState, CliRenderer };
|
|
17505
|
+
export { __toESM, __commonJS, __export, __require, Edge, Gutter, MeasureMode, exports_src, isValidBorderStyle, parseBorderStyle, BorderChars, getBorderFromSides, getBorderSides, borderCharsToArray, BorderCharArrays, nonAlphanumericKeys, parseKeypress, KeyEvent, PasteEvent, KeyHandler, InternalKeyHandler, RGBA, hexToRgb, rgbToHex, hsvToRgb, parseColor, fonts, measureText, getCharacterPositions, coordinateToCharacterIndex, renderFontToFrameBuffer, TextAttributes, ATTRIBUTE_BASE_BITS, ATTRIBUTE_BASE_MASK, getBaseAttributes, DebugOverlayCorner, createTextAttributes, attributesWithLink, getLinkId, visualizeRenderableTree, isStyledText, StyledText, stringToStyledText, black, red, green, yellow, blue, magenta, cyan, white, brightBlack, brightRed, brightGreen, brightYellow, brightBlue, brightMagenta, brightCyan, brightWhite, bgBlack, bgRed, bgGreen, bgYellow, bgBlue, bgMagenta, bgCyan, bgWhite, bold, italic, underline, strikethrough, dim, reverse, blink, fg, bg, link, t, hastToStyledText, LinearScrollAccel, MacOSScrollAccel, StdinBuffer, parseAlign, parseAlignItems, parseBoxSizing, parseDimension, parseDirection, parseDisplay, parseEdge, parseFlexDirection, parseGutter, parseJustify, parseLogLevel, parseMeasureMode, parseOverflow, parsePositionType, parseUnit, parseWrap, MouseParser, Selection, convertGlobalToLocalSelection, ASCIIFontSelectionHelper, envRegistry, registerEnvVar, clearEnvCache, generateEnvMarkdown, generateEnvColored, env, treeSitterToTextChunks, treeSitterToStyledText, addDefaultParsers, TreeSitterClient, DataPathsManager, getDataPaths, extToFiletype, pathToFiletype, main, getTreeSitterClient, ExtmarksController, createExtmarksController, TerminalPalette, createTerminalPalette, TextBuffer, SpanInfoStruct, LogLevel2 as LogLevel, setRenderLibPath, resolveRenderLib, OptimizedBuffer, h, isVNode, maybeMakeRenderable, wrapWithDelegates, instantiate, delegate, isValidPercentage, LayoutEvents, RenderableEvents, isRenderable, BaseRenderable, Renderable, RootRenderable, ANSI, defaultKeyAliases, mergeKeyAliases, mergeKeyBindings, getKeyBindingKey, buildKeyBindingsMap, capture, ConsolePosition, TerminalConsole, getObjectsInViewport, buildKittyKeyboardFlags, MouseEvent, MouseButton, createCliRenderer, CliRenderEvents, RendererControlState, CliRenderer };
|
|
17197
17506
|
|
|
17198
|
-
//# debugId=
|
|
17199
|
-
//# sourceMappingURL=index-
|
|
17507
|
+
//# debugId=130B8D293012A10764756E2164756E21
|
|
17508
|
+
//# sourceMappingURL=index-vnvba6q9.js.map
|