@arbidocs/blocks 0.5.165 → 0.5.166

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 (339) hide show
  1. package/dist/{ConnectedCallDock-LHIAK4GV.cjs → ConnectedCallDock-RUBZWNBS.cjs} +32 -32
  2. package/dist/{ConnectedCallDock-LHIAK4GV.cjs.map → ConnectedCallDock-RUBZWNBS.cjs.map} +1 -1
  3. package/dist/{ConnectedCallRoom-LA57WUKX.cjs → ConnectedCallRoom-UE73GPNR.cjs} +24 -24
  4. package/dist/{ConnectedCallRoom-LA57WUKX.cjs.map → ConnectedCallRoom-UE73GPNR.cjs.map} +1 -1
  5. package/dist/{ConnectedMailInviteCard-LV2VARX3.cjs → ConnectedMailInviteCard-HPOHLB72.cjs} +6 -6
  6. package/dist/{ConnectedMailInviteCard-LV2VARX3.cjs.map → ConnectedMailInviteCard-HPOHLB72.cjs.map} +1 -1
  7. package/dist/{ConnectedNativeDocxComparison-SWX5DTYX.cjs → ConnectedNativeDocxComparison-P5TX46HD.cjs} +22 -22
  8. package/dist/{ConnectedNativeDocxComparison-SWX5DTYX.cjs.map → ConnectedNativeDocxComparison-P5TX46HD.cjs.map} +1 -1
  9. package/dist/{ConnectedPresentation-7ZBHQBIS.cjs → ConnectedPresentation-CQJB3BOB.cjs} +27 -27
  10. package/dist/{ConnectedPresentation-7ZBHQBIS.cjs.map → ConnectedPresentation-CQJB3BOB.cjs.map} +1 -1
  11. package/dist/{ConnectedProductionSetDialog-4N7R7SFZ.cjs → ConnectedProductionSetDialog-O5RX57PS.cjs} +10 -9
  12. package/dist/ConnectedProductionSetDialog-O5RX57PS.cjs.map +1 -0
  13. package/dist/{ConnectedSlidesTab-6XHUP32F.cjs → ConnectedSlidesTab-LEA5OW75.cjs} +20 -20
  14. package/dist/{ConnectedSlidesTab-6XHUP32F.cjs.map → ConnectedSlidesTab-LEA5OW75.cjs.map} +1 -1
  15. package/dist/{ConnectedStreamedWordArtifact-SROLNCGC.cjs → ConnectedStreamedWordArtifact-XO4ULCQO.cjs} +22 -22
  16. package/dist/{ConnectedStreamedWordArtifact-SROLNCGC.cjs.map → ConnectedStreamedWordArtifact-XO4ULCQO.cjs.map} +1 -1
  17. package/dist/{DocumentReviewCard-43SDO57A.cjs → DocumentReviewCard-OHWZ6YI3.cjs} +28 -28
  18. package/dist/{DocumentReviewCard-43SDO57A.cjs.map → DocumentReviewCard-OHWZ6YI3.cjs.map} +1 -1
  19. package/dist/{FilesViewerDialog-2MJHM32X.cjs → FilesViewerDialog-M6MRG2X7.cjs} +64 -62
  20. package/dist/FilesViewerDialog-M6MRG2X7.cjs.map +1 -0
  21. package/dist/{WorkspaceTableView-EWLOVD6P.cjs → WorkspaceTableView-ZAN4C4IZ.cjs} +13 -13
  22. package/dist/{WorkspaceTableView-EWLOVD6P.cjs.map → WorkspaceTableView-ZAN4C4IZ.cjs.map} +1 -1
  23. package/dist/agents/index.cjs +288 -288
  24. package/dist/{ai-HME7CNDE.cjs → ai-AV4LQ5AW.cjs} +30 -31
  25. package/dist/ai-AV4LQ5AW.cjs.map +1 -0
  26. package/dist/auth/index.cjs +13 -12
  27. package/dist/calendar/index.cjs +106 -106
  28. package/dist/calls/index.cjs +148 -148
  29. package/dist/chat/generatedDocuments.d.ts +2 -0
  30. package/dist/chat/generatedDocuments.js +6 -3
  31. package/dist/chat/generatedDocuments.js.map +2 -2
  32. package/dist/chat/index.cjs +119 -119
  33. package/dist/chat/rehype-doc-entity-pills.js +5 -3
  34. package/dist/chat/rehype-doc-entity-pills.js.map +2 -2
  35. package/dist/{chunk-HJDMKDAE.cjs → chunk-3DRBJGRR.cjs} +14 -14
  36. package/dist/{chunk-HJDMKDAE.cjs.map → chunk-3DRBJGRR.cjs.map} +1 -1
  37. package/dist/{chunk-WKIESVWJ.cjs → chunk-3EIO4ZH5.cjs} +14 -14
  38. package/dist/{chunk-WKIESVWJ.cjs.map → chunk-3EIO4ZH5.cjs.map} +1 -1
  39. package/dist/{chunk-GEQW7XQA.cjs → chunk-3QHVDOQT.cjs} +68 -65
  40. package/dist/chunk-3QHVDOQT.cjs.map +1 -0
  41. package/dist/{chunk-LOSCXAAF.cjs → chunk-3UCRJRNI.cjs} +34 -4
  42. package/dist/chunk-3UCRJRNI.cjs.map +1 -0
  43. package/dist/{chunk-KL7R2IBY.cjs → chunk-4M3OIBIS.cjs} +2 -2
  44. package/dist/{chunk-KL7R2IBY.cjs.map → chunk-4M3OIBIS.cjs.map} +1 -1
  45. package/dist/{chunk-OM5J23JR.cjs → chunk-4RDXW7KP.cjs} +25 -25
  46. package/dist/{chunk-OM5J23JR.cjs.map → chunk-4RDXW7KP.cjs.map} +1 -1
  47. package/dist/{chunk-UYTFPMEA.cjs → chunk-5FSULBPE.cjs} +9 -9
  48. package/dist/{chunk-UYTFPMEA.cjs.map → chunk-5FSULBPE.cjs.map} +1 -1
  49. package/dist/{chunk-XKQVAGVR.cjs → chunk-5G33DATM.cjs} +50 -41
  50. package/dist/chunk-5G33DATM.cjs.map +1 -0
  51. package/dist/{chunk-6XKQAQWF.cjs → chunk-5K6XHSAM.cjs} +4 -4
  52. package/dist/{chunk-6XKQAQWF.cjs.map → chunk-5K6XHSAM.cjs.map} +1 -1
  53. package/dist/{chunk-5NWTA4Y4.cjs → chunk-6AFAYGJW.cjs} +5 -5
  54. package/dist/{chunk-5NWTA4Y4.cjs.map → chunk-6AFAYGJW.cjs.map} +1 -1
  55. package/dist/{chunk-SLQPSKYU.cjs → chunk-6DHDITKK.cjs} +12 -7
  56. package/dist/chunk-6DHDITKK.cjs.map +1 -0
  57. package/dist/{chunk-QDZDHP23.cjs → chunk-7D3OMWIZ.cjs} +4 -4
  58. package/dist/{chunk-QDZDHP23.cjs.map → chunk-7D3OMWIZ.cjs.map} +1 -1
  59. package/dist/{chunk-SH7W4WVI.cjs → chunk-7FWP7W34.cjs} +9 -6
  60. package/dist/chunk-7FWP7W34.cjs.map +1 -0
  61. package/dist/{chunk-KJ65QZJI.cjs → chunk-7GVKG3G4.cjs} +13 -13
  62. package/dist/{chunk-KJ65QZJI.cjs.map → chunk-7GVKG3G4.cjs.map} +1 -1
  63. package/dist/{chunk-WD5KQ2VC.cjs → chunk-7OMRSZOJ.cjs} +28 -28
  64. package/dist/{chunk-WD5KQ2VC.cjs.map → chunk-7OMRSZOJ.cjs.map} +1 -1
  65. package/dist/{chunk-2QLO3HBN.cjs → chunk-7QSZSGUQ.cjs} +6 -6
  66. package/dist/{chunk-2QLO3HBN.cjs.map → chunk-7QSZSGUQ.cjs.map} +1 -1
  67. package/dist/{chunk-HXYOG3DH.cjs → chunk-AG5XZ3AM.cjs} +9 -9
  68. package/dist/{chunk-HXYOG3DH.cjs.map → chunk-AG5XZ3AM.cjs.map} +1 -1
  69. package/dist/{chunk-WQ2KG4LS.cjs → chunk-BCU65RJM.cjs} +3 -3
  70. package/dist/{chunk-WQ2KG4LS.cjs.map → chunk-BCU65RJM.cjs.map} +1 -1
  71. package/dist/chunk-BNXWT3DX.cjs +516 -0
  72. package/dist/chunk-BNXWT3DX.cjs.map +1 -0
  73. package/dist/{chunk-2P7VH2SK.cjs → chunk-C25KF2TM.cjs} +4 -4
  74. package/dist/{chunk-2P7VH2SK.cjs.map → chunk-C25KF2TM.cjs.map} +1 -1
  75. package/dist/{chunk-U4KUTO6O.cjs → chunk-CI777IPA.cjs} +21 -21
  76. package/dist/{chunk-U4KUTO6O.cjs.map → chunk-CI777IPA.cjs.map} +1 -1
  77. package/dist/{chunk-NTAGDFWU.cjs → chunk-DI6UEQCZ.cjs} +4 -4
  78. package/dist/{chunk-NTAGDFWU.cjs.map → chunk-DI6UEQCZ.cjs.map} +1 -1
  79. package/dist/{chunk-RI367OOL.cjs → chunk-ER2MRSLT.cjs} +5 -5
  80. package/dist/{chunk-RI367OOL.cjs.map → chunk-ER2MRSLT.cjs.map} +1 -1
  81. package/dist/{chunk-POFKTD4G.cjs → chunk-FUKN3PI5.cjs} +5 -5
  82. package/dist/{chunk-POFKTD4G.cjs.map → chunk-FUKN3PI5.cjs.map} +1 -1
  83. package/dist/{chunk-DWN5AUMH.cjs → chunk-GD5OYIOV.cjs} +6 -6
  84. package/dist/{chunk-DWN5AUMH.cjs.map → chunk-GD5OYIOV.cjs.map} +1 -1
  85. package/dist/{chunk-NGM4HIPP.cjs → chunk-H3VVUNEX.cjs} +21 -21
  86. package/dist/{chunk-NGM4HIPP.cjs.map → chunk-H3VVUNEX.cjs.map} +1 -1
  87. package/dist/{chunk-HRLWD6FJ.cjs → chunk-HH5MKRBL.cjs} +9 -9
  88. package/dist/{chunk-HRLWD6FJ.cjs.map → chunk-HH5MKRBL.cjs.map} +1 -1
  89. package/dist/{chunk-46LX6EQT.cjs → chunk-HN56WWBR.cjs} +2 -2
  90. package/dist/{chunk-46LX6EQT.cjs.map → chunk-HN56WWBR.cjs.map} +1 -1
  91. package/dist/chunk-IRUQZI6P.cjs +17 -0
  92. package/dist/chunk-IRUQZI6P.cjs.map +1 -0
  93. package/dist/{chunk-C2VVBU7K.cjs → chunk-IXCWZ4HC.cjs} +6 -6
  94. package/dist/{chunk-C2VVBU7K.cjs.map → chunk-IXCWZ4HC.cjs.map} +1 -1
  95. package/dist/{chunk-5HPUGSTJ.cjs → chunk-J37DOAGN.cjs} +7 -7
  96. package/dist/{chunk-5HPUGSTJ.cjs.map → chunk-J37DOAGN.cjs.map} +1 -1
  97. package/dist/{chunk-DLGYR4JL.cjs → chunk-J5CBCUQE.cjs} +8 -8
  98. package/dist/{chunk-DLGYR4JL.cjs.map → chunk-J5CBCUQE.cjs.map} +1 -1
  99. package/dist/{chunk-FQXZZXS2.cjs → chunk-JEHGTPS2.cjs} +5 -5
  100. package/dist/{chunk-FQXZZXS2.cjs.map → chunk-JEHGTPS2.cjs.map} +1 -1
  101. package/dist/{chunk-36NQMOJE.cjs → chunk-JFCTB5YI.cjs} +6 -6
  102. package/dist/{chunk-36NQMOJE.cjs.map → chunk-JFCTB5YI.cjs.map} +1 -1
  103. package/dist/{chunk-T26UYA6Q.cjs → chunk-JTBWI74K.cjs} +7 -7
  104. package/dist/{chunk-T26UYA6Q.cjs.map → chunk-JTBWI74K.cjs.map} +1 -1
  105. package/dist/{chunk-T5XLL4L2.cjs → chunk-LE4Z2UIG.cjs} +117 -95
  106. package/dist/chunk-LE4Z2UIG.cjs.map +1 -0
  107. package/dist/{chunk-ZL6VZTG6.cjs → chunk-LZGGR63X.cjs} +4 -4
  108. package/dist/{chunk-ZL6VZTG6.cjs.map → chunk-LZGGR63X.cjs.map} +1 -1
  109. package/dist/{chunk-AZO4F3ME.cjs → chunk-N2SJR2Y7.cjs} +37 -37
  110. package/dist/{chunk-AZO4F3ME.cjs.map → chunk-N2SJR2Y7.cjs.map} +1 -1
  111. package/dist/{chunk-JARBYN6Z.cjs → chunk-NAXF2KHT.cjs} +5 -3
  112. package/dist/chunk-NAXF2KHT.cjs.map +1 -0
  113. package/dist/{chunk-FVSJXCKF.cjs → chunk-NFXHBTAO.cjs} +4 -4
  114. package/dist/{chunk-FVSJXCKF.cjs.map → chunk-NFXHBTAO.cjs.map} +1 -1
  115. package/dist/{chunk-Z2XZ2D4N.cjs → chunk-O2NHBB3D.cjs} +8 -5
  116. package/dist/chunk-O2NHBB3D.cjs.map +1 -0
  117. package/dist/{chunk-KZFE65SA.cjs → chunk-OHWYQI3B.cjs} +15 -15
  118. package/dist/{chunk-KZFE65SA.cjs.map → chunk-OHWYQI3B.cjs.map} +1 -1
  119. package/dist/{chunk-V2IV2E2B.cjs → chunk-OIYKKUAN.cjs} +5 -5
  120. package/dist/{chunk-V2IV2E2B.cjs.map → chunk-OIYKKUAN.cjs.map} +1 -1
  121. package/dist/{chunk-CULUTYOD.cjs → chunk-OO452QD5.cjs} +4 -4
  122. package/dist/{chunk-CULUTYOD.cjs.map → chunk-OO452QD5.cjs.map} +1 -1
  123. package/dist/{chunk-4RR7ZZPD.cjs → chunk-PJ5OQ5VB.cjs} +5 -5
  124. package/dist/{chunk-4RR7ZZPD.cjs.map → chunk-PJ5OQ5VB.cjs.map} +1 -1
  125. package/dist/{chunk-VHD5DZW4.cjs → chunk-PK5H5SVS.cjs} +10 -8
  126. package/dist/chunk-PK5H5SVS.cjs.map +1 -0
  127. package/dist/{chunk-BAZZTZW5.cjs → chunk-PYKTUGPE.cjs} +8 -8
  128. package/dist/{chunk-BAZZTZW5.cjs.map → chunk-PYKTUGPE.cjs.map} +1 -1
  129. package/dist/{chunk-HBO567HU.cjs → chunk-QD2XCNJH.cjs} +68 -68
  130. package/dist/{chunk-HBO567HU.cjs.map → chunk-QD2XCNJH.cjs.map} +1 -1
  131. package/dist/{chunk-P7VUIW24.cjs → chunk-QDXZVJWN.cjs} +23 -9
  132. package/dist/chunk-QDXZVJWN.cjs.map +1 -0
  133. package/dist/{chunk-MB2Y2ZGM.cjs → chunk-SJPKXXB5.cjs} +6 -6
  134. package/dist/{chunk-MB2Y2ZGM.cjs.map → chunk-SJPKXXB5.cjs.map} +1 -1
  135. package/dist/{chunk-5GBM7BQB.cjs → chunk-SOT7NPIB.cjs} +4 -4
  136. package/dist/{chunk-5GBM7BQB.cjs.map → chunk-SOT7NPIB.cjs.map} +1 -1
  137. package/dist/{chunk-Z22ORBA2.cjs → chunk-SX6KL6UN.cjs} +4 -4
  138. package/dist/{chunk-Z22ORBA2.cjs.map → chunk-SX6KL6UN.cjs.map} +1 -1
  139. package/dist/{chunk-AIKPZJNI.cjs → chunk-SXBQAMHV.cjs} +240 -8
  140. package/dist/chunk-SXBQAMHV.cjs.map +1 -0
  141. package/dist/{chunk-QNK5SK4Q.cjs → chunk-TKO24ZZ6.cjs} +4 -4
  142. package/dist/{chunk-QNK5SK4Q.cjs.map → chunk-TKO24ZZ6.cjs.map} +1 -1
  143. package/dist/{chunk-U4YOVI5D.cjs → chunk-TLIZD6DV.cjs} +6 -6
  144. package/dist/{chunk-U4YOVI5D.cjs.map → chunk-TLIZD6DV.cjs.map} +1 -1
  145. package/dist/{chunk-3GQQUR27.cjs → chunk-TNBNDY2J.cjs} +4 -4
  146. package/dist/{chunk-3GQQUR27.cjs.map → chunk-TNBNDY2J.cjs.map} +1 -1
  147. package/dist/{chunk-PDDC5JOE.cjs → chunk-UNSZLNA4.cjs} +12 -12
  148. package/dist/{chunk-PDDC5JOE.cjs.map → chunk-UNSZLNA4.cjs.map} +1 -1
  149. package/dist/{chunk-XMSK3LQX.cjs → chunk-UXGIMOIN.cjs} +4 -4
  150. package/dist/{chunk-XMSK3LQX.cjs.map → chunk-UXGIMOIN.cjs.map} +1 -1
  151. package/dist/{chunk-LLVE5TST.cjs → chunk-VDHBLDQC.cjs} +4 -4
  152. package/dist/{chunk-LLVE5TST.cjs.map → chunk-VDHBLDQC.cjs.map} +1 -1
  153. package/dist/{chunk-DYIZ7W4P.cjs → chunk-VDT7TEAH.cjs} +6 -6
  154. package/dist/{chunk-DYIZ7W4P.cjs.map → chunk-VDT7TEAH.cjs.map} +1 -1
  155. package/dist/{chunk-EKFA2OS3.cjs → chunk-VJNJ4G6Y.cjs} +4 -4
  156. package/dist/{chunk-EKFA2OS3.cjs.map → chunk-VJNJ4G6Y.cjs.map} +1 -1
  157. package/dist/{chunk-63FEMB6U.cjs → chunk-VNYMWFIT.cjs} +56 -27
  158. package/dist/chunk-VNYMWFIT.cjs.map +1 -0
  159. package/dist/{chunk-GB5MN5FC.cjs → chunk-VWSOHZK2.cjs} +4 -4
  160. package/dist/{chunk-GB5MN5FC.cjs.map → chunk-VWSOHZK2.cjs.map} +1 -1
  161. package/dist/{chunk-JHDCDEXY.cjs → chunk-W5JTACMK.cjs} +8 -5
  162. package/dist/chunk-W5JTACMK.cjs.map +1 -0
  163. package/dist/{chunk-CKJTXS63.cjs → chunk-W7XZKTDG.cjs} +29 -29
  164. package/dist/{chunk-CKJTXS63.cjs.map → chunk-W7XZKTDG.cjs.map} +1 -1
  165. package/dist/{chunk-YGCS53TK.cjs → chunk-WGRXQ7PI.cjs} +24 -24
  166. package/dist/{chunk-YGCS53TK.cjs.map → chunk-WGRXQ7PI.cjs.map} +1 -1
  167. package/dist/{chunk-W5QSKW7T.cjs → chunk-WHHBEV4G.cjs} +4 -4
  168. package/dist/{chunk-W5QSKW7T.cjs.map → chunk-WHHBEV4G.cjs.map} +1 -1
  169. package/dist/{chunk-PIWXX2M4.cjs → chunk-WV3RNWAG.cjs} +11 -11
  170. package/dist/{chunk-PIWXX2M4.cjs.map → chunk-WV3RNWAG.cjs.map} +1 -1
  171. package/dist/{chunk-7WENPOCP.cjs → chunk-XKXKEVHH.cjs} +8 -8
  172. package/dist/{chunk-7WENPOCP.cjs.map → chunk-XKXKEVHH.cjs.map} +1 -1
  173. package/dist/{chunk-CYI4OYZD.cjs → chunk-YTDVWIHU.cjs} +1066 -1057
  174. package/dist/chunk-YTDVWIHU.cjs.map +1 -0
  175. package/dist/{chunk-7HHIVC23.cjs → chunk-ZLXTGHK3.cjs} +79 -79
  176. package/dist/{chunk-7HHIVC23.cjs.map → chunk-ZLXTGHK3.cjs.map} +1 -1
  177. package/dist/{chunk-YA6GXWC2.cjs → chunk-ZQQVXRYZ.cjs} +4 -4
  178. package/dist/{chunk-YA6GXWC2.cjs.map → chunk-ZQQVXRYZ.cjs.map} +1 -1
  179. package/dist/citations/index.cjs +8 -8
  180. package/dist/collaboration/direct-messages/DmParts.d.ts +2 -1
  181. package/dist/collaboration/direct-messages/DmParts.js +21 -7
  182. package/dist/collaboration/direct-messages/DmParts.js.map +2 -2
  183. package/dist/collaboration/index.cjs +82 -82
  184. package/dist/components/EntityChip.d.ts +2 -1
  185. package/dist/components/EntityChip.js +2 -0
  186. package/dist/components/EntityChip.js.map +2 -2
  187. package/dist/connect/docx.cjs +25 -25
  188. package/dist/connect/index.cjs +2335 -1819
  189. package/dist/connect/index.cjs.map +1 -1
  190. package/dist/connect/viewer.cjs +49 -47
  191. package/dist/connection/ConnectedAgentChatPanel.d.ts +3 -1
  192. package/dist/connection/ConnectedAgentChatPanel.js +5 -0
  193. package/dist/connection/ConnectedAgentChatPanel.js.map +2 -2
  194. package/dist/connection/agents/ConnectedAgentsPage.js +6 -1
  195. package/dist/connection/agents/ConnectedAgentsPage.js.map +2 -2
  196. package/dist/connection/contacts/ConnectedContactsPanel.js +4 -2
  197. package/dist/connection/contacts/ConnectedContactsPanel.js.map +2 -2
  198. package/dist/connection/conversation/ConnectedMarkdown.js +58 -24
  199. package/dist/connection/conversation/ConnectedMarkdown.js.map +2 -2
  200. package/dist/connection/conversation/ConnectedMessage.js +19 -14
  201. package/dist/connection/conversation/ConnectedMessage.js.map +2 -2
  202. package/dist/connection/conversation/DocumentWorkspaceContext.d.ts +7 -2
  203. package/dist/connection/conversation/DocumentWorkspaceContext.js +31 -11
  204. package/dist/connection/conversation/DocumentWorkspaceContext.js.map +2 -2
  205. package/dist/connection/conversation/EntityReference.d.ts +8 -0
  206. package/dist/connection/conversation/EntityReference.js +124 -0
  207. package/dist/connection/conversation/EntityReference.js.map +7 -0
  208. package/dist/connection/conversation/entity-references.d.ts +1 -0
  209. package/dist/connection/conversation/entity-references.js +7 -0
  210. package/dist/connection/conversation/entity-references.js.map +7 -0
  211. package/dist/connection/conversation/open-entity-reference.d.ts +5 -0
  212. package/dist/connection/conversation/open-entity-reference.js +57 -0
  213. package/dist/connection/conversation/open-entity-reference.js.map +7 -0
  214. package/dist/connection/databases/ConnectedDatabasesPage.js +15 -2
  215. package/dist/connection/databases/ConnectedDatabasesPage.js.map +2 -2
  216. package/dist/connection/databases/DatabaseViewsMenu.d.ts +2 -1
  217. package/dist/connection/databases/DatabaseViewsMenu.js +9 -0
  218. package/dist/connection/databases/DatabaseViewsMenu.js.map +2 -2
  219. package/dist/connection/entities/ConnectedDocumentPill.js +5 -1
  220. package/dist/connection/entities/ConnectedDocumentPill.js.map +2 -2
  221. package/dist/connection/entities/ConnectedUserEntity.js +3 -0
  222. package/dist/connection/entities/ConnectedUserEntity.js.map +2 -2
  223. package/dist/connection/entities/ConnectedWorkspaceEntity.js +4 -0
  224. package/dist/connection/entities/ConnectedWorkspaceEntity.js.map +2 -2
  225. package/dist/connection/files/grid/cells.js +11 -2
  226. package/dist/connection/files/grid/cells.js.map +2 -2
  227. package/dist/connection/files/views/ViewSelector.js +13 -1
  228. package/dist/connection/files/views/ViewSelector.js.map +2 -2
  229. package/dist/connection/messenger/ConnectedChatThread.d.ts +0 -9
  230. package/dist/connection/messenger/ConnectedChatThread.js +72 -41
  231. package/dist/connection/messenger/ConnectedChatThread.js.map +2 -2
  232. package/dist/connection/messenger/ConnectedMessenger.js +6 -4
  233. package/dist/connection/messenger/ConnectedMessenger.js.map +2 -2
  234. package/dist/connection/messenger/DmAgentProgress.d.ts +7 -0
  235. package/dist/connection/messenger/DmAgentProgress.js +47 -0
  236. package/dist/connection/messenger/DmAgentProgress.js.map +7 -0
  237. package/dist/connection/panels/ConnectedPanelHost.d.ts +2 -10
  238. package/dist/connection/panels/ConnectedPanelHost.js +31 -4
  239. package/dist/connection/panels/ConnectedPanelHost.js.map +2 -2
  240. package/dist/connection/panels/ConnectedPanelRegistry.d.ts +1 -1
  241. package/dist/connection/panels/ConnectedPanelRegistry.js +1 -0
  242. package/dist/connection/panels/ConnectedPanelRegistry.js.map +2 -2
  243. package/dist/connection/panels/ConversationPresentation.d.ts +15 -0
  244. package/dist/connection/panels/ConversationPresentation.js +13 -0
  245. package/dist/connection/panels/ConversationPresentation.js.map +7 -0
  246. package/dist/connection/report-problem/ConnectedReportProblem.d.ts +3 -1
  247. package/dist/connection/report-problem/ConnectedReportProblem.js +9 -2
  248. package/dist/connection/report-problem/ConnectedReportProblem.js.map +2 -2
  249. package/dist/connection/report-problem/ReportProblemDialog.d.ts +6 -1
  250. package/dist/connection/report-problem/ReportProblemDialog.js +21 -7
  251. package/dist/connection/report-problem/ReportProblemDialog.js.map +2 -2
  252. package/dist/connection/report-problem/SupportVideoEvidence.d.ts +7 -0
  253. package/dist/connection/report-problem/SupportVideoEvidence.js +161 -0
  254. package/dist/connection/report-problem/SupportVideoEvidence.js.map +7 -0
  255. package/dist/connection/report-problem/screen-capture.d.ts +2 -0
  256. package/dist/connection/report-problem/screen-capture.js +11 -6
  257. package/dist/connection/report-problem/screen-capture.js.map +2 -2
  258. package/dist/connection/report-problem/support-browser-context.d.ts +5 -0
  259. package/dist/connection/report-problem/support-browser-context.js +19 -0
  260. package/dist/connection/report-problem/support-browser-context.js.map +7 -0
  261. package/dist/connection/report-problem/useReportProblem.js +23 -2
  262. package/dist/connection/report-problem/useReportProblem.js.map +2 -2
  263. package/dist/connection/report-problem/useSupportVideo.d.ts +19 -0
  264. package/dist/connection/report-problem/useSupportVideo.js +166 -0
  265. package/dist/connection/report-problem/useSupportVideo.js.map +7 -0
  266. package/dist/connection/routes/useDeepLinkSync.js +41 -5
  267. package/dist/connection/routes/useDeepLinkSync.js.map +2 -2
  268. package/dist/connection/shell/workspace-project-line.js +1 -0
  269. package/dist/connection/shell/workspace-project-line.js.map +2 -2
  270. package/dist/connection/tags/ConnectedTagsPage.js +10 -1
  271. package/dist/connection/tags/ConnectedTagsPage.js.map +2 -2
  272. package/dist/connection/threads/ConversationEntity.js +8 -1
  273. package/dist/connection/threads/ConversationEntity.js.map +2 -2
  274. package/dist/connection/viewer/ViewerPdfPane.js +18 -2
  275. package/dist/connection/viewer/ViewerPdfPane.js.map +2 -2
  276. package/dist/connection/viewer/useViewedDocument.d.ts +1 -0
  277. package/dist/connection/viewer/useViewedDocument.js +4 -1
  278. package/dist/connection/viewer/useViewedDocument.js.map +2 -2
  279. package/dist/connection/viewer/useViewerTabs.js +6 -3
  280. package/dist/connection/viewer/useViewerTabs.js.map +2 -2
  281. package/dist/dashboards/index.cjs +19 -19
  282. package/dist/embed/index.cjs +56 -55
  283. package/dist/facts/index.cjs +45 -45
  284. package/dist/files/cells/DocumentNameCell.d.ts +2 -1
  285. package/dist/files/cells/DocumentNameCell.js +7 -1
  286. package/dist/files/cells/DocumentNameCell.js.map +2 -2
  287. package/dist/files/index.cjs +232 -232
  288. package/dist/home/index.cjs +26 -26
  289. package/dist/index.cjs +1703 -1699
  290. package/dist/index.d.ts +1 -1
  291. package/dist/index.js +2 -0
  292. package/dist/index.js.map +2 -2
  293. package/dist/lib/entity-id.d.ts +5 -0
  294. package/dist/lib/entity-id.js +14 -0
  295. package/dist/lib/entity-id.js.map +7 -0
  296. package/dist/lib/routes.d.ts +2 -0
  297. package/dist/lib/routes.js +32 -2
  298. package/dist/lib/routes.js.map +2 -2
  299. package/dist/pages/index.cjs +54 -54
  300. package/dist/provider/environment.d.ts +4 -0
  301. package/dist/provider/environment.js.map +2 -2
  302. package/dist/retrieval/index.cjs +4 -4
  303. package/dist/settings/index.cjs +141 -141
  304. package/dist/shell/PanelPortal.d.ts +2 -13
  305. package/dist/shell/PanelPortal.js +58 -7
  306. package/dist/shell/PanelPortal.js.map +2 -2
  307. package/dist/shell/index.cjs +85 -85
  308. package/dist/shell/useFloatingDrag.d.ts +23 -0
  309. package/dist/shell/useFloatingDrag.js +195 -0
  310. package/dist/shell/useFloatingDrag.js.map +7 -0
  311. package/dist/studio/index.cjs +44 -45
  312. package/dist/studio/index.cjs.map +1 -1
  313. package/dist/styles.css +1 -1
  314. package/dist/workflow-canvas/index.cjs +76 -77
  315. package/dist/workflow-canvas/index.cjs.map +1 -1
  316. package/dist/workspaces/index.cjs +26 -26
  317. package/node_modules/@arbidocs/coedit/package.json +1 -1
  318. package/package.json +5 -5
  319. package/dist/ConnectedProductionSetDialog-4N7R7SFZ.cjs.map +0 -1
  320. package/dist/FilesViewerDialog-2MJHM32X.cjs.map +0 -1
  321. package/dist/ai-HME7CNDE.cjs.map +0 -1
  322. package/dist/chunk-63FEMB6U.cjs.map +0 -1
  323. package/dist/chunk-AIKPZJNI.cjs.map +0 -1
  324. package/dist/chunk-CYI4OYZD.cjs.map +0 -1
  325. package/dist/chunk-GEQW7XQA.cjs.map +0 -1
  326. package/dist/chunk-JARBYN6Z.cjs.map +0 -1
  327. package/dist/chunk-JHDCDEXY.cjs.map +0 -1
  328. package/dist/chunk-LOSCXAAF.cjs.map +0 -1
  329. package/dist/chunk-MCXS6X37.cjs +0 -13
  330. package/dist/chunk-MCXS6X37.cjs.map +0 -1
  331. package/dist/chunk-MSFWSDRS.cjs +0 -320
  332. package/dist/chunk-MSFWSDRS.cjs.map +0 -1
  333. package/dist/chunk-P7VUIW24.cjs.map +0 -1
  334. package/dist/chunk-SH7W4WVI.cjs.map +0 -1
  335. package/dist/chunk-SLQPSKYU.cjs.map +0 -1
  336. package/dist/chunk-T5XLL4L2.cjs.map +0 -1
  337. package/dist/chunk-VHD5DZW4.cjs.map +0 -1
  338. package/dist/chunk-XKQVAGVR.cjs.map +0 -1
  339. package/dist/chunk-Z2XZ2D4N.cjs.map +0 -1
