Compare commits

...
Author SHA1 Message Date
Brendonovich 04cac17e71 chore(app): update ghostty-web 2026-09-10 09:57:49 +00:00
4 changed files with 3 additions and 198 deletions
+2 -3
View File
@@ -84,7 +84,7 @@
"@tanstack/solid-virtual": "catalog:",
"effect": "catalog:",
"fuzzysort": "catalog:",
"ghostty-web": "github:anomalyco/ghostty-web#83c0a07b8628b748aed073b232cb4b52a6ca11c1",
"ghostty-web": "github:anomalyco/ghostty-web#6e24d040458ddd7aae81572fe2901deec32f9fe7",
"luxon": "catalog:",
"qr-scanner": "1.4.2",
"remeda": "catalog:",
@@ -1081,7 +1081,6 @@
"@pierre/trees@1.0.0-beta.4": "patches/@pierre%2Ftrees@1.0.0-beta.4.patch",
"@tanstack/virtual-core@3.17.8": "patches/@tanstack%2Fvirtual-core@3.17.8.patch",
"@modelcontextprotocol/sdk@1.29.0": "patches/@modelcontextprotocol%2Fsdk@1.29.0.patch",
"ghostty-web@github:anomalyco/ghostty-web#83c0a07": "patches/ghostty-web@0.3.0.patch",
"@standard-community/standard-openapi@0.2.9": "patches/@standard-community%2Fstandard-openapi@0.2.9.patch",
"@ai-sdk/mistral@3.0.51": "patches/@ai-sdk%2Fmistral@3.0.51.patch",
"@npmcli/agent@4.0.2": "patches/@npmcli%2Fagent@4.0.2.patch",
@@ -4204,7 +4203,7 @@
"get-tsconfig": ["get-tsconfig@4.14.3", "", { "dependencies": { "resolve-pkg-maps": "^1.0.0" } }, "sha512-++QEw4DIY7WGoukz+/+A/8dGYPT9l9yIadnmSgZ8Rjr3YVSVDipQSO9CdnJo9ePqFqUUqh+wk9uIaoiAwsiPkA=="],
"ghostty-web": ["ghostty-web@github:anomalyco/ghostty-web#83c0a07", {}, "anomalyco-ghostty-web-83c0a07", "sha512-Lf2v1agHkVUpMpHBWWuCZrhOEmcwwin5/Hboc9rZwQ7/CKkIh5rU1r1CvfLlhkMoFv+ed8z52RZ8hkzGZZj3MQ=="],
"ghostty-web": ["ghostty-web@github:anomalyco/ghostty-web#6e24d04", {}, "anomalyco-ghostty-web-6e24d04", "sha512-svnTv7Djx1QbZHr2H2Fxqp/LqkMwZB19x7ln4IOSYxlCs2wN1fTC3QRrknxtuPxDznfjV7eVBGps+Foa2v2YnQ=="],
"github-slugger": ["github-slugger@2.0.0", "", {}, "sha512-IaOQ9puYtjrkq7Y0Ygl9KDZnrf/aiUJYUpVf89y8kyaxbRG7Y1SrX/jaumrv81vc61+kiMempujsM3Yw7w5qcw=="],
-1
View File
@@ -177,7 +177,6 @@
"@modelcontextprotocol/sdk@1.29.0": "patches/@modelcontextprotocol%2Fsdk@1.29.0.patch",
"@tanstack/virtual-core@3.17.8": "patches/@tanstack%2Fvirtual-core@3.17.8.patch",
"@ff-labs/fff-bun@0.10.5": "patches/@ff-labs%2Ffff-bun@0.10.5.patch",
"ghostty-web@github:anomalyco/ghostty-web#83c0a07": "patches/ghostty-web@0.3.0.patch",
"vite@8.2.2": "patches/vite@8.2.2.patch"
}
}
+1 -1
View File
@@ -86,7 +86,7 @@
"@tanstack/solid-virtual": "catalog:",
"effect": "catalog:",
"fuzzysort": "catalog:",
"ghostty-web": "github:anomalyco/ghostty-web#83c0a07b8628b748aed073b232cb4b52a6ca11c1",
"ghostty-web": "github:anomalyco/ghostty-web#6e24d040458ddd7aae81572fe2901deec32f9fe7",
"luxon": "catalog:",
"qr-scanner": "1.4.2",
"remeda": "catalog:",
-193
View File
@@ -1,193 +0,0 @@
--- a/dist/ghostty-web.js
+++ b/dist/ghostty-web.js
@@ -1209,7 +1209,7 @@
*/
getMouseModifiers(A) {
let g = 0;
- return A.shiftKey && (g |= 4), A.metaKey && (g |= 8), A.ctrlKey && (g |= 16), g;
+ return A.shiftKey && (g |= 4), A.altKey && (g |= 8), A.ctrlKey && (g |= 16), g;
}
/**
* Encode mouse event as SGR sequence
@@ -1246,7 +1246,7 @@
*/
handleMouseDown(A) {
var C;
- if (this.isDisposed || !((C = this.mouseConfig) != null && C.hasMouseTracking()))
+ if (this.isDisposed || !((C = this.mouseConfig) != null && C.hasMouseTracking()) || A.shiftKey)
return;
const g = this.pixelToCell(A);
if (!g)
@@ -1259,7 +1259,7 @@
*/
handleMouseUp(A) {
var C;
- if (this.isDisposed || !((C = this.mouseConfig) != null && C.hasMouseTracking()))
+ if (this.isDisposed || !((C = this.mouseConfig) != null && C.hasMouseTracking()) || A.shiftKey)
return;
const g = this.pixelToCell(A);
if (!g)
@@ -1272,7 +1272,7 @@
*/
handleMouseMove(A) {
var E, D, i;
- if (this.isDisposed || !((E = this.mouseConfig) != null && E.hasMouseTracking()))
+ if (this.isDisposed || !((E = this.mouseConfig) != null && E.hasMouseTracking()) || A.shiftKey)
return;
const g = ((D = this.getModeCallback) == null ? void 0 : D.call(this, 1002)) ?? !1, I = ((i = this.getModeCallback) == null ? void 0 : i.call(this, 1003)) ?? !1;
if (!g && !I || g && !I && this.mouseButtonsPressed === 0)
@@ -1280,21 +1280,21 @@
const C = this.pixelToCell(A);
if (!C)
return;
- let Q = 32;
- this.mouseButtonsPressed & 1 ? Q += 0 : this.mouseButtonsPressed & 2 ? Q += 1 : this.mouseButtonsPressed & 4 && (Q += 2), this.sendMouseEvent(Q, C.col, C.row, !1, A);
+ let Q = 35;
+ this.mouseButtonsPressed & 1 ? Q = 32 : this.mouseButtonsPressed & 2 ? Q = 33 : this.mouseButtonsPressed & 4 && (Q = 34), this.sendMouseEvent(Q, C.col, C.row, !1, A);
}
/**
* Handle wheel event (scroll)
*/
handleWheel(A) {
- var C;
- if (this.isDisposed || !((C = this.mouseConfig) != null && C.hasMouseTracking()))
+ var Q;
+ if (this.isDisposed || !((Q = this.mouseConfig) != null && Q.hasMouseTracking()) || A.shiftKey)
return;
const g = this.pixelToCell(A);
- if (!g)
+ if (!g || A.deltaX === 0 && A.deltaY === 0)
return;
- const I = A.deltaY < 0 ? 64 : 65;
- this.sendMouseEvent(I, g.col, g.row, !1, A), A.preventDefault();
+ const C = Math.abs(A.deltaX) > Math.abs(A.deltaY) ? A.deltaX < 0 ? 66 : 67 : A.deltaY < 0 ? 64 : 65;
+ this.sendMouseEvent(C, g.col, g.row, !1, A), A.preventDefault();
}
/**
* Emit paste data with bracketed paste support
@@ -2353,7 +2353,7 @@
attachEventListeners() {
const A = this.renderer.getCanvas();
A.addEventListener("mousedown", (g) => {
- if (g.button === 0) {
+ if (!(this.wasmTerm.hasMouseTracking() && !g.shiftKey) && g.button === 0) {
A.parentElement && A.parentElement.focus();
const I = this.pixelToCell(g.offsetX, g.offsetY);
this.hasSelection() && this.clearSelection();
@@ -2408,35 +2408,37 @@
}
}
}, document.addEventListener("mouseup", this.boundMouseUpHandler), A.addEventListener("click", (g) => {
- if (g.detail === 2) {
- const I = this.pixelToCell(g.offsetX, g.offsetY), C = this.getWordAtCell(I.col, I.row);
- if (C) {
- const Q = this.viewportRowToAbsolute(I.row);
- this.selectionStart = { col: C.startCol, absoluteRow: Q }, this.selectionEnd = { col: C.endCol, absoluteRow: Q }, this.requestRender();
- const E = this.getSelection();
- E && (this.copyToClipboard(E), this.selectionChangedEmitter.fire());
- }
- } else if (g.detail >= 3) {
- const I = this.pixelToCell(g.offsetX, g.offsetY), C = this.viewportRowToAbsolute(I.row), Q = this.wasmTerm.getScrollbackLength();
- let E = null;
- if (C < Q)
- E = this.wasmTerm.getScrollbackLine(C);
- else {
- const i = C - Q;
- E = this.wasmTerm.getLine(i);
- }
- let D = -1;
- if (E) {
- for (let i = E.length - 1; i >= 0; i--)
- if (E[i] && E[i].codepoint !== 0 && E[i].codepoint !== 32) {
- D = i;
- break;
- }
- }
- if (D >= 0) {
- this.selectionStart = { col: 0, absoluteRow: C }, this.selectionEnd = { col: D, absoluteRow: C }, this.requestRender();
- const i = this.getSelection();
- i && (this.copyToClipboard(i), this.selectionChangedEmitter.fire());
+ if (!(this.wasmTerm.hasMouseTracking() && !g.shiftKey)) {
+ if (g.detail === 2) {
+ const I = this.pixelToCell(g.offsetX, g.offsetY), C = this.getWordAtCell(I.col, I.row);
+ if (C) {
+ const Q = this.viewportRowToAbsolute(I.row);
+ this.selectionStart = { col: C.startCol, absoluteRow: Q }, this.selectionEnd = { col: C.endCol, absoluteRow: Q }, this.requestRender();
+ const E = this.getSelection();
+ E && (this.copyToClipboard(E), this.selectionChangedEmitter.fire());
+ }
+ } else if (g.detail >= 3) {
+ const I = this.pixelToCell(g.offsetX, g.offsetY), C = this.viewportRowToAbsolute(I.row), Q = this.wasmTerm.getScrollbackLength();
+ let E = null;
+ if (C < Q)
+ E = this.wasmTerm.getScrollbackLine(C);
+ else {
+ const i = C - Q;
+ E = this.wasmTerm.getLine(i);
+ }
+ let D = -1;
+ if (E) {
+ for (let i = E.length - 1; i >= 0; i--)
+ if (E[i] && E[i].codepoint !== 0 && E[i].codepoint !== 32) {
+ D = i;
+ break;
+ }
+ }
+ if (D >= 0) {
+ this.selectionStart = { col: 0, absoluteRow: C }, this.selectionEnd = { col: D, absoluteRow: C }, this.requestRender();
+ const i = this.getSelection();
+ i && (this.copyToClipboard(i), this.selectionChangedEmitter.fire());
+ }
}
}
}), this.boundContextMenuHandler = (g) => {
@@ -2676,23 +2678,27 @@
const M = await this.linkDetector.getLinkAt(Q, o);
M && (M.activate(I), (I.ctrlKey || I.metaKey) && I.preventDefault());
}, this.handleWheel = (I) => {
- var Q, E, D;
- if (I.preventDefault(), I.stopPropagation(), this.customWheelEventHandler && this.customWheelEventHandler(I))
+ var Q, E, D, i;
+ if (I.preventDefault(), this.customWheelEventHandler && this.customWheelEventHandler(I)) {
+ I.stopPropagation();
+ return;
+ }
+ if ((Q = this.wasmTerm) != null && Q.hasMouseTracking() && !I.shiftKey)
return;
- if (((Q = this.wasmTerm) == null ? void 0 : Q.isAlternateScreen()) ?? !1) {
- const i = I.deltaY > 0 ? "down" : "up", o = Math.min(Math.abs(Math.round(I.deltaY / 33)), 5);
- for (let s = 0; s < o; s++)
- i === "up" ? this.dataEmitter.fire("\x1B[A") : this.dataEmitter.fire("\x1B[B");
+ if (I.stopPropagation(), ((E = this.wasmTerm) == null ? void 0 : E.isAlternateScreen()) ?? !1) {
+ const o = I.deltaY > 0 ? "down" : "up", s = Math.min(Math.abs(Math.round(I.deltaY / 33)), 5);
+ for (let G = 0; G < s; G++)
+ o === "up" ? this.dataEmitter.fire("\x1B[A") : this.dataEmitter.fire("\x1B[B");
} else {
- let i;
+ let o;
if (I.deltaMode === WheelEvent.DOM_DELTA_PIXEL) {
- const o = ((D = (E = this.renderer) == null ? void 0 : E.getMetrics()) == null ? void 0 : D.height) ?? 20;
- i = I.deltaY / o;
+ const s = ((i = (D = this.renderer) == null ? void 0 : D.getMetrics()) == null ? void 0 : i.height) ?? 20;
+ o = I.deltaY / s;
} else
- I.deltaMode === WheelEvent.DOM_DELTA_LINE ? i = I.deltaY : I.deltaMode === WheelEvent.DOM_DELTA_PAGE ? i = I.deltaY * this.rows : i = I.deltaY / 33;
- if (i !== 0) {
- const o = this.viewportY - i;
- this.smoothScrollTo(o);
+ I.deltaMode === WheelEvent.DOM_DELTA_LINE ? o = I.deltaY : I.deltaMode === WheelEvent.DOM_DELTA_PAGE ? o = I.deltaY * this.rows : o = I.deltaY / 33;
+ if (o !== 0) {
+ const s = this.viewportY - o;
+ this.smoothScrollTo(s);
}
}
}, this.handleMouseDown = (I) => {
@@ -3254,7 +3260,7 @@
* Clean up components (called on dispose or error)
*/
cleanupComponents() {
- this.selectionManager && (this.selectionManager.dispose(), this.selectionManager = void 0), this.inputHandler && (this.inputHandler.dispose(), this.inputHandler = void 0), this.renderer && (this.renderer.dispose(), this.renderer = void 0), this.canvas && this.canvas.parentNode && (this.canvas.parentNode.removeChild(this.canvas), this.canvas = void 0), this.textarea && this.textarea.parentNode && (this.textarea.parentNode.removeChild(this.textarea), this.textarea = void 0), this.element && (this.element.removeEventListener("wheel", this.handleWheel), this.element.removeEventListener("mousedown", this.handleMouseDown, { capture: !0 }), this.element.removeEventListener("mousemove", this.handleMouseMove), this.element.removeEventListener("mouseleave", this.handleMouseLeave), this.element.removeEventListener("click", this.handleClick), this.element.removeAttribute("contenteditable"), this.element.removeAttribute("role"), this.element.removeAttribute("aria-label"), this.element.removeAttribute("aria-multiline")), this.isOpen && typeof document < "u" && document.removeEventListener("mouseup", this.handleMouseUp), this.scrollbarHideTimeout && (window.clearTimeout(this.scrollbarHideTimeout), this.scrollbarHideTimeout = void 0), this.linkDetector && (this.linkDetector.dispose(), this.linkDetector = void 0), this.wasmTerm && (this.wasmTerm.free(), this.wasmTerm = void 0), this.ghostty = void 0, this.element = void 0, this.textarea = void 0;
+ this.selectionManager && (this.selectionManager.dispose(), this.selectionManager = void 0), this.inputHandler && (this.inputHandler.dispose(), this.inputHandler = void 0), this.renderer && (this.renderer.dispose(), this.renderer = void 0), this.canvas && this.canvas.parentNode && (this.canvas.parentNode.removeChild(this.canvas), this.canvas = void 0), this.textarea && this.textarea.parentNode && (this.textarea.parentNode.removeChild(this.textarea), this.textarea = void 0), this.element && (this.element.removeEventListener("wheel", this.handleWheel, { capture: !0 }), this.element.removeEventListener("mousedown", this.handleMouseDown, { capture: !0 }), this.element.removeEventListener("mousemove", this.handleMouseMove), this.element.removeEventListener("mouseleave", this.handleMouseLeave), this.element.removeEventListener("click", this.handleClick), this.element.removeAttribute("contenteditable"), this.element.removeAttribute("role"), this.element.removeAttribute("aria-label"), this.element.removeAttribute("aria-multiline")), this.isOpen && typeof document < "u" && document.removeEventListener("mouseup", this.handleMouseUp), this.scrollbarHideTimeout && (window.clearTimeout(this.scrollbarHideTimeout), this.scrollbarHideTimeout = void 0), this.linkDetector && (this.linkDetector.dispose(), this.linkDetector = void 0), this.wasmTerm && (this.wasmTerm.free(), this.wasmTerm = void 0), this.ghostty = void 0, this.element = void 0, this.textarea = void 0;
}
/**
* Assert terminal is open (throw if not)