@openviking/react 0.1.1 → 0.1.2

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 (164) hide show
  1. package/README.md +18 -15
  2. package/dist/3~0.js +2113 -4
  3. package/dist/ark-message-list-view~0.js +310 -0
  4. package/dist/c7~0.js +24 -0
  5. package/dist/components/agent-connect/agent-connect-copy.d.ts +34 -0
  6. package/dist/components/agent-connect/agent-connect-design.d.ts +1781 -0
  7. package/dist/components/agent-connect/agent-connect-detail.d.ts +13 -0
  8. package/dist/components/agent-connect/agent-connect-installer.d.ts +3 -0
  9. package/dist/components/agent-connect/agent-connect-instructions-view.d.ts +14 -0
  10. package/dist/components/agent-connect/agent-connect-instructions.d.ts +145 -0
  11. package/dist/components/agent-connect/agent-connect-markdown.d.ts +3 -0
  12. package/dist/components/agent-connect/agent-connect.d.ts +3 -3
  13. package/dist/components/agent-connect/content-en.d.ts +137 -0
  14. package/dist/components/agent-connect/content-zh.d.ts +137 -0
  15. package/dist/components/agent-connect/style.css +495 -6
  16. package/dist/components/agent-connect/types.d.ts +20 -166
  17. package/dist/components/file-preview/file-preview-adapters.d.ts +33 -0
  18. package/dist/components/file-preview/file-preview-body.d.ts +24 -12
  19. package/dist/components/file-preview/file-preview-breadcrumb-menu.d.ts +16 -0
  20. package/dist/components/file-preview/file-preview-breadcrumb.d.ts +21 -0
  21. package/dist/components/file-preview/file-preview-copy-path.d.ts +12 -0
  22. package/dist/components/file-preview/file-preview-editor.d.ts +22 -0
  23. package/dist/components/file-preview/file-preview-handle-adapters.d.ts +26 -0
  24. package/dist/components/file-preview/file-preview-header.d.ts +23 -14
  25. package/dist/components/file-preview/file-preview-labels.d.ts +15 -4
  26. package/dist/components/file-preview/file-preview-lazy-viewer.d.ts +3 -0
  27. package/dist/components/file-preview/file-preview-path.d.ts +30 -0
  28. package/dist/components/file-preview/file-preview-source.d.ts +24 -0
  29. package/dist/components/file-preview/file-preview-state.d.ts +28 -0
  30. package/dist/components/file-preview/file-preview-tab-row.d.ts +16 -0
  31. package/dist/components/file-preview/file-preview-viewer.d.ts +31 -0
  32. package/dist/components/file-preview/file-preview.d.ts +8 -11
  33. package/dist/components/file-preview/style.css +3984 -128
  34. package/dist/components/file-preview/types.d.ts +250 -169
  35. package/dist/components/file-preview/use-file-preview-actions-context.d.ts +23 -0
  36. package/dist/components/file-preview/use-file-preview-actions.d.ts +19 -0
  37. package/dist/components/file-preview/use-file-preview-editing.d.ts +21 -2
  38. package/dist/components/file-preview/use-file-preview-ids.d.ts +24 -0
  39. package/dist/components/file-preview.js +1 -442
  40. package/dist/components/file-tree/file-tree-body.d.ts +8 -4
  41. package/dist/components/file-tree/file-tree-entry-row.d.ts +9 -3
  42. package/dist/components/file-tree/file-tree-icons.d.ts +12 -5
  43. package/dist/components/file-tree/file-tree-info-labels.d.ts +21 -0
  44. package/dist/components/file-tree/file-tree-info-tooltip.d.ts +43 -0
  45. package/dist/components/file-tree/file-tree-info.d.ts +29 -0
  46. package/dist/components/file-tree/file-tree-keyboard.d.ts +8 -4
  47. package/dist/components/file-tree/file-tree-row-context.d.ts +31 -9
  48. package/dist/components/file-tree/file-tree-row-shared.d.ts +11 -0
  49. package/dist/components/file-tree/file-tree-spinner.d.ts +10 -0
  50. package/dist/components/file-tree/file-tree-state-row.d.ts +7 -0
  51. package/dist/components/file-tree/file-tree-tooltip-surface.d.ts +22 -0
  52. package/dist/components/file-tree/file-tree-tooltip.d.ts +9 -3
  53. package/dist/components/file-tree/file-tree.d.ts +12 -1
  54. package/dist/components/file-tree/style.css +225 -57
  55. package/dist/components/file-tree/types.d.ts +183 -0
  56. package/dist/components/file-tree/use-file-tree-actions.d.ts +7 -0
  57. package/dist/components/file-tree.js +1 -1
  58. package/dist/components/scope-switcher/scope-panel.d.ts +9 -3
  59. package/dist/components/scope-switcher/scope-selector.d.ts +1 -1
  60. package/dist/components/scope-switcher/scope-switcher.d.ts +1 -1
  61. package/dist/components/scope-switcher/style.css +282 -76
  62. package/dist/components/scope-switcher/types.d.ts +230 -108
  63. package/dist/components/style.css +13845 -372
  64. package/dist/components/tui/command-catalog.d.ts +58 -0
  65. package/dist/components/tui/command-completion.d.ts +19 -0
  66. package/dist/components/tui/command-definitions.d.ts +10 -0
  67. package/dist/components/tui/command-input.d.ts +16 -0
  68. package/dist/components/tui/style.css +1543 -5
  69. package/dist/components/tui/tui-assist.d.ts +15 -0
  70. package/dist/components/tui/tui-code-block.d.ts +8 -0
  71. package/dist/components/tui/tui-command-help.d.ts +9 -0
  72. package/dist/components/tui/tui-command-text.d.ts +6 -0
  73. package/dist/components/tui/tui-composer.d.ts +24 -0
  74. package/dist/components/tui/tui-copy-button.d.ts +9 -0
  75. package/dist/components/tui/tui-input-mirror.d.ts +14 -0
  76. package/dist/components/tui/tui-labels-zh.d.ts +2 -0
  77. package/dist/components/tui/tui-labels.d.ts +5 -0
  78. package/dist/components/tui/tui-markdown-renderers.d.ts +10 -0
  79. package/dist/components/tui/tui-markdown.d.ts +6 -0
  80. package/dist/components/tui/tui-param-hint.d.ts +7 -0
  81. package/dist/components/tui/tui-record-time.d.ts +11 -0
  82. package/dist/components/tui/tui-record.d.ts +13 -0
  83. package/dist/components/tui/tui-resource-preview.d.ts +10 -0
  84. package/dist/components/tui/tui-resource-tree.d.ts +10 -0
  85. package/dist/components/tui/tui-result-header.d.ts +7 -0
  86. package/dist/components/tui/tui-result-text.d.ts +5 -0
  87. package/dist/components/tui/tui-search-list.d.ts +8 -0
  88. package/dist/components/tui/tui-skeleton.d.ts +6 -0
  89. package/dist/components/tui/tui-status-card.d.ts +7 -0
  90. package/dist/components/tui/tui-text.d.ts +10 -0
  91. package/dist/components/tui/tui-uri-text.d.ts +19 -0
  92. package/dist/components/tui/tui-write-result.d.ts +7 -0
  93. package/dist/components/tui/tui.d.ts +10 -2
  94. package/dist/components/tui/types.d.ts +57 -15
  95. package/dist/components/tui/use-tui-assist-position.d.ts +3 -0
  96. package/dist/components/tui/use-tui-completion.d.ts +14 -0
  97. package/dist/components/tui/use-tui-composer-keyboard.d.ts +25 -0
  98. package/dist/components/viking-bot/ark-adapter.d.ts +45 -0
  99. package/dist/components/viking-bot/ark-message-body.d.ts +16 -0
  100. package/dist/components/viking-bot/ark-message-list-view.d.ts +7 -0
  101. package/dist/components/viking-bot/ark-message-row.d.ts +19 -0
  102. package/dist/components/viking-bot/index.d.ts +10 -0
  103. package/dist/components/viking-bot/interaction/ask-human-fields.d.ts +10 -0
  104. package/dist/components/viking-bot/interaction/index.d.ts +4 -0
  105. package/dist/components/viking-bot/interaction/labels.d.ts +7 -0
  106. package/dist/components/viking-bot/interaction/lazy-interaction.d.ts +3 -0
  107. package/dist/components/viking-bot/interaction/schedule-input.d.ts +13 -0
  108. package/dist/components/viking-bot/interaction/style.css +189 -0
  109. package/dist/components/viking-bot/interaction/types.d.ts +188 -0
  110. package/dist/components/viking-bot/interaction/viking-bot-interaction.d.ts +9 -0
  111. package/dist/components/viking-bot/interaction.js +2 -0
  112. package/dist/components/viking-bot/labels.d.ts +2 -0
  113. package/dist/components/viking-bot/lazy-composer.d.ts +3 -0
  114. package/dist/components/viking-bot/message-groups.d.ts +12 -0
  115. package/dist/components/viking-bot/model.d.ts +252 -0
  116. package/dist/components/viking-bot/render-part.d.ts +12 -0
  117. package/dist/components/viking-bot/style.css +7135 -0
  118. package/dist/components/viking-bot/style.js +0 -0
  119. package/dist/components/viking-bot/types.d.ts +140 -0
  120. package/dist/components/viking-bot/viking-bot-composer.d.ts +6 -0
  121. package/dist/components/viking-bot/viking-bot-message-list.d.ts +3 -0
  122. package/dist/components/viking-bot/viking-bot.d.ts +16 -0
  123. package/dist/components/viking-bot.js +4 -0
  124. package/dist/c~0.js +201 -0
  125. package/dist/file-preview-viewer~0.js +191 -0
  126. package/dist/f~0.js +149 -77
  127. package/dist/g~0.js +1207 -0
  128. package/dist/h~0.js +58 -0
  129. package/dist/icons/file-type-icon.d.ts +31 -0
  130. package/dist/icons/index.d.ts +33 -23
  131. package/dist/icons/nextjs-icon.d.ts +19 -0
  132. package/dist/icons.js +1 -25
  133. package/dist/index.d.ts +2 -2
  134. package/dist/index.js +1 -1
  135. package/dist/k~0.js +1440 -0
  136. package/dist/lk~0.js +25 -12
  137. package/dist/modules/console/style.css +83 -1
  138. package/dist/modules/file-browser/style.css +89 -6
  139. package/dist/modules/scope-cascade/style.css +282 -76
  140. package/dist/modules/style.css +533 -110
  141. package/dist/n~0.js +434 -206
  142. package/dist/shared/components/tooltip/index.d.ts +1 -0
  143. package/dist/shared/components/tooltip/tooltip.d.ts +25 -0
  144. package/dist/shared/components/tooltip/types.d.ts +42 -0
  145. package/dist/shared/components/tooltip/use-tooltip-position.d.ts +38 -0
  146. package/dist/style.css +14451 -474
  147. package/dist/u~0.js +1597 -4
  148. package/dist/viking-bot-composer~0.js +164 -0
  149. package/dist/viking-bot-interaction~0.js +284 -0
  150. package/dist/w~0.js +19 -0
  151. package/package.json +18 -10
  152. package/dist/components/file-preview/file-preview-icons.d.ts +0 -2
  153. package/dist/components/file-preview/file-preview-operations.d.ts +0 -1
  154. package/dist/components/file-tree/file-tree-dom.d.ts +0 -4
  155. package/dist/components/file-tree/file-tree-labels.d.ts +0 -5
  156. package/dist/components/file-tree/file-tree-rows.d.ts +0 -12
  157. package/dist/i~0.js +0 -21
  158. package/dist/modules/task-center/columns.d.ts +0 -129
  159. package/dist/modules/task-center/index.d.ts +0 -1
  160. package/dist/modules/task-center/style.css +0 -29
  161. package/dist/modules/task-center/task-center.d.ts +0 -4
  162. package/dist/modules/task-center/types.d.ts +0 -168
  163. package/dist/modules/task-center.js +0 -1
  164. /package/dist/{modules/task-center → components/viking-bot/interaction}/style.js +0 -0
