@openviking/react 0.1.1 → 0.1.3
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/README.md +18 -15
- package/dist/1~0.js +506 -0
- package/dist/2~0.js +122 -0
- package/dist/30~0.js +1332 -0
- package/dist/3~0.js +2113 -4
- package/dist/ark-message-list-view~0.js +310 -0
- package/dist/c7~0.js +24 -0
- package/dist/client/index.d.ts +2 -1
- package/dist/client/paths.d.ts +64 -0
- package/dist/client/response.d.ts +31 -0
- package/dist/client/sse.d.ts +39 -0
- package/dist/client/stream.d.ts +26 -0
- package/dist/client/types.d.ts +104 -0
- package/dist/client.js +1 -239
- package/dist/components/agent-connect/agent-connect-copy.d.ts +34 -0
- package/dist/components/agent-connect/agent-connect-design.d.ts +1781 -0
- package/dist/components/agent-connect/agent-connect-detail.d.ts +13 -0
- package/dist/components/agent-connect/agent-connect-installer.d.ts +3 -0
- package/dist/components/agent-connect/agent-connect-instructions-view.d.ts +14 -0
- package/dist/components/agent-connect/agent-connect-instructions.d.ts +145 -0
- package/dist/components/agent-connect/agent-connect-markdown.d.ts +3 -0
- package/dist/components/agent-connect/agent-connect.d.ts +3 -3
- package/dist/components/agent-connect/content-en.d.ts +137 -0
- package/dist/components/agent-connect/content-zh.d.ts +137 -0
- package/dist/components/agent-connect/style.css +495 -6
- package/dist/components/agent-connect/types.d.ts +20 -166
- package/dist/components/file-browser-entries/file-browser-entries-icons.d.ts +18 -0
- package/dist/components/file-browser-entries/file-browser-entries.d.ts +14 -0
- package/dist/components/file-browser-entries/index.d.ts +1 -0
- package/dist/components/file-browser-entries/style.css +155 -0
- package/dist/components/file-browser-entries/types.d.ts +45 -0
- package/dist/components/file-browser-entries.js +1 -0
- package/dist/components/file-preview/file-preview-adapters.d.ts +33 -0
- package/dist/components/file-preview/file-preview-body.d.ts +24 -12
- package/dist/components/file-preview/file-preview-breadcrumb-menu.d.ts +16 -0
- package/dist/components/file-preview/file-preview-breadcrumb.d.ts +21 -0
- package/dist/components/file-preview/file-preview-copy-path.d.ts +12 -0
- package/dist/components/file-preview/file-preview-directory.d.ts +32 -0
- package/dist/components/file-preview/file-preview-editor.d.ts +22 -0
- package/dist/components/file-preview/file-preview-handle-adapters.d.ts +26 -0
- package/dist/components/file-preview/file-preview-header.d.ts +41 -14
- package/dist/components/file-preview/file-preview-labels.d.ts +15 -4
- package/dist/components/file-preview/file-preview-lazy-viewer.d.ts +3 -0
- package/dist/components/file-preview/file-preview-panels.d.ts +41 -0
- package/dist/components/file-preview/file-preview-path.d.ts +30 -0
- package/dist/components/file-preview/file-preview-source.d.ts +24 -0
- package/dist/components/file-preview/file-preview-state.d.ts +35 -0
- package/dist/components/file-preview/file-preview-tab-row.d.ts +16 -0
- package/dist/components/file-preview/file-preview-viewer.d.ts +31 -0
- package/dist/components/file-preview/file-preview.d.ts +9 -11
- package/dist/components/file-preview/level-selection.d.ts +25 -0
- package/dist/components/file-preview/style.css +4055 -126
- package/dist/components/file-preview/types.d.ts +350 -170
- package/dist/components/file-preview/use-directory-level.d.ts +30 -0
- package/dist/components/file-preview/use-file-preview-actions-context.d.ts +27 -0
- package/dist/components/file-preview/use-file-preview-actions.d.ts +19 -0
- package/dist/components/file-preview/use-file-preview-editing.d.ts +21 -2
- package/dist/components/file-preview/use-file-preview-ids.d.ts +24 -0
- package/dist/components/file-preview.js +1 -442
- package/dist/components/file-tree/file-tree-body.d.ts +8 -4
- package/dist/components/file-tree/file-tree-entry-row.d.ts +9 -3
- package/dist/components/file-tree/file-tree-icons.d.ts +12 -5
- package/dist/components/file-tree/file-tree-info-labels.d.ts +21 -0
- package/dist/components/file-tree/file-tree-info-tooltip.d.ts +43 -0
- package/dist/components/file-tree/file-tree-info.d.ts +29 -0
- package/dist/components/file-tree/file-tree-keyboard.d.ts +8 -4
- package/dist/components/file-tree/file-tree-row-context.d.ts +29 -12
- package/dist/components/file-tree/file-tree-row-shared.d.ts +18 -0
- package/dist/components/file-tree/file-tree-spinner.d.ts +10 -0
- package/dist/components/file-tree/file-tree-state-row.d.ts +7 -0
- package/dist/components/file-tree/file-tree-tooltip-surface.d.ts +22 -0
- package/dist/components/file-tree/file-tree.d.ts +12 -1
- package/dist/components/file-tree/style.css +280 -75
- package/dist/components/file-tree/types.d.ts +203 -0
- package/dist/components/file-tree/use-file-tree-actions.d.ts +7 -0
- package/dist/components/file-tree.js +1 -1
- package/dist/components/scope-switcher/scope-panel.d.ts +9 -3
- package/dist/components/scope-switcher/scope-selector.d.ts +1 -1
- package/dist/components/scope-switcher/scope-switcher.d.ts +1 -1
- package/dist/components/scope-switcher/style.css +282 -76
- package/dist/components/scope-switcher/types.d.ts +230 -108
- package/dist/components/style.css +14128 -390
- package/dist/components/tui/command-catalog.d.ts +58 -0
- package/dist/components/tui/command-completion.d.ts +19 -0
- package/dist/components/tui/command-definitions.d.ts +10 -0
- package/dist/components/tui/command-input.d.ts +16 -0
- package/dist/components/tui/style.css +1543 -5
- package/dist/components/tui/tui-assist.d.ts +15 -0
- package/dist/components/tui/tui-code-block.d.ts +8 -0
- package/dist/components/tui/tui-command-help.d.ts +9 -0
- package/dist/components/tui/tui-command-text.d.ts +6 -0
- package/dist/components/tui/tui-composer.d.ts +24 -0
- package/dist/components/tui/tui-copy-button.d.ts +9 -0
- package/dist/components/tui/tui-input-mirror.d.ts +14 -0
- package/dist/components/tui/tui-labels-zh.d.ts +2 -0
- package/dist/components/tui/tui-labels.d.ts +5 -0
- package/dist/components/tui/tui-markdown-renderers.d.ts +10 -0
- package/dist/components/tui/tui-markdown.d.ts +6 -0
- package/dist/components/tui/tui-param-hint.d.ts +7 -0
- package/dist/components/tui/tui-record-time.d.ts +11 -0
- package/dist/components/tui/tui-record.d.ts +13 -0
- package/dist/components/tui/tui-resource-preview.d.ts +10 -0
- package/dist/components/tui/tui-resource-tree.d.ts +10 -0
- package/dist/components/tui/tui-result-header.d.ts +7 -0
- package/dist/components/tui/tui-result-text.d.ts +5 -0
- package/dist/components/tui/tui-search-list.d.ts +8 -0
- package/dist/components/tui/tui-skeleton.d.ts +6 -0
- package/dist/components/tui/tui-status-card.d.ts +7 -0
- package/dist/components/tui/tui-text.d.ts +10 -0
- package/dist/components/tui/tui-uri-text.d.ts +19 -0
- package/dist/components/tui/tui-write-result.d.ts +7 -0
- package/dist/components/tui/tui.d.ts +10 -2
- package/dist/components/tui/types.d.ts +57 -15
- package/dist/components/tui/use-tui-assist-position.d.ts +3 -0
- package/dist/components/tui/use-tui-completion.d.ts +14 -0
- package/dist/components/tui/use-tui-composer-keyboard.d.ts +25 -0
- package/dist/components/viking-bot/ark-adapter.d.ts +45 -0
- package/dist/components/viking-bot/ark-message-body.d.ts +16 -0
- package/dist/components/viking-bot/ark-message-list-view.d.ts +7 -0
- package/dist/components/viking-bot/ark-message-row.d.ts +19 -0
- package/dist/components/viking-bot/index.d.ts +10 -0
- package/dist/components/viking-bot/interaction/ask-human-fields.d.ts +10 -0
- package/dist/components/viking-bot/interaction/index.d.ts +4 -0
- package/dist/components/viking-bot/interaction/labels.d.ts +7 -0
- package/dist/components/viking-bot/interaction/lazy-interaction.d.ts +3 -0
- package/dist/components/viking-bot/interaction/schedule-input.d.ts +13 -0
- package/dist/components/viking-bot/interaction/style.css +189 -0
- package/dist/components/viking-bot/interaction/style.js +0 -0
- package/dist/components/viking-bot/interaction/types.d.ts +188 -0
- package/dist/components/viking-bot/interaction/viking-bot-interaction.d.ts +9 -0
- package/dist/components/viking-bot/interaction.js +2 -0
- package/dist/components/viking-bot/labels.d.ts +2 -0
- package/dist/components/viking-bot/lazy-composer.d.ts +3 -0
- package/dist/components/viking-bot/message-groups.d.ts +12 -0
- package/dist/components/viking-bot/model.d.ts +252 -0
- package/dist/components/viking-bot/render-part.d.ts +12 -0
- package/dist/components/viking-bot/style.css +7135 -0
- package/dist/components/viking-bot/style.js +0 -0
- package/dist/components/viking-bot/types.d.ts +140 -0
- package/dist/components/viking-bot/viking-bot-composer.d.ts +6 -0
- package/dist/components/viking-bot/viking-bot-message-list.d.ts +3 -0
- package/dist/components/viking-bot/viking-bot.d.ts +16 -0
- package/dist/components/viking-bot.js +4 -0
- package/dist/c~0.js +201 -0
- package/dist/file-preview-viewer~0.js +191 -0
- package/dist/f~0.js +149 -77
- package/dist/h~0.js +58 -0
- package/dist/icons/file-type-icon.d.ts +31 -0
- package/dist/icons/index.d.ts +33 -23
- package/dist/icons/nextjs-icon.d.ts +19 -0
- package/dist/icons.js +1 -25
- package/dist/index.d.ts +4 -2
- package/dist/index.js +2 -1
- package/dist/k~0.js +1440 -0
- package/dist/lk~0.js +25 -12
- package/dist/l~0.js +1464 -25
- package/dist/modules/console/style.css +83 -1
- package/dist/modules/file-browser/file-browser-detail-icons.d.ts +10 -0
- package/dist/modules/file-browser/file-browser-detail.d.ts +33 -0
- package/dist/modules/file-browser/file-browser-empty.d.ts +3 -0
- package/dist/modules/file-browser/file-browser-failure.d.ts +22 -0
- package/dist/modules/file-browser/file-browser-icons.d.ts +18 -0
- package/dist/modules/file-browser/file-browser-labels.d.ts +28 -0
- package/dist/modules/file-browser/file-browser-layout.d.ts +27 -0
- package/dist/modules/file-browser/file-browser-toolbar.d.ts +18 -0
- package/dist/modules/file-browser/file-browser-tree-pane.d.ts +30 -0
- package/dist/modules/file-browser/file-browser.d.ts +14 -5
- package/dist/modules/file-browser/find-result.d.ts +24 -0
- package/dist/modules/file-browser/fs-directories.d.ts +33 -0
- package/dist/modules/file-browser/fs-file-kind.d.ts +19 -0
- package/dist/modules/file-browser/fs-icon.d.ts +17 -0
- package/dist/modules/file-browser/fs-model.d.ts +106 -0
- package/dist/modules/file-browser/fs-page.d.ts +16 -0
- package/dist/modules/file-browser/fs-path.d.ts +16 -0
- package/dist/modules/file-browser/fs-read-directory.d.ts +20 -0
- package/dist/modules/file-browser/fs-scope.d.ts +22 -0
- package/dist/modules/file-browser/fs-stat.d.ts +25 -0
- package/dist/modules/file-browser/index.d.ts +3 -1
- package/dist/modules/file-browser/style.css +5009 -34
- package/dist/modules/file-browser/tree-info-copy.d.ts +15 -0
- package/dist/modules/file-browser/tree-info-copy.zh-CN.d.ts +15 -0
- package/dist/modules/file-browser/types.d.ts +189 -44
- package/dist/modules/file-browser/use-container-width.d.ts +17 -0
- package/dist/modules/file-browser/use-file-browser.d.ts +49 -0
- package/dist/modules/file-browser/use-fs-preview.d.ts +51 -0
- package/dist/modules/file-browser/use-fs-search.d.ts +35 -0
- package/dist/modules/file-browser/use-fs-tree.d.ts +43 -0
- package/dist/modules/file-browser/use-request-scope.d.ts +39 -0
- package/dist/modules/file-browser.js +1 -1
- package/dist/modules/scope-cascade/style.css +282 -76
- package/dist/modules/style.css +5445 -130
- package/dist/n~0.js +568 -236
- package/dist/o~0.js +103 -0
- package/dist/shared/components/divider/divider.d.ts +18 -0
- package/dist/shared/components/divider/index.d.ts +1 -0
- package/dist/shared/components/divider/types.d.ts +35 -0
- package/dist/shared/components/overlay/types.d.ts +7 -0
- package/dist/shared/components/overlay/use-overlay-position.d.ts +38 -0
- package/dist/shared/components/popover/index.d.ts +1 -0
- package/dist/shared/components/popover/popover.d.ts +23 -0
- package/dist/shared/components/popover/types.d.ts +50 -0
- package/dist/shared/components/resizable/clamp.d.ts +13 -0
- package/dist/shared/components/resizable/index.d.ts +2 -0
- package/dist/shared/components/resizable/resizable-handle.d.ts +25 -0
- package/dist/shared/components/resizable/types.d.ts +48 -0
- package/dist/shared/components/tooltip/index.d.ts +1 -0
- package/dist/shared/components/tooltip/tooltip.d.ts +25 -0
- package/dist/shared/components/tooltip/types.d.ts +42 -0
- package/dist/style.css +19664 -530
- package/dist/u~0.js +1597 -4
- package/dist/viking-bot-composer~0.js +164 -0
- package/dist/viking-bot-interaction~0.js +284 -0
- package/dist/w~0.js +19 -0
- package/package.json +23 -10
- package/dist/components/file-preview/file-preview-icons.d.ts +0 -2
- package/dist/components/file-preview/file-preview-operations.d.ts +0 -1
- package/dist/components/file-tree/file-tree-dom.d.ts +0 -4
- package/dist/components/file-tree/file-tree-labels.d.ts +0 -5
- package/dist/components/file-tree/file-tree-rows.d.ts +0 -12
- package/dist/components/file-tree/file-tree-tooltip.d.ts +0 -11
- package/dist/i~0.js +0 -21
- package/dist/modules/file-browser/file-browser-toolbar-button.d.ts +0 -10
- package/dist/modules/task-center/columns.d.ts +0 -129
- package/dist/modules/task-center/index.d.ts +0 -1
- package/dist/modules/task-center/style.css +0 -29
- package/dist/modules/task-center/task-center.d.ts +0 -4
- package/dist/modules/task-center/types.d.ts +0 -168
- package/dist/modules/task-center.js +0 -1
- /package/dist/{modules/task-center → components/file-browser-entries}/style.js +0 -0
package/dist/f~0.js
CHANGED
|
@@ -1,6 +1,18 @@
|
|
|
1
1
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useCallback, useEffect, useId, useRef, useState } from "react";
|
|
3
|
-
const
|
|
3
|
+
const SvgChevronDown = (props)=>/*#__PURE__*/ jsx("svg", {
|
|
4
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
5
|
+
width: 14,
|
|
6
|
+
height: 14,
|
|
7
|
+
fill: "none",
|
|
8
|
+
viewBox: "0 0 14 14",
|
|
9
|
+
...props,
|
|
10
|
+
children: /*#__PURE__*/ jsx("path", {
|
|
11
|
+
fill: "currentColor",
|
|
12
|
+
d: "M9.607 5.232a.437.437 0 1 1 .619.619L7.309 8.768a.437.437 0 0 1-.618 0L3.774 5.85a.437.437 0 1 1 .619-.619L7 7.84z"
|
|
13
|
+
})
|
|
14
|
+
});
|
|
15
|
+
const chevron_downreact = SvgChevronDown;
|
|
4
16
|
function moveScopeFocus(event) {
|
|
5
17
|
if (![
|
|
6
18
|
'ArrowDown',
|
|
@@ -18,61 +30,118 @@ function moveScopeFocus(event) {
|
|
|
18
30
|
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;
|
|
19
31
|
options[next]?.focus();
|
|
20
32
|
}
|
|
21
|
-
const
|
|
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;
|
|
22
73
|
function Highlight({ text, keyword }) {
|
|
23
|
-
const
|
|
24
|
-
if (!
|
|
74
|
+
const needle = keyword.trim().toLocaleLowerCase();
|
|
75
|
+
if (!needle) return /*#__PURE__*/ jsx(Fragment, {
|
|
25
76
|
children: text
|
|
26
77
|
});
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
78
|
+
const haystack = text.toLocaleLowerCase();
|
|
79
|
+
const parts = [];
|
|
80
|
+
let cursor = 0;
|
|
81
|
+
let hit = haystack.indexOf(needle);
|
|
82
|
+
while(hit >= 0){
|
|
83
|
+
if (hit > cursor) parts.push(text.slice(cursor, hit));
|
|
84
|
+
const end = hit + needle.length;
|
|
85
|
+
parts.push(/*#__PURE__*/ jsx("mark", {
|
|
86
|
+
children: text.slice(hit, end)
|
|
87
|
+
}, `${hit}-${end}`));
|
|
88
|
+
cursor = end;
|
|
89
|
+
hit = haystack.indexOf(needle, cursor);
|
|
90
|
+
}
|
|
91
|
+
if (cursor < text.length) parts.push(text.slice(cursor));
|
|
92
|
+
return /*#__PURE__*/ jsx(Fragment, {
|
|
93
|
+
children: parts
|
|
35
94
|
});
|
|
36
95
|
}
|
|
37
|
-
function ScopePanel({
|
|
96
|
+
function ScopePanel({ label, data, state, slots, actions, onSelect, labels }) {
|
|
38
97
|
const focusPanel = useCallback((node)=>{
|
|
39
98
|
const target = node?.querySelector('input') ?? node?.querySelector('[role="option"][aria-selected="true"]:not([aria-disabled="true"])') ?? node?.querySelector('[role="option"]:not([aria-disabled="true"])');
|
|
40
99
|
(target ?? node)?.focus();
|
|
41
100
|
}, []);
|
|
42
|
-
const
|
|
43
|
-
const
|
|
44
|
-
const
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
101
|
+
const options = data.visibleOptions ?? data.options;
|
|
102
|
+
const keyword = state?.searchKeyword ?? '';
|
|
103
|
+
const hasKeyword = keyword.trim().length > 0;
|
|
104
|
+
const searchVisible = actions?.onSearchKeywordChange && (hasKeyword || Math.max(options.length, data.options.length, data.total ?? 0) > 10);
|
|
105
|
+
const search = searchVisible ? /*#__PURE__*/ jsxs("div", {
|
|
106
|
+
className: "ov-scope-switcher__search-field",
|
|
107
|
+
children: [
|
|
108
|
+
/*#__PURE__*/ jsx(searchreact, {
|
|
109
|
+
className: "ov-scope-switcher__search-icon"
|
|
110
|
+
}),
|
|
111
|
+
/*#__PURE__*/ jsx("input", {
|
|
112
|
+
type: "search",
|
|
113
|
+
className: "ov-scope-switcher__search",
|
|
114
|
+
value: keyword,
|
|
115
|
+
"aria-label": labels?.searchPlaceholder ?? 'Search',
|
|
116
|
+
placeholder: labels?.searchPlaceholder ?? 'Search',
|
|
117
|
+
onChange: (event)=>actions?.onSearchKeywordChange?.(event.currentTarget.value)
|
|
118
|
+
})
|
|
119
|
+
]
|
|
51
120
|
}) : null;
|
|
52
121
|
let list;
|
|
53
|
-
list =
|
|
122
|
+
list = state?.loading ? /*#__PURE__*/ jsx("div", {
|
|
54
123
|
className: "ov-scope-switcher__state",
|
|
55
124
|
role: "status",
|
|
56
125
|
children: labels?.loading ?? 'Loading…'
|
|
57
|
-
}) :
|
|
126
|
+
}) : state?.error ? /*#__PURE__*/ jsx("div", {
|
|
58
127
|
className: "ov-scope-switcher__state",
|
|
59
128
|
role: "alert",
|
|
60
|
-
children:
|
|
61
|
-
}) :
|
|
129
|
+
children: slots?.errorFallback ?? labels?.error ?? 'Unable to load options'
|
|
130
|
+
}) : options.length ? /*#__PURE__*/ jsx("div", {
|
|
62
131
|
className: "ov-scope-switcher__list",
|
|
63
132
|
role: "listbox",
|
|
64
|
-
"aria-label":
|
|
65
|
-
"aria-busy":
|
|
133
|
+
"aria-label": label,
|
|
134
|
+
"aria-busy": state?.busy,
|
|
66
135
|
onScroll: (event)=>{
|
|
67
136
|
const { scrollTop, scrollHeight, clientHeight } = event.currentTarget;
|
|
68
|
-
|
|
137
|
+
actions?.onScroll?.({
|
|
69
138
|
scrollTop,
|
|
70
139
|
scrollHeight,
|
|
71
140
|
clientHeight
|
|
72
141
|
});
|
|
73
142
|
},
|
|
74
|
-
children:
|
|
75
|
-
const selected = option.id ===
|
|
143
|
+
children: options.map((option)=>{
|
|
144
|
+
const selected = option.id === data.selectedId;
|
|
76
145
|
const content = /*#__PURE__*/ jsxs(Fragment, {
|
|
77
146
|
children: [
|
|
78
147
|
option.icon && /*#__PURE__*/ jsx("span", {
|
|
@@ -97,51 +166,48 @@ function ScopePanel({ level, labels }) {
|
|
|
97
166
|
selected && /*#__PURE__*/ jsx("span", {
|
|
98
167
|
className: "ov-scope-switcher__check",
|
|
99
168
|
"aria-hidden": "true",
|
|
100
|
-
children: /*#__PURE__*/ jsx(
|
|
101
|
-
src: checkinline_namespaceObject,
|
|
102
|
-
alt: "",
|
|
103
|
-
width: 16,
|
|
104
|
-
height: 16
|
|
105
|
-
})
|
|
169
|
+
children: /*#__PURE__*/ jsx(checkreact, {})
|
|
106
170
|
})
|
|
107
171
|
]
|
|
108
172
|
});
|
|
109
173
|
return /*#__PURE__*/ jsx("div", {
|
|
110
|
-
tabIndex: option.disabled ||
|
|
174
|
+
tabIndex: option.disabled || state?.busy ? -1 : 0,
|
|
111
175
|
role: "option",
|
|
112
176
|
"aria-selected": selected,
|
|
113
177
|
className: "ov-scope-switcher__option",
|
|
114
178
|
title: option.label,
|
|
115
|
-
"aria-disabled": option.disabled ||
|
|
179
|
+
"aria-disabled": option.disabled || state?.busy || void 0,
|
|
116
180
|
onClick: (event)=>{
|
|
117
181
|
const target = event.target;
|
|
118
|
-
if (option.disabled ||
|
|
119
|
-
|
|
182
|
+
if (option.disabled || state?.busy || target.closest('button, a, input, select, textarea, [role="button"]')) return;
|
|
183
|
+
onSelect(option);
|
|
120
184
|
},
|
|
121
185
|
onKeyDown: (event)=>{
|
|
122
|
-
if (event.target !== event.currentTarget || option.disabled ||
|
|
186
|
+
if (event.target !== event.currentTarget || option.disabled || state?.busy) return;
|
|
123
187
|
if ('Enter' === event.key || ' ' === event.key) {
|
|
124
188
|
event.preventDefault();
|
|
125
|
-
|
|
189
|
+
onSelect(option);
|
|
126
190
|
}
|
|
127
191
|
},
|
|
128
|
-
children:
|
|
192
|
+
children: slots?.renderOption ? slots?.renderOption(content, option) : content
|
|
129
193
|
}, option.id);
|
|
130
194
|
})
|
|
131
195
|
}, keyword) : /*#__PURE__*/ jsx("div", {
|
|
132
196
|
className: "ov-scope-switcher__state",
|
|
133
197
|
role: "status",
|
|
134
|
-
children:
|
|
198
|
+
children: slots?.emptyFallback ?? (hasKeyword ? labels?.noMatch ?? labels?.empty ?? 'No matches' : labels?.empty ?? 'No options')
|
|
135
199
|
});
|
|
136
200
|
return /*#__PURE__*/ jsx("div", {
|
|
137
201
|
role: "group",
|
|
138
202
|
tabIndex: -1,
|
|
139
203
|
ref: focusPanel,
|
|
204
|
+
className: "ov-scope-switcher__panel-inner",
|
|
140
205
|
onKeyDownCapture: moveScopeFocus,
|
|
141
|
-
children:
|
|
206
|
+
children: slots?.renderPanel ? slots?.renderPanel({
|
|
142
207
|
search,
|
|
143
208
|
list
|
|
144
|
-
}) : /*#__PURE__*/ jsxs(
|
|
209
|
+
}) : /*#__PURE__*/ jsxs("div", {
|
|
210
|
+
className: "ov-scope-switcher__panel-body",
|
|
145
211
|
children: [
|
|
146
212
|
search,
|
|
147
213
|
list
|
|
@@ -149,14 +215,20 @@ function ScopePanel({ level, labels }) {
|
|
|
149
215
|
})
|
|
150
216
|
});
|
|
151
217
|
}
|
|
152
|
-
function ScopeSelector(
|
|
218
|
+
function ScopeSelector(props) {
|
|
219
|
+
const { identity, trigger: triggerContent, labels } = props;
|
|
220
|
+
const selectable = 'selectable' === props.kind ? props : void 0;
|
|
221
|
+
const data = selectable?.data;
|
|
222
|
+
const state = selectable?.state;
|
|
223
|
+
const actions = selectable?.actions;
|
|
224
|
+
const slots = selectable?.slots;
|
|
153
225
|
const [localVisible, setLocalVisible] = useState(false);
|
|
154
226
|
const root = useRef(null);
|
|
155
227
|
const trigger = useRef(null);
|
|
156
228
|
const restoreSelectionFocus = useRef(false);
|
|
157
229
|
const panelId = useId();
|
|
158
|
-
const open =
|
|
159
|
-
const onVisibleChange =
|
|
230
|
+
const open = void 0 !== selectable && (state?.visible ?? localVisible) && !state?.disabled;
|
|
231
|
+
const onVisibleChange = actions?.onVisibleChange;
|
|
160
232
|
const changeVisible = useCallback((visible)=>{
|
|
161
233
|
setLocalVisible(visible);
|
|
162
234
|
onVisibleChange?.(visible);
|
|
@@ -192,20 +264,23 @@ function ScopeSelector({ level, labels }) {
|
|
|
192
264
|
}, [
|
|
193
265
|
open
|
|
194
266
|
]);
|
|
267
|
+
const selected = data?.options.find((o)=>o.id === data.selectedId);
|
|
268
|
+
const label = triggerContent?.label ?? selected?.label ?? '';
|
|
269
|
+
const icon = triggerContent?.icon ?? selected?.icon;
|
|
195
270
|
const content = /*#__PURE__*/ jsxs(Fragment, {
|
|
196
271
|
children: [
|
|
197
|
-
|
|
272
|
+
icon && /*#__PURE__*/ jsx("span", {
|
|
198
273
|
className: "ov-scope-switcher__icon",
|
|
199
274
|
"aria-hidden": "true",
|
|
200
|
-
children:
|
|
275
|
+
children: icon
|
|
201
276
|
}),
|
|
202
277
|
/*#__PURE__*/ jsx("span", {
|
|
203
278
|
className: "ov-scope-switcher__label",
|
|
204
|
-
children:
|
|
279
|
+
children: label
|
|
205
280
|
}),
|
|
206
|
-
|
|
281
|
+
identity.tag && /*#__PURE__*/ jsx("span", {
|
|
207
282
|
className: "ov-scope-switcher__tag",
|
|
208
|
-
children:
|
|
283
|
+
children: identity.tag
|
|
209
284
|
})
|
|
210
285
|
]
|
|
211
286
|
});
|
|
@@ -217,18 +292,18 @@ function ScopeSelector({ level, labels }) {
|
|
|
217
292
|
if (open && event.relatedTarget instanceof Node && !event.currentTarget.contains(event.relatedTarget)) changeVisible(false);
|
|
218
293
|
},
|
|
219
294
|
children: [
|
|
220
|
-
|
|
295
|
+
void 0 === selectable ? /*#__PURE__*/ jsx("span", {
|
|
221
296
|
className: "ov-scope-switcher__trigger",
|
|
222
|
-
"aria-label":
|
|
223
|
-
title:
|
|
297
|
+
"aria-label": identity.ariaLabel,
|
|
298
|
+
title: label,
|
|
224
299
|
children: content
|
|
225
300
|
}) : /*#__PURE__*/ jsxs("button", {
|
|
226
301
|
ref: trigger,
|
|
227
302
|
type: "button",
|
|
228
303
|
className: "ov-scope-switcher__trigger",
|
|
229
|
-
"aria-label":
|
|
230
|
-
title:
|
|
231
|
-
disabled:
|
|
304
|
+
"aria-label": identity.ariaLabel,
|
|
305
|
+
title: label,
|
|
306
|
+
disabled: state?.disabled,
|
|
232
307
|
"aria-expanded": open,
|
|
233
308
|
"aria-haspopup": "dialog",
|
|
234
309
|
"aria-controls": open ? panelId : void 0,
|
|
@@ -245,28 +320,25 @@ function ScopeSelector({ level, labels }) {
|
|
|
245
320
|
/*#__PURE__*/ jsx("span", {
|
|
246
321
|
className: "ov-scope-switcher__arrow",
|
|
247
322
|
"aria-hidden": "true",
|
|
248
|
-
children: /*#__PURE__*/ jsx(
|
|
249
|
-
src: chevron_downinline_namespaceObject,
|
|
250
|
-
alt: "",
|
|
251
|
-
width: 14,
|
|
252
|
-
height: 14
|
|
253
|
-
})
|
|
323
|
+
children: /*#__PURE__*/ jsx(chevron_downreact, {})
|
|
254
324
|
})
|
|
255
325
|
]
|
|
256
326
|
}),
|
|
257
|
-
open &&
|
|
327
|
+
open && void 0 !== selectable && void 0 !== data && /*#__PURE__*/ jsx("div", {
|
|
258
328
|
id: panelId,
|
|
259
|
-
className:
|
|
329
|
+
className: slots?.renderPanel ? 'ov-scope-switcher__panel ov-scope-switcher__panel--custom' : 'ov-scope-switcher__panel',
|
|
260
330
|
role: "dialog",
|
|
261
|
-
"aria-label":
|
|
331
|
+
"aria-label": identity.ariaLabel ?? label,
|
|
262
332
|
children: /*#__PURE__*/ jsx(ScopePanel, {
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
333
|
+
label: identity.ariaLabel ?? label,
|
|
334
|
+
data: data,
|
|
335
|
+
state: state,
|
|
336
|
+
slots: slots,
|
|
337
|
+
actions: actions,
|
|
338
|
+
onSelect: (option)=>{
|
|
339
|
+
restoreSelectionFocus.current = true;
|
|
340
|
+
changeVisible(false);
|
|
341
|
+
actions?.onSelect?.(option);
|
|
270
342
|
},
|
|
271
343
|
labels: labels
|
|
272
344
|
})
|
package/dist/h~0.js
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
function groupMessages(messages) {
|
|
2
|
+
const groups = [];
|
|
3
|
+
for (const message of messages){
|
|
4
|
+
const previous = groups.at(-1);
|
|
5
|
+
const sameTurn = void 0 !== previous && 'assistant' === message.role && 'assistant' === previous.role && (!previous.turnId || !message.turnId || previous.turnId === message.turnId);
|
|
6
|
+
if (sameTurn && previous) {
|
|
7
|
+
previous.parts = [
|
|
8
|
+
...previous.parts,
|
|
9
|
+
...message.parts
|
|
10
|
+
];
|
|
11
|
+
previous.turnId ??= message.turnId;
|
|
12
|
+
previous.streaming = previous.streaming || message.streaming;
|
|
13
|
+
if (message.action) previous.actions = [
|
|
14
|
+
...previous.actions ?? [],
|
|
15
|
+
{
|
|
16
|
+
messageId: message.id,
|
|
17
|
+
action: message.action
|
|
18
|
+
}
|
|
19
|
+
];
|
|
20
|
+
continue;
|
|
21
|
+
}
|
|
22
|
+
groups.push({
|
|
23
|
+
...message,
|
|
24
|
+
parts: [
|
|
25
|
+
...message.parts
|
|
26
|
+
],
|
|
27
|
+
actions: message.action ? [
|
|
28
|
+
{
|
|
29
|
+
messageId: message.id,
|
|
30
|
+
action: message.action
|
|
31
|
+
}
|
|
32
|
+
] : void 0
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
return groups;
|
|
36
|
+
}
|
|
37
|
+
function messageText(message) {
|
|
38
|
+
return message.parts.filter((part)=>'text' === part.type).map((part)=>part.text).join('\n').trim();
|
|
39
|
+
}
|
|
40
|
+
function groupByActivity(parts) {
|
|
41
|
+
const blocks = [];
|
|
42
|
+
for (const part of parts){
|
|
43
|
+
const groupId = 'groupId' in part ? part.groupId : void 0;
|
|
44
|
+
const previous = blocks.at(-1);
|
|
45
|
+
if (previous && groupId && previous.groupId === groupId) {
|
|
46
|
+
previous.parts.push(part);
|
|
47
|
+
continue;
|
|
48
|
+
}
|
|
49
|
+
blocks.push({
|
|
50
|
+
groupId,
|
|
51
|
+
parts: [
|
|
52
|
+
part
|
|
53
|
+
]
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
return blocks;
|
|
57
|
+
}
|
|
58
|
+
export { groupByActivity, groupMessages, messageText };
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { ComponentType, SVGProps } from 'react';
|
|
2
|
+
/** 一个文件类型图标的形状,以组件形式渲染。A file-type icon shape, rendered as a component. */
|
|
3
|
+
export type FileTypeIconComponent = ComponentType<SVGProps<SVGSVGElement>>;
|
|
4
|
+
/**
|
|
5
|
+
* 文件名与扩展名规则。扩展名到图标键的映射是数据,无法用文件名表达,因此单独保存。
|
|
6
|
+
*
|
|
7
|
+
* Name and extension rules. The extension-to-key mapping is data rather than
|
|
8
|
+
* artwork, so it is kept on its own.
|
|
9
|
+
*/
|
|
10
|
+
export declare const FILE_TYPE_RULES: {
|
|
11
|
+
readonly names: Record<string, string>;
|
|
12
|
+
readonly extensions: Record<string, string>;
|
|
13
|
+
};
|
|
14
|
+
/** 图标键的品牌色。未登记的键回退到正文色。Brand colour per icon key. */
|
|
15
|
+
export declare function getFileTypeColor(key: string, scheme?: 'light' | 'dark'): string;
|
|
16
|
+
/**
|
|
17
|
+
* 按文件名判定图标键:先查完整文件名,再从长到短拼接扩展名匹配,未命中回退
|
|
18
|
+
* `default`。多段扩展名(例如 `tar.gz`)会被优先匹配。
|
|
19
|
+
*
|
|
20
|
+
* Resolves the icon key for a file name: an exact name match first, then compound
|
|
21
|
+
* extensions from longest to shortest, falling back to `default`. Multi-part
|
|
22
|
+
* extensions such as `tar.gz` therefore win over the shorter `gz`.
|
|
23
|
+
*/
|
|
24
|
+
export declare function resolveFileTypeIconKey(name: string): string;
|
|
25
|
+
/**
|
|
26
|
+
* 取得文件名对应的图标组件。未命中规则时回退到通用文件图标。
|
|
27
|
+
*
|
|
28
|
+
* Returns the icon component for a file name, falling back to the generic file
|
|
29
|
+
* icon when nothing matches.
|
|
30
|
+
*/
|
|
31
|
+
export declare function getFileTypeIcon(name: string): FileTypeIconComponent;
|
package/dist/icons/index.d.ts
CHANGED
|
@@ -1,23 +1,33 @@
|
|
|
1
|
-
import type { ComponentPropsWithoutRef } from 'react';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
export
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
export
|
|
1
|
+
import type { ComponentPropsWithoutRef, ComponentType } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* 图标的属性。渲染为内联 SVG,接收标准 SVG 属性;`width` 与 `height` 默认 16
|
|
4
|
+
*(ArrowRightIcon 为 14),
|
|
5
|
+
* 无障碍描述用 `aria-label`(装饰性图标省略,SVG 本身带 `aria-hidden`)。
|
|
6
|
+
*
|
|
7
|
+
* Props of an icon. Icons render as inline SVG and accept standard SVG props;
|
|
8
|
+
* `width` and `height` default to 16 (14 for ArrowRightIcon). Describe one with
|
|
9
|
+
* `aria-label`; decorative icons omit it and the SVG stays `aria-hidden`.
|
|
10
|
+
*/
|
|
11
|
+
export type IconProps = Omit<ComponentPropsWithoutRef<'svg'>, 'children'>;
|
|
12
|
+
/**
|
|
13
|
+
* 图标组件的公开类型。声明里只出现这个类型,不出现 `*.svg?react` 模块引用——
|
|
14
|
+
* 发布包不含 SVG 源文件,声明若引用它们,独立消费者会报 TS2307。
|
|
15
|
+
*
|
|
16
|
+
* The public type of an icon component. Declarations mention only this type,
|
|
17
|
+
* never a `*.svg?react` module: the published package ships no SVG sources, so a
|
|
18
|
+
* declaration that referenced them would fail with TS2307 for a standalone
|
|
19
|
+
* consumer.
|
|
20
|
+
*/
|
|
21
|
+
export type IconComponent = ComponentType<IconProps>;
|
|
22
|
+
export declare const ArrowRightIcon: IconComponent;
|
|
23
|
+
export declare const AudioIcon: IconComponent;
|
|
24
|
+
export declare const ChevronRightIcon: IconComponent;
|
|
25
|
+
export declare const DocumentIcon: IconComponent;
|
|
26
|
+
export declare const FolderIcon: IconComponent;
|
|
27
|
+
export declare const FolderOpenIcon: IconComponent;
|
|
28
|
+
export declare const PdfIcon: IconComponent;
|
|
29
|
+
export declare const PptIcon: IconComponent;
|
|
30
|
+
export declare const VideoIcon: IconComponent;
|
|
31
|
+
export declare const WordIcon: IconComponent;
|
|
32
|
+
export { getFileTypeColor, getFileTypeIcon, resolveFileTypeIconKey, } from './file-type-icon.js';
|
|
33
|
+
export type { FileTypeIconComponent } from './file-type-icon.js';
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { SVGProps } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* `nextjs` 的斜笔画靠渐变淡出,而渐变要用片段 ID 引用。SVGR 会把 `id` 原样
|
|
4
|
+
* 编译进组件,同页多个实例共用同一个 ID,后面的实例会解析到先出现实例的渐变,
|
|
5
|
+
* 取到别人的 `currentColor`。这里手写这个图标,用 `useId` 生成实例级唯一 ID。
|
|
6
|
+
*
|
|
7
|
+
* 图形数据与 `packages/icons/svg/file-type/nextjs.svg` 保持一致,那份源文件仍是
|
|
8
|
+
* 该图标的 canonical 来源;差别只有 ID 由 `useId` 生成,以及属性写成 JSX。
|
|
9
|
+
*
|
|
10
|
+
* The `nextjs` slash fades out through a gradient referenced by a fragment ID.
|
|
11
|
+
* SVGR compiles that `id` verbatim, so instances on one page share it and a later
|
|
12
|
+
* instance resolves to an earlier one's gradient, picking up its `currentColor`.
|
|
13
|
+
* This icon is written by hand so `useId` can give each instance its own ID.
|
|
14
|
+
*
|
|
15
|
+
* The artwork matches `packages/icons/svg/file-type/nextjs.svg`, which stays the
|
|
16
|
+
* canonical source for this icon; the only differences are the ID coming from
|
|
17
|
+
* `useId` and the attributes being written as JSX.
|
|
18
|
+
*/
|
|
19
|
+
export declare function NextjsIcon({ 'aria-label': ariaLabel, ...props }: SVGProps<SVGSVGElement>): import("react").JSX.Element;
|
package/dist/icons.js
CHANGED
|
@@ -1,25 +1 @@
|
|
|
1
|
-
|
|
2
|
-
const audioinline_namespaceObject = "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgdmlld0JveD0iMCAwIDE2IDE2IiBmaWxsPSJub25lIj4KICA8cmVjdCB4PSIzIiB5PSIyIiB3aWR0aD0iMTEiIGhlaWdodD0iMTIiIHJ4PSIyIiBmaWxsPSIjN2MzYWVkIi8+CiAgPGcgc3Ryb2tlPSIjZmZmIiBzdHJva2Utd2lkdGg9IjEuMSIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIj4KICAgIDxwYXRoIGQ9Ik03IDExVjdsNC0xdjRNNyAxMUg2bTUtMWgtMSIvPgogIDwvZz4KPC9zdmc+Cg==";
|
|
3
|
-
const pdfinline_namespaceObject = "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgdmlld0JveD0iMCAwIDE2IDE2IiBmaWxsPSJub25lIj4KICA8cmVjdCB4PSIzIiB5PSIyIiB3aWR0aD0iMTEiIGhlaWdodD0iMTIiIHJ4PSIyIiBmaWxsPSIjYjkxYzFjIi8+CiAgPGcgc3Ryb2tlPSIjZmZmIiBzdHJva2Utd2lkdGg9IjEuMSIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIj4KICAgIDxwYXRoIGQ9Ik02IDExVjZoM3YzSDZtNCAyaDEiLz4KICA8L2c+Cjwvc3ZnPgo=";
|
|
4
|
-
const pptinline_namespaceObject = "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgdmlld0JveD0iMCAwIDE2IDE2IiBmaWxsPSJub25lIj4KICA8cmVjdCB4PSIzIiB5PSIyIiB3aWR0aD0iMTEiIGhlaWdodD0iMTIiIHJ4PSIyIiBmaWxsPSIjYzI0MTBjIi8+CiAgPGcgc3Ryb2tlPSIjZmZmIiBzdHJva2Utd2lkdGg9IjEuMSIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIj4KICAgIDxwYXRoIGQ9Ik02IDdoNXY0SDZ6bTIuNSA0djEiLz4KICA8L2c+Cjwvc3ZnPgo=";
|
|
5
|
-
const videoinline_namespaceObject = "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgdmlld0JveD0iMCAwIDE2IDE2IiBmaWxsPSJub25lIj4KICA8cmVjdCB4PSIzIiB5PSIyIiB3aWR0aD0iMTEiIGhlaWdodD0iMTIiIHJ4PSIyIiBmaWxsPSIjMDM2OWExIi8+CiAgPGcgc3Ryb2tlPSIjZmZmIiBzdHJva2Utd2lkdGg9IjEuMSIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIj4KICAgIDxwYXRoIGQ9Im03IDYgNCAyLjVMNyAxMXoiLz4KICA8L2c+Cjwvc3ZnPgo=";
|
|
6
|
-
const wordinline_namespaceObject = "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgdmlld0JveD0iMCAwIDE2IDE2IiBmaWxsPSJub25lIj4KICA8cmVjdCB4PSIzIiB5PSIyIiB3aWR0aD0iMTEiIGhlaWdodD0iMTIiIHJ4PSIyIiBmaWxsPSIjMWQ0ZWQ4Ii8+CiAgPGcgc3Ryb2tlPSIjZmZmIiBzdHJva2Utd2lkdGg9IjEuMSIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIj4KICAgIDxwYXRoIGQ9Im01LjUgNyAxIDQgMi0zIDIgMyAxLTQiLz4KICA8L2c+Cjwvc3ZnPgo=";
|
|
7
|
-
function createIcon(src, name) {
|
|
8
|
-
function Icon(props) {
|
|
9
|
-
return /*#__PURE__*/ jsx("img", {
|
|
10
|
-
alt: "",
|
|
11
|
-
width: 16,
|
|
12
|
-
height: 16,
|
|
13
|
-
...props,
|
|
14
|
-
src: src
|
|
15
|
-
});
|
|
16
|
-
}
|
|
17
|
-
Icon.displayName = name;
|
|
18
|
-
return Icon;
|
|
19
|
-
}
|
|
20
|
-
const AudioIcon = createIcon(audioinline_namespaceObject, 'AudioIcon');
|
|
21
|
-
const PdfIcon = createIcon(pdfinline_namespaceObject, 'PdfIcon');
|
|
22
|
-
const PptIcon = createIcon(pptinline_namespaceObject, 'PptIcon');
|
|
23
|
-
const VideoIcon = createIcon(videoinline_namespaceObject, 'VideoIcon');
|
|
24
|
-
const WordIcon = createIcon(wordinline_namespaceObject, 'WordIcon');
|
|
25
|
-
export { AudioIcon, PdfIcon, PptIcon, VideoIcon, WordIcon };
|
|
1
|
+
export { ArrowRightIcon, AudioIcon, ChevronRightIcon, DocumentIcon, FolderIcon, FolderOpenIcon, PdfIcon, PptIcon, VideoIcon, WordIcon, getFileTypeColor, getFileTypeIcon, resolveFileTypeIconKey } from "./k~0.js";
|
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
export { FileBrowserEntries } from './components/file-browser-entries/index.js';
|
|
2
|
+
export type { FileBrowserEntriesProps } from './components/file-browser-entries/index.js';
|
|
1
3
|
export { FileTree } from './components/file-tree/index.js';
|
|
2
4
|
export type { FileTreeProps } from './components/file-tree/index.js';
|
|
3
5
|
export { Tui } from './components/tui/index.js';
|
|
@@ -6,11 +8,11 @@ export { ScopeSwitcher, ScopeSelector, } from './components/scope-switcher/index
|
|
|
6
8
|
export type { ScopeSwitcherProps, ScopeSelectorProps, } from './components/scope-switcher/index.js';
|
|
7
9
|
export { AgentConnect } from './components/agent-connect/index.js';
|
|
8
10
|
export type { AgentConnectProps } from './components/agent-connect/index.js';
|
|
11
|
+
export { VikingBot } from './components/viking-bot/index.js';
|
|
12
|
+
export type { VikingBotProps } from './components/viking-bot/index.js';
|
|
9
13
|
export { FileBrowser } from './modules/file-browser/index.js';
|
|
10
14
|
export type { FileBrowserProps } from './modules/file-browser/index.js';
|
|
11
15
|
export { Console } from './modules/console/index.js';
|
|
12
16
|
export type { ConsoleProps } from './modules/console/index.js';
|
|
13
|
-
export { TaskCenter } from './modules/task-center/index.js';
|
|
14
|
-
export type { TaskCenterProps } from './modules/task-center/index.js';
|
|
15
17
|
export { ScopeCascade } from './modules/scope-cascade/index.js';
|
|
16
18
|
export type { ScopeCascadeProps } from './modules/scope-cascade/index.js';
|
package/dist/index.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
export { AgentConnect } from "./u~0.js";
|
|
2
2
|
export { Console } from "./a~0.js";
|
|
3
3
|
export { FileBrowser } from "./l~0.js";
|
|
4
|
+
export { FileBrowserEntries } from "./2~0.js";
|
|
4
5
|
export { FileTree } from "./n~0.js";
|
|
5
6
|
export { ScopeCascade } from "./lk~0.js";
|
|
6
7
|
export { ScopeSelector, ScopeSwitcher } from "./f~0.js";
|
|
7
|
-
export { TaskCenter } from "./i~0.js";
|
|
8
8
|
export { Tui } from "./3~0.js";
|
|
9
|
+
export { VikingBot } from "./c~0.js";
|