@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.
Files changed (147) hide show
  1. package/dist/cjs/ai-card.cjs.entry.js +2 -2
  2. package/dist/cjs/ai-chat-container.cjs.entry.js +84 -57
  3. package/dist/cjs/ai-chat-header.cjs.entry.js +29 -19
  4. package/dist/cjs/ai-chat-message.cjs.entry.js +1456 -21
  5. package/dist/cjs/ai-conversation-list.cjs.entry.js +80 -0
  6. package/dist/cjs/ai-conversation-summary.cjs.entry.js +33 -0
  7. package/dist/cjs/ai-icon.cjs.entry.js +2 -2
  8. package/dist/cjs/ai-link.cjs.entry.js +4 -4
  9. package/dist/cjs/ai-loading.cjs.entry.js +35 -22
  10. package/dist/cjs/ai-message-input.cjs.entry.js +48 -15
  11. package/dist/cjs/ai-rating.cjs.entry.js +2 -2
  12. package/dist/cjs/ai-route-decision.cjs.entry.js +48 -0
  13. package/dist/cjs/ai-suggestion.cjs.entry.js +4 -4
  14. package/dist/cjs/ai-voice-input.cjs.entry.js +75 -21
  15. package/dist/cjs/{icon-registry-dmfLA-Dj.js → icon-registry-BKb9-2Nt.js} +24 -0
  16. package/dist/cjs/{index-DLJcLHFH.js → index-BkNg07SW.js} +1 -1
  17. package/dist/cjs/loader.cjs.js +2 -2
  18. package/dist/cjs/ui-ai-kit.cjs.js +2 -2
  19. package/dist/collection/collection-manifest.json +3 -0
  20. package/dist/collection/components/ai-card/ai-card.css +5 -8
  21. package/dist/collection/components/ai-chat-container/ai-chat-container.css +17 -14
  22. package/dist/collection/components/ai-chat-container/ai-chat-container.js +125 -53
  23. package/dist/collection/components/ai-chat-header/ai-chat-header.css +50 -17
  24. package/dist/collection/components/ai-chat-header/ai-chat-header.js +53 -18
  25. package/dist/collection/components/ai-chat-message/ai-chat-message.css +47 -38
  26. package/dist/collection/components/ai-chat-message/ai-chat-message.js +68 -18
  27. package/dist/collection/components/ai-conversation-list/ai-conversation-list.css +196 -0
  28. package/dist/collection/components/ai-conversation-list/ai-conversation-list.js +176 -0
  29. package/dist/collection/components/ai-conversation-summary/ai-conversation-summary.css +103 -0
  30. package/dist/collection/components/ai-conversation-summary/ai-conversation-summary.js +118 -0
  31. package/dist/collection/components/ai-icon/ai-icon.js +1 -1
  32. package/dist/collection/components/ai-link/ai-link.css +3 -7
  33. package/dist/collection/components/ai-link/ai-link.js +1 -1
  34. package/dist/collection/components/ai-loading/ai-loading.css +149 -20
  35. package/dist/collection/components/ai-loading/ai-loading.js +100 -23
  36. package/dist/collection/components/ai-message-input/ai-message-input.css +41 -37
  37. package/dist/collection/components/ai-message-input/ai-message-input.js +100 -19
  38. package/dist/collection/components/ai-rating/ai-rating.css +8 -14
  39. package/dist/collection/components/ai-route-decision/ai-route-decision.css +132 -0
  40. package/dist/collection/components/ai-route-decision/ai-route-decision.js +195 -0
  41. package/dist/collection/components/ai-suggestion/ai-suggestion.css +5 -11
  42. package/dist/collection/components/ai-suggestion/ai-suggestion.js +2 -2
  43. package/dist/collection/components/ai-voice-input/ai-voice-input.css +27 -22
  44. package/dist/collection/components/ai-voice-input/ai-voice-input.js +116 -20
  45. package/dist/collection/utils/icon-registry.js +24 -0
  46. package/dist/components/ai-card.js +1 -1
  47. package/dist/components/ai-chat-container.js +1 -1
  48. package/dist/components/ai-chat-header.js +1 -1
  49. package/dist/components/ai-chat-message.js +2 -1
  50. package/dist/components/ai-conversation-list.d.ts +11 -0
  51. package/dist/components/ai-conversation-list.js +1 -0
  52. package/dist/components/ai-conversation-summary.d.ts +11 -0
  53. package/dist/components/ai-conversation-summary.js +1 -0
  54. package/dist/components/ai-icon.js +1 -1
  55. package/dist/components/ai-link.js +1 -1
  56. package/dist/components/ai-loading.js +1 -1
  57. package/dist/components/ai-message-input.js +1 -1
  58. package/dist/components/ai-rating.js +1 -1
  59. package/dist/components/ai-route-decision.d.ts +11 -0
  60. package/dist/components/ai-route-decision.js +1 -0
  61. package/dist/components/ai-suggestion.js +1 -1
  62. package/dist/components/ai-voice-input.js +1 -1
  63. package/dist/components/index.js +1 -1
  64. package/dist/components/p-CX1Yp79q.js +1 -0
  65. package/dist/components/p-DnO4dikr.js +1 -0
  66. package/dist/components/{p-CY6emva2.js → p-Dr2tAPV7.js} +1 -1
  67. package/dist/{ui-ai-kit/p-DYv5ef4M.js → components/p-SJZ6Ujn9.js} +1 -1
  68. package/dist/esm/ai-card.entry.js +2 -2
  69. package/dist/esm/ai-chat-container.entry.js +84 -57
  70. package/dist/esm/ai-chat-header.entry.js +29 -19
  71. package/dist/esm/ai-chat-message.entry.js +1456 -21
  72. package/dist/esm/ai-conversation-list.entry.js +78 -0
  73. package/dist/esm/ai-conversation-summary.entry.js +31 -0
  74. package/dist/esm/ai-icon.entry.js +2 -2
  75. package/dist/esm/ai-link.entry.js +4 -4
  76. package/dist/esm/ai-loading.entry.js +35 -22
  77. package/dist/esm/ai-message-input.entry.js +48 -15
  78. package/dist/esm/ai-rating.entry.js +2 -2
  79. package/dist/esm/ai-route-decision.entry.js +46 -0
  80. package/dist/esm/ai-suggestion.entry.js +4 -4
  81. package/dist/esm/ai-voice-input.entry.js +75 -21
  82. package/dist/esm/{icon-registry-DYv5ef4M.js → icon-registry-SJZ6Ujn9.js} +24 -0
  83. package/dist/esm/{index-7hrZ8FOQ.js → index-B0yIzgh4.js} +1 -1
  84. package/dist/esm/loader.js +3 -3
  85. package/dist/esm/ui-ai-kit.js +3 -3
  86. package/dist/types/components/ai-chat-container/ai-chat-container.d.ts +11 -1
  87. package/dist/types/components/ai-chat-header/ai-chat-header.d.ts +7 -2
  88. package/dist/types/components/ai-conversation-list/ai-conversation-list.d.ts +24 -0
  89. package/dist/types/components/ai-conversation-summary/ai-conversation-summary.d.ts +12 -0
  90. package/dist/types/components/ai-loading/ai-loading.d.ts +12 -6
  91. package/dist/types/components/ai-message-input/ai-message-input.d.ts +17 -3
  92. package/dist/types/components/ai-route-decision/ai-route-decision.d.ts +21 -0
  93. package/dist/types/components/ai-voice-input/ai-voice-input.d.ts +7 -0
  94. package/dist/types/components.d.ts +335 -11
  95. package/dist/types/index.d.ts +2 -0
  96. package/dist/types/utils/icon-registry.d.ts +1 -1
  97. package/dist/ui-ai-kit/p-2955439f.entry.js +1 -0
  98. package/dist/ui-ai-kit/p-5c9e9822.entry.js +1 -0
  99. package/dist/ui-ai-kit/p-5caf1c38.entry.js +1 -0
  100. package/dist/ui-ai-kit/p-74c5c83f.entry.js +1 -0
  101. package/dist/ui-ai-kit/p-76195745.entry.js +1 -0
  102. package/dist/ui-ai-kit/p-79c78d8e.entry.js +1 -0
  103. package/dist/ui-ai-kit/p-87e9739b.entry.js +1 -0
  104. package/dist/ui-ai-kit/p-9c4c6c01.entry.js +1 -0
  105. package/dist/ui-ai-kit/p-B0yIzgh4.js +2 -0
  106. package/dist/{components/p-DYv5ef4M.js → ui-ai-kit/p-SJZ6Ujn9.js} +1 -1
  107. package/dist/ui-ai-kit/p-a099fcfb.entry.js +1 -0
  108. package/dist/ui-ai-kit/p-b28af13a.entry.js +1 -0
  109. package/dist/ui-ai-kit/p-d1bb1ad0.entry.js +1 -0
  110. package/dist/ui-ai-kit/p-eb0c7e7a.entry.js +1 -0
  111. package/dist/ui-ai-kit/{p-455daa17.entry.js → p-eec6f083.entry.js} +1 -1
  112. package/dist/ui-ai-kit/p-ef07638f.entry.js +2 -0
  113. package/dist/ui-ai-kit/ui-ai-kit.css +1 -1
  114. package/dist/ui-ai-kit/ui-ai-kit.esm.js +1 -1
  115. package/package.json +5 -13
  116. package/dist/collection/components/ai-card/ai-card.stories.js +0 -52
  117. package/dist/collection/components/ai-chat-container/ai-chat-container.stories.js +0 -160
  118. package/dist/collection/components/ai-chat-header/ai-chat-header.stories.js +0 -138
  119. package/dist/collection/components/ai-chat-message/ai-chat-message.stories.js +0 -164
  120. package/dist/collection/components/ai-link/ai-link.stories.js +0 -79
  121. package/dist/collection/components/ai-loading/ai-loading.stories.js +0 -145
  122. package/dist/collection/components/ai-message-input/ai-message-input.stories.js +0 -125
  123. package/dist/collection/components/ai-rating/ai-rating.stories.js +0 -78
  124. package/dist/collection/components/ai-suggestion/ai-suggestion.stories.js +0 -62
  125. package/dist/collection/components/ai-voice-input/ai-voice-input.stories.js +0 -118
  126. package/dist/components/p-CWjXxYJI.js +0 -1
  127. package/dist/types/components/ai-card/ai-card.stories.d.ts +0 -7
  128. package/dist/types/components/ai-chat-container/ai-chat-container.stories.d.ts +0 -7
  129. package/dist/types/components/ai-chat-header/ai-chat-header.stories.d.ts +0 -8
  130. package/dist/types/components/ai-chat-message/ai-chat-message.stories.d.ts +0 -10
  131. package/dist/types/components/ai-link/ai-link.stories.d.ts +0 -8
  132. package/dist/types/components/ai-loading/ai-loading.stories.d.ts +0 -10
  133. package/dist/types/components/ai-message-input/ai-message-input.stories.d.ts +0 -13
  134. package/dist/types/components/ai-rating/ai-rating.stories.d.ts +0 -8
  135. package/dist/types/components/ai-suggestion/ai-suggestion.stories.d.ts +0 -8
  136. package/dist/types/components/ai-voice-input/ai-voice-input.stories.d.ts +0 -9
  137. package/dist/ui-ai-kit/p-11facfad.entry.js +0 -1
  138. package/dist/ui-ai-kit/p-128a2ed4.entry.js +0 -1
  139. package/dist/ui-ai-kit/p-227bdb8f.entry.js +0 -1
  140. package/dist/ui-ai-kit/p-56163e8c.entry.js +0 -1
  141. package/dist/ui-ai-kit/p-6d21d0fd.entry.js +0 -1
  142. package/dist/ui-ai-kit/p-6ddcd77b.entry.js +0 -1
  143. package/dist/ui-ai-kit/p-7hrZ8FOQ.js +0 -2
  144. package/dist/ui-ai-kit/p-8e90143e.entry.js +0 -1
  145. package/dist/ui-ai-kit/p-9938c277.entry.js +0 -1
  146. package/dist/ui-ai-kit/p-dc5b4a7f.entry.js +0 -1
  147. package/dist/ui-ai-kit/p-fb1702de.entry.js +0 -1
