@hkyhy/marsun-components-core 0.1.115 → 0.1.117
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/dist/agent-hub.js +131 -126
- package/dist/agent-hub.js.map +1 -1
- package/dist/components/AgentHub/Chat/Detail/ChatAgentFab/index.d.ts +1 -1
- package/dist/components/AgentHub/Chat/Detail/ChatAgentFab/index.js.map +1 -1
- package/dist/components/AgentHub/Chat/Detail/ChatAgentFab/style.module.scss.js +9 -9
- package/dist/components/AgentHub/Chat/Detail/ChatAgentFabLayout/index.d.ts +2 -2
- package/dist/components/AgentHub/Chat/Detail/ChatAgentFabLayout/index.js.map +1 -1
- package/dist/components/AgentHub/Chat/Detail/ChatAgentFabLayout/style.module.scss.js +3 -3
- package/dist/components/AgentHub/Chat/Detail/ChatCapabilityStrip/index.d.ts +20 -0
- package/dist/components/AgentHub/Chat/Detail/ChatCapabilityStrip/index.js +155 -0
- package/dist/components/AgentHub/Chat/Detail/ChatCapabilityStrip/index.js.map +1 -0
- package/dist/components/AgentHub/Chat/Detail/ChatCapabilityStrip/style.module.scss.js +19 -0
- package/dist/components/AgentHub/Chat/Detail/ChatCapabilityStrip/style.module.scss.js.map +1 -0
- package/dist/components/AgentHub/Chat/Detail/ChatPanel/index.d.ts +2 -0
- package/dist/components/AgentHub/Chat/Detail/ChatPanel/index.js +59 -55
- package/dist/components/AgentHub/Chat/Detail/ChatPanel/index.js.map +1 -1
- package/dist/components/AgentHub/Chat/Detail/ChatPanelHeaderTools/index.d.ts +19 -0
- package/dist/components/AgentHub/Chat/Detail/ChatPanelHeaderTools/index.js +122 -0
- package/dist/components/AgentHub/Chat/Detail/ChatPanelHeaderTools/index.js.map +1 -0
- package/dist/components/AgentHub/Chat/Detail/ChatPanelHeaderTools/style.module.scss.js +8 -0
- package/dist/components/AgentHub/Chat/Detail/ChatPanelHeaderTools/style.module.scss.js.map +1 -0
- package/dist/components/AgentHub/Chat/Detail/index.d.ts +4 -0
- package/dist/components/Audit/AuditLogList.d.ts +2 -0
- package/dist/components/Audit/AuditLogList.js +179 -170
- package/dist/components/Audit/AuditLogList.js.map +1 -1
- package/dist/components/Audit/labels.d.ts +6 -2
- package/dist/components/Audit/labels.js +19 -16
- package/dist/components/Audit/labels.js.map +1 -1
- package/dist/components/Audit/labels.json.d.ts +47 -1
- package/dist/components/Audit/labels.json.js +124 -32
- package/dist/components/Audit/labels.json.js.map +1 -1
- package/dist/components/Audit/style.module.scss.js +26 -22
- package/dist/components/Audit/style.module.scss.js.map +1 -1
- package/dist/components/Icons/ZoomIn.d.ts +1 -0
- package/dist/components/Icons/ZoomIn.js +7 -0
- package/dist/components/Icons/ZoomIn.js.map +1 -0
- package/dist/components/Icons/ZoomOut.d.ts +1 -0
- package/dist/components/Icons/ZoomOut.js +7 -0
- package/dist/components/Icons/ZoomOut.js.map +1 -0
- package/dist/components/Icons/index.d.ts +2 -0
- package/dist/components/Icons/registry.d.ts +1 -1
- package/dist/components/Icons/registry.js +58 -52
- package/dist/components/Icons/registry.js.map +1 -1
- package/dist/components/Stat/StatCardList.js +16 -16
- package/dist/components/Stat/StatCardList.js.map +1 -1
- package/dist/components/Tools/ActionTracking/ActionTrackingShell.d.ts +27 -0
- package/dist/components/Tools/ActionTracking/ActionTrackingShell.js +43 -0
- package/dist/components/Tools/ActionTracking/ActionTrackingShell.js.map +1 -0
- package/dist/components/Tools/ActionTracking/index.d.ts +2 -0
- package/dist/components/Tools/ActionTracking/style.module.scss.js +7 -0
- package/dist/components/Tools/ActionTracking/style.module.scss.js.map +1 -0
- package/dist/components/Tools/index.d.ts +2 -0
- package/dist/components/Tour/AppTour/index.js +1 -1
- package/dist/components/Tour/AppTour/index.js.map +1 -1
- package/dist/components/Tour/index.d.ts +1 -0
- package/dist/components/Tour/resolveTourTarget.d.ts +7 -0
- package/dist/components/Tour/resolveTourTarget.js +16 -0
- package/dist/components/Tour/resolveTourTarget.js.map +1 -0
- package/dist/index.js +785 -771
- package/dist/index.js.map +1 -1
- package/dist/marsun-components-core.css +1 -1
- package/dist/styles/global.css +1 -1
- package/package.json +1 -1
package/dist/agent-hub.js
CHANGED
|
@@ -2,143 +2,148 @@ import { default as o } from "./components/AgentHub/AgentHubAccessGuard.js";
|
|
|
2
2
|
import { default as r } from "./components/AgentHub/AgentHubIndexRedirect.js";
|
|
3
3
|
import { default as i } from "./components/AgentHub/ChatSessionAccessGuard.js";
|
|
4
4
|
import { default as n } from "./components/AgentHub/Chat/Detail/ChatAgentFab/index.js";
|
|
5
|
-
import { default as
|
|
5
|
+
import { default as l } from "./components/AgentHub/Chat/Detail/ChatAgentFabLayout/index.js";
|
|
6
6
|
import { default as u } from "./components/AgentHub/Chat/Form/Form.js";
|
|
7
|
-
import { default as x } from "./components/AgentHub/Chat/
|
|
8
|
-
import { default as c } from "./components/AgentHub/Chat/
|
|
9
|
-
import { default as
|
|
10
|
-
import { default as
|
|
11
|
-
import { default as
|
|
12
|
-
import { default as
|
|
13
|
-
import { default as P } from "./components/AgentHub/Chat/
|
|
7
|
+
import { default as x } from "./components/AgentHub/Chat/Detail/ChatCapabilityStrip/index.js";
|
|
8
|
+
import { default as c } from "./components/AgentHub/Chat/List/ChatCard/index.js";
|
|
9
|
+
import { default as g } from "./components/AgentHub/Chat/Action/CreateButton.js";
|
|
10
|
+
import { default as M } from "./components/AgentHub/Chat/List/FilterBar.js";
|
|
11
|
+
import { default as A } from "./components/AgentHub/Chat/Detail/ChatFollowUpSuggestions/index.js";
|
|
12
|
+
import { default as F } from "./components/AgentHub/Chat/Modal/FormModal.js";
|
|
13
|
+
import { default as P } from "./components/AgentHub/Chat/Detail/ChatInput/index.js";
|
|
14
|
+
import { default as E } from "./components/AgentHub/Chat/Action/ManageActionButtons.js";
|
|
14
15
|
import { default as R } from "./components/AgentHub/Chat/Detail/ChatPanel/index.js";
|
|
15
|
-
import { default as w } from "./components/AgentHub/Chat/Detail/
|
|
16
|
+
import { default as k, DEFAULT_CHAT_ZOOM_STEPS as w } from "./components/AgentHub/Chat/Detail/ChatPanelHeaderTools/index.js";
|
|
17
|
+
import { default as b } from "./components/AgentHub/Chat/Detail/ChatSuggestionRow/index.js";
|
|
16
18
|
import { default as N } from "./components/AgentHub/Chat/Detail/ChatWidgetBlock/index.js";
|
|
17
|
-
import { default as
|
|
18
|
-
import { default as
|
|
19
|
-
import { default as
|
|
20
|
-
import { default as
|
|
21
|
-
import { default as
|
|
22
|
-
import { default as
|
|
23
|
-
import { default as
|
|
24
|
-
import { default as
|
|
25
|
-
import { default as
|
|
26
|
-
import { default as
|
|
27
|
-
import { default as
|
|
28
|
-
import { default as
|
|
29
|
-
import { default as
|
|
30
|
-
import { default as
|
|
31
|
-
import { default as
|
|
32
|
-
import { default as
|
|
33
|
-
import { default as
|
|
34
|
-
import { default as
|
|
35
|
-
import { default as
|
|
36
|
-
import { default as
|
|
37
|
-
import { default as
|
|
38
|
-
import { default as
|
|
39
|
-
import { default as
|
|
40
|
-
import { default as
|
|
41
|
-
import { default as
|
|
42
|
-
import { default as
|
|
43
|
-
import { CHUNK_METHOD_OPTIONS as Nt, EMBEDDING_MODEL_OPTIONS as
|
|
44
|
-
import { CITATION_LINK_PREFIX as
|
|
45
|
-
import { animateScrollFromTopToBottom as
|
|
46
|
-
import { extractCitations as
|
|
47
|
-
import { hasCitationMarkers as
|
|
48
|
-
import { sanitizeMermaidChart as
|
|
49
|
-
import { useAutoScrollToBottom as
|
|
50
|
-
import { useChat as
|
|
51
|
-
import { useChatSessions as
|
|
52
|
-
import { useCitationPanel as
|
|
53
|
-
import { useKBDocuments as
|
|
54
|
-
import { useKnowledgeBase as
|
|
55
|
-
import { useSSECompletion as
|
|
56
|
-
import { useTypewriter as
|
|
19
|
+
import { default as L } from "./components/AgentHub/Chat/Detail/CitationContent/index.js";
|
|
20
|
+
import { default as U } from "./components/AgentHub/Chat/Detail/CitationInlineBadge/index.js";
|
|
21
|
+
import { default as G } from "./components/AgentHub/Chat/Detail/CitationMarkdownContent/index.js";
|
|
22
|
+
import { default as j } from "./components/AgentHub/Chat/Detail/CitationPanel/index.js";
|
|
23
|
+
import { default as V } from "./components/AgentHub/KnowledgeBase/Action/CreateButton.js";
|
|
24
|
+
import { default as Z } from "./components/AgentHub/KnowledgeBase/Detail/DocumentTable/index.js";
|
|
25
|
+
import { default as Q } from "./components/AgentHub/KnowledgeBase/List/FilterBar.js";
|
|
26
|
+
import { default as $ } from "./components/AgentHub/KnowledgeBase/Modal/FormModal.js";
|
|
27
|
+
import { default as et } from "./components/AgentHub/KnowledgeBase/Form/Form.js";
|
|
28
|
+
import { default as at } from "./components/AgentHub/KnowledgeBase/List/KnowledgeCard/index.js";
|
|
29
|
+
import { default as st } from "./components/AgentHub/KnowledgeBase/Action/ManageActionButtons.js";
|
|
30
|
+
import { default as ft } from "./components/AgentHub/Chat/Detail/MermaidBlock/index.js";
|
|
31
|
+
import { default as mt } from "./components/AgentHub/Chat/Detail/MessageActions/index.js";
|
|
32
|
+
import { default as pt } from "./components/AgentHub/Chat/Detail/MessageEditPopover/index.js";
|
|
33
|
+
import { default as dt } from "./components/AgentHub/Chat/Detail/MessageItem/index.js";
|
|
34
|
+
import { default as Ct } from "./components/AgentHub/KnowledgeBase/Detail/ParseStatusTag/index.js";
|
|
35
|
+
import { default as St } from "./components/AgentHub/Report/Detail/ReportArchiveModal/index.js";
|
|
36
|
+
import { default as Tt } from "./components/AgentHub/Report/Detail/ReportExportLayout/index.js";
|
|
37
|
+
import { default as ht } from "./components/AgentHub/Report/Detail/ReportHtmlPreview/index.js";
|
|
38
|
+
import { default as Bt } from "./components/AgentHub/Report/Detail/ReportMetaStrip/index.js";
|
|
39
|
+
import { default as It } from "./components/AgentHub/Report/Detail/ReportTemplate/index.js";
|
|
40
|
+
import { default as Dt } from "./components/AgentHub/Report/Detail/ReportVersionList/index.js";
|
|
41
|
+
import { default as Ot } from "./components/AgentHub/Report/Detail/ReportWorkspace/index.js";
|
|
42
|
+
import { default as _t } from "./components/AgentHub/Chat/Action/SessionActionButtons.js";
|
|
43
|
+
import { default as wt } from "./components/AgentHub/Chat/List/SessionSidebar/index.js";
|
|
44
|
+
import { default as bt } from "./components/AgentHub/Chat/Detail/ThinkingSection/index.js";
|
|
45
|
+
import { CHUNK_METHOD_OPTIONS as Nt, EMBEDDING_MODEL_OPTIONS as Kt, PARSE_STATUS_CONFIG as Lt } from "./components/AgentHub/KnowledgeBase/constants/types.js";
|
|
46
|
+
import { CITATION_LINK_PREFIX as Ut, citationDisplayNumber as vt, citationIdToIndex as Gt, countUniqueCitedSources as Wt, detectCitationIdBase as jt, extractCitationIdsFromContent as qt, extractCitationTitle as Vt, formatCitationDocBasename as Xt, formatCitationMeta as Zt, formatCitationPositions as Jt, injectCitationMarkdownLinks as Qt, normalizeCitation as Yt, parseCitationLinkHref as $t, prepareCitationContent as te, resolveCitationTitle as ee, sanitizeCitationHtml as oe, stripCitationFrontmatter as ae } from "./components/AgentHub/Chat/utils/citationContent.js";
|
|
47
|
+
import { animateScrollFromTopToBottom as se, animateScrollTo as ie, getScrollBottom as fe } from "./components/AgentHub/Chat/utils/smoothScroll.js";
|
|
48
|
+
import { extractCitations as me, formatSessionTime as le, getSessionDisplayName as pe, isWelcomeOnlyMessages as ue, parseSessionMessages as de, toDisplayMessages as xe } from "./components/AgentHub/Chat/utils/sessionMessages.js";
|
|
49
|
+
import { hasCitationMarkers as ce, normalizeAssistantMarkdown as Se, normalizeDisplayText as ge, parseAssistantContent as Te } from "./components/AgentHub/Chat/utils/messageContent.js";
|
|
50
|
+
import { sanitizeMermaidChart as he, stripProseFromMermaid as Ae } from "./components/AgentHub/Chat/utils/sanitizeMermaidChart.js";
|
|
51
|
+
import { useAutoScrollToBottom as Fe } from "./components/AgentHub/Chat/hooks/useAutoScrollToBottom.js";
|
|
52
|
+
import { useChat as Pe } from "./components/AgentHub/Chat/hooks/useChat.js";
|
|
53
|
+
import { useChatSessions as Ee } from "./components/AgentHub/Chat/hooks/useChatSessions.js";
|
|
54
|
+
import { useCitationPanel as Re } from "./components/AgentHub/Chat/hooks/useCitationPanel.js";
|
|
55
|
+
import { useKBDocuments as ke } from "./components/AgentHub/KnowledgeBase/hooks/useKBDocuments.js";
|
|
56
|
+
import { useKnowledgeBase as He } from "./components/AgentHub/KnowledgeBase/hooks/useKnowledgeBase.js";
|
|
57
|
+
import { useSSECompletion as ye } from "./components/AgentHub/Chat/hooks/useSSECompletion.js";
|
|
58
|
+
import { useTypewriter as Ke } from "./components/AgentHub/Chat/hooks/useTypewriter.js";
|
|
57
59
|
export {
|
|
58
60
|
o as AgentHubAccessGuard,
|
|
59
61
|
r as AgentHubIndexRedirect,
|
|
60
62
|
i as AgentHubSessionAccessGuard,
|
|
61
63
|
Nt as CHUNK_METHOD_OPTIONS,
|
|
62
|
-
|
|
64
|
+
Ut as CITATION_LINK_PREFIX,
|
|
63
65
|
n as ChatAgentFab,
|
|
64
|
-
|
|
66
|
+
l as ChatAgentFabLayout,
|
|
65
67
|
u as ChatAssistantForm,
|
|
66
|
-
x as
|
|
67
|
-
c as
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
P as
|
|
68
|
+
x as ChatCapabilityStrip,
|
|
69
|
+
c as ChatCard,
|
|
70
|
+
g as ChatCreateButton,
|
|
71
|
+
M as ChatFilterBar,
|
|
72
|
+
A as ChatFollowUpSuggestions,
|
|
73
|
+
F as ChatFormModal,
|
|
74
|
+
P as ChatInput,
|
|
75
|
+
E as ChatManageActionButtons,
|
|
73
76
|
R as ChatPanel,
|
|
74
|
-
|
|
77
|
+
k as ChatPanelHeaderTools,
|
|
78
|
+
b as ChatSuggestionRow,
|
|
75
79
|
N as ChatWidgetBlock,
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
Bt as
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
wt as
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
ue as
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
ke as
|
|
141
|
-
|
|
142
|
-
|
|
80
|
+
L as CitationContent,
|
|
81
|
+
U as CitationInlineBadge,
|
|
82
|
+
G as CitationMarkdownContent,
|
|
83
|
+
j as CitationPanel,
|
|
84
|
+
V as CreateButton,
|
|
85
|
+
w as DEFAULT_CHAT_ZOOM_STEPS,
|
|
86
|
+
Z as DocumentTable,
|
|
87
|
+
Kt as EMBEDDING_MODEL_OPTIONS,
|
|
88
|
+
Q as KBFilterBar,
|
|
89
|
+
$ as KBFormModal,
|
|
90
|
+
et as KnowledgeBaseForm,
|
|
91
|
+
at as KnowledgeCard,
|
|
92
|
+
st as ManageActionButtons,
|
|
93
|
+
ft as MermaidBlock,
|
|
94
|
+
mt as MessageActions,
|
|
95
|
+
pt as MessageEditPopover,
|
|
96
|
+
dt as MessageItem,
|
|
97
|
+
Lt as PARSE_STATUS_CONFIG,
|
|
98
|
+
Ct as ParseStatusTag,
|
|
99
|
+
St as ReportArchiveModal,
|
|
100
|
+
Tt as ReportExportLayout,
|
|
101
|
+
ht as ReportHtmlPreview,
|
|
102
|
+
Bt as ReportMetaStrip,
|
|
103
|
+
It as ReportTemplate,
|
|
104
|
+
Dt as ReportVersionList,
|
|
105
|
+
Ot as ReportWorkspace,
|
|
106
|
+
_t as SessionActionButtons,
|
|
107
|
+
wt as SessionSidebar,
|
|
108
|
+
bt as ThinkingSection,
|
|
109
|
+
se as animateScrollFromTopToBottom,
|
|
110
|
+
ie as animateScrollTo,
|
|
111
|
+
vt as citationDisplayNumber,
|
|
112
|
+
Gt as citationIdToIndex,
|
|
113
|
+
Wt as countUniqueCitedSources,
|
|
114
|
+
jt as detectCitationIdBase,
|
|
115
|
+
qt as extractCitationIdsFromContent,
|
|
116
|
+
Vt as extractCitationTitle,
|
|
117
|
+
me as extractCitations,
|
|
118
|
+
Xt as formatCitationDocBasename,
|
|
119
|
+
Zt as formatCitationMeta,
|
|
120
|
+
Jt as formatCitationPositions,
|
|
121
|
+
le as formatSessionTime,
|
|
122
|
+
fe as getScrollBottom,
|
|
123
|
+
pe as getSessionDisplayName,
|
|
124
|
+
ce as hasCitationMarkers,
|
|
125
|
+
Qt as injectCitationMarkdownLinks,
|
|
126
|
+
ue as isWelcomeOnlyMessages,
|
|
127
|
+
Se as normalizeAssistantMarkdown,
|
|
128
|
+
Yt as normalizeCitation,
|
|
129
|
+
ge as normalizeDisplayText,
|
|
130
|
+
Te as parseAssistantContent,
|
|
131
|
+
$t as parseCitationLinkHref,
|
|
132
|
+
de as parseSessionMessages,
|
|
133
|
+
te as prepareCitationContent,
|
|
134
|
+
ee as resolveCitationTitle,
|
|
135
|
+
oe as sanitizeCitationHtml,
|
|
136
|
+
he as sanitizeMermaidChart,
|
|
137
|
+
ae as stripCitationFrontmatter,
|
|
138
|
+
Ae as stripProseFromMermaid,
|
|
139
|
+
xe as toDisplayMessages,
|
|
140
|
+
Fe as useAutoScrollToBottom,
|
|
141
|
+
Pe as useChat,
|
|
142
|
+
Ee as useChatSessions,
|
|
143
|
+
Re as useCitationPanel,
|
|
144
|
+
ke as useKBDocuments,
|
|
145
|
+
He as useKnowledgeBase,
|
|
146
|
+
ye as useSSECompletion,
|
|
147
|
+
Ke as useTypewriter
|
|
143
148
|
};
|
|
144
149
|
//# sourceMappingURL=agent-hub.js.map
|
package/dist/agent-hub.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-hub.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"agent-hub.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -14,7 +14,7 @@ export interface ChatAgentFabProps {
|
|
|
14
14
|
panelBodyClassName?: string;
|
|
15
15
|
/** 展开引用侧栏等场景下加宽面板 */
|
|
16
16
|
panelExpanded?: boolean;
|
|
17
|
-
/**
|
|
17
|
+
/** 全屏:约 4:3 拉宽拉高(仍锚定右下角);引用侧栏加宽仍用 panelExpanded */
|
|
18
18
|
panelFullscreen?: boolean;
|
|
19
19
|
offsetRight?: number | string;
|
|
20
20
|
offsetBottom?: number | string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../../../src/components/AgentHub/Chat/Detail/ChatAgentFab/index.tsx"],"sourcesContent":["import classNames from 'classnames';\nimport React, { useEffect, useRef, type CSSProperties, type ReactNode } from 'react';\nimport styles from './style.module.scss';\n\nexport interface ChatAgentFabProps {\n children?: ReactNode;\n open?: boolean;\n onOpenChange?: (open: boolean) => void;\n fabLabel?: ReactNode;\n openAriaLabel?: string;\n closeAriaLabel?: string;\n panelAriaLabel?: string;\n closeOnClickOutside?: boolean;\n className?: string;\n fabClassName?: string;\n panelClassName?: string;\n panelBodyClassName?: string;\n /** 展开引用侧栏等场景下加宽面板 */\n panelExpanded?: boolean;\n /**
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../../src/components/AgentHub/Chat/Detail/ChatAgentFab/index.tsx"],"sourcesContent":["import classNames from 'classnames';\nimport React, { useEffect, useRef, type CSSProperties, type ReactNode } from 'react';\nimport styles from './style.module.scss';\n\nexport interface ChatAgentFabProps {\n children?: ReactNode;\n open?: boolean;\n onOpenChange?: (open: boolean) => void;\n fabLabel?: ReactNode;\n openAriaLabel?: string;\n closeAriaLabel?: string;\n panelAriaLabel?: string;\n closeOnClickOutside?: boolean;\n className?: string;\n fabClassName?: string;\n panelClassName?: string;\n panelBodyClassName?: string;\n /** 展开引用侧栏等场景下加宽面板 */\n panelExpanded?: boolean;\n /** 全屏:约 4:3 拉宽拉高(仍锚定右下角);引用侧栏加宽仍用 panelExpanded */\n panelFullscreen?: boolean;\n offsetRight?: number | string;\n offsetBottom?: number | string;\n zIndex?: number;\n}\n\nconst ChatAgentFab: React.FC<ChatAgentFabProps> = ({\n children,\n open = false,\n onOpenChange,\n fabLabel = 'AI+',\n openAriaLabel = '打开 AI 助手',\n closeAriaLabel = '收起 AI 助手',\n panelAriaLabel,\n closeOnClickOutside = true,\n className,\n fabClassName,\n panelClassName,\n panelBodyClassName,\n panelExpanded = false,\n panelFullscreen = false,\n offsetRight = 24,\n offsetBottom = 24,\n zIndex = 1100,\n}) => {\n const rootRef = useRef<HTMLDivElement>(null);\n\n useEffect(() => {\n if (!open || !closeOnClickOutside) return;\n\n const handlePointerDown = (event: MouseEvent) => {\n const target = event.target as Node;\n if (rootRef.current?.contains(target)) return;\n onOpenChange?.(false);\n };\n\n document.addEventListener('mousedown', handlePointerDown);\n return () => document.removeEventListener('mousedown', handlePointerDown);\n }, [closeOnClickOutside, onOpenChange, open]);\n\n const rootStyle: CSSProperties = {\n right: offsetRight,\n bottom: offsetBottom,\n zIndex,\n };\n\n return (\n <div\n ref={rootRef}\n className={classNames('chat-agent-fab', styles['chat-agent-fab'], className)}\n style={rootStyle}\n >\n {open ? (\n <div\n className={classNames(\n 'chat-agent-fab-panel',\n styles['chat-agent-fab-panel'],\n panelExpanded && styles['chat-agent-fab-panel--expanded'],\n panelFullscreen && styles['chat-agent-fab-panel--fullscreen'],\n panelClassName,\n )}\n role=\"dialog\"\n aria-label={panelAriaLabel}\n >\n <div\n className={classNames(\n 'chat-agent-fab-panel-body',\n styles['chat-agent-fab-panel-body'],\n panelExpanded && styles['chat-agent-fab-panel-body--expanded'],\n panelBodyClassName,\n )}\n >\n {children}\n </div>\n </div>\n ) : null}\n\n <button\n type=\"button\"\n className={classNames(\n 'chat-agent-fab-button',\n styles['chat-agent-fab-button'],\n open && styles['chat-agent-fab-button--active'],\n fabClassName,\n )}\n aria-label={open ? closeAriaLabel : openAriaLabel}\n aria-expanded={open}\n onClick={() => onOpenChange?.(!open)}\n >\n <span className={classNames('chat-agent-fab-icon', styles['chat-agent-fab-icon'])}>\n {fabLabel}\n </span>\n </button>\n </div>\n );\n};\n\nexport default ChatAgentFab;\n"],"names":["ChatAgentFab","children","open","onOpenChange","fabLabel","openAriaLabel","closeAriaLabel","panelAriaLabel","closeOnClickOutside","className","fabClassName","panelClassName","panelBodyClassName","panelExpanded","panelFullscreen","offsetRight","offsetBottom","zIndex","rootRef","useRef","useEffect","handlePointerDown","event","target","_a","rootStyle","jsxs","classNames","styles","jsx"],"mappings":";;;;AA0BA,MAAMA,IAA4C,CAAC;AAAA,EACjD,UAAAC;AAAA,EACA,MAAAC,IAAO;AAAA,EACP,cAAAC;AAAA,EACA,UAAAC,IAAW;AAAA,EACX,eAAAC,IAAgB;AAAA,EAChB,gBAAAC,IAAiB;AAAA,EACjB,gBAAAC;AAAA,EACA,qBAAAC,IAAsB;AAAA,EACtB,WAAAC;AAAA,EACA,cAAAC;AAAA,EACA,gBAAAC;AAAA,EACA,oBAAAC;AAAA,EACA,eAAAC,IAAgB;AAAA,EAChB,iBAAAC,IAAkB;AAAA,EAClB,aAAAC,IAAc;AAAA,EACd,cAAAC,IAAe;AAAA,EACf,QAAAC,IAAS;AACX,MAAM;AACJ,QAAMC,IAAUC,EAAuB,IAAI;AAE3C,EAAAC,EAAU,MAAM;AACd,QAAI,CAAClB,KAAQ,CAACM,EAAqB;AAEnC,UAAMa,IAAoB,CAACC,MAAsB;;AAC/C,YAAMC,IAASD,EAAM;AACrB,OAAIE,IAAAN,EAAQ,YAAR,QAAAM,EAAiB,SAASD,MAC9BpB,KAAA,QAAAA,EAAe;AAAA,IACjB;AAEA,oBAAS,iBAAiB,aAAakB,CAAiB,GACjD,MAAM,SAAS,oBAAoB,aAAaA,CAAiB;AAAA,EAC1E,GAAG,CAACb,GAAqBL,GAAcD,CAAI,CAAC;AAE5C,QAAMuB,IAA2B;AAAA,IAC/B,OAAOV;AAAA,IACP,QAAQC;AAAA,IACR,QAAAC;AAAA,EAAA;AAGF,SACE,gBAAAS;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,KAAKR;AAAA,MACL,WAAWS,EAAW,kBAAkBC,EAAO,gBAAgB,GAAGnB,CAAS;AAAA,MAC3E,OAAOgB;AAAA,MAEN,UAAA;AAAA,QAAAvB,IACC,gBAAA2B;AAAA,UAAC;AAAA,UAAA;AAAA,YACC,WAAWF;AAAA,cACT;AAAA,cACAC,EAAO,sBAAsB;AAAA,cAC7Bf,KAAiBe,EAAO,gCAAgC;AAAA,cACxDd,KAAmBc,EAAO,kCAAkC;AAAA,cAC5DjB;AAAA,YAAA;AAAA,YAEF,MAAK;AAAA,YACL,cAAYJ;AAAA,YAEZ,UAAA,gBAAAsB;AAAA,cAAC;AAAA,cAAA;AAAA,gBACC,WAAWF;AAAA,kBACT;AAAA,kBACAC,EAAO,2BAA2B;AAAA,kBAClCf,KAAiBe,EAAO,qCAAqC;AAAA,kBAC7DhB;AAAA,gBAAA;AAAA,gBAGD,UAAAX;AAAA,cAAA;AAAA,YAAA;AAAA,UACH;AAAA,QAAA,IAEA;AAAA,QAEJ,gBAAA4B;AAAA,UAAC;AAAA,UAAA;AAAA,YACC,MAAK;AAAA,YACL,WAAWF;AAAA,cACT;AAAA,cACAC,EAAO,uBAAuB;AAAA,cAC9B1B,KAAQ0B,EAAO,+BAA+B;AAAA,cAC9ClB;AAAA,YAAA;AAAA,YAEF,cAAYR,IAAOI,IAAiBD;AAAA,YACpC,iBAAeH;AAAA,YACf,SAAS,MAAMC,KAAA,gBAAAA,EAAe,CAACD;AAAA,YAE/B,UAAA,gBAAA2B,EAAC,UAAK,WAAWF,EAAW,uBAAuBC,EAAO,qBAAqB,CAAC,GAC7E,UAAAxB,EAAA,CACH;AAAA,UAAA;AAAA,QAAA;AAAA,MACF;AAAA,IAAA;AAAA,EAAA;AAGN;"}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
const a = {
|
|
2
|
-
"chat-agent-fab": "_chat-agent-
|
|
3
|
-
"chat-agent-fab-button": "_chat-agent-fab-
|
|
4
|
-
"chat-agent-fab-button--active": "_chat-agent-fab-button--
|
|
5
|
-
"chat-agent-fab-icon": "_chat-agent-fab-
|
|
6
|
-
"chat-agent-fab-panel": "_chat-agent-fab-
|
|
7
|
-
"chat-agent-fab-panel-body": "_chat-agent-fab-panel-
|
|
8
|
-
"chat-agent-fab-panel--expanded": "_chat-agent-fab-panel--
|
|
9
|
-
"chat-agent-fab-panel--fullscreen": "_chat-agent-fab-panel--
|
|
10
|
-
"chat-agent-fab-panel-body--expanded": "_chat-agent-fab-panel-body--
|
|
2
|
+
"chat-agent-fab": "_chat-agent-fab_1o7zw_2",
|
|
3
|
+
"chat-agent-fab-button": "_chat-agent-fab-button_1o7zw_10",
|
|
4
|
+
"chat-agent-fab-button--active": "_chat-agent-fab-button--active_1o7zw_25",
|
|
5
|
+
"chat-agent-fab-icon": "_chat-agent-fab-icon_1o7zw_29",
|
|
6
|
+
"chat-agent-fab-panel": "_chat-agent-fab-panel_1o7zw_35",
|
|
7
|
+
"chat-agent-fab-panel-body": "_chat-agent-fab-panel-body_1o7zw_46",
|
|
8
|
+
"chat-agent-fab-panel--expanded": "_chat-agent-fab-panel--expanded_1o7zw_53",
|
|
9
|
+
"chat-agent-fab-panel--fullscreen": "_chat-agent-fab-panel--fullscreen_1o7zw_58",
|
|
10
|
+
"chat-agent-fab-panel-body--expanded": "_chat-agent-fab-panel-body--expanded_1o7zw_65"
|
|
11
11
|
};
|
|
12
12
|
export {
|
|
13
13
|
a as default
|
|
@@ -9,8 +9,8 @@ export interface ChatAgentFabLayoutProps {
|
|
|
9
9
|
citationAsideClassName?: string;
|
|
10
10
|
}
|
|
11
11
|
/**
|
|
12
|
-
* ChatAgentFab 内横向布局:主对话区 +
|
|
13
|
-
* 配合 ChatAgentFab.panelExpanded
|
|
12
|
+
* ChatAgentFab 内横向布局:主对话区 + 可选引用侧栏(侧栏贴面板右侧)。
|
|
13
|
+
* 配合 ChatAgentFab.panelExpanded 在侧栏打开时加宽面板;须 width 100% 以免全屏后右侧留白。
|
|
14
14
|
*/
|
|
15
15
|
declare const ChatAgentFabLayout: React.FC<ChatAgentFabLayoutProps>;
|
|
16
16
|
export default ChatAgentFabLayout;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../../../src/components/AgentHub/Chat/Detail/ChatAgentFabLayout/index.tsx"],"sourcesContent":["import classNames from 'classnames';\nimport React, { type ReactNode } from 'react';\nimport styles from './style.module.scss';\n\nexport interface ChatAgentFabLayoutProps {\n /** ChatPanel 等主对话区 */\n main: ReactNode;\n /** 引用侧栏(通常为 CitationPanel) */\n citationAside?: ReactNode;\n className?: string;\n mainClassName?: string;\n citationAsideClassName?: string;\n}\n\n/**\n * ChatAgentFab 内横向布局:主对话区 +
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../../src/components/AgentHub/Chat/Detail/ChatAgentFabLayout/index.tsx"],"sourcesContent":["import classNames from 'classnames';\nimport React, { type ReactNode } from 'react';\nimport styles from './style.module.scss';\n\nexport interface ChatAgentFabLayoutProps {\n /** ChatPanel 等主对话区 */\n main: ReactNode;\n /** 引用侧栏(通常为 CitationPanel) */\n citationAside?: ReactNode;\n className?: string;\n mainClassName?: string;\n citationAsideClassName?: string;\n}\n\n/**\n * ChatAgentFab 内横向布局:主对话区 + 可选引用侧栏(侧栏贴面板右侧)。\n * 配合 ChatAgentFab.panelExpanded 在侧栏打开时加宽面板;须 width 100% 以免全屏后右侧留白。\n */\nconst ChatAgentFabLayout: React.FC<ChatAgentFabLayoutProps> = ({\n main,\n citationAside,\n className,\n mainClassName,\n citationAsideClassName,\n}) => (\n <div className={classNames('chat-agent-fab-layout', styles['chat-agent-fab-layout'], className)}>\n <div\n className={classNames(\n 'chat-agent-fab-layout-main',\n styles['chat-agent-fab-layout-main'],\n mainClassName,\n )}\n >\n {main}\n </div>\n {citationAside ? (\n <div\n className={classNames(\n 'chat-agent-fab-layout-citation-aside',\n styles['chat-agent-fab-layout-citation-aside'],\n citationAsideClassName,\n )}\n >\n {citationAside}\n </div>\n ) : null}\n </div>\n);\n\nexport default ChatAgentFabLayout;\n"],"names":["ChatAgentFabLayout","main","citationAside","className","mainClassName","citationAsideClassName","jsxs","classNames","styles","jsx"],"mappings":";;;AAkBA,MAAMA,IAAwD,CAAC;AAAA,EAC7D,MAAAC;AAAA,EACA,eAAAC;AAAA,EACA,WAAAC;AAAA,EACA,eAAAC;AAAA,EACA,wBAAAC;AACF,MACE,gBAAAC,EAAC,SAAI,WAAWC,EAAW,yBAAyBC,EAAO,uBAAuB,GAAGL,CAAS,GAC5F,UAAA;AAAA,EAAA,gBAAAM;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAWF;AAAA,QACT;AAAA,QACAC,EAAO,4BAA4B;AAAA,QACnCJ;AAAA,MAAA;AAAA,MAGD,UAAAH;AAAA,IAAA;AAAA,EAAA;AAAA,EAEFC,IACC,gBAAAO;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAWF;AAAA,QACT;AAAA,QACAC,EAAO,sCAAsC;AAAA,QAC7CH;AAAA,MAAA;AAAA,MAGD,UAAAH;AAAA,IAAA;AAAA,EAAA,IAED;AAAA,EAAA,CACN;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
const a = {
|
|
2
|
-
"chat-agent-fab-layout": "_chat-agent-fab-
|
|
3
|
-
"chat-agent-fab-layout-main": "_chat-agent-fab-layout-
|
|
4
|
-
"chat-agent-fab-layout-citation-aside": "_chat-agent-fab-layout-citation-
|
|
2
|
+
"chat-agent-fab-layout": "_chat-agent-fab-layout_ub9o0_1",
|
|
3
|
+
"chat-agent-fab-layout-main": "_chat-agent-fab-layout-main_ub9o0_10",
|
|
4
|
+
"chat-agent-fab-layout-citation-aside": "_chat-agent-fab-layout-citation-aside_ub9o0_17"
|
|
5
5
|
};
|
|
6
6
|
export {
|
|
7
7
|
a as default
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export type ChatCapabilityItem = {
|
|
3
|
+
id: string;
|
|
4
|
+
label: string;
|
|
5
|
+
examples: readonly string[];
|
|
6
|
+
};
|
|
7
|
+
export type ChatCapabilityStripProps = {
|
|
8
|
+
capabilities: ReadonlyArray<ChatCapabilityItem>;
|
|
9
|
+
expandedId: string | null;
|
|
10
|
+
onExpandedChange: (id: string | null) => void;
|
|
11
|
+
onSelectExample: (text: string) => void;
|
|
12
|
+
disabled?: boolean;
|
|
13
|
+
groupLabel?: string;
|
|
14
|
+
groupHelp?: ReactNode;
|
|
15
|
+
/** 展开区提示后缀,默认「点击即问」;展示为 `{label} · {examplesHint}` */
|
|
16
|
+
examplesHint?: string;
|
|
17
|
+
className?: string;
|
|
18
|
+
};
|
|
19
|
+
declare const ChatCapabilityStrip: React.FC<ChatCapabilityStripProps>;
|
|
20
|
+
export default ChatCapabilityStrip;
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
import { jsx as p, jsxs as l } from "react/jsx-runtime";
|
|
2
|
+
import t from "classnames";
|
|
3
|
+
import { useMemo as u } from "react";
|
|
4
|
+
import a from "./style.module.scss.js";
|
|
5
|
+
import { ChevronUp as N } from "../../../../Icons/ChevronUp.js";
|
|
6
|
+
import { ChevronDown as v } from "../../../../Icons/ChevronDown.js";
|
|
7
|
+
const $ = ({
|
|
8
|
+
capabilities: s,
|
|
9
|
+
expandedId: e,
|
|
10
|
+
onExpandedChange: n,
|
|
11
|
+
onSelectExample: b,
|
|
12
|
+
disabled: o = !1,
|
|
13
|
+
groupLabel: h = "已开放",
|
|
14
|
+
groupHelp: m,
|
|
15
|
+
examplesHint: y = "点击即问",
|
|
16
|
+
className: d
|
|
17
|
+
}) => {
|
|
18
|
+
const c = u(
|
|
19
|
+
() => s.find((i) => i.id === e) ?? null,
|
|
20
|
+
[s, e]
|
|
21
|
+
);
|
|
22
|
+
return s.length ? /* @__PURE__ */ p(
|
|
23
|
+
"div",
|
|
24
|
+
{
|
|
25
|
+
className: t(
|
|
26
|
+
"chat-capability-strip-backdrop",
|
|
27
|
+
a["chat-capability-strip-backdrop"],
|
|
28
|
+
!c && a["chat-capability-strip-backdrop--collapsed"],
|
|
29
|
+
d
|
|
30
|
+
),
|
|
31
|
+
"aria-label": h,
|
|
32
|
+
children: /* @__PURE__ */ l("div", { className: t("chat-capability-strip", a["chat-capability-strip"]), children: [
|
|
33
|
+
/* @__PURE__ */ l(
|
|
34
|
+
"div",
|
|
35
|
+
{
|
|
36
|
+
className: t("chat-capability-strip-row", a["chat-capability-strip-row"]),
|
|
37
|
+
children: [
|
|
38
|
+
/* @__PURE__ */ l(
|
|
39
|
+
"span",
|
|
40
|
+
{
|
|
41
|
+
className: t(
|
|
42
|
+
"chat-capability-strip-group-label",
|
|
43
|
+
a["chat-capability-strip-group-label"]
|
|
44
|
+
),
|
|
45
|
+
children: [
|
|
46
|
+
h,
|
|
47
|
+
m
|
|
48
|
+
]
|
|
49
|
+
}
|
|
50
|
+
),
|
|
51
|
+
/* @__PURE__ */ p(
|
|
52
|
+
"div",
|
|
53
|
+
{
|
|
54
|
+
className: t(
|
|
55
|
+
"chat-capability-strip-tags",
|
|
56
|
+
a["chat-capability-strip-tags"]
|
|
57
|
+
),
|
|
58
|
+
children: s.map((i) => {
|
|
59
|
+
const r = e === i.id;
|
|
60
|
+
return /* @__PURE__ */ l(
|
|
61
|
+
"button",
|
|
62
|
+
{
|
|
63
|
+
type: "button",
|
|
64
|
+
className: t(
|
|
65
|
+
"chat-capability-strip-tag",
|
|
66
|
+
a["chat-capability-strip-tag"],
|
|
67
|
+
r && a["chat-capability-strip-tag--active"]
|
|
68
|
+
),
|
|
69
|
+
"aria-expanded": r,
|
|
70
|
+
"aria-controls": `chat-capability-examples-${i.id}`,
|
|
71
|
+
onClick: () => n(r ? null : i.id),
|
|
72
|
+
children: [
|
|
73
|
+
i.label,
|
|
74
|
+
r ? /* @__PURE__ */ p(N, { size: 11 }) : /* @__PURE__ */ p(v, { size: 11 })
|
|
75
|
+
]
|
|
76
|
+
},
|
|
77
|
+
i.id
|
|
78
|
+
);
|
|
79
|
+
})
|
|
80
|
+
}
|
|
81
|
+
)
|
|
82
|
+
]
|
|
83
|
+
}
|
|
84
|
+
),
|
|
85
|
+
c ? /* @__PURE__ */ l(
|
|
86
|
+
"div",
|
|
87
|
+
{
|
|
88
|
+
id: `chat-capability-examples-${c.id}`,
|
|
89
|
+
className: t(
|
|
90
|
+
"chat-capability-strip-examples",
|
|
91
|
+
a["chat-capability-strip-examples"]
|
|
92
|
+
),
|
|
93
|
+
"aria-label": `${c.label}提问样例`,
|
|
94
|
+
children: [
|
|
95
|
+
/* @__PURE__ */ l(
|
|
96
|
+
"div",
|
|
97
|
+
{
|
|
98
|
+
className: t(
|
|
99
|
+
"chat-capability-strip-examples-hint",
|
|
100
|
+
a["chat-capability-strip-examples-hint"]
|
|
101
|
+
),
|
|
102
|
+
children: [
|
|
103
|
+
c.label,
|
|
104
|
+
" · ",
|
|
105
|
+
y,
|
|
106
|
+
/* @__PURE__ */ l(
|
|
107
|
+
"span",
|
|
108
|
+
{
|
|
109
|
+
className: t(
|
|
110
|
+
"chat-capability-strip-count",
|
|
111
|
+
a["chat-capability-strip-count"]
|
|
112
|
+
),
|
|
113
|
+
children: [
|
|
114
|
+
c.examples.length,
|
|
115
|
+
" 条"
|
|
116
|
+
]
|
|
117
|
+
}
|
|
118
|
+
)
|
|
119
|
+
]
|
|
120
|
+
}
|
|
121
|
+
),
|
|
122
|
+
/* @__PURE__ */ p(
|
|
123
|
+
"div",
|
|
124
|
+
{
|
|
125
|
+
className: t(
|
|
126
|
+
"chat-capability-strip-chips",
|
|
127
|
+
a["chat-capability-strip-chips"]
|
|
128
|
+
),
|
|
129
|
+
children: c.examples.map((i) => /* @__PURE__ */ p(
|
|
130
|
+
"button",
|
|
131
|
+
{
|
|
132
|
+
type: "button",
|
|
133
|
+
className: t(
|
|
134
|
+
"chat-capability-strip-chip",
|
|
135
|
+
a["chat-capability-strip-chip"]
|
|
136
|
+
),
|
|
137
|
+
disabled: o,
|
|
138
|
+
onClick: () => b(i),
|
|
139
|
+
children: i
|
|
140
|
+
},
|
|
141
|
+
i
|
|
142
|
+
))
|
|
143
|
+
}
|
|
144
|
+
)
|
|
145
|
+
]
|
|
146
|
+
}
|
|
147
|
+
) : null
|
|
148
|
+
] })
|
|
149
|
+
}
|
|
150
|
+
) : null;
|
|
151
|
+
};
|
|
152
|
+
export {
|
|
153
|
+
$ as default
|
|
154
|
+
};
|
|
155
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../../src/components/AgentHub/Chat/Detail/ChatCapabilityStrip/index.tsx"],"sourcesContent":["import { ChevronDown, ChevronUp } from '@/components/Icons';\nimport classNames from 'classnames';\nimport { useMemo, type ReactNode } from 'react';\nimport styles from './style.module.scss';\n\nexport type ChatCapabilityItem = {\n id: string;\n label: string;\n examples: readonly string[];\n};\n\nexport type ChatCapabilityStripProps = {\n capabilities: ReadonlyArray<ChatCapabilityItem>;\n expandedId: string | null;\n onExpandedChange: (id: string | null) => void;\n onSelectExample: (text: string) => void;\n disabled?: boolean;\n groupLabel?: string;\n groupHelp?: ReactNode;\n /** 展开区提示后缀,默认「点击即问」;展示为 `{label} · {examplesHint}` */\n examplesHint?: string;\n className?: string;\n};\n\nconst ChatCapabilityStrip: React.FC<ChatCapabilityStripProps> = ({\n capabilities,\n expandedId,\n onExpandedChange,\n onSelectExample,\n disabled = false,\n groupLabel = '已开放',\n groupHelp,\n examplesHint = '点击即问',\n className,\n}) => {\n const expanded = useMemo(\n () => capabilities.find((c) => c.id === expandedId) ?? null,\n [capabilities, expandedId],\n );\n\n if (!capabilities.length) return null;\n\n return (\n <div\n className={classNames(\n 'chat-capability-strip-backdrop',\n styles['chat-capability-strip-backdrop'],\n !expanded && styles['chat-capability-strip-backdrop--collapsed'],\n className,\n )}\n aria-label={groupLabel}\n >\n <div className={classNames('chat-capability-strip', styles['chat-capability-strip'])}>\n <div\n className={classNames('chat-capability-strip-row', styles['chat-capability-strip-row'])}\n >\n <span\n className={classNames(\n 'chat-capability-strip-group-label',\n styles['chat-capability-strip-group-label'],\n )}\n >\n {groupLabel}\n {groupHelp}\n </span>\n <div\n className={classNames(\n 'chat-capability-strip-tags',\n styles['chat-capability-strip-tags'],\n )}\n >\n {capabilities.map((c) => {\n const active = expandedId === c.id;\n return (\n <button\n key={c.id}\n type=\"button\"\n className={classNames(\n 'chat-capability-strip-tag',\n styles['chat-capability-strip-tag'],\n active && styles['chat-capability-strip-tag--active'],\n )}\n aria-expanded={active}\n aria-controls={`chat-capability-examples-${c.id}`}\n onClick={() => onExpandedChange(active ? null : c.id)}\n >\n {c.label}\n {active ? <ChevronUp size={11} /> : <ChevronDown size={11} />}\n </button>\n );\n })}\n </div>\n </div>\n {expanded ? (\n <div\n id={`chat-capability-examples-${expanded.id}`}\n className={classNames(\n 'chat-capability-strip-examples',\n styles['chat-capability-strip-examples'],\n )}\n aria-label={`${expanded.label}提问样例`}\n >\n <div\n className={classNames(\n 'chat-capability-strip-examples-hint',\n styles['chat-capability-strip-examples-hint'],\n )}\n >\n {expanded.label} · {examplesHint}\n <span\n className={classNames(\n 'chat-capability-strip-count',\n styles['chat-capability-strip-count'],\n )}\n >\n {expanded.examples.length} 条\n </span>\n </div>\n <div\n className={classNames(\n 'chat-capability-strip-chips',\n styles['chat-capability-strip-chips'],\n )}\n >\n {expanded.examples.map((q) => (\n <button\n key={q}\n type=\"button\"\n className={classNames(\n 'chat-capability-strip-chip',\n styles['chat-capability-strip-chip'],\n )}\n disabled={disabled}\n onClick={() => onSelectExample(q)}\n >\n {q}\n </button>\n ))}\n </div>\n </div>\n ) : null}\n </div>\n </div>\n );\n};\n\nexport default ChatCapabilityStrip;\n"],"names":["ChatCapabilityStrip","capabilities","expandedId","onExpandedChange","onSelectExample","disabled","groupLabel","groupHelp","examplesHint","className","expanded","useMemo","c","jsx","classNames","styles","jsxs","active","ChevronUp","ChevronDown","q"],"mappings":"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"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
const a = {
|
|
2
|
+
"chat-capability-strip-backdrop": "_chat-capability-strip-backdrop_omr5k_1",
|
|
3
|
+
"chat-capability-strip-backdrop--collapsed": "_chat-capability-strip-backdrop--collapsed_omr5k_10",
|
|
4
|
+
"chat-capability-strip": "_chat-capability-strip_omr5k_1",
|
|
5
|
+
"chat-capability-strip-row": "_chat-capability-strip-row_omr5k_22",
|
|
6
|
+
"chat-capability-strip-group-label": "_chat-capability-strip-group-label_omr5k_29",
|
|
7
|
+
"chat-capability-strip-tags": "_chat-capability-strip-tags_omr5k_42",
|
|
8
|
+
"chat-capability-strip-tag": "_chat-capability-strip-tag_omr5k_42",
|
|
9
|
+
"chat-capability-strip-tag--active": "_chat-capability-strip-tag--active_omr5k_83",
|
|
10
|
+
"chat-capability-strip-examples": "_chat-capability-strip-examples_omr5k_90",
|
|
11
|
+
"chat-capability-strip-examples-hint": "_chat-capability-strip-examples-hint_omr5k_98",
|
|
12
|
+
"chat-capability-strip-count": "_chat-capability-strip-count_omr5k_108",
|
|
13
|
+
"chat-capability-strip-chips": "_chat-capability-strip-chips_omr5k_120",
|
|
14
|
+
"chat-capability-strip-chip": "_chat-capability-strip-chip_omr5k_120"
|
|
15
|
+
};
|
|
16
|
+
export {
|
|
17
|
+
a as default
|
|
18
|
+
};
|
|
19
|
+
//# sourceMappingURL=style.module.scss.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"style.module.scss.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;"}
|