@openviking/react 0.1.3 → 0.1.4

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 (200) hide show
  1. package/LICENSE.arco-design +21 -0
  2. package/README.md +25 -15
  3. package/dist/0~0.js +19 -0
  4. package/dist/2~0.js +2267 -29
  5. package/dist/2~0.js.LICENSE.txt +23 -0
  6. package/dist/3c~0.js +2206 -0
  7. package/dist/3~0.js +1205 -1982
  8. package/dist/4~0.js +18 -0
  9. package/dist/9~0.js +43 -0
  10. package/dist/{1~0.js → ae~0.js} +5 -24
  11. package/dist/ark-message-list-view~0.js +530 -119
  12. package/dist/a~0.js +1289 -10
  13. package/dist/c7~0.js +38 -2
  14. package/dist/ck~0.js +23 -0
  15. package/dist/client/provider.d.ts +5 -3
  16. package/dist/client/types.d.ts +5 -5
  17. package/dist/client.js +2 -1
  18. package/dist/components/agent-connect/agent-connect-copy.d.ts +19 -33
  19. package/dist/components/agent-connect/agent-connect-design.d.ts +1935 -167
  20. package/dist/components/agent-connect/agent-connect-instructions.d.ts +135 -0
  21. package/dist/components/agent-connect/locales/en-US.d.ts +20 -0
  22. package/dist/components/agent-connect/locales/zh-CN.d.ts +3 -0
  23. package/dist/components/agent-connect/style.css +14 -2
  24. package/dist/components/agent-connect/types.d.ts +2 -1
  25. package/dist/components/directory-tour/directory-tour.d.ts +3 -0
  26. package/dist/components/directory-tour/index.d.ts +3 -0
  27. package/dist/components/directory-tour/locales/en-US.d.ts +3 -0
  28. package/dist/components/directory-tour/locales/zh-CN.d.ts +3 -0
  29. package/dist/components/directory-tour/steps.d.ts +5 -0
  30. package/dist/components/directory-tour/style.css +237 -0
  31. package/dist/components/directory-tour/style.js +0 -0
  32. package/dist/components/directory-tour/types.d.ts +42 -0
  33. package/dist/components/directory-tour/use-tour-anchor.d.ts +5 -0
  34. package/dist/components/directory-tour/use-tour-position.d.ts +12 -0
  35. package/dist/components/directory-tour.js +40 -0
  36. package/dist/components/file-browser-entries/file-browser-entries.d.ts +5 -5
  37. package/dist/components/file-browser-entries/labels.d.ts +3 -0
  38. package/dist/components/file-browser-entries/locales/en-US.d.ts +6 -0
  39. package/dist/components/file-browser-entries/locales/zh-CN.d.ts +6 -0
  40. package/dist/components/file-browser-entries/style.css +752 -2
  41. package/dist/components/file-browser-entries/types.d.ts +34 -16
  42. package/dist/components/file-preview/file-preview-adapters.d.ts +2 -1
  43. package/dist/components/file-preview/file-preview-body.d.ts +2 -1
  44. package/dist/components/file-preview/file-preview-breadcrumb-menu.d.ts +2 -1
  45. package/dist/components/file-preview/file-preview-breadcrumb.d.ts +2 -1
  46. package/dist/components/file-preview/file-preview-directory.d.ts +2 -1
  47. package/dist/components/file-preview/file-preview-handle-adapters.d.ts +2 -1
  48. package/dist/components/file-preview/file-preview-header.d.ts +6 -2
  49. package/dist/components/file-preview/file-preview-image-frame.d.ts +5 -0
  50. package/dist/components/file-preview/file-preview-labels.d.ts +2 -14
  51. package/dist/components/file-preview/file-preview-level-tabs.d.ts +7 -0
  52. package/dist/components/file-preview/file-preview-markdown-images.d.ts +13 -0
  53. package/dist/components/file-preview/file-preview-panels.d.ts +5 -2
  54. package/dist/components/file-preview/file-preview-viewer.d.ts +2 -1
  55. package/dist/components/file-preview/file-preview.d.ts +0 -1
  56. package/dist/components/file-preview/index.d.ts +2 -1
  57. package/dist/components/file-preview/locales/en-US.d.ts +16 -0
  58. package/dist/components/file-preview/locales/zh-CN.d.ts +16 -0
  59. package/dist/components/file-preview/style.css +160 -2
  60. package/dist/components/file-preview/types.d.ts +34 -10
  61. package/dist/components/file-preview/use-file-preview-levels.d.ts +7 -0
  62. package/dist/components/file-preview/use-file-preview-view-state.d.ts +15 -0
  63. package/dist/components/file-preview.js +1 -1
  64. package/dist/components/file-tree/file-tree-info-labels.d.ts +0 -15
  65. package/dist/components/file-tree/file-tree-labels.d.ts +4 -0
  66. package/dist/components/file-tree/file-tree-row-shared.d.ts +2 -12
  67. package/dist/components/file-tree/file-tree-toolbar.d.ts +11 -0
  68. package/dist/components/file-tree/locales/en-US.d.ts +69 -0
  69. package/dist/components/file-tree/locales/zh-CN.d.ts +69 -0
  70. package/dist/components/file-tree/style.css +143 -15
  71. package/dist/components/file-tree/types.d.ts +38 -10
  72. package/dist/components/file-tree/use-file-tree-actions.d.ts +4 -1
  73. package/dist/components/scope-switcher/labels.d.ts +3 -0
  74. package/dist/components/scope-switcher/locales/en-US.d.ts +8 -0
  75. package/dist/components/scope-switcher/locales/zh-CN.d.ts +8 -0
  76. package/dist/components/scope-switcher/scope-panel.d.ts +1 -1
  77. package/dist/components/scope-switcher/scope-switcher.d.ts +1 -1
  78. package/dist/components/scope-switcher/style.css +14 -2
  79. package/dist/components/scope-switcher/types.d.ts +11 -5
  80. package/dist/components/style.css +9851 -6812
  81. package/dist/components/tui/locales/en-US.d.ts +35 -0
  82. package/dist/components/tui/locales/zh-CN.d.ts +35 -0
  83. package/dist/components/tui/style.css +310 -18
  84. package/dist/components/tui/tui-copy-button.d.ts +1 -1
  85. package/dist/components/tui/tui-empty.d.ts +25 -0
  86. package/dist/components/tui/tui-labels.d.ts +2 -2
  87. package/dist/components/tui/tui.d.ts +1 -1
  88. package/dist/components/tui/types.d.ts +35 -12
  89. package/dist/components/tui.js +1 -1
  90. package/dist/components/viking-bot/ark-adapter.d.ts +2 -0
  91. package/dist/components/viking-bot/ark-message-body.d.ts +1 -7
  92. package/dist/components/viking-bot/ark-message-list-view.d.ts +1 -1
  93. package/dist/components/viking-bot/ark-message-row.d.ts +3 -1
  94. package/dist/components/viking-bot/bot-popover.d.ts +9 -0
  95. package/dist/components/viking-bot/capabilities.d.ts +49 -0
  96. package/dist/components/viking-bot/composer-attachments.d.ts +13 -0
  97. package/dist/components/viking-bot/composer-controls.d.ts +10 -0
  98. package/dist/components/viking-bot/composer-footer.d.ts +17 -0
  99. package/dist/components/viking-bot/composer-references.d.ts +20 -0
  100. package/dist/components/viking-bot/composer-text.d.ts +10 -0
  101. package/dist/components/viking-bot/index.d.ts +3 -1
  102. package/dist/components/viking-bot/interaction/ask-human-fields.d.ts +1 -1
  103. package/dist/components/viking-bot/interaction/labels.d.ts +2 -1
  104. package/dist/components/viking-bot/interaction/locales/en-US.d.ts +17 -0
  105. package/dist/components/viking-bot/interaction/locales/zh-CN.d.ts +17 -0
  106. package/dist/components/viking-bot/interaction/types.d.ts +8 -3
  107. package/dist/components/viking-bot/interaction/viking-bot-interaction.d.ts +1 -1
  108. package/dist/components/viking-bot/labels.d.ts +2 -0
  109. package/dist/components/viking-bot/locales/en-US.d.ts +40 -0
  110. package/dist/components/viking-bot/locales/zh-CN.d.ts +40 -0
  111. package/dist/components/viking-bot/markdown-links.d.ts +27 -0
  112. package/dist/components/viking-bot/message-activity.d.ts +7 -0
  113. package/dist/components/viking-bot/message-code-block.d.ts +8 -0
  114. package/dist/components/viking-bot/message-footer.d.ts +8 -0
  115. package/dist/components/viking-bot/message-markdown.d.ts +9 -0
  116. package/dist/components/viking-bot/model.d.ts +37 -3
  117. package/dist/components/viking-bot/quick-input-tracker.d.ts +16 -0
  118. package/dist/components/viking-bot/quick-inputs.d.ts +6 -0
  119. package/dist/components/viking-bot/reference-picker.d.ts +16 -0
  120. package/dist/components/viking-bot/session-actions.d.ts +11 -0
  121. package/dist/components/viking-bot/style.css +1486 -48
  122. package/dist/components/viking-bot/tool-activity.d.ts +9 -0
  123. package/dist/components/viking-bot/tool-result-links.d.ts +6 -0
  124. package/dist/components/viking-bot/types.d.ts +21 -9
  125. package/dist/components/viking-bot/use-quick-input.d.ts +17 -0
  126. package/dist/components/viking-bot/viking-bot.d.ts +1 -6
  127. package/dist/components/viking-bot/welcome.d.ts +8 -0
  128. package/dist/components/viking-bot.js +1 -1
  129. package/dist/c~0.js +533 -66
  130. package/dist/e~0.js +333 -0
  131. package/dist/file-preview-viewer~0.js +90 -8
  132. package/dist/f~0.js +39 -47
  133. package/dist/h~0.js +5 -1
  134. package/dist/icons/console-icons.d.ts +12 -0
  135. package/dist/icons/index.d.ts +2 -0
  136. package/dist/icons/viking-bot-icons.d.ts +6 -0
  137. package/dist/icons.js +1 -0
  138. package/dist/index.d.ts +2 -0
  139. package/dist/index.js +2 -1
  140. package/dist/k~0.js +1 -0
  141. package/dist/lg~0.js +155 -0
  142. package/dist/lk~0.js +37 -8
  143. package/dist/l~0.js +102 -119
  144. package/dist/modules/console/command-messages.d.ts +19 -0
  145. package/dist/modules/console/command-parser.d.ts +15 -0
  146. package/dist/modules/console/command-specs.d.ts +15 -0
  147. package/dist/modules/console/commands.d.ts +6 -0
  148. package/dist/modules/console/console-history.d.ts +10 -0
  149. package/dist/modules/console/console-toolbar.d.ts +18 -0
  150. package/dist/modules/console/console.d.ts +1 -3
  151. package/dist/modules/console/controller.d.ts +17 -0
  152. package/dist/modules/console/index.d.ts +2 -0
  153. package/dist/modules/console/labels.d.ts +61 -0
  154. package/dist/modules/console/locales/en-US.d.ts +49 -0
  155. package/dist/modules/console/locales/zh-CN.d.ts +3 -0
  156. package/dist/modules/console/localize-records.d.ts +11 -0
  157. package/dist/modules/console/results.d.ts +2 -0
  158. package/dist/modules/console/style.css +10905 -15
  159. package/dist/modules/console/types.d.ts +59 -80
  160. package/dist/modules/console/use-console.d.ts +3 -0
  161. package/dist/modules/console.js +1 -1
  162. package/dist/modules/file-browser/file-browser-detail.d.ts +2 -1
  163. package/dist/modules/file-browser/file-browser-labels.d.ts +11 -12
  164. package/dist/modules/file-browser/file-browser-toolbar.d.ts +3 -4
  165. package/dist/modules/file-browser/file-browser-tree-pane.d.ts +7 -5
  166. package/dist/modules/file-browser/file-browser.d.ts +1 -1
  167. package/dist/modules/file-browser/fs-read-directory.d.ts +2 -6
  168. package/dist/modules/file-browser/locales/en-US.d.ts +25 -0
  169. package/dist/modules/file-browser/locales/zh-CN.d.ts +25 -0
  170. package/dist/modules/file-browser/style.css +1581 -126
  171. package/dist/modules/file-browser/types.d.ts +38 -29
  172. package/dist/modules/file-browser/use-file-browser.d.ts +6 -1
  173. package/dist/modules/file-browser/use-fs-preview.d.ts +15 -1
  174. package/dist/modules/scope-cascade/labels.d.ts +6 -0
  175. package/dist/modules/scope-cascade/locales/en-US.d.ts +6 -0
  176. package/dist/modules/scope-cascade/locales/zh-CN.d.ts +3 -0
  177. package/dist/modules/scope-cascade/scope-cascade.d.ts +1 -1
  178. package/dist/modules/scope-cascade/style.css +14 -2
  179. package/dist/modules/scope-cascade/types.d.ts +3 -0
  180. package/dist/modules/style.css +15853 -3484
  181. package/dist/nx~0.js +15 -0
  182. package/dist/n~0.js +238 -83
  183. package/dist/o~0.js +10 -7
  184. package/dist/p~0.js +27 -0
  185. package/dist/rslib-runtime~0.js +42 -0
  186. package/dist/r~0.js +152 -0
  187. package/dist/shared/components/drawer/drawer.d.ts +13 -0
  188. package/dist/shared/components/drawer/index.d.ts +1 -0
  189. package/dist/shared/components/overlay/use-overlay-position.d.ts +2 -2
  190. package/dist/shared/components/tooltip/use-portal-theme.d.ts +3 -0
  191. package/dist/shared/locale.d.ts +6 -0
  192. package/dist/style.css +26056 -10636
  193. package/dist/u~0.js +75 -58
  194. package/dist/viking-bot-composer~0.js +434 -77
  195. package/dist/viking-bot-interaction~0.js +11 -11
  196. package/package.json +13 -4
  197. package/dist/30~0.js +0 -1332
  198. package/dist/components/tui/tui-labels-zh.d.ts +0 -2
  199. package/dist/modules/file-browser/tree-info-copy.d.ts +0 -15
  200. package/dist/modules/file-browser/tree-info-copy.zh-CN.d.ts +0 -15
