Skip to content

Commit 0de785a

Browse files
Apply PR #24810: upgrade opentui to 0.2.0
2 parents 49eaa81 + 8682a32 commit 0de785a

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: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,9 @@ 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+
const next = RGBA.clone(color)
90+
next.a = Math.max(0, Math.min(1, value))
91+
return next
9092
}
9193

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

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

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,10 +71,14 @@ test("returns syntax styles and indexed splash colors", async () => {
7171
expect(theme.block.subtleSyntax).toBeDefined()
7272
expect([...theme.block.syntax!.getAllStyles()].length).toBeGreaterThan(0)
7373
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)
74+
expect(expectRgba(theme.splash.left).intent).toBe("indexed")
75+
expect(expectRgba(theme.splash.right).intent).toBe("indexed")
76+
expect(expectRgba(theme.splash.leftShadow).intent).toBe("indexed")
77+
expect(expectRgba(theme.splash.rightShadow).intent).toBe("indexed")
78+
expect(expectRgba(theme.splash.left).slot).toBeLessThan(256)
79+
expect(expectRgba(theme.splash.right).slot).toBeLessThan(256)
80+
expect(expectRgba(theme.splash.leftShadow).slot).toBeLessThan(256)
81+
expect(expectRgba(theme.splash.rightShadow).slot).toBeLessThan(256)
7882
expectRgba(theme.footer.highlight)
7983
expectRgba(theme.footer.surface)
8084
} 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)