@memberjunction/ng-conversations 5.43.0 → 5.45.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (405) hide show
  1. package/dist/lib/components/active-tasks/active-tasks-panel.component.d.ts +0 -1
  2. package/dist/lib/components/active-tasks/active-tasks-panel.component.d.ts.map +1 -1
  3. package/dist/lib/components/active-tasks/active-tasks-panel.component.js +56 -52
  4. package/dist/lib/components/active-tasks/active-tasks-panel.component.js.map +1 -1
  5. package/dist/lib/components/artifact/artifact-share-modal.component.d.ts +3 -1
  6. package/dist/lib/components/artifact/artifact-share-modal.component.d.ts.map +1 -1
  7. package/dist/lib/components/artifact/artifact-share-modal.component.js +52 -52
  8. package/dist/lib/components/artifact/artifact-share-modal.component.js.map +1 -1
  9. package/dist/lib/components/collection/collection-form-modal.component.d.ts.map +1 -1
  10. package/dist/lib/components/collection/collection-form-modal.component.js +10 -14
  11. package/dist/lib/components/collection/collection-form-modal.component.js.map +1 -1
  12. package/dist/lib/components/collection/collection-share-modal.component.d.ts +3 -1
  13. package/dist/lib/components/collection/collection-share-modal.component.d.ts.map +1 -1
  14. package/dist/lib/components/collection/collection-share-modal.component.js +56 -56
  15. package/dist/lib/components/collection/collection-share-modal.component.js.map +1 -1
  16. package/dist/lib/components/collection/collection-tree.component.d.ts +3 -1
  17. package/dist/lib/components/collection/collection-tree.component.d.ts.map +1 -1
  18. package/dist/lib/components/collection/collection-tree.component.js +10 -7
  19. package/dist/lib/components/collection/collection-tree.component.js.map +1 -1
  20. package/dist/lib/components/collection/collection-view.component.d.ts +3 -1
  21. package/dist/lib/components/collection/collection-view.component.d.ts.map +1 -1
  22. package/dist/lib/components/collection/collection-view.component.js +29 -41
  23. package/dist/lib/components/collection/collection-view.component.js.map +1 -1
  24. package/dist/lib/components/collection/collections-full-view.component.d.ts +4 -0
  25. package/dist/lib/components/collection/collections-full-view.component.d.ts.map +1 -1
  26. package/dist/lib/components/collection/collections-full-view.component.js +134 -166
  27. package/dist/lib/components/collection/collections-full-view.component.js.map +1 -1
  28. package/dist/lib/components/composer/ai-composer.component.d.ts +103 -0
  29. package/dist/lib/components/composer/ai-composer.component.d.ts.map +1 -0
  30. package/dist/lib/components/composer/ai-composer.component.js +263 -0
  31. package/dist/lib/components/composer/ai-composer.component.js.map +1 -0
  32. package/dist/lib/components/conversation/conversation-chat-area.component.d.ts +76 -12
  33. package/dist/lib/components/conversation/conversation-chat-area.component.d.ts.map +1 -1
  34. package/dist/lib/components/conversation/conversation-chat-area.component.js +522 -158
  35. package/dist/lib/components/conversation/conversation-chat-area.component.js.map +1 -1
  36. package/dist/lib/components/conversation/conversation-empty-state.component.d.ts +1 -1
  37. package/dist/lib/components/conversation/conversation-empty-state.component.d.ts.map +1 -1
  38. package/dist/lib/components/conversation/conversation-empty-state.component.js.map +1 -1
  39. package/dist/lib/components/conversation/pinned-messages-panel.component.js +6 -9
  40. package/dist/lib/components/conversation/pinned-messages-panel.component.js.map +1 -1
  41. package/dist/lib/components/library/library-full-view.component.d.ts.map +1 -1
  42. package/dist/lib/components/library/library-full-view.component.js +20 -24
  43. package/dist/lib/components/library/library-full-view.component.js.map +1 -1
  44. package/dist/lib/components/members/members-modal.component.d.ts.map +1 -1
  45. package/dist/lib/components/members/members-modal.component.js +10 -11
  46. package/dist/lib/components/members/members-modal.component.js.map +1 -1
  47. package/dist/lib/components/message/message-input.component.d.ts +87 -23
  48. package/dist/lib/components/message/message-input.component.d.ts.map +1 -1
  49. package/dist/lib/components/message/message-input.component.js +245 -158
  50. package/dist/lib/components/message/message-input.component.js.map +1 -1
  51. package/dist/lib/components/message/message-item.component.d.ts +11 -3
  52. package/dist/lib/components/message/message-item.component.d.ts.map +1 -1
  53. package/dist/lib/components/message/message-item.component.js +73 -21
  54. package/dist/lib/components/message/message-item.component.js.map +1 -1
  55. package/dist/lib/components/message/message-list.component.js +6 -9
  56. package/dist/lib/components/message/message-list.component.js.map +1 -1
  57. package/dist/lib/components/overlay/chat-overlay.component.d.ts +4 -1
  58. package/dist/lib/components/overlay/chat-overlay.component.d.ts.map +1 -1
  59. package/dist/lib/components/overlay/chat-overlay.component.js +9 -4
  60. package/dist/lib/components/overlay/chat-overlay.component.js.map +1 -1
  61. package/dist/lib/components/realtime/channels/base-realtime-channel-client.d.ts +45 -0
  62. package/dist/lib/components/realtime/channels/base-realtime-channel-client.d.ts.map +1 -1
  63. package/dist/lib/components/realtime/channels/base-realtime-channel-client.js +10 -0
  64. package/dist/lib/components/realtime/channels/base-realtime-channel-client.js.map +1 -1
  65. package/dist/lib/components/realtime/channels/client-context-channel.d.ts +46 -0
  66. package/dist/lib/components/realtime/channels/client-context-channel.d.ts.map +1 -0
  67. package/dist/lib/components/realtime/channels/client-context-channel.js +174 -0
  68. package/dist/lib/components/realtime/channels/client-context-channel.js.map +1 -0
  69. package/dist/lib/components/realtime/evidence-playback/realtime-evidence-playback.component.d.ts +123 -0
  70. package/dist/lib/components/realtime/evidence-playback/realtime-evidence-playback.component.d.ts.map +1 -0
  71. package/dist/lib/components/realtime/evidence-playback/realtime-evidence-playback.component.js +397 -0
  72. package/dist/lib/components/realtime/evidence-playback/realtime-evidence-playback.component.js.map +1 -0
  73. package/dist/lib/components/realtime/media/media-channel-state.d.ts +103 -0
  74. package/dist/lib/components/realtime/media/media-channel-state.d.ts.map +1 -0
  75. package/dist/lib/components/realtime/media/media-channel-state.js +143 -0
  76. package/dist/lib/components/realtime/media/media-channel-state.js.map +1 -0
  77. package/dist/lib/components/realtime/media/media-channel-tools.d.ts +24 -0
  78. package/dist/lib/components/realtime/media/media-channel-tools.d.ts.map +1 -0
  79. package/dist/lib/components/realtime/media/media-channel-tools.js +107 -0
  80. package/dist/lib/components/realtime/media/media-channel-tools.js.map +1 -0
  81. package/dist/lib/components/realtime/media/media-channel.d.ts +89 -0
  82. package/dist/lib/components/realtime/media/media-channel.d.ts.map +1 -0
  83. package/dist/lib/components/realtime/media/media-channel.js +253 -0
  84. package/dist/lib/components/realtime/media/media-channel.js.map +1 -0
  85. package/dist/lib/components/realtime/media/realtime-media-surface.component.d.ts +141 -0
  86. package/dist/lib/components/realtime/media/realtime-media-surface.component.d.ts.map +1 -0
  87. package/dist/lib/components/realtime/media/realtime-media-surface.component.js +574 -0
  88. package/dist/lib/components/realtime/media/realtime-media-surface.component.js.map +1 -0
  89. package/dist/lib/components/realtime/realtime-activity-rail.component.d.ts +59 -14
  90. package/dist/lib/components/realtime/realtime-activity-rail.component.d.ts.map +1 -1
  91. package/dist/lib/components/realtime/realtime-activity-rail.component.js +277 -74
  92. package/dist/lib/components/realtime/realtime-activity-rail.component.js.map +1 -1
  93. package/dist/lib/components/realtime/realtime-agent-banner.component.d.ts +28 -27
  94. package/dist/lib/components/realtime/realtime-agent-banner.component.d.ts.map +1 -1
  95. package/dist/lib/components/realtime/realtime-agent-banner.component.js +144 -143
  96. package/dist/lib/components/realtime/realtime-agent-banner.component.js.map +1 -1
  97. package/dist/lib/components/realtime/realtime-agent-picker.component.d.ts +12 -0
  98. package/dist/lib/components/realtime/realtime-agent-picker.component.d.ts.map +1 -1
  99. package/dist/lib/components/realtime/realtime-agent-picker.component.js +105 -43
  100. package/dist/lib/components/realtime/realtime-agent-picker.component.js.map +1 -1
  101. package/dist/lib/components/realtime/realtime-audio-visuals.d.ts +2 -2
  102. package/dist/lib/components/realtime/realtime-audio-visuals.d.ts.map +1 -1
  103. package/dist/lib/components/realtime/realtime-audio-visuals.js.map +1 -1
  104. package/dist/lib/components/realtime/realtime-composer.component.d.ts +41 -7
  105. package/dist/lib/components/realtime/realtime-composer.component.d.ts.map +1 -1
  106. package/dist/lib/components/realtime/realtime-composer.component.js +216 -102
  107. package/dist/lib/components/realtime/realtime-composer.component.js.map +1 -1
  108. package/dist/lib/components/realtime/realtime-delegation-card.component.d.ts +0 -2
  109. package/dist/lib/components/realtime/realtime-delegation-card.component.d.ts.map +1 -1
  110. package/dist/lib/components/realtime/realtime-delegation-card.component.js +67 -71
  111. package/dist/lib/components/realtime/realtime-delegation-card.component.js.map +1 -1
  112. package/dist/lib/components/realtime/realtime-session-overlay.component.d.ts +364 -44
  113. package/dist/lib/components/realtime/realtime-session-overlay.component.d.ts.map +1 -1
  114. package/dist/lib/components/realtime/realtime-session-overlay.component.js +839 -153
  115. package/dist/lib/components/realtime/realtime-session-overlay.component.js.map +1 -1
  116. package/dist/lib/components/realtime/realtime-session-state.d.ts +5 -5
  117. package/dist/lib/components/realtime/realtime-session-state.d.ts.map +1 -1
  118. package/dist/lib/components/realtime/realtime-session-state.js.map +1 -1
  119. package/dist/lib/components/realtime/realtime-surface-tab-style.d.ts +70 -0
  120. package/dist/lib/components/realtime/realtime-surface-tab-style.d.ts.map +1 -0
  121. package/dist/lib/components/realtime/realtime-surface-tab-style.js +115 -0
  122. package/dist/lib/components/realtime/realtime-surface-tab-style.js.map +1 -0
  123. package/dist/lib/components/realtime/realtime-surface-tabs.component.d.ts +55 -57
  124. package/dist/lib/components/realtime/realtime-surface-tabs.component.d.ts.map +1 -1
  125. package/dist/lib/components/realtime/realtime-surface-tabs.component.js +165 -143
  126. package/dist/lib/components/realtime/realtime-surface-tabs.component.js.map +1 -1
  127. package/dist/lib/components/realtime/realtime-surface-tabs.model.d.ts +80 -71
  128. package/dist/lib/components/realtime/realtime-surface-tabs.model.d.ts.map +1 -1
  129. package/dist/lib/components/realtime/realtime-surface-tabs.model.js +83 -113
  130. package/dist/lib/components/realtime/realtime-surface-tabs.model.js.map +1 -1
  131. package/dist/lib/components/realtime/realtime-ui-config.d.ts +270 -0
  132. package/dist/lib/components/realtime/realtime-ui-config.d.ts.map +1 -0
  133. package/dist/lib/components/realtime/realtime-ui-config.js +212 -0
  134. package/dist/lib/components/realtime/realtime-ui-config.js.map +1 -0
  135. package/dist/lib/components/search/search-panel.component.d.ts +2 -0
  136. package/dist/lib/components/search/search-panel.component.d.ts.map +1 -1
  137. package/dist/lib/components/search/search-panel.component.js +92 -101
  138. package/dist/lib/components/search/search-panel.component.js.map +1 -1
  139. package/dist/lib/components/share/share-modal.component.d.ts.map +1 -1
  140. package/dist/lib/components/share/share-modal.component.js +10 -11
  141. package/dist/lib/components/share/share-modal.component.js.map +1 -1
  142. package/dist/lib/components/shared/user-picker.component.d.ts.map +1 -1
  143. package/dist/lib/components/shared/user-picker.component.js +12 -15
  144. package/dist/lib/components/shared/user-picker.component.js.map +1 -1
  145. package/dist/lib/components/sidebar/conversation-sidebar.component.d.ts +11 -3
  146. package/dist/lib/components/sidebar/conversation-sidebar.component.d.ts.map +1 -1
  147. package/dist/lib/components/sidebar/conversation-sidebar.component.js +34 -10
  148. package/dist/lib/components/sidebar/conversation-sidebar.component.js.map +1 -1
  149. package/dist/lib/components/sidebar/routines-section.component.d.ts +73 -0
  150. package/dist/lib/components/sidebar/routines-section.component.d.ts.map +1 -0
  151. package/dist/lib/components/sidebar/routines-section.component.js +211 -0
  152. package/dist/lib/components/sidebar/routines-section.component.js.map +1 -0
  153. package/dist/lib/components/tasks/tasks-dropdown.component.d.ts +12 -0
  154. package/dist/lib/components/tasks/tasks-dropdown.component.d.ts.map +1 -1
  155. package/dist/lib/components/tasks/tasks-dropdown.component.js +37 -1
  156. package/dist/lib/components/tasks/tasks-dropdown.component.js.map +1 -1
  157. package/dist/lib/components/workspace/conversation-workspace.component.d.ts +16 -5
  158. package/dist/lib/components/workspace/conversation-workspace.component.d.ts.map +1 -1
  159. package/dist/lib/components/workspace/conversation-workspace.component.js +51 -31
  160. package/dist/lib/components/workspace/conversation-workspace.component.js.map +1 -1
  161. package/dist/lib/composer-plugins/agent-mention.provider.d.ts +16 -0
  162. package/dist/lib/composer-plugins/agent-mention.provider.d.ts.map +1 -0
  163. package/dist/lib/composer-plugins/agent-mention.provider.js +28 -0
  164. package/dist/lib/composer-plugins/agent-mention.provider.js.map +1 -0
  165. package/dist/lib/composer-plugins/base-conversation-mention.provider.d.ts +20 -0
  166. package/dist/lib/composer-plugins/base-conversation-mention.provider.d.ts.map +1 -0
  167. package/dist/lib/composer-plugins/base-conversation-mention.provider.js +32 -0
  168. package/dist/lib/composer-plugins/base-conversation-mention.provider.js.map +1 -0
  169. package/dist/lib/composer-plugins/load-composer-plugins.d.ts +9 -0
  170. package/dist/lib/composer-plugins/load-composer-plugins.d.ts.map +1 -0
  171. package/dist/lib/composer-plugins/load-composer-plugins.js +17 -0
  172. package/dist/lib/composer-plugins/load-composer-plugins.js.map +1 -0
  173. package/dist/lib/composer-plugins/record-mention.provider.d.ts +14 -0
  174. package/dist/lib/composer-plugins/record-mention.provider.d.ts.map +1 -0
  175. package/dist/lib/composer-plugins/record-mention.provider.js +26 -0
  176. package/dist/lib/composer-plugins/record-mention.provider.js.map +1 -0
  177. package/dist/lib/composer-plugins/skill-command.provider.d.ts +15 -0
  178. package/dist/lib/composer-plugins/skill-command.provider.d.ts.map +1 -0
  179. package/dist/lib/composer-plugins/skill-command.provider.js +27 -0
  180. package/dist/lib/composer-plugins/skill-command.provider.js.map +1 -0
  181. package/dist/lib/conversations.module.d.ts +68 -64
  182. package/dist/lib/conversations.module.d.ts.map +1 -1
  183. package/dist/lib/conversations.module.js +69 -18
  184. package/dist/lib/conversations.module.js.map +1 -1
  185. package/dist/lib/models/conversation-state.model.d.ts +6 -3
  186. package/dist/lib/models/conversation-state.model.d.ts.map +1 -1
  187. package/dist/lib/models/conversation-state.model.js.map +1 -1
  188. package/dist/lib/services/conversation-agent.service.d.ts +9 -2
  189. package/dist/lib/services/conversation-agent.service.d.ts.map +1 -1
  190. package/dist/lib/services/conversation-agent.service.js +26 -2
  191. package/dist/lib/services/conversation-agent.service.js.map +1 -1
  192. package/dist/lib/services/conversation-attachment.service.d.ts +1 -1
  193. package/dist/lib/services/conversation-attachment.service.d.ts.map +1 -1
  194. package/dist/lib/services/conversation-attachment.service.js.map +1 -1
  195. package/dist/lib/services/mention-autocomplete.service.d.ts +42 -19
  196. package/dist/lib/services/mention-autocomplete.service.d.ts.map +1 -1
  197. package/dist/lib/services/mention-autocomplete.service.js +113 -18
  198. package/dist/lib/services/mention-autocomplete.service.js.map +1 -1
  199. package/dist/lib/services/realtime-audio-recorder.d.ts +143 -0
  200. package/dist/lib/services/realtime-audio-recorder.d.ts.map +1 -0
  201. package/dist/lib/services/realtime-audio-recorder.js +379 -0
  202. package/dist/lib/services/realtime-audio-recorder.js.map +1 -0
  203. package/dist/lib/services/realtime-pcm-wav.d.ts +75 -0
  204. package/dist/lib/services/realtime-pcm-wav.d.ts.map +1 -0
  205. package/dist/lib/services/realtime-pcm-wav.js +205 -0
  206. package/dist/lib/services/realtime-pcm-wav.js.map +1 -0
  207. package/dist/lib/services/realtime-session-review.service.d.ts +28 -1
  208. package/dist/lib/services/realtime-session-review.service.d.ts.map +1 -1
  209. package/dist/lib/services/realtime-session-review.service.js +12 -3
  210. package/dist/lib/services/realtime-session-review.service.js.map +1 -1
  211. package/dist/lib/services/realtime-session.service.d.ts +210 -20
  212. package/dist/lib/services/realtime-session.service.d.ts.map +1 -1
  213. package/dist/lib/services/realtime-session.service.js +452 -21
  214. package/dist/lib/services/realtime-session.service.js.map +1 -1
  215. package/dist/lib/services/realtime-sessions-adapter.js +1 -1
  216. package/dist/lib/services/realtime-sessions-adapter.js.map +1 -1
  217. package/dist/lib/services/ui-command-handler.service.d.ts +7 -2
  218. package/dist/lib/services/ui-command-handler.service.d.ts.map +1 -1
  219. package/dist/lib/services/ui-command-handler.service.js +6 -2
  220. package/dist/lib/services/ui-command-handler.service.js.map +1 -1
  221. package/dist/lib/utils/plan-mode-preference.d.ts +62 -0
  222. package/dist/lib/utils/plan-mode-preference.d.ts.map +1 -0
  223. package/dist/lib/utils/plan-mode-preference.js +130 -0
  224. package/dist/lib/utils/plan-mode-preference.js.map +1 -0
  225. package/dist/public-api.d.ts +29 -3
  226. package/dist/public-api.d.ts.map +1 -1
  227. package/dist/public-api.js +46 -3
  228. package/dist/public-api.js.map +1 -1
  229. package/package.json +30 -26
  230. package/dist/__tests__/attachment-badge.test.d.ts +0 -2
  231. package/dist/__tests__/attachment-badge.test.d.ts.map +0 -1
  232. package/dist/__tests__/attachment-badge.test.js +0 -66
  233. package/dist/__tests__/attachment-badge.test.js.map +0 -1
  234. package/dist/__tests__/channel-optional-surface.test.d.ts +0 -2
  235. package/dist/__tests__/channel-optional-surface.test.d.ts.map +0 -1
  236. package/dist/__tests__/channel-optional-surface.test.js +0 -53
  237. package/dist/__tests__/channel-optional-surface.test.js.map +0 -1
  238. package/dist/__tests__/chat-events.test.d.ts +0 -14
  239. package/dist/__tests__/chat-events.test.d.ts.map +0 -1
  240. package/dist/__tests__/chat-events.test.js +0 -109
  241. package/dist/__tests__/chat-events.test.js.map +0 -1
  242. package/dist/__tests__/collections-full-view.test.d.ts +0 -2
  243. package/dist/__tests__/collections-full-view.test.d.ts.map +0 -1
  244. package/dist/__tests__/collections-full-view.test.js +0 -225
  245. package/dist/__tests__/collections-full-view.test.js.map +0 -1
  246. package/dist/__tests__/conversation-cache.test.d.ts +0 -2
  247. package/dist/__tests__/conversation-cache.test.d.ts.map +0 -1
  248. package/dist/__tests__/conversation-cache.test.js +0 -233
  249. package/dist/__tests__/conversation-cache.test.js.map +0 -1
  250. package/dist/__tests__/conversation-naming.test.d.ts +0 -2
  251. package/dist/__tests__/conversation-naming.test.d.ts.map +0 -1
  252. package/dist/__tests__/conversation-naming.test.js +0 -110
  253. package/dist/__tests__/conversation-naming.test.js.map +0 -1
  254. package/dist/__tests__/delegation-result-parser.test.d.ts +0 -2
  255. package/dist/__tests__/delegation-result-parser.test.d.ts.map +0 -1
  256. package/dist/__tests__/delegation-result-parser.test.js +0 -107
  257. package/dist/__tests__/delegation-result-parser.test.js.map +0 -1
  258. package/dist/__tests__/distinct-artifacts.test.d.ts +0 -2
  259. package/dist/__tests__/distinct-artifacts.test.d.ts.map +0 -1
  260. package/dist/__tests__/distinct-artifacts.test.js +0 -56
  261. package/dist/__tests__/distinct-artifacts.test.js.map +0 -1
  262. package/dist/__tests__/event-wiring.test.d.ts +0 -15
  263. package/dist/__tests__/event-wiring.test.d.ts.map +0 -1
  264. package/dist/__tests__/event-wiring.test.js +0 -100
  265. package/dist/__tests__/event-wiring.test.js.map +0 -1
  266. package/dist/__tests__/index.test.d.ts +0 -2
  267. package/dist/__tests__/index.test.d.ts.map +0 -1
  268. package/dist/__tests__/index.test.js +0 -7
  269. package/dist/__tests__/index.test.js.map +0 -1
  270. package/dist/__tests__/narration-template.test.d.ts +0 -2
  271. package/dist/__tests__/narration-template.test.d.ts.map +0 -1
  272. package/dist/__tests__/narration-template.test.js +0 -76
  273. package/dist/__tests__/narration-template.test.js.map +0 -1
  274. package/dist/__tests__/notification-model.test.d.ts +0 -2
  275. package/dist/__tests__/notification-model.test.d.ts.map +0 -1
  276. package/dist/__tests__/notification-model.test.js +0 -68
  277. package/dist/__tests__/notification-model.test.js.map +0 -1
  278. package/dist/__tests__/realtime-agent-picker-models.test.d.ts +0 -2
  279. package/dist/__tests__/realtime-agent-picker-models.test.d.ts.map +0 -1
  280. package/dist/__tests__/realtime-agent-picker-models.test.js +0 -49
  281. package/dist/__tests__/realtime-agent-picker-models.test.js.map +0 -1
  282. package/dist/__tests__/realtime-audio-visuals.test.d.ts +0 -2
  283. package/dist/__tests__/realtime-audio-visuals.test.d.ts.map +0 -1
  284. package/dist/__tests__/realtime-audio-visuals.test.js +0 -123
  285. package/dist/__tests__/realtime-audio-visuals.test.js.map +0 -1
  286. package/dist/__tests__/realtime-delegation-card-cancel.test.d.ts +0 -2
  287. package/dist/__tests__/realtime-delegation-card-cancel.test.d.ts.map +0 -1
  288. package/dist/__tests__/realtime-delegation-card-cancel.test.js +0 -48
  289. package/dist/__tests__/realtime-delegation-card-cancel.test.js.map +0 -1
  290. package/dist/__tests__/realtime-disclosure.test.d.ts +0 -2
  291. package/dist/__tests__/realtime-disclosure.test.d.ts.map +0 -1
  292. package/dist/__tests__/realtime-disclosure.test.js +0 -164
  293. package/dist/__tests__/realtime-disclosure.test.js.map +0 -1
  294. package/dist/__tests__/realtime-pairing.test.d.ts +0 -2
  295. package/dist/__tests__/realtime-pairing.test.d.ts.map +0 -1
  296. package/dist/__tests__/realtime-pairing.test.js +0 -207
  297. package/dist/__tests__/realtime-pairing.test.js.map +0 -1
  298. package/dist/__tests__/realtime-review-lifecycle.test.d.ts +0 -2
  299. package/dist/__tests__/realtime-review-lifecycle.test.d.ts.map +0 -1
  300. package/dist/__tests__/realtime-review-lifecycle.test.js +0 -154
  301. package/dist/__tests__/realtime-review-lifecycle.test.js.map +0 -1
  302. package/dist/__tests__/realtime-session-cancel-usage.test.d.ts +0 -2
  303. package/dist/__tests__/realtime-session-cancel-usage.test.d.ts.map +0 -1
  304. package/dist/__tests__/realtime-session-cancel-usage.test.js +0 -230
  305. package/dist/__tests__/realtime-session-cancel-usage.test.js.map +0 -1
  306. package/dist/__tests__/realtime-session-channels.test.d.ts +0 -2
  307. package/dist/__tests__/realtime-session-channels.test.d.ts.map +0 -1
  308. package/dist/__tests__/realtime-session-channels.test.js +0 -252
  309. package/dist/__tests__/realtime-session-channels.test.js.map +0 -1
  310. package/dist/__tests__/realtime-session-client-tools.test.d.ts +0 -2
  311. package/dist/__tests__/realtime-session-client-tools.test.d.ts.map +0 -1
  312. package/dist/__tests__/realtime-session-client-tools.test.js +0 -103
  313. package/dist/__tests__/realtime-session-client-tools.test.js.map +0 -1
  314. package/dist/__tests__/realtime-session-minimized.test.d.ts +0 -2
  315. package/dist/__tests__/realtime-session-minimized.test.d.ts.map +0 -1
  316. package/dist/__tests__/realtime-session-minimized.test.js +0 -32
  317. package/dist/__tests__/realtime-session-minimized.test.js.map +0 -1
  318. package/dist/__tests__/realtime-session-mint.test.d.ts +0 -2
  319. package/dist/__tests__/realtime-session-mint.test.d.ts.map +0 -1
  320. package/dist/__tests__/realtime-session-mint.test.js +0 -69
  321. package/dist/__tests__/realtime-session-mint.test.js.map +0 -1
  322. package/dist/__tests__/realtime-session-policy.test.d.ts +0 -2
  323. package/dist/__tests__/realtime-session-policy.test.d.ts.map +0 -1
  324. package/dist/__tests__/realtime-session-policy.test.js +0 -303
  325. package/dist/__tests__/realtime-session-policy.test.js.map +0 -1
  326. package/dist/__tests__/realtime-session-review.service.test.d.ts +0 -2
  327. package/dist/__tests__/realtime-session-review.service.test.d.ts.map +0 -1
  328. package/dist/__tests__/realtime-session-review.service.test.js +0 -743
  329. package/dist/__tests__/realtime-session-review.service.test.js.map +0 -1
  330. package/dist/__tests__/realtime-session-state.test.d.ts +0 -2
  331. package/dist/__tests__/realtime-session-state.test.d.ts.map +0 -1
  332. package/dist/__tests__/realtime-session-state.test.js +0 -83
  333. package/dist/__tests__/realtime-session-state.test.js.map +0 -1
  334. package/dist/__tests__/realtime-session-timeline-card.test.d.ts +0 -2
  335. package/dist/__tests__/realtime-session-timeline-card.test.d.ts.map +0 -1
  336. package/dist/__tests__/realtime-session-timeline-card.test.js +0 -106
  337. package/dist/__tests__/realtime-session-timeline-card.test.js.map +0 -1
  338. package/dist/__tests__/realtime-session-timeline.test.d.ts +0 -2
  339. package/dist/__tests__/realtime-session-timeline.test.d.ts.map +0 -1
  340. package/dist/__tests__/realtime-session-timeline.test.js +0 -142
  341. package/dist/__tests__/realtime-session-timeline.test.js.map +0 -1
  342. package/dist/__tests__/realtime-sessions-adapter.test.d.ts +0 -19
  343. package/dist/__tests__/realtime-sessions-adapter.test.d.ts.map +0 -1
  344. package/dist/__tests__/realtime-sessions-adapter.test.js +0 -188
  345. package/dist/__tests__/realtime-sessions-adapter.test.js.map +0 -1
  346. package/dist/__tests__/realtime-surface-panel-prefs.test.d.ts +0 -2
  347. package/dist/__tests__/realtime-surface-panel-prefs.test.d.ts.map +0 -1
  348. package/dist/__tests__/realtime-surface-panel-prefs.test.js +0 -100
  349. package/dist/__tests__/realtime-surface-panel-prefs.test.js.map +0 -1
  350. package/dist/__tests__/realtime-surface-tabs-model.test.d.ts +0 -2
  351. package/dist/__tests__/realtime-surface-tabs-model.test.d.ts.map +0 -1
  352. package/dist/__tests__/realtime-surface-tabs-model.test.js +0 -193
  353. package/dist/__tests__/realtime-surface-tabs-model.test.js.map +0 -1
  354. package/dist/__tests__/remote-browser-audio-player.test.d.ts +0 -2
  355. package/dist/__tests__/remote-browser-audio-player.test.d.ts.map +0 -1
  356. package/dist/__tests__/remote-browser-audio-player.test.js +0 -137
  357. package/dist/__tests__/remote-browser-audio-player.test.js.map +0 -1
  358. package/dist/__tests__/remote-browser-channel.test.d.ts +0 -2
  359. package/dist/__tests__/remote-browser-channel.test.d.ts.map +0 -1
  360. package/dist/__tests__/remote-browser-channel.test.js +0 -585
  361. package/dist/__tests__/remote-browser-channel.test.js.map +0 -1
  362. package/dist/__tests__/search-service.test.d.ts +0 -2
  363. package/dist/__tests__/search-service.test.d.ts.map +0 -1
  364. package/dist/__tests__/search-service.test.js +0 -114
  365. package/dist/__tests__/search-service.test.js.map +0 -1
  366. package/dist/__tests__/slot-defaults.test.d.ts +0 -24
  367. package/dist/__tests__/slot-defaults.test.d.ts.map +0 -1
  368. package/dist/__tests__/slot-defaults.test.js +0 -63
  369. package/dist/__tests__/slot-defaults.test.js.map +0 -1
  370. package/dist/__tests__/toast-service.test.d.ts +0 -2
  371. package/dist/__tests__/toast-service.test.d.ts.map +0 -1
  372. package/dist/__tests__/toast-service.test.js +0 -143
  373. package/dist/__tests__/toast-service.test.js.map +0 -1
  374. package/dist/__tests__/user-authorization.test.d.ts +0 -2
  375. package/dist/__tests__/user-authorization.test.d.ts.map +0 -1
  376. package/dist/__tests__/user-authorization.test.js +0 -97
  377. package/dist/__tests__/user-authorization.test.js.map +0 -1
  378. package/dist/__tests__/voice-session-narration.test.d.ts +0 -2
  379. package/dist/__tests__/voice-session-narration.test.d.ts.map +0 -1
  380. package/dist/__tests__/voice-session-narration.test.js +0 -609
  381. package/dist/__tests__/voice-session-narration.test.js.map +0 -1
  382. package/dist/__tests__/whiteboard-artifact-viewer.test.d.ts +0 -2
  383. package/dist/__tests__/whiteboard-artifact-viewer.test.d.ts.map +0 -1
  384. package/dist/__tests__/whiteboard-artifact-viewer.test.js +0 -101
  385. package/dist/__tests__/whiteboard-artifact-viewer.test.js.map +0 -1
  386. package/dist/__tests__/whiteboard-channel.test.d.ts +0 -2
  387. package/dist/__tests__/whiteboard-channel.test.d.ts.map +0 -1
  388. package/dist/__tests__/whiteboard-channel.test.js +0 -260
  389. package/dist/__tests__/whiteboard-channel.test.js.map +0 -1
  390. package/dist/__tests__/whiteboard-restore-state.test.d.ts +0 -2
  391. package/dist/__tests__/whiteboard-restore-state.test.d.ts.map +0 -1
  392. package/dist/__tests__/whiteboard-restore-state.test.js +0 -108
  393. package/dist/__tests__/whiteboard-restore-state.test.js.map +0 -1
  394. package/dist/lib/components/mention/mention-dropdown.component.d.ts +0 -53
  395. package/dist/lib/components/mention/mention-dropdown.component.d.ts.map +0 -1
  396. package/dist/lib/components/mention/mention-dropdown.component.js +0 -276
  397. package/dist/lib/components/mention/mention-dropdown.component.js.map +0 -1
  398. package/dist/lib/components/mention/mention-editor.component.d.ts +0 -256
  399. package/dist/lib/components/mention/mention-editor.component.d.ts.map +0 -1
  400. package/dist/lib/components/mention/mention-editor.component.js +0 -1233
  401. package/dist/lib/components/mention/mention-editor.component.js.map +0 -1
  402. package/dist/lib/components/message/message-input-box.component.d.ts +0 -137
  403. package/dist/lib/components/message/message-input-box.component.d.ts.map +0 -1
  404. package/dist/lib/components/message/message-input-box.component.js +0 -321
  405. package/dist/lib/components/message/message-input-box.component.js.map +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"file":"whiteboard-channel.test.js","sourceRoot":"","sources":["../../src/__tests__/whiteboard-channel.test.ts"],"names":[],"mappings":"AAAA,yFAAyF;AACzF,4FAA4F;AAC5F,OAAO,mBAAmB,CAAC;AAC3B,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,SAAS,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAC;AACzE,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,EAAE,QAAQ,EAAE,MAAM,w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CAAC;QACnC,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC,CAAC;QAEzC,OAAO,CAAC,gBAAgB,EAAE,CAAC,CAAC,kCAAkC;QAC9D,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC,CAAC;IAC3C,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,sEAAsE,EAAE,GAAG,EAAE;QAC9E,MAAM,IAAI,GAAG,IAAI,kBAAkB,EAAE,CAAC;QACtC,OAAO,CAAC,WAAW,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC;QAClC,OAAO,CAAC,OAAO,EAAE,CAAC;QAElB,2CAA2C;QAC3C,MAAM,WAAW,GAAG,GAAG,CAAC,KAAK,CAAC,MAAM,CAAC;QACrC,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,IAAI,EAAE,cAAc,EAAE,EAAE,MAAM,CAAC,CAAC;QAClF,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;QAE3C,qDAAqD;QACrD,MAAM,GAAG,GAAG,EAAE,CAAC,KAAK,CAAC,IAAI,EAAE,gBAAgB,CAAC,CAAC;QAC7C,OAAO,CAAC,cAAc,CAAC,oBAAoB,EAAE,IAAI,CAAC,SAAS,CAAC,EAAE,IAAI,EAAE,aAAa,EAAE,CAAC,CAAC,CAAC;QACtF,MAAM,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,gBAAgB,EAAE,CAAC;IACrC,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["// The whiteboard channel imports its Angular surface component (partial-compiled Angular\n// libs require the JIT compiler in this node test environment), so load the compiler FIRST.\nimport '@angular/compiler';\nimport { describe, it, expect, beforeEach, afterEach, vi } from 'vitest';\nimport { EventEmitter } from '@angular/core';\nimport { MJGlobal } from '@memberjunction/global';\nimport { BaseRealtimeChannelClient, RealtimeChannelContext } from '../lib/components/realtime/channels/base-realtime-channel-client';\nimport {\n RealtimeWhiteboardChannel, WHITEBOARD_INTERACTION_NOTE_THROTTLE_MS\n} from '../lib/components/realtime/whiteboard/whiteboard-channel';\nimport {\n RealtimeWhiteboardHostComponent, WHITEBOARD_TOOL_DEFINITIONS, WHITEBOARD_TOOL_PREFIX,\n WhiteboardToolResult, WhiteboardWidgetInteractionEvent, WhiteboardWidgetSubmitEvent\n} from '@memberjunction/ng-whiteboard';\n\n/**\n * The LIVE WHITEBOARD as a registry plugin — contract metadata, ClassFactory registration,\n * the no-surface ApplyAgentTool fallback (panel collapsed), surface binding/unbinding, the\n * save-on-mutation pipeline and Dispose. The \"surface\" here is a STRUCTURAL fake (the real\n * component needs an Angular injection context); the plugin only touches the members the\n * fake provides.\n */\n\n/** Structural stand-in for the bound board host. */\nclass FakeWhiteboardHost {\n public State: unknown = null;\n public AgentName = '';\n public FocusMode = false;\n public SceneDelta = new EventEmitter<string>();\n public AgentUndo = new EventEmitter<void>();\n public FocusModeChange = new EventEmitter<boolean>();\n public SaveToArtifactsRequested = new EventEmitter<void>();\n public WidgetSubmitted = new EventEmitter<WhiteboardWidgetSubmitEvent>();\n public WidgetInteraction = new EventEmitter<WhiteboardWidgetInteractionEvent>();\n public AppliedTools: Array<{ ToolName: string; ArgsJson: string }> = [];\n\n public ApplyAgentTool(toolName: string, argsJson: string): string {\n this.AppliedTools.push({ ToolName: toolName, ArgsJson: argsJson });\n return JSON.stringify({ success: true, itemId: 'host-item', summary: 'host applied' });\n }\n\n public ToggleFocus(): void {\n this.FocusMode = !this.FocusMode;\n this.FocusModeChange.emit(this.FocusMode);\n }\n}\n\nfunction asHost(fake: FakeWhiteboardHost): RealtimeWhiteboardHostComponent {\n return fake as unknown as RealtimeWhiteboardHostComponent;\n}\n\ninterface CtxLog {\n Notes: string[];\n Spoken: string[];\n Saves: string[];\n Focus: boolean[];\n}\n\nfunction makeContext(log: CtxLog): RealtimeChannelContext {\n return {\n AgentName: 'Sage',\n SendContextNote: (text: string) => log.Notes.push(text),\n RequestSpokenResponse: (instructions: string) => log.Spoken.push(instructions),\n RequestSave: (stateJson: string) => log.Saves.push(stateJson),\n SetFocusMode: (on: boolean) => log.Focus.push(on),\n SaveAsArtifact: async () => null,\n AgentSessionID: null,\n ExecuteServerAction: async () => null\n };\n}\n\ndescribe('RealtimeWhiteboardChannel — plugin contract', () => {\n let channel: RealtimeWhiteboardChannel;\n let log: CtxLog;\n\n beforeEach(() => {\n channel = new RealtimeWhiteboardChannel();\n log = { Notes: [], Spoken: [], Saves: [], Focus: [] };\n channel.Initialize(makeContext(log));\n });\n\n it('is resolvable from the ClassFactory by its registry ClientPluginClass key', () => {\n const registration = MJGlobal.Instance.ClassFactory.GetRegistration(BaseRealtimeChannelClient, 'RealtimeWhiteboardChannel');\n expect(registration).toBeTruthy();\n const instance = MJGlobal.Instance.ClassFactory.CreateInstance<BaseRealtimeChannelClient>(\n BaseRealtimeChannelClient, 'RealtimeWhiteboardChannel'\n );\n expect(instance).toBeInstanceOf(RealtimeWhiteboardChannel);\n });\n\n it('contributes the channel contract: name, prefix, tab chrome, tool set, surface', () => {\n expect(channel.ChannelName).toBe('Whiteboard');\n expect(channel.ToolNamePrefix).toBe(WHITEBOARD_TOOL_PREFIX);\n expect(channel.TabTitle).toBe('Whiteboard');\n expect(channel.TabIcon).toBe('fa-solid fa-chalkboard');\n expect(channel.GetToolDefinitions()).toBe(WHITEBOARD_TOOL_DEFINITIONS);\n expect(channel.GetSurfaceComponent()).toBe(RealtimeWhiteboardHostComponent);\n });\n\n it('supplies first-run onboarding details (heading, description, tips, icon)', () => {\n const details = channel.GetOnboardingDetails();\n expect(details).not.toBeNull();\n expect(details?.Heading).toBe('Whiteboard');\n expect(details?.IconClass).toBe('fa-solid fa-chalkboard');\n expect(details?.Description?.length).toBeGreaterThan(0);\n expect((details?.Tips?.length ?? 0)).toBeGreaterThan(0);\n });\n\n it('ApplyAgentTool with NO surface bound falls back to the pure engine (collapsed panel)', () => {\n const resultJson = channel.ApplyAgentTool('Whiteboard_AddNote', JSON.stringify({ text: 'hello' }));\n const result = JSON.parse(resultJson) as WhiteboardToolResult;\n\n expect(result.success).toBe(true);\n expect(channel.State.ElementCount).toBe(1);\n expect(channel.State.CountByAuthor('agent')).toBe(1);\n });\n\n it('every board mutation requests a state-of-record save (user edits AND agent tools)', () => {\n channel.ApplyAgentTool('Whiteboard_AddNote', JSON.stringify({ text: 'note' }));\n expect(log.Saves.length).toBeGreaterThan(0);\n const lastSave = JSON.parse(log.Saves[log.Saves.length - 1]) as { Items?: unknown[] };\n expect(JSON.stringify(lastSave)).toBe(channel.SerializeState());\n });\n\n it('BindSurface wires inputs + outputs; tools then route through the host (UI garnish path)', () => {\n const fake = new FakeWhiteboardHost();\n channel.BindSurface(asHost(fake));\n\n expect(fake.State).toBe(channel.State);\n expect(fake.AgentName).toBe('Sage');\n\n const resultJson = channel.ApplyAgentTool('Whiteboard_AddNote', JSON.stringify({ text: 'via host' }));\n expect(fake.AppliedTools).toEqual([{ ToolName: 'Whiteboard_AddNote', ArgsJson: JSON.stringify({ text: 'via host' }) }]);\n expect((JSON.parse(resultJson) as WhiteboardToolResult).itemId).toBe('host-item');\n\n fake.SceneDelta.emit('{\"added\":[1]}');\n fake.AgentUndo.emit();\n fake.FocusModeChange.emit(true);\n // scene deltas carry the perception ETIQUETTE inline (don't comment on minor edits)\n expect(log.Notes).toHaveLength(2);\n expect(log.Notes[0]).toContain('[whiteboard] board update');\n expect(log.Notes[0]).toContain('do NOT comment on minor edits');\n expect(log.Notes[0]).toContain('{\"added\":[1]}');\n expect(log.Notes[1]).toBe('[whiteboard] user undid your last change');\n expect(log.Focus).toEqual([true]);\n });\n\n it('routes widget MJWhiteboard.submit input to the agent as a [whiteboard] context note', () => {\n const fake = new FakeWhiteboardHost();\n channel.BindSurface(asHost(fake));\n\n fake.WidgetSubmitted.emit({ ItemID: 'html-2', Title: 'Quick quiz', DataJson: '{\"answer\":\"Mercury\"}' });\n expect(log.Notes).toHaveLength(1);\n expect(log.Notes[0]).toBe('[whiteboard] the user submitted input in widget \"Quick quiz\": {\"answer\":\"Mercury\"}');\n // …and the model is asked to REACT audibly (SendContextNote alone is silent by contract)\n expect(log.Spoken).toHaveLength(1);\n expect(log.Spoken[0]).toContain('Quick quiz');\n expect(log.Spoken[0]).toContain('{\"answer\":\"Mercury\"}');\n expect(log.Spoken[0]).toContain('React to it now');\n\n // untitled widgets fall back to the item ID\n fake.WidgetSubmitted.emit({ ItemID: 'html-3', Title: '', DataJson: '{\"ok\":true}' });\n expect(log.Notes[1]).toBe('[whiteboard] the user submitted input in widget \"html-3\": {\"ok\":true}');\n\n // released with the surface, like the other output subscriptions\n channel.UnbindSurface();\n fake.WidgetSubmitted.emit({ ItemID: 'html-2', Title: 'Quick quiz', DataJson: '{\"stale\":true}' });\n expect(log.Notes).toHaveLength(2);\n });\n\n describe('ambient widget-interaction notes — per-widget throttle (latest wins)', () => {\n function interaction(itemId: string, summary: string, title = 'Vibe picker'): WhiteboardWidgetInteractionEvent {\n return { ItemID: itemId, Title: title, Summary: summary };\n }\n\n beforeEach(() => {\n vi.useFakeTimers();\n });\n\n afterEach(() => {\n vi.useRealTimers();\n });\n\n it('first activity in a widget sends a note IMMEDIATELY with the ambient framing', () => {\n const fake = new FakeWhiteboardHost();\n channel.BindSurface(asHost(fake));\n\n fake.WidgetInteraction.emit(interaction('html-2', 'clicked \"Playful pink\"; changed \"vibe\" to \"pink\"'));\n expect(log.Notes).toHaveLength(1);\n expect(log.Notes[0]).toBe(\n '[whiteboard] ambient activity in widget \"Vibe picker\" ' +\n '(background — do NOT respond unless it is significant or you are asked; ' +\n 'explicit submissions arrive separately): clicked \"Playful pink\"; changed \"vibe\" to \"pink\"');\n });\n\n it('untitled widgets fall back to the item ID in the framing', () => {\n const fake = new FakeWhiteboardHost();\n channel.BindSurface(asHost(fake));\n\n fake.WidgetInteraction.emit(interaction('html-7', 'typing in \"email\"', ''));\n expect(log.Notes[0]).toContain('ambient activity in widget \"html-7\"');\n });\n\n it('within the window further activity coalesces — ONE trailing note, LATEST summary wins', () => {\n const fake = new FakeWhiteboardHost();\n channel.BindSurface(asHost(fake));\n\n fake.WidgetInteraction.emit(interaction('html-2', 'first'));\n fake.WidgetInteraction.emit(interaction('html-2', 'second'));\n fake.WidgetInteraction.emit(interaction('html-2', 'third'));\n expect(log.Notes).toHaveLength(1); // only the immediate first note so far\n\n vi.advanceTimersByTime(WHITEBOARD_INTERACTION_NOTE_THROTTLE_MS);\n expect(log.Notes).toHaveLength(2);\n expect(log.Notes[1]).toContain(': third'); // latest summary won\n expect(log.Notes.some((n) => n.includes(': second'))).toBe(false);\n });\n\n it('the trailing send opens a NEW window — chatty widgets stay at ≤1 note per window', () => {\n const fake = new FakeWhiteboardHost();\n channel.BindSurface(asHost(fake));\n\n fake.WidgetInteraction.emit(interaction('html-2', 'a')); // sent immediately\n fake.WidgetInteraction.emit(interaction('html-2', 'b')); // deferred\n vi.advanceTimersByTime(WHITEBOARD_INTERACTION_NOTE_THROTTLE_MS); // 'b' sent\n fake.WidgetInteraction.emit(interaction('html-2', 'c')); // inside b's window → deferred\n expect(log.Notes).toHaveLength(2);\n vi.advanceTimersByTime(WHITEBOARD_INTERACTION_NOTE_THROTTLE_MS);\n expect(log.Notes).toHaveLength(3);\n expect(log.Notes[2]).toContain(': c');\n });\n\n it('after a QUIET window expires, the next activity sends immediately again', () => {\n const fake = new FakeWhiteboardHost();\n channel.BindSurface(asHost(fake));\n\n fake.WidgetInteraction.emit(interaction('html-2', 'early'));\n vi.advanceTimersByTime(WHITEBOARD_INTERACTION_NOTE_THROTTLE_MS + 1);\n fake.WidgetInteraction.emit(interaction('html-2', 'late'));\n expect(log.Notes).toHaveLength(2);\n expect(log.Notes[1]).toContain(': late');\n });\n\n it('throttles PER WIDGET — concurrent widgets do not share a window', () => {\n const fake = new FakeWhiteboardHost();\n channel.BindSurface(asHost(fake));\n\n fake.WidgetInteraction.emit(interaction('html-2', 'in widget two'));\n fake.WidgetInteraction.emit(interaction('html-3', 'in widget three', 'Other'));\n expect(log.Notes).toHaveLength(2);\n expect(log.Notes[0]).toContain('\"Vibe picker\"');\n expect(log.Notes[1]).toContain('\"Other\"');\n });\n\n it('UnbindSurface cancels pending trailing notes (nothing stale reaches the agent)', () => {\n const fake = new FakeWhiteboardHost();\n channel.BindSurface(asHost(fake));\n\n fake.WidgetInteraction.emit(interaction('html-2', 'sent'));\n fake.WidgetInteraction.emit(interaction('html-2', 'pending'));\n channel.UnbindSurface();\n vi.advanceTimersByTime(WHITEBOARD_INTERACTION_NOTE_THROTTLE_MS * 2);\n expect(log.Notes).toHaveLength(1); // the pending trailing note was canceled\n\n // and the released surface's emitter no longer reaches the channel at all\n fake.WidgetInteraction.emit(interaction('html-2', 'stale'));\n expect(log.Notes).toHaveLength(1);\n });\n });\n\n it('UnbindSurface flips back to the engine fallback and stops listening to old outputs', () => {\n const fake = new FakeWhiteboardHost();\n channel.BindSurface(asHost(fake));\n channel.UnbindSurface();\n\n channel.ApplyAgentTool('Whiteboard_AddNote', JSON.stringify({ text: 'after unbind' }));\n expect(fake.AppliedTools).toEqual([]); // host no longer consulted\n expect(channel.State.ElementCount).toBe(1); // engine applied it\n\n fake.SceneDelta.emit('{\"stale\":true}');\n expect(log.Notes).toEqual([]); // old subscription released\n });\n\n it('re-binding a NEW surface replaces the old one (pane recreated after collapse/expand)', () => {\n const first = new FakeWhiteboardHost();\n const second = new FakeWhiteboardHost();\n channel.BindSurface(asHost(first));\n channel.BindSurface(asHost(second));\n\n channel.ApplyAgentTool('Whiteboard_AddText', JSON.stringify({ text: 'x' }));\n expect(first.AppliedTools).toEqual([]);\n expect(second.AppliedTools).toHaveLength(1);\n\n first.SceneDelta.emit('{\"old\":true}');\n expect(log.Notes).toEqual([]); // first surface's outputs were unsubscribed\n });\n\n it('RequestFocusExit leaves focus THROUGH the bound host so its toggle stays in sync', () => {\n const fake = new FakeWhiteboardHost();\n channel.BindSurface(asHost(fake));\n fake.ToggleFocus(); // enter focus → SetFocusMode(true)\n expect(log.Focus).toEqual([true]);\n\n channel.RequestFocusExit();\n expect(fake.FocusMode).toBe(false);\n expect(log.Focus).toEqual([true, false]);\n\n channel.RequestFocusExit(); // not in focus → no double-toggle\n expect(log.Focus).toEqual([true, false]);\n });\n\n it('Dispose releases the surface, the state subscription and the context', () => {\n const fake = new FakeWhiteboardHost();\n channel.BindSurface(asHost(fake));\n channel.Dispose();\n\n // State mutations no longer request saves…\n const savesBefore = log.Saves.length;\n channel.State.AddItem({ Kind: 'text', X: 0, Y: 0, Text: 'post-dispose' }, 'user');\n expect(log.Saves.length).toBe(savesBefore);\n\n // …and tool calls fall back to the engine (no host).\n const spy = vi.spyOn(fake, 'ApplyAgentTool');\n channel.ApplyAgentTool('Whiteboard_AddNote', JSON.stringify({ text: 'still works' }));\n expect(spy).not.toHaveBeenCalled();\n });\n});\n"]}
