@opencode/theme 2.0.31 → 2.1.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.
@@ -1,3 +1,3 @@
1
- import { SyntaxStyle } from "@opentui/core";
1
+ import { SyntaxStyle, type NativeResourceOwner } from "@opentui/core";
2
2
  import type { ResolvedThemeTokens } from "./index.js";
3
- export declare function generateSyntax(theme: ResolvedThemeTokens): SyntaxStyle;
3
+ export declare function generateSyntax(theme: ResolvedThemeTokens, owner: NativeResourceOwner): SyntaxStyle;
@@ -1,10 +1,10 @@
1
1
  import { SyntaxStyle } from "@opentui/core";
2
- export function generateSyntax(theme) {
2
+ export function generateSyntax(theme, owner) {
3
3
  const step = 200;
4
4
  const syntax = theme.syntax;
5
5
  const markdown = theme.markdown;
6
6
  const feedback = theme.text.feedback;
7
- return SyntaxStyle.fromTheme([
7
+ const rules = [
8
8
  rule(["default"], theme.text.base),
9
9
  rule(["prompt"], theme.hue.accent[step]),
10
10
  rule(["extmark.file"], feedback.warning.base, { bold: true }),
@@ -69,7 +69,8 @@ export function generateSyntax(theme) {
69
69
  rule(["error"], feedback.error.base, { bold: true }),
70
70
  rule(["warning"], feedback.warning.base, { bold: true }),
71
71
  rule(["info"], feedback.info.base),
72
- ]);
72
+ ];
73
+ return SyntaxStyle.fromTheme(rules, owner);
73
74
  }
74
75
  function rule(scope, foreground, style = {}) {
75
76
  return { scope, style: { foreground, ...style } };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/package.json",
3
3
  "name": "@opencode/theme",
4
- "version": "2.0.31",
4
+ "version": "2.1.0",
5
5
  "type": "module",
6
6
  "license": "MIT",
7
7
  "repository": {
@@ -28,16 +28,16 @@
28
28
  "scripts": {
29
29
  "build": "bun run script/build.ts",
30
30
  "test": "bun test --timeout 30000",
31
- "typecheck": "tsgo --noEmit"
31
+ "typecheck": "tsc --noEmit"
32
32
  },
33
33
  "dependencies": {
34
- "@opentui/core": "0.5.17",
34
+ "@opentui/core": "0.6.6",
35
35
  "effect": "4.0.1"
36
36
  },
37
37
  "devDependencies": {
38
38
  "@tsconfig/bun": "1.0.9",
39
39
  "@types/bun": "1.4.0",
40
- "@typescript/native-preview": "7.0.0-dev.20251207.1",
41
- "typescript": "5.8.2"
40
+ "@typescript/native": "npm:typescript@7.0.2",
41
+ "typescript": "npm:@typescript/typescript6@6.0.2"
42
42
  }
43
43
  }