@memberjunction/ng-conversations 6.3.0-edge.0 → 6.3.0-edge.2

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 (272) hide show
  1. package/README.md +60 -22
  2. package/dist/assets/edge-ai.worker.js +35168 -0
  3. package/dist/lib/components/agent/agent-instance-editor-modal.component.d.ts +186 -0
  4. package/dist/lib/components/agent/agent-instance-editor-modal.component.d.ts.map +1 -0
  5. package/dist/lib/components/agent/agent-instance-editor-modal.component.js +2202 -0
  6. package/dist/lib/components/agent/agent-instance-editor-modal.component.js.map +1 -0
  7. package/dist/lib/components/artifact/artifact-share-modal.component.d.ts +39 -6
  8. package/dist/lib/components/artifact/artifact-share-modal.component.d.ts.map +1 -1
  9. package/dist/lib/components/artifact/artifact-share-modal.component.js +773 -204
  10. package/dist/lib/components/artifact/artifact-share-modal.component.js.map +1 -1
  11. package/dist/lib/components/collection/collection-tree.component.d.ts.map +1 -1
  12. package/dist/lib/components/collection/collection-tree.component.js +19 -18
  13. package/dist/lib/components/collection/collection-tree.component.js.map +1 -1
  14. package/dist/lib/components/collection/collection-view.component.d.ts +6 -4
  15. package/dist/lib/components/collection/collection-view.component.d.ts.map +1 -1
  16. package/dist/lib/components/collection/collection-view.component.js +35 -17
  17. package/dist/lib/components/collection/collection-view.component.js.map +1 -1
  18. package/dist/lib/components/collection/collections-full-view.component.d.ts +1 -0
  19. package/dist/lib/components/collection/collections-full-view.component.d.ts.map +1 -1
  20. package/dist/lib/components/collection/collections-full-view.component.js +108 -106
  21. package/dist/lib/components/collection/collections-full-view.component.js.map +1 -1
  22. package/dist/lib/components/composer/ai-composer.component.d.ts +15 -1
  23. package/dist/lib/components/composer/ai-composer.component.d.ts.map +1 -1
  24. package/dist/lib/components/composer/ai-composer.component.js +43 -4
  25. package/dist/lib/components/composer/ai-composer.component.js.map +1 -1
  26. package/dist/lib/components/conversation/conversation-agent-picker.component.d.ts +20 -2
  27. package/dist/lib/components/conversation/conversation-agent-picker.component.d.ts.map +1 -1
  28. package/dist/lib/components/conversation/conversation-agent-picker.component.js +378 -62
  29. package/dist/lib/components/conversation/conversation-agent-picker.component.js.map +1 -1
  30. package/dist/lib/components/conversation/conversation-chat-area.component.d.ts +94 -18
  31. package/dist/lib/components/conversation/conversation-chat-area.component.d.ts.map +1 -1
  32. package/dist/lib/components/conversation/conversation-chat-area.component.js +732 -439
  33. package/dist/lib/components/conversation/conversation-chat-area.component.js.map +1 -1
  34. package/dist/lib/components/conversation/conversation-list.component.d.ts +19 -1
  35. package/dist/lib/components/conversation/conversation-list.component.d.ts.map +1 -1
  36. package/dist/lib/components/conversation/conversation-list.component.js +184 -89
  37. package/dist/lib/components/conversation/conversation-list.component.js.map +1 -1
  38. package/dist/lib/components/export/export-modal.component.d.ts +7 -2
  39. package/dist/lib/components/export/export-modal.component.d.ts.map +1 -1
  40. package/dist/lib/components/export/export-modal.component.js +13 -2
  41. package/dist/lib/components/export/export-modal.component.js.map +1 -1
  42. package/dist/lib/components/library/library-create-dialog.component.d.ts +136 -0
  43. package/dist/lib/components/library/library-create-dialog.component.d.ts.map +1 -0
  44. package/dist/lib/components/library/library-create-dialog.component.js +1620 -0
  45. package/dist/lib/components/library/library-create-dialog.component.js.map +1 -0
  46. package/dist/lib/components/library/library-full-view.component.d.ts +10 -4
  47. package/dist/lib/components/library/library-full-view.component.d.ts.map +1 -1
  48. package/dist/lib/components/library/library-full-view.component.js +216 -40
  49. package/dist/lib/components/library/library-full-view.component.js.map +1 -1
  50. package/dist/lib/components/library/library-remote-drive-pane.component.d.ts +97 -0
  51. package/dist/lib/components/library/library-remote-drive-pane.component.d.ts.map +1 -0
  52. package/dist/lib/components/library/library-remote-drive-pane.component.js +1229 -0
  53. package/dist/lib/components/library/library-remote-drive-pane.component.js.map +1 -0
  54. package/dist/lib/components/library/library-workspace.component.d.ts +293 -0
  55. package/dist/lib/components/library/library-workspace.component.d.ts.map +1 -0
  56. package/dist/lib/components/library/library-workspace.component.js +5121 -0
  57. package/dist/lib/components/library/library-workspace.component.js.map +1 -0
  58. package/dist/lib/components/library/library.models.d.ts +192 -0
  59. package/dist/lib/components/library/library.models.d.ts.map +1 -0
  60. package/dist/lib/components/library/library.models.js +2 -0
  61. package/dist/lib/components/library/library.models.js.map +1 -0
  62. package/dist/lib/components/message/agent-handoff-card.component.js +1 -1
  63. package/dist/lib/components/message/agent-handoff-card.component.js.map +1 -1
  64. package/dist/lib/components/message/conversation-message-rating.component.d.ts +5 -0
  65. package/dist/lib/components/message/conversation-message-rating.component.d.ts.map +1 -1
  66. package/dist/lib/components/message/conversation-message-rating.component.js +72 -16
  67. package/dist/lib/components/message/conversation-message-rating.component.js.map +1 -1
  68. package/dist/lib/components/message/message-input.component.d.ts +33 -14
  69. package/dist/lib/components/message/message-input.component.d.ts.map +1 -1
  70. package/dist/lib/components/message/message-input.component.js +142 -75
  71. package/dist/lib/components/message/message-input.component.js.map +1 -1
  72. package/dist/lib/components/message/message-item.component.d.ts +51 -4
  73. package/dist/lib/components/message/message-item.component.d.ts.map +1 -1
  74. package/dist/lib/components/message/message-item.component.js +640 -399
  75. package/dist/lib/components/message/message-item.component.js.map +1 -1
  76. package/dist/lib/components/message/message-list.component.d.ts +15 -1
  77. package/dist/lib/components/message/message-list.component.d.ts.map +1 -1
  78. package/dist/lib/components/message/message-list.component.js +75 -3
  79. package/dist/lib/components/message/message-list.component.js.map +1 -1
  80. package/dist/lib/components/navigation/conversation-navigation.component.js +9 -9
  81. package/dist/lib/components/navigation/conversation-navigation.component.js.map +1 -1
  82. package/dist/lib/components/overlay/chat-overlay.component.d.ts +94 -6
  83. package/dist/lib/components/overlay/chat-overlay.component.d.ts.map +1 -1
  84. package/dist/lib/components/overlay/chat-overlay.component.js +249 -59
  85. package/dist/lib/components/overlay/chat-overlay.component.js.map +1 -1
  86. package/dist/lib/components/project/project-form-modal.component.d.ts +6 -0
  87. package/dist/lib/components/project/project-form-modal.component.d.ts.map +1 -1
  88. package/dist/lib/components/project/project-form-modal.component.js +81 -61
  89. package/dist/lib/components/project/project-form-modal.component.js.map +1 -1
  90. package/dist/lib/components/project/project-selector.component.d.ts +5 -0
  91. package/dist/lib/components/project/project-selector.component.d.ts.map +1 -1
  92. package/dist/lib/components/project/project-selector.component.js +11 -4
  93. package/dist/lib/components/project/project-selector.component.js.map +1 -1
  94. package/dist/lib/components/realtime/artifact-workspace/artifact-workspace-channel.d.ts +55 -0
  95. package/dist/lib/components/realtime/artifact-workspace/artifact-workspace-channel.d.ts.map +1 -0
  96. package/dist/lib/components/realtime/artifact-workspace/artifact-workspace-channel.js +974 -0
  97. package/dist/lib/components/realtime/artifact-workspace/artifact-workspace-channel.js.map +1 -0
  98. package/dist/lib/components/realtime/artifact-workspace/artifact-workspace-engine.d.ts +66 -0
  99. package/dist/lib/components/realtime/artifact-workspace/artifact-workspace-engine.d.ts.map +1 -0
  100. package/dist/lib/components/realtime/artifact-workspace/artifact-workspace-engine.js +253 -0
  101. package/dist/lib/components/realtime/artifact-workspace/artifact-workspace-engine.js.map +1 -0
  102. package/dist/lib/components/realtime/artifact-workspace/artifact-workspace-types.d.ts +80 -0
  103. package/dist/lib/components/realtime/artifact-workspace/artifact-workspace-types.d.ts.map +1 -0
  104. package/dist/lib/components/realtime/artifact-workspace/artifact-workspace-types.js +49 -0
  105. package/dist/lib/components/realtime/artifact-workspace/artifact-workspace-types.js.map +1 -0
  106. package/dist/lib/components/realtime/artifact-workspace/realtime-artifact-workspace-surface.component.d.ts +54 -0
  107. package/dist/lib/components/realtime/artifact-workspace/realtime-artifact-workspace-surface.component.d.ts.map +1 -0
  108. package/dist/lib/components/realtime/artifact-workspace/realtime-artifact-workspace-surface.component.js +386 -0
  109. package/dist/lib/components/realtime/artifact-workspace/realtime-artifact-workspace-surface.component.js.map +1 -0
  110. package/dist/lib/components/realtime/capture/realtime-capture-channel.d.ts +28 -1
  111. package/dist/lib/components/realtime/capture/realtime-capture-channel.d.ts.map +1 -1
  112. package/dist/lib/components/realtime/capture/realtime-capture-channel.js +53 -1
  113. package/dist/lib/components/realtime/capture/realtime-capture-channel.js.map +1 -1
  114. package/dist/lib/components/realtime/channels/client-context-channel.d.ts.map +1 -1
  115. package/dist/lib/components/realtime/channels/client-context-channel.js +23 -7
  116. package/dist/lib/components/realtime/channels/client-context-channel.js.map +1 -1
  117. package/dist/lib/components/realtime/interactive-component/interactive-component-channel.d.ts +1 -0
  118. package/dist/lib/components/realtime/interactive-component/interactive-component-channel.d.ts.map +1 -1
  119. package/dist/lib/components/realtime/interactive-component/interactive-component-channel.js +15 -2
  120. package/dist/lib/components/realtime/interactive-component/interactive-component-channel.js.map +1 -1
  121. package/dist/lib/components/realtime/media/media-channel.d.ts +32 -11
  122. package/dist/lib/components/realtime/media/media-channel.d.ts.map +1 -1
  123. package/dist/lib/components/realtime/media/media-channel.js +186 -23
  124. package/dist/lib/components/realtime/media/media-channel.js.map +1 -1
  125. package/dist/lib/components/realtime/media/realtime-media-surface.component.d.ts +9 -1
  126. package/dist/lib/components/realtime/media/realtime-media-surface.component.d.ts.map +1 -1
  127. package/dist/lib/components/realtime/media/realtime-media-surface.component.js +33 -10
  128. package/dist/lib/components/realtime/media/realtime-media-surface.component.js.map +1 -1
  129. package/dist/lib/components/realtime/realtime-agent-banner.component.js +3 -3
  130. package/dist/lib/components/realtime/realtime-agent-banner.component.js.map +1 -1
  131. package/dist/lib/components/realtime/realtime-agent-picker.component.d.ts.map +1 -1
  132. package/dist/lib/components/realtime/realtime-agent-picker.component.js +3 -3
  133. package/dist/lib/components/realtime/realtime-agent-picker.component.js.map +1 -1
  134. package/dist/lib/components/realtime/realtime-composer.component.js +6 -4
  135. package/dist/lib/components/realtime/realtime-composer.component.js.map +1 -1
  136. package/dist/lib/components/realtime/realtime-session-overlay.component.d.ts +82 -33
  137. package/dist/lib/components/realtime/realtime-session-overlay.component.d.ts.map +1 -1
  138. package/dist/lib/components/realtime/realtime-session-overlay.component.js +521 -191
  139. package/dist/lib/components/realtime/realtime-session-overlay.component.js.map +1 -1
  140. package/dist/lib/components/realtime/realtime-session-state.d.ts.map +1 -1
  141. package/dist/lib/components/realtime/realtime-session-state.js +1 -1
  142. package/dist/lib/components/realtime/realtime-session-state.js.map +1 -1
  143. package/dist/lib/components/realtime/realtime-session-thread.component.d.ts.map +1 -1
  144. package/dist/lib/components/realtime/realtime-session-thread.component.js +90 -5
  145. package/dist/lib/components/realtime/realtime-session-thread.component.js.map +1 -1
  146. package/dist/lib/components/realtime/realtime-surface-stage.model.d.ts.map +1 -1
  147. package/dist/lib/components/realtime/realtime-surface-stage.model.js +2 -1
  148. package/dist/lib/components/realtime/realtime-surface-stage.model.js.map +1 -1
  149. package/dist/lib/components/realtime/realtime-surface-tab-style.d.ts +11 -4
  150. package/dist/lib/components/realtime/realtime-surface-tab-style.d.ts.map +1 -1
  151. package/dist/lib/components/realtime/realtime-surface-tab-style.js +24 -5
  152. package/dist/lib/components/realtime/realtime-surface-tab-style.js.map +1 -1
  153. package/dist/lib/components/realtime/realtime-surface-tabs.model.d.ts +7 -9
  154. package/dist/lib/components/realtime/realtime-surface-tabs.model.d.ts.map +1 -1
  155. package/dist/lib/components/realtime/realtime-surface-tabs.model.js +25 -15
  156. package/dist/lib/components/realtime/realtime-surface-tabs.model.js.map +1 -1
  157. package/dist/lib/components/realtime/remote-browser/remote-browser-channel.d.ts +30 -1
  158. package/dist/lib/components/realtime/remote-browser/remote-browser-channel.d.ts.map +1 -1
  159. package/dist/lib/components/realtime/remote-browser/remote-browser-channel.js +150 -2
  160. package/dist/lib/components/realtime/remote-browser/remote-browser-channel.js.map +1 -1
  161. package/dist/lib/components/realtime/remote-browser/remote-browser-surface.component.d.ts +101 -3
  162. package/dist/lib/components/realtime/remote-browser/remote-browser-surface.component.d.ts.map +1 -1
  163. package/dist/lib/components/realtime/remote-browser/remote-browser-surface.component.js +503 -55
  164. package/dist/lib/components/realtime/remote-browser/remote-browser-surface.component.js.map +1 -1
  165. package/dist/lib/components/realtime/whiteboard/whiteboard-artifact-viewer.component.d.ts +48 -5
  166. package/dist/lib/components/realtime/whiteboard/whiteboard-artifact-viewer.component.d.ts.map +1 -1
  167. package/dist/lib/components/realtime/whiteboard/whiteboard-artifact-viewer.component.js +249 -53
  168. package/dist/lib/components/realtime/whiteboard/whiteboard-artifact-viewer.component.js.map +1 -1
  169. package/dist/lib/components/realtime/whiteboard/whiteboard-channel.d.ts.map +1 -1
  170. package/dist/lib/components/realtime/whiteboard/whiteboard-channel.js +1 -1
  171. package/dist/lib/components/realtime/whiteboard/whiteboard-channel.js.map +1 -1
  172. package/dist/lib/components/search/search-panel.component.d.ts +10 -0
  173. package/dist/lib/components/search/search-panel.component.d.ts.map +1 -1
  174. package/dist/lib/components/search/search-panel.component.js +25 -3
  175. package/dist/lib/components/search/search-panel.component.js.map +1 -1
  176. package/dist/lib/components/share/share-modal.component.d.ts.map +1 -1
  177. package/dist/lib/components/share/share-modal.component.js +181 -127
  178. package/dist/lib/components/share/share-modal.component.js.map +1 -1
  179. package/dist/lib/components/sidebar/conversation-sidebar.component.d.ts +14 -1
  180. package/dist/lib/components/sidebar/conversation-sidebar.component.d.ts.map +1 -1
  181. package/dist/lib/components/sidebar/conversation-sidebar.component.js +50 -11
  182. package/dist/lib/components/sidebar/conversation-sidebar.component.js.map +1 -1
  183. package/dist/lib/components/sidebar/my-agents-section.component.d.ts +78 -0
  184. package/dist/lib/components/sidebar/my-agents-section.component.d.ts.map +1 -0
  185. package/dist/lib/components/sidebar/my-agents-section.component.js +450 -0
  186. package/dist/lib/components/sidebar/my-agents-section.component.js.map +1 -0
  187. package/dist/lib/components/task/tasks-full-view.component.d.ts +31 -8
  188. package/dist/lib/components/task/tasks-full-view.component.d.ts.map +1 -1
  189. package/dist/lib/components/task/tasks-full-view.component.js +701 -497
  190. package/dist/lib/components/task/tasks-full-view.component.js.map +1 -1
  191. package/dist/lib/components/workspace/conversation-workspace.component.d.ts.map +1 -1
  192. package/dist/lib/components/workspace/conversation-workspace.component.js +15 -2
  193. package/dist/lib/components/workspace/conversation-workspace.component.js.map +1 -1
  194. package/dist/lib/composer-plugins/base-conversation-mention.provider.d.ts +1 -0
  195. package/dist/lib/composer-plugins/base-conversation-mention.provider.d.ts.map +1 -1
  196. package/dist/lib/composer-plugins/base-conversation-mention.provider.js +13 -1
  197. package/dist/lib/composer-plugins/base-conversation-mention.provider.js.map +1 -1
  198. package/dist/lib/conversations.module.d.ts +78 -71
  199. package/dist/lib/conversations.module.d.ts.map +1 -1
  200. package/dist/lib/conversations.module.js +68 -1
  201. package/dist/lib/conversations.module.js.map +1 -1
  202. package/dist/lib/models/agent-turn.model.d.ts +7 -1
  203. package/dist/lib/models/agent-turn.model.d.ts.map +1 -1
  204. package/dist/lib/models/agent-turn.model.js.map +1 -1
  205. package/dist/lib/services/agent-state.service.d.ts.map +1 -1
  206. package/dist/lib/services/agent-state.service.js +14 -3
  207. package/dist/lib/services/agent-state.service.js.map +1 -1
  208. package/dist/lib/services/artifact-permission.service.d.ts.map +1 -1
  209. package/dist/lib/services/artifact-permission.service.js +14 -3
  210. package/dist/lib/services/artifact-permission.service.js.map +1 -1
  211. package/dist/lib/services/artifact-state.service.d.ts.map +1 -1
  212. package/dist/lib/services/artifact-state.service.js +43 -11
  213. package/dist/lib/services/artifact-state.service.js.map +1 -1
  214. package/dist/lib/services/conversation-agent.service.d.ts +31 -21
  215. package/dist/lib/services/conversation-agent.service.d.ts.map +1 -1
  216. package/dist/lib/services/conversation-agent.service.js +84 -35
  217. package/dist/lib/services/conversation-agent.service.js.map +1 -1
  218. package/dist/lib/services/conversation-tasks-filter.d.ts +59 -2
  219. package/dist/lib/services/conversation-tasks-filter.d.ts.map +1 -1
  220. package/dist/lib/services/conversation-tasks-filter.js +222 -18
  221. package/dist/lib/services/conversation-tasks-filter.js.map +1 -1
  222. package/dist/lib/services/edge-ai/edge-agent-pre-discovery.service.d.ts +85 -0
  223. package/dist/lib/services/edge-ai/edge-agent-pre-discovery.service.d.ts.map +1 -0
  224. package/dist/lib/services/edge-ai/edge-agent-pre-discovery.service.js +257 -0
  225. package/dist/lib/services/edge-ai/edge-agent-pre-discovery.service.js.map +1 -0
  226. package/dist/lib/services/edge-ai/edge-ai-protocol.d.ts +85 -0
  227. package/dist/lib/services/edge-ai/edge-ai-protocol.d.ts.map +1 -0
  228. package/dist/lib/services/edge-ai/edge-ai-protocol.js +10 -0
  229. package/dist/lib/services/edge-ai/edge-ai-protocol.js.map +1 -0
  230. package/dist/lib/services/edge-ai/edge-ai-worker-host.d.ts +90 -0
  231. package/dist/lib/services/edge-ai/edge-ai-worker-host.d.ts.map +1 -0
  232. package/dist/lib/services/edge-ai/edge-ai-worker-host.js +386 -0
  233. package/dist/lib/services/edge-ai/edge-ai-worker-host.js.map +1 -0
  234. package/dist/lib/services/edge-ai/edge-ai.worker.d.ts +13 -0
  235. package/dist/lib/services/edge-ai/edge-ai.worker.d.ts.map +1 -0
  236. package/dist/lib/services/edge-ai/edge-ai.worker.js +201 -0
  237. package/dist/lib/services/edge-ai/edge-ai.worker.js.map +1 -0
  238. package/dist/lib/services/export.service.d.ts +64 -0
  239. package/dist/lib/services/export.service.d.ts.map +1 -1
  240. package/dist/lib/services/export.service.js +185 -6
  241. package/dist/lib/services/export.service.js.map +1 -1
  242. package/dist/lib/services/library-creation.service.d.ts +304 -0
  243. package/dist/lib/services/library-creation.service.d.ts.map +1 -0
  244. package/dist/lib/services/library-creation.service.js +1244 -0
  245. package/dist/lib/services/library-creation.service.js.map +1 -0
  246. package/dist/lib/services/realtime-pairing.d.ts +3 -3
  247. package/dist/lib/services/realtime-pairing.js +4 -4
  248. package/dist/lib/services/realtime-pairing.js.map +1 -1
  249. package/dist/lib/services/realtime-session-review.service.d.ts +14 -0
  250. package/dist/lib/services/realtime-session-review.service.d.ts.map +1 -1
  251. package/dist/lib/services/realtime-session-review.service.js +46 -4
  252. package/dist/lib/services/realtime-session-review.service.js.map +1 -1
  253. package/dist/lib/services/realtime-session.service.d.ts.map +1 -1
  254. package/dist/lib/services/realtime-session.service.js +2 -1
  255. package/dist/lib/services/realtime-session.service.js.map +1 -1
  256. package/dist/lib/services/search.service.d.ts +19 -2
  257. package/dist/lib/services/search.service.d.ts.map +1 -1
  258. package/dist/lib/services/search.service.js +99 -36
  259. package/dist/lib/services/search.service.js.map +1 -1
  260. package/dist/lib/utils/agent-handoff-map.js +1 -1
  261. package/dist/lib/utils/agent-handoff-map.js.map +1 -1
  262. package/dist/lib/utils/agent-turn-routing.js +1 -1
  263. package/dist/lib/utils/agent-turn-routing.js.map +1 -1
  264. package/dist/lib/utils/decision-routing.d.ts +5 -2
  265. package/dist/lib/utils/decision-routing.d.ts.map +1 -1
  266. package/dist/lib/utils/decision-routing.js +9 -4
  267. package/dist/lib/utils/decision-routing.js.map +1 -1
  268. package/dist/public-api.d.ts +15 -0
  269. package/dist/public-api.d.ts.map +1 -1
  270. package/dist/public-api.js +17 -1
  271. package/dist/public-api.js.map +1 -1
  272. package/package.json +42 -37
