@openviking/react 0.1.0 → 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 (193) hide show
  1. package/README.md +57 -34
  2. package/dist/3~0.js +2117 -0
  3. package/dist/ark-message-list-view~0.js +310 -0
  4. package/dist/a~0.js +21 -0
  5. package/dist/c7~0.js +24 -0
  6. package/dist/client/client.d.ts +12 -0
  7. package/dist/client/errors.d.ts +30 -0
  8. package/dist/client/index.d.ts +4 -0
  9. package/dist/client/options.d.ts +101 -0
  10. package/dist/client/provider.d.ts +52 -0
  11. package/dist/client/types.d.ts +160 -0
  12. package/dist/client.js +239 -0
  13. package/dist/components/agent-connect/agent-connect-copy.d.ts +34 -0
  14. package/dist/components/agent-connect/agent-connect-design.d.ts +1781 -0
  15. package/dist/components/agent-connect/agent-connect-detail.d.ts +13 -0
  16. package/dist/components/agent-connect/agent-connect-installer.d.ts +3 -0
  17. package/dist/components/agent-connect/agent-connect-instructions-view.d.ts +14 -0
  18. package/dist/components/agent-connect/agent-connect-instructions.d.ts +145 -0
  19. package/dist/components/agent-connect/agent-connect-markdown.d.ts +3 -0
  20. package/dist/components/agent-connect/agent-connect.d.ts +4 -1
  21. package/dist/components/agent-connect/content-en.d.ts +137 -0
  22. package/dist/components/agent-connect/content-zh.d.ts +137 -0
  23. package/dist/components/agent-connect/index.d.ts +1 -0
  24. package/dist/components/agent-connect/style.css +503 -0
  25. package/dist/components/agent-connect/types.d.ts +29 -0
  26. package/dist/components/agent-connect.js +1 -0
  27. package/dist/components/file-preview/file-preview-adapters.d.ts +33 -0
  28. package/dist/components/file-preview/file-preview-body.d.ts +27 -0
  29. package/dist/components/file-preview/file-preview-breadcrumb-menu.d.ts +16 -0
  30. package/dist/components/file-preview/file-preview-breadcrumb.d.ts +21 -0
  31. package/dist/components/file-preview/file-preview-copy-path.d.ts +12 -0
  32. package/dist/components/file-preview/file-preview-editor.d.ts +22 -0
  33. package/dist/components/file-preview/file-preview-handle-adapters.d.ts +26 -0
  34. package/dist/components/file-preview/file-preview-header.d.ts +25 -0
  35. package/dist/components/file-preview/file-preview-labels.d.ts +16 -0
  36. package/dist/components/file-preview/file-preview-lazy-viewer.d.ts +3 -0
  37. package/dist/components/file-preview/file-preview-path.d.ts +30 -0
  38. package/dist/components/file-preview/file-preview-source.d.ts +24 -0
  39. package/dist/components/file-preview/file-preview-state.d.ts +28 -0
  40. package/dist/components/file-preview/file-preview-tab-row.d.ts +16 -0
  41. package/dist/components/file-preview/file-preview-viewer.d.ts +31 -0
  42. package/dist/components/file-preview/file-preview.d.ts +14 -1
  43. package/dist/components/file-preview/index.d.ts +1 -0
  44. package/dist/components/file-preview/style.css +4139 -0
  45. package/dist/components/file-preview/types.d.ts +516 -0
  46. package/dist/components/file-preview/use-file-preview-actions-context.d.ts +23 -0
  47. package/dist/components/file-preview/use-file-preview-actions.d.ts +19 -0
  48. package/dist/components/file-preview/use-file-preview-editing.d.ts +32 -0
  49. package/dist/components/file-preview/use-file-preview-ids.d.ts +24 -0
  50. package/dist/components/file-preview.js +1 -0
  51. package/dist/components/file-tree/file-tree-body.d.ts +18 -0
  52. package/dist/components/file-tree/file-tree-entry-row.d.ts +12 -0
  53. package/dist/components/file-tree/file-tree-icons.d.ts +15 -0
  54. package/dist/components/file-tree/file-tree-info-labels.d.ts +21 -0
  55. package/dist/components/file-tree/file-tree-info-tooltip.d.ts +43 -0
  56. package/dist/components/file-tree/file-tree-info.d.ts +29 -0
  57. package/dist/components/file-tree/file-tree-keyboard.d.ts +14 -0
  58. package/dist/components/file-tree/file-tree-row-context.d.ts +46 -0
  59. package/dist/components/file-tree/file-tree-row-shared.d.ts +11 -0
  60. package/dist/components/file-tree/file-tree-spinner.d.ts +10 -0
  61. package/dist/components/file-tree/file-tree-state-row.d.ts +7 -0
  62. package/dist/components/file-tree/file-tree-tooltip-surface.d.ts +22 -0
  63. package/dist/components/file-tree/file-tree-tooltip.d.ts +17 -0
  64. package/dist/components/file-tree/file-tree.d.ts +15 -1
  65. package/dist/components/file-tree/index.d.ts +1 -0
  66. package/dist/components/file-tree/style.css +410 -0
  67. package/dist/components/file-tree/types.d.ts +589 -0
  68. package/dist/components/file-tree/use-file-tree-actions.d.ts +17 -0
  69. package/dist/components/file-tree.js +1 -0
  70. package/dist/components/scope-switcher/index.d.ts +1 -0
  71. package/dist/components/scope-switcher/scope-keyboard.d.ts +2 -0
  72. package/dist/components/scope-switcher/scope-panel.d.ts +11 -0
  73. package/dist/components/scope-switcher/scope-selector.d.ts +2 -0
  74. package/dist/components/scope-switcher/scope-switcher.d.ts +6 -1
  75. package/dist/components/scope-switcher/style.css +452 -0
  76. package/dist/components/scope-switcher/types.d.ts +489 -0
  77. package/dist/components/scope-switcher.js +3 -0
  78. package/dist/components/style.css +14249 -18
  79. package/dist/components/tui/command-catalog.d.ts +58 -0
  80. package/dist/components/tui/command-completion.d.ts +19 -0
  81. package/dist/components/tui/command-definitions.d.ts +10 -0
  82. package/dist/components/tui/command-input.d.ts +16 -0
  83. package/dist/components/tui/index.d.ts +1 -0
  84. package/dist/components/tui/style.css +1552 -0
  85. package/dist/components/tui/tui-assist.d.ts +15 -0
  86. package/dist/components/tui/tui-code-block.d.ts +8 -0
  87. package/dist/components/tui/tui-command-help.d.ts +9 -0
  88. package/dist/components/tui/tui-command-text.d.ts +6 -0
  89. package/dist/components/tui/tui-composer.d.ts +24 -0
  90. package/dist/components/tui/tui-copy-button.d.ts +9 -0
  91. package/dist/components/tui/tui-input-mirror.d.ts +14 -0
  92. package/dist/components/tui/tui-labels-zh.d.ts +2 -0
  93. package/dist/components/tui/tui-labels.d.ts +5 -0
  94. package/dist/components/tui/tui-markdown-renderers.d.ts +10 -0
  95. package/dist/components/tui/tui-markdown.d.ts +6 -0
  96. package/dist/components/tui/tui-param-hint.d.ts +7 -0
  97. package/dist/components/tui/tui-record-time.d.ts +11 -0
  98. package/dist/components/tui/tui-record.d.ts +13 -0
  99. package/dist/components/tui/tui-resource-preview.d.ts +10 -0
  100. package/dist/components/tui/tui-resource-tree.d.ts +10 -0
  101. package/dist/components/tui/tui-result-header.d.ts +7 -0
  102. package/dist/components/tui/tui-result-text.d.ts +5 -0
  103. package/dist/components/tui/tui-search-list.d.ts +8 -0
  104. package/dist/components/tui/tui-skeleton.d.ts +6 -0
  105. package/dist/components/tui/tui-status-card.d.ts +7 -0
  106. package/dist/components/tui/tui-text.d.ts +10 -0
  107. package/dist/components/tui/tui-uri-text.d.ts +19 -0
  108. package/dist/components/tui/tui-write-result.d.ts +7 -0
  109. package/dist/components/tui/tui.d.ts +11 -1
  110. package/dist/components/tui/types.d.ts +527 -0
  111. package/dist/components/tui/use-tui-assist-position.d.ts +3 -0
  112. package/dist/components/tui/use-tui-completion.d.ts +14 -0
  113. package/dist/components/tui/use-tui-composer-keyboard.d.ts +25 -0
  114. package/dist/components/tui.js +1 -0
  115. package/dist/components/viking-bot/ark-adapter.d.ts +45 -0
  116. package/dist/components/viking-bot/ark-message-body.d.ts +16 -0
  117. package/dist/components/viking-bot/ark-message-list-view.d.ts +7 -0
  118. package/dist/components/viking-bot/ark-message-row.d.ts +19 -0
  119. package/dist/components/viking-bot/index.d.ts +10 -0
  120. package/dist/components/viking-bot/interaction/ask-human-fields.d.ts +10 -0
  121. package/dist/components/viking-bot/interaction/index.d.ts +4 -0
  122. package/dist/components/viking-bot/interaction/labels.d.ts +7 -0
  123. package/dist/components/viking-bot/interaction/lazy-interaction.d.ts +3 -0
  124. package/dist/components/viking-bot/interaction/schedule-input.d.ts +13 -0
  125. package/dist/components/viking-bot/interaction/style.css +189 -0
  126. package/dist/components/viking-bot/interaction/types.d.ts +188 -0
  127. package/dist/components/viking-bot/interaction/viking-bot-interaction.d.ts +9 -0
  128. package/dist/components/viking-bot/interaction.js +2 -0
  129. package/dist/components/viking-bot/labels.d.ts +2 -0
  130. package/dist/components/viking-bot/lazy-composer.d.ts +3 -0
  131. package/dist/components/viking-bot/message-groups.d.ts +12 -0
  132. package/dist/components/viking-bot/model.d.ts +252 -0
  133. package/dist/components/viking-bot/render-part.d.ts +12 -0
  134. package/dist/components/viking-bot/style.css +7133 -0
  135. package/dist/components/viking-bot/types.d.ts +140 -0
  136. package/dist/components/viking-bot/viking-bot-composer.d.ts +6 -0
  137. package/dist/components/viking-bot/viking-bot-message-list.d.ts +3 -0
  138. package/dist/components/viking-bot/viking-bot.d.ts +16 -1
  139. package/dist/components/viking-bot.js +4 -0
  140. package/dist/c~0.js +201 -0
  141. package/dist/file-preview-viewer~0.js +191 -0
  142. package/dist/f~0.js +356 -0
  143. package/dist/g~0.js +1207 -0
  144. package/dist/h~0.js +58 -0
  145. package/dist/icons/file-type-icon.d.ts +31 -0
  146. package/dist/icons/index.d.ts +33 -23
  147. package/dist/icons/nextjs-icon.d.ts +19 -0
  148. package/dist/icons.js +1 -25
  149. package/dist/index.d.ts +16 -2
  150. package/dist/index.js +8 -1
  151. package/dist/k~0.js +1440 -0
  152. package/dist/lk~0.js +233 -0
  153. package/dist/l~0.js +44 -0
  154. package/dist/modules/console/console.d.ts +4 -0
  155. package/dist/modules/console/index.d.ts +1 -0
  156. package/dist/modules/console/style.css +111 -0
  157. package/dist/modules/console/types.d.ts +101 -0
  158. package/dist/modules/console.js +1 -0
  159. package/dist/modules/file-browser/file-browser-toolbar-button.d.ts +10 -0
  160. package/dist/modules/file-browser/file-browser.d.ts +6 -0
  161. package/dist/modules/file-browser/index.d.ts +1 -0
  162. package/dist/modules/file-browser/style.css +158 -0
  163. package/dist/modules/file-browser/types.d.ts +101 -0
  164. package/dist/modules/file-browser.js +1 -0
  165. package/dist/modules/scope-cascade/controller.d.ts +6 -0
  166. package/dist/modules/scope-cascade/index.d.ts +3 -0
  167. package/dist/modules/scope-cascade/scope-cascade.d.ts +3 -0
  168. package/dist/modules/scope-cascade/style.css +456 -0
  169. package/dist/modules/scope-cascade/style.js +0 -0
  170. package/dist/modules/scope-cascade/types.d.ts +39 -0
  171. package/dist/modules/scope-cascade/use-scope-cascade.d.ts +5 -0
  172. package/dist/modules/scope-cascade.js +1 -0
  173. package/dist/modules/style.css +808 -0
  174. package/dist/modules/style.js +0 -0
  175. package/dist/n~0.js +727 -0
  176. package/dist/shared/components/tooltip/index.d.ts +1 -0
  177. package/dist/shared/components/tooltip/tooltip.d.ts +25 -0
  178. package/dist/shared/components/tooltip/types.d.ts +42 -0
  179. package/dist/shared/components/tooltip/use-tooltip-position.d.ts +38 -0
  180. package/dist/style.css +15138 -18
  181. package/dist/u~0.js +1601 -0
  182. package/dist/viking-bot-composer~0.js +164 -0
  183. package/dist/viking-bot-interaction~0.js +284 -0
  184. package/dist/w~0.js +19 -0
  185. package/package.json +46 -22
  186. package/dist/components/resource-import/resource-import.d.ts +0 -1
  187. package/dist/components/resource-import/style.css +0 -2
  188. package/dist/components/status-badge/status-badge.d.ts +0 -8
  189. package/dist/components/status-badge/style.css +0 -37
  190. package/dist/components/status-badge.js +0 -30
  191. /package/dist/components/{resource-import → viking-bot/interaction}/style.js +0 -0
  192. /package/dist/{components/status-badge → modules/console}/style.js +0 -0
  193. /package/dist/{components/resource-import.js → modules/file-browser/style.js} +0 -0
