@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
|
@@ -45,11 +45,20 @@ export namespace Components {
|
|
|
45
45
|
* @default 'right'
|
|
46
46
|
*/
|
|
47
47
|
"position": 'left' | 'right' | 'float';
|
|
48
|
+
/**
|
|
49
|
+
* Programmatically scroll the messages area to the bottom
|
|
50
|
+
*/
|
|
51
|
+
"scrollToBottom": () => Promise<void>;
|
|
48
52
|
/**
|
|
49
53
|
* Show AI watermark in the top half of the container
|
|
50
54
|
* @default false
|
|
51
55
|
*/
|
|
52
56
|
"showWatermark": boolean;
|
|
57
|
+
/**
|
|
58
|
+
* Color theme for the panel
|
|
59
|
+
* @default 'light'
|
|
60
|
+
*/
|
|
61
|
+
"theme": 'light' | 'dark' | 'auto';
|
|
53
62
|
/**
|
|
54
63
|
* Width of the panel (CSS value, e.g., '400px', '30%', '28rem')
|
|
55
64
|
* @default '28rem'
|
|
@@ -91,6 +100,11 @@ export namespace Components {
|
|
|
91
100
|
* @default true
|
|
92
101
|
*/
|
|
93
102
|
"showBack": boolean;
|
|
103
|
+
/**
|
|
104
|
+
* Human mode: status indicator variant
|
|
105
|
+
* @default 'online'
|
|
106
|
+
*/
|
|
107
|
+
"statusIndicator": 'online' | 'offline' | 'busy' | 'away';
|
|
94
108
|
}
|
|
95
109
|
interface AiChatMessage {
|
|
96
110
|
/**
|
|
@@ -126,6 +140,45 @@ export namespace Components {
|
|
|
126
140
|
*/
|
|
127
141
|
"timestamp": string;
|
|
128
142
|
}
|
|
143
|
+
interface AiConversationList {
|
|
144
|
+
/**
|
|
145
|
+
* ID of the currently active conversation
|
|
146
|
+
* @default ''
|
|
147
|
+
*/
|
|
148
|
+
"activeId": string;
|
|
149
|
+
/**
|
|
150
|
+
* JSON array of ConversationItem
|
|
151
|
+
* @default '[]'
|
|
152
|
+
*/
|
|
153
|
+
"items": string;
|
|
154
|
+
/**
|
|
155
|
+
* Show skeleton loading state
|
|
156
|
+
* @default false
|
|
157
|
+
*/
|
|
158
|
+
"loading": boolean;
|
|
159
|
+
}
|
|
160
|
+
interface AiConversationSummary {
|
|
161
|
+
/**
|
|
162
|
+
* Card heading
|
|
163
|
+
* @default 'ملخص المحادثة'
|
|
164
|
+
*/
|
|
165
|
+
"conversation": string;
|
|
166
|
+
/**
|
|
167
|
+
* Conversation language label
|
|
168
|
+
* @default ''
|
|
169
|
+
*/
|
|
170
|
+
"language": string;
|
|
171
|
+
/**
|
|
172
|
+
* Total message count shown as a badge
|
|
173
|
+
* @default 0
|
|
174
|
+
*/
|
|
175
|
+
"messageCount": number;
|
|
176
|
+
/**
|
|
177
|
+
* Summary body text
|
|
178
|
+
* @default ''
|
|
179
|
+
*/
|
|
180
|
+
"summary": string;
|
|
181
|
+
}
|
|
129
182
|
interface AiIcon {
|
|
130
183
|
/**
|
|
131
184
|
* Icon name from the registry
|
|
@@ -165,6 +218,11 @@ export namespace Components {
|
|
|
165
218
|
* @default true
|
|
166
219
|
*/
|
|
167
220
|
"collapsible": boolean;
|
|
221
|
+
/**
|
|
222
|
+
* Agent name shown in header alongside sparkle
|
|
223
|
+
* @default ''
|
|
224
|
+
*/
|
|
225
|
+
"currentAgent": string;
|
|
168
226
|
/**
|
|
169
227
|
* Steps mode expand state
|
|
170
228
|
* @default true
|
|
@@ -180,6 +238,11 @@ export namespace Components {
|
|
|
180
238
|
* @default 'thinking'
|
|
181
239
|
*/
|
|
182
240
|
"mode": 'thinking' | 'steps';
|
|
241
|
+
/**
|
|
242
|
+
* Show per-step agent chips
|
|
243
|
+
* @default false
|
|
244
|
+
*/
|
|
245
|
+
"showAgentBadges": boolean;
|
|
183
246
|
/**
|
|
184
247
|
* Thinking mode status text
|
|
185
248
|
* @default 'جاري التفكير...'
|
|
@@ -187,9 +250,14 @@ export namespace Components {
|
|
|
187
250
|
"statusText": string;
|
|
188
251
|
/**
|
|
189
252
|
* Steps as JSON string array of LoadingStep
|
|
190
|
-
* @default
|
|
253
|
+
* @default []
|
|
254
|
+
*/
|
|
255
|
+
"steps": LoadingStep[];
|
|
256
|
+
/**
|
|
257
|
+
* Secondary shimmer line in thinking mode (e.g. live node name)
|
|
258
|
+
* @default ''
|
|
191
259
|
*/
|
|
192
|
-
"
|
|
260
|
+
"thinkingSubtext": string;
|
|
193
261
|
}
|
|
194
262
|
interface AiMessageInput {
|
|
195
263
|
/**
|
|
@@ -197,6 +265,16 @@ export namespace Components {
|
|
|
197
265
|
* @default false
|
|
198
266
|
*/
|
|
199
267
|
"disabled": boolean;
|
|
268
|
+
/**
|
|
269
|
+
* External prop to show/hide the inline voice recorder
|
|
270
|
+
* @default false
|
|
271
|
+
*/
|
|
272
|
+
"isRecording": boolean;
|
|
273
|
+
/**
|
|
274
|
+
* Maximum characters allowed
|
|
275
|
+
* @default 4000
|
|
276
|
+
*/
|
|
277
|
+
"maxLength": number;
|
|
200
278
|
/**
|
|
201
279
|
* Placeholder text for the textarea
|
|
202
280
|
* @default 'ايش في بالك؟'
|
|
@@ -234,6 +312,38 @@ export namespace Components {
|
|
|
234
312
|
*/
|
|
235
313
|
"value": RatingValue | null;
|
|
236
314
|
}
|
|
315
|
+
interface AiRouteDecision {
|
|
316
|
+
/**
|
|
317
|
+
* Agent icon — emoji or short text displayed before the agent name
|
|
318
|
+
* @default ''
|
|
319
|
+
*/
|
|
320
|
+
"agentIcon": string;
|
|
321
|
+
/**
|
|
322
|
+
* Routing confidence percentage 0–100
|
|
323
|
+
* @default 0
|
|
324
|
+
*/
|
|
325
|
+
"confidence": number;
|
|
326
|
+
/**
|
|
327
|
+
* Detected language label (shown when expanded)
|
|
328
|
+
* @default ''
|
|
329
|
+
*/
|
|
330
|
+
"detectedLanguage": string;
|
|
331
|
+
/**
|
|
332
|
+
* Initial expanded state
|
|
333
|
+
* @default false
|
|
334
|
+
*/
|
|
335
|
+
"expanded": boolean;
|
|
336
|
+
/**
|
|
337
|
+
* Reason for routing decision (shown when expanded)
|
|
338
|
+
* @default ''
|
|
339
|
+
*/
|
|
340
|
+
"reason": string;
|
|
341
|
+
/**
|
|
342
|
+
* Selected agent name
|
|
343
|
+
* @default ''
|
|
344
|
+
*/
|
|
345
|
+
"selectedAgent": string;
|
|
346
|
+
}
|
|
237
347
|
interface AiSuggestion {
|
|
238
348
|
/**
|
|
239
349
|
* Disabled state
|
|
@@ -257,11 +367,21 @@ export namespace Components {
|
|
|
257
367
|
* @default false
|
|
258
368
|
*/
|
|
259
369
|
"disabled": boolean;
|
|
370
|
+
/**
|
|
371
|
+
* Error text to display on mic access failure. Defaults to Arabic; falls back to English when document lang is 'en'
|
|
372
|
+
* @default ''
|
|
373
|
+
*/
|
|
374
|
+
"errorText": string;
|
|
260
375
|
/**
|
|
261
376
|
* Whether to show the waveform animation
|
|
262
377
|
* @default true
|
|
263
378
|
*/
|
|
264
379
|
"showWaveform": boolean;
|
|
380
|
+
/**
|
|
381
|
+
* Waveform bar color. Falls back to --ai-waveform-color CSS var, then #9ca3af
|
|
382
|
+
* @default ''
|
|
383
|
+
*/
|
|
384
|
+
"waveformColor": string;
|
|
265
385
|
}
|
|
266
386
|
}
|
|
267
387
|
export interface AiChatHeaderCustomEvent<T> extends CustomEvent<T> {
|
|
@@ -272,6 +392,10 @@ export interface AiChatMessageCustomEvent<T> extends CustomEvent<T> {
|
|
|
272
392
|
detail: T;
|
|
273
393
|
target: HTMLAiChatMessageElement;
|
|
274
394
|
}
|
|
395
|
+
export interface AiConversationListCustomEvent<T> extends CustomEvent<T> {
|
|
396
|
+
detail: T;
|
|
397
|
+
target: HTMLAiConversationListElement;
|
|
398
|
+
}
|
|
275
399
|
export interface AiLoadingCustomEvent<T> extends CustomEvent<T> {
|
|
276
400
|
detail: T;
|
|
277
401
|
target: HTMLAiLoadingElement;
|
|
@@ -284,6 +408,10 @@ export interface AiRatingCustomEvent<T> extends CustomEvent<T> {
|
|
|
284
408
|
detail: T;
|
|
285
409
|
target: HTMLAiRatingElement;
|
|
286
410
|
}
|
|
411
|
+
export interface AiRouteDecisionCustomEvent<T> extends CustomEvent<T> {
|
|
412
|
+
detail: T;
|
|
413
|
+
target: HTMLAiRouteDecisionElement;
|
|
414
|
+
}
|
|
287
415
|
export interface AiSuggestionCustomEvent<T> extends CustomEvent<T> {
|
|
288
416
|
detail: T;
|
|
289
417
|
target: HTMLAiSuggestionElement;
|
|
@@ -309,7 +437,7 @@ declare global {
|
|
|
309
437
|
"closeClick": void;
|
|
310
438
|
"editClick": void;
|
|
311
439
|
"dropdownClick": void;
|
|
312
|
-
"
|
|
440
|
+
"positionClick": void;
|
|
313
441
|
"backClick": void;
|
|
314
442
|
"headerDragStart": { clientX: number; clientY: number };
|
|
315
443
|
}
|
|
@@ -346,6 +474,30 @@ declare global {
|
|
|
346
474
|
prototype: HTMLAiChatMessageElement;
|
|
347
475
|
new (): HTMLAiChatMessageElement;
|
|
348
476
|
};
|
|
477
|
+
interface HTMLAiConversationListElementEventMap {
|
|
478
|
+
"conversationSelect": string;
|
|
479
|
+
"conversationDelete": string;
|
|
480
|
+
}
|
|
481
|
+
interface HTMLAiConversationListElement extends Components.AiConversationList, HTMLStencilElement {
|
|
482
|
+
addEventListener<K extends keyof HTMLAiConversationListElementEventMap>(type: K, listener: (this: HTMLAiConversationListElement, ev: AiConversationListCustomEvent<HTMLAiConversationListElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
|
|
483
|
+
addEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
484
|
+
addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
485
|
+
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
|
|
486
|
+
removeEventListener<K extends keyof HTMLAiConversationListElementEventMap>(type: K, listener: (this: HTMLAiConversationListElement, ev: AiConversationListCustomEvent<HTMLAiConversationListElementEventMap[K]>) => any, options?: boolean | EventListenerOptions): void;
|
|
487
|
+
removeEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
488
|
+
removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
489
|
+
removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
|
|
490
|
+
}
|
|
491
|
+
var HTMLAiConversationListElement: {
|
|
492
|
+
prototype: HTMLAiConversationListElement;
|
|
493
|
+
new (): HTMLAiConversationListElement;
|
|
494
|
+
};
|
|
495
|
+
interface HTMLAiConversationSummaryElement extends Components.AiConversationSummary, HTMLStencilElement {
|
|
496
|
+
}
|
|
497
|
+
var HTMLAiConversationSummaryElement: {
|
|
498
|
+
prototype: HTMLAiConversationSummaryElement;
|
|
499
|
+
new (): HTMLAiConversationSummaryElement;
|
|
500
|
+
};
|
|
349
501
|
interface HTMLAiIconElement extends Components.AiIcon, HTMLStencilElement {
|
|
350
502
|
}
|
|
351
503
|
var HTMLAiIconElement: {
|
|
@@ -378,7 +530,7 @@ declare global {
|
|
|
378
530
|
};
|
|
379
531
|
interface HTMLAiMessageInputElementEventMap {
|
|
380
532
|
"sendMessage": string;
|
|
381
|
-
"
|
|
533
|
+
"voiceAudioReady": { blob: Blob; duration: number };
|
|
382
534
|
}
|
|
383
535
|
interface HTMLAiMessageInputElement extends Components.AiMessageInput, HTMLStencilElement {
|
|
384
536
|
addEventListener<K extends keyof HTMLAiMessageInputElementEventMap>(type: K, listener: (this: HTMLAiMessageInputElement, ev: AiMessageInputCustomEvent<HTMLAiMessageInputElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
|
|
@@ -411,6 +563,23 @@ declare global {
|
|
|
411
563
|
prototype: HTMLAiRatingElement;
|
|
412
564
|
new (): HTMLAiRatingElement;
|
|
413
565
|
};
|
|
566
|
+
interface HTMLAiRouteDecisionElementEventMap {
|
|
567
|
+
"routeExpand": boolean;
|
|
568
|
+
}
|
|
569
|
+
interface HTMLAiRouteDecisionElement extends Components.AiRouteDecision, HTMLStencilElement {
|
|
570
|
+
addEventListener<K extends keyof HTMLAiRouteDecisionElementEventMap>(type: K, listener: (this: HTMLAiRouteDecisionElement, ev: AiRouteDecisionCustomEvent<HTMLAiRouteDecisionElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
|
|
571
|
+
addEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
572
|
+
addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
573
|
+
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
|
|
574
|
+
removeEventListener<K extends keyof HTMLAiRouteDecisionElementEventMap>(type: K, listener: (this: HTMLAiRouteDecisionElement, ev: AiRouteDecisionCustomEvent<HTMLAiRouteDecisionElementEventMap[K]>) => any, options?: boolean | EventListenerOptions): void;
|
|
575
|
+
removeEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
576
|
+
removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
577
|
+
removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
|
|
578
|
+
}
|
|
579
|
+
var HTMLAiRouteDecisionElement: {
|
|
580
|
+
prototype: HTMLAiRouteDecisionElement;
|
|
581
|
+
new (): HTMLAiRouteDecisionElement;
|
|
582
|
+
};
|
|
414
583
|
interface HTMLAiSuggestionElementEventMap {
|
|
415
584
|
"suggestionClick": string;
|
|
416
585
|
}
|
|
@@ -451,11 +620,14 @@ declare global {
|
|
|
451
620
|
"ai-chat-container": HTMLAiChatContainerElement;
|
|
452
621
|
"ai-chat-header": HTMLAiChatHeaderElement;
|
|
453
622
|
"ai-chat-message": HTMLAiChatMessageElement;
|
|
623
|
+
"ai-conversation-list": HTMLAiConversationListElement;
|
|
624
|
+
"ai-conversation-summary": HTMLAiConversationSummaryElement;
|
|
454
625
|
"ai-icon": HTMLAiIconElement;
|
|
455
626
|
"ai-link": HTMLAiLinkElement;
|
|
456
627
|
"ai-loading": HTMLAiLoadingElement;
|
|
457
628
|
"ai-message-input": HTMLAiMessageInputElement;
|
|
458
629
|
"ai-rating": HTMLAiRatingElement;
|
|
630
|
+
"ai-route-decision": HTMLAiRouteDecisionElement;
|
|
459
631
|
"ai-suggestion": HTMLAiSuggestionElement;
|
|
460
632
|
"ai-voice-input": HTMLAiVoiceInputElement;
|
|
461
633
|
}
|
|
@@ -499,6 +671,11 @@ declare namespace LocalJSX {
|
|
|
499
671
|
* @default false
|
|
500
672
|
*/
|
|
501
673
|
"showWatermark"?: boolean;
|
|
674
|
+
/**
|
|
675
|
+
* Color theme for the panel
|
|
676
|
+
* @default 'light'
|
|
677
|
+
*/
|
|
678
|
+
"theme"?: 'light' | 'dark' | 'auto';
|
|
502
679
|
/**
|
|
503
680
|
* Width of the panel (CSS value, e.g., '400px', '30%', '28rem')
|
|
504
681
|
* @default '28rem'
|
|
@@ -556,14 +733,19 @@ declare namespace LocalJSX {
|
|
|
556
733
|
*/
|
|
557
734
|
"onHeaderDragStart"?: (event: AiChatHeaderCustomEvent<{ clientX: number; clientY: number }>) => void;
|
|
558
735
|
/**
|
|
559
|
-
*
|
|
736
|
+
* More options button
|
|
560
737
|
*/
|
|
561
|
-
"
|
|
738
|
+
"onPositionClick"?: (event: AiChatHeaderCustomEvent<void>) => void;
|
|
562
739
|
/**
|
|
563
740
|
* Human mode: show the back button
|
|
564
741
|
* @default true
|
|
565
742
|
*/
|
|
566
743
|
"showBack"?: boolean;
|
|
744
|
+
/**
|
|
745
|
+
* Human mode: status indicator variant
|
|
746
|
+
* @default 'online'
|
|
747
|
+
*/
|
|
748
|
+
"statusIndicator"?: 'online' | 'offline' | 'busy' | 'away';
|
|
567
749
|
}
|
|
568
750
|
interface AiChatMessage {
|
|
569
751
|
/**
|
|
@@ -602,6 +784,47 @@ declare namespace LocalJSX {
|
|
|
602
784
|
*/
|
|
603
785
|
"timestamp"?: string;
|
|
604
786
|
}
|
|
787
|
+
interface AiConversationList {
|
|
788
|
+
/**
|
|
789
|
+
* ID of the currently active conversation
|
|
790
|
+
* @default ''
|
|
791
|
+
*/
|
|
792
|
+
"activeId"?: string;
|
|
793
|
+
/**
|
|
794
|
+
* JSON array of ConversationItem
|
|
795
|
+
* @default '[]'
|
|
796
|
+
*/
|
|
797
|
+
"items"?: string;
|
|
798
|
+
/**
|
|
799
|
+
* Show skeleton loading state
|
|
800
|
+
* @default false
|
|
801
|
+
*/
|
|
802
|
+
"loading"?: boolean;
|
|
803
|
+
"onConversationDelete"?: (event: AiConversationListCustomEvent<string>) => void;
|
|
804
|
+
"onConversationSelect"?: (event: AiConversationListCustomEvent<string>) => void;
|
|
805
|
+
}
|
|
806
|
+
interface AiConversationSummary {
|
|
807
|
+
/**
|
|
808
|
+
* Card heading
|
|
809
|
+
* @default 'ملخص المحادثة'
|
|
810
|
+
*/
|
|
811
|
+
"conversation"?: string;
|
|
812
|
+
/**
|
|
813
|
+
* Conversation language label
|
|
814
|
+
* @default ''
|
|
815
|
+
*/
|
|
816
|
+
"language"?: string;
|
|
817
|
+
/**
|
|
818
|
+
* Total message count shown as a badge
|
|
819
|
+
* @default 0
|
|
820
|
+
*/
|
|
821
|
+
"messageCount"?: number;
|
|
822
|
+
/**
|
|
823
|
+
* Summary body text
|
|
824
|
+
* @default ''
|
|
825
|
+
*/
|
|
826
|
+
"summary"?: string;
|
|
827
|
+
}
|
|
605
828
|
interface AiIcon {
|
|
606
829
|
/**
|
|
607
830
|
* Icon name from the registry
|
|
@@ -641,6 +864,11 @@ declare namespace LocalJSX {
|
|
|
641
864
|
* @default true
|
|
642
865
|
*/
|
|
643
866
|
"collapsible"?: boolean;
|
|
867
|
+
/**
|
|
868
|
+
* Agent name shown in header alongside sparkle
|
|
869
|
+
* @default ''
|
|
870
|
+
*/
|
|
871
|
+
"currentAgent"?: string;
|
|
644
872
|
/**
|
|
645
873
|
* Steps mode expand state
|
|
646
874
|
* @default true
|
|
@@ -658,6 +886,11 @@ declare namespace LocalJSX {
|
|
|
658
886
|
"mode"?: 'thinking' | 'steps';
|
|
659
887
|
"onStepClick"?: (event: AiLoadingCustomEvent<LoadingStep>) => void;
|
|
660
888
|
"onToggleExpand"?: (event: AiLoadingCustomEvent<boolean>) => void;
|
|
889
|
+
/**
|
|
890
|
+
* Show per-step agent chips
|
|
891
|
+
* @default false
|
|
892
|
+
*/
|
|
893
|
+
"showAgentBadges"?: boolean;
|
|
661
894
|
/**
|
|
662
895
|
* Thinking mode status text
|
|
663
896
|
* @default 'جاري التفكير...'
|
|
@@ -665,9 +898,14 @@ declare namespace LocalJSX {
|
|
|
665
898
|
"statusText"?: string;
|
|
666
899
|
/**
|
|
667
900
|
* Steps as JSON string array of LoadingStep
|
|
668
|
-
* @default
|
|
901
|
+
* @default []
|
|
902
|
+
*/
|
|
903
|
+
"steps"?: LoadingStep[];
|
|
904
|
+
/**
|
|
905
|
+
* Secondary shimmer line in thinking mode (e.g. live node name)
|
|
906
|
+
* @default ''
|
|
669
907
|
*/
|
|
670
|
-
"
|
|
908
|
+
"thinkingSubtext"?: string;
|
|
671
909
|
}
|
|
672
910
|
interface AiMessageInput {
|
|
673
911
|
/**
|
|
@@ -675,14 +913,24 @@ declare namespace LocalJSX {
|
|
|
675
913
|
* @default false
|
|
676
914
|
*/
|
|
677
915
|
"disabled"?: boolean;
|
|
916
|
+
/**
|
|
917
|
+
* External prop to show/hide the inline voice recorder
|
|
918
|
+
* @default false
|
|
919
|
+
*/
|
|
920
|
+
"isRecording"?: boolean;
|
|
921
|
+
/**
|
|
922
|
+
* Maximum characters allowed
|
|
923
|
+
* @default 4000
|
|
924
|
+
*/
|
|
925
|
+
"maxLength"?: number;
|
|
678
926
|
/**
|
|
679
927
|
* Event emitted when a message is sent
|
|
680
928
|
*/
|
|
681
929
|
"onSendMessage"?: (event: AiMessageInputCustomEvent<string>) => void;
|
|
682
930
|
/**
|
|
683
|
-
* Event emitted when
|
|
931
|
+
* Event emitted when voice recording is complete and audio is ready
|
|
684
932
|
*/
|
|
685
|
-
"
|
|
933
|
+
"onVoiceAudioReady"?: (event: AiMessageInputCustomEvent<{ blob: Blob; duration: number }>) => void;
|
|
686
934
|
/**
|
|
687
935
|
* Placeholder text for the textarea
|
|
688
936
|
* @default 'ايش في بالك؟'
|
|
@@ -717,6 +965,39 @@ declare namespace LocalJSX {
|
|
|
717
965
|
*/
|
|
718
966
|
"value"?: RatingValue | null;
|
|
719
967
|
}
|
|
968
|
+
interface AiRouteDecision {
|
|
969
|
+
/**
|
|
970
|
+
* Agent icon — emoji or short text displayed before the agent name
|
|
971
|
+
* @default ''
|
|
972
|
+
*/
|
|
973
|
+
"agentIcon"?: string;
|
|
974
|
+
/**
|
|
975
|
+
* Routing confidence percentage 0–100
|
|
976
|
+
* @default 0
|
|
977
|
+
*/
|
|
978
|
+
"confidence"?: number;
|
|
979
|
+
/**
|
|
980
|
+
* Detected language label (shown when expanded)
|
|
981
|
+
* @default ''
|
|
982
|
+
*/
|
|
983
|
+
"detectedLanguage"?: string;
|
|
984
|
+
/**
|
|
985
|
+
* Initial expanded state
|
|
986
|
+
* @default false
|
|
987
|
+
*/
|
|
988
|
+
"expanded"?: boolean;
|
|
989
|
+
"onRouteExpand"?: (event: AiRouteDecisionCustomEvent<boolean>) => void;
|
|
990
|
+
/**
|
|
991
|
+
* Reason for routing decision (shown when expanded)
|
|
992
|
+
* @default ''
|
|
993
|
+
*/
|
|
994
|
+
"reason"?: string;
|
|
995
|
+
/**
|
|
996
|
+
* Selected agent name
|
|
997
|
+
* @default ''
|
|
998
|
+
*/
|
|
999
|
+
"selectedAgent"?: string;
|
|
1000
|
+
}
|
|
720
1001
|
interface AiSuggestion {
|
|
721
1002
|
/**
|
|
722
1003
|
* Disabled state
|
|
@@ -741,6 +1022,11 @@ declare namespace LocalJSX {
|
|
|
741
1022
|
* @default false
|
|
742
1023
|
*/
|
|
743
1024
|
"disabled"?: boolean;
|
|
1025
|
+
/**
|
|
1026
|
+
* Error text to display on mic access failure. Defaults to Arabic; falls back to English when document lang is 'en'
|
|
1027
|
+
* @default ''
|
|
1028
|
+
*/
|
|
1029
|
+
"errorText"?: string;
|
|
744
1030
|
/**
|
|
745
1031
|
* Event emitted when audio blob is ready
|
|
746
1032
|
*/
|
|
@@ -754,6 +1040,11 @@ declare namespace LocalJSX {
|
|
|
754
1040
|
* @default true
|
|
755
1041
|
*/
|
|
756
1042
|
"showWaveform"?: boolean;
|
|
1043
|
+
/**
|
|
1044
|
+
* Waveform bar color. Falls back to --ai-waveform-color CSS var, then #9ca3af
|
|
1045
|
+
* @default ''
|
|
1046
|
+
*/
|
|
1047
|
+
"waveformColor"?: string;
|
|
757
1048
|
}
|
|
758
1049
|
|
|
759
1050
|
interface AiCardAttributes {
|
|
@@ -767,6 +1058,7 @@ declare namespace LocalJSX {
|
|
|
767
1058
|
"autoScroll": boolean;
|
|
768
1059
|
"showWatermark": boolean;
|
|
769
1060
|
"floatHeight": string;
|
|
1061
|
+
"theme": 'light' | 'dark' | 'auto';
|
|
770
1062
|
}
|
|
771
1063
|
interface AiChatHeaderAttributes {
|
|
772
1064
|
"mode": 'agent' | 'human';
|
|
@@ -776,6 +1068,7 @@ declare namespace LocalJSX {
|
|
|
776
1068
|
"agentAvatar": string;
|
|
777
1069
|
"showBack": boolean;
|
|
778
1070
|
"isDraggable": boolean;
|
|
1071
|
+
"statusIndicator": 'online' | 'offline' | 'busy' | 'away';
|
|
779
1072
|
}
|
|
780
1073
|
interface AiChatMessageAttributes {
|
|
781
1074
|
"role": 'user' | 'agent';
|
|
@@ -787,6 +1080,17 @@ declare namespace LocalJSX {
|
|
|
787
1080
|
"enableRegenerate": boolean;
|
|
788
1081
|
"feedbackValue": 'up' | 'down' | null;
|
|
789
1082
|
}
|
|
1083
|
+
interface AiConversationListAttributes {
|
|
1084
|
+
"items": string;
|
|
1085
|
+
"activeId": string;
|
|
1086
|
+
"loading": boolean;
|
|
1087
|
+
}
|
|
1088
|
+
interface AiConversationSummaryAttributes {
|
|
1089
|
+
"conversation": string;
|
|
1090
|
+
"summary": string;
|
|
1091
|
+
"messageCount": number;
|
|
1092
|
+
"language": string;
|
|
1093
|
+
}
|
|
790
1094
|
interface AiIconAttributes {
|
|
791
1095
|
"name": IconName;
|
|
792
1096
|
"size": number;
|
|
@@ -800,8 +1104,10 @@ declare namespace LocalJSX {
|
|
|
800
1104
|
interface AiLoadingAttributes {
|
|
801
1105
|
"mode": 'thinking' | 'steps';
|
|
802
1106
|
"statusText": string;
|
|
803
|
-
"
|
|
1107
|
+
"thinkingSubtext": string;
|
|
804
1108
|
"headerTitle": string;
|
|
1109
|
+
"currentAgent": string;
|
|
1110
|
+
"showAgentBadges": boolean;
|
|
805
1111
|
"expanded": boolean;
|
|
806
1112
|
"collapsible": boolean;
|
|
807
1113
|
}
|
|
@@ -809,6 +1115,8 @@ declare namespace LocalJSX {
|
|
|
809
1115
|
"placeholder": string;
|
|
810
1116
|
"disabled": boolean;
|
|
811
1117
|
"showVoiceButton": boolean;
|
|
1118
|
+
"maxLength": number;
|
|
1119
|
+
"isRecording": boolean;
|
|
812
1120
|
}
|
|
813
1121
|
interface AiRatingAttributes {
|
|
814
1122
|
"question": string;
|
|
@@ -816,6 +1124,14 @@ declare namespace LocalJSX {
|
|
|
816
1124
|
"value": RatingValue | null;
|
|
817
1125
|
"disabled": boolean;
|
|
818
1126
|
}
|
|
1127
|
+
interface AiRouteDecisionAttributes {
|
|
1128
|
+
"selectedAgent": string;
|
|
1129
|
+
"agentIcon": string;
|
|
1130
|
+
"reason": string;
|
|
1131
|
+
"confidence": number;
|
|
1132
|
+
"detectedLanguage": string;
|
|
1133
|
+
"expanded": boolean;
|
|
1134
|
+
}
|
|
819
1135
|
interface AiSuggestionAttributes {
|
|
820
1136
|
"label": string;
|
|
821
1137
|
"disabled": boolean;
|
|
@@ -824,6 +1140,8 @@ declare namespace LocalJSX {
|
|
|
824
1140
|
"disabled": boolean;
|
|
825
1141
|
"showWaveform": boolean;
|
|
826
1142
|
"autoStart": boolean;
|
|
1143
|
+
"errorText": string;
|
|
1144
|
+
"waveformColor": string;
|
|
827
1145
|
}
|
|
828
1146
|
|
|
829
1147
|
interface IntrinsicElements {
|
|
@@ -831,11 +1149,14 @@ declare namespace LocalJSX {
|
|
|
831
1149
|
"ai-chat-container": Omit<AiChatContainer, keyof AiChatContainerAttributes> & { [K in keyof AiChatContainer & keyof AiChatContainerAttributes]?: AiChatContainer[K] } & { [K in keyof AiChatContainer & keyof AiChatContainerAttributes as `attr:${K}`]?: AiChatContainerAttributes[K] } & { [K in keyof AiChatContainer & keyof AiChatContainerAttributes as `prop:${K}`]?: AiChatContainer[K] };
|
|
832
1150
|
"ai-chat-header": Omit<AiChatHeader, keyof AiChatHeaderAttributes> & { [K in keyof AiChatHeader & keyof AiChatHeaderAttributes]?: AiChatHeader[K] } & { [K in keyof AiChatHeader & keyof AiChatHeaderAttributes as `attr:${K}`]?: AiChatHeaderAttributes[K] } & { [K in keyof AiChatHeader & keyof AiChatHeaderAttributes as `prop:${K}`]?: AiChatHeader[K] };
|
|
833
1151
|
"ai-chat-message": Omit<AiChatMessage, keyof AiChatMessageAttributes> & { [K in keyof AiChatMessage & keyof AiChatMessageAttributes]?: AiChatMessage[K] } & { [K in keyof AiChatMessage & keyof AiChatMessageAttributes as `attr:${K}`]?: AiChatMessageAttributes[K] } & { [K in keyof AiChatMessage & keyof AiChatMessageAttributes as `prop:${K}`]?: AiChatMessage[K] };
|
|
1152
|
+
"ai-conversation-list": Omit<AiConversationList, keyof AiConversationListAttributes> & { [K in keyof AiConversationList & keyof AiConversationListAttributes]?: AiConversationList[K] } & { [K in keyof AiConversationList & keyof AiConversationListAttributes as `attr:${K}`]?: AiConversationListAttributes[K] } & { [K in keyof AiConversationList & keyof AiConversationListAttributes as `prop:${K}`]?: AiConversationList[K] };
|
|
1153
|
+
"ai-conversation-summary": Omit<AiConversationSummary, keyof AiConversationSummaryAttributes> & { [K in keyof AiConversationSummary & keyof AiConversationSummaryAttributes]?: AiConversationSummary[K] } & { [K in keyof AiConversationSummary & keyof AiConversationSummaryAttributes as `attr:${K}`]?: AiConversationSummaryAttributes[K] } & { [K in keyof AiConversationSummary & keyof AiConversationSummaryAttributes as `prop:${K}`]?: AiConversationSummary[K] };
|
|
834
1154
|
"ai-icon": Omit<AiIcon, keyof AiIconAttributes> & { [K in keyof AiIcon & keyof AiIconAttributes]?: AiIcon[K] } & { [K in keyof AiIcon & keyof AiIconAttributes as `attr:${K}`]?: AiIconAttributes[K] } & { [K in keyof AiIcon & keyof AiIconAttributes as `prop:${K}`]?: AiIcon[K] };
|
|
835
1155
|
"ai-link": Omit<AiLink, keyof AiLinkAttributes> & { [K in keyof AiLink & keyof AiLinkAttributes]?: AiLink[K] } & { [K in keyof AiLink & keyof AiLinkAttributes as `attr:${K}`]?: AiLinkAttributes[K] } & { [K in keyof AiLink & keyof AiLinkAttributes as `prop:${K}`]?: AiLink[K] };
|
|
836
1156
|
"ai-loading": Omit<AiLoading, keyof AiLoadingAttributes> & { [K in keyof AiLoading & keyof AiLoadingAttributes]?: AiLoading[K] } & { [K in keyof AiLoading & keyof AiLoadingAttributes as `attr:${K}`]?: AiLoadingAttributes[K] } & { [K in keyof AiLoading & keyof AiLoadingAttributes as `prop:${K}`]?: AiLoading[K] };
|
|
837
1157
|
"ai-message-input": Omit<AiMessageInput, keyof AiMessageInputAttributes> & { [K in keyof AiMessageInput & keyof AiMessageInputAttributes]?: AiMessageInput[K] } & { [K in keyof AiMessageInput & keyof AiMessageInputAttributes as `attr:${K}`]?: AiMessageInputAttributes[K] } & { [K in keyof AiMessageInput & keyof AiMessageInputAttributes as `prop:${K}`]?: AiMessageInput[K] };
|
|
838
1158
|
"ai-rating": Omit<AiRating, keyof AiRatingAttributes> & { [K in keyof AiRating & keyof AiRatingAttributes]?: AiRating[K] } & { [K in keyof AiRating & keyof AiRatingAttributes as `attr:${K}`]?: AiRatingAttributes[K] } & { [K in keyof AiRating & keyof AiRatingAttributes as `prop:${K}`]?: AiRating[K] };
|
|
1159
|
+
"ai-route-decision": Omit<AiRouteDecision, keyof AiRouteDecisionAttributes> & { [K in keyof AiRouteDecision & keyof AiRouteDecisionAttributes]?: AiRouteDecision[K] } & { [K in keyof AiRouteDecision & keyof AiRouteDecisionAttributes as `attr:${K}`]?: AiRouteDecisionAttributes[K] } & { [K in keyof AiRouteDecision & keyof AiRouteDecisionAttributes as `prop:${K}`]?: AiRouteDecision[K] };
|
|
839
1160
|
"ai-suggestion": Omit<AiSuggestion, keyof AiSuggestionAttributes> & { [K in keyof AiSuggestion & keyof AiSuggestionAttributes]?: AiSuggestion[K] } & { [K in keyof AiSuggestion & keyof AiSuggestionAttributes as `attr:${K}`]?: AiSuggestionAttributes[K] } & { [K in keyof AiSuggestion & keyof AiSuggestionAttributes as `prop:${K}`]?: AiSuggestion[K] };
|
|
840
1161
|
"ai-voice-input": Omit<AiVoiceInput, keyof AiVoiceInputAttributes> & { [K in keyof AiVoiceInput & keyof AiVoiceInputAttributes]?: AiVoiceInput[K] } & { [K in keyof AiVoiceInput & keyof AiVoiceInputAttributes as `attr:${K}`]?: AiVoiceInputAttributes[K] } & { [K in keyof AiVoiceInput & keyof AiVoiceInputAttributes as `prop:${K}`]?: AiVoiceInput[K] };
|
|
841
1162
|
}
|
|
@@ -848,11 +1169,14 @@ declare module "@stencil/core" {
|
|
|
848
1169
|
"ai-chat-container": LocalJSX.IntrinsicElements["ai-chat-container"] & JSXBase.HTMLAttributes<HTMLAiChatContainerElement>;
|
|
849
1170
|
"ai-chat-header": LocalJSX.IntrinsicElements["ai-chat-header"] & JSXBase.HTMLAttributes<HTMLAiChatHeaderElement>;
|
|
850
1171
|
"ai-chat-message": LocalJSX.IntrinsicElements["ai-chat-message"] & JSXBase.HTMLAttributes<HTMLAiChatMessageElement>;
|
|
1172
|
+
"ai-conversation-list": LocalJSX.IntrinsicElements["ai-conversation-list"] & JSXBase.HTMLAttributes<HTMLAiConversationListElement>;
|
|
1173
|
+
"ai-conversation-summary": LocalJSX.IntrinsicElements["ai-conversation-summary"] & JSXBase.HTMLAttributes<HTMLAiConversationSummaryElement>;
|
|
851
1174
|
"ai-icon": LocalJSX.IntrinsicElements["ai-icon"] & JSXBase.HTMLAttributes<HTMLAiIconElement>;
|
|
852
1175
|
"ai-link": LocalJSX.IntrinsicElements["ai-link"] & JSXBase.HTMLAttributes<HTMLAiLinkElement>;
|
|
853
1176
|
"ai-loading": LocalJSX.IntrinsicElements["ai-loading"] & JSXBase.HTMLAttributes<HTMLAiLoadingElement>;
|
|
854
1177
|
"ai-message-input": LocalJSX.IntrinsicElements["ai-message-input"] & JSXBase.HTMLAttributes<HTMLAiMessageInputElement>;
|
|
855
1178
|
"ai-rating": LocalJSX.IntrinsicElements["ai-rating"] & JSXBase.HTMLAttributes<HTMLAiRatingElement>;
|
|
1179
|
+
"ai-route-decision": LocalJSX.IntrinsicElements["ai-route-decision"] & JSXBase.HTMLAttributes<HTMLAiRouteDecisionElement>;
|
|
856
1180
|
"ai-suggestion": LocalJSX.IntrinsicElements["ai-suggestion"] & JSXBase.HTMLAttributes<HTMLAiSuggestionElement>;
|
|
857
1181
|
"ai-voice-input": LocalJSX.IntrinsicElements["ai-voice-input"] & JSXBase.HTMLAttributes<HTMLAiVoiceInputElement>;
|
|
858
1182
|
}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type IconName = 'send' | 'mic' | 'cancel' | 'arrow-up' | 'watermark' | 'drag' | 'hand' | 'pencil-edit' | 'chevron-down' | 'arrow-right' | 'online-dot' | 'copy' | 'thumbs-up' | 'thumbs-down' | 'sparkle' | 'check' | 'reload' | 'eclipse' | 'share';
|
|
1
|
+
export type IconName = 'send' | 'mic' | 'cancel' | 'arrow-up' | 'watermark' | 'drag' | 'hand' | 'pencil-edit' | 'chevron-down' | 'arrow-right' | 'online-dot' | 'copy' | 'thumbs-up' | 'thumbs-down' | 'sparkle' | 'check' | 'reload' | 'eclipse' | 'share' | 'list' | 'route' | 'check-circle' | 'wifi-off' | 'warning' | 'ellipsis';
|
|
2
2
|
export declare const iconRegistry: Record<IconName, {
|
|
3
3
|
viewBox: string;
|
|
4
4
|
content: string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as i,h as e,H as n}from"./p-B0yIzgh4.js";import{i as a}from"./p-SJZ6Ujn9.js";const t=class{constructor(e){i(this,e)}label="";href="#";target="_blank";rel="";renderShareIcon(){const i=a.share;return i?e("span",{class:"link__icon",innerHTML:`<svg width="16" height="16" viewBox="${i.viewBox}" fill="none" xmlns="http://www.w3.org/2000/svg">${i.content}</svg>`}):null}render(){const i=this.rel||("_blank"===this.target?"noopener noreferrer":void 0);return e(n,{key:"c35f0fd1f17170d32846ebf7066177ca3a6b68f1"},e("span",{key:"34c01b7fa4122659ca01402c76a67dbca5878ffe",class:"link__label"},this.label,e("slot",{key:"d9dd28b4bfba8c1cb5e6f977262942daf504fdc8"})),e("a",{key:"b4da5e53ee8df0b40417c0d0a80a9647ae0b93d2",class:"link",href:this.href,target:this.target,rel:i},this.renderShareIcon()))}};t.style=":host{--ai-link-font-size:14px;--ai-link-font-weight:700;--ai-link-line-height:20px;--ai-link-gap:4px;--ai-link-icon-size:16px;display:flex;align-items:center;gap:var(--ai-link-gap)}.link{display:inline-flex;align-items:center;justify-content:flex-end;gap:var(--ai-link-gap);color:var(--ai-accent-dark);font-size:var(--ai-link-font-size);font-weight:var(--ai-link-font-weight);font-family:inherit;line-height:var(--ai-link-line-height);text-decoration:none;white-space:nowrap;cursor:pointer;transition:color 0.15s ease;outline:none}.link:hover{color:var(--ai-accent-dark);text-decoration:underline}.link:focus-visible{outline:2px solid var(--ai-accent);outline-offset:2px;border-radius:4px}.link__icon{display:inline-flex;align-items:center;justify-content:center;width:var(--ai-link-icon-size);height:var(--ai-link-icon-size);flex-shrink:0;line-height:0}.link__label{color:var(--ai-accent-dark);font-weight:bold}";export{t as ai_link}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e,c as t,h as s,H as i}from"./p-B0yIzgh4.js";import{i as a}from"./p-SJZ6Ujn9.js";const r=class{constructor(s){e(this,s),this.toggleExpand=t(this,"toggleExpand"),this.stepClick=t(this,"stepClick")}mode="thinking";statusText="جاري التفكير...";thinkingSubtext="";steps=[];headerTitle="خطة التنفيذ";currentAgent="";showAgentBadges=!1;expanded=!0;collapsible=!0;toggleExpand;stepClick;_expanded=!0;componentWillLoad(){this._expanded=this.expanded}renderIcon(e,t,i){const r=a[e];return r?s("span",{class:"icon-wrap",innerHTML:`<svg width="${t}" height="${i}" viewBox="${r.viewBox}" fill="none" xmlns="http://www.w3.org/2000/svg">${r.content}</svg>`}):null}renderSparkleAvatar(e){return s("div",{class:"sparkle-avatar-wrap"},s("div",{class:"sparkle-avatar"},this.renderIcon("sparkle",14,14)),e&&s("span",{class:"header-agent"},e))}renderStepBadge(e,t){const{status:i}=e,a="completed"===i,r="executing"===i,n="failed"===i,o=s("div",{class:`step-badge-inner ${a?"completed":""} ${r?"executing":""} ${n?"failed":""}`},a&&this.renderIcon("check",14,14),n&&this.renderIcon("cancel",14,14),r&&this.renderIcon("list",14,14),!a&&!n&&!r&&s("span",{class:"step-number"},t+1));return s("div",{class:"step-badge-outer "+(r?"pulse-ring":"")},o)}handleToggle(){this.collapsible&&(this._expanded=!this._expanded,this.expanded=this._expanded,this.toggleExpand.emit(this._expanded))}renderThinkingMode(){return s("div",{class:"thinking-row"},this.renderSparkleAvatar(),s("div",{class:"thinking-col"},s("span",{class:"shimmer-text"},this.statusText),this.thinkingSubtext&&s("span",{class:"shimmer-text subtext"},this.thinkingSubtext)))}renderPlanningShimmer(){return s("div",{class:"steps-body"},s("div",{class:"thinking-row planning-shimmer"},s("div",{class:"sparkle-avatar"},this.renderIcon("sparkle",14,14)),s("span",{class:"shimmer-text"},"جاري التخطيط...")))}renderStepsMode(){const e=this.steps.filter((e=>"completed"===e.status)).length,t=this.steps.length,i=t>0&&e===t,a=this.steps.find((e=>"executing"===e.status));return s("div",{class:"steps-card"},s("div",{class:"steps-header "+(this.collapsible?"collapsible":""),onClick:()=>this.handleToggle()},this.renderSparkleAvatar(this.currentAgent||void 0),s("div",{class:"steps-header-center"},s("span",{class:"steps-title"},this.headerTitle),(()=>0===t?null:!this._expanded&&a?s("span",{class:"progress-badge executing-title"},a.action):s("span",{class:"progress-badge"},i?"مكتمل":`${e}/${t}`))()),this.collapsible&&s("button",{class:"collapse-btn "+(this._expanded?"expanded":"")},this.renderIcon("chevron-down",20,20))),this._expanded&&0===t&&this.renderPlanningShimmer(),this._expanded&&t>0&&s("div",{class:"steps-body"},this.steps.map(((e,t)=>s("div",{class:`step-row ${e.status}`,onClick:()=>this.stepClick.emit(e)},s("div",{class:"step-badge-col"},this.renderStepBadge(e,t),t<this.steps.length-1&&s("div",{class:"step-separator"})),s("div",{class:"step-content"},s("span",{class:"step-text"},e.action),e.reason&&s("span",{class:"step-description"},e.reason)))))))}render(){return s(i,{key:"da2c7fad8bbf4e572972a9b8308204cecb91dd63"},"thinking"===this.mode?this.renderThinkingMode():this.renderStepsMode())}};r.style=":host{display:block}.icon-wrap{display:inline-flex;align-items:center;justify-content:center;line-height:0}.sparkle-avatar-wrap{display:inline-flex;align-items:center;gap:6px;flex-shrink:0}@keyframes sparkle-twinkle{0%,100%{transform:scale(1);opacity:1;filter:brightness(1)}15%{transform:scale(1.4);opacity:0.4;filter:brightness(2)}30%{transform:scale(0.85);opacity:0.9;filter:brightness(0.9)}50%{transform:scale(1.3);opacity:0.5;filter:brightness(1.8)}70%{transform:scale(0.9);opacity:1;filter:brightness(1)}}.sparkle-avatar{width:24px;height:24px;border-radius:9999px;background:var(--ai-bg-card);box-shadow:var(--ai-shadow-inner);display:flex;align-items:center;justify-content:center;flex-shrink:0;color:var(--ai-amber)}.sparkle-avatar .icon-wrap{animation:sparkle-twinkle 2.4s ease-in-out infinite;transform-origin:center}.header-agent{font-size:12px;color:var(--ai-text-secondary);white-space:nowrap}.thinking-row{display:inline-flex;align-items:center;gap:8px;flex-direction:row}.thinking-col{display:flex;flex-direction:column;gap:2px}@keyframes shimmer{0%{background-position:200% center}100%{background-position:-200% center}}.shimmer-text{font-size:14px;font-weight:400;line-height:1.5;background:var(--ai-glow-gradient);background-size:200% auto;-webkit-background-clip:text;-webkit-text-fill-color:transparent;background-clip:text;animation:shimmer 2s linear infinite}.shimmer-text.subtext{font-size:12px;opacity:0.75}@keyframes fade-in{from{opacity:0;transform:translateY(4px)}to{opacity:1;transform:translateY(0)}}.steps-card{background:var(--ai-bg-card);border:1px solid var(--ai-border-default);border-radius:16px;box-shadow:var(--ai-shadow-sm);overflow:hidden;animation:fade-in 0.3s ease}.steps-header{padding:16px;display:flex;align-items:center;gap:8px;border-bottom:1px solid var(--ai-border-default)}.steps-header.collapsible{cursor:pointer;user-select:none}.steps-header-center{flex:1;display:flex;align-items:center;gap:8px;min-width:0}.steps-title{font-size:16px;font-weight:500;color:var(--ai-text-primary);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.progress-badge{font-size:12px;font-weight:500;color:var(--ai-accent-dark);background:var(--ai-accent-bg);padding:2px 8px;border-radius:9999px;white-space:nowrap;flex-shrink:0}.progress-badge.executing-title{max-width:180px;overflow:hidden;text-overflow:ellipsis}.collapse-btn{display:inline-flex;align-items:center;justify-content:center;background:none;border:none;padding:0;cursor:pointer;color:var(--ai-text-secondary);flex-shrink:0;transition:transform 0.2s ease;transform:rotate(180deg)}.collapse-btn.expanded{transform:rotate(0deg)}.steps-body{padding:12px 16px;display:flex;flex-direction:column}.planning-shimmer{padding:4px 0}.step-row{display:flex;align-items:flex-start;gap:12px;cursor:pointer;padding:4px 0}.step-row:hover .step-text{color:var(--ai-text-primary)}.step-row.pending{opacity:0.5}.step-row.executing .step-text{color:var(--ai-text-primary)}.step-row.failed .step-text{color:var(--ai-error-text, #dc2626)}.step-content{flex:1;display:flex;flex-direction:column;gap:2px;padding-top:4px}.step-text{font-size:14px;font-weight:400;color:var(--ai-text-secondary);line-height:1.5}.step-description{font-size:12px;color:var(--ai-text-secondary);line-height:1.4}.step-duration{font-size:11px;color:var(--ai-text-secondary);opacity:0.7}.agent-chip{display:inline-flex;align-self:flex-start;font-size:11px;padding:1px 6px;border-radius:9999px;border:1px solid var(--ai-border-default);color:var(--ai-text-secondary)}.step-badge-col{display:flex;flex-direction:column;align-items:center;flex-shrink:0}.step-separator{width:1px;height:16px;background:var(--ai-border-default);margin:2px 0}@keyframes pulse-ring{0%{transform:scale(1);opacity:0.6}100%{transform:scale(2);opacity:0}}.step-badge-outer{padding:2px;border-radius:9999px;background:var(--ai-bg-surface);display:inline-flex;align-items:center;justify-content:center;position:relative}.step-badge-outer.pulse-ring::after{content:'';position:absolute;inset:0;border-radius:9999px;border:2px solid var(--ai-amber);animation:pulse-ring 1.2s ease-out infinite}.step-badge-inner{width:26px;height:26px;border-radius:9999px;background:var(--ai-bg-card);box-shadow:var(--ai-shadow-badge);display:flex;align-items:center;justify-content:center;color:var(--ai-text-secondary)}.step-badge-inner.completed{background:var(--ai-success-bg);color:var(--ai-success-text)}.step-badge-inner.executing{color:var(--ai-amber)}.step-badge-inner.failed{background:var(--ai-error-bg, #fee2e2);color:var(--ai-error-text, #dc2626)}.step-number{font-size:14px;font-weight:500;color:var(--ai-text-secondary);line-height:1}";export{r as ai_loading}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as i,c as e,h as a,H as s}from"./p-B0yIzgh4.js";const t=class{constructor(a){i(this,a),this.suggestionClick=e(this,"suggestionClick")}label="";disabled=!1;suggestionClick;handleClick(){this.disabled||this.suggestionClick.emit(this.label)}render(){return a(s,{key:"d8a9ff7279fce63faebd187cb69f0173239518ca"},a("button",{key:"42bc023c9c48bafc11b388bb80e130255ea830b8",class:{chip:!0,"chip--disabled":this.disabled},disabled:this.disabled,onClick:()=>this.handleClick()},a("span",{key:"06f0324b97d9f7fb77fb2d4b9dbf0be9b5c4c3f1",class:"chip__label"},this.label,a("slot",{key:"ccd0d639f0b2c001088561b029b08691395e9198"}))))}};t.style=":host{--ai-suggestion-border:1px solid var(--ai-accent);--ai-suggestion-border-hover:1px solid var(--ai-accent);--ai-suggestion-radius:9999px;--ai-suggestion-padding:8px 12px;--ai-suggestion-gap:4px;--ai-suggestion-font-size:14px;--ai-suggestion-line-height:20px;display:inline-block}.chip{display:inline-flex;align-items:center;justify-content:center;gap:var(--ai-suggestion-gap);background:var(--ai-bg-card);border:var(--ai-suggestion-border);border-radius:var(--ai-suggestion-radius);padding:var(--ai-suggestion-padding);color:var(--ai-accent-dark);font-size:var(--ai-suggestion-font-size);font-weight:400;line-height:var(--ai-suggestion-line-height);font-family:inherit;white-space:nowrap;cursor:pointer;transition:background 0.15s ease, border-color 0.15s ease;outline:none;text-align:start}.chip:hover:not(:disabled){background:var(--ai-accent-bg);border:var(--ai-suggestion-border-hover)}.chip:active:not(:disabled){background:var(--ai-accent-bg)}.chip:focus-visible{outline:2px solid var(--ai-accent);outline-offset:2px}.chip--disabled,.chip:disabled{opacity:0.45;cursor:not-allowed;pointer-events:none}.chip__label{display:inline-flex;align-items:center;gap:var(--ai-suggestion-gap)}";export{t as ai_suggestion}
|