@@ -1,10 +1,12 @@
1
1
  "use client";
2
2
  import { Fragment, jsx } from "react/jsx-runtime";
3
- import { useArbiHost, useArbiSession, useDocument } from "@arbidocs/react";
3
+ import { EntityReference } from "./EntityReference.js";
4
+ import { ENTITY_ID } from "./entity-references.js";
5
+ import { parseHref } from "../../lib/routes.js";
6
+ import { useArbiHost, useArbiSession, useArbiSessionState, useDocument } from "@arbidocs/react";
4
7
  import { mentionFromHref } from "@arbidocs/react/shell";
5
8
  import {
6
9
  EntityPill,
7
- getDocumentTitle,
8
10
  MarkdownCode,
9
11
  MarkdownLink,
10
12
  MarkdownRenderer as KitMarkdownRenderer,
@@ -13,7 +15,6 @@ import {
13
15
  } from "@arbidocs/react/ui";
14
16
  import React, { useContext, useMemo } from "react";
15
17
  import { FileText, Mail } from "lucide-react";
16
- import { useCompactChat } from "../../chat/CompactChatContext.js";
17
18
  import { MentionChip } from "../../chat/MentionMenu.js";
18
19
  import { QuietLink } from "../../citations/QuietMarks.js";
19
20
  import { rehypeDocEntityPills } from "../../chat/rehype-doc-entity-pills.js";
@@ -22,7 +23,19 @@ import { useBlocksEnvironment } from "../../provider/environment.js";
22
23
  import { MermaidDiagram } from "./MermaidDiagram.js";
23
24
  import { useDocumentWorkspace, WorkspaceDocumentReference } from "./DocumentWorkspaceContext.js";
24
25
  function childrenText(children) {
25
- return React.Children.toArray(children).map((child) => typeof child === "string" || typeof child === "number" ? String(child) : "").join("");
26
+ return React.Children.toArray(children).map(
27
+ (child) => typeof child === "string" || typeof child === "number" ? String(child) : React.isValidElement(child) ? childrenText(child.props.children) : ""
28
+ ).join("");
29
+ }
30
+ function plainLinkText(children) {
31
+ const parts = React.Children.toArray(children).map((child) => {
32
+ if (typeof child === "string" || typeof child === "number") return String(child);
33
+ if (React.isValidElement(child) && child.props.children != null) {
34
+ return plainLinkText(child.props.children);
35
+ }
36
+ return null;
37
+ });
38
+ return parts.includes(null) ? null : parts.join("");
26
39
  }
27
40
  function MentionLink({ kind, id, text }) {
28
41
  const currentUserId = useArbiSession().user?.external_id;
@@ -44,12 +57,14 @@ function InternalDocLink({
44
57
  href,
45
58
  children
46
59
  }) {
47
- const { openDocument } = useBlocksEnvironment();
48
- const workspaceId = useDocumentWorkspace();
49
- if (workspaceId) {
50
- return /* @__PURE__ */ jsx(WorkspaceDocumentReference, { workspaceId, docId, children });
51
- }
52
- return /* @__PURE__ */ jsx(QuietLink, { href, kind: "document", onOpen: () => openDocument(docId), children });
60
+ const { runtimeConfig } = useBlocksEnvironment();
61
+ const conversationWorkspace = useDocumentWorkspace();
62
+ const selectedWorkspace = useArbiSessionState((s) => s.workspaceId);
63
+ const route = href && workspaceDocIdFromHref(href, runtimeConfig.deploymentDomain) === docId ? parseHref(href) : null;
64
+ const workspaceId = (route?.kind === "document" ? route.workspaceId : null) ?? conversationWorkspace ?? selectedWorkspace;
65
+ const text = plainLinkText(children)?.trim();
66
+ const isAddress = !text || text === href || text === docId;
67
+ return /* @__PURE__ */ jsx(WorkspaceDocumentReference, { workspaceId, docId, copyHref: href, children: text === void 0 ? children : isAddress ? void 0 : text });
53
68
  }
54
69
  function DocumentChip({ docId }) {
55
70
  const render = useArbiHost().chat?.renderDocumentChip;
@@ -58,31 +73,31 @@ function DocumentChip({ docId }) {
58
73
  return render ? /* @__PURE__ */ jsx(Fragment, { children: render(docId) }) : /* @__PURE__ */ jsx(DefaultDocumentChip, { docId });
59
74
  }
60
75
  function DefaultDocumentChip({ docId }) {
61
- const compact = useCompactChat();
62
76
  const { data: doc } = useDocument(docId);
63
- const { openDocument } = useBlocksEnvironment();
64
- if (compact && doc)
65
- return /* @__PURE__ */ jsx(
66
- "button",
67
- {
68
- type: "button",
69
- className: "inline text-left text-primary underline decoration-primary/30 underline-offset-2 hover:decoration-primary",
70
- onClick: () => openDocument(docId),
71
- children: getDocumentTitle(doc)
72
- }
73
- );
77
+ const { openDocument, hrefFor } = useBlocksEnvironment();
78
+ const selectedWorkspace = useArbiSessionState((s) => s.workspaceId);
79
+ const copyHref = hrefFor({ kind: "document", documentId: docId, workspaceId: selectedWorkspace });
74
80
  if (!doc)
75
81
  return /* @__PURE__ */ jsx(
76
82
  EntityPill,
77
83
  {
78
84
  icon: /* @__PURE__ */ jsx(FileText, { className: "w-3.5 h-3.5 flex-shrink-0" }),
79
- label: docId,
85
+ label: "File",
86
+ copyHref,
80
87
  size: "sm",
81
88
  onClick: () => openDocument(docId),
82
89
  "data-testid": "doc-entity-pill"
83
90
  }
84
91
  );
85
- return /* @__PURE__ */ jsx(DocumentEntity, { doc, onClick: () => openDocument(docId), "data-testid": "doc-entity-pill" });
92
+ return /* @__PURE__ */ jsx(
93
+ DocumentEntity,
94
+ {
95
+ doc,
96
+ copyHref,
97
+ onClick: () => openDocument(docId),
98
+ "data-testid": "doc-entity-pill"
99
+ }
100
+ );
86
101
  }
87
102
  function MailChip({ mailId }) {
88
103
  const render = useArbiHost().chat?.renderMailChip;
@@ -118,6 +133,22 @@ const conversationMarkdownComponents = {
118
133
  if (docId) {
119
134
  return /* @__PURE__ */ jsx(InternalDocLink, { docId, href, ...props, children });
120
135
  }
136
+ const route = parseHref(href);
137
+ const reference = route?.kind === "entity" ? route.entityId : route?.kind === "conversation" ? route.conversationId : route?.kind === "workspace" ? route.workspaceId : route?.kind === "call" ? route.callId : route?.kind === "calendar" ? route.eventId : void 0;
138
+ if (reference && !reference.startsWith("doc-")) {
139
+ const url = new URL(href, window.location.href);
140
+ const trusted = url.origin === window.location.origin || url.protocol === "https:" && url.hostname === deploymentDomain;
141
+ if (trusted)
142
+ return /* @__PURE__ */ jsx(
143
+ EntityReference,
144
+ {
145
+ id: reference,
146
+ href,
147
+ title: childrenText(children) === href ? void 0 : childrenText(children),
148
+ workspaceId: url.pathname.match(/\b(wrk-[a-zA-Z0-9]{8})\b/)?.[1]
149
+ }
150
+ );
151
+ }
121
152
  return /* @__PURE__ */ jsx(ExternalLink, { href, ...props, children });
122
153
  },
123
154
  code: function ConversationMarkdownCode(props) {
@@ -128,6 +159,7 @@ const conversationMarkdownComponents = {
128
159
  const codeText = typeof children === "string" ? children.trim() : "";
129
160
  if (/^doc-[a-zA-Z0-9]{8}$/.test(codeText)) return /* @__PURE__ */ jsx(DocumentChip, { docId: codeText });
130
161
  if (/^eml-[a-zA-Z0-9]{8}$/.test(codeText)) return /* @__PURE__ */ jsx(MailChip, { mailId: codeText });
162
+ if (ENTITY_ID.test(codeText)) return /* @__PURE__ */ jsx(EntityReference, { id: codeText });
131
163
  }
132
164
  if (language === "mermaid" && !isStreaming) {
133
165
  return /* @__PURE__ */ jsx(MermaidDiagram, { chart: String(children).replace(/\n$/, "") });
@@ -135,6 +167,8 @@ const conversationMarkdownComponents = {
135
167
  return /* @__PURE__ */ jsx(MarkdownCode, { ...props });
136
168
  },
137
169
  span: ({ children, className, ...props }) => {
170
+ const entityId = props["data-entity-id"];
171
+ if (entityId) return /* @__PURE__ */ jsx(EntityReference, { id: entityId });
138
172
  const docId = props["data-doc-id"];
139
173
  if (docId) return /* @__PURE__ */ jsx(DocumentChip, { docId });
140
174
  const mailId = props["data-mail-id"];
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/connection/conversation/ConnectedMarkdown.tsx"],
4
- "sourcesContent": ["/**\n * The conversation's markdown: the kit's `MarkdownRenderer` (`@arbidocs/react`: sanitised HTML,\n * slugs, lazy KaTeX, streaming blocks, tables, code) with what a conversation adds: @mention chips,\n * workspace documents opening in the viewer, quiet external links, document and email pills (the\n * host's chips, `ArbiChatHost.renderDocumentChip` / `renderMailChip`) and Mermaid diagrams.\n */\nimport { useArbiHost, useArbiSession, useDocument } from '@arbidocs/react'\nimport { mentionFromHref, type MentionKind } from '@arbidocs/react/shell'\nimport {\n EntityPill,\n getDocumentTitle,\n MarkdownCode,\n MarkdownLink,\n MarkdownRenderer as KitMarkdownRenderer,\n MarkdownStreamingContext,\n type MarkdownRendererProps as KitMarkdownRendererProps,\n DocumentEntity,\n} from '@arbidocs/react/ui'\nimport React, { useContext, useMemo } from 'react'\nimport { FileText, Mail } from 'lucide-react'\n\n/** The markdown element overrides, as the kit's renderer takes them. */\ntype Components = NonNullable<KitMarkdownRendererProps['components']>\nimport { useCompactChat } from '../../chat/CompactChatContext'\nimport { MentionChip } from '../../chat/MentionMenu'\nimport { QuietLink } from '../../citations/QuietMarks'\nimport { rehypeDocEntityPills } from '../../chat/rehype-doc-entity-pills'\nimport { workspaceDocIdFromHref } from '../../chat/doc-links'\nimport { useBlocksEnvironment } from '../../provider/environment'\nimport { MermaidDiagram } from './MermaidDiagram'\nimport { useDocumentWorkspace, WorkspaceDocumentReference } from './DocumentWorkspaceContext'\n\n/** Plain text of a link's children (the `@Label` of a mention link). */\nfunction childrenText(children: React.ReactNode): string {\n return React.Children.toArray(children)\n .map((child) => (typeof child === 'string' || typeof child === 'number' ? String(child) : ''))\n .join('')\n}\n\n/** A mention chip; a mention of the reader stands out. */\nfunction MentionLink({ kind, id, text }: { kind: MentionKind; id: string; text: string }) {\n const currentUserId = useArbiSession().user?.external_id\n return (\n <MentionChip\n kind={kind}\n id={id}\n label={text.replace(/^@/, '')}\n isSelf={kind === 'user' && id === currentUserId}\n />\n )\n}\n\n/**\n * A link to elsewhere, as quiet text. Its menu (Open link / Copy link) is the deliberate step\n * the old confirmation dialog used to be; nothing opens until the menu's primary row is chosen.\n */\nexport function ExternalLink({ href, children }: React.ComponentPropsWithoutRef<'a'>) {\n return (\n <QuietLink href={href} kind=\"external\">\n {children}\n </QuietLink>\n )\n}\n\n/**\n * A workspace document referenced by a link's href rather than by its text.\n *\n * `rehypeDocEntityPills` turns a bare `doc-\u2026` id into a pill, but it only walks\n * TEXT nodes \u2014 so `[NVDA DCF Valuation Report](\u2026doc-abc12345\u2026)`, which is how an\n * answer links an artifact it just saved, keeps the id in the href where the\n * plugin never looks. The link then fell through to `ExternalLink`, and opening\n * your own workspace document asked you to confirm an \"external link\" and\n * launched a new tab. It opens in the document viewer, like the pill and the\n * artifact card already do.\n */\nexport function InternalDocLink({\n docId,\n href,\n children,\n}: React.ComponentPropsWithoutRef<'a'> & { docId: string }) {\n const { openDocument } = useBlocksEnvironment()\n const workspaceId = useDocumentWorkspace()\n if (workspaceId) {\n return (\n <WorkspaceDocumentReference workspaceId={workspaceId} docId={docId}>\n {children}\n </WorkspaceDocumentReference>\n )\n }\n\n return (\n <QuietLink href={href} kind=\"document\" onOpen={() => openDocument(docId)}>\n {children}\n </QuietLink>\n )\n}\n\n/** A document of the workspace, as a pill: the host's chip, else the document entity. */\nexport function DocumentChip({ docId }: { docId: string }) {\n const render = useArbiHost().chat?.renderDocumentChip\n const workspaceId = useDocumentWorkspace()\n if (workspaceId) return <WorkspaceDocumentReference workspaceId={workspaceId} docId={docId} />\n return render ? <>{render(docId)}</> : <DefaultDocumentChip docId={docId} />\n}\n\nfunction DefaultDocumentChip({ docId }: { docId: string }) {\n const compact = useCompactChat()\n const { data: doc } = useDocument(docId)\n const { openDocument } = useBlocksEnvironment()\n if (compact && doc)\n return (\n <button\n type=\"button\"\n className=\"inline text-left text-primary underline decoration-primary/30 underline-offset-2 hover:decoration-primary\"\n onClick={() => openDocument(docId)}\n >\n {getDocumentTitle(doc)}\n </button>\n )\n if (!doc)\n return (\n <EntityPill\n icon={<FileText className=\"w-3.5 h-3.5 flex-shrink-0\" />}\n label={docId}\n size=\"sm\"\n onClick={() => openDocument(docId)}\n data-testid=\"doc-entity-pill\"\n />\n )\n return (\n <DocumentEntity doc={doc} onClick={() => openDocument(docId)} data-testid=\"doc-entity-pill\" />\n )\n}\n\n/** An email of the person's mailbox, as a pill: the host's chip, else a plain \"Email\". */\nfunction MailChip({ mailId }: { mailId: string }) {\n const render = useArbiHost().chat?.renderMailChip\n if (render) return <>{render(mailId)}</>\n return (\n <EntityPill\n icon={<Mail className=\"w-3.5 h-3.5 flex-shrink-0\" />}\n label=\"Email\"\n size=\"sm\"\n data-testid=\"mail-entity-pill\"\n />\n )\n}\n\n/**\n * The conversation's overrides, layered on the kit's defaults. Module scope, so the reference is stable\n * and memoised markdown blocks do not re-parse.\n */\nconst conversationMarkdownComponents: Partial<Components> = {\n a: function ConversationMarkdownLink({\n href,\n children,\n ...props\n }: React.ComponentPropsWithoutRef<'a'>) {\n const deploymentDomain = useBlocksEnvironment().runtimeConfig.deploymentDomain\n // @mentions: `linkMentions` turned them into `#mention-<id>` links; draw them as chips.\n const mention = mentionFromHref(href)\n if (mention) {\n return <MentionLink kind={mention.kind} id={mention.id} text={childrenText(children)} />\n }\n // Bookmarks: in-page anchors are near-invisible text; the menu jumps or copies the place.\n if (href?.startsWith('#') && !href.startsWith('#cite-')) {\n return (\n <QuietLink href={href} kind=\"anchor\">\n {children}\n </QuietLink>\n )\n }\n // Citations, `cite:` references and bare links: the kit's link.\n if (!href || href.startsWith('#') || href.startsWith('cite:')) {\n return (\n <MarkdownLink href={href} {...props}>\n {children}\n </MarkdownLink>\n )\n }\n // A workspace document is not an external link, wherever it is hosted: it opens in the viewer.\n const docId = workspaceDocIdFromHref(href, deploymentDomain)\n if (docId) {\n return (\n <InternalDocLink docId={docId} href={href} {...props}>\n {children}\n </InternalDocLink>\n )\n }\n return (\n <ExternalLink href={href} {...props}>\n {children}\n </ExternalLink>\n )\n },\n code: function ConversationMarkdownCode(\n props: React.ComponentPropsWithoutRef<'code'> & { inline?: boolean }\n ) {\n const isStreaming = useContext(MarkdownStreamingContext)\n const { className, children } = props\n const language = /language-(\\w+)/.exec(className || '')?.[1]\n if (!language) {\n // Answers often backtick a bare doc id (`doc-f7b3eeb5`). The text-node pass skips code, so\n // the id would stay monospace text; show it as the document pill. Only a whole id (eight\n // alphanumerics): while streaming, a partial one (\"doc-e\") would be looked up and 404.\n const codeText = typeof children === 'string' ? children.trim() : ''\n if (/^doc-[a-zA-Z0-9]{8}$/.test(codeText)) return <DocumentChip docId={codeText} />\n if (/^eml-[a-zA-Z0-9]{8}$/.test(codeText)) return <MailChip mailId={codeText} />\n }\n // Mermaid lazy-loads its own bundle and re-renders SVG on every change. While streaming the\n // fence is almost always partial, so it stays a code block until generation completes.\n if (language === 'mermaid' && !isStreaming) {\n return <MermaidDiagram chart={String(children).replace(/\\n$/, '')} />\n }\n return <MarkdownCode {...props} />\n },\n span: ({ children, className, ...props }: React.ComponentPropsWithoutRef<'span'>) => {\n const docId = (props as Record<string, unknown>)['data-doc-id'] as string | undefined\n if (docId) return <DocumentChip docId={docId} />\n const mailId = (props as Record<string, unknown>)['data-mail-id'] as string | undefined\n if (mailId) return <MailChip mailId={mailId} />\n return (\n <span className={className} {...props}>\n {children}\n </span>\n )\n },\n}\n\n/** Bare `doc-\u2026` / `eml-\u2026` ids in text become `<span data-doc-id>` / `<span data-mail-id>` pills. */\nconst conversationRehypePlugins = [rehypeDocEntityPills]\n\nexport type ConnectedMarkdownProps = Omit<\n KitMarkdownRendererProps,\n 'rehypePlugins' | 'allowHtml' | 'renderCitation'\n>\n\n/**\n * The kit's renderer with the conversation's overrides; a caller's `components` (e.g. the citation\n * core's) still win over both.\n */\nfunction ConnectedMarkdownComponent({ components, ...props }: ConnectedMarkdownProps) {\n const merged = useMemo(\n () =>\n components\n ? { ...conversationMarkdownComponents, ...components }\n : conversationMarkdownComponents,\n [components]\n )\n return (\n <KitMarkdownRenderer {...props} components={merged} rehypePlugins={conversationRehypePlugins} />\n )\n}\n\nexport const ConnectedMar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A,EAClC;AAAA,EACA,MAAM,CAAC,EAAE,UAAU,WAAW,GAAG,MAAM,MAA8C;AACnF,UAAM,QAAS,MAAkC,aAAa;AAC9D,QAAI,MAAO,QAAO,oBAAC,gBAAa,OAAc;AAC9C,UAAM,SAAU,MAAkC,cAAc;AAChE,QAAI,OAAQ,QAAO,oBAAC,YAAS,QAAgB;AAC7C,WACE,oBAAC,UAAK,WAAuB,GAAG,OAC7B,UACH;AAAA,EAEJ;AACF;AAGA,MAAM,4BAA4B,CAAC,oBAAoB;AAWvD,SAAS,2BAA2B,EAAE,YAAY,GAAG,MAAM,GAA2B;AACpF,QAAM,SAAS;AAAA,IACb,MACE,aACI,EAAE,GAAG,gCAAgC,GAAG,WAAW,IACnD;AAAA,IACN,CAAC,UAAU;AAAA,EACb;AACA,SACE,oBAAC,uBAAqB,GAAG,OAAO,YAAY,QAAQ,eAAe,2BAA2B;AAElG;AAEO,MAAM,oBAAoB,MAAM,KAAK,0BAA0B;",
4
+ "sourcesContent": ["import { EntityReference } from './EntityReference'\nimport { ENTITY_ID } from './entity-references'\nimport { parseHref } from '../../lib/routes'\n/**\n * The conversation's markdown: the kit's `MarkdownRenderer` (`@arbidocs/react`: sanitised HTML,\n * slugs, lazy KaTeX, streaming blocks, tables, code) with what a conversation adds: @mention chips,\n * workspace documents opening in the viewer, quiet external links, document and email pills (the\n * host's chips, `ArbiChatHost.renderDocumentChip` / `renderMailChip`) and Mermaid diagrams.\n */\nimport { useArbiHost, useArbiSession, useArbiSessionState, useDocument } from '@arbidocs/react'\nimport { mentionFromHref, type MentionKind } from '@arbidocs/react/shell'\nimport {\n EntityPill,\n MarkdownCode,\n MarkdownLink,\n MarkdownRenderer as KitMarkdownRenderer,\n MarkdownStreamingContext,\n type MarkdownRendererProps as KitMarkdownRendererProps,\n DocumentEntity,\n} from '@arbidocs/react/ui'\nimport React, { useContext, useMemo } from 'react'\nimport { FileText, Mail } from 'lucide-react'\n\n/** The markdown element overrides, as the kit's renderer takes them. */\ntype Components = NonNullable<KitMarkdownRendererProps['components']>\nimport { MentionChip } from '../../chat/MentionMenu'\nimport { QuietLink } from '../../citations/QuietMarks'\nimport { rehypeDocEntityPills } from '../../chat/rehype-doc-entity-pills'\nimport { workspaceDocIdFromHref } from '../../chat/doc-links'\nimport { useBlocksEnvironment } from '../../provider/environment'\nimport { MermaidDiagram } from './MermaidDiagram'\nimport { useDocumentWorkspace, WorkspaceDocumentReference } from './DocumentWorkspaceContext'\n\n/** Plain text of a link's children (the `@Label` of a mention link). */\nfunction childrenText(children: React.ReactNode): string {\n return React.Children.toArray(children)\n .map((child) =>\n typeof child === 'string' || typeof child === 'number'\n ? String(child)\n : React.isValidElement<{ children?: React.ReactNode }>(child)\n ? childrenText(child.props.children)\n : ''\n )\n .join('')\n}\n\n/** Text labels may be formatted; a non-text leaf (such as an image) needs the rich-child path. */\nfunction plainLinkText(children: React.ReactNode): string | null {\n const parts = React.Children.toArray(children).map((child): string | null => {\n if (typeof child === 'string' || typeof child === 'number') return String(child)\n if (\n React.isValidElement<{ children?: React.ReactNode }>(child) &&\n child.props.children != null\n ) {\n return plainLinkText(child.props.children)\n }\n return null\n })\n return parts.includes(null) ? null : parts.join('')\n}\n\n/** A mention chip; a mention of the reader stands out. */\nfunction MentionLink({ kind, id, text }: { kind: MentionKind; id: string; text: string }) {\n const currentUserId = useArbiSession().user?.external_id\n return (\n <MentionChip\n kind={kind}\n id={id}\n label={text.replace(/^@/, '')}\n isSelf={kind === 'user' && id === currentUserId}\n />\n )\n}\n\n/**\n * A link to elsewhere, as quiet text. Its menu (Open link / Copy link) is the deliberate step\n * the old confirmation dialog used to be; nothing opens until the menu's primary row is chosen.\n */\nexport function ExternalLink({ href, children }: React.ComponentPropsWithoutRef<'a'>) {\n return (\n <QuietLink href={href} kind=\"external\">\n {children}\n </QuietLink>\n )\n}\n\n/**\n * A workspace document referenced by a link's href rather than by its text.\n *\n * `rehypeDocEntityPills` turns a bare `doc-\u2026` id into a pill, but it only walks\n * TEXT nodes \u2014 so `[NVDA DCF Valuation Report](\u2026doc-abc12345\u2026)`, which is how an\n * answer links an artifact it just saved, keeps the id in the href where the\n * plugin never looks. The link then fell through to `ExternalLink`, and opening\n * your own workspace document asked you to confirm an \"external link\" and\n * launched a new tab. It opens in the document viewer, like the pill and the\n * artifact card already do.\n */\nexport function InternalDocLink({\n docId,\n href,\n children,\n}: React.ComponentPropsWithoutRef<'a'> & { docId: string }) {\n const { runtimeConfig } = useBlocksEnvironment()\n const conversationWorkspace = useDocumentWorkspace()\n const selectedWorkspace = useArbiSessionState((s) => s.workspaceId)\n // A delegated reference can target a different workspace than its Home DM. Only trust the\n // route after the same origin/deployment check used by the markdown adapters.\n const route =\n href && workspaceDocIdFromHref(href, runtimeConfig.deploymentDomain) === docId\n ? parseHref(href)\n : null\n const workspaceId =\n (route?.kind === 'document' ? route.workspaceId : null) ??\n conversationWorkspace ??\n selectedWorkspace\n const text = plainLinkText(children)?.trim()\n const isAddress = !text || text === href || text === docId\n\n return (\n <WorkspaceDocumentReference workspaceId={workspaceId} docId={docId} copyHref={href}>\n {text === undefined ? children : isAddress ? undefined : text}\n </WorkspaceDocumentReference>\n )\n}\n\n/** A document of the workspace, as a pill: the host's chip, else the document entity. */\nexport function DocumentChip({ docId }: { docId: string }) {\n const render = useArbiHost().chat?.renderDocumentChip\n const workspaceId = useDocumentWorkspace()\n if (workspaceId) return <WorkspaceDocumentReference workspaceId={workspaceId} docId={docId} />\n return render ? <>{render(docId)}</> : <DefaultDocumentChip docId={docId} />\n}\n\nfunction DefaultDocumentChip({ docId }: { docId: string }) {\n const { data: doc } = useDocument(docId)\n const { openDocument, hrefFor } = useBlocksEnvironment()\n const selectedWorkspace = useArbiSessionState((s) => s.workspaceId)\n const copyHref = hrefFor({ kind: 'document', documentId: docId, workspaceId: selectedWorkspace })\n if (!doc)\n return (\n <EntityPill\n icon={<FileText className=\"w-3.5 h-3.5 flex-shrink-0\" />}\n label=\"File\"\n copyHref={copyHref}\n size=\"sm\"\n onClick={() => openDocument(docId)}\n data-testid=\"doc-entity-pill\"\n />\n )\n return (\n <DocumentEntity\n doc={doc}\n copyHref={copyHref}\n onClick={() => openDocument(docId)}\n data-testid=\"doc-entity-pill\"\n />\n )\n}\n\n/** An email of the person's mailbox, as a pill: the host's chip, else a plain \"Email\". */\nfunction MailChip({ mailId }: { mailId: string }) {\n const render = useArbiHost().chat?.renderMailChip\n if (render) return <>{render(mailId)}</>\n return (\n <EntityPill\n icon={<Mail className=\"w-3.5 h-3.5 flex-shrink-0\" />}\n label=\"Email\"\n size=\"sm\"\n data-testid=\"mail-entity-pill\"\n />\n )\n}\n\n/**\n * The conversation's overrides, layered on the kit's defaults. Module scope, so the reference is stable\n * and memoised markdown blocks do not re-parse.\n */\nconst conversationMarkdownComponents: Partial<Components> = {\n a: function ConversationMarkdownLink({\n href,\n children,\n ...props\n }: React.ComponentPropsWithoutRef<'a'>) {\n const deploymentDomain = useBlocksEnvironment().runtimeConfig.deploymentDomain\n // @mentions: `linkMentions` turned them into `#mention-<id>` links; draw them as chips.\n const mention = mentionFromHref(href)\n if (mention) {\n return <MentionLink kind={mention.kind} id={mention.id} text={childrenText(children)} />\n }\n // Bookmarks: in-page anchors are near-invisible text; the menu jumps or copies the place.\n if (href?.startsWith('#') && !href.startsWith('#cite-')) {\n return (\n <QuietLink href={href} kind=\"anchor\">\n {children}\n </QuietLink>\n )\n }\n // Citations, `cite:` references and bare links: the kit's link.\n if (!href || href.startsWith('#') || href.startsWith('cite:')) {\n return (\n <MarkdownLink href={href} {...props}>\n {children}\n </MarkdownLink>\n )\n }\n // A workspace document is not an external link, wherever it is hosted: it opens in the viewer.\n const docId = workspaceDocIdFromHref(href, deploymentDomain)\n if (docId) {\n return (\n <InternalDocLink docId={docId} href={href} {...props}>\n {children}\n </InternalDocLink>\n )\n }\n const route = parseHref(href)\n const reference =\n route?.kind === 'entity'\n ? route.entityId\n : route?.kind === 'conversation'\n ? route.conversationId\n : route?.kind === 'workspace'\n ? route.workspaceId\n : route?.kind === 'call'\n ? route.callId\n : route?.kind === 'calendar'\n ? route.eventId\n : undefined\n if (reference && !reference.startsWith('doc-')) {\n const url = new URL(href, window.location.href)\n const trusted =\n url.origin === window.location.origin ||\n (url.protocol === 'https:' && url.hostname === deploymentDomain)\n if (trusted)\n return (\n <EntityReference\n id={reference}\n href={href}\n title={childrenText(children) === href ? undefined : childrenText(children)}\n workspaceId={url.pathname.match(/\\b(wrk-[a-zA-Z0-9]{8})\\b/)?.[1]}\n />\n )\n }\n return (\n <ExternalLink href={href} {...props}>\n {children}\n </ExternalLink>\n )\n },\n code: function ConversationMarkdownCode(\n props: React.ComponentPropsWithoutRef<'code'> & { inline?: boolean }\n ) {\n const isStreaming = useContext(MarkdownStreamingContext)\n const { className, children } = props\n const language = /language-(\\w+)/.exec(className || '')?.[1]\n if (!language) {\n // Answers often backtick a bare doc id (`doc-f7b3eeb5`). The text-node pass skips code, so\n // the id would stay monospace text; show it as the document pill. Only a whole id (eight\n // alphanumerics): while streaming, a partial one (\"doc-e\") would be looked up and 404.\n const codeText = typeof children === 'string' ? children.trim() : ''\n if (/^doc-[a-zA-Z0-9]{8}$/.test(codeText)) return <DocumentChip docId={codeText} />\n if (/^eml-[a-zA-Z0-9]{8}$/.test(codeText)) return <MailChip mailId={codeText} />\n if (ENTITY_ID.test(codeText)) return <EntityReference id={codeText} />\n }\n // Mermaid lazy-loads its own bundle and re-renders SVG on every change. While streaming the\n // fence is almost always partial, so it stays a code block until generation completes.\n if (language === 'mermaid' && !isStreaming) {\n return <MermaidDiagram chart={String(children).replace(/\\n$/, '')} />\n }\n return <MarkdownCode {...props} />\n },\n span: ({ children, className, ...props }: React.ComponentPropsWithoutRef<'span'>) => {\n const entityId = (props as Record<string, unknown>)['data-entity-id'] as string | undefined\n if (entityId) return <EntityReference id={entityId} />\n const docId = (props as Record<string, unknown>)['data-doc-id'] as string | undefined\n if (docId) return <DocumentChip docId={docId} />\n const mailId = (props as Record<string, unknown>)['data-mail-id'] as string | undefined\n if (mailId) return <MailChip mailId={mailId} />\n return (\n <span className={className} {...props}>\n {children}\n </span>\n )\n },\n}\n\n/** Bare `doc-\u2026` / `eml-\u2026` ids in text become `<span data-doc-id>` / `<span data-mail-id>` pills. */\nconst conversationRehypePlugins = [rehypeDocEntityPills]\n\nexport type ConnectedMarkdownProps = Omit<\n KitMarkdownRendererProps,\n 'rehypePlugins' | 'allowHtml' | 'renderCitation'\n>\n\n/**\n * The kit's renderer with the conversation's overrides; a caller's `components` (e.g. the citation\n * core's) still win over both.\n */\nfunction ConnectedMarkdownComponent({ components, ...props }: ConnectedMarkdownProps) {\n const merged = useMemo(\n () =>\n components\n ? { ...conversationMarkdownComponents, ...components }\n : conversationMarkdownComponents,\n [components]\n )\n return (\n <KitMarkdownRenderer {...props} components={merged} rehypePlugins={conversationRehypePlugins} />\n )\n}\n\nexport const ConnectedMarkdown = React.memo(ConnectedMarkdownComponent)\n"],
5
+ "mappings": ";AAiEI,SAiEc,UAjEd;AAjEJ,SAAS,uBAAuB;AAChC,SAAS,iBAAiB;AAC1B,SAAS,iBAAiB;AAO1B,SAAS,aAAa,gBAAgB,qBAAqB,mBAAmB;AAC9E,SAAS,uBAAyC;AAClD;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA,oBAAoB;AAAA,EACpB;AAAA,EAEA;AAAA,OACK;AACP,OAAO,SAAS,YAAY,eAAe;AAC3C,SAAS,UAAU,YAAY;AAI/B,SAAS,mBAAmB;AAC5B,SAAS,iBAAiB;AAC1B,SAAS,4BAA4B;AACrC,SAAS,8BAA8B;AACvC,SAAS,4BAA4B;AACrC,SAAS,sBAAsB;AAC/B,SAAS,sBAAsB,kCAAkC;AAGjE,SAAS,aAAa,UAAmC;AACvD,SAAO,MAAM,SAAS,QAAQ,QAAQ,EACnC;AAAA,IAAI,CAAC,UACJ,OAAO,UAAU,YAAY,OAAO,UAAU,WAC1C,OAAO,KAAK,IACZ,MAAM,eAA+C,KAAK,IACxD,aAAa,M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AAA,IACN,CAAC,UAAU;AAAA,EACb;AACA,SACE,oBAAC,uBAAqB,GAAG,OAAO,YAAY,QAAQ,eAAe,2BAA2B;AAElG;AAEO,MAAM,oBAAoB,MAAM,KAAK,0BAA0B;",
6
6
  "names": []
7
7
  }
@@ -53,8 +53,8 @@ import { ConnectedMarkdown } from "./ConnectedMarkdown.js";
53
53
  import { MessageDetailsModal } from "./MessageDetailsModal.js";
54
54
  import { MessageLiveSeconds } from "./MessageLiveSeconds.js";
55
55
  import { buildCitationChunkData } from "@arbidocs/sdk/browser";
56
- import { artifactKindFromFileName, viewerTabForArtifactMode } from "@arbidocs/react/artifacts";
57
- import { findMessageDocument } from "../../chat/generatedDocuments.js";
56
+ import { savedArtifactMode, viewerTabForArtifactMode } from "@arbidocs/react/artifacts";
57
+ import { findMessageDocuments } from "../../chat/generatedDocuments.js";
58
58
  import { useOpenWorkspaceIcon } from "./useOpenWorkspaceIcon.js";
59
59
  import { useBlocksEnvironment } from "../../provider/environment.js";
60
60
  import { DocumentUser } from "../files/fields/DocumentUser.js";
@@ -109,25 +109,23 @@ const MessageComponent = ({
109
109
  const { data: workspaceUsers = [] } = useWorkspaceUsers();
110
110
  const streaming = useMessageChatArtifact(message.external_id);
111
111
  const { data: workspaceDocs } = useDocuments();
112
- const linkedArtifact = useMemo(() => {
113
- if (!message.external_id) return void 0;
114
- if (streaming) return streaming;
115
- const doc = findMessageDocument(workspaceDocs, message.external_id);
116
- if (!doc) return void 0;
117
- const kind = artifactKindFromFileName(doc.file_name);
118
- return {
112
+ const linkedArtifacts = useMemo(() => {
113
+ const saved = findMessageDocuments(workspaceDocs, message.external_id).filter((doc) => doc.external_id !== streaming?.docExtId).map((doc) => ({
119
114
  docExtId: doc.external_id,
120
115
  title: getDocumentTitle(doc),
121
116
  isComplete: true,
122
- mode: isImageDocument(doc) ? "image" : /\.pptx$/i.test(doc.file_name ?? "") ? "presentation" : kind ?? "markdown"
123
- };
117
+ mode: isImageDocument(doc) ? "image" : savedArtifactMode(doc.file_name)
118
+ }));
119
+ return streaming ? [streaming, ...saved] : saved;
124
120
  }, [streaming, workspaceDocs, message.external_id]);
121
+ const linkedArtifact = linkedArtifacts[0];
125
122
  const handleOpenArtifact = useCallback(
126
123
  (docExtId) => {
127
- session.setDocumentViewer({ tab: viewerTabForArtifactMode(linkedArtifact?.mode) });
124
+ const mode = linkedArtifacts.find((artifact) => artifact.docExtId === docExtId)?.mode;
125
+ session.setDocumentViewer({ tab: viewerTabForArtifactMode(mode) });
128
126
  environment.openDocument(docExtId);
129
127
  },
130
- [linkedArtifact?.mode, session, environment]
128
+ [linkedArtifacts, session, environment]
131
129
  );
132
130
  const messageAuthorUser = useMemo(() => {
133
131
  if (!isUser) return null;
@@ -754,7 +752,14 @@ const MessageComponent = ({
754
752
  ]
755
753
  }
756
754
  ),
757
- !isUser && linkedArtifact && /* @__PURE__ */ jsx(MessageArtifactCard, { artifact: linkedArtifact, onOpen: handleOpenArtifact }),
755
+ !isUser && linkedArtifacts.map((artifact) => /* @__PURE__ */ jsx(
756
+ MessageArtifactCard,
757
+ {
758
+ artifact,
759
+ onOpen: handleOpenArtifact
760
+ },
761
+ artifact.docExtId
762
+ )),
758
763
  !isUser && subagentLinks
759
764
  ]
760
765
  }