@omg-dev/app 0.1.320 → 0.1.322
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/dist-lib/{ChangelogPage-C5jatafO.js → ChangelogPage-huYDfFlG.js} +48 -1
- package/dist-lib/{SessionFilesPanel-C8VG_Rbo.js → SessionFilesPanel-CGXBiVYf.js} +17 -17
- package/dist-lib/{TermView-D0LCEMBr.js → TermView-hNJrcncd.js} +105 -93
- package/dist-lib/{chat-engine-DgHMD8r7.js → chat-engine-Q1aHGwgu.js} +1 -1
- package/dist-lib/coding-agents-page-ov-7VCjA.js +287 -0
- package/dist-lib/{embedded-DdwkOHs-.js → embedded-DT1Dv8oy.js} +6430 -6409
- package/dist-lib/{highlighted-body-OFNGDK62-AWF1mqgj.js → highlighted-body-OFNGDK62-CGGV-Aaa.js} +1 -1
- package/dist-lib/{index-BydyhpZP.js → index-DBqUC8Rf.js} +1 -1
- package/dist-lib/index.js +1 -1
- package/dist-lib/mermaid-GHXKKRXX-BFE-KhRg.js +4 -0
- package/dist-lib/{resume-session-sheet-otCh6MZx.js → resume-session-sheet-CQffXTp1.js} +1 -1
- package/dist-lib/{session-token-usage-CVXtaUGH.js → session-token-usage-DTSnOIYE.js} +1 -1
- package/dist-lib/{shipped-page-DbyUKRNt.js → shipped-page-M_Ico9Yn.js} +9 -9
- package/dist-lib/{streamdown-response-Cdv4gnNZ.js → streamdown-response-D0MBqPhM.js} +4 -4
- package/dist-lib/styles.css +1 -1
- package/package.json +2 -2
- package/dist-lib/BrowserProfiles-CqaLBzFM.js +0 -650
- package/dist-lib/badge-9CxnDp-1.js +0 -46
- package/dist-lib/clipboard-paste-CENdB6NY.js +0 -17
- package/dist-lib/coding-agents-page-DKccTvM2.js +0 -209
- package/dist-lib/mermaid-GHXKKRXX-gvTkauyO.js +0 -4
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { jsxs as r, jsx as k, Fragment as vA } from "react/jsx-runtime";
|
|
2
2
|
import { useState as L, useRef as S, useEffect as x, useCallback as Y } from "react";
|
|
3
|
-
import {
|
|
4
|
-
import { C as jA } from "./clipboard-paste-CENdB6NY.js";
|
|
3
|
+
import { z as cA, S as wQ, X as DA, a8 as sQ, m as tQ, a9 as eQ, aa as aQ, E as MQ, ab as hQ, R as NQ, y as cQ } from "./embedded-DT1Dv8oy.js";
|
|
5
4
|
/**
|
|
6
5
|
* @license lucide-react v0.577.0 - ISC
|
|
7
6
|
*
|
|
@@ -9,6 +8,19 @@ import { C as jA } from "./clipboard-paste-CENdB6NY.js";
|
|
|
9
8
|
* See the LICENSE file in the root directory of this source tree.
|
|
10
9
|
*/
|
|
11
10
|
const kQ = [
|
|
11
|
+
["path", { d: "M11 14h10", key: "1w8e9d" }],
|
|
12
|
+
["path", { d: "M16 4h2a2 2 0 0 1 2 2v1.344", key: "1e62lh" }],
|
|
13
|
+
["path", { d: "m17 18 4-4-4-4", key: "z2g111" }],
|
|
14
|
+
["path", { d: "M8 4H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 1.793-1.113", key: "bjbb7m" }],
|
|
15
|
+
["rect", { x: "8", y: "2", width: "8", height: "4", rx: "1", key: "ublpy" }]
|
|
16
|
+
], jA = cA("clipboard-paste", kQ);
|
|
17
|
+
/**
|
|
18
|
+
* @license lucide-react v0.577.0 - ISC
|
|
19
|
+
*
|
|
20
|
+
* This source code is licensed under the ISC license.
|
|
21
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
22
|
+
*/
|
|
23
|
+
const GQ = [
|
|
12
24
|
["path", { d: "M10 8h.01", key: "1r9ogq" }],
|
|
13
25
|
["path", { d: "M12 12h.01", key: "1mp3jc" }],
|
|
14
26
|
["path", { d: "M14 8h.01", key: "1primd" }],
|
|
@@ -18,14 +30,14 @@ const kQ = [
|
|
|
18
30
|
["path", { d: "M7 16h10", key: "wp8him" }],
|
|
19
31
|
["path", { d: "M8 12h.01", key: "czm47f" }],
|
|
20
32
|
["rect", { width: "20", height: "16", x: "2", y: "4", rx: "2", key: "18n3k1" }]
|
|
21
|
-
], PA =
|
|
33
|
+
], PA = cA("keyboard", GQ);
|
|
22
34
|
/**
|
|
23
35
|
* @license lucide-react v0.577.0 - ISC
|
|
24
36
|
*
|
|
25
37
|
* This source code is licensed under the ISC license.
|
|
26
38
|
* See the LICENSE file in the root directory of this source tree.
|
|
27
39
|
*/
|
|
28
|
-
const
|
|
40
|
+
const FQ = [
|
|
29
41
|
["path", { d: "M12 17v5", key: "bb1du9" }],
|
|
30
42
|
["path", { d: "M15 9.34V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H7.89", key: "znwnzq" }],
|
|
31
43
|
["path", { d: "m2 2 20 20", key: "1ooewy" }],
|
|
@@ -36,14 +48,14 @@ const GQ = [
|
|
|
36
48
|
key: "c9qhm2"
|
|
37
49
|
}
|
|
38
50
|
]
|
|
39
|
-
],
|
|
51
|
+
], JQ = cA("pin-off", FQ);
|
|
40
52
|
/**
|
|
41
53
|
* @license lucide-react v0.577.0 - ISC
|
|
42
54
|
*
|
|
43
55
|
* This source code is licensed under the ISC license.
|
|
44
56
|
* See the LICENSE file in the root directory of this source tree.
|
|
45
57
|
*/
|
|
46
|
-
const
|
|
58
|
+
const KQ = [
|
|
47
59
|
[
|
|
48
60
|
"path",
|
|
49
61
|
{
|
|
@@ -52,8 +64,8 @@ const JQ = [
|
|
|
52
64
|
}
|
|
53
65
|
],
|
|
54
66
|
["path", { d: "M6 12h16", key: "s4cdu5" }]
|
|
55
|
-
],
|
|
56
|
-
var rA = /* @__PURE__ */ ((Q) => (Q[Q.CURSOR_KEY_APPLICATION = 0] = "CURSOR_KEY_APPLICATION", Q[Q.KEYPAD_KEY_APPLICATION = 1] = "KEYPAD_KEY_APPLICATION", Q[Q.IGNORE_KEYPAD_WITH_NUMLOCK = 2] = "IGNORE_KEYPAD_WITH_NUMLOCK", Q[Q.ALT_ESC_PREFIX = 3] = "ALT_ESC_PREFIX", Q[Q.MODIFY_OTHER_KEYS_STATE_2 = 4] = "MODIFY_OTHER_KEYS_STATE_2", Q[Q.KITTY_KEYBOARD_FLAGS = 5] = "KITTY_KEYBOARD_FLAGS", Q))(rA || {}), XA = /* @__PURE__ */ ((Q) => (Q[Q.RELEASE = 0] = "RELEASE", Q[Q.PRESS = 1] = "PRESS", Q[Q.REPEAT = 2] = "REPEAT", Q))(XA || {}), o = /* @__PURE__ */ ((Q) => (Q[Q.UNIDENTIFIED = 0] = "UNIDENTIFIED", Q[Q.GRAVE = 1] = "GRAVE", Q[Q.BACKSLASH = 2] = "BACKSLASH", Q[Q.BRACKET_LEFT = 3] = "BRACKET_LEFT", Q[Q.BRACKET_RIGHT = 4] = "BRACKET_RIGHT", Q[Q.COMMA = 5] = "COMMA", Q[Q.ZERO = 6] = "ZERO", Q[Q.ONE = 7] = "ONE", Q[Q.TWO = 8] = "TWO", Q[Q.THREE = 9] = "THREE", Q[Q.FOUR = 10] = "FOUR", Q[Q.FIVE = 11] = "FIVE", Q[Q.SIX = 12] = "SIX", Q[Q.SEVEN = 13] = "SEVEN", Q[Q.EIGHT = 14] = "EIGHT", Q[Q.NINE = 15] = "NINE", Q[Q.EQUAL = 16] = "EQUAL", Q[Q.INTL_BACKSLASH = 17] = "INTL_BACKSLASH", Q[Q.INTL_RO = 18] = "INTL_RO", Q[Q.INTL_YEN = 19] = "INTL_YEN", Q[Q.A = 20] = "A", Q[Q.B = 21] = "B", Q[Q.C = 22] = "C", Q[Q.D = 23] = "D", Q[Q.E = 24] = "E", Q[Q.F = 25] = "F", Q[Q.G = 26] = "G", Q[Q.H = 27] = "H", Q[Q.I = 28] = "I", Q[Q.J = 29] = "J", Q[Q.K = 30] = "K", Q[Q.L = 31] = "L", Q[Q.M = 32] = "M", Q[Q.N = 33] = "N", Q[Q.O = 34] = "O", Q[Q.P = 35] = "P", Q[Q.Q = 36] = "Q", Q[Q.R = 37] = "R", Q[Q.S = 38] = "S", Q[Q.T = 39] = "T", Q[Q.U = 40] = "U", Q[Q.V = 41] = "V", Q[Q.W = 42] = "W", Q[Q.X = 43] = "X", Q[Q.Y = 44] = "Y", Q[Q.Z = 45] = "Z", Q[Q.MINUS = 46] = "MINUS", Q[Q.PERIOD = 47] = "PERIOD", Q[Q.QUOTE = 48] = "QUOTE", Q[Q.SEMICOLON = 49] = "SEMICOLON", Q[Q.SLASH = 50] = "SLASH", Q[Q.ALT_LEFT = 51] = "ALT_LEFT", Q[Q.ALT_RIGHT = 52] = "ALT_RIGHT", Q[Q.BACKSPACE = 53] = "BACKSPACE", Q[Q.CAPS_LOCK = 54] = "CAPS_LOCK", Q[Q.CONTEXT_MENU = 55] = "CONTEXT_MENU", Q[Q.CONTROL_LEFT = 56] = "CONTROL_LEFT", Q[Q.CONTROL_RIGHT = 57] = "CONTROL_RIGHT", Q[Q.ENTER = 58] = "ENTER", Q[Q.META_LEFT = 59] = "META_LEFT", Q[Q.META_RIGHT = 60] = "META_RIGHT", Q[Q.SHIFT_LEFT = 61] = "SHIFT_LEFT", Q[Q.SHIFT_RIGHT = 62] = "SHIFT_RIGHT", Q[Q.SPACE = 63] = "SPACE", Q[Q.TAB = 64] = "TAB", Q[Q.CONVERT = 65] = "CONVERT", Q[Q.KANA_MODE = 66] = "KANA_MODE", Q[Q.NON_CONVERT = 67] = "NON_CONVERT", Q[Q.DELETE = 68] = "DELETE", Q[Q.END = 69] = "END", Q[Q.HELP = 70] = "HELP", Q[Q.HOME = 71] = "HOME", Q[Q.INSERT = 72] = "INSERT", Q[Q.PAGE_DOWN = 73] = "PAGE_DOWN", Q[Q.PAGE_UP = 74] = "PAGE_UP", Q[Q.DOWN = 75] = "DOWN", Q[Q.LEFT = 76] = "LEFT", Q[Q.RIGHT = 77] = "RIGHT", Q[Q.UP = 78] = "UP", Q[Q.NUM_LOCK = 79] = "NUM_LOCK", Q[Q.KP_0 = 80] = "KP_0", Q[Q.KP_1 = 81] = "KP_1", Q[Q.KP_2 = 82] = "KP_2", Q[Q.KP_3 = 83] = "KP_3", Q[Q.KP_4 = 84] = "KP_4", Q[Q.KP_5 = 85] = "KP_5", Q[Q.KP_6 = 86] = "KP_6", Q[Q.KP_7 = 87] = "KP_7", Q[Q.KP_8 = 88] = "KP_8", Q[Q.KP_9 = 89] = "KP_9", Q[Q.KP_PLUS = 90] = "KP_PLUS", Q[Q.KP_BACKSPACE = 91] = "KP_BACKSPACE", Q[Q.KP_CLEAR = 92] = "KP_CLEAR", Q[Q.KP_CLEAR_ENTRY = 93] = "KP_CLEAR_ENTRY", Q[Q.KP_COMMA = 94] = "KP_COMMA", Q[Q.KP_PERIOD = 95] = "KP_PERIOD", Q[Q.KP_DIVIDE = 96] = "KP_DIVIDE", Q[Q.KP_ENTER = 97] = "KP_ENTER", Q[Q.KP_EQUAL = 98] = "KP_EQUAL", Q[Q.KP_MEMORY_ADD = 99] = "KP_MEMORY_ADD", Q[Q.KP_MEMORY_CLEAR = 100] = "KP_MEMORY_CLEAR", Q[Q.KP_MEMORY_RECALL = 101] = "KP_MEMORY_RECALL", Q[Q.KP_MEMORY_STORE = 102] = "KP_MEMORY_STORE", Q[Q.KP_MEMORY_SUBTRACT = 103] = "KP_MEMORY_SUBTRACT", Q[Q.KP_MULTIPLY = 104] = "KP_MULTIPLY", Q[Q.KP_PAREN_LEFT = 105] = "KP_PAREN_LEFT", Q[Q.KP_PAREN_RIGHT = 106] = "KP_PAREN_RIGHT", Q[Q.KP_MINUS = 107] = "KP_MINUS", Q[Q.KP_SEPARATOR = 108] = "KP_SEPARATOR", Q[Q.NUMPAD_UP = 109] = "NUMPAD_UP", Q[Q.NUMPAD_DOWN = 110] = "NUMPAD_DOWN", Q[Q.NUMPAD_RIGHT = 111] = "NUMPAD_RIGHT", Q[Q.NUMPAD_LEFT = 112] = "NUMPAD_LEFT", Q[Q.NUMPAD_BEGIN = 113] = "NUMPAD_BEGIN", Q[Q.NUMPAD_HOME = 114] = "NUMPAD_HOME", Q[Q.NUMPAD_END = 115] = "NUMPAD_END", Q[Q.NUMPAD_INSERT = 116] = "NUMPAD_INSERT", Q[Q.NUMPAD_DELETE = 117] = "NUMPAD_DELETE", Q[Q.NUMPAD_PAGE_UP = 118] = "NUMPAD_PAGE_UP", Q[Q.NUMPAD_PAGE_DOWN = 119] = "NUMPAD_PAGE_DOWN", Q[Q.ESCAPE = 120] = "ESCAPE", Q[Q.F1 = 121] = "F1", Q[Q.F2 = 122] = "F2", Q[Q.F3 = 123] = "F3", Q[Q.F4 = 124] = "F4", Q[Q.F5 = 125] = "F5", Q[Q.F6 = 126] = "F6", Q[Q.F7 = 127] = "F7", Q[Q.F8 = 128] = "F8", Q[Q.F9 = 129] = "F9", Q[Q.F10 = 130] = "F10", Q[Q.F11 = 131] = "F11", Q[Q.F12 = 132] = "F12", Q[Q.F13 = 133] = "F13", Q[Q.F14 = 134] = "F14", Q[Q.F15 = 135] = "F15", Q[Q.F16 = 136] = "F16", Q[Q.F17 = 137] = "F17", Q[Q.F18 = 138] = "F18", Q[Q.F19 = 139] = "F19", Q[Q.F20 = 140] = "F20", Q[Q.F21 = 141] = "F21", Q[Q.F22 = 142] = "F22", Q[Q.F23 = 143] = "F23", Q[Q.F24 = 144] = "F24", Q[Q.F25 = 145] = "F25", Q[Q.FN_LOCK = 146] = "FN_LOCK", Q[Q.PRINT_SCREEN = 147] = "PRINT_SCREEN", Q[Q.SCROLL_LOCK = 148] = "SCROLL_LOCK", Q[Q.PAUSE = 149] = "PAUSE", Q[Q.BROWSER_BACK = 150] = "BROWSER_BACK", Q[Q.BROWSER_FAVORITES = 151] = "BROWSER_FAVORITES", Q[Q.BROWSER_FORWARD = 152] = "BROWSER_FORWARD", Q[Q.BROWSER_HOME = 153] = "BROWSER_HOME", Q[Q.BROWSER_REFRESH = 154] = "BROWSER_REFRESH", Q[Q.BROWSER_SEARCH = 155] = "BROWSER_SEARCH", Q[Q.BROWSER_STOP = 156] = "BROWSER_STOP", Q[Q.EJECT = 157] = "EJECT", Q[Q.LAUNCH_APP_1 = 158] = "LAUNCH_APP_1", Q[Q.LAUNCH_APP_2 = 159] = "LAUNCH_APP_2", Q[Q.LAUNCH_MAIL = 160] = "LAUNCH_MAIL", Q[Q.MEDIA_PLAY_PAUSE = 161] = "MEDIA_PLAY_PAUSE", Q[Q.MEDIA_SELECT = 162] = "MEDIA_SELECT", Q[Q.MEDIA_STOP = 163] = "MEDIA_STOP", Q[Q.MEDIA_TRACK_NEXT = 164] = "MEDIA_TRACK_NEXT", Q[Q.MEDIA_TRACK_PREVIOUS = 165] = "MEDIA_TRACK_PREVIOUS", Q[Q.POWER = 166] = "POWER", Q[Q.SLEEP = 167] = "SLEEP", Q[Q.AUDIO_VOLUME_DOWN = 168] = "AUDIO_VOLUME_DOWN", Q[Q.AUDIO_VOLUME_MUTE = 169] = "AUDIO_VOLUME_MUTE", Q[Q.AUDIO_VOLUME_UP = 170] = "AUDIO_VOLUME_UP", Q[Q.WAKE_UP = 171] = "WAKE_UP", Q[Q.COPY = 172] = "COPY", Q[Q.CUT = 173] = "CUT", Q[Q.PASTE = 174] = "PASTE", Q))(o || {}), V = /* @__PURE__ */ ((Q) => (Q[Q.NONE = 0] = "NONE", Q[Q.SHIFT = 1] = "SHIFT", Q[Q.CTRL = 2] = "CTRL", Q[Q.ALT = 4] = "ALT", Q[Q.SUPER = 8] = "SUPER", Q[Q.CAPSLOCK = 16] = "CAPSLOCK", Q[Q.NUMLOCK = 32] = "NUMLOCK", Q))(V || {}),
|
|
67
|
+
], UQ = cA("send-horizontal", KQ);
|
|
68
|
+
var rA = /* @__PURE__ */ ((Q) => (Q[Q.CURSOR_KEY_APPLICATION = 0] = "CURSOR_KEY_APPLICATION", Q[Q.KEYPAD_KEY_APPLICATION = 1] = "KEYPAD_KEY_APPLICATION", Q[Q.IGNORE_KEYPAD_WITH_NUMLOCK = 2] = "IGNORE_KEYPAD_WITH_NUMLOCK", Q[Q.ALT_ESC_PREFIX = 3] = "ALT_ESC_PREFIX", Q[Q.MODIFY_OTHER_KEYS_STATE_2 = 4] = "MODIFY_OTHER_KEYS_STATE_2", Q[Q.KITTY_KEYBOARD_FLAGS = 5] = "KITTY_KEYBOARD_FLAGS", Q))(rA || {}), XA = /* @__PURE__ */ ((Q) => (Q[Q.RELEASE = 0] = "RELEASE", Q[Q.PRESS = 1] = "PRESS", Q[Q.REPEAT = 2] = "REPEAT", Q))(XA || {}), o = /* @__PURE__ */ ((Q) => (Q[Q.UNIDENTIFIED = 0] = "UNIDENTIFIED", Q[Q.GRAVE = 1] = "GRAVE", Q[Q.BACKSLASH = 2] = "BACKSLASH", Q[Q.BRACKET_LEFT = 3] = "BRACKET_LEFT", Q[Q.BRACKET_RIGHT = 4] = "BRACKET_RIGHT", Q[Q.COMMA = 5] = "COMMA", Q[Q.ZERO = 6] = "ZERO", Q[Q.ONE = 7] = "ONE", Q[Q.TWO = 8] = "TWO", Q[Q.THREE = 9] = "THREE", Q[Q.FOUR = 10] = "FOUR", Q[Q.FIVE = 11] = "FIVE", Q[Q.SIX = 12] = "SIX", Q[Q.SEVEN = 13] = "SEVEN", Q[Q.EIGHT = 14] = "EIGHT", Q[Q.NINE = 15] = "NINE", Q[Q.EQUAL = 16] = "EQUAL", Q[Q.INTL_BACKSLASH = 17] = "INTL_BACKSLASH", Q[Q.INTL_RO = 18] = "INTL_RO", Q[Q.INTL_YEN = 19] = "INTL_YEN", Q[Q.A = 20] = "A", Q[Q.B = 21] = "B", Q[Q.C = 22] = "C", Q[Q.D = 23] = "D", Q[Q.E = 24] = "E", Q[Q.F = 25] = "F", Q[Q.G = 26] = "G", Q[Q.H = 27] = "H", Q[Q.I = 28] = "I", Q[Q.J = 29] = "J", Q[Q.K = 30] = "K", Q[Q.L = 31] = "L", Q[Q.M = 32] = "M", Q[Q.N = 33] = "N", Q[Q.O = 34] = "O", Q[Q.P = 35] = "P", Q[Q.Q = 36] = "Q", Q[Q.R = 37] = "R", Q[Q.S = 38] = "S", Q[Q.T = 39] = "T", Q[Q.U = 40] = "U", Q[Q.V = 41] = "V", Q[Q.W = 42] = "W", Q[Q.X = 43] = "X", Q[Q.Y = 44] = "Y", Q[Q.Z = 45] = "Z", Q[Q.MINUS = 46] = "MINUS", Q[Q.PERIOD = 47] = "PERIOD", Q[Q.QUOTE = 48] = "QUOTE", Q[Q.SEMICOLON = 49] = "SEMICOLON", Q[Q.SLASH = 50] = "SLASH", Q[Q.ALT_LEFT = 51] = "ALT_LEFT", Q[Q.ALT_RIGHT = 52] = "ALT_RIGHT", Q[Q.BACKSPACE = 53] = "BACKSPACE", Q[Q.CAPS_LOCK = 54] = "CAPS_LOCK", Q[Q.CONTEXT_MENU = 55] = "CONTEXT_MENU", Q[Q.CONTROL_LEFT = 56] = "CONTROL_LEFT", Q[Q.CONTROL_RIGHT = 57] = "CONTROL_RIGHT", Q[Q.ENTER = 58] = "ENTER", Q[Q.META_LEFT = 59] = "META_LEFT", Q[Q.META_RIGHT = 60] = "META_RIGHT", Q[Q.SHIFT_LEFT = 61] = "SHIFT_LEFT", Q[Q.SHIFT_RIGHT = 62] = "SHIFT_RIGHT", Q[Q.SPACE = 63] = "SPACE", Q[Q.TAB = 64] = "TAB", Q[Q.CONVERT = 65] = "CONVERT", Q[Q.KANA_MODE = 66] = "KANA_MODE", Q[Q.NON_CONVERT = 67] = "NON_CONVERT", Q[Q.DELETE = 68] = "DELETE", Q[Q.END = 69] = "END", Q[Q.HELP = 70] = "HELP", Q[Q.HOME = 71] = "HOME", Q[Q.INSERT = 72] = "INSERT", Q[Q.PAGE_DOWN = 73] = "PAGE_DOWN", Q[Q.PAGE_UP = 74] = "PAGE_UP", Q[Q.DOWN = 75] = "DOWN", Q[Q.LEFT = 76] = "LEFT", Q[Q.RIGHT = 77] = "RIGHT", Q[Q.UP = 78] = "UP", Q[Q.NUM_LOCK = 79] = "NUM_LOCK", Q[Q.KP_0 = 80] = "KP_0", Q[Q.KP_1 = 81] = "KP_1", Q[Q.KP_2 = 82] = "KP_2", Q[Q.KP_3 = 83] = "KP_3", Q[Q.KP_4 = 84] = "KP_4", Q[Q.KP_5 = 85] = "KP_5", Q[Q.KP_6 = 86] = "KP_6", Q[Q.KP_7 = 87] = "KP_7", Q[Q.KP_8 = 88] = "KP_8", Q[Q.KP_9 = 89] = "KP_9", Q[Q.KP_PLUS = 90] = "KP_PLUS", Q[Q.KP_BACKSPACE = 91] = "KP_BACKSPACE", Q[Q.KP_CLEAR = 92] = "KP_CLEAR", Q[Q.KP_CLEAR_ENTRY = 93] = "KP_CLEAR_ENTRY", Q[Q.KP_COMMA = 94] = "KP_COMMA", Q[Q.KP_PERIOD = 95] = "KP_PERIOD", Q[Q.KP_DIVIDE = 96] = "KP_DIVIDE", Q[Q.KP_ENTER = 97] = "KP_ENTER", Q[Q.KP_EQUAL = 98] = "KP_EQUAL", Q[Q.KP_MEMORY_ADD = 99] = "KP_MEMORY_ADD", Q[Q.KP_MEMORY_CLEAR = 100] = "KP_MEMORY_CLEAR", Q[Q.KP_MEMORY_RECALL = 101] = "KP_MEMORY_RECALL", Q[Q.KP_MEMORY_STORE = 102] = "KP_MEMORY_STORE", Q[Q.KP_MEMORY_SUBTRACT = 103] = "KP_MEMORY_SUBTRACT", Q[Q.KP_MULTIPLY = 104] = "KP_MULTIPLY", Q[Q.KP_PAREN_LEFT = 105] = "KP_PAREN_LEFT", Q[Q.KP_PAREN_RIGHT = 106] = "KP_PAREN_RIGHT", Q[Q.KP_MINUS = 107] = "KP_MINUS", Q[Q.KP_SEPARATOR = 108] = "KP_SEPARATOR", Q[Q.NUMPAD_UP = 109] = "NUMPAD_UP", Q[Q.NUMPAD_DOWN = 110] = "NUMPAD_DOWN", Q[Q.NUMPAD_RIGHT = 111] = "NUMPAD_RIGHT", Q[Q.NUMPAD_LEFT = 112] = "NUMPAD_LEFT", Q[Q.NUMPAD_BEGIN = 113] = "NUMPAD_BEGIN", Q[Q.NUMPAD_HOME = 114] = "NUMPAD_HOME", Q[Q.NUMPAD_END = 115] = "NUMPAD_END", Q[Q.NUMPAD_INSERT = 116] = "NUMPAD_INSERT", Q[Q.NUMPAD_DELETE = 117] = "NUMPAD_DELETE", Q[Q.NUMPAD_PAGE_UP = 118] = "NUMPAD_PAGE_UP", Q[Q.NUMPAD_PAGE_DOWN = 119] = "NUMPAD_PAGE_DOWN", Q[Q.ESCAPE = 120] = "ESCAPE", Q[Q.F1 = 121] = "F1", Q[Q.F2 = 122] = "F2", Q[Q.F3 = 123] = "F3", Q[Q.F4 = 124] = "F4", Q[Q.F5 = 125] = "F5", Q[Q.F6 = 126] = "F6", Q[Q.F7 = 127] = "F7", Q[Q.F8 = 128] = "F8", Q[Q.F9 = 129] = "F9", Q[Q.F10 = 130] = "F10", Q[Q.F11 = 131] = "F11", Q[Q.F12 = 132] = "F12", Q[Q.F13 = 133] = "F13", Q[Q.F14 = 134] = "F14", Q[Q.F15 = 135] = "F15", Q[Q.F16 = 136] = "F16", Q[Q.F17 = 137] = "F17", Q[Q.F18 = 138] = "F18", Q[Q.F19 = 139] = "F19", Q[Q.F20 = 140] = "F20", Q[Q.F21 = 141] = "F21", Q[Q.F22 = 142] = "F22", Q[Q.F23 = 143] = "F23", Q[Q.F24 = 144] = "F24", Q[Q.F25 = 145] = "F25", Q[Q.FN_LOCK = 146] = "FN_LOCK", Q[Q.PRINT_SCREEN = 147] = "PRINT_SCREEN", Q[Q.SCROLL_LOCK = 148] = "SCROLL_LOCK", Q[Q.PAUSE = 149] = "PAUSE", Q[Q.BROWSER_BACK = 150] = "BROWSER_BACK", Q[Q.BROWSER_FAVORITES = 151] = "BROWSER_FAVORITES", Q[Q.BROWSER_FORWARD = 152] = "BROWSER_FORWARD", Q[Q.BROWSER_HOME = 153] = "BROWSER_HOME", Q[Q.BROWSER_REFRESH = 154] = "BROWSER_REFRESH", Q[Q.BROWSER_SEARCH = 155] = "BROWSER_SEARCH", Q[Q.BROWSER_STOP = 156] = "BROWSER_STOP", Q[Q.EJECT = 157] = "EJECT", Q[Q.LAUNCH_APP_1 = 158] = "LAUNCH_APP_1", Q[Q.LAUNCH_APP_2 = 159] = "LAUNCH_APP_2", Q[Q.LAUNCH_MAIL = 160] = "LAUNCH_MAIL", Q[Q.MEDIA_PLAY_PAUSE = 161] = "MEDIA_PLAY_PAUSE", Q[Q.MEDIA_SELECT = 162] = "MEDIA_SELECT", Q[Q.MEDIA_STOP = 163] = "MEDIA_STOP", Q[Q.MEDIA_TRACK_NEXT = 164] = "MEDIA_TRACK_NEXT", Q[Q.MEDIA_TRACK_PREVIOUS = 165] = "MEDIA_TRACK_PREVIOUS", Q[Q.POWER = 166] = "POWER", Q[Q.SLEEP = 167] = "SLEEP", Q[Q.AUDIO_VOLUME_DOWN = 168] = "AUDIO_VOLUME_DOWN", Q[Q.AUDIO_VOLUME_MUTE = 169] = "AUDIO_VOLUME_MUTE", Q[Q.AUDIO_VOLUME_UP = 170] = "AUDIO_VOLUME_UP", Q[Q.WAKE_UP = 171] = "WAKE_UP", Q[Q.COPY = 172] = "COPY", Q[Q.CUT = 173] = "CUT", Q[Q.PASTE = 174] = "PASTE", Q))(o || {}), V = /* @__PURE__ */ ((Q) => (Q[Q.NONE = 0] = "NONE", Q[Q.SHIFT = 1] = "SHIFT", Q[Q.CTRL = 2] = "CTRL", Q[Q.ALT = 4] = "ALT", Q[Q.SUPER = 8] = "SUPER", Q[Q.CAPSLOCK = 16] = "CAPSLOCK", Q[Q.NUMLOCK = 32] = "NUMLOCK", Q))(V || {}), UA = /* @__PURE__ */ ((Q) => (Q[Q.NONE = 0] = "NONE", Q[Q.PARTIAL = 1] = "PARTIAL", Q[Q.FULL = 2] = "FULL", Q))(UA || {});
|
|
57
69
|
const mA = 80;
|
|
58
70
|
var n = /* @__PURE__ */ ((Q) => (Q[Q.BOLD = 1] = "BOLD", Q[Q.ITALIC = 2] = "ITALIC", Q[Q.UNDERLINE = 4] = "UNDERLINE", Q[Q.STRIKETHROUGH = 8] = "STRIKETHROUGH", Q[Q.INVERSE = 16] = "INVERSE", Q[Q.INVISIBLE = 32] = "INVISIBLE", Q[Q.BLINK = 64] = "BLINK", Q[Q.FAINT = 128] = "FAINT", Q))(n || {});
|
|
59
71
|
class oA {
|
|
@@ -61,10 +73,10 @@ class oA {
|
|
|
61
73
|
this.exports = A.exports, this.memory = this.exports.memory;
|
|
62
74
|
}
|
|
63
75
|
createKeyEncoder() {
|
|
64
|
-
return new
|
|
76
|
+
return new yQ(this.exports);
|
|
65
77
|
}
|
|
66
78
|
createTerminal(A = 80, B = 24, g) {
|
|
67
|
-
return new
|
|
79
|
+
return new rQ(this.exports, this.memory, A, B, g);
|
|
68
80
|
}
|
|
69
81
|
static async load(A) {
|
|
70
82
|
if (A)
|
|
@@ -122,7 +134,7 @@ class oA {
|
|
|
122
134
|
return new oA(E);
|
|
123
135
|
}
|
|
124
136
|
}
|
|
125
|
-
class
|
|
137
|
+
class yQ {
|
|
126
138
|
constructor(A) {
|
|
127
139
|
this.encoder = 0, this.exports = A;
|
|
128
140
|
const B = this.exports.ghostty_wasm_alloc_opaque(), g = this.exports.ghostty_key_encoder_new(0, B);
|
|
@@ -302,14 +314,14 @@ const _A = class f {
|
|
|
302
314
|
}
|
|
303
315
|
/** For compatibility with old API */
|
|
304
316
|
isDirty() {
|
|
305
|
-
return this.update() !==
|
|
317
|
+
return this.update() !== UA.NONE;
|
|
306
318
|
}
|
|
307
319
|
/**
|
|
308
320
|
* Check if a full redraw is needed (screen change, resize, etc.)
|
|
309
321
|
* Note: This calls update() to ensure fresh state. Safe to call multiple times.
|
|
310
322
|
*/
|
|
311
323
|
needsFullRedraw() {
|
|
312
|
-
return this.update() ===
|
|
324
|
+
return this.update() === UA.FULL;
|
|
313
325
|
}
|
|
314
326
|
/** Mark render state as clean after rendering */
|
|
315
327
|
clearDirty() {
|
|
@@ -509,7 +521,7 @@ const _A = class f {
|
|
|
509
521
|
}
|
|
510
522
|
};
|
|
511
523
|
_A.CELL_SIZE = 16;
|
|
512
|
-
let
|
|
524
|
+
let rQ = _A;
|
|
513
525
|
class O {
|
|
514
526
|
constructor() {
|
|
515
527
|
this.listeners = [], this.event = (A) => (this.listeners.push(A), {
|
|
@@ -527,7 +539,7 @@ class O {
|
|
|
527
539
|
this.listeners = [];
|
|
528
540
|
}
|
|
529
541
|
}
|
|
530
|
-
class
|
|
542
|
+
class nQ {
|
|
531
543
|
constructor(A) {
|
|
532
544
|
this.bufferChangeEmitter = new O(), this.terminal = A;
|
|
533
545
|
}
|
|
@@ -568,7 +580,7 @@ class bA {
|
|
|
568
580
|
hyperlink_id: 0,
|
|
569
581
|
grapheme_len: 0
|
|
570
582
|
};
|
|
571
|
-
this.nullCell = new
|
|
583
|
+
this.nullCell = new yA(g, 0);
|
|
572
584
|
}
|
|
573
585
|
get type() {
|
|
574
586
|
return this.bufferType;
|
|
@@ -603,7 +615,7 @@ class bA {
|
|
|
603
615
|
} else
|
|
604
616
|
C = this.bufferType === "normal" ? A - g : A, E = B.getLine(C), I = B.isRowWrapped(C);
|
|
605
617
|
if (E)
|
|
606
|
-
return new
|
|
618
|
+
return new lQ(E, I, B.cols);
|
|
607
619
|
}
|
|
608
620
|
getNullCell() {
|
|
609
621
|
return this.nullCell;
|
|
@@ -612,7 +624,7 @@ class bA {
|
|
|
612
624
|
return this.terminal.wasmTerm;
|
|
613
625
|
}
|
|
614
626
|
}
|
|
615
|
-
class
|
|
627
|
+
class lQ {
|
|
616
628
|
constructor(A, B, g) {
|
|
617
629
|
this.cells = A, this._isWrapped = B, this._length = g;
|
|
618
630
|
}
|
|
@@ -624,7 +636,7 @@ class nQ {
|
|
|
624
636
|
}
|
|
625
637
|
getCell(A) {
|
|
626
638
|
if (!(A < 0 || A >= this._length))
|
|
627
|
-
return A >= this.cells.length ? new
|
|
639
|
+
return A >= this.cells.length ? new yA(
|
|
628
640
|
{
|
|
629
641
|
codepoint: 0,
|
|
630
642
|
fg_r: 204,
|
|
@@ -639,7 +651,7 @@ class nQ {
|
|
|
639
651
|
grapheme_len: 0
|
|
640
652
|
},
|
|
641
653
|
A
|
|
642
|
-
) : new
|
|
654
|
+
) : new yA(this.cells[A], A);
|
|
643
655
|
}
|
|
644
656
|
translateToString(A = !1, B = 0, g = this._length) {
|
|
645
657
|
const E = Math.max(0, Math.min(B, this._length)), C = Math.max(E, Math.min(g, this._length));
|
|
@@ -654,7 +666,7 @@ class nQ {
|
|
|
654
666
|
return A && (I = I.trimEnd()), I;
|
|
655
667
|
}
|
|
656
668
|
}
|
|
657
|
-
class
|
|
669
|
+
class yA {
|
|
658
670
|
constructor(A, B) {
|
|
659
671
|
this.cell = A, this.x = B;
|
|
660
672
|
}
|
|
@@ -726,7 +738,7 @@ class UA {
|
|
|
726
738
|
return (this.cell.flags & n.FAINT) !== 0;
|
|
727
739
|
}
|
|
728
740
|
}
|
|
729
|
-
const
|
|
741
|
+
const qQ = {
|
|
730
742
|
// Letters
|
|
731
743
|
KeyA: o.A,
|
|
732
744
|
KeyB: o.B,
|
|
@@ -847,7 +859,7 @@ const lQ = {
|
|
|
847
859
|
F23: o.F23,
|
|
848
860
|
F24: o.F24
|
|
849
861
|
};
|
|
850
|
-
class
|
|
862
|
+
class YQ {
|
|
851
863
|
/**
|
|
852
864
|
* Create a new InputHandler
|
|
853
865
|
* @param ghostty - Ghostty instance (for creating KeyEncoder)
|
|
@@ -879,7 +891,7 @@ class qQ {
|
|
|
879
891
|
* @returns Key enum value or null if unmapped
|
|
880
892
|
*/
|
|
881
893
|
mapKeyCode(A) {
|
|
882
|
-
return
|
|
894
|
+
return qQ[A] ?? null;
|
|
883
895
|
}
|
|
884
896
|
/**
|
|
885
897
|
* Extract modifier flags from KeyboardEvent
|
|
@@ -1070,7 +1082,7 @@ class qQ {
|
|
|
1070
1082
|
return !this.isDisposed;
|
|
1071
1083
|
}
|
|
1072
1084
|
}
|
|
1073
|
-
class
|
|
1085
|
+
class LQ {
|
|
1074
1086
|
// Terminal instance for buffer access
|
|
1075
1087
|
constructor(A) {
|
|
1076
1088
|
this.terminal = A, this.providers = [], this.linkCache = /* @__PURE__ */ new Map(), this.scannedRows = /* @__PURE__ */ new Set();
|
|
@@ -1185,7 +1197,7 @@ class YQ {
|
|
|
1185
1197
|
this.providers = [];
|
|
1186
1198
|
}
|
|
1187
1199
|
}
|
|
1188
|
-
class
|
|
1200
|
+
class RQ {
|
|
1189
1201
|
constructor(A) {
|
|
1190
1202
|
this.terminal = A;
|
|
1191
1203
|
}
|
|
@@ -1360,7 +1372,7 @@ const nA = class IA {
|
|
|
1360
1372
|
};
|
|
1361
1373
|
nA.URL_REGEX = /(?:https?:\/\/|mailto:|ftp:\/\/|ssh:\/\/|git:\/\/|tel:|magnet:|gemini:\/\/|gopher:\/\/|news:)[\w\-.~:\/?#@!$&*+,;=%]+/gi;
|
|
1362
1374
|
nA.TRAILING_PUNCTUATION = /[.,;!?)\]]+$/;
|
|
1363
|
-
let
|
|
1375
|
+
let SQ = nA;
|
|
1364
1376
|
const fA = {
|
|
1365
1377
|
foreground: "#d4d4d4",
|
|
1366
1378
|
background: "#1e1e1e",
|
|
@@ -1387,7 +1399,7 @@ const fA = {
|
|
|
1387
1399
|
brightCyan: "#29b8db",
|
|
1388
1400
|
brightWhite: "#ffffff"
|
|
1389
1401
|
};
|
|
1390
|
-
class
|
|
1402
|
+
class OQ {
|
|
1391
1403
|
constructor(A, B = {}) {
|
|
1392
1404
|
this.cursorVisible = !0, this.lastCursorPosition = { x: 0, y: 0 }, this.lastViewportY = 0, this.currentBuffer = null, this.currentSelectionCoords = null, this.hoveredHyperlinkId = 0, this.previousHoveredHyperlinkId = 0, this.hoveredLinkRange = null, this.previousHoveredLinkRange = null, this.canvas = A;
|
|
1393
1405
|
const g = A.getContext("2d", { alpha: !0 });
|
|
@@ -1776,7 +1788,7 @@ class SQ {
|
|
|
1776
1788
|
this.stopCursorBlink();
|
|
1777
1789
|
}
|
|
1778
1790
|
}
|
|
1779
|
-
const
|
|
1791
|
+
const kA = class hA {
|
|
1780
1792
|
// ms between scroll steps
|
|
1781
1793
|
constructor(A, B, g, E) {
|
|
1782
1794
|
this.selectionStart = null, this.selectionEnd = null, this.isSelecting = !1, this.mouseDownTarget = null, this.dirtySelectionRows = /* @__PURE__ */ new Set(), this.selectionChangedEmitter = new O(), this.boundMouseUpHandler = null, this.boundContextMenuHandler = null, this.boundClickHandler = null, this.boundDocumentMouseMoveHandler = null, this.autoScrollInterval = null, this.autoScrollDirection = 0, this.terminal = A, this.renderer = B, this.wasmTerm = g, this.textarea = E, this.attachEventListeners();
|
|
@@ -2147,11 +2159,11 @@ const cA = class hA {
|
|
|
2147
2159
|
requestRender() {
|
|
2148
2160
|
}
|
|
2149
2161
|
};
|
|
2150
|
-
|
|
2151
|
-
|
|
2152
|
-
|
|
2153
|
-
let
|
|
2154
|
-
class
|
|
2162
|
+
kA.AUTO_SCROLL_EDGE_SIZE = 30;
|
|
2163
|
+
kA.AUTO_SCROLL_SPEED = 3;
|
|
2164
|
+
kA.AUTO_SCROLL_INTERVAL = 50;
|
|
2165
|
+
let HQ = kA;
|
|
2166
|
+
class pQ {
|
|
2155
2167
|
// 200ms fade animation
|
|
2156
2168
|
constructor(A = {}) {
|
|
2157
2169
|
this.unicode = {
|
|
@@ -2247,7 +2259,7 @@ class HQ {
|
|
|
2247
2259
|
}
|
|
2248
2260
|
}, this.handleMouseUp = () => {
|
|
2249
2261
|
this.isDraggingScrollbar && (this.isDraggingScrollbar = !1, this.scrollbarDragStart = null, this.canvas && (this.canvas.style.userSelect = "", this.canvas.style.webkitUserSelect = ""), this.scrollbarVisible && this.getScrollbackLength() > 0 && this.showScrollbar());
|
|
2250
|
-
}, this.ghostty = A.ghostty ??
|
|
2262
|
+
}, this.ghostty = A.ghostty ?? uQ();
|
|
2251
2263
|
const B = {
|
|
2252
2264
|
cols: A.cols ?? 80,
|
|
2253
2265
|
rows: A.rows ?? 24,
|
|
@@ -2268,7 +2280,7 @@ class HQ {
|
|
|
2268
2280
|
const I = g[E];
|
|
2269
2281
|
return g[E] = C, this.isOpen && this.handleOptionChange(E, C, I), !0;
|
|
2270
2282
|
}
|
|
2271
|
-
}), this.cols = this.options.cols, this.rows = this.options.rows, this.buffer = new
|
|
2283
|
+
}), this.cols = this.options.cols, this.rows = this.options.rows, this.buffer = new nQ(this);
|
|
2272
2284
|
}
|
|
2273
2285
|
// ==========================================================================
|
|
2274
2286
|
// Option Change Handling (for mutable options)
|
|
@@ -2389,13 +2401,13 @@ class HQ {
|
|
|
2389
2401
|
E.preventDefault(), g.focus();
|
|
2390
2402
|
}), this.canvas.addEventListener("touchend", (E) => {
|
|
2391
2403
|
E.preventDefault(), g.focus();
|
|
2392
|
-
}), this.renderer = new
|
|
2404
|
+
}), this.renderer = new OQ(this.canvas, {
|
|
2393
2405
|
fontSize: this.options.fontSize,
|
|
2394
2406
|
fontFamily: this.options.fontFamily,
|
|
2395
2407
|
cursorStyle: this.options.cursorStyle,
|
|
2396
2408
|
cursorBlink: this.options.cursorBlink,
|
|
2397
2409
|
theme: this.options.theme
|
|
2398
|
-
}), this.renderer.resize(this.cols, this.rows), this.inputHandler = new
|
|
2410
|
+
}), this.renderer.resize(this.cols, this.rows), this.inputHandler = new YQ(
|
|
2399
2411
|
this.ghostty,
|
|
2400
2412
|
A,
|
|
2401
2413
|
(E) => {
|
|
@@ -2412,7 +2424,7 @@ class HQ {
|
|
|
2412
2424
|
var C;
|
|
2413
2425
|
return ((C = this.wasmTerm) == null ? void 0 : C.getMode(E, !1)) ?? !1;
|
|
2414
2426
|
}
|
|
2415
|
-
), this.selectionManager = new
|
|
2427
|
+
), this.selectionManager = new HQ(
|
|
2416
2428
|
this,
|
|
2417
2429
|
this.renderer,
|
|
2418
2430
|
this.wasmTerm,
|
|
@@ -2424,7 +2436,7 @@ class HQ {
|
|
|
2424
2436
|
E.preventDefault(), E.stopPropagation();
|
|
2425
2437
|
const I = (C = E.clipboardData) == null ? void 0 : C.getData("text");
|
|
2426
2438
|
I && this.paste(I);
|
|
2427
|
-
}), this.linkDetector = new
|
|
2439
|
+
}), this.linkDetector = new LQ(this), this.linkDetector.registerProvider(new RQ(this)), this.linkDetector.registerProvider(new SQ(this)), A.addEventListener("mousedown", this.handleMouseDown, { capture: !0 }), A.addEventListener("mousemove", this.handleMouseMove), A.addEventListener("mouseleave", this.handleMouseLeave), A.addEventListener("click", this.handleClick), document.addEventListener("mouseup", this.handleMouseUp), A.addEventListener("wheel", this.handleWheel, { passive: !1, capture: !0 }), this.renderer.render(this.wasmTerm, !0, this.viewportY, this, this.scrollbarOpacity), this.startRenderLoop(), this.focus();
|
|
2428
2440
|
} catch (B) {
|
|
2429
2441
|
throw this.isOpen = !1, this.cleanupComponents(), new Error(`Failed to open terminal: ${B}`);
|
|
2430
2442
|
}
|
|
@@ -2888,8 +2900,8 @@ class HQ {
|
|
|
2888
2900
|
return this.assertOpen(), this.wasmTerm.hasMouseTracking();
|
|
2889
2901
|
}
|
|
2890
2902
|
}
|
|
2891
|
-
const
|
|
2892
|
-
class
|
|
2903
|
+
const xQ = 2, dQ = 1, TQ = 15, mQ = 100;
|
|
2904
|
+
class bQ {
|
|
2893
2905
|
constructor() {
|
|
2894
2906
|
this._isResizing = !1;
|
|
2895
2907
|
}
|
|
@@ -2956,7 +2968,7 @@ class mQ {
|
|
|
2956
2968
|
const C = window.getComputedStyle(E), I = Number.parseInt(C.getPropertyValue("padding-top")) || 0, D = Number.parseInt(C.getPropertyValue("padding-bottom")) || 0, i = Number.parseInt(C.getPropertyValue("padding-left")) || 0, s = Number.parseInt(C.getPropertyValue("padding-right")) || 0, M = E.clientWidth, c = E.clientHeight;
|
|
2957
2969
|
if (M === 0 || c === 0)
|
|
2958
2970
|
return;
|
|
2959
|
-
const t = M - i - s -
|
|
2971
|
+
const t = M - i - s - TQ, w = c - I - D, e = Math.max(xQ, Math.floor(t / g.width)), J = Math.max(dQ, Math.floor(w / g.height));
|
|
2960
2972
|
return { cols: e, rows: J };
|
|
2961
2973
|
}
|
|
2962
2974
|
/**
|
|
@@ -2973,15 +2985,15 @@ class mQ {
|
|
|
2973
2985
|
(A = this._terminal) != null && A.element && (this._resizeObserver || (this._resizeObserver = new ResizeObserver((B) => {
|
|
2974
2986
|
this._isResizing || !B[0] || (this._resizeDebounceTimer && clearTimeout(this._resizeDebounceTimer), this._resizeDebounceTimer = setTimeout(() => {
|
|
2975
2987
|
this.fit();
|
|
2976
|
-
},
|
|
2988
|
+
}, mQ));
|
|
2977
2989
|
}), this._resizeObserver.observe(this._terminal.element)));
|
|
2978
2990
|
}
|
|
2979
2991
|
}
|
|
2980
2992
|
let NA = null;
|
|
2981
|
-
async function
|
|
2993
|
+
async function fQ() {
|
|
2982
2994
|
NA || (NA = await oA.load());
|
|
2983
2995
|
}
|
|
2984
|
-
function
|
|
2996
|
+
function uQ() {
|
|
2985
2997
|
if (!NA)
|
|
2986
2998
|
throw new Error(
|
|
2987
2999
|
`ghostty-web not initialized. Call init() before creating Terminal instances.
|
|
@@ -2997,16 +3009,16 @@ For tests, pass a Ghostty instance directly:
|
|
|
2997
3009
|
);
|
|
2998
3010
|
return NA;
|
|
2999
3011
|
}
|
|
3000
|
-
let
|
|
3001
|
-
const
|
|
3012
|
+
let zQ = null;
|
|
3013
|
+
const VQ = () => zQ ?? (zQ = fQ()), WQ = {
|
|
3002
3014
|
background: "#0b0b0d",
|
|
3003
3015
|
foreground: "#d4d4d8",
|
|
3004
3016
|
cursor: "#fafafa",
|
|
3005
3017
|
cursorAccent: "#0b0b0d",
|
|
3006
3018
|
selectionBackground: "#3f3f46",
|
|
3007
3019
|
selectionForeground: "#fafafa"
|
|
3008
|
-
},
|
|
3009
|
-
function
|
|
3020
|
+
}, KA = 1;
|
|
3021
|
+
function ZQ(Q, A, B = 8) {
|
|
3010
3022
|
const g = /* @__PURE__ */ new Set(), E = [];
|
|
3011
3023
|
for (let I = A.length - 1; I >= 0; I--) {
|
|
3012
3024
|
const D = A[I];
|
|
@@ -3083,9 +3095,9 @@ const F = {
|
|
|
3083
3095
|
{ id: "delete", hint: "x", label: "Del", desc: "delete", sequence: F.delete, ariaLabel: "Delete" }
|
|
3084
3096
|
]
|
|
3085
3097
|
}
|
|
3086
|
-
],
|
|
3098
|
+
], vQ = new Map(
|
|
3087
3099
|
$A.flatMap((Q) => Q.keys.map((A) => [A.hint, A]))
|
|
3088
|
-
), p = { insert: "i", paste: "P", repeat: ".", command: ":", stick: "s" }, uA = "lfg_term_deck_sticky",
|
|
3100
|
+
), p = { insert: "i", paste: "P", repeat: ".", command: ":", stick: "s" }, uA = "lfg_term_deck_sticky", jQ = {
|
|
3089
3101
|
esc: F.esc,
|
|
3090
3102
|
escape: F.esc,
|
|
3091
3103
|
tab: F.tab,
|
|
@@ -3113,7 +3125,7 @@ const F = {
|
|
|
3113
3125
|
pagedown: F.pageDown,
|
|
3114
3126
|
"page-down": F.pageDown,
|
|
3115
3127
|
space: " "
|
|
3116
|
-
},
|
|
3128
|
+
}, PQ = {
|
|
3117
3129
|
f1: "\x1BOP",
|
|
3118
3130
|
f2: "\x1BOQ",
|
|
3119
3131
|
f3: "\x1BOR",
|
|
@@ -3126,7 +3138,7 @@ const F = {
|
|
|
3126
3138
|
f10: "\x1B[21~",
|
|
3127
3139
|
f11: "\x1B[23~",
|
|
3128
3140
|
f12: "\x1B[24~"
|
|
3129
|
-
},
|
|
3141
|
+
}, XQ = {
|
|
3130
3142
|
"↑": "up",
|
|
3131
3143
|
"↓": "down",
|
|
3132
3144
|
"←": "left",
|
|
@@ -3142,22 +3154,22 @@ const F = {
|
|
|
3142
3154
|
"page-down": "pagedown"
|
|
3143
3155
|
};
|
|
3144
3156
|
function lA(Q) {
|
|
3145
|
-
return
|
|
3157
|
+
return XQ[Q] ?? Q;
|
|
3146
3158
|
}
|
|
3147
3159
|
function zA(Q) {
|
|
3148
3160
|
const A = lA(Q);
|
|
3149
3161
|
return /^[a-z]$/.test(A) ? String.fromCharCode(A.toUpperCase().charCodeAt(0) - 64) : A === "space" || A === "@" ? "\0" : A === "[" || A === "esc" ? "\x1B" : A === "\\" ? "" : A === "]" ? "" : A === "^" ? "" : A === "_" ? "" : A === "?" ? "" : null;
|
|
3150
3162
|
}
|
|
3151
|
-
function
|
|
3163
|
+
function _Q(Q, A) {
|
|
3152
3164
|
if (!A.alt && !A.ctrl) return null;
|
|
3153
3165
|
const B = lA(Q), g = 1 + (A.alt ? 2 : 0) + (A.ctrl ? 4 : 0);
|
|
3154
3166
|
return B === "up" ? `\x1B[1;${g}A` : B === "down" ? `\x1B[1;${g}B` : B === "right" ? `\x1B[1;${g}C` : B === "left" ? `\x1B[1;${g}D` : B === "home" ? `\x1B[1;${g}H` : B === "end" ? `\x1B[1;${g}F` : null;
|
|
3155
3167
|
}
|
|
3156
|
-
function
|
|
3168
|
+
function $Q(Q) {
|
|
3157
3169
|
const A = lA(Q);
|
|
3158
|
-
return A.length === 1 ? A :
|
|
3170
|
+
return A.length === 1 ? A : jQ[A] ?? PQ[A] ?? null;
|
|
3159
3171
|
}
|
|
3160
|
-
function
|
|
3172
|
+
function AB(Q) {
|
|
3161
3173
|
const A = Q.trim();
|
|
3162
3174
|
if (!A) return null;
|
|
3163
3175
|
const B = A.replace(/[+]/g, "+").replace(/\s*\+\s*/g, "+").replace(/\s+/g, "+").toLowerCase();
|
|
@@ -3170,16 +3182,16 @@ function $Q(Q) {
|
|
|
3170
3182
|
M === "alt" || M === "option" || M === "opt" ? E = !0 : M === "ctrl" || M === "control" || M === "ctl" ? C = !0 : I.push(M);
|
|
3171
3183
|
const D = I.join("+");
|
|
3172
3184
|
if (!D) return null;
|
|
3173
|
-
const i =
|
|
3185
|
+
const i = _Q(D, { alt: E, ctrl: C });
|
|
3174
3186
|
if (i) return i;
|
|
3175
|
-
const s = C ? zA(D) :
|
|
3187
|
+
const s = C ? zA(D) : $Q(D);
|
|
3176
3188
|
return s == null ? null : E ? `\x1B${s}` : s;
|
|
3177
3189
|
}
|
|
3178
|
-
function
|
|
3190
|
+
function GA(Q) {
|
|
3179
3191
|
return (Q == null ? void 0 : Q.textarea) ?? null;
|
|
3180
3192
|
}
|
|
3181
3193
|
function AQ(Q) {
|
|
3182
|
-
const A =
|
|
3194
|
+
const A = GA(Q);
|
|
3183
3195
|
if (A) {
|
|
3184
3196
|
A.setAttribute("autocapitalize", "none"), A.setAttribute("autocorrect", "off"), A.setAttribute("autocomplete", "off"), A.setAttribute("spellcheck", "false");
|
|
3185
3197
|
try {
|
|
@@ -3190,11 +3202,11 @@ function AQ(Q) {
|
|
|
3190
3202
|
}
|
|
3191
3203
|
function BA(Q) {
|
|
3192
3204
|
var A;
|
|
3193
|
-
Q && (Q.focus(), AQ(Q), (A =
|
|
3205
|
+
Q && (Q.focus(), AQ(Q), (A = GA(Q)) == null || A.focus());
|
|
3194
3206
|
}
|
|
3195
|
-
function
|
|
3207
|
+
function QB(Q) {
|
|
3196
3208
|
var A;
|
|
3197
|
-
(A =
|
|
3209
|
+
(A = GA(Q)) == null || A.blur(), Q == null || Q.blur();
|
|
3198
3210
|
}
|
|
3199
3211
|
function W(Q) {
|
|
3200
3212
|
try {
|
|
@@ -3225,22 +3237,22 @@ function v(Q) {
|
|
|
3225
3237
|
function WA(Q) {
|
|
3226
3238
|
return Q === 0 ? 0 : Q === 1 ? 1 : Q === 2 ? 2 : null;
|
|
3227
3239
|
}
|
|
3228
|
-
function
|
|
3240
|
+
function BB(Q) {
|
|
3229
3241
|
return Q & 1 ? 0 : Q & 4 ? 1 : Q & 2 ? 2 : null;
|
|
3230
3242
|
}
|
|
3231
3243
|
function ZA(Q, A, B, g, E) {
|
|
3232
3244
|
if (W(Q).sgr) return `\x1B[<${A};${B};${g}${E}`;
|
|
3233
3245
|
if (B > 223 || g > 223) return "";
|
|
3234
|
-
const I = E === "m" ? 3 +
|
|
3246
|
+
const I = E === "m" ? 3 + gB(A) : A;
|
|
3235
3247
|
return `\x1B[M${String.fromCharCode(32 + I)}${String.fromCharCode(32 + B)}${String.fromCharCode(32 + g)}`;
|
|
3236
3248
|
}
|
|
3237
|
-
function
|
|
3249
|
+
function gB(Q) {
|
|
3238
3250
|
return Q & 28;
|
|
3239
3251
|
}
|
|
3240
3252
|
function j(Q) {
|
|
3241
3253
|
Q.preventDefault(), Q.stopPropagation(), "stopImmediatePropagation" in Q && Q.stopImmediatePropagation();
|
|
3242
3254
|
}
|
|
3243
|
-
function
|
|
3255
|
+
function EB(Q, A, B) {
|
|
3244
3256
|
let g = 0;
|
|
3245
3257
|
const E = (t, w, e, J) => {
|
|
3246
3258
|
const y = VA(A, t, w);
|
|
@@ -3255,7 +3267,7 @@ function gB(Q, A, B) {
|
|
|
3255
3267
|
}, I = (t) => {
|
|
3256
3268
|
const w = W(A);
|
|
3257
3269
|
if (!w.enabled || !w.drag && !w.any) return;
|
|
3258
|
-
const e =
|
|
3270
|
+
const e = BB(t.buttons);
|
|
3259
3271
|
if (e == null && !w.any) return;
|
|
3260
3272
|
const J = (e ?? 3) + 32 + v(t);
|
|
3261
3273
|
E(t.clientX, t.clientY, J, "M") && j(t);
|
|
@@ -3326,7 +3338,7 @@ function MA({
|
|
|
3326
3338
|
}
|
|
3327
3339
|
);
|
|
3328
3340
|
}
|
|
3329
|
-
function
|
|
3341
|
+
function CB({
|
|
3330
3342
|
open: Q,
|
|
3331
3343
|
sticky: A,
|
|
3332
3344
|
lastKey: B,
|
|
@@ -3348,7 +3360,7 @@ function EB({
|
|
|
3348
3360
|
(a) => {
|
|
3349
3361
|
var U;
|
|
3350
3362
|
a == null || a.preventDefault();
|
|
3351
|
-
const G =
|
|
3363
|
+
const G = AB(c);
|
|
3352
3364
|
if (G == null) {
|
|
3353
3365
|
e(!0), (U = J.current) == null || U.focus();
|
|
3354
3366
|
return;
|
|
@@ -3365,7 +3377,7 @@ function EB({
|
|
|
3365
3377
|
return;
|
|
3366
3378
|
}
|
|
3367
3379
|
if (s === "command" || G.metaKey || G.ctrlKey || G.altKey) return;
|
|
3368
|
-
const U =
|
|
3380
|
+
const U = vQ.get(G.key), l = () => {
|
|
3369
3381
|
G.preventDefault(), G.stopPropagation();
|
|
3370
3382
|
};
|
|
3371
3383
|
if (U) {
|
|
@@ -3420,7 +3432,7 @@ function EB({
|
|
|
3420
3432
|
title: A ? "Unstick — close after each key (s)" : "Stick open — stay open after a key (s)",
|
|
3421
3433
|
"aria-label": A ? "Unstick key deck" : "Stick key deck open",
|
|
3422
3434
|
className: `grid size-7 place-items-center rounded-md ${A ? "bg-white text-black" : "bg-white/10 text-white/60 active:bg-white/25"}`,
|
|
3423
|
-
children: A ? /* @__PURE__ */ k(hQ, { className: "size-3.5" }) : /* @__PURE__ */ k(
|
|
3435
|
+
children: A ? /* @__PURE__ */ k(hQ, { className: "size-3.5" }) : /* @__PURE__ */ k(JQ, { className: "size-3.5" })
|
|
3424
3436
|
}
|
|
3425
3437
|
),
|
|
3426
3438
|
/* @__PURE__ */ k(
|
|
@@ -3493,7 +3505,7 @@ function EB({
|
|
|
3493
3505
|
className: "grid size-7 shrink-0 place-items-center rounded-md bg-white/10 text-white/85 active:bg-white/25",
|
|
3494
3506
|
"aria-label": "Send terminal key",
|
|
3495
3507
|
title: "Send terminal key",
|
|
3496
|
-
children: /* @__PURE__ */ k(
|
|
3508
|
+
children: /* @__PURE__ */ k(UQ, { className: "size-3.5" })
|
|
3497
3509
|
}
|
|
3498
3510
|
),
|
|
3499
3511
|
/* @__PURE__ */ k(
|
|
@@ -3560,7 +3572,7 @@ function iB({
|
|
|
3560
3572
|
} = {}) {
|
|
3561
3573
|
const [g, E] = L(() => localStorage.getItem("lfg_term_session") || "main"), C = S(null), I = S(null), D = S(null), [i, s] = L("connecting"), [M, c] = L([]), [t, w] = L(null), [e, J] = L(!1), [y, a] = L(!1), [G, U] = L(null), [l, P] = L(!1), [X, iA] = L(
|
|
3562
3574
|
() => localStorage.getItem(uA) === "1"
|
|
3563
|
-
), [QQ, BQ] = L(null), wA = S(null), Z = S(null),
|
|
3575
|
+
), [QQ, BQ] = L(null), wA = S(null), Z = S(null), FA = S(!1), qA = S(null), gA = S(null), YA = S(!1), EA = S(!1), JA = S(!1), sA = Q ? `sessionId=${encodeURIComponent(Q)}` : `session=${encodeURIComponent(g)}`;
|
|
3564
3576
|
x(() => {
|
|
3565
3577
|
if (Q) return;
|
|
3566
3578
|
const N = () => E(localStorage.getItem("lfg_term_session") || "main");
|
|
@@ -3570,11 +3582,11 @@ function iB({
|
|
|
3570
3582
|
YA.current = N, a(N);
|
|
3571
3583
|
}, []), H = Y((N) => {
|
|
3572
3584
|
const h = I.current;
|
|
3573
|
-
h && h.readyState ===
|
|
3585
|
+
h && h.readyState === KA && h.send(new TextEncoder().encode(N));
|
|
3574
3586
|
}, []), d = Y(() => {
|
|
3575
3587
|
wA.current && (clearTimeout(wA.current), wA.current = null);
|
|
3576
3588
|
}, []), _ = Y(() => {
|
|
3577
|
-
EA.current || (EA.current = !0,
|
|
3589
|
+
EA.current || (EA.current = !0, JA.current = YA.current, QB(D.current), u(!1), P(!0));
|
|
3578
3590
|
}, [u]), gQ = Y(
|
|
3579
3591
|
(N) => {
|
|
3580
3592
|
var T;
|
|
@@ -3582,7 +3594,7 @@ function iB({
|
|
|
3582
3594
|
if (!h) return;
|
|
3583
3595
|
Z.current = { x: h.clientX, y: h.clientY };
|
|
3584
3596
|
const q = (T = C.current) == null ? void 0 : T.getBoundingClientRect();
|
|
3585
|
-
|
|
3597
|
+
FA.current = !!q && h.clientY >= q.bottom - 36, d(), wA.current = setTimeout(
|
|
3586
3598
|
() => w({ x: h.clientX, y: h.clientY }),
|
|
3587
3599
|
450
|
|
3588
3600
|
);
|
|
@@ -3593,8 +3605,8 @@ function iB({
|
|
|
3593
3605
|
const h = N.touches[0];
|
|
3594
3606
|
if (!h || !Z.current) return;
|
|
3595
3607
|
const q = Z.current.y - h.clientY;
|
|
3596
|
-
if (
|
|
3597
|
-
|
|
3608
|
+
if (FA.current && q > 28 && Math.abs(h.clientX - Z.current.x) < 48) {
|
|
3609
|
+
FA.current = !1, Z.current = null, d(), _();
|
|
3598
3610
|
return;
|
|
3599
3611
|
}
|
|
3600
3612
|
Math.hypot(h.clientX - Z.current.x, h.clientY - Z.current.y) > 12 && d();
|
|
@@ -3616,9 +3628,9 @@ function iB({
|
|
|
3616
3628
|
const N = ((h = qA.current) == null ? void 0 : h.value) ?? "";
|
|
3617
3629
|
N && H(N), J(!1), BA(D.current);
|
|
3618
3630
|
}, [H]), $ = Y(() => {
|
|
3619
|
-
EA.current = !1, P(!1),
|
|
3631
|
+
EA.current = !1, P(!1), JA.current && (BA(D.current), u(!0));
|
|
3620
3632
|
}, [u]), CQ = Y(() => {
|
|
3621
|
-
|
|
3633
|
+
JA.current = !0, EA.current = !1, P(!1), BA(D.current), u(!0);
|
|
3622
3634
|
}, [u]), IQ = Y(() => {
|
|
3623
3635
|
iA((N) => {
|
|
3624
3636
|
const h = !N;
|
|
@@ -3693,14 +3705,14 @@ function iB({
|
|
|
3693
3705
|
});
|
|
3694
3706
|
}
|
|
3695
3707
|
return (async () => {
|
|
3696
|
-
if (await
|
|
3697
|
-
h = new
|
|
3708
|
+
if (await VQ(), N || !C.current) return;
|
|
3709
|
+
h = new pQ({
|
|
3698
3710
|
fontSize: 13,
|
|
3699
3711
|
scrollback: 8e3,
|
|
3700
3712
|
cursorBlink: !0,
|
|
3701
|
-
theme:
|
|
3702
|
-
}), q = new
|
|
3703
|
-
const K =
|
|
3713
|
+
theme: WQ
|
|
3714
|
+
}), q = new bQ(), h.loadAddon(q), h.open(C.current), AA = EB(C.current, h, H), AQ(h);
|
|
3715
|
+
const K = GA(h), z = () => u(!0), aA = () => u(!1);
|
|
3704
3716
|
C.current.addEventListener("focusin", z), C.current.addEventListener("focusout", aA), K == null || K.addEventListener("focus", z), K == null || K.addEventListener("blur", aA), tA = () => {
|
|
3705
3717
|
var b, R;
|
|
3706
3718
|
(b = C.current) == null || b.removeEventListener("focusin", z), (R = C.current) == null || R.removeEventListener("focusout", aA), K == null || K.removeEventListener("focus", z), K == null || K.removeEventListener("blur", aA);
|
|
@@ -3711,10 +3723,10 @@ function iB({
|
|
|
3711
3723
|
}
|
|
3712
3724
|
D.current = h, h.onData((b) => {
|
|
3713
3725
|
const R = I.current;
|
|
3714
|
-
R && R.readyState ===
|
|
3726
|
+
R && R.readyState === KA && R.send(new TextEncoder().encode(b));
|
|
3715
3727
|
}), h.onResize(({ cols: b, rows: R }) => {
|
|
3716
3728
|
const QA = I.current;
|
|
3717
|
-
QA && QA.readyState ===
|
|
3729
|
+
QA && QA.readyState === KA && QA.send(JSON.stringify({ t: "resize", cols: b, rows: R }));
|
|
3718
3730
|
});
|
|
3719
3731
|
let pA = 0, xA = 0;
|
|
3720
3732
|
T = new ResizeObserver((b) => {
|
|
@@ -3760,7 +3772,7 @@ function iB({
|
|
|
3760
3772
|
const h = async () => {
|
|
3761
3773
|
try {
|
|
3762
3774
|
const m = await (await MQ(`/api/term/scan?${sA}`)).json();
|
|
3763
|
-
N && Array.isArray(m.urls) && m.urls.length && c((AA) =>
|
|
3775
|
+
N && Array.isArray(m.urls) && m.urls.length && c((AA) => ZQ(AA, m.urls));
|
|
3764
3776
|
} catch {
|
|
3765
3777
|
}
|
|
3766
3778
|
};
|
|
@@ -3914,7 +3926,7 @@ function iB({
|
|
|
3914
3926
|
}
|
|
3915
3927
|
),
|
|
3916
3928
|
/* @__PURE__ */ k(
|
|
3917
|
-
|
|
3929
|
+
CB,
|
|
3918
3930
|
{
|
|
3919
3931
|
open: l,
|
|
3920
3932
|
sticky: X,
|