@chat21/chat21-web-widget 5.1.33 → 5.1.34-rc1

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 (201) hide show
  1. package/.angular-mcp-cache/package.json +1 -0
  2. package/.cursor/angular18-accessibility-auditor-skill.md +442 -0
  3. package/.cursor/mcp.json +15 -0
  4. package/.github/workflows/docker-community-push-latest.yml +23 -13
  5. package/.github/workflows/docker-image-tag-community-tag-push.yml +22 -12
  6. package/.github/workflows/playwright.yml +27 -0
  7. package/CHANGELOG.md +130 -6
  8. package/Dockerfile +4 -5
  9. package/angular.json +24 -4
  10. package/docs/changelog/this-branch.md +36 -0
  11. package/env.sample +3 -2
  12. package/mocks/voice-websocket-mock/server.cjs +245 -0
  13. package/nginx.conf +22 -2
  14. package/package.json +10 -3
  15. package/playwright.config.ts +41 -0
  16. package/src/app/app.component.html +2 -2
  17. package/src/app/app.component.scss +25 -14
  18. package/src/app/app.component.spec.ts +21 -6
  19. package/src/app/app.component.ts +10 -9
  20. package/src/app/app.module.ts +15 -0
  21. package/src/app/component/conversation-detail/conversation/conversation.component.html +25 -11
  22. package/src/app/component/conversation-detail/conversation/conversation.component.scss +40 -2
  23. package/src/app/component/conversation-detail/conversation/conversation.component.spec.ts +644 -75
  24. package/src/app/component/conversation-detail/conversation/conversation.component.ts +100 -14
  25. package/src/app/component/conversation-detail/conversation-audio-recorder/conversation-audio-recorder.component.html +25 -13
  26. package/src/app/component/conversation-detail/conversation-audio-recorder/conversation-audio-recorder.component.spec.ts +123 -5
  27. package/src/app/component/conversation-detail/conversation-audio-recorder/conversation-audio-recorder.component.ts +1 -0
  28. package/src/app/component/conversation-detail/conversation-content/conversation-content.component.html +23 -10
  29. package/src/app/component/conversation-detail/conversation-content/conversation-content.component.scss +33 -2
  30. package/src/app/component/conversation-detail/conversation-content/conversation-content.component.spec.ts +242 -149
  31. package/src/app/component/conversation-detail/conversation-content/conversation-content.component.ts +8 -6
  32. package/src/app/component/conversation-detail/conversation-emojii/conversation-emojii.component.spec.ts +53 -3
  33. package/src/app/component/conversation-detail/conversation-footer/conversation-footer.component.html +200 -96
  34. package/src/app/component/conversation-detail/conversation-footer/conversation-footer.component.scss +211 -6
  35. package/src/app/component/conversation-detail/conversation-footer/conversation-footer.component.spec.ts +452 -78
  36. package/src/app/component/conversation-detail/conversation-footer/conversation-footer.component.ts +291 -76
  37. package/src/app/component/conversation-detail/conversation-header/conversation-header.component.html +113 -53
  38. package/src/app/component/conversation-detail/conversation-header/conversation-header.component.scss +12 -4
  39. package/src/app/component/conversation-detail/conversation-header/conversation-header.component.spec.ts +274 -29
  40. package/src/app/component/conversation-detail/conversation-internal-frame/conversation-internal-frame.component.html +23 -9
  41. package/src/app/component/conversation-detail/conversation-internal-frame/conversation-internal-frame.component.spec.ts +80 -8
  42. package/src/app/component/conversation-detail/conversation-preview/conversation-preview.component.html +29 -23
  43. package/src/app/component/conversation-detail/conversation-preview/conversation-preview.component.spec.ts +185 -16
  44. package/src/app/component/conversation-detail/conversation-preview/conversation-preview.component.ts +34 -14
  45. package/src/app/component/conversation-detail/stream-audio-spectrum/stream-audio-spectrum.component.html +46 -0
  46. package/src/app/component/conversation-detail/stream-audio-spectrum/stream-audio-spectrum.component.scss +83 -0
  47. package/src/app/component/conversation-detail/stream-audio-spectrum/stream-audio-spectrum.component.ts +192 -0
  48. package/src/app/component/error-alert/error-alert.component.spec.ts +65 -5
  49. package/src/app/component/eyeeye-catcher-card/eyeeye-catcher-card.component.html +16 -7
  50. package/src/app/component/eyeeye-catcher-card/eyeeye-catcher-card.component.scss +21 -0
  51. package/src/app/component/eyeeye-catcher-card/eyeeye-catcher-card.component.spec.ts +89 -7
  52. package/src/app/component/form/form-builder/form-builder.component.html +1 -1
  53. package/src/app/component/form/form-builder/form-builder.component.spec.ts +163 -21
  54. package/src/app/component/form/inputs/form-checkbox/form-checkbox.component.html +8 -4
  55. package/src/app/component/form/inputs/form-checkbox/form-checkbox.component.scss +10 -5
  56. package/src/app/component/form/inputs/form-checkbox/form-checkbox.component.spec.ts +90 -16
  57. package/src/app/component/form/inputs/form-checkbox/form-checkbox.component.ts +26 -0
  58. package/src/app/component/form/inputs/form-label/form-label.component.spec.ts +45 -11
  59. package/src/app/component/form/inputs/form-radio-button/form-radio-button.component.spec.ts +24 -6
  60. package/src/app/component/form/inputs/form-select/form-select.component.spec.ts +14 -5
  61. package/src/app/component/form/inputs/form-text/form-text.component.html +14 -12
  62. package/src/app/component/form/inputs/form-text/form-text.component.scss +11 -1
  63. package/src/app/component/form/inputs/form-text/form-text.component.spec.ts +113 -17
  64. package/src/app/component/form/inputs/form-text/form-text.component.ts +35 -3
  65. package/src/app/component/form/inputs/form-textarea/form-textarea.component.html +13 -11
  66. package/src/app/component/form/inputs/form-textarea/form-textarea.component.scss +6 -5
  67. package/src/app/component/form/inputs/form-textarea/form-textarea.component.spec.ts +149 -13
  68. package/src/app/component/form/inputs/form-textarea/form-textarea.component.ts +26 -0
  69. package/src/app/component/form/prechat-form/prechat-form.component.html +14 -11
  70. package/src/app/component/form/prechat-form/prechat-form.component.spec.ts +102 -10
  71. package/src/app/component/form/prechat-form/prechat-form.component.ts +8 -1
  72. package/src/app/component/form/prechat-form-test-mock.ts +35 -0
  73. package/src/app/component/home/home.component.html +38 -31
  74. package/src/app/component/home/home.component.scss +4 -2
  75. package/src/app/component/home/home.component.spec.ts +226 -11
  76. package/src/app/component/home-conversations/home-conversations.component.html +30 -26
  77. package/src/app/component/home-conversations/home-conversations.component.scss +3 -0
  78. package/src/app/component/home-conversations/home-conversations.component.spec.ts +212 -36
  79. package/src/app/component/last-message/last-message.component.html +15 -9
  80. package/src/app/component/last-message/last-message.component.scss +16 -2
  81. package/src/app/component/last-message/last-message.component.spec.ts +204 -23
  82. package/src/app/component/last-message/last-message.component.ts +4 -1
  83. package/src/app/component/launcher-button/launcher-button.component.html +8 -13
  84. package/src/app/component/launcher-button/launcher-button.component.spec.ts +104 -8
  85. package/src/app/component/list-all-conversations/list-all-conversations.component.html +12 -17
  86. package/src/app/component/list-all-conversations/list-all-conversations.component.scss +2 -0
  87. package/src/app/component/list-conversations/list-conversations.component.html +22 -22
  88. package/src/app/component/menu-options/menu-options.component.html +30 -20
  89. package/src/app/component/menu-options/menu-options.component.spec.ts +125 -9
  90. package/src/app/component/message/audio/audio.component.html +13 -15
  91. package/src/app/component/message/audio/audio.component.spec.ts +140 -5
  92. package/src/app/component/message/audio/audio.component.ts +1 -5
  93. package/src/app/component/message/audio-sync/audio-sync.component.html +18 -0
  94. package/src/app/component/message/audio-sync/audio-sync.component.scss +65 -0
  95. package/src/app/component/message/audio-sync/audio-sync.component.spec.ts +103 -0
  96. package/src/app/component/message/audio-sync/audio-sync.component.ts +643 -0
  97. package/src/app/component/message/avatar/avatar.component.html +2 -2
  98. package/src/app/component/message/avatar/avatar.component.spec.ts +99 -7
  99. package/src/app/component/message/bubble-message/bubble-message.component.html +43 -51
  100. package/src/app/component/message/bubble-message/bubble-message.component.scss +59 -1
  101. package/src/app/component/message/bubble-message/bubble-message.component.spec.ts +154 -57
  102. package/src/app/component/message/bubble-message/bubble-message.component.ts +152 -109
  103. package/src/app/component/message/buttons/action-button/action-button.component.html +3 -4
  104. package/src/app/component/message/buttons/action-button/action-button.component.spec.ts +49 -5
  105. package/src/app/component/message/buttons/link-button/link-button.component.scss +5 -8
  106. package/src/app/component/message/buttons/link-button/link-button.component.spec.ts +50 -5
  107. package/src/app/component/message/buttons/text-button/text-button.component.spec.ts +44 -5
  108. package/src/app/component/message/carousel/carousel.component.html +29 -16
  109. package/src/app/component/message/carousel/carousel.component.scss +20 -8
  110. package/src/app/component/message/carousel/carousel.component.spec.ts +80 -3
  111. package/src/app/component/message/carousel/carousel.component.ts +16 -0
  112. package/src/app/component/message/frame/frame.component.html +9 -4
  113. package/src/app/component/message/frame/frame.component.spec.ts +34 -15
  114. package/src/app/component/message/frame/frame.component.ts +7 -2
  115. package/src/app/component/message/html/html.component.html +1 -1
  116. package/src/app/component/message/html/html.component.scss +1 -1
  117. package/src/app/component/message/html/html.component.spec.ts +24 -7
  118. package/src/app/component/message/image/image.component.html +12 -10
  119. package/src/app/component/message/image/image.component.scss +16 -0
  120. package/src/app/component/message/image/image.component.spec.ts +101 -15
  121. package/src/app/component/message/image/image.component.ts +90 -51
  122. package/src/app/component/message/info-message/info-message.component.spec.ts +26 -14
  123. package/src/app/component/message/json-sources/json-sources.component.html +38 -0
  124. package/src/app/component/message/json-sources/json-sources.component.scss +201 -0
  125. package/src/app/component/message/json-sources/json-sources.component.ts +89 -0
  126. package/src/app/component/message/like-unlike/like-unlike.component.html +7 -9
  127. package/src/app/component/message/like-unlike/like-unlike.component.spec.ts +31 -3
  128. package/src/app/component/message/return-receipt/return-receipt.component.spec.ts +38 -17
  129. package/src/app/component/message/text/text.component.html +3 -3
  130. package/src/app/component/message/text/text.component.scss +80 -86
  131. package/src/app/component/message/text/text.component.spec.ts +106 -13
  132. package/src/app/component/message-attachment/message-attachment.component.spec.ts +134 -13
  133. package/src/app/component/selection-department/selection-department.component.html +21 -23
  134. package/src/app/component/selection-department/selection-department.component.spec.ts +159 -14
  135. package/src/app/component/selection-department/selection-department.component.ts +8 -1
  136. package/src/app/component/send-button/send-button.component.html +5 -13
  137. package/src/app/component/send-button/send-button.component.spec.ts +2 -2
  138. package/src/app/component/star-rating-widget/star-rating-widget.component.html +51 -81
  139. package/src/app/directives/tooltip.directive.spec.ts +8 -4
  140. package/src/app/modals/confirm-close/confirm-close.component.html +20 -8
  141. package/src/app/modals/confirm-close/confirm-close.component.scss +3 -0
  142. package/src/app/modals/confirm-close/confirm-close.component.spec.ts +13 -4
  143. package/src/app/modals/confirm-close/confirm-close.component.ts +8 -1
  144. package/src/app/pipe/html-entites-encode.pipe.spec.ts +35 -2
  145. package/src/app/pipe/marked.pipe.spec.ts +38 -2
  146. package/src/app/pipe/marked.pipe.ts +51 -41
  147. package/src/app/providers/app-config.service.ts +4 -2
  148. package/src/app/providers/brand.service.spec.ts +23 -2
  149. package/src/app/providers/brand.service.ts +1 -1
  150. package/src/app/providers/global-settings.service.spec.ts +1009 -14
  151. package/src/app/providers/global-settings.service.ts +82 -2
  152. package/src/app/providers/json-sources-parser.service.ts +175 -0
  153. package/src/app/providers/translator.service.ts +26 -6
  154. package/src/app/providers/tts-audio-playback-coordinator.service.spec.ts +117 -0
  155. package/src/app/providers/tts-audio-playback-coordinator.service.ts +109 -0
  156. package/src/app/providers/url-preview.service.ts +82 -0
  157. package/src/app/providers/voice/STT&TTS/openai-voice.config.ts +12 -0
  158. package/src/app/providers/voice/STT&TTS/openai-voice.provider.ts +171 -0
  159. package/src/app/providers/voice/STT&TTS/speech-provider.abstract.ts +39 -0
  160. package/src/app/providers/voice/audio.types.ts +40 -0
  161. package/src/app/providers/voice/vad.service.spec.ts +28 -0
  162. package/src/app/providers/voice/vad.service.ts +70 -0
  163. package/src/app/providers/voice/voice-streaming.service.spec.ts +23 -0
  164. package/src/app/providers/voice/voice-streaming.service.ts +702 -0
  165. package/src/app/providers/voice/voice-streaming.types.ts +112 -0
  166. package/src/app/providers/voice/voice.service.spec.ts +227 -0
  167. package/src/app/providers/voice/voice.service.ts +973 -0
  168. package/src/app/sass/_variables.scss +3 -0
  169. package/src/app/sass/animations.scss +19 -1
  170. package/src/app/shims/onnxruntime-web-wasm.ts +4 -0
  171. package/src/app/utils/globals.ts +21 -1
  172. package/src/app/utils/json-sources-utils.ts +27 -0
  173. package/src/app/utils/url-utils.ts +98 -0
  174. package/src/app/utils/utils-resources.ts +1 -1
  175. package/src/assets/i18n/en.json +106 -99
  176. package/src/assets/i18n/es.json +107 -100
  177. package/src/assets/i18n/fr.json +107 -100
  178. package/src/assets/i18n/it.json +107 -98
  179. package/src/assets/onnx/ort-wasm-simd-threaded.mjs +59 -0
  180. package/src/assets/onnx/ort-wasm-simd-threaded.wasm +0 -0
  181. package/src/assets/sounds/keyboard.mp3 +0 -0
  182. package/src/assets/twp/chatbot-panel.html +3 -1
  183. package/src/assets/twp/index-dev.html +18 -0
  184. package/src/assets/twp/tiledesk_widget_files/widget-css-override-example.css +14 -0
  185. package/src/assets/vad/silero_vad_legacy.onnx +0 -0
  186. package/src/assets/vad/vad.worklet.bundle.min.js +1 -0
  187. package/src/chat21-core/models/message.ts +2 -1
  188. package/src/chat21-core/providers/chat-manager.spec.ts +72 -0
  189. package/src/chat21-core/providers/firebase/firebase-conversation-handler.ts +3 -2
  190. package/src/chat21-core/providers/mqtt/mqtt-conversation-handler.ts +12 -0
  191. package/src/chat21-core/providers/scripts/script.service.spec.ts +12 -2
  192. package/src/chat21-core/providers/tiledesk/tiledesk-requests.service.ts +1 -1
  193. package/src/chat21-core/utils/constants.ts +4 -0
  194. package/src/chat21-core/utils/utils-message.ts +45 -6
  195. package/src/chat21-core/utils/utils.ts +5 -2
  196. package/src/widget-config-template.json +4 -1
  197. package/src/widget-config.json +4 -1
  198. package/tests/widget-form-rich.spec.ts +67 -0
  199. package/tests/widget-index-dev-settings.spec.ts +52 -0
  200. package/tests/widget-twp-iframe.spec.ts +39 -0
  201. package/tsconfig.json +5 -0