@@ -0,0 +1,78 @@
1
+ import { r as registerInstance, c as createEvent, h, H as Host } from './index-B0yIzgh4.js';
2
+ import { i as iconRegistry } from './icon-registry-SJZ6Ujn9.js';
3
+
4
+ const aiConversationListCss = () => `:host{display:block;height:100%}.conversation-list{display:flex;flex-direction:column;gap:8px;height:100%;background:var(--ai-bg-surface)}.list-scroll{flex:1;overflow-y:auto;padding:0 8px 12px;scrollbar-width:thin;scrollbar-color:var(--ai-scrollbar-thumb) var(--ai-scrollbar-track)}.list-scroll::-webkit-scrollbar{width:4px}.list-scroll::-webkit-scrollbar-track{background:var(--ai-scrollbar-track)}.list-scroll::-webkit-scrollbar-thumb{background:var(--ai-scrollbar-thumb);border-radius:4px}.conv-item{display:flex;align-items:flex-start;gap:6px;margin-top:6px;padding:10px 10px 10px 6px;border-radius:10px;cursor:pointer;transition:background 0.15s;position:relative}.conv-item:hover{background:var(--ai-bg-card)}.conv-item--active{background:var(--ai-bg-card);box-shadow:var(--ai-shadow-sm)}.conv-item__body{flex:1;min-width:0}.conv-item__title{margin:0 0 3px;font-size:13px;font-weight:600;color:var(--ai-text-primary);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.conv-item__preview{margin:0 0 5px;font-size:12px;color:var(--ai-text-muted);line-height:1.45;display:-webkit-box;-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.conv-item__meta{display:flex;align-items:center;gap:8px}.conv-item__time{font-size:11px;color:var(--ai-text-muted);flex-shrink:0}.rating-dots{display:flex;align-items:center;gap:3px}.rating-dot{width:6px;height:6px;border-radius:50%;background:var(--ai-border-default);transition:background 0.15s}.rating-dot--filled{background:var(--ai-accent-warning, #ffaf44)}.delete-btn{flex-shrink:0;display:flex;align-items:center;justify-content:center;width:24px;height:24px;padding:0;background:transparent;border:none;border-radius:6px;cursor:pointer;color:var(--ai-text-muted);opacity:0;transition:opacity 0.15s, background 0.15s, color 0.15s;margin-block-start:2px}.conv-item:hover .delete-btn,.conv-item--active .delete-btn{opacity:1}.delete-btn:hover{background:var(--ai-status-danger-bg, rgba(239, 68, 68, 0.1));color:var(--ai-status-danger, #ef4444)}.delete-btn .icon-wrap{display:inline-flex;align-items:center;line-height:0}.skeleton-list{display:flex;flex-direction:column;gap:4px}.skeleton-item{padding:10px;border-radius:10px;display:flex;flex-direction:column;gap:6px}.skeleton-line{border-radius:6px;background:var(--ai-shimmer-gradient);background-size:200% 100%;animation:shimmer 2s linear infinite;height:12px}.skeleton-line--title{width:65%;height:13px}.skeleton-line--preview{width:100%}.skeleton-line--meta{width:35%;height:10px}@keyframes shimmer{0%{background-position:200% 0}100%{background-position:-200% 0}}`;
5
+
6
+ const AiConversationList = class {
7
+ constructor(hostRef) {
8
+ registerInstance(this, hostRef);
9
+ this.conversationSelect = createEvent(this, "conversationSelect");
10
+ this.conversationDelete = createEvent(this, "conversationDelete");
11
+ }
12
+ /** JSON array of ConversationItem */
13
+ items = '[]';
14
+ /** ID of the currently active conversation */
15
+ activeId = '';
16
+ /** Show skeleton loading state */
17
+ loading = false;
18
+ conversationSelect;
19
+ conversationDelete;
20
+ renderIcon(name, width, height) {
21
+ const icon = iconRegistry[name];
22
+ if (!icon)
23
+ return null;
24
+ const svg = `<svg width="${width}" height="${height}" viewBox="${icon.viewBox}" fill="none" xmlns="http://www.w3.org/2000/svg">${icon.content}</svg>`;
25
+ return h("span", { class: "icon-wrap", innerHTML: svg });
26
+ }
27
+ getItems() {
28
+ try {
29
+ return JSON.parse(this.items) || [];
30
+ }
31
+ catch {
32
+ return [];
33
+ }
34
+ }
35
+ formatRelativeTime(timestamp) {
36
+ try {
37
+ const date = new Date(timestamp);
38
+ const diffMs = Date.now() - date.getTime();
39
+ const diffMin = Math.floor(diffMs / 60000);
40
+ const diffHour = Math.floor(diffMin / 60);
41
+ const diffDay = Math.floor(diffHour / 24);
42
+ const lang = (typeof document !== 'undefined' && document.documentElement.lang) || 'ar';
43
+ const rtf = new Intl.RelativeTimeFormat(lang, { numeric: 'auto' });
44
+ if (diffMin < 1)
45
+ return rtf.format(0, 'second');
46
+ if (diffMin < 60)
47
+ return rtf.format(-diffMin, 'minute');
48
+ if (diffHour < 24)
49
+ return rtf.format(-diffHour, 'hour');
50
+ return rtf.format(-diffDay, 'day');
51
+ }
52
+ catch {
53
+ return '';
54
+ }
55
+ }
56
+ renderRatingDots(rating) {
57
+ const total = 5;
58
+ return (h("div", { class: "rating-dots", "aria-label": rating ? `تقييم ${rating} من 5` : undefined }, Array.from({ length: total }, (_, i) => (h("span", { class: `rating-dot ${i < (rating ?? 0) ? 'rating-dot--filled' : ''}` })))));
59
+ }
60
+ renderSkeleton() {
61
+ return (h("div", { class: "skeleton-list" }, [1, 2, 3, 4].map(i => (h("div", { key: i, class: "skeleton-item" }, h("div", { class: "skeleton-line skeleton-line--title" }), h("div", { class: "skeleton-line skeleton-line--preview" }), h("div", { class: "skeleton-line skeleton-line--meta" }))))));
62
+ }
63
+ render() {
64
+ const list = this.getItems();
65
+ return (h(Host, { key: '4baef00dae7b30e73168684fce1dc512c35e8855' }, h("div", { key: '4da38479ba7a29b4f8d95aca4f9c0644361eb486', class: "conversation-list" }, h("div", { key: '671e0f54f45ceae32ce4424c1aa4bc72eed851e0', class: "list-scroll", role: "list" }, this.loading
66
+ ? this.renderSkeleton()
67
+ : list.map(item => {
68
+ const isActive = item.id === this.activeId;
69
+ return (h("div", { key: item.id, class: { 'conv-item': true, 'conv-item--active': isActive }, role: "listitem", "aria-current": isActive ? 'true' : undefined, onClick: () => this.conversationSelect.emit(item.id) }, h("div", { class: "conv-item__body" }, h("p", { class: "conv-item__title" }, item.title), h("p", { class: "conv-item__preview" }, item.preview), h("div", { class: "conv-item__meta" }, h("span", { class: "conv-item__time" }, this.formatRelativeTime(item.timestamp)), item.rating != null && this.renderRatingDots(item.rating))), h("button", { class: "delete-btn", "aria-label": "\u062D\u0630\u0641 \u0627\u0644\u0645\u062D\u0627\u062F\u062B\u0629", onClick: e => {
70
+ e.stopPropagation();
71
+ this.conversationDelete.emit(item.id);
72
+ } }, this.renderIcon('cancel', 14, 14))));
73
+ })))));
74
+ }
75
+ };
76
+ AiConversationList.style = aiConversationListCss();
77
+
78
+ export { AiConversationList as ai_conversation_list };
@@ -0,0 +1,31 @@
1
+ import { r as registerInstance, h, H as Host } from './index-B0yIzgh4.js';
2
+ import { i as iconRegistry } from './icon-registry-SJZ6Ujn9.js';
3
+
4
+ const aiConversationSummaryCss = () => `:host{display:block}.icon-wrap{display:inline-flex;align-items:center;justify-content:center;line-height:0}.summary-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}@keyframes fade-in{from{opacity:0;transform:translateY(4px)}to{opacity:1;transform:translateY(0)}}.summary-header{display:flex;align-items:center;gap:8px;padding:14px 16px;border-bottom:1px solid var(--ai-border-default)}.sparkle-avatar{width:24px;height:24px;border-radius:9999px;background:var(--ai-bg-surface);box-shadow:var(--ai-shadow-inner);display:flex;align-items:center;justify-content:center;flex-shrink:0;color:var(--ai-amber)}.summary-title{font-size:15px;font-weight:500;color:var(--ai-text-primary);flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.summary-badges{display:inline-flex;align-items:center;gap:6px;flex-shrink:0}.badge{display:inline-flex;align-items:center;gap:3px;font-size:11px;font-weight:500;color:var(--ai-accent-dark);background:var(--ai-accent-bg);padding:2px 8px;border-radius:9999px;white-space:nowrap}.lang-badge{color:var(--ai-text-secondary);background:var(--ai-bg-surface)}.summary-body{margin:0;padding:12px 16px;font-size:14px;color:var(--ai-text-secondary);line-height:1.6;border-bottom:1px solid var(--ai-border-default)}.summary-slot{padding:12px 16px}.summary-slot:empty{display:none}`;
5
+
6
+ const AiConversationSummary = class {
7
+ constructor(hostRef) {
8
+ registerInstance(this, hostRef);
9
+ }
10
+ /** Card heading */
11
+ conversation = 'ملخص المحادثة';
12
+ /** Summary body text */
13
+ summary = '';
14
+ /** Total message count shown as a badge */
15
+ messageCount = 0;
16
+ /** Conversation language label */
17
+ language = '';
18
+ renderIcon(name, width, height) {
19
+ const icon = iconRegistry[name];
20
+ if (!icon)
21
+ return null;
22
+ const svg = `<svg width="${width}" height="${height}" viewBox="${icon.viewBox}" fill="none" xmlns="http://www.w3.org/2000/svg">${icon.content}</svg>`;
23
+ return h("span", { class: "icon-wrap", innerHTML: svg });
24
+ }
25
+ render() {
26
+ return (h(Host, { key: 'ba825419953fd661993da1d66225739ebef76d74' }, h("div", { key: 'fe04fdadafde04a068c26b312f806d072d8d1bf7', class: "summary-card" }, h("div", { key: '4f3ec735cb2ac9dcd6a2f9692e1e4969a39a0131', class: "summary-header" }, h("div", { key: '4ba618456b44073d8ac93d79c29818fb9252b822', class: "sparkle-avatar" }, this.renderIcon('sparkle', 14, 14)), h("span", { key: 'bf6d22cfc8c5fc40b0199f46b36fcaceca8dc944', class: "summary-title" }, this.conversation), h("div", { key: '2a96497dcaa02da9e6f8a2bdcd3ec9f0e2f78b57', class: "summary-badges" }, this.messageCount > 0 && (h("span", { key: '679c9d24f8d34fc0d5b4dfe0c7ef1f5564c7eff9', class: "badge" }, this.renderIcon('list', 12, 12), this.messageCount)), this.language && (h("span", { key: '8a0f13ed6d7ec584ed22c9316af2758cb1ea5b24', class: "badge lang-badge" }, this.language)))), this.summary && (h("p", { key: '5a51b1b00c35daf289690c526de3525c9de40f7e', class: "summary-body", ref: el => el && (el.textContent = this.summary) })), h("div", { key: 'ccbb381d21d7c3e6ac8ebddc4a9a3ed26e1aa874', class: "summary-slot" }, h("slot", { key: '58a86a50dcef6c5d2534e664d309c194eb5c89df' })))));
27
+ }
28
+ };
29
+ AiConversationSummary.style = aiConversationSummaryCss();
30
+
31
+ export { AiConversationSummary as ai_conversation_summary };
@@ -1,5 +1,5 @@
1
- import { r as registerInstance, h, H as Host } from './index-7hrZ8FOQ.js';
2
- import { i as iconRegistry } from './icon-registry-DYv5ef4M.js';
1
+ import { r as registerInstance, h, H as Host } from './index-B0yIzgh4.js';
2
+ import { i as iconRegistry } from './icon-registry-SJZ6Ujn9.js';
3
3
 
