@salla.sa/ui-ai-kit-core 1.0.0 → 1.1.1

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 (148) 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 +27 -17
  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 +62 -14
  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 +50 -15
  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 +26 -21
  44. package/dist/collection/components/ai-voice-input/ai-voice-input.js +103 -13
  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-DCr8F_XV.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 +27 -17
  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 +62 -14
  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 +6 -1
  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 +333 -9
  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-21c4fc1f.entry.js +1 -0
  98. package/dist/ui-ai-kit/p-2955439f.entry.js +1 -0
  99. package/dist/ui-ai-kit/p-5c9e9822.entry.js +1 -0
  100. package/dist/ui-ai-kit/p-5caf1c38.entry.js +1 -0
  101. package/dist/ui-ai-kit/p-6d3505e9.entry.js +1 -0
  102. package/dist/ui-ai-kit/p-74c5c83f.entry.js +1 -0
  103. package/dist/ui-ai-kit/p-87e9739b.entry.js +1 -0
  104. package/dist/ui-ai-kit/p-B0yIzgh4.js +2 -0
  105. package/dist/{components/p-DYv5ef4M.js → ui-ai-kit/p-SJZ6Ujn9.js} +1 -1
  106. package/dist/ui-ai-kit/p-a099fcfb.entry.js +1 -0
  107. package/dist/ui-ai-kit/p-a9e4eaef.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 -14
  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
  148. package/readme.md +0 -111