@@ -1,2 +0,0 @@
1
- import '@angular/compiler';
2
- //# sourceMappingURL=whiteboard-restore-state.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"whiteboard-restore-state.test.d.ts","sourceRoot":"","sources":["../../src/__tests__/whiteboard-restore-state.test.ts"],"names":[],"mappings":"AAEA,OAAO,mBAAmB,CAAC"}
@@ -1,108 +0,0 @@
1
- // The whiteboard channel imports its Angular surface component (partial-compiled Angular
2
- // libs require the JIT compiler in this node test environment), so load the compiler FIRST.
3
- import '@angular/compiler';
4
- import { describe, it, expect, beforeEach } from 'vitest';
5
- import { BaseRealtimeChannelClient } from '../lib/components/realtime/channels/base-realtime-channel-client';
6
- import { RealtimeWhiteboardChannel } from '../lib/components/realtime/whiteboard/whiteboard-channel';
7
- /**
8
- * The RestoreState hook — base-class default (channels keep no state → false) and the
9
- * whiteboard implementation: a prior session's saved board round-trips into THIS session's
10
- * engine in place; malformed/incompatible payloads return false, never throw, and leave
11
- * the board fresh.
12
- */
13
- /** Stand-in surface for the stateless test channel. */
14
- class NullSurface {
15
- }
16
- /** Minimal concrete channel that exercises the BASE-CLASS defaults only. */
17
- class StatelessChannel extends BaseRealtimeChannelClient {
18
- get ChannelName() { return 'Stateless'; }
19
- get ToolNamePrefix() { return 'Stateless_'; }
20
- get TabTitle() { return 'Stateless'; }
21
- get TabIcon() { return 'fa-solid fa-cube'; }
22
- GetToolDefinitions() { return []; }
23
- ApplyAgentTool() { return '{}'; }
24
- GetSurfaceComponent() { return NullSurface; }
25
- BindSurface() { }
26
- }
27
- function makeContext(log) {
28
- return {
29
- AgentName: 'Sage',
30
- SendContextNote: () => undefined,
31
- RequestSave: (stateJson) => log.Saves.push(stateJson),
32
- SetFocusMode: () => undefined,
33
- SaveAsArtifact: async () => null,
34
- AgentSessionID: null,
35
- ExecuteServerAction: async () => null
36
- };
37
- }
38
- describe('BaseRealtimeChannelClient.RestoreState — default', () => {
39
- it('returns false (a stateless channel ignores any saved payload)', () => {
40
- const channel = new StatelessChannel();
41
- channel.Initialize(makeContext({ Saves: [] }));
42
- expect(channel.RestoreState('{"anything": true}')).toBe(false);
43
- });
44
- });
45
- describe('RealtimeWhiteboardChannel.RestoreState', () => {
46
- let channel;
47
- let log;
48
- beforeEach(() => {
49
- channel = new RealtimeWhiteboardChannel();
50
- log = { Saves: [] };
51
- channel.Initialize(makeContext(log));
52
- });
53
- /** A prior session's saved board: styled sticky + text + a shape, via a throwaway channel. */
54
- function priorSessionState() {
55
- const prior = new RealtimeWhiteboardChannel();
56
- prior.Initialize(makeContext({ Saves: [] }));
57
- prior.State.AddItem({
58
- Kind: 'sticky', X: 40, Y: 60, Text: 'carried over', FontSize: 24, FontFamily: 'serif', FontWeight: 700
59
- }, 'user');
60
- prior.State.AddItem({ Kind: 'text', X: 200, Y: 80, Text: 'styled label', FontSize: 18, Color: '#0ea5e9' }, 'agent');
61
- prior.State.AddItem({ Kind: 'shape', Shape: 'diamond', X: 300, Y: 200, W: 120, H: 80, Label: 'Decision' }, 'agent');
62
- const json = prior.SerializeState();
63
- expect(json).toBeTruthy();
64
- return json;
65
- }
66
- it('restores a valid prior-session board IN PLACE — items (and style fields) round-trip', () => {
67
- const saved = priorSessionState();
68
- const engineBefore = channel.State;
69
- expect(channel.RestoreState(saved)).toBe(true);
70
- expect(channel.State).toBe(engineBefore); // same engine instance — subscriptions intact
71
- expect(channel.State.ElementCount).toBe(3);
72
- expect(channel.State.CountByAuthor('user')).toBe(1);
73
- expect(channel.State.CountByAuthor('agent')).toBe(2);
74
- const sticky = channel.State.Items.find((i) => i.Kind === 'sticky');
75
- expect(sticky.Text).toBe('carried over');
76
- expect(sticky.FontSize).toBe(24);
77
- expect(sticky.FontFamily).toBe('serif');
78
- expect(sticky.FontWeight).toBe(700);
79
- const text = channel.State.Items.find((i) => i.Kind === 'text');
80
- expect(text.Color).toBe('#0ea5e9');
81
- // the restored board re-serializes to the same items (the restore's own 'replace'
82
- // change bumps the engine seq, so compare the items payload, not the raw string)
83
- const reserialized = JSON.parse(channel.SerializeState());
84
- expect(reserialized.items).toEqual(JSON.parse(saved).items);
85
- });
86
- it('keeps the save pipeline live after restore (mutations still persist)', () => {
87
- channel.RestoreState(priorSessionState());
88
- const savesBefore = log.Saves.length;
89
- channel.ApplyAgentTool('Whiteboard_AddNote', JSON.stringify({ text: 'post-restore' }));
90
- expect(log.Saves.length).toBeGreaterThan(savesBefore);
91
- expect(channel.State.ElementCount).toBe(4);
92
- });
93
- it('returns false on garbage JSON and leaves the board fresh (never throws)', () => {
94
- expect(channel.RestoreState('not json at all {{{')).toBe(false);
95
- expect(channel.State.ElementCount).toBe(0);
96
- });
97
- it('returns false on well-formed but incompatible payloads, preserving current state', () => {
98
- channel.State.AddItem({ Kind: 'text', X: 0, Y: 0, Text: 'pre-existing' }, 'user');
99
- expect(channel.RestoreState('{"items": 42}')).toBe(false);
100
- expect(channel.RestoreState('null')).toBe(false);
101
- expect(channel.RestoreState('"just a string"')).toBe(false);
102
- expect(channel.RestoreState('[]')).toBe(false);
103
- expect(channel.State.ElementCount).toBe(1); // untouched
104
- const text = channel.State.Items[0];
105
- expect(text.Text).toBe('pre-existing');
106
- });
107
- });
108
- //# sourceMappingURL=whiteboard-restore-state.test.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"whiteboard-restore-state.test.js","sourceRoot":"","sources":["../../src/__tests__/whiteboard-restore-state.test.ts"],"names":[],"mappings":"AAAA,yFAAyF;AACzF,4FAA4F;AAC5F,OAAO,mBAAmB,CAAC;AAC3B,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAG1D,OAAO,EAAE,yBAAyB,EAA0B,MAAM,kEAAkE,CAAC;AACrI,OAAO,EAAE,yBAAyB,EAAE,MAAM,0DAA0D,CAAC;AAGrG;;;;;GAKG;AAEH,uDAAuD;AACvD,MAAM,WAAW;CAAG;AAEpB,4EAA4E;AAC5E,MAAM,gBAAiB,SAAQ,yBAAsC;IACnE,IAAW,WAAW,KAAa,OAAO,WAAW,CAAC,CAAC,CAAC;IACxD,IAAW,cAAc,KAAa,OAAO,YAAY,CAAC,CAAC,CAAC;IAC5D,IAAW,QAAQ,KAAa,OAAO,WAAW,CAAC,CAAC,CAAC;IACrD,IAAW,OAAO,KAAa,OAAO,kBAAkB,CAAC,CAAC,CAAC;IACpD,kBAAkB,KAA+B,OAAO,EAAE,CAAC,CAAC,CAAC;IAC7D,cAAc,KAAa,OAAO,IAAI,CAAC,CAAC,CAAC;IACzC,mBAAmB,KAAwB,OAAO,WAAW,CAAC,CAAC,CAAC;IAChE,WAAW,KAA4B,CAAC;CAChD;AAMD,SAAS,WAAW,CAAC,GAAW;IAC9B,OAAO;QACL,SAAS,EAAE,MAAM;QACjB,eAAe,EAAE,GAAG,EAAE,CAAC,SAAS;QAChC,W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AAC;QAE/C,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,YAAY;QACxD,MAAM,IAAI,GAAG,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAuB,CAAC;QAC1D,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;IACzC,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["// The whiteboard channel imports its Angular surface component (partial-compiled Angular\n// libs require the JIT compiler in this node test environment), so load the compiler FIRST.\nimport '@angular/compiler';\nimport { describe, it, expect, beforeEach } from 'vitest';\nimport type { Type } from '@angular/core';\nimport { RealtimeToolDefinition } from '@memberjunction/ai';\nimport { BaseRealtimeChannelClient, RealtimeChannelContext } from '../lib/components/realtime/channels/base-realtime-channel-client';\nimport { RealtimeWhiteboardChannel } from '../lib/components/realtime/whiteboard/whiteboard-channel';\nimport { WhiteboardStickyItem, WhiteboardTextItem } from '@memberjunction/ng-whiteboard';\n\n/**\n * The RestoreState hook — base-class default (channels keep no state → false) and the\n * whiteboard implementation: a prior session's saved board round-trips into THIS session's\n * engine in place; malformed/incompatible payloads return false, never throw, and leave\n * the board fresh.\n */\n\n/** Stand-in surface for the stateless test channel. */\nclass NullSurface {}\n\n/** Minimal concrete channel that exercises the BASE-CLASS defaults only. */\nclass StatelessChannel extends BaseRealtimeChannelClient<NullSurface> {\n public get ChannelName(): string { return 'Stateless'; }\n public get ToolNamePrefix(): string { return 'Stateless_'; }\n public get TabTitle(): string { return 'Stateless'; }\n public get TabIcon(): string { return 'fa-solid fa-cube'; }\n public GetToolDefinitions(): RealtimeToolDefinition[] { return []; }\n public ApplyAgentTool(): string { return '{}'; }\n public GetSurfaceComponent(): Type<NullSurface> { return NullSurface; }\n public BindSurface(): void { /* no surface */ }\n}\n\ninterface CtxLog {\n Saves: string[];\n}\n\nfunction makeContext(log: CtxLog): RealtimeChannelContext {\n return {\n AgentName: 'Sage',\n SendContextNote: () => undefined,\n RequestSave: (stateJson: string) => log.Saves.push(stateJson),\n SetFocusMode: () => undefined,\n SaveAsArtifact: async () => null,\n AgentSessionID: null,\n ExecuteServerAction: async () => null\n };\n}\n\ndescribe('BaseRealtimeChannelClient.RestoreState — default', () => {\n it('returns false (a stateless channel ignores any saved payload)', () => {\n const channel = new StatelessChannel();\n channel.Initialize(makeContext({ Saves: [] }));\n expect(channel.RestoreState('{\"anything\": true}')).toBe(false);\n });\n});\n\ndescribe('RealtimeWhiteboardChannel.RestoreState', () => {\n let channel: RealtimeWhiteboardChannel;\n let log: CtxLog;\n\n beforeEach(() => {\n channel = new RealtimeWhiteboardChannel();\n log = { Saves: [] };\n channel.Initialize(makeContext(log));\n });\n\n /** A prior session's saved board: styled sticky + text + a shape, via a throwaway channel. */\n function priorSessionState(): string {\n const prior = new RealtimeWhiteboardChannel();\n prior.Initialize(makeContext({ Saves: [] }));\n prior.State.AddItem({\n Kind: 'sticky', X: 40, Y: 60, Text: 'carried over', FontSize: 24, FontFamily: 'serif', FontWeight: 700\n }, 'user');\n prior.State.AddItem({ Kind: 'text', X: 200, Y: 80, Text: 'styled label', FontSize: 18, Color: '#0ea5e9' }, 'agent');\n prior.State.AddItem({ Kind: 'shape', Shape: 'diamond', X: 300, Y: 200, W: 120, H: 80, Label: 'Decision' }, 'agent');\n const json = prior.SerializeState();\n expect(json).toBeTruthy();\n return json as string;\n }\n\n it('restores a valid prior-session board IN PLACE — items (and style fields) round-trip', () => {\n const saved = priorSessionState();\n const engineBefore = channel.State;\n\n expect(channel.RestoreState(saved)).toBe(true);\n\n expect(channel.State).toBe(engineBefore); // same engine instance — subscriptions intact\n expect(channel.State.ElementCount).toBe(3);\n expect(channel.State.CountByAuthor('user')).toBe(1);\n expect(channel.State.CountByAuthor('agent')).toBe(2);\n\n const sticky = channel.State.Items.find((i) => i.Kind === 'sticky') as WhiteboardStickyItem;\n expect(sticky.Text).toBe('carried over');\n expect(sticky.FontSize).toBe(24);\n expect(sticky.FontFamily).toBe('serif');\n expect(sticky.FontWeight).toBe(700);\n\n const text = channel.State.Items.find((i) => i.Kind === 'text') as WhiteboardTextItem;\n expect(text.Color).toBe('#0ea5e9');\n\n // the restored board re-serializes to the same items (the restore's own 'replace'\n // change bumps the engine seq, so compare the items payload, not the raw string)\n const reserialized = JSON.parse(channel.SerializeState() as string) as { items: unknown[] };\n expect(reserialized.items).toEqual((JSON.parse(saved) as { items: unknown[] }).items);\n });\n\n it('keeps the save pipeline live after restore (mutations still persist)', () => {\n channel.RestoreState(priorSessionState());\n const savesBefore = log.Saves.length;\n channel.ApplyAgentTool('Whiteboard_AddNote', JSON.stringify({ text: 'post-restore' }));\n expect(log.Saves.length).toBeGreaterThan(savesBefore);\n expect(channel.State.ElementCount).toBe(4);\n });\n\n it('returns false on garbage JSON and leaves the board fresh (never throws)', () => {\n expect(channel.RestoreState('not json at all {{{')).toBe(false);\n expect(channel.State.ElementCount).toBe(0);\n });\n\n it('returns false on well-formed but incompatible payloads, preserving current state', () => {\n channel.State.AddItem({ Kind: 'text', X: 0, Y: 0, Text: 'pre-existing' }, 'user');\n\n expect(channel.RestoreState('{\"items\": 42}')).toBe(false);\n expect(channel.RestoreState('null')).toBe(false);\n expect(channel.RestoreState('\"just a string\"')).toBe(false);\n expect(channel.RestoreState('[]')).toBe(false);\n\n expect(channel.State.ElementCount).toBe(1); // untouched\n const text = channel.State.Items[0] as WhiteboardTextItem;\n expect(text.Text).toBe('pre-existing');\n });\n});\n"]}
@@ -1,53 +0,0 @@
1
- import { EventEmitter, OnInit, OnDestroy } from '@angular/core';
2
- import { MentionSuggestion } from '../../services/mention-autocomplete.service';
3
- import * as i0 from "@angular/core";
4
- /**
5
- * Dropdown component for @mention autocomplete
6
- */
7
- export declare class MentionDropdownComponent implements OnInit, OnDestroy {
8
- private _suggestions;
9
- set suggestions(value: MentionSuggestion[]);
10
- get suggestions(): MentionSuggestion[];
11
- position: {
12
- top: number;
13
- left: number;
14
- };
15
- visible: boolean;
16
- showAbove: boolean;
17
- useFixedPositioning: boolean;
18
- suggestionSelected: EventEmitter<MentionSuggestion>;
19
- closed: EventEmitter<void>;
20
- selectedIndex: number;
21
- constructor();
22
- ngOnInit(): void;
23
- ngOnDestroy(): void;
24
- /**
25
- * Handle keyboard navigation
26
- */
27
- handleKeyDown(event: KeyboardEvent): void;
28
- /**
29
- * Select a suggestion
30
- */
31
- selectSuggestion(suggestion: MentionSuggestion): void;
32
- /**
33
- * Close the dropdown
34
- */
35
- close(): void;
36
- /**
37
- * Scroll to selected item
38
- */
39
- private scrollToSelected;
40
- /**
41
- * Track by function for ngFor
42
- */
43
- trackBySuggestion(index: number, item: MentionSuggestion): string;
44
- /**
45
- * Get icon classes - supports both Font Awesome and custom CSS classes
46
- * Font Awesome icons start with 'fa-' (e.g., 'fa-solid fa-robot')
47
- * Custom icons use their own prefix (e.g., 'mj-icon-skip', 'acme-icon-custom')
48
- */
49
- getIconClasses(iconClass: string): string | string[];
50
- static ɵfac: i0.ɵɵFactoryDeclaration<MentionDropdownComponent, never>;
51
- static ɵcmp: i0.ɵɵComponentDeclaration<MentionDropdownComponent, "mj-mention-dropdown", never, { "suggestions": { "alias": "suggestions"; "required": false; }; "position": { "alias": "position"; "required": false; }; "visible": { "alias": "visible"; "required": false; }; "showAbove": { "alias": "showAbove"; "required": false; }; "useFixedPositioning": { "alias": "useFixedPositioning"; "required": false; }; }, { "suggestionSelected": "suggestionSelected"; "closed": "closed"; }, never, never, false, never>;
52
- }
53
- //# sourceMappingURL=mention-dropdown.component.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"mention-dropdown.component.d.ts","sourceRoot":"","sources":["../../../../src/lib/components/mention/mention-dropdown.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,YAAY,EACZ,MAAM,EACN,SAAS,EAEV,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,iBAAiB,EAAE,MAAM,6CAA6C,CAAC;;AAEhF;;GAEG;AACH,qBASa,wBAAyB,YAAW,MAAM,EAAE,SAAS;IAChE,OAAO,CAAC,YAAY,CAA2B;IAE/C,IACI,WAAW,CAAC,KAAK,EAAE,iBAAiB,EAAE,EAKzC;IACD,IAAI,WAAW,IAAI,iBAAiB,EAAE,CAErC;IAEQ,QAAQ,EAAE;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAuB;IAC9D,OAAO,EAAE,OAAO,CAAS;IACzB,SAAS,EAAE,OAAO,CAAS;IAC3B,mBAAmB,EAAE,OAAO,CAAS;IAEpC,kBAAkB,kCAAyC;IAC3D,MAAM,qBAA4B;IAErC,aAAa,EAAE,MAAM,CAAK;;IAIjC,QAAQ,IAAI,IAAI;IAEhB,WAAW,IAAI,IAAI;IAEnB;;OAEG;IAEH,aAAa,CAAC,KAAK,EAAE,aAAa,GAAG,IAAI;IA4BzC;;OAEG;IACH,gBAAgB,CAAC,UAAU,EAAE,iBAAiB,GAAG,IAAI;IAIrD;;OAEG;IACH,KAAK,IAAI,IAAI;IAIb;;OAEG;IACH,OAAO,CAAC,gBAAgB;IASxB;;OAEG;IACH,iBAAiB,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,iBAAiB,GAAG,MAAM;IAIjE;;;;OAIG;IACH,cAAc,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,EAAE;yCApGzC,wBAAwB;2CAAxB,wBAAwB;CAsHpC"}