diff --git a/package-lock.json b/package-lock.json index a9ad39e..2f7d074 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8,7 +8,7 @@ "name": "tode", "version": "0.1.0", "dependencies": { - "@zenbu-labs/pixel": "^0.0.23", + "@zenbu-labs/pixel": "0.2.10", "react": "^18.3.1" }, "bin": { @@ -362,9 +362,9 @@ } }, "node_modules/@zenbu-labs/pixel": { - "version": "0.0.23", - "resolved": "https://registry.npmjs.org/@zenbu-labs/pixel/-/pixel-0.0.23.tgz", - "integrity": "sha512-2tEzFqiotNwRwK7uEfuZ0sX72pqezNPEHCciQ4uW56nAxL/TEEz+B0TXu1Z+eBkijwBQTNj/dwiC8hAZ84y9lQ==", + "version": "0.2.10", + "resolved": "https://registry.npmjs.org/@zenbu-labs/pixel/-/pixel-0.2.10.tgz", + "integrity": "sha512-sUd5l9pkg+dEUKjMvCXeQ0ye/51Ne832GK2oVDHze4TcJ+jY1c7j3uoF9n9T35eY9uBNXHtCNfDTZZHi/q6SEQ==", "hasInstallScript": true, "license": "MIT", "dependencies": { @@ -374,19 +374,19 @@ "pixel": "dist/bin.js" }, "optionalDependencies": { - "@zenbu-labs/pixel-native-darwin-arm64": "0.0.23", - "@zenbu-labs/pixel-native-darwin-x64": "0.0.23", - "@zenbu-labs/pixel-native-linux-arm64": "0.0.23", - "@zenbu-labs/pixel-native-linux-x64": "0.0.23" + "@zenbu-labs/pixel-native-darwin-arm64": "0.2.10", + "@zenbu-labs/pixel-native-darwin-x64": "0.2.10", + "@zenbu-labs/pixel-native-linux-arm64": "0.2.10", + "@zenbu-labs/pixel-native-linux-x64": "0.2.10" }, "peerDependencies": { "react": "^18.3.1" } }, "node_modules/@zenbu-labs/pixel-native-darwin-arm64": { - "version": "0.0.23", - "resolved": "https://registry.npmjs.org/@zenbu-labs/pixel-native-darwin-arm64/-/pixel-native-darwin-arm64-0.0.23.tgz", - "integrity": "sha512-nFV1OJBn47Sr74Wzu0T0DwezeI5WTqZznCF71+oZiXP4ujnXBcc5saotwyCcwbwPKa+HLTrb16vsgoipIdU6Pw==", + "version": "0.2.10", + "resolved": "https://registry.npmjs.org/@zenbu-labs/pixel-native-darwin-arm64/-/pixel-native-darwin-arm64-0.2.10.tgz", + "integrity": "sha512-AC0aAtYOnrZ8pPLD5ECCYc+cJFbl18h848/KuCdve1BJ6iP8KvuQJTPzYKyTVLQ9hRN3OcIY2/N1SafDVkfZoA==", "cpu": [ "arm64" ], @@ -397,9 +397,9 @@ ] }, "node_modules/@zenbu-labs/pixel-native-darwin-x64": { - "version": "0.0.23", - "resolved": "https://registry.npmjs.org/@zenbu-labs/pixel-native-darwin-x64/-/pixel-native-darwin-x64-0.0.23.tgz", - "integrity": "sha512-PYfSp1Jps++bX37/YOIZUYvnzkphYz+wRZZmFbfrKAg2MsT5xDkpe0akmiyJ8DLzFlUE33MBjOeKgDbaZUrvew==", + "version": "0.2.10", + "resolved": "https://registry.npmjs.org/@zenbu-labs/pixel-native-darwin-x64/-/pixel-native-darwin-x64-0.2.10.tgz", + "integrity": "sha512-IZsMgYqfpAbnuI2hhddBVWNP7+r6goj5kfOJ/HbN0hD/3Z4Xv5OmJx7jrMsbwcQUGJjDo559AB8eHrfe0s2gIg==", "cpu": [ "x64" ], @@ -410,9 +410,9 @@ ] }, "node_modules/@zenbu-labs/pixel-native-linux-arm64": { - "version": "0.0.23", - "resolved": "https://registry.npmjs.org/@zenbu-labs/pixel-native-linux-arm64/-/pixel-native-linux-arm64-0.0.23.tgz", - "integrity": "sha512-rtPsHhaNIU+2KyyRdb4upsfuLtvWx2sq4DQzeywgjjJk9jKmkFXtv+Aq/7P+SrG69sAd4k6vnTb/2qWQfFr2/w==", + "version": "0.2.10", + "resolved": "https://registry.npmjs.org/@zenbu-labs/pixel-native-linux-arm64/-/pixel-native-linux-arm64-0.2.10.tgz", + "integrity": "sha512-JwB3cgITFZlw4WLbGV1Qqt8Tw0BFMgnNeGC1qA+03VU01ffmu1dKW/S7tJu1fWPvz2cmHLV1kEkYlczow1VutA==", "cpu": [ "arm64" ], @@ -423,9 +423,9 @@ ] }, "node_modules/@zenbu-labs/pixel-native-linux-x64": { - "version": "0.0.23", - "resolved": "https://registry.npmjs.org/@zenbu-labs/pixel-native-linux-x64/-/pixel-native-linux-x64-0.0.23.tgz", - "integrity": "sha512-4x7CKNeVymk/JFpZl+gp0w5BRmWOK8ZH9cXVCdOA5hMiPD/JBGCAHywCd52k/rhQPDnrzQ6RPCjjYdZFddSIMA==", + "version": "0.2.10", + "resolved": "https://registry.npmjs.org/@zenbu-labs/pixel-native-linux-x64/-/pixel-native-linux-x64-0.2.10.tgz", + "integrity": "sha512-nbFD3b1cA20XZv/vF+VHAn4/1DrTWaFFlTLwfqNIzJjj8Wr/9lKSsz8z2TA/4pn9ud74WQYEdJbPbMhCCeJbJw==", "cpu": [ "x64" ], diff --git a/package.json b/package.json index b7b7891..9b34af5 100644 --- a/package.json +++ b/package.json @@ -23,10 +23,10 @@ "vite": "^8.2.1" }, "dependencies": { - "@zenbu-labs/pixel": "0.0.23", + "@zenbu-labs/pixel": "0.2.10", "react": "^18.3.1" }, "allowScripts": { - "@zenbu-labs/pixel@0.0.23": true + "@zenbu-labs/pixel@0.2.10": true } } diff --git a/src/launch.ts b/src/launch.ts index 1577fa7..bbdc95f 100644 --- a/src/launch.ts +++ b/src/launch.ts @@ -4,7 +4,7 @@ import net from "node:net"; import os from "node:os"; import path from "node:path"; -import { callerTty, canSplit, cannotOpenPanes, checkTerminal, detect, findOwner, unsupportedGraphicsMessage } from "@zenbu-labs/pixel/terminal"; +import { UNSUPPORTED_ENV, callerTty, canSplit, cannotOpenPanes, checkTerminal, detect, findOwner } from "@zenbu-labs/pixel/terminal"; import type { Direction } from "@zenbu-labs/pixel/terminal"; import { ask, connectDaemon, linesOf, sleep } from "./app/control"; @@ -56,6 +56,20 @@ function hosted(tty: string): boolean { return Boolean(process.env.PIXEL_EMBED) || findOwner(tty) !== null; } +function unsupportedGraphicsMessage(color: boolean): string { + const sgr = (code: string, text: string) => (color ? `\x1b[${code}m${text}\x1b[0m` : text); + return [ + "", + ` ${sgr("1", "Unsupported terminal: this terminal cannot display graphics")}`, + "", + ` ${sgr("2", "We recommend Ghostty:")}`, + ` ${sgr("4", "https://ghostty.org/download")}`, + "", + ` ${sgr("2", "Note: any terminal that supports the kitty graphics protocol is supported")}`, + "", + ].join("\n"); +} + function windowTty(): string | null { return process.env.PIXEL_TTY ?? callerTty().path; } @@ -129,7 +143,8 @@ function attachWindow(url: string, options: LaunchOptions): { exited: Promise key !== UNSUPPORTED_ENV)), proxy: options.proxy, partition: options.partition, timingFile: `${CSS_FILE}.timing.json`,