@@ -1,115 +1,225 @@
1
1
  <div class="footerContainerAlert">
2
2
  <!-- LOGO-->
3
3
  <div id="hiddenFooter" *ngIf="!hideTextAreaContent && poweredBy" class="fade-in-bottom" [class.hideTextReply]="hideTextReply">
4
- <div tabindex="-1" class="c21-powered-by" [innerHTML]="poweredBy" (click)="managePoweredBy($event)"></div>
4
+ <div class="c21-powered-by" [innerHTML]="poweredBy" (click)="managePoweredBy($event)"></div>
5
5
  </div>
6
6
 
7
7
  <!-- ALERT EMOJI -->
8
- <div id="textAlert" *ngIf="!hideTextAreaContent && showAlertEmoji" class="fade-in-bottom" [class.hideTextReply]="hideTextReply">
9
- <svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" width="24px" height="24px" version="1.1" viewBox="0 0 110 135">
8
+ <div id="textAlert"
9
+ *ngIf="!hideTextAreaContent && showAlertEmoji"
10
+ role="alert"
11
+ aria-live="assertive"
12
+ class="fade-in-bottom"
13
+ [class.hideTextReply]="hideTextReply">
14
+ <svg aria-hidden="true" focusable="false" id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" width="24px" height="24px" version="1.1" viewBox="0 0 110 135">
10
15
  <path d="M55,25.8c-23,0-41.7,18.7-41.7,41.7s18.7,41.7,41.7,41.7,41.7-18.7,41.7-41.7-18.7-41.7-41.7-41.7ZM55,91.5c-3.4,0-6.2-2.8-6.2-6.2s2.8-6.2,6.2-6.2,6.2,2.8,6.2,6.2-2.8,6.2-6.2,6.2ZM60.3,70.1c-.2,2.8-2.5,4.9-5.3,4.9s-5.1-2.2-5.3-4.9l-1.6-22.3c-.3-4,2.9-7.4,6.9-7.4s7.2,3.4,6.9,7.4l-1.6,22.3Z"/>
