@openviking/react 0.1.3 → 0.1.5
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/LICENSE.arco-design +21 -0
- package/README.md +27 -15
- package/dist/0~0.js +19 -0
- package/dist/28~0.js +15 -0
- package/dist/2~0.js +2270 -29
- package/dist/2~0.js.LICENSE.txt +23 -0
- package/dist/3c~0.js +2208 -0
- package/dist/3~0.js +1207 -1982
- package/dist/4~0.js +18 -0
- package/dist/9~0.js +43 -0
- package/dist/{1~0.js → ae~0.js} +11 -26
- package/dist/ark-message-list-view~0.js +530 -119
- package/dist/a~0.js +1300 -14
- package/dist/c7~0.js +38 -2
- package/dist/ck~0.js +23 -0
- package/dist/client/provider.d.ts +15 -9
- package/dist/client/types.d.ts +5 -5
- package/dist/client.js +2 -1
- package/dist/components/agent-connect/agent-connect-code-block.d.ts +14 -0
- package/dist/components/agent-connect/agent-connect-copy.d.ts +22 -33
- package/dist/components/agent-connect/agent-connect-design.d.ts +1936 -168
- package/dist/components/agent-connect/agent-connect-installer.d.ts +1 -0
- package/dist/components/agent-connect/agent-connect-instructions-view.d.ts +4 -6
- package/dist/components/agent-connect/agent-connect-instructions.d.ts +148 -0
- package/dist/components/agent-connect/agent-connect-markdown.d.ts +8 -2
- package/dist/components/agent-connect/agent-connect-mask.d.ts +10 -0
- package/dist/components/agent-connect/agent-connect.d.ts +1 -1
- package/dist/components/agent-connect/locales/en-US.d.ts +23 -0
- package/dist/components/agent-connect/locales/zh-CN.d.ts +3 -0
- package/dist/components/agent-connect/style.css +129 -3
- package/dist/components/agent-connect/types.d.ts +7 -4
- package/dist/components/agent-connect/use-agent-connect-copy.d.ts +6 -0
- package/dist/components/directory-tour/directory-tour.d.ts +3 -0
- package/dist/components/directory-tour/index.d.ts +3 -0
- package/dist/components/directory-tour/locales/en-US.d.ts +3 -0
- package/dist/components/directory-tour/locales/zh-CN.d.ts +3 -0
- package/dist/components/directory-tour/steps.d.ts +5 -0
- package/dist/components/directory-tour/style.css +237 -0
- package/dist/components/directory-tour/style.js +0 -0
- package/dist/components/directory-tour/types.d.ts +43 -0
- package/dist/components/directory-tour/use-tour-anchor.d.ts +5 -0
- package/dist/components/directory-tour/use-tour-position.d.ts +12 -0
- package/dist/components/directory-tour.js +40 -0
- package/dist/components/file-browser-entries/file-browser-entries.d.ts +5 -5
- package/dist/components/file-browser-entries/labels.d.ts +3 -0
- package/dist/components/file-browser-entries/locales/en-US.d.ts +6 -0
- package/dist/components/file-browser-entries/locales/zh-CN.d.ts +6 -0
- package/dist/components/file-browser-entries/style.css +866 -2
- package/dist/components/file-browser-entries/types.d.ts +34 -16
- package/dist/components/file-preview/file-preview-adapters.d.ts +2 -1
- package/dist/components/file-preview/file-preview-body.d.ts +2 -1
- package/dist/components/file-preview/file-preview-breadcrumb-menu.d.ts +2 -1
- package/dist/components/file-preview/file-preview-breadcrumb.d.ts +2 -1
- package/dist/components/file-preview/file-preview-directory.d.ts +2 -1
- package/dist/components/file-preview/file-preview-handle-adapters.d.ts +2 -1
- package/dist/components/file-preview/file-preview-header.d.ts +6 -2
- package/dist/components/file-preview/file-preview-image-frame.d.ts +5 -0
- package/dist/components/file-preview/file-preview-labels.d.ts +2 -14
- package/dist/components/file-preview/file-preview-level-tabs.d.ts +7 -0
- package/dist/components/file-preview/file-preview-markdown-images.d.ts +13 -0
- package/dist/components/file-preview/file-preview-panels.d.ts +5 -2
- package/dist/components/file-preview/file-preview-viewer.d.ts +2 -1
- package/dist/components/file-preview/file-preview.d.ts +0 -1
- package/dist/components/file-preview/index.d.ts +2 -1
- package/dist/components/file-preview/locales/en-US.d.ts +16 -0
- package/dist/components/file-preview/locales/zh-CN.d.ts +16 -0
- package/dist/components/file-preview/style.css +160 -2
- package/dist/components/file-preview/types.d.ts +34 -10
- package/dist/components/file-preview/use-file-preview-levels.d.ts +7 -0
- package/dist/components/file-preview/use-file-preview-view-state.d.ts +15 -0
- package/dist/components/file-preview.js +1 -1
- package/dist/components/file-tree/file-tree-info-labels.d.ts +0 -15
- package/dist/components/file-tree/file-tree-labels.d.ts +4 -0
- package/dist/components/file-tree/file-tree-row-shared.d.ts +2 -12
- package/dist/components/file-tree/file-tree-toolbar.d.ts +11 -0
- package/dist/components/file-tree/locales/en-US.d.ts +69 -0
- package/dist/components/file-tree/locales/zh-CN.d.ts +69 -0
- package/dist/components/file-tree/style.css +143 -15
- package/dist/components/file-tree/types.d.ts +38 -10
- package/dist/components/file-tree/use-file-tree-actions.d.ts +4 -1
- package/dist/components/scope-switcher/labels.d.ts +3 -0
- package/dist/components/scope-switcher/locales/en-US.d.ts +8 -0
- package/dist/components/scope-switcher/locales/zh-CN.d.ts +8 -0
- package/dist/components/scope-switcher/scope-panel.d.ts +1 -1
- package/dist/components/scope-switcher/scope-switcher.d.ts +2 -2
- package/dist/components/scope-switcher/style.css +14 -2
- package/dist/components/scope-switcher/types.d.ts +12 -6
- package/dist/components/style.css +10030 -6763
- package/dist/components/tui/locales/en-US.d.ts +35 -0
- package/dist/components/tui/locales/zh-CN.d.ts +35 -0
- package/dist/components/tui/style.css +310 -18
- package/dist/components/tui/tui-copy-button.d.ts +1 -1
- package/dist/components/tui/tui-empty.d.ts +25 -0
- package/dist/components/tui/tui-labels.d.ts +2 -2
- package/dist/components/tui/tui.d.ts +1 -1
- package/dist/components/tui/types.d.ts +35 -12
- package/dist/components/tui.js +1 -1
- package/dist/components/viking-bot/ark-adapter.d.ts +2 -0
- package/dist/components/viking-bot/ark-message-body.d.ts +1 -7
- package/dist/components/viking-bot/ark-message-list-view.d.ts +4 -1
- package/dist/components/viking-bot/ark-message-row.d.ts +3 -1
- package/dist/components/viking-bot/bot-popover.d.ts +9 -0
- package/dist/components/viking-bot/capabilities.d.ts +49 -0
- package/dist/components/viking-bot/composer-attachments.d.ts +13 -0
- package/dist/components/viking-bot/composer-controls.d.ts +10 -0
- package/dist/components/viking-bot/composer-footer.d.ts +17 -0
- package/dist/components/viking-bot/composer-references.d.ts +20 -0
- package/dist/components/viking-bot/composer-text.d.ts +10 -0
- package/dist/components/viking-bot/index.d.ts +3 -1
- package/dist/components/viking-bot/interaction/ask-human-fields.d.ts +1 -1
- package/dist/components/viking-bot/interaction/labels.d.ts +2 -1
- package/dist/components/viking-bot/interaction/locales/en-US.d.ts +17 -0
- package/dist/components/viking-bot/interaction/locales/zh-CN.d.ts +17 -0
- package/dist/components/viking-bot/interaction/types.d.ts +8 -3
- package/dist/components/viking-bot/interaction/viking-bot-interaction.d.ts +1 -1
- package/dist/components/viking-bot/labels.d.ts +2 -0
- package/dist/components/viking-bot/locales/en-US.d.ts +40 -0
- package/dist/components/viking-bot/locales/zh-CN.d.ts +40 -0
- package/dist/components/viking-bot/markdown-links.d.ts +27 -0
- package/dist/components/viking-bot/message-activity.d.ts +7 -0
- package/dist/components/viking-bot/message-code-block.d.ts +8 -0
- package/dist/components/viking-bot/message-footer.d.ts +8 -0
- package/dist/components/viking-bot/message-markdown.d.ts +9 -0
- package/dist/components/viking-bot/model.d.ts +37 -3
- package/dist/components/viking-bot/quick-input-tracker.d.ts +16 -0
- package/dist/components/viking-bot/quick-inputs.d.ts +6 -0
- package/dist/components/viking-bot/reference-picker.d.ts +16 -0
- package/dist/components/viking-bot/session-actions.d.ts +11 -0
- package/dist/components/viking-bot/style.css +1486 -48
- package/dist/components/viking-bot/tool-activity.d.ts +9 -0
- package/dist/components/viking-bot/tool-result-links.d.ts +6 -0
- package/dist/components/viking-bot/types.d.ts +20 -8
- package/dist/components/viking-bot/use-quick-input.d.ts +17 -0
- package/dist/components/viking-bot/viking-bot.d.ts +1 -6
- package/dist/components/viking-bot/welcome.d.ts +8 -0
- package/dist/components/viking-bot.js +1 -1
- package/dist/c~0.js +550 -69
- package/dist/e~0.js +335 -0
- package/dist/file-preview-viewer~0.js +90 -8
- package/dist/f~0.js +49 -51
- package/dist/h~0.js +5 -1
- package/dist/icons/console-icons.d.ts +12 -0
- package/dist/icons/index.d.ts +2 -0
- package/dist/icons/viking-bot-icons.d.ts +6 -0
- package/dist/icons.js +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +2 -1
- package/dist/k~0.js +1 -0
- package/dist/lg~0.js +155 -0
- package/dist/lk~0.js +40 -8
- package/dist/l~0.js +170 -181
- package/dist/modules/console/command-messages.d.ts +19 -0
- package/dist/modules/console/command-parser.d.ts +15 -0
- package/dist/modules/console/command-specs.d.ts +15 -0
- package/dist/modules/console/commands.d.ts +6 -0
- package/dist/modules/console/console-history.d.ts +10 -0
- package/dist/modules/console/console-toolbar.d.ts +18 -0
- package/dist/modules/console/console.d.ts +1 -3
- package/dist/modules/console/controller.d.ts +17 -0
- package/dist/modules/console/index.d.ts +2 -0
- package/dist/modules/console/labels.d.ts +61 -0
- package/dist/modules/console/locales/en-US.d.ts +49 -0
- package/dist/modules/console/locales/zh-CN.d.ts +3 -0
- package/dist/modules/console/localize-records.d.ts +11 -0
- package/dist/modules/console/results.d.ts +2 -0
- package/dist/modules/console/style.css +10905 -15
- package/dist/modules/console/types.d.ts +59 -80
- package/dist/modules/console/use-console.d.ts +3 -0
- package/dist/modules/console.js +1 -1
- package/dist/modules/file-browser/file-browser-detail.d.ts +2 -1
- package/dist/modules/file-browser/file-browser-labels.d.ts +11 -12
- package/dist/modules/file-browser/file-browser-toolbar.d.ts +3 -4
- package/dist/modules/file-browser/file-browser-tree-pane.d.ts +7 -5
- package/dist/modules/file-browser/file-browser.d.ts +1 -1
- package/dist/modules/file-browser/fs-read-directory.d.ts +2 -6
- package/dist/modules/file-browser/locales/en-US.d.ts +25 -0
- package/dist/modules/file-browser/locales/zh-CN.d.ts +25 -0
- package/dist/modules/file-browser/style.css +1695 -126
- package/dist/modules/file-browser/types.d.ts +38 -29
- package/dist/modules/file-browser/use-file-browser.d.ts +6 -1
- package/dist/modules/file-browser/use-fs-preview.d.ts +15 -1
- package/dist/modules/scope-cascade/labels.d.ts +6 -0
- package/dist/modules/scope-cascade/locales/en-US.d.ts +6 -0
- package/dist/modules/scope-cascade/locales/zh-CN.d.ts +3 -0
- package/dist/modules/scope-cascade/scope-cascade.d.ts +2 -2
- package/dist/modules/scope-cascade/style.css +14 -2
- package/dist/modules/scope-cascade/types.d.ts +3 -0
- package/dist/modules/style.css +15938 -3455
- package/dist/nx~0.js +15 -0
- package/dist/n~0.js +240 -83
- package/dist/o~0.js +10 -7
- package/dist/p~0.js +27 -0
- package/dist/rslib-runtime~0.js +42 -0
- package/dist/r~0.js +152 -0
- package/dist/shared/components/drawer/drawer.d.ts +13 -0
- package/dist/shared/components/drawer/index.d.ts +1 -0
- package/dist/shared/components/overlay/use-overlay-position.d.ts +2 -2
- package/dist/shared/components/tooltip/use-portal-theme.d.ts +3 -0
- package/dist/shared/locale-context.d.ts +8 -0
- package/dist/shared/locale.d.ts +6 -0
- package/dist/style.css +26339 -10577
- package/dist/u~0.js +397 -152
- package/dist/viking-bot-composer~0.js +436 -77
- package/dist/viking-bot-interaction~0.js +13 -11
- package/package.json +15 -4
- package/dist/30~0.js +0 -1332
- package/dist/components/tui/tui-labels-zh.d.ts +0 -2
- package/dist/modules/file-browser/tree-info-copy.d.ts +0 -15
- 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.
|
|
10
|
-
*
|
|
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
|
-
*
|
|
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,
|
|
80
|
-
*
|
|
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
|
|
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
|
+
/** 可选文案语言;继承上层,最终默认英文。Optional locale; inherits or defaults to en-US. */
|
|
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
|
-
*
|
|
125
|
-
*
|
|
126
|
-
* with `labels`.
|
|
134
|
+
* 内置接入抽屉的配置;传入后显示连接入口,省略时隐藏。
|
|
135
|
+
* Configuration of the built-in connection drawer; enables its entry when provided.
|
|
127
136
|
*/
|
|
128
|
-
|
|
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
|
-
*
|
|
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; inherits the Provider locale, otherwise 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
|
+
/** 字符数文案;省略时跟随语言。Character count copy; follows the resolved locale. */
|
|
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: localeProp, 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
|
-
|
|
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;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { ScopeCascadeProps } from './types.js';
|
|
2
|
-
/** Only leaf selectors subscribe
|
|
3
|
-
export declare function ScopeCascade({ controller, labels, levelNames, retryLabel, ...props }: ScopeCascadeProps): import("react").JSX.Element;
|
|
2
|
+
/** Only leaf selectors subscribe to request state; this wrapper resolves language. */
|
|
3
|
+
export declare function ScopeCascade({ controller, locale: localeProp, labels, levelNames: names, retryLabel, ...props }: ScopeCascadeProps): import("react").JSX.Element;
|
|
@@ -1,7 +1,11 @@
|
|
|
1
|
-
.ov-agent-connect, .ov-divider, .ov-file-browser, .ov-file-browser
|
|
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
|
|
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
|
+
/** 可选文案语言;继承上层,最终默认英文。Optional locale; inherits or defaults to en-US. */
|
|
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;
|