@@ -1,24 +1,46 @@
1
- import type { KeyboardEvent, ReactNode } from 'react';
2
- import type { HTMLAttributes } from 'react';
3
- import type { FileTreeEntryRow, FileTreeErrorRow, FileTreeLabels, FileTreeLoadMoreRow, FileTreeRow } from './types.js';
4
- /** 渲染行所需的外部输入,由组件主体注入。 */
1
+ import type { HTMLAttributes, KeyboardEvent, ReactNode } from 'react';
2
+ import type { FileTreeEntryRow, FileTreeErrorRow, FileTreeInfoLabels, FileTreeLabels, FileTreeLoadMoreRow, FileTreeRow } from './types.js';
3
+ /**
4
+ * 文案的内部形状:标量项都有默认值,嵌套的 `info` 保持可选。
5
+ *
6
+ * Internal copy shape: every scalar has a default, while the nested `info`
7
+ * stays optional.
8
+ */
9
+ export type ResolvedLabels = Required<Omit<FileTreeLabels, 'info'>> & Pick<FileTreeLabels, 'info'>;
10
+ /** 渲染行所需的外部输入,由组件主体注入。Row rendering inputs, injected by the tree. */
5
11
  export interface FileTreeRowContext {
6
- text: Required<FileTreeLabels>;
12
+ /** 已合并默认值的文案。Copy with defaults merged in. */
13
+ text: ResolvedLabels;
14
+ /** 目录说明的宿主覆盖,用于解析内置说明。Host overrides for directory copy. */
15
+ infoLabels?: FileTreeInfoLabels;
16
+ /** 当前选中的行 id。Currently selected row id. */
7
17
  selectedId?: string | null;
18
+ /** 当前展示浮层的行 id。Row whose tooltip is showing. */
8
19
  tooltipRowId: string | null;
20
+ /** 为行追加属性。Extra attributes for a row. */
9
21
  getRowAttributes?: (row: FileTreeRow) => HTMLAttributes<HTMLDivElement>;
22
+ /** 行尾指示器。Row-end indicator. */
10
23
  renderDashboard?: (row: FileTreeEntryRow) => ReactNode;
24
+ /** 悬停浮层内容。Hover content. */
11
25
  renderRowTooltip?: (row: FileTreeEntryRow) => ReactNode;
26
+ /** 行首文件图标。Leading icon for a file row. */
27
+ renderRowIcon?: (row: FileTreeEntryRow) => ReactNode;
28
+ /** 加载转圈;省略时用内置的 CSS 圆环。Loading spinner; defaults to the CSS ring. */
29
+ renderSpinner?: () => ReactNode;
30
+ /** 选中。Selects a row. */
12
31
  onSelect?: (row: FileTreeEntryRow) => void;
32
+ /** 展开或折叠。Expands or collapses a directory. */
13
33
  onToggleExpand?: (row: FileTreeEntryRow) => void;
34
+ /** 加载下一页。Loads the next page. */
14
35
  onLoadMore?: (row: FileTreeLoadMoreRow) => void;
36
+ /** 重试失败的子节点。Retries a failed children load. */
15
37
  onRetry?: (row: FileTreeErrorRow) => void;
38
+ /** 打开保留策略设置。Opens retention settings. */
16
39
  onOpenRetentionSettings?: (uri: string) => void;
40
+ /** 行的键盘处理。Key handling for a row. */
17
41
  onRowKeyDown: (event: KeyboardEvent<HTMLDivElement>, row: FileTreeEntryRow) => void;
42
+ /** 指针进入行。Pointer enters a row. */
18
43
  onRowEnter: (rowId: string) => void;
44
+ /** 指针离开行。Pointer leaves a row. */
19
45
  onRowLeave: () => void;
20
46
  }
