@tui-sandbox/library 11.3.0 → 11.3.2
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/CHANGELOG.md +14 -0
- package/dist/browser/assets/{index-DXraucSs.js → index-AMa2FE-g.js} +7 -7
- package/dist/browser/index.html +1 -1
- package/dist/src/browser/neovim-client.d.ts +1 -1
- package/dist/src/browser/neovim-client.js.map +1 -1
- package/dist/src/client/neovim-terminal-client.js +1 -1
- package/dist/src/client/neovim-terminal-client.js.map +1 -1
- package/dist/src/client/{websocket-client.js → startTerminal.js} +8 -1
- package/dist/src/client/startTerminal.js.map +1 -0
- package/dist/src/client/terminal-config.d.ts +1 -1
- package/dist/src/client/terminal-terminal-client.d.ts +1 -1
- package/dist/src/client/terminal-terminal-client.js +1 -1
- package/dist/src/client/terminal-terminal-client.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +6 -7
- package/src/browser/neovim-client.ts +1 -1
- package/src/client/neovim-terminal-client.ts +1 -1
- package/src/client/{websocket-client.ts → startTerminal.ts} +9 -0
- package/src/client/terminal-config.ts +1 -1
- package/src/client/terminal-terminal-client.ts +2 -2
- package/dist/src/client/websocket-client.js.map +0 -1
- package/dist/src/server/utilities/applicationAvailable.d.ts +0 -1
- package/dist/src/server/utilities/applicationAvailable.js +0 -5
- package/dist/src/server/utilities/applicationAvailable.js.map +0 -1
- package/dist/src/server/utilities/applicationAvailable.test.d.ts +0 -1
- package/dist/src/server/utilities/applicationAvailable.test.js +0 -13
- package/dist/src/server/utilities/applicationAvailable.test.js.map +0 -1
- package/src/server/utilities/applicationAvailable.test.ts +0 -14
- package/src/server/utilities/applicationAvailable.ts +0 -5
- /package/dist/src/client/{websocket-client.d.ts → startTerminal.d.ts} +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tui-sandbox/library",
|
|
3
|
-
"version": "11.3.
|
|
3
|
+
"version": "11.3.2",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/mikavilpas/tui-sandbox"
|
|
@@ -14,19 +14,18 @@
|
|
|
14
14
|
"@catppuccin/palette": "1.7.1",
|
|
15
15
|
"@trpc/client": "11.4.3",
|
|
16
16
|
"@trpc/server": "11.4.3",
|
|
17
|
-
"@xterm/addon-attach": "0.11.0",
|
|
18
17
|
"@xterm/addon-fit": "0.10.0",
|
|
18
|
+
"@xterm/addon-unicode11": "0.8.0",
|
|
19
19
|
"@xterm/xterm": "5.5.0",
|
|
20
|
-
"command-exists": "1.2.9",
|
|
21
20
|
"cors": "2.8.5",
|
|
22
21
|
"dree": "5.1.5",
|
|
23
22
|
"express": "5.1.0",
|
|
24
23
|
"neovim": "5.3.0",
|
|
25
24
|
"node-pty": "1.0.0",
|
|
26
25
|
"prettier": "3.6.2",
|
|
27
|
-
"tsx": "4.20.3",
|
|
28
26
|
"type-fest": "4.41.0",
|
|
29
|
-
"winston": "3.17.0"
|
|
27
|
+
"winston": "3.17.0",
|
|
28
|
+
"zod": "4.0.14"
|
|
30
29
|
},
|
|
31
30
|
"devDependencies": {
|
|
32
31
|
"@types/command-exists": "1.2.3",
|
|
@@ -34,9 +33,9 @@
|
|
|
34
33
|
"@types/express": "5.0.3",
|
|
35
34
|
"@types/node": "24.1.0",
|
|
36
35
|
"nodemon": "3.1.10",
|
|
36
|
+
"tsx": "4.20.3",
|
|
37
37
|
"vite": "7.0.6",
|
|
38
|
-
"vitest": "3.2.4"
|
|
39
|
-
"zod": "4.0.14"
|
|
38
|
+
"vitest": "3.2.4"
|
|
40
39
|
},
|
|
41
40
|
"peerDependencies": {
|
|
42
41
|
"cypress": "^13 || ^14",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Terminal } from "@xterm/xterm"
|
|
2
2
|
import { TerminalClient as NeovimTerminalClient } from "../client/index.js"
|
|
3
|
+
import type { TuiTerminalApi } from "../client/startTerminal.js"
|
|
3
4
|
import { TerminalTerminalClient } from "../client/terminal-terminal-client.js"
|
|
4
|
-
import type { TuiTerminalApi } from "../client/websocket-client.js"
|
|
5
5
|
import type {
|
|
6
6
|
ExCommandClientInput,
|
|
7
7
|
LuaCodeClientInput,
|
|
@@ -16,8 +16,8 @@ import type {
|
|
|
16
16
|
StartNeovimGenericArguments,
|
|
17
17
|
TestDirectory,
|
|
18
18
|
} from "../server/types.js"
|
|
19
|
+
import { getTabId, startTerminal } from "./startTerminal.js"
|
|
19
20
|
import "./style.css"
|
|
20
|
-
import { getTabId, startTerminal } from "./websocket-client.js"
|
|
21
21
|
|
|
22
22
|
/** Manages the terminal state in the browser as well as the (browser's)
|
|
23
23
|
* connection to the server side terminal application api. */
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { flavors } from "@catppuccin/palette"
|
|
2
2
|
import { FitAddon } from "@xterm/addon-fit"
|
|
3
|
+
import { Unicode11Addon } from "@xterm/addon-unicode11"
|
|
3
4
|
import { Terminal } from "@xterm/xterm"
|
|
4
5
|
import "@xterm/xterm/css/xterm.css"
|
|
5
6
|
import * as z from "zod"
|
|
@@ -13,6 +14,7 @@ export type TuiTerminalApi = {
|
|
|
13
14
|
}
|
|
14
15
|
export function startTerminal(app: HTMLElement, api: TuiTerminalApi): Terminal {
|
|
15
16
|
const terminal = new Terminal({
|
|
17
|
+
allowProposedApi: true,
|
|
16
18
|
cursorBlink: false,
|
|
17
19
|
convertEol: true,
|
|
18
20
|
fontSize: 13,
|
|
@@ -42,6 +44,13 @@ export function startTerminal(app: HTMLElement, api: TuiTerminalApi): Terminal {
|
|
|
42
44
|
// page in this case
|
|
43
45
|
const fitAddon = new FitAddon()
|
|
44
46
|
terminal.loadAddon(fitAddon)
|
|
47
|
+
|
|
48
|
+
// The Unicode11Addon fixes emoji rendering issues. Without it, emoji are
|
|
49
|
+
// displayed as truncated (partial) images.
|
|
50
|
+
const unicode11Addon = new Unicode11Addon()
|
|
51
|
+
terminal.loadAddon(unicode11Addon)
|
|
52
|
+
terminal.unicode.activeVersion = "11"
|
|
53
|
+
|
|
45
54
|
terminal.open(app)
|
|
46
55
|
fitAddon.fit()
|
|
47
56
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Terminal } from "@xterm/xterm"
|
|
2
|
-
import type { TuiTerminalApi } from "./
|
|
2
|
+
import type { TuiTerminalApi } from "./startTerminal.js"
|
|
3
3
|
|
|
4
4
|
/** DA1—Primary Device Attributes
|
|
5
5
|
* In this DA exchange, the host asks for the terminal's architectural class and basic attributes.
|
|
@@ -5,10 +5,10 @@ import type { StartTerminalBrowserArguments } from "../browser/neovim-client.js"
|
|
|
5
5
|
import type { BlockingCommandClientInput } from "../server/blockingCommandInputSchema.js"
|
|
6
6
|
import type { AppRouter } from "../server/server.js"
|
|
7
7
|
import type { BlockingShellCommandOutput, TestDirectory } from "../server/types.js"
|
|
8
|
+
import type { TuiTerminalApi } from "./startTerminal.js"
|
|
9
|
+
import { getTabId, startTerminal } from "./startTerminal.js"
|
|
8
10
|
import "./style.css"
|
|
9
11
|
import { supportDA1 } from "./terminal-config.js"
|
|
10
|
-
import type { TuiTerminalApi } from "./websocket-client.js"
|
|
11
|
-
import { getTabId, startTerminal } from "./websocket-client.js"
|
|
12
12
|
|
|
13
13
|
/** Manages the terminal state in the browser as well as the (browser's)
|
|
14
14
|
* connection to the server side terminal application api. */
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"websocket-client.js","sourceRoot":"","sources":["../../../src/client/websocket-client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAC7C,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAA;AAC3C,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAA;AACvC,OAAO,4BAA4B,CAAA;AACnC,OAAO,KAAK,CAAC,MAAM,KAAK,CAAA;AAExB,OAAO,aAAa,CAAA;AACpB,OAAO,E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E,KAAK,EAAE,CAAA;AAClB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function applicationAvailable(command: string): Promise<string | null>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"applicationAvailable.js","sourceRoot":"","sources":["../../../../src/server/utilities/applicationAvailable.ts"],"names":[],"mappings":"AAAA,OAAO,aAAa,MAAM,gBAAgB,CAAA;AAE1C,MAAM,CAAC,KAAK,UAAU,oBAAoB,CAAC,OAAe;IACxD,OAAO,aAAa,CAAC,OAAO,CAAC,CAAA;AAC/B,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { applicationAvailable } from "./applicationAvailable.js";
|
|
2
|
-
describe("sanity checks for mocking", () => {
|
|
3
|
-
// because it makes no sense to mock the actual implementation if we don't
|
|
4
|
-
// know what it does in the current version, we better check what it's
|
|
5
|
-
// expected to do
|
|
6
|
-
it("can find neovim using the actual implementation", async () => {
|
|
7
|
-
await expect(applicationAvailable("nvim")).resolves.toBe("nvim");
|
|
8
|
-
});
|
|
9
|
-
it("complains when a nonexistent command is checked", async () => {
|
|
10
|
-
await expect(applicationAvailable("thisCommandDoesNotExist")).rejects.toBe(null);
|
|
11
|
-
});
|
|
12
|
-
});
|
|
13
|
-
//# sourceMappingURL=applicationAvailable.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"applicationAvailable.test.js","sourceRoot":"","sources":["../../../../src/server/utilities/applicationAvailable.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAA;AAEhE,QAAQ,CAAC,2BAA2B,EAAE,GAAG,EAAE;IACzC,0EAA0E;IAC1E,sEAAsE;IACtE,iBAAiB;IACjB,EAAE,CAAC,iDAAiD,EAAE,KAAK,IAAI,EAAE;QAC/D,MAAM,MAAM,CAAC,oBAAoB,CAAC,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;IAClE,CAAC,CAAC,CAAA;IAEF,EAAE,CAAC,iDAAiD,EAAE,KAAK,IAAI,EAAE;QAC/D,MAAM,MAAM,CAAC,oBAAoB,CAAC,yBAAyB,CAAC,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;IAClF,CAAC,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { applicationAvailable } from "./applicationAvailable.js"
|
|
2
|
-
|
|
3
|
-
describe("sanity checks for mocking", () => {
|
|
4
|
-
// because it makes no sense to mock the actual implementation if we don't
|
|
5
|
-
// know what it does in the current version, we better check what it's
|
|
6
|
-
// expected to do
|
|
7
|
-
it("can find neovim using the actual implementation", async () => {
|
|
8
|
-
await expect(applicationAvailable("nvim")).resolves.toBe("nvim")
|
|
9
|
-
})
|
|
10
|
-
|
|
11
|
-
it("complains when a nonexistent command is checked", async () => {
|
|
12
|
-
await expect(applicationAvailable("thisCommandDoesNotExist")).rejects.toBe(null)
|
|
13
|
-
})
|
|
14
|
-
})
|
|
File without changes
|