@@ -0,0 +1,80 @@
1
+ 'use strict';
2
+
3
+ var index = require('./index-BkNg07SW.js');
4
+ var iconRegistry = require('./icon-registry-BKb9-2Nt.js');
5
+
6
+ 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}}`;
7
+
8
+ const AiConversationList = class {
9
+ constructor(hostRef) {
10
+ index.registerInstance(this, hostRef);
11
+ this.conversationSelect = index.createEvent(this, "conversationSelect");
12
+ this.conversationDelete = index.createEvent(this, "conversationDelete");
13
+ }
14
+ /** JSON array of ConversationItem */
15
+ items = '[]';
16
+ /** ID of the currently active conversation */
17
+ activeId = '';
18
+ /** Show skeleton loading state */
19
+ loading = false;
20
+ conversationSelect;
21
+ conversationDelete;
22
+ renderIcon(name, width, height) {
23
+ const icon = iconRegistry.iconRegistry[name];
24
+ if (!icon)
25
+ return null;
26
+ const svg = `<svg width="${width}" height="${height}" viewBox="${icon.viewBox}" fill="none" xmlns="http://www.w3.org/2000/svg">${icon.content}</svg>`;
27
+ return index.h("span", { class: "icon-wrap", innerHTML: svg });
28
+ }
29
+ getItems() {
30
+ try {
31
+ return JSON.parse(this.items) || [];
32
+ }
33
+ catch {
34
+ return [];
35
+ }
36
+ }
37
+ formatRelativeTime(timestamp) {
38
+ try {
39
+ const date = new Date(timestamp);
40
+ const diffMs = Date.now() - date.getTime();
41
+ const diffMin = Math.floor(diffMs / 60000);
42
+ const diffHour = Math.floor(diffMin / 60);
43
+ const diffDay = Math.floor(diffHour / 24);
44
+ const lang = (typeof document !== 'undefined' && document.documentElement.lang) || 'ar';
45
+ const rtf = new Intl.RelativeTimeFormat(lang, { numeric: 'auto' });
46
+ if (diffMin < 1)
47
+ return rtf.format(0, 'second');
48
+ if (diffMin < 60)
49
+ return rtf.format(-diffMin, 'minute');
50
+ if (diffHour < 24)
51
+ return rtf.format(-diffHour, 'hour');
52
+ return rtf.format(-diffDay, 'day');
53
+ }
54
+ catch {
55
+ return '';
56
+ }
57
+ }
58
+ renderRatingDots(rating) {
59
+ const total = 5;
60
+ return (index.h("div", { class: "rating-dots", "aria-label": rating ? `تقييم ${rating} من 5` : undefined }, Array.from({ length: total }, (_, i) => (index.h("span", { class: `rating-dot ${i < (rating ?? 0) ? 'rating-dot--filled' : ''}` })))));
61
+ }
62
+ renderSkeleton() {
63
+ return (index.h("div", { class: "skeleton-list" }, [1, 2, 3, 4].map(i => (index.h("div", { key: i, class: "skeleton-item" }, index.h("div", { class: "skeleton-line skeleton-line--title" }), index.h("div", { class: "skeleton-line skeleton-line--preview" }), index.h("div", { class: "skeleton-line skeleton-line--meta" }))))));
64
+ }
65
+ render() {
66
+ const list = this.getItems();
67
+ return (index.h(index.Host, { key: '4baef00dae7b30e73168684fce1dc512c35e8855' }, index.h("div", { key: '4da38479ba7a29b4f8d95aca4f9c0644361eb486', class: "conversation-list" }, index.h("div", { key: '671e0f54f45ceae32ce4424c1aa4bc72eed851e0', class: "list-scroll", role: "list" }, this.loading
68
+ ? this.renderSkeleton()
69
+ : list.map(item => {
70
+ const isActive = item.id === this.activeId;
71
+ return (index.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) }, index.h("div", { class: "conv-item__body" }, index.h("p", { class: "conv-item__title" }, item.title), index.h("p", { class: "conv-item__preview" }, item.preview), index.h("div", { class: "conv-item__meta" }, index.h("span", { class: "conv-item__time" }, this.formatRelativeTime(item.timestamp)), item.rating != null && this.renderRatingDots(item.rating))), index.h("button", { class: "delete-btn", "aria-label": "\u062D\u0630\u0641 \u0627\u0644\u0645\u062D\u0627\u062F\u062B\u0629", onClick: e => {
72
+ e.stopPropagation();
73
+ this.conversationDelete.emit(item.id);
74
+ } }, this.renderIcon('cancel', 14, 14))));
75
+ })))));
76
+ }
77
+ };
78
+ AiConversationList.style = aiConversationListCss();
79
+
80
+ exports.ai_conversation_list = AiConversationList;
@@ -0,0 +1,33 @@
1
+ 'use strict';
2
+
3
+ var index = require('./index-BkNg07SW.js');
4
+ var iconRegistry = require('./icon-registry-BKb9-2Nt.js');
5
+
6
+ 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}`;
7
+
8
+ const AiConversationSummary = class {
9
+ constructor(hostRef) {
10
+ index.registerInstance(this, hostRef);
11
+ }
12
+ /** Card heading */
13
+ title = 'ملخص المحادثة';
14
+ /** Summary body text */
15
+ summary = '';
16
+ /** Total message count shown as a badge */
17
+ messageCount = 0;
18
+ /** Conversation language label */
19
+ language = '';
20
+ renderIcon(name, width, height) {
21
+ const icon = iconRegistry.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 index.h("span", { class: "icon-wrap", innerHTML: svg });
26
+ }
27
+ render() {
28
+ return (index.h(index.Host, { key: '86515141f587c12228ed4c6654dedca7b4ca98aa' }, index.h("div", { key: '92eb74db5756446522ad2ebd822cb156cec25e82', class: "summary-card" }, index.h("div", { key: 'e524143089223e6f223c29a869d6fe2f8e681f29', class: "summary-header" }, index.h("div", { key: '33298a6bd249a6a1befa48385fa03c002e13b14d', class: "sparkle-avatar" }, this.renderIcon('sparkle', 14, 14)), index.h("span", { key: '800084477746e0f5123f6977e45460299b802cdc', class: "summary-title" }, this.title), index.h("div", { key: 'c1c3d94d0d57fae1601ff3c1de52ce2392d0b0d4', class: "summary-badges" }, this.messageCount > 0 && (index.h("span", { key: '8252e3dd8054980ed20af95e7148b944c420ce70', class: "badge" }, this.renderIcon('list', 12, 12), this.messageCount)), this.language && (index.h("span", { key: 'd793ccbf1234050ad17f731050314cc51214de68', class: "badge lang-badge" }, this.language)))), this.summary && (index.h("p", { key: '0e0a0bcf45b947826a9e417b62fe3e6e3f530cfc', class: "summary-body", ref: el => el && (el.textContent = this.summary) })), index.h("div", { key: '9897f21508b7f1193ba596d0918d410d31a815b5', class: "summary-slot" }, index.h("slot", { key: 'be036f1905059a9914f2b6e12a87e4dfa1166194' })))));
29
+ }
30
+ };
31
+ AiConversationSummary.style = aiConversationSummaryCss();
32
+
33
+ exports.ai_conversation_summary = AiConversationSummary;
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
- var index = require('./index-DLJcLHFH.js');
4
- var iconRegistry = require('./icon-registry-dmfLA-Dj.js');
3
+ var index = require('./index-BkNg07SW.js');
4
+ var iconRegistry = require('./icon-registry-BKb9-2Nt.js');
5
5
 
