Skip to content

Commit 2e34457

Browse files
Apply PR #24810: upgrade opentui to 0.2.0
2 parents 9740071 + 8682a32 commit 2e34457

5 files changed

Lines changed: 28 additions & 24 deletions

File tree

bun.lock

Lines changed: 13 additions & 15 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@
3434
"@types/cross-spawn": "6.0.6",
3535
"@octokit/rest": "22.0.0",
3636
"@hono/zod-validator": "0.4.2",
37-
"@opentui/core": "0.1.105",
38-
"@opentui/solid": "0.1.105",
37+
"@opentui/core": "0.2.0",
38+
"@opentui/solid": "0.2.0",
3939
"ulid": "3.0.1",
4040
"@kobalte/core": "0.13.11",
4141
"@types/luxon": "3.7.1",

packages/opencode/src/cli/cmd/run/theme.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ type SharedSyntaxTheme = TuiThemeCurrent & {
8686
export const transparent = RGBA.fromValues(0, 0, 0, 0)
8787

8888
function alpha(color: RGBA, value: number): RGBA {
89-
return RGBA.fromValues(color.r, color.g, color.b, Math.max(0, Math.min(1, value)), color.tag)
89+
return RGBA.fromValues(color.r, color.g, color.b, Math.max(0, Math.min(1, value)))
9090
}
9191

9292
function rgba(hex: string, value?: number): RGBA {

packages/opencode/test/cli/run/theme.test.ts

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,12 @@ function spread(color: RGBA) {
5959
return Math.max(r, g, b) - Math.min(r, g, b)
6060
}
6161

62+
function expectIndexed(color: unknown) {
63+
const rgba = expectRgba(color)
64+
expect(rgba.intent).toBe("indexed")
65+
expect(rgba.slot).toBeLessThan(256)
66+
}
67+
6268
test("falls back when palette lookup fails", async () => {
6369
expect(await resolveRunTheme(renderer({ fail: true }))).toBe(RUN_THEME_FALLBACK)
6470
})
@@ -71,10 +77,10 @@ test("returns syntax styles and indexed splash colors", async () => {
7177
expect(theme.block.subtleSyntax).toBeDefined()
7278
expect([...theme.block.syntax!.getAllStyles()].length).toBeGreaterThan(0)
7379
expect([...theme.block.subtleSyntax!.getAllStyles()].length).toBeGreaterThan(0)
74-
expect(RGBA.getIntentTag(expectRgba(theme.splash.left))).toBeLessThan(256)
75-
expect(RGBA.getIntentTag(expectRgba(theme.splash.right))).toBeLessThan(256)
76-
expect(RGBA.getIntentTag(expectRgba(theme.splash.leftShadow))).toBeLessThan(256)
77-
expect(RGBA.getIntentTag(expectRgba(theme.splash.rightShadow))).toBeLessThan(256)
80+
expectIndexed(theme.splash.left)
81+
expectIndexed(theme.splash.right)
82+
expectIndexed(theme.splash.leftShadow)
83+
expectIndexed(theme.splash.rightShadow)
7884
expectRgba(theme.footer.highlight)
7985
expectRgba(theme.footer.surface)
8086
} finally {

packages/plugin/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@
2222
"zod": "catalog:"
2323
},
2424
"peerDependencies": {
25-
"@opentui/core": ">=0.1.105",
26-
"@opentui/solid": ">=0.1.105"
25+
"@opentui/core": ">=0.2.0",
26+
"@opentui/solid": ">=0.2.0"
2727
},
2828
"peerDependenciesMeta": {
2929
"@opentui/core": {

0 commit comments

Comments
 (0)