@openviking/react 0.1.3 → 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.
- package/LICENSE.arco-design +21 -0
- package/README.md +25 -15
- package/dist/0~0.js +19 -0
- package/dist/2~0.js +2267 -29
- package/dist/2~0.js.LICENSE.txt +23 -0
- package/dist/3c~0.js +2206 -0
- package/dist/3~0.js +1205 -1982
- package/dist/4~0.js +18 -0
- package/dist/9~0.js +43 -0
- package/dist/{1~0.js → ae~0.js} +5 -24
- package/dist/ark-message-list-view~0.js +530 -119
- package/dist/a~0.js +1289 -10
- package/dist/c7~0.js +38 -2
- package/dist/ck~0.js +23 -0
- package/dist/client/provider.d.ts +5 -3
- package/dist/client/types.d.ts +5 -5
- package/dist/client.js +2 -1
- package/dist/components/agent-connect/agent-connect-copy.d.ts +19 -33
- package/dist/components/agent-connect/agent-connect-design.d.ts +1935 -167
- package/dist/components/agent-connect/agent-connect-instructions.d.ts +135 -0
- package/dist/components/agent-connect/locales/en-US.d.ts +20 -0
- package/dist/components/agent-connect/locales/zh-CN.d.ts +3 -0
- package/dist/components/agent-connect/style.css +14 -2
- package/dist/components/agent-connect/types.d.ts +2 -1
- package/dist/components/directory-tour/directory-tour.d.ts +3 -0
- package/dist/components/directory-tour/index.d.ts +3 -0
- package/dist/components/directory-tour/locales/en-US.d.ts +3 -0
- package/dist/components/directory-tour/locales/zh-CN.d.ts +3 -0
- package/dist/components/directory-tour/steps.d.ts +5 -0
- package/dist/components/directory-tour/style.css +237 -0
- package/dist/components/directory-tour/style.js +0 -0
- package/dist/components/directory-tour/types.d.ts +42 -0
- package/dist/components/directory-tour/use-tour-anchor.d.ts +5 -0
- package/dist/components/directory-tour/use-tour-position.d.ts +12 -0
- package/dist/components/directory-tour.js +40 -0
- package/dist/components/file-browser-entries/file-browser-entries.d.ts +5 -5
- package/dist/components/file-browser-entries/labels.d.ts +3 -0
- package/dist/components/file-browser-entries/locales/en-US.d.ts +6 -0
- package/dist/components/file-browser-entries/locales/zh-CN.d.ts +6 -0
- package/dist/components/file-browser-entries/style.css +752 -2
- package/dist/components/file-browser-entries/types.d.ts +34 -16
- package/dist/components/file-preview/file-preview-adapters.d.ts +2 -1
- package/dist/components/file-preview/file-preview-body.d.ts +2 -1
- package/dist/components/file-preview/file-preview-breadcrumb-menu.d.ts +2 -1
- package/dist/components/file-preview/file-preview-breadcrumb.d.ts +2 -1
- package/dist/components/file-preview/file-preview-directory.d.ts +2 -1
- package/dist/components/file-preview/file-preview-handle-adapters.d.ts +2 -1
- package/dist/components/file-preview/file-preview-header.d.ts +6 -2
- package/dist/components/file-preview/file-preview-image-frame.d.ts +5 -0
- package/dist/components/file-preview/file-preview-labels.d.ts +2 -14
- package/dist/components/file-preview/file-preview-level-tabs.d.ts +7 -0
- package/dist/components/file-preview/file-preview-markdown-images.d.ts +13 -0
- package/dist/components/file-preview/file-preview-panels.d.ts +5 -2
- package/dist/components/file-preview/file-preview-viewer.d.ts +2 -1
- package/dist/components/file-preview/file-preview.d.ts +0 -1
- package/dist/components/file-preview/index.d.ts +2 -1
- package/dist/components/file-preview/locales/en-US.d.ts +16 -0
- package/dist/components/file-preview/locales/zh-CN.d.ts +16 -0
- package/dist/components/file-preview/style.css +160 -2
- package/dist/components/file-preview/types.d.ts +34 -10
- package/dist/components/file-preview/use-file-preview-levels.d.ts +7 -0
- package/dist/components/file-preview/use-file-preview-view-state.d.ts +15 -0
- package/dist/components/file-preview.js +1 -1
- package/dist/components/file-tree/file-tree-info-labels.d.ts +0 -15
- package/dist/components/file-tree/file-tree-labels.d.ts +4 -0
- package/dist/components/file-tree/file-tree-row-shared.d.ts +2 -12
- package/dist/components/file-tree/file-tree-toolbar.d.ts +11 -0
- package/dist/components/file-tree/locales/en-US.d.ts +69 -0
- package/dist/components/file-tree/locales/zh-CN.d.ts +69 -0
- package/dist/components/file-tree/style.css +143 -15
- package/dist/components/file-tree/types.d.ts +38 -10
- package/dist/components/file-tree/use-file-tree-actions.d.ts +4 -1
- package/dist/components/scope-switcher/labels.d.ts +3 -0
- package/dist/components/scope-switcher/locales/en-US.d.ts +8 -0
- package/dist/components/scope-switcher/locales/zh-CN.d.ts +8 -0
- package/dist/components/scope-switcher/scope-panel.d.ts +1 -1
- package/dist/components/scope-switcher/scope-switcher.d.ts +1 -1
- package/dist/components/scope-switcher/style.css +14 -2
- package/dist/components/scope-switcher/types.d.ts +11 -5
- package/dist/components/style.css +9851 -6812
- package/dist/components/tui/locales/en-US.d.ts +35 -0
- package/dist/components/tui/locales/zh-CN.d.ts +35 -0
- package/dist/components/tui/style.css +310 -18
- package/dist/components/tui/tui-copy-button.d.ts +1 -1
- package/dist/components/tui/tui-empty.d.ts +25 -0
- package/dist/components/tui/tui-labels.d.ts +2 -2
- package/dist/components/tui/tui.d.ts +1 -1
- package/dist/components/tui/types.d.ts +35 -12
- package/dist/components/tui.js +1 -1
- package/dist/components/viking-bot/ark-adapter.d.ts +2 -0
- package/dist/components/viking-bot/ark-message-body.d.ts +1 -7
- package/dist/components/viking-bot/ark-message-list-view.d.ts +1 -1
- package/dist/components/viking-bot/ark-message-row.d.ts +3 -1
- package/dist/components/viking-bot/bot-popover.d.ts +9 -0
- package/dist/components/viking-bot/capabilities.d.ts +49 -0
- package/dist/components/viking-bot/composer-attachments.d.ts +13 -0
- package/dist/components/viking-bot/composer-controls.d.ts +10 -0
- package/dist/components/viking-bot/composer-footer.d.ts +17 -0
- package/dist/components/viking-bot/composer-references.d.ts +20 -0
- package/dist/components/viking-bot/composer-text.d.ts +10 -0
- package/dist/components/viking-bot/index.d.ts +3 -1
- package/dist/components/viking-bot/interaction/ask-human-fields.d.ts +1 -1
- package/dist/components/viking-bot/interaction/labels.d.ts +2 -1
- package/dist/components/viking-bot/interaction/locales/en-US.d.ts +17 -0
- package/dist/components/viking-bot/interaction/locales/zh-CN.d.ts +17 -0
- package/dist/components/viking-bot/interaction/types.d.ts +8 -3
- package/dist/components/viking-bot/interaction/viking-bot-interaction.d.ts +1 -1
- package/dist/components/viking-bot/labels.d.ts +2 -0
- package/dist/components/viking-bot/locales/en-US.d.ts +40 -0
- package/dist/components/viking-bot/locales/zh-CN.d.ts +40 -0
- package/dist/components/viking-bot/markdown-links.d.ts +27 -0
- package/dist/components/viking-bot/message-activity.d.ts +7 -0
- package/dist/components/viking-bot/message-code-block.d.ts +8 -0
- package/dist/components/viking-bot/message-footer.d.ts +8 -0
- package/dist/components/viking-bot/message-markdown.d.ts +9 -0
- package/dist/components/viking-bot/model.d.ts +37 -3
- package/dist/components/viking-bot/quick-input-tracker.d.ts +16 -0
- package/dist/components/viking-bot/quick-inputs.d.ts +6 -0
- package/dist/components/viking-bot/reference-picker.d.ts +16 -0
- package/dist/components/viking-bot/session-actions.d.ts +11 -0
- package/dist/components/viking-bot/style.css +1486 -48
- package/dist/components/viking-bot/tool-activity.d.ts +9 -0
- package/dist/components/viking-bot/tool-result-links.d.ts +6 -0
- package/dist/components/viking-bot/types.d.ts +21 -9
- package/dist/components/viking-bot/use-quick-input.d.ts +17 -0
- package/dist/components/viking-bot/viking-bot.d.ts +1 -6
- package/dist/components/viking-bot/welcome.d.ts +8 -0
- package/dist/components/viking-bot.js +1 -1
- package/dist/c~0.js +533 -66
- package/dist/e~0.js +333 -0
- package/dist/file-preview-viewer~0.js +90 -8
- package/dist/f~0.js +39 -47
- package/dist/h~0.js +5 -1
- package/dist/icons/console-icons.d.ts +12 -0
- package/dist/icons/index.d.ts +2 -0
- package/dist/icons/viking-bot-icons.d.ts +6 -0
- package/dist/icons.js +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +2 -1
- package/dist/k~0.js +1 -0
- package/dist/lg~0.js +155 -0
- package/dist/lk~0.js +37 -8
- package/dist/l~0.js +102 -119
- package/dist/modules/console/command-messages.d.ts +19 -0
- package/dist/modules/console/command-parser.d.ts +15 -0
- package/dist/modules/console/command-specs.d.ts +15 -0
- package/dist/modules/console/commands.d.ts +6 -0
- package/dist/modules/console/console-history.d.ts +10 -0
- package/dist/modules/console/console-toolbar.d.ts +18 -0
- package/dist/modules/console/console.d.ts +1 -3
- package/dist/modules/console/controller.d.ts +17 -0
- package/dist/modules/console/index.d.ts +2 -0
- package/dist/modules/console/labels.d.ts +61 -0
- package/dist/modules/console/locales/en-US.d.ts +49 -0
- package/dist/modules/console/locales/zh-CN.d.ts +3 -0
- package/dist/modules/console/localize-records.d.ts +11 -0
- package/dist/modules/console/results.d.ts +2 -0
- package/dist/modules/console/style.css +10905 -15
- package/dist/modules/console/types.d.ts +59 -80
- package/dist/modules/console/use-console.d.ts +3 -0
- package/dist/modules/console.js +1 -1
- package/dist/modules/file-browser/file-browser-detail.d.ts +2 -1
- package/dist/modules/file-browser/file-browser-labels.d.ts +11 -12
- package/dist/modules/file-browser/file-browser-toolbar.d.ts +3 -4
- package/dist/modules/file-browser/file-browser-tree-pane.d.ts +7 -5
- package/dist/modules/file-browser/file-browser.d.ts +1 -1
- package/dist/modules/file-browser/fs-read-directory.d.ts +2 -6
- package/dist/modules/file-browser/locales/en-US.d.ts +25 -0
- package/dist/modules/file-browser/locales/zh-CN.d.ts +25 -0
- package/dist/modules/file-browser/style.css +1581 -126
- package/dist/modules/file-browser/types.d.ts +38 -29
- package/dist/modules/file-browser/use-file-browser.d.ts +6 -1
- package/dist/modules/file-browser/use-fs-preview.d.ts +15 -1
- package/dist/modules/scope-cascade/labels.d.ts +6 -0
- package/dist/modules/scope-cascade/locales/en-US.d.ts +6 -0
- package/dist/modules/scope-cascade/locales/zh-CN.d.ts +3 -0
- package/dist/modules/scope-cascade/scope-cascade.d.ts +1 -1
- package/dist/modules/scope-cascade/style.css +14 -2
- package/dist/modules/scope-cascade/types.d.ts +3 -0
- package/dist/modules/style.css +15853 -3484
- package/dist/nx~0.js +15 -0
- package/dist/n~0.js +238 -83
- package/dist/o~0.js +10 -7
- package/dist/p~0.js +27 -0
- package/dist/rslib-runtime~0.js +42 -0
- package/dist/r~0.js +152 -0
- package/dist/shared/components/drawer/drawer.d.ts +13 -0
- package/dist/shared/components/drawer/index.d.ts +1 -0
- package/dist/shared/components/overlay/use-overlay-position.d.ts +2 -2
- package/dist/shared/components/tooltip/use-portal-theme.d.ts +3 -0
- package/dist/shared/locale.d.ts +6 -0
- package/dist/style.css +26056 -10636
- package/dist/u~0.js +75 -58
- package/dist/viking-bot-composer~0.js +434 -77
- package/dist/viking-bot-interaction~0.js +11 -11
- package/package.json +13 -4
- package/dist/30~0.js +0 -1332
- package/dist/components/tui/tui-labels-zh.d.ts +0 -2
- package/dist/modules/file-browser/tree-info-copy.d.ts +0 -15
- package/dist/modules/file-browser/tree-info-copy.zh-CN.d.ts +0 -15
package/dist/e~0.js
ADDED
|
@@ -0,0 +1,333 @@
|
|
|
1
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useEffect, useId, useRef, useState } from "react";
|
|
3
|
+
import { createPortal } from "react-dom";
|
|
4
|
+
import { resolveLocale } from "./nx~0.js";
|
|
5
|
+
function useTourAnchor(target, locateTarget, timeout, attempt) {
|
|
6
|
+
const [state, setState] = useState({
|
|
7
|
+
anchor: null,
|
|
8
|
+
failed: false
|
|
9
|
+
});
|
|
10
|
+
useEffect(()=>{
|
|
11
|
+
const controller = new AbortController();
|
|
12
|
+
setState({
|
|
13
|
+
anchor: null,
|
|
14
|
+
failed: false
|
|
15
|
+
});
|
|
16
|
+
const timer = window.setTimeout(()=>{
|
|
17
|
+
controller.abort();
|
|
18
|
+
setState({
|
|
19
|
+
anchor: null,
|
|
20
|
+
failed: true
|
|
21
|
+
});
|
|
22
|
+
}, timeout);
|
|
23
|
+
Promise.resolve().then(()=>locateTarget?.(target, controller.signal) ?? null).then((anchor)=>{
|
|
24
|
+
if (controller.signal.aborted) return;
|
|
25
|
+
window.clearTimeout(timer);
|
|
26
|
+
if (anchor?.isConnected) {
|
|
27
|
+
anchor.scrollIntoView({
|
|
28
|
+
block: 'nearest',
|
|
29
|
+
inline: 'nearest'
|
|
30
|
+
});
|
|
31
|
+
setState({
|
|
32
|
+
anchor,
|
|
33
|
+
failed: false
|
|
34
|
+
});
|
|
35
|
+
} else setState({
|
|
36
|
+
anchor: null,
|
|
37
|
+
failed: true
|
|
38
|
+
});
|
|
39
|
+
}, ()=>{
|
|
40
|
+
if (controller.signal.aborted) return;
|
|
41
|
+
window.clearTimeout(timer);
|
|
42
|
+
setState({
|
|
43
|
+
anchor: null,
|
|
44
|
+
failed: true
|
|
45
|
+
});
|
|
46
|
+
});
|
|
47
|
+
return ()=>{
|
|
48
|
+
controller.abort();
|
|
49
|
+
window.clearTimeout(timer);
|
|
50
|
+
};
|
|
51
|
+
}, [
|
|
52
|
+
target,
|
|
53
|
+
locateTarget,
|
|
54
|
+
timeout,
|
|
55
|
+
attempt
|
|
56
|
+
]);
|
|
57
|
+
return state;
|
|
58
|
+
}
|
|
59
|
+
function useTourPosition(anchor, surface, placement) {
|
|
60
|
+
const [position, setPosition] = useState();
|
|
61
|
+
useEffect(()=>{
|
|
62
|
+
if (!surface) return;
|
|
63
|
+
surface.showPopover?.();
|
|
64
|
+
const update = ()=>{
|
|
65
|
+
const a = anchor?.getBoundingClientRect();
|
|
66
|
+
const box = surface.getBoundingClientRect();
|
|
67
|
+
const width = window.innerWidth;
|
|
68
|
+
const height = window.innerHeight;
|
|
69
|
+
const margin = 8;
|
|
70
|
+
let left = (width - box.width) / 2;
|
|
71
|
+
let top = (height - box.height) / 2;
|
|
72
|
+
const missing = Boolean(anchor && !anchor.isConnected);
|
|
73
|
+
let visible = !anchor || missing;
|
|
74
|
+
if (anchor && a && !missing) {
|
|
75
|
+
let clip = {
|
|
76
|
+
left: 0,
|
|
77
|
+
top: 0,
|
|
78
|
+
right: width,
|
|
79
|
+
bottom: height
|
|
80
|
+
};
|
|
81
|
+
for(let parent = anchor.parentElement; parent; parent = parent.parentElement){
|
|
82
|
+
const css = window.getComputedStyle(parent);
|
|
83
|
+
const rect = parent.getBoundingClientRect();
|
|
84
|
+
if (/(auto|scroll|hidden|clip)/.test(css.overflowX)) clip = {
|
|
85
|
+
...clip,
|
|
86
|
+
left: Math.max(clip.left, rect.left),
|
|
87
|
+
right: Math.min(clip.right, rect.right)
|
|
88
|
+
};
|
|
89
|
+
if (/(auto|scroll|hidden|clip)/.test(css.overflowY)) clip = {
|
|
90
|
+
...clip,
|
|
91
|
+
top: Math.max(clip.top, rect.top),
|
|
92
|
+
bottom: Math.min(clip.bottom, rect.bottom)
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
visible = anchor.isConnected && a.width > 0 && a.height > 0 && a.top < clip.bottom && a.bottom > clip.top && a.left < clip.right && a.right > clip.left;
|
|
96
|
+
const right = a.right + 6;
|
|
97
|
+
const leftSide = a.left - box.width - 6;
|
|
98
|
+
left = 'right' === placement ? right + box.width <= width - margin || leftSide < margin ? right : leftSide : leftSide >= margin || right + box.width > width - margin ? leftSide : right;
|
|
99
|
+
top = a.top - 16;
|
|
100
|
+
const css = window.getComputedStyle(anchor);
|
|
101
|
+
for(let i = 0; i < css.length; i++){
|
|
102
|
+
const name = css[i];
|
|
103
|
+
if (name?.startsWith('--ov-ui-')) surface.style.setProperty(name, css.getPropertyValue(name));
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
const next = {
|
|
107
|
+
left: Math.max(margin, Math.min(left, width - box.width - margin)),
|
|
108
|
+
top: Math.max(margin, Math.min(top, height - box.height - margin)),
|
|
109
|
+
targetTop: a?.top ?? 0,
|
|
110
|
+
targetLeft: a?.left ?? 0,
|
|
111
|
+
targetWidth: a?.width ?? 0,
|
|
112
|
+
targetHeight: a?.height ?? 0,
|
|
113
|
+
visible,
|
|
114
|
+
missing
|
|
115
|
+
};
|
|
116
|
+
setPosition((old)=>old && Object.keys(next).every((key)=>old[key] === next[key]) ? old : next);
|
|
117
|
+
};
|
|
118
|
+
update();
|
|
119
|
+
const resize = new ResizeObserver(update);
|
|
120
|
+
resize.observe(surface);
|
|
121
|
+
for(let node = anchor; node; node = node.parentElement)resize.observe(node);
|
|
122
|
+
const mutation = new MutationObserver(update);
|
|
123
|
+
mutation.observe(document.body, {
|
|
124
|
+
childList: true,
|
|
125
|
+
subtree: true
|
|
126
|
+
});
|
|
127
|
+
window.addEventListener('scroll', update, true);
|
|
128
|
+
window.addEventListener('resize', update);
|
|
129
|
+
window.visualViewport?.addEventListener('resize', update);
|
|
130
|
+
window.visualViewport?.addEventListener('scroll', update);
|
|
131
|
+
return ()=>{
|
|
132
|
+
resize.disconnect();
|
|
133
|
+
mutation.disconnect();
|
|
134
|
+
window.removeEventListener('scroll', update, true);
|
|
135
|
+
window.removeEventListener('resize', update);
|
|
136
|
+
window.visualViewport?.removeEventListener('resize', update);
|
|
137
|
+
window.visualViewport?.removeEventListener('scroll', update);
|
|
138
|
+
if (surface.isConnected) surface.hidePopover?.();
|
|
139
|
+
};
|
|
140
|
+
}, [
|
|
141
|
+
anchor,
|
|
142
|
+
surface,
|
|
143
|
+
placement
|
|
144
|
+
]);
|
|
145
|
+
return position;
|
|
146
|
+
}
|
|
147
|
+
const messages = {
|
|
148
|
+
close: 'Close guide',
|
|
149
|
+
next: 'Next',
|
|
150
|
+
done: 'Got it',
|
|
151
|
+
locating: 'Locating directory…',
|
|
152
|
+
unavailable: 'This directory is unavailable. Retry or skip this step.',
|
|
153
|
+
retry: 'Retry',
|
|
154
|
+
skip: 'Skip',
|
|
155
|
+
progress: (current, total)=>`${current}/${total}`
|
|
156
|
+
};
|
|
157
|
+
const en_US = messages;
|
|
158
|
+
const zh_CN_messages = {
|
|
159
|
+
close: '关闭引导',
|
|
160
|
+
next: '下一步',
|
|
161
|
+
done: '知道了',
|
|
162
|
+
locating: '正在定位目录…',
|
|
163
|
+
unavailable: '此目录暂不可用,请重试或跳过这一步。',
|
|
164
|
+
retry: '重试',
|
|
165
|
+
skip: '跳过',
|
|
166
|
+
progress: (current, total)=>`${current}/${total}`
|
|
167
|
+
};
|
|
168
|
+
const zh_CN = zh_CN_messages;
|
|
169
|
+
function DirectoryTour(props) {
|
|
170
|
+
if (!props.open || 0 === props.steps.length) return null;
|
|
171
|
+
return /*#__PURE__*/ jsx(TourSession, {
|
|
172
|
+
...props
|
|
173
|
+
});
|
|
174
|
+
}
|
|
175
|
+
function TourSession(props) {
|
|
176
|
+
const [index, setIndex] = useState(props.defaultStep ?? 0);
|
|
177
|
+
const skipped = useRef(new Set());
|
|
178
|
+
const current = props.currentStep ?? index;
|
|
179
|
+
const step = props.steps[current];
|
|
180
|
+
if (!step) return null;
|
|
181
|
+
const advance = (skip)=>{
|
|
182
|
+
if (skip) skipped.current.add(step.id);
|
|
183
|
+
if (current === props.steps.length - 1) props.onComplete?.({
|
|
184
|
+
skippedStepIds: [
|
|
185
|
+
...skipped.current
|
|
186
|
+
]
|
|
187
|
+
});
|
|
188
|
+
else {
|
|
189
|
+
if (void 0 === props.currentStep) setIndex(current + 1);
|
|
190
|
+
props.onStepChange?.(current + 1);
|
|
191
|
+
}
|
|
192
|
+
};
|
|
193
|
+
return /*#__PURE__*/ jsx(TourStep, {
|
|
194
|
+
...props,
|
|
195
|
+
step: step,
|
|
196
|
+
index: current,
|
|
197
|
+
advance: advance
|
|
198
|
+
}, step.id);
|
|
199
|
+
}
|
|
200
|
+
function TourStep({ step, index, advance, steps, locateTarget, locateTimeout = 10000, placement = 'right', onClose, labels, locale, className, style }) {
|
|
201
|
+
const text = resolveLocale({
|
|
202
|
+
'en-US': en_US,
|
|
203
|
+
'zh-CN': zh_CN
|
|
204
|
+
}, locale, labels);
|
|
205
|
+
const [attempt, retry] = useState(0);
|
|
206
|
+
const [surface, setSurface] = useState(null);
|
|
207
|
+
const { anchor, failed } = useTourAnchor(step.target, locateTarget, locateTimeout, attempt);
|
|
208
|
+
const position = useTourPosition(anchor, surface, placement);
|
|
209
|
+
const titleId = useId();
|
|
210
|
+
const bodyId = useId();
|
|
211
|
+
useEffect(()=>{
|
|
212
|
+
const close = (event)=>{
|
|
213
|
+
if ('Escape' === event.key) {
|
|
214
|
+
event.preventDefault();
|
|
215
|
+
onClose?.();
|
|
216
|
+
}
|
|
217
|
+
};
|
|
218
|
+
document.addEventListener('keydown', close);
|
|
219
|
+
return ()=>document.removeEventListener('keydown', close);
|
|
220
|
+
}, [
|
|
221
|
+
onClose
|
|
222
|
+
]);
|
|
223
|
+
useEffect(()=>{
|
|
224
|
+
const previous = document.activeElement;
|
|
225
|
+
return ()=>{
|
|
226
|
+
if (previous instanceof HTMLElement && previous.isConnected) previous.focus({
|
|
227
|
+
preventScroll: true
|
|
228
|
+
});
|
|
229
|
+
};
|
|
230
|
+
}, []);
|
|
231
|
+
const visible = position?.visible;
|
|
232
|
+
useEffect(()=>{
|
|
233
|
+
if (surface && visible) surface.focus({
|
|
234
|
+
preventScroll: true
|
|
235
|
+
});
|
|
236
|
+
}, [
|
|
237
|
+
surface,
|
|
238
|
+
visible
|
|
239
|
+
]);
|
|
240
|
+
if ("u" < typeof document) return null;
|
|
241
|
+
const unavailable = failed || position?.missing;
|
|
242
|
+
const locating = !anchor && !failed;
|
|
243
|
+
return /*#__PURE__*/ createPortal(/*#__PURE__*/ jsxs("div", {
|
|
244
|
+
ref: setSurface,
|
|
245
|
+
popover: "manual",
|
|
246
|
+
role: "dialog",
|
|
247
|
+
"aria-modal": "false",
|
|
248
|
+
"aria-labelledby": titleId,
|
|
249
|
+
"aria-describedby": bodyId,
|
|
250
|
+
"aria-busy": locating,
|
|
251
|
+
tabIndex: -1,
|
|
252
|
+
className: [
|
|
253
|
+
'ov-directory-tour',
|
|
254
|
+
className
|
|
255
|
+
].filter(Boolean).join(' '),
|
|
256
|
+
style: {
|
|
257
|
+
...style,
|
|
258
|
+
top: position?.top ?? 0,
|
|
259
|
+
left: position?.left ?? 0,
|
|
260
|
+
visibility: position?.visible ? 'visible' : 'hidden'
|
|
261
|
+
},
|
|
262
|
+
children: [
|
|
263
|
+
anchor && !unavailable && position?.visible && /*#__PURE__*/ jsx("div", {
|
|
264
|
+
className: "ov-directory-tour__highlight",
|
|
265
|
+
"aria-hidden": "true",
|
|
266
|
+
style: {
|
|
267
|
+
top: position.targetTop,
|
|
268
|
+
left: position.targetLeft,
|
|
269
|
+
width: position.targetWidth,
|
|
270
|
+
height: position.targetHeight
|
|
271
|
+
}
|
|
272
|
+
}),
|
|
273
|
+
/*#__PURE__*/ jsxs("div", {
|
|
274
|
+
className: "ov-directory-tour__card",
|
|
275
|
+
children: [
|
|
276
|
+
onClose && /*#__PURE__*/ jsx("button", {
|
|
277
|
+
className: "ov-directory-tour__close",
|
|
278
|
+
type: "button",
|
|
279
|
+
"aria-label": text.close,
|
|
280
|
+
onClick: onClose,
|
|
281
|
+
children: "\xd7"
|
|
282
|
+
}),
|
|
283
|
+
!locating && !unavailable && step.illustration && /*#__PURE__*/ jsx("div", {
|
|
284
|
+
className: "ov-directory-tour__illustration",
|
|
285
|
+
children: step.illustration
|
|
286
|
+
}),
|
|
287
|
+
/*#__PURE__*/ jsx("h2", {
|
|
288
|
+
id: titleId,
|
|
289
|
+
className: "ov-directory-tour__title",
|
|
290
|
+
children: step.title
|
|
291
|
+
}),
|
|
292
|
+
/*#__PURE__*/ jsx("div", {
|
|
293
|
+
id: bodyId,
|
|
294
|
+
className: "ov-directory-tour__description",
|
|
295
|
+
role: unavailable ? 'alert' : void 0,
|
|
296
|
+
children: unavailable ? text.unavailable : locating ? text.locating : step.description
|
|
297
|
+
}),
|
|
298
|
+
/*#__PURE__*/ jsxs("footer", {
|
|
299
|
+
className: "ov-directory-tour__actions",
|
|
300
|
+
children: [
|
|
301
|
+
/*#__PURE__*/ jsx("span", {
|
|
302
|
+
className: "ov-directory-tour__progress",
|
|
303
|
+
"aria-live": "polite",
|
|
304
|
+
children: text.progress(index + 1, steps.length)
|
|
305
|
+
}),
|
|
306
|
+
unavailable ? /*#__PURE__*/ jsxs(Fragment, {
|
|
307
|
+
children: [
|
|
308
|
+
/*#__PURE__*/ jsx("button", {
|
|
309
|
+
type: "button",
|
|
310
|
+
onClick: ()=>retry((value)=>value + 1),
|
|
311
|
+
children: text.retry
|
|
312
|
+
}),
|
|
313
|
+
/*#__PURE__*/ jsx("button", {
|
|
314
|
+
type: "button",
|
|
315
|
+
onClick: ()=>advance(true),
|
|
316
|
+
children: text.skip
|
|
317
|
+
})
|
|
318
|
+
]
|
|
319
|
+
}) : /*#__PURE__*/ jsx("button", {
|
|
320
|
+
type: "button",
|
|
321
|
+
className: "ov-directory-tour__primary",
|
|
322
|
+
disabled: locating,
|
|
323
|
+
onClick: ()=>advance(false),
|
|
324
|
+
children: step.nextLabel ?? (index === steps.length - 1 ? text.done : text.next)
|
|
325
|
+
})
|
|
326
|
+
]
|
|
327
|
+
})
|
|
328
|
+
]
|
|
329
|
+
})
|
|
330
|
+
]
|
|
331
|
+
}), document.body);
|
|
332
|
+
}
|
|
333
|
+
export { DirectoryTour };
|
|
@@ -13,8 +13,42 @@ import { powerpoint } from "@ark-design/ui/file-viewer/adapters/powerpoint";
|
|
|
13
13
|
import { table } from "@ark-design/ui/file-viewer/adapters/table";
|
|
14
14
|
import { text as text_text } from "@ark-design/ui/file-viewer/adapters/text";
|
|
15
15
|
import { word } from "@ark-design/ui/file-viewer/adapters/word";
|
|
16
|
-
import { toFileSource, LoadFailedState, LoadingState, UnsupportedState } from "./
|
|
17
|
-
|
|
16
|
+
import { toFileSource, LoadFailedState, LoadingState, UnsupportedState } from "./3~0.js";
|
|
17
|
+
const PREFIX = './__ov_viking_image__/';
|
|
18
|
+
function imagePreviewTarget(url) {
|
|
19
|
+
return /^viking:\/\//i.test(url) ? PREFIX + encodeURIComponent(url) : url;
|
|
20
|
+
}
|
|
21
|
+
function originalImageTarget(url) {
|
|
22
|
+
if (!url.startsWith(PREFIX)) return url;
|
|
23
|
+
try {
|
|
24
|
+
const original = decodeURIComponent(url.slice(PREFIX.length));
|
|
25
|
+
return /^viking:\/\//i.test(original) ? original : url;
|
|
26
|
+
} catch {
|
|
27
|
+
return url;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
function preserveVikingImages(root) {
|
|
31
|
+
const definitions = new Map();
|
|
32
|
+
function collect(node) {
|
|
33
|
+
if ('definition' === node.type && node.identifier && !definitions.has(node.identifier.toUpperCase())) definitions.set(node.identifier.toUpperCase(), node);
|
|
34
|
+
node.children?.forEach(collect);
|
|
35
|
+
}
|
|
36
|
+
function visit(node) {
|
|
37
|
+
if ('image' === node.type && node.url) node.url = imagePreviewTarget(node.url);
|
|
38
|
+
if ('imageReference' === node.type && node.identifier) {
|
|
39
|
+
const definition = definitions.get(node.identifier.toUpperCase());
|
|
40
|
+
if (definition?.url && /^viking:\/\//i.test(definition.url)) {
|
|
41
|
+
node.type = 'image';
|
|
42
|
+
node.url = imagePreviewTarget(definition.url);
|
|
43
|
+
node.title = definition.title;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
node.children?.forEach(visit);
|
|
47
|
+
}
|
|
48
|
+
collect(root);
|
|
49
|
+
visit(root);
|
|
50
|
+
}
|
|
51
|
+
function createFilePreviewAdapterList({ onLinkClick, resolveImage } = {}) {
|
|
18
52
|
return [
|
|
19
53
|
code({
|
|
20
54
|
showLineNumbers: true
|
|
@@ -26,7 +60,31 @@ function createFilePreviewAdapterList({ onLinkClick } = {}) {
|
|
|
26
60
|
defaultExpandDepth: 4
|
|
27
61
|
}),
|
|
28
62
|
markdown({
|
|
29
|
-
onLinkClick
|
|
63
|
+
onLinkClick,
|
|
64
|
+
rendererProps: {
|
|
65
|
+
astPlugins: (current)=>[
|
|
66
|
+
...current,
|
|
67
|
+
{
|
|
68
|
+
name: 'ov-viking-images',
|
|
69
|
+
config: {
|
|
70
|
+
priority: 2
|
|
71
|
+
},
|
|
72
|
+
modifier: (root)=>{
|
|
73
|
+
preserveVikingImages(root);
|
|
74
|
+
},
|
|
75
|
+
before: ()=>{},
|
|
76
|
+
after: ()=>{},
|
|
77
|
+
beforeEach: ()=>{},
|
|
78
|
+
afterEach: ()=>{}
|
|
79
|
+
}
|
|
80
|
+
],
|
|
81
|
+
imageOptions: {
|
|
82
|
+
processSrcBeforeLoad: resolveImage ? (src)=>resolveImage(originalImageTarget(src)) : void 0,
|
|
83
|
+
forceHttps: false,
|
|
84
|
+
objectFit: 'contain',
|
|
85
|
+
responsiveNaturalSize: true
|
|
86
|
+
}
|
|
87
|
+
}
|
|
30
88
|
}),
|
|
31
89
|
html(),
|
|
32
90
|
table(),
|
|
@@ -44,9 +102,10 @@ function createFilePreviewAdapterList({ onLinkClick } = {}) {
|
|
|
44
102
|
diff()
|
|
45
103
|
];
|
|
46
104
|
}
|
|
47
|
-
function createFilePreviewAdapters({ onHandleChange, onViewModesChange, onLinkClick }) {
|
|
105
|
+
function createFilePreviewAdapters({ onHandleChange, onViewModesChange, onLinkClick, resolveImage }) {
|
|
48
106
|
return createFilePreviewAdapterList({
|
|
49
|
-
onLinkClick
|
|
107
|
+
onLinkClick,
|
|
108
|
+
resolveImage
|
|
50
109
|
}).map((adapter)=>{
|
|
51
110
|
const wrap = (context)=>{
|
|
52
111
|
const descriptor = adapter(context);
|
|
@@ -89,14 +148,37 @@ function sourceDeps(source) {
|
|
|
89
148
|
}
|
|
90
149
|
function FilePreviewViewer({ tab, text, locale, viewMode, onViewModeChange, onDownload, onHandleChange, onViewModesChange, onLinkClick }) {
|
|
91
150
|
const source = useMemo(()=>toFileSource(tab.source), sourceDeps(tab.source));
|
|
151
|
+
const imageInput = useRef(tab.source);
|
|
152
|
+
imageInput.current = tab.source;
|
|
153
|
+
const imageResolver = tab.resolveImage;
|
|
154
|
+
const resolveImage = useCallback((src)=>imageResolver(src, imageInput.current), [
|
|
155
|
+
imageResolver
|
|
156
|
+
]);
|
|
157
|
+
const resources = useMemo(()=>tab.resources?.flatMap((resource)=>{
|
|
158
|
+
const key = imagePreviewTarget(resource.key);
|
|
159
|
+
return key === resource.key ? [
|
|
160
|
+
resource
|
|
161
|
+
] : [
|
|
162
|
+
resource,
|
|
163
|
+
{
|
|
164
|
+
...resource,
|
|
165
|
+
key
|
|
166
|
+
}
|
|
167
|
+
];
|
|
168
|
+
}), [
|
|
169
|
+
tab.resources
|
|
170
|
+
]);
|
|
92
171
|
const adapters = useMemo(()=>createFilePreviewAdapters({
|
|
93
172
|
onHandleChange,
|
|
94
173
|
onViewModesChange,
|
|
95
|
-
onLinkClick
|
|
174
|
+
onLinkClick,
|
|
175
|
+
resolveImage: imageResolver ? resolveImage : void 0
|
|
96
176
|
}), [
|
|
97
177
|
onHandleChange,
|
|
98
178
|
onViewModesChange,
|
|
99
|
-
onLinkClick
|
|
179
|
+
onLinkClick,
|
|
180
|
+
resolveImage,
|
|
181
|
+
imageResolver
|
|
100
182
|
]);
|
|
101
183
|
const canDownload = Boolean(tab.operations?.download);
|
|
102
184
|
const latest = useRef({
|
|
@@ -177,7 +259,7 @@ function FilePreviewViewer({ tab, text, locale, viewMode, onViewModeChange, onDo
|
|
|
177
259
|
adapters: adapters,
|
|
178
260
|
className: "ov-file-preview__viewer",
|
|
179
261
|
locale: locale,
|
|
180
|
-
resources:
|
|
262
|
+
resources: resources,
|
|
181
263
|
slots: slots,
|
|
182
264
|
source: source,
|
|
183
265
|
toolbar: false,
|
package/dist/f~0.js
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useCallback, useEffect, useId, useRef, useState } from "react";
|
|
3
|
+
import { resolveLocale } from "./nx~0.js";
|
|
4
|
+
import { checkreact } from "./0~0.js";
|
|
5
|
+
import { searchreact } from "./p~0.js";
|
|
3
6
|
const SvgChevronDown = (props)=>/*#__PURE__*/ jsx("svg", {
|
|
4
7
|
xmlns: "http://www.w3.org/2000/svg",
|
|
5
8
|
width: 14,
|
|
@@ -13,6 +16,33 @@ const SvgChevronDown = (props)=>/*#__PURE__*/ jsx("svg", {
|
|
|
13
16
|
})
|
|
14
17
|
});
|
|
15
18
|
const chevron_downreact = SvgChevronDown;
|
|
19
|
+
const messages = {
|
|
20
|
+
loading: 'Loading…',
|
|
21
|
+
searchPlaceholder: 'Search',
|
|
22
|
+
empty: 'No options',
|
|
23
|
+
noMatch: 'No matches',
|
|
24
|
+
error: 'Unable to load options'
|
|
25
|
+
};
|
|
26
|
+
const en_US = messages;
|
|
27
|
+
const zh_CN_messages = {
|
|
28
|
+
loading: '加载中…',
|
|
29
|
+
searchPlaceholder: '搜索',
|
|
30
|
+
empty: '暂无选项',
|
|
31
|
+
noMatch: '没有匹配项',
|
|
32
|
+
error: '选项加载失败'
|
|
33
|
+
};
|
|
34
|
+
const zh_CN = zh_CN_messages;
|
|
35
|
+
const LOCALES = {
|
|
36
|
+
'en-US': en_US,
|
|
37
|
+
'zh-CN': zh_CN
|
|
38
|
+
};
|
|
39
|
+
function resolveScopeLabels(locale = 'en-US', labels) {
|
|
40
|
+
const defaults = resolveLocale(LOCALES, locale, labels);
|
|
41
|
+
return {
|
|
42
|
+
...defaults,
|
|
43
|
+
noMatch: labels?.noMatch ?? labels?.empty ?? defaults.noMatch
|
|
44
|
+
};
|
|
45
|
+
}
|
|
16
46
|
function moveScopeFocus(event) {
|
|
17
47
|
if (![
|
|
18
48
|
'ArrowDown',
|
|
@@ -30,46 +60,6 @@ function moveScopeFocus(event) {
|
|
|
30
60
|
const next = 'Home' === event.key ? 0 : 'End' === event.key ? options.length - 1 : 'ArrowDown' === event.key ? (current + 1) % options.length : current < 0 ? options.length - 1 : (current - 1 + options.length) % options.length;
|
|
31
61
|
options[next]?.focus();
|
|
32
62
|
}
|
|
33
|
-
const SvgCheck = (props)=>/*#__PURE__*/ jsx("svg", {
|
|
34
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
35
|
-
width: 16,
|
|
36
|
-
height: 16,
|
|
37
|
-
fill: "none",
|
|
38
|
-
viewBox: "0 0 16 16",
|
|
39
|
-
...props,
|
|
40
|
-
children: /*#__PURE__*/ jsx("path", {
|
|
41
|
-
stroke: "currentColor",
|
|
42
|
-
strokeLinecap: "round",
|
|
43
|
-
strokeLinejoin: "round",
|
|
44
|
-
strokeWidth: 1.2,
|
|
45
|
-
d: "M13.333 4 6 11.333 2.667 8"
|
|
46
|
-
})
|
|
47
|
-
});
|
|
48
|
-
const checkreact = SvgCheck;
|
|
49
|
-
const SvgSearch = (props)=>/*#__PURE__*/ jsx("svg", {
|
|
50
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
51
|
-
width: 16,
|
|
52
|
-
height: 16,
|
|
53
|
-
fill: "none",
|
|
54
|
-
viewBox: "0 0 16 16",
|
|
55
|
-
...props,
|
|
56
|
-
children: /*#__PURE__*/ jsxs("g", {
|
|
57
|
-
stroke: "currentColor",
|
|
58
|
-
strokeWidth: 1.2,
|
|
59
|
-
children: [
|
|
60
|
-
/*#__PURE__*/ jsx("circle", {
|
|
61
|
-
cx: 7.167,
|
|
62
|
-
cy: 7.167,
|
|
63
|
-
r: 4.667
|
|
64
|
-
}),
|
|
65
|
-
/*#__PURE__*/ jsx("path", {
|
|
66
|
-
strokeLinecap: "round",
|
|
67
|
-
d: "m10.667 10.667 3 3"
|
|
68
|
-
})
|
|
69
|
-
]
|
|
70
|
-
})
|
|
71
|
-
});
|
|
72
|
-
const searchreact = SvgSearch;
|
|
73
63
|
function Highlight({ text, keyword }) {
|
|
74
64
|
const needle = keyword.trim().toLocaleLowerCase();
|
|
75
65
|
if (!needle) return /*#__PURE__*/ jsx(Fragment, {
|
|
@@ -112,8 +102,8 @@ function ScopePanel({ label, data, state, slots, actions, onSelect, labels }) {
|
|
|
112
102
|
type: "search",
|
|
113
103
|
className: "ov-scope-switcher__search",
|
|
114
104
|
value: keyword,
|
|
115
|
-
"aria-label": labels
|
|
116
|
-
placeholder: labels
|
|
105
|
+
"aria-label": labels.searchPlaceholder,
|
|
106
|
+
placeholder: labels.searchPlaceholder,
|
|
117
107
|
onChange: (event)=>actions?.onSearchKeywordChange?.(event.currentTarget.value)
|
|
118
108
|
})
|
|
119
109
|
]
|
|
@@ -122,11 +112,11 @@ function ScopePanel({ label, data, state, slots, actions, onSelect, labels }) {
|
|
|
122
112
|
list = state?.loading ? /*#__PURE__*/ jsx("div", {
|
|
123
113
|
className: "ov-scope-switcher__state",
|
|
124
114
|
role: "status",
|
|
125
|
-
children: labels
|
|
115
|
+
children: labels.loading
|
|
126
116
|
}) : state?.error ? /*#__PURE__*/ jsx("div", {
|
|
127
117
|
className: "ov-scope-switcher__state",
|
|
128
118
|
role: "alert",
|
|
129
|
-
children: slots?.errorFallback ?? labels
|
|
119
|
+
children: slots?.errorFallback ?? labels.error
|
|
130
120
|
}) : options.length ? /*#__PURE__*/ jsx("div", {
|
|
131
121
|
className: "ov-scope-switcher__list",
|
|
132
122
|
role: "listbox",
|
|
@@ -195,7 +185,7 @@ function ScopePanel({ label, data, state, slots, actions, onSelect, labels }) {
|
|
|
195
185
|
}, keyword) : /*#__PURE__*/ jsx("div", {
|
|
196
186
|
className: "ov-scope-switcher__state",
|
|
197
187
|
role: "status",
|
|
198
|
-
children: slots?.emptyFallback ?? (hasKeyword ? labels
|
|
188
|
+
children: slots?.emptyFallback ?? (hasKeyword ? labels.noMatch : labels.empty)
|
|
199
189
|
});
|
|
200
190
|
return /*#__PURE__*/ jsx("div", {
|
|
201
191
|
role: "group",
|
|
@@ -216,7 +206,8 @@ function ScopePanel({ label, data, state, slots, actions, onSelect, labels }) {
|
|
|
216
206
|
});
|
|
217
207
|
}
|
|
218
208
|
function ScopeSelector(props) {
|
|
219
|
-
const { identity, trigger: triggerContent,
|
|
209
|
+
const { identity, trigger: triggerContent, locale } = props;
|
|
210
|
+
const labels = resolveScopeLabels(locale, props.labels);
|
|
220
211
|
const selectable = 'selectable' === props.kind ? props : void 0;
|
|
221
212
|
const data = selectable?.data;
|
|
222
213
|
const state = selectable?.state;
|
|
@@ -346,8 +337,9 @@ function ScopeSelector(props) {
|
|
|
346
337
|
]
|
|
347
338
|
});
|
|
348
339
|
}
|
|
349
|
-
function ScopeSwitcher({ children, className = '', ...props }) {
|
|
340
|
+
function ScopeSwitcher({ locale, children, className = '', ...props }) {
|
|
350
341
|
return /*#__PURE__*/ jsx("div", {
|
|
342
|
+
lang: locale,
|
|
351
343
|
...props,
|
|
352
344
|
className: `ov-scope-switcher ${className}`,
|
|
353
345
|
children: children
|
package/dist/h~0.js
CHANGED
|
@@ -10,6 +10,7 @@ function groupMessages(messages) {
|
|
|
10
10
|
];
|
|
11
11
|
previous.turnId ??= message.turnId;
|
|
12
12
|
previous.streaming = previous.streaming || message.streaming;
|
|
13
|
+
previous.createdAt = message.createdAt ?? previous.createdAt;
|
|
13
14
|
if (message.action) previous.actions = [
|
|
14
15
|
...previous.actions ?? [],
|
|
15
16
|
{
|
|
@@ -42,7 +43,10 @@ function groupByActivity(parts) {
|
|
|
42
43
|
for (const part of parts){
|
|
43
44
|
const groupId = 'groupId' in part ? part.groupId : void 0;
|
|
44
45
|
const previous = blocks.at(-1);
|
|
45
|
-
|
|
46
|
+
const activity = 'reasoning' === part.type || 'tool' === part.type;
|
|
47
|
+
const previousType = previous?.parts[0]?.type;
|
|
48
|
+
const previousActivity = 'reasoning' === previousType || 'tool' === previousType;
|
|
49
|
+
if (previous && groupId && previous.groupId === groupId && activity === previousActivity) {
|
|
46
50
|
previous.parts.push(part);
|
|
47
51
|
continue;
|
|
48
52
|
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
declare const icons: {
|
|
2
|
+
conversation: import("react").FunctionComponent<import("react").SVGProps<SVGSVGElement>>;
|
|
3
|
+
command: import("react").FunctionComponent<import("react").SVGProps<SVGSVGElement>>;
|
|
4
|
+
history: import("react").FunctionComponent<import("react").SVGProps<SVGSVGElement>>;
|
|
5
|
+
newSession: import("react").FunctionComponent<import("react").SVGProps<SVGSVGElement>>;
|
|
6
|
+
historyEmpty: import("react").FunctionComponent<import("react").SVGProps<SVGSVGElement>>;
|
|
7
|
+
};
|
|
8
|
+
/** Private Console controls. Sources and licenses are in packages/icons/README.md. */
|
|
9
|
+
export declare function ConsoleIcon({ name }: {
|
|
10
|
+
name: keyof typeof icons;
|
|
11
|
+
}): import("react").JSX.Element;
|
|
12
|
+
export {};
|
package/dist/icons/index.d.ts
CHANGED
|
@@ -31,3 +31,5 @@ export declare const VideoIcon: IconComponent;
|
|
|
31
31
|
export declare const WordIcon: IconComponent;
|
|
32
32
|
export { getFileTypeColor, getFileTypeIcon, resolveFileTypeIconKey, } from './file-type-icon.js';
|
|
33
33
|
export type { FileTypeIconComponent } from './file-type-icon.js';
|
|
34
|
+
export { VikingBotIcon } from './viking-bot-icons.js';
|
|
35
|
+
export type { VikingBotIconName } from './viking-bot-icons.js';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { SVGProps } from 'react';
|
|
2
|
+
export type VikingBotIconName = 'bulb' | 'book' | 'video' | 'report' | 'history' | 'newSession' | 'remove' | 'tool';
|
|
3
|
+
/** Reference artwork and the local remove glyph. See packages/icons/README.md. */
|
|
4
|
+
export declare function VikingBotIcon({ name, 'aria-label': ariaLabel, ...props }: SVGProps<SVGSVGElement> & {
|
|
5
|
+
name: VikingBotIconName;
|
|
6
|
+
}): import("react").JSX.Element;
|
package/dist/icons.js
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -16,3 +16,5 @@ export { Console } from './modules/console/index.js';
|
|
|
16
16
|
export type { ConsoleProps } from './modules/console/index.js';
|
|
17
17
|
export { ScopeCascade } from './modules/scope-cascade/index.js';
|
|
18
18
|
export type { ScopeCascadeProps } from './modules/scope-cascade/index.js';
|
|
19
|
+
export { DirectoryTour } from './components/directory-tour/index.js';
|
|
20
|
+
export type { DirectoryTourProps } from './components/directory-tour/index.js';
|