@opencode-ai/ui 0.0.0-next-17078 → 0.0.0-next-17079

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.
Files changed (166) hide show
  1. package/dist/context/i18n.d.ts +10 -1
  2. package/dist/context/marked-parser.d.ts +2 -0
  3. package/dist/context/marked-theme-register.d.ts +1 -0
  4. package/dist/context/marked-theme.d.ts +2 -0
  5. package/dist/context/marked.d.ts +2 -9
  6. package/dist/i18n/am.d.ts +1 -0
  7. package/dist/i18n/ar.d.ts +38 -0
  8. package/dist/i18n/az.d.ts +1 -0
  9. package/dist/i18n/bg.d.ts +193 -0
  10. package/dist/i18n/bn.d.ts +1 -0
  11. package/dist/i18n/br.d.ts +26 -0
  12. package/dist/i18n/bs.d.ts +26 -0
  13. package/dist/i18n/ca.d.ts +1 -0
  14. package/dist/i18n/cs.d.ts +1 -0
  15. package/dist/i18n/da.d.ts +22 -0
  16. package/dist/i18n/de.d.ts +22 -0
  17. package/dist/i18n/dv.d.ts +1 -0
  18. package/dist/i18n/dz.d.ts +1 -0
  19. package/dist/i18n/el.d.ts +1 -0
  20. package/dist/i18n/es.d.ts +26 -0
  21. package/dist/i18n/et.d.ts +1 -0
  22. package/dist/i18n/fa.d.ts +1 -0
  23. package/dist/i18n/fi.d.ts +1 -0
  24. package/dist/i18n/fo.d.ts +1 -0
  25. package/dist/i18n/fr.d.ts +26 -0
  26. package/dist/i18n/hi.d.ts +1 -0
  27. package/dist/i18n/hr.d.ts +1 -0
  28. package/dist/i18n/hu.d.ts +1 -0
  29. package/dist/i18n/hy.d.ts +1 -0
  30. package/dist/i18n/id.d.ts +1 -0
  31. package/dist/i18n/is.d.ts +1 -0
  32. package/dist/i18n/it.d.ts +1 -0
  33. package/dist/i18n/ja.d.ts +22 -0
  34. package/dist/i18n/ka.d.ts +1 -0
  35. package/dist/i18n/km.d.ts +193 -0
  36. package/dist/i18n/ko.d.ts +22 -0
  37. package/dist/i18n/lo.d.ts +193 -0
  38. package/dist/i18n/lt.d.ts +1 -0
  39. package/dist/i18n/lv.d.ts +1 -0
  40. package/dist/i18n/mk.d.ts +193 -0
  41. package/dist/i18n/mn.d.ts +193 -0
  42. package/dist/i18n/ms.d.ts +1 -0
  43. package/dist/i18n/my.d.ts +193 -0
  44. package/dist/i18n/ne.d.ts +1 -0
  45. package/dist/i18n/nl.d.ts +1 -0
  46. package/dist/i18n/pa.d.ts +1 -0
  47. package/dist/i18n/pl.d.ts +30 -0
  48. package/dist/i18n/ro.d.ts +1 -0
  49. package/dist/i18n/ru.d.ts +30 -0
  50. package/dist/i18n/si.d.ts +1 -0
  51. package/dist/i18n/sk.d.ts +1 -0
  52. package/dist/i18n/sl.d.ts +1 -0
  53. package/dist/i18n/sq.d.ts +1 -0
  54. package/dist/i18n/sr.d.ts +197 -0
  55. package/dist/i18n/sv.d.ts +1 -0
  56. package/dist/i18n/tg.d.ts +193 -0
  57. package/dist/i18n/th.d.ts +22 -0
  58. package/dist/i18n/tk.d.ts +1 -0
  59. package/dist/i18n/tr.d.ts +22 -0
  60. package/dist/i18n/ur.d.ts +1 -0
  61. package/dist/i18n/uz.d.ts +1 -0
  62. package/dist/i18n/vi.d.ts +1 -0
  63. package/dist/i18n/zh.d.ts +22 -0
  64. package/dist/i18n/zht.d.ts +22 -0
  65. package/dist/v2/components/toast-v2.d.ts +19 -10
  66. package/package.json +3 -3
  67. package/src/components/diff-changes.css +2 -0
  68. package/src/components/dropdown-menu.css +2 -2
  69. package/src/components/icon.css +5 -0
  70. package/src/components/icon.tsx +12 -1
  71. package/src/components/provider-icons/sprite.svg +2 -27
  72. package/src/components/resize-handle.css +14 -2
  73. package/src/components/resize-handle.tsx +5 -1
  74. package/src/components/scroll-view.css +1 -1
  75. package/src/components/select.css +5 -3
  76. package/src/components/switch.css +4 -0
  77. package/src/components/tabs.css +54 -26
  78. package/src/components/tabs.tsx +1 -0
  79. package/src/components/text-field.css +2 -2
  80. package/src/components/toast.css +1 -1
  81. package/src/context/i18n.tsx +38 -2
  82. package/src/context/marked-parser.tsx +68 -0
  83. package/src/context/marked-theme-register.tsx +10 -0
  84. package/src/context/marked-theme.tsx +372 -0
  85. package/src/context/marked.tsx +20 -562
  86. package/src/i18n/am.ts +194 -0
  87. package/src/i18n/ar.ts +62 -22
  88. package/src/i18n/az.ts +195 -0
  89. package/src/i18n/bg.ts +195 -0
  90. package/src/i18n/bn.ts +197 -0
  91. package/src/i18n/br.ts +34 -6
  92. package/src/i18n/bs.ts +51 -23
  93. package/src/i18n/ca.ts +199 -0
  94. package/src/i18n/cs.ts +203 -0
  95. package/src/i18n/da.ts +36 -12
  96. package/src/i18n/de.ts +58 -36
  97. package/src/i18n/dv.ts +196 -0
  98. package/src/i18n/dz.ts +197 -0
  99. package/src/i18n/el.ts +195 -0
  100. package/src/i18n/en.ts +24 -0
  101. package/src/i18n/es.ts +45 -17
  102. package/src/i18n/et.ts +195 -0
  103. package/src/i18n/fa.ts +195 -0
  104. package/src/i18n/fi.ts +195 -0
  105. package/src/i18n/fo.ts +195 -0
  106. package/src/i18n/fr.ts +51 -21
  107. package/src/i18n/hi.ts +197 -0
  108. package/src/i18n/hr.ts +200 -0
  109. package/src/i18n/hu.ts +197 -0
  110. package/src/i18n/hy.ts +195 -0
  111. package/src/i18n/id.ts +217 -0
  112. package/src/i18n/is.ts +195 -0
  113. package/src/i18n/it.ts +200 -0
  114. package/src/i18n/ja.ts +29 -5
  115. package/src/i18n/ka.ts +195 -0
  116. package/src/i18n/km.ts +196 -0
  117. package/src/i18n/ko.ts +36 -12
  118. package/src/i18n/lo.ts +195 -0
  119. package/src/i18n/lt.ts +203 -0
  120. package/src/i18n/lv.ts +199 -0
  121. package/src/i18n/mk.ts +195 -0
  122. package/src/i18n/mn.ts +195 -0
  123. package/src/i18n/ms.ts +195 -0
  124. package/src/i18n/my.ts +196 -0
  125. package/src/i18n/ne.ts +197 -0
  126. package/src/i18n/nl.ts +195 -0
  127. package/src/i18n/no.ts +47 -23
  128. package/src/i18n/pa.ts +196 -0
  129. package/src/i18n/pl.ts +57 -24
  130. package/src/i18n/ro.ts +199 -0
  131. package/src/i18n/ru.ts +55 -23
  132. package/src/i18n/si.ts +195 -0
  133. package/src/i18n/sk.ts +203 -0
  134. package/src/i18n/sl.ts +204 -0
  135. package/src/i18n/sq.ts +195 -0
  136. package/src/i18n/sr.ts +200 -0
  137. package/src/i18n/sv.ts +195 -0
  138. package/src/i18n/tg.ts +195 -0
  139. package/src/i18n/th.ts +44 -21
  140. package/src/i18n/tk.ts +195 -0
  141. package/src/i18n/tr.ts +49 -25
  142. package/src/i18n/uk.ts +47 -15
  143. package/src/i18n/ur.ts +196 -0
  144. package/src/i18n/uz.ts +198 -0
  145. package/src/i18n/vi.ts +195 -0
  146. package/src/i18n/zh.ts +52 -29
  147. package/src/i18n/zht.ts +45 -22
  148. package/src/theme/themes/oc-2.json +4 -2
  149. package/src/v2/components/button-v2.css +2 -2
  150. package/src/v2/components/dialog-v2.css +2 -2
  151. package/src/v2/components/dialog-v2.tsx +3 -1
  152. package/src/v2/components/diff-changes-v2.css +2 -0
  153. package/src/v2/components/file-tree-v2.css +6 -2
  154. package/src/v2/components/inline-input-v2.tsx +3 -1
  155. package/src/v2/components/line-comment-v2.css +1 -1
  156. package/src/v2/components/line-comment-v2.tsx +6 -4
  157. package/src/v2/components/select-v2.css +16 -5
  158. package/src/v2/components/switch-v2.css +8 -0
  159. package/src/v2/components/tabs-v2.css +4 -6
  160. package/src/v2/components/tabs-v2.tsx +4 -2
  161. package/src/v2/components/text-input-v2.css +7 -5
  162. package/src/v2/components/text-input-v2.tsx +7 -1
  163. package/src/v2/components/toast-v2.css +132 -122
  164. package/src/v2/components/toast-v2.tsx +208 -73
  165. package/dist/context/marked-code-span.d.ts +0 -10
  166. package/src/context/marked-code-span.ts +0 -17
