@openviking/react 0.1.2 → 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 (249) 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 +2360 -0
  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/ae~0.js +487 -0
  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/index.d.ts +2 -1
  16. package/dist/client/paths.d.ts +64 -0
  17. package/dist/client/provider.d.ts +5 -3
  18. package/dist/client/response.d.ts +31 -0
  19. package/dist/client/sse.d.ts +39 -0
  20. package/dist/client/stream.d.ts +26 -0
  21. package/dist/client/types.d.ts +109 -5
  22. package/dist/client.js +2 -239
  23. package/dist/components/agent-connect/agent-connect-copy.d.ts +19 -33
  24. package/dist/components/agent-connect/agent-connect-design.d.ts +1935 -167
  25. package/dist/components/agent-connect/agent-connect-instructions.d.ts +135 -0
  26. package/dist/components/agent-connect/locales/en-US.d.ts +20 -0
  27. package/dist/components/agent-connect/locales/zh-CN.d.ts +3 -0
  28. package/dist/components/agent-connect/style.css +14 -2
  29. package/dist/components/agent-connect/types.d.ts +2 -1
  30. package/dist/components/directory-tour/directory-tour.d.ts +3 -0
  31. package/dist/components/directory-tour/index.d.ts +3 -0
  32. package/dist/components/directory-tour/locales/en-US.d.ts +3 -0
  33. package/dist/components/directory-tour/locales/zh-CN.d.ts +3 -0
  34. package/dist/components/directory-tour/steps.d.ts +5 -0
  35. package/dist/components/directory-tour/style.css +237 -0
  36. package/dist/components/directory-tour/style.js +0 -0
  37. package/dist/components/directory-tour/types.d.ts +42 -0
  38. package/dist/components/directory-tour/use-tour-anchor.d.ts +5 -0
  39. package/dist/components/directory-tour/use-tour-position.d.ts +12 -0
  40. package/dist/components/directory-tour.js +40 -0
  41. package/dist/components/file-browser-entries/file-browser-entries-icons.d.ts +18 -0
  42. package/dist/components/file-browser-entries/file-browser-entries.d.ts +14 -0
  43. package/dist/components/file-browser-entries/index.d.ts +1 -0
  44. package/dist/components/file-browser-entries/labels.d.ts +3 -0
  45. package/dist/components/file-browser-entries/locales/en-US.d.ts +6 -0
  46. package/dist/components/file-browser-entries/locales/zh-CN.d.ts +6 -0
  47. package/dist/components/file-browser-entries/style.css +905 -0
  48. package/dist/components/file-browser-entries/style.js +0 -0
  49. package/dist/components/file-browser-entries/types.d.ts +63 -0
  50. package/dist/components/file-browser-entries.js +1 -0
  51. package/dist/components/file-preview/file-preview-adapters.d.ts +2 -1
  52. package/dist/components/file-preview/file-preview-body.d.ts +2 -1
  53. package/dist/components/file-preview/file-preview-breadcrumb-menu.d.ts +2 -1
  54. package/dist/components/file-preview/file-preview-breadcrumb.d.ts +2 -1
  55. package/dist/components/file-preview/file-preview-directory.d.ts +33 -0
  56. package/dist/components/file-preview/file-preview-handle-adapters.d.ts +2 -1
  57. package/dist/components/file-preview/file-preview-header.d.ts +25 -3
  58. package/dist/components/file-preview/file-preview-image-frame.d.ts +5 -0
  59. package/dist/components/file-preview/file-preview-labels.d.ts +2 -14
  60. package/dist/components/file-preview/file-preview-level-tabs.d.ts +7 -0
  61. package/dist/components/file-preview/file-preview-markdown-images.d.ts +13 -0
  62. package/dist/components/file-preview/file-preview-panels.d.ts +44 -0
  63. package/dist/components/file-preview/file-preview-state.d.ts +10 -3
  64. package/dist/components/file-preview/file-preview-viewer.d.ts +2 -1
  65. package/dist/components/file-preview/file-preview.d.ts +1 -1
  66. package/dist/components/file-preview/index.d.ts +2 -1
  67. package/dist/components/file-preview/level-selection.d.ts +25 -0
  68. package/dist/components/file-preview/locales/en-US.d.ts +16 -0
  69. package/dist/components/file-preview/locales/zh-CN.d.ts +16 -0
  70. package/dist/components/file-preview/style.css +234 -3
  71. package/dist/components/file-preview/types.d.ts +134 -11
  72. package/dist/components/file-preview/use-directory-level.d.ts +30 -0
  73. package/dist/components/file-preview/use-file-preview-actions-context.d.ts +6 -2
  74. package/dist/components/file-preview/use-file-preview-actions.d.ts +1 -1
  75. package/dist/components/file-preview/use-file-preview-levels.d.ts +7 -0
  76. package/dist/components/file-preview/use-file-preview-view-state.d.ts +15 -0
  77. package/dist/components/file-preview.js +1 -1
  78. package/dist/components/file-tree/file-tree-info-labels.d.ts +0 -15
  79. package/dist/components/file-tree/file-tree-info-tooltip.d.ts +7 -7
  80. package/dist/components/file-tree/file-tree-labels.d.ts +4 -0
  81. package/dist/components/file-tree/file-tree-row-context.d.ts +0 -5
  82. package/dist/components/file-tree/file-tree-row-shared.d.ts +1 -4
  83. package/dist/components/file-tree/file-tree-toolbar.d.ts +11 -0
  84. package/dist/components/file-tree/file-tree-tooltip-surface.d.ts +8 -8
  85. package/dist/components/file-tree/locales/en-US.d.ts +69 -0
  86. package/dist/components/file-tree/locales/zh-CN.d.ts +69 -0
  87. package/dist/components/file-tree/style.css +207 -42
  88. package/dist/components/file-tree/types.d.ts +58 -10
  89. package/dist/components/file-tree/use-file-tree-actions.d.ts +4 -1
  90. package/dist/components/scope-switcher/labels.d.ts +3 -0
  91. package/dist/components/scope-switcher/locales/en-US.d.ts +8 -0
  92. package/dist/components/scope-switcher/locales/zh-CN.d.ts +8 -0
  93. package/dist/components/scope-switcher/scope-panel.d.ts +1 -1
  94. package/dist/components/scope-switcher/scope-switcher.d.ts +1 -1
  95. package/dist/components/scope-switcher/style.css +14 -2
  96. package/dist/components/scope-switcher/types.d.ts +11 -5
  97. package/dist/components/style.css +10144 -6840
  98. package/dist/components/tui/locales/en-US.d.ts +35 -0
  99. package/dist/components/tui/locales/zh-CN.d.ts +35 -0
  100. package/dist/components/tui/style.css +310 -18
  101. package/dist/components/tui/tui-copy-button.d.ts +1 -1
  102. package/dist/components/tui/tui-empty.d.ts +25 -0
  103. package/dist/components/tui/tui-labels.d.ts +2 -2
  104. package/dist/components/tui/tui.d.ts +1 -1
  105. package/dist/components/tui/types.d.ts +35 -12
  106. package/dist/components/tui.js +1 -1
  107. package/dist/components/viking-bot/ark-adapter.d.ts +2 -0
  108. package/dist/components/viking-bot/ark-message-body.d.ts +1 -7
  109. package/dist/components/viking-bot/ark-message-list-view.d.ts +1 -1
  110. package/dist/components/viking-bot/ark-message-row.d.ts +3 -1
  111. package/dist/components/viking-bot/bot-popover.d.ts +9 -0
  112. package/dist/components/viking-bot/capabilities.d.ts +49 -0
  113. package/dist/components/viking-bot/composer-attachments.d.ts +13 -0
  114. package/dist/components/viking-bot/composer-controls.d.ts +10 -0
  115. package/dist/components/viking-bot/composer-footer.d.ts +17 -0
  116. package/dist/components/viking-bot/composer-references.d.ts +20 -0
  117. package/dist/components/viking-bot/composer-text.d.ts +10 -0
  118. package/dist/components/viking-bot/index.d.ts +3 -1
  119. package/dist/components/viking-bot/interaction/ask-human-fields.d.ts +1 -1
  120. package/dist/components/viking-bot/interaction/labels.d.ts +2 -1
  121. package/dist/components/viking-bot/interaction/locales/en-US.d.ts +17 -0
  122. package/dist/components/viking-bot/interaction/locales/zh-CN.d.ts +17 -0
  123. package/dist/components/viking-bot/interaction/types.d.ts +8 -3
  124. package/dist/components/viking-bot/interaction/viking-bot-interaction.d.ts +1 -1
  125. package/dist/components/viking-bot/labels.d.ts +2 -0
  126. package/dist/components/viking-bot/locales/en-US.d.ts +40 -0
  127. package/dist/components/viking-bot/locales/zh-CN.d.ts +40 -0
  128. package/dist/components/viking-bot/markdown-links.d.ts +27 -0
  129. package/dist/components/viking-bot/message-activity.d.ts +7 -0
  130. package/dist/components/viking-bot/message-code-block.d.ts +8 -0
  131. package/dist/components/viking-bot/message-footer.d.ts +8 -0
  132. package/dist/components/viking-bot/message-markdown.d.ts +9 -0
  133. package/dist/components/viking-bot/model.d.ts +37 -3
  134. package/dist/components/viking-bot/quick-input-tracker.d.ts +16 -0
  135. package/dist/components/viking-bot/quick-inputs.d.ts +6 -0
  136. package/dist/components/viking-bot/reference-picker.d.ts +16 -0
  137. package/dist/components/viking-bot/session-actions.d.ts +11 -0
  138. package/dist/components/viking-bot/style.css +1486 -48
  139. package/dist/components/viking-bot/tool-activity.d.ts +9 -0
  140. package/dist/components/viking-bot/tool-result-links.d.ts +6 -0
  141. package/dist/components/viking-bot/types.d.ts +21 -9
  142. package/dist/components/viking-bot/use-quick-input.d.ts +17 -0
  143. package/dist/components/viking-bot/viking-bot.d.ts +1 -6
  144. package/dist/components/viking-bot/welcome.d.ts +8 -0
  145. package/dist/components/viking-bot.js +1 -1
  146. package/dist/c~0.js +533 -66
  147. package/dist/e~0.js +333 -0
  148. package/dist/file-preview-viewer~0.js +90 -8
  149. package/dist/f~0.js +39 -47
  150. package/dist/h~0.js +5 -1
  151. package/dist/icons/console-icons.d.ts +12 -0
  152. package/dist/icons/index.d.ts +2 -0
  153. package/dist/icons/viking-bot-icons.d.ts +6 -0
  154. package/dist/icons.js +1 -0
  155. package/dist/index.d.ts +4 -0
  156. package/dist/index.js +3 -1
  157. package/dist/k~0.js +1 -0
  158. package/dist/lg~0.js +155 -0
  159. package/dist/lk~0.js +37 -8
  160. package/dist/l~0.js +1447 -25
  161. package/dist/modules/console/command-messages.d.ts +19 -0
  162. package/dist/modules/console/command-parser.d.ts +15 -0
  163. package/dist/modules/console/command-specs.d.ts +15 -0
  164. package/dist/modules/console/commands.d.ts +6 -0
  165. package/dist/modules/console/console-history.d.ts +10 -0
  166. package/dist/modules/console/console-toolbar.d.ts +18 -0
  167. package/dist/modules/console/console.d.ts +1 -3
  168. package/dist/modules/console/controller.d.ts +17 -0
  169. package/dist/modules/console/index.d.ts +2 -0
  170. package/dist/modules/console/labels.d.ts +61 -0
  171. package/dist/modules/console/locales/en-US.d.ts +49 -0
  172. package/dist/modules/console/locales/zh-CN.d.ts +3 -0
  173. package/dist/modules/console/localize-records.d.ts +11 -0
  174. package/dist/modules/console/results.d.ts +2 -0
  175. package/dist/modules/console/style.css +10905 -15
  176. package/dist/modules/console/types.d.ts +59 -80
  177. package/dist/modules/console/use-console.d.ts +3 -0
  178. package/dist/modules/console.js +1 -1
  179. package/dist/modules/file-browser/file-browser-detail-icons.d.ts +10 -0
  180. package/dist/modules/file-browser/file-browser-detail.d.ts +34 -0
  181. package/dist/modules/file-browser/file-browser-empty.d.ts +3 -0
  182. package/dist/modules/file-browser/file-browser-failure.d.ts +22 -0
  183. package/dist/modules/file-browser/file-browser-icons.d.ts +18 -0
  184. package/dist/modules/file-browser/file-browser-labels.d.ts +27 -0
  185. package/dist/modules/file-browser/file-browser-layout.d.ts +27 -0
  186. package/dist/modules/file-browser/file-browser-toolbar.d.ts +17 -0
  187. package/dist/modules/file-browser/file-browser-tree-pane.d.ts +32 -0
  188. package/dist/modules/file-browser/file-browser.d.ts +14 -5
  189. package/dist/modules/file-browser/find-result.d.ts +24 -0
  190. package/dist/modules/file-browser/fs-directories.d.ts +33 -0
  191. package/dist/modules/file-browser/fs-file-kind.d.ts +19 -0
  192. package/dist/modules/file-browser/fs-icon.d.ts +17 -0
  193. package/dist/modules/file-browser/fs-model.d.ts +106 -0
  194. package/dist/modules/file-browser/fs-page.d.ts +16 -0
  195. package/dist/modules/file-browser/fs-path.d.ts +16 -0
  196. package/dist/modules/file-browser/fs-read-directory.d.ts +16 -0
  197. package/dist/modules/file-browser/fs-scope.d.ts +22 -0
  198. package/dist/modules/file-browser/fs-stat.d.ts +25 -0
  199. package/dist/modules/file-browser/index.d.ts +3 -1
  200. package/dist/modules/file-browser/locales/en-US.d.ts +25 -0
  201. package/dist/modules/file-browser/locales/zh-CN.d.ts +25 -0
  202. package/dist/modules/file-browser/style.css +6388 -41
  203. package/dist/modules/file-browser/types.d.ts +206 -52
  204. package/dist/modules/file-browser/use-container-width.d.ts +17 -0
  205. package/dist/modules/file-browser/use-file-browser.d.ts +54 -0
  206. package/dist/modules/file-browser/use-fs-preview.d.ts +65 -0
  207. package/dist/modules/file-browser/use-fs-search.d.ts +35 -0
  208. package/dist/modules/file-browser/use-fs-tree.d.ts +43 -0
  209. package/dist/modules/file-browser/use-request-scope.d.ts +39 -0
  210. package/dist/modules/file-browser.js +1 -1
  211. package/dist/modules/scope-cascade/labels.d.ts +6 -0
  212. package/dist/modules/scope-cascade/locales/en-US.d.ts +6 -0
  213. package/dist/modules/scope-cascade/locales/zh-CN.d.ts +3 -0
  214. package/dist/modules/scope-cascade/scope-cascade.d.ts +1 -1
  215. package/dist/modules/scope-cascade/style.css +14 -2
  216. package/dist/modules/scope-cascade/types.d.ts +3 -0
  217. package/dist/modules/style.css +17338 -77
  218. package/dist/nx~0.js +15 -0
  219. package/dist/n~0.js +403 -144
  220. package/dist/o~0.js +106 -0
  221. package/dist/p~0.js +27 -0
  222. package/dist/rslib-runtime~0.js +42 -0
  223. package/dist/r~0.js +152 -0
  224. package/dist/shared/components/divider/divider.d.ts +18 -0
  225. package/dist/shared/components/divider/index.d.ts +1 -0
  226. package/dist/shared/components/divider/types.d.ts +35 -0
  227. package/dist/shared/components/drawer/drawer.d.ts +13 -0
  228. package/dist/shared/components/drawer/index.d.ts +1 -0
  229. package/dist/shared/components/overlay/types.d.ts +7 -0
  230. package/dist/shared/components/{tooltip/use-tooltip-position.d.ts → overlay/use-overlay-position.d.ts} +6 -6
  231. package/dist/shared/components/popover/index.d.ts +1 -0
  232. package/dist/shared/components/popover/popover.d.ts +23 -0
  233. package/dist/shared/components/popover/types.d.ts +50 -0
  234. package/dist/shared/components/resizable/clamp.d.ts +13 -0
  235. package/dist/shared/components/resizable/index.d.ts +2 -0
  236. package/dist/shared/components/resizable/resizable-handle.d.ts +25 -0
  237. package/dist/shared/components/resizable/types.d.ts +48 -0
  238. package/dist/shared/components/tooltip/types.d.ts +5 -5
  239. package/dist/shared/components/tooltip/use-portal-theme.d.ts +3 -0
  240. package/dist/shared/locale.d.ts +6 -0
  241. package/dist/style.css +27753 -7176
  242. package/dist/u~0.js +75 -58
  243. package/dist/viking-bot-composer~0.js +434 -77
  244. package/dist/viking-bot-interaction~0.js +11 -11
  245. package/package.json +18 -4
  246. package/dist/components/file-tree/file-tree-tooltip.d.ts +0 -17
  247. package/dist/components/tui/tui-labels-zh.d.ts +0 -2
  248. package/dist/g~0.js +0 -1207
  249. package/dist/modules/file-browser/file-browser-toolbar-button.d.ts +0 -10
