@opencode-ai/ui 0.0.0-dev-202608040656 → 0.0.0-dev-202608040739

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.
@@ -13,7 +13,8 @@ export type UiI18n = {
13
13
  };
14
14
  export declare function pluralCategory(locale: string, count: number): UiPluralCategory;
15
15
  export declare function pluralKey(key: UiI18nPluralKey, category: UiPluralCategory): UiI18nPluralLookupKey;
16
- export declare function I18nProvider(props: ParentProps<{
16
+ declare function UiI18nProvider(props: ParentProps<{
17
17
  value: UiI18n;
18
18
  }>): import("solid-js").JSX.Element;
19
+ export { UiI18nProvider as I18nProvider };
19
20
  export declare function useI18n(): UiI18n;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opencode-ai/ui",
3
- "version": "0.0.0-dev-202608040656",
3
+ "version": "0.0.0-dev-202608040739",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -32,3 +32,8 @@
32
32
  height: auto;
33
33
  }
34
34
  }
35
+
36
+ :dir(rtl) [data-component="icon"][data-directional] [data-slot="icon-svg"],
37
+ :dir(rtl) [data-slot="menu-v2-item-chevron"] {
38
+ transform: scaleX(-1);
39
+ }
@@ -151,7 +151,11 @@ export function Icon(props: IconProps) {
151
151
  onMount(ensureSprite)
152
152
 
153
153
  return (
154
- <div data-component="icon" data-size={local.size || "normal"}>
154
+ <div
155
+ data-component="icon"
156
+ data-size={local.size || "normal"}
157
+ data-directional={local.name === "chevron-left" || local.name === "chevron-right" ? true : undefined}
158
+ >
155
159
  <svg
156
160
  data-slot="icon-svg"
157
161
  classList={{
@@ -1,7 +1,7 @@
1
1
  [data-component="toast-region"] {
2
2
  position: fixed;
3
3
  bottom: 48px;
4
- right: 32px;
4
+ inset-inline-end: 32px;
5
5
  z-index: 1000;
6
6
  display: flex;
7
7
  flex-direction: column;
@@ -1,4 +1,5 @@
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
@@ -57,10 +58,16 @@ const fallback: UiI18n = {
57
58
 
58
59
  const Context = createContext<UiI18n>(fallback)
59
60
 
60
- export function I18nProvider(props: ParentProps<{ value: UiI18n }>) {
61
- return <Context.Provider value={props.value}>{props.children}</Context.Provider>
61
+ function UiI18nProvider(props: ParentProps<{ value: UiI18n }>) {
62
+ return (
63
+ <I18nProvider locale={props.value.locale()}>
64
+ <Context.Provider value={props.value}>{props.children}</Context.Provider>
65
+ </I18nProvider>
66
+ )
62
67
  }
63
68
 
69
+ export { UiI18nProvider as I18nProvider }
70
+
64
71
  export function useI18n() {
65
72
  return useContext(Context)
66
73
  }
package/src/i18n/fr.ts CHANGED
@@ -126,7 +126,8 @@ export const dict = {
126
126
  "ui.promptInput.removeAttachment": "Supprimer la pièce jointe",
127
127
  "ui.promptInput.label": "Invite",
128
128
  "ui.promptInput.placeholder.shell": "Entrez une commande shell...",
129
- "ui.promptInput.placeholder.normal": "Demandez n'importe quoi, {{slash}} pour les commandes, {{at}} pour le contexte...",
129
+ "ui.promptInput.placeholder.normal":
130
+ "Demandez n'importe quoi, {{slash}} pour les commandes, {{at}} pour le contexte...",
130
131
  "ui.promptInput.add": "Ajouter des images et des fichiers",
131
132
  "ui.promptInput.attachments": "Images et fichiers",
132
133
  "ui.promptInput.context": "Contexte",
package/src/i18n/pl.ts CHANGED
@@ -128,7 +128,8 @@ export const dict = {
128
128
  "ui.promptInput.removeAttachment": "Usuń załącznik",
129
129
  "ui.promptInput.label": "Prompt",
130
130
  "ui.promptInput.placeholder.shell": "Wpisz polecenie powłoki...",
131
- "ui.promptInput.placeholder.normal": "Zapytaj o cokolwiek, {{slash}} aby wyświetlić polecenia, {{at}} aby wyświetlić kontekst...",
131
+ "ui.promptInput.placeholder.normal":
132
+ "Zapytaj o cokolwiek, {{slash}} aby wyświetlić polecenia, {{at}} aby wyświetlić kontekst...",
132
133
  "ui.promptInput.add": "Dodaj obrazy i pliki",
133
134
  "ui.promptInput.attachments": "Obrazy i pliki",
134
135
  "ui.promptInput.context": "Kontekst",
@@ -1,4 +1,5 @@
1
1
  import { Toaster, toast, type ToasterProps } from "solid-sonner"
2
+ import { isRTL } from "@kobalte/core/i18n"
2
3
  import type { ComponentProps, JSX } from "solid-js"
3
4
  import { createContext, onCleanup, onMount, splitProps, useContext } from "solid-js"
4
5
  import { Portal } from "solid-js/web"
@@ -46,8 +47,8 @@ function ToastV2Region(props: ToastV2RegionProps) {
46
47
  return (
47
48
  <Portal>
48
49
  <Toaster
49
- position="bottom-right"
50
- offset={{ right: 32, bottom: 48 }}
50
+ position={isRTL(i18n.locale()) ? "bottom-left" : "bottom-right"}
51
+ offset={isRTL(i18n.locale()) ? { left: 32, bottom: 48 } : { right: 32, bottom: 48 }}
51
52
  mobileOffset={16}
52
53
  gap={12}
53
54
  duration={5000}