@@ -1,13 +1,41 @@
1
1
  import { createContext, useContext, type Accessor, type ParentProps } from "solid-js"
2
+ import { I18nProvider } from "@kobalte/core/i18n"
2
3
  import { dict as en } from "../i18n/en"
3
4
 
4
5
  export type UiI18nKey = keyof typeof en
5
6
 
7
+ export const UI_PLURAL_KEYS = [
8
+ "ui.sessionTurn.diffs.changed",
9
+ "ui.messagePart.context.read",
10
+ "ui.messagePart.context.search",
11
+ "ui.messagePart.context.list",
12
+ ] as const
13
+ export type UiI18nPluralKey = (typeof UI_PLURAL_KEYS)[number]
14
+ export type UiPluralCategory = "zero" | "one" | "two" | "few" | "many" | "other"
15
+ export type UiI18nPluralLookupKey = `${UiI18nPluralKey}.${UiPluralCategory}`
16
+
6
17
  export type UiI18nParams = Record<string, string | number | boolean>
7
18
 
8
19
  export type UiI18n = {
9
20
  locale: Accessor<string>
21
+ layoutLocale?: Accessor<string>
10
22
  t: (key: UiI18nKey, params?: UiI18nParams) => string
23
+ plural: (key: UiI18nPluralKey, count: number, params?: UiI18nParams) => string
24
+ }
25
+
26
+ const rules = new Map<string, Intl.PluralRules>()
27
+
28
+ export function pluralCategory(locale: string, count: number): UiPluralCategory {
29
+ const cached = rules.get(locale)
30
+ if (cached) return cached.select(count)
31
+ const next = new Intl.PluralRules(locale)
32
+ if (rules.size >= 32) rules.delete(rules.keys().next().value!)
33
+ rules.set(locale, next)
34
+ return next.select(count)
35
+ }
36
+
37
+ export function pluralKey(key: UiI18nPluralKey, category: UiPluralCategory) {
38
+ return `${key}.${category}` as UiI18nPluralLookupKey
11
39
  }