@@ -1,7 +1,11 @@
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 {
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-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 {
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;
@@ -258,7 +270,6 @@
258
270
  }
259
271
 
260
272
  .ov-file-preview__header {
261
- border-bottom: 1px solid var(--ov-ui-file-preview-border);
262
273
  flex: none;
263
274
  justify-content: space-between;
264
275
  align-items: center;
@@ -593,6 +604,80 @@
593
604
  font-size: 12px;
594
605
  }
595
606
 
607
+ .ov-file-preview__levels {
608
+ flex: none;
609
+ align-items: stretch;
610
+ gap: 32px;
611
+ height: 34px;
612
+ padding: 0 16px;
613
+ display: flex;
614
+ position: relative;
615
+ }
616
+
617
+ .ov-file-preview__level {
618
+ color: var(--ov-ui-file-preview-text-muted);
619
+ font: inherit;
620
+ letter-spacing: .039px;
621
+ cursor: pointer;
622
+ background: none;
623
+ border: 0;
624
+ align-items: center;
625
+ padding: 0 0 2px;
626
+ font-size: 13px;
627
+ line-height: 22px;
628
+ transition: color .16s;
629
+ display: inline-flex;
630
+ }
631
+
632
+ .ov-file-preview__level:hover {
633
+ color: var(--ov-ui-file-preview-text);
634
+ }
635
+
636
+ .ov-file-preview__level[data-active] {
637
+ color: var(--ov-ui-file-preview-text);
638
+ font-weight: 500;
639
+ }
640
+
641
+ .ov-file-preview__level-indicator {
642
+ background: var(--ov-ui-file-preview-text);
643
+ border-radius: 1px;
644
+ height: 2px;
645
+ transition: transform .2s cubic-bezier(.2, 0, 0, 1), width .2s cubic-bezier(.2, 0, 0, 1);
646
+ position: absolute;
647
+ bottom: 0;
648
+ left: 0;
649
+ }
650
+
651
+ @media (prefers-reduced-motion: reduce) {
652
+ .ov-file-preview__level-indicator {
653
+ transition: none;
654
+ }
655
+ }
656
+
657
+ .ov-file-preview__spinner {
658
+ box-sizing: border-box;
659
+ border: 2px solid var(--ov-ui-file-preview-border);
660
+ border-top-color: var(--ov-ui-file-preview-text-muted);
661
+ border-radius: 50%;
662
+ flex: none;
663
+ width: 16px;
664
+ height: 16px;
665
+ animation: .9s linear infinite ov-file-preview-spin;
666
+ display: inline-block;
667
+ }
668
+
669
+ @keyframes ov-file-preview-spin {
670
+ to {
671
+ transform: rotate(360deg);
672
+ }
673
+ }
674
+
675
+ @media (prefers-reduced-motion: reduce) {
676
+ .ov-file-preview__spinner {
677
+ animation-duration: 2s;
678
+ }
679
+ }
680
+
596
681
  /*!
597
682
  * Copyright (c) 2026 Bytedance, Inc. and its affiliates.
598
683
  * SPDX-License-Identifier: MIT
@@ -4137,5 +4222,151 @@ button.ark-agentic-file-viewer-diff__gutter {
4137
4222
  }
4138
4223
  }
4139
4224
 
4225
+ .ov-file-preview {
4226
+ background: var(--ov-ui-file-preview-surface);
4227
+ color: var(--ov-ui-file-preview-text);
4228
+ }
4229
+
4230
+ .ov-file-preview__header {
4231
+ border-bottom: 0;
4232
+ padding: 8px;
4233
+ }
4234
+
4235
+ .ov-file-preview__footer {
4236
+ background: var(--ov-ui-color-bg-3, var(--ov-ui-bg-3-default));
4237
+ border: 0;
4238
+ justify-content: space-between;
4239
+ align-items: center;
4240
+ gap: 8px;
4241
+ padding: 4px 8px;
4242
+ display: flex;
4243
+ }
4244
+
4245
+ .ov-file-preview__levels--file {
4246
+ border-bottom: 1px solid
4247
+ var(--ov-ui-color-border-1, var(--ov-ui-border-1-default));
4248
+ flex: none;
4249
+ gap: 24px;
4250
+ min-width: 0;
4251
+ padding: 0 16px;
4252
+ display: flex;
4253
+ overflow-x: auto;
4254
+ }
4255
+
4256
+ .ov-file-preview__levels--file .ov-file-preview__level {
4257
+ color: var(--ov-ui-file-preview-text-muted);
4258
+ font: inherit;
4259
+ cursor: pointer;
4260
+ background: none;
4261
+ border: 0;
4262
+ flex: none;
4263
+ padding: 8px 0;
4264
+ position: relative;
4265
+ }
4266
+
4267
+ .ov-file-preview__levels--file .ov-file-preview__level[aria-pressed="true"] {
4268
+ color: var(--ov-ui-file-preview-accent);
4269
+ font-weight: 500;
4270
+ }
4271
+
4272
+ .ov-file-preview__levels--file .ov-file-preview__level[aria-pressed="true"]:after {
4273
+ content: "";
4274
+ background: currentColor;
4275
+ width: 14px;
4276
+ height: 2px;
4277
+ position: absolute;
4278
+ bottom: 0;
4279
+ left: calc(50% - 7px);
4280
+ }
4281
+
4282
+ .ov-file-preview__levels--file .ov-file-preview__level:disabled {
4283
+ opacity: .5;
4284
+ cursor: not-allowed;
4285
+ }
4286
+
4287
+ .ov-file-preview__levels--file .ov-file-preview__level:focus-visible {
4288
+ outline: 2px solid var(--ov-ui-file-preview-focus-ring);
4289
+ outline-offset: -2px;
4290
+ }
4291
+
4292
+ .ov-file-preview .ov-file-preview__viewer {
4293
+ background: var(--ov-ui-file-preview-surface);
4294
+ min-height: 0;
4295
+ color: inherit;
4296
+ border: 0;
4297
+ border-radius: 0;
4298
+ }
4299
+
4300
+ .ov-file-preview .ark-agentic-file-viewer-image {
4301
+ background: var(--ov-ui-file-preview-surface);
4302
+ min-height: 0;
4303
+ overflow: hidden;
4304
+ }
4305
+
4306
+ .ov-file-preview .ark-agentic-file-viewer-image__stage {
4307
+ padding: 24px;
4308
+ overflow: hidden;
4309
+ }
4310
+
4311
+ .ov-file-preview .ark-agentic-file-viewer-markdown {
4312
+ background: var(--ov-ui-file-preview-surface);
4313
+ color: inherit;
4314
+ }
4315
+
4316
+ .ov-file-preview .ark-agentic-file-viewer-markdown__content img {
4317
+ object-fit: contain;
4318
+ max-width: 100%;
4319
+ height: auto;
4320
+ }
4321
+
4322
+ @media (width <= 480px) {
4323
+ .ov-file-preview__header {
4324
+ flex-wrap: wrap;
4325
+ }
4326
+
4327
+ .ov-file-preview__path-row {
4328
+ flex-basis: 100%;
4329
+ }
4330
+
4331
+ .ov-file-preview__header-actions {
4332
+ flex-wrap: wrap;
4333
+ max-width: 100%;
4334
+ margin-left: auto;
4335
+ }
4336
+
4337
+ .ov-file-preview .ark-agentic-file-viewer-image__stage {
4338
+ padding: 12px;
4339
+ }
4340
+
4341
+ .ov-file-preview .ark-agentic-file-viewer-markdown {
4342
+ padding: 16px;
4343
+ }
4344
+
4345
+ .ov-file-preview__footer {
4346
+ flex-wrap: wrap;
4347
+ }
4348
+ }
4349
+
4350
+ .ov-file-preview__image-frame {
4351
+ flex: auto;
4352
+ min-width: 0;
4353
+ min-height: 0;
4354
+ display: flex;
4355
+ position: relative;
4356
+ overflow: hidden;
4357
+ }
4358
+
4359
+ .ov-file-preview__image-size {
4360
+ background: var(--ov-ui-file-preview-surface);
4361
+ color: var(--ov-ui-file-preview-text-muted);
4362
+ font-variant-numeric: tabular-nums;
4363
+ pointer-events: none;
4364
+ padding: 0 2px;
4365
+ font-size: 12px;
4366
+ position: absolute;
4367
+ bottom: 8px;
4368
+ right: 8px;
4369
+ }
4370
+
4140
4371
 
4141
4372
 
@@ -1,3 +1,4 @@
1
+ import type { Locale } from '../../shared/locale.js';
1
2
  import type { ConfirmSlotProps, DownloadSlotProps, FileViewerResource, ViewerHandle } from '@ark-design/ui/file-viewer/core';
2
3
  import type { ComponentType, ForwardRefExoticComponent, HTMLAttributes, PropsWithoutRef, ReactNode, RefAttributes } from 'react';
3
4
  /**
@@ -112,7 +113,7 @@ export interface FilePreviewTabBase {
112
113
  * 文件预览页签或宿主自定义内容页签。
113
114
  * A file-preview tab or a tab with host-provided content.
114
115
  */
115
- export type FilePreviewTab = FilePreviewFileTab | FilePreviewContentTab;
116
+ export type FilePreviewTab = FilePreviewFileTab | FilePreviewContentTab | FilePreviewDirectoryTab;
116
117
  /**
117
118
  * 按文件格式预览 `source` 的页签。
118
119
  * A tab that previews `source` according to its file format.
@@ -123,6 +124,18 @@ export interface FilePreviewFileTab extends FilePreviewTabBase {
123
124
  * Tab kind discriminator, always `file`.
124
125
  */
125
126
  kind: 'file';
127
+ /**
128
+ * 正文是否还在读取。为真时组件渲染加载态而不是正文,外壳(页签行、路径行)
129
+ * 照常显示——宿主切换文件时外壳因此不闪,只有正文区在等。
130
+ *
131
+ * `source` 在加载中可以为空;组件不会把它判成「空文件」。
132
+ *
133
+ * Whether the body is still being read. When true the component renders its
134
+ * loading state instead of the body while the shell — tab row, path row — stays
135
+ * put, so a host switching files does not flash the whole area. `source` may be
136
+ * empty while loading; it is not treated as an empty file.
137
+ */
138
+ loading?: boolean;
126
139
  /**
127
140
  * 要预览的内容及文件信息。
128
141
  * The content and file information to preview.
@@ -139,6 +152,15 @@ export interface FilePreviewFileTab extends FilePreviewTabBase {
139
152
  * textures of a 3D model.
140
153
  */
141
154
  resources?: readonly FileViewerResource[];
155
+ /** 可选的分级内容,宿主提供 L0/L1/L2 等视图与内容。 Optional host-supplied content levels. */
156
+ levels?: readonly FilePreviewLevel[];
157
+ /** 受控分级 key。 Controlled content-level key. */
158
+ activeLevelKey?: string;
159
+ /** Markdown 图片地址解析;宿主负责相对路径、鉴权与 URL 生命周期。
160
+ * Resolves Markdown images; the host owns relative paths, authentication and URL lifetime. */
161
+ resolveImage?: (src: string, source: FilePreviewSource) => Promise<string>;
162
+ /** 分级切换意图;受控时宿主更新 activeLevelKey。 Content-level selection intent. */
163
+ onLevelChange?: (key: string) => void;
142
164
  /**
143
165
  * 文件编辑配置;省略时只读。
144
166
  * File-editing options; omit them for a read-only preview.
@@ -171,6 +193,16 @@ export interface FilePreviewFileTab extends FilePreviewTabBase {
171
193
  */
172
194
  onOpenUri?: (uri: string) => void;
173
195
  }
