Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion apps/benchmark/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@
"start": "bun src/main.ts"
},
"dependencies": {
"@profullstack/hqtui": "^0.10.2"
"@profullstack/hqtui": "^0.10.3"
}
}
4 changes: 2 additions & 2 deletions apps/demo/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@profullstack/hqtui-demo",
"version": "0.10.2",
"version": "0.10.3",
"description": "The HQTUI reference dashboard: a btop-grade terminal system monitor. Runs on real system metrics or a deterministic simulation.",
"license": "MIT",
"type": "module",
Expand All @@ -27,7 +27,7 @@
"audit:scroll": "bun scripts/scrollaudit.ts"
},
"dependencies": {
"@profullstack/hqtui": "^0.10.2"
"@profullstack/hqtui": "^0.10.3"
},
"publishConfig": {
"access": "public"
Expand Down
2 changes: 1 addition & 1 deletion apps/demo/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ function parseArgs(argv: string[]): Options {
case "-h":
case "--help": printHelp(); process.exit(0);
case "-v":
case "--version": console.log("hqtui-demo 0.10.2"); process.exit(0);
case "--version": console.log("hqtui-demo 0.10.3"); process.exit(0);
}
}
return options;
Expand Down
2 changes: 1 addition & 1 deletion apps/web/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ export default async function Home() {
High Quality Terminal UI for TypeScript, Rust, Go, Python, Zig and C++
</p>
<Badge variant="secondary" className="mb-5 font-mono text-xs">
v0.10.2 · {COUNT} language demos · MIT
v0.10.3 · {COUNT} language demos · MIT
</Badge>
<p className="text-balance text-3xl font-bold tracking-tight sm:text-5xl">
Terminal dashboards that
Expand Down
2 changes: 1 addition & 1 deletion apps/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
},
"dependencies": {
"@base-ui/react": "1.7.0",
"@profullstack/hqtui": "^0.10.2",
"@profullstack/hqtui": "^0.10.3",
"@profullstack/libsql-pg": "^0.1.3",
"class-variance-authority": "0.7.1",
"clsx": "2.1.1",
Expand Down
10 changes: 5 additions & 5 deletions bun.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion examples/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
"version": "0.1.0",
"type": "module",
"dependencies": {
"@profullstack/hqtui": "^0.10.2"
"@profullstack/hqtui": "^0.10.3"
}
}
2 changes: 1 addition & 1 deletion packages/hqtui/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@profullstack/hqtui",
"version": "0.10.2",
"version": "0.10.3",
"description": "High Quality Terminal UI for TypeScript. btop-grade dashboards with a one-import API, dark by default, zero runtime dependencies.",
"license": "MIT",
"type": "module",
Expand Down
7 changes: 5 additions & 2 deletions packages/hqtui/src/capabilities.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,13 @@ export interface CapabilityOverrides {
}

function detectProgram(env: NodeJS.ProcessEnv): string {
// First: launched from another terminal, hqterm's panes inherit its markers
// (KONSOLE_VERSION, KITTY_WINDOW_ID ...), but the pane is hqterm.
if (env.TERM_PROGRAM === "hqterm") return "hqterm";
if (env.KITTY_WINDOW_ID || env.TERM === "xterm-kitty") return "kitty";
if (env.WEZTERM_EXECUTABLE || env.TERM_PROGRAM === "WezTerm") return "wezterm";
if (env.GHOSTTY_RESOURCES_DIR || env.TERM === "xterm-ghostty") return "ghostty";
if (env.TERM_PROGRAM === "iTerm.app") return "iterm";
if (env.TERM_PROGRAM === "iTerm.app" || env.LC_TERMINAL === "iTerm2") return "iterm";
if (env.ALACRITTY_WINDOW_ID || env.TERM === "alacritty") return "alacritty";
if (env.TERM_PROGRAM === "vscode") return "vscode";
if (env.WT_SESSION) return "windows-terminal";
Expand Down Expand Up @@ -102,7 +105,7 @@ export function detectCapabilities(
const unicode = overrides.unicode ?? detectUnicode(env);

const syncCapable =
["kitty", "wezterm", "ghostty", "iterm", "windows-terminal", "konsole", "alacritty"].includes(program) || tmux;
["kitty", "wezterm", "ghostty", "iterm", "windows-terminal", "konsole", "alacritty", "hqterm"].includes(program) || tmux;

return {
tty,
Expand Down
2 changes: 1 addition & 1 deletion packages/hqtui/src/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import { detectCapabilities } from "./capabilities.ts";
import { themeList, themes } from "./theme.ts";
import { BrailleCanvas } from "./graphics/braille.ts";

const VERSION = "0.10.2";
const VERSION = "0.10.3";

function help(): void {
console.log(`hqtui ${VERSION} — High Quality Terminal UI for TypeScript
Expand Down
2 changes: 1 addition & 1 deletion packages/hqtui/src/images.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export function imageSupport(env: NodeJS.ProcessEnv = process.env): ImageSupport
if (/^(ghostty|kitty)$/i.test(env.TERM_PROGRAM ?? "")) return "kitty";
if (/^xterm-(kitty|ghostty)$/.test(env.TERM ?? "")) return "kitty";
// WezTerm and iTerm2: inline images, not placeholders.
if (program === "wezterm" || program === "iterm") return "iterm";
if (program === "wezterm" || program === "iterm" || program === "hqterm") return "iterm";
if (env.WEZTERM_PANE || env.WEZTERM_EXECUTABLE || /^(wezterm|iterm\.app)$/i.test(env.TERM_PROGRAM ?? "")) return "iterm";
if (env.LC_TERMINAL === "iTerm2") return "iterm";
return "none";
Expand Down
11 changes: 11 additions & 0 deletions packages/hqtui/test/images.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,17 @@ import {
createImageStore, drawRichText, imageSupport, inTmux, behindMosh, kittyVirtualImage, passthrough, placeholderCell, PLACEHOLDER,
} from "../src/images.ts";
import { renderToScreen } from "../src/testing.ts";
import { detectCapabilities } from "../src/capabilities.ts";

test("hqterm is recognised: synchronized frames and iTerm2 images, even when launched from Konsole", () => {
const env = { TERM: "xterm-256color", TERM_PROGRAM: "hqterm", KONSOLE_VERSION: "240802", HQTUI_MOSH: "0" };
const caps = detectCapabilities({ tty: true }, env);
assert.equal(caps.program, "hqterm");
assert.equal(caps.synchronizedOutput, true);
assert.equal(imageSupport(env), "iterm");
// On a remote host the desktop app identifies itself the iTerm2 way.
assert.equal(detectCapabilities({ tty: true }, { TERM: "xterm-256color", LC_TERMINAL: "iTerm2" }).program, "iterm");
});
import { cellText } from "../src/unicode.ts";

// These tests describe terminals, not the machine running them (which may be behind mosh).
Expand Down
2 changes: 1 addition & 1 deletion ports/nim/hqtui.nimble
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Package

version = "0.10.2"
version = "0.10.3"
author = "HQTUI contributors"
description = "Terminal UI widgets and the ten-screen HQTUI dashboard for Nim, over HQTUI's shared native engine (compiled from source)"
license = "MIT"
Expand Down
2 changes: 1 addition & 1 deletion ports/nim/src/hqtui.nim
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import std/[json, os, strutils]
export json

const version* = "0.10.2"
const version* = "0.10.3"

const
engine = currentSourcePath().parentDir / "hqtui" / "engine"
Expand Down
Loading