11
- </svg>
12
- <div tabindex="-1" class="alertText">{{translationMap.get('EMOJI_NOT_ELLOWED')}}</div>
16
+ </svg>
17
+ <div class="alertText">{{translationMap.get('EMOJI_NOT_ELLOWED')}}</div>
18
+ </div>
19
+
20
+ <!-- STREAM AUDIO: status + waveform panel above footer -->
21
+ <div id="streamAudioAlert" *ngIf="!hideTextAreaContent && (isStreamAudioActive || isStreamAudioConnecting)"
22
+ class="fade-in-bottom stream-audio-alert" [class.hideTextReply]="hideTextReply"
23
+ role="status" [attr.aria-label]="voiceStatusLabel">
24
+ <div class="voice-status-row">
25
+ <span class="voice-status-dot"
26
+ [class.voice-status-dot--connecting]="isStreamAudioConnecting && !isStreamAudioActive"
27
+ [class.voice-status-dot--listening]="isStreamAudioActive && !isBotSpeaking"
28
+ [class.voice-status-dot--processing]="isStreamAudioActive && isBotSpeaking">
29
+ </span>
30
+ <span class="voice-status-text">{{ voiceStatusLabel }}</span>
31
+ <span class="voice-transcript-text" *ngIf="lastVoiceTranscript">{{ lastVoiceTranscript }}</span>
32
+ </div>
33
+ <chat-stream-audio-spectrum
34
+ mode="alert"
35
+ [volume]="isBotSpeaking ? 0 : currentVolume"
36
+ [accentColor]="stylesMap?.get('themeColor')">
37
+ </chat-stream-audio-spectrum>
13
38
  </div>