6
6
  const aiIconCss = () => `:host{display:inline-flex;align-items:center;justify-content:center}svg{display:block}`;
7
7
 
@@ -1,9 +1,9 @@
1
1
  'use strict';
2
2
 
3
- var index = require('./index-DLJcLHFH.js');
4
- var iconRegistry = require('./icon-registry-dmfLA-Dj.js');
3
+ var index = require('./index-BkNg07SW.js');
4
+ var iconRegistry = require('./icon-registry-BKb9-2Nt.js');
5
5
 
6
- 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}`;
6
+ 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}`;
7
7
 
8
8
  const AiLink = class {
9
9
  constructor(hostRef) {
@@ -26,7 +26,7 @@ const AiLink = class {
26
26
  }
27
27
  render() {
28
28
  const rel = this.rel || (this.target === '_blank' ? 'noopener noreferrer' : undefined);
29
- return (index.h(index.Host, { key: '58a742b11ef7dcc1094031e804be6032311cea9d' }, index.h("span", { key: 'bf45468deb328c2d8ed70ac299d36968c16ababe', class: "link__label" }, this.label, index.h("slot", { key: 'bd43bc12d120ab806c895922ede0a08d4ec2f882' })), index.h("a", { key: 'b7c75a59bf18b1f1dc2e713b9e78c045afaa82e2', class: "link", href: this.href, target: this.target, rel: rel }, this.renderShareIcon())));
29
+ return (index.h(index.Host, { key: 'c35f0fd1f17170d32846ebf7066177ca3a6b68f1' }, index.h("span", { key: '34c01b7fa4122659ca01402c76a67dbca5878ffe', class: "link__label" }, this.label, index.h("slot", { key: 'd9dd28b4bfba8c1cb5e6f977262942daf504fdc8' })), index.h("a", { key: 'b4da5e53ee8df0b40417c0d0a80a9647ae0b93d2', class: "link", href: this.href, target: this.target, rel: rel }, this.renderShareIcon())));
30
30
  }
31
31
  };
32
32
  AiLink.style = aiLinkCss();
@@ -1,9 +1,9 @@
1
1
  'use strict';
2
2
 
3
- var index = require('./index-DLJcLHFH.js');
4
- var iconRegistry = require('./icon-registry-dmfLA-Dj.js');
3
+ var index = require('./index-BkNg07SW.js');
4
+ var iconRegistry = require('./icon-registry-BKb9-2Nt.js');
5
5
 
6
- 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}`;
6
+ 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}`;
7
7
 
