@tui-sandbox/library 11.4.1 → 11.5.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tui-sandbox/library",
3
- "version": "11.4.1",
3
+ "version": "11.5.0",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/mikavilpas/tui-sandbox"
@@ -12,8 +12,8 @@
12
12
  },
13
13
  "dependencies": {
14
14
  "@catppuccin/palette": "1.7.1",
15
- "@trpc/client": "11.4.3",
16
- "@trpc/server": "11.4.3",
15
+ "@trpc/client": "11.4.4",
16
+ "@trpc/server": "11.4.4",
17
17
  "@xterm/addon-fit": "0.10.0",
18
18
  "@xterm/addon-unicode11": "0.8.0",
19
19
  "@xterm/xterm": "5.5.0",
@@ -32,7 +32,7 @@
32
32
  "@types/command-exists": "1.2.3",
33
33
  "@types/cors": "2.8.19",
34
34
  "@types/express": "5.0.3",
35
- "@types/node": "24.1.0",
35
+ "@types/node": "24.2.0",
36
36
  "nodemon": "3.1.10",
37
37
  "tsx": "4.20.3",
38
38
  "vite": "7.0.6",
@@ -10,28 +10,26 @@
10
10
  * Limitation: text spanning multiple lines will not be detected.
11
11
  */
12
12
  export function textIsVisibleWithColor(text: string, color: string): Cypress.Chainable<JQuery> {
13
- return cy.get("div.xterm-rows span").and($spans => {
14
- const matching = $spans.filter((_, el) => !!el.textContent.includes(text))
15
-
16
- const colors = matching.map((_, el) => {
17
- return window.getComputedStyle(el).color
13
+ return cy
14
+ .get("div.xterm-rows span")
15
+ .filter(`:contains(${text})`)
16
+ .should("exist") // ensures there's at least one match
17
+ .should($els => {
18
+ const colors = $els.map((_, el) => window.getComputedStyle(el).color).toArray()
19
+ expect(colors).to.include(color)
18
20
  })
19
-
20
- expect(JSON.stringify(colors.toArray())).to.contain(color)
21
- })
22
21
  }
23
22
 
24
23
  /** Like `textIsVisibleWithColor`, but checks the background color instead
25
24
  * of the text color.
26
25
  */
27
26
  export function textIsVisibleWithBackgroundColor(text: string, color: string): Cypress.Chainable<JQuery> {
28
- return cy.get("div.xterm-rows span").and($spans => {
29
- const matching = $spans.filter((_, el) => !!el.textContent.includes(text))
30
-
31
- const colors = matching.map((_, el) => {
32
- return window.getComputedStyle(el).backgroundColor
27
+ return cy
28
+ .get("div.xterm-rows span")
29
+ .filter(`:contains(${text})`)
30
+ .should("exist") // ensures there's at least one match
31
+ .should($els => {
32
+ const colors = $els.map((_, el) => window.getComputedStyle(el).backgroundColor).toArray()
33
+ expect(colors).to.include(color)
33
34
  })
34
-
35
- expect(JSON.stringify(colors.toArray())).to.contain(color)
36
- })
37
35
  }
@@ -14,7 +14,7 @@ export const parseArguments = async (args: string[]): Promise<ParseArgumentsResu
14
14
  }
15
15
 
16
16
  {
17
- // tui neovim exec <command> <args>
17
+ // tui neovim exec <command>
18
18
  const schema = z.tuple([z.literal("neovim"), z.literal("exec"), z.string()])
19
19
  const execArguments = schema.safeParse(args)
20
20
  if (execArguments.success) {