14
39
 
15
40
  </div>
16
41
 
17
- <!-- TEXTAREA + ICONS: conv active-->
18
- <div class="textarea-container" *ngIf="!hideTextAreaContent && !hideTextReply">
19
-
20
- <div *ngIf="!isStopRec" class="icons-container">
21
- <!-- ICON ATTACHMENT -->
22
- <label *ngIf="showAttachmentFooterButton" tabindex="1502" aria-label="allegati" for="chat21-file" class="chat21-textarea-button" [class.active]="!isFilePendingToUpload && !hideTextReply" id="chat21-start-upload-doc">
23
- <span class="v-align-center">
24
- <svg role="img" aria-labelledby="altIconTitle" xmlns="http://www.w3.org/2000/svg" width="24px" height="24" viewBox="0 0 24 24" fill="currentColor">
25
- <path d="M9.9,22.7c0,0-.1,0-.2,0-1.9.3-3.7-.2-5.2-1.4-3-2.3-3.6-6.4-1.4-9.5L9.5,2.5c.4-.5,1.1-.6,1.6-.3.5.4.6,1.1.3,1.6l-6.5,9.4c-1.4,2-1,4.8.9,6.3,1,.8,2.2,1.1,3.5.9,1.3-.2,2.4-.9,3.1-1.9l6-8.7c.9-1.2.6-3-.6-3.9-.6-.5-1.4-.6-2.1-.5-.8.1-1.4.5-1.9,1.1l-5.8,8.2c-.3.5-.2,1.1.2,1.5.2.2.5.3.8.2.3,0,.6-.2.7-.4l4.7-6.2c.4-.5,1.1-.6,1.6-.2.5.4.6,1.1.2,1.6l-4.7,6.2c-.5.7-1.4,1.2-2.3,1.3-.9.1-1.8-.2-2.5-.7-1.4-1.1-1.6-3.1-.6-4.6l5.8-8.2c.8-1.1,2-1.9,3.4-2.1,1.4-.2,2.7.1,3.8,1,2.2,1.7,2.7,4.8,1.1,7.1l-6,8.7c-1.1,1.5-2.6,2.5-4.4,2.8h0Z"/>
26
- <title id="altIconTitle">{{ 'MAX_ATTACHMENT' | translate: { FILE_SIZE_LIMIT: file_size_limit } }}</title>
27
- </svg>
28
-
29
- </span>
30
- <input
31
- [attr.disabled] = "(isFilePendingToUpload || isConversationArchived || hideTextReply)? true : null"
32
- tabindex="1503"
33
- type="file"
34
- aria-label="seleziona allegato"
35
- [accept]="fileUploadAccept"
36
- name="chat21-file"
37
- id="chat21-file"
38
- #chat21_file
39
- class="inputfile"
40
- [ngStyle]="{'display': 'block', height:'1px', width:'1px', overflow: 'hidden' }"
41
- (change)="detectFiles($event)"/>
42
- </label>
43
- <!-- ICON EMOJII -->
44
- <label *ngIf="showEmojiFooterButton" tabindex="1504" aria-label="emojii" for="chat21-emojii" class="chat21-textarea-button" [class.active]="!isFilePendingToUpload && !hideTextReply" id="chat21-emoticon-picker" (click)="onEmojiiPickerClicked()">
42
+ <div class="textarea-container-wrapper" *ngIf="!hideTextAreaContent && !hideTextReply">
43
+ <!-- TEXTAREA + ICONS: conv active-->
44
+ <div class="textarea-container" [class.voice-mode]="isStreamAudioActive || isStreamAudioConnecting">
45
+
46
+ <div *ngIf="!isStopRec && !(isStreamAudioActive || isStreamAudioConnecting)" class="icons-container">
47
+ <!-- ICON ATTACHMENT -->
48
+ <label *ngIf="showAttachmentFooterButton"
49
+ for="chat21-file"
50
+ role="button"
51
+ tabindex="0"
52
+ [attr.aria-label]="translationMap?.get('BUTTON_ATTACH_FILE')"
53
+ [attr.title]="'MAX_ATTACHMENT' | translate: { FILE_SIZE_LIMIT: file_size_limit }"
54
+ class="chat21-textarea-button"
55
+ [class.active]="!isFilePendingToUpload && !hideTextReply"
56
+ id="chat21-start-upload-doc"
57
+ (keydown.enter)="$event.preventDefault(); chat21_file.click()"
58
+ (keydown.space)="$event.preventDefault(); chat21_file.click()">
59
+ <span class="v-align-center">
60
+ <svg aria-hidden="true" focusable="false" xmlns="http://www.w3.org/2000/svg" width="24px" height="24" viewBox="0 0 24 24" fill="currentColor">
61
+ <path d="M9.9,22.7c0,0-.1,0-.2,0-1.9.3-3.7-.2-5.2-1.4-3-2.3-3.6-6.4-1.4-9.5L9.5,2.5c.4-.5,1.1-.6,1.6-.3.5.4.6,1.1.3,1.6l-6.5,9.4c-1.4,2-1,4.8.9,6.3,1,.8,2.2,1.1,3.5.9,1.3-.2,2.4-.9,3.1-1.9l6-8.7c.9-1.2.6-3-.6-3.9-.6-.5-1.4-.6-2.1-.5-.8.1-1.4.5-1.9,1.1l-5.8,8.2c-.3.5-.2,1.1.2,1.5.2.2.5.3.8.2.3,0,.6-.2.7-.4l4.7-6.2c.4-.5,1.1-.6,1.6-.2.5.4.6,1.1.2,1.6l-4.7,6.2c-.5.7-1.4,1.2-2.3,1.3-.9.1-1.8-.2-2.5-.7-1.4-1.1-1.6-3.1-.6-4.6l5.8-8.2c.8-1.1,2-1.9,3.4-2.1,1.4-.2,2.7.1,3.8,1,2.2,1.7,2.7,4.8,1.1,7.1l-6,8.7c-1.1,1.5-2.6,2.5-4.4,2.8h0Z"/>
62
+ <title id="altIconTitle">{{ maxAttachmentLabel }}</title>
63
+ </svg>
64
+
65
+ </span>
66
+ <input
67
+ [attr.disabled]="(isFilePendingToUpload || isConversationArchived || hideTextReply)? true : null"
68
+ tabindex="-1"
69
+ type="file"
70
+ [attr.aria-label]="translationMap?.get('BUTTON_ATTACH_FILE')"
71
+ [accept]="fileUploadAccept"
72
+ name="chat21-file"
73
+ id="chat21-file"
74
+ #chat21_file
75
+ class="inputfile"
76
+ [ngStyle]="{'display': 'block', height:'1px', width:'1px', overflow: 'hidden' }"
77
+ (change)="detectFiles($event)"/>
78
+ </label>
79
+ <!-- ICON EMOJII -->
80
+ <label *ngIf="showEmojiFooterButton"
81
+ for="chat21-emojii"
82
+ role="button"
83
+ tabindex="0"
84
+ [attr.aria-label]="translationMap?.get('EMOJI')"
85
+ [attr.aria-pressed]="isEmojiiPickerShow ? 'true' : 'false'"
86
+ class="chat21-textarea-button"
87
+ [class.active]="!isFilePendingToUpload && !hideTextReply"
88
+ id="chat21-emoticon-picker"
89
+ (click)="onEmojiiPickerClicked()"
90
+ (keydown.enter)="$event.preventDefault(); onEmojiiPickerClicked()"
91
+ (keydown.space)="$event.preventDefault(); onEmojiiPickerClicked()">
92
+ <span class="v-align-center">
93
+ <svg role="img" aria-labelledby="altIconTitle" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" fill="currentColor">
94
+ <path stroke-width=".4px" stroke="currentColor" d="M12,20.8c-5.1,0-9.3-4.2-9.3-9.3S6.9,2.2,12,2.2s9.3,4.2,9.3,9.3-4.2,9.3-9.3,9.3ZM12,3.6c-4.4,0-7.9,3.6-7.9,7.9s3.6,7.9,7.9,7.9,7.9-3.6,7.9-7.9-3.6-7.9-7.9-7.9Z"/>
95
+ <path stroke-width=".4px" stroke="currentColor" d="M12,17.2c-2.7,0-4.3-1.9-4.6-2.3-.2-.3-.2-.7.1-1s.7-.2,1,.1c.1.2,1.4,1.8,3.5,1.8s2.2,0,3.5-1.8c.2-.3.7-.4,1-.1s.4.7.1,1c-1.7,2.2-4.1,2.3-4.6,2.3Z"/>
96
+ <path d="M8.7,10.9c-.9,0-1.6-.7-1.6-1.6s.7-1.6,1.6-1.6,1.6.7,1.6,1.6-.7,1.6-1.6,1.6Z"/>
97
+ <path d="M15.5,10.9c-.9,0-1.6-.7-1.6-1.6s.7-1.6,1.6-1.6,1.6.7,1.6,1.6-.7,1.6-1.6,1.6Z"/>
98
+ </svg>
99
+ </span>
100
+ </label>
101
+ </div>
102
+
103
+
104
+
105
+
106
+ <div *ngIf="!isStopRec"
107
+ class="visible-text-area"
108
+ [class.stream-active]="isStreamAudioActive || isStreamAudioConnecting"
109
+ [class.hasError]="showAlertEmoji"
110
+ [class.disabled]="(isConversationArchived || hideTextReply)? true : null">
111
+ <!-- Voice mode: inline status chip -->
112
+ <div class="voice-inline-status" *ngIf="isStreamAudioActive || isStreamAudioConnecting" role="status" aria-live="polite">
113
+ <span class="voice-inline-dot"
114
+ [class.voice-inline-dot--connecting]="isStreamAudioConnecting && !isStreamAudioActive"
115
+ [class.voice-inline-dot--processing]="isStreamAudioActive && isBotSpeaking">
116
+ </span>
117
+ <span class="voice-inline-label">{{ voiceStatusLabel }}</span>
118
+ </div>
119
+ <!-- Normal mode: textarea -->
120
+ <textarea
121
+ *ngIf="!(isStreamAudioActive || isStreamAudioConnecting)"
122
+ [attr.disabled]="(hideTextReply)? true : null"
123
+ [attr.placeholder]="(footerMessagePlaceholder)? footerMessagePlaceholder : translationMap?.get('LABEL_PLACEHOLDER')"
124
+ [attr.aria-label]="(footerMessagePlaceholder)? footerMessagePlaceholder : translationMap?.get('LABEL_PLACEHOLDER')"
125
+ [attr.aria-multiline]="true"
126
+ [attr.aria-invalid]="showAlertEmoji ? 'true' : 'false'"
127
+ start-focus-chat21-conversation-component
128
+ inputTextArea
129
+ #textbox
130
+ rows="1"
131
+ id="chat21-main-message-context"
132
+ class='f21textarea c21-button-clean'
133
+ [(ngModel)]="textInputTextArea"
134
+ (ngModelChange)="onTextAreaChange()"
135
+ (keydown)="onkeydown($event)"
136
+ (paste)="onPaste($event)">
137
+ </textarea>
138
+
139
+ </div>
140
+
141
+ <!-- ICON SEND -->
142
+ <button type="button"
143
+ *ngIf="(textInputTextArea !== '' && !isStopRec) || !showAudioRecorderFooterButton"
144
+ class="chat21-textarea-button c21-button-clean"
145
+ [class.disabled]="showAlertEmoji"
146
+ [class.active]="textInputTextArea && !hideTextReply"
147
+ [attr.aria-label]="translationMap?.get('BUTTON_SEND_MESSAGE')"
148
+ [attr.disabled]="(showAlertEmoji || !textInputTextArea || hideTextReply) ? true : null"
149
+ id="chat21-button-send"
150
+ (click)="onSendPressed($event)">
45
151
  <span class="v-align-center">