196
+ /** 一个资源的内容层级,使用独立 source 与资源表。 One content level with its own source and resources. */
197
+ export interface FilePreviewLevel {
198
+ key: string;
199
+ label: ReactNode;
200
+ source: FilePreviewSource;
201
+ resources?: readonly FileViewerResource[];
202
+ disabled?: boolean;
203
+ /** 摘要默认只读;只有明确提供此能力时才可编辑。 Summaries are read-only unless explicitly editable. */
204
+ editing?: FilePreviewEditing;
205
+ }
174
206
  /**
175
207
  * 展示宿主自定义内容的页签,例如看板或图谱。
176
208
  *
@@ -203,6 +235,99 @@ export interface FilePreviewContentTab extends FilePreviewTabBase {
203
235
  */
204
236
  content: ReactNode;
205
237
  }
238
+ /**
239
+ * 目录页签:一个目录的若干级摘要,例如 L0 摘要与 L1 总览。
240
+ *
241
+ * 它和文件页签的区别在于**正文的层级**:文件页签只有正文;目录页签在标题行
242
+ * 之下、正文之上还有一层同级视图切换(下划线页签),每一级各自是一份
243
+ * Markdown。这一层属于目录这种实体,不属于所有文件页签,因此单独开一类,
244
+ * 而不是给文件页签加一个通用插槽——那样每个文件页签都会多一个它用不到的
245
+ * 空位。
246
+ *
247
+ * A tab for a directory's summary levels, for example its L0 abstract and L1
248
+ * overview.
249
+ *
250
+ * It differs from a file tab in the layering of the body: a file tab has a body
251
+ * and nothing else, while a directory tab has one more level between the header
252
+ * and the body — an underlined switch between sibling views, each holding its own
253
+ * Markdown. That level belongs to the directory entity rather than to every file
254
+ * tab, so it gets its own kind instead of a generic slot on file tabs, which would
255
+ * leave every file tab with an empty space it never uses.
256
+ */
257
+ export interface FilePreviewDirectoryTab extends FilePreviewTabBase {
258
+ /**
259
+ * 页签类型标记,固定为 `directory`。
260
+ * Tab kind discriminator, always `directory`.
261
+ */
262
+ kind: 'directory';
263
+ /**
264
+ * 摘要是否还在读取。与文件页签同义:为真时正文区显示加载态,外壳照常。
265
+ * Whether the summary is still being read. Same as a file tab: the body shows
266
+ * the loading state while the shell stays put.
267
+ */
268
+ loading?: boolean;
269
+ /**
270
+ * 可切换的摘要层级,至少一级。每级用 `source` 交给组件按格式渲染,与文件
271
+ * 页签的正文同一条渲染路径。
272
+ * The summary levels to switch between, at least one. Each level's `source` goes
273
+ * through the same rendering path as a file tab's body.
274
+ */
275
+ levels: readonly [FilePreviewDirectoryLevel, ...FilePreviewDirectoryLevel[]];
276
+ /**
277
+ * 受控的当前层级 key。传入时由宿主决定层级,组件只上报切换意图。
278
+ * The controlled active level key. When given, the host owns the level and the
279
+ * component only reports switch intent.
280
+ */
281
+ activeLevelKey?: string;
282
+ /**
283
+ * 非受控时的初始层级 key,省略时选中第一级。
284
+ * Initial level key when uncontrolled; the first level is selected when omitted.
285
+ */
286
+ defaultLevelKey?: string;
287
+ /** 目录摘要的伴随图片资源。 Companion images shared by directory summary levels. */
288
+ resources?: readonly FileViewerResource[];
289
+ /** 宿主解析当前摘要的 Markdown 图片。 Host resolution of Markdown images in the active summary. */
290
+ resolveImage?: FilePreviewFileTab['resolveImage'];
291
+ /**
292
+ * 当前层级变化后触发,参数为新的层级 key。
293
+ * Called after the active level changes, with the new level key.
294
+ */
295
+ onActiveLevelChange?: (key: string) => void;
296
+ /**
297
+ * 目录操作的执行能力,例如沿路径向上打开。省略对应方法时该操作不可用。
298
+ * Directory operation capabilities, for example opening an ancestor. Omitting a
299
+ * method makes its operation unavailable.
300
+ */
301
+ operations?: FilePreviewOperations;
302
+ /**
303
+ * 目录页签的插槽。标题行动作与状态兜底与文件页签一致。
304
+ * Slots of a directory tab. Header actions and state fallbacks match a file tab.
305
+ */
306
+ slots?: FilePreviewFileTabSlots;
307
+ }
308
+ /**
309
+ * 目录的一级摘要。One summary level of a directory.
310
+ */
311
+ export interface FilePreviewDirectoryLevel {
312
+ /**
313
+ * 层级唯一标识,用于切换与受控状态。
314
+ * Unique level key, used for switching and controlled state.
315
+ */
316
+ key: string;
317
+ /**
318
+ * 页签行显示的名称,例如「L0 摘要」。
319
+ * What the level switch shows, for example "L0 Summary".
320
+ */
321
+ label: ReactNode;
322
+ /**
323
+ * 该级的正文来源,与文件页签的 `source` 同形,交给组件按格式渲染。
324
+ * The body source of this level, the same shape as a file tab's `source`, handed
325
+ * to the component for format rendering.
326
+ */
327
+ source: FilePreviewSource;
328
+ /** 该级独立的伴随资源。 Companion resources specific to this level. */
329
+ resources?: readonly FileViewerResource[];
330
+ }
206
331
  /**
207
332
  * 文件操作的执行能力。方法返回的 Promise 完成后才触发对应的成功通知。
208
333
  * File operation capabilities. The matching success notification fires only
@@ -396,10 +521,12 @@ export interface FilePreviewFileTabSlots extends FilePreviewHeaderSlots {
396
521
  downloadFallback?: ComponentType<DownloadSlotProps>;
397
522
  }
398
523
  /**
399
- * 可替换文案,组件内置英文默认值。
400
- * Replaceable copy; the component ships English defaults.
524
+ * 可替换文案,组件内置中英文文案。
525
+ * Replaceable copy with built-in Chinese and English defaults.
401
526
  */
