@opencode-ai/ui 0.0.0-dev-202608170540 → 0.0.0-dev-17518

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 (110) hide show
  1. package/dist/components/icon.d.ts +6 -0
  2. package/dist/components/scroll-view.d.ts +3 -3
  3. package/dist/context/i18n.d.ts +10 -7
  4. package/dist/i18n/ar.d.ts +0 -2
  5. package/dist/i18n/bg.d.ts +0 -2
  6. package/dist/i18n/br.d.ts +0 -2
  7. package/dist/i18n/bs.d.ts +0 -2
  8. package/dist/i18n/da.d.ts +0 -2
  9. package/dist/i18n/de.d.ts +0 -2
  10. package/dist/i18n/en.d.ts +203 -1
  11. package/dist/i18n/es.d.ts +0 -2
  12. package/dist/i18n/fr.d.ts +0 -2
  13. package/dist/i18n/he.d.ts +197 -0
  14. package/dist/i18n/ja.d.ts +0 -2
  15. package/dist/i18n/km.d.ts +0 -2
  16. package/dist/i18n/ko.d.ts +0 -2
  17. package/dist/i18n/lo.d.ts +0 -2
  18. package/dist/i18n/mk.d.ts +0 -2
  19. package/dist/i18n/mn.d.ts +0 -2
  20. package/dist/i18n/my.d.ts +0 -2
  21. package/dist/i18n/pl.d.ts +0 -2
  22. package/dist/i18n/ru.d.ts +0 -2
  23. package/dist/i18n/sr.d.ts +0 -2
  24. package/dist/i18n/tg.d.ts +0 -2
  25. package/dist/i18n/th.d.ts +0 -2
  26. package/dist/i18n/tr.d.ts +0 -2
  27. package/dist/i18n/zh.d.ts +0 -2
  28. package/dist/i18n/zht.d.ts +0 -2
  29. package/dist/v2/components/icon.d.ts +12 -0
  30. package/package.json +1 -5
  31. package/src/components/card.tsx +3 -3
  32. package/src/components/icon.tsx +6 -0
  33. package/src/components/list.tsx +4 -2
  34. package/src/components/provider-icon.tsx +1 -1
  35. package/src/components/scroll-view.tsx +5 -20
  36. package/src/components/toast.tsx +16 -14
  37. package/src/context/i18n.tsx +17 -14
  38. package/src/hooks/create-auto-scroll.tsx +20 -0
  39. package/src/i18n/am.ts +0 -2
  40. package/src/i18n/ar.ts +0 -2
  41. package/src/i18n/az.ts +0 -2
  42. package/src/i18n/bg.ts +0 -2
  43. package/src/i18n/bn.ts +0 -2
  44. package/src/i18n/br.ts +0 -2
  45. package/src/i18n/bs.ts +0 -2
  46. package/src/i18n/ca.ts +0 -2
  47. package/src/i18n/cs.ts +0 -2
  48. package/src/i18n/da.ts +0 -2
  49. package/src/i18n/de.ts +0 -2
  50. package/src/i18n/dv.ts +0 -2
  51. package/src/i18n/dz.ts +0 -2
  52. package/src/i18n/el.ts +0 -2
  53. package/src/i18n/en.ts +12 -4
  54. package/src/i18n/es.ts +0 -2
  55. package/src/i18n/et.ts +0 -2
  56. package/src/i18n/fa.ts +0 -2
  57. package/src/i18n/fi.ts +0 -2
  58. package/src/i18n/fo.ts +0 -2
  59. package/src/i18n/fr.ts +0 -2
  60. package/src/i18n/he.ts +199 -0
  61. package/src/i18n/hi.ts +0 -2
  62. package/src/i18n/hr.ts +0 -2
  63. package/src/i18n/hu.ts +0 -2
  64. package/src/i18n/hy.ts +0 -2
  65. package/src/i18n/id.ts +0 -2
  66. package/src/i18n/is.ts +0 -2
  67. package/src/i18n/it.ts +0 -2
  68. package/src/i18n/ja.ts +0 -2
  69. package/src/i18n/ka.ts +0 -2
  70. package/src/i18n/km.ts +0 -2
  71. package/src/i18n/ko.ts +0 -2
  72. package/src/i18n/lo.ts +0 -2
  73. package/src/i18n/lt.ts +0 -2
  74. package/src/i18n/lv.ts +0 -2
  75. package/src/i18n/mk.ts +0 -2
  76. package/src/i18n/mn.ts +0 -2
  77. package/src/i18n/ms.ts +0 -2
  78. package/src/i18n/my.ts +0 -2
  79. package/src/i18n/ne.ts +0 -2
  80. package/src/i18n/nl.ts +0 -2
  81. package/src/i18n/no.ts +0 -2
  82. package/src/i18n/pa.ts +0 -2
  83. package/src/i18n/pl.ts +0 -2
  84. package/src/i18n/ro.ts +0 -2
  85. package/src/i18n/ru.ts +0 -2
  86. package/src/i18n/si.ts +0 -2
  87. package/src/i18n/sk.ts +0 -2
  88. package/src/i18n/sl.ts +0 -2
  89. package/src/i18n/sq.ts +0 -2
  90. package/src/i18n/sr.ts +0 -2
  91. package/src/i18n/sv.ts +0 -2
  92. package/src/i18n/tg.ts +0 -2
  93. package/src/i18n/th.ts +0 -2
  94. package/src/i18n/tk.ts +0 -2
  95. package/src/i18n/tr.ts +0 -2
  96. package/src/i18n/uk.ts +0 -2
  97. package/src/i18n/ur.ts +0 -2
  98. package/src/i18n/uz.ts +0 -2
  99. package/src/i18n/vi.ts +0 -2
  100. package/src/i18n/zh.ts +0 -2
  101. package/src/i18n/zht.ts +0 -2
  102. package/src/theme/themes/oc-2.json +1 -1
  103. package/src/v2/components/dialog-v2.css +3 -0
  104. package/src/v2/components/dialog-v2.tsx +2 -2
  105. package/src/v2/components/icon.tsx +13 -0
  106. package/src/v2/components/keybind-v2.css +1 -1
  107. package/src/v2/components/line-comment-v2.tsx +2 -0
  108. package/src/v2/components/tabs-v2.css +12 -4
  109. package/src/v2/components/toast-v2.tsx +2 -0
  110. package/src/v2/components/tooltip-v2.tsx +3 -2
@@ -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": "#C7C7C7",
28
+ "icon-weak-base": "C7C7C7",
29
29
  "surface-raised-base": "#F3F3F3",
30
30
  "surface-raised-base-hover": "#EDEDED",
31
31
  "surface-base": "#F8F8F8",
@@ -93,6 +93,9 @@
93
93
  [data-slot="dialog-description"] {
94
94
  flex: none;
95
95
  flex-grow: 0;
96
+ min-width: 0;
97
+ max-width: 100%;
98
+ overflow-wrap: anywhere;
96
99
  user-select: none;
97
100
  font-weight: 440;
98
101
  font-size: 13px;
@@ -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"] [data-slot="tabs-v2-section-title"] {
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"] [data-slot="tabs-v2-trigger-wrapper"] {
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"] [data-slot="tabs-v2-trigger"] {
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);
@@ -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 || state.open}
97
+ open={controlled() ? local.forceOpen : state.open}
97
98
  onOpenChange={(open) => {
98
- if (local.forceOpen) return
99
+ if (controlled()) return
99
100
  if (state.block && open) return
100
101
  if (justClickedTrigger) {
101
102
  justClickedTrigger = false