46
- <svg role="img" aria-labelledby="altIconTitle" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" fill="currentColor">
47
- <path stroke-width=".4px" stroke="currentColor" d="M12,20.8c-5.1,0-9.3-4.2-9.3-9.3S6.9,2.2,12,2.2s9.3,4.2,9.3,9.3-4.2,9.3-9.3,9.3ZM12,3.6c-4.4,0-7.9,3.6-7.9,7.9s3.6,7.9,7.9,7.9,7.9-3.6,7.9-7.9-3.6-7.9-7.9-7.9Z"/>
48
- <path stroke-width=".4px" stroke="currentColor" d="M12,17.2c-2.7,0-4.3-1.9-4.6-2.3-.2-.3-.2-.7.1-1s.7-.2,1,.1c.1.2,1.4,1.8,3.5,1.8s2.2,0,3.5-1.8c.2-.3.7-.4,1-.1s.4.7.1,1c-1.7,2.2-4.1,2.3-4.6,2.3Z"/>
49
- <path d="M8.7,10.9c-.9,0-1.6-.7-1.6-1.6s.7-1.6,1.6-1.6,1.6.7,1.6,1.6-.7,1.6-1.6,1.6Z"/>
50
- <path d="M15.5,10.9c-.9,0-1.6-.7-1.6-1.6s.7-1.6,1.6-1.6,1.6.7,1.6,1.6-.7,1.6-1.6,1.6Z"/>
51
- <title id="altIconTitle">{{ translationMap?.get('EMOJI') }}</title>
52
-
53
- <!-- <path d="M0,0H20.57V20.57H0V0Z" fill="none"/>
54
- <circle cx="15.02" cy="9.86" r="1.29"/>
55
- <circle cx="9.02" cy="9.86" r="1.29"/>
56
- <path d="M12.02,15.43c-1.27,0-2.36-.69-2.96-1.71h-1.43c.69,1.76,2.39,3,4.39,3s3.7-1.24,4.39-3h-1.43c-.6,1.02-1.69,1.71-2.96,1.71Zm0-12C7.28,3.43,3.45,7.27,3.45,12s3.83,8.57,8.56,8.57,8.58-3.84,8.58-8.57S16.75,3.43,12.01,3.43Zm0,15.43c-3.79,0-6.86-3.07-6.86-6.86s3.07-6.86,6.86-6.86,6.86,3.07,6.86,6.86-3.07,6.86-6.86,6.86Z"/> -->
152
+ <svg aria-hidden="true" focusable="false" xmlns="http://www.w3.org/2000/svg" height="24" width="24" viewBox="0 0 24 24" fill="currentColor">
153
+ <path d="M1.8,20.6V3.4l20.2,8.6L1.8,20.6ZM3.9,17.3l12.6-5.4L3.9,6.6v3.7l6.4,1.6-6.4,1.6v3.8ZM3.9,17.3V6.6v10.7Z"/>
57
154
  </svg>
