@opencode-ai/ui 0.0.0-dev-202608180449 → 0.0.0-dev-17604
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.
- package/dist/components/icon.d.ts +6 -0
- package/dist/components/scroll-view.d.ts +3 -3
- package/dist/context/i18n.d.ts +10 -7
- package/dist/i18n/ar.d.ts +0 -2
- package/dist/i18n/bg.d.ts +0 -2
- package/dist/i18n/br.d.ts +0 -2
- package/dist/i18n/bs.d.ts +0 -2
- package/dist/i18n/da.d.ts +0 -2
- package/dist/i18n/de.d.ts +0 -2
- package/dist/i18n/en.d.ts +205 -1
- package/dist/i18n/es.d.ts +0 -2
- package/dist/i18n/fr.d.ts +0 -2
- package/dist/i18n/he.d.ts +197 -0
- package/dist/i18n/ja.d.ts +0 -2
- package/dist/i18n/km.d.ts +0 -2
- package/dist/i18n/ko.d.ts +0 -2
- package/dist/i18n/lo.d.ts +0 -2
- package/dist/i18n/mk.d.ts +0 -2
- package/dist/i18n/mn.d.ts +0 -2
- package/dist/i18n/my.d.ts +0 -2
- package/dist/i18n/pl.d.ts +0 -2
- package/dist/i18n/ru.d.ts +0 -2
- package/dist/i18n/sr.d.ts +0 -2
- package/dist/i18n/tg.d.ts +0 -2
- package/dist/i18n/th.d.ts +0 -2
- package/dist/i18n/tr.d.ts +0 -2
- package/dist/i18n/zh.d.ts +0 -2
- package/dist/i18n/zht.d.ts +0 -2
- package/dist/v2/components/icon.d.ts +12 -0
- package/package.json +2 -6
- package/src/components/accordion.css +0 -24
- package/src/components/animated-number.css +29 -11
- package/src/components/animated-number.tsx +2 -2
- package/src/components/card.css +0 -21
- package/src/components/card.tsx +3 -3
- package/src/components/icon.tsx +6 -0
- package/src/components/list.tsx +4 -2
- package/src/components/provider-icon.tsx +1 -1
- package/src/components/scroll-view.tsx +5 -20
- package/src/components/tabs.css +16 -18
- package/src/components/text-shimmer.css +2 -1
- package/src/components/toast.tsx +16 -14
- package/src/context/i18n.tsx +17 -14
- package/src/hooks/create-auto-scroll.tsx +20 -0
- package/src/i18n/am.ts +0 -2
- package/src/i18n/ar.ts +0 -2
- package/src/i18n/az.ts +0 -2
- package/src/i18n/bg.ts +0 -2
- package/src/i18n/bn.ts +0 -2
- package/src/i18n/br.ts +0 -2
- package/src/i18n/bs.ts +0 -2
- package/src/i18n/ca.ts +0 -2
- package/src/i18n/cs.ts +0 -2
- package/src/i18n/da.ts +0 -2
- package/src/i18n/de.ts +0 -2
- package/src/i18n/dv.ts +0 -2
- package/src/i18n/dz.ts +0 -2
- package/src/i18n/el.ts +0 -2
- package/src/i18n/en.ts +14 -4
- package/src/i18n/es.ts +0 -2
- package/src/i18n/et.ts +0 -2
- package/src/i18n/fa.ts +0 -2
- package/src/i18n/fi.ts +0 -2
- package/src/i18n/fo.ts +0 -2
- package/src/i18n/fr.ts +0 -2
- package/src/i18n/he.ts +199 -0
- package/src/i18n/hi.ts +0 -2
- package/src/i18n/hr.ts +0 -2
- package/src/i18n/hu.ts +0 -2
- package/src/i18n/hy.ts +0 -2
- package/src/i18n/id.ts +0 -2
- package/src/i18n/is.ts +0 -2
- package/src/i18n/it.ts +0 -2
- package/src/i18n/ja.ts +0 -2
- package/src/i18n/ka.ts +0 -2
- package/src/i18n/km.ts +0 -2
- package/src/i18n/ko.ts +0 -2
- package/src/i18n/lo.ts +0 -2
- package/src/i18n/lt.ts +0 -2
- package/src/i18n/lv.ts +0 -2
- package/src/i18n/mk.ts +0 -2
- package/src/i18n/mn.ts +0 -2
- package/src/i18n/ms.ts +0 -2
- package/src/i18n/my.ts +0 -2
- package/src/i18n/ne.ts +0 -2
- package/src/i18n/nl.ts +0 -2
- package/src/i18n/no.ts +0 -2
- package/src/i18n/pa.ts +0 -2
- package/src/i18n/pl.ts +0 -2
- package/src/i18n/ro.ts +0 -2
- package/src/i18n/ru.ts +0 -2
- package/src/i18n/si.ts +0 -2
- package/src/i18n/sk.ts +0 -2
- package/src/i18n/sl.ts +0 -2
- package/src/i18n/sq.ts +0 -2
- package/src/i18n/sr.ts +0 -2
- package/src/i18n/sv.ts +0 -2
- package/src/i18n/tg.ts +0 -2
- package/src/i18n/th.ts +0 -2
- package/src/i18n/tk.ts +0 -2
- package/src/i18n/tr.ts +0 -2
- package/src/i18n/uk.ts +0 -2
- package/src/i18n/ur.ts +0 -2
- package/src/i18n/uz.ts +0 -2
- package/src/i18n/vi.ts +0 -2
- package/src/i18n/zh.ts +0 -2
- package/src/i18n/zht.ts +0 -2
- package/src/theme/context.tsx +19 -11
- package/src/theme/themes/oc-2.json +1 -1
- package/src/v2/components/dialog-v2.css +3 -0
- package/src/v2/components/dialog-v2.tsx +2 -2
- package/src/v2/components/icon.tsx +13 -0
- package/src/v2/components/keybind-v2.css +1 -1
- package/src/v2/components/line-comment-v2.tsx +2 -0
- package/src/v2/components/tabs-v2.css +12 -4
- package/src/v2/components/text-shimmer-v2.css +2 -1
- package/src/v2/components/toast-v2.tsx +2 -0
- package/src/v2/components/tooltip-v2.tsx +3 -2
- package/src/v2/styles/theme.css +0 -12
package/src/i18n/pl.ts
CHANGED
|
@@ -159,8 +159,6 @@ export const dict = {
|
|
|
159
159
|
"ui.tool.websearch.provider": "{{provider}} Wyszukiwanie w sieci",
|
|
160
160
|
"ui.tool.shell": "Terminal",
|
|
161
161
|
"ui.tool.patch": "Patch",
|
|
162
|
-
"ui.tool.todos": "Zadania",
|
|
163
|
-
"ui.tool.todos.read": "Czytaj zadania",
|
|
164
162
|
"ui.tool.questions": "Pytania",
|
|
165
163
|
"ui.tool.questions.numbered": "Pytania {{number}}",
|
|
166
164
|
"ui.tool.agent": "Agent {{type}}",
|
package/src/i18n/ro.ts
CHANGED
|
@@ -147,8 +147,6 @@ export const dict: Record<string, string> = {
|
|
|
147
147
|
"ui.tool.websearch.provider": "Căutare web {{provider}}",
|
|
148
148
|
"ui.tool.shell": "Shell",
|
|
149
149
|
"ui.tool.patch": "Petec",
|
|
150
|
-
"ui.tool.todos": "Sarcini",
|
|
151
|
-
"ui.tool.todos.read": "Citește sarcinile",
|
|
152
150
|
"ui.tool.questions": "Întrebări",
|
|
153
151
|
"ui.tool.questions.numbered": "Întrebări {{number}}",
|
|
154
152
|
"ui.tool.agent": "Agent {{type}}",
|
package/src/i18n/ru.ts
CHANGED
|
@@ -158,8 +158,6 @@ export const dict = {
|
|
|
158
158
|
"ui.tool.websearch.provider": "{{provider}} Веб-поиск",
|
|
159
159
|
"ui.tool.shell": "Оболочка",
|
|
160
160
|
"ui.tool.patch": "Патч",
|
|
161
|
-
"ui.tool.todos": "Задачи",
|
|
162
|
-
"ui.tool.todos.read": "Читать задачи",
|
|
163
161
|
"ui.tool.questions": "Вопросы",
|
|
164
162
|
"ui.tool.questions.numbered": "Вопросы {{number}}",
|
|
165
163
|
"ui.tool.agent": "Агент {{type}}",
|
package/src/i18n/si.ts
CHANGED
|
@@ -143,8 +143,6 @@ export const dict: Record<string, string> = {
|
|
|
143
143
|
"ui.tool.websearch.provider": "{{provider}} Web Search",
|
|
144
144
|
"ui.tool.shell": "ෂෙල්",
|
|
145
145
|
"ui.tool.patch": "පැච්",
|
|
146
|
-
"ui.tool.todos": "කළ යුතු දේ",
|
|
147
|
-
"ui.tool.todos.read": "කළ යුතු දේ කියවන්න",
|
|
148
146
|
"ui.tool.questions": "ප්රශ්න",
|
|
149
147
|
"ui.tool.questions.numbered": "ප්රශ්න {{number}}",
|
|
150
148
|
"ui.tool.agent": "{{type}} නියෝජිතයා",
|
package/src/i18n/sk.ts
CHANGED
|
@@ -151,8 +151,6 @@ export const dict: Record<string, string> = {
|
|
|
151
151
|
"ui.tool.websearch.provider": "{{provider}} webové vyhľadávanie",
|
|
152
152
|
"ui.tool.shell": "Shell",
|
|
153
153
|
"ui.tool.patch": "Záplata",
|
|
154
|
-
"ui.tool.todos": "Úlohy",
|
|
155
|
-
"ui.tool.todos.read": "Prečítať úlohy",
|
|
156
154
|
"ui.tool.questions": "Otázky",
|
|
157
155
|
"ui.tool.questions.numbered": "Otázky {{number}}",
|
|
158
156
|
"ui.tool.agent": "{{type}} agent",
|
package/src/i18n/sl.ts
CHANGED
|
@@ -152,8 +152,6 @@ export const dict: Record<string, string> = {
|
|
|
152
152
|
"ui.tool.websearch.provider": "Spletno iskanje {{provider}}",
|
|
153
153
|
"ui.tool.shell": "Lupina",
|
|
154
154
|
"ui.tool.patch": "obliž",
|
|
155
|
-
"ui.tool.todos": "Opravki",
|
|
156
|
-
"ui.tool.todos.read": "Preberi opravila",
|
|
157
155
|
"ui.tool.questions": "Vprašanja",
|
|
158
156
|
"ui.tool.questions.numbered": "Vprašanja {{number}}",
|
|
159
157
|
"ui.tool.agent": "{{type}} Agent",
|
package/src/i18n/sq.ts
CHANGED
|
@@ -143,8 +143,6 @@ export const dict: Record<string, string> = {
|
|
|
143
143
|
"ui.tool.websearch.provider": "{{provider}} Kërkimi në ueb",
|
|
144
144
|
"ui.tool.shell": "Shell",
|
|
145
145
|
"ui.tool.patch": "Patch",
|
|
146
|
-
"ui.tool.todos": "detyrat",
|
|
147
|
-
"ui.tool.todos.read": "Lexoni detyrat",
|
|
148
146
|
"ui.tool.questions": "Pyetje",
|
|
149
147
|
"ui.tool.questions.numbered": "Pyetje {{number}}",
|
|
150
148
|
"ui.tool.agent": "{{type}} Agjent",
|
package/src/i18n/sr.ts
CHANGED
|
@@ -148,8 +148,6 @@ export const dict = {
|
|
|
148
148
|
"ui.tool.websearch.provider": "{{provider}} Веб претрага",
|
|
149
149
|
"ui.tool.shell": "Shell",
|
|
150
150
|
"ui.tool.patch": "Patch",
|
|
151
|
-
"ui.tool.todos": "То-дос",
|
|
152
|
-
"ui.tool.todos.read": "Читање обавеза",
|
|
153
151
|
"ui.tool.questions": "Питања",
|
|
154
152
|
"ui.tool.questions.numbered": "Питања {{number}}",
|
|
155
153
|
"ui.tool.agent": "{{type}} Агент",
|
package/src/i18n/sv.ts
CHANGED
|
@@ -143,8 +143,6 @@ export const dict: Record<string, string> = {
|
|
|
143
143
|
"ui.tool.websearch.provider": "{{provider}} Webbsökning",
|
|
144
144
|
"ui.tool.shell": "Shell",
|
|
145
145
|
"ui.tool.patch": "Patch",
|
|
146
|
-
"ui.tool.todos": "Att göra",
|
|
147
|
-
"ui.tool.todos.read": "Läs att göra-listan",
|
|
148
146
|
"ui.tool.questions": "Frågor",
|
|
149
147
|
"ui.tool.questions.numbered": "Frågor {{number}}",
|
|
150
148
|
"ui.tool.agent": "{{type}}-agent",
|
package/src/i18n/tg.ts
CHANGED
|
@@ -143,8 +143,6 @@ export const dict = {
|
|
|
143
143
|
"ui.tool.websearch.provider": "{{provider}} Ҷустуҷӯи веб",
|
|
144
144
|
"ui.tool.shell": "Shell",
|
|
145
145
|
"ui.tool.patch": "Patch",
|
|
146
|
-
"ui.tool.todos": "Вазифаҳо",
|
|
147
|
-
"ui.tool.todos.read": "Вазифаҳоро хонед",
|
|
148
146
|
"ui.tool.questions": "Саволҳо",
|
|
149
147
|
"ui.tool.questions.numbered": "Саволҳо {{number}}",
|
|
150
148
|
"ui.tool.agent": "{{type}} Агент",
|
package/src/i18n/th.ts
CHANGED
|
@@ -151,8 +151,6 @@ export const dict = {
|
|
|
151
151
|
"ui.tool.websearch.provider": "{{provider}} ค้นหาเว็บ",
|
|
152
152
|
"ui.tool.shell": "เชลล์",
|
|
153
153
|
"ui.tool.patch": "แพตช์",
|
|
154
|
-
"ui.tool.todos": "รายการงาน",
|
|
155
|
-
"ui.tool.todos.read": "อ่านรายการงาน",
|
|
156
154
|
"ui.tool.questions": "คำถาม",
|
|
157
155
|
"ui.tool.questions.numbered": "คำถาม {{number}}",
|
|
158
156
|
"ui.tool.agent": "เอเจนต์ {{type}}",
|
package/src/i18n/tk.ts
CHANGED
|
@@ -143,8 +143,6 @@ export const dict: Record<string, string> = {
|
|
|
143
143
|
"ui.tool.websearch.provider": "{{provider}} Web gözlegi",
|
|
144
144
|
"ui.tool.shell": "Shell",
|
|
145
145
|
"ui.tool.patch": "Patch",
|
|
146
|
-
"ui.tool.todos": "Edilmeli işler",
|
|
147
|
-
"ui.tool.todos.read": "Edilmeli zatlary okaň",
|
|
148
146
|
"ui.tool.questions": "Soraglar",
|
|
149
147
|
"ui.tool.questions.numbered": "Soraglar {{number}}",
|
|
150
148
|
"ui.tool.agent": "{{type}} Agenti",
|
package/src/i18n/tr.ts
CHANGED
|
@@ -157,8 +157,6 @@ export const dict = {
|
|
|
157
157
|
"ui.tool.websearch.provider": "{{provider}} Web araması",
|
|
158
158
|
"ui.tool.shell": "Kabuk",
|
|
159
159
|
"ui.tool.patch": "Yama",
|
|
160
|
-
"ui.tool.todos": "Görevler",
|
|
161
|
-
"ui.tool.todos.read": "Görevleri oku",
|
|
162
160
|
"ui.tool.questions": "Sorular",
|
|
163
161
|
"ui.tool.questions.numbered": "Sorular {{number}}",
|
|
164
162
|
"ui.tool.agent": "{{type}} ajanı",
|
package/src/i18n/uk.ts
CHANGED
|
@@ -167,8 +167,6 @@ export const dict: Record<string, string> = {
|
|
|
167
167
|
"ui.tool.websearch.provider": "{{provider}} Веб-пошук",
|
|
168
168
|
"ui.tool.shell": "Оболонка",
|
|
169
169
|
"ui.tool.patch": "Патч",
|
|
170
|
-
"ui.tool.todos": "Завдання",
|
|
171
|
-
"ui.tool.todos.read": "Читати завдання",
|
|
172
170
|
"ui.tool.questions": "Запитання",
|
|
173
171
|
"ui.tool.questions.numbered": "Запитання {{number}}",
|
|
174
172
|
"ui.tool.agent": "Агент {{type}}",
|
package/src/i18n/ur.ts
CHANGED
|
@@ -144,8 +144,6 @@ export const dict: Record<string, string> = {
|
|
|
144
144
|
"ui.tool.websearch.provider": "{{provider}} ویب تلاش",
|
|
145
145
|
"ui.tool.shell": "شیل",
|
|
146
146
|
"ui.tool.patch": "پیچ",
|
|
147
|
-
"ui.tool.todos": "زیر التوا کام",
|
|
148
|
-
"ui.tool.todos.read": "زیر التوا کام پڑھیں",
|
|
149
147
|
"ui.tool.questions": "سوالات",
|
|
150
148
|
"ui.tool.questions.numbered": "سوالات {{number}}",
|
|
151
149
|
"ui.tool.agent": "{{type}} ایجنٹ",
|
package/src/i18n/uz.ts
CHANGED
|
@@ -146,8 +146,6 @@ export const dict: Record<string, string> = {
|
|
|
146
146
|
"ui.tool.websearch.provider": "{{provider}} veb-qidiruv",
|
|
147
147
|
"ui.tool.shell": "Shell",
|
|
148
148
|
"ui.tool.patch": "Yamoq",
|
|
149
|
-
"ui.tool.todos": "Vazifalar",
|
|
150
|
-
"ui.tool.todos.read": "Vazifalarni o'qing",
|
|
151
149
|
"ui.tool.questions": "Savollar",
|
|
152
150
|
"ui.tool.questions.numbered": "Savollar {{number}}",
|
|
153
151
|
"ui.tool.agent": "{{type}} agenti",
|
package/src/i18n/vi.ts
CHANGED
|
@@ -143,8 +143,6 @@ export const dict: Record<string, string> = {
|
|
|
143
143
|
"ui.tool.websearch.provider": "{{provider}} Tìm kiếm trên web",
|
|
144
144
|
"ui.tool.shell": "Shell",
|
|
145
145
|
"ui.tool.patch": "Bản vá",
|
|
146
|
-
"ui.tool.todos": "Việc cần làm",
|
|
147
|
-
"ui.tool.todos.read": "Đọc việc cần làm",
|
|
148
146
|
"ui.tool.questions": "Câu hỏi",
|
|
149
147
|
"ui.tool.questions.numbered": "Câu hỏi {{number}}",
|
|
150
148
|
"ui.tool.agent": "Tác nhân {{type}}",
|
package/src/i18n/zh.ts
CHANGED
|
@@ -153,8 +153,6 @@ export const dict = {
|
|
|
153
153
|
"ui.tool.websearch.provider": "{{provider}} 网页搜索",
|
|
154
154
|
"ui.tool.shell": "Shell",
|
|
155
155
|
"ui.tool.patch": "补丁",
|
|
156
|
-
"ui.tool.todos": "待办",
|
|
157
|
-
"ui.tool.todos.read": "读取待办",
|
|
158
156
|
"ui.tool.questions": "问题",
|
|
159
157
|
"ui.tool.questions.numbered": "问题 {{number}}",
|
|
160
158
|
"ui.tool.agent": "{{type}} 智能体",
|
package/src/i18n/zht.ts
CHANGED
|
@@ -153,8 +153,6 @@ export const dict = {
|
|
|
153
153
|
"ui.tool.websearch.provider": "{{provider}} 網頁搜尋",
|
|
154
154
|
"ui.tool.shell": "Shell",
|
|
155
155
|
"ui.tool.patch": "修補",
|
|
156
|
-
"ui.tool.todos": "待辦",
|
|
157
|
-
"ui.tool.todos.read": "讀取待辦",
|
|
158
156
|
"ui.tool.questions": "問題",
|
|
159
157
|
"ui.tool.questions.numbered": "問題 {{number}}",
|
|
160
158
|
"ui.tool.agent": "{{type}} 代理程式",
|
package/src/theme/context.tsx
CHANGED
|
@@ -84,8 +84,9 @@ const names: Record<string, string> = {
|
|
|
84
84
|
}
|
|
85
85
|
const oc2Theme = oc2ThemeJson as DesktopTheme
|
|
86
86
|
|
|
87
|
-
function
|
|
88
|
-
|
|
87
|
+
function resolveStoredTheme(id: string | null | undefined, registered?: Record<string, DesktopTheme>) {
|
|
88
|
+
if (id === "oc-2" || (id && (knownThemes().has(id) || registered?.[id]))) return id
|
|
89
|
+
return "oc-2"
|
|
89
90
|
}
|
|
90
91
|
|
|
91
92
|
function read(key: string) {
|
|
@@ -177,7 +178,12 @@ export const { use: useTheme, provider: ThemeProvider } = createSimpleContext({
|
|
|
177
178
|
defaultTheme?: string
|
|
178
179
|
onThemeApplied?: (theme: DesktopTheme, mode: "light" | "dark", scheme: ColorScheme) => void
|
|
179
180
|
}) => {
|
|
180
|
-
const
|
|
181
|
+
const rawTheme = read(STORAGE_KEYS.THEME_ID) ?? props.defaultTheme
|
|
182
|
+
const themeId = resolveStoredTheme(rawTheme)
|
|
183
|
+
if (rawTheme && rawTheme !== themeId) {
|
|
184
|
+
write(STORAGE_KEYS.THEME_ID, themeId)
|
|
185
|
+
clear()
|
|
186
|
+
}
|
|
181
187
|
const colorScheme = (read(STORAGE_KEYS.COLOR_SCHEME) as ColorScheme | null) ?? "system"
|
|
182
188
|
const mode = colorScheme === "system" ? getSystemMode() : colorScheme
|
|
183
189
|
const [store, setStore] = createStore({
|
|
@@ -194,7 +200,7 @@ export const { use: useTheme, provider: ThemeProvider } = createSimpleContext({
|
|
|
194
200
|
const loads = new Map<string, Promise<DesktopTheme | undefined>>()
|
|
195
201
|
|
|
196
202
|
const load = (id: string) => {
|
|
197
|
-
const next =
|
|
203
|
+
const next = id
|
|
198
204
|
if (!next) return Promise.resolve(undefined)
|
|
199
205
|
const hit = store.themes[next]
|
|
200
206
|
if (hit) return Promise.resolve(hit)
|
|
@@ -233,9 +239,11 @@ export const { use: useTheme, provider: ThemeProvider } = createSimpleContext({
|
|
|
233
239
|
|
|
234
240
|
const onStorage = (e: StorageEvent) => {
|
|
235
241
|
if (e.key === STORAGE_KEYS.THEME_ID && e.newValue) {
|
|
236
|
-
const next =
|
|
237
|
-
if (
|
|
238
|
-
|
|
242
|
+
const next = resolveStoredTheme(e.newValue, store.themes)
|
|
243
|
+
if (next !== e.newValue) {
|
|
244
|
+
write(STORAGE_KEYS.THEME_ID, next)
|
|
245
|
+
clear()
|
|
246
|
+
}
|
|
239
247
|
setStore("themeId", next)
|
|
240
248
|
if (next === "oc-2") {
|
|
241
249
|
clear()
|
|
@@ -262,8 +270,8 @@ export const { use: useTheme, provider: ThemeProvider } = createSimpleContext({
|
|
|
262
270
|
}
|
|
263
271
|
makeEventListener(mediaQuery, "change", onMedia)
|
|
264
272
|
|
|
265
|
-
const rawTheme = read(STORAGE_KEYS.THEME_ID)
|
|
266
|
-
const savedTheme =
|
|
273
|
+
const rawTheme = read(STORAGE_KEYS.THEME_ID) ?? props.defaultTheme
|
|
274
|
+
const savedTheme = resolveStoredTheme(rawTheme, store.themes)
|
|
267
275
|
const savedScheme = (read(STORAGE_KEYS.COLOR_SCHEME) as ColorScheme | null) ?? "system"
|
|
268
276
|
if (rawTheme && rawTheme !== savedTheme) {
|
|
269
277
|
write(STORAGE_KEYS.THEME_ID, savedTheme)
|
|
@@ -285,7 +293,7 @@ export const { use: useTheme, provider: ThemeProvider } = createSimpleContext({
|
|
|
285
293
|
})
|
|
286
294
|
|
|
287
295
|
const setTheme = (id: string) => {
|
|
288
|
-
const next =
|
|
296
|
+
const next = id
|
|
289
297
|
if (!next) {
|
|
290
298
|
console.warn(`Theme "${id}" not found`)
|
|
291
299
|
return
|
|
@@ -325,7 +333,7 @@ export const { use: useTheme, provider: ThemeProvider } = createSimpleContext({
|
|
|
325
333
|
setColorScheme,
|
|
326
334
|
registerTheme: (theme: DesktopTheme) => setStore("themes", theme.id, theme),
|
|
327
335
|
previewTheme: (id: string) => {
|
|
328
|
-
const next =
|
|
336
|
+
const next = id
|
|
329
337
|
if (!next) return
|
|
330
338
|
if (next !== "oc-2" && !knownThemes().has(next) && !store.themes[next]) return
|
|
331
339
|
setStore("previewThemeId", next)
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"border-weak-base": "#DBDBDB",
|
|
26
26
|
"border-weaker-base": "#E8E8E8",
|
|
27
27
|
"icon-base": "#8F8F8F",
|
|
28
|
-
"icon-weak-base": "
|
|
28
|
+
"icon-weak-base": "C7C7C7",
|
|
29
29
|
"surface-raised-base": "#F3F3F3",
|
|
30
30
|
"surface-raised-base-hover": "#EDEDED",
|
|
31
31
|
"surface-base": "#F8F8F8",
|
|
@@ -59,7 +59,7 @@ export function DialogHeader(props: DialogHeaderProps) {
|
|
|
59
59
|
return (
|
|
60
60
|
<div data-slot="dialog-header" data-hide-close={hideClose() ? "" : undefined}>
|
|
61
61
|
{local.children}
|
|
62
|
-
{!hideClose()
|
|
62
|
+
<Show when={!hideClose()}>
|
|
63
63
|
<Kobalte.CloseButton data-slot="dialog-close-button" aria-label={local.closeLabel ?? i18n.t("ui.common.close")}>
|
|
64
64
|
<svg
|
|
65
65
|
width="16"
|
|
@@ -76,7 +76,7 @@ export function DialogHeader(props: DialogHeaderProps) {
|
|
|
76
76
|
/>
|
|
77
77
|
</svg>
|
|
78
78
|
</Kobalte.CloseButton>
|
|
79
|
-
|
|
79
|
+
</Show>
|
|
80
80
|
</div>
|
|
81
81
|
)
|
|
82
82
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { onMount, type ComponentProps, splitProps } from "solid-js"
|
|
2
2
|
|
|
3
|
+
// Consumers center the SVG viewport, so each icon must center its artwork within its viewBox.
|
|
3
4
|
const icons = {
|
|
4
5
|
edit: {
|
|
5
6
|
viewBox: "0 0 16 16",
|
|
@@ -17,6 +18,10 @@ const icons = {
|
|
|
17
18
|
viewBox: "0 0 16 16",
|
|
18
19
|
body: `<path d="M5.118 5.686V10.314M5.118 5.686C5.97 5.686 6.661 4.995 6.661 4.143C6.661 3.291 5.97 2.6 5.118 2.6C4.266 2.6 3.575 3.291 3.575 4.143C3.575 4.995 4.266 5.686 5.118 5.686ZM5.118 10.314C4.266 10.314 3.575 11.005 3.575 11.857C3.575 12.709 4.266 13.4 5.118 13.4C5.97 13.4 6.661 12.709 6.661 11.857M5.118 10.314C5.97 10.314 6.661 11.005 6.661 11.857M10.882 5.686C11.734 5.686 12.425 4.995 12.425 4.143C12.425 3.291 11.734 2.6 10.882 2.6C10.03 2.6 9.339 3.291 9.339 4.143C9.339 4.995 10.03 5.686 10.882 5.686ZM10.882 5.686V9.457C10.882 10.783 9.807 11.857 8.482 11.857H6.661" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>`,
|
|
19
20
|
},
|
|
21
|
+
"branch-out": {
|
|
22
|
+
viewBox: "0 0 16 16",
|
|
23
|
+
body: `<path d="M10.4225 3.35355L12.9024 5.83344L10.4225 8.31333" stroke="currentColor"/><path d="M1 12.2852H4.23042C4.89912 12.2852 5.52359 11.951 5.89452 11.3946L9.00783 6.72462C8.37877 6.16823 10.0032 5.83402 10.6719 5.83402H12.9024" stroke="currentColor"/><path d="M8.5 12.2852H14" stroke="currentColor" stroke-linejoin="round"/>`,
|
|
24
|
+
},
|
|
20
25
|
"grid-plus": {
|
|
21
26
|
viewBox: "0 0 16 16",
|
|
22
27
|
body: `<path d="M13.9948 11.668H9.32812M11.6641 9.33203V13.9987M6.66667 9.33203V13.9987H2V9.33203H6.66667ZM6.66667 2V6.66667H2V2H6.66667ZM13.9948 2V6.66667H9.32812V2H13.9948Z" stroke="currentColor" stroke-miterlimit="10" stroke-linecap="square"/>`,
|
|
@@ -121,6 +126,14 @@ const icons = {
|
|
|
121
126
|
viewBox: "0 0 20 20",
|
|
122
127
|
body: `<path d="M7 14.5H13M7 7.99512H10.0049M10.0049 7.99512H13M10.0049 7.99512V5M10.0049 7.99512V11M18 18V2L2 2L2 18H18Z" stroke="currentColor"/>`,
|
|
123
128
|
},
|
|
129
|
+
"window-analytics": {
|
|
130
|
+
viewBox: "0 0 16 16",
|
|
131
|
+
body: `<g transform="translate(1 2)"><path d="M7 4H11M7 8H11M0.5 0.5V11.5H13.5V0.5H0.5ZM3.5 3.5H4.5V4.5H3.5V3.5ZM3.5 7.5H4.5V8.5H3.5V7.5Z" stroke="currentColor" stroke-miterlimit="10" stroke-linecap="square"/></g>`,
|
|
132
|
+
},
|
|
133
|
+
trash: {
|
|
134
|
+
viewBox: "0 0 20 20",
|
|
135
|
+
body: `<path d="M4.58342 17.9134L4.58369 17.4134L4.22787 17.5384L4.22766 18.0384H4.58342V17.9134ZM15.4167 17.9134V18.0384H15.7725L15.7723 17.5384L15.4167 17.9134ZM2.08342 3.95508V3.45508H1.58342V3.95508H2.08342V4.45508V3.95508ZM17.9167 4.45508V4.95508H18.4167V4.45508H17.9167V3.95508V4.45508ZM4.16677 4.58008L3.66701 4.5996L4.22816 17.5379L4.72792 17.4934L5.22767 17.4489L4.66652 4.54055L4.16677 4.58008ZM4.58342 18.0384V17.9134H15.4167V18.0384V18.5384H4.58342V18.0384ZM15.4167 17.9134L15.8332 17.5379L16.2498 4.5996L15.7501 4.58008L15.2503 4.56055L14.8337 17.4989L15.4167 17.9134ZM15.8334 4.58008V4.08008H4.16677V4.58008V5.08008H15.8334V4.58008ZM2.08342 4.45508V4.95508H4.16677V4.58008V4.08008H2.08342V4.45508ZM15.8334 4.58008V5.08008H17.9167V4.45508V3.95508H15.8334V4.58008ZM6.83951 4.35149L7.432 4.55047C7.79251 3.47701 8.80699 2.70508 10.0001 2.70508V2.20508V1.70508C8.25392 1.70508 6.77335 2.83539 6.24702 4.15251L6.83951 4.35149ZM10.0001 2.20508V2.70508C11.1932 2.70508 12.2077 3.47701 12.5682 4.55047L13.1607 4.35149L13.7532 4.15251C13.2269 2.83539 11.7463 1.70508 10.0001 1.70508V2.20508Z" fill="currentColor"/>`,
|
|
136
|
+
},
|
|
124
137
|
"outline-sliders": {
|
|
125
138
|
viewBox: "0 0 16 16",
|
|
126
139
|
body: `<path d="M11.7779 4.66675H14.4446M11.7779 4.66675C11.7779 5.77132 10.8825 6.66675 9.77789 6.66675C8.67332 6.66675 7.77789 5.77132 7.77789 4.66675M11.7779 4.66675C11.7779 3.56218 10.8825 2.66675 9.77789 2.66675C8.67332 2.66675 7.77789 3.56218 7.77789 4.66675M1.55566 4.66675H7.77789M4.22233 11.3334H1.55566M4.22233 11.3334C4.22233 12.438 5.11776 13.3334 6.22233 13.3334C7.3269 13.3334 8.22233 12.438 8.22233 11.3334M4.22233 11.3334C4.22233 10.2288 5.11776 9.33341 6.22233 9.33341C7.3269 9.33341 8.22233 10.2288 8.22233 11.3334M14.4446 11.3334H8.22233" stroke="currentColor"/>`,
|
|
@@ -27,6 +27,7 @@
|
|
|
27
27
|
justify-content: center;
|
|
28
28
|
align-items: center;
|
|
29
29
|
padding: 0;
|
|
30
|
+
padding-inline: 4px;
|
|
30
31
|
gap: 4px;
|
|
31
32
|
min-width: 14px;
|
|
32
33
|
height: 14px;
|
|
@@ -48,7 +49,6 @@
|
|
|
48
49
|
flex-direction: row;
|
|
49
50
|
justify-content: center;
|
|
50
51
|
align-items: center;
|
|
51
|
-
min-width: 14px;
|
|
52
52
|
height: 11px;
|
|
53
53
|
padding: 0;
|
|
54
54
|
flex: none;
|
|
@@ -212,9 +212,11 @@ export function LineCommentEditorV2(props: LineCommentEditorV2Props) {
|
|
|
212
212
|
textareaRef = el
|
|
213
213
|
}}
|
|
214
214
|
data-slot="line-comment-v2-textarea"
|
|
215
|
+
dir="auto"
|
|
215
216
|
rows={local.rows ?? 3}
|
|
216
217
|
placeholder={local.placeholder ?? i18n.t("ui.lineComment.contextPlaceholder")}
|
|
217
218
|
value={local.value}
|
|
219
|
+
style={{ "unicode-bidi": "plaintext", "text-align": "start" }}
|
|
218
220
|
onInput={(e) => {
|
|
219
221
|
local.onInput(e.currentTarget.value)
|
|
220
222
|
syncMention()
|
|
@@ -175,7 +175,7 @@
|
|
|
175
175
|
border: 0.5px solid var(--v2-border-border-muted);
|
|
176
176
|
}
|
|
177
177
|
|
|
178
|
-
[data-component="tabs-v2"][data-variant="settings"][data-orientation="vertical"] [data-slot="tabs-v2-list"] {
|
|
178
|
+
[data-component="tabs-v2"][data-variant="settings"][data-orientation="vertical"] > [data-slot="tabs-v2-list"] {
|
|
179
179
|
flex-direction: column;
|
|
180
180
|
width: 240px;
|
|
181
181
|
min-width: 200px;
|
|
@@ -186,7 +186,9 @@
|
|
|
186
186
|
border-inline-end: 1px solid var(--v2-border-border-base);
|
|
187
187
|
}
|
|
188
188
|
|
|
189
|
-
[data-component="tabs-v2"][data-variant="settings"][data-orientation="vertical"]
|
|
189
|
+
[data-component="tabs-v2"][data-variant="settings"][data-orientation="vertical"]
|
|
190
|
+
> [data-slot="tabs-v2-list"]
|
|
191
|
+
[data-slot="tabs-v2-section-title"] {
|
|
190
192
|
width: 100%;
|
|
191
193
|
padding-inline-start: 4px;
|
|
192
194
|
color: var(--v2-text-text-muted);
|
|
@@ -195,7 +197,9 @@
|
|
|
195
197
|
user-select: none;
|
|
196
198
|
}
|
|
197
199
|
|
|
198
|
-
[data-component="tabs-v2"][data-variant="settings"][data-orientation="vertical"]
|
|
200
|
+
[data-component="tabs-v2"][data-variant="settings"][data-orientation="vertical"]
|
|
201
|
+
> [data-slot="tabs-v2-list"]
|
|
202
|
+
[data-slot="tabs-v2-trigger-wrapper"] {
|
|
199
203
|
width: 100%;
|
|
200
204
|
height: 28px;
|
|
201
205
|
border-radius: 4px;
|
|
@@ -203,7 +207,9 @@
|
|
|
203
207
|
color: var(--v2-text-text-muted);
|
|
204
208
|
}
|
|
205
209
|
|
|
206
|
-
[data-component="tabs-v2"][data-variant="settings"][data-orientation="vertical"]
|
|
210
|
+
[data-component="tabs-v2"][data-variant="settings"][data-orientation="vertical"]
|
|
211
|
+
> [data-slot="tabs-v2-list"]
|
|
212
|
+
[data-slot="tabs-v2-trigger"] {
|
|
207
213
|
width: 100%;
|
|
208
214
|
height: 100%;
|
|
209
215
|
justify-content: flex-start;
|
|
@@ -212,12 +218,14 @@
|
|
|
212
218
|
}
|
|
213
219
|
|
|
214
220
|
[data-component="tabs-v2"][data-variant="settings"][data-orientation="vertical"]
|
|
221
|
+
> [data-slot="tabs-v2-list"]
|
|
215
222
|
[data-slot="tabs-v2-trigger-wrapper"]:hover:not(:disabled):not(:has([data-selected])) {
|
|
216
223
|
background-color: var(--v2-background-bg-layer-03);
|
|
217
224
|
color: var(--v2-text-text-base);
|
|
218
225
|
}
|
|
219
226
|
|
|
220
227
|
[data-component="tabs-v2"][data-variant="settings"][data-orientation="vertical"]
|
|
228
|
+
> [data-slot="tabs-v2-list"]
|
|
221
229
|
[data-slot="tabs-v2-trigger-wrapper"]:has([data-selected]) {
|
|
222
230
|
background-color: var(--v2-background-bg-layer-03);
|
|
223
231
|
color: var(--v2-text-text-base);
|
|
@@ -11,7 +11,8 @@
|
|
|
11
11
|
--_index: 0;
|
|
12
12
|
--_angle: 90deg;
|
|
13
13
|
--_spread: 5.2ch;
|
|
14
|
-
--
|
|
14
|
+
--_gutter: calc(var(--_spread) + 1ch);
|
|
15
|
+
--_size: calc(200% + var(--_gutter) + var(--_gutter));
|
|
15
16
|
--_base-color: var(--v2-text-text-muted);
|
|
16
17
|
--_peak-color: var(--v2-text-text-base);
|
|
17
18
|
--_sweep: linear-gradient(
|
|
@@ -239,6 +239,8 @@ function createToastV2Actions(entry: ActiveToastV2) {
|
|
|
239
239
|
if (!entry.options.actions?.length) return undefined
|
|
240
240
|
return (
|
|
241
241
|
<ToastV2.Actions>
|
|
242
|
+
{/* Static map, not <For>: this JSX is created imperatively outside any Solid
|
|
243
|
+
root, where a <For> computation would never be disposed. */}
|
|
242
244
|
{entry.options.actions.map((action, index) => (
|
|
243
245
|
<button
|
|
244
246
|
type="button"
|
|
@@ -32,6 +32,7 @@ export function TooltipV2(props: TooltipV2Props) {
|
|
|
32
32
|
])
|
|
33
33
|
|
|
34
34
|
const close = () => setState("open", false)
|
|
35
|
+
const controlled = () => local.forceOpen !== undefined
|
|
35
36
|
|
|
36
37
|
const inside = () => {
|
|
37
38
|
const active = document.activeElement
|
|
@@ -93,9 +94,9 @@ export function TooltipV2(props: TooltipV2Props) {
|
|
|
93
94
|
{...others}
|
|
94
95
|
closeDelay={0}
|
|
95
96
|
ignoreSafeArea={local.ignoreSafeArea ?? true}
|
|
96
|
-
open={local.forceOpen
|
|
97
|
+
open={controlled() ? local.forceOpen : state.open}
|
|
97
98
|
onOpenChange={(open) => {
|
|
98
|
-
if (
|
|
99
|
+
if (controlled()) return
|
|
99
100
|
if (state.block && open) return
|
|
100
101
|
if (justClickedTrigger) {
|
|
101
102
|
justClickedTrigger = false
|
package/src/v2/styles/theme.css
CHANGED
|
@@ -1,16 +1,4 @@
|
|
|
1
1
|
@layer theme {
|
|
2
|
-
html[data-theme="oc-2"] body:not([data-new-layout]) {
|
|
3
|
-
--text-diff-add-base: light-dark(#167517, #c4ffc0);
|
|
4
|
-
--text-diff-delete-base: light-dark(#fa3012, #ec2f14);
|
|
5
|
-
--syntax-comment: light-dark(#7a7a7a, #8f8f8f);
|
|
6
|
-
--syntax-keyword: light-dark(#a753ae, #edb2f1);
|
|
7
|
-
--syntax-string: #00ceb9;
|
|
8
|
-
--syntax-primitive: light-dark(#034cff, #8cb0ff);
|
|
9
|
-
--syntax-property: light-dark(#a753ae, #fab283);
|
|
10
|
-
--syntax-type: light-dark(#8a6f00, #fcd53a);
|
|
11
|
-
--syntax-critical: light-dark(#ff8c00, #fab283);
|
|
12
|
-
}
|
|
13
|
-
|
|
14
2
|
:root {
|
|
15
3
|
color-scheme: light;
|
|
16
4
|
|