@@ -0,0 +1,80 @@
1
+ /**
2
+ * Shared types and collaborative-artifact partitioning helpers for the
3
+ * `ArtifactWorkspace` realtime channel in `@memberjunction/ng-conversations`.
4
+ */
5
+ export declare const ARTIFACT_WORKSPACE_CHANNEL_KEY = "ArtifactWorkspace";
6
+ export declare const ARTIFACT_WORKSPACE_CLIENT_PLUGIN_CLASS = "RealtimeArtifactWorkspaceChannel";
7
+ export declare const ARTIFACT_WORKSPACE_SERVER_PLUGIN_CLASS = "ArtifactWorkspaceChannelServer";
8
+ export declare const COLLABORATIVE_ARTIFACT_TYPES: ReadonlySet<string>;
9
+ export declare const COLLABORATIVE_ARTIFACT_DRIVERS: ReadonlySet<string>;
10
+ /**
11
+ * Returns true if an artifact descriptor identifies a collaborative document,
12
+ * spreadsheet, slide deck, or whiteboard (partitioned away from `InteractiveComponent`).
13
+ */
14
+ export declare function IsCollaborativeArtifactDescriptor(artifactTypeName?: string, driverClass?: string): boolean;
15
+ /**
16
+ * Returns true if the descriptor explicitly identifies a Component artifact.
17
+ */
18
+ export declare function IsComponentArtifactDescriptor(artifactTypeName?: string, driverClass?: string): boolean;
19
+ export type ArtifactSelectionDomain = 'document' | 'spreadsheet' | 'slides' | 'whiteboard';
20
+ export interface ArtifactSelectionAnchor {
21
+ domain: ArtifactSelectionDomain;
22
+ heading?: string;
23
+ blockId?: string;
24
+ quote?: string;
25
+ sheet?: string;
26
+ range?: string;
27
+ slideNumber?: number;
28
+ slideId?: string;
29
+ elementId?: string;
30
+ }
31
+ export interface ArtifactSelectionDelta {
32
+ instanceId: string;
33
+ artifactId: string;
34
+ artifactTypeName?: string;
35
+ anchor: ArtifactSelectionAnchor;
36
+ }
37
+ export type ArtifactWorkspaceViewMode = 'edit' | 'suggest' | 'diff' | 'present';
38
+ export interface ArtifactViewerNavigationAnchor {
39
+ Sheet?: string;
40
+ Range?: string;
41
+ SlideNumber?: number;
42
+ SlideID?: string;
43
+ ElementID?: string;
44
+ Heading?: string;
45
+ BlockID?: string;
46
+ HighlightMs?: number;
47
+ }
48
+ export interface ArtifactNavigateToAnchorPayload extends ArtifactViewerNavigationAnchor {
49
+ InstanceID: string;
50
+ ArtifactID: string;
51
+ }
52
+ export interface ArtifactWorkspaceOpenPayload {
53
+ ArtifactID: string;
54
+ ArtifactVersionID?: string;
55
+ VersionNumber?: number;
56
+ Name: string;
57
+ ArtifactTypeName?: string;
58
+ DriverClass?: string;
59
+ CanEdit?: boolean;
60
+ }
61
+ export interface ArtifactWorkspaceRecord {
62
+ readonly InstanceID: string;
63
+ ArtifactID: string;
64
+ ArtifactVersionID?: string;
65
+ VersionNumber?: number;
66
+ Name: string;
67
+ ArtifactTypeName?: string;
68
+ DriverClass?: string;
69
+ CanEdit?: boolean;
70
+ Selection?: ArtifactSelectionAnchor | null;
71
+ ViewMode?: ArtifactWorkspaceViewMode;
72
+ LastUpdatedAt: number;
73
+ }
74
+ export interface ArtifactWorkspaceConfig {
75
+ AutoOpenDelegatedArtifacts: boolean;
76
+ SwapToNewerVersions: boolean;
77
+ MaxInstances: number;
78
+ }
79
+ export declare const DEFAULT_ARTIFACT_WORKSPACE_CONFIG: Readonly<ArtifactWorkspaceConfig>;
80
+ //# sourceMappingURL=artifact-workspace-types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"artifact-workspace-types.d.ts","sourceRoot":"","sources":["../../../../../src/lib/components/realtime/artifact-workspace/artifact-workspace-types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,eAAO,MAAM,8BAA8B,sBAAsB,CAAC;AAClE,eAAO,MAAM,sCAAsC,qCAAqC,CAAC;AACzF,eAAO,MAAM,sCAAsC,mCAAmC,CAAC;AAEvF,eAAO,MAAM,4BAA4B,EAAE,WAAW,CAAC,MAAM,CAM3D,CAAC;AAEH,eAAO,MAAM,8BAA8B,EAAE,WAAW,CAAC,MAAM,CAK7D,CAAC;AAEH;;;GAGG;AACH,wBAAgB,iCAAiC,CAC/C,gBAAgB,CAAC,EAAE,MAAM,EACzB,WAAW,CAAC,EAAE,MAAM,GACnB,OAAO,CAUT;AAED;;GAEG;AACH,wBAAgB,6BAA6B,CAC3C,gBAAgB,CAAC,EAAE,MAAM,EACzB,WAAW,CAAC,EAAE,MAAM,GACnB,OAAO,CAIT;AAED,MAAM,MAAM,uBAAuB,GAAG,UAAU,GAAG,aAAa,GAAG,QAAQ,GAAG,YAAY,CAAC;AAE3F,MAAM,WAAW,uBAAuB;IACtC,MAAM,EAAE,uBAAuB,CAAC;IAChC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,sBAAsB;IACrC,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,MAAM,EAAE,uBAAuB,CAAC;CACjC;AAED,MAAM,MAAM,yBAAyB,GAAG,MAAM,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAAC;AAEhF,MAAM,WAAW,8BAA8B;IAC7C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,+BAAgC,SAAQ,8BAA8B;IACrF,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,4BAA4B;IAC3C,UAAU,EAAE,MAAM,CAAC;IACnB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,MAAM,WAAW,uBAAuB;IACtC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,UAAU,EAAE,MAAM,CAAC;IACnB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,uBAAuB,GAAG,IAAI,CAAC;IAC3C,QAAQ,CAAC,EAAE,yBAAyB,CAAC;IACrC,aAAa,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,uBAAuB;IACtC,0BAA0B,EAAE,OAAO,CAAC;IACpC,mBAAmB,EAAE,OAAO,CAAC;IAC7B,YAAY,EAAE,MAAM,CAAC;CACtB;AAED,eAAO,MAAM,iCAAiC,EAAE,QAAQ,CAAC,uBAAuB,CAI9E,CAAC"}
@@ -0,0 +1,49 @@
1
+ /**
2
+ * Shared types and collaborative-artifact partitioning helpers for the
3
+ * `ArtifactWorkspace` realtime channel in `@memberjunction/ng-conversations`.
4
+ */
5
+ export const ARTIFACT_WORKSPACE_CHANNEL_KEY = 'ArtifactWorkspace';
6
+ export const ARTIFACT_WORKSPACE_CLIENT_PLUGIN_CLASS = 'RealtimeArtifactWorkspaceChannel';
7
+ export const ARTIFACT_WORKSPACE_SERVER_PLUGIN_CLASS = 'ArtifactWorkspaceChannelServer';
8
+ export const COLLABORATIVE_ARTIFACT_TYPES = new Set([
9
+ 'markdown document',
10
+ 'excel spreadsheet',
11
+ 'presentation',
12
+ 'whiteboard diagram',
13
+ 'whiteboard',
14
+ ]);
15
+ export const COLLABORATIVE_ARTIFACT_DRIVERS = new Set([
16
+ 'markdownartifactviewerplugin',
17
+ 'spreadsheetartifactviewerplugin',
18
+ 'slidedeckartifactviewerplugin',
19
+ 'whiteboardartifactviewerplugin',
20
+ ]);
21
+ /**
22
+ * Returns true if an artifact descriptor identifies a collaborative document,
23
+ * spreadsheet, slide deck, or whiteboard (partitioned away from `InteractiveComponent`).
24
+ */
25
+ export function IsCollaborativeArtifactDescriptor(artifactTypeName, driverClass) {
26
+ const normalizedType = artifactTypeName?.trim().toLowerCase();
27
+ if (normalizedType && COLLABORATIVE_ARTIFACT_TYPES.has(normalizedType)) {
28
+ return true;
29
+ }
30
+ const normalizedDriver = driverClass?.trim().toLowerCase();
31
+ if (normalizedDriver && COLLABORATIVE_ARTIFACT_DRIVERS.has(normalizedDriver)) {
32
+ return true;
33
+ }
34
+ return false;
35
+ }
36
+ /**
37
+ * Returns true if the descriptor explicitly identifies a Component artifact.
38
+ */
39
+ export function IsComponentArtifactDescriptor(artifactTypeName, driverClass) {
40
+ const normalizedType = artifactTypeName?.trim().toLowerCase();
41
+ const normalizedDriver = driverClass?.trim().toLowerCase();
42
+ return normalizedType === 'component' || normalizedDriver === 'componentartifactviewerplugin';
43
+ }
44
+ export const DEFAULT_ARTIFACT_WORKSPACE_CONFIG = Object.freeze({
45
+ AutoOpenDelegatedArtifacts: true,
46
+ SwapToNewerVersions: true,
47
+ MaxInstances: 6,
48
+ });
49
+ //# sourceMappingURL=artifact-workspace-types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"artifact-workspace-types.js","sourceRoot":"","sources":["../../../../../src/lib/components/realtime/artifact-workspace/artifact-workspace-types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,CAAC,MAAM,8BAA8B,GAAG,mBAAmB,CAAC;AAClE,MAAM,CAAC,MAAM,sCAAsC,GAAG,kCAAkC,CAAC;AACzF,MAAM,CAAC,MAAM,sCAAsC,GAAG,gCAAgC,CAAC;AAEvF,MAAM,CAAC,MAAM,4BAA4B,GAAwB,IAAI,GAAG,CAAC;IACvE,mBAAmB;IACnB,mBAAmB;IACnB,cAAc;IACd,oBAAoB;IACpB,YAAY;CACb,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,8BAA8B,GAAwB,IAAI,GAAG,CAAC;IACzE,8BAA8B;IAC9B,iCAAiC;IACjC,+BAA+B;IAC/B,gCAAgC;CACjC,CAAC,CAAC;AAEH;;;GAGG;AACH,MAAM,UAAU,iCAAiC,CAC/C,gBAAyB,EACzB,WAAoB;IAEpB,MAAM,cAAc,GAAG,gBAAgB,EAAE,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;IAC9D,IAAI,cAAc,IAAI,4BAA4B,CAAC,GAAG,CAAC,cAAc,CAAC,EAAE,CAAC;QACvE,OAAO,IAAI,CAAC;IACd,CAAC;IACD,MAAM,gBAAgB,GAAG,WAAW,EAAE,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;IAC3D,IAAI,gBAAgB,IAAI,8BAA8B,CAAC,GAAG,CAAC,gBAAgB,CAAC,EAAE,CAAC;QAC7E,OAAO,IAAI,CAAC;IACd,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,6BAA6B,CAC3C,gBAAyB,EACzB,WAAoB;IAEpB,MAAM,cAAc,GAAG,gBAAgB,EAAE,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;IAC9D,MAAM,gBAAgB,GAAG,WAAW,EAAE,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;IAC3D,OAAO,cAAc,KAAK,WAAW,IAAI,gBAAgB,KAAK,+BAA+B,CAAC;AAChG,CAAC;AAuED,MAAM,CAAC,MAAM,iCAAiC,GAAsC,MAAM,CAAC,MAAM,CAAC;IAChG,0BAA0B,EAAE,IAAI;IAChC,mBAAmB,EAAE,IAAI;IACzB,YAAY,EAAE,CAAC;CAChB,CAAC,CAAC","sourcesContent":["/**\n * Shared types and collaborative-artifact partitioning helpers for the\n * `ArtifactWorkspace` realtime channel in `@memberjunction/ng-conversations`.\n */\n\nexport const ARTIFACT_WORKSPACE_CHANNEL_KEY = 'ArtifactWorkspace';\nexport const ARTIFACT_WORKSPACE_CLIENT_PLUGIN_CLASS = 'RealtimeArtifactWorkspaceChannel';\nexport const ARTIFACT_WORKSPACE_SERVER_PLUGIN_CLASS = 'ArtifactWorkspaceChannelServer';\n\nexport const COLLABORATIVE_ARTIFACT_TYPES: ReadonlySet<string> = new Set([\n 'markdown document',\n 'excel spreadsheet',\n 'presentation',\n 'whiteboard diagram',\n 'whiteboard',\n]);\n\nexport const COLLABORATIVE_ARTIFACT_DRIVERS: ReadonlySet<string> = new Set([\n 'markdownartifactviewerplugin',\n 'spreadsheetartifactviewerplugin',\n 'slidedeckartifactviewerplugin',\n 'whiteboardartifactviewerplugin',\n]);\n\n/**\n * Returns true if an artifact descriptor identifies a collaborative document,\n * spreadsheet, slide deck, or whiteboard (partitioned away from `InteractiveComponent`).\n */\nexport function IsCollaborativeArtifactDescriptor(\n artifactTypeName?: string,\n driverClass?: string,\n): boolean {\n const normalizedType = artifactTypeName?.trim().toLowerCase();\n if (normalizedType && COLLABORATIVE_ARTIFACT_TYPES.has(normalizedType)) {\n return true;\n }\n const normalizedDriver = driverClass?.trim().toLowerCase();\n if (normalizedDriver && COLLABORATIVE_ARTIFACT_DRIVERS.has(normalizedDriver)) {\n return true;\n }\n return false;\n}\n\n/**\n * Returns true if the descriptor explicitly identifies a Component artifact.\n */\nexport function IsComponentArtifactDescriptor(\n artifactTypeName?: string,\n driverClass?: string,\n): boolean {\n const normalizedType = artifactTypeName?.trim().toLowerCase();\n const normalizedDriver = driverClass?.trim().toLowerCase();\n return normalizedType === 'component' || normalizedDriver === 'componentartifactviewerplugin';\n}\n\nexport type ArtifactSelectionDomain = 'document' | 'spreadsheet' | 'slides' | 'whiteboard';\n\nexport interface ArtifactSelectionAnchor {\n domain: ArtifactSelectionDomain;\n heading?: string;\n blockId?: string;\n quote?: string;\n sheet?: string;\n range?: string;\n slideNumber?: number;\n slideId?: string;\n elementId?: string;\n}\n\nexport interface ArtifactSelectionDelta {\n instanceId: string;\n artifactId: string;\n artifactTypeName?: string;\n anchor: ArtifactSelectionAnchor;\n}\n\nexport type ArtifactWorkspaceViewMode = 'edit' | 'suggest' | 'diff' | 'present';\n\nexport interface ArtifactViewerNavigationAnchor {\n Sheet?: string;\n Range?: string;\n SlideNumber?: number;\n SlideID?: string;\n ElementID?: string;\n Heading?: string;\n BlockID?: string;\n HighlightMs?: number;\n}\n\nexport interface ArtifactNavigateToAnchorPayload extends ArtifactViewerNavigationAnchor {\n InstanceID: string;\n ArtifactID: string;\n}\n\nexport interface ArtifactWorkspaceOpenPayload {\n ArtifactID: string;\n ArtifactVersionID?: string;\n VersionNumber?: number;\n Name: string;\n ArtifactTypeName?: string;\n DriverClass?: string;\n CanEdit?: boolean;\n}\n\nexport interface ArtifactWorkspaceRecord {\n readonly InstanceID: string;\n ArtifactID: string;\n ArtifactVersionID?: string;\n VersionNumber?: number;\n Name: string;\n ArtifactTypeName?: string;\n DriverClass?: string;\n CanEdit?: boolean;\n Selection?: ArtifactSelectionAnchor | null;\n ViewMode?: ArtifactWorkspaceViewMode;\n LastUpdatedAt: number;\n}\n\nexport interface ArtifactWorkspaceConfig {\n AutoOpenDelegatedArtifacts: boolean;\n SwapToNewerVersions: boolean;\n MaxInstances: number;\n}\n\nexport const DEFAULT_ARTIFACT_WORKSPACE_CONFIG: Readonly<ArtifactWorkspaceConfig> = Object.freeze({\n AutoOpenDelegatedArtifacts: true,\n SwapToNewerVersions: true,\n MaxInstances: 6,\n});\n"]}
@@ -0,0 +1,54 @@
1
+ import { OnDestroy, OnInit } from '@angular/core';
2
+ import type { UserInfo } from '@memberjunction/core';
3
+ import { type ArtifactVersionSavedEvent } from '@memberjunction/ng-artifacts';
4
+ import { BaseAngularComponent } from '@memberjunction/ng-base-types';
5
+ import type { ArtifactWorkspaceEngine } from './artifact-workspace-engine';
6
+ import type { ArtifactNavigateToAnchorPayload, ArtifactSelectionAnchor, ArtifactSelectionDelta, ArtifactViewerNavigationAnchor, ArtifactWorkspaceRecord } from './artifact-workspace-types';
7
+ import * as i0 from "@angular/core";
8
+ /**
9
+ * Live tab-managed workspace surface for the `ArtifactWorkspace` realtime channel.
10
+ * Hosts collaborative Docs, Spreadsheets, Slide Decks, and Whiteboards side-by-side
11
+ * with a live voice/co-agent session via `<mj-artifact-viewer-panel>`.
12
+ */
13
+ export declare class RealtimeArtifactWorkspaceSurfaceComponent extends BaseAngularComponent implements OnInit, OnDestroy {
14
+ private _engine;
15
+ private subscription;
16
+ private navSubscription;
17
+ private anchorHighlightTimer;
18
+ private readonly cdr;
19
+ private readonly elementRef;
20
+ AgentName: string;
21
+ CurrentUser: UserInfo | null;
22
+ EnvironmentID: string;
23
+ ReadOnly: boolean;
24
+ set Engine(value: ArtifactWorkspaceEngine | null);
25
+ get Engine(): ArtifactWorkspaceEngine | null;
26
+ Instances: readonly ArtifactWorkspaceRecord[];
27
+ ActiveID: string | null;
28
+ IsRehydrating: boolean;
29
+ ActiveNavigationAnchor: ArtifactNavigateToAnchorPayload | null;
30
+ private activeViewerAnchor;
31
+ OnUserSelected: ((instanceId: string) => void) | null;
32
+ OnUserClosed: ((instanceId: string) => void) | null;
33
+ OnUserVersionSaved: ((instanceId: string, event: ArtifactVersionSavedEvent) => void) | null;
34
+ OnUserSelectionChanged: ((delta: ArtifactSelectionDelta) => void) | null;
35
+ get RefreshTrigger$(): import("rxjs").Subject<{
36
+ artifactId: string;
37
+ versionNumber: number;
38
+ }> | undefined;
39
+ get ActiveRecord(): ArtifactWorkspaceRecord | null;
40
+ ngOnInit(): void;
41
+ ngOnDestroy(): void;
42
+ SelectTab(instanceId: string): void;
43
+ CloseTab(instanceId: string): void;
44
+ OnViewerVersionSaved(instanceId: string, event: ArtifactVersionSavedEvent): void;
45
+ ReportSelectionAnchor(instanceId: string, anchor: ArtifactSelectionAnchor): void;
46
+ GetNavigationAnchorForRecord(record: ArtifactWorkspaceRecord): ArtifactViewerNavigationAnchor | null;
47
+ GetActiveElement(): HTMLElement | null;
48
+ IconForType(record: ArtifactWorkspaceRecord): string;
49
+ private resubscribe;
50
+ private syncFromEngine;
51
+ static ɵfac: i0.ɵɵFactoryDeclaration<RealtimeArtifactWorkspaceSurfaceComponent, never>;
52
+ static ɵcmp: i0.ɵɵComponentDeclaration<RealtimeArtifactWorkspaceSurfaceComponent, "mj-realtime-artifact-workspace-surface", never, { "AgentName": { "alias": "AgentName"; "required": false; }; "CurrentUser": { "alias": "CurrentUser"; "required": false; }; "EnvironmentID": { "alias": "EnvironmentID"; "required": false; }; "ReadOnly": { "alias": "ReadOnly"; "required": false; }; "Engine": { "alias": "Engine"; "required": false; }; }, {}, never, never, true, never>;
53
+ }
54
+ //# sourceMappingURL=realtime-artifact-workspace-surface.component.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"realtime-artifact-workspace-surface.component.d.ts","sourceRoot":"","sources":["../../../../../src/lib/components/realtime/artifact-workspace/realtime-artifact-workspace-surface.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAML,SAAS,EACT,MAAM,EAEP,MAAM,eAAe,CAAC;AAEvB,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAmB,KAAK,yBAAyB,EAAE,MAAM,8BAA8B,CAAC;AAC/F,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AACrE,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAC;AAC3E,OAAO,KAAK,EACV,+BAA+B,EAC/B,uBAAuB,EACvB,sBAAsB,EACtB,8BAA8B,EAC9B,uBAAuB,EACxB,MAAM,4BAA4B,CAAC;;AAEpC;;;;GAIG;AACH,qBAgOa,yCACX,SAAQ,oBACR,YAAW,MAAM,EAAE,SAAS;IAE5B,OAAO,CAAC,OAAO,CAAwC;IACvD,OAAO,CAAC,YAAY,CAA6B;IACjD,OAAO,CAAC,eAAe,CAA6B;IACpD,OAAO,CAAC,oBAAoB,CAA8C;IAC1E,OAAO,CAAC,QAAQ,CAAC,GAAG,CAA6B;IACjD,OAAO,CAAC,QAAQ,CAAC,UAAU,CAA+C;IAE1D,SAAS,SAAe;IACxB,WAAW,EAAE,QAAQ,GAAG,IAAI,CAAQ;IACpC,aAAa,SAAM;IACnB,QAAQ,UAAS;IAEjC,IACW,MAAM,CAAC,KAAK,EAAE,uBAAuB,GAAG,IAAI,EAOtD;IACD,IAAW,MAAM,IAAI,uBAAuB,GAAG,IAAI,CAElD;IAEM,SAAS,EAAE,SAAS,uBAAuB,EAAE,CAAM;IACnD,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAQ;IAC/B,aAAa,UAAS;IACtB,sBAAsB,EAAE,+BAA+B,GAAG,IAAI,CAAQ;IAC7E,OAAO,CAAC,kBAAkB,CAA+C;IAClE,cAAc,EAAE,CAAC,CAAC,UAAU,EAAE,MAAM,KAAK,IAAI,CAAC,GAAG,IAAI,CAAQ;IAC7D,YAAY,EAAE,CAAC,CAAC,UAAU,EAAE,MAAM,KAAK,IAAI,CAAC,GAAG,IAAI,CAAQ;IAC3D,kBAAkB,EAAE,CAAC,CAAC,UAAU,EAAE,MAAM,EAAE,KAAK,EAAE,yBAAyB,KAAK,IAAI,CAAC,GAAG,IAAI,CAAQ;IACnG,sBAAsB,EAAE,CAAC,CAAC,KAAK,EAAE,sBAAsB,KAAK,IAAI,CAAC,GAAG,IAAI,CAAQ;IAEvF,IAAW,eAAe;;;mBAEzB;IAED,IAAW,YAAY,IAAI,uBAAuB,GAAG,IAAI,CAExD;IAEM,QAAQ,IAAI,IAAI;IAIhB,WAAW,IAAI,IAAI;IAWnB,SAAS,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI;IAKnC,QAAQ,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI;IAKlC,oBAAoB,CAAC,UAAU,EAAE,MAAM,EAAE,KAAK,EAAE,yBAAyB,GAAG,IAAI;IAShF,qBAAqB,CAAC,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,uBAAuB,GAAG,IAAI;IAchF,4BAA4B,CAAC,MAAM,EAAE,uBAAuB,GAAG,8BAA8B,GAAG,IAAI;IAapG,gBAAgB,IAAI,WAAW,GAAG,IAAI;IAItC,WAAW,CAAC,MAAM,EAAE,uBAAuB,GAAG,MAAM;IAc3D,OAAO,CAAC,WAAW;IAgDnB,OAAO,CAAC,cAAc;yCA9KX,yCAAyC;2CAAzC,yCAAyC;CAsLrD"}
@@ -0,0 +1,386 @@
1
+ import { ChangeDetectionStrategy, ChangeDetectorRef, Component, ElementRef, Input, inject, } from '@angular/core';
2
+ import { ArtifactsModule } from '@memberjunction/ng-artifacts';
3
+ import { BaseAngularComponent } from '@memberjunction/ng-base-types';
4
+ import * as i0 from "@angular/core";
5
+ import * as i1 from "@memberjunction/ng-artifacts";
6
+ const _forTrack0 = ($index, $item) => $item.InstanceID;
7
+ function RealtimeArtifactWorkspaceSurfaceComponent_Conditional_1_Template(rf, ctx) { if (rf & 1) {
8
+ i0.ɵɵelementStart(0, "div", 1);
9
+ i0.ɵɵelement(1, "i", 2);
10
+ i0.ɵɵelementStart(2, "p", 3);
11
+ i0.ɵɵtext(3, "No workspace document open");
12
+ i0.ɵɵelementEnd();
13
+ i0.ɵɵelementStart(4, "p", 4);
14
+ i0.ɵɵtext(5);
15
+ i0.ɵɵelementEnd()();
16
+ } if (rf & 2) {
17
+ const ctx_r0 = i0.ɵɵnextContext();
18
+ i0.ɵɵadvance(5);
19
+ i0.ɵɵtextInterpolate1(" ", ctx_r0.AgentName, " can open or build Docs, Spreadsheets, and Slide Decks here for live collaboration. ");
20
+ } }
21
+ function RealtimeArtifactWorkspaceSurfaceComponent_Conditional_2_For_3_Conditional_4_Template(rf, ctx) { if (rf & 1) {
22
+ i0.ɵɵelementStart(0, "span", 13);
23
+ i0.ɵɵtext(1);
24
+ i0.ɵɵelementEnd();
25
+ } if (rf & 2) {
26
+ const record_r3 = i0.ɵɵnextContext().$implicit;
27
+ i0.ɵɵadvance();
28
+ i0.ɵɵtextInterpolate1("v", record_r3.VersionNumber);
29
+ } }
30
+ function RealtimeArtifactWorkspaceSurfaceComponent_Conditional_2_For_3_Template(rf, ctx) { if (rf & 1) {
31
+ const _r2 = i0.ɵɵgetCurrentView();
32
+ i0.ɵɵelementStart(0, "button", 10);
33
+ i0.ɵɵlistener("click", function RealtimeArtifactWorkspaceSurfaceComponent_Conditional_2_For_3_Template_button_click_0_listener() { const record_r3 = i0.ɵɵrestoreView(_r2).$implicit; const ctx_r0 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r0.SelectTab(record_r3.InstanceID)); });
34
+ i0.ɵɵelement(1, "i", 11);
35
+ i0.ɵɵelementStart(2, "span", 12);
36
+ i0.ɵɵtext(3);
37
+ i0.ɵɵelementEnd();
38
+ i0.ɵɵconditionalCreate(4, RealtimeArtifactWorkspaceSurfaceComponent_Conditional_2_For_3_Conditional_4_Template, 2, 1, "span", 13);
39
+ i0.ɵɵelementEnd();
40
+ } if (rf & 2) {
41
+ const record_r3 = ctx.$implicit;
42
+ const ctx_r0 = i0.ɵɵnextContext(2);
43
+ i0.ɵɵclassProp("aw-tab--active", record_r3.InstanceID === ctx_r0.ActiveID);
44
+ i0.ɵɵproperty("id", "aw-tab-" + record_r3.InstanceID)("title", record_r3.Name);
45
+ i0.ɵɵattribute("aria-selected", record_r3.InstanceID === ctx_r0.ActiveID)("aria-controls", "aw-panel-" + record_r3.InstanceID)("tabindex", record_r3.InstanceID === ctx_r0.ActiveID ? 0 : -1)("data-instance", record_r3.InstanceID);
46
+ i0.ɵɵadvance();
47
+ i0.ɵɵclassMap(ctx_r0.IconForType(record_r3));
48
+ i0.ɵɵadvance(2);
49
+ i0.ɵɵtextInterpolate(record_r3.Name);
50
+ i0.ɵɵadvance();
51
+ i0.ɵɵconditional(record_r3.VersionNumber ? 4 : -1);
52
+ } }
53
+ function RealtimeArtifactWorkspaceSurfaceComponent_Conditional_2_Conditional_4_Template(rf, ctx) { if (rf & 1) {
54
+ const _r4 = i0.ɵɵgetCurrentView();
55
+ i0.ɵɵelementStart(0, "button", 14);
56
+ i0.ɵɵlistener("click", function RealtimeArtifactWorkspaceSurfaceComponent_Conditional_2_Conditional_4_Template_button_click_0_listener() { const active_r5 = i0.ɵɵrestoreView(_r4); const ctx_r0 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r0.CloseTab(active_r5.InstanceID)); });
57
+ i0.ɵɵelement(1, "i", 15);
58
+ i0.ɵɵelementEnd();
59
+ } if (rf & 2) {
60
+ const active_r5 = ctx;
61
+ i0.ɵɵproperty("title", "Close " + active_r5.Name);
62
+ i0.ɵɵattribute("aria-label", "Close " + active_r5.Name);
63
+ } }
64
+ function RealtimeArtifactWorkspaceSurfaceComponent_Conditional_2_Conditional_6_For_1_Conditional_1_Template(rf, ctx) { if (rf & 1) {
65
+ const _r6 = i0.ɵɵgetCurrentView();
66
+ i0.ɵɵelementStart(0, "mj-artifact-viewer-panel", 18);
67
+ i0.ɵɵlistener("VersionSaved", function RealtimeArtifactWorkspaceSurfaceComponent_Conditional_2_Conditional_6_For_1_Conditional_1_Template_mj_artifact_viewer_panel_VersionSaved_0_listener($event) { i0.ɵɵrestoreView(_r6); const record_r7 = i0.ɵɵnextContext().$implicit; const ctx_r0 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r0.OnViewerVersionSaved(record_r7.InstanceID, $event)); })("selectionChanged", function RealtimeArtifactWorkspaceSurfaceComponent_Conditional_2_Conditional_6_For_1_Conditional_1_Template_mj_artifact_viewer_panel_selectionChanged_0_listener($event) { i0.ɵɵrestoreView(_r6); const record_r7 = i0.ɵɵnextContext().$implicit; const ctx_r0 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r0.ReportSelectionAnchor(record_r7.InstanceID, $event)); });
68
+ i0.ɵɵelementEnd();
69
+ } if (rf & 2) {
70
+ const record_r7 = i0.ɵɵnextContext().$implicit;
71
+ const ctx_r0 = i0.ɵɵnextContext(3);
72
+ i0.ɵɵproperty("artifactId", record_r7.ArtifactID)("versionNumber", record_r7.VersionNumber)("currentUser", ctx)("Provider", ctx_r0.Provider)("environmentId", ctx_r0.EnvironmentID)("refreshTrigger", ctx_r0.RefreshTrigger$)("canEdit", ctx_r0.ReadOnly ? false : record_r7.CanEdit ?? false)("viewMode", ctx_r0.ReadOnly ? "edit" : record_r7.ViewMode ?? "edit")("navigationAnchor", ctx_r0.GetNavigationAnchorForRecord(record_r7))("showHeader", false)("showTabs", false)("showSaveToCollection", false)("showCloseButton", false)("showMaximizeButton", false);
73
+ } }
74
+ function RealtimeArtifactWorkspaceSurfaceComponent_Conditional_2_Conditional_6_For_1_Template(rf, ctx) { if (rf & 1) {
75
+ i0.ɵɵelementStart(0, "div", 16);
76
+ i0.ɵɵconditionalCreate(1, RealtimeArtifactWorkspaceSurfaceComponent_Conditional_2_Conditional_6_For_1_Conditional_1_Template, 1, 14, "mj-artifact-viewer-panel", 17);
77
+ i0.ɵɵelementEnd();
78
+ } if (rf & 2) {
79
+ let tmp_16_0;
80
+ const record_r7 = ctx.$implicit;
81
+ const ctx_r0 = i0.ɵɵnextContext(3);
82
+ i0.ɵɵproperty("hidden", record_r7.InstanceID !== ctx_r0.ActiveID)("id", "aw-panel-" + record_r7.InstanceID);
83
+ i0.ɵɵattribute("aria-labelledby", "aw-tab-" + record_r7.InstanceID)("data-instance", record_r7.InstanceID);
84
+ i0.ɵɵadvance();
85
+ i0.ɵɵconditional((tmp_16_0 = ctx_r0.CurrentUser) ? 1 : -1, tmp_16_0);
86
+ } }
87
+ function RealtimeArtifactWorkspaceSurfaceComponent_Conditional_2_Conditional_6_Template(rf, ctx) { if (rf & 1) {
88
+ i0.ɵɵrepeaterCreate(0, RealtimeArtifactWorkspaceSurfaceComponent_Conditional_2_Conditional_6_For_1_Template, 2, 5, "div", 16, _forTrack0);
89
+ } if (rf & 2) {
90
+ const ctx_r0 = i0.ɵɵnextContext(2);
91
+ i0.ɵɵrepeater(ctx_r0.Instances);
92
+ } }
93
+ function RealtimeArtifactWorkspaceSurfaceComponent_Conditional_2_Template(rf, ctx) { if (rf & 1) {
94
+ i0.ɵɵelementStart(0, "div", 5)(1, "div", 6);
95
+ i0.ɵɵrepeaterCreate(2, RealtimeArtifactWorkspaceSurfaceComponent_Conditional_2_For_3_Template, 5, 12, "button", 7, _forTrack0);
96
+ i0.ɵɵelementEnd();
97
+ i0.ɵɵconditionalCreate(4, RealtimeArtifactWorkspaceSurfaceComponent_Conditional_2_Conditional_4_Template, 2, 2, "button", 8);
98
+ i0.ɵɵelementEnd();
99
+ i0.ɵɵelementStart(5, "div", 9);
100
+ i0.ɵɵconditionalCreate(6, RealtimeArtifactWorkspaceSurfaceComponent_Conditional_2_Conditional_6_Template, 2, 0);
101
+ i0.ɵɵelementEnd();
102
+ } if (rf & 2) {
103
+ let tmp_2_0;
104
+ const ctx_r0 = i0.ɵɵnextContext();
105
+ i0.ɵɵadvance(2);
106
+ i0.ɵɵrepeater(ctx_r0.Instances);
107
+ i0.ɵɵadvance(2);
108
+ i0.ɵɵconditional((tmp_2_0 = !ctx_r0.ReadOnly && ctx_r0.ActiveRecord) ? 4 : -1, tmp_2_0);
109
+ i0.ɵɵadvance(2);
110
+ i0.ɵɵconditional(!ctx_r0.IsRehydrating ? 6 : -1);
111
+ } }
112
+ /**
113
+ * Live tab-managed workspace surface for the `ArtifactWorkspace` realtime channel.
114
+ * Hosts collaborative Docs, Spreadsheets, Slide Decks, and Whiteboards side-by-side
115
+ * with a live voice/co-agent session via `<mj-artifact-viewer-panel>`.
116
+ */
117
+ export class RealtimeArtifactWorkspaceSurfaceComponent extends BaseAngularComponent {
118
+ _engine = null;
119
+ subscription = null;
120
+ navSubscription = null;
121
+ anchorHighlightTimer = null;
122
+ cdr = inject(ChangeDetectorRef);
123
+ elementRef = inject(ElementRef);
124
+ AgentName = 'The agent';
125
+ CurrentUser = null;
126
+ EnvironmentID = '';
127
+ ReadOnly = false;
128
+ set Engine(value) {
129
+ if (value === this._engine) {
130
+ return;
131
+ }
132
+ this._engine = value;
133
+ this.resubscribe();
134
+ this.cdr.markForCheck();
135
+ }
136
+ get Engine() {
137
+ return this._engine;
138
+ }
139
+ Instances = [];
140
+ ActiveID = null;
141
+ IsRehydrating = false;
142
+ ActiveNavigationAnchor = null;
143
+ activeViewerAnchor = null;
144
+ OnUserSelected = null;
145
+ OnUserClosed = null;
146
+ OnUserVersionSaved = null;
147
+ OnUserSelectionChanged = null;
148
+ get RefreshTrigger$() {
149
+ return this._engine?.RefreshTrigger$;
150
+ }
151
+ get ActiveRecord() {
152
+ return this.Instances.find((r) => r.InstanceID === this.ActiveID) ?? null;
153
+ }
154
+ ngOnInit() {
155
+ this.resubscribe();
156
+ }
157
+ ngOnDestroy() {
158
+ this.subscription?.unsubscribe();
159
+ this.subscription = null;
160
+ this.navSubscription?.unsubscribe();
161
+ this.navSubscription = null;
162
+ if (this.anchorHighlightTimer) {
163
+ clearTimeout(this.anchorHighlightTimer);
164
+ this.anchorHighlightTimer = null;
165
+ }
166
+ }
167
+ SelectTab(instanceId) {
168
+ this._engine?.SetActive(instanceId);
169
+ this.OnUserSelected?.(instanceId);
170
+ }
171
+ CloseTab(instanceId) {
172
+ this._engine?.Remove(instanceId);
173
+ this.OnUserClosed?.(instanceId);
174
+ }
175
+ OnViewerVersionSaved(instanceId, event) {
176
+ this._engine?.UpdateRecordMetadata(instanceId, {
177
+ ArtifactVersionID: event.VersionID,
178
+ VersionNumber: event.VersionNumber,
179
+ });
180
+ this.OnUserVersionSaved?.(instanceId, event);
181
+ this.cdr.markForCheck();
182
+ }
183
+ ReportSelectionAnchor(instanceId, anchor) {
184
+ const record = this._engine?.UpdateSelection(instanceId, anchor);
185
+ if (!record) {
186
+ return;
187
+ }
188
+ this.OnUserSelectionChanged?.({
189
+ instanceId,
190
+ artifactId: record.ArtifactID,
191
+ artifactTypeName: record.ArtifactTypeName,
192
+ anchor,
193
+ });
194
+ this.cdr.markForCheck();
195
+ }
196
+ GetNavigationAnchorForRecord(record) {
197
+ if (!this.ActiveNavigationAnchor || !this.activeViewerAnchor) {
198
+ return null;
199
+ }
200
+ if (this.ActiveNavigationAnchor.InstanceID === record.InstanceID ||
201
+ this.ActiveNavigationAnchor.ArtifactID === record.ArtifactID) {
202
+ return this.activeViewerAnchor;
203
+ }
204
+ return null;
205
+ }
206
+ GetActiveElement() {
207
+ return this.elementRef.nativeElement.querySelector('.aw-pane:not([hidden])');
208
+ }
209
+ IconForType(record) {
210
+ const t = record.ArtifactTypeName?.trim().toLowerCase() ?? '';
211
+ if (t.includes('spreadsheet') || t.includes('excel')) {
212
+ return 'fa-solid fa-table';
213
+ }
214
+ if (t.includes('presentation') || t.includes('slide')) {
215
+ return 'fa-solid fa-display';
216
+ }
217
+ if (t.includes('whiteboard')) {
218
+ return 'fa-solid fa-diagram-project';
219
+ }
220
+ return 'fa-solid fa-file-lines';
221
+ }
222
+ resubscribe() {
223
+ this.subscription?.unsubscribe();
224
+ this.subscription = null;
225
+ this.navSubscription?.unsubscribe();
226
+ this.navSubscription = null;
227
+ if (!this._engine) {
228
+ this.Instances = [];
229
+ this.ActiveID = null;
230
+ this.IsRehydrating = false;
231
+ this.ActiveNavigationAnchor = null;
232
+ this.activeViewerAnchor = null;
233
+ return;
234
+ }
235
+ this.syncFromEngine();
236
+ this.subscription = this._engine.Changed$.subscribe(() => {
237
+ this.syncFromEngine();
238
+ this.cdr.markForCheck();
239
+ });
240
+ this.navSubscription = this._engine.NavigateAnchor$.subscribe((payload) => {
241
+ this.ActiveNavigationAnchor = payload;
242
+ this.activeViewerAnchor = {
243
+ ...(payload.Sheet !== undefined ? { Sheet: payload.Sheet } : {}),
244
+ ...(payload.Range !== undefined ? { Range: payload.Range } : {}),
245
+ ...(payload.SlideNumber !== undefined ? { SlideNumber: payload.SlideNumber } : {}),
246
+ ...(payload.SlideID !== undefined ? { SlideID: payload.SlideID } : {}),
247
+ ...(payload.ElementID !== undefined ? { ElementID: payload.ElementID } : {}),
248
+ ...(payload.Heading !== undefined ? { Heading: payload.Heading } : {}),
249
+ ...(payload.BlockID !== undefined ? { BlockID: payload.BlockID } : {}),
250
+ ...(payload.HighlightMs !== undefined ? { HighlightMs: payload.HighlightMs } : {}),
251
+ };
252
+ if (this.anchorHighlightTimer) {
253
+ clearTimeout(this.anchorHighlightTimer);
254
+ this.anchorHighlightTimer = null;
255
+ }
256
+ const highlightMs = payload.HighlightMs;
257
+ if (typeof highlightMs === 'number' && highlightMs > 0) {
258
+ this.anchorHighlightTimer = setTimeout(() => {
259
+ if (this.ActiveNavigationAnchor === payload) {
260
+ this.ActiveNavigationAnchor = null;
261
+ this.activeViewerAnchor = null;
262
+ this.cdr.markForCheck();
263
+ }
264
+ }, highlightMs);
265
+ }
266
+ this.cdr.markForCheck();
267
+ });
268
+ }
269
+ syncFromEngine() {
270
+ if (!this._engine) {
271
+ return;
272
+ }
273
+ this.Instances = this._engine.Instances;
274
+ this.ActiveID = this._engine.ActiveID;
275
+ this.IsRehydrating = this._engine.IsRehydrating;
276
+ }
277
+ static ɵfac = /*@__PURE__*/ (() => { let ɵRealtimeArtifactWorkspaceSurfaceComponent_BaseFactory; return function RealtimeArtifactWorkspaceSurfaceComponent_Factory(__ngFactoryType__) { return (ɵRealtimeArtifactWorkspaceSurfaceComponent_BaseFactory || (ɵRealtimeArtifactWorkspaceSurfaceComponent_BaseFactory = i0.ɵɵgetInheritedFactory(RealtimeArtifactWorkspaceSurfaceComponent)))(__ngFactoryType__ || RealtimeArtifactWorkspaceSurfaceComponent); }; })();
278
+ static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: RealtimeArtifactWorkspaceSurfaceComponent, selectors: [["mj-realtime-artifact-workspace-surface"]], inputs: { AgentName: "AgentName", CurrentUser: "CurrentUser", EnvironmentID: "EnvironmentID", ReadOnly: "ReadOnly", Engine: "Engine" }, features: [i0.ɵɵInheritDefinitionFeature], decls: 3, vars: 1, consts: [["data-testid", "artifact-workspace-surface", 1, "aw-surface"], [1, "aw-empty"], ["aria-hidden", "true", 1, "fa-solid", "fa-file-lines", "aw-empty__icon"], [1, "aw-empty__title"], [1, "aw-empty__hint"], [1, "aw-tabbar"], ["role", "tablist", "aria-label", "Open workspace artifacts", 1, "aw-tabs"], ["type", "button", "role", "tab", 1, "aw-tab", 3, "id", "aw-tab--active", "title"], ["type", "button", 1, "aw-close", 3, "title"], [1, "aw-panes"], ["type", "button", "role", "tab", 1, "aw-tab", 3, "click", "id", "title"], ["aria-hidden", "true"], [1, "aw-tab__name"], [1, "aw-tab__version"], ["type", "button", 1, "aw-close", 3, "click", "title"], ["aria-hidden", "true", 1, "fa-solid", "fa-xmark"], ["role", "tabpanel", 1, "aw-pane", 3, "hidden", "id"], [3, "artifactId", "versionNumber", "currentUser", "Provider", "environmentId", "refreshTrigger", "canEdit", "viewMode", "navigationAnchor", "showHeader", "showTabs", "showSaveToCollection", "showCloseButton", "showMaximizeButton"], [3, "VersionSaved", "selectionChanged", "artifactId", "versionNumber", "currentUser", "Provider", "environmentId", "refreshTrigger", "canEdit", "viewMode", "navigationAnchor", "showHeader", "showTabs", "showSaveToCollection", "showCloseButton", "showMaximizeButton"]], template: function RealtimeArtifactWorkspaceSurfaceComponent_Template(rf, ctx) { if (rf & 1) {
279
+ i0.ɵɵelementStart(0, "div", 0);
280
+ i0.ɵɵconditionalCreate(1, RealtimeArtifactWorkspaceSurfaceComponent_Conditional_1_Template, 6, 1, "div", 1)(2, RealtimeArtifactWorkspaceSurfaceComponent_Conditional_2_Template, 7, 2);
281
+ i0.ɵɵelementEnd();
282
+ } if (rf & 2) {
283
+ i0.ɵɵadvance();
284
+ i0.ɵɵconditional(ctx.Instances.length === 0 ? 1 : 2);
285
+ } }, dependencies: [ArtifactsModule, i1.ArtifactViewerPanelComponent], styles: ["[_nghost-%COMP%] {\n display: flex;\n flex-direction: column;\n height: 100%;\n width: 100%;\n min-height: 0;\n }\n .aw-surface[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n height: 100%;\n width: 100%;\n min-height: 0;\n background: var(--mj-bg-surface);\n color: var(--mj-text-primary);\n }\n .aw-empty[_ngcontent-%COMP%] {\n flex: 1;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n gap: 8px;\n padding: 24px;\n text-align: center;\n color: var(--mj-text-secondary);\n }\n .aw-empty__icon[_ngcontent-%COMP%] {\n font-size: 28px;\n color: var(--mj-brand-primary);\n opacity: 0.75;\n }\n .aw-empty__title[_ngcontent-%COMP%] {\n margin: 0;\n font-size: 14px;\n font-weight: 600;\n color: var(--mj-text-primary);\n }\n .aw-empty__hint[_ngcontent-%COMP%] {\n margin: 0;\n font-size: 12px;\n max-width: 320px;\n }\n .aw-tabbar[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 8px;\n padding: 6px 10px;\n background: var(--mj-bg-surface-sunken);\n border-bottom: 1px solid var(--mj-border-default);\n flex-shrink: 0;\n }\n .aw-tabs[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 4px;\n overflow-x: auto;\n min-width: 0;\n }\n .aw-tab[_ngcontent-%COMP%] {\n display: inline-flex;\n align-items: center;\n gap: 6px;\n padding: 5px 10px;\n border-radius: 6px;\n border: 1px solid transparent;\n background: transparent;\n color: var(--mj-text-secondary);\n font-size: 12px;\n font-weight: 500;\n cursor: pointer;\n white-space: nowrap;\n }\n .aw-tab[_ngcontent-%COMP%]:hover {\n background: var(--mj-bg-surface-hover);\n color: var(--mj-text-primary);\n }\n .aw-tab--active[_ngcontent-%COMP%] {\n background: var(--mj-bg-surface);\n border-color: var(--mj-border-default);\n color: var(--mj-text-primary);\n font-weight: 600;\n }\n .aw-tab__name[_ngcontent-%COMP%] {\n max-width: 180px;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n .aw-tab__version[_ngcontent-%COMP%] {\n font-size: 11px;\n color: var(--mj-text-muted);\n }\n .aw-close[_ngcontent-%COMP%] {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 26px;\n height: 26px;\n border-radius: 6px;\n border: 1px solid var(--mj-border-subtle);\n background: var(--mj-bg-surface);\n color: var(--mj-text-secondary);\n cursor: pointer;\n flex-shrink: 0;\n }\n .aw-close[_ngcontent-%COMP%]:hover {\n background: var(--mj-bg-surface-hover);\n color: var(--mj-text-primary);\n }\n .aw-panes[_ngcontent-%COMP%] {\n flex: 1;\n min-height: 0;\n display: flex;\n flex-direction: column;\n }\n .aw-pane[_ngcontent-%COMP%] {\n flex: 1;\n min-height: 0;\n display: flex;\n flex-direction: column;\n }\n .aw-pane[hidden][_ngcontent-%COMP%] {\n display: none;\n }\n .aw-pane[_ngcontent-%COMP%] > mj-artifact-viewer-panel[_ngcontent-%COMP%] {\n flex: 1;\n min-height: 0;\n }"], changeDetection: 0 });
286
+ }
287
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(RealtimeArtifactWorkspaceSurfaceComponent, [{
288
+ type: Component,
289
+ args: [{ standalone: true, selector: 'mj-realtime-artifact-workspace-surface', imports: [ArtifactsModule], changeDetection: ChangeDetectionStrategy.OnPush, template: `
290
+ <div class="aw-surface" data-testid="artifact-workspace-surface">
291
+ @if (Instances.length === 0) {
292
+ <div class="aw-empty">
293
+ <i class="fa-solid fa-file-lines aw-empty__icon" aria-hidden="true"></i>
294
+ <p class="aw-empty__title">No workspace document open</p>
295
+ <p class="aw-empty__hint">
296
+ {{ AgentName }} can open or build Docs, Spreadsheets, and Slide Decks here for live collaboration.
297
+ </p>
298
+ </div>
299
+ } @else {
300
+ <div class="aw-tabbar">
301
+ <div class="aw-tabs" role="tablist" aria-label="Open workspace artifacts">
302
+ @for (record of Instances; track record.InstanceID) {
303
+ <button
304
+ type="button"
305
+ class="aw-tab"
306
+ role="tab"
307
+ [id]="'aw-tab-' + record.InstanceID"
308
+ [class.aw-tab--active]="record.InstanceID === ActiveID"
309
+ [attr.aria-selected]="record.InstanceID === ActiveID"
310
+ [attr.aria-controls]="'aw-panel-' + record.InstanceID"
311
+ [attr.tabindex]="record.InstanceID === ActiveID ? 0 : -1"
312
+ [attr.data-instance]="record.InstanceID"
313
+ [title]="record.Name"
314
+ (click)="SelectTab(record.InstanceID)"
315
+ >
316
+ <i [class]="IconForType(record)" aria-hidden="true"></i>
317
+ <span class="aw-tab__name">{{ record.Name }}</span>
318
+ @if (record.VersionNumber) {
319
+ <span class="aw-tab__version">v{{ record.VersionNumber }}</span>
320
+ }
321
+ </button>
322
+ }
323
+ </div>
324
+ @if (!ReadOnly && ActiveRecord; as active) {
325
+ <button
326
+ type="button"
327
+ class="aw-close"
328
+ [attr.aria-label]="'Close ' + active.Name"
329
+ [title]="'Close ' + active.Name"
330
+ (click)="CloseTab(active.InstanceID)"
331
+ >
332
+ <i class="fa-solid fa-xmark" aria-hidden="true"></i>
333
+ </button>
334
+ }
335
+ </div>
336
+ <div class="aw-panes">
337
+ @if (!IsRehydrating) {
338
+ @for (record of Instances; track record.InstanceID) {
339
+ <div
340
+ class="aw-pane"
341
+ role="tabpanel"
342
+ [hidden]="record.InstanceID !== ActiveID"
343
+ [id]="'aw-panel-' + record.InstanceID"
344
+ [attr.aria-labelledby]="'aw-tab-' + record.InstanceID"
345
+ [attr.data-instance]="record.InstanceID"
346
+ >
347
+ @if (CurrentUser; as user) {
348
+ <mj-artifact-viewer-panel
349
+ [artifactId]="record.ArtifactID"
350
+ [versionNumber]="record.VersionNumber"
351
+ [currentUser]="user"
352
+ [Provider]="Provider"
353
+ [environmentId]="EnvironmentID"
354
+ [refreshTrigger]="RefreshTrigger$"
355
+ [canEdit]="ReadOnly ? false : (record.CanEdit ?? false)"
356
+ [viewMode]="ReadOnly ? 'edit' : (record.ViewMode ?? 'edit')"
357
+ [navigationAnchor]="GetNavigationAnchorForRecord(record)"
358
+ [showHeader]="false"
359
+ [showTabs]="false"
360
+ [showSaveToCollection]="false"
361
+ [showCloseButton]="false"
362
+ [showMaximizeButton]="false"
363
+ (VersionSaved)="OnViewerVersionSaved(record.InstanceID, $event)"
364
+ (selectionChanged)="ReportSelectionAnchor(record.InstanceID, $event)"
365
+ ></mj-artifact-viewer-panel>
366
+ }
367
+ </div>
368
+ }
369
+ }
370
+ </div>
371
+ }
372
+ </div>
373
+ `, styles: ["\n :host {\n display: flex;\n flex-direction: column;\n height: 100%;\n width: 100%;\n min-height: 0;\n }\n .aw-surface {\n display: flex;\n flex-direction: column;\n height: 100%;\n width: 100%;\n min-height: 0;\n background: var(--mj-bg-surface);\n color: var(--mj-text-primary);\n }\n .aw-empty {\n flex: 1;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n gap: 8px;\n padding: 24px;\n text-align: center;\n color: var(--mj-text-secondary);\n }\n .aw-empty__icon {\n font-size: 28px;\n color: var(--mj-brand-primary);\n opacity: 0.75;\n }\n .aw-empty__title {\n margin: 0;\n font-size: 14px;\n font-weight: 600;\n color: var(--mj-text-primary);\n }\n .aw-empty__hint {\n margin: 0;\n font-size: 12px;\n max-width: 320px;\n }\n .aw-tabbar {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 8px;\n padding: 6px 10px;\n background: var(--mj-bg-surface-sunken);\n border-bottom: 1px solid var(--mj-border-default);\n flex-shrink: 0;\n }\n .aw-tabs {\n display: flex;\n align-items: center;\n gap: 4px;\n overflow-x: auto;\n min-width: 0;\n }\n .aw-tab {\n display: inline-flex;\n align-items: center;\n gap: 6px;\n padding: 5px 10px;\n border-radius: 6px;\n border: 1px solid transparent;\n background: transparent;\n color: var(--mj-text-secondary);\n font-size: 12px;\n font-weight: 500;\n cursor: pointer;\n white-space: nowrap;\n }\n .aw-tab:hover {\n background: var(--mj-bg-surface-hover);\n color: var(--mj-text-primary);\n }\n .aw-tab--active {\n background: var(--mj-bg-surface);\n border-color: var(--mj-border-default);\n color: var(--mj-text-primary);\n font-weight: 600;\n }\n .aw-tab__name {\n max-width: 180px;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n .aw-tab__version {\n font-size: 11px;\n color: var(--mj-text-muted);\n }\n .aw-close {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 26px;\n height: 26px;\n border-radius: 6px;\n border: 1px solid var(--mj-border-subtle);\n background: var(--mj-bg-surface);\n color: var(--mj-text-secondary);\n cursor: pointer;\n flex-shrink: 0;\n }\n .aw-close:hover {\n background: var(--mj-bg-surface-hover);\n color: var(--mj-text-primary);\n }\n .aw-panes {\n flex: 1;\n min-height: 0;\n display: flex;\n flex-direction: column;\n }\n .aw-pane {\n flex: 1;\n min-height: 0;\n display: flex;\n flex-direction: column;\n }\n .aw-pane[hidden] {\n display: none;\n }\n .aw-pane > mj-artifact-viewer-panel {\n flex: 1;\n min-height: 0;\n }\n "] }]
374
+ }], null, { AgentName: [{
375
+ type: Input
376
+ }], CurrentUser: [{
377
+ type: Input
378
+ }], EnvironmentID: [{
379
+ type: Input
380
+ }], ReadOnly: [{
381
+ type: Input
382
+ }], Engine: [{
383
+ type: Input
384
+ }] }); })();
385
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(RealtimeArtifactWorkspaceSurfaceComponent, { className: "RealtimeArtifactWorkspaceSurfaceComponent", filePath: "src/lib/components/realtime/artifact-workspace/realtime-artifact-workspace-surface.component.ts", lineNumber: 253 }); })();
386
+ //# sourceMappingURL=realtime-artifact-workspace-surface.component.js.map