@salla.sa/ui-ai-kit-core 1.0.0
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 +21 -0
- package/dist/cjs/ai-card.cjs.entry.js +25 -0
- package/dist/cjs/ai-chat-container.cjs.entry.js +138 -0
- package/dist/cjs/ai-chat-header.cjs.entry.js +79 -0
- package/dist/cjs/ai-chat-message.cjs.entry.js +164 -0
- package/dist/cjs/ai-icon.cjs.entry.js +25 -0
- package/dist/cjs/ai-link.cjs.entry.js +34 -0
- package/dist/cjs/ai-loading.cjs.entry.js +77 -0
- package/dist/cjs/ai-message-input.cjs.entry.js +65 -0
- package/dist/cjs/ai-rating.cjs.entry.js +57 -0
- package/dist/cjs/ai-suggestion.cjs.entry.js +31 -0
- package/dist/cjs/ai-voice-input.cjs.entry.js +233 -0
- package/dist/cjs/icon-registry-dmfLA-Dj.js +82 -0
- package/dist/cjs/index-DLJcLHFH.js +1622 -0
- package/dist/cjs/index.cjs.js +7 -0
- package/dist/cjs/loader.cjs.js +12 -0
- package/dist/cjs/ui-ai-kit.cjs.js +24 -0
- package/dist/collection/collection-manifest.json +23 -0
- package/dist/collection/components/ai-card/ai-card.css +40 -0
- package/dist/collection/components/ai-card/ai-card.js +70 -0
- package/dist/collection/components/ai-card/ai-card.stories.js +52 -0
- package/dist/collection/components/ai-chat-container/ai-chat-container.css +137 -0
- package/dist/collection/components/ai-chat-container/ai-chat-container.js +270 -0
- package/dist/collection/components/ai-chat-container/ai-chat-container.stories.js +160 -0
- package/dist/collection/components/ai-chat-header/ai-chat-header.css +186 -0
- package/dist/collection/components/ai-chat-header/ai-chat-header.js +311 -0
- package/dist/collection/components/ai-chat-header/ai-chat-header.stories.js +138 -0
- package/dist/collection/components/ai-chat-message/ai-chat-message.css +304 -0
- package/dist/collection/components/ai-chat-message/ai-chat-message.js +379 -0
- package/dist/collection/components/ai-chat-message/ai-chat-message.stories.js +164 -0
- package/dist/collection/components/ai-icon/ai-icon.css +9 -0
- package/dist/collection/components/ai-icon/ai-icon.js +76 -0
- package/dist/collection/components/ai-link/ai-link.css +62 -0
- package/dist/collection/components/ai-link/ai-link.js +119 -0
- package/dist/collection/components/ai-link/ai-link.stories.js +79 -0
- package/dist/collection/components/ai-loading/ai-loading.css +202 -0
- package/dist/collection/components/ai-loading/ai-loading.js +244 -0
- package/dist/collection/components/ai-loading/ai-loading.stories.js +145 -0
- package/dist/collection/components/ai-message-input/ai-message-input.css +175 -0
- package/dist/collection/components/ai-message-input/ai-message-input.js +192 -0
- package/dist/collection/components/ai-message-input/ai-message-input.stories.js +125 -0
- package/dist/collection/components/ai-rating/ai-rating.css +145 -0
- package/dist/collection/components/ai-rating/ai-rating.js +176 -0
- package/dist/collection/components/ai-rating/ai-rating.stories.js +78 -0
- package/dist/collection/components/ai-suggestion/ai-suggestion.css +69 -0
- package/dist/collection/components/ai-suggestion/ai-suggestion.js +93 -0
- package/dist/collection/components/ai-suggestion/ai-suggestion.stories.js +62 -0
- package/dist/collection/components/ai-voice-input/ai-voice-input.css +136 -0
- package/dist/collection/components/ai-voice-input/ai-voice-input.js +341 -0
- package/dist/collection/components/ai-voice-input/ai-voice-input.stories.js +118 -0
- package/dist/collection/index.js +10 -0
- package/dist/collection/utils/icon-registry.js +78 -0
- package/dist/collection/utils/utils.js +3 -0
- package/dist/components/ai-card.d.ts +11 -0
- package/dist/components/ai-card.js +1 -0
- package/dist/components/ai-chat-container.d.ts +11 -0
- package/dist/components/ai-chat-container.js +1 -0
- package/dist/components/ai-chat-header.d.ts +11 -0
- package/dist/components/ai-chat-header.js +1 -0
- package/dist/components/ai-chat-message.d.ts +11 -0
- package/dist/components/ai-chat-message.js +1 -0
- package/dist/components/ai-icon.d.ts +11 -0
- package/dist/components/ai-icon.js +1 -0
- package/dist/components/ai-link.d.ts +11 -0
- package/dist/components/ai-link.js +1 -0
- package/dist/components/ai-loading.d.ts +11 -0
- package/dist/components/ai-loading.js +1 -0
- package/dist/components/ai-message-input.d.ts +11 -0
- package/dist/components/ai-message-input.js +1 -0
- package/dist/components/ai-rating.d.ts +11 -0
- package/dist/components/ai-rating.js +1 -0
- package/dist/components/ai-suggestion.d.ts +11 -0
- package/dist/components/ai-suggestion.js +1 -0
- package/dist/components/ai-voice-input.d.ts +11 -0
- package/dist/components/ai-voice-input.js +1 -0
- package/dist/components/index.d.ts +35 -0
- package/dist/components/index.js +1 -0
- package/dist/components/p-CWjXxYJI.js +1 -0
- package/dist/components/p-CY6emva2.js +1 -0
- package/dist/components/p-DYv5ef4M.js +1 -0
- package/dist/esm/ai-card.entry.js +23 -0
- package/dist/esm/ai-chat-container.entry.js +136 -0
- package/dist/esm/ai-chat-header.entry.js +77 -0
- package/dist/esm/ai-chat-message.entry.js +162 -0
- package/dist/esm/ai-icon.entry.js +23 -0
- package/dist/esm/ai-link.entry.js +32 -0
- package/dist/esm/ai-loading.entry.js +75 -0
- package/dist/esm/ai-message-input.entry.js +63 -0
- package/dist/esm/ai-rating.entry.js +55 -0
- package/dist/esm/ai-suggestion.entry.js +29 -0
- package/dist/esm/ai-voice-input.entry.js +231 -0
- package/dist/esm/icon-registry-DYv5ef4M.js +80 -0
- package/dist/esm/index-7hrZ8FOQ.js +1612 -0
- package/dist/esm/index.js +5 -0
- package/dist/esm/loader.js +10 -0
- package/dist/esm/ui-ai-kit.js +20 -0
- package/dist/index.cjs.js +1 -0
- package/dist/index.js +1 -0
- package/dist/types/components/ai-card/ai-card.d.ts +7 -0
- package/dist/types/components/ai-card/ai-card.stories.d.ts +7 -0
- package/dist/types/components/ai-chat-container/ai-chat-container.d.ts +28 -0
- package/dist/types/components/ai-chat-container/ai-chat-container.stories.d.ts +7 -0
- package/dist/types/components/ai-chat-header/ai-chat-header.d.ts +38 -0
- package/dist/types/components/ai-chat-header/ai-chat-header.stories.d.ts +8 -0
- package/dist/types/components/ai-chat-message/ai-chat-message.d.ts +27 -0
- package/dist/types/components/ai-chat-message/ai-chat-message.stories.d.ts +10 -0
- package/dist/types/components/ai-icon/ai-icon.d.ts +8 -0
- package/dist/types/components/ai-link/ai-link.d.ts +12 -0
- package/dist/types/components/ai-link/ai-link.stories.d.ts +8 -0
- package/dist/types/components/ai-loading/ai-loading.d.ts +33 -0
- package/dist/types/components/ai-loading/ai-loading.stories.d.ts +10 -0
- package/dist/types/components/ai-message-input/ai-message-input.d.ts +22 -0
- package/dist/types/components/ai-message-input/ai-message-input.stories.d.ts +13 -0
- package/dist/types/components/ai-rating/ai-rating.d.ts +17 -0
- package/dist/types/components/ai-rating/ai-rating.stories.d.ts +8 -0
- package/dist/types/components/ai-suggestion/ai-suggestion.d.ts +10 -0
- package/dist/types/components/ai-suggestion/ai-suggestion.stories.d.ts +8 -0
- package/dist/types/components/ai-voice-input/ai-voice-input.d.ts +43 -0
- package/dist/types/components/ai-voice-input/ai-voice-input.stories.d.ts +9 -0
- package/dist/types/components.d.ts +860 -0
- package/dist/types/index.d.ts +11 -0
- package/dist/types/stencil-public-runtime.d.ts +1860 -0
- package/dist/types/utils/icon-registry.d.ts +5 -0
- package/dist/types/utils/utils.d.ts +1 -0
- package/dist/ui-ai-kit/index.esm.js +1 -0
- package/dist/ui-ai-kit/p-11facfad.entry.js +1 -0
- package/dist/ui-ai-kit/p-128a2ed4.entry.js +1 -0
- package/dist/ui-ai-kit/p-227bdb8f.entry.js +1 -0
- package/dist/ui-ai-kit/p-455daa17.entry.js +1 -0
- package/dist/ui-ai-kit/p-56163e8c.entry.js +1 -0
- package/dist/ui-ai-kit/p-6d21d0fd.entry.js +1 -0
- package/dist/ui-ai-kit/p-6ddcd77b.entry.js +1 -0
- package/dist/ui-ai-kit/p-7hrZ8FOQ.js +2 -0
- package/dist/ui-ai-kit/p-8e90143e.entry.js +1 -0
- package/dist/ui-ai-kit/p-9938c277.entry.js +1 -0
- package/dist/ui-ai-kit/p-DYv5ef4M.js +1 -0
- package/dist/ui-ai-kit/p-dc5b4a7f.entry.js +1 -0
- package/dist/ui-ai-kit/p-fb1702de.entry.js +1 -0
- package/dist/ui-ai-kit/ui-ai-kit.css +1 -0
- package/dist/ui-ai-kit/ui-ai-kit.esm.js +1 -0
- package/loader/cdn.js +1 -0
- package/loader/index.cjs.js +1 -0
- package/loader/index.d.ts +24 -0
- package/loader/index.es2017.js +1 -0
- package/loader/index.js +2 -0
- package/package.json +77 -0
- package/readme.md +111 -0
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
import { html } from "lit";
|
|
2
|
+
const meta = {
|
|
3
|
+
title: 'Chat/Chat Header',
|
|
4
|
+
component: 'ai-chat-header',
|
|
5
|
+
tags: ['autodocs'],
|
|
6
|
+
argTypes: {
|
|
7
|
+
mode: {
|
|
8
|
+
control: { type: 'select' },
|
|
9
|
+
options: ['agent', 'human'],
|
|
10
|
+
description: 'Layout variant',
|
|
11
|
+
},
|
|
12
|
+
conversation: {
|
|
13
|
+
control: 'text',
|
|
14
|
+
description: 'Conversation title (agent mode)',
|
|
15
|
+
},
|
|
16
|
+
agentName: {
|
|
17
|
+
control: 'text',
|
|
18
|
+
description: 'Human agent name (human mode)',
|
|
19
|
+
},
|
|
20
|
+
agentStatus: {
|
|
21
|
+
control: 'text',
|
|
22
|
+
description: 'Human agent status (human mode)',
|
|
23
|
+
},
|
|
24
|
+
agentAvatar: {
|
|
25
|
+
control: 'text',
|
|
26
|
+
description: 'Human agent avatar URL (human mode)',
|
|
27
|
+
},
|
|
28
|
+
showBack: {
|
|
29
|
+
control: 'boolean',
|
|
30
|
+
description: 'Show back button (human mode)',
|
|
31
|
+
},
|
|
32
|
+
isDraggable: {
|
|
33
|
+
control: 'boolean',
|
|
34
|
+
description: 'Show drag handle (used when container is draggable)',
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
};
|
|
38
|
+
export default meta;
|
|
39
|
+
export const AgentMode = {
|
|
40
|
+
render: args => html `
|
|
41
|
+
<ai-chat-header
|
|
42
|
+
mode="${args.mode}"
|
|
43
|
+
conversation="${args.conversation}"
|
|
44
|
+
?isDraggable="${args.isDraggable}"
|
|
45
|
+
@closeClick="${() => console.log('Close clicked')}"
|
|
46
|
+
@editClick="${() => console.log('Edit clicked')}"
|
|
47
|
+
@dropdownClick="${() => console.log('Dropdown clicked')}"
|
|
48
|
+
></ai-chat-header>
|
|
49
|
+
`,
|
|
50
|
+
args: {
|
|
51
|
+
mode: 'agent',
|
|
52
|
+
conversation: 'محادثة جديدة',
|
|
53
|
+
isDraggable: true,
|
|
54
|
+
},
|
|
55
|
+
};
|
|
56
|
+
export const HumanMode = {
|
|
57
|
+
render: args => html `
|
|
58
|
+
<ai-chat-header
|
|
59
|
+
mode="${args.mode}"
|
|
60
|
+
agent-name="${args.agentName}"
|
|
61
|
+
agent-status="${args.agentStatus}"
|
|
62
|
+
agent-avatar="${args.agentAvatar}"
|
|
63
|
+
?show-back="${args.showBack}"
|
|
64
|
+
?draggable="${args.draggable}"
|
|
65
|
+
@closeClick="${() => console.log('Close clicked')}"
|
|
66
|
+
@moreClick="${() => console.log('More clicked')}"
|
|
67
|
+
@backClick="${() => console.log('Back clicked')}"
|
|
68
|
+
></ai-chat-header>
|
|
69
|
+
`,
|
|
70
|
+
args: {
|
|
71
|
+
mode: 'human',
|
|
72
|
+
agentName: 'هلا',
|
|
73
|
+
agentStatus: 'Active',
|
|
74
|
+
agentAvatar: 'https://i.pravatar.cc/40?img=5',
|
|
75
|
+
showBack: true,
|
|
76
|
+
draggable: true,
|
|
77
|
+
},
|
|
78
|
+
};
|
|
79
|
+
export const HumanWithoutBack = {
|
|
80
|
+
render: args => html `
|
|
81
|
+
<ai-chat-header
|
|
82
|
+
mode="${args.mode}"
|
|
83
|
+
agent-name="${args.agentName}"
|
|
84
|
+
agent-status="${args.agentStatus}"
|
|
85
|
+
agent-avatar="${args.agentAvatar}"
|
|
86
|
+
?show-back="${args.showBack}"
|
|
87
|
+
?isDraggable="${args.isDraggable}"
|
|
88
|
+
@closeClick="${() => console.log('Close clicked')}"
|
|
89
|
+
@moreClick="${() => console.log('More clicked')}"
|
|
90
|
+
></ai-chat-header>
|
|
91
|
+
`,
|
|
92
|
+
args: {
|
|
93
|
+
mode: 'human',
|
|
94
|
+
agentName: 'هلا',
|
|
95
|
+
agentStatus: 'Active',
|
|
96
|
+
agentAvatar: 'https://i.pravatar.cc/40?img=5',
|
|
97
|
+
showBack: false,
|
|
98
|
+
isDraggable: true,
|
|
99
|
+
},
|
|
100
|
+
};
|
|
101
|
+
export const InChatContainer = {
|
|
102
|
+
render: () => html `
|
|
103
|
+
<div style="position: relative; height: 600px; background: #f3f4f6;">
|
|
104
|
+
<ai-chat-container is-open position="right" width="32rem">
|
|
105
|
+
<div style="display: flex; flex-direction: column; height: 100%; background: white;">
|
|
106
|
+
<ai-chat-header
|
|
107
|
+
mode="agent"
|
|
108
|
+
title="محادثة مع المساعد الذكي"
|
|
109
|
+
@closeClick="${() => console.log('Close clicked')}"
|
|
110
|
+
@editClick="${() => console.log('Edit clicked')}"
|
|
111
|
+
@dropdownClick="${() => console.log('Dropdown clicked')}"
|
|
112
|
+
></ai-chat-header>
|
|
113
|
+
|
|
114
|
+
<div style="flex: 1; padding: 1rem; display: flex; flex-direction: column; gap: 1rem; overflow-y: auto;">
|
|
115
|
+
<ai-chat-message
|
|
116
|
+
role="user"
|
|
117
|
+
content="مرحباً، كيف يمكنني المساعدة؟"
|
|
118
|
+
timestamp="${new Date(Date.now() - 300000).toISOString()}"
|
|
119
|
+
language="ar"
|
|
120
|
+
></ai-chat-message>
|
|
121
|
+
|
|
122
|
+
<ai-chat-message
|
|
123
|
+
role="assistant"
|
|
124
|
+
content="مرحباً بك! أنا هنا لمساعدتك. ما الذي تحتاج إليه اليوم؟"
|
|
125
|
+
timestamp="${new Date().toISOString()}"
|
|
126
|
+
language="ar"
|
|
127
|
+
show-actions
|
|
128
|
+
></ai-chat-message>
|
|
129
|
+
</div>
|
|
130
|
+
|
|
131
|
+
<div style="padding: 1rem; border-top: 1px solid #e5e7eb;">
|
|
132
|
+
<ai-message-input placeholder="اكتب رسالتك..." language="ar"></ai-message-input>
|
|
133
|
+
</div>
|
|
134
|
+
</div>
|
|
135
|
+
</ai-chat-container>
|
|
136
|
+
</div>
|
|
137
|
+
`,
|
|
138
|
+
};
|
|
@@ -0,0 +1,304 @@
|
|
|
1
|
+
/* ─── Custom Properties ──────────────────────────────────────────────────── */
|
|
2
|
+
:host {
|
|
3
|
+
--ai-msg-user-bg: var(--ai-user-bubble-bg, #F4F4F4);
|
|
4
|
+
--ai-msg-user-color: var(--ai-text-primary, #333333);
|
|
5
|
+
--ai-msg-user-border: 1px solid var(--ai-border-default, #eee);
|
|
6
|
+
--ai-msg-agent-bg: var(--ai-agent-bubble-bg, #ffffff);
|
|
7
|
+
--ai-msg-agent-color: var(--ai-text-primary, #333333);
|
|
8
|
+
--ai-msg-agent-border: 1px solid var(--ai-border-default, #eee);
|
|
9
|
+
--ai-msg-border-radius: 16px;
|
|
10
|
+
--ai-msg-padding: 16px;
|
|
11
|
+
--ai-msg-font-size: 14px;
|
|
12
|
+
--ai-msg-action-active-bg: var(--ai-accent, #a4ffe5);
|
|
13
|
+
--ai-msg-timestamp-color: var(--ai-text-secondary, #737373);
|
|
14
|
+
--ai-user-msg-max-width: 80%;
|
|
15
|
+
--ai-agent-msg-max-width: 80%;
|
|
16
|
+
|
|
17
|
+
display: block;
|
|
18
|
+
direction: rtl;
|
|
19
|
+
font-family: var(--ai-font-family, "PingARLT", sans-serif);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/* ─── Message Row ────────────────────────────────────────────────────────── */
|
|
23
|
+
.message-row {
|
|
24
|
+
display: flex;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/* ─── User Message — aligned LEFT ───────────────────────────────────────── */
|
|
28
|
+
/* In RTL, flex-end = visual left */
|
|
29
|
+
.user-row {
|
|
30
|
+
flex-direction: column;
|
|
31
|
+
align-items: flex-end;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.user-bubble {
|
|
35
|
+
background: var(--ai-msg-user-bg);
|
|
36
|
+
color: var(--ai-msg-user-color);
|
|
37
|
+
border: var(--ai-msg-user-border);
|
|
38
|
+
border-radius: var(--ai-msg-border-radius);
|
|
39
|
+
padding: var(--ai-msg-padding);
|
|
40
|
+
font-size: var(--ai-msg-font-size);
|
|
41
|
+
max-width: var(--ai-user-msg-max-width);
|
|
42
|
+
line-height: 1.5;
|
|
43
|
+
word-break: break-word;
|
|
44
|
+
box-shadow: 0px 1px 2px 0px rgba(18, 18, 23, 0.05);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.user-row .timestamp {
|
|
48
|
+
font-size: 12px;
|
|
49
|
+
color: var(--ai-msg-timestamp-color);
|
|
50
|
+
margin-top: 4px;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/* ─── Agent Message — aligned RIGHT ─────────────────────────────────────── */
|
|
54
|
+
/* In RTL, flex-start = visual right */
|
|
55
|
+
.agent-row {
|
|
56
|
+
flex-direction: row;
|
|
57
|
+
justify-content: flex-start;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.agent-bubble-wrapper {
|
|
61
|
+
display: flex;
|
|
62
|
+
flex-direction: column;
|
|
63
|
+
gap: 6px;
|
|
64
|
+
width: 100%;
|
|
65
|
+
max-width: var(--ai-msg-agent-max-width);
|
|
66
|
+
min-width: 0;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.agent-bubble {
|
|
70
|
+
background: var(--ai-msg-agent-bg);
|
|
71
|
+
color: var(--ai-msg-agent-color);
|
|
72
|
+
border: var(--ai-msg-agent-border);
|
|
73
|
+
border-radius: var(--ai-msg-border-radius);
|
|
74
|
+
padding: var(--ai-msg-padding);
|
|
75
|
+
font-size: var(--ai-msg-font-size);
|
|
76
|
+
line-height: 1.6;
|
|
77
|
+
word-break: break-word;
|
|
78
|
+
box-shadow: 0px 1px 2px 0px rgba(18, 18, 23, 0.05);
|
|
79
|
+
display: flex;
|
|
80
|
+
flex-direction: column;
|
|
81
|
+
gap: 12px;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
/* ─── Message Content ────────────────────────────────────────────────────── */
|
|
85
|
+
.message-content {
|
|
86
|
+
white-space: pre-wrap;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.message-content p {
|
|
90
|
+
margin: 0 0 8px 0;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.message-content p:last-child {
|
|
94
|
+
margin-bottom: 0;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.message-content h2 {
|
|
98
|
+
font-size: 16px;
|
|
99
|
+
font-weight: 700;
|
|
100
|
+
margin: 0 0 8px 0;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
.message-content h3 {
|
|
104
|
+
font-size: 15px;
|
|
105
|
+
font-weight: 600;
|
|
106
|
+
margin: 0 0 6px 0;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
.message-content strong {
|
|
110
|
+
font-weight: 700;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
.message-content em {
|
|
114
|
+
font-style: italic;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
.message-content code {
|
|
118
|
+
background: var(--ai-bg-surface, #f3f4f6);
|
|
119
|
+
border-radius: 4px;
|
|
120
|
+
padding: 1px 5px;
|
|
121
|
+
font-family: monospace;
|
|
122
|
+
font-size: 13px;
|
|
123
|
+
color: var(--ai-text-primary, #374151);
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
.message-content pre {
|
|
127
|
+
background: var(--ai-bg-surface, #f3f4f6);
|
|
128
|
+
border-radius: 8px;
|
|
129
|
+
padding: 10px 12px;
|
|
130
|
+
overflow-x: auto;
|
|
131
|
+
margin: 8px 0;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
.message-content pre code {
|
|
135
|
+
background: none;
|
|
136
|
+
padding: 0;
|
|
137
|
+
font-size: 13px;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
.message-content ul,
|
|
141
|
+
.message-content ol {
|
|
142
|
+
padding-inline-start: 20px;
|
|
143
|
+
margin: 4px 0 8px 0;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
.message-content li {
|
|
147
|
+
margin-bottom: 3px;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
/* ─── Actions Bar (inside bubble, shown on hover) ────────────────────────── */
|
|
151
|
+
.actions-bar {
|
|
152
|
+
display: flex;
|
|
153
|
+
flex-direction: row;
|
|
154
|
+
align-items: center;
|
|
155
|
+
justify-content: flex-start;
|
|
156
|
+
gap: 6px;
|
|
157
|
+
height: 0;
|
|
158
|
+
overflow: hidden;
|
|
159
|
+
opacity: 0;
|
|
160
|
+
pointer-events: none;
|
|
161
|
+
transition: height 0.15s ease, opacity 0.15s ease;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
.agent-bubble:hover .actions-bar {
|
|
165
|
+
height: 32px;
|
|
166
|
+
opacity: 1;
|
|
167
|
+
pointer-events: auto;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
.action-btn {
|
|
171
|
+
display: flex;
|
|
172
|
+
align-items: center;
|
|
173
|
+
justify-content: center;
|
|
174
|
+
width: 32px;
|
|
175
|
+
height: 32px;
|
|
176
|
+
border-radius: 8px;
|
|
177
|
+
background: var(--ai-bg-card, #ffffff);
|
|
178
|
+
border: 1px solid var(--ai-border-default, #eee);
|
|
179
|
+
cursor: pointer;
|
|
180
|
+
color: var(--ai-text-primary, #333333);
|
|
181
|
+
transition: background 0.15s, color 0.15s;
|
|
182
|
+
padding: 0;
|
|
183
|
+
flex-shrink: 0;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
.action-btn:hover {
|
|
187
|
+
background: var(--ai-bg-surface, #f3f4f6);
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
.action-btn.copy-success {
|
|
191
|
+
background: var(--ai-msg-action-active-bg);
|
|
192
|
+
color: var(--ai-accent-text);
|
|
193
|
+
border-color: var(--ai-accent);
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
|
|
197
|
+
.feedback-group {
|
|
198
|
+
display: flex;
|
|
199
|
+
align-items: center;
|
|
200
|
+
border: 1px solid var(--ai-border-default, #eee);
|
|
201
|
+
border-radius: 8px;
|
|
202
|
+
overflow: hidden;
|
|
203
|
+
background: var(--ai-bg-card, #ffffff);
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
.feedback-btn {
|
|
207
|
+
display: flex;
|
|
208
|
+
align-items: center;
|
|
209
|
+
justify-content: center;
|
|
210
|
+
height: 32px;
|
|
211
|
+
padding: 0 8px;
|
|
212
|
+
background: var(--ai-bg-card, #ffffff);
|
|
213
|
+
border: none;
|
|
214
|
+
border-inline-start: 1px solid var(--ai-border-default, #eee);
|
|
215
|
+
cursor: pointer;
|
|
216
|
+
color: var(--ai-text-primary, #333333);
|
|
217
|
+
transition: background 0.15s, color 0.15s;
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
.feedback-btn:first-child {
|
|
221
|
+
border-inline-start: none;
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
.feedback-btn:hover {
|
|
225
|
+
background: var(--ai-bg-surface, #f3f4f6);
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
.feedback-btn.active {
|
|
229
|
+
background: var(--ai-msg-action-active-bg);
|
|
230
|
+
color: var(--ai-accent-text);
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
.icon-wrap {
|
|
234
|
+
display: flex;
|
|
235
|
+
align-items: center;
|
|
236
|
+
justify-content: center;
|
|
237
|
+
line-height: 0;
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
/* ─── Agent Info Bar (below bubble) ─────────────────────────────────────── */
|
|
241
|
+
.agent-info {
|
|
242
|
+
display: flex;
|
|
243
|
+
flex-direction: row;
|
|
244
|
+
align-items: center;
|
|
245
|
+
justify-content: flex-start;
|
|
246
|
+
gap: 6px;
|
|
247
|
+
color: var(--ai-text-muted, #9ca3af);
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
.agent-info-name,
|
|
251
|
+
.agent-info-time {
|
|
252
|
+
font-size: 12px;
|
|
253
|
+
color: inherit;
|
|
254
|
+
line-height: 16px;
|
|
255
|
+
white-space: nowrap;
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
.agent-info .icon-wrap {
|
|
259
|
+
display: flex;
|
|
260
|
+
align-items: center;
|
|
261
|
+
color: inherit;
|
|
262
|
+
opacity: 0.6;
|
|
263
|
+
flex-shrink: 0;
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
/* ─── Typing Indicator ───────────────────────────────────────────────────── */
|
|
267
|
+
.typing-indicator {
|
|
268
|
+
display: flex;
|
|
269
|
+
align-items: center;
|
|
270
|
+
gap: 5px;
|
|
271
|
+
padding: 4px 2px;
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
.typing-dot {
|
|
275
|
+
width: 8px;
|
|
276
|
+
height: 8px;
|
|
277
|
+
border-radius: 50%;
|
|
278
|
+
background: var(--ai-text-muted, #9ca3af);
|
|
279
|
+
animation: typingBounce 1.2s ease-in-out infinite;
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
.typing-dot:nth-child(2) { animation-delay: 0.2s; }
|
|
283
|
+
.typing-dot:nth-child(3) { animation-delay: 0.4s; }
|
|
284
|
+
|
|
285
|
+
@keyframes typingBounce {
|
|
286
|
+
0%, 60%, 100% { transform: translateY(0); }
|
|
287
|
+
30% { transform: translateY(-6px); }
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
/* ─── Streaming Cursor ───────────────────────────────────────────────────── */
|
|
291
|
+
.streaming-cursor {
|
|
292
|
+
display: inline-block;
|
|
293
|
+
width: 2px;
|
|
294
|
+
height: 1em;
|
|
295
|
+
background: currentColor;
|
|
296
|
+
vertical-align: text-bottom;
|
|
297
|
+
margin-inline-start: 2px;
|
|
298
|
+
animation: cursorBlink 0.8s step-start infinite;
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
@keyframes cursorBlink {
|
|
302
|
+
0%, 100% { opacity: 1; }
|
|
303
|
+
50% { opacity: 0; }
|
|
304
|
+
}
|