@@ -1,16 +1,21 @@
1
+ import type { Locale } from '../../shared/locale.js';
2
+ import type { AgentConnectProps } from '../../components/agent-connect/index.js';
3
+ import type { FileBrowserEntriesLabels } from '../../components/file-browser-entries/index.js';
1
4
  import type { FilePreviewLabels, FilePreviewTab } from '../../components/file-preview/index.js';
2
5
  import type { FileTreeEntryRow, FileTreeLabels, FileTreeRow } from '../../components/file-tree/index.js';
3
6
  import type { OvRequestOptions } from '../../client/index.js';
4
- import type { HTMLAttributes, ReactNode } from 'react';
7
+ import type { ComponentPropsWithRef, HTMLAttributes, ReactElement, ReactNode } from 'react';
5
8
  /**
6
- * 文件浏览模块的可替换文案。树与预览各有自己的一套,分别透传,模块外壳只提供
9
+ * 文件浏览模块的可替换文案。入口、树与预览的文案分别透传,模块外壳只提供
7
10
  * 自己渲染的那几条。
8
11
  *
9
- * Replaceable copy of the file browser module. The tree and the preview each keep
10
- * their own set, passed through as-is; the module shell only carries the strings
12
+ * Replaceable copy of the file browser module. Entry, tree and preview copy is
13
+ * passed through as-is; the module shell only carries the strings
11
14
  * it renders itself.
12
15
  */
