@salla.sa/ui-ai-kit-core 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/dist/cjs/ai-card.cjs.entry.js +25 -0
- package/dist/cjs/ai-chat-container.cjs.entry.js +138 -0
- package/dist/cjs/ai-chat-header.cjs.entry.js +79 -0
- package/dist/cjs/ai-chat-message.cjs.entry.js +164 -0
- package/dist/cjs/ai-icon.cjs.entry.js +25 -0
- package/dist/cjs/ai-link.cjs.entry.js +34 -0
- package/dist/cjs/ai-loading.cjs.entry.js +77 -0
- package/dist/cjs/ai-message-input.cjs.entry.js +65 -0
- package/dist/cjs/ai-rating.cjs.entry.js +57 -0
- package/dist/cjs/ai-suggestion.cjs.entry.js +31 -0
- package/dist/cjs/ai-voice-input.cjs.entry.js +233 -0
- package/dist/cjs/icon-registry-dmfLA-Dj.js +82 -0
- package/dist/cjs/index-DLJcLHFH.js +1622 -0
- package/dist/cjs/index.cjs.js +7 -0
- package/dist/cjs/loader.cjs.js +12 -0
- package/dist/cjs/ui-ai-kit.cjs.js +24 -0
- package/dist/collection/collection-manifest.json +23 -0
- package/dist/collection/components/ai-card/ai-card.css +40 -0
- package/dist/collection/components/ai-card/ai-card.js +70 -0
- package/dist/collection/components/ai-card/ai-card.stories.js +52 -0
- package/dist/collection/components/ai-chat-container/ai-chat-container.css +137 -0
- package/dist/collection/components/ai-chat-container/ai-chat-container.js +270 -0
- package/dist/collection/components/ai-chat-container/ai-chat-container.stories.js +160 -0
- package/dist/collection/components/ai-chat-header/ai-chat-header.css +186 -0
- package/dist/collection/components/ai-chat-header/ai-chat-header.js +311 -0
- package/dist/collection/components/ai-chat-header/ai-chat-header.stories.js +138 -0
- package/dist/collection/components/ai-chat-message/ai-chat-message.css +304 -0
- package/dist/collection/components/ai-chat-message/ai-chat-message.js +379 -0
- package/dist/collection/components/ai-chat-message/ai-chat-message.stories.js +164 -0
- package/dist/collection/components/ai-icon/ai-icon.css +9 -0
- package/dist/collection/components/ai-icon/ai-icon.js +76 -0
- package/dist/collection/components/ai-link/ai-link.css +62 -0
- package/dist/collection/components/ai-link/ai-link.js +119 -0
- package/dist/collection/components/ai-link/ai-link.stories.js +79 -0
- package/dist/collection/components/ai-loading/ai-loading.css +202 -0
- package/dist/collection/components/ai-loading/ai-loading.js +244 -0
- package/dist/collection/components/ai-loading/ai-loading.stories.js +145 -0
- package/dist/collection/components/ai-message-input/ai-message-input.css +175 -0
- package/dist/collection/components/ai-message-input/ai-message-input.js +192 -0
- package/dist/collection/components/ai-message-input/ai-message-input.stories.js +125 -0
- package/dist/collection/components/ai-rating/ai-rating.css +145 -0
- package/dist/collection/components/ai-rating/ai-rating.js +176 -0
- package/dist/collection/components/ai-rating/ai-rating.stories.js +78 -0
- package/dist/collection/components/ai-suggestion/ai-suggestion.css +69 -0
- package/dist/collection/components/ai-suggestion/ai-suggestion.js +93 -0
- package/dist/collection/components/ai-suggestion/ai-suggestion.stories.js +62 -0
- package/dist/collection/components/ai-voice-input/ai-voice-input.css +136 -0
- package/dist/collection/components/ai-voice-input/ai-voice-input.js +341 -0
- package/dist/collection/components/ai-voice-input/ai-voice-input.stories.js +118 -0
- package/dist/collection/index.js +10 -0
- package/dist/collection/utils/icon-registry.js +78 -0
- package/dist/collection/utils/utils.js +3 -0
- package/dist/components/ai-card.d.ts +11 -0
- package/dist/components/ai-card.js +1 -0
- package/dist/components/ai-chat-container.d.ts +11 -0
- package/dist/components/ai-chat-container.js +1 -0
- package/dist/components/ai-chat-header.d.ts +11 -0
- package/dist/components/ai-chat-header.js +1 -0
- package/dist/components/ai-chat-message.d.ts +11 -0
- package/dist/components/ai-chat-message.js +1 -0
- package/dist/components/ai-icon.d.ts +11 -0
- package/dist/components/ai-icon.js +1 -0
- package/dist/components/ai-link.d.ts +11 -0
- package/dist/components/ai-link.js +1 -0
- package/dist/components/ai-loading.d.ts +11 -0
- package/dist/components/ai-loading.js +1 -0
- package/dist/components/ai-message-input.d.ts +11 -0
- package/dist/components/ai-message-input.js +1 -0
- package/dist/components/ai-rating.d.ts +11 -0
- package/dist/components/ai-rating.js +1 -0
- package/dist/components/ai-suggestion.d.ts +11 -0
- package/dist/components/ai-suggestion.js +1 -0
- package/dist/components/ai-voice-input.d.ts +11 -0
- package/dist/components/ai-voice-input.js +1 -0
- package/dist/components/index.d.ts +35 -0
- package/dist/components/index.js +1 -0
- package/dist/components/p-CWjXxYJI.js +1 -0
- package/dist/components/p-CY6emva2.js +1 -0
- package/dist/components/p-DYv5ef4M.js +1 -0
- package/dist/esm/ai-card.entry.js +23 -0
- package/dist/esm/ai-chat-container.entry.js +136 -0
- package/dist/esm/ai-chat-header.entry.js +77 -0
- package/dist/esm/ai-chat-message.entry.js +162 -0
- package/dist/esm/ai-icon.entry.js +23 -0
- package/dist/esm/ai-link.entry.js +32 -0
- package/dist/esm/ai-loading.entry.js +75 -0
- package/dist/esm/ai-message-input.entry.js +63 -0
- package/dist/esm/ai-rating.entry.js +55 -0
- package/dist/esm/ai-suggestion.entry.js +29 -0
- package/dist/esm/ai-voice-input.entry.js +231 -0
- package/dist/esm/icon-registry-DYv5ef4M.js +80 -0
- package/dist/esm/index-7hrZ8FOQ.js +1612 -0
- package/dist/esm/index.js +5 -0
- package/dist/esm/loader.js +10 -0
- package/dist/esm/ui-ai-kit.js +20 -0
- package/dist/index.cjs.js +1 -0
- package/dist/index.js +1 -0
- package/dist/types/components/ai-card/ai-card.d.ts +7 -0
- package/dist/types/components/ai-card/ai-card.stories.d.ts +7 -0
- package/dist/types/components/ai-chat-container/ai-chat-container.d.ts +28 -0
- package/dist/types/components/ai-chat-container/ai-chat-container.stories.d.ts +7 -0
- package/dist/types/components/ai-chat-header/ai-chat-header.d.ts +38 -0
- package/dist/types/components/ai-chat-header/ai-chat-header.stories.d.ts +8 -0
- package/dist/types/components/ai-chat-message/ai-chat-message.d.ts +27 -0
- package/dist/types/components/ai-chat-message/ai-chat-message.stories.d.ts +10 -0
- package/dist/types/components/ai-icon/ai-icon.d.ts +8 -0
- package/dist/types/components/ai-link/ai-link.d.ts +12 -0
- package/dist/types/components/ai-link/ai-link.stories.d.ts +8 -0
- package/dist/types/components/ai-loading/ai-loading.d.ts +33 -0
- package/dist/types/components/ai-loading/ai-loading.stories.d.ts +10 -0
- package/dist/types/components/ai-message-input/ai-message-input.d.ts +22 -0
- package/dist/types/components/ai-message-input/ai-message-input.stories.d.ts +13 -0
- package/dist/types/components/ai-rating/ai-rating.d.ts +17 -0
- package/dist/types/components/ai-rating/ai-rating.stories.d.ts +8 -0
- package/dist/types/components/ai-suggestion/ai-suggestion.d.ts +10 -0
- package/dist/types/components/ai-suggestion/ai-suggestion.stories.d.ts +8 -0
- package/dist/types/components/ai-voice-input/ai-voice-input.d.ts +43 -0
- package/dist/types/components/ai-voice-input/ai-voice-input.stories.d.ts +9 -0
- package/dist/types/components.d.ts +860 -0
- package/dist/types/index.d.ts +11 -0
- package/dist/types/stencil-public-runtime.d.ts +1860 -0
- package/dist/types/utils/icon-registry.d.ts +5 -0
- package/dist/types/utils/utils.d.ts +1 -0
- package/dist/ui-ai-kit/index.esm.js +1 -0
- package/dist/ui-ai-kit/p-11facfad.entry.js +1 -0
- package/dist/ui-ai-kit/p-128a2ed4.entry.js +1 -0
- package/dist/ui-ai-kit/p-227bdb8f.entry.js +1 -0
- package/dist/ui-ai-kit/p-455daa17.entry.js +1 -0
- package/dist/ui-ai-kit/p-56163e8c.entry.js +1 -0
- package/dist/ui-ai-kit/p-6d21d0fd.entry.js +1 -0
- package/dist/ui-ai-kit/p-6ddcd77b.entry.js +1 -0
- package/dist/ui-ai-kit/p-7hrZ8FOQ.js +2 -0
- package/dist/ui-ai-kit/p-8e90143e.entry.js +1 -0
- package/dist/ui-ai-kit/p-9938c277.entry.js +1 -0
- package/dist/ui-ai-kit/p-DYv5ef4M.js +1 -0
- package/dist/ui-ai-kit/p-dc5b4a7f.entry.js +1 -0
- package/dist/ui-ai-kit/p-fb1702de.entry.js +1 -0
- package/dist/ui-ai-kit/ui-ai-kit.css +1 -0
- package/dist/ui-ai-kit/ui-ai-kit.esm.js +1 -0
- package/loader/cdn.js +1 -0
- package/loader/index.cjs.js +1 -0
- package/loader/index.d.ts +24 -0
- package/loader/index.es2017.js +1 -0
- package/loader/index.js +2 -0
- package/package.json +77 -0
- package/readme.md +111 -0
|
@@ -0,0 +1,860 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/**
|
|
4
|
+
* This is an autogenerated file created by the Stencil compiler.
|
|
5
|
+
* It contains typing information for all components that exist in this project.
|
|
6
|
+
*/
|
|
7
|
+
import { HTMLStencilElement, JSXBase } from "./stencil-public-runtime";
|
|
8
|
+
import { IconName } from "./utils/icon-registry";
|
|
9
|
+
import { LoadingStep } from "./components/ai-loading/ai-loading";
|
|
10
|
+
import { RatingValue } from "./components/ai-rating/ai-rating";
|
|
11
|
+
export { IconName } from "./utils/icon-registry";
|
|
12
|
+
export { LoadingStep } from "./components/ai-loading/ai-loading";
|
|
13
|
+
export { RatingValue } from "./components/ai-rating/ai-rating";
|
|
14
|
+
export namespace Components {
|
|
15
|
+
interface AiCard {
|
|
16
|
+
/**
|
|
17
|
+
* Remove the default padding
|
|
18
|
+
* @default false
|
|
19
|
+
*/
|
|
20
|
+
"noPadding": boolean;
|
|
21
|
+
/**
|
|
22
|
+
* Remove the shadow
|
|
23
|
+
* @default false
|
|
24
|
+
*/
|
|
25
|
+
"noShadow": boolean;
|
|
26
|
+
}
|
|
27
|
+
interface AiChatContainer {
|
|
28
|
+
/**
|
|
29
|
+
* Enable/disable auto-scroll to latest message
|
|
30
|
+
* @default true
|
|
31
|
+
*/
|
|
32
|
+
"autoScroll": boolean;
|
|
33
|
+
/**
|
|
34
|
+
* Height of the panel when position='float'
|
|
35
|
+
* @default '600px'
|
|
36
|
+
*/
|
|
37
|
+
"floatHeight": string;
|
|
38
|
+
/**
|
|
39
|
+
* Controls visibility of the chat panel
|
|
40
|
+
* @default false
|
|
41
|
+
*/
|
|
42
|
+
"isOpen": boolean;
|
|
43
|
+
/**
|
|
44
|
+
* Position of the panel: 'left', 'right', or 'float'
|
|
45
|
+
* @default 'right'
|
|
46
|
+
*/
|
|
47
|
+
"position": 'left' | 'right' | 'float';
|
|
48
|
+
/**
|
|
49
|
+
* Show AI watermark in the top half of the container
|
|
50
|
+
* @default false
|
|
51
|
+
*/
|
|
52
|
+
"showWatermark": boolean;
|
|
53
|
+
/**
|
|
54
|
+
* Width of the panel (CSS value, e.g., '400px', '30%', '28rem')
|
|
55
|
+
* @default '28rem'
|
|
56
|
+
*/
|
|
57
|
+
"width": string;
|
|
58
|
+
}
|
|
59
|
+
interface AiChatHeader {
|
|
60
|
+
/**
|
|
61
|
+
* Human mode: avatar image URL
|
|
62
|
+
* @default ''
|
|
63
|
+
*/
|
|
64
|
+
"agentAvatar": string;
|
|
65
|
+
/**
|
|
66
|
+
* Human mode: agent's display name
|
|
67
|
+
* @default ''
|
|
68
|
+
*/
|
|
69
|
+
"agentName": string;
|
|
70
|
+
/**
|
|
71
|
+
* Human mode: status label (e.g. "Active")
|
|
72
|
+
* @default ''
|
|
73
|
+
*/
|
|
74
|
+
"agentStatus": string;
|
|
75
|
+
/**
|
|
76
|
+
* Agent mode: conversation title
|
|
77
|
+
* @default 'محادثة جديدة'
|
|
78
|
+
*/
|
|
79
|
+
"conversation": string;
|
|
80
|
+
/**
|
|
81
|
+
* @default false
|
|
82
|
+
*/
|
|
83
|
+
"isDraggable": boolean;
|
|
84
|
+
/**
|
|
85
|
+
* Layout variant
|
|
86
|
+
* @default 'agent'
|
|
87
|
+
*/
|
|
88
|
+
"mode": 'agent' | 'human';
|
|
89
|
+
/**
|
|
90
|
+
* Human mode: show the back button
|
|
91
|
+
* @default true
|
|
92
|
+
*/
|
|
93
|
+
"showBack": boolean;
|
|
94
|
+
}
|
|
95
|
+
interface AiChatMessage {
|
|
96
|
+
/**
|
|
97
|
+
* @default ''
|
|
98
|
+
*/
|
|
99
|
+
"agentName": string;
|
|
100
|
+
/**
|
|
101
|
+
* @default ''
|
|
102
|
+
*/
|
|
103
|
+
"content": string;
|
|
104
|
+
/**
|
|
105
|
+
* @default false
|
|
106
|
+
*/
|
|
107
|
+
"enableRegenerate": boolean;
|
|
108
|
+
/**
|
|
109
|
+
* @default null
|
|
110
|
+
*/
|
|
111
|
+
"feedbackValue": 'up' | 'down' | null;
|
|
112
|
+
/**
|
|
113
|
+
* @default 'text'
|
|
114
|
+
*/
|
|
115
|
+
"format": 'text' | 'markdown';
|
|
116
|
+
/**
|
|
117
|
+
* @default 'user'
|
|
118
|
+
*/
|
|
119
|
+
"role": 'user' | 'agent';
|
|
120
|
+
/**
|
|
121
|
+
* @default true
|
|
122
|
+
*/
|
|
123
|
+
"showActions": boolean;
|
|
124
|
+
/**
|
|
125
|
+
* @default ''
|
|
126
|
+
*/
|
|
127
|
+
"timestamp": string;
|
|
128
|
+
}
|
|
129
|
+
interface AiIcon {
|
|
130
|
+
/**
|
|
131
|
+
* Icon name from the registry
|
|
132
|
+
*/
|
|
133
|
+
"name": IconName;
|
|
134
|
+
/**
|
|
135
|
+
* Size in pixels for width and height
|
|
136
|
+
* @default 16
|
|
137
|
+
*/
|
|
138
|
+
"size": number;
|
|
139
|
+
}
|
|
140
|
+
interface AiLink {
|
|
141
|
+
/**
|
|
142
|
+
* Href URL
|
|
143
|
+
* @default '#'
|
|
144
|
+
*/
|
|
145
|
+
"href": string;
|
|
146
|
+
/**
|
|
147
|
+
* Link display label
|
|
148
|
+
* @default ''
|
|
149
|
+
*/
|
|
150
|
+
"label": string;
|
|
151
|
+
/**
|
|
152
|
+
* Rel attribute — defaults to noopener noreferrer for _blank
|
|
153
|
+
* @default ''
|
|
154
|
+
*/
|
|
155
|
+
"rel": string;
|
|
156
|
+
/**
|
|
157
|
+
* Link target
|
|
158
|
+
* @default '_blank'
|
|
159
|
+
*/
|
|
160
|
+
"target": '_blank' | '_self' | '_parent' | '_top';
|
|
161
|
+
}
|
|
162
|
+
interface AiLoading {
|
|
163
|
+
/**
|
|
164
|
+
* Whether steps card is collapsible
|
|
165
|
+
* @default true
|
|
166
|
+
*/
|
|
167
|
+
"collapsible": boolean;
|
|
168
|
+
/**
|
|
169
|
+
* Steps mode expand state
|
|
170
|
+
* @default true
|
|
171
|
+
*/
|
|
172
|
+
"expanded": boolean;
|
|
173
|
+
/**
|
|
174
|
+
* Steps mode title
|
|
175
|
+
* @default 'خطة التنفيذ'
|
|
176
|
+
*/
|
|
177
|
+
"headerTitle": string;
|
|
178
|
+
/**
|
|
179
|
+
* Main mode switch
|
|
180
|
+
* @default 'thinking'
|
|
181
|
+
*/
|
|
182
|
+
"mode": 'thinking' | 'steps';
|
|
183
|
+
/**
|
|
184
|
+
* Thinking mode status text
|
|
185
|
+
* @default 'جاري التفكير...'
|
|
186
|
+
*/
|
|
187
|
+
"statusText": string;
|
|
188
|
+
/**
|
|
189
|
+
* Steps as JSON string array of LoadingStep
|
|
190
|
+
* @default '[]'
|
|
191
|
+
*/
|
|
192
|
+
"steps": string;
|
|
193
|
+
}
|
|
194
|
+
interface AiMessageInput {
|
|
195
|
+
/**
|
|
196
|
+
* Whether the input is disabled
|
|
197
|
+
* @default false
|
|
198
|
+
*/
|
|
199
|
+
"disabled": boolean;
|
|
200
|
+
/**
|
|
201
|
+
* Placeholder text for the textarea
|
|
202
|
+
* @default 'ايش في بالك؟'
|
|
203
|
+
*/
|
|
204
|
+
"placeholder": string;
|
|
205
|
+
/**
|
|
206
|
+
* Set the textarea value programmatically (e.g. after speech-to-text transcription)
|
|
207
|
+
*/
|
|
208
|
+
"setInputValue": (value: string) => Promise<void>;
|
|
209
|
+
/**
|
|
210
|
+
* Whether to show the voice recording button
|
|
211
|
+
* @default true
|
|
212
|
+
*/
|
|
213
|
+
"showVoiceButton": boolean;
|
|
214
|
+
}
|
|
215
|
+
interface AiRating {
|
|
216
|
+
/**
|
|
217
|
+
* Disable interaction
|
|
218
|
+
* @default false
|
|
219
|
+
*/
|
|
220
|
+
"disabled": boolean;
|
|
221
|
+
/**
|
|
222
|
+
* Main question label
|
|
223
|
+
* @default 'كيف كانت تجربتك؟'
|
|
224
|
+
*/
|
|
225
|
+
"question": string;
|
|
226
|
+
/**
|
|
227
|
+
* Sub-label below the question
|
|
228
|
+
* @default 'رأيك يساعدنا نحسن الخدمة'
|
|
229
|
+
*/
|
|
230
|
+
"subtitle": string;
|
|
231
|
+
/**
|
|
232
|
+
* Currently selected rating value (1–5)
|
|
233
|
+
* @default null
|
|
234
|
+
*/
|
|
235
|
+
"value": RatingValue | null;
|
|
236
|
+
}
|
|
237
|
+
interface AiSuggestion {
|
|
238
|
+
/**
|
|
239
|
+
* Disabled state
|
|
240
|
+
* @default false
|
|
241
|
+
*/
|
|
242
|
+
"disabled": boolean;
|
|
243
|
+
/**
|
|
244
|
+
* Suggestion text label
|
|
245
|
+
* @default ''
|
|
246
|
+
*/
|
|
247
|
+
"label": string;
|
|
248
|
+
}
|
|
249
|
+
interface AiVoiceInput {
|
|
250
|
+
/**
|
|
251
|
+
* Whether to auto-start recording on mount
|
|
252
|
+
* @default false
|
|
253
|
+
*/
|
|
254
|
+
"autoStart": boolean;
|
|
255
|
+
/**
|
|
256
|
+
* Whether the voice input is disabled
|
|
257
|
+
* @default false
|
|
258
|
+
*/
|
|
259
|
+
"disabled": boolean;
|
|
260
|
+
/**
|
|
261
|
+
* Whether to show the waveform animation
|
|
262
|
+
* @default true
|
|
263
|
+
*/
|
|
264
|
+
"showWaveform": boolean;
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
export interface AiChatHeaderCustomEvent<T> extends CustomEvent<T> {
|
|
268
|
+
detail: T;
|
|
269
|
+
target: HTMLAiChatHeaderElement;
|
|
270
|
+
}
|
|
271
|
+
export interface AiChatMessageCustomEvent<T> extends CustomEvent<T> {
|
|
272
|
+
detail: T;
|
|
273
|
+
target: HTMLAiChatMessageElement;
|
|
274
|
+
}
|
|
275
|
+
export interface AiLoadingCustomEvent<T> extends CustomEvent<T> {
|
|
276
|
+
detail: T;
|
|
277
|
+
target: HTMLAiLoadingElement;
|
|
278
|
+
}
|
|
279
|
+
export interface AiMessageInputCustomEvent<T> extends CustomEvent<T> {
|
|
280
|
+
detail: T;
|
|
281
|
+
target: HTMLAiMessageInputElement;
|
|
282
|
+
}
|
|
283
|
+
export interface AiRatingCustomEvent<T> extends CustomEvent<T> {
|
|
284
|
+
detail: T;
|
|
285
|
+
target: HTMLAiRatingElement;
|
|
286
|
+
}
|
|
287
|
+
export interface AiSuggestionCustomEvent<T> extends CustomEvent<T> {
|
|
288
|
+
detail: T;
|
|
289
|
+
target: HTMLAiSuggestionElement;
|
|
290
|
+
}
|
|
291
|
+
export interface AiVoiceInputCustomEvent<T> extends CustomEvent<T> {
|
|
292
|
+
detail: T;
|
|
293
|
+
target: HTMLAiVoiceInputElement;
|
|
294
|
+
}
|
|
295
|
+
declare global {
|
|
296
|
+
interface HTMLAiCardElement extends Components.AiCard, HTMLStencilElement {
|
|
297
|
+
}
|
|
298
|
+
var HTMLAiCardElement: {
|
|
299
|
+
prototype: HTMLAiCardElement;
|
|
300
|
+
new (): HTMLAiCardElement;
|
|
301
|
+
};
|
|
302
|
+
interface HTMLAiChatContainerElement extends Components.AiChatContainer, HTMLStencilElement {
|
|
303
|
+
}
|
|
304
|
+
var HTMLAiChatContainerElement: {
|
|
305
|
+
prototype: HTMLAiChatContainerElement;
|
|
306
|
+
new (): HTMLAiChatContainerElement;
|
|
307
|
+
};
|
|
308
|
+
interface HTMLAiChatHeaderElementEventMap {
|
|
309
|
+
"closeClick": void;
|
|
310
|
+
"editClick": void;
|
|
311
|
+
"dropdownClick": void;
|
|
312
|
+
"moreClick": void;
|
|
313
|
+
"backClick": void;
|
|
314
|
+
"headerDragStart": { clientX: number; clientY: number };
|
|
315
|
+
}
|
|
316
|
+
interface HTMLAiChatHeaderElement extends Components.AiChatHeader, HTMLStencilElement {
|
|
317
|
+
addEventListener<K extends keyof HTMLAiChatHeaderElementEventMap>(type: K, listener: (this: HTMLAiChatHeaderElement, ev: AiChatHeaderCustomEvent<HTMLAiChatHeaderElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
|
|
318
|
+
addEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
319
|
+
addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
320
|
+
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
|
|
321
|
+
removeEventListener<K extends keyof HTMLAiChatHeaderElementEventMap>(type: K, listener: (this: HTMLAiChatHeaderElement, ev: AiChatHeaderCustomEvent<HTMLAiChatHeaderElementEventMap[K]>) => any, options?: boolean | EventListenerOptions): void;
|
|
322
|
+
removeEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
323
|
+
removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
324
|
+
removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
|
|
325
|
+
}
|
|
326
|
+
var HTMLAiChatHeaderElement: {
|
|
327
|
+
prototype: HTMLAiChatHeaderElement;
|
|
328
|
+
new (): HTMLAiChatHeaderElement;
|
|
329
|
+
};
|
|
330
|
+
interface HTMLAiChatMessageElementEventMap {
|
|
331
|
+
"messageCopy": void;
|
|
332
|
+
"messageFeedback": 'up' | 'down';
|
|
333
|
+
"messageRegenerate": void;
|
|
334
|
+
}
|
|
335
|
+
interface HTMLAiChatMessageElement extends Components.AiChatMessage, HTMLStencilElement {
|
|
336
|
+
addEventListener<K extends keyof HTMLAiChatMessageElementEventMap>(type: K, listener: (this: HTMLAiChatMessageElement, ev: AiChatMessageCustomEvent<HTMLAiChatMessageElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
|
|
337
|
+
addEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
338
|
+
addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
339
|
+
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
|
|
340
|
+
removeEventListener<K extends keyof HTMLAiChatMessageElementEventMap>(type: K, listener: (this: HTMLAiChatMessageElement, ev: AiChatMessageCustomEvent<HTMLAiChatMessageElementEventMap[K]>) => any, options?: boolean | EventListenerOptions): void;
|
|
341
|
+
removeEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
342
|
+
removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
343
|
+
removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
|
|
344
|
+
}
|
|
345
|
+
var HTMLAiChatMessageElement: {
|
|
346
|
+
prototype: HTMLAiChatMessageElement;
|
|
347
|
+
new (): HTMLAiChatMessageElement;
|
|
348
|
+
};
|
|
349
|
+
interface HTMLAiIconElement extends Components.AiIcon, HTMLStencilElement {
|
|
350
|
+
}
|
|
351
|
+
var HTMLAiIconElement: {
|
|
352
|
+
prototype: HTMLAiIconElement;
|
|
353
|
+
new (): HTMLAiIconElement;
|
|
354
|
+
};
|
|
355
|
+
interface HTMLAiLinkElement extends Components.AiLink, HTMLStencilElement {
|
|
356
|
+
}
|
|
357
|
+
var HTMLAiLinkElement: {
|
|
358
|
+
prototype: HTMLAiLinkElement;
|
|
359
|
+
new (): HTMLAiLinkElement;
|
|
360
|
+
};
|
|
361
|
+
interface HTMLAiLoadingElementEventMap {
|
|
362
|
+
"toggleExpand": boolean;
|
|
363
|
+
"stepClick": LoadingStep;
|
|
364
|
+
}
|
|
365
|
+
interface HTMLAiLoadingElement extends Components.AiLoading, HTMLStencilElement {
|
|
366
|
+
addEventListener<K extends keyof HTMLAiLoadingElementEventMap>(type: K, listener: (this: HTMLAiLoadingElement, ev: AiLoadingCustomEvent<HTMLAiLoadingElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
|
|
367
|
+
addEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
368
|
+
addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
369
|
+
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
|
|
370
|
+
removeEventListener<K extends keyof HTMLAiLoadingElementEventMap>(type: K, listener: (this: HTMLAiLoadingElement, ev: AiLoadingCustomEvent<HTMLAiLoadingElementEventMap[K]>) => any, options?: boolean | EventListenerOptions): void;
|
|
371
|
+
removeEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
372
|
+
removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
373
|
+
removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
|
|
374
|
+
}
|
|
375
|
+
var HTMLAiLoadingElement: {
|
|
376
|
+
prototype: HTMLAiLoadingElement;
|
|
377
|
+
new (): HTMLAiLoadingElement;
|
|
378
|
+
};
|
|
379
|
+
interface HTMLAiMessageInputElementEventMap {
|
|
380
|
+
"sendMessage": string;
|
|
381
|
+
"voiceButtonClick": void;
|
|
382
|
+
}
|
|
383
|
+
interface HTMLAiMessageInputElement extends Components.AiMessageInput, HTMLStencilElement {
|
|
384
|
+
addEventListener<K extends keyof HTMLAiMessageInputElementEventMap>(type: K, listener: (this: HTMLAiMessageInputElement, ev: AiMessageInputCustomEvent<HTMLAiMessageInputElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
|
|
385
|
+
addEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
386
|
+
addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
387
|
+
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
|
|
388
|
+
removeEventListener<K extends keyof HTMLAiMessageInputElementEventMap>(type: K, listener: (this: HTMLAiMessageInputElement, ev: AiMessageInputCustomEvent<HTMLAiMessageInputElementEventMap[K]>) => any, options?: boolean | EventListenerOptions): void;
|
|
389
|
+
removeEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
390
|
+
removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
391
|
+
removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
|
|
392
|
+
}
|
|
393
|
+
var HTMLAiMessageInputElement: {
|
|
394
|
+
prototype: HTMLAiMessageInputElement;
|
|
395
|
+
new (): HTMLAiMessageInputElement;
|
|
396
|
+
};
|
|
397
|
+
interface HTMLAiRatingElementEventMap {
|
|
398
|
+
"ratingChange": RatingValue;
|
|
399
|
+
}
|
|
400
|
+
interface HTMLAiRatingElement extends Components.AiRating, HTMLStencilElement {
|
|
401
|
+
addEventListener<K extends keyof HTMLAiRatingElementEventMap>(type: K, listener: (this: HTMLAiRatingElement, ev: AiRatingCustomEvent<HTMLAiRatingElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
|
|
402
|
+
addEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
403
|
+
addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
404
|
+
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
|
|
405
|
+
removeEventListener<K extends keyof HTMLAiRatingElementEventMap>(type: K, listener: (this: HTMLAiRatingElement, ev: AiRatingCustomEvent<HTMLAiRatingElementEventMap[K]>) => any, options?: boolean | EventListenerOptions): void;
|
|
406
|
+
removeEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
407
|
+
removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
408
|
+
removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
|
|
409
|
+
}
|
|
410
|
+
var HTMLAiRatingElement: {
|
|
411
|
+
prototype: HTMLAiRatingElement;
|
|
412
|
+
new (): HTMLAiRatingElement;
|
|
413
|
+
};
|
|
414
|
+
interface HTMLAiSuggestionElementEventMap {
|
|
415
|
+
"suggestionClick": string;
|
|
416
|
+
}
|
|
417
|
+
interface HTMLAiSuggestionElement extends Components.AiSuggestion, HTMLStencilElement {
|
|
418
|
+
addEventListener<K extends keyof HTMLAiSuggestionElementEventMap>(type: K, listener: (this: HTMLAiSuggestionElement, ev: AiSuggestionCustomEvent<HTMLAiSuggestionElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
|
|
419
|
+
addEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
420
|
+
addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
421
|
+
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
|
|
422
|
+
removeEventListener<K extends keyof HTMLAiSuggestionElementEventMap>(type: K, listener: (this: HTMLAiSuggestionElement, ev: AiSuggestionCustomEvent<HTMLAiSuggestionElementEventMap[K]>) => any, options?: boolean | EventListenerOptions): void;
|
|
423
|
+
removeEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
424
|
+
removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
425
|
+
removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
|
|
426
|
+
}
|
|
427
|
+
var HTMLAiSuggestionElement: {
|
|
428
|
+
prototype: HTMLAiSuggestionElement;
|
|
429
|
+
new (): HTMLAiSuggestionElement;
|
|
430
|
+
};
|
|
431
|
+
interface HTMLAiVoiceInputElementEventMap {
|
|
432
|
+
"audioRecorded": { blob: Blob; duration: number };
|
|
433
|
+
"recordingCancel": void;
|
|
434
|
+
}
|
|
435
|
+
interface HTMLAiVoiceInputElement extends Components.AiVoiceInput, HTMLStencilElement {
|
|
436
|
+
addEventListener<K extends keyof HTMLAiVoiceInputElementEventMap>(type: K, listener: (this: HTMLAiVoiceInputElement, ev: AiVoiceInputCustomEvent<HTMLAiVoiceInputElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
|
|
437
|
+
addEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
438
|
+
addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
439
|
+
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
|
|
440
|
+
removeEventListener<K extends keyof HTMLAiVoiceInputElementEventMap>(type: K, listener: (this: HTMLAiVoiceInputElement, ev: AiVoiceInputCustomEvent<HTMLAiVoiceInputElementEventMap[K]>) => any, options?: boolean | EventListenerOptions): void;
|
|
441
|
+
removeEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
442
|
+
removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
443
|
+
removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
|
|
444
|
+
}
|
|
445
|
+
var HTMLAiVoiceInputElement: {
|
|
446
|
+
prototype: HTMLAiVoiceInputElement;
|
|
447
|
+
new (): HTMLAiVoiceInputElement;
|
|
448
|
+
};
|
|
449
|
+
interface HTMLElementTagNameMap {
|
|
450
|
+
"ai-card": HTMLAiCardElement;
|
|
451
|
+
"ai-chat-container": HTMLAiChatContainerElement;
|
|
452
|
+
"ai-chat-header": HTMLAiChatHeaderElement;
|
|
453
|
+
"ai-chat-message": HTMLAiChatMessageElement;
|
|
454
|
+
"ai-icon": HTMLAiIconElement;
|
|
455
|
+
"ai-link": HTMLAiLinkElement;
|
|
456
|
+
"ai-loading": HTMLAiLoadingElement;
|
|
457
|
+
"ai-message-input": HTMLAiMessageInputElement;
|
|
458
|
+
"ai-rating": HTMLAiRatingElement;
|
|
459
|
+
"ai-suggestion": HTMLAiSuggestionElement;
|
|
460
|
+
"ai-voice-input": HTMLAiVoiceInputElement;
|
|
461
|
+
}
|
|
462
|
+
}
|
|
463
|
+
declare namespace LocalJSX {
|
|
464
|
+
interface AiCard {
|
|
465
|
+
/**
|
|
466
|
+
* Remove the default padding
|
|
467
|
+
* @default false
|
|
468
|
+
*/
|
|
469
|
+
"noPadding"?: boolean;
|
|
470
|
+
/**
|
|
471
|
+
* Remove the shadow
|
|
472
|
+
* @default false
|
|
473
|
+
*/
|
|
474
|
+
"noShadow"?: boolean;
|
|
475
|
+
}
|
|
476
|
+
interface AiChatContainer {
|
|
477
|
+
/**
|
|
478
|
+
* Enable/disable auto-scroll to latest message
|
|
479
|
+
* @default true
|
|
480
|
+
*/
|
|
481
|
+
"autoScroll"?: boolean;
|
|
482
|
+
/**
|
|
483
|
+
* Height of the panel when position='float'
|
|
484
|
+
* @default '600px'
|
|
485
|
+
*/
|
|
486
|
+
"floatHeight"?: string;
|
|
487
|
+
/**
|
|
488
|
+
* Controls visibility of the chat panel
|
|
489
|
+
* @default false
|
|
490
|
+
*/
|
|
491
|
+
"isOpen"?: boolean;
|
|
492
|
+
/**
|
|
493
|
+
* Position of the panel: 'left', 'right', or 'float'
|
|
494
|
+
* @default 'right'
|
|
495
|
+
*/
|
|
496
|
+
"position"?: 'left' | 'right' | 'float';
|
|
497
|
+
/**
|
|
498
|
+
* Show AI watermark in the top half of the container
|
|
499
|
+
* @default false
|
|
500
|
+
*/
|
|
501
|
+
"showWatermark"?: boolean;
|
|
502
|
+
/**
|
|
503
|
+
* Width of the panel (CSS value, e.g., '400px', '30%', '28rem')
|
|
504
|
+
* @default '28rem'
|
|
505
|
+
*/
|
|
506
|
+
"width"?: string;
|
|
507
|
+
}
|
|
508
|
+
interface AiChatHeader {
|
|
509
|
+
/**
|
|
510
|
+
* Human mode: avatar image URL
|
|
511
|
+
* @default ''
|
|
512
|
+
*/
|
|
513
|
+
"agentAvatar"?: string;
|
|
514
|
+
/**
|
|
515
|
+
* Human mode: agent's display name
|
|
516
|
+
* @default ''
|
|
517
|
+
*/
|
|
518
|
+
"agentName"?: string;
|
|
519
|
+
/**
|
|
520
|
+
* Human mode: status label (e.g. "Active")
|
|
521
|
+
* @default ''
|
|
522
|
+
*/
|
|
523
|
+
"agentStatus"?: string;
|
|
524
|
+
/**
|
|
525
|
+
* Agent mode: conversation title
|
|
526
|
+
* @default 'محادثة جديدة'
|
|
527
|
+
*/
|
|
528
|
+
"conversation"?: string;
|
|
529
|
+
/**
|
|
530
|
+
* @default false
|
|
531
|
+
*/
|
|
532
|
+
"isDraggable"?: boolean;
|
|
533
|
+
/**
|
|
534
|
+
* Layout variant
|
|
535
|
+
* @default 'agent'
|
|
536
|
+
*/
|
|
537
|
+
"mode"?: 'agent' | 'human';
|
|
538
|
+
/**
|
|
539
|
+
* Back-arrow button (human mode)
|
|
540
|
+
*/
|
|
541
|
+
"onBackClick"?: (event: AiChatHeaderCustomEvent<void>) => void;
|
|
542
|
+
/**
|
|
543
|
+
* Cancel / close button
|
|
544
|
+
*/
|
|
545
|
+
"onCloseClick"?: (event: AiChatHeaderCustomEvent<void>) => void;
|
|
546
|
+
/**
|
|
547
|
+
* Title / chevron click → open conversation list (agent mode)
|
|
548
|
+
*/
|
|
549
|
+
"onDropdownClick"?: (event: AiChatHeaderCustomEvent<void>) => void;
|
|
550
|
+
/**
|
|
551
|
+
* Pencil-edit button (agent mode)
|
|
552
|
+
*/
|
|
553
|
+
"onEditClick"?: (event: AiChatHeaderCustomEvent<void>) => void;
|
|
554
|
+
/**
|
|
555
|
+
* Fired on pointerdown of the drag handle. Composed + bubbling so ai-chat-container can receive it across shadow roots.
|
|
556
|
+
*/
|
|
557
|
+
"onHeaderDragStart"?: (event: AiChatHeaderCustomEvent<{ clientX: number; clientY: number }>) => void;
|
|
558
|
+
/**
|
|
559
|
+
* Chevron-down button (human mode)
|
|
560
|
+
*/
|
|
561
|
+
"onMoreClick"?: (event: AiChatHeaderCustomEvent<void>) => void;
|
|
562
|
+
/**
|
|
563
|
+
* Human mode: show the back button
|
|
564
|
+
* @default true
|
|
565
|
+
*/
|
|
566
|
+
"showBack"?: boolean;
|
|
567
|
+
}
|
|
568
|
+
interface AiChatMessage {
|
|
569
|
+
/**
|
|
570
|
+
* @default ''
|
|
571
|
+
*/
|
|
572
|
+
"agentName"?: string;
|
|
573
|
+
/**
|
|
574
|
+
* @default ''
|
|
575
|
+
*/
|
|
576
|
+
"content"?: string;
|
|
577
|
+
/**
|
|
578
|
+
* @default false
|
|
579
|
+
*/
|
|
580
|
+
"enableRegenerate"?: boolean;
|
|
581
|
+
/**
|
|
582
|
+
* @default null
|
|
583
|
+
*/
|
|
584
|
+
"feedbackValue"?: 'up' | 'down' | null;
|
|
585
|
+
/**
|
|
586
|
+
* @default 'text'
|
|
587
|
+
*/
|
|
588
|
+
"format"?: 'text' | 'markdown';
|
|
589
|
+
"onMessageCopy"?: (event: AiChatMessageCustomEvent<void>) => void;
|
|
590
|
+
"onMessageFeedback"?: (event: AiChatMessageCustomEvent<'up' | 'down'>) => void;
|
|
591
|
+
"onMessageRegenerate"?: (event: AiChatMessageCustomEvent<void>) => void;
|
|
592
|
+
/**
|
|
593
|
+
* @default 'user'
|
|
594
|
+
*/
|
|
595
|
+
"role"?: 'user' | 'agent';
|
|
596
|
+
/**
|
|
597
|
+
* @default true
|
|
598
|
+
*/
|
|
599
|
+
"showActions"?: boolean;
|
|
600
|
+
/**
|
|
601
|
+
* @default ''
|
|
602
|
+
*/
|
|
603
|
+
"timestamp"?: string;
|
|
604
|
+
}
|
|
605
|
+
interface AiIcon {
|
|
606
|
+
/**
|
|
607
|
+
* Icon name from the registry
|
|
608
|
+
*/
|
|
609
|
+
"name"?: IconName;
|
|
610
|
+
/**
|
|
611
|
+
* Size in pixels for width and height
|
|
612
|
+
* @default 16
|
|
613
|
+
*/
|
|
614
|
+
"size"?: number;
|
|
615
|
+
}
|
|
616
|
+
interface AiLink {
|
|
617
|
+
/**
|
|
618
|
+
* Href URL
|
|
619
|
+
* @default '#'
|
|
620
|
+
*/
|
|
621
|
+
"href"?: string;
|
|
622
|
+
/**
|
|
623
|
+
* Link display label
|
|
624
|
+
* @default ''
|
|
625
|
+
*/
|
|
626
|
+
"label"?: string;
|
|
627
|
+
/**
|
|
628
|
+
* Rel attribute — defaults to noopener noreferrer for _blank
|
|
629
|
+
* @default ''
|
|
630
|
+
*/
|
|
631
|
+
"rel"?: string;
|
|
632
|
+
/**
|
|
633
|
+
* Link target
|
|
634
|
+
* @default '_blank'
|
|
635
|
+
*/
|
|
636
|
+
"target"?: '_blank' | '_self' | '_parent' | '_top';
|
|
637
|
+
}
|
|
638
|
+
interface AiLoading {
|
|
639
|
+
/**
|
|
640
|
+
* Whether steps card is collapsible
|
|
641
|
+
* @default true
|
|
642
|
+
*/
|
|
643
|
+
"collapsible"?: boolean;
|
|
644
|
+
/**
|
|
645
|
+
* Steps mode expand state
|
|
646
|
+
* @default true
|
|
647
|
+
*/
|
|
648
|
+
"expanded"?: boolean;
|
|
649
|
+
/**
|
|
650
|
+
* Steps mode title
|
|
651
|
+
* @default 'خطة التنفيذ'
|
|
652
|
+
*/
|
|
653
|
+
"headerTitle"?: string;
|
|
654
|
+
/**
|
|
655
|
+
* Main mode switch
|
|
656
|
+
* @default 'thinking'
|
|
657
|
+
*/
|
|
658
|
+
"mode"?: 'thinking' | 'steps';
|
|
659
|
+
"onStepClick"?: (event: AiLoadingCustomEvent<LoadingStep>) => void;
|
|
660
|
+
"onToggleExpand"?: (event: AiLoadingCustomEvent<boolean>) => void;
|
|
661
|
+
/**
|
|
662
|
+
* Thinking mode status text
|
|
663
|
+
* @default 'جاري التفكير...'
|
|
664
|
+
*/
|
|
665
|
+
"statusText"?: string;
|
|
666
|
+
/**
|
|
667
|
+
* Steps as JSON string array of LoadingStep
|
|
668
|
+
* @default '[]'
|
|
669
|
+
*/
|
|
670
|
+
"steps"?: string;
|
|
671
|
+
}
|
|
672
|
+
interface AiMessageInput {
|
|
673
|
+
/**
|
|
674
|
+
* Whether the input is disabled
|
|
675
|
+
* @default false
|
|
676
|
+
*/
|
|
677
|
+
"disabled"?: boolean;
|
|
678
|
+
/**
|
|
679
|
+
* Event emitted when a message is sent
|
|
680
|
+
*/
|
|
681
|
+
"onSendMessage"?: (event: AiMessageInputCustomEvent<string>) => void;
|
|
682
|
+
/**
|
|
683
|
+
* Event emitted when the voice button is clicked — caller controls rendering the voice recorder
|
|
684
|
+
*/
|
|
685
|
+
"onVoiceButtonClick"?: (event: AiMessageInputCustomEvent<void>) => void;
|
|
686
|
+
/**
|
|
687
|
+
* Placeholder text for the textarea
|
|
688
|
+
* @default 'ايش في بالك؟'
|
|
689
|
+
*/
|
|
690
|
+
"placeholder"?: string;
|
|
691
|
+
/**
|
|
692
|
+
* Whether to show the voice recording button
|
|
693
|
+
* @default true
|
|
694
|
+
*/
|
|
695
|
+
"showVoiceButton"?: boolean;
|
|
696
|
+
}
|
|
697
|
+
interface AiRating {
|
|
698
|
+
/**
|
|
699
|
+
* Disable interaction
|
|
700
|
+
* @default false
|
|
701
|
+
*/
|
|
702
|
+
"disabled"?: boolean;
|
|
703
|
+
"onRatingChange"?: (event: AiRatingCustomEvent<RatingValue>) => void;
|
|
704
|
+
/**
|
|
705
|
+
* Main question label
|
|
706
|
+
* @default 'كيف كانت تجربتك؟'
|
|
707
|
+
*/
|
|
708
|
+
"question"?: string;
|
|
709
|
+
/**
|
|
710
|
+
* Sub-label below the question
|
|
711
|
+
* @default 'رأيك يساعدنا نحسن الخدمة'
|
|
712
|
+
*/
|
|
713
|
+
"subtitle"?: string;
|
|
714
|
+
/**
|
|
715
|
+
* Currently selected rating value (1–5)
|
|
716
|
+
* @default null
|
|
717
|
+
*/
|
|
718
|
+
"value"?: RatingValue | null;
|
|
719
|
+
}
|
|
720
|
+
interface AiSuggestion {
|
|
721
|
+
/**
|
|
722
|
+
* Disabled state
|
|
723
|
+
* @default false
|
|
724
|
+
*/
|
|
725
|
+
"disabled"?: boolean;
|
|
726
|
+
/**
|
|
727
|
+
* Suggestion text label
|
|
728
|
+
* @default ''
|
|
729
|
+
*/
|
|
730
|
+
"label"?: string;
|
|
731
|
+
"onSuggestionClick"?: (event: AiSuggestionCustomEvent<string>) => void;
|
|
732
|
+
}
|
|
733
|
+
interface AiVoiceInput {
|
|
734
|
+
/**
|
|
735
|
+
* Whether to auto-start recording on mount
|
|
736
|
+
* @default false
|
|
737
|
+
*/
|
|
738
|
+
"autoStart"?: boolean;
|
|
739
|
+
/**
|
|
740
|
+
* Whether the voice input is disabled
|
|
741
|
+
* @default false
|
|
742
|
+
*/
|
|
743
|
+
"disabled"?: boolean;
|
|
744
|
+
/**
|
|
745
|
+
* Event emitted when audio blob is ready
|
|
746
|
+
*/
|
|
747
|
+
"onAudioRecorded"?: (event: AiVoiceInputCustomEvent<{ blob: Blob; duration: number }>) => void;
|
|
748
|
+
/**
|
|
749
|
+
* Event emitted when recording is canceled
|
|
750
|
+
*/
|
|
751
|
+
"onRecordingCancel"?: (event: AiVoiceInputCustomEvent<void>) => void;
|
|
752
|
+
/**
|
|
753
|
+
* Whether to show the waveform animation
|
|
754
|
+
* @default true
|
|
755
|
+
*/
|
|
756
|
+
"showWaveform"?: boolean;
|
|
757
|
+
}
|
|
758
|
+
|
|
759
|
+
interface AiCardAttributes {
|
|
760
|
+
"noPadding": boolean;
|
|
761
|
+
"noShadow": boolean;
|
|
762
|
+
}
|
|
763
|
+
interface AiChatContainerAttributes {
|
|
764
|
+
"isOpen": boolean;
|
|
765
|
+
"position": 'left' | 'right' | 'float';
|
|
766
|
+
"width": string;
|
|
767
|
+
"autoScroll": boolean;
|
|
768
|
+
"showWatermark": boolean;
|
|
769
|
+
"floatHeight": string;
|
|
770
|
+
}
|
|
771
|
+
interface AiChatHeaderAttributes {
|
|
772
|
+
"mode": 'agent' | 'human';
|
|
773
|
+
"conversation": string;
|
|
774
|
+
"agentName": string;
|
|
775
|
+
"agentStatus": string;
|
|
776
|
+
"agentAvatar": string;
|
|
777
|
+
"showBack": boolean;
|
|
778
|
+
"isDraggable": boolean;
|
|
779
|
+
}
|
|
780
|
+
interface AiChatMessageAttributes {
|
|
781
|
+
"role": 'user' | 'agent';
|
|
782
|
+
"content": string;
|
|
783
|
+
"format": 'text' | 'markdown';
|
|
784
|
+
"agentName": string;
|
|
785
|
+
"timestamp": string;
|
|
786
|
+
"showActions": boolean;
|
|
787
|
+
"enableRegenerate": boolean;
|
|
788
|
+
"feedbackValue": 'up' | 'down' | null;
|
|
789
|
+
}
|
|
790
|
+
interface AiIconAttributes {
|
|
791
|
+
"name": IconName;
|
|
792
|
+
"size": number;
|
|
793
|
+
}
|
|
794
|
+
interface AiLinkAttributes {
|
|
795
|
+
"label": string;
|
|
796
|
+
"href": string;
|
|
797
|
+
"target": '_blank' | '_self' | '_parent' | '_top';
|
|
798
|
+
"rel": string;
|
|
799
|
+
}
|
|
800
|
+
interface AiLoadingAttributes {
|
|
801
|
+
"mode": 'thinking' | 'steps';
|
|
802
|
+
"statusText": string;
|
|
803
|
+
"steps": string;
|
|
804
|
+
"headerTitle": string;
|
|
805
|
+
"expanded": boolean;
|
|
806
|
+
"collapsible": boolean;
|
|
807
|
+
}
|
|
808
|
+
interface AiMessageInputAttributes {
|
|
809
|
+
"placeholder": string;
|
|
810
|
+
"disabled": boolean;
|
|
811
|
+
"showVoiceButton": boolean;
|
|
812
|
+
}
|
|
813
|
+
interface AiRatingAttributes {
|
|
814
|
+
"question": string;
|
|
815
|
+
"subtitle": string;
|
|
816
|
+
"value": RatingValue | null;
|
|
817
|
+
"disabled": boolean;
|
|
818
|
+
}
|
|
819
|
+
interface AiSuggestionAttributes {
|
|
820
|
+
"label": string;
|
|
821
|
+
"disabled": boolean;
|
|
822
|
+
}
|
|
823
|
+
interface AiVoiceInputAttributes {
|
|
824
|
+
"disabled": boolean;
|
|
825
|
+
"showWaveform": boolean;
|
|
826
|
+
"autoStart": boolean;
|
|
827
|
+
}
|
|
828
|
+
|
|
829
|
+
interface IntrinsicElements {
|
|
830
|
+
"ai-card": Omit<AiCard, keyof AiCardAttributes> & { [K in keyof AiCard & keyof AiCardAttributes]?: AiCard[K] } & { [K in keyof AiCard & keyof AiCardAttributes as `attr:${K}`]?: AiCardAttributes[K] } & { [K in keyof AiCard & keyof AiCardAttributes as `prop:${K}`]?: AiCard[K] };
|
|
831
|
+
"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
|
+
"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
|
+
"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] };
|
|
834
|
+
"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
|
+
"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
|
+
"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
|
+
"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
|
+
"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] };
|
|
839
|
+
"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
|
+
"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
|
+
}
|
|
842
|
+
}
|
|
843
|
+
export { LocalJSX as JSX };
|
|
844
|
+
declare module "@stencil/core" {
|
|
845
|
+
export namespace JSX {
|
|
846
|
+
interface IntrinsicElements {
|
|
847
|
+
"ai-card": LocalJSX.IntrinsicElements["ai-card"] & JSXBase.HTMLAttributes<HTMLAiCardElement>;
|
|
848
|
+
"ai-chat-container": LocalJSX.IntrinsicElements["ai-chat-container"] & JSXBase.HTMLAttributes<HTMLAiChatContainerElement>;
|
|
849
|
+
"ai-chat-header": LocalJSX.IntrinsicElements["ai-chat-header"] & JSXBase.HTMLAttributes<HTMLAiChatHeaderElement>;
|
|
850
|
+
"ai-chat-message": LocalJSX.IntrinsicElements["ai-chat-message"] & JSXBase.HTMLAttributes<HTMLAiChatMessageElement>;
|
|
851
|
+
"ai-icon": LocalJSX.IntrinsicElements["ai-icon"] & JSXBase.HTMLAttributes<HTMLAiIconElement>;
|
|
852
|
+
"ai-link": LocalJSX.IntrinsicElements["ai-link"] & JSXBase.HTMLAttributes<HTMLAiLinkElement>;
|
|
853
|
+
"ai-loading": LocalJSX.IntrinsicElements["ai-loading"] & JSXBase.HTMLAttributes<HTMLAiLoadingElement>;
|
|
854
|
+
"ai-message-input": LocalJSX.IntrinsicElements["ai-message-input"] & JSXBase.HTMLAttributes<HTMLAiMessageInputElement>;
|
|
855
|
+
"ai-rating": LocalJSX.IntrinsicElements["ai-rating"] & JSXBase.HTMLAttributes<HTMLAiRatingElement>;
|
|
856
|
+
"ai-suggestion": LocalJSX.IntrinsicElements["ai-suggestion"] & JSXBase.HTMLAttributes<HTMLAiSuggestionElement>;
|
|
857
|
+
"ai-voice-input": LocalJSX.IntrinsicElements["ai-voice-input"] & JSXBase.HTMLAttributes<HTMLAiVoiceInputElement>;
|
|
858
|
+
}
|
|
859
|
+
}
|
|
860
|
+
}
|