@opentui/core 0.1.38 → 0.1.39
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
CHANGED
|
@@ -2079,6 +2079,7 @@ var isShiftKey = (code) => {
|
|
|
2079
2079
|
var isCtrlKey = (code) => {
|
|
2080
2080
|
return ["Oa", "Ob", "Oc", "Od", "Oe", "[2^", "[3^", "[5^", "[6^", "[7^", "[8^"].includes(code);
|
|
2081
2081
|
};
|
|
2082
|
+
var ghosttyModifiedKeyRe = /^\x1b\[27;(\d+);(\d+)~$/;
|
|
2082
2083
|
var parseKeypress = (s = "", options = {}) => {
|
|
2083
2084
|
let parts;
|
|
2084
2085
|
if (Buffer2.isBuffer(s)) {
|
|
@@ -2118,6 +2119,29 @@ var parseKeypress = (s = "", options = {}) => {
|
|
|
2118
2119
|
return kittyResult;
|
|
2119
2120
|
}
|
|
2120
2121
|
}
|
|
2122
|
+
const ghosttyMatch = ghosttyModifiedKeyRe.exec(s);
|
|
2123
|
+
if (ghosttyMatch) {
|
|
2124
|
+
const modifier = parseInt(ghosttyMatch[1], 10) - 1;
|
|
2125
|
+
const charCode = parseInt(ghosttyMatch[2], 10);
|
|
2126
|
+
key.ctrl = !!(modifier & 4);
|
|
2127
|
+
key.meta = !!(modifier & 10);
|
|
2128
|
+
key.shift = !!(modifier & 1);
|
|
2129
|
+
key.option = !!(modifier & 2);
|
|
2130
|
+
if (charCode === 13) {
|
|
2131
|
+
key.name = "return";
|
|
2132
|
+
} else if (charCode === 27) {
|
|
2133
|
+
key.name = "escape";
|
|
2134
|
+
} else if (charCode === 9) {
|
|
2135
|
+
key.name = "tab";
|
|
2136
|
+
} else if (charCode === 32) {
|
|
2137
|
+
key.name = "space";
|
|
2138
|
+
} else if (charCode === 127 || charCode === 8) {
|
|
2139
|
+
key.name = "backspace";
|
|
2140
|
+
} else {
|
|
2141
|
+
key.name = String.fromCharCode(charCode);
|
|
2142
|
+
}
|
|
2143
|
+
return key;
|
|
2144
|
+
}
|
|
2121
2145
|
if (s === "\r" || s === "\x1B\r") {
|
|
2122
2146
|
key.name = "return";
|
|
2123
2147
|
key.meta = s.length === 2;
|
|
@@ -12992,9 +13016,6 @@ Captured output:
|
|
|
12992
13016
|
process.on("uncaughtException", this.handleError);
|
|
12993
13017
|
process.on("unhandledRejection", this.handleError);
|
|
12994
13018
|
process.on("exit", this.exitHandler);
|
|
12995
|
-
this._console = new TerminalConsole(this, config.consoleOptions);
|
|
12996
|
-
this.useConsole = config.useConsole ?? true;
|
|
12997
|
-
this._openConsoleOnError = config.openConsoleOnError ?? true;
|
|
12998
13019
|
this._keyHandler = new InternalKeyHandler(this.stdin, config.useKittyKeyboard ?? true);
|
|
12999
13020
|
this._keyHandler.on("keypress", (event) => {
|
|
13000
13021
|
if (this.exitOnCtrlC && event.name === "c" && event.ctrl) {
|
|
@@ -13004,6 +13025,9 @@ Captured output:
|
|
|
13004
13025
|
return;
|
|
13005
13026
|
}
|
|
13006
13027
|
});
|
|
13028
|
+
this._console = new TerminalConsole(this, config.consoleOptions);
|
|
13029
|
+
this.useConsole = config.useConsole ?? true;
|
|
13030
|
+
this._openConsoleOnError = config.openConsoleOnError ?? true;
|
|
13007
13031
|
global.requestAnimationFrame = (callback) => {
|
|
13008
13032
|
const id = CliRenderer.animationFrameId++;
|
|
13009
13033
|
this.animationRequest.set(id, callback);
|
|
@@ -13950,5 +13974,5 @@ Captured output:
|
|
|
13950
13974
|
|
|
13951
13975
|
export { __toESM, __commonJS, __export, __require, Edge, Gutter, exports_src, BorderChars, getBorderFromSides, getBorderSides, borderCharsToArray, BorderCharArrays, nonAlphanumericKeys, parseKeypress, ANSI, StdinBuffer, KeyEvent, PasteEvent, KeyHandler, InternalKeyHandler, RGBA, hexToRgb, rgbToHex, hsvToRgb, parseColor, fonts, measureText, getCharacterPositions, coordinateToCharacterIndex, renderFontToFrameBuffer, TextAttributes, DebugOverlayCorner, createTextAttributes, 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, t, hastToStyledText, LinearScrollAccel, MacOSScrollAccel, parseAlign, 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, capture, ConsolePosition, TerminalConsole, getObjectsInViewport, MouseEvent, MouseButton, createCliRenderer, CliRenderEvents, RendererControlState, CliRenderer };
|
|
13952
13976
|
|
|
13953
|
-
//# debugId=
|
|
13954
|
-
//# sourceMappingURL=index-
|
|
13977
|
+
//# debugId=9EF829D1358BD55D64756E2164756E21
|
|
13978
|
+
//# sourceMappingURL=index-d4f5t33k.js.map
|