12
40
 
13
41
  function resolveTemplate(text: string, params?: UiI18nParams) {
@@ -25,14 +53,22 @@ const fallback: UiI18n = {
25
53
  const value = en[key] ?? String(key)
26
54
  return resolveTemplate(value, params)
27
55
  },
56
+ plural: (key, count, params) =>
57
+ fallback.t(pluralKey(key, pluralCategory(fallback.locale(), count)), { ...params, count }),
28
58
  }
29
59
 
30
60
  const Context = createContext<UiI18n>(fallback)
31
61
 
32
- export function I18nProvider(props: ParentProps<{ value: UiI18n }>) {
33
- return <Context.Provider value={props.value}>{props.children}</Context.Provider>
62
+ function UiI18nProvider(props: ParentProps<{ value: UiI18n }>) {
63
+ return (
64
+ <I18nProvider locale={(props.value.layoutLocale ?? props.value.locale)()}>
65
+ <Context.Provider value={props.value}>{props.children}</Context.Provider>
66
+ </I18nProvider>
67
+ )
34
68
  }
35
69
 
70
+ export { UiI18nProvider as I18nProvider }
71
+
36
72
  export function useI18n() {
37
73
  return useContext(Context)
38
74
  }
@@ -0,0 +1,68 @@
1
+ import katex from "katex"
2
+ import { Marked, type MarkedExtension, type Tokens } from "marked"
3
+ import markedShiki from "marked-shiki"
4
+
5
+ export function createMarkdownParser(highlight: (code: string, language: string) => string | Promise<string>) {
6
+ return new Marked(
7
+ {
8
+ renderer: {
9
+ link({ href, title, text }) {
10
+ const titleAttr = title ? ` title="${title}"` : ""
11
+ return `<a href="${href}"${titleAttr} class="external-link" target="_blank" rel="noopener noreferrer">${text}</a>`
12
+ },
13
+ },
14
+ },
15
+ katexExtension,
16
+ markedShiki({ highlight }),
17
+ )
18
+ }
19
+
20
+ const inlineMathRegex = /^\\\(((?:\\.|[^\\\n])*?)\\\)/
21
+ const blockMathRegex = /^\$\$\n([\s\S]+?)\n\$\$(?:\n|$)/
22
+
23
+ const katexExtension: MarkedExtension = {
24
+ extensions: [
25
+ {
26
+ name: "inlineKatex",
27
+ level: "inline",
28
+ start(src) {
29
+ const index = src.indexOf("\\(")
30
+ if (index === -1) return
31
+ return index
32
+ },
33
+ tokenizer(src) {
34
+ const match = src.match(inlineMathRegex)
35
+ if (!match) return
36
+ return {
37
+ type: "inlineKatex",
38
+ raw: match[0],
39
+ text: match[1].trim(),
40
+ displayMode: false,
41
+ }
42
+ },
43
+ renderer: renderKatexToken,
44
+ },
45
+ {
46
+ name: "blockKatex",
47
+ level: "block",
48
+ tokenizer(src) {
49
+ const match = src.match(blockMathRegex)
50
+ if (!match) return
51
+ return {
52
+ type: "blockKatex",
53
+ raw: match[0],
54
+ text: match[1].trim(),
55
+ displayMode: true,
56
+ }
57
+ },
58
+ renderer: renderKatexToken,
59
+ },
60
+ ],
61
+ }
62
+
63
+ function renderKatexToken(token: Tokens.Generic) {
64
+ return katex.renderToString(typeof token.text === "string" ? token.text : "", {
65
+ displayMode: token.displayMode === true,
66
+ throwOnError: false,
67
+ })
68
+ }
@@ -0,0 +1,10 @@
1
+ import { registerCustomTheme } from "@pierre/diffs"
2
+ import { OpenCodeTheme } from "./marked-theme"
3
+
4
+ let registered = false
5
+
6
+ export function registerOpenCodeTheme() {
7
+ if (registered) return
8
+ registered = true
9
+ registerCustomTheme("OpenCode", () => Promise.resolve(OpenCodeTheme))
10
+ }
@@ -0,0 +1,372 @@
1
+ import type { ThemeRegistrationResolved } from "@pierre/diffs"
2
+
3
+ export const OpenCodeTheme = {
4
+ name: "OpenCode",
5
+ bg: "var(--color-background-stronger)",
6
+ fg: "var(--text-base)",
7
+ colors: {
8
+ "editor.background": "var(--color-background-stronger)",
9
+ "editor.foreground": "var(--text-base)",
10
+ "gitDecoration.addedResourceForeground": "var(--syntax-diff-add)",
11
+ "gitDecoration.deletedResourceForeground": "var(--syntax-diff-delete)",
12
+ "gitDecoration.modifiedResourceForeground": "var(--syntax-diff-unknown)",
13
+ // "gitDecoration.conflictingResourceForeground": "#ffca00",
14
+ // "gitDecoration.modifiedResourceForeground": "#1a76d4",
15
+ // "gitDecoration.untrackedResourceForeground": "#00cab1",
16
+ // "gitDecoration.ignoredResourceForeground": "#84848A",
17
+ // "terminal.titleForeground": "#adadb1",
18
+ // "terminal.titleInactiveForeground": "#84848A",
19
+ // "terminal.background": "#141415",
20
+ // "terminal.foreground": "#adadb1",
21
+ // "terminal.ansiBlack": "#141415",
22
+ // "terminal.ansiRed": "#ff2e3f",
23
+ // "terminal.ansiGreen": "#0dbe4e",
24
+ // "terminal.ansiYellow": "#ffca00",
25
+ // "terminal.ansiBlue": "#008cff",
26
+ // "terminal.ansiMagenta": "#c635e4",
27
+ // "terminal.ansiCyan": "#08c0ef",
28
+ // "terminal.ansiWhite": "#c6c6c8",
29
+ // "terminal.ansiBrightBlack": "#141415",
30
+ // "terminal.ansiBrightRed": "#ff2e3f",
31
+ // "terminal.ansiBrightGreen": "#0dbe4e",
32
+ // "terminal.ansiBrightYellow": "#ffca00",
33
+ // "terminal.ansiBrightBlue": "#008cff",
34
+ // "terminal.ansiBrightMagenta": "#c635e4",
35
+ // "terminal.ansiBrightCyan": "#08c0ef",
36
+ // "terminal.ansiBrightWhite": "#c6c6c8",
37
+ },
38
+ tokenColors: [
39
+ {
40
+ scope: ["comment", "punctuation.definition.comment", "string.comment"],
41
+ settings: {
42
+ foreground: "var(--syntax-comment)",
43
+ },
44
+ },
45
+ {
46
+ scope: ["entity.other.attribute-name"],
47
+ settings: {
48
+ foreground: "var(--syntax-property)", // maybe attribute
49
+ },
50
+ },
51
+ {
52
+ scope: ["constant", "entity.name.constant", "variable.other.constant", "variable.language", "entity"],
53
+ settings: {
54
+ foreground: "var(--syntax-constant)",
55
+ },
56
+ },
57
+ {
58
+ scope: ["entity.name", "meta.export.default", "meta.definition.variable"],
59
+ settings: {
60
+ foreground: "var(--syntax-type)",
61
+ },
62
+ },
63
+ {
64
+ scope: ["meta.object.member"],
65
+ settings: {
66
+ foreground: "var(--syntax-primitive)",
67
+ },
68
+ },
69
+ {
70
+ scope: [
71
+ "variable.parameter.function",
72
+ "meta.jsx.children",
73
+ "meta.block",
74
+ "meta.tag.attributes",
75
+ "entity.name.constant",
76
+ "meta.embedded.expression",
77
+ "meta.template.expression",
78
+ "string.other.begin.yaml",
79
+ "string.other.end.yaml",
80
+ ],
81
+ settings: {
82
+ foreground: "var(--syntax-punctuation)",
83
+ },
84
+ },
85
+ {
86
+ scope: ["entity.name.function", "support.type.primitive"],
87
+ settings: {
88
+ foreground: "var(--syntax-primitive)",
89
+ },
90
+ },
91
+ {
92
+ scope: ["support.class.component"],
93
+ settings: {
94
+ foreground: "var(--syntax-type)",
95
+ },
96
+ },
97
+ {
98
+ scope: "keyword",
99
+ settings: {
100
+ foreground: "var(--syntax-keyword)",
101
+ },
102
+ },
103
+ {
104
+ scope: [
105
+ "keyword.operator",
106
+ "storage.type.function.arrow",
107
+ "punctuation.separator.key-value.css",
108
+ "entity.name.tag.yaml",
109
+ "punctuation.separator.key-value.mapping.yaml",
110
+ ],
111
+ settings: {
112
+ foreground: "var(--syntax-operator)",
113
+ },
114
+ },
115
+ {
116
+ scope: ["storage", "storage.type"],
117
+ settings: {
118
+ foreground: "var(--syntax-keyword)",
119
+ },
120
+ },
121
+ {
122
+ scope: ["storage.modifier.package", "storage.modifier.import", "storage.type.java"],
123
+ settings: {
124
+ foreground: "var(--syntax-primitive)",
125
+ },
126
+ },
127
+ {
128
+ scope: [
129
+ "string",
130
+ "punctuation.definition.string",
131
+ "string punctuation.section.embedded source",
132
+ "entity.name.tag",
133
+ ],
134
+ settings: {
135
+ foreground: "var(--syntax-string)",
136
+ },
137
+ },
138
+ {
139
+ scope: "support",
140
+ settings: {
141
+ foreground: "var(--syntax-primitive)",
142
+ },
143
+ },
144
+ {
145
+ scope: ["support.type.object.module", "variable.other.object", "support.type.property-name.css"],
146
+ settings: {
147
+ foreground: "var(--syntax-object)",
148
+ },
149
+ },
150
+ {
151
+ scope: "meta.property-name",
152
+ settings: {
153
+ foreground: "var(--syntax-property)",
154
+ },
155
+ },
156
+ {
157
+ scope: "variable",
158
+ settings: {
159
+ foreground: "var(--syntax-variable)",
160
+ },
161
+ },
162
+ {
163
+ scope: "variable.other",
164
+ settings: {
165
+ foreground: "var(--syntax-variable)",
166
+ },
167
+ },
168
+ {
169
+ scope: [
170
+ "invalid.broken",
171
+ "invalid.illegal",
172
+ "invalid.unimplemented",
173
+ "invalid.deprecated",
174
+ "message.error",
175
+ "markup.deleted",
176
+ "meta.diff.header.from-file",
177
+ "punctuation.definition.deleted",
178
+ "brackethighlighter.unmatched",
179
+ "token.error-token",
180
+ ],
181
+ settings: {
182
+ foreground: "var(--syntax-critical)",
183
+ },
184
+ },
185
+ {
186
+ scope: "carriage-return",
187
+ settings: {
188
+ foreground: "var(--syntax-keyword)",
189
+ },
190
+ },
191
+ {
192
+ scope: "string source",
193
+ settings: {
194
+ foreground: "var(--syntax-variable)",
195
+ },
196
+ },
197
+ {
198
+ scope: "string variable",
199
+ settings: {
200
+ foreground: "var(--syntax-constant)",
201
+ },
202
+ },
203
+ {
204
+ scope: [
205
+ "source.regexp",
206
+ "string.regexp",
207
+ "string.regexp.character-class",
208
+ "string.regexp constant.character.escape",
209
+ "string.regexp source.ruby.embedded",
210
+ "string.regexp string.regexp.arbitrary-repitition",
211
+ "string.regexp constant.character.escape",
212
+ ],
213
+ settings: {
214
+ foreground: "var(--syntax-regexp)",
215
+ },
216
+ },
217
+ {
218
+ scope: "support.constant",
219
+ settings: {
220
+ foreground: "var(--syntax-primitive)",
221
+ },
222
+ },
223
+ {
224
+ scope: "support.variable",
225
+ settings: {
226
+ foreground: "var(--syntax-variable)",
227
+ },
228
+ },
229
+ {
230
+ scope: "meta.module-reference",
231
+ settings: {
232
+ foreground: "var(--syntax-info)",
233
+ },
234
+ },
235
+ {
236
+ scope: "punctuation.definition.list.begin.markdown",
237
+ settings: {
238
+ foreground: "var(--syntax-punctuation)",
239
+ },
240
+ },
241
+ {
242
+ scope: ["markup.heading", "markup.heading entity.name"],
243
+ settings: {
244
+ fontStyle: "bold",
245
+ foreground: "var(--syntax-info)",
246
+ },
247
+ },
248
+ {
249
+ scope: "markup.quote",
250
+ settings: {
251
+ foreground: "var(--syntax-info)",
252
+ },
253
+ },
254
+ {
255
+ scope: "markup.italic",
256
+ settings: {
257
+ fontStyle: "italic",
258
+ // foreground: "",
259
+ },
260
+ },
261
+ {
262
+ scope: "markup.bold",
263
+ settings: {
264
+ fontStyle: "bold",
265
+ foreground: "var(--text-strong)",
266
+ },
267
+ },
268
+ {
269
+ scope: [
270
+ "markup.raw",
271
+ "markup.inserted",
272
+ "meta.diff.header.to-file",
273
+ "punctuation.definition.inserted",
274
+ "markup.changed",
275
+ "punctuation.definition.changed",
276
+ "markup.ignored",
277
+ "markup.untracked",
278
+ ],
279
+ settings: {
280
+ foreground: "var(--text-base)",
281
+ },
282
+ },
283
+ {
284
+ scope: "meta.diff.range",
285
+ settings: {
286
+ fontStyle: "bold",
287
+ foreground: "var(--syntax-unknown)",
288
+ },
289
+ },
290
+ {
291
+ scope: "meta.diff.header",
292
+ settings: {
293
+ foreground: "var(--syntax-unknown)",
294
+ },
295
+ },
296
+ {
297
+ scope: "meta.separator",
298
+ settings: {
299
+ fontStyle: "bold",
300
+ foreground: "var(--syntax-unknown)",
301
+ },
302
+ },
303
+ {
304
+ scope: "meta.output",
305
+ settings: {
306
+ foreground: "var(--syntax-unknown)",
307
+ },
308
+ },
309
+ {
310
+ scope: "meta.export.default",
311
+ settings: {
312
+ foreground: "var(--syntax-unknown)",
313
+ },
314
+ },
315
+ {
316
+ scope: [
317
+ "brackethighlighter.tag",
318
+ "brackethighlighter.curly",
319
+ "brackethighlighter.round",
320
+ "brackethighlighter.square",
321
+ "brackethighlighter.angle",
322
+ "brackethighlighter.quote",
323
+ ],
324
+ settings: {
325
+ foreground: "var(--syntax-unknown)",
326
+ },
327
+ },
328
+ {
329
+ scope: ["constant.other.reference.link", "string.other.link"],
330
+ settings: {
331
+ fontStyle: "underline",
332
+ foreground: "var(--syntax-unknown)",
333
+ },
334
+ },
335
+ {
336
+ scope: "token.info-token",
337
+ settings: {
338
+ foreground: "var(--syntax-info)",
339
+ },
340
+ },
341
+ {
342
+ scope: "token.warn-token",
343
+ settings: {
344
+ foreground: "var(--syntax-warning)",
345
+ },
346
+ },
347
+ {
348
+ scope: "token.debug-token",
349
+ settings: {
350
+ foreground: "var(--syntax-info)",
351
+ },
352
+ },
353
+ ],
354
+ semanticTokenColors: {
355
+ comment: "var(--syntax-comment)",
356
+ string: "var(--syntax-string)",
357
+ number: "var(--syntax-constant)",
358
+ regexp: "var(--syntax-regexp)",
359
+ keyword: "var(--syntax-keyword)",
360
+ variable: "var(--syntax-variable)",
361
+ parameter: "var(--syntax-variable)",
362
+ property: "var(--syntax-property)",
363
+ function: "var(--syntax-primitive)",
364
+ method: "var(--syntax-primitive)",
365
+ type: "var(--syntax-type)",
366
+ class: "var(--syntax-type)",
367
+ namespace: "var(--syntax-type)",
368
+ enumMember: "var(--syntax-primitive)",
369
+ "variable.constant": "var(--syntax-constant)",
370
+ "variable.defaultLibrary": "var(--syntax-unknown)",
371
+ },
372
+ } as unknown as ThemeRegistrationResolved