@@ -1,2 +1,505 @@
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
+
82
+ .ov-agent-connect {
83
+ --ov-ui-agent-connect-text: var(--ov-ui-color-text-1, var(--ov-ui-text-1-default));
84
+ --ov-ui-agent-connect-secondary: var(--ov-ui-color-text-2, var(--ov-ui-text-2-default));
85
+ --ov-ui-agent-connect-muted: var(--ov-ui-color-connect-muted, var(--ov-ui-connect-muted-default));
86
+ --ov-ui-agent-connect-bg: var(--ov-ui-color-bg-1, var(--ov-ui-bg-1-default));
87
+ --ov-ui-agent-connect-card: var(--ov-ui-color-connect-card, var(--ov-ui-connect-card-default));
88
+ --ov-ui-agent-connect-tabs: var(--ov-ui-color-connect-tabs, var(--ov-ui-connect-tabs-default));
89
+ --ov-ui-agent-connect-selected: var(--ov-ui-color-connect-selected, var(--ov-ui-connect-selected-default));
90
+ --ov-ui-agent-connect-border: var(--ov-ui-color-connect-border, var(--ov-ui-connect-border-default));
91
+ --ov-ui-agent-connect-primary: var(--ov-ui-color-primary, var(--ov-ui-primary-default));
92
+ box-sizing: border-box;
93
+ background: var(--ov-ui-agent-connect-bg);
94
+ width: 1000px;
95
+ max-width: 100%;
96
+ color: var(--ov-ui-agent-connect-text);
97
+ letter-spacing: .003em;
98
+ -webkit-font-smoothing: antialiased;
99
+ font-family: PingFang SC, -apple-system, BlinkMacSystemFont, Segoe UI, sans-serif;
100
+ font-size: 14px;
101
+ line-height: 22px;
102
+ overflow-x: auto;
103
+ }
104
+
105
+ .ov-agent-connect__canvas {
106
+ isolation: isolate;
107
+ width: 1000px;
108
+ min-height: 949px;
109
+ box-shadow: inset 0 0 0 .5px
110
+ var(--ov-ui-color-connect-outline, var(--ov-ui-connect-outline-default));
111
+ position: relative;
112
+ overflow: hidden;
113
+ }
114
+
115
+ .ov-agent-connect__canvas:before {
116
+ z-index: -1;
117
+ background: radial-gradient(ellipse 466.5px 159.5px at 379.5px -6.5px,
118
+ var(--ov-ui-color-connect-glow-warm, var(--ov-ui-connect-glow-warm-default)),
119
+ transparent),
120
+ radial-gradient(ellipse 286.5px 159.5px at 725.5px 4.5px,
121
+ var(--ov-ui-color-connect-glow-pink, var(--ov-ui-connect-glow-pink-default)),
122
+ transparent),
123
+ radial-gradient(ellipse 230.5px 212px at -63.5px 869px,
124
+ var(--ov-ui-color-connect-glow-warm, var(--ov-ui-connect-glow-warm-default)),
125
+ transparent),
126
+ radial-gradient(ellipse 173.5px 159.5px at 236.5px 947.5px,
127
+ var(--ov-ui-color-connect-glow-pink-soft, var(--ov-ui-connect-glow-pink-soft-default)),
128
+ transparent);
129
+ content: "";
130
+ pointer-events: none;
131
+ position: absolute;
132
+ inset: 0;
133
+ }
134
+
135
+ .ov-agent-connect *, .ov-agent-connect :before, .ov-agent-connect :after {
136
+ box-sizing: border-box;
137
+ }
138
+
139
+ .ov-agent-connect :where(button) {
140
+ font: inherit;
141
+ cursor: pointer;
142
+ }
143
+
144
+ .ov-agent-connect button:focus-visible, .ov-agent-connect a:focus-visible {
145
+ outline: 2px solid var(--ov-ui-color-focus, var(--ov-ui-focus-default));
146
+ outline-offset: 2px;
147
+ }
148
+
149
+ .ov-agent-connect__header {
150
+ flex-direction: column;
151
+ align-items: center;
152
+ gap: 20px;
153
+ padding: 24px 0;
154
+ display: flex;
155
+ }
156
+
157
+ .ov-agent-connect__title {
158
+ color: inherit;
159
+ margin: 0;
160
+ font-size: 24px;
161
+ font-weight: 600;
162
+ line-height: 32px;
163
+ }
164
+
165
+ .ov-agent-connect__tabs {
166
+ background: var(--ov-ui-agent-connect-tabs);
167
+ border-radius: 34px;
168
+ height: 36px;
169
+ padding: 2px;
170
+ display: flex;
171
+ }
172
+
173
+ .ov-agent-connect__tab {
174
+ color: var(--ov-ui-agent-connect-secondary);
175
+ white-space: nowrap;
176
+ background: none;
177
+ border: 1px solid #0000;
178
+ border-radius: 35px;
179
+ justify-content: center;
180
+ align-items: center;
181
+ padding: 4px 16px;
182
+ display: flex;
183
+ }
184
+
185
+ .ov-agent-connect__tab[aria-selected="true"] {
186
+ border-color: var(--ov-ui-agent-connect-border);
187
+ background: var(--ov-ui-agent-connect-bg);
188
+ color: var(--ov-ui-agent-connect-text);
189
+ font-weight: 500;
190
+ }
191
+
192
+ .ov-agent-connect__layout {
193
+ grid-template-columns: 200px minmax(0, 1fr);
194
+ gap: 40px;
195
+ padding: 0 60px 24px 40px;
196
+ display: grid;
197
+ }
198
+
199
+ .ov-agent-connect__list {
200
+ flex-direction: column;
201
+ gap: 4px;
202
+ min-width: 0;
203
+ margin: 0;
204
+ padding: 24px 0;
205
+ list-style: none;
206
+ display: flex;
207
+ }
208
+
209
+ .ov-agent-connect__item {
210
+ width: 100%;
211
+ height: 36px;
212
+ color: var(--ov-ui-agent-connect-secondary);
213
+ text-align: left;
214
+ background: none;
215
+ border: 0;
216
+ border-radius: 6px;
217
+ align-items: center;
218
+ gap: 8px;
219
+ padding: 7px 12px;
220
+ display: flex;
221
+ }
222
+
223
+ .ov-agent-connect__item:hover {
224
+ background: var(--ov-ui-agent-connect-tabs);
225
+ }
226
+
227
+ .ov-agent-connect__item[aria-pressed="true"] {
228
+ background: var(--ov-ui-agent-connect-selected);
229
+ color: var(--ov-ui-agent-connect-text);
230
+ font-weight: 500;
231
+ }
232
+
233
+ .ov-agent-connect__item-icon {
234
+ flex: 0 0 20px;
235
+ width: 20px;
236
+ height: 20px;
237
+ }
238
+
239
+ .ov-agent-connect__item-name {
240
+ white-space: nowrap;
241
+ }
242
+
243
+ .ov-agent-connect__detail {
244
+ flex-direction: column;
245
+ gap: 24px;
246
+ min-width: 0;
247
+ padding-top: 24px;
248
+ display: flex;
249
+ }
250
+
251
+ .ov-agent-connect__identity {
252
+ align-items: flex-start;
253
+ gap: 12px;
254
+ display: flex;
255
+ }
256
+
257
+ .ov-agent-connect__detail-icon {
258
+ flex: 0 0 56px;
259
+ justify-content: center;
260
+ align-items: center;
261
+ width: 56px;
262
+ height: 56px;
263
+ display: flex;
264
+ }
265
+
266
+ .ov-agent-connect__detail-icon--frame {
267
+ border: 1px solid var(--ov-ui-agent-connect-border);
268
+ border-radius: 12px;
269
+ }
270
+
271
+ .ov-agent-connect__detail-icon--frame > svg {
272
+ width: 48px;
273
+ height: 48px;
274
+ }
275
+
276
+ .ov-agent-connect__summary {
277
+ flex-direction: column;
278
+ gap: 4px;
279
+ min-width: 0;
280
+ display: flex;
281
+ }
282
+
283
+ .ov-agent-connect__detail-title {
284
+ color: inherit;
285
+ margin: 0;
286
+ font-size: 18px;
287
+ font-weight: 500;
288
+ line-height: 26px;
289
+ }
290
+
291
+ .ov-agent-connect__description {
292
+ min-height: 40px;
293
+ color: var(--ov-ui-agent-connect-muted);
294
+ margin: 0;
295
+ font-size: 12px;
296
+ line-height: 20px;
297
+ }
298
+
299
+ .ov-agent-connect__tags {
300
+ gap: 8px;
301
+ margin-top: 4px;
302
+ display: flex;
303
+ }
304
+
305
+ .ov-agent-connect__tag {
306
+ background: var(--ov-ui-agent-connect-selected);
307
+ color: var(--ov-ui-agent-connect-secondary);
308
+ border-radius: 4px;
309
+ padding: 0 6px;
310
+ font-size: 12px;
311
+ line-height: 20px;
312
+ }
313
+
314
+ .ov-agent-connect__instructions {
315
+ flex-direction: column;
316
+ gap: 12px;
317
+ display: flex;
318
+ }
319
+
320
+ .ov-agent-connect__instructions-header {
321
+ justify-content: space-between;
322
+ align-items: center;
323
+ height: 34px;
324
+ display: flex;
325
+ }
326
+
327
+ .ov-agent-connect__instructions-title {
328
+ color: inherit;
329
+ margin: 0;
330
+ font-size: 14px;
331
+ font-weight: 500;
332
+ line-height: 22px;
333
+ }
334
+
335
+ .ov-agent-connect__copy {
336
+ background: var(--ov-ui-agent-connect-primary);
337
+ height: 34px;
338
+ color: var(--ov-ui-color-on-primary, var(--ov-ui-on-primary-default));
339
+ border: 0;
340
+ border-radius: 8px;
341
+ justify-content: center;
342
+ align-items: center;
343
+ gap: 6px;
344
+ padding: 5px 16px;
345
+ font-size: 13px;
346
+ line-height: 22px;
347
+ display: inline-flex;
348
+ }
349
+
350
+ .ov-agent-connect__copy svg {
351
+ flex: 0 0 16px;
352
+ width: 16px;
353
+ height: 16px;
354
+ }
355
+
356
+ .ov-agent-connect__copy:hover {
357
+ background: var(--ov-ui-color-primary-hover, var(--ov-ui-primary-hover-default));
358
+ }
359
+
360
+ .ov-agent-connect__copy:active {
361
+ background: var(--ov-ui-color-primary-active, var(--ov-ui-primary-active-default));
362
+ }
363
+
364
+ .ov-agent-connect__copy:disabled {
365
+ opacity: .6;
366
+ cursor: wait;
367
+ }
368
+
369
+ .ov-agent-connect__body {
370
+ box-shadow: inset 0 0 0 1px var(--ov-ui-agent-connect-border);
371
+ background: var(--ov-ui-agent-connect-card);
372
+ color: var(--ov-ui-agent-connect-secondary);
373
+ overflow-wrap: anywhere;
374
+ white-space: pre-wrap;
375
+ border-radius: 12px;
376
+ padding: 12px 16px;
377
+ font-size: 13px;
378
+ line-height: 22px;
379
+ }
380
+
381
+ .ov-agent-connect__feedback {
382
+ color: var(--ov-ui-agent-connect-muted);
383
+ font-size: 12px;
384
+ }
385
+
386
+ .ov-agent-connect__feedback:empty {
387
+ display: none;
388
+ }
389
+
390
+ .ov-agent-connect__feedback--error {
391
+ color: var(--ov-ui-color-status-error, var(--ov-ui-status-error-default));
392
+ }
393
+
394
+ .ov-agent-connect__footer {
395
+ color: var(--ov-ui-agent-connect-muted);
396
+ margin: 0;
397
+ font-size: 12px;
398
+ line-height: 20px;
399
+ }
400
+
401
+ .ov-agent-connect__agreement {
402
+ color: inherit;
403
+ text-decoration: underline dotted;
404
+ text-decoration-color: var(--ov-ui-color-connect-notice, var(--ov-ui-connect-notice-default));
405
+ text-underline-offset: 3px;
406
+ }
407
+
408
+ .ov-agent-connect__markdown {
409
+ white-space: normal;
410
+ }
411
+
412
+ .ov-agent-connect__markdown :where(p, pre, h5, table) {
413
+ margin: 0 0 12px;
414
+ }
415
+
416
+ .ov-agent-connect__markdown > :last-child {
417
+ margin-bottom: 0;
418
+ }
419
+
420
+ .ov-agent-connect__markdown p {
421
+ white-space: pre-wrap;
422
+ }
423
+
424
+ .ov-agent-connect__markdown h5 {
425
+ color: var(--ov-ui-agent-connect-text);
426
+ font-size: 14px;
427
+ line-height: 22px;
428
+ }
429
+
430
+ .ov-agent-connect__markdown pre {
431
+ background: var(--ov-ui-agent-connect-bg);
432
+ white-space: pre-wrap;
433
+ overflow-wrap: anywhere;
434
+ border-radius: 6px;
435
+ padding: 12px;
436
+ font-size: 12px;
437
+ line-height: 20px;
438
+ }
439
+
440
+ .ov-agent-connect__markdown code {
441
+ font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
442
+ }
443
+
444
+ .ov-agent-connect__markdown a {
445
+ color: var(--ov-ui-agent-connect-primary);
446
+ overflow-wrap: anywhere;
447
+ }
448
+
449
+ .ov-agent-connect__markdown table {
450
+ border-collapse: collapse;
451
+ width: 100%;
452
+ }
453
+
454
+ .ov-agent-connect__markdown :where(td, th) {
455
+ border: 1px solid var(--ov-ui-agent-connect-border);
456
+ text-align: left;
457
+ padding: 6px;
458
+ }
459
+
460
+ .ov-agent-connect__guides {
461
+ gap: 8px;
462
+ display: flex;
463
+ }
464
+
465
+ .ov-agent-connect__guide {
466
+ border: 1px solid var(--ov-ui-agent-connect-border);
467
+ background: var(--ov-ui-agent-connect-bg);
468
+ color: var(--ov-ui-agent-connect-secondary);
469
+ border-radius: 6px;
470
+ padding: 4px 12px;
471
+ }
472
+
473
+ .ov-agent-connect__guide[aria-pressed="true"] {
474
+ background: var(--ov-ui-agent-connect-selected);
475
+ color: var(--ov-ui-agent-connect-text);
476
+ font-weight: 500;
477
+ }
478
+
479
+ .ov-agent-connect__guides--cli {
480
+ border-bottom: 1px solid var(--ov-ui-agent-connect-border);
481
+ gap: 0;
482
+ }
483
+
484
+ .ov-agent-connect__guides--cli .ov-agent-connect__guide {
485
+ color: var(--ov-ui-agent-connect-muted);
486
+ background: none;
487
+ border: 0;
488
+ border-bottom: 2px solid #0000;
489
+ border-radius: 0;
490
+ margin-bottom: -1px;
491
+ margin-right: 24px;
492
+ padding: 0 4px 12px;
493
+ font-size: 14px;
494
+ font-weight: 400;
495
+ transition: color .15s, border-color .15s;
496
+ }
497
+
498
+ .ov-agent-connect__guides--cli .ov-agent-connect__guide[aria-pressed="true"] {
499
+ border-bottom-color: var(--ov-ui-agent-connect-primary);
500
+ color: var(--ov-ui-agent-connect-text);
501
+ font-weight: 600;
502
+ }
503
+
1
504
 