8
8
  const AiLoading = class {
9
9
  constructor(hostRef) {
@@ -15,10 +15,16 @@ const AiLoading = class {
15
15
  mode = 'thinking';
16
16
  /** Thinking mode status text */
17
17
  statusText = 'جاري التفكير...';
18
+ /** Secondary shimmer line in thinking mode (e.g. live node name) */
19
+ thinkingSubtext = '';
18
20
  /** Steps as JSON string array of LoadingStep */
19
- steps = '[]';
21
+ steps = [];
20
22
  /** Steps mode title */
21
23
  headerTitle = 'خطة التنفيذ';
24
+ /** Agent name shown in header alongside sparkle */
25
+ currentAgent = '';
26
+ /** Show per-step agent chips */
27
+ showAgentBadges = false;
22
28
  /** Steps mode expand state */
23
29
  expanded = true;
24
30
  /** Whether steps card is collapsible */
@@ -36,20 +42,16 @@ const AiLoading = class {
36
42
  const svg = `<svg width="${width}" height="${height}" viewBox="${icon.viewBox}" fill="none" xmlns="http://www.w3.org/2000/svg">${icon.content}</svg>`;
37
43
  return index.h("span", { class: "icon-wrap", innerHTML: svg });
38
44
  }
39
- renderSparkleAvatar() {
40
- return index.h("div", { class: "sparkle-avatar" }, this.renderIcon('sparkle', 14, 14));
45
+ renderSparkleAvatar(agentName) {
46
+ return (index.h("div", { class: "sparkle-avatar-wrap" }, index.h("div", { class: "sparkle-avatar" }, this.renderIcon('sparkle', 14, 14)), agentName && index.h("span", { class: "header-agent" }, agentName)));
41
47
  }
42
48
  renderStepBadge(step, index$1) {
43
- const isCompleted = step.status === 'completed';
44
- return (index.h("div", { class: "step-badge-outer" }, index.h("div", { class: `step-badge-inner ${isCompleted ? 'completed' : ''}` }, isCompleted ? this.renderIcon('check', 14, 14) : index.h("span", { class: "step-number" }, index$1 + 1))));
45
- }
46
- getStepsList() {
47
- try {
48
- return JSON.parse(this.steps) || [];
49
- }
50
- catch {
51
- return [];
52
- }
49
+ const { status } = step;
50
+ const isCompleted = status === 'completed';
51
+ const isExecuting = status === 'executing';
52
+ const isFailed = status === 'failed';
53
+ const inner = (index.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 && index.h("span", { class: "step-number" }, index$1 + 1)));
54
+ return index.h("div", { class: `step-badge-outer ${isExecuting ? 'pulse-ring' : ''}` }, inner);
53
55
  }
54
56
  handleToggle() {
55
57
  if (!this.collapsible)
@@ -59,17 +61,28 @@ const AiLoading = class {
59
61
  this.toggleExpand.emit(this._expanded);
60
62
  }
61
63
  renderThinkingMode() {
62
- return (index.h("div", { class: "thinking-row" }, this.renderSparkleAvatar(), index.h("span", { class: "shimmer-text" }, this.statusText)));
64
+ return (index.h("div", { class: "thinking-row" }, this.renderSparkleAvatar(), index.h("div", { class: "thinking-col" }, index.h("span", { class: "shimmer-text" }, this.statusText), this.thinkingSubtext && index.h("span", { class: "shimmer-text subtext" }, this.thinkingSubtext))));
65
+ }
66
+ renderPlanningShimmer() {
67
+ return (index.h("div", { class: "steps-body" }, index.h("div", { class: "thinking-row planning-shimmer" }, index.h("div", { class: "sparkle-avatar" }, this.renderIcon('sparkle', 14, 14)), index.h("span", { class: "shimmer-text" }, "\u062C\u0627\u0631\u064A \u0627\u0644\u062A\u062E\u0637\u064A\u0637..."))));
63
68
  }
64
69
  renderStepsMode() {
65
- const stepsList = this.getStepsList();
66
- const completedCount = stepsList.filter(s => s.status === 'completed').length;
67
- const total = stepsList.length;
70
+ const completedCount = this.steps.filter(s => s.status === 'completed').length;
71
+ const total = this.steps.length;
68
72
  const allDone = total > 0 && completedCount === total;
69
- return (index.h("div", { class: "steps-card" }, index.h("div", { class: `steps-header ${this.collapsible ? 'collapsible' : ''}`, onClick: () => this.handleToggle() }, this.renderSparkleAvatar(), index.h("div", { class: "steps-header-center" }, index.h("span", { class: "steps-title" }, this.headerTitle), total > 0 && index.h("span", { class: "progress-badge" }, allDone ? 'مكتمل' : `${completedCount}/${total}`)), this.collapsible && index.h("button", { class: `collapse-btn ${this._expanded ? 'expanded' : ''}` }, this.renderIcon('chevron-down', 20, 20))), this._expanded && stepsList.length > 0 && (index.h("div", { class: "steps-body" }, stepsList.map((step, i) => (index.h("div", { class: "step-row", onClick: () => this.stepClick.emit(step) }, index.h("div", { class: "step-badge-col" }, this.renderStepBadge(step, i), i < stepsList.length - 1 && index.h("div", { class: "step-separator" })), index.h("span", { class: "step-text" }, step.title))))))));
73
+ const executingStep = this.steps.find(s => s.status === 'executing');
74
+ const headerBadge = () => {
75
+ if (total === 0)
76
+ return null;
77
+ if (!this._expanded && executingStep) {
78
+ return index.h("span", { class: "progress-badge executing-title" }, executingStep.action);
79
+ }
80
+ return index.h("span", { class: "progress-badge" }, allDone ? 'مكتمل' : `${completedCount}/${total}`);
81
+ };
82
+ return (index.h("div", { class: "steps-card" }, index.h("div", { class: `steps-header ${this.collapsible ? 'collapsible' : ''}`, onClick: () => this.handleToggle() }, this.renderSparkleAvatar(this.currentAgent || undefined), index.h("div", { class: "steps-header-center" }, index.h("span", { class: "steps-title" }, this.headerTitle), headerBadge()), this.collapsible && index.h("button", { class: `collapse-btn ${this._expanded ? 'expanded' : ''}` }, this.renderIcon('chevron-down', 20, 20))), this._expanded && total === 0 && this.renderPlanningShimmer(), this._expanded && total > 0 && (index.h("div", { class: "steps-body" }, this.steps.map((step, i) => (index.h("div", { class: `step-row ${step.status}`, onClick: () => this.stepClick.emit(step) }, index.h("div", { class: "step-badge-col" }, this.renderStepBadge(step, i), i < this.steps.length - 1 && index.h("div", { class: "step-separator" })), index.h("div", { class: "step-content" }, index.h("span", { class: "step-text" }, step.action), step.reason && index.h("span", { class: "step-description" }, step.reason)))))))));
70
83
  }
71
84
  render() {
72
- return index.h(index.Host, { key: '8a994758abe21c8a333088eeda498d158631bae6' }, this.mode === 'thinking' ? this.renderThinkingMode() : this.renderStepsMode());
85
+ return index.h(index.Host, { key: 'da2c7fad8bbf4e572972a9b8308204cecb91dd63' }, this.mode === 'thinking' ? this.renderThinkingMode() : this.renderStepsMode());
73
86
  }
74
87
  };
75
88
  AiLoading.style = aiLoadingCss();
@@ -1,14 +1,14 @@
1
1
  'use strict';
2
2
 
3
- var index = require('./index-DLJcLHFH.js');
3
+ var index = require('./index-BkNg07SW.js');
4
4
 
5
- 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}`;
5
+ 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))}`;
6
6
 
7
7
  const MessageInput = class {
8
8
  constructor(hostRef) {
9
9
  index.registerInstance(this, hostRef);
10
10
  this.sendMessage = index.createEvent(this, "sendMessage");
11
- this.voiceButtonClick = index.createEvent(this, "voiceButtonClick");
11
+ this.voiceAudioReady = index.createEvent(this, "voiceAudioReady");
12
12
  }
13
13
  get el() { return index.getElement(this); }
14
14
  /** Placeholder text for the textarea */
@@ -17,21 +17,38 @@ const MessageInput = class {
17
17
  disabled = false;
18
18
  /** Whether to show the voice recording button */
19
19
  showVoiceButton = true;
20
+ /** Maximum characters allowed */
21
+ maxLength = 4000;
22
+ /** External prop to show/hide the inline voice recorder */
23
+ isRecording = false;
20
24
  inputValue = '';
25
+ showVoiceRecorder = false;
26
+ isMultiline = false;
21
27
  textareaRef;
22
28
  /** Event emitted when a message is sent */
23
29
  sendMessage;
24
- /** Event emitted when the voice button is clicked caller controls rendering the voice recorder */
25
- voiceButtonClick;
30
+ /** Event emitted when voice recording is complete and audio is ready */
31
+ voiceAudioReady;
32
+ onIsRecordingChange(newVal) {
33
+ this.showVoiceRecorder = newVal;
34
+ }
26
35
  /** Set the textarea value programmatically (e.g. after speech-to-text transcription) */
27
36
  async setInputValue(value) {
28
37
  this.inputValue = value;
29
38
  if (this.textareaRef) {
30
- this.textareaRef.style.height = 'auto';
31
- this.textareaRef.style.height = `${this.textareaRef.scrollHeight}px`;
39
+ // Set value imperatively before measuring to avoid stale scrollHeight from async render queue
40
+ this.textareaRef.value = value;
41
+ this.updateHeight();
32
42
  this.textareaRef.focus();
33
43
  }
34
44
  }
45
+ updateHeight = () => {
46
+ if (!this.textareaRef)
47
+ return;
48
+ this.textareaRef.style.height = 'auto';
49
+ this.textareaRef.style.height = `${this.textareaRef.scrollHeight}px`;
50
+ this.isMultiline = this.textareaRef.scrollHeight > 28;
51
+ };
35
52
  handleSendMessage = () => {
36
53
  if (!this.inputValue.trim() || this.disabled)
37
54
  return;
@@ -39,26 +56,42 @@ const MessageInput = class {
39
56
  this.inputValue = '';
40
57
  if (this.textareaRef) {
41
58
  this.textareaRef.style.height = 'auto';
59
+ this.isMultiline = false;
42
60
  }
43
61
  };
44
- handleKeyPress = (e) => {
62
+ handleKeyDown = (e) => {
45
63
  if (e.key === 'Enter' && !e.shiftKey) {
46
64
  e.preventDefault();
47
65
  this.handleSendMessage();
48
66
  }
49
67
  };
68
+ handleVoiceClick = () => {
69
+ this.showVoiceRecorder = true;
70
+ };
71
+ handleAudioRecorded = (e) => {
72
+ this.showVoiceRecorder = false;
73
+ this.voiceAudioReady.emit(e.detail);
74
+ };
75
+ handleRecordingCancel = () => {
76
+ this.showVoiceRecorder = false;
77
+ };
50
78
  handleInputChange = (e) => {
51
- const target = e.target;
52
- this.inputValue = target.value;
53
- if (this.textareaRef) {
54
- this.textareaRef.style.height = 'auto';
55
- this.textareaRef.style.height = `${this.textareaRef.scrollHeight}px`;
56
- }
79
+ this.inputValue = e.target.value;
80
+ this.updateHeight();
57
81
  };
58
82
  render() {
83
+ if (this.showVoiceRecorder) {
84
+ return (index.h(index.Host, null, index.h("ai-voice-input", { autoStart: true, onAudioRecorded: this.handleAudioRecorded, onRecordingCancel: this.handleRecordingCancel })));
85
+ }
59
86
  const canSend = !!this.inputValue.trim() && !this.disabled;
60
- return (index.h(index.Host, { key: '97dfe627b89657d36e4f7281a8bdb708cc913374' }, index.h("div", { key: 'a3efb2a0b95ec3a86cc5f575d0fdb2bb6dd2eb6c', part: "wrapper", class: "wrapper" }, index.h("div", { key: '5986fa2946a44757c143999a72b25ea3b6e7c336', part: "glow", class: "glow", "aria-hidden": "true" }), index.h("div", { key: 'd5b9d346495de00e8b0e0900ef3e766756844626', part: "container", class: "input-container" }, index.h("div", { key: '8313695b2e4d7557a5362e9b9d2a5c5803a4ec0c', class: "input-row" }, index.h("div", { key: '9c184f8097e28527b5d18fccf92010fb36b14a9c', class: "actions" }, index.h("button", { key: '39ad3feb24a53fd5a08e8a8388f7bcee71413a91', part: "send-button", class: `send-button${canSend ? ' active' : ''}`, onClick: this.handleSendMessage, disabled: !canSend, type: "button", "aria-label": "Send message" }, index.h("ai-icon", { key: '1fe555709288d33551696312fb3329b1c656d063', name: "send", size: 16 })), this.showVoiceButton && !this.inputValue && (index.h("button", { key: 'a7bcc3b9ca5f5e59c32a34ab33c2fbbd607bb298', part: "voice-button", class: "voice-button", onClick: () => this.voiceButtonClick.emit(), disabled: this.disabled, type: "button", "aria-label": "Record voice" }, index.h("ai-icon", { key: '98fea04c79e841e4a2b8ee50a480bb554212b055', name: "mic", size: 16 })))), index.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" }))))));
87
+ const remaining = this.maxLength - this.inputValue.length;
88
+ return (index.h(index.Host, null, index.h("div", { part: "wrapper", class: "wrapper" }, index.h("div", { part: "glow", class: "glow", "aria-hidden": "true" }), index.h("div", { part: "container", class: `input-container${this.isMultiline ? ' multiline' : ''}` }, index.h("div", { class: "input-row" }, index.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 && (index.h("span", { class: `char-counter${remaining < 50 ? ' warning' : ''}`, "aria-live": "polite" }, remaining)), index.h("div", { class: "actions" }, this.showVoiceButton && !this.inputValue && (index.h("button", { part: "voice-button", class: "voice-button", onClick: this.handleVoiceClick, disabled: this.disabled, type: "button", "aria-label": "Record voice" }, index.h("ai-icon", { name: "mic", size: 16 }))), index.h("button", { part: "send-button", class: `send-button${canSend ? ' active' : ''}`, onClick: this.handleSendMessage, disabled: !canSend, type: "button", "aria-label": "Send message" }, index.h("ai-icon", { name: "send", size: 16 }))))))));
61
89
  }
90
+ static get watchers() { return {
91
+ "isRecording": [{
92
+ "onIsRecordingChange": 0
93
+ }]
94
+ }; }
62
95
  };
63
96
  MessageInput.style = aiMessageInputCss();
64
97
 
@@ -1,8 +1,8 @@
1
1
  'use strict';
2
2
 
3
- var index = require('./index-DLJcLHFH.js');
3
+ var index = require('./index-BkNg07SW.js');
4
4
 
5
- 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)}}`;
5
+ 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)}}`;
6
6
 
7
7
  const EMOJI_OPTIONS = [
8
8
  { value: 1, emoji: '😠', label: 'سيئ جداً' },
@@ -0,0 +1,48 @@
1
+ 'use strict';
2
+
3
+ var index = require('./index-BkNg07SW.js');
4
+ var iconRegistry = require('./icon-registry-BKb9-2Nt.js');
5
+
6
+ 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)}`;
7
+
8
+ const AiRouteDecision = class {
9
+ constructor(hostRef) {
10
+ index.registerInstance(this, hostRef);
11
+ this.routeExpand = index.createEvent(this, "routeExpand");
12
+ }
13
+ /** Selected agent name */
14
+ selectedAgent = '';
15
+ /** Agent icon — emoji or short text displayed before the agent name */
16
+ agentIcon = '';
17
+ /** Reason for routing decision (shown when expanded) */
18
+ reason = '';
19
+ /** Routing confidence percentage 0–100 */
20
+ confidence = 0;
21
+ /** Detected language label (shown when expanded) */
22
+ detectedLanguage = '';
23
+ /** Initial expanded state */
24
+ expanded = false;
25
+ _expanded = false;
26
+ routeExpand;
27
+ componentWillLoad() {
28
+ this._expanded = this.expanded;
29
+ }
30
+ renderIcon(name, width, height) {
31
+ const icon = iconRegistry.iconRegistry[name];
32
+ if (!icon)
33
+ return null;
34
+ const svg = `<svg width="${width}" height="${height}" viewBox="${icon.viewBox}" fill="none" xmlns="http://www.w3.org/2000/svg">${icon.content}</svg>`;
35
+ return index.h("span", { class: "icon-wrap", innerHTML: svg });
36
+ }
37
+ handleToggle() {
38
+ this._expanded = !this._expanded;
39
+ this.expanded = this._expanded;
40
+ this.routeExpand.emit(this._expanded);
41
+ }
42
+ render() {
43
+ return (index.h(index.Host, { key: 'a22239e1db9982a860bbd6242e5848c3cdfe57ce' }, index.h("div", { key: '21c447b12e737e77d67b33b10f82f727f10ef4e5', class: `route-pill ${this._expanded ? 'expanded' : ''}` }, index.h("button", { key: 'fe5c0f167cad2b2fa2549a03a87a32c848efc4c6', class: "route-pill-main", onClick: () => this.handleToggle() }, index.h("span", { key: 'a1a07c6f8f108e637a43424fa9cdb918e882db3a', class: "route-icon" }, this.renderIcon('route', 14, 14)), index.h("span", { key: '005662e7b00f47edf185a7806ca268c2b0e9e62a', class: "agent-label" }, this.agentIcon && index.h("span", { key: '9fbadba81754d515e156bfcfa4821f7e2cefc88b', class: "agent-emoji", "aria-hidden": "true" }, this.agentIcon), this.selectedAgent), this.confidence > 0 && (index.h("span", { key: 'c2acf259644e0c74264b535b5d34ea5a3b519797', class: "confidence-badge" }, this.confidence, "%")), index.h("span", { key: 'ac5d1ee27417d85c50a88adb297b493c83aa85bc', class: `expand-icon ${this._expanded ? 'expanded' : ''}` }, this.renderIcon('arrow-right', 12, 12))), this._expanded && (index.h("div", { key: 'dc1f297cdeede44b4e6b8a4888204eef2200bc72', class: "route-details" }, this.reason && index.h("p", { key: '7e819d2a6dceeb81d88282e7fcc927b9fe4219c2', class: "reason-text" }, this.reason), this.confidence > 0 && (index.h("div", { key: 'ec6cbaf221e0679241fc1f13066d542d5b64b9ef', class: "confidence-bar-wrap" }, index.h("div", { key: '84b3c99aa734308db8d9abd7674eb9f5ee22b17c', class: "confidence-bar", style: { width: `${this.confidence}%` } }))), this.detectedLanguage && (index.h("div", { key: 'e83127633ec30ea79446a3622f31428ed50ede4d', class: "meta-row" }, this.renderIcon('list', 12, 12), index.h("span", { key: '1547936eaa529d999b9d0b9dc3421bff2e20937a', class: "lang-chip" }, this.detectedLanguage))))))));
44
+ }
45
+ };
46
+ AiRouteDecision.style = aiRouteDecisionCss();
47
+
48
+ exports.ai_route_decision = AiRouteDecision;
@@ -1,8 +1,8 @@
1
1
  'use strict';
2
2
 
3
- var index = require('./index-DLJcLHFH.js');
3
+ var index = require('./index-BkNg07SW.js');
4
4
 
5
- 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)}`;
5
+ 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)}`;
6
6
 
7
7
  const AiSuggestion = class {
8
8
  constructor(hostRef) {
@@ -20,10 +20,10 @@ const AiSuggestion = class {
20
20
  this.suggestionClick.emit(this.label);
21
21
  }
22
22
  render() {
23
- return (index.h(index.Host, { key: '642ab1b74098e6cd3cebab33a127757cddd2a450' }, index.h("button", { key: 'd75585d53f5996d06a96bdfad5dc11a85b101b23', class: {
23
+ return (index.h(index.Host, { key: 'd8a9ff7279fce63faebd187cb69f0173239518ca' }, index.h("button", { key: '42bc023c9c48bafc11b388bb80e130255ea830b8', class: {
24
24
  chip: true,
25
25
  'chip--disabled': this.disabled,
26
- }, disabled: this.disabled, onClick: () => this.handleClick() }, index.h("span", { key: '532a8cc6168accab91bc10f0b4383d4173b8c887', class: "chip__label" }, this.label, index.h("slot", { key: '691ae51253a08ff2005733a263153f8470e77472' })))));
26
+ }, disabled: this.disabled, onClick: () => this.handleClick() }, index.h("span", { key: '06f0324b97d9f7fb77fb2d4b9dbf0be9b5c4c3f1', class: "chip__label" }, this.label, index.h("slot", { key: 'ccd0d639f0b2c001088561b029b08691395e9198' })))));
27
27
  }
28
28
  };
29
29
  AiSuggestion.style = aiSuggestionCss();