| ... | @@ -3,15 +3,11 @@ import { BUILT_IN_THEMES, getThemeColorsForAppearance } from "@t3tools/shared/th | ... | @@ -3,15 +3,11 @@ import { BUILT_IN_THEMES, getThemeColorsForAppearance } from "@t3tools/shared/th |
| 3 | | 3 | |
| 4 | import { themeColorToNativeColor } from "../../lib/mobileTheme"; | 4 | import { themeColorToNativeColor } from "../../lib/mobileTheme"; |
| 5 | | 5 | |
| 6 | import { | 6 | import { buildGhosttyThemeConfig, getMobileTerminalTheme } from "./terminalTheme"; |
| 7 | buildGhosttyThemeConfig, | | |
| 8 | getMobileTerminalTheme, | | |
| 9 | getPierreTerminalTheme, | | |
| 10 | } from "./terminalTheme"; | | |
| 11 | | 7 | |
| 12 | describe("getPierreTerminalTheme", () => { | 8 | describe("getMobileTerminalTheme", () => { |
| 13 | it("returns the Pierre light terminal palette", () => { | 9 | it("preserves the default light terminal palette", () => { |
| 14 | expect(getPierreTerminalTheme("light")).toMatchObject({ | 10 | expect(getMobileTerminalTheme("t3-code", "light")).toMatchObject({ |
| 15 | background: "#f2f2f7", | 11 | background: "#f2f2f7", |
| 16 | foreground: "#6C6C71", | 12 | foreground: "#6C6C71", |
| 17 | cursorForeground: "#009fff", | 13 | cursorForeground: "#009fff", |
| ... | @@ -19,23 +15,14 @@ describe("getPierreTerminalTheme", () => { | ... | @@ -19,23 +15,14 @@ describe("getPierreTerminalTheme", () => { |
| 19 | }); | 15 | }); |
| 20 | }); | 16 | }); |
| 21 | | 17 | |
| 22 | it("returns the Pierre dark terminal palette", () => { | 18 | it("preserves the default dark terminal palette", () => { |
| 23 | expect(getPierreTerminalTheme("dark")).toMatchObject({ | 19 | expect(getMobileTerminalTheme("t3-code", "dark")).toMatchObject({ |
| 24 | background: "#0a0a0a", | 20 | background: "#0a0a0a", |
| 25 | foreground: "#adadb1", | 21 | foreground: "#adadb1", |
| 26 | cursorForeground: "#009fff", | 22 | cursorForeground: "#009fff", |
| 27 | cursorBackground: "#0a0a0a", | 23 | cursorBackground: "#0a0a0a", |
| 28 | }); | 24 | }); |
| 29 | }); | 25 | }); |
| 30 | }); | | |
| 31 | | | |
| 32 | describe("getMobileTerminalTheme", () => { | | |
| 33 | it("preserves the Pierre terminal for the default theme", () => { | | |
| 34 | for (const scheme of ["light", "dark"] as const) { | | |
| 35 | expect(getMobileTerminalTheme("t3-code", scheme)).toEqual(getPierreTerminalTheme(scheme)); | | |
| 36 | } | | |
| 37 | }); | | |
| 38 | | | |
| 39 | it("applies the selected palette without replacing ANSI status colors", () => { | 26 | it("applies the selected palette without replacing ANSI status colors", () => { |
| 40 | const standard = getMobileTerminalTheme("t3-code", "dark"); | 27 | const standard = getMobileTerminalTheme("t3-code", "dark"); |
| 41 | const ocean = getMobileTerminalTheme("ocean", "dark"); | 28 | const ocean = getMobileTerminalTheme("ocean", "dark"); |
| ... | @@ -58,7 +45,7 @@ describe("getMobileTerminalTheme", () => { | ... | @@ -58,7 +45,7 @@ describe("getMobileTerminalTheme", () => { |
| 58 | | 45 | |
| 59 | describe("buildGhosttyThemeConfig", () => { | 46 | describe("buildGhosttyThemeConfig", () => { |
| 60 | it("serializes theme colors into a ghostty config file", () => { | 47 | it("serializes theme colors into a ghostty config file", () => { |
| 61 | const config = buildGhosttyThemeConfig(getPierreTerminalTheme("dark")); | 48 | const config = buildGhosttyThemeConfig(getMobileTerminalTheme("t3-code", "dark")); |
| 62 | | 49 | |
| 63 | expect(config).toContain("background = #0a0a0a"); | 50 | expect(config).toContain("background = #0a0a0a"); |
| 64 | expect(config).toContain("foreground = #adadb1"); | 51 | expect(config).toContain("foreground = #adadb1"); |