58
155
  </span>
59
- </label>
60
- </div>
156
+ </button>
61
157
 
158
+ <!-- ICON REC -->
159
+ <div *ngIf="showAudioRecorderFooterButton && !textInputTextArea"
160
+ class="chat21-audio-button"
161
+ [class.active]="isStopRec"
162
+ id="chat21-button-rec">
163
+ <chat-audio-recorder
164
+ [translationMap]="translationMap"
165
+ (startRecordingEvent)="onStartRecording()"
166
+ (deleteRecordingEvent)="onDeleteRecording()"
167
+ (endRecordingEvent)="onEndRecording($event)"
168
+ (sendRecordingEvent)="onSendRecording($event)"
169
+ [stylesMap]="stylesMap">
170
+ </chat-audio-recorder>
171
+ </div>
62
172
 
63
-
64
-
65
- <div *ngIf="!isStopRec" class="visible-text-area" [class.hasError]="showAlertEmoji" [class.disabled] = "( isConversationArchived || hideTextReply)? true : null">
66
- <!-- isFilePendingToUpload || -->
67
- <textarea
68
- [attr.disabled] = "(hideTextReply)? true : null"
69
- [attr.placeholder] ="(footerMessagePlaceholder)? footerMessagePlaceholder : translationMap?.get('LABEL_PLACEHOLDER')"
70
- start-focus-chat21-conversation-component
71
- inputTextArea
72
- #textbox
73
- tabindex="1501"
74
- aria-labelledby="altTextArea"
75
- rows="1"
76
- id="chat21-main-message-context"
77
- class='f21textarea c21-button-clean'
78
- [(ngModel)]="textInputTextArea"
79
- (ngModelChange)="onTextAreaChange()"
80
- (keypress)="onkeypress($event)"
81
- (keydown)="onkeydown($event)"
82
- (paste)="onPaste($event)">
83
- </textarea>
84
-
173
+ <!-- ICON STREAM / CHIUDI STREAM (cerchio, icone bianche su iconColor) -->
174
+ <div *ngIf="showAudioStreamFooterButton" tabindex="-1" id="chat21-button-stream"
175
+ class="chat21-textarea-button chat21-stream-button"
176
+ [class.active]="isStreamAudioActive || isStreamAudioConnecting || (!textInputTextArea && !hideTextReply)"
177
+ [class.chat21-stream-button--expanded]="isStreamAudioActive || isStreamAudioConnecting"
178
+ (click)="onStreamPressed($event)" [attr.aria-label]="(isStreamAudioActive || isStreamAudioConnecting) ? (translationMap?.get('CLOSE') || 'Chiudi stream') : (translationMap?.get('STREAM_AUDIO') || 'Stream audio')">
179
+ <chat-stream-audio-spectrum
180
+ mode="button"
181
+ [active]="isStreamAudioActive || isStreamAudioConnecting"
182
+ [volume]="currentVolume"
183
+ [translationMap]="translationMap">
184
+ </chat-stream-audio-spectrum>
185
+ </div>
85
186
  </div>
86
187
 
87
- <!-- ICON SEND -->
88
- <div *ngIf="(textInputTextArea !== '' && !isStopRec) || !showAudioRecorderFooterButton" tabindex="-1" class="chat21-textarea-button" [class.disabled]="showAlertEmoji" [class.active]="textInputTextArea && !hideTextReply" id="chat21-button-send" (click)="onSendPressed($event)">
89
- <span class="v-align-center">
90
- <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" height="24" width="24" viewBox="0 0 24 24" style="enable-background:new 0 0 24 24;" xml:space="preserve" fill="currentColor">
91
- <path d="M1.8,20.6V3.4l20.2,8.6L1.8,20.6ZM3.9,17.3l12.6-5.4L3.9,6.6v3.7l6.4,1.6-6.4,1.6v3.8ZM3.9,17.3V6.6v10.7Z"/>
92
- </svg>
93
- </span>
94
- </div>
95
188
 