13
16
  export interface FileBrowserLabels {
17
+ /** 预览底部字符数。Character count in the preview footer. */
18
+ formatCharacterCount?: (count: number) => string;
14
19
  /** 未选中资源时的提示。Message shown when no resource is selected. */
15
20
  empty?: string;
16
21
  /** 加载失败提示。Load failure message. */
@@ -60,6 +65,8 @@ export interface FileBrowserLabels {
60
65
  * generated yet", and the two call for different actions.
61
66
  */
62
67
  summaryFailed?: string;
68
+ /** 入口条与接入抽屉文案。Copy of the entry row and connection drawer. */
69
+ entries?: FileBrowserEntriesLabels;
63
70
  /** 目录树文案。Copy of the file tree. */
64
71
  tree?: FileTreeLabels;
65
72
  /** 预览文案。Copy of the file preview. */
@@ -69,21 +76,24 @@ export interface FileBrowserLabels {
69
76
  * 文件浏览模块的属性。
70
77
  *
71
78
  * 模块自己通过 Hook 取数,props 里没有数据字段:宿主给配置、受控的当前资源、
72
- * 工具栏入口、文案与请求配置。目录、搜索、预览页签与行级状态都在模块内维护。
79
+ * 接入配置、导入交互、文案与请求配置。入口条、目录、搜索、预览页签与行级
80
+ * 状态都在模块内维护。
73
81
  *
74
- * 模块只覆盖文件树与文件预览两块。命令面板属于 `console`。
82
+ * 模块包含文件树、文件预览与顶部入口。命令面板属于 `console`。
75
83
  *
76
84
  * Props of the file browser module.
77
85
  *
78
86
  * The module loads its own data through a Hook, so no prop carries data: the
79
- * host supplies configuration, the controlled current resource, the toolbar
80
- * entries, copy and request configuration. The directory, search, preview tabs
87
+ * host supplies configuration, the controlled current resource, import interactions,
88
+ * copy and request configuration. The entry row, directory, search, preview tabs
81
89
  * and per-row state all live inside the module.
82
90
  *
83
- * The module covers only the file tree and the file preview. The command panel
91
+ * The module includes the file tree, file preview and top entries. The command panel
84
92
  * belongs to `console`.
85
93
  */
86
94
  export interface FileBrowserProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onSelect' | 'children'> {
95
+ /** 内置中英文文案的语言。Language of the built-in interface copy. */
96
+ locale: Locale;
87
97
  /**
88
98
  * 受控的当前资源 URI。传入时由宿主决定当前资源,模块只上报切换意图。
89
99
  *
@@ -121,25 +131,10 @@ export interface FileBrowserProps extends Omit<HTMLAttributes<HTMLDivElement>, '
121
131
  */
122
132
  defaultExpandedUri?: string;
123
133
  /**
124
- * 透传给预览底座的文案语言。组件自身文案仍由 `labels` 控制。
125
- * Language of the preview base's built-in copy. The module's own copy stays
126
- * with `labels`.
134
+ * 内置接入抽屉的配置;传入后显示连接入口,省略时隐藏。
135
+ * Configuration of the built-in connection drawer; enables its entry when provided.
127
136
  */
128
- locale?: 'en-US' | 'zh-CN';
129
- /**
130
- * 工具栏上方的宿主入口,例如连接 Agent、导入资源。
131
- *
132
- * 两个固定入口由 `FileBrowserEntries` 提供,外观、图标、分隔线与等分排布都
133
- * 在那边,宿主只决定显示哪几个与点击后做什么。搜索与刷新由模块自己渲染。
134
- *
135
- * Host entries above the toolbar, for example connecting an agent or importing
136
- * resources.
137
- *
138
- * The two fixed entries come from `FileBrowserEntries`, which owns their look,
139
- * icons, divider and equal-width layout; the host only decides which appear and
140
- * what a click does. Search and refresh are rendered by the module itself.
141
- */
142
- toolbarActions?: ReactNode;
137
+ agentConnect?: AgentConnectProps;
143
138
  /**
144
139
  * 当前资源变化后触发,参数为新的 URI。
145
140
  *
@@ -155,8 +150,22 @@ export interface FileBrowserProps extends Omit<HTMLAttributes<HTMLDivElement>, '
155
150
  */
156
151
  onUriChange?: (uri: string | null) => void;
157
152
  /**
158
- * 可替换文案,缺省为英文。
159
- * Replaceable copy; English by default.
153
+ * 默认导入按钮的点击回调,单独传入即可显示导入入口。
154
+ * Click handler of the default import button; enables its entry on its own.
155
+ */
156
+ onImportResources?: () => void;
157
+ /**
158
+ * 自定义导入入口,参数是带图标与文案的默认原生按钮。
159
+ * 宿主可用自己的浮层包装按钮,保留点击回调。省略时使用默认按钮;返回 null
160
+ * 隐藏导入入口。同时省略点击回调和插槽时不显示导入入口。
161
+ * Renders the import entry using its default native button, including icon and
162
+ * label and click handler. Omit to use the default button, or return null to hide
163
+ * the entry. Omitting both the click handler and renderer hides the entry.
164
+ */
165
+ renderImportResources?: (trigger: ReactElement<ComponentPropsWithRef<'button'>>) => ReactNode;
166
+ /**
167
+ * 可替换文案,未提供的项使用当前 locale 的内置文案。
168
+ * Replaceable copy; omitted fields follow locale.
160
169
  */
161
170
  labels?: FileBrowserLabels;
162
171
  /**
@@ -1,7 +1,10 @@
1
+ import type { Locale } from '../../shared/locale.js';
1
2
  import type { OvRequestOptions } from '../../client/types.js';
2
3
  import type { FileBrowserApi } from './types.js';
3
4
  export interface UseFileBrowserOptions {
4
5
  rootUri: string;
6
+ /** Built-in copy for standalone use; defaults to en-US. */
7
+ locale?: Locale;
5
8
  /**
6
9
  * 宿主是否受控地持有当前资源。受控时 `currentUri` 就是唯一事实;非受控时
7
10
  * `currentUri` 只是初始值,之后的选中由模块自己记在 `pendingUri` 里。
@@ -31,6 +34,8 @@ export interface UseFileBrowserOptions {
31
34
  l1: string;
32
35
  failure: string;
33
36
  };
37
+ /** 字符数文案;独立 Hook 默认英文。Character count copy; standalone Hooks default to English. */
38
+ formatCharacterCount?: (count: number) => string;
34
39
  /** 首次加载后自动展开到的路径。Path to expand to after the first load. */
35
40
  defaultExpandedUri?: string;
36
41
  currentUri: string | null;
@@ -46,4 +51,4 @@ export interface UseFileBrowserOptions {
46
51
  * a directory row expands the tree, while a file row or a search result opens
47
52
  * the preview.
48
53
  */
49
- export declare function useFileBrowser({ rootUri, controlled, summaryLabels, defaultExpandedUri, currentUri, requestOptions, onUriChange, }: UseFileBrowserOptions): FileBrowserApi;
54
+ export declare function useFileBrowser({ rootUri, locale, controlled, summaryLabels, formatCharacterCount, defaultExpandedUri, currentUri, requestOptions, onUriChange, }: UseFileBrowserOptions): FileBrowserApi;
@@ -32,6 +32,8 @@ export interface UseFsPreviewOptions {
32
32
  l1: string;
33
33
  failure: string;
34
34
  };
35
+ /** 字符数文案;独立 Hook 默认英文。Character count copy; standalone Hooks default to English. */
36
+ formatCharacterCount?: (count: number) => string;
35
37
  /**
36
38
  * 打开路径上的某一级祖先。面包屑与目录页签共用它。
37
39
  * Opens one ancestor level; the breadcrumb and a directory tab share it.
@@ -48,4 +50,16 @@ export interface UseFsPreviewOptions {
48
50
  generation?: number;
49
51
  requestOptions?: OvRequestOptions;
50
52
  }
51
- export declare function useFsPreview({ client, uri, resourceType, labels, openParent, generation, requestOptions, }: UseFsPreviewOptions): PreviewState;
53
+ /**
54
+ * 当前资源的预览页签。切换资源时旧请求被取消,已产出的页签不会覆盖新资源。
55
+ *
56
+ * 文件读正文,目录读概览(为空时回落到摘要)——两者都是 Markdown,交给同一个
57
+ * 预览组件渲染。
58
+ *
59
+ * Preview tabs of the current resource. A stale request is cancelled when the
60
+ * resource changes, so its tabs never overwrite the new one.
61
+ *
62
+ * A file reads its content and a directory reads its overview, falling back to the
63
+ * abstract; both are Markdown and go through the same preview component.
64
+ */
65
+ export declare function useFsPreview({ client, uri, resourceType, labels, formatCharacterCount, openParent, generation, requestOptions, }: UseFsPreviewOptions): PreviewState;
@@ -0,0 +1,6 @@
1
+ import { type Locale } from '../../shared/locale.js';
2
+ export declare function resolveScopeCascadeLabels(locale: Locale): {
3
+ levelNames: [string, string, string];
4
+ error: string;
5
+ retry: string;
6
+ };
@@ -0,0 +1,6 @@
1
+ declare const messages: {
2
+ levelNames: [string, string, string];
3
+ error: string;
4
+ retry: string;
5
+ };
6
+ export default messages;
@@ -0,0 +1,3 @@
1
+ import type enUS from './en-US.js';
2
+ declare const messages: typeof enUS;
3
+ export default messages;
@@ -1,3 +1,3 @@
1
1
  import type { ScopeCascadeProps } from './types.js';
2
2
  /** Only leaf selectors subscribe. This wrapper stays outside the update path. */
3
- export declare function ScopeCascade({ controller, labels, levelNames, retryLabel, ...props }: ScopeCascadeProps): import("react").JSX.Element;
3
+ export declare function ScopeCascade({ controller, locale, labels, levelNames, retryLabel, ...props }: ScopeCascadeProps): import("react").JSX.Element;
@@ -1,7 +1,11 @@
1
- .ov-agent-connect, .ov-divider, .ov-file-browser, .ov-file-browser-entries, .ov-file-preview, .ov-file-tree, .ov-module-placeholder, .ov-popover, .ov-scope-switcher, .ov-tooltip, .ov-tui, .ov-viking-bot, .ov-viking-bot__interaction {
1
+ .ov-directory-tour, .ov-agent-connect, .ov-console, .ov-divider, .ov-file-browser-entries, .ov-drawer, .ov-file-browser, .ov-file-preview, .ov-file-tree, .ov-module-placeholder, .ov-popover, .ov-scope-switcher, .ov-tooltip, .ov-tui, .ov-viking-bot, .ov-viking-bot__popover, .ov-viking-bot__reference-picker--mention, .ov-viking-bot__interaction {
2
+ --ov-ui-tour-shadow-default: 0 15px 35px #0000000d, 0 5px 15px #0000000d;
3
+ --ov-ui-tour-highlight-default: #5252ff14;
2
4
  --ov-ui-primary-default: #5252ff;
3
5
  --ov-ui-primary-hover-default: #7075ff;
4
6
  --ov-ui-primary-active-default: #3833d2;
7
+ --ov-ui-primary-disabled-default: #acb4ff;
8
+ --ov-ui-text-on-primary-default: #fff;
5
9
  --ov-ui-primary-light-default: #f5f7ff;
6
10
  --ov-ui-connect-glow-warm-default: #ff952b0a;
7
11
  --ov-ui-connect-glow-pink-default: #fb4fbc0f;
@@ -19,18 +23,21 @@
19
23
  --ov-ui-bg-3-default: #f7f8fd;
20
24
  --ov-ui-bg-4-default: #f6f7fa;
21
25
  --ov-ui-bg-5-default: #f1f2f9;
26
+ --ov-ui-code-bg-default: #fbfbfc;
22
27
  --ov-ui-status-success-default: #1f9d55;
23
28
  --ov-ui-shadow-default: #0f172a;
29
+ --ov-ui-shadow-control-default: #0000000d;
24
30
  --ov-ui-focus-default: #5252ff;
25
31
  --ov-ui-fill-hover-default: #f1f2f9;
26
32
  --ov-ui-status-error-default: #c43838;
27
33
  --ov-ui-warning-default: #b26a00;
28
34
  --ov-ui-warning-light-default: #fff0b3;
35
+ --ov-ui-overlay-default: #0006;
29
36
  --ov-ui-tooltip-bg-default: #1f2329;
30
37
  --ov-ui-tooltip-text-default: #fff;
31
38
  }
32
39
 
33
- .dark .ov-agent-connect, .dark .ov-divider, .dark .ov-file-browser, .dark .ov-file-browser-entries, .dark .ov-file-preview, .dark .ov-file-tree, .dark .ov-module-placeholder, .dark .ov-popover, .dark .ov-scope-switcher, .dark .ov-tooltip, .dark .ov-tui, .dark .ov-viking-bot, .dark .ov-viking-bot__interaction {
40
+ .dark .ov-directory-tour, .dark .ov-agent-connect, .dark .ov-console, .dark .ov-divider, .dark .ov-file-browser-entries, .dark .ov-drawer, .dark .ov-file-browser, .dark .ov-file-preview, .dark .ov-file-tree, .dark .ov-module-placeholder, .dark .ov-popover, .dark .ov-scope-switcher, .dark .ov-tooltip, .dark .ov-tui, .dark .ov-viking-bot, .dark .ov-viking-bot__popover, .dark .ov-viking-bot__reference-picker--mention, .dark .ov-viking-bot__interaction {
34
41
  --ov-ui-primary-default: #5f5fff;
35
42
  --ov-ui-primary-hover-default: #7075ff;
36
43
  --ov-ui-primary-active-default: #4242ba;
@@ -56,9 +63,14 @@
56
63
  --ov-ui-warning-default: #e0a04a;
57
64
  --ov-ui-warning-light-default: #3a2f14;
58
65
  --ov-ui-tooltip-bg-default: #2a2d33;
66
+ --ov-ui-overlay-default: #000000a3;
59
67
  --ov-ui-tooltip-text-default: #f0f1f3;
60
68
  }
61
69
 
70
+ .dark .ov-viking-bot {
71
+ --ov-ui-code-bg-default: var(--ov-ui-bg-3-default);
72
+ }
73
+
62
74
  .ov-agent-connect {
63
75
  --ov-ui-connect-card-default: #fbfbfc;
64
76
  --ov-ui-connect-tabs-default: #f7f7f9;
@@ -1,3 +1,4 @@
1
+ import type { Locale } from '../../shared/locale.js';
1
2
  import type { HTMLAttributes } from 'react';
2
3
  import type { ScopeSwitcherLabels, ScopeSwitcherOption } from '../../components/scope-switcher/index.js';
3
4
  export interface ScopeCascadeApi {
@@ -32,6 +33,8 @@ export interface ScopeCascadeController {
32
33
  }
33
34
  export interface ScopeCascadeProps extends Omit<HTMLAttributes<HTMLDivElement>, 'children'> {
34
35
  controller: ScopeCascadeController;
36
+ /** 内置中英文文案的语言。Language of the built-in interface copy. */
37
+ locale: Locale;
35
38
  /** Accessible names and placeholders, in library / space / user order. */
36
39
  levelNames?: readonly [string, string, string];
37
40
  retryLabel?: string;