@opentui/core 0.6.0 → 0.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/{chunk-bun-tsc14mt5.js → chunk-bun-b3p27aka.js} +28 -5
- package/chunk-bun-b3p27aka.js.map +35 -0
- package/{chunk-bun-s01c2jyn.js → chunk-bun-ehstr7d7.js} +24 -67
- package/{chunk-node-hjr2tm60.js.map → chunk-bun-ehstr7d7.js.map} +6 -6
- package/{chunk-node-hjr2tm60.js → chunk-node-fs50qdd7.js} +24 -67
- package/{chunk-bun-s01c2jyn.js.map → chunk-node-fs50qdd7.js.map} +6 -6
- package/{chunk-node-df90qrqc.js → chunk-node-jt82vcf9.js} +28 -5
- package/chunk-node-jt82vcf9.js.map +34 -0
- package/edit-buffer.d.ts +15 -0
- package/index.bun.js +41 -7
- package/index.bun.js.map +5 -5
- package/index.node.js +41 -7
- package/index.node.js.map +5 -5
- package/native-abi.generated.d.ts +8 -0
- package/package.json +10 -11
- package/platform/runtime.d.ts +0 -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 -0
- package/chunk-bun-tsc14mt5.js.map +0 -35
- package/chunk-node-df90qrqc.js.map +0 -34
package/index.node.js
CHANGED
|
@@ -109,7 +109,7 @@ import {
|
|
|
109
109
|
resolveRenderLib2,
|
|
110
110
|
MeasureMode2,
|
|
111
111
|
exports_yoga
|
|
112
|
-
} from "./chunk-node-
|
|
112
|
+
} from "./chunk-node-jt82vcf9.js";
|
|
113
113
|
import {
|
|
114
114
|
isValidBorderStyle2,
|
|
115
115
|
parseBorderStyle2,
|
|
@@ -202,6 +202,7 @@ import {
|
|
|
202
202
|
TextBuffer2,
|
|
203
203
|
TextBufferView2,
|
|
204
204
|
EditBuffer2,
|
|
205
|
+
measureEditText2,
|
|
205
206
|
EditorView2,
|
|
206
207
|
Timeline2,
|
|
207
208
|
engine2,
|
|
@@ -240,7 +241,7 @@ import {
|
|
|
240
241
|
CliRenderEvents2,
|
|
241
242
|
RendererControlState2,
|
|
242
243
|
CliRenderer2
|
|
243
|
-
} from "./chunk-node-
|
|
244
|
+
} from "./chunk-node-fs50qdd7.js";
|
|
244
245
|
// src/post/effects.ts
|
|
245
246
|
function toU8(value) {
|
|
246
247
|
return Math.round(Math.max(0, Math.min(1, Number.isFinite(value) ? value : 0)) * 255);
|
|
@@ -8166,9 +8167,42 @@ function physicalKey(key) {
|
|
|
8166
8167
|
return `Digit${name}`;
|
|
8167
8168
|
if (/^f([1-9]|1[0-9]|2[0-5])$/i.test(key.name))
|
|
8168
8169
|
return key.name.toUpperCase();
|
|
8170
|
+
if (/^kp[0-9]$/i.test(key.name))
|
|
8171
|
+
return `Numpad${key.name.slice(2)}`;
|
|
8169
8172
|
return {
|
|
8170
8173
|
backspace: "Backspace",
|
|
8171
8174
|
clear: "NumpadBegin",
|
|
8175
|
+
kpdecimal: "NumpadDecimal",
|
|
8176
|
+
kpdivide: "NumpadDivide",
|
|
8177
|
+
kpmultiply: "NumpadMultiply",
|
|
8178
|
+
kpminus: "NumpadSubtract",
|
|
8179
|
+
kpplus: "NumpadAdd",
|
|
8180
|
+
kpenter: "NumpadEnter",
|
|
8181
|
+
kpequal: "NumpadEqual",
|
|
8182
|
+
kpseparator: "NumpadSeparator",
|
|
8183
|
+
kpleft: "NumpadLeft",
|
|
8184
|
+
kpright: "NumpadRight",
|
|
8185
|
+
kpup: "NumpadUp",
|
|
8186
|
+
kpdown: "NumpadDown",
|
|
8187
|
+
kppageup: "NumpadPageUp",
|
|
8188
|
+
kppagedown: "NumpadPageDown",
|
|
8189
|
+
kphome: "NumpadHome",
|
|
8190
|
+
kpend: "NumpadEnd",
|
|
8191
|
+
kpinsert: "NumpadInsert",
|
|
8192
|
+
kpdelete: "NumpadDelete",
|
|
8193
|
+
capslock: "CapsLock",
|
|
8194
|
+
scrolllock: "ScrollLock",
|
|
8195
|
+
numlock: "NumLock",
|
|
8196
|
+
printscreen: "PrintScreen",
|
|
8197
|
+
pause: "Pause",
|
|
8198
|
+
leftshift: "ShiftLeft",
|
|
8199
|
+
leftctrl: "ControlLeft",
|
|
8200
|
+
leftalt: "AltLeft",
|
|
8201
|
+
leftsuper: "MetaLeft",
|
|
8202
|
+
rightshift: "ShiftRight",
|
|
8203
|
+
rightctrl: "ControlRight",
|
|
8204
|
+
rightalt: "AltRight",
|
|
8205
|
+
rightsuper: "MetaRight",
|
|
8172
8206
|
enter: "Enter",
|
|
8173
8207
|
return: "Enter",
|
|
8174
8208
|
space: "Space",
|
|
@@ -8223,7 +8257,6 @@ function mouseButton(event) {
|
|
|
8223
8257
|
}
|
|
8224
8258
|
// src/renderables/Textarea.ts
|
|
8225
8259
|
var unsupportedKeyCharacters = /[\x00-\x1f\x7f-\x9f]/;
|
|
8226
|
-
var unsupportedPasteCharacters = /[\x00-\x08\x0b\x0c\x0e-\x1f\x7f-\x9f]/g;
|
|
8227
8260
|
function clonePlaceholder(value) {
|
|
8228
8261
|
if (value === null || typeof value === "string")
|
|
8229
8262
|
return value;
|
|
@@ -8409,7 +8442,7 @@ class TextareaRenderable extends EditBufferRenderable2 {
|
|
|
8409
8442
|
]);
|
|
8410
8443
|
}
|
|
8411
8444
|
handlePaste(event) {
|
|
8412
|
-
this.insertText(stripAnsiSequences2(decodePasteBytes2(event.bytes))
|
|
8445
|
+
this.insertText(stripAnsiSequences2(decodePasteBytes2(event.bytes)));
|
|
8413
8446
|
}
|
|
8414
8447
|
handleKeyPress(key) {
|
|
8415
8448
|
if (this.traits.suspend !== true) {
|
|
@@ -8575,7 +8608,7 @@ class InputRenderable extends TextareaRenderable {
|
|
|
8575
8608
|
this._minLength = minLength;
|
|
8576
8609
|
this._lastCommittedValue = this.plainText;
|
|
8577
8610
|
if (initialValue) {
|
|
8578
|
-
this.cursorOffset =
|
|
8611
|
+
this.cursorOffset = this.editBuffer.getEOL().offset;
|
|
8579
8612
|
}
|
|
8580
8613
|
} catch (error) {
|
|
8581
8614
|
this.rollbackConstruction(error);
|
|
@@ -8607,7 +8640,7 @@ class InputRenderable extends TextareaRenderable {
|
|
|
8607
8640
|
if (currentValue !== newValue) {
|
|
8608
8641
|
this.runMutation(() => {
|
|
8609
8642
|
this.setText(newValue);
|
|
8610
|
-
this.cursorOffset =
|
|
8643
|
+
this.cursorOffset = this.editBuffer.getEOL().offset;
|
|
8611
8644
|
this.emit("input" /* INPUT */, newValue);
|
|
8612
8645
|
});
|
|
8613
8646
|
}
|
|
@@ -15348,6 +15381,7 @@ export {
|
|
|
15348
15381
|
link2 as link,
|
|
15349
15382
|
magenta2 as magenta,
|
|
15350
15383
|
maybeMakeRenderable2 as maybeMakeRenderable,
|
|
15384
|
+
measureEditText2 as measureEditText,
|
|
15351
15385
|
measureText2 as measureText,
|
|
15352
15386
|
nonAlphanumericKeys2 as nonAlphanumericKeys,
|
|
15353
15387
|
normalizeColorValue2 as normalizeColorValue,
|
|
@@ -15400,5 +15434,5 @@ export {
|
|
|
15400
15434
|
yellow2 as yellow
|
|
15401
15435
|
};
|
|
15402
15436
|
|
|
15403
|
-
//# debugId=
|
|
15437
|
+
//# debugId=2BCB6EA6471E32B364756E2164756E21
|
|
15404
15438
|
//# sourceMappingURL=index.node.js.map
|