402
527
  export interface FilePreviewLabels {
528
+ /** 展开折叠路径层级的无障碍名称。Accessible name for hidden path levels. */
529
+ showHiddenPath?: string;
403
530
  /**
404
531
  * 复制路径按钮的文案。这是组件自己渲染的唯一按钮——其余动作按钮由宿主在
405
532
  * `slots.actions` 里自绘,文案也归宿主。
@@ -470,6 +597,8 @@ export interface FilePreviewProps extends Omit<HTMLAttributes<HTMLDivElement>, '
470
597
  * component for format rendering or renders fully custom `content`.
471
598
  */
472
599
  tabs: readonly [FilePreviewTab, ...FilePreviewTab[]];
600
+ /** 内置中英文文案的语言。Language of the built-in interface copy. */
601
+ locale: Locale;
473
602
  /**
474
603
  * 受控的当前页签 key。传入时由宿主决定当前页签,组件只上报切换意图。
475
604
  * The controlled active tab key. When given, the host owns the active tab and
@@ -481,20 +610,14 @@ export interface FilePreviewProps extends Omit<HTMLAttributes<HTMLDivElement>, '
481
610
  * Initial tab key when uncontrolled; the first tab is selected when omitted.
482
611
  */
483
612
  defaultActiveKey?: string;
484
- /**
485
- * 底座内置文案的语言。组件自身文案仍由 `labels` 控制。
486
- * Language of the base component's built-in copy. The component's own copy is
487
- * still controlled by `labels`.
488
- */
489
- locale?: 'en-US' | 'zh-CN';
490
613
  /**
491
614
  * 当前页签变化后触发,参数为新的页签 key。
492
615
  * Called after the active tab changes, with the new tab key.
493
616
  */
494
617
  onActiveKeyChange?: (key: string) => void;
495
618
  /**
496
- * 所有页签的默认文案,缺省为英文。页签可以逐项覆盖。
497
- * Default copy for every tab, English by default. A tab can override it field
619
+ * 所有页签的默认文案,跟随 locale。页签可以逐项覆盖。
620
+ * Default copy for every tab, following locale. A tab can override it field
498
621
  * by field.
499
622
  */
500
623
  labels?: FilePreviewLabels;
@@ -0,0 +1,30 @@
1
+ import type { FilePreviewDirectoryTab, FilePreviewSource } from './types.js';
2
+ /**
3
+ * 目录页签当前看的是哪一级摘要。
4
+ *
5
+ * 它必须由预览外壳持有,而不是留在正文组件内部:复制正文取的是「用户正在看的
6
+ * 那一份」,标题行的路径也来自同一级,两处都在外壳这一层取值;留在正文里,复制
7
+ * 到的永远是第一级。
8
+ *
9
+ * 宿主给了 `activeLevelKey` 时以宿主的为准,这里只记非受控页签自己的选择。
10
+ *
11
+ * Which summary level of a directory tab is on screen.
12
+ *
13
+ * It belongs to the preview shell rather than inside the body component: copy-content
14
+ * takes "what the user is looking at" and the header path comes from the same level,
15
+ * both read at this layer — kept in the body, a copy would always take the first
16
+ * level.
17
+ *
18
+ * A host-supplied `activeLevelKey` wins; this only records the choice of an
19
+ * uncontrolled tab.
20
+ */
21
+ export interface DirectoryLevelState {
22
+ /** 实际渲染的那一级。The level actually rendered. */
23
+ activeLevel?: FilePreviewDirectoryTab['levels'][number];
24
+ /** 把当前层级固定下来的目录页签,交给正文组件。 */
25
+ /** The directory tab with the level pinned, handed to the body. */
26
+ directoryTab?: FilePreviewDirectoryTab;
27
+ /** 复制路径与复制正文共用的来源。The source shared by copy-path and copy-content. */
28
+ source?: FilePreviewSource;
29
+ }
30
+ export declare function useDirectoryLevel(tab: FilePreviewDirectoryTab | undefined): DirectoryLevelState;
@@ -1,6 +1,6 @@
1
1
  import type { useFilePreviewActions } from './use-file-preview-actions.js';
2
2
  import type { useFilePreviewEditing } from './use-file-preview-editing.js';
3
- import type { FilePreviewActions, FilePreviewFileTab, FilePreviewTab, FilePreviewViewMode } from './types.js';
3
+ import type { FilePreviewActions, FilePreviewFileTab, FilePreviewSource, FilePreviewTab, FilePreviewViewMode } from './types.js';
4
4
  type Operations = ReturnType<typeof useFilePreviewActions>;
5
5
  type Editing = ReturnType<typeof useFilePreviewEditing>;
6
6
  /**
@@ -11,9 +11,13 @@ type Editing = ReturnType<typeof useFilePreviewEditing>;
11
11
  * and operation state together with the methods that change them, so a
12
12
  * `slots.actions` renderer can build its own buttons.
13
13
  */
14
- export declare function useFilePreviewActionsContext({ activeTab, fileTab, viewMode, canSwitchView, setViewMode, editing, operations, }: {
14
+ export declare function useFilePreviewActionsContext({ activeTab, fileTab, currentPath, currentSource, viewMode, canSwitchView, setViewMode, editing, operations, }: {
15
15
  activeTab: FilePreviewTab;
16
16
  fileTab?: FilePreviewFileTab;
17
+ /** 当前页签的路径;目录页签也有。The current tab's path; a directory has one too. */
18
+ currentPath?: string;
19
+ /** 当前页签的正文来源;目录页签取当前那一级。The body source; a directory uses its active level. */
20
+ currentSource?: FilePreviewSource;
17
21
  viewMode: FilePreviewViewMode;
18
22
  canSwitchView: boolean;
19
23
  setViewMode: (mode: FilePreviewViewMode) => void;
@@ -15,5 +15,5 @@ export declare function useFilePreviewActions(): {
15
15
  download: (tab: FilePreviewFileTab) => Promise<void>;
16
16
  openUri: (tab: FilePreviewFileTab, uri: string) => Promise<void>;
17
17
  copyPath: (tab: FilePreviewTab, path: string) => Promise<boolean>;
18
- copyContent: (tab: FilePreviewFileTab, text: string) => Promise<boolean>;
18
+ copyContent: (tab: FilePreviewTab, text: string) => Promise<boolean>;
19
19
  };
@@ -0,0 +1,7 @@
1
+ import type { FilePreviewTab } from './types.js';
2
+ /** Level data stays with the host; only the uncontrolled selection lives here. */
3
+ export declare function useFilePreviewLevels(selected: FilePreviewTab): {
4
+ tab: FilePreviewTab;
5
+ levelKey: string | undefined;
6
+ selectLevel: (key: string) => void;
7
+ };
@@ -0,0 +1,15 @@
1
+ import type { ViewerHandle, ViewerViewModeOption } from '@ark-design/ui/file-viewer/core';
2
+ import type { FilePreviewViewMode } from './types.js';
3
+ /** Scope modes and handles to the actual file/level, including controlled navigation. */
4
+ export declare function useFilePreviewViewState(identity: string): {
5
+ viewMode: FilePreviewViewMode;
6
+ setViewMode: import("react").Dispatch<import("react").SetStateAction<FilePreviewViewMode>>;
7
+ viewModes: readonly string[];
8
+ setViewModes: import("react").Dispatch<import("react").SetStateAction<readonly string[]>>;
9
+ viewerHandle: {
10
+ identity: string;
11
+ current: ViewerHandle | null;
12
+ };
13
+ onHandleChange: (handle: ViewerHandle | null) => void;
14
+ onViewModesChange: (modes: readonly ViewerViewModeOption[]) => void;
15
+ };
@@ -1 +1 @@
1
- export { FilePreview } from "../g~0.js";
1
+ export { FilePreview, LoadingState } from "../3~0.js";
@@ -1,20 +1,5 @@
1
1
  import type { FileTreeInfoKey, FileTreeInfoLabels } from './types.js';
2
- /**
3
- * 内置英文文案。`FileTreeLabels.info` 未提供的键沿用这里的值。
4
- *
5
- * Built-in English copy. Keys missing from `FileTreeLabels.info` fall back here.
6
- */
7
2
  export declare const DEFAULT_INFO_LABELS: FileTreeInfoLabels;
8
- /**
9
- * 按宿主的覆盖合并内置文案,键为单位。宿主的空字符串表示该键不显示,因此
10
- * 合并时保留空串,由渲染方判断。
11
- *
12
- * Merges host overrides over the built-in copy, key by key. An empty host string
13
- * means "hide this key", so it is kept and the renderer decides.
14
- *
15
- * Returns the copy of one key, or `undefined` when the key is hidden or has no
16
- * copy.
17
- */
18
3
  export declare function resolveInfoCopy(key: FileTreeInfoKey, hostLabels: FileTreeInfoLabels | undefined): {
19
4
  description?: string;
20
5
  triggerBehavior?: string;
@@ -1,14 +1,14 @@
1
1
  import type { FileTreeEntryRow, FileTreeInfoLabels } from './types.js';
2
2
  export interface FileTreeInfoCopy {
3
- /** 行名称,作为浮层标题。Row name, used as the tooltip title. */
3
+ /** 行名称,作为浮层标题。Row name, used as the popover title. */
4
4
  title: string;
5
5
  /** 说明,已按行内同样的优先级解析。Description, resolved with the same precedence as inline. */
6
6
  description?: string;
7
- /** 触发行为,只出现在浮层。Trigger copy, tooltip only. */
7
+ /** 触发行为,只出现在浮层。Trigger copy, popover only. */
8
8
  triggerBehavior?: string;
9
9
  /** 完整路径。Full path. */
10
10
  path: string;
11
- /** 浮层里各行的字段名。Field names used inside the tooltip. */
11
+ /** 浮层里各行的字段名。Field names used inside the popover. */
12
12
  fields: {
13
13
  description: string;
14
14
  triggerBehavior: string;
@@ -22,21 +22,21 @@ export interface FileTreeInfoCopy {
22
22
  * (含显式空串),没给才用内置。调用方据此决定是否创建浮层外壳,避免留下一个
23
23
  * 只有背景和内边距的空壳。
24
24
  *
25
- * Resolves what a directory tooltip should show, or `null` when there is nothing.
25
+ * Resolves what a directory popover should show, or `null` when there is nothing.
26
26
  *
27
27
  * The description resolves as `row.description` then built-in copy, matching the
28
28
  * inline behaviour: a host value wins, including an explicit empty string, and
29
29
  * the built-in copy applies only when absent. The caller uses this to decide
30
- * whether to create the tooltip shell, so no empty shell is left behind.
30
+ * whether to create the surface, so no empty shell is left behind.
31
31
  */
32
32
  export declare function resolveFileTreeInfoCopy(row: FileTreeEntryRow, infoLabels?: FileTreeInfoLabels): FileTreeInfoCopy | null;
33
33
  /**
34
34
  * 目录的默认浮层内容:说明、触发行为与路径。九类长期记忆的说明只出现在这里,
35
35
  * 因此这个浮层是它们唯一的展示位置。
36
36
  *
37
- * The default tooltip content for a directory: description, trigger copy and
37
+ * The default popover content for a directory: description, trigger copy and
38
38
  * path. The nine long-term-memory keys describe themselves here only, so this
39
- * tooltip is the sole place their copy appears.
39
+ * surface is the sole place their copy appears.
40
40
  */
41
41
  export declare function FileTreeInfoTooltip({ copy }: {
42
42
  copy: FileTreeInfoCopy;
@@ -0,0 +1,4 @@
1
+ import type { FileTreeLabels } from './types.js';
2
+ import type { ResolvedLabels } from './file-tree-row-context.js';
3
+ import { type Locale } from '../../shared/locale.js';
4
+ export declare function resolveFileTreeLabels(locale?: Locale, labels?: FileTreeLabels): ResolvedLabels;
@@ -16,7 +16,6 @@ export interface FileTreeRowContext {
16
16
  /** 当前选中的行 id。Currently selected row id. */
17
17
  selectedId?: string | null;
18
18
  /** 当前展示浮层的行 id。Row whose tooltip is showing. */
19
- tooltipRowId: string | null;
20
19
  /** 为行追加属性。Extra attributes for a row. */
21
20
  getRowAttributes?: (row: FileTreeRow) => HTMLAttributes<HTMLDivElement>;
22
21
  /** 行尾指示器。Row-end indicator. */
@@ -39,8 +38,4 @@ export interface FileTreeRowContext {
39
38
  onOpenRetentionSettings?: (uri: string) => void;
40
39
  /** 行的键盘处理。Key handling for a row. */
41
40
  onRowKeyDown: (event: KeyboardEvent<HTMLDivElement>, row: FileTreeEntryRow) => void;
42
- /** 指针进入行。Pointer enters a row. */
43
- onRowEnter: (rowId: string) => void;
44
- /** 指针离开行。Pointer leaves a row. */
45
- onRowLeave: () => void;
46
41
  }