@salla.sa/ui-ai-kit-core 1.1.0 → 2.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/dist/cjs/ai-card.cjs.entry.js +2 -2
- package/dist/cjs/ai-chat-container.cjs.entry.js +84 -57
- package/dist/cjs/ai-chat-header.cjs.entry.js +29 -19
- package/dist/cjs/ai-chat-message.cjs.entry.js +1456 -21
- package/dist/cjs/ai-conversation-list.cjs.entry.js +80 -0
- package/dist/cjs/ai-conversation-summary.cjs.entry.js +33 -0
- package/dist/cjs/ai-icon.cjs.entry.js +2 -2
- package/dist/cjs/ai-link.cjs.entry.js +4 -4
- package/dist/cjs/ai-loading.cjs.entry.js +35 -22
- package/dist/cjs/ai-message-input.cjs.entry.js +48 -15
- package/dist/cjs/ai-rating.cjs.entry.js +2 -2
- package/dist/cjs/ai-route-decision.cjs.entry.js +48 -0
- package/dist/cjs/ai-suggestion.cjs.entry.js +4 -4
- package/dist/cjs/ai-voice-input.cjs.entry.js +75 -21
- package/dist/cjs/{icon-registry-dmfLA-Dj.js → icon-registry-BKb9-2Nt.js} +24 -0
- package/dist/cjs/{index-DLJcLHFH.js → index-BkNg07SW.js} +1 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/ui-ai-kit.cjs.js +2 -2
- package/dist/collection/collection-manifest.json +3 -0
- package/dist/collection/components/ai-card/ai-card.css +5 -8
- package/dist/collection/components/ai-chat-container/ai-chat-container.css +17 -14
- package/dist/collection/components/ai-chat-container/ai-chat-container.js +125 -53
- package/dist/collection/components/ai-chat-header/ai-chat-header.css +50 -17
- package/dist/collection/components/ai-chat-header/ai-chat-header.js +53 -18
- package/dist/collection/components/ai-chat-message/ai-chat-message.css +47 -38
- package/dist/collection/components/ai-chat-message/ai-chat-message.js +68 -18
- package/dist/collection/components/ai-conversation-list/ai-conversation-list.css +196 -0
- package/dist/collection/components/ai-conversation-list/ai-conversation-list.js +176 -0
- package/dist/collection/components/ai-conversation-summary/ai-conversation-summary.css +103 -0
- package/dist/collection/components/ai-conversation-summary/ai-conversation-summary.js +118 -0
- package/dist/collection/components/ai-icon/ai-icon.js +1 -1
- package/dist/collection/components/ai-link/ai-link.css +3 -7
- package/dist/collection/components/ai-link/ai-link.js +1 -1
- package/dist/collection/components/ai-loading/ai-loading.css +149 -20
- package/dist/collection/components/ai-loading/ai-loading.js +100 -23
- package/dist/collection/components/ai-message-input/ai-message-input.css +41 -37
- package/dist/collection/components/ai-message-input/ai-message-input.js +100 -19
- package/dist/collection/components/ai-rating/ai-rating.css +8 -14
- package/dist/collection/components/ai-route-decision/ai-route-decision.css +132 -0
- package/dist/collection/components/ai-route-decision/ai-route-decision.js +195 -0
- package/dist/collection/components/ai-suggestion/ai-suggestion.css +5 -11
- package/dist/collection/components/ai-suggestion/ai-suggestion.js +2 -2
- package/dist/collection/components/ai-voice-input/ai-voice-input.css +27 -22
- package/dist/collection/components/ai-voice-input/ai-voice-input.js +116 -20
- package/dist/collection/utils/icon-registry.js +24 -0
- package/dist/components/ai-card.js +1 -1
- package/dist/components/ai-chat-container.js +1 -1
- package/dist/components/ai-chat-header.js +1 -1
- package/dist/components/ai-chat-message.js +2 -1
- package/dist/components/ai-conversation-list.d.ts +11 -0
- package/dist/components/ai-conversation-list.js +1 -0
- package/dist/components/ai-conversation-summary.d.ts +11 -0
- package/dist/components/ai-conversation-summary.js +1 -0
- package/dist/components/ai-icon.js +1 -1
- package/dist/components/ai-link.js +1 -1
- package/dist/components/ai-loading.js +1 -1
- package/dist/components/ai-message-input.js +1 -1
- package/dist/components/ai-rating.js +1 -1
- package/dist/components/ai-route-decision.d.ts +11 -0
- package/dist/components/ai-route-decision.js +1 -0
- package/dist/components/ai-suggestion.js +1 -1
- package/dist/components/ai-voice-input.js +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/p-CX1Yp79q.js +1 -0
- package/dist/components/p-DnO4dikr.js +1 -0
- package/dist/components/{p-CY6emva2.js → p-Dr2tAPV7.js} +1 -1
- package/dist/{ui-ai-kit/p-DYv5ef4M.js → components/p-SJZ6Ujn9.js} +1 -1
- package/dist/esm/ai-card.entry.js +2 -2
- package/dist/esm/ai-chat-container.entry.js +84 -57
- package/dist/esm/ai-chat-header.entry.js +29 -19
- package/dist/esm/ai-chat-message.entry.js +1456 -21
- package/dist/esm/ai-conversation-list.entry.js +78 -0
- package/dist/esm/ai-conversation-summary.entry.js +31 -0
- package/dist/esm/ai-icon.entry.js +2 -2
- package/dist/esm/ai-link.entry.js +4 -4
- package/dist/esm/ai-loading.entry.js +35 -22
- package/dist/esm/ai-message-input.entry.js +48 -15
- package/dist/esm/ai-rating.entry.js +2 -2
- package/dist/esm/ai-route-decision.entry.js +46 -0
- package/dist/esm/ai-suggestion.entry.js +4 -4
- package/dist/esm/ai-voice-input.entry.js +75 -21
- package/dist/esm/{icon-registry-DYv5ef4M.js → icon-registry-SJZ6Ujn9.js} +24 -0
- package/dist/esm/{index-7hrZ8FOQ.js → index-B0yIzgh4.js} +1 -1
- package/dist/esm/loader.js +3 -3
- package/dist/esm/ui-ai-kit.js +3 -3
- package/dist/types/components/ai-chat-container/ai-chat-container.d.ts +11 -1
- package/dist/types/components/ai-chat-header/ai-chat-header.d.ts +7 -2
- package/dist/types/components/ai-conversation-list/ai-conversation-list.d.ts +24 -0
- package/dist/types/components/ai-conversation-summary/ai-conversation-summary.d.ts +12 -0
- package/dist/types/components/ai-loading/ai-loading.d.ts +12 -6
- package/dist/types/components/ai-message-input/ai-message-input.d.ts +17 -3
- package/dist/types/components/ai-route-decision/ai-route-decision.d.ts +21 -0
- package/dist/types/components/ai-voice-input/ai-voice-input.d.ts +7 -0
- package/dist/types/components.d.ts +335 -11
- package/dist/types/index.d.ts +2 -0
- package/dist/types/utils/icon-registry.d.ts +1 -1
- package/dist/ui-ai-kit/p-2955439f.entry.js +1 -0
- package/dist/ui-ai-kit/p-5c9e9822.entry.js +1 -0
- package/dist/ui-ai-kit/p-5caf1c38.entry.js +1 -0
- package/dist/ui-ai-kit/p-74c5c83f.entry.js +1 -0
- package/dist/ui-ai-kit/p-76195745.entry.js +1 -0
- package/dist/ui-ai-kit/p-79c78d8e.entry.js +1 -0
- package/dist/ui-ai-kit/p-87e9739b.entry.js +1 -0
- package/dist/ui-ai-kit/p-9c4c6c01.entry.js +1 -0
- package/dist/ui-ai-kit/p-B0yIzgh4.js +2 -0
- package/dist/{components/p-DYv5ef4M.js → ui-ai-kit/p-SJZ6Ujn9.js} +1 -1
- package/dist/ui-ai-kit/p-a099fcfb.entry.js +1 -0
- package/dist/ui-ai-kit/p-b28af13a.entry.js +1 -0
- package/dist/ui-ai-kit/p-d1bb1ad0.entry.js +1 -0
- package/dist/ui-ai-kit/p-eb0c7e7a.entry.js +1 -0
- package/dist/ui-ai-kit/{p-455daa17.entry.js → p-eec6f083.entry.js} +1 -1
- package/dist/ui-ai-kit/p-ef07638f.entry.js +2 -0
- package/dist/ui-ai-kit/ui-ai-kit.css +1 -1
- package/dist/ui-ai-kit/ui-ai-kit.esm.js +1 -1
- package/package.json +5 -13
- package/dist/collection/components/ai-card/ai-card.stories.js +0 -52
- package/dist/collection/components/ai-chat-container/ai-chat-container.stories.js +0 -160
- package/dist/collection/components/ai-chat-header/ai-chat-header.stories.js +0 -138
- package/dist/collection/components/ai-chat-message/ai-chat-message.stories.js +0 -164
- package/dist/collection/components/ai-link/ai-link.stories.js +0 -79
- package/dist/collection/components/ai-loading/ai-loading.stories.js +0 -145
- package/dist/collection/components/ai-message-input/ai-message-input.stories.js +0 -125
- package/dist/collection/components/ai-rating/ai-rating.stories.js +0 -78
- package/dist/collection/components/ai-suggestion/ai-suggestion.stories.js +0 -62
- package/dist/collection/components/ai-voice-input/ai-voice-input.stories.js +0 -118
- package/dist/components/p-CWjXxYJI.js +0 -1
- package/dist/types/components/ai-card/ai-card.stories.d.ts +0 -7
- package/dist/types/components/ai-chat-container/ai-chat-container.stories.d.ts +0 -7
- package/dist/types/components/ai-chat-header/ai-chat-header.stories.d.ts +0 -8
- package/dist/types/components/ai-chat-message/ai-chat-message.stories.d.ts +0 -10
- package/dist/types/components/ai-link/ai-link.stories.d.ts +0 -8
- package/dist/types/components/ai-loading/ai-loading.stories.d.ts +0 -10
- package/dist/types/components/ai-message-input/ai-message-input.stories.d.ts +0 -13
- package/dist/types/components/ai-rating/ai-rating.stories.d.ts +0 -8
- package/dist/types/components/ai-suggestion/ai-suggestion.stories.d.ts +0 -8
- package/dist/types/components/ai-voice-input/ai-voice-input.stories.d.ts +0 -9
- package/dist/ui-ai-kit/p-11facfad.entry.js +0 -1
- package/dist/ui-ai-kit/p-128a2ed4.entry.js +0 -1
- package/dist/ui-ai-kit/p-227bdb8f.entry.js +0 -1
- package/dist/ui-ai-kit/p-56163e8c.entry.js +0 -1
- package/dist/ui-ai-kit/p-6d21d0fd.entry.js +0 -1
- package/dist/ui-ai-kit/p-6ddcd77b.entry.js +0 -1
- package/dist/ui-ai-kit/p-7hrZ8FOQ.js +0 -2
- package/dist/ui-ai-kit/p-8e90143e.entry.js +0 -1
- package/dist/ui-ai-kit/p-9938c277.entry.js +0 -1
- package/dist/ui-ai-kit/p-dc5b4a7f.entry.js +0 -1
- package/dist/ui-ai-kit/p-fb1702de.entry.js +0 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-BkNg07SW.js');
|
|
4
4
|
|
|
5
|
-
const aiVoiceInputCss = () => `:host{display:block;width:100
|
|
5
|
+
const aiVoiceInputCss = () => `:host{display:block;width:100%}.wrapper{position:relative;padding:var(--Spacing-Sizes-lg, 12px)}.glow{position:absolute;bottom:20px;left:39px;right:39px;height:29px;border-radius:9999px;background:var(--ai-input-glow);filter:blur(20px);opacity:0;pointer-events:none;transition:opacity 0.2s ease}.glow.visible{opacity:0.9}.input-container{position:relative;background-color:var(--ai-bg-input);border-radius:var(--ai-input-border-radius, 9999px);border:1px solid var(--ai-border-default);box-shadow:var(--ai-shadow-sm);padding:var(--ai-input-padding, 12px);overflow:hidden}.recording-row{display:flex;align-items:center;gap:var(--ai-input-gap, 10px)}.cancel-button{display:inline-flex;align-items:center;justify-content:center;gap:4px;min-height:32px;max-height:32px;padding:4px 8px;border-radius:32px;border:2px solid var(--ai-border-default);background-color:var(--ai-border-default);color:var(--ai-text-secondary);cursor:pointer;flex-shrink:0;transition:background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease}.cancel-button:hover{background-color:var(--ai-bg-surface);border-color:var(--ai-bg-surface)}.submit-button{display:inline-flex;align-items:center;justify-content:center;height:32px;width:32px;min-width:32px;padding:4px 8px;border-radius:32px;border:2px solid var(--ai-send-button-active-border, var(--ai-accent));background-color:var(--ai-send-button-active-bg, var(--ai-accent));color:var(--ai-accent-text);cursor:pointer;flex-shrink:0;transition:background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease}.submit-button:hover{background-color:var(--ai-send-button-active-hover-bg, var(--ai-accent));border-color:var(--ai-send-button-active-hover-border, var(--ai-accent))}@keyframes pulse-once{0%{transform:scale(1)}40%{transform:scale(1.18)}100%{transform:scale(1)}}.submit-button.pulse{animation:pulse-once 0.35s ease}.timer{font-size:13px;font-weight:500;color:var(--ai-text-secondary);min-width:36px;text-align:center;flex-shrink:0}.timer.warning{color:var(--ai-voice-timer-warning-color, var(--ai-danger-text))}.waveform{flex:1;min-width:0;height:32px}.error-message{position:absolute;bottom:-40px;left:50%;transform:translateX(-50%);background:var(--ai-voice-error-bg, var(--ai-danger-bg));color:var(--ai-voice-error-color, var(--ai-danger-text));font-size:11px;padding:6px 12px;border-radius:6px;white-space:nowrap;box-shadow:var(--ai-shadow-error);border:1px solid var(--ai-voice-error-border, var(--ai-danger-border));z-index:10}`;
|
|
6
6
|
|
|
7
7
|
const MAX_RECORDING_TIME = 60; // seconds
|
|
8
8
|
const VoiceInput = class {
|
|
@@ -11,16 +11,22 @@ const VoiceInput = class {
|
|
|
11
11
|
this.audioRecorded = index.createEvent(this, "audioRecorded");
|
|
12
12
|
this.recordingCancel = index.createEvent(this, "recordingCancel");
|
|
13
13
|
}
|
|
14
|
+
get el() { return index.getElement(this); }
|
|
14
15
|
/** Whether the voice input is disabled */
|
|
15
16
|
disabled = false;
|
|
16
17
|
/** Whether to show the waveform animation */
|
|
17
18
|
showWaveform = true;
|
|
18
19
|
/** Whether to auto-start recording on mount */
|
|
19
20
|
autoStart = false;
|
|
21
|
+
/** Error text to display on mic access failure. Defaults to Arabic; falls back to English when document lang is 'en' */
|
|
22
|
+
errorText = '';
|
|
23
|
+
/** Waveform bar color. Falls back to --ai-waveform-color CSS var, then #9ca3af */
|
|
24
|
+
waveformColor = '';
|
|
20
25
|
/** Internal state */
|
|
21
26
|
state = 'idle';
|
|
22
27
|
error = null;
|
|
23
28
|
recordingDuration = 0;
|
|
29
|
+
submitPulse = false;
|
|
24
30
|
/** Event emitted when audio blob is ready */
|
|
25
31
|
audioRecorded;
|
|
26
32
|
/** Event emitted when recording is canceled */
|
|
@@ -38,7 +44,7 @@ const VoiceInput = class {
|
|
|
38
44
|
animationFrameId = 0;
|
|
39
45
|
prevHeights = [];
|
|
40
46
|
componentDidLoad() {
|
|
41
|
-
if (this.autoStart) {
|
|
47
|
+
if (this.autoStart && !this.disabled) {
|
|
42
48
|
this.startRecording();
|
|
43
49
|
}
|
|
44
50
|
}
|
|
@@ -74,6 +80,11 @@ const VoiceInput = class {
|
|
|
74
80
|
this.streamRef = null;
|
|
75
81
|
}
|
|
76
82
|
};
|
|
83
|
+
getErrorText() {
|
|
84
|
+
if (this.errorText)
|
|
85
|
+
return this.errorText;
|
|
86
|
+
return document.documentElement.lang === 'en' ? 'Microphone access denied' : 'تعذّر الوصول للميكروفون';
|
|
87
|
+
}
|
|
77
88
|
startRecording = async () => {
|
|
78
89
|
try {
|
|
79
90
|
this.error = null;
|
|
@@ -112,10 +123,10 @@ const VoiceInput = class {
|
|
|
112
123
|
this.drawWaveform();
|
|
113
124
|
});
|
|
114
125
|
}
|
|
115
|
-
// Start timer
|
|
126
|
+
// Start timer — 1 s interval avoids unnecessary re-renders
|
|
116
127
|
this.recordingTimer = window.setInterval(() => {
|
|
117
128
|
this.recordingDuration = Math.floor((Date.now() - this.recordingStartTime) / 1000);
|
|
118
|
-
},
|
|
129
|
+
}, 1000);
|
|
119
130
|
// Auto-stop after max time
|
|
120
131
|
this.maxTimeoutRef = window.setTimeout(() => {
|
|
121
132
|
this.stopRecording();
|
|
@@ -123,27 +134,41 @@ const VoiceInput = class {
|
|
|
123
134
|
}
|
|
124
135
|
catch (err) {
|
|
125
136
|
console.error('Error starting recording:', err);
|
|
126
|
-
this.error =
|
|
137
|
+
this.error = this.getErrorText();
|
|
127
138
|
this.state = 'idle';
|
|
128
139
|
}
|
|
129
140
|
};
|
|
130
141
|
setupMediaRecorder = (stream) => {
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
142
|
+
// Pick a supported MIME type — audio/webm is unavailable on iOS/Safari
|
|
143
|
+
const mimeType = MediaRecorder.isTypeSupported('audio/webm')
|
|
144
|
+
? 'audio/webm'
|
|
145
|
+
: MediaRecorder.isTypeSupported('audio/ogg')
|
|
146
|
+
? 'audio/ogg'
|
|
147
|
+
: '';
|
|
148
|
+
const options = mimeType ? { mimeType } : {};
|
|
149
|
+
const mediaRecorder = new MediaRecorder(stream, options);
|
|
134
150
|
mediaRecorder.ondataavailable = e => {
|
|
135
151
|
if (e.data.size > 0) {
|
|
136
152
|
this.audioChunks.push(e.data);
|
|
137
153
|
}
|
|
138
154
|
};
|
|
139
155
|
mediaRecorder.onstop = () => {
|
|
140
|
-
const
|
|
156
|
+
const blobType = mimeType || 'audio/mp4';
|
|
157
|
+
const audioBlob = new Blob(this.audioChunks, { type: blobType });
|
|
141
158
|
this.audioRecorded.emit({ blob: audioBlob, duration: this.recordingDuration });
|
|
142
159
|
};
|
|
143
160
|
this.mediaRecorderRef = mediaRecorder;
|
|
144
161
|
mediaRecorder.start(100); // Collect data every 100ms
|
|
145
162
|
};
|
|
146
163
|
stopRecording = () => {
|
|
164
|
+
// Guard: require at least 1 second of audio
|
|
165
|
+
if (this.recordingDuration < 1) {
|
|
166
|
+
this.submitPulse = true;
|
|
167
|
+
setTimeout(() => {
|
|
168
|
+
this.submitPulse = false;
|
|
169
|
+
}, 400);
|
|
170
|
+
return;
|
|
171
|
+
}
|
|
147
172
|
if (this.recordingTimer) {
|
|
148
173
|
clearInterval(this.recordingTimer);
|
|
149
174
|
this.recordingTimer = null;
|
|
@@ -173,21 +198,51 @@ const VoiceInput = class {
|
|
|
173
198
|
const ctx = canvas.getContext('2d');
|
|
174
199
|
if (!ctx)
|
|
175
200
|
return;
|
|
176
|
-
const barCount = 100;
|
|
177
201
|
const barWidth = 1;
|
|
178
202
|
const gap = 2;
|
|
203
|
+
const minHeight = 4;
|
|
179
204
|
const bufferLength = this.analyserRef.frequencyBinCount;
|
|
180
205
|
const dataArray = new Uint8Array(bufferLength);
|
|
181
|
-
|
|
182
|
-
const
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
206
|
+
// Resolve waveform color from prop → CSS var → fallback
|
|
207
|
+
const resolvedColor = this.waveformColor ||
|
|
208
|
+
getComputedStyle(this.el).getPropertyValue('--ai-waveform-color').trim() ||
|
|
209
|
+
'#9ca3af';
|
|
210
|
+
const drawRoundRect = (x, y, w, h, r) => {
|
|
211
|
+
ctx.beginPath();
|
|
212
|
+
if (typeof ctx.roundRect === 'function') {
|
|
213
|
+
ctx.roundRect(x, y, w, h, r);
|
|
214
|
+
}
|
|
215
|
+
else {
|
|
216
|
+
// arc-based fallback for Safari < 15.4
|
|
217
|
+
const cr = Math.min(r, w / 2, h / 2);
|
|
218
|
+
ctx.moveTo(x + cr, y);
|
|
219
|
+
ctx.lineTo(x + w - cr, y);
|
|
220
|
+
ctx.arcTo(x + w, y, x + w, y + cr, cr);
|
|
221
|
+
ctx.lineTo(x + w, y + h - cr);
|
|
222
|
+
ctx.arcTo(x + w, y + h, x + w - cr, y + h, cr);
|
|
223
|
+
ctx.lineTo(x + cr, y + h);
|
|
224
|
+
ctx.arcTo(x, y + h, x, y + h - cr, cr);
|
|
225
|
+
ctx.lineTo(x, y + cr);
|
|
226
|
+
ctx.arcTo(x, y, x + cr, y, cr);
|
|
227
|
+
ctx.closePath();
|
|
228
|
+
}
|
|
229
|
+
};
|
|
187
230
|
const draw = () => {
|
|
188
231
|
if (this.state !== 'recording')
|
|
189
232
|
return;
|
|
190
233
|
this.animationFrameId = requestAnimationFrame(draw);
|
|
234
|
+
// Sync canvas buffer to actual rendered size so it never overflows
|
|
235
|
+
const renderedWidth = canvas.offsetWidth;
|
|
236
|
+
if (renderedWidth > 0 && canvas.width !== renderedWidth) {
|
|
237
|
+
canvas.width = renderedWidth;
|
|
238
|
+
}
|
|
239
|
+
// Recompute barCount each frame based on actual canvas width
|
|
240
|
+
const barCount = Math.min(100, Math.floor(canvas.width / (barWidth + gap)));
|
|
241
|
+
const binsPerBar = Math.max(1, Math.floor(bufferLength / barCount));
|
|
242
|
+
// Re-initialize lerp state when barCount changes
|
|
243
|
+
if (this.prevHeights.length !== barCount) {
|
|
244
|
+
this.prevHeights = new Array(barCount).fill(minHeight);
|
|
245
|
+
}
|
|
191
246
|
this.analyserRef.getByteFrequencyData(dataArray);
|
|
192
247
|
ctx.clearRect(0, 0, canvas.width, canvas.height);
|
|
193
248
|
const centerY = canvas.height / 2;
|
|
@@ -210,9 +265,8 @@ const VoiceInput = class {
|
|
|
210
265
|
const barHeight = this.prevHeights[i];
|
|
211
266
|
const x = startX + i * (barWidth + gap);
|
|
212
267
|
const y = centerY - barHeight / 2;
|
|
213
|
-
ctx.fillStyle =
|
|
214
|
-
|
|
215
|
-
ctx.roundRect(x, y, barWidth, barHeight, barWidth / 2);
|
|
268
|
+
ctx.fillStyle = resolvedColor;
|
|
269
|
+
drawRoundRect(x, y, barWidth, barHeight, barWidth / 2);
|
|
216
270
|
ctx.fill();
|
|
217
271
|
}
|
|
218
272
|
};
|
|
@@ -225,7 +279,7 @@ const VoiceInput = class {
|
|
|
225
279
|
};
|
|
226
280
|
render() {
|
|
227
281
|
const remaining = MAX_RECORDING_TIME - this.recordingDuration;
|
|
228
|
-
return (index.h(index.Host, { key: '
|
|
282
|
+
return (index.h(index.Host, { key: '225036c9c966084bcbdef9760d08cb677c985cc1' }, index.h("div", { key: '3cb3841dcb8a8e283cc325a200073ba3d540d7f8', class: "wrapper" }, index.h("div", { key: '1e71acf6ceb25d50d4131bf1a8021837756d0a41', class: `glow${this.state === 'recording' ? ' visible' : ''}`, "aria-hidden": "true" }), index.h("div", { key: 'c96027342fdf08edc990cae9f25ebb087dd33612', class: "input-container" }, this.state === 'idle' ? (index.h("div", { class: "recording-row" }, index.h("button", { type: "button", class: "submit-button", onClick: this.startRecording, disabled: this.disabled, "aria-label": "Start recording" }, index.h("ai-icon", { name: "mic", size: 16 })), this.error && (index.h("div", { class: "error-message", role: "alert" }, this.error)))) : (index.h("div", { class: "recording-row" }, index.h("button", { type: "button", class: "cancel-button", onClick: this.cancelRecording, "aria-label": "Cancel" }, index.h("ai-icon", { name: "cancel", size: 14 })), index.h("div", { class: `timer${remaining <= 5 ? ' warning' : ''}` }, this.formatDuration(this.recordingDuration)), this.showWaveform && index.h("canvas", { ref: el => (this.canvasRef = el), class: "waveform", height: "32" }), index.h("button", { type: "button", class: `submit-button${this.submitPulse ? ' pulse' : ''}`, onClick: this.stopRecording, "aria-label": "Send" }, index.h("ai-icon", { name: "arrow-up", size: 14 }))))))));
|
|
229
283
|
}
|
|
230
284
|
};
|
|
231
285
|
VoiceInput.style = aiVoiceInputCss();
|
|
@@ -77,6 +77,30 @@ const iconRegistry = {
|
|
|
77
77
|
viewBox: '0 0 24 24',
|
|
78
78
|
content: ` <path d="M15.1667 0.999756L15.7646 2.11753C16.1689 2.87322 16.371 3.25107 16.2374 3.41289C16.1037 3.57471 15.6635 3.44402 14.7831 3.18264C13.9029 2.92131 12.9684 2.78071 12 2.78071C6.75329 2.78071 2.5 6.90822 2.5 11.9998C2.5 13.6789 2.96262 15.2533 3.77093 16.6093M8.83333 22.9998L8.23536 21.882C7.83108 21.1263 7.62894 20.7484 7.7626 20.5866C7.89627 20.4248 8.33649 20.5555 9.21689 20.8169C10.0971 21.0782 11.0316 21.2188 12 21.2188C17.2467 21.2188 21.5 17.0913 21.5 11.9998C21.5 10.3206 21.0374 8.74623 20.2291 7.39023" stroke="currentColor" />`,
|
|
79
79
|
},
|
|
80
|
+
'list': {
|
|
81
|
+
viewBox: '0 0 24 24',
|
|
82
|
+
content: '<path d="M8 6h13M8 12h13M8 18h13" stroke="currentColor" stroke-width="2" stroke-linecap="round" fill="none"/><path d="M3 6h.01M3 12h.01M3 18h.01" stroke="currentColor" stroke-width="2" stroke-linecap="round" fill="none"/>',
|
|
83
|
+
},
|
|
84
|
+
'route': {
|
|
85
|
+
viewBox: '0 0 24 24',
|
|
86
|
+
content: '<circle cx="6" cy="19" r="2" stroke="currentColor" stroke-width="2" fill="none"/><circle cx="18" cy="5" r="2" stroke="currentColor" stroke-width="2" fill="none"/><path d="M6 17V11a6 6 0 0 1 6-6h2" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" fill="none"/><path d="M15 8l3-3-3-3" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" fill="none"/>',
|
|
87
|
+
},
|
|
88
|
+
'check-circle': {
|
|
89
|
+
viewBox: '0 0 24 24',
|
|
90
|
+
content: '<circle cx="12" cy="12" r="9" stroke="currentColor" stroke-width="2" fill="none"/><path d="M8 12l3 3 5-5" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" fill="none"/>',
|
|
91
|
+
},
|
|
92
|
+
'wifi-off': {
|
|
93
|
+
viewBox: '0 0 24 24',
|
|
94
|
+
content: '<path d="M1 1l22 22M16.72 11.06A11 11 0 0 0 12 10c-2.06 0-3.96.57-5.59 1.56M5 12.55a11 11 0 0 0-1.48 1.45M10.71 5.05A16 16 0 0 1 22.56 9M1.42 9a15.91 15.91 0 0 1 4.7-2.88M8.53 16.11a6 6 0 0 1 6.95 0M12 20h.01" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" fill="none"/>',
|
|
95
|
+
},
|
|
96
|
+
'warning': {
|
|
97
|
+
viewBox: '0 0 24 24',
|
|
98
|
+
content: '<path d="M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" fill="none"/><path d="M12 9v4M12 17h.01" stroke="currentColor" stroke-width="2" stroke-linecap="round" fill="none"/>',
|
|
99
|
+
},
|
|
100
|
+
'ellipsis': {
|
|
101
|
+
viewBox: '0 0 24 24',
|
|
102
|
+
content: '<circle cx="5" cy="12" r="2" fill="currentColor"/><circle cx="12" cy="12" r="2" fill="currentColor"/><circle cx="19" cy="12" r="2" fill="currentColor"/>',
|
|
103
|
+
},
|
|
80
104
|
};
|
|
81
105
|
|
|
82
106
|
exports.iconRegistry = iconRegistry;
|
|
@@ -4,7 +4,7 @@ const NAMESPACE = 'ui-ai-kit';
|
|
|
4
4
|
const BUILD = /* ui-ai-kit */ { hotModuleReplacement: false, hydratedSelectorName: "hydrated", lazyLoad: true, propChangeCallback: true, state: true, updatable: true};
|
|
5
5
|
|
|
6
6
|
const globalScripts = () => {};
|
|
7
|
-
const globalStyles = "@import url(\"https://cdn.salla.network/fonts/pingarlt.css\");:root{--ai-font-family:\"PingARLT\", sans-serif;font-family:var(--ai-font-family);--ai-bg-card:hsl(var(--white));--ai-bg-surface:hsl(var(--gray-300));--ai-bg-input:hsl(var(--white));--ai-text-primary:hsl(var(--dark));--ai-text-secondary:hsl(var(--dark-100));--ai-text-muted:hsl(var(--gray));--ai-border-default:hsl(var(--gray-400));--ai-border-light:hsl(var(--gray-300));--ai-accent:hsl(var(--secondary));--ai-accent-dark:hsl(var(--primary));--ai-accent-text:hsl(var(--dark));--ai-user-bubble-bg:hsl(var(--gray-300));--ai-agent-bubble-bg:hsl(var(--white));--ai-warning-bg:hsl(var(--warning-100));--ai-warning-border:hsl(var(--warning));--ai-success:hsl(var(--success));--ai-success-text:hsl(var(--success));--ai-success-bg:hsl(var(--success-100));--ai-danger-text:hsl(var(--danger));--ai-danger-bg:hsl(var(--danger-100));--ai-danger-border:hsl(var(--danger-200));--ai-accent-bg:hsl(var(--secondary-100));--ai-focus-ring:hsl(var(--info));--ai-amber:hsl(var(--warning));--ai-scrollbar-thumb:rgba(0, 0, 0, 0.15);--ai-glow-gradient:linear-gradient(90deg, hsl(var(--dark-100)) 0%, hsl(var(--gray)) 50%, hsl(var(--dark-100)) 100%);--ai-input-glow:linear-gradient(
|
|
7
|
+
const globalStyles = "@import url(\"https://cdn.salla.network/fonts/pingarlt.css\");:root{--ai-font-family:\"PingARLT\", sans-serif;font-family:var(--ai-font-family);--ai-bg-card:hsl(var(--white));--ai-bg-surface:hsl(var(--gray-300));--ai-bg-input:hsl(var(--white));--ai-text-primary:hsl(var(--dark));--ai-text-secondary:hsl(var(--dark-100));--ai-text-muted:hsl(var(--gray));--ai-border-default:hsl(var(--gray-400));--ai-border-light:hsl(var(--gray-300));--ai-accent:hsl(var(--secondary));--ai-accent-dark:hsl(var(--primary));--ai-accent-text:hsl(var(--dark));--ai-user-bubble-bg:hsl(var(--gray-300));--ai-agent-bubble-bg:hsl(var(--white));--ai-warning-bg:hsl(var(--warning-100));--ai-warning-border:hsl(var(--warning));--ai-success:hsl(var(--success));--ai-success-text:hsl(var(--success));--ai-success-bg:hsl(var(--success-100));--ai-danger-text:hsl(var(--danger));--ai-danger-bg:hsl(var(--danger-100));--ai-danger-border:hsl(var(--danger-200));--ai-accent-bg:hsl(var(--secondary-100));--ai-focus-ring:hsl(var(--info));--ai-amber:hsl(var(--warning));--ai-scrollbar-thumb:rgba(0, 0, 0, 0.15);--ai-scrollbar-thumb-hover:rgba(0, 0, 0, 0.28);--ai-glow-gradient:linear-gradient(90deg, hsl(var(--dark-100)) 0%, hsl(var(--gray)) 50%, hsl(var(--dark-100)) 100%);--ai-input-glow:linear-gradient(90deg, #73F0EE 0%, #EBF1B1 10%, #A4FFE5 100%);--ai-shadow-sm:0px 1px 2px 0px hsl(var(--dark) / 0.05);--ai-shadow-inner:inset 0px 0px 3px 1px hsl(var(--dark) / 0.06);--ai-shadow-badge:0px 0px 2px 1px hsl(var(--dark) / 0.08);--ai-shadow-active:0px 4px 6px -1px hsl(var(--dark) / 0.08), 0px 2px 4px -1px hsl(var(--dark) / 0.06);--ai-shadow-float:0 8px 32px hsl(var(--dark) / 0.12), 0 2px 8px hsl(var(--dark) / 0.08);--ai-shadow-error:0 2px 8px hsl(var(--dark) / 0.15);--ai-shadow-watermark:drop-shadow(0 4px 6px hsl(var(--dark) / 0.05));--ai-hover-overlay:rgba(0, 0, 0, 0.06);--ai-input-focus-glow:0 0 10px 4px hsl(var(--secondary) / 0.4);--ai-font-family-mono:monospace;--ai-spacing-2xl:var(--Spacing-Sizes-2xl, 16px)}.dark{--ai-bg-card:hsl(var(--gray-100));--ai-bg-surface:hsl(var(--white-300));--ai-bg-input:hsl(var(--gray-100));--ai-text-primary:hsl(var(--dark));--ai-text-secondary:hsl(var(--dark-200));--ai-text-muted:hsl(var(--gray));--ai-border-default:hsl(var(--gray-400));--ai-border-light:hsl(var(--gray-300));--ai-accent:hsl(var(--secondary));--ai-accent-dark:hsl(var(--primary-500));--ai-accent-text:hsl(var(--primary-force));--ai-user-bubble-bg:hsl(var(--gray-400));--ai-agent-bubble-bg:hsl(var(--gray-100));--ai-warning-bg:hsl(var(--warning-100));--ai-warning-border:hsl(var(--warning));--ai-success:hsl(var(--success));--ai-success-text:hsl(var(--success));--ai-success-bg:hsl(var(--success-100));--ai-danger-text:hsl(var(--danger));--ai-danger-bg:hsl(var(--danger-100));--ai-danger-border:hsl(var(--danger-200));--ai-accent-bg:hsl(var(--secondary-100));--ai-focus-ring:hsl(var(--info));--ai-amber:hsl(var(--warning));--ai-scrollbar-thumb:rgba(255, 255, 255, 0.2);--ai-scrollbar-thumb-hover:rgba(255, 255, 255, 0.35);--ai-hover-overlay:rgba(255, 255, 255, 0.08);--ai-glow-gradient:linear-gradient(90deg, hsl(var(--gray)) 0%, hsl(var(--dark-300)) 50%, hsl(var(--gray)) 100%);--ai-input-glow:linear-gradient(to right, hsl(var(--secondary-400)), hsl(var(--secondary-100)) 10%, hsl(var(--secondary)))}";
|
|
8
8
|
|
|
9
9
|
/*
|
|
10
10
|
Stencil Client Platform v4.43.2 | MIT Licensed | https://stenciljs.com
|
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-BkNg07SW.js');
|
|
4
4
|
|
|
5
5
|
const defineCustomElements = async (win, options) => {
|
|
6
6
|
if (typeof window === 'undefined') return undefined;
|
|
7
7
|
await index.globalScripts();
|
|
8
|
-
return index.bootstrapLazy([["ai-
|
|
8
|
+
return index.bootstrapLazy([["ai-message-input.cjs",[[513,"ai-message-input",{"placeholder":[1],"disabled":[4],"showVoiceButton":[4,"show-voice-button"],"maxLength":[2,"max-length"],"isRecording":[4,"is-recording"],"inputValue":[32],"showVoiceRecorder":[32],"isMultiline":[32],"setInputValue":[64]},null,{"isRecording":[{"onIsRecordingChange":0}]}]]],["ai-chat-container.cjs",[[769,"ai-chat-container",{"isOpen":[4,"is-open"],"position":[1],"width":[1],"autoScroll":[4,"auto-scroll"],"showWatermark":[4,"show-watermark"],"floatHeight":[1,"float-height"],"theme":[1],"isMobile":[32],"floatLeft":[32],"floatTop":[32],"scrollToBottom":[64]},null,{"isOpen":[{"isOpenChanged":0}],"position":[{"positionChanged":0}]}]]],["ai-card.cjs",[[769,"ai-card",{"noPadding":[4,"no-padding"],"noShadow":[4,"no-shadow"]}]]],["ai-chat-header.cjs",[[513,"ai-chat-header",{"mode":[1],"conversation":[1],"agentName":[1,"agent-name"],"agentStatus":[1,"agent-status"],"agentAvatar":[1,"agent-avatar"],"showBack":[4,"show-back"],"isDraggable":[4,"is-draggable"],"statusIndicator":[1,"status-indicator"],"avatarError":[32]}]]],["ai-chat-message.cjs",[[769,"ai-chat-message",{"role":[1],"content":[1],"format":[1],"agentName":[1,"agent-name"],"timestamp":[1],"showActions":[4,"show-actions"],"enableRegenerate":[4,"enable-regenerate"],"feedbackValue":[1025,"feedback-value"],"copySuccess":[32]}]]],["ai-conversation-list.cjs",[[513,"ai-conversation-list",{"items":[1],"activeId":[1,"active-id"],"loading":[4]}]]],["ai-conversation-summary.cjs",[[769,"ai-conversation-summary",{"conversation":[1],"summary":[1],"messageCount":[2,"message-count"],"language":[1]}]]],["ai-link.cjs",[[769,"ai-link",{"label":[1],"href":[1],"target":[1],"rel":[1]}]]],["ai-loading.cjs",[[513,"ai-loading",{"mode":[1],"statusText":[1,"status-text"],"thinkingSubtext":[1,"thinking-subtext"],"steps":[16],"headerTitle":[1,"header-title"],"currentAgent":[1,"current-agent"],"showAgentBadges":[4,"show-agent-badges"],"expanded":[1028],"collapsible":[4],"_expanded":[32]}]]],["ai-rating.cjs",[[513,"ai-rating",{"question":[1],"subtitle":[1],"value":[1026],"disabled":[4],"hovered":[32]}]]],["ai-route-decision.cjs",[[513,"ai-route-decision",{"selectedAgent":[1,"selected-agent"],"agentIcon":[1,"agent-icon"],"reason":[1],"confidence":[2],"detectedLanguage":[1,"detected-language"],"expanded":[1028],"_expanded":[32]}]]],["ai-suggestion.cjs",[[769,"ai-suggestion",{"label":[1],"disabled":[4]}]]],["ai-icon.cjs",[[513,"ai-icon",{"name":[1],"size":[2]}]]],["ai-voice-input.cjs",[[513,"ai-voice-input",{"disabled":[4],"showWaveform":[4,"show-waveform"],"autoStart":[4,"auto-start"],"errorText":[1,"error-text"],"waveformColor":[1,"waveform-color"],"state":[32],"error":[32],"recordingDuration":[32],"submitPulse":[32]}]]]], options);
|
|
9
9
|
};
|
|
10
10
|
|
|
11
11
|
exports.setNonce = index.setNonce;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-BkNg07SW.js');
|
|
4
4
|
|
|
5
5
|
var _documentCurrentScript = typeof document !== 'undefined' ? document.currentScript : null;
|
|
6
6
|
/*
|
|
@@ -18,7 +18,7 @@ var patchBrowser = () => {
|
|
|
18
18
|
|
|
19
19
|
patchBrowser().then(async (options) => {
|
|
20
20
|
await index.globalScripts();
|
|
21
|
-
return index.bootstrapLazy([["ai-
|
|
21
|
+
return index.bootstrapLazy([["ai-message-input.cjs",[[513,"ai-message-input",{"placeholder":[1],"disabled":[4],"showVoiceButton":[4,"show-voice-button"],"maxLength":[2,"max-length"],"isRecording":[4,"is-recording"],"inputValue":[32],"showVoiceRecorder":[32],"isMultiline":[32],"setInputValue":[64]},null,{"isRecording":[{"onIsRecordingChange":0}]}]]],["ai-chat-container.cjs",[[769,"ai-chat-container",{"isOpen":[4,"is-open"],"position":[1],"width":[1],"autoScroll":[4,"auto-scroll"],"showWatermark":[4,"show-watermark"],"floatHeight":[1,"float-height"],"theme":[1],"isMobile":[32],"floatLeft":[32],"floatTop":[32],"scrollToBottom":[64]},null,{"isOpen":[{"isOpenChanged":0}],"position":[{"positionChanged":0}]}]]],["ai-card.cjs",[[769,"ai-card",{"noPadding":[4,"no-padding"],"noShadow":[4,"no-shadow"]}]]],["ai-chat-header.cjs",[[513,"ai-chat-header",{"mode":[1],"conversation":[1],"agentName":[1,"agent-name"],"agentStatus":[1,"agent-status"],"agentAvatar":[1,"agent-avatar"],"showBack":[4,"show-back"],"isDraggable":[4,"is-draggable"],"statusIndicator":[1,"status-indicator"],"avatarError":[32]}]]],["ai-chat-message.cjs",[[769,"ai-chat-message",{"role":[1],"content":[1],"format":[1],"agentName":[1,"agent-name"],"timestamp":[1],"showActions":[4,"show-actions"],"enableRegenerate":[4,"enable-regenerate"],"feedbackValue":[1025,"feedback-value"],"copySuccess":[32]}]]],["ai-conversation-list.cjs",[[513,"ai-conversation-list",{"items":[1],"activeId":[1,"active-id"],"loading":[4]}]]],["ai-conversation-summary.cjs",[[769,"ai-conversation-summary",{"conversation":[1],"summary":[1],"messageCount":[2,"message-count"],"language":[1]}]]],["ai-link.cjs",[[769,"ai-link",{"label":[1],"href":[1],"target":[1],"rel":[1]}]]],["ai-loading.cjs",[[513,"ai-loading",{"mode":[1],"statusText":[1,"status-text"],"thinkingSubtext":[1,"thinking-subtext"],"steps":[16],"headerTitle":[1,"header-title"],"currentAgent":[1,"current-agent"],"showAgentBadges":[4,"show-agent-badges"],"expanded":[1028],"collapsible":[4],"_expanded":[32]}]]],["ai-rating.cjs",[[513,"ai-rating",{"question":[1],"subtitle":[1],"value":[1026],"disabled":[4],"hovered":[32]}]]],["ai-route-decision.cjs",[[513,"ai-route-decision",{"selectedAgent":[1,"selected-agent"],"agentIcon":[1,"agent-icon"],"reason":[1],"confidence":[2],"detectedLanguage":[1,"detected-language"],"expanded":[1028],"_expanded":[32]}]]],["ai-suggestion.cjs",[[769,"ai-suggestion",{"label":[1],"disabled":[4]}]]],["ai-icon.cjs",[[513,"ai-icon",{"name":[1],"size":[2]}]]],["ai-voice-input.cjs",[[513,"ai-voice-input",{"disabled":[4],"showWaveform":[4,"show-waveform"],"autoStart":[4,"auto-start"],"errorText":[1,"error-text"],"waveformColor":[1,"waveform-color"],"state":[32],"error":[32],"recordingDuration":[32],"submitPulse":[32]}]]]], options);
|
|
22
22
|
});
|
|
23
23
|
|
|
24
24
|
exports.setNonce = index.setNonce;
|
|
@@ -6,9 +6,12 @@
|
|
|
6
6
|
"components/ai-chat-container/ai-chat-container.js",
|
|
7
7
|
"components/ai-chat-header/ai-chat-header.js",
|
|
8
8
|
"components/ai-chat-message/ai-chat-message.js",
|
|
9
|
+
"components/ai-conversation-list/ai-conversation-list.js",
|
|
10
|
+
"components/ai-conversation-summary/ai-conversation-summary.js",
|
|
9
11
|
"components/ai-icon/ai-icon.js",
|
|
10
12
|
"components/ai-link/ai-link.js",
|
|
11
13
|
"components/ai-message-input/ai-message-input.js",
|
|
14
|
+
"components/ai-route-decision/ai-route-decision.js",
|
|
12
15
|
"components/ai-suggestion/ai-suggestion.js",
|
|
13
16
|
"components/ai-voice-input/ai-voice-input.js"
|
|
14
17
|
],
|
|
@@ -1,32 +1,29 @@
|
|
|
1
1
|
/* ─── Custom Properties ──────────────────────────────────────────────────── */
|
|
2
2
|
:host {
|
|
3
|
-
--ai-card-
|
|
4
|
-
--ai-card-border: 1px solid var(--ai-border-default, #eeeeee);
|
|
3
|
+
--ai-card-border: 1px solid var(--ai-border-default);
|
|
5
4
|
--ai-card-radius: 16px;
|
|
6
5
|
--ai-card-padding: 16px;
|
|
7
6
|
--ai-card-gap: 12px;
|
|
8
|
-
--ai-card-shadow:
|
|
9
|
-
--ai-text-color: var(--ai-text-primary, #333333);
|
|
7
|
+
--ai-card-shadow: var(--ai-shadow-sm);
|
|
10
8
|
display: block;
|
|
11
|
-
direction: rtl;
|
|
12
9
|
}
|
|
13
10
|
|
|
14
11
|
/* ─── Card Shell ─────────────────────────────────────────────────────────── */
|
|
15
12
|
.card {
|
|
16
|
-
background: var(--ai-card
|
|
13
|
+
background: var(--ai-bg-card);
|
|
17
14
|
border: var(--ai-card-border);
|
|
18
15
|
border-radius: var(--ai-card-radius);
|
|
19
16
|
padding: var(--ai-card-padding);
|
|
20
17
|
box-shadow: var(--ai-card-shadow);
|
|
21
18
|
box-sizing: border-box;
|
|
22
19
|
overflow: hidden;
|
|
23
|
-
|
|
20
|
+
color: var(--ai-text-primary);
|
|
24
21
|
width: 100%;
|
|
25
22
|
/* Inner layout — flex column so slotted children stack with consistent gap */
|
|
26
23
|
display: flex;
|
|
27
24
|
flex-direction: column;
|
|
28
25
|
gap: var(--ai-card-gap);
|
|
29
|
-
text-align:
|
|
26
|
+
text-align: start;
|
|
30
27
|
font-size: 14px;
|
|
31
28
|
line-height: 20px;
|
|
32
29
|
}
|
|
@@ -5,13 +5,13 @@
|
|
|
5
5
|
/* ── Base ─────────────────────────────────────────────────────────────────── */
|
|
6
6
|
|
|
7
7
|
.chat-container {
|
|
8
|
-
font-family: var(--ai-font-family
|
|
8
|
+
font-family: var(--ai-font-family);
|
|
9
9
|
display: flex;
|
|
10
10
|
flex-direction: column;
|
|
11
11
|
overflow: hidden;
|
|
12
12
|
position: relative;
|
|
13
|
-
background-color: var(--ai-container-bg, var(--ai-bg-card
|
|
14
|
-
border: 1px solid var(--
|
|
13
|
+
background-color: var(--ai-container-bg, var(--ai-bg-card));
|
|
14
|
+
border: 1px solid var(--ai-border-default);
|
|
15
15
|
z-index: 50;
|
|
16
16
|
box-sizing: border-box;
|
|
17
17
|
}
|
|
@@ -23,7 +23,8 @@
|
|
|
23
23
|
overflow-y: auto;
|
|
24
24
|
min-height: 0;
|
|
25
25
|
scrollbar-width: thin;
|
|
26
|
-
|
|
26
|
+
padding: var(--ai-spacing-2xl, 16px);
|
|
27
|
+
scrollbar-color: var(--ai-scrollbar-thumb) transparent;
|
|
27
28
|
}
|
|
28
29
|
|
|
29
30
|
.messages-area::-webkit-scrollbar {
|
|
@@ -35,12 +36,12 @@
|
|
|
35
36
|
}
|
|
36
37
|
|
|
37
38
|
.messages-area::-webkit-scrollbar-thumb {
|
|
38
|
-
background: var(--ai-scrollbar-thumb
|
|
39
|
+
background: var(--ai-scrollbar-thumb);
|
|
39
40
|
border-radius: 99px;
|
|
40
41
|
}
|
|
41
42
|
|
|
42
43
|
.messages-area::-webkit-scrollbar-thumb:hover {
|
|
43
|
-
background: var(--ai-scrollbar-thumb
|
|
44
|
+
background: var(--ai-scrollbar-thumb-hover);
|
|
44
45
|
}
|
|
45
46
|
|
|
46
47
|
/* ── Sticky modes (left / right) ─────────────────────────────────────────── */
|
|
@@ -72,17 +73,19 @@
|
|
|
72
73
|
|
|
73
74
|
.chat-container.float {
|
|
74
75
|
position: fixed;
|
|
75
|
-
top: 24px;
|
|
76
|
-
left: 24px;
|
|
77
76
|
border-radius: 16px;
|
|
78
|
-
box-shadow:
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
77
|
+
box-shadow: var(--ai-shadow-float);
|
|
78
|
+
opacity: 0;
|
|
79
|
+
pointer-events: none;
|
|
80
|
+
transform: scale(0.95);
|
|
81
|
+
transform-origin: bottom left;
|
|
82
|
+
transition: opacity 200ms ease, transform 200ms ease;
|
|
82
83
|
}
|
|
83
84
|
|
|
84
85
|
.chat-container.float.open {
|
|
85
|
-
|
|
86
|
+
opacity: 1;
|
|
87
|
+
pointer-events: auto;
|
|
88
|
+
transform: scale(1);
|
|
86
89
|
}
|
|
87
90
|
|
|
88
91
|
/* ── Watermark (empty / idle state) ──────────────────────────────────────── */
|
|
@@ -97,7 +100,7 @@
|
|
|
97
100
|
|
|
98
101
|
.watermark ai-icon {
|
|
99
102
|
opacity: 0.8;
|
|
100
|
-
filter:
|
|
103
|
+
filter: var(--ai-shadow-watermark);
|
|
101
104
|
}
|
|
102
105
|
|
|
103
106
|
/* ── Mobile ──────────────────────────────────────────────────────────────── */
|