21
- /** 行按深度缩进,其余内边距由样式负责。 */
22
- export declare function rowIndent(row: FileTreeRow): {
23
- paddingLeft: string;
24
- };
@@ -0,0 +1,11 @@
1
+ /** 每一级缩进与祖先连线的宽度。Indent per level, and the guide through it. */
2
+ export declare const INDENT = 20;
3
+ export declare const CHEVRON_SIZE = 16;
4
+ /** 行按深度缩进。Indents a row by its depth. */
5
+ export declare function rowStyle(depth: number): {
6
+ paddingLeft: number;
7
+ };
8
+ /** 每一级祖先画一条竖线,上下各溢出 1px 让相邻行接上。 */
9
+ export declare function Guides({ depth }: {
10
+ depth: number;
11
+ }): import("react").JSX.Element;
@@ -0,0 +1,10 @@
1
+ import type { HTMLAttributes } from 'react';
2
+ /**
3
+ * 目录加载子节点时,替换展开箭头显示的转圈。用纯 CSS 画环,不依赖图标资源。
4
+ * 需要换成图标或品牌化的加载态时,改用 `FileTree` 的 `slots.spinner` 覆盖。
5
+ *
6
+ * The spinner shown in place of the expand chevron while a directory loads its
7
+ * children. Drawn with CSS alone, so it needs no icon asset. To swap in an icon
8
+ * or a branded loader, override it with `FileTree`'s `slots.spinner`.
9
+ */
10
+ export declare function FileTreeSpinner({ className, ...rest }: HTMLAttributes<HTMLSpanElement>): import("react").JSX.Element;
@@ -0,0 +1,7 @@
1
+ import type { FileTreeRowContext } from './file-tree-row-context.js';
2
+ import type { FileTreeRow } from './types.js';
3
+ /** 非条目行:加载、分页、失败与空态都只占一行,不参与选中。 */
4
+ export declare function FileTreeStateRow({ row, ctx, }: {
5
+ row: FileTreeRow;
6
+ ctx: FileTreeRowContext;
7
+ }): import("react").JSX.Element | null;
@@ -0,0 +1,22 @@
1
+ import type { ReactNode } from 'react';
2
+ import type { FileTreeEntryRow, FileTreeInfoLabels } from './types.js';
3
+ /**
4
+ * 行浮层的外壳。宿主提供 `renderRowTooltip` 时只渲染它返回的内容;它返回 `null`
5
+ * 表示这一行不显示浮层,不回退到内置内容。
6
+ *
7
+ * 宿主没有提供时,用按 `uri` 解析的内置浮层。先解析内容、再决定是否创建外壳,
8
+ * 因此没有可显示内容时不会留下一个只有背景和内边距的空壳。
9
+ *
10
+ * The shell around a row tooltip. When the host supplies `renderRowTooltip`, only
11
+ * its result renders; returning `null` hides the tooltip for that row and does
12
+ * not fall back to the built-in content.
13
+ *
14
+ * When the host supplies none, the built-in tooltip resolved from the row `uri`
15
+ * renders. The content is resolved before the shell is created, so with nothing
16
+ * to show no empty shell with just background and padding is left behind.
17
+ */
18
+ export declare function FileTreeTooltipSurface({ row, infoLabels, renderRowTooltip, }: {
19
+ row: FileTreeEntryRow;
20
+ infoLabels?: FileTreeInfoLabels;
21
+ renderRowTooltip?: (row: FileTreeEntryRow) => ReactNode;
22
+ }): import("react").JSX.Element | null;
@@ -1,8 +1,14 @@
1
1
  /**
2
- * 悬停停留一段时间后才展示行提示。
2
+ * 悬停停留一段时间后才展示行浮层。
3
3
  *
4
- * 用 timeout 而不是 CSS 延迟,是因为提示内容由宿主渲染、需要按行 id 切换;
5
- * 卸载或换行时清掉未触发的定时器,避免迟到的回调写入已失效的行。
4
+ * 用定时器而不是 CSS 延迟,是因为浮层内容由宿主渲染、需要按行 id 切换;卸载或
5
+ * 换行时清掉未触发的定时器,避免迟到的回调写入已失效的行。
6
+ *
7
+ * Shows a row tooltip once the pointer has rested for a while.
8
+ *
9
+ * A timer rather than a CSS delay, because the host renders the content and it
10
+ * switches per row id; a pending timer is cleared on unmount or when the row
11
+ * changes, so a late callback never writes to a row that is gone.
6
12
  */