96
- <!-- ICON REC -->
97
- <div *ngIf="showAudioRecorderFooterButton && !textInputTextArea" tabindex="-1" class="chat21-audio-button" [class.active]="isStopRec" id="chat21-button-rec">
98
- <chat-audio-recorder
99
- (startRecordingEvent)="onStartRecording()"
100
- (deleteRecordingEvent)="onDeleteRecording()"
101
- (endRecordingEvent)="onEndRecording($event)"
102
- (sendRecordingEvent)="onSendRecording($event)"
103
- [stylesMap]="stylesMap">
104
- </chat-audio-recorder>
189
+ <div class="close-chat-container" *ngIf="closeChatInConversation">
190
+ <button tabindex="1040" aflistconv #aflistconv class="c21-button-primary c21-close" (click)="onCloseChat($event)" [ngStyle]="{'background-color': stylesMap.get('themeColor'), 'border-color': stylesMap.get('themeColor'), 'color': stylesMap?.get('foregroundColor')}">
191
+ <span class="v-align-center">
192
+ <!-- <svg [ngStyle]="{'fill': 'yellow' }" xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24">
193
+ <path d="M2.01 21L23 12 2.01 3 2 10l15 2-15 2z" [ngStyle]="{'fill': stylesMap?.get('foregroundColor')}"/>
194
+ </svg> -->
195
+ <svg [ngStyle]="{'stroke': stylesMap?.get('foregroundColor'), 'fill': stylesMap?.get('foregroundColor') }" role="img" id="archive" aria-labelledby="altIconTitle" class="icon-menu" xmlns="http://www.w3.org/2000/svg"
196
+ width="15px" height="15px" viewBox="0 0 512 512">
197
+ <path d="M80 152v256a40.12 40.12 0 0040 40h272a40.12 40.12 0 0040-40V152" stroke-linecap="round" stroke-linejoin="round" stroke-width="50px" fill="none"></path>
198
+ <rect x="48" y="64" width="416" height="80" rx="28" ry="28" stroke-linejoin="round" stroke-width="50px" fill="none" ></rect>
199
+ <path stroke-linecap="round" stroke-linejoin="round" d="M320 304l-64 64-64-64M256 345.89V224" stroke-width="50px" fill="none"></path>
200
+ <title id="altIconTitle">{{ translationMap?.get('CLOSE_CHAT') }}</title>
201
+ </svg>
202
+ </span>
203
+ <span class="v-align-center c21-label-button">
204
+ {{translationMap?.get('CLOSE_CHAT')}}
205
+ </span>
206
+ <div class="clear"></div>
207
+ </button>
105
208
  </div>
209
+
106
210
  </div>
107
211
 
108
212
 
109
213
  <!-- EMOJII PICKER-->
110
- <div [style.visibility]="isEmojiiPickerShow?'visible':'hidden'" class="emoji-container" id="emoji-mart-container" #emoji_mart_container>
214
+ <div [style.visibility]="isEmojiiPickerShow?'visible':'hidden'"
215
+ class="emoji-container"
216
+ id="emoji-mart-container"
217
+ role="dialog"
218
+ [attr.aria-hidden]="!isEmojiiPickerShow"
219
+ [attr.aria-label]="translationMap?.get('EMOJI')"
220
+ #emoji_mart_container>
111
221
  <!-- <ng-container #emojii_container></ng-container> -->
112
- <emoji-mart id="emoji-mart"
222
+ <emoji-mart id="emoji-mart"
113
223
  *ngIf="showEmojiPicker"
114
224
  class="emoji-mart"
115
225
  [showPreview]="emojiiOptions?.showPreview"
@@ -125,10 +235,10 @@
125
235
 
126
236
  <!-- NEW CONV & CONTINE buttons: conv archived-->
127
237
  <div id="floating-container" *ngIf="hideTextAreaContent" class="fade-in-bottom" start-focus-chat21-conversation-component>
128
- <button tabindex="1040" aflistconv #aflistconv class="c21-button-primary" (click)="openNewConversation()" [ngStyle]="{'background-color': stylesMap.get('themeColor'), 'border-color': stylesMap.get('themeColor'), 'color': stylesMap?.get('foregroundColor')}">
238
+ <button type="button" aflistconv #aflistconv class="c21-button-primary" (click)="openNewConversation()" [ngStyle]="{'background-color': stylesMap.get('themeColor'), 'border-color': stylesMap.get('themeColor'), 'color': stylesMap?.get('foregroundColor')}">
129
239
  <span class="v-align-center">
130
- <svg [ngStyle]="{'fill': 'yellow' }" xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24">
131
- <path d="M2.01 21L23 12 2.01 3 2 10l15 2-15 2z" [ngStyle]="{'fill': stylesMap?.get('foregroundColor')}"/>
240
+ <svg aria-hidden="true" focusable="false" xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24">
241
+ <path d="M2.01 21L23 12 2.01 3 2 10l15 2-15 2z" [ngStyle]="{'fill': stylesMap?.get('foregroundColor')}"/>
132
242
  </svg>
133
243
  </span>
134
244
  <span class="v-align-center c21-label-button">
@@ -136,10 +246,4 @@
136
246
  </span>
137
247
  <div class="clear"></div>
138
248
  </button>
139
- <!-- <button *ngIf="showContinueConversationButton" tabindex="1040" class="c21-button-primary" (click)="onContinueConversation()" [ngStyle]="{'background-color': stylesMap.get('themeColor'), 'border-color': stylesMap.get('themeColor'), 'color': stylesMap?.get('foregroundColor')}">
140
- <span class="v-align-center c21-label-button">
141
- {{translationMap?.get('CONTINUE')}}
142
- </span>
143
- <div class="clear"></div>
144
- </button> -->
145
249
  </div>
@@ -1,10 +1,10 @@
1
-
1
+ .textarea-container-wrapper{
2
+ display: flex;
3
+ flex-direction: column;
4
+ gap: 8px;
5
+ }
2
6
  .textarea-container{
3
- // padding: 8px 34px;
4
- // padding-left: 70px;
5
- // padding-right: 45px;
6
7
  display: flex;
7
- // width: 100%;
8
8
  align-items: center;
9
9
  justify-content: space-between;
10
10
  gap: 8px;
@@ -16,8 +16,20 @@
16
16
  //if attachment icon AND emoji icon is not in DOM -> increment textarea width
17
17
  &:has(:not(#chat21-start-upload-doc)):has(:not(#chat21-emoticon-picker)) .visible-text-area {
18
18
  width: 90%;
19
- }
19
+ }
20
+ }
21
+
22
+ .close-chat-container{
23
+ display: flex;
24
+ flex-direction: column;
25
+ align-items: center;
26
+ justify-content: center;
27
+ gap: 8px;
20
28
 
29
+ .c21-close{
30
+ height: 30px !important;
31
+ margin: 0px !important;
32
+ }
21
33
  }
22
34
 