4
4
  const aiIconCss = () => `:host{display:inline-flex;align-items:center;justify-content:center}svg{display:block}`;
5
5
 
@@ -1,7 +1,7 @@
1
- import { r as registerInstance, h, H as Host } from './index-7hrZ8FOQ.js';
2
- import { i as iconRegistry } from './icon-registry-DYv5ef4M.js';
1
+ import { r as registerInstance, h, H as Host } from './index-B0yIzgh4.js';
2
+ import { i as iconRegistry } from './icon-registry-SJZ6Ujn9.js';
3
3
 
4
- const aiLinkCss = () => `:host{--ai-link-color:var(--ai-accent-dark);--ai-link-color-hover:var(--ai-accent-dark);--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);direction:rtl;font-family:var(--ai-font-family, 'PingARLT', sans-serif)}.link{display:inline-flex;align-items:center;justify-content:flex-end;gap:var(--ai-link-gap);color:var(--ai-link-color);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-link-color-hover);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-link-color);font-weight:bold}`;
4
+ const aiLinkCss = () => `: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}`;
5
5
 
6
6
  const AiLink = class {
7
7
  constructor(hostRef) {
@@ -24,7 +24,7 @@ const AiLink = class {
24
24
  }
25
25
  render() {
26
26
  const rel = this.rel || (this.target === '_blank' ? 'noopener noreferrer' : undefined);
27
- return (h(Host, { key: '58a742b11ef7dcc1094031e804be6032311cea9d' }, h("span", { key: 'bf45468deb328c2d8ed70ac299d36968c16ababe', class: "link__label" }, this.label, h("slot", { key: 'bd43bc12d120ab806c895922ede0a08d4ec2f882' })), h("a", { key: 'b7c75a59bf18b1f1dc2e713b9e78c045afaa82e2', class: "link", href: this.href, target: this.target, rel: rel }, this.renderShareIcon())));
27
+ return (h(Host, { key: 'c35f0fd1f17170d32846ebf7066177ca3a6b68f1' }, h("span", { key: '34c01b7fa4122659ca01402c76a67dbca5878ffe', class: "link__label" }, this.label, h("slot", { key: 'd9dd28b4bfba8c1cb5e6f977262942daf504fdc8' })), h("a", { key: 'b4da5e53ee8df0b40417c0d0a80a9647ae0b93d2', class: "link", href: this.href, target: this.target, rel: rel }, this.renderShareIcon())));
28
28
  }
29
29
  };
30
30
  AiLink.style = aiLinkCss();
@@ -1,7 +1,7 @@
1
- import { r as registerInstance, c as createEvent, h, H as Host } from './index-7hrZ8FOQ.js';
2
- import { i as iconRegistry } from './icon-registry-DYv5ef4M.js';
1
+ import { r as registerInstance, c as createEvent, h, H as Host } from './index-B0yIzgh4.js';
2
+ import { i as iconRegistry } from './icon-registry-SJZ6Ujn9.js';
3
3
 
4
- const aiLoadingCss = () => `:host{display:block;direction:rtl}.icon-wrap{display:inline-flex;align-items:center;justify-content:center;line-height:0}.sparkle-avatar{width:24px;height:24px;border-radius:9999px;background:var(--ai-bg-card, #FCFCFC);box-shadow:inset 0px 0px 3px 1px rgba(18, 18, 23, 0.06);display:flex;align-items:center;justify-content:center;flex-shrink:0;color:var(--ai-amber)}.thinking-row{display:inline-flex;align-items:center;gap:8px;flex-direction:row}@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, linear-gradient(90deg, #737373 0%, #c5c5c5 50%, #737373 100%));background-size:200% auto;-webkit-background-clip:text;-webkit-text-fill-color:transparent;background-clip:text;animation:shimmer 2s linear infinite}.steps-card{background:var(--ai-bg-card, #ffffff);border:1px solid var(--ai-border-default, #eeeeee);border-radius:16px;box-shadow:0px 1px 2px 0px rgba(18, 18, 23, 0.05);overflow:hidden}.steps-header{padding:16px;display:flex;align-items:center;gap:8px;border-bottom:1px solid var(--ai-border-default, #eeeeee)}.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, #333333);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}.collapse-btn{display:inline-flex;align-items:center;justify-content:center;background:none;border:none;padding:0;cursor:pointer;color:var(--ai-text-secondary, #737373);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}.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, #333333)}.step-text{flex:1;font-size:14px;font-weight:400;color:var(--ai-text-secondary, #737373);line-height:1.5;padding-top:4px}.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, #eeeeee);margin:2px 0}.step-badge-outer{padding:2px;border-radius:9999px;background:var(--ai-bg-surface, #f4f4f4);display:inline-flex;align-items:center;justify-content:center}.step-badge-inner{width:26px;height:26px;border-radius:9999px;background:var(--ai-bg-card, #ffffff);box-shadow:0px 0px 2px 1px rgba(18, 18, 23, 0.08);display:flex;align-items:center;justify-content:center;color:var(--ai-text-secondary, #737373)}.step-badge-inner.completed{background:var(--ai-success-bg);color:var(--ai-success-text)}.step-number{font-size:14px;font-weight:500;color:var(--ai-text-secondary, #737373);line-height:1}`;
4
+ const aiLoadingCss = () => `: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}`;
5
5
 
6
6
  const AiLoading = class {
7
7
  constructor(hostRef) {
@@ -13,10 +13,16 @@ const AiLoading = class {
13
13
  mode = 'thinking';
14
14
  /** Thinking mode status text */
15
15
  statusText = 'جاري التفكير...';
16
+ /** Secondary shimmer line in thinking mode (e.g. live node name) */
17
+ thinkingSubtext = '';
16
18
  /** Steps as JSON string array of LoadingStep */
17
- steps = '[]';
19
+ steps = [];
18
20
  /** Steps mode title */
19
21
  headerTitle = 'خطة التنفيذ';
22
+ /** Agent name shown in header alongside sparkle */
23
+ currentAgent = '';
24
+ /** Show per-step agent chips */
25
+ showAgentBadges = false;
20
26
  /** Steps mode expand state */
21
27
  expanded = true;
22
28
  /** Whether steps card is collapsible */
@@ -34,20 +40,16 @@ const AiLoading = class {
34
40
  const svg = `<svg width="${width}" height="${height}" viewBox="${icon.viewBox}" fill="none" xmlns="http://www.w3.org/2000/svg">${icon.content}</svg>`;
35
41
  return h("span", { class: "icon-wrap", innerHTML: svg });
36
42
  }
37
- renderSparkleAvatar() {
38
- return h("div", { class: "sparkle-avatar" }, this.renderIcon('sparkle', 14, 14));
43
+ renderSparkleAvatar(agentName) {
44
+ return (h("div", { class: "sparkle-avatar-wrap" }, h("div", { class: "sparkle-avatar" }, this.renderIcon('sparkle', 14, 14)), agentName && h("span", { class: "header-agent" }, agentName)));
39
45
  }
40
46
  renderStepBadge(step, index) {
41
- const isCompleted = step.status === 'completed';
42
- return (h("div", { class: "step-badge-outer" }, h("div", { class: `step-badge-inner ${isCompleted ? 'completed' : ''}` }, isCompleted ? this.renderIcon('check', 14, 14) : h("span", { class: "step-number" }, index + 1))));
43
- }
44
- getStepsList() {
45
- try {
46
- return JSON.parse(this.steps) || [];
47
- }
48
- catch {
49
- return [];
50
- }
47
+ const { status } = step;
48
+ const isCompleted = status === 'completed';
49
+ const isExecuting = status === 'executing';
50
+ const isFailed = status === 'failed';
51
+ const inner = (h("div", { class: `step-badge-inner ${isCompleted ? 'completed' : ''} ${isExecuting ? 'executing' : ''} ${isFailed ? 'failed' : ''}` }, isCompleted && this.renderIcon('check', 14, 14), isFailed && this.renderIcon('cancel', 14, 14), isExecuting && this.renderIcon('list', 14, 14), !isCompleted && !isFailed && !isExecuting && h("span", { class: "step-number" }, index + 1)));
52
+ return h("div", { class: `step-badge-outer ${isExecuting ? 'pulse-ring' : ''}` }, inner);
51
53
  }
52
54
  handleToggle() {
53
55
  if (!this.collapsible)
@@ -57,17 +59,28 @@ const AiLoading = class {
57
59
  this.toggleExpand.emit(this._expanded);
58
60
  }
59
61
  renderThinkingMode() {
60
- return (h("div", { class: "thinking-row" }, this.renderSparkleAvatar(), h("span", { class: "shimmer-text" }, this.statusText)));
62
+ return (h("div", { class: "thinking-row" }, this.renderSparkleAvatar(), h("div", { class: "thinking-col" }, h("span", { class: "shimmer-text" }, this.statusText), this.thinkingSubtext && h("span", { class: "shimmer-text subtext" }, this.thinkingSubtext))));
63
+ }
64
+ renderPlanningShimmer() {
65
+ return (h("div", { class: "steps-body" }, h("div", { class: "thinking-row planning-shimmer" }, h("div", { class: "sparkle-avatar" }, this.renderIcon('sparkle', 14, 14)), h("span", { class: "shimmer-text" }, "\u062C\u0627\u0631\u064A \u0627\u0644\u062A\u062E\u0637\u064A\u0637..."))));
61
66
  }
62
67
  renderStepsMode() {
63
- const stepsList = this.getStepsList();
64
- const completedCount = stepsList.filter(s => s.status === 'completed').length;
65
- const total = stepsList.length;
68
+ const completedCount = this.steps.filter(s => s.status === 'completed').length;
69
+ const total = this.steps.length;
66
70
  const allDone = total > 0 && completedCount === total;
67
- return (h("div", { class: "steps-card" }, h("div", { class: `steps-header ${this.collapsible ? 'collapsible' : ''}`, onClick: () => this.handleToggle() }, this.renderSparkleAvatar(), h("div", { class: "steps-header-center" }, h("span", { class: "steps-title" }, this.headerTitle), total > 0 && h("span", { class: "progress-badge" }, allDone ? 'مكتمل' : `${completedCount}/${total}`)), this.collapsible && h("button", { class: `collapse-btn ${this._expanded ? 'expanded' : ''}` }, this.renderIcon('chevron-down', 20, 20))), this._expanded && stepsList.length > 0 && (h("div", { class: "steps-body" }, stepsList.map((step, i) => (h("div", { class: "step-row", onClick: () => this.stepClick.emit(step) }, h("div", { class: "step-badge-col" }, this.renderStepBadge(step, i), i < stepsList.length - 1 && h("div", { class: "step-separator" })), h("span", { class: "step-text" }, step.title))))))));
71
+ const executingStep = this.steps.find(s => s.status === 'executing');
72
+ const headerBadge = () => {
73
+ if (total === 0)
74
+ return null;
75
+ if (!this._expanded && executingStep) {
76
+ return h("span", { class: "progress-badge executing-title" }, executingStep.action);
77
+ }
78
+ return h("span", { class: "progress-badge" }, allDone ? 'مكتمل' : `${completedCount}/${total}`);
79
+ };
80
+ return (h("div", { class: "steps-card" }, h("div", { class: `steps-header ${this.collapsible ? 'collapsible' : ''}`, onClick: () => this.handleToggle() }, this.renderSparkleAvatar(this.currentAgent || undefined), h("div", { class: "steps-header-center" }, h("span", { class: "steps-title" }, this.headerTitle), headerBadge()), this.collapsible && h("button", { class: `collapse-btn ${this._expanded ? 'expanded' : ''}` }, this.renderIcon('chevron-down', 20, 20))), this._expanded && total === 0 && this.renderPlanningShimmer(), this._expanded && total > 0 && (h("div", { class: "steps-body" }, this.steps.map((step, i) => (h("div", { class: `step-row ${step.status}`, onClick: () => this.stepClick.emit(step) }, h("div", { class: "step-badge-col" }, this.renderStepBadge(step, i), i < this.steps.length - 1 && h("div", { class: "step-separator" })), h("div", { class: "step-content" }, h("span", { class: "step-text" }, step.action), step.reason && h("span", { class: "step-description" }, step.reason)))))))));
68
81
  }
69
82
  render() {
70
- return h(Host, { key: '8a994758abe21c8a333088eeda498d158631bae6' }, this.mode === 'thinking' ? this.renderThinkingMode() : this.renderStepsMode());
83
+ return h(Host, { key: 'da2c7fad8bbf4e572972a9b8308204cecb91dd63' }, this.mode === 'thinking' ? this.renderThinkingMode() : this.renderStepsMode());
71
84
  }
72
85
  };
73
86
  AiLoading.style = aiLoadingCss();
@@ -1,12 +1,12 @@
1
- import { r as registerInstance, c as createEvent, a as getElement, h, H as Host } from './index-7hrZ8FOQ.js';
1
+ import { r as registerInstance, c as createEvent, a as getElement, h, H as Host } from './index-B0yIzgh4.js';
2
2
 
3
- const aiMessageInputCss = () => `:host{display:block;font-family:var(--ai-font-family, "PingARLT", sans-serif);width:100%;--ai-input-bg:var(--ai-bg-input, #ffffff);--ai-input-border-color:var(--ai-border-default, #eeeeee);--ai-input-text-color:var(--ai-text-primary, #333333);--ai-input-placeholder-color:var(--ai-text-secondary, #737373);--ai-voice-button-color:var(--ai-text-secondary, #737373);--ai-send-button-bg:var(--ai-border-default, #eeeeee);--ai-send-button-border:var(--ai-border-default, #eeeeee);--ai-send-button-color:var(--ai-text-secondary, #737373);--ai-send-button-active-color:var(--ai-text-primary, #333333)}.wrapper{position:relative;padding:var(--ai-input-wrapper-padding, 16px)}.glow{position:absolute;bottom:20px;left:39px;right:39px;height:29px;border-radius:9999px;background:var(--ai-input-glow);filter:blur(20px);opacity:0.9;pointer-events:none}.input-container{position:relative;background-color:var(--ai-input-bg, #ffffff);border-radius:var(--ai-input-border-radius, 9999px);border:1px solid var(--ai-input-border-color, #eeeeee);box-shadow:0 1px 2px 0 var(--ai-input-shadow-color, rgba(18, 18, 23, 0.05));padding:var(--ai-input-padding, 12px);overflow:hidden}.input-row{display:flex;align-items:center;gap:var(--ai-input-gap, 12px)}.actions{display:flex;align-items:center;gap:var(--ai-actions-gap, 8px);flex-shrink:0}.send-button{display:inline-flex;align-items:center;justify-content:center;gap:4px;min-height:32px;max-height:32px;padding:4px 8px;border-radius:32px;border:2px solid var(--ai-send-button-border, #eeeeee);background-color:var(--ai-send-button-bg, #eeeeee);color:var(--ai-send-button-color, #737373);cursor:not-allowed;transition:background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;flex-shrink:0}.send-button.active{background-color:var(--ai-send-button-active-bg, var(--ai-accent));border-color:var(--ai-send-button-active-border, var(--ai-accent));color:var(--ai-accent-text);cursor:pointer}.send-button.active:hover{background-color:var(--ai-send-button-active-hover-bg, var(--ai-accent));border-color:var(--ai-send-button-active-hover-border, var(--ai-accent))}.send-button:focus{outline:none}.voice-button{display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:32px;border:none;background-color:transparent;color:var(--ai-voice-button-color, #737373);cursor:pointer;transition:background-color 0.2s ease, color 0.2s ease;flex-shrink:0}.voice-button:hover:not(:disabled){background-color:var(--ai-voice-button-hover-bg, rgba(0, 0, 0, 0.06));color:var(--ai-voice-button-hover-color, var(--ai-text-secondary))}.voice-button:disabled{cursor:not-allowed;opacity:0.5}.voice-button:focus{outline:none;box-shadow:0 0 0 2px var(--ai-focus-ring-color, var(--ai-focus-ring))}.textarea{flex:1;resize:none;outline:none;border:none;background:transparent;font-size:var(--ai-input-font-size, 14px);line-height:var(--ai-input-line-height, 20px);color:var(--ai-input-text-color, #333333);font-family:inherit;min-height:20px;text-align:right;direction:rtl;padding:0;overflow:hidden}.textarea::placeholder{color:var(--ai-input-placeholder-color, #737373)}.textarea:disabled{cursor:not-allowed;opacity:0.6}.input-container:focus-within{border-color:var(--ai-input-focus-border-color, var(--ai-accent));box-shadow:0 0 10px 4px rgba(227, 255, 247, 0.4)}:host([disabled]) .wrapper{opacity:0.6;pointer-events:none}:host([dir='ltr']) .textarea{text-align:left;direction:ltr}`;
3
+ const aiMessageInputCss = () => `:host{display:block;width:100%}.wrapper{position:relative;padding:var(--Spacing-Sizes-lg, 12px)}.glow{position:absolute;bottom:20px;left:39px;right:39px;height:29px;border-radius:9999px;background:var(--ai-input-glow);filter:blur(20px);opacity:0.9;pointer-events:none}.input-container{position:relative;background-color:var(--ai-bg-input);border-radius:var(--ai-input-border-radius, 9999px);border:1px solid var(--ai-border-default);box-shadow:var(--ai-shadow-sm);padding:var(--ai-input-padding, 12px);overflow:hidden;transition:border-radius 0.15s ease}.input-container.multiline{border-radius:var(--ai-input-border-radius-multiline, 20px)}.input-row{display:flex;align-items:center;gap:var(--ai-input-gap, 12px)}.input-container.multiline .input-row{align-items:flex-end}.actions{display:flex;align-items:center;gap:var(--ai-actions-gap, 8px);flex-shrink:0}.send-button{display:inline-flex;align-items:center;justify-content:center;gap:4px;min-height:32px;max-height:32px;padding:4px 8px;border-radius:32px;border:2px solid var(--ai-border-default);background-color:var(--ai-border-default);color:var(--ai-text-secondary);cursor:not-allowed;transition:background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;flex-shrink:0}.send-button.active{background-color:var(--ai-send-button-active-bg, var(--ai-accent));border-color:var(--ai-send-button-active-border, var(--ai-accent));color:var(--ai-accent-text);cursor:pointer}.send-button.active:hover{background-color:var(--ai-send-button-active-hover-bg, var(--ai-accent));border-color:var(--ai-send-button-active-hover-border, var(--ai-accent))}.send-button:focus{outline:none;box-shadow:0 0 0 2px var(--ai-focus-ring-color, var(--ai-focus-ring))}.voice-button{display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:32px;border:none;background-color:transparent;color:var(--ai-text-secondary);cursor:pointer;transition:background-color 0.2s ease, color 0.2s ease;flex-shrink:0}.voice-button:hover:not(:disabled){background-color:var(--ai-hover-overlay);color:var(--ai-voice-button-hover-color, var(--ai-text-secondary))}.voice-button:disabled{cursor:not-allowed;opacity:0.5}.voice-button:focus{outline:none;box-shadow:0 0 0 2px var(--ai-focus-ring-color, var(--ai-focus-ring))}.textarea{flex:1;resize:none;outline:none;border:none;background:transparent;font-size:var(--ai-input-font-size, 14px);line-height:var(--ai-input-line-height, 20px);color:var(--ai-text-primary);font-family:inherit;min-height:20px;max-height:var(--ai-input-max-height, 120px);overflow-y:hidden;text-align:start;padding:0}.textarea::placeholder{color:var(--ai-text-secondary)}.textarea:disabled{cursor:not-allowed;opacity:0.6}.input-container:focus-within{border-color:var(--ai-input-focus-border-color, var(--ai-accent));box-shadow:var(--ai-input-focus-glow)}:host([disabled]) .wrapper{opacity:0.6;pointer-events:none}:host([disabled]) .glow{display:none}.char-counter{font-size:11px;color:var(--ai-text-secondary);flex-shrink:0;transition:color 0.2s ease}.char-counter.warning{color:var(--ai-voice-timer-warning-color, var(--ai-danger-text))}`;
4
4
 
5
5
  const MessageInput = class {
6
6
  constructor(hostRef) {
7
7
  registerInstance(this, hostRef);
8
8
  this.sendMessage = createEvent(this, "sendMessage");
9
- this.voiceButtonClick = createEvent(this, "voiceButtonClick");
9
+ this.voiceAudioReady = createEvent(this, "voiceAudioReady");
10
10
  }
11
11
  get el() { return getElement(this); }
12
12
  /** Placeholder text for the textarea */
@@ -15,21 +15,38 @@ const MessageInput = class {
15
15
  disabled = false;
16
16
  /** Whether to show the voice recording button */
17
17
  showVoiceButton = true;
18
+ /** Maximum characters allowed */
19
+ maxLength = 4000;
20
+ /** External prop to show/hide the inline voice recorder */
21
+ isRecording = false;
18
22
  inputValue = '';
23
+ showVoiceRecorder = false;
24
+ isMultiline = false;
19
25
  textareaRef;
20
26
  /** Event emitted when a message is sent */
21
27
  sendMessage;
22
- /** Event emitted when the voice button is clicked caller controls rendering the voice recorder */
23
- voiceButtonClick;
28
+ /** Event emitted when voice recording is complete and audio is ready */
29
+ voiceAudioReady;
30
+ onIsRecordingChange(newVal) {
31
+ this.showVoiceRecorder = newVal;
32
+ }
24
33
  /** Set the textarea value programmatically (e.g. after speech-to-text transcription) */
25
34
  async setInputValue(value) {
26
35
  this.inputValue = value;
27
36
  if (this.textareaRef) {
28
- this.textareaRef.style.height = 'auto';
29
- this.textareaRef.style.height = `${this.textareaRef.scrollHeight}px`;
37
+ // Set value imperatively before measuring to avoid stale scrollHeight from async render queue
38
+ this.textareaRef.value = value;
39
+ this.updateHeight();
30
40
  this.textareaRef.focus();
31
41
  }
32
42
  }
43
+ updateHeight = () => {
44
+ if (!this.textareaRef)
45
+ return;
46
+ this.textareaRef.style.height = 'auto';
47
+ this.textareaRef.style.height = `${this.textareaRef.scrollHeight}px`;
48
+ this.isMultiline = this.textareaRef.scrollHeight > 28;
49
+ };
33
50
  handleSendMessage = () => {
34
51
  if (!this.inputValue.trim() || this.disabled)
35
52
  return;
@@ -37,26 +54,42 @@ const MessageInput = class {
37
54
  this.inputValue = '';
38
55
  if (this.textareaRef) {
39
56
  this.textareaRef.style.height = 'auto';
57
+ this.isMultiline = false;
40
58
  }
41
59
  };
42
- handleKeyPress = (e) => {
60
+ handleKeyDown = (e) => {
43
61
  if (e.key === 'Enter' && !e.shiftKey) {
44
62
  e.preventDefault();
45
63
  this.handleSendMessage();
46
64
  }
47
65
  };
66
+ handleVoiceClick = () => {
67
+ this.showVoiceRecorder = true;
68
+ };
69
+ handleAudioRecorded = (e) => {
70
+ this.showVoiceRecorder = false;
71
+ this.voiceAudioReady.emit(e.detail);
72
+ };
73
+ handleRecordingCancel = () => {
74
+ this.showVoiceRecorder = false;
75
+ };
48
76
  handleInputChange = (e) => {
49
- const target = e.target;
50
- this.inputValue = target.value;
51
- if (this.textareaRef) {
52
- this.textareaRef.style.height = 'auto';
53
- this.textareaRef.style.height = `${this.textareaRef.scrollHeight}px`;
54
- }
77
+ this.inputValue = e.target.value;
78
+ this.updateHeight();
55
79
  };
56
80
  render() {
81
+ if (this.showVoiceRecorder) {
82
+ return (h(Host, null, h("ai-voice-input", { autoStart: true, onAudioRecorded: this.handleAudioRecorded, onRecordingCancel: this.handleRecordingCancel })));
83
+ }
57
84
  const canSend = !!this.inputValue.trim() && !this.disabled;
58
- return (h(Host, { key: '97dfe627b89657d36e4f7281a8bdb708cc913374' }, h("div", { key: 'a3efb2a0b95ec3a86cc5f575d0fdb2bb6dd2eb6c', part: "wrapper", class: "wrapper" }, h("div", { key: '5986fa2946a44757c143999a72b25ea3b6e7c336', part: "glow", class: "glow", "aria-hidden": "true" }), h("div", { key: 'd5b9d346495de00e8b0e0900ef3e766756844626', part: "container", class: "input-container" }, h("div", { key: '8313695b2e4d7557a5362e9b9d2a5c5803a4ec0c', class: "input-row" }, h("div", { key: '9c184f8097e28527b5d18fccf92010fb36b14a9c', class: "actions" }, h("button", { key: '39ad3feb24a53fd5a08e8a8388f7bcee71413a91', part: "send-button", class: `send-button${canSend ? ' active' : ''}`, onClick: this.handleSendMessage, disabled: !canSend, type: "button", "aria-label": "Send message" }, h("ai-icon", { key: '1fe555709288d33551696312fb3329b1c656d063', name: "send", size: 16 })), this.showVoiceButton && !this.inputValue && (h("button", { key: 'a7bcc3b9ca5f5e59c32a34ab33c2fbbd607bb298', part: "voice-button", class: "voice-button", onClick: () => this.voiceButtonClick.emit(), disabled: this.disabled, type: "button", "aria-label": "Record voice" }, h("ai-icon", { key: '98fea04c79e841e4a2b8ee50a480bb554212b055', name: "mic", size: 16 })))), h("textarea", { key: '798af74ca2298a31f37459dfa1c176182d740839', part: "textarea", ref: el => (this.textareaRef = el), value: this.inputValue, onInput: this.handleInputChange, onKeyPress: this.handleKeyPress, disabled: this.disabled, placeholder: this.placeholder, rows: 1, class: "textarea" }))))));
85
+ const remaining = this.maxLength - this.inputValue.length;
86
+ return (h(Host, null, h("div", { part: "wrapper", class: "wrapper" }, h("div", { part: "glow", class: "glow", "aria-hidden": "true" }), h("div", { part: "container", class: `input-container${this.isMultiline ? ' multiline' : ''}` }, h("div", { class: "input-row" }, h("textarea", { part: "textarea", ref: el => (this.textareaRef = el), value: this.inputValue, onInput: this.handleInputChange, onKeyDown: this.handleKeyDown, disabled: this.disabled, placeholder: this.placeholder, rows: 1, class: "textarea", maxLength: this.maxLength }), remaining < 200 && (h("span", { class: `char-counter${remaining < 50 ? ' warning' : ''}`, "aria-live": "polite" }, remaining)), h("div", { class: "actions" }, this.showVoiceButton && !this.inputValue && (h("button", { part: "voice-button", class: "voice-button", onClick: this.handleVoiceClick, disabled: this.disabled, type: "button", "aria-label": "Record voice" }, h("ai-icon", { name: "mic", size: 16 }))), h("button", { part: "send-button", class: `send-button${canSend ? ' active' : ''}`, onClick: this.handleSendMessage, disabled: !canSend, type: "button", "aria-label": "Send message" }, h("ai-icon", { name: "send", size: 16 }))))))));
59
87
  }
88
+ static get watchers() { return {
89
+ "isRecording": [{
90
+ "onIsRecordingChange": 0
91
+ }]
92
+ }; }
60
93
  };
61
94
  MessageInput.style = aiMessageInputCss();
62
95
 
@@ -1,6 +1,6 @@
1
- import { r as registerInstance, c as createEvent, h, H as Host } from './index-7hrZ8FOQ.js';
1
+ import { r as registerInstance, c as createEvent, h, H as Host } from './index-B0yIzgh4.js';
2
2
 
3
- const aiRatingCss = () => `:host{--ai-rating-question-color:var(--ai-text-primary, #333333);--ai-rating-subtitle-color:var(--ai-text-secondary, #737373);--ai-rating-question-size:16px;--ai-rating-subtitle-size:14px;--ai-rating-gap:8px;--ai-rating-emoji-size:24px;--ai-rating-btn-padding:6px;--ai-rating-btn-border:1px solid var(--ai-border-light, #f4f4f4);--ai-rating-btn-radius:9999px;--ai-rating-btn-bg-hover:var(--ai-bg-surface, #f9fafb);--ai-rating-btn-border-hover:1px solid var(--ai-border-default);--ai-rating-btn-bg-active:var(--ai-warning-bg, #fff9eb);--ai-rating-btn-border-active:1px solid var(--ai-warning-border, #ffaf44);--ai-rating-btn-shadow-active:0px 4px 6px -1px rgba(18, 18, 23, 0.08), 0px 2px 4px -1px rgba(18, 18, 23, 0.06);--ai-rating-label-color:var(--ai-text-primary, #333333);--ai-rating-label-size:16px;display:block;direction:rtl;font-family:var(--ai-font-family, "PingARLT", sans-serif)}.rating{display:flex;flex-direction:column;align-items:center;gap:var(--ai-rating-gap);width:100%}.rating__text{display:flex;flex-direction:column;align-items:center;gap:2px;width:100%;text-align:center}.rating__question{margin:0;font-size:var(--ai-rating-question-size);font-weight:500;line-height:24px;color:var(--ai-rating-question-color)}.rating__subtitle{margin:0;font-size:var(--ai-rating-subtitle-size);font-weight:400;line-height:20px;color:var(--ai-rating-subtitle-color)}.rating__icons{display:flex;align-items:center;justify-content:center;gap:10px;width:100%;flex-wrap:wrap}.emoji-btn{display:inline-flex;align-items:center;justify-content:center;padding:var(--ai-rating-btn-padding);border:var(--ai-rating-btn-border);border-radius:var(--ai-rating-btn-radius);background:transparent;cursor:pointer;transition:background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;outline:none}.emoji-btn:focus-visible{outline:2px solid var(--ai-warning-border);outline-offset:2px}.emoji-btn:hover:not(:disabled),.emoji-btn--hovered{background:var(--ai-rating-btn-bg-hover);border:var(--ai-rating-btn-border-hover);transform:scale(1.1)}.emoji-btn--active{background:var(--ai-rating-btn-bg-active) !important;border:var(--ai-rating-btn-border-active) !important;box-shadow:var(--ai-rating-btn-shadow-active);transform:scale(1.18) !important}.emoji-btn--disabled{opacity:0.45;cursor:not-allowed;pointer-events:none}.emoji-btn__icon{font-size:var(--ai-rating-emoji-size);line-height:1;display:inline-flex;align-items:center;justify-content:center;width:var(--ai-rating-emoji-size);height:var(--ai-rating-emoji-size);pointer-events:none}.rating__selected-label{margin:0;font-size:var(--ai-rating-label-size);font-weight:500;line-height:24px;color:var(--ai-rating-label-color);text-align:center;width:100%;animation:fadeIn 0.15s ease}@keyframes fadeIn{from{opacity:0;transform:translateY(4px)}to{opacity:1;transform:translateY(0)}}`;
3
+ const aiRatingCss = () => `:host{--ai-rating-question-size:16px;--ai-rating-subtitle-size:14px;--ai-rating-gap:8px;--ai-rating-emoji-size:24px;--ai-rating-btn-padding:6px;--ai-rating-btn-border:1px solid var(--ai-border-light);--ai-rating-btn-radius:9999px;--ai-rating-btn-bg-hover:var(--ai-bg-surface);--ai-rating-btn-border-hover:1px solid var(--ai-border-default);--ai-rating-btn-bg-active:var(--ai-warning-bg);--ai-rating-btn-border-active:1px solid var(--ai-warning-border);--ai-rating-btn-shadow-active:var(--ai-shadow-active);--ai-rating-label-size:16px;display:block}.rating{display:flex;flex-direction:column;align-items:center;gap:var(--ai-rating-gap);width:100%}.rating__text{display:flex;flex-direction:column;align-items:center;gap:2px;width:100%;text-align:center}.rating__question{margin:0;font-size:var(--ai-rating-question-size);font-weight:500;line-height:24px;color:var(--ai-text-primary)}.rating__subtitle{margin:0;font-size:var(--ai-rating-subtitle-size);font-weight:400;line-height:20px;color:var(--ai-text-secondary)}.rating__icons{display:flex;align-items:center;justify-content:center;gap:10px;width:100%;flex-wrap:wrap}.emoji-btn{display:inline-flex;align-items:center;justify-content:center;padding:var(--ai-rating-btn-padding);border:var(--ai-rating-btn-border);border-radius:var(--ai-rating-btn-radius);background:transparent;cursor:pointer;transition:background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;outline:none}.emoji-btn:focus-visible{outline:2px solid var(--ai-warning-border);outline-offset:2px}.emoji-btn:hover:not(:disabled),.emoji-btn--hovered{background:var(--ai-rating-btn-bg-hover);border:var(--ai-rating-btn-border-hover);transform:scale(1.1)}.emoji-btn--active{background:var(--ai-rating-btn-bg-active) !important;border:var(--ai-rating-btn-border-active) !important;box-shadow:var(--ai-rating-btn-shadow-active);transform:scale(1.18) !important}.emoji-btn--disabled{opacity:0.45;cursor:not-allowed;pointer-events:none}.emoji-btn__icon{font-size:var(--ai-rating-emoji-size);line-height:1;display:inline-flex;align-items:center;justify-content:center;width:var(--ai-rating-emoji-size);height:var(--ai-rating-emoji-size);pointer-events:none}.rating__selected-label{margin:0;font-size:var(--ai-rating-label-size);font-weight:500;line-height:24px;color:var(--ai-text-primary);text-align:center;width:100%;animation:fadeIn 0.15s ease}@keyframes fadeIn{from{opacity:0;transform:translateY(4px)}to{opacity:1;transform:translateY(0)}}`;
4
4
 
5
5
  const EMOJI_OPTIONS = [
6
6
  { value: 1, emoji: '😠', label: 'سيئ جداً' },
@@ -0,0 +1,46 @@
1
+ import { r as registerInstance, c as createEvent, h, H as Host } from './index-B0yIzgh4.js';
2
+ import { i as iconRegistry } from './icon-registry-SJZ6Ujn9.js';
3
+
4
+ const aiRouteDecisionCss = () => `:host{display:inline-block}.icon-wrap{display:inline-flex;align-items:center;justify-content:center;line-height:0}.route-pill{display:inline-flex;flex-direction:column;background:var(--ai-bg-card);border:1px solid var(--ai-border-default);border-radius:9999px;box-shadow:var(--ai-shadow-sm);overflow:hidden;transition:border-radius 0.2s ease}.route-pill.expanded{border-radius:12px}.route-pill-main{display:inline-flex;align-items:center;gap:6px;padding:6px 12px;background:none;border:none;cursor:pointer;color:var(--ai-text-primary);font-size:13px;font-weight:500;white-space:nowrap;width:100%}.route-icon{color:var(--ai-accent-dark);display:inline-flex;flex-shrink:0}.agent-label{display:inline-flex;align-items:center;gap:4px}.agent-emoji{font-size:14px;line-height:1}.confidence-badge{font-size:11px;font-weight:600;color:var(--ai-accent-dark);background:var(--ai-accent-bg);padding:1px 6px;border-radius:9999px}.expand-icon{display:inline-flex;margin-inline-start:auto;color:var(--ai-text-secondary);transition:transform 0.2s ease;transform:rotate(0deg)}.expand-icon.expanded{transform:rotate(90deg)}.route-details{display:flex;flex-direction:column;gap:8px;padding:8px 12px 12px;border-top:1px solid var(--ai-border-default);animation:fade-in 0.2s ease}@keyframes fade-in{from{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:translateY(0)}}.reason-text{margin:0;font-size:12px;color:var(--ai-text-secondary);line-height:1.5}.confidence-bar-wrap{height:4px;border-radius:9999px;background:var(--ai-border-default);overflow:hidden}.confidence-bar{height:100%;border-radius:9999px;background:var(--ai-accent-dark);transition:width 0.4s ease}.meta-row{display:inline-flex;align-items:center;gap:4px;color:var(--ai-text-secondary)}.lang-chip{font-size:11px;color:var(--ai-text-secondary)}`;
5
+
6
+ const AiRouteDecision = class {
7
+ constructor(hostRef) {
8
+ registerInstance(this, hostRef);
9
+ this.routeExpand = createEvent(this, "routeExpand");
10
+ }
11
+ /** Selected agent name */
12
+ selectedAgent = '';
13
+ /** Agent icon — emoji or short text displayed before the agent name */
14
+ agentIcon = '';
15
+ /** Reason for routing decision (shown when expanded) */
16
+ reason = '';
17
+ /** Routing confidence percentage 0–100 */
18
+ confidence = 0;
19
+ /** Detected language label (shown when expanded) */
20
+ detectedLanguage = '';
21
+ /** Initial expanded state */
22
+ expanded = false;
23
+ _expanded = false;
24
+ routeExpand;
25
+ componentWillLoad() {
26
+ this._expanded = this.expanded;
27
+ }
28
+ renderIcon(name, width, height) {
29
+ const icon = iconRegistry[name];
30
+ if (!icon)
31
+ return null;
32
+ const svg = `<svg width="${width}" height="${height}" viewBox="${icon.viewBox}" fill="none" xmlns="http://www.w3.org/2000/svg">${icon.content}</svg>`;
33
+ return h("span", { class: "icon-wrap", innerHTML: svg });
34
+ }
35
+ handleToggle() {
36
+ this._expanded = !this._expanded;
37
+ this.expanded = this._expanded;
38
+ this.routeExpand.emit(this._expanded);
39
+ }
40
+ render() {
41
+ return (h(Host, { key: 'a22239e1db9982a860bbd6242e5848c3cdfe57ce' }, h("div", { key: '21c447b12e737e77d67b33b10f82f727f10ef4e5', class: `route-pill ${this._expanded ? 'expanded' : ''}` }, h("button", { key: 'fe5c0f167cad2b2fa2549a03a87a32c848efc4c6', class: "route-pill-main", onClick: () => this.handleToggle() }, h("span", { key: 'a1a07c6f8f108e637a43424fa9cdb918e882db3a', class: "route-icon" }, this.renderIcon('route', 14, 14)), h("span", { key: '005662e7b00f47edf185a7806ca268c2b0e9e62a', class: "agent-label" }, this.agentIcon && h("span", { key: '9fbadba81754d515e156bfcfa4821f7e2cefc88b', class: "agent-emoji", "aria-hidden": "true" }, this.agentIcon), this.selectedAgent), this.confidence > 0 && (h("span", { key: 'c2acf259644e0c74264b535b5d34ea5a3b519797', class: "confidence-badge" }, this.confidence, "%")), h("span", { key: 'ac5d1ee27417d85c50a88adb297b493c83aa85bc', class: `expand-icon ${this._expanded ? 'expanded' : ''}` }, this.renderIcon('arrow-right', 12, 12))), this._expanded && (h("div", { key: 'dc1f297cdeede44b4e6b8a4888204eef2200bc72', class: "route-details" }, this.reason && h("p", { key: '7e819d2a6dceeb81d88282e7fcc927b9fe4219c2', class: "reason-text" }, this.reason), this.confidence > 0 && (h("div", { key: 'ec6cbaf221e0679241fc1f13066d542d5b64b9ef', class: "confidence-bar-wrap" }, h("div", { key: '84b3c99aa734308db8d9abd7674eb9f5ee22b17c', class: "confidence-bar", style: { width: `${this.confidence}%` } }))), this.detectedLanguage && (h("div", { key: 'e83127633ec30ea79446a3622f31428ed50ede4d', class: "meta-row" }, this.renderIcon('list', 12, 12), h("span", { key: '1547936eaa529d999b9d0b9dc3421bff2e20937a', class: "lang-chip" }, this.detectedLanguage))))))));
42
+ }
43
+ };
44
+ AiRouteDecision.style = aiRouteDecisionCss();
45
+
46
+ export { AiRouteDecision as ai_route_decision };
@@ -1,6 +1,6 @@
1
- import { r as registerInstance, c as createEvent, h, H as Host } from './index-7hrZ8FOQ.js';
1
+ import { r as registerInstance, c as createEvent, h, H as Host } from './index-B0yIzgh4.js';
2
2
 
3
- const aiSuggestionCss = () => `:host{--ai-suggestion-bg:var(--ai-bg-card);--ai-suggestion-bg-hover:var(--ai-accent-bg);--ai-suggestion-bg-active:var(--ai-accent-bg);--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-color:var(--ai-accent-dark);--ai-suggestion-font-size:14px;--ai-suggestion-line-height:20px;display:inline-block;direction:rtl;font-family:var(--ai-font-family, "PingARLT", sans-serif)}.chip{display:inline-flex;align-items:center;justify-content:center;gap:var(--ai-suggestion-gap);background:var(--ai-suggestion-bg);border:var(--ai-suggestion-border);border-radius:var(--ai-suggestion-radius);padding:var(--ai-suggestion-padding);color:var(--ai-suggestion-color);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:right}.chip:hover:not(:disabled){background:var(--ai-suggestion-bg-hover);border:var(--ai-suggestion-border-hover)}.chip:active:not(:disabled){background:var(--ai-suggestion-bg-active)}.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)}`;
3
+ const aiSuggestionCss = () => `: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)}`;
4
4
 
5
5
  const AiSuggestion = class {
6
6
  constructor(hostRef) {
@@ -18,10 +18,10 @@ const AiSuggestion = class {
18
18
  this.suggestionClick.emit(this.label);
19
19
  }
20
20
  render() {
21
- return (h(Host, { key: '642ab1b74098e6cd3cebab33a127757cddd2a450' }, h("button", { key: 'd75585d53f5996d06a96bdfad5dc11a85b101b23', class: {
21
+ return (h(Host, { key: 'd8a9ff7279fce63faebd187cb69f0173239518ca' }, h("button", { key: '42bc023c9c48bafc11b388bb80e130255ea830b8', class: {
22
22
  chip: true,
23
23
  'chip--disabled': this.disabled,
24
- }, disabled: this.disabled, onClick: () => this.handleClick() }, h("span", { key: '532a8cc6168accab91bc10f0b4383d4173b8c887', class: "chip__label" }, this.label, h("slot", { key: '691ae51253a08ff2005733a263153f8470e77472' })))));
24
+ }, disabled: this.disabled, onClick: () => this.handleClick() }, h("span", { key: '06f0324b97d9f7fb77fb2d4b9dbf0be9b5c4c3f1', class: "chip__label" }, this.label, h("slot", { key: 'ccd0d639f0b2c001088561b029b08691395e9198' })))));
25
25
  }
26
26
  };
27
27
  AiSuggestion.style = aiSuggestionCss();