@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
@@ -0,0 +1,58 @@
1
+ /** 等待中的记录按命令选择的骨架。Skeleton chosen for a pending record. */
2
+ export type TuiSkeletonKind = 'search' | 'resource' | 'tree' | 'status' | 'write' | 'generic';
3
+ export interface TuiCommandGroup {
4
+ key: string;
5
+ label: string;
6
+ }
7
+ export interface TuiCommandParam {
8
+ label: string;
9
+ description: string;
10
+ required?: boolean;
11
+ defaultValue?: string;
12
+ }
13
+ export interface TuiCommandOption {
14
+ token: string;
15
+ description: string;
16
+ required?: boolean;
17
+ defaultValue?: string;
18
+ }
19
+ /**
20
+ * 一条 CLI 命令的元数据。名称、参数、说明与示例由宿主提供,
21
+ * 组件用它生成补全、参数提示和等待骨架。
22
+ *
23
+ * Metadata of one CLI command. Names, arguments, copy and examples come from
24
+ * the host; the component derives completion, parameter hints and
25
+ * pending skeletons from them.
26
+ */
27
+ export interface TuiCommandExample {
28
+ value: string;
29
+ label?: string;
30
+ }
31
+ export interface TuiCommandDefinition {
32
+ name: string;
33
+ /** 接受补全时填入的真实前缀,默认 name;例如由宿主提供 ov read。 */
34
+ inputText?: string;
35
+ aliases?: readonly string[];
36
+ group?: string;
37
+ description: string;
38
+ usage: string;
39
+ summary?: string;
40
+ params?: readonly TuiCommandParam[];
41
+ options?: readonly TuiCommandOption[];
42
+ examples?: readonly (string | TuiCommandExample)[];
43
+ skeleton?: TuiSkeletonKind;
44
+ }
45
+ export interface TuiParsedCommandInput {
46
+ /** 命令名,不含开头的斜杠。Command name without the leading slash. */
47
+ name: string;
48
+ /** 命令名之后的内容。Everything after the command name. */
49
+ rest: string;
50
+ /** 命令名后是否已输入空白。Whether whitespace follows the command name. */
51
+ hasTrailingSpace: boolean;
52
+ }
53
+ /** 解析 `/name args`;不以斜杠开头时返回 `null`。Parses `/name args`. */
54
+ export declare function parseTuiCommandInput(value: string): TuiParsedCommandInput | null;
55
+ /** 取出命令名,忽略参数与斜杠。Resolves the command name of any input. */
56
+ export declare function resolveTuiCommandName(value: string): string;
57
+ /** 骨架由宿主的命令描述提供;未知命令使用通用形态。 */
58
+ export declare function resolveTuiSkeleton(command: TuiCommandDefinition | undefined): TuiSkeletonKind;
@@ -0,0 +1,19 @@
1
+ import type { TuiCommandDefinition } from './command-catalog.js';
2
+ export interface TuiCommandQuery {
3
+ keyword: string;
4
+ scope: string | null;
5
+ matches: readonly TuiCommandDefinition[];
6
+ automatic: boolean;
7
+ canOpenPalette: boolean;
8
+ prefixTarget?: string;
9
+ colorInput: boolean;
10
+ }
11
+ export interface TuiInlineCompletion {
12
+ kind: 'prefix' | 'command';
13
+ suffix: string;
14
+ value: string;
15
+ }
16
+ /** 只根据宿主的完整输入前缀推导命名空间和候选;参数阶段不继续补命令。 */
17
+ export declare function getTuiCommandQuery(value: string, commands: readonly TuiCommandDefinition[]): TuiCommandQuery;
18
+ /** 提示永远不写入 value;只有显式接受时才使用返回的完整值。 */
19
+ export declare function getTuiInlineCompletion(value: string, query: TuiCommandQuery, selected: TuiCommandDefinition | undefined, paletteOpen?: boolean): TuiInlineCompletion | undefined;
@@ -0,0 +1,10 @@
1
+ import type { TuiCommandDefinition, TuiCommandGroup } from './command-catalog.js';
2
+ export interface TuiCommandSection {
3
+ group: TuiCommandGroup;
4
+ commands: readonly TuiCommandDefinition[];
5
+ }
6
+ /** 只匹配宿主目录,不包含内置业务命令或请求。 */
7
+ export declare function findTuiCommand(text: string, commands: readonly TuiCommandDefinition[]): TuiCommandDefinition | undefined;
8
+ export declare function filterTuiCommands(keyword: string, commands: readonly TuiCommandDefinition[]): readonly TuiCommandDefinition[];
9
+ /** 保留宿主分组顺序,未声明的分组按首次出现顺序追加。 */
10
+ export declare function groupTuiCommands(commands: readonly TuiCommandDefinition[], groups?: readonly TuiCommandGroup[]): readonly TuiCommandSection[];
@@ -0,0 +1,16 @@
1
+ import type { TuiCommandDefinition } from './command-catalog.js';
2
+ export interface TuiCommandInputMatch {
3
+ command: TuiCommandDefinition;
4
+ leadingWhitespace: string;
5
+ prefix: string;
6
+ rest: string;
7
+ }
8
+ /** 填入的真实命令前缀由宿主提供,不在组件中绑定某个 CLI。 */
9
+ export declare function getTuiCommandInputText(command: TuiCommandDefinition): string;
10
+ export declare function matchTuiCommandInput(value: string, commands: readonly TuiCommandDefinition[]): TuiCommandInputMatch | undefined;
11
+ /** 仅用于接受候选、示例或历史;不改写用户正在编辑/组合的文本。 */
12
+ export declare function formatTuiCommandInput(value: string, commands: readonly TuiCommandDefinition[]): string;
13
+ export declare function getTuiArgumentHints(command: TuiCommandDefinition): {
14
+ label: string;
15
+ description: string;
16
+ }[];