23
35
  .icons-container{
@@ -30,6 +42,7 @@
30
42
 
31
43
  .visible-text-area {
32
44
  width: 70%;
45
+ transition: width 220ms ease;
33
46
  // margin: 12px 0px;
34
47
  pointer-events: auto;
35
48
  border-radius: var(--chat-footer-border-radius);
@@ -40,6 +53,15 @@
40
53
  &.hasError{
41
54
  box-shadow: 0 0 0 1px var(--chat-footer-border-color-error) inset;
42
55
  }
56
+
57
+ &.stream-active {
58
+ flex: 1;
59
+ width: auto;
60
+ min-width: 0;
61
+ background-color: transparent;
62
+ display: flex;
63
+ align-items: center;
64
+ }
43
65
  }
44
66
 
45
67
  .chat21-textarea-button {
@@ -82,6 +104,39 @@
82
104
  border-radius: 50%;
83
105
  }
84
106
 
107
+ /** Stream audio: cerchio pieno, glyph bianco su sfondo iconColor (stylesMap) */
108
+ .chat21-stream-button.chat21-textarea-button {
109
+ width: 36px;
110
+ height: 36px;
111
+ min-width: 36px;
112
+ border-radius: 50%;
113
+ overflow: hidden;
114
+ box-sizing: border-box;
115
+ flex-shrink: 0;
116
+ color: #ffffff;
117
+ transition: min-width 220ms ease, border-radius 180ms ease, padding 180ms ease;
118
+
119
+ &:hover{
120
+ background: rgba(240, 240, 240, 0.4) !important;
121
+ transition: all 0.45s ease-in-out 0s !important;
122
+ -moz-transition: all 0.45s ease-in-out 0s !important;
123
+ -webkit-transition: all 0.45s ease-in-out 0s !important;
124
+ }
125
+
126
+ &.chat21-stream-button--expanded {
127
+ min-width: 110px;
128
+ border-radius: 999px;
129
+ // padding: 0 14px;
130
+ justify-content: center;
131
+
132
+ // stop the circle-hover background from looking odd on pill
133
+ &.chat21-textarea-button span svg:hover {
134
+ background: transparent !important;
135
+ border-radius: 0;
136
+ }
137
+ }
138
+ }
139
+
85
140
  textarea,
86
141
  textarea:visited,
87
142
  textarea:focus,
@@ -364,6 +419,85 @@ textarea:active{
364
419
  }
365
420
  }
366
421
 
422
+ #streamAudioAlert {
423
+ bottom: 100%;
424
+ width: 100%;
425
+ height: var(--chat-footer-stream-button-height);
426
+ display: flex;
427
+ flex-direction: column;
428
+ justify-content: center;
429
+ position: absolute;
430
+ // padding: 8px 16px;
431
+ overflow: hidden;
432
+ background-color: color-mix(in srgb, var(--content-background-color) 34%, transparent);
433
+ backdrop-filter: blur(20px) saturate(1.2);
434
+ -webkit-backdrop-filter: blur(20px) saturate(1.2);
435
+ box-shadow:
436
+ inset 0 1px 0 rgba(255, 255, 255, 0.28),
437
+ 0 1px 0 rgba(0, 0, 0, 0.05);
438
+
439
+ .voice-status-row {
440
+ display: flex;
441
+ align-items: center;
442
+ gap: 8px;
443
+ margin-bottom: 6px;
444
+ min-height: 18px;
445
+ }
446
+
447
+ .voice-status-dot {
448
+ width: 8px;
449
+ height: 8px;
450
+ border-radius: 50%;
451
+ flex-shrink: 0;
452
+ background-color: #b0b0b0;
453
+ animation: pulse-dot 2s ease-in-out infinite;
454
+
455
+ &--connecting {
456
+ background-color: #f59e0b;
457
+ }
458
+ &--listening {
459
+ background-color: #22c55e;
460
+ }
461
+ &--processing {
462
+ background-color: #3b82f6;
463
+ animation: pulse-dot 1s ease-in-out infinite;
464
+ }
465
+ }
466
+
467
+ .voice-status-text {
468
+ font-size: 12px;
469
+ font-weight: 600;
470
+ letter-spacing: 0.02em;
471
+ color: var(--chat-footer-color);
472
+ white-space: nowrap;
473
+ }
474
+
475
+ .voice-transcript-text {
476
+ font-size: 11px;
477
+ font-style: italic;
478
+ color: var(--dark-gray);
479
+ white-space: nowrap;
480
+ overflow: hidden;
481
+ text-overflow: ellipsis;
482
+ flex: 1;
483
+ min-width: 0;
484
+
485
+ &::before {
486
+ content: '· ';
487
+ }
488
+ }
489
+
490
+ &.hideTextReply {
491
+ position: unset;
492
+ height: auto;
493
+ padding: 16px;
494
+ box-shadow: none;
495
+ backdrop-filter: none;
496
+ -webkit-backdrop-filter: none;
497
+ background-color: var(--content-background-color);
498
+ }
499
+ }
500
+
367
501
  #textAlert{
368
502
  bottom: 100%;
369
503
  width: 100%;
@@ -419,3 +553,74 @@ textarea:active{
419
553
  border: none;
420
554
  // margin: -2px -2px 0px;
421
555
  }
556
+
557
+
558
+ // aggiungi un'animazione di fade in e fade out quando .star-rating-widget è visibile con transition
559
+ .star-rating-widget {
560
+ transition: all 0.5s ease-in-out;
561
+ }
562
+
563
+ .star-rating-widget {
564
+ position: absolute;
565
+ left: 0;
566
+ right: 0;
567
+ bottom: -52px;
568
+ height: 100%;
569
+ width: 100%;
570
+ flex-direction: row;
571
+ justify-content: center;
572
+ background-color: rgb(255, 255, 255);
573
+ flex-wrap: nowrap;
574
+ &.active {
575
+ bottom: 0px;
576
+ }
577
+ &.inactive {
578
+ bottom: -52px;
579
+ }
580
+ }
581
+ .voice-preview {
582
+ font-style: italic;
583
+ opacity: 0.65;
584
+ }
585
+
586
+ // Voice mode: footer row layout when voice UI is active
587
+ .textarea-container.voice-mode {
588
+ justify-content: flex-end;
589
+ }
590
+
591
+ // Inline voice status chip (inside .visible-text-area when stream active)
592
+ .voice-inline-status {
593
+ display: flex;
594
+ align-items: center;
595
+ gap: 8px;
596
+ padding: 0 4px;
597
+
598
+ .voice-inline-dot {
599
+ width: 8px;
600
+ height: 8px;
601
+ border-radius: 50%;
602
+ flex-shrink: 0;
603
+ background-color: #22c55e;
604
+ animation: pulse-dot 2s ease-in-out infinite;
605
+
606
+ &--connecting {
607
+ background-color: #f59e0b;
608
+ }
609
+ &--processing {
610
+ background-color: #3b82f6;
611
+ animation: pulse-dot 1s ease-in-out infinite;
612
+ }
613
+ }
614
+
615
+ .voice-inline-label {
616
+ font-size: 12px;
617
+ font-weight: 500;
618
+ color: var(--dark-gray);
619
+ white-space: nowrap;
620
+ }
621
+ }
622
+
623
+ @keyframes pulse-dot {
624
+ 0%, 100% { opacity: 1; transform: scale(1); }
625
+ 50% { opacity: 0.45; transform: scale(0.75); }
626
+ }