2
505
 
@@ -0,0 +1,29 @@
1
+ import type { HTMLAttributes } from 'react';
2
+ export type AgentConnectLocale = 'zh' | 'en';
3
+ export type AgentConnectTabId = 'mainstream' | 'custom';
4
+ /** 固定目录中选中的 Agent。Selected agent from the built-in catalog. */
5
+ export interface AgentConnectItem {
6
+ id: string;
7
+ name: string;
8
+ }
9
+ /** 固定设计视图;文案、图标与正文均内置。Fixed view with built-in copy and icons. */
10
+ export interface AgentConnectProps extends Omit<HTMLAttributes<HTMLDivElement>, 'children' | 'onSelect' | 'onCopy'> {
11
+ /** 调用方提供的密钥;展示脱敏,复制保留原值。Host API key. */
12
+ apiKey: string;
13
+ /** 内置文案语言;必须由调用方指定。Required content locale. */
14
+ locale: AgentConnectLocale;
15
+ /** 服务地址,默认 OpenViking 云服务。Optional service endpoint. */
16
+ baseUrl?: string;
17
+ /** 宿主提供的用户协议链接;未传时不显示协议引用。Host agreement URL. */
18
+ agreementUrl?: string;
19
+ /** 受控页签;默认 mainstream。Controlled tab; defaults to mainstream. */
20
+ activeTabId?: AgentConnectTabId;
21
+ /** 受控 Agent;默认 codex。Controlled agent; defaults to codex. */
22
+ selectedId?: string;
23
+ /** 页签切换通知。Tab selection notification. */
24
+ onTabChange?: (tabId: AgentConnectTabId) => void;
25
+ /** 返回内置目录条目的 id 和 name。Reports the built-in item id and name. */
26
+ onSelect?: (item: AgentConnectItem) => void;
27
+ /** 复制成功后通知;不负责写入剪贴板。Success notification, not clipboard writing. */
28
+ onCopy?: (text: string) => void;
29
+ }
@@ -0,0 +1 @@
1
+ export { AgentConnect } from "../u~0.js";
@@ -0,0 +1,33 @@
1
+ import type { MarkdownAdapterOptions } from '@ark-design/ui/file-viewer/adapters/markdown';
2
+ import type { FileViewerCoreProps } from '@ark-design/ui/file-viewer/core';
3
+ /**
4
+ * 组件内置的格式集合:文本、文档、图片与音视频。
5
+ *
6
+ * 图片是内容式 Adapter,音视频是引用式 Adapter;底座会按 Adapter 声明的读取
7
+ * 方式自动转换 `source`,宿主只需给出内容、文件或链接,不用区分。
8
+ *
9
+ * CAD 与 3D 需要额外的引擎与伴随资源,不放进公共组件。
10
+ *
11
+ * 本模块会静态引入底座,因此只能被懒加载的正文模块引用,不能进入包的顶层
12
+ * 导入链——底座会静态引入浏览器专用组件,顶层导入会破坏服务端渲染。
13
+ *
14
+ * The formats the component ships: text, documents, images and media. The image
15
+ * adapter reads content while the media adapter reads a reference; the base
16
+ * converts `source` according to the adapter's declared mode, so the host only
17
+ * supplies content, a file or a URL. CAD and 3D need extra engines and companion
18
+ * resources, so they stay out of the shared component. This module statically
19
+ * imports the base, so only the lazily loaded body may reference it: the base
20
+ * pulls in browser-only packages, and a top-level import would break server
21
+ * rendering.
22
+ */
23
+ export declare function createFilePreviewAdapterList({ onLinkClick, }?: {
24
+ /**
25
+ * Markdown 正文里的链接被点击时调用。传入后由回调接管导航,底座不再自行
26
+ * 跳转;只有 Markdown Adapter 支持这个回调,其余格式忽略它。
27
+ *
28
+ * Called when a link inside a Markdown body is clicked. Supplying it hands
29
+ * navigation to the callback and the base no longer jumps on its own. Only the
30
+ * Markdown adapter supports this; other formats ignore it.
31
+ */
32
+ onLinkClick?: MarkdownAdapterOptions['onLinkClick'];
33
+ }): FileViewerCoreProps['adapters'];
@@ -0,0 +1,27 @@
1
+ import type { ViewerHandle, ViewerViewModeOption } from '@ark-design/ui/file-viewer/core';
2
+ import type { MarkdownAdapterOptions } from '@ark-design/ui/file-viewer/adapters/markdown';
3
+ import type { useFilePreviewEditing } from './use-file-preview-editing.js';
4
+ import type { FilePreviewFileTab, FilePreviewLabels, FilePreviewViewMode } from './types.js';
5
+ export interface FilePreviewBodyProps {
6
+ fileTab: FilePreviewFileTab;
7
+ text: Required<FilePreviewLabels>;
8
+ locale?: 'en-US' | 'zh-CN';
9
+ viewMode: FilePreviewViewMode;
10
+ editing: ReturnType<typeof useFilePreviewEditing>;
11
+ onViewModeChange: (mode: FilePreviewViewMode) => void;
12
+ onHandleChange: (handle: ViewerHandle | null) => void;
13
+ onViewModesChange: (modes: readonly ViewerViewModeOption[]) => void;
14
+ onDownload: () => void;
15
+ /** Markdown 正文里的链接被点击时调用。 */
16
+ onLinkClick?: MarkdownAdapterOptions['onLinkClick'];
17
+ /** 读取失败后退出编辑态。Leaves editing after a failed load. */
18
+ onCancelEditing: () => void;
19
+ }
20
+ /**
21
+ * 文件页签的正文:按编辑态、空文件、底座依次短路。内容页签不走这里——它的
22
+ * 正文整块由宿主渲染。
23
+ *
24
+ * The body of a file tab: it short-circuits through editing, empty file and then
25
+ * the base component. A content tab never reaches this — its body is the host's.
26
+ */
27
+ export declare function FilePreviewBody({ fileTab, text, locale, viewMode, editing, onViewModeChange, onHandleChange, onViewModesChange, onDownload, onLinkClick, onCancelEditing, }: FilePreviewBodyProps): import("react").JSX.Element;
@@ -0,0 +1,16 @@
1
+ import type { PathSegment } from './file-preview-path.js';
2
+ export interface FilePreviewBreadcrumbMenuProps {
3
+ segments: readonly PathSegment[];
4
+ canOpen: boolean;
5
+ disabled: boolean;
6
+ onOpen: (uri: string) => void;
7
+ }
8
+ /**
9
+ * 折叠层级的菜单。用 Tooltip 的 `click` 形态承载:点击「…」展开,按 Esc 或
10
+ * 点外部关闭,浮层渲染到 body,因此不受面包屑容器的布局约束。
11
+ *
12
+ * The menu of collapsed levels, carried by Tooltip's `click` shape: clicking "…"
13
+ * opens it, Escape or a press outside closes it, and because the surface renders
14
+ * into `body` the breadcrumb's own layout cannot clip it.
15
+ */
16
+ export declare function FilePreviewBreadcrumbMenu({ segments, canOpen, disabled, onOpen, }: FilePreviewBreadcrumbMenuProps): import("react").JSX.Element;
@@ -0,0 +1,21 @@
1
+ import type { PathSegment } from './file-preview-path.js';
2
+ export interface FilePreviewBreadcrumbProps {
3
+ segments: readonly PathSegment[];
4
+ title: string;
5
+ canOpen: boolean;
6
+ disabled: boolean;
7
+ onOpen: (uri: string) => void;
8
+ }
9
+ /**
10
+ * 路径面包屑:祖先逐段可点,放不下时按「保两端、缩中间」折叠。
11
+ *
12
+ * 折叠顺序与内部版一致:先保留首段与末段,从紧邻首段的那一级开始逐级收进
13
+ * 「…」;中间全部收起后仍放不下,才连首段一起收起,只留末段。
14
+ *
15
+ * Path breadcrumb: every ancestor is clickable, and overflow collapses by keeping
16
+ * both ends and shrinking the middle. The first level and the trailing name stay
17
+ * as long as possible; ancestors are folded into a "…" menu starting next to the
18
+ * first level, and only when even that does not fit is the first level dropped
19
+ * too, leaving the trailing name alone.
20
+ */
21
+ export declare function FilePreviewBreadcrumb({ segments, title, canOpen, disabled, onOpen, }: FilePreviewBreadcrumbProps): import("react").JSX.Element;
@@ -0,0 +1,12 @@
1
+ /**
2
+ * 路径旁的复制按钮。有 `source.path` 的文件在任何宿主下都需要它,因此内置在
3
+ * 外壳里,而不是交给宿主渲染。
4
+ *
5
+ * The copy-path button beside the path. Any file with a `source.path` needs it
6
+ * under every host, so it lives in the shell rather than being left to the host.
7
+ */
8
+ export declare function FilePreviewCopyPath({ label, disabled, onClick, }: {
9
+ label: string;
10
+ disabled: boolean;
11
+ onClick: () => void;
12
+ }): import("react").JSX.Element;
@@ -0,0 +1,22 @@
1
+ import type { FilePreviewLabels } from './types.js';
2
+ export interface FilePreviewEditorProps {
3
+ draft: string;
4
+ text: Required<FilePreviewLabels>;
5
+ loading: boolean;
6
+ failed: boolean;
7
+ saveFailed: boolean;
8
+ saving: boolean;
9
+ onChange: (value: string) => void;
10
+ onCancel: () => void;
11
+ }
12
+ /**
13
+ * 编辑态正文:纯文本编辑区,不经过底座。
14
+ *
15
+ * 编辑区独立于 `FileViewerCore`,因此进入编辑不会重建渲染器,退出编辑也
16
+ * 不会重新解析内容。
17
+ *
18
+ * The editing body: a plain-text area that bypasses the base component. Keeping
19
+ * it separate means entering or leaving editing never remounts the renderer nor
20
+ * reparses the content.
21
+ */
22
+ export declare function FilePreviewEditor({ draft, text, loading, failed, saveFailed, saving, onChange, onCancel, }: FilePreviewEditorProps): import("react").JSX.Element;