@arbidocs/blocks 0.5.119 → 0.5.121

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 (463) hide show
  1. package/dist/ClippingMediaViewer-B6WG7Q64.cjs +156 -0
  2. package/dist/ClippingMediaViewer-B6WG7Q64.cjs.map +1 -0
  3. package/dist/ClippingPdfViewer-6GCVTV3V.cjs +79 -0
  4. package/dist/ClippingPdfViewer-6GCVTV3V.cjs.map +1 -0
  5. package/dist/{ConnectedCallDock-WER7R222.cjs → ConnectedCallDock-DC5V5OUJ.cjs} +25 -23
  6. package/dist/ConnectedCallDock-DC5V5OUJ.cjs.map +1 -0
  7. package/dist/{ConnectedCallRoom-T7OBQTYP.cjs → ConnectedCallRoom-FQLXWTFB.cjs} +18 -16
  8. package/dist/{ConnectedCallRoom-T7OBQTYP.cjs.map → ConnectedCallRoom-FQLXWTFB.cjs.map} +1 -1
  9. package/dist/{ConnectedNativeDocxComparison-546ILGLW.cjs → ConnectedNativeDocxComparison-4Q5S7VLD.cjs} +17 -17
  10. package/dist/{ConnectedNativeDocxComparison-546ILGLW.cjs.map → ConnectedNativeDocxComparison-4Q5S7VLD.cjs.map} +1 -1
  11. package/dist/ConnectedPresentation-4HLDZDWV.cjs +183 -0
  12. package/dist/ConnectedPresentation-4HLDZDWV.cjs.map +1 -0
  13. package/dist/{ConnectedProductionSetDialog-LHB4VQWC.cjs → ConnectedProductionSetDialog-4EAY6KAZ.cjs} +3 -3
  14. package/dist/{ConnectedProductionSetDialog-LHB4VQWC.cjs.map → ConnectedProductionSetDialog-4EAY6KAZ.cjs.map} +1 -1
  15. package/dist/ConnectedSlidesTab-7QDE2CZD.cjs +234 -0
  16. package/dist/ConnectedSlidesTab-7QDE2CZD.cjs.map +1 -0
  17. package/dist/{ConnectedStreamedWordArtifact-S2ZFZLZQ.cjs → ConnectedStreamedWordArtifact-FFOQJBOI.cjs} +17 -17
  18. package/dist/{ConnectedStreamedWordArtifact-S2ZFZLZQ.cjs.map → ConnectedStreamedWordArtifact-FFOQJBOI.cjs.map} +1 -1
  19. package/dist/{DocumentReviewCard-ZSBZBGFK.cjs → DocumentReviewCard-SNWVEZ7S.cjs} +19 -18
  20. package/dist/DocumentReviewCard-SNWVEZ7S.cjs.map +1 -0
  21. package/dist/{FilesViewerDialog-6UKR5WEF.cjs → FilesViewerDialog-IZI63FOV.cjs} +54 -47
  22. package/dist/FilesViewerDialog-IZI63FOV.cjs.map +1 -0
  23. package/dist/{GridViewImpl-ZMJJWTOM.cjs → GridViewImpl-LTYET77Q.cjs} +3 -3
  24. package/dist/GridViewImpl-LTYET77Q.cjs.map +1 -0
  25. package/dist/{WorkspaceTableView-J3C6VH4T.cjs → WorkspaceTableView-TEIRB6VJ.cjs} +11 -10
  26. package/dist/WorkspaceTableView-TEIRB6VJ.cjs.map +1 -0
  27. package/dist/agents/index.cjs +297 -297
  28. package/dist/agents/tasks/ConversationListView.js +10 -2
  29. package/dist/agents/tasks/ConversationListView.js.map +2 -2
  30. package/dist/agents/tasks/TaskTable.js +5 -4
  31. package/dist/agents/tasks/TaskTable.js.map +2 -2
  32. package/dist/agents/tasks/WorkflowsTable.js +4 -5
  33. package/dist/agents/tasks/WorkflowsTable.js.map +2 -2
  34. package/dist/agents/tasks/taskColumns.js +1 -1
  35. package/dist/agents/tasks/taskColumns.js.map +1 -1
  36. package/dist/agents/tasks/taskTableLabels.js +1 -1
  37. package/dist/agents/tasks/taskTableLabels.js.map +1 -1
  38. package/dist/agents/tasks/workflowTableLabels.js +1 -1
  39. package/dist/agents/tasks/workflowTableLabels.js.map +1 -1
  40. package/dist/{ai-IM4A23YT.cjs → ai-KBYNRNZ6.cjs} +28 -26
  41. package/dist/ai-KBYNRNZ6.cjs.map +1 -0
  42. package/dist/calls/connected/CallControls.d.ts +2 -0
  43. package/dist/calls/connected/CallControls.js +71 -9
  44. package/dist/calls/connected/CallControls.js.map +2 -2
  45. package/dist/calls/connected/ShareDocumentDialog.d.ts +14 -0
  46. package/dist/calls/connected/ShareDocumentDialog.js +77 -0
  47. package/dist/calls/connected/ShareDocumentDialog.js.map +7 -0
  48. package/dist/calls/index.cjs +121 -121
  49. package/dist/chat/index.cjs +9 -8
  50. package/dist/{chunk-T23UTIRI.cjs → chunk-2PZT3J34.cjs} +6 -6
  51. package/dist/{chunk-T23UTIRI.cjs.map → chunk-2PZT3J34.cjs.map} +1 -1
  52. package/dist/{chunk-SGYSDABK.cjs → chunk-2W5E62EY.cjs} +6 -6
  53. package/dist/{chunk-SGYSDABK.cjs.map → chunk-2W5E62EY.cjs.map} +1 -1
  54. package/dist/{chunk-TDO5UWXF.cjs → chunk-3SCNXNHI.cjs} +5 -5
  55. package/dist/{chunk-TDO5UWXF.cjs.map → chunk-3SCNXNHI.cjs.map} +1 -1
  56. package/dist/{chunk-KTQOGT2L.cjs → chunk-474GPLCM.cjs} +7 -7
  57. package/dist/{chunk-KTQOGT2L.cjs.map → chunk-474GPLCM.cjs.map} +1 -1
  58. package/dist/{chunk-TP5PGWIO.cjs → chunk-4IOYQLKG.cjs} +3 -3
  59. package/dist/{chunk-TP5PGWIO.cjs.map → chunk-4IOYQLKG.cjs.map} +1 -1
  60. package/dist/{chunk-NY3YUCOW.cjs → chunk-4NPCDS2X.cjs} +3 -3
  61. package/dist/{chunk-NY3YUCOW.cjs.map → chunk-4NPCDS2X.cjs.map} +1 -1
  62. package/dist/{chunk-CPG7II4E.cjs → chunk-4RBQ44RY.cjs} +28 -28
  63. package/dist/chunk-4RBQ44RY.cjs.map +1 -0
  64. package/dist/{chunk-BQ5RIWWT.cjs → chunk-4VZZWYEC.cjs} +3 -3
  65. package/dist/{chunk-BQ5RIWWT.cjs.map → chunk-4VZZWYEC.cjs.map} +1 -1
  66. package/dist/{chunk-Y24V6HPR.cjs → chunk-52KGMAO5.cjs} +15 -15
  67. package/dist/{chunk-Y24V6HPR.cjs.map → chunk-52KGMAO5.cjs.map} +1 -1
  68. package/dist/{chunk-HB2O4THB.cjs → chunk-5534FYXP.cjs} +4 -4
  69. package/dist/{chunk-HB2O4THB.cjs.map → chunk-5534FYXP.cjs.map} +1 -1
  70. package/dist/chunk-5GCCUXMT.cjs +63 -0
  71. package/dist/chunk-5GCCUXMT.cjs.map +1 -0
  72. package/dist/chunk-5LTIZ44D.cjs +95 -0
  73. package/dist/chunk-5LTIZ44D.cjs.map +1 -0
  74. package/dist/{chunk-YGXOKB5Z.cjs → chunk-734NPQNR.cjs} +4 -4
  75. package/dist/{chunk-YGXOKB5Z.cjs.map → chunk-734NPQNR.cjs.map} +1 -1
  76. package/dist/{chunk-SB4M3ITT.cjs → chunk-7VUJGHMY.cjs} +444 -100
  77. package/dist/chunk-7VUJGHMY.cjs.map +1 -0
  78. package/dist/chunk-AFQTQC7A.cjs +35 -0
  79. package/dist/chunk-AFQTQC7A.cjs.map +1 -0
  80. package/dist/{chunk-XKVPSOKP.cjs → chunk-AY6EZSZB.cjs} +4 -4
  81. package/dist/{chunk-XKVPSOKP.cjs.map → chunk-AY6EZSZB.cjs.map} +1 -1
  82. package/dist/{chunk-TT4IF52H.cjs → chunk-BVAT4EVC.cjs} +40 -41
  83. package/dist/chunk-BVAT4EVC.cjs.map +1 -0
  84. package/dist/{chunk-VGCTYTEW.cjs → chunk-C2OICDMI.cjs} +10 -10
  85. package/dist/{chunk-VGCTYTEW.cjs.map → chunk-C2OICDMI.cjs.map} +1 -1
  86. package/dist/{chunk-CPR6EHG7.cjs → chunk-DR2AH7JL.cjs} +179 -55
  87. package/dist/chunk-DR2AH7JL.cjs.map +1 -0
  88. package/dist/{chunk-NJCK6V6U.cjs → chunk-EATIFPKP.cjs} +4 -60
  89. package/dist/chunk-EATIFPKP.cjs.map +1 -0
  90. package/dist/{chunk-B3LZITVF.cjs → chunk-EHP6OH5D.cjs} +11 -451
  91. package/dist/chunk-EHP6OH5D.cjs.map +1 -0
  92. package/dist/{chunk-DDIW4HLU.cjs → chunk-ENGL7P3I.cjs} +46 -37
  93. package/dist/chunk-ENGL7P3I.cjs.map +1 -0
  94. package/dist/{chunk-QHOHDNBU.cjs → chunk-FKFQCK3C.cjs} +4 -4
  95. package/dist/{chunk-QHOHDNBU.cjs.map → chunk-FKFQCK3C.cjs.map} +1 -1
  96. package/dist/{chunk-6UTKM5AB.cjs → chunk-GKVE5JGB.cjs} +76 -76
  97. package/dist/chunk-GKVE5JGB.cjs.map +1 -0
  98. package/dist/{chunk-B2HNNG25.cjs → chunk-GPX5VC57.cjs} +50 -50
  99. package/dist/{chunk-B2HNNG25.cjs.map → chunk-GPX5VC57.cjs.map} +1 -1
  100. package/dist/{chunk-WAV762GP.cjs → chunk-GQXPNIRE.cjs} +6 -6
  101. package/dist/{chunk-WAV762GP.cjs.map → chunk-GQXPNIRE.cjs.map} +1 -1
  102. package/dist/chunk-GX2EBMJW.cjs +133 -0
  103. package/dist/chunk-GX2EBMJW.cjs.map +1 -0
  104. package/dist/{chunk-7OPOPYV6.cjs → chunk-H5OLHP2U.cjs} +3 -3
  105. package/dist/{chunk-7OPOPYV6.cjs.map → chunk-H5OLHP2U.cjs.map} +1 -1
  106. package/dist/chunk-HYUKPHCT.cjs +66 -0
  107. package/dist/chunk-HYUKPHCT.cjs.map +1 -0
  108. package/dist/{chunk-NNUK5ZM7.cjs → chunk-JQLWKNJO.cjs} +29 -27
  109. package/dist/chunk-JQLWKNJO.cjs.map +1 -0
  110. package/dist/{chunk-OEREKAAP.cjs → chunk-JZEYHDWJ.cjs} +75 -75
  111. package/dist/{chunk-OEREKAAP.cjs.map → chunk-JZEYHDWJ.cjs.map} +1 -1
  112. package/dist/{chunk-PGJYD67F.cjs → chunk-KNGZZC4O.cjs} +7 -6
  113. package/dist/chunk-KNGZZC4O.cjs.map +1 -0
  114. package/dist/{chunk-NIE3N6OM.cjs → chunk-KP5AITQ4.cjs} +10 -10
  115. package/dist/{chunk-NIE3N6OM.cjs.map → chunk-KP5AITQ4.cjs.map} +1 -1
  116. package/dist/{chunk-YYPZOEED.cjs → chunk-LHWOKOMP.cjs} +23 -2
  117. package/dist/chunk-LHWOKOMP.cjs.map +1 -0
  118. package/dist/{chunk-57NHXEU2.cjs → chunk-MXBXZXXQ.cjs} +5 -5
  119. package/dist/{chunk-57NHXEU2.cjs.map → chunk-MXBXZXXQ.cjs.map} +1 -1
  120. package/dist/{chunk-WXUU3COI.cjs → chunk-MZ2KZXNU.cjs} +3 -3
  121. package/dist/{chunk-WXUU3COI.cjs.map → chunk-MZ2KZXNU.cjs.map} +1 -1
  122. package/dist/chunk-NAJN32MF.cjs +154 -0
  123. package/dist/chunk-NAJN32MF.cjs.map +1 -0
  124. package/dist/{chunk-557MJ4IH.cjs → chunk-NLOETJCB.cjs} +17 -154
  125. package/dist/chunk-NLOETJCB.cjs.map +1 -0
  126. package/dist/{chunk-4XJEHKVZ.cjs → chunk-PIYYBPHH.cjs} +4 -4
  127. package/dist/{chunk-4XJEHKVZ.cjs.map → chunk-PIYYBPHH.cjs.map} +1 -1
  128. package/dist/chunk-Q3XJUXID.cjs +4774 -0
  129. package/dist/chunk-Q3XJUXID.cjs.map +1 -0
  130. package/dist/{chunk-325GVZE6.cjs → chunk-Q6DQGGP4.cjs} +3 -3
  131. package/dist/{chunk-325GVZE6.cjs.map → chunk-Q6DQGGP4.cjs.map} +1 -1
  132. package/dist/chunk-QFXILJMJ.cjs +458 -0
  133. package/dist/chunk-QFXILJMJ.cjs.map +1 -0
  134. package/dist/{chunk-R7CJEIA5.cjs → chunk-RYVZDFVO.cjs} +8 -9
  135. package/dist/chunk-RYVZDFVO.cjs.map +1 -0
  136. package/dist/{chunk-VLCY46K6.cjs → chunk-TG2GM7WJ.cjs} +4 -3
  137. package/dist/chunk-TG2GM7WJ.cjs.map +1 -0
  138. package/dist/{chunk-EOG6OT5I.cjs → chunk-TXP2N3DC.cjs} +4 -4
  139. package/dist/{chunk-EOG6OT5I.cjs.map → chunk-TXP2N3DC.cjs.map} +1 -1
  140. package/dist/{chunk-KXIRVKCJ.cjs → chunk-UUENH4BJ.cjs} +3 -3
  141. package/dist/{chunk-KXIRVKCJ.cjs.map → chunk-UUENH4BJ.cjs.map} +1 -1
  142. package/dist/chunk-VJ5ZLRBD.cjs +27 -0
  143. package/dist/chunk-VJ5ZLRBD.cjs.map +1 -0
  144. package/dist/{chunk-P77YTTJ3.cjs → chunk-W6B3RYTX.cjs} +4 -4
  145. package/dist/{chunk-P77YTTJ3.cjs.map → chunk-W6B3RYTX.cjs.map} +1 -1
  146. package/dist/chunk-WOOOMTTA.cjs +19 -0
  147. package/dist/chunk-WOOOMTTA.cjs.map +1 -0
  148. package/dist/{chunk-ZPPMAL5P.cjs → chunk-WQMR3O2D.cjs} +6 -10
  149. package/dist/chunk-WQMR3O2D.cjs.map +1 -0
  150. package/dist/{chunk-CJYWHUZR.cjs → chunk-XCKHOXRP.cjs} +4 -4
  151. package/dist/{chunk-CJYWHUZR.cjs.map → chunk-XCKHOXRP.cjs.map} +1 -1
  152. package/dist/{chunk-6WMMZLEV.cjs → chunk-XJEXFEWG.cjs} +2 -27
  153. package/dist/chunk-XJEXFEWG.cjs.map +1 -0
  154. package/dist/chunk-XK4TVJKD.cjs +73 -0
  155. package/dist/chunk-XK4TVJKD.cjs.map +1 -0
  156. package/dist/chunk-XTR26TNE.cjs +1358 -0
  157. package/dist/chunk-XTR26TNE.cjs.map +1 -0
  158. package/dist/{chunk-E7TE2WVT.cjs → chunk-ZVEW3JBT.cjs} +3 -3
  159. package/dist/{chunk-E7TE2WVT.cjs.map → chunk-ZVEW3JBT.cjs.map} +1 -1
  160. package/dist/collaboration/index.cjs +73 -73
  161. package/dist/collaboration/sharing/ShareControl.js +10 -2
  162. package/dist/collaboration/sharing/ShareControl.js.map +2 -2
  163. package/dist/components/SharedCell.d.ts +2 -4
  164. package/dist/components/SharedCell.js +4 -8
  165. package/dist/components/SharedCell.js.map +2 -2
  166. package/dist/components/ZoomSlider.d.ts +25 -0
  167. package/dist/components/ZoomSlider.js +59 -0
  168. package/dist/components/ZoomSlider.js.map +7 -0
  169. package/dist/connect/docx.cjs +20 -20
  170. package/dist/connect/index.cjs +1210 -1264
  171. package/dist/connect/index.cjs.map +1 -1
  172. package/dist/connect/viewer.cjs +42 -36
  173. package/dist/connection/ai.d.ts +1 -1
  174. package/dist/connection/facts/factPageColumns.js +3 -9
  175. package/dist/connection/facts/factPageColumns.js.map +2 -2
  176. package/dist/connection/files/ConnectedNewFileMenu.d.ts +2 -1
  177. package/dist/connection/files/ConnectedNewFileMenu.js +9 -3
  178. package/dist/connection/files/ConnectedNewFileMenu.js.map +2 -2
  179. package/dist/connection/files/explorer/ConnectedFilesExplorer.js +1 -1
  180. package/dist/connection/files/explorer/ConnectedFilesExplorer.js.map +2 -2
  181. package/dist/connection/files/explorer/FileTiles.js +1 -1
  182. package/dist/connection/files/explorer/FileTiles.js.map +2 -2
  183. package/dist/connection/files/fields/documentField.js +1 -1
  184. package/dist/connection/files/fields/documentField.js.map +2 -2
  185. package/dist/connection/files/grid/cells.js +1 -3
  186. package/dist/connection/files/grid/cells.js.map +2 -2
  187. package/dist/connection/files/grid/documentColumns.js +4 -3
  188. package/dist/connection/files/grid/documentColumns.js.map +2 -2
  189. package/dist/connection/files/page/DocumentsFilterBarActions.js +17 -28
  190. package/dist/connection/files/page/DocumentsFilterBarActions.js.map +2 -2
  191. package/dist/connection/mail/useMailboxDefaults.js +1 -1
  192. package/dist/connection/mail/useMailboxDefaults.js.map +2 -2
  193. package/dist/connection/panels/useSessionPanelMode.js +3 -2
  194. package/dist/connection/panels/useSessionPanelMode.js.map +2 -2
  195. package/dist/connection/presentation/ClippingMediaViewer.d.ts +12 -0
  196. package/dist/connection/presentation/ClippingMediaViewer.js +153 -0
  197. package/dist/connection/presentation/ClippingMediaViewer.js.map +7 -0
  198. package/dist/connection/presentation/ClippingPdfViewer.d.ts +22 -0
  199. package/dist/connection/presentation/ClippingPdfViewer.js +75 -0
  200. package/dist/connection/presentation/ClippingPdfViewer.js.map +7 -0
  201. package/dist/connection/presentation/ConnectedPresentation.d.ts +12 -0
  202. package/dist/connection/presentation/ConnectedPresentation.js +100 -0
  203. package/dist/connection/presentation/ConnectedPresentation.js.map +7 -0
  204. package/dist/connection/presentation/ConnectedSlidesTab.d.ts +20 -0
  205. package/dist/connection/presentation/ConnectedSlidesTab.js +220 -0
  206. package/dist/connection/presentation/ConnectedSlidesTab.js.map +7 -0
  207. package/dist/connection/presentation/CropClipDialog.d.ts +11 -0
  208. package/dist/connection/presentation/CropClipDialog.js +86 -0
  209. package/dist/connection/presentation/CropClipDialog.js.map +7 -0
  210. package/dist/connection/presentation/GenerateTile.d.ts +4 -0
  211. package/dist/connection/presentation/GenerateTile.js +24 -0
  212. package/dist/connection/presentation/GenerateTile.js.map +7 -0
  213. package/dist/connection/presentation/LabelColumnMenu.d.ts +8 -0
  214. package/dist/connection/presentation/LabelColumnMenu.js +38 -0
  215. package/dist/connection/presentation/LabelColumnMenu.js.map +7 -0
  216. package/dist/connection/presentation/PresentationDialogs.d.ts +39 -0
  217. package/dist/connection/presentation/PresentationDialogs.js +295 -0
  218. package/dist/connection/presentation/PresentationDialogs.js.map +7 -0
  219. package/dist/connection/presentation/PresentationFileCard.d.ts +10 -0
  220. package/dist/connection/presentation/PresentationFileCard.js +35 -0
  221. package/dist/connection/presentation/PresentationFileCard.js.map +7 -0
  222. package/dist/connection/presentation/PresentationPill.d.ts +8 -0
  223. package/dist/connection/presentation/PresentationPill.js +44 -0
  224. package/dist/connection/presentation/PresentationPill.js.map +7 -0
  225. package/dist/connection/presentation/PresentationSlot.d.ts +7 -0
  226. package/dist/connection/presentation/PresentationSlot.js +35 -0
  227. package/dist/connection/presentation/PresentationSlot.js.map +7 -0
  228. package/dist/connection/presentation/requests.d.ts +16 -0
  229. package/dist/connection/presentation/requests.js +20 -0
  230. package/dist/connection/presentation/requests.js.map +7 -0
  231. package/dist/connection/presentation/useImageGeneration.d.ts +11 -0
  232. package/dist/connection/presentation/useImageGeneration.js +66 -0
  233. package/dist/connection/presentation/useImageGeneration.js.map +7 -0
  234. package/dist/connection/presentation/useLabelColumns.d.ts +15 -0
  235. package/dist/connection/presentation/useLabelColumns.js +33 -0
  236. package/dist/connection/presentation/useLabelColumns.js.map +7 -0
  237. package/dist/connection/presentation/usePresentationController.d.ts +15 -0
  238. package/dist/connection/presentation/usePresentationController.js +118 -0
  239. package/dist/connection/presentation/usePresentationController.js.map +7 -0
  240. package/dist/connection/presentation/usePresentationFiles.d.ts +44 -0
  241. package/dist/connection/presentation/usePresentationFiles.js +307 -0
  242. package/dist/connection/presentation/usePresentationFiles.js.map +7 -0
  243. package/dist/connection/presentation/useViewerClipping.d.ts +14 -0
  244. package/dist/connection/presentation/useViewerClipping.js +18 -0
  245. package/dist/connection/presentation/useViewerClipping.js.map +7 -0
  246. package/dist/connection/sharing/WorkspaceMembersList.d.ts +4 -0
  247. package/dist/connection/sharing/WorkspaceMembersList.js +34 -0
  248. package/dist/connection/sharing/WorkspaceMembersList.js.map +7 -0
  249. package/dist/connection/shell/ConnectedAppShell.js +9 -1
  250. package/dist/connection/shell/ConnectedAppShell.js.map +2 -2
  251. package/dist/connection/viewer/CleanViewControl.d.ts +8 -0
  252. package/dist/connection/viewer/CleanViewControl.js +76 -0
  253. package/dist/connection/viewer/CleanViewControl.js.map +7 -0
  254. package/dist/connection/viewer/ConnectedDocumentViewer.js +31 -31
  255. package/dist/connection/viewer/ConnectedDocumentViewer.js.map +2 -2
  256. package/dist/connection/viewer/ViewerCropModal.d.ts +5 -0
  257. package/dist/connection/viewer/ViewerCropModal.js +22 -0
  258. package/dist/connection/viewer/ViewerCropModal.js.map +7 -0
  259. package/dist/connection/viewer/ViewerPdfPane.d.ts +3 -1
  260. package/dist/connection/viewer/ViewerPdfPane.js +57 -2
  261. package/dist/connection/viewer/ViewerPdfPane.js.map +2 -2
  262. package/dist/connection/viewer/drafts.js +6 -4
  263. package/dist/connection/viewer/drafts.js.map +2 -2
  264. package/dist/connection/viewer/pdf/PdfPassageHighlights.d.ts +12 -0
  265. package/dist/connection/viewer/pdf/PdfPassageHighlights.js +36 -0
  266. package/dist/connection/viewer/pdf/PdfPassageHighlights.js.map +7 -0
  267. package/dist/connection/viewer/pdf/passageHighlights.d.ts +26 -0
  268. package/dist/connection/viewer/pdf/passageHighlights.js +40 -0
  269. package/dist/connection/viewer/pdf/passageHighlights.js.map +7 -0
  270. package/dist/connection/viewer/pdf/usePdfPassageHighlights.d.ts +9 -0
  271. package/dist/connection/viewer/pdf/usePdfPassageHighlights.js +47 -0
  272. package/dist/connection/viewer/pdf/usePdfPassageHighlights.js.map +7 -0
  273. package/dist/connection/viewer/shareDocument.d.ts +11 -0
  274. package/dist/connection/viewer/shareDocument.js +11 -0
  275. package/dist/connection/viewer/shareDocument.js.map +7 -0
  276. package/dist/connection/viewer/slidesTabChunk.d.ts +2 -0
  277. package/dist/connection/viewer/slidesTabChunk.js +9 -0
  278. package/dist/connection/viewer/slidesTabChunk.js.map +7 -0
  279. package/dist/connection/viewer/useCleanView.d.ts +14 -0
  280. package/dist/connection/viewer/useCleanView.js +29 -0
  281. package/dist/connection/viewer/useCleanView.js.map +7 -0
  282. package/dist/connection/viewer/useViewedDocument.d.ts +1 -0
  283. package/dist/connection/viewer/useViewedDocument.js +9 -1
  284. package/dist/connection/viewer/useViewedDocument.js.map +2 -2
  285. package/dist/connection/viewer/useViewerTabs.js +18 -4
  286. package/dist/connection/viewer/useViewerTabs.js.map +2 -2
  287. package/dist/connection/workflows/ConnectedWorkflowStart.d.ts +14 -2
  288. package/dist/connection/workflows/ConnectedWorkflowStart.js +5 -2
  289. package/dist/connection/workflows/ConnectedWorkflowStart.js.map +2 -2
  290. package/dist/connection/workflows/workflowsPageLabels.js +1 -1
  291. package/dist/connection/workflows/workflowsPageLabels.js.map +1 -1
  292. package/dist/dashboards/index.cjs +1 -1
  293. package/dist/databases/index.cjs +49 -49
  294. package/dist/document-tools/DocumentToolButtons.d.ts +2 -0
  295. package/dist/document-tools/DocumentToolButtons.js +22 -1
  296. package/dist/document-tools/DocumentToolButtons.js.map +2 -2
  297. package/dist/document-tools/index.cjs +16 -12
  298. package/dist/document-tools/index.d.ts +1 -1
  299. package/dist/document-tools/index.js +2 -0
  300. package/dist/document-tools/index.js.map +2 -2
  301. package/dist/embed/index.cjs +43 -41
  302. package/dist/facts/factColumns.js +3 -3
  303. package/dist/facts/factColumns.js.map +1 -1
  304. package/dist/facts/index.cjs +42 -42
  305. package/dist/files/GridViewImpl.js +1 -1
  306. package/dist/files/GridViewImpl.js.map +2 -2
  307. package/dist/files/HtmlViewerParts.js +7 -15
  308. package/dist/files/HtmlViewerParts.js.map +2 -2
  309. package/dist/files/ViewerChrome.d.ts +5 -1
  310. package/dist/files/ViewerChrome.js +16 -6
  311. package/dist/files/ViewerChrome.js.map +2 -2
  312. package/dist/files/index.cjs +226 -226
  313. package/dist/files/navigator/DocumentSearchList.js +1 -1
  314. package/dist/files/navigator/DocumentSearchList.js.map +2 -2
  315. package/dist/index.cjs +1668 -1666
  316. package/dist/index.cjs.map +1 -1
  317. package/dist/presentation/BoxActionBar.d.ts +11 -0
  318. package/dist/presentation/BoxActionBar.js +182 -0
  319. package/dist/presentation/BoxActionBar.js.map +7 -0
  320. package/dist/presentation/ClipActionBar.d.ts +26 -0
  321. package/dist/presentation/ClipActionBar.js +103 -0
  322. package/dist/presentation/ClipActionBar.js.map +7 -0
  323. package/dist/presentation/ClipCaptureOverlay.d.ts +14 -0
  324. package/dist/presentation/ClipCaptureOverlay.js +69 -0
  325. package/dist/presentation/ClipCaptureOverlay.js.map +7 -0
  326. package/dist/presentation/ClipImage.d.ts +21 -0
  327. package/dist/presentation/ClipImage.js +119 -0
  328. package/dist/presentation/ClipImage.js.map +7 -0
  329. package/dist/presentation/ClipTray.d.ts +11 -0
  330. package/dist/presentation/ClipTray.js +152 -0
  331. package/dist/presentation/ClipTray.js.map +7 -0
  332. package/dist/presentation/ClipViewControls.d.ts +11 -0
  333. package/dist/presentation/ClipViewControls.js +142 -0
  334. package/dist/presentation/ClipViewControls.js.map +7 -0
  335. package/dist/presentation/DesignMenu.d.ts +8 -0
  336. package/dist/presentation/DesignMenu.js +199 -0
  337. package/dist/presentation/DesignMenu.js.map +7 -0
  338. package/dist/presentation/LayoutMenu.d.ts +17 -0
  339. package/dist/presentation/LayoutMenu.js +122 -0
  340. package/dist/presentation/LayoutMenu.js.map +7 -0
  341. package/dist/presentation/MediaClip.d.ts +15 -0
  342. package/dist/presentation/MediaClip.js +67 -0
  343. package/dist/presentation/MediaClip.js.map +7 -0
  344. package/dist/presentation/Notice.d.ts +6 -0
  345. package/dist/presentation/Notice.js +43 -0
  346. package/dist/presentation/Notice.js.map +7 -0
  347. package/dist/presentation/PresentationStage.d.ts +32 -0
  348. package/dist/presentation/PresentationStage.js +232 -0
  349. package/dist/presentation/PresentationStage.js.map +7 -0
  350. package/dist/presentation/PresenterView.d.ts +16 -0
  351. package/dist/presentation/PresenterView.js +69 -0
  352. package/dist/presentation/PresenterView.js.map +7 -0
  353. package/dist/presentation/SlideDecor.d.ts +25 -0
  354. package/dist/presentation/SlideDecor.js +189 -0
  355. package/dist/presentation/SlideDecor.js.map +7 -0
  356. package/dist/presentation/SlidesEditor.d.ts +25 -0
  357. package/dist/presentation/SlidesEditor.js +359 -0
  358. package/dist/presentation/SlidesEditor.js.map +7 -0
  359. package/dist/presentation/StageBox.d.ts +30 -0
  360. package/dist/presentation/StageBox.js +281 -0
  361. package/dist/presentation/StageBox.js.map +7 -0
  362. package/dist/presentation/StageItem.d.ts +37 -0
  363. package/dist/presentation/StageItem.js +211 -0
  364. package/dist/presentation/StageItem.js.map +7 -0
  365. package/dist/presentation/box-style.d.ts +6 -0
  366. package/dist/presentation/box-style.js +19 -0
  367. package/dist/presentation/box-style.js.map +7 -0
  368. package/dist/presentation/boxes.d.ts +105 -0
  369. package/dist/presentation/boxes.js +103 -0
  370. package/dist/presentation/boxes.js.map +7 -0
  371. package/dist/presentation/draw-boxes.d.ts +8 -0
  372. package/dist/presentation/draw-boxes.js +130 -0
  373. package/dist/presentation/draw-boxes.js.map +7 -0
  374. package/dist/presentation/export-boxes.d.ts +10 -0
  375. package/dist/presentation/export-boxes.js +74 -0
  376. package/dist/presentation/export-boxes.js.map +7 -0
  377. package/dist/presentation/export-pptx.d.ts +16 -0
  378. package/dist/presentation/export-pptx.js +194 -0
  379. package/dist/presentation/export-pptx.js.map +7 -0
  380. package/dist/presentation/import-pptx.d.ts +35 -0
  381. package/dist/presentation/import-pptx.js +659 -0
  382. package/dist/presentation/import-pptx.js.map +7 -0
  383. package/dist/presentation/merge-outside-edits.d.ts +12 -0
  384. package/dist/presentation/merge-outside-edits.js +35 -0
  385. package/dist/presentation/merge-outside-edits.js.map +7 -0
  386. package/dist/presentation/model.d.ts +201 -0
  387. package/dist/presentation/model.js +271 -0
  388. package/dist/presentation/model.js.map +7 -0
  389. package/dist/presentation/panel-id.d.ts +34 -0
  390. package/dist/presentation/panel-id.js +24 -0
  391. package/dist/presentation/panel-id.js.map +7 -0
  392. package/dist/presentation/persistence.d.ts +121 -0
  393. package/dist/presentation/persistence.js +141 -0
  394. package/dist/presentation/persistence.js.map +7 -0
  395. package/dist/presentation/pptx-data.d.ts +22 -0
  396. package/dist/presentation/pptx-data.js +83 -0
  397. package/dist/presentation/pptx-data.js.map +7 -0
  398. package/dist/presentation/pptx-xml.d.ts +90 -0
  399. package/dist/presentation/pptx-xml.js +333 -0
  400. package/dist/presentation/pptx-xml.js.map +7 -0
  401. package/dist/presentation/render-slides.d.ts +58 -0
  402. package/dist/presentation/render-slides.js +309 -0
  403. package/dist/presentation/render-slides.js.map +7 -0
  404. package/dist/presentation/saved-boxes.d.ts +11 -0
  405. package/dist/presentation/saved-boxes.js +80 -0
  406. package/dist/presentation/saved-boxes.js.map +7 -0
  407. package/dist/presentation/slide-layout.d.ts +54 -0
  408. package/dist/presentation/slide-layout.js +117 -0
  409. package/dist/presentation/slide-layout.js.map +7 -0
  410. package/dist/presentation/stage-videos.d.ts +5 -0
  411. package/dist/presentation/stage-videos.js +19 -0
  412. package/dist/presentation/stage-videos.js.map +7 -0
  413. package/dist/presentation/store.d.ts +203 -0
  414. package/dist/presentation/store.js +429 -0
  415. package/dist/presentation/store.js.map +7 -0
  416. package/dist/presentation/theme.d.ts +102 -0
  417. package/dist/presentation/theme.js +276 -0
  418. package/dist/presentation/theme.js.map +7 -0
  419. package/dist/presentation/useClipDrag.d.ts +26 -0
  420. package/dist/presentation/useClipDrag.js +65 -0
  421. package/dist/presentation/useClipDrag.js.map +7 -0
  422. package/dist/presentation/useObjectUrl.d.ts +6 -0
  423. package/dist/presentation/useObjectUrl.js +15 -0
  424. package/dist/presentation/useObjectUrl.js.map +7 -0
  425. package/dist/presentation/usePresenterKeys.d.ts +13 -0
  426. package/dist/presentation/usePresenterKeys.js +62 -0
  427. package/dist/presentation/usePresenterKeys.js.map +7 -0
  428. package/dist/settings/index.cjs +151 -150
  429. package/dist/shell/PanelPortal.js +1 -0
  430. package/dist/shell/PanelPortal.js.map +2 -2
  431. package/dist/shell/index.cjs +112 -110
  432. package/dist/shell/panel-windows.d.ts +2 -0
  433. package/dist/shell/panel-windows.js +7 -2
  434. package/dist/shell/panel-windows.js.map +2 -2
  435. package/dist/studio/index.cjs +28 -26
  436. package/dist/studio/index.cjs.map +1 -1
  437. package/dist/styles.css +1 -1
  438. package/dist/workflow-canvas/index.cjs +58 -57
  439. package/dist/workflow-canvas/index.cjs.map +1 -1
  440. package/node_modules/@arbidocs/coedit/package.json +1 -1
  441. package/package.json +6 -5
  442. package/dist/ConnectedCallDock-WER7R222.cjs.map +0 -1
  443. package/dist/DocumentReviewCard-ZSBZBGFK.cjs.map +0 -1
  444. package/dist/FilesViewerDialog-6UKR5WEF.cjs.map +0 -1
  445. package/dist/GridViewImpl-ZMJJWTOM.cjs.map +0 -1
  446. package/dist/WorkspaceTableView-J3C6VH4T.cjs.map +0 -1
  447. package/dist/ai-IM4A23YT.cjs.map +0 -1
  448. package/dist/chunk-557MJ4IH.cjs.map +0 -1
  449. package/dist/chunk-6UTKM5AB.cjs.map +0 -1
  450. package/dist/chunk-6WMMZLEV.cjs.map +0 -1
  451. package/dist/chunk-B3LZITVF.cjs.map +0 -1
  452. package/dist/chunk-CPG7II4E.cjs.map +0 -1
  453. package/dist/chunk-CPR6EHG7.cjs.map +0 -1
  454. package/dist/chunk-DDIW4HLU.cjs.map +0 -1
  455. package/dist/chunk-NJCK6V6U.cjs.map +0 -1
  456. package/dist/chunk-NNUK5ZM7.cjs.map +0 -1
  457. package/dist/chunk-PGJYD67F.cjs.map +0 -1
  458. package/dist/chunk-R7CJEIA5.cjs.map +0 -1
  459. package/dist/chunk-SB4M3ITT.cjs.map +0 -1
  460. package/dist/chunk-TT4IF52H.cjs.map +0 -1
  461. package/dist/chunk-VLCY46K6.cjs.map +0 -1
  462. package/dist/chunk-YYPZOEED.cjs.map +0 -1
  463. package/dist/chunk-ZPPMAL5P.cjs.map +0 -1
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/connection/presentation/ClippingMediaViewer.tsx"],
4
+ "sourcesContent": ["/**\n * An image or a video while clipping for a presentation: drag over it and that area becomes a clip\n * (of a video: from the moment on screen). A video has its own small bar (play / pause, scrub, and\n * \"Add whole frame\"), since the drag area covers the picture.\n */\n\nimport { useCallback, useEffect, useRef, useState } from 'react'\nimport { Pause, Play, Plus } from 'lucide-react'\nimport { Button } from '@arbidocs/react/ui'\nimport { ClipCaptureOverlay } from '../../presentation/ClipCaptureOverlay'\nimport { formatTime, mediaCaption, type Rect } from '../../presentation/model'\nimport { usePresentation } from '../../presentation/store'\nimport { useObjectUrl } from '../../presentation/useObjectUrl'\n\nexport interface ClippingMediaViewerProps {\n file: Blob\n kind: 'image' | 'video'\n documentId: string\n fileName: string\n}\n\nconst WHOLE: Rect = { x: 0, y: 0, w: 1, h: 1 }\n\nexport function ClippingMediaViewer({\n file,\n kind,\n documentId,\n fileName,\n}: ClippingMediaViewerProps) {\n const url = useObjectUrl(file)\n const videoRef = useRef<HTMLVideoElement>(null)\n const imageRef = useRef<HTMLImageElement>(null)\n // The picture's own width / height, once known.\n const [natural, setNatural] = useState<number | null>(null)\n const [time, setTime] = useState(0)\n const [duration, setDuration] = useState(0)\n const [playing, setPlaying] = useState(false)\n\n // Its size, read as soon as it is known: at once if it already loaded (a cached file can load\n // before any handler is attached), else when it does.\n useEffect(() => {\n const media = videoRef.current ?? imageRef.current\n if (!media || !url) return\n const read = () => {\n const width = media instanceof HTMLVideoElement ? media.videoWidth : media.naturalWidth\n const height = media instanceof HTMLVideoElement ? media.videoHeight : media.naturalHeight\n if (width && height) setNatural(width / height)\n if (media instanceof HTMLVideoElement) setDuration(media.duration || 0)\n }\n read()\n const event = media instanceof HTMLVideoElement ? 'loadedmetadata' : 'load'\n media.addEventListener(event, read)\n return () => media.removeEventListener(event, read)\n }, [url])\n\n const capture = useCallback(\n ({ rect, aspect }: { rect: Rect; aspect: number }) => {\n const start = kind === 'video' ? (videoRef.current?.currentTime ?? 0) : undefined\n usePresentation.getState().addClip({\n kind,\n documentId,\n fileName,\n page: 1,\n rect,\n aspect,\n masks: [],\n source: file,\n start,\n caption: mediaCaption(fileName, start),\n })\n },\n [kind, documentId, fileName, file]\n )\n\n return (\n <div className=\"flex h-full min-h-0 flex-col\" data-testid=\"clipping-media-viewer\">\n <div className=\"border-b border-border bg-muted px-3 py-1.5 text-xs text-muted-foreground\">\n {kind === 'video'\n ? 'Drag over the video to clip that area from this moment, or add the whole frame.'\n : 'Drag over the part of the image to show it in the presentation.'}\n </div>\n <div className=\"relative min-h-0 flex-1 bg-black\" style={{ containerType: 'size' }}>\n {/* The picture as large as fits, aspect kept; the drag area covers exactly it. */}\n <div\n className=\"absolute inset-0 m-auto\"\n style={\n natural\n ? {\n width: `min(100cqw, calc(100cqh * ${natural}))`,\n height: `min(100cqh, calc(100cqw / ${natural}))`,\n }\n : { width: '100%', height: '100%' }\n }\n >\n {kind === 'video' ? (\n <video\n ref={videoRef}\n src={url}\n playsInline\n preload=\"auto\"\n className=\"block h-full w-full\"\n onTimeUpdate={(event) => setTime(event.currentTarget.currentTime)}\n onPlay={() => setPlaying(true)}\n onPause={() => setPlaying(false)}\n />\n ) : (\n <img\n ref={imageRef}\n src={url}\n alt={fileName}\n draggable={false}\n className=\"block h-full w-full select-none\"\n />\n )}\n {natural && <ClipCaptureOverlay page={1} onCapture={capture} />}\n </div>\n </div>\n {kind === 'video' && (\n <div className=\"flex items-center gap-2 border-t border-border px-3 py-1.5\">\n <Button\n type=\"button\"\n size=\"icon\"\n variant=\"ghost\"\n className=\"size-8\"\n onClick={() => {\n const v = videoRef.current\n if (!v) return\n if (v.paused) void v.play()\n else v.pause()\n }}\n aria-label={playing ? 'Pause' : 'Play'}\n >\n {playing ? <Pause className=\"size-4\" /> : <Play className=\"size-4\" />}\n </Button>\n <input\n type=\"range\"\n min={0}\n max={duration || 0}\n step={0.1}\n value={time}\n onChange={(event) => {\n const v = videoRef.current\n if (v) v.currentTime = Number(event.target.value)\n }}\n className=\"min-w-0 flex-1\"\n aria-label=\"Position in the video\"\n />\n <span className=\"text-xs tabular-nums text-muted-foreground\">\n {formatTime(time)} / {formatTime(duration)}\n </span>\n <Button\n type=\"button\"\n size=\"sm\"\n variant=\"outline\"\n disabled={!natural}\n onClick={() => natural && capture({ rect: WHOLE, aspect: natural })}\n data-testid=\"clip-whole-frame\"\n >\n <Plus className=\"mr-1 size-4\" />\n Add whole frame\n </Button>\n </div>\n )}\n </div>\n )\n}\n"],
5
+ "mappings": ";AA4EM,cAOE,YAPF;AAtEN,SAAS,aAAa,WAAW,QAAQ,gBAAgB;AACzD,SAAS,OAAO,MAAM,YAAY;AAClC,SAAS,cAAc;AACvB,SAAS,0BAA0B;AACnC,SAAS,YAAY,oBAA+B;AACpD,SAAS,uBAAuB;AAChC,SAAS,oBAAoB;AAS7B,MAAM,QAAc,EAAE,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,EAAE;AAEtC,SAAS,oBAAoB;AAAA,EAClC;AAAA,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S;AAAA;AAAA,MACrE;AAAA,MACA;AAAA,QAAC;AAAA;AAAA,UACC,MAAK;AAAA,UACL,KAAK;AAAA,UACL,KAAK,YAAY;AAAA,UACjB,MAAM;AAAA,UACN,OAAO;AAAA,UACP,UAAU,CAAC,UAAU;AACnB,kBAAM,IAAI,SAAS;AACnB,gBAAI,EAAG,GAAE,cAAc,OAAO,MAAM,OAAO,KAAK;AAAA,UAClD;AAAA,UACA,WAAU;AAAA,UACV,cAAW;AAAA;AAAA,MACb;AAAA,MACA,qBAAC,UAAK,WAAU,8CACb;AAAA,mBAAW,IAAI;AAAA,QAAE;AAAA,QAAI,WAAW,QAAQ;AAAA,SAC3C;AAAA,MACA;AAAA,QAAC;AAAA;AAAA,UACC,MAAK;AAAA,UACL,MAAK;AAAA,UACL,SAAQ;AAAA,UACR,UAAU,CAAC;AAAA,UACX,SAAS,MAAM,WAAW,QAAQ,EAAE,MAAM,OAAO,QAAQ,QAAQ,CAAC;AAAA,UAClE,eAAY;AAAA,UAEZ;AAAA,gCAAC,QAAK,WAAU,eAAc;AAAA,YAAE;AAAA;AAAA;AAAA,MAElC;AAAA,OACF;AAAA,KAEJ;AAEJ;",
6
+ "names": []
7
+ }
@@ -0,0 +1,22 @@
1
+ /**
2
+ * The PDF while clipping for a presentation: drag over a page and the area becomes a clip in the
3
+ * presentation (and goes on the current slide while that has fewer than two).
4
+ *
5
+ * Redactions are honoured: when the version has markup, its redaction marks (all but rejected
6
+ * ones) are read first and every clip carries those over its area as black masks, so a redacted
7
+ * passage never reaches a shared screen. Clipping waits for them, and stays off if they cannot be
8
+ * read.
9
+ */
10
+ import { type ComponentType } from 'react';
11
+ import type { PdfViewerProps } from '@arbidocs/react/viewers';
12
+ export interface ClippingPdfViewerProps extends Omit<PdfViewerProps, 'renderPageOverlay'> {
13
+ file: Blob;
14
+ documentId: string;
15
+ /** The version on screen when it is an older one. */
16
+ version?: number;
17
+ fileName: string;
18
+ /** The version has markup, which may hold redactions. */
19
+ hasMarkup: boolean;
20
+ viewer: ComponentType<PdfViewerProps>;
21
+ }
22
+ export declare function ClippingPdfViewer({ documentId, version, fileName, hasMarkup, viewer: Viewer, ...viewerProps }: ClippingPdfViewerProps): import("react").JSX.Element;
@@ -0,0 +1,75 @@
1
+ "use client";
2
+ import { jsx, jsxs } from "react/jsx-runtime";
3
+ import { useCallback, useEffect, useState } from "react";
4
+ import { createMarkupStore, useDocumentTools } from "@arbidocs/react/document-tools";
5
+ import { ClipCaptureOverlay } from "../../presentation/ClipCaptureOverlay.js";
6
+ import { usePresentation } from "../../presentation/store.js";
7
+ const NO_MASKS = { status: "ready", masks: /* @__PURE__ */ new Map() };
8
+ function useRedactionMasks(documentId, version, hasMarkup) {
9
+ const { client } = useDocumentTools();
10
+ const [state, setState] = useState(hasMarkup ? { status: "loading" } : NO_MASKS);
11
+ useEffect(() => {
12
+ if (!hasMarkup) {
13
+ setState(NO_MASKS);
14
+ return;
15
+ }
16
+ let cancelled = false;
17
+ setState({ status: "loading" });
18
+ createMarkupStore({ version, client }).load(documentId).then((layer) => {
19
+ if (cancelled) return;
20
+ const masks = /* @__PURE__ */ new Map();
21
+ for (const mark of layer.annotations) {
22
+ if (mark.kind !== "redaction" || mark.status === "rejected") continue;
23
+ masks.set(mark.page, [...masks.get(mark.page) ?? [], ...mark.rects]);
24
+ }
25
+ setState({ status: "ready", masks });
26
+ }).catch(() => !cancelled && setState({ status: "error" }));
27
+ return () => {
28
+ cancelled = true;
29
+ };
30
+ }, [client, documentId, version, hasMarkup]);
31
+ return state;
32
+ }
33
+ function Notice({ children }) {
34
+ return /* @__PURE__ */ jsx("div", { className: "border-b border-border bg-muted px-3 py-1.5 text-xs text-muted-foreground", children });
35
+ }
36
+ function ClippingPdfViewer({
37
+ documentId,
38
+ version,
39
+ fileName,
40
+ hasMarkup,
41
+ viewer: Viewer,
42
+ ...viewerProps
43
+ }) {
44
+ const masks = useRedactionMasks(documentId, version, hasMarkup);
45
+ const file = viewerProps.file;
46
+ const capture = useCallback(
47
+ ({ page, rect, aspect }) => {
48
+ if (masks.status !== "ready") return;
49
+ usePresentation.getState().addClip({
50
+ kind: "pdf",
51
+ documentId,
52
+ version,
53
+ fileName,
54
+ page,
55
+ rect,
56
+ aspect,
57
+ masks: masks.masks.get(page) ?? [],
58
+ source: file
59
+ });
60
+ },
61
+ [masks, documentId, version, fileName, file]
62
+ );
63
+ const renderPageOverlay = useCallback(
64
+ ({ pageNumber }) => masks.status === "ready" ? /* @__PURE__ */ jsx(ClipCaptureOverlay, { page: pageNumber, onCapture: capture }) : null,
65
+ [masks.status, capture]
66
+ );
67
+ return /* @__PURE__ */ jsxs("div", { className: "flex h-full min-h-0 flex-col", "data-testid": "clipping-pdf-viewer", children: [
68
+ /* @__PURE__ */ jsx(Notice, { children: masks.status === "loading" ? "Reading the redactions before clipping\u2026" : masks.status === "error" ? "Couldn't read this document's redactions, so it can't be clipped." : "Drag over the part of a page to show it in the presentation." }),
69
+ /* @__PURE__ */ jsx("div", { className: "min-h-0 flex-1", children: /* @__PURE__ */ jsx(Viewer, { ...viewerProps, renderPageOverlay }) })
70
+ ] });
71
+ }
72
+ export {
73
+ ClippingPdfViewer
74
+ };
75
+ //# sourceMappingURL=ClippingPdfViewer.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/connection/presentation/ClippingPdfViewer.tsx"],
4
+ "sourcesContent": ["/**\n * The PDF while clipping for a presentation: drag over a page and the area becomes a clip in the\n * presentation (and goes on the current slide while that has fewer than two).\n *\n * Redactions are honoured: when the version has markup, its redaction marks (all but rejected\n * ones) are read first and every clip carries those over its area as black masks, so a redacted\n * passage never reaches a shared screen. Clipping waits for them, and stays off if they cannot be\n * read.\n */\n\nimport { useCallback, useEffect, useState, type ComponentType, type ReactNode } from 'react'\nimport { createMarkupStore, useDocumentTools } from '@arbidocs/react/document-tools'\nimport type { PdfViewerProps } from '@arbidocs/react/viewers'\nimport { ClipCaptureOverlay } from '../../presentation/ClipCaptureOverlay'\nimport type { Rect } from '../../presentation/model'\nimport { usePresentation } from '../../presentation/store'\n\ntype MaskState =\n | { status: 'loading' }\n | { status: 'error' }\n | { status: 'ready'; masks: ReadonlyMap<number, Rect[]> }\n\nconst NO_MASKS: MaskState = { status: 'ready', masks: new Map() }\n\n/** The version's redaction rectangles by page; none to read when it has no markup. */\nfunction useRedactionMasks(documentId: string, version: number | undefined, hasMarkup: boolean) {\n const { client } = useDocumentTools()\n const [state, setState] = useState<MaskState>(hasMarkup ? { status: 'loading' } : NO_MASKS)\n useEffect(() => {\n if (!hasMarkup) {\n setState(NO_MASKS)\n return\n }\n let cancelled = false\n setState({ status: 'loading' })\n createMarkupStore({ version, client })\n .load(documentId)\n .then((layer) => {\n if (cancelled) return\n const masks = new Map<number, Rect[]>()\n for (const mark of layer.annotations) {\n if (mark.kind !== 'redaction' || mark.status === 'rejected') continue\n masks.set(mark.page, [...(masks.get(mark.page) ?? []), ...mark.rects])\n }\n setState({ status: 'ready', masks })\n })\n .catch(() => !cancelled && setState({ status: 'error' }))\n return () => {\n cancelled = true\n }\n }, [client, documentId, version, hasMarkup])\n return state\n}\n\nexport interface ClippingPdfViewerProps extends Omit<PdfViewerProps, 'renderPageOverlay'> {\n file: Blob\n documentId: string\n /** The version on screen when it is an older one. */\n version?: number\n fileName: string\n /** The version has markup, which may hold redactions. */\n hasMarkup: boolean\n viewer: ComponentType<PdfViewerProps>\n}\n\nfunction Notice({ children }: { children: ReactNode }) {\n return (\n <div className=\"border-b border-border bg-muted px-3 py-1.5 text-xs text-muted-foreground\">\n {children}\n </div>\n )\n}\n\nexport function ClippingPdfViewer({\n documentId,\n version,\n fileName,\n hasMarkup,\n viewer: Viewer,\n ...viewerProps\n}: ClippingPdfViewerProps) {\n const masks = useRedactionMasks(documentId, version, hasMarkup)\n const file = viewerProps.file\n\n const capture = useCallback(\n ({ page, rect, aspect }: { page: number; rect: Rect; aspect: number }) => {\n if (masks.status !== 'ready') return\n usePresentation.getState().addClip({\n kind: 'pdf',\n documentId,\n version,\n fileName,\n page,\n rect,\n aspect,\n masks: masks.masks.get(page) ?? [],\n source: file,\n })\n // It joins the presentation's tray (the viewer's Presentation pill counts it).\n },\n [masks, documentId, version, fileName, file]\n )\n\n const renderPageOverlay = useCallback(\n ({ pageNumber }: { pageNumber: number }) =>\n masks.status === 'ready' ? (\n <ClipCaptureOverlay page={pageNumber} onCapture={capture} />\n ) : null,\n [masks.status, capture]\n )\n\n return (\n <div className=\"flex h-full min-h-0 flex-col\" data-testid=\"clipping-pdf-viewer\">\n <Notice>\n {masks.status === 'loading'\n ? 'Reading the redactions before clipping\u2026'\n : masks.status === 'error'\n ? \"Couldn't read this document's redactions, so it can't be clipped.\"\n : 'Drag over the part of a page to show it in the presentation.'}\n </Notice>\n <div className=\"min-h-0 flex-1\">\n <Viewer {...viewerProps} renderPageOverlay={renderPageOverlay} />\n </div>\n </div>\n )\n}\n"],
5
+ "mappings": ";AAmEI,cA6CA,YA7CA;AAzDJ,SAAS,aAAa,WAAW,gBAAoD;AACrF,SAAS,mBAAmB,wBAAwB;AAEpD,SAAS,0BAA0B;AAEnC,SAAS,uBAAuB;AAOhC,MAAM,WAAsB,EAAE,QAAQ,SAAS,OAAO,oBAAI,IAAI,EAAE;AAGhE,SAAS,kBAAkB,YAAoB,SAA6B,WAAoB;AAC9F,QAAM,EAAE,OAAO,IAAI,iBAAiB;AACpC,QAAM,CAAC,OAAO,QAAQ,IAAI,SAAoB,YAAY,EAAE,QAAQ,UAAU,IAAI,QAAQ;AAC1F,YAAU,MAAM;AACd,QAAI,CAAC,WAAW;AACd,eAAS,QAAQ;AACjB;AAAA,IACF;AACA,QAAI,YAAY;AAChB,aAAS,EAAE,QAAQ,UAAU,CAAC;AAC9B,sBAAkB,EAAE,SAAS,OAAO,CAAC,EAClC,KAAK,UAAU,EACf,KAAK,CAAC,UAAU;AACf,UAAI,UAAW;AACf,YAAM,QAAQ,oBAAI,IAAoB;AACtC,iBAAW,QAAQ,MAAM,aAA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,SACE,qBAAC,SAAI,WAAU,gCAA+B,eAAY,uBACxD;AAAA,wBAAC,UACE,gBAAM,WAAW,YACd,iDACA,MAAM,WAAW,UACf,sEACA,gEACR;AAAA,IACA,oBAAC,SAAI,WAAU,kBACb,8BAAC,UAAQ,GAAG,aAAa,mBAAsC,GACjE;AAAA,KACF;AAEJ;",
6
+ "names": []
7
+ }
@@ -0,0 +1,12 @@
1
+ /**
2
+ * The presentation's own window, mounted once by the app shell (the session's `PRESENTATION_PANEL`,
3
+ * a pop-out). It presents: the slides alone, what is shared in a call or put full screen; or, when
4
+ * the editor is popped out of the viewer's slides tab, it edits there, beside the documents its
5
+ * clips come from. A window opened only to present closes when presenting ends.
6
+ *
7
+ * It also keeps what the presentation needs wherever it is edited: the theme's logo image, read
8
+ * when the logo changes; and a clean slate when the session signs out or another user signs in
9
+ * (the presentation holds decrypted files in memory).
10
+ */
11
+ /** The presentation's window, with the document tools it needs (sources, redactions). */
12
+ export declare function ConnectedPresentation(): import("react").JSX.Element;
@@ -0,0 +1,100 @@
1
+ "use client";
2
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
3
+ import { useCallback, useEffect, useRef } from "react";
4
+ import { PanelLeftClose } from "lucide-react";
5
+ import {
6
+ isPanelOpen,
7
+ useArbiSession,
8
+ useArbiSessionState,
9
+ useArbiSessionStore
10
+ } from "@arbidocs/react";
11
+ import { Button } from "@arbidocs/react/ui";
12
+ import { ConnectedPanelHost } from "../panels/ConnectedPanelHost.js";
13
+ import { ConnectedDocumentToolsProvider } from "../viewer/ConnectedDocumentToolsProvider.js";
14
+ import { PRESENTATION_PANEL, presentationWindowOnlyPresents } from "../../presentation/panel-id.js";
15
+ import { PresenterView } from "../../presentation/PresenterView.js";
16
+ import { usePresentation } from "../../presentation/store.js";
17
+ import { usePresentationController } from "./usePresentationController.js";
18
+ import { usePresentationFiles } from "./usePresentationFiles.js";
19
+ function ConnectedPresentation() {
20
+ return /* @__PURE__ */ jsx(ConnectedDocumentToolsProvider, { children: /* @__PURE__ */ jsx(PresentationWindow, {}) });
21
+ }
22
+ function PresentationWindow() {
23
+ const session = useArbiSessionStore();
24
+ const notify = usePresentation((s) => s.notify);
25
+ const presenting = usePresentation((s) => s.presenting);
26
+ const isOpen = useArbiSessionState((state) => isPanelOpen(state, PRESENTATION_PANEL));
27
+ const { user } = useArbiSession();
28
+ const userId = user?.external_id ?? null;
29
+ const shownFor = useRef(userId);
30
+ const { downloadFile } = usePresentationFiles();
31
+ const logoId = usePresentation((s) => s.theme.logo?.documentId ?? null);
32
+ const controller = usePresentationController(isOpen && !presenting);
33
+ useEffect(() => {
34
+ if (shownFor.current === userId) return;
35
+ shownFor.current = userId;
36
+ usePresentation.getState().reset();
37
+ session.closePanel(PRESENTATION_PANEL);
38
+ }, [userId, session]);
39
+ useEffect(() => {
40
+ if (!logoId) return;
41
+ let current = true;
42
+ downloadFile(logoId).then((image) => current && usePresentation.getState().setLogoImage(image)).catch(() => current && notify("The logo could not be read", "error"));
43
+ return () => {
44
+ current = false;
45
+ };
46
+ }, [logoId, downloadFile, notify]);
47
+ useEffect(() => {
48
+ if (!isOpen) usePresentation.getState().setPresenting(false);
49
+ }, [isOpen]);
50
+ const wasPresenting = useRef(presenting);
51
+ useEffect(() => {
52
+ if (wasPresenting.current && !presenting && isOpen && presentationWindowOnlyPresents()) {
53
+ session.closePanel(PRESENTATION_PANEL);
54
+ }
55
+ wasPresenting.current = presenting;
56
+ }, [presenting, isOpen, session]);
57
+ const onClose = useCallback(() => session.closePanel(PRESENTATION_PANEL), [session]);
58
+ return /* @__PURE__ */ jsx(
59
+ ConnectedPanelHost,
60
+ {
61
+ panelId: PRESENTATION_PANEL,
62
+ isOpen,
63
+ onClose,
64
+ title: "Presentation",
65
+ defaultMode: "popout",
66
+ defaultWidth: 960,
67
+ closeTestId: "presentation-panel-close",
68
+ children: () => /* @__PURE__ */ jsxs(Fragment, { children: [
69
+ !presenting && controller.dialogs,
70
+ /* @__PURE__ */ jsx(
71
+ PresenterView,
72
+ {
73
+ ...controller.editor,
74
+ actions: /* @__PURE__ */ jsxs(Fragment, { children: [
75
+ controller.editor.actions,
76
+ /* @__PURE__ */ jsx(
77
+ Button,
78
+ {
79
+ type: "button",
80
+ size: "icon",
81
+ variant: "ghost",
82
+ className: "size-8 text-muted-foreground hover:text-foreground pointer-coarse:size-11",
83
+ title: "Back into the app's viewer",
84
+ "aria-label": "Back to the viewer",
85
+ onClick: onClose,
86
+ "data-testid": "presentation-pop-in",
87
+ children: /* @__PURE__ */ jsx(PanelLeftClose, { className: "size-4" })
88
+ }
89
+ )
90
+ ] })
91
+ }
92
+ )
93
+ ] })
94
+ }
95
+ );
96
+ }
97
+ export {
98
+ ConnectedPresentation
99
+ };
100
+ //# sourceMappingURL=ConnectedPresentation.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/connection/presentation/ConnectedPresentation.tsx"],
4
+ "sourcesContent": ["/**\n * The presentation's own window, mounted once by the app shell (the session's `PRESENTATION_PANEL`,\n * a pop-out). It presents: the slides alone, what is shared in a call or put full screen; or, when\n * the editor is popped out of the viewer's slides tab, it edits there, beside the documents its\n * clips come from. A window opened only to present closes when presenting ends.\n *\n * It also keeps what the presentation needs wherever it is edited: the theme's logo image, read\n * when the logo changes; and a clean slate when the session signs out or another user signs in\n * (the presentation holds decrypted files in memory).\n */\n\nimport { useCallback, useEffect, useRef } from 'react'\nimport { PanelLeftClose } from 'lucide-react'\nimport {\n isPanelOpen,\n useArbiSession,\n useArbiSessionState,\n useArbiSessionStore,\n} from '@arbidocs/react'\nimport { Button } from '@arbidocs/react/ui'\nimport { ConnectedPanelHost } from '../panels/ConnectedPanelHost'\nimport { ConnectedDocumentToolsProvider } from '../viewer/ConnectedDocumentToolsProvider'\nimport { PRESENTATION_PANEL, presentationWindowOnlyPresents } from '../../presentation/panel-id'\nimport { PresenterView } from '../../presentation/PresenterView'\nimport { usePresentation } from '../../presentation/store'\nimport { usePresentationController } from './usePresentationController'\nimport { usePresentationFiles } from './usePresentationFiles'\n\n/** The presentation's window, with the document tools it needs (sources, redactions). */\nexport function ConnectedPresentation() {\n return (\n <ConnectedDocumentToolsProvider>\n <PresentationWindow />\n </ConnectedDocumentToolsProvider>\n )\n}\n\nfunction PresentationWindow() {\n const session = useArbiSessionStore()\n const notify = usePresentation((s) => s.notify)\n const presenting = usePresentation((s) => s.presenting)\n const isOpen = useArbiSessionState((state) => isPanelOpen(state, PRESENTATION_PANEL))\n const { user } = useArbiSession()\n const userId = user?.external_id ?? null\n const shownFor = useRef(userId)\n const { downloadFile } = usePresentationFiles()\n const logoId = usePresentation((s) => s.theme.logo?.documentId ?? null)\n const controller = usePresentationController(isOpen && !presenting)\n\n useEffect(() => {\n if (shownFor.current === userId) return\n shownFor.current = userId\n usePresentation.getState().reset()\n session.closePanel(PRESENTATION_PANEL)\n }, [userId, session])\n\n // The theme's logo image, fetched whenever the logo changes (the theme keeps a reference only).\n useEffect(() => {\n if (!logoId) return\n let current = true\n downloadFile(logoId)\n .then((image) => current && usePresentation.getState().setLogoImage(image))\n .catch(() => current && notify('The logo could not be read', 'error'))\n return () => {\n current = false\n }\n }, [logoId, downloadFile, notify])\n\n // A closed window is not presenting.\n useEffect(() => {\n if (!isOpen) usePresentation.getState().setPresenting(false)\n }, [isOpen])\n\n // Opened only to present: closed when presenting ends (Escape).\n const wasPresenting = useRef(presenting)\n useEffect(() => {\n if (wasPresenting.current && !presenting && isOpen && presentationWindowOnlyPresents()) {\n session.closePanel(PRESENTATION_PANEL)\n }\n wasPresenting.current = presenting\n }, [presenting, isOpen, session])\n\n const onClose = useCallback(() => session.closePanel(PRESENTATION_PANEL), [session])\n\n return (\n <ConnectedPanelHost\n panelId={PRESENTATION_PANEL}\n isOpen={isOpen}\n onClose={onClose}\n title=\"Presentation\"\n defaultMode=\"popout\"\n defaultWidth={960}\n closeTestId=\"presentation-panel-close\"\n >\n {/* Inside the panel, so its dialogs open in its window. */}\n {() => (\n <>\n {!presenting && controller.dialogs}\n <PresenterView\n {...controller.editor}\n actions={\n <>\n {controller.editor.actions}\n <Button\n type=\"button\"\n size=\"icon\"\n variant=\"ghost\"\n className=\"size-8 text-muted-foreground hover:text-foreground pointer-coarse:size-11\"\n title=\"Back into the app's viewer\"\n aria-label=\"Back to the viewer\"\n onClick={onClose}\n data-testid=\"presentation-pop-in\"\n >\n <PanelLeftClose className=\"size-4\" />\n </Button>\n </>\n }\n />\n </>\n )}\n </ConnectedPanelHost>\n )\n}\n"],
5
+ "mappings": ";AAgCM,SAqEQ,UArER,KAqEQ,YArER;AArBN,SAAS,aAAa,WAAW,cAAc;AAC/C,SAAS,sBAAsB;AAC/B;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,cAAc;AACvB,SAAS,0BAA0B;AACnC,SAAS,sCAAsC;AAC/C,SAAS,oBAAoB,sCAAsC;AACnE,SAAS,qBAAqB;AAC9B,SAAS,uBAAuB;AAChC,SAAS,iCAAiC;AAC1C,SAAS,4BAA4B;AAG9B,SAAS,wBAAwB;AACtC,SACE,oBAAC,kCACC,8BAAC,sBAAmB,GACtB;AAEJ;AAEA,SAAS,qBAAqB;AAC5B,QAAM,UAAU,oBAAoB;AACpC,QAAM,SAAS,gBAAgB,CAAC,MAAM,EAAE,MAAM;AAC9C,QAAM,aAAa,gBAAgB,CAAC,MAAM,EAAE,UAAU;AACtD,QAAM,SAAS,oBAAoB,CAAC,UAAU,YAAY,OAAO,kBAAkB,CAAC;AACpF,QAAM,EAAE,KAAK,IAAI,eAAe;AAChC,QAAM,SAAS,MAAM,eAAe;AACpC,QAAM,WAAW,OAAO,MAAM;AAC9B,QAAM,EAAE,aAAa,IAAI,qBAAqB;AAC9C,QAAM,SAAS,gBAAgB,CAAC,MAAM,EAAE,MAAM,MAAM,cAAc,IAAI;AACtE,QAAM,aAAa,0BAA0B,UAAU,CAAC,UAAU;AAElE,YAAU,MAAM;AACd,QAAI,SAAS,YAAY,OAAQ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AAW;AAAA,kBACX,SAAS;AAAA,kBACT,eAAY;AAAA,kBAEZ,8BAAC,kBAAe,WAAU,UAAS;AAAA;AAAA,cACrC;AAAA,eACF;AAAA;AAAA,QAEJ;AAAA,SACF;AAAA;AAAA,EAEJ;AAEJ;",
6
+ "names": []
7
+ }
@@ -0,0 +1,20 @@
1
+ /**
2
+ * A presentation's slides tab in the document viewer: the slides editor, on the presentation the
3
+ * viewer shows. Opening a saved presentation loads it (unless it is the one being edited); a new
4
+ * one (a presentation draft) takes the clips gathered so far. Clips gathered with no presentation
5
+ * open join the one opened next. Saving a draft makes it a document, and the tab moves to it.
6
+ *
7
+ * The editor can also move to the presentation's own window (Pop out), beside the documents its
8
+ * clips come from; the tab then says so. Present opens that window with the slides alone.
9
+ */
10
+ export interface ConnectedSlidesTabProps {
11
+ /** The viewed document's id, or a presentation draft's (`draft-…`). */
12
+ documentId: string;
13
+ /** The version on screen, when an older one. */
14
+ version?: number;
15
+ /** The document's current version: a newer one than the one being edited is opened. */
16
+ currentVersion?: number;
17
+ /** A new presentation, not saved yet: its draft title. */
18
+ draftTitle?: string;
19
+ }
20
+ export declare function ConnectedSlidesTab({ documentId, version, currentVersion, draftTitle, }: ConnectedSlidesTabProps): import("react").JSX.Element;
@@ -0,0 +1,220 @@
1
+ "use client";
2
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
3
+ import { useCallback, useEffect, useRef, useState } from "react";
4
+ import { ExternalLink, Loader2, PanelLeftClose, Presentation } from "lucide-react";
5
+ import {
6
+ isPanelOpen,
7
+ registerDocumentTurnFlush,
8
+ useArbiSessionState,
9
+ useArbiSessionStore
10
+ } from "@arbidocs/react";
11
+ import { Button } from "@arbidocs/react/ui";
12
+ import { useBlocksEnvironment } from "../../provider/environment.js";
13
+ import {
14
+ PRESENTATION_PANEL,
15
+ openPresentation,
16
+ presentationWindowOnlyPresents
17
+ } from "../../presentation/panel-id.js";
18
+ import { SlidesEditor } from "../../presentation/SlidesEditor.js";
19
+ import { hasUnsavedChanges, usePresentation } from "../../presentation/store.js";
20
+ import { EmptyState } from "../../components/EmptyState.js";
21
+ import { editPresentation } from "./requests.js";
22
+ import { usePresentationController } from "./usePresentationController.js";
23
+ import { usePresentationFiles } from "./usePresentationFiles.js";
24
+ const listOf = (numbers) => numbers.length < 2 ? String(numbers[0] ?? "") : `${numbers.slice(0, -1).join(", ")} and ${numbers[numbers.length - 1]}`;
25
+ const STALE = "This presentation was changed outside the editor: Save to draw its slides again.";
26
+ const hasContent = () => hasUnsavedChanges(usePresentation.getState());
27
+ function ConnectedSlidesTab({
28
+ documentId,
29
+ version,
30
+ currentVersion,
31
+ draftTitle
32
+ }) {
33
+ const session = useArbiSessionStore();
34
+ const { confirm } = useBlocksEnvironment();
35
+ const { open, save } = usePresentationFiles();
36
+ const notify = usePresentation((s) => s.notify);
37
+ const boundTo = usePresentation((s) => s.boundTo);
38
+ const savedId = usePresentation((s) => s.savedId);
39
+ const [loading, setLoading] = useState(false);
40
+ const isDraft = draftTitle !== void 0;
41
+ const target = version ? `${documentId}@v${version}` : documentId;
42
+ const poppedOut = useArbiSessionState(
43
+ (state) => isPanelOpen(state, PRESENTATION_PANEL) && !presentationWindowOnlyPresents()
44
+ );
45
+ const controller = usePresentationController(!poppedOut);
46
+ const asked = useRef(null);
47
+ const [declined, setDeclined] = useState(false);
48
+ const [force, setForce] = useState(0);
49
+ useEffect(() => {
50
+ const state = usePresentation.getState();
51
+ if (state.boundTo === target || asked.current === `${target}#${force}`) return;
52
+ asked.current = `${target}#${force}`;
53
+ setDeclined(false);
54
+ void (async () => {
55
+ const gathered = state.boundTo === null ? state.clips : [];
56
+ if (state.boundTo !== null && hasContent() && !force) {
57
+ const ok = await confirm({
58
+ title: "Open presentation",
59
+ message: "Replace the presentation being edited? Save it first to keep its changes.",
60
+ kind: "confirm"
61
+ });
62
+ if (!ok) return setDeclined(true);
63
+ }
64
+ if (isDraft) {
65
+ if (state.boundTo !== null) state.reset();
66
+ usePresentation.getState().bind(target);
67
+ usePresentation.getState().setTitle(draftTitle || "Untitled presentation");
68
+ return;
69
+ }
70
+ setLoading(true);
71
+ try {
72
+ const { missing, stale, imported, changedOutside } = await open(documentId, version);
73
+ usePresentation.getState().bind(target);
74
+ if (gathered.length) usePresentation.getState().adoptClips(gathered);
75
+ if (stale) notify(STALE, "error");
76
+ if (imported) {
77
+ notify(
78
+ ["Opened from PowerPoint, ready to edit.", ...imported.notes].join(" \xB7 "),
79
+ "success"
80
+ );
81
+ }
82
+ if (changedOutside) {
83
+ notify(
84
+ `${changedOutside.length === 1 ? `Slide ${changedOutside[0]} was` : `Slides ${listOf(changedOutside)} were`} changed in PowerPoint: brought in as changed there.`,
85
+ "success"
86
+ );
87
+ }
88
+ if (missing) {
89
+ notify(
90
+ `${missing} clip${missing === 1 ? "" : "s"} could not be opened (moved, deleted or not shared with you)`,
91
+ "error"
92
+ );
93
+ }
94
+ } catch (error) {
95
+ notify(
96
+ error instanceof Error ? error.message : "The presentation could not be opened",
97
+ "error"
98
+ );
99
+ } finally {
100
+ setLoading(false);
101
+ }
102
+ })();
103
+ }, [target, documentId, version, isDraft, force, open, confirm, notify]);
104
+ useEffect(() => {
105
+ if (isDraft && boundTo === target && draftTitle) usePresentation.getState().setTitle(draftTitle);
106
+ }, [isDraft, boundTo, target, draftTitle]);
107
+ const wasBound = useRef(false);
108
+ useEffect(() => {
109
+ if (boundTo === target) wasBound.current = true;
110
+ if (!wasBound.current || !savedId || boundTo !== savedId || savedId === target) return;
111
+ if (isDraft) session.clearDraftDocument(documentId);
112
+ editPresentation(session, { kind: "open", documentId: savedId });
113
+ }, [isDraft, savedId, boundTo, target, documentId, session]);
114
+ const heldVersion = usePresentation((s) => s.boundTo === target ? s.version : null);
115
+ const toldNewer = useRef(null);
116
+ useEffect(() => {
117
+ if (isDraft || version || !currentVersion || heldVersion === null) return;
118
+ if (currentVersion <= heldVersion || loading) return;
119
+ if (hasContent()) {
120
+ if (toldNewer.current === currentVersion) return;
121
+ toldNewer.current = currentVersion;
122
+ notify(
123
+ `A newer version (${currentVersion}) was saved while you edited. Save as\u2026 keeps yours; reopen the presentation to see it.`,
124
+ "error"
125
+ );
126
+ return;
127
+ }
128
+ setLoading(true);
129
+ void open(documentId).then(() => {
130
+ usePresentation.getState().bind(target);
131
+ notify(`Updated to version ${currentVersion}.`, "success");
132
+ }).catch(
133
+ (error) => notify(
134
+ error instanceof Error ? error.message : "The new version could not be opened",
135
+ "error"
136
+ )
137
+ ).finally(() => setLoading(false));
138
+ }, [currentVersion, heldVersion, isDraft, version, loading, open, documentId, target, notify]);
139
+ useEffect(() => {
140
+ if (isDraft || version || savedId !== documentId || boundTo !== target) return;
141
+ return registerDocumentTurnFlush(documentId, async () => {
142
+ const state = usePresentation.getState();
143
+ if (state.savedId === documentId && hasUnsavedChanges(state)) await save(state.title);
144
+ });
145
+ }, [isDraft, version, savedId, boundTo, documentId, target, save]);
146
+ const present = useCallback(() => {
147
+ openPresentation(session, { present: true });
148
+ usePresentation.getState().setPresenting(true);
149
+ }, [session]);
150
+ if (poppedOut) {
151
+ return /* @__PURE__ */ jsx("div", { className: "flex h-full items-center justify-center p-6", "data-testid": "slides-popped-out", children: /* @__PURE__ */ jsx(
152
+ EmptyState,
153
+ {
154
+ icon: ExternalLink,
155
+ title: "Editing in its own window",
156
+ description: "The presentation is open in its own window, beside the documents you clip from.",
157
+ action: /* @__PURE__ */ jsxs(
158
+ Button,
159
+ {
160
+ type: "button",
161
+ variant: "outline",
162
+ onClick: () => session.closePanel(PRESENTATION_PANEL),
163
+ children: [
164
+ /* @__PURE__ */ jsx(PanelLeftClose, { className: "size-4" }),
165
+ "Bring it back here"
166
+ ]
167
+ }
168
+ )
169
+ }
170
+ ) });
171
+ }
172
+ if (declined && boundTo !== target) {
173
+ return /* @__PURE__ */ jsx("div", { className: "flex h-full items-center justify-center p-6", "data-testid": "slides-declined", children: /* @__PURE__ */ jsx(
174
+ EmptyState,
175
+ {
176
+ icon: Presentation,
177
+ title: "Another presentation is being edited",
178
+ description: "It has changes. Save it first, or open this one in its place.",
179
+ action: /* @__PURE__ */ jsx(Button, { type: "button", variant: "outline", onClick: () => setForce((n) => n + 1), children: "Open this one instead" })
180
+ }
181
+ ) });
182
+ }
183
+ if (loading || boundTo !== target) {
184
+ return /* @__PURE__ */ jsxs("div", { className: "flex h-full items-center justify-center gap-2 text-sm text-muted-foreground", children: [
185
+ /* @__PURE__ */ jsx(Loader2, { className: "size-4 animate-spin" }),
186
+ "Opening the presentation\u2026"
187
+ ] });
188
+ }
189
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
190
+ controller.dialogs,
191
+ /* @__PURE__ */ jsx(
192
+ SlidesEditor,
193
+ {
194
+ ...controller.editor,
195
+ actions: /* @__PURE__ */ jsxs(Fragment, { children: [
196
+ controller.editor.actions,
197
+ /* @__PURE__ */ jsx(
198
+ Button,
199
+ {
200
+ type: "button",
201
+ size: "icon",
202
+ variant: "ghost",
203
+ className: "size-8 text-muted-foreground hover:text-foreground pointer-coarse:size-11",
204
+ title: "Edit in its own window, beside the documents you clip from",
205
+ "aria-label": "Pop out",
206
+ onClick: () => openPresentation(session),
207
+ "data-testid": "presentation-pop-out",
208
+ children: /* @__PURE__ */ jsx(ExternalLink, { className: "size-4" })
209
+ }
210
+ )
211
+ ] }),
212
+ onPresent: present
213
+ }
214
+ )
215
+ ] });
216
+ }
217
+ export {
218
+ ConnectedSlidesTab
219
+ };
220
+ //# sourceMappingURL=ConnectedSlidesTab.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/connection/presentation/ConnectedSlidesTab.tsx"],
4
+ "sourcesContent": ["/**\n * A presentation's slides tab in the document viewer: the slides editor, on the presentation the\n * viewer shows. Opening a saved presentation loads it (unless it is the one being edited); a new\n * one (a presentation draft) takes the clips gathered so far. Clips gathered with no presentation\n * open join the one opened next. Saving a draft makes it a document, and the tab moves to it.\n *\n * The editor can also move to the presentation's own window (Pop out), beside the documents its\n * clips come from; the tab then says so. Present opens that window with the slides alone.\n */\n\nimport { useCallback, useEffect, useRef, useState } from 'react'\nimport { ExternalLink, Loader2, PanelLeftClose, Presentation } from 'lucide-react'\nimport {\n isPanelOpen,\n registerDocumentTurnFlush,\n useArbiSessionState,\n useArbiSessionStore,\n} from '@arbidocs/react'\nimport { Button } from '@arbidocs/react/ui'\nimport { useBlocksEnvironment } from '../../provider/environment'\nimport {\n PRESENTATION_PANEL,\n openPresentation,\n presentationWindowOnlyPresents,\n} from '../../presentation/panel-id'\nimport { SlidesEditor } from '../../presentation/SlidesEditor'\nimport { hasUnsavedChanges, usePresentation } from '../../presentation/store'\nimport { EmptyState } from '../../components/EmptyState'\nimport { editPresentation } from './requests'\nimport { usePresentationController } from './usePresentationController'\nimport { usePresentationFiles } from './usePresentationFiles'\n\nexport interface ConnectedSlidesTabProps {\n /** The viewed document's id, or a presentation draft's (`draft-\u2026`). */\n documentId: string\n /** The version on screen, when an older one. */\n version?: number\n /** The document's current version: a newer one than the one being edited is opened. */\n currentVersion?: number\n /** A new presentation, not saved yet: its draft title. */\n draftTitle?: string\n}\n\n/** \"2, 3 and 5\". */\nconst listOf = (numbers: number[]) =>\n numbers.length < 2\n ? String(numbers[0] ?? '')\n : `${numbers.slice(0, -1).join(', ')} and ${numbers[numbers.length - 1]}`\n\nconst STALE = 'This presentation was changed outside the editor: Save to draw its slides again.'\n\n/** The presentation has anything in it worth asking about before it is replaced. */\nconst hasContent = () => hasUnsavedChanges(usePresentation.getState())\n\nexport function ConnectedSlidesTab({\n documentId,\n version,\n currentVersion,\n draftTitle,\n}: ConnectedSlidesTabProps) {\n const session = useArbiSessionStore()\n const { confirm } = useBlocksEnvironment()\n const { open, save } = usePresentationFiles()\n const notify = usePresentation((s) => s.notify)\n const boundTo = usePresentation((s) => s.boundTo)\n const savedId = usePresentation((s) => s.savedId)\n const [loading, setLoading] = useState(false)\n const isDraft = draftTitle !== undefined\n const target = version ? `${documentId}@v${version}` : documentId\n const poppedOut = useArbiSessionState(\n (state) => isPanelOpen(state, PRESENTATION_PANEL) && !presentationWindowOnlyPresents()\n )\n const controller = usePresentationController(!poppedOut)\n const asked = useRef<string | null>(null)\n // Another presentation, with changes, is being edited and the user kept it.\n const [declined, setDeclined] = useState(false)\n const [force, setForce] = useState(0)\n\n // Show the presentation this tab is for (once per presentation: a remount does not ask again).\n useEffect(() => {\n const state = usePresentation.getState()\n if (state.boundTo === target || asked.current === `${target}#${force}`) return\n asked.current = `${target}#${force}`\n setDeclined(false)\n void (async () => {\n // Clips gathered with no presentation open join this one.\n const gathered = state.boundTo === null ? state.clips : []\n if (state.boundTo !== null && hasContent() && !force) {\n const ok = await confirm({\n title: 'Open presentation',\n message: 'Replace the presentation being edited? Save it first to keep its changes.',\n kind: 'confirm',\n })\n if (!ok) return setDeclined(true)\n }\n if (isDraft) {\n if (state.boundTo !== null) state.reset()\n usePresentation.getState().bind(target)\n usePresentation.getState().setTitle(draftTitle || 'Untitled presentation')\n return\n }\n setLoading(true)\n try {\n const { missing, stale, imported, changedOutside } = await open(documentId, version)\n usePresentation.getState().bind(target)\n if (gathered.length) usePresentation.getState().adoptClips(gathered)\n if (stale) notify(STALE, 'error')\n if (imported) {\n notify(\n ['Opened from PowerPoint, ready to edit.', ...imported.notes].join(' \u00B7 '),\n 'success'\n )\n }\n if (changedOutside) {\n notify(\n `${changedOutside.length === 1 ? `Slide ${changedOutside[0]} was` : `Slides ${listOf(changedOutside)} were`} changed in PowerPoint: brought in as changed there.`,\n 'success'\n )\n }\n if (missing) {\n notify(\n `${missing} clip${missing === 1 ? '' : 's'} could not be opened (moved, deleted or not shared with you)`,\n 'error'\n )\n }\n } catch (error) {\n notify(\n error instanceof Error ? error.message : 'The presentation could not be opened',\n 'error'\n )\n } finally {\n setLoading(false)\n }\n })()\n // eslint-disable-next-line react-hooks/exhaustive-deps -- a draft's title changes as it is typed\n }, [target, documentId, version, isDraft, force, open, confirm, notify])\n\n // A draft's title is the presentation's.\n useEffect(() => {\n if (isDraft && boundTo === target && draftTitle) usePresentation.getState().setTitle(draftTitle)\n }, [isDraft, boundTo, target, draftTitle])\n\n // Saved as another document (a draft's first save, Save as, an older file saved as a\n // PowerPoint): the viewer follows it. Only once this tab's presentation was the one edited\n // (another, still bound as the tab opens, is not \"its\" save).\n const wasBound = useRef(false)\n useEffect(() => {\n if (boundTo === target) wasBound.current = true\n if (!wasBound.current || !savedId || boundTo !== savedId || savedId === target) return\n if (isDraft) session.clearDraftDocument(documentId)\n editPresentation(session, { kind: 'open', documentId: savedId })\n }, [isDraft, savedId, boundTo, target, documentId, session])\n\n // A newer version saved meanwhile (by ARBI, asked in the chat beside the deck, or by someone\n // else): shown at once, unless this one has changes of its own, which are never thrown away.\n const heldVersion = usePresentation((s) => (s.boundTo === target ? s.version : null))\n const toldNewer = useRef<number | null>(null)\n useEffect(() => {\n if (isDraft || version || !currentVersion || heldVersion === null) return\n if (currentVersion <= heldVersion || loading) return\n if (hasContent()) {\n if (toldNewer.current === currentVersion) return\n toldNewer.current = currentVersion\n notify(\n `A newer version (${currentVersion}) was saved while you edited. Save as\u2026 keeps yours; reopen the presentation to see it.`,\n 'error'\n )\n return\n }\n setLoading(true)\n void open(documentId)\n .then(() => {\n usePresentation.getState().bind(target)\n notify(`Updated to version ${currentVersion}.`, 'success')\n })\n .catch((error: unknown) =>\n notify(\n error instanceof Error ? error.message : 'The new version could not be opened',\n 'error'\n )\n )\n .finally(() => setLoading(false))\n }, [currentVersion, heldVersion, isDraft, version, loading, open, documentId, target, notify])\n\n // A chat turn about this presentation (the chat beside it) saves its unsaved changes first, so\n // ARBI works on the slides as they are on screen.\n useEffect(() => {\n if (isDraft || version || savedId !== documentId || boundTo !== target) return\n return registerDocumentTurnFlush(documentId, async () => {\n const state = usePresentation.getState()\n if (state.savedId === documentId && hasUnsavedChanges(state)) await save(state.title)\n })\n }, [isDraft, version, savedId, boundTo, documentId, target, save])\n\n const present = useCallback(() => {\n openPresentation(session, { present: true })\n usePresentation.getState().setPresenting(true)\n }, [session])\n\n if (poppedOut) {\n return (\n <div className=\"flex h-full items-center justify-center p-6\" data-testid=\"slides-popped-out\">\n <EmptyState\n icon={ExternalLink}\n title=\"Editing in its own window\"\n description=\"The presentation is open in its own window, beside the documents you clip from.\"\n action={\n <Button\n type=\"button\"\n variant=\"outline\"\n onClick={() => session.closePanel(PRESENTATION_PANEL)}\n >\n <PanelLeftClose className=\"size-4\" />\n Bring it back here\n </Button>\n }\n />\n </div>\n )\n }\n if (declined && boundTo !== target) {\n return (\n <div className=\"flex h-full items-center justify-center p-6\" data-testid=\"slides-declined\">\n <EmptyState\n icon={Presentation}\n title=\"Another presentation is being edited\"\n description=\"It has changes. Save it first, or open this one in its place.\"\n action={\n <Button type=\"button\" variant=\"outline\" onClick={() => setForce((n) => n + 1)}>\n Open this one instead\n </Button>\n }\n />\n </div>\n )\n }\n if (loading || boundTo !== target) {\n return (\n <div className=\"flex h-full items-center justify-center gap-2 text-sm text-muted-foreground\">\n <Loader2 className=\"size-4 animate-spin\" />\n Opening the presentation\u2026\n </div>\n )\n }\n return (\n <>\n {controller.dialogs}\n <SlidesEditor\n {...controller.editor}\n actions={\n <>\n {controller.editor.actions}\n <Button\n type=\"button\"\n size=\"icon\"\n variant=\"ghost\"\n className=\"size-8 text-muted-foreground hover:text-foreground pointer-coarse:size-11\"\n title=\"Edit in its own window, beside the documents you clip from\"\n aria-label=\"Pop out\"\n onClick={() => openPresentation(session)}\n data-testid=\"presentation-pop-out\"\n >\n <ExternalLink className=\"size-4\" />\n </Button>\n </>\n }\n onPresent={present}\n />\n </>\n )\n}\n"],
5
+ "mappings": ";AA+MY,SA2CF,UAtCI,KALF;AArMZ,SAAS,aAAa,WAAW,QAAQ,gBAAgB;AACzD,SAAS,cAAc,SAAS,gBAAgB,oBAAoB;AACpE;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,cAAc;AACvB,SAAS,4BAA4B;AACrC;AAAA,EACE;AAAA,EACA;AAAA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AAA,EAEJ;AACA,MAAI,WAAW,YAAY,QAAQ;AACjC,WACE,qBAAC,SAAI,WAAU,+EACb;AAAA,0BAAC,WAAQ,WAAU,uBAAsB;AAAA,MAAE;AAAA,OAE7C;AAAA,EAEJ;AACA,SACE,iCACG;AAAA,eAAW;AAAA,IACZ;AAAA,MAAC;AAAA;AAAA,QACE,GAAG,WAAW;AAAA,QACf,SACE,iCACG;AAAA,qBAAW,OAAO;AAAA,UACnB;AAAA,YAAC;AAAA;AAAA,cACC,MAAK;AAAA,cACL,MAAK;AAAA,cACL,SAAQ;AAAA,cACR,WAAU;AAAA,cACV,OAAM;AAAA,cACN,cAAW;AAAA,cACX,SAAS,MAAM,iBAAiB,OAAO;AAAA,cACvC,eAAY;AAAA,cAEZ,8BAAC,gBAAa,WAAU,UAAS;AAAA;AAAA,UACnC;AAAA,WACF;AAAA,QAEF,WAAW;AAAA;AAAA,IACb;AAAA,KACF;AAEJ;",
6
+ "names": []
7
+ }
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Crop an image clip: the app's image cropper over the whole source image, to choose the part the
3
+ * clip shows (and its shape). The image itself is untouched: only the clip's area changes, so it
4
+ * can be cropped again, wider or narrower, at any time.
5
+ */
6
+ import type { Clip } from '../../presentation/model';
7
+ export interface CropClipDialogProps {
8
+ clip: Clip | null;
9
+ onOpenChange: (open: boolean) => void;
10
+ }
11
+ export declare function CropClipDialog({ clip, onOpenChange }: CropClipDialogProps): import("react").JSX.Element;