7
13
  export declare function useRowTooltip(delay?: number): {
8
14
  tooltipRowId: string | null;
@@ -1,4 +1,15 @@
1
1
  import type { FileTreeComponent } from './types.js';
2
+ export { FileTreeSpinner } from './file-tree-spinner.js';
3
+ export { resolveFileTreeInfoKey, showsInlineDescription, splitVikingUri, } from './file-tree-info.js';
4
+ export { DEFAULT_INFO_LABELS, resolveInfoCopy, } from './file-tree-info-labels.js';
2
5
  export { FILE_TREE_ROW_ATTRIBUTE } from './types.js';
3
- export type { FileTreeChildRow, FileTreeComponent, FileTreeEmptyRow, FileTreeEntryRow, FileTreeErrorRow, FileTreeHandle, FileTreeLabels, FileTreeLoadingRow, FileTreeLoadMoreRow, FileTreeOperations, FileTreeProps, FileTreeRow, FileTreeRowBase, FileTreeSlots, } from './types.js';
6
+ export type { FileTreeChildRow, FileTreeComponent, FileTreeEmptyRow, FileTreeEntryRow, FileTreeErrorRow, FileTreeHandle, FileTreeInfoKey, FileTreeInfoLabels, FileTreeLabels, FileTreeLoadingRow, FileTreeLoadMoreRow, FileTreeOperations, FileTreeProps, FileTreeRow, FileTreeRowBase, FileTreeSlots, } from './types.js';
7
+ /**
8
+ * 目录树。宿主把树状态展平成有序行列表传进来,组件负责渲染、键盘交互,
9
+ * 并在操作成功后通知。
10
+ *
11
+ * A file tree. The host flattens its tree state into an ordered row list; the
12
+ * component renders it, handles keyboard interaction and reports successful
13
+ * operations.
14
+ */
4
15
  export declare const FileTree: FileTreeComponent;
@@ -1,8 +1,102 @@
1
+ .ov-agent-connect, .ov-file-browser, .ov-file-preview, .ov-file-tree, .ov-module-placeholder, .ov-scope-switcher, .ov-tooltip, .ov-tui, .ov-viking-bot, .ov-viking-bot__interaction {
2
+ --ov-ui-primary-default: #5252ff;
3
+ --ov-ui-primary-hover-default: #7075ff;
4
+ --ov-ui-primary-active-default: #3833d2;
5
+ --ov-ui-primary-light-default: #f5f7ff;
6
+ --ov-ui-connect-glow-warm-default: #ff952b0a;
7
+ --ov-ui-connect-glow-pink-default: #fb4fbc0f;
8
+ --ov-ui-connect-glow-pink-soft-default: #fb4fbc0a;
9
+ --ov-ui-on-primary-default: #fff;
10
+ --ov-ui-text-1-default: #0b0b0f;
11
+ --ov-ui-text-2-default: #3f3f51;
12
+ --ov-ui-text-3-default: #6e718c;
13
+ --ov-ui-text-description-default: #0006;
14
+ --ov-ui-text-disabled-default: #a5a7bb;
15
+ --ov-ui-border-1-default: #f0f2fa;
16
+ --ov-ui-border-2-default: #e1e4f2;
17
+ --ov-ui-border-3-default: #d7daea;
18
+ --ov-ui-bg-1-default: #fff;
19
+ --ov-ui-bg-3-default: #f7f8fd;
20
+ --ov-ui-bg-4-default: #f6f7fa;
21
+ --ov-ui-bg-5-default: #f1f2f9;
22
+ --ov-ui-status-success-default: #1f9d55;
23
+ --ov-ui-shadow-default: #0f172a;
24
+ --ov-ui-focus-default: #5252ff;
25
+ --ov-ui-fill-hover-default: #f1f2f9;
26
+ --ov-ui-status-error-default: #c43838;
27
+ --ov-ui-warning-default: #b26a00;
28
+ --ov-ui-warning-light-default: #fff0b3;
29
+ --ov-ui-tooltip-bg-default: #1f2329;
30
+ --ov-ui-tooltip-text-default: #fff;
31
+ }
32
+
33
+ .dark .ov-agent-connect, .dark .ov-file-browser, .dark .ov-file-preview, .dark .ov-file-tree, .dark .ov-module-placeholder, .dark .ov-scope-switcher, .dark .ov-tooltip, .dark .ov-tui, .dark .ov-viking-bot, .dark .ov-viking-bot__interaction {
34
+ --ov-ui-primary-default: #5f5fff;
35
+ --ov-ui-primary-hover-default: #7075ff;
36
+ --ov-ui-primary-active-default: #4242ba;
37
+ --ov-ui-primary-light-default: #1a1632;
38
+ --ov-ui-connect-glow-warm-default: #ff952b05;
39
+ --ov-ui-connect-glow-pink-default: #fb4fbc08;
40
+ --ov-ui-connect-glow-pink-soft-default: #fb4fbc05;
41
+ --ov-ui-text-1-default: #c7ccd6;
42
+ --ov-ui-text-2-default: #9da3af;
43
+ --ov-ui-text-3-default: #737a87;
44
+ --ov-ui-text-description-default: #fff6;
45
+ --ov-ui-text-disabled-default: #42464e;
46
+ --ov-ui-border-1-default: #23252a;
47
+ --ov-ui-border-2-default: #2e3138;
48
+ --ov-ui-border-3-default: #3a3d45;
49
+ --ov-ui-bg-1-default: #131416;
50
+ --ov-ui-bg-3-default: #1b1d21;
51
+ --ov-ui-bg-4-default: #202227;
52
+ --ov-ui-bg-5-default: #23252a;
53
+ --ov-ui-focus-default: #5f5fff;
54
+ --ov-ui-fill-hover-default: #23252a;
55
+ --ov-ui-status-error-default: #ff9595;
56
+ --ov-ui-warning-default: #e0a04a;
57
+ --ov-ui-warning-light-default: #3a2f14;
58
+ --ov-ui-tooltip-bg-default: #2a2d33;
59
+ --ov-ui-tooltip-text-default: #f0f1f3;
60
+ }
61
+
62
+ .ov-agent-connect {
63
+ --ov-ui-connect-card-default: #fbfbfc;
64
+ --ov-ui-connect-tabs-default: #f7f7f9;
65
+ --ov-ui-connect-selected-default: #f3f4f7;
66
+ --ov-ui-connect-border-default: #edeef2;
67
+ --ov-ui-connect-outline-default: #e1e3ea;
68
+ --ov-ui-connect-muted-default: #787c91;
69
+ --ov-ui-connect-notice-default: #2e2984;
70
+ }
71
+
72
+ .dark .ov-agent-connect {
73
+ --ov-ui-connect-card-default: var(--ov-ui-bg-3-default);
74
+ --ov-ui-connect-tabs-default: var(--ov-ui-bg-3-default);
75
+ --ov-ui-connect-selected-default: var(--ov-ui-bg-4-default);
76
+ --ov-ui-connect-border-default: var(--ov-ui-border-1-default);
77
+ --ov-ui-connect-outline-default: var(--ov-ui-border-2-default);
78
+ --ov-ui-connect-muted-default: var(--ov-ui-text-3-default);
79
+ --ov-ui-connect-notice-default: var(--ov-ui-text-2-default);
80
+ }
81
+
1
82
  .ov-file-tree {
83
+ --ov-ui-file-tree-row-height: 32px;
84
+ --ov-ui-file-tree-row-radius: 4px;
85
+ --ov-ui-file-tree-indent: 20px;
86
+ --ov-ui-file-tree-text: var(--ov-ui-color-text-1, var(--ov-ui-text-1-default, #0b0b0f));
87
+ --ov-ui-file-tree-text-muted: var(--ov-ui-color-text-3, var(--ov-ui-text-3-default, #6e718c));
88
+ --ov-ui-file-tree-icon: var(--ov-ui-color-text-2, var(--ov-ui-text-2-default, #3f3f51));
89
+ --ov-ui-file-tree-row-hover: var(--ov-ui-color-bg-5, var(--ov-ui-bg-5-default, #f1f2f9));
90
+ --ov-ui-file-tree-row-selected: var(--ov-ui-color-bg-4, var(--ov-ui-bg-4-default, #f6f7fa));
91
+ --ov-ui-file-tree-guide: var(--ov-ui-color-border-2, var(--ov-ui-border-2-default, #e1e4f2));
92
+ --ov-ui-file-tree-spinner-track: var(--ov-ui-color-border-3, var(--ov-ui-border-3-default, #d7daea));
93
+ --ov-ui-file-tree-spinner: var(--ov-ui-color-primary, var(--ov-ui-primary-default, #5252ff));
94
+ --ov-ui-file-tree-action: var(--ov-ui-color-primary, var(--ov-ui-primary-default, #5252ff));
95
+ --ov-ui-file-tree-warning: var(--ov-ui-color-warning, var(--ov-ui-warning-default, #b26a00));
2
96
  box-sizing: border-box;
3
97
  min-width: 0;
4
98
  min-height: 0;
5
- color: inherit;
99
+ color: var(--ov-ui-file-tree-text);
6
100
  flex-direction: column;
7
101
  font-family: inherit;
8
102
  font-size: 13px;
@@ -26,11 +120,10 @@
26
120
  display: flex;
27
121
  }
28
122
 
29
- .ov-file-tree__row {
123
+ .ov-file-tree__row, .ov-file-tree__state-row {
30
124
  box-sizing: border-box;
31
- border-radius: var(--ov-ui-radius, 6px);
32
- height: 28px;
33
- color: inherit;
125
+ height: var(--ov-ui-file-tree-row-height);
126
+ border-radius: var(--ov-ui-file-tree-row-radius);
34
127
  cursor: default;
35
128
  -webkit-user-select: none;
36
129
  user-select: none;
@@ -42,24 +135,37 @@
42
135
  position: relative;
43
136
  }
44
137
 
45
- .ov-file-tree__row:hover {
46
- background: var(--ov-ui-row-hover, color-mix(in srgb, currentColor 6%, transparent));
138
+ .ov-file-tree__row {
139
+ transition: background-color .12s;
47
140
  }
48
141
 
49
- .ov-file-tree__row:focus-visible {
50
- outline: 2px solid var(--ov-ui-focus-ring, #2563c5);
51
- outline-offset: -2px;
142
+ .ov-file-tree__row:hover {
143
+ background-color: var(--ov-ui-file-tree-row-hover);
52
144
  }
53
145
 
54
146
  .ov-file-tree__row[data-selected] {
55
- background: var(--ov-ui-row-selected, #2563c51a);
147
+ background-color: var(--ov-ui-file-tree-row-selected);
148
+ }
149
+
150
+ .ov-file-tree__row:focus-visible, .ov-file-tree__state-row:focus-visible {
151
+ outline: 2px solid var(--ov-ui-file-tree-action);
152
+ outline-offset: -2px;
56
153
  }
57
154
 
58
155
  .ov-file-tree__row[data-disabled] {
59
- color: var(--ov-ui-text-muted, color-mix(in srgb, currentColor 62%, transparent));
156
+ color: var(--ov-ui-file-tree-text-muted);
60
157
  cursor: not-allowed;
61
158
  }
62
159
 
160
+ .ov-file-tree__guide {
161
+ background-color: var(--ov-ui-file-tree-guide);
162
+ pointer-events: none;
163
+ width: 1px;
164
+ position: absolute;
165
+ top: 0;
166
+ bottom: 0;
167
+ }
168
+
63
169
  .ov-file-tree__toggle, .ov-file-tree__toggle-spacer {
64
170
  flex: none;
65
171
  justify-content: center;
@@ -70,7 +176,7 @@
70
176
  }
71
177
 
72
178
  .ov-file-tree__toggle {
73
- color: var(--ov-ui-text-muted, color-mix(in srgb, currentColor 62%, transparent));
179
+ color: var(--ov-ui-file-tree-text-muted);
74
180
  cursor: pointer;
75
181
  background: none;
76
182
  border: 0;
@@ -78,12 +184,16 @@
78
184
  padding: 0;
79
185
  }
80
186
 
81
- .ov-file-tree__toggle:hover {
82
- background: color-mix(in srgb, currentColor 10%, transparent);
187
+ .ov-file-tree__toggle:hover:not(:disabled) {
188
+ background-color: var(--ov-ui-file-tree-row-hover);
189
+ }
190
+
191
+ .ov-file-tree__toggle:disabled {
192
+ cursor: default;
83
193
  }
84
194
 
85
195
  .ov-file-tree__chevron {
86
- transition: transform .12s;
196
+ transition: transform .15s cubic-bezier(.22, 1, .36, 1);
87
197
  }
88
198
 
89
199
  .ov-file-tree__chevron[data-expanded] {
@@ -91,22 +201,47 @@
91
201
  }
92
202
 
93
203
  .ov-file-tree__icon-slot {
94
- color: var(--ov-ui-icon, color-mix(in srgb, currentColor 62%, transparent));
204
+ width: 16px;
205
+ height: 16px;
206
+ color: var(--ov-ui-file-tree-icon);
95
207
  flex: none;
208
+ justify-content: center;
96
209
  align-items: center;
97
210
  display: inline-flex;
98
211
  }
99
212
 
100
- .ov-file-tree__icon {
101
- display: block;
213
+ .ov-file-tree__folder {
214
+ width: 14px;
215
+ height: 14px;
216
+ display: inline-block;
217
+ position: relative;
218
+ }
219
+
220
+ .ov-file-tree__folder-layer {
221
+ opacity: 0;
222
+ width: 14px;
223
+ height: 14px;
224
+ transition: opacity .22s cubic-bezier(.22, 1, .36, 1);
225
+ position: absolute;
226
+ inset: 0;
227
+ }
228
+
229
+ .ov-file-tree__folder-layer[data-open="true"] {
230
+ opacity: 1;
231
+ }
232
+
233
+ .ov-file-tree__file-icon {
234
+ width: 16px;
235
+ height: 16px;
102
236
  }
103
237
 
104
238
  .ov-file-tree__label-group {
105
239
  flex: auto;
106
- align-items: baseline;
107
- gap: 6px;
240
+ align-items: center;
241
+ gap: 8px;
108
242
  min-width: 0;
109
243
  display: flex;
244
+ overflow: hidden;
110
245
  }
111
246
 
112
247
  .ov-file-tree__label {
@@ -116,7 +251,7 @@
116
251
  }
117
252
 
118
253
  .ov-file-tree__description {
119
- color: var(--ov-ui-text-muted, color-mix(in srgb, currentColor 62%, transparent));
254
+ color: var(--ov-ui-file-tree-text-muted);
120
255
  text-overflow: ellipsis;
121
256
  white-space: nowrap;
122
257
  font-size: 12px;
@@ -124,17 +259,14 @@
124
259
  }
125
260
 
126
261
  .ov-file-tree__level {
127
- background: var(--ov-ui-chip, color-mix(in srgb, currentColor 10%, transparent));
128
- color: var(--ov-ui-text-muted, color-mix(in srgb, currentColor 62%, transparent));
129
- border-radius: 3px;
262
+ color: var(--ov-ui-file-tree-text-muted);
130
263
  flex: none;
131
- padding: 0 4px;
132
- font-size: 11px;
133
- line-height: 16px;
264
+ margin-left: auto;
265
+ font-size: 14px;
134
266
  }
135
267
 
136
268
  .ov-file-tree__expiry {
137
- color: var(--ov-ui-warning, #b26a00);
269
+ color: var(--ov-ui-file-tree-warning);
138
270
  flex: none;
139
271
  font-size: 12px;
140
272
  }
@@ -157,10 +289,10 @@
157
289
 
158
290
  .ov-file-tree__tooltip {
159
291
  z-index: 1;
160
- border-radius: var(--ov-ui-radius, 6px);
161
- background: var(--ov-ui-tooltip-bg, #1f2329);
292
+ border-radius: var(--ov-ui-file-tree-row-radius);
293
+ background: var(--ov-ui-color-tooltip-bg, var(--ov-ui-tooltip-bg-default, #1f2329));
162
294
  max-width: 320px;
163
- color: var(--ov-ui-tooltip-text, #fff);
295
+ color: var(--ov-ui-color-tooltip-text, var(--ov-ui-tooltip-text-default, #fff));
164
296
  pointer-events: none;
165
297
  padding: 6px 8px;
166
298
  font-size: 12px;
@@ -170,57 +302,75 @@
170
302
  left: 0;
171
303
  }
172
304
 
173
- .ov-file-tree__child-row {
174
- box-sizing: border-box;
175
- height: 28px;
176
- color: var(--ov-ui-text-muted, color-mix(in srgb, currentColor 62%, transparent));
177
- align-items: center;
178
- gap: 6px;
179
- padding-right: 8px;
305
+ .ov-file-tree__info {
306
+ flex-direction: column;
307
+ gap: 4px;
180
308
  display: flex;
181
309
  }
182
310
 
183
- .ov-file-tree__child-row[data-tone="error"] {
184
- color: var(--ov-ui-status-error, #c43838);
311
+ .ov-file-tree__info-title {
312
+ word-break: break-all;
313
+ font-size: 13px;
314
+ font-weight: 500;
315
+ line-height: 20px;
185
316
  }
186
317
 
187
- .ov-file-tree__child-action {
188
- color: inherit;
189
- font: inherit;
190
- cursor: pointer;
191
- background: none;
192
- border: 0;
193
- padding: 0;
194
- text-decoration: underline;
318
+ .ov-file-tree__info-row {
319
+ gap: 8px;
320
+ min-width: 0;
321
+ display: flex;
195
322
  }
196
323
 
197
- .ov-file-tree__child-action:disabled {
198
- cursor: default;
199
- opacity: .6;
324
+ .ov-file-tree__info-label {
325
+ opacity: .65;
326
+ flex: none;
327
+ }
328
+
329
+ .ov-file-tree__info-value {
330
+ word-break: break-word;
331
+ min-width: 0;
332
+ }
333
+
334
+ .ov-file-tree__info-path {
335
+ opacity: .8;
336
+ word-break: break-all;
337
+ min-width: 0;
338
+ }
339
+
340
+ .ov-file-tree__state-row {
341
+ color: var(--ov-ui-file-tree-text-muted);
342
+ }
343
+
344
+ .ov-file-tree__state-row[data-tone="error"] {
345
+ color: var(--ov-ui-color-status-error, var(--ov-ui-status-error-default, #c43838));
200
346
  }
201
347
 
202
348
  .ov-file-tree__state {
203
349
  box-sizing: border-box;
350
+ min-height: 120px;
351
+ color: var(--ov-ui-file-tree-text-muted);
204
352
  justify-content: center;
205
353
  align-items: center;
206
- min-height: 120px;
207
354
  padding: 24px;
208
355
  display: flex;
209
356
  }
210
357
 
211
358
  .ov-file-tree__muted {
212
359
  color: inherit;
360
+ text-overflow: ellipsis;
361
+ white-space: nowrap;
362
+ overflow: hidden;
213
363
  }
214
364
 
215
365
  .ov-file-tree__spinner {
216
366
  box-sizing: border-box;
217
- border: 1.5px solid;
218
- border-right-color: #0000;
367
+ border: 1px solid var(--ov-ui-file-tree-spinner-track);
368
+ border-top-color: var(--ov-ui-file-tree-spinner);
219
369
  border-radius: 50%;
220
370
  flex: none;
221
371
  width: 12px;
222
372
  height: 12px;
223
- animation: .72s linear infinite ov-file-tree-spin;
373
+ animation: .9s linear infinite ov-file-tree-spin;
224
374
  display: inline-block;
225
375
  }
226
376
 
@@ -230,8 +380,26 @@
230
380
  }
231
381
  }
232
382
 
383
+ .ov-file-tree__action {
384
+ color: inherit;
385
+ font: inherit;
386
+ cursor: pointer;
387
+ background: none;
388
+ border: 0;
389
+ padding: 0;
390
+ transition: color .12s;
391
+ }
392
+
393
+ .ov-file-tree__action:hover:not(:disabled) {
394
+ color: var(--ov-ui-file-tree-action);
395
+ }
396
+
397
+ .ov-file-tree__action:disabled {
398
+ cursor: default;
399
+ }
400
+
233
401
  @media (prefers-reduced-motion: reduce) {
234
- .ov-file-tree__chevron {
402
+ .ov-file-tree__chevron, .ov-file-tree__folder-layer {
235
403
  transition: none;
236
404
  }
237
405