@opentui/core 0.6.1 → 0.6.3
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/NativeSession.d.ts +3 -0
- package/{chunk-bun-wsqkxxm5.js → chunk-bun-e2gttx65.js} +106 -3
- package/chunk-bun-e2gttx65.js.map +35 -0
- package/{chunk-bun-ww65h9av.js → chunk-bun-qphgryjx.js} +30 -6
- package/{chunk-bun-ww65h9av.js.map → chunk-bun-qphgryjx.js.map} +7 -7
- package/{chunk-node-f7c1g447.js → chunk-node-6rc18den.js} +106 -3
- package/chunk-node-6rc18den.js.map +34 -0
- package/{chunk-node-jh6t3wnm.js → chunk-node-j1h89sfg.js} +30 -6
- package/{chunk-node-jh6t3wnm.js.map → chunk-node-j1h89sfg.js.map} +7 -7
- package/edit-buffer.d.ts +11 -1
- package/index.bun.js +38 -3
- package/index.bun.js.map +3 -3
- package/index.node.js +38 -3
- package/index.node.js.map +3 -3
- package/lib/terminal-capability-detection.d.ts +1 -0
- package/native-abi.generated.d.ts +70 -0
- package/package.json +9 -9
- package/renderer.d.ts +8 -1
- package/testing.bun.js +4 -3
- package/testing.bun.js.map +3 -3
- package/testing.js +4 -3
- package/testing.js.map +3 -3
- package/types.d.ts +32 -0
- package/yoga.bun.js +1 -1
- package/yoga.js +1 -1
- package/zig.d.ts +6 -1
- package/chunk-bun-wsqkxxm5.js.map +0 -35
- package/chunk-node-f7c1g447.js.map +0 -34
package/edit-buffer.d.ts
CHANGED
|
@@ -74,7 +74,8 @@ export declare class EditBuffer extends EventEmitter {
|
|
|
74
74
|
getLineStartOffset(row: number): number;
|
|
75
75
|
/**
|
|
76
76
|
* Returns the global display offset at the end of `text` as this buffer would lay it out, without storing it: its
|
|
77
|
-
* cells under this buffer's width method, tab width, and control notation, plus one per line break.
|
|
77
|
+
* cells under this buffer's width method, tab width, and control notation, plus one per line break. Use
|
|
78
|
+
* `measureEditText()` to measure without a buffer.
|
|
78
79
|
*/
|
|
79
80
|
measureText(text: string): number;
|
|
80
81
|
getTextRange(startOffset: number, endOffset: number): string;
|
|
@@ -100,3 +101,12 @@ export declare class EditBuffer extends EventEmitter {
|
|
|
100
101
|
clear(): void;
|
|
101
102
|
destroy(): void;
|
|
102
103
|
}
|
|
104
|
+
/**
|
|
105
|
+
* Returns the editor offset at the end of `text` as an edit buffer with these settings lays it out, without an edit
|
|
106
|
+
* buffer: its cells under `widthMethod`, `tabWidth`, and control notation, plus one per line break. `tabWidth` defaults
|
|
107
|
+
* to the tab width of a new edit buffer and rounds as in `EditBuffer.setTabWidth()`.
|
|
108
|
+
*/
|
|
109
|
+
export declare function measureEditText(text: string, options: {
|
|
110
|
+
widthMethod: WidthMethod;
|
|
111
|
+
tabWidth?: number;
|
|
112
|
+
}): number;
|
package/index.bun.js
CHANGED
|
@@ -110,7 +110,7 @@ import {
|
|
|
110
110
|
resolveRenderLib2,
|
|
111
111
|
MeasureMode2,
|
|
112
112
|
exports_yoga
|
|
113
|
-
} from "./chunk-bun-
|
|
113
|
+
} from "./chunk-bun-e2gttx65.js";
|
|
114
114
|
import {
|
|
115
115
|
isValidBorderStyle2,
|
|
116
116
|
parseBorderStyle2,
|
|
@@ -203,6 +203,7 @@ import {
|
|
|
203
203
|
TextBuffer2,
|
|
204
204
|
TextBufferView2,
|
|
205
205
|
EditBuffer2,
|
|
206
|
+
measureEditText2,
|
|
206
207
|
EditorView2,
|
|
207
208
|
Timeline2,
|
|
208
209
|
engine2,
|
|
@@ -241,7 +242,7 @@ import {
|
|
|
241
242
|
CliRenderEvents2,
|
|
242
243
|
RendererControlState2,
|
|
243
244
|
CliRenderer2
|
|
244
|
-
} from "./chunk-bun-
|
|
245
|
+
} from "./chunk-bun-qphgryjx.js";
|
|
245
246
|
// src/post/effects.ts
|
|
246
247
|
function toU8(value) {
|
|
247
248
|
return Math.round(Math.max(0, Math.min(1, Number.isFinite(value) ? value : 0)) * 255);
|
|
@@ -8167,9 +8168,42 @@ function physicalKey(key) {
|
|
|
8167
8168
|
return `Digit${name}`;
|
|
8168
8169
|
if (/^f([1-9]|1[0-9]|2[0-5])$/i.test(key.name))
|
|
8169
8170
|
return key.name.toUpperCase();
|
|
8171
|
+
if (/^kp[0-9]$/i.test(key.name))
|
|
8172
|
+
return `Numpad${key.name.slice(2)}`;
|
|
8170
8173
|
return {
|
|
8171
8174
|
backspace: "Backspace",
|
|
8172
8175
|
clear: "NumpadBegin",
|
|
8176
|
+
kpdecimal: "NumpadDecimal",
|
|
8177
|
+
kpdivide: "NumpadDivide",
|
|
8178
|
+
kpmultiply: "NumpadMultiply",
|
|
8179
|
+
kpminus: "NumpadSubtract",
|
|
8180
|
+
kpplus: "NumpadAdd",
|
|
8181
|
+
kpenter: "NumpadEnter",
|
|
8182
|
+
kpequal: "NumpadEqual",
|
|
8183
|
+
kpseparator: "NumpadSeparator",
|
|
8184
|
+
kpleft: "NumpadLeft",
|
|
8185
|
+
kpright: "NumpadRight",
|
|
8186
|
+
kpup: "NumpadUp",
|
|
8187
|
+
kpdown: "NumpadDown",
|
|
8188
|
+
kppageup: "NumpadPageUp",
|
|
8189
|
+
kppagedown: "NumpadPageDown",
|
|
8190
|
+
kphome: "NumpadHome",
|
|
8191
|
+
kpend: "NumpadEnd",
|
|
8192
|
+
kpinsert: "NumpadInsert",
|
|
8193
|
+
kpdelete: "NumpadDelete",
|
|
8194
|
+
capslock: "CapsLock",
|
|
8195
|
+
scrolllock: "ScrollLock",
|
|
8196
|
+
numlock: "NumLock",
|
|
8197
|
+
printscreen: "PrintScreen",
|
|
8198
|
+
pause: "Pause",
|
|
8199
|
+
leftshift: "ShiftLeft",
|
|
8200
|
+
leftctrl: "ControlLeft",
|
|
8201
|
+
leftalt: "AltLeft",
|
|
8202
|
+
leftsuper: "MetaLeft",
|
|
8203
|
+
rightshift: "ShiftRight",
|
|
8204
|
+
rightctrl: "ControlRight",
|
|
8205
|
+
rightalt: "AltRight",
|
|
8206
|
+
rightsuper: "MetaRight",
|
|
8173
8207
|
enter: "Enter",
|
|
8174
8208
|
return: "Enter",
|
|
8175
8209
|
space: "Space",
|
|
@@ -15348,6 +15382,7 @@ export {
|
|
|
15348
15382
|
link2 as link,
|
|
15349
15383
|
magenta2 as magenta,
|
|
15350
15384
|
maybeMakeRenderable2 as maybeMakeRenderable,
|
|
15385
|
+
measureEditText2 as measureEditText,
|
|
15351
15386
|
measureText2 as measureText,
|
|
15352
15387
|
nonAlphanumericKeys2 as nonAlphanumericKeys,
|
|
15353
15388
|
normalizeColorValue2 as normalizeColorValue,
|
|
@@ -15400,5 +15435,5 @@ export {
|
|
|
15400
15435
|
yellow2 as yellow
|
|
15401
15436
|
};
|
|
15402
15437
|
|
|
15403
|
-
//# debugId=
|
|
15438
|
+
//# debugId=1B5615355BC40CFF64756E2164756E21
|
|
15404
15439
|
//# sourceMappingURL=index.bun.js.map
|