@arbidocs/blocks 0.5.120 → 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 (413) 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-SGE4R3M4.cjs → ConnectedNativeDocxComparison-4Q5S7VLD.cjs} +17 -17
  10. package/dist/{ConnectedNativeDocxComparison-SGE4R3M4.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-6MCLJRIT.cjs → ConnectedStreamedWordArtifact-FFOQJBOI.cjs} +17 -17
  18. package/dist/{ConnectedStreamedWordArtifact-6MCLJRIT.cjs.map → ConnectedStreamedWordArtifact-FFOQJBOI.cjs.map} +1 -1
  19. package/dist/{DocumentReviewCard-BPIAJJED.cjs → DocumentReviewCard-SNWVEZ7S.cjs} +17 -16
  20. package/dist/DocumentReviewCard-SNWVEZ7S.cjs.map +1 -0
  21. package/dist/{FilesViewerDialog-67WK3TZC.cjs → FilesViewerDialog-IZI63FOV.cjs} +52 -45
  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/{ai-IM4A23YT.cjs → ai-KBYNRNZ6.cjs} +28 -26
  29. package/dist/ai-KBYNRNZ6.cjs.map +1 -0
  30. package/dist/calls/connected/CallControls.d.ts +2 -0
  31. package/dist/calls/connected/CallControls.js +71 -9
  32. package/dist/calls/connected/CallControls.js.map +2 -2
  33. package/dist/calls/connected/ShareDocumentDialog.d.ts +14 -0
  34. package/dist/calls/connected/ShareDocumentDialog.js +77 -0
  35. package/dist/calls/connected/ShareDocumentDialog.js.map +7 -0
  36. package/dist/calls/index.cjs +121 -121
  37. package/dist/chat/index.cjs +9 -8
  38. package/dist/{chunk-T23UTIRI.cjs → chunk-2PZT3J34.cjs} +6 -6
  39. package/dist/{chunk-T23UTIRI.cjs.map → chunk-2PZT3J34.cjs.map} +1 -1
  40. package/dist/{chunk-SGYSDABK.cjs → chunk-2W5E62EY.cjs} +6 -6
  41. package/dist/{chunk-SGYSDABK.cjs.map → chunk-2W5E62EY.cjs.map} +1 -1
  42. package/dist/{chunk-TDO5UWXF.cjs → chunk-3SCNXNHI.cjs} +5 -5
  43. package/dist/{chunk-TDO5UWXF.cjs.map → chunk-3SCNXNHI.cjs.map} +1 -1
  44. package/dist/{chunk-KTQOGT2L.cjs → chunk-474GPLCM.cjs} +7 -7
  45. package/dist/{chunk-KTQOGT2L.cjs.map → chunk-474GPLCM.cjs.map} +1 -1
  46. package/dist/{chunk-TP5PGWIO.cjs → chunk-4IOYQLKG.cjs} +3 -3
  47. package/dist/{chunk-TP5PGWIO.cjs.map → chunk-4IOYQLKG.cjs.map} +1 -1
  48. package/dist/{chunk-NY3YUCOW.cjs → chunk-4NPCDS2X.cjs} +3 -3
  49. package/dist/{chunk-NY3YUCOW.cjs.map → chunk-4NPCDS2X.cjs.map} +1 -1
  50. package/dist/{chunk-HA66DHW6.cjs → chunk-4RBQ44RY.cjs} +28 -28
  51. package/dist/chunk-4RBQ44RY.cjs.map +1 -0
  52. package/dist/{chunk-BQ5RIWWT.cjs → chunk-4VZZWYEC.cjs} +3 -3
  53. package/dist/{chunk-BQ5RIWWT.cjs.map → chunk-4VZZWYEC.cjs.map} +1 -1
  54. package/dist/{chunk-BP3IJ34D.cjs → chunk-52KGMAO5.cjs} +15 -15
  55. package/dist/{chunk-BP3IJ34D.cjs.map → chunk-52KGMAO5.cjs.map} +1 -1
  56. package/dist/{chunk-5IZFSAEZ.cjs → chunk-5534FYXP.cjs} +4 -4
  57. package/dist/{chunk-5IZFSAEZ.cjs.map → chunk-5534FYXP.cjs.map} +1 -1
  58. package/dist/chunk-5GCCUXMT.cjs +63 -0
  59. package/dist/chunk-5GCCUXMT.cjs.map +1 -0
  60. package/dist/chunk-5LTIZ44D.cjs +95 -0
  61. package/dist/chunk-5LTIZ44D.cjs.map +1 -0
  62. package/dist/{chunk-DFBDQKGE.cjs → chunk-734NPQNR.cjs} +4 -4
  63. package/dist/{chunk-DFBDQKGE.cjs.map → chunk-734NPQNR.cjs.map} +1 -1
  64. package/dist/{chunk-X36UR4A7.cjs → chunk-7VUJGHMY.cjs} +323 -96
  65. package/dist/chunk-7VUJGHMY.cjs.map +1 -0
  66. package/dist/chunk-AFQTQC7A.cjs +35 -0
  67. package/dist/chunk-AFQTQC7A.cjs.map +1 -0
  68. package/dist/{chunk-YYSBWMDJ.cjs → chunk-AY6EZSZB.cjs} +4 -4
  69. package/dist/{chunk-YYSBWMDJ.cjs.map → chunk-AY6EZSZB.cjs.map} +1 -1
  70. package/dist/{chunk-BUVIBHFU.cjs → chunk-BVAT4EVC.cjs} +38 -38
  71. package/dist/chunk-BVAT4EVC.cjs.map +1 -0
  72. package/dist/{chunk-ECLUFKYR.cjs → chunk-C2OICDMI.cjs} +10 -10
  73. package/dist/{chunk-ECLUFKYR.cjs.map → chunk-C2OICDMI.cjs.map} +1 -1
  74. package/dist/{chunk-CPR6EHG7.cjs → chunk-DR2AH7JL.cjs} +179 -55
  75. package/dist/chunk-DR2AH7JL.cjs.map +1 -0
  76. package/dist/{chunk-NJCK6V6U.cjs → chunk-EATIFPKP.cjs} +4 -60
  77. package/dist/chunk-EATIFPKP.cjs.map +1 -0
  78. package/dist/{chunk-B3LZITVF.cjs → chunk-EHP6OH5D.cjs} +11 -451
  79. package/dist/chunk-EHP6OH5D.cjs.map +1 -0
  80. package/dist/{chunk-775S43W7.cjs → chunk-ENGL7P3I.cjs} +31 -31
  81. package/dist/{chunk-775S43W7.cjs.map → chunk-ENGL7P3I.cjs.map} +1 -1
  82. package/dist/{chunk-VZCPMXWC.cjs → chunk-FKFQCK3C.cjs} +4 -4
  83. package/dist/{chunk-VZCPMXWC.cjs.map → chunk-FKFQCK3C.cjs.map} +1 -1
  84. package/dist/{chunk-6UTKM5AB.cjs → chunk-GKVE5JGB.cjs} +76 -76
  85. package/dist/chunk-GKVE5JGB.cjs.map +1 -0
  86. package/dist/{chunk-Q6CLWOP2.cjs → chunk-GPX5VC57.cjs} +50 -50
  87. package/dist/{chunk-Q6CLWOP2.cjs.map → chunk-GPX5VC57.cjs.map} +1 -1
  88. package/dist/{chunk-WAV762GP.cjs → chunk-GQXPNIRE.cjs} +6 -6
  89. package/dist/{chunk-WAV762GP.cjs.map → chunk-GQXPNIRE.cjs.map} +1 -1
  90. package/dist/chunk-GX2EBMJW.cjs +133 -0
  91. package/dist/chunk-GX2EBMJW.cjs.map +1 -0
  92. package/dist/{chunk-7OPOPYV6.cjs → chunk-H5OLHP2U.cjs} +3 -3
  93. package/dist/{chunk-7OPOPYV6.cjs.map → chunk-H5OLHP2U.cjs.map} +1 -1
  94. package/dist/chunk-HYUKPHCT.cjs +66 -0
  95. package/dist/chunk-HYUKPHCT.cjs.map +1 -0
  96. package/dist/{chunk-NLSWDP42.cjs → chunk-JQLWKNJO.cjs} +22 -12
  97. package/dist/chunk-JQLWKNJO.cjs.map +1 -0
  98. package/dist/{chunk-CKCG4NDB.cjs → chunk-JZEYHDWJ.cjs} +75 -75
  99. package/dist/{chunk-CKCG4NDB.cjs.map → chunk-JZEYHDWJ.cjs.map} +1 -1
  100. package/dist/{chunk-PGJYD67F.cjs → chunk-KNGZZC4O.cjs} +7 -6
  101. package/dist/chunk-KNGZZC4O.cjs.map +1 -0
  102. package/dist/{chunk-W6INT5GS.cjs → chunk-KP5AITQ4.cjs} +10 -10
  103. package/dist/{chunk-W6INT5GS.cjs.map → chunk-KP5AITQ4.cjs.map} +1 -1
  104. package/dist/{chunk-YYPZOEED.cjs → chunk-LHWOKOMP.cjs} +23 -2
  105. package/dist/chunk-LHWOKOMP.cjs.map +1 -0
  106. package/dist/{chunk-WXUU3COI.cjs → chunk-MZ2KZXNU.cjs} +3 -3
  107. package/dist/{chunk-WXUU3COI.cjs.map → chunk-MZ2KZXNU.cjs.map} +1 -1
  108. package/dist/chunk-NAJN32MF.cjs +154 -0
  109. package/dist/chunk-NAJN32MF.cjs.map +1 -0
  110. package/dist/{chunk-557MJ4IH.cjs → chunk-NLOETJCB.cjs} +17 -154
  111. package/dist/chunk-NLOETJCB.cjs.map +1 -0
  112. package/dist/{chunk-4XJEHKVZ.cjs → chunk-PIYYBPHH.cjs} +4 -4
  113. package/dist/{chunk-4XJEHKVZ.cjs.map → chunk-PIYYBPHH.cjs.map} +1 -1
  114. package/dist/chunk-Q3XJUXID.cjs +4774 -0
  115. package/dist/chunk-Q3XJUXID.cjs.map +1 -0
  116. package/dist/{chunk-325GVZE6.cjs → chunk-Q6DQGGP4.cjs} +3 -3
  117. package/dist/{chunk-325GVZE6.cjs.map → chunk-Q6DQGGP4.cjs.map} +1 -1
  118. package/dist/chunk-QFXILJMJ.cjs +458 -0
  119. package/dist/chunk-QFXILJMJ.cjs.map +1 -0
  120. package/dist/{chunk-QQWHG3KF.cjs → chunk-RYVZDFVO.cjs} +5 -5
  121. package/dist/{chunk-QQWHG3KF.cjs.map → chunk-RYVZDFVO.cjs.map} +1 -1
  122. package/dist/{chunk-EOG6OT5I.cjs → chunk-TXP2N3DC.cjs} +4 -4
  123. package/dist/{chunk-EOG6OT5I.cjs.map → chunk-TXP2N3DC.cjs.map} +1 -1
  124. package/dist/{chunk-KXIRVKCJ.cjs → chunk-UUENH4BJ.cjs} +3 -3
  125. package/dist/{chunk-KXIRVKCJ.cjs.map → chunk-UUENH4BJ.cjs.map} +1 -1
  126. package/dist/chunk-VJ5ZLRBD.cjs +27 -0
  127. package/dist/chunk-VJ5ZLRBD.cjs.map +1 -0
  128. package/dist/{chunk-3GWWOYGS.cjs → chunk-W6B3RYTX.cjs} +4 -4
  129. package/dist/{chunk-3GWWOYGS.cjs.map → chunk-W6B3RYTX.cjs.map} +1 -1
  130. package/dist/chunk-WOOOMTTA.cjs +19 -0
  131. package/dist/chunk-WOOOMTTA.cjs.map +1 -0
  132. package/dist/{chunk-CJYWHUZR.cjs → chunk-XCKHOXRP.cjs} +4 -4
  133. package/dist/{chunk-CJYWHUZR.cjs.map → chunk-XCKHOXRP.cjs.map} +1 -1
  134. package/dist/{chunk-6WMMZLEV.cjs → chunk-XJEXFEWG.cjs} +2 -27
  135. package/dist/chunk-XJEXFEWG.cjs.map +1 -0
  136. package/dist/chunk-XK4TVJKD.cjs +73 -0
  137. package/dist/chunk-XK4TVJKD.cjs.map +1 -0
  138. package/dist/chunk-XTR26TNE.cjs +1358 -0
  139. package/dist/chunk-XTR26TNE.cjs.map +1 -0
  140. package/dist/{chunk-E7TE2WVT.cjs → chunk-ZVEW3JBT.cjs} +3 -3
  141. package/dist/{chunk-E7TE2WVT.cjs.map → chunk-ZVEW3JBT.cjs.map} +1 -1
  142. package/dist/collaboration/index.cjs +70 -70
  143. package/dist/components/ZoomSlider.d.ts +25 -0
  144. package/dist/components/ZoomSlider.js +59 -0
  145. package/dist/components/ZoomSlider.js.map +7 -0
  146. package/dist/connect/docx.cjs +20 -20
  147. package/dist/connect/index.cjs +1150 -1232
  148. package/dist/connect/index.cjs.map +1 -1
  149. package/dist/connect/viewer.cjs +40 -34
  150. package/dist/connection/ai.d.ts +1 -1
  151. package/dist/connection/files/ConnectedNewFileMenu.d.ts +2 -1
  152. package/dist/connection/files/ConnectedNewFileMenu.js +9 -3
  153. package/dist/connection/files/ConnectedNewFileMenu.js.map +2 -2
  154. package/dist/connection/files/explorer/ConnectedFilesExplorer.js +1 -1
  155. package/dist/connection/files/explorer/ConnectedFilesExplorer.js.map +2 -2
  156. package/dist/connection/files/explorer/FileTiles.js +1 -1
  157. package/dist/connection/files/explorer/FileTiles.js.map +2 -2
  158. package/dist/connection/files/fields/documentField.js +1 -1
  159. package/dist/connection/files/fields/documentField.js.map +2 -2
  160. package/dist/connection/files/grid/documentColumns.js +1 -1
  161. package/dist/connection/files/grid/documentColumns.js.map +2 -2
  162. package/dist/connection/files/page/DocumentsFilterBarActions.js +17 -28
  163. package/dist/connection/files/page/DocumentsFilterBarActions.js.map +2 -2
  164. package/dist/connection/mail/useMailboxDefaults.js +1 -1
  165. package/dist/connection/mail/useMailboxDefaults.js.map +2 -2
  166. package/dist/connection/panels/useSessionPanelMode.js +3 -2
  167. package/dist/connection/panels/useSessionPanelMode.js.map +2 -2
  168. package/dist/connection/presentation/ClippingMediaViewer.d.ts +12 -0
  169. package/dist/connection/presentation/ClippingMediaViewer.js +153 -0
  170. package/dist/connection/presentation/ClippingMediaViewer.js.map +7 -0
  171. package/dist/connection/presentation/ClippingPdfViewer.d.ts +22 -0
  172. package/dist/connection/presentation/ClippingPdfViewer.js +75 -0
  173. package/dist/connection/presentation/ClippingPdfViewer.js.map +7 -0
  174. package/dist/connection/presentation/ConnectedPresentation.d.ts +12 -0
  175. package/dist/connection/presentation/ConnectedPresentation.js +100 -0
  176. package/dist/connection/presentation/ConnectedPresentation.js.map +7 -0
  177. package/dist/connection/presentation/ConnectedSlidesTab.d.ts +20 -0
  178. package/dist/connection/presentation/ConnectedSlidesTab.js +220 -0
  179. package/dist/connection/presentation/ConnectedSlidesTab.js.map +7 -0
  180. package/dist/connection/presentation/CropClipDialog.d.ts +11 -0
  181. package/dist/connection/presentation/CropClipDialog.js +86 -0
  182. package/dist/connection/presentation/CropClipDialog.js.map +7 -0
  183. package/dist/connection/presentation/GenerateTile.d.ts +4 -0
  184. package/dist/connection/presentation/GenerateTile.js +24 -0
  185. package/dist/connection/presentation/GenerateTile.js.map +7 -0
  186. package/dist/connection/presentation/LabelColumnMenu.d.ts +8 -0
  187. package/dist/connection/presentation/LabelColumnMenu.js +38 -0
  188. package/dist/connection/presentation/LabelColumnMenu.js.map +7 -0
  189. package/dist/connection/presentation/PresentationDialogs.d.ts +39 -0
  190. package/dist/connection/presentation/PresentationDialogs.js +295 -0
  191. package/dist/connection/presentation/PresentationDialogs.js.map +7 -0
  192. package/dist/connection/presentation/PresentationFileCard.d.ts +10 -0
  193. package/dist/connection/presentation/PresentationFileCard.js +35 -0
  194. package/dist/connection/presentation/PresentationFileCard.js.map +7 -0
  195. package/dist/connection/presentation/PresentationPill.d.ts +8 -0
  196. package/dist/connection/presentation/PresentationPill.js +44 -0
  197. package/dist/connection/presentation/PresentationPill.js.map +7 -0
  198. package/dist/connection/presentation/PresentationSlot.d.ts +7 -0
  199. package/dist/connection/presentation/PresentationSlot.js +35 -0
  200. package/dist/connection/presentation/PresentationSlot.js.map +7 -0
  201. package/dist/connection/presentation/requests.d.ts +16 -0
  202. package/dist/connection/presentation/requests.js +20 -0
  203. package/dist/connection/presentation/requests.js.map +7 -0
  204. package/dist/connection/presentation/useImageGeneration.d.ts +11 -0
  205. package/dist/connection/presentation/useImageGeneration.js +66 -0
  206. package/dist/connection/presentation/useImageGeneration.js.map +7 -0
  207. package/dist/connection/presentation/useLabelColumns.d.ts +15 -0
  208. package/dist/connection/presentation/useLabelColumns.js +33 -0
  209. package/dist/connection/presentation/useLabelColumns.js.map +7 -0
  210. package/dist/connection/presentation/usePresentationController.d.ts +15 -0
  211. package/dist/connection/presentation/usePresentationController.js +118 -0
  212. package/dist/connection/presentation/usePresentationController.js.map +7 -0
  213. package/dist/connection/presentation/usePresentationFiles.d.ts +44 -0
  214. package/dist/connection/presentation/usePresentationFiles.js +307 -0
  215. package/dist/connection/presentation/usePresentationFiles.js.map +7 -0
  216. package/dist/connection/presentation/useViewerClipping.d.ts +14 -0
  217. package/dist/connection/presentation/useViewerClipping.js +18 -0
  218. package/dist/connection/presentation/useViewerClipping.js.map +7 -0
  219. package/dist/connection/shell/ConnectedAppShell.js +5 -1
  220. package/dist/connection/shell/ConnectedAppShell.js.map +2 -2
  221. package/dist/connection/viewer/CleanViewControl.d.ts +8 -0
  222. package/dist/connection/viewer/CleanViewControl.js +76 -0
  223. package/dist/connection/viewer/CleanViewControl.js.map +7 -0
  224. package/dist/connection/viewer/ConnectedDocumentViewer.js +28 -29
  225. package/dist/connection/viewer/ConnectedDocumentViewer.js.map +2 -2
  226. package/dist/connection/viewer/ViewerCropModal.d.ts +5 -0
  227. package/dist/connection/viewer/ViewerCropModal.js +22 -0
  228. package/dist/connection/viewer/ViewerCropModal.js.map +7 -0
  229. package/dist/connection/viewer/ViewerPdfPane.d.ts +3 -1
  230. package/dist/connection/viewer/ViewerPdfPane.js +37 -0
  231. package/dist/connection/viewer/ViewerPdfPane.js.map +2 -2
  232. package/dist/connection/viewer/drafts.js +6 -4
  233. package/dist/connection/viewer/drafts.js.map +2 -2
  234. package/dist/connection/viewer/shareDocument.d.ts +11 -0
  235. package/dist/connection/viewer/shareDocument.js +11 -0
  236. package/dist/connection/viewer/shareDocument.js.map +7 -0
  237. package/dist/connection/viewer/slidesTabChunk.d.ts +2 -0
  238. package/dist/connection/viewer/slidesTabChunk.js +9 -0
  239. package/dist/connection/viewer/slidesTabChunk.js.map +7 -0
  240. package/dist/connection/viewer/useCleanView.d.ts +14 -0
  241. package/dist/connection/viewer/useCleanView.js +29 -0
  242. package/dist/connection/viewer/useCleanView.js.map +7 -0
  243. package/dist/connection/viewer/useViewedDocument.d.ts +1 -0
  244. package/dist/connection/viewer/useViewedDocument.js +9 -1
  245. package/dist/connection/viewer/useViewedDocument.js.map +2 -2
  246. package/dist/connection/viewer/useViewerTabs.js +18 -4
  247. package/dist/connection/viewer/useViewerTabs.js.map +2 -2
  248. package/dist/connection/workflows/ConnectedWorkflowStart.d.ts +14 -2
  249. package/dist/connection/workflows/ConnectedWorkflowStart.js +5 -2
  250. package/dist/connection/workflows/ConnectedWorkflowStart.js.map +2 -2
  251. package/dist/dashboards/index.cjs +1 -1
  252. package/dist/databases/index.cjs +49 -49
  253. package/dist/document-tools/DocumentToolButtons.d.ts +2 -0
  254. package/dist/document-tools/DocumentToolButtons.js +22 -1
  255. package/dist/document-tools/DocumentToolButtons.js.map +2 -2
  256. package/dist/document-tools/index.cjs +16 -12
  257. package/dist/document-tools/index.d.ts +1 -1
  258. package/dist/document-tools/index.js +2 -0
  259. package/dist/document-tools/index.js.map +2 -2
  260. package/dist/embed/index.cjs +41 -39
  261. package/dist/files/GridViewImpl.js +1 -1
  262. package/dist/files/GridViewImpl.js.map +2 -2
  263. package/dist/files/ViewerChrome.d.ts +5 -1
  264. package/dist/files/ViewerChrome.js +16 -6
  265. package/dist/files/ViewerChrome.js.map +2 -2
  266. package/dist/files/index.cjs +225 -225
  267. package/dist/files/navigator/DocumentSearchList.js +1 -1
  268. package/dist/files/navigator/DocumentSearchList.js.map +2 -2
  269. package/dist/index.cjs +1666 -1664
  270. package/dist/index.cjs.map +1 -1
  271. package/dist/presentation/BoxActionBar.d.ts +11 -0
  272. package/dist/presentation/BoxActionBar.js +182 -0
  273. package/dist/presentation/BoxActionBar.js.map +7 -0
  274. package/dist/presentation/ClipActionBar.d.ts +26 -0
  275. package/dist/presentation/ClipActionBar.js +103 -0
  276. package/dist/presentation/ClipActionBar.js.map +7 -0
  277. package/dist/presentation/ClipCaptureOverlay.d.ts +14 -0
  278. package/dist/presentation/ClipCaptureOverlay.js +69 -0
  279. package/dist/presentation/ClipCaptureOverlay.js.map +7 -0
  280. package/dist/presentation/ClipImage.d.ts +21 -0
  281. package/dist/presentation/ClipImage.js +119 -0
  282. package/dist/presentation/ClipImage.js.map +7 -0
  283. package/dist/presentation/ClipTray.d.ts +11 -0
  284. package/dist/presentation/ClipTray.js +152 -0
  285. package/dist/presentation/ClipTray.js.map +7 -0
  286. package/dist/presentation/ClipViewControls.d.ts +11 -0
  287. package/dist/presentation/ClipViewControls.js +142 -0
  288. package/dist/presentation/ClipViewControls.js.map +7 -0
  289. package/dist/presentation/DesignMenu.d.ts +8 -0
  290. package/dist/presentation/DesignMenu.js +199 -0
  291. package/dist/presentation/DesignMenu.js.map +7 -0
  292. package/dist/presentation/LayoutMenu.d.ts +17 -0
  293. package/dist/presentation/LayoutMenu.js +122 -0
  294. package/dist/presentation/LayoutMenu.js.map +7 -0
  295. package/dist/presentation/MediaClip.d.ts +15 -0
  296. package/dist/presentation/MediaClip.js +67 -0
  297. package/dist/presentation/MediaClip.js.map +7 -0
  298. package/dist/presentation/Notice.d.ts +6 -0
  299. package/dist/presentation/Notice.js +43 -0
  300. package/dist/presentation/Notice.js.map +7 -0
  301. package/dist/presentation/PresentationStage.d.ts +32 -0
  302. package/dist/presentation/PresentationStage.js +232 -0
  303. package/dist/presentation/PresentationStage.js.map +7 -0
  304. package/dist/presentation/PresenterView.d.ts +16 -0
  305. package/dist/presentation/PresenterView.js +69 -0
  306. package/dist/presentation/PresenterView.js.map +7 -0
  307. package/dist/presentation/SlideDecor.d.ts +25 -0
  308. package/dist/presentation/SlideDecor.js +189 -0
  309. package/dist/presentation/SlideDecor.js.map +7 -0
  310. package/dist/presentation/SlidesEditor.d.ts +25 -0
  311. package/dist/presentation/SlidesEditor.js +359 -0
  312. package/dist/presentation/SlidesEditor.js.map +7 -0
  313. package/dist/presentation/StageBox.d.ts +30 -0
  314. package/dist/presentation/StageBox.js +281 -0
  315. package/dist/presentation/StageBox.js.map +7 -0
  316. package/dist/presentation/StageItem.d.ts +37 -0
  317. package/dist/presentation/StageItem.js +211 -0
  318. package/dist/presentation/StageItem.js.map +7 -0
  319. package/dist/presentation/box-style.d.ts +6 -0
  320. package/dist/presentation/box-style.js +19 -0
  321. package/dist/presentation/box-style.js.map +7 -0
  322. package/dist/presentation/boxes.d.ts +105 -0
  323. package/dist/presentation/boxes.js +103 -0
  324. package/dist/presentation/boxes.js.map +7 -0
  325. package/dist/presentation/draw-boxes.d.ts +8 -0
  326. package/dist/presentation/draw-boxes.js +130 -0
  327. package/dist/presentation/draw-boxes.js.map +7 -0
  328. package/dist/presentation/export-boxes.d.ts +10 -0
  329. package/dist/presentation/export-boxes.js +74 -0
  330. package/dist/presentation/export-boxes.js.map +7 -0
  331. package/dist/presentation/export-pptx.d.ts +16 -0
  332. package/dist/presentation/export-pptx.js +194 -0
  333. package/dist/presentation/export-pptx.js.map +7 -0
  334. package/dist/presentation/import-pptx.d.ts +35 -0
  335. package/dist/presentation/import-pptx.js +659 -0
  336. package/dist/presentation/import-pptx.js.map +7 -0
  337. package/dist/presentation/merge-outside-edits.d.ts +12 -0
  338. package/dist/presentation/merge-outside-edits.js +35 -0
  339. package/dist/presentation/merge-outside-edits.js.map +7 -0
  340. package/dist/presentation/model.d.ts +201 -0
  341. package/dist/presentation/model.js +271 -0
  342. package/dist/presentation/model.js.map +7 -0
  343. package/dist/presentation/panel-id.d.ts +34 -0
  344. package/dist/presentation/panel-id.js +24 -0
  345. package/dist/presentation/panel-id.js.map +7 -0
  346. package/dist/presentation/persistence.d.ts +121 -0
  347. package/dist/presentation/persistence.js +141 -0
  348. package/dist/presentation/persistence.js.map +7 -0
  349. package/dist/presentation/pptx-data.d.ts +22 -0
  350. package/dist/presentation/pptx-data.js +83 -0
  351. package/dist/presentation/pptx-data.js.map +7 -0
  352. package/dist/presentation/pptx-xml.d.ts +90 -0
  353. package/dist/presentation/pptx-xml.js +333 -0
  354. package/dist/presentation/pptx-xml.js.map +7 -0
  355. package/dist/presentation/render-slides.d.ts +58 -0
  356. package/dist/presentation/render-slides.js +309 -0
  357. package/dist/presentation/render-slides.js.map +7 -0
  358. package/dist/presentation/saved-boxes.d.ts +11 -0
  359. package/dist/presentation/saved-boxes.js +80 -0
  360. package/dist/presentation/saved-boxes.js.map +7 -0
  361. package/dist/presentation/slide-layout.d.ts +54 -0
  362. package/dist/presentation/slide-layout.js +117 -0
  363. package/dist/presentation/slide-layout.js.map +7 -0
  364. package/dist/presentation/stage-videos.d.ts +5 -0
  365. package/dist/presentation/stage-videos.js +19 -0
  366. package/dist/presentation/stage-videos.js.map +7 -0
  367. package/dist/presentation/store.d.ts +203 -0
  368. package/dist/presentation/store.js +429 -0
  369. package/dist/presentation/store.js.map +7 -0
  370. package/dist/presentation/theme.d.ts +102 -0
  371. package/dist/presentation/theme.js +276 -0
  372. package/dist/presentation/theme.js.map +7 -0
  373. package/dist/presentation/useClipDrag.d.ts +26 -0
  374. package/dist/presentation/useClipDrag.js +65 -0
  375. package/dist/presentation/useClipDrag.js.map +7 -0
  376. package/dist/presentation/useObjectUrl.d.ts +6 -0
  377. package/dist/presentation/useObjectUrl.js +15 -0
  378. package/dist/presentation/useObjectUrl.js.map +7 -0
  379. package/dist/presentation/usePresenterKeys.d.ts +13 -0
  380. package/dist/presentation/usePresenterKeys.js +62 -0
  381. package/dist/presentation/usePresenterKeys.js.map +7 -0
  382. package/dist/settings/index.cjs +151 -150
  383. package/dist/shell/PanelPortal.js +1 -0
  384. package/dist/shell/PanelPortal.js.map +2 -2
  385. package/dist/shell/index.cjs +112 -110
  386. package/dist/shell/panel-windows.d.ts +2 -0
  387. package/dist/shell/panel-windows.js +7 -2
  388. package/dist/shell/panel-windows.js.map +2 -2
  389. package/dist/studio/index.cjs +28 -26
  390. package/dist/studio/index.cjs.map +1 -1
  391. package/dist/styles.css +1 -1
  392. package/dist/workflow-canvas/index.cjs +55 -54
  393. package/dist/workflow-canvas/index.cjs.map +1 -1
  394. package/node_modules/@arbidocs/coedit/package.json +1 -1
  395. package/package.json +6 -5
  396. package/dist/ConnectedCallDock-WER7R222.cjs.map +0 -1
  397. package/dist/DocumentReviewCard-BPIAJJED.cjs.map +0 -1
  398. package/dist/FilesViewerDialog-67WK3TZC.cjs.map +0 -1
  399. package/dist/GridViewImpl-ZMJJWTOM.cjs.map +0 -1
  400. package/dist/WorkspaceTableView-J3C6VH4T.cjs.map +0 -1
  401. package/dist/ai-IM4A23YT.cjs.map +0 -1
  402. package/dist/chunk-557MJ4IH.cjs.map +0 -1
  403. package/dist/chunk-6UTKM5AB.cjs.map +0 -1
  404. package/dist/chunk-6WMMZLEV.cjs.map +0 -1
  405. package/dist/chunk-B3LZITVF.cjs.map +0 -1
  406. package/dist/chunk-BUVIBHFU.cjs.map +0 -1
  407. package/dist/chunk-CPR6EHG7.cjs.map +0 -1
  408. package/dist/chunk-HA66DHW6.cjs.map +0 -1
  409. package/dist/chunk-NJCK6V6U.cjs.map +0 -1
  410. package/dist/chunk-NLSWDP42.cjs.map +0 -1
  411. package/dist/chunk-PGJYD67F.cjs.map +0 -1
  412. package/dist/chunk-X36UR4A7.cjs.map +0 -1
  413. package/dist/chunk-YYPZOEED.cjs.map +0 -1
@@ -0,0 +1,295 @@
1
+ "use client";
2
+ import { jsx, jsxs } from "react/jsx-runtime";
3
+ import { useCallback, useEffect, useMemo, useState } from "react";
4
+ import {
5
+ FileDown,
6
+ FolderOpen,
7
+ ImageIcon,
8
+ LayoutTemplate,
9
+ Loader2,
10
+ Presentation,
11
+ Save
12
+ } from "lucide-react";
13
+ import { useDocuments } from "@arbidocs/react";
14
+ import { Button, Input, getDocumentTitle } from "@arbidocs/react/ui";
15
+ import { DocumentPicker } from "../../settings/DocumentPicker.js";
16
+ import { ModalScaffold } from "../../settings/ModalScaffold.js";
17
+ import { useBlocksEnvironment } from "../../provider/environment.js";
18
+ import { GENERATE_IMAGE_ID } from "../../agents/workflows/catalogue/seed.js";
19
+ import { ConnectedWorkflowStart } from "../workflows/ConnectedWorkflowStart.js";
20
+ import { useWorkflowDefinitions } from "../workflows/useWorkflowDefinitions.js";
21
+ import { usePresentation } from "../../presentation/store.js";
22
+ import { useGenerateImageLaunch } from "./useImageGeneration.js";
23
+ import { usePresentationFiles } from "./usePresentationFiles.js";
24
+ function GenerateImageDialog({
25
+ open,
26
+ onOpenChange,
27
+ referenceId
28
+ }) {
29
+ const notify = usePresentation((s) => s.notify);
30
+ const { skills } = useWorkflowDefinitions();
31
+ const run = useGenerateImageLaunch();
32
+ const workflows = useMemo(
33
+ () => skills.filter((w) => w.id === GENERATE_IMAGE_ID).map((w) => ({ ...w, options: { ...w.options, agent: false } })),
34
+ [skills]
35
+ );
36
+ const onLaunch = useCallback(
37
+ async (launch) => {
38
+ try {
39
+ await run(launch);
40
+ notify("The image is in your clips", "success");
41
+ } catch (error) {
42
+ notify(error instanceof Error ? error.message : "The image could not be generated", "error");
43
+ throw error;
44
+ }
45
+ },
46
+ [run, notify]
47
+ );
48
+ if (!open || !workflows.length) return null;
49
+ return /* @__PURE__ */ jsx(
50
+ ConnectedWorkflowStart,
51
+ {
52
+ workflows,
53
+ showTiles: false,
54
+ activeId: GENERATE_IMAGE_ID,
55
+ onActiveIdChange: (id) => id === null && onOpenChange(false),
56
+ initialInputsFor: () => referenceId ? { references: { folders: [], labels: [], documents: [referenceId] } } : {},
57
+ onLaunch,
58
+ uploadInPlace: true
59
+ }
60
+ );
61
+ }
62
+ const SAVE_TEXT = {
63
+ save: {
64
+ title: "Save presentation",
65
+ description: "Saved in Files \u203A Presentations as a PowerPoint file: searchable, it opens again here for editing, and in PowerPoint.",
66
+ action: "Save"
67
+ },
68
+ saveAs: {
69
+ title: "Save as",
70
+ description: "A new copy under this name in Files \u203A Presentations.",
71
+ action: "Save"
72
+ },
73
+ template: {
74
+ title: "Save as template",
75
+ description: "Its look and slides, without clips, in Files \u203A Presentations \u203A Templates: New from template starts from it.",
76
+ action: "Save template"
77
+ },
78
+ export: {
79
+ title: "Export PDF",
80
+ description: "A PDF of the slides in Files \u203A Presentations \u203A Exports: to send or file. Redactions are burnt in.",
81
+ action: "Export"
82
+ }
83
+ };
84
+ function SavePresentationDialog({
85
+ open,
86
+ onOpenChange,
87
+ mode = "save"
88
+ }) {
89
+ const notify = usePresentation((s) => s.notify);
90
+ const { save, exportPdf } = usePresentationFiles();
91
+ const current = usePresentation((s) => s.title);
92
+ const [title, setTitle] = useState(current);
93
+ const [busy, setBusy] = useState(false);
94
+ const text = SAVE_TEXT[mode];
95
+ useEffect(() => {
96
+ if (!open) return;
97
+ const named = current === "Untitled presentation" ? "" : current;
98
+ setTitle(mode === "saveAs" && named ? `${named} (copy)` : mode === "template" ? "" : named);
99
+ }, [open, current, mode]);
100
+ const submit = async () => {
101
+ const name = title.trim();
102
+ if (!name || busy) return;
103
+ setBusy(true);
104
+ try {
105
+ if (mode === "export") {
106
+ await exportPdf(name);
107
+ notify(`"${name}.pdf" saved in Presentations`, "success");
108
+ } else {
109
+ await save(name, { asNew: mode === "saveAs", template: mode === "template" });
110
+ notify(`"${name}" saved in Presentations`, "success");
111
+ }
112
+ onOpenChange(false);
113
+ } catch (error) {
114
+ notify(error instanceof Error ? error.message : "Could not save", "error");
115
+ } finally {
116
+ setBusy(false);
117
+ }
118
+ };
119
+ return /* @__PURE__ */ jsxs(
120
+ ModalScaffold,
121
+ {
122
+ open,
123
+ onOpenChange,
124
+ title: text.title,
125
+ description: text.description,
126
+ showDescription: true,
127
+ icon: mode === "export" ? /* @__PURE__ */ jsx(FileDown, { className: "size-5" }) : /* @__PURE__ */ jsx(Save, { className: "size-5" }),
128
+ size: "sm",
129
+ testId: "presentation-save-dialog",
130
+ children: [
131
+ /* @__PURE__ */ jsx(ModalScaffold.Body, { children: /* @__PURE__ */ jsx(
132
+ Input,
133
+ {
134
+ autoFocus: true,
135
+ value: title,
136
+ onChange: (event) => setTitle(event.target.value),
137
+ onKeyDown: (event) => event.key === "Enter" && void submit(),
138
+ placeholder: "Name, e.g. Opening statement",
139
+ "aria-label": "Name",
140
+ disabled: busy
141
+ }
142
+ ) }),
143
+ /* @__PURE__ */ jsxs(ModalScaffold.Footer, { children: [
144
+ /* @__PURE__ */ jsx(Button, { type: "button", variant: "outline", onClick: () => onOpenChange(false), children: "Cancel" }),
145
+ /* @__PURE__ */ jsxs(Button, { type: "button", onClick: () => void submit(), disabled: !title.trim() || busy, children: [
146
+ busy && /* @__PURE__ */ jsx(Loader2, { className: "size-4 animate-spin" }),
147
+ text.action
148
+ ] })
149
+ ] })
150
+ ]
151
+ }
152
+ );
153
+ }
154
+ function OpenPresentationDialog({
155
+ open,
156
+ onOpenChange,
157
+ onOpened,
158
+ templates = false
159
+ }) {
160
+ const { confirm } = useBlocksEnvironment();
161
+ const notify = usePresentation((s) => s.notify);
162
+ const { list, startFromTemplate } = usePresentationFiles();
163
+ const [entries, setEntries] = useState(null);
164
+ const [opening, setOpening] = useState(null);
165
+ useEffect(() => {
166
+ if (!open) return;
167
+ setEntries(null);
168
+ list(templates ? "templates" : "presentations").then(setEntries).catch(() => setEntries([]));
169
+ }, [open, list, templates]);
170
+ const choose = async (entry) => {
171
+ if (!templates) {
172
+ onOpenChange(false);
173
+ onOpened(entry.id);
174
+ return;
175
+ }
176
+ if (usePresentation.getState().clips.length) {
177
+ const ok = await confirm({
178
+ title: "New from template",
179
+ message: "Replace the presentation that is open? Save it first to keep it.",
180
+ kind: "confirm"
181
+ });
182
+ if (!ok) return;
183
+ }
184
+ setOpening(entry.id);
185
+ try {
186
+ await startFromTemplate(entry.id);
187
+ onOpenChange(false);
188
+ onOpened(null);
189
+ } catch (error) {
190
+ notify(error instanceof Error ? error.message : "The template could not be opened", "error");
191
+ } finally {
192
+ setOpening(null);
193
+ }
194
+ };
195
+ return /* @__PURE__ */ jsx(
196
+ ModalScaffold,
197
+ {
198
+ open,
199
+ onOpenChange,
200
+ title: templates ? "New from template" : "Open presentation",
201
+ description: templates ? "A new presentation with the template\u2019s look and slides." : "Presentations saved in this workspace.",
202
+ showDescription: true,
203
+ icon: templates ? /* @__PURE__ */ jsx(LayoutTemplate, { className: "size-5" }) : /* @__PURE__ */ jsx(FolderOpen, { className: "size-5" }),
204
+ testId: templates ? "presentation-template-dialog" : "presentation-open-dialog",
205
+ children: /* @__PURE__ */ jsx(ModalScaffold.Body, { children: entries === null ? /* @__PURE__ */ jsxs("p", { className: "flex items-center gap-2 text-sm text-muted-foreground", children: [
206
+ /* @__PURE__ */ jsx(Loader2, { className: "size-4 animate-spin" }),
207
+ " Loading\u2026"
208
+ ] }) : entries.length === 0 ? /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground", children: templates ? "No templates yet. Save as template\u2026 keeps one in Files \u203A Presentations \u203A Templates." : "No saved presentations yet." }) : /* @__PURE__ */ jsx("ul", { className: "divide-y divide-border rounded-lg border border-border", children: entries.map((entry) => /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsxs(
209
+ "button",
210
+ {
211
+ type: "button",
212
+ disabled: !!opening,
213
+ onClick: () => void choose(entry),
214
+ className: "flex w-full items-center gap-3 px-3 py-2.5 text-left hover:bg-muted focus-visible:bg-muted focus-visible:outline-none disabled:opacity-60 pointer-coarse:min-h-11",
215
+ children: [
216
+ opening === entry.id ? /* @__PURE__ */ jsx(Loader2, { className: "size-4 shrink-0 animate-spin text-muted-foreground" }) : /* @__PURE__ */ jsx(Presentation, { className: "size-4 shrink-0 text-muted-foreground" }),
217
+ /* @__PURE__ */ jsx("span", { className: "min-w-0 flex-1 truncate text-sm font-medium", children: entry.title }),
218
+ entry.updatedAt && /* @__PURE__ */ jsx("span", { className: "shrink-0 text-xs text-muted-foreground", children: new Date(entry.updatedAt).toLocaleDateString() })
219
+ ]
220
+ }
221
+ ) }, entry.id)) }) })
222
+ }
223
+ );
224
+ }
225
+ const IMAGE_FILE = /\.(png|jpe?g|gif|webp|svg)$/i;
226
+ function ChooseLogoDialog({ open, onOpenChange }) {
227
+ const setTheme = usePresentation((s) => s.setTheme);
228
+ const corner = usePresentation((s) => s.theme.logo?.corner ?? "br");
229
+ const { data: documents } = useDocuments(void 0, { enabled: open });
230
+ const [picked, setPicked] = useState("");
231
+ const groups = useMemo(
232
+ () => [
233
+ {
234
+ id: "images",
235
+ docs: (documents ?? []).filter((doc) => IMAGE_FILE.test(doc.file_name ?? "")).map((doc) => ({
236
+ id: doc.external_id,
237
+ title: getDocumentTitle(doc, "Untitled"),
238
+ fileName: doc.file_name
239
+ })).sort((a, b) => a.title.localeCompare(b.title))
240
+ }
241
+ ],
242
+ [documents]
243
+ );
244
+ const selected = groups[0].docs.find((doc) => doc.id === picked);
245
+ const use = () => {
246
+ if (!selected) return;
247
+ setTheme({ logo: { documentId: selected.id, fileName: selected.fileName ?? "", corner } });
248
+ setPicked("");
249
+ onOpenChange(false);
250
+ };
251
+ return /* @__PURE__ */ jsxs(
252
+ ModalScaffold,
253
+ {
254
+ open,
255
+ onOpenChange,
256
+ title: "Logo",
257
+ description: "An image of this workspace (a PNG with a transparent background looks best), small in the footer of every slide.",
258
+ showDescription: true,
259
+ icon: /* @__PURE__ */ jsx(ImageIcon, { className: "size-5" }),
260
+ size: "sm",
261
+ testId: "presentation-logo-dialog",
262
+ children: [
263
+ /* @__PURE__ */ jsx(ModalScaffold.Body, { children: /* @__PURE__ */ jsx(
264
+ DocumentPicker,
265
+ {
266
+ groups,
267
+ value: picked,
268
+ onValueChange: setPicked,
269
+ labels: { placeholder: "Choose an image", noDocuments: "No images in this workspace." }
270
+ }
271
+ ) }),
272
+ /* @__PURE__ */ jsxs(ModalScaffold.Footer, { children: [
273
+ /* @__PURE__ */ jsx(Button, { type: "button", variant: "outline", onClick: () => onOpenChange(false), children: "Cancel" }),
274
+ /* @__PURE__ */ jsx(
275
+ Button,
276
+ {
277
+ type: "button",
278
+ onClick: use,
279
+ disabled: !selected,
280
+ "data-testid": "presentation-logo-use",
281
+ children: "Use as logo"
282
+ }
283
+ )
284
+ ] })
285
+ ]
286
+ }
287
+ );
288
+ }
289
+ export {
290
+ ChooseLogoDialog,
291
+ GenerateImageDialog,
292
+ OpenPresentationDialog,
293
+ SavePresentationDialog
294
+ };
295
+ //# sourceMappingURL=PresentationDialogs.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/connection/presentation/PresentationDialogs.tsx"],
4
+ "sourcesContent": ["/**\n * The presentation's dialogs: the app's Generate image (to create or edit an image into the clips),\n * save under a title (or as a template), open a saved one (or start from a template), choose the\n * theme's logo.\n */\n\nimport { useCallback, useEffect, useMemo, useState } from 'react'\nimport {\n FileDown,\n FolderOpen,\n ImageIcon,\n LayoutTemplate,\n Loader2,\n Presentation,\n Save,\n} from 'lucide-react'\nimport { useDocuments } from '@arbidocs/react'\nimport { Button, Input, getDocumentTitle } from '@arbidocs/react/ui'\nimport { DocumentPicker, type PickerGroup } from '../../settings/DocumentPicker'\nimport { ModalScaffold } from '../../settings/ModalScaffold'\nimport { useBlocksEnvironment } from '../../provider/environment'\nimport { GENERATE_IMAGE_ID } from '../../agents/workflows/catalogue/seed'\nimport type { OnWorkflowLaunch } from '../../agents/workflows/types'\nimport { ConnectedWorkflowStart } from '../workflows/ConnectedWorkflowStart'\nimport { useWorkflowDefinitions } from '../workflows/useWorkflowDefinitions'\nimport { usePresentation } from '../../presentation/store'\nimport { useGenerateImageLaunch } from './useImageGeneration'\nimport { usePresentationFiles, type SavedPresentationEntry } from './usePresentationFiles'\n\ninterface DialogProps {\n open: boolean\n onOpenChange: (open: boolean) => void\n}\n\n/**\n * Generate image, from the presentation: the app's own Generate image dialog (the workflow's form),\n * opened straight on its form, with `referenceId` as its source image when editing one. Its run\n * adds the image to the clips instead of opening a chat.\n */\nexport function GenerateImageDialog({\n open,\n onOpenChange,\n referenceId,\n}: DialogProps & { referenceId?: string | null }) {\n const notify = usePresentation((s) => s.notify)\n const { skills } = useWorkflowDefinitions()\n const run = useGenerateImageLaunch()\n // The run makes an image for the presentation, so it is always the user's own (no agent choice).\n const workflows = useMemo(\n () =>\n skills\n .filter((w) => w.id === GENERATE_IMAGE_ID)\n .map((w) => ({ ...w, options: { ...w.options, agent: false } })),\n [skills]\n )\n const onLaunch = useCallback<OnWorkflowLaunch>(\n async (launch) => {\n try {\n await run(launch)\n notify('The image is in your clips', 'success')\n } catch (error) {\n notify(error instanceof Error ? error.message : 'The image could not be generated', 'error')\n throw error\n }\n },\n [run, notify]\n )\n if (!open || !workflows.length) return null\n return (\n <ConnectedWorkflowStart\n workflows={workflows}\n showTiles={false}\n activeId={GENERATE_IMAGE_ID}\n onActiveIdChange={(id) => id === null && onOpenChange(false)}\n initialInputsFor={() =>\n referenceId ? { references: { folders: [], labels: [], documents: [referenceId] } } : {}\n }\n onLaunch={onLaunch}\n // In the presentation's (popped-out) window: uploads happen here, not in the app's window.\n uploadInPlace\n />\n )\n}\n\n/** Save the presentation under a title (in the workspace's Presentations folder). */\n/** How the presentation is saved: again, as a new copy, as a template, or exported as a PDF. */\nexport type SaveMode = 'save' | 'saveAs' | 'export' | 'template'\n\nconst SAVE_TEXT: Record<SaveMode, { title: string; description: string; action: string }> = {\n save: {\n title: 'Save presentation',\n description:\n 'Saved in Files \u203A Presentations as a PowerPoint file: searchable, it opens again here for editing, and in PowerPoint.',\n action: 'Save',\n },\n saveAs: {\n title: 'Save as',\n description: 'A new copy under this name in Files \u203A Presentations.',\n action: 'Save',\n },\n template: {\n title: 'Save as template',\n description:\n 'Its look and slides, without clips, in Files \u203A Presentations \u203A Templates: New from template starts from it.',\n action: 'Save template',\n },\n export: {\n title: 'Export PDF',\n description:\n 'A PDF of the slides in Files \u203A Presentations \u203A Exports: to send or file. Redactions are burnt in.',\n action: 'Export',\n },\n}\n\n/** Save under a name you type, in the workspace's Presentations folder. */\nexport function SavePresentationDialog({\n open,\n onOpenChange,\n mode = 'save',\n}: DialogProps & { mode?: SaveMode }) {\n const notify = usePresentation((s) => s.notify)\n const { save, exportPdf } = usePresentationFiles()\n const current = usePresentation((s) => s.title)\n const [title, setTitle] = useState(current)\n const [busy, setBusy] = useState(false)\n const text = SAVE_TEXT[mode]\n useEffect(() => {\n if (!open) return\n const named = current === 'Untitled presentation' ? '' : current\n setTitle(mode === 'saveAs' && named ? `${named} (copy)` : mode === 'template' ? '' : named)\n }, [open, current, mode])\n\n const submit = async () => {\n const name = title.trim()\n if (!name || busy) return\n setBusy(true)\n try {\n if (mode === 'export') {\n await exportPdf(name)\n notify(`\"${name}.pdf\" saved in Presentations`, 'success')\n } else {\n await save(name, { asNew: mode === 'saveAs', template: mode === 'template' })\n notify(`\"${name}\" saved in Presentations`, 'success')\n }\n onOpenChange(false)\n } catch (error) {\n notify(error instanceof Error ? error.message : 'Could not save', 'error')\n } finally {\n setBusy(false)\n }\n }\n\n return (\n <ModalScaffold\n open={open}\n onOpenChange={onOpenChange}\n title={text.title}\n description={text.description}\n showDescription\n icon={mode === 'export' ? <FileDown className=\"size-5\" /> : <Save className=\"size-5\" />}\n size=\"sm\"\n testId=\"presentation-save-dialog\"\n >\n <ModalScaffold.Body>\n <Input\n autoFocus\n value={title}\n onChange={(event) => setTitle(event.target.value)}\n onKeyDown={(event) => event.key === 'Enter' && void submit()}\n placeholder=\"Name, e.g. Opening statement\"\n aria-label=\"Name\"\n disabled={busy}\n />\n </ModalScaffold.Body>\n <ModalScaffold.Footer>\n <Button type=\"button\" variant=\"outline\" onClick={() => onOpenChange(false)}>\n Cancel\n </Button>\n <Button type=\"button\" onClick={() => void submit()} disabled={!title.trim() || busy}>\n {busy && <Loader2 className=\"size-4 animate-spin\" />}\n {text.action}\n </Button>\n </ModalScaffold.Footer>\n </ModalScaffold>\n )\n}\n\n/**\n * Open a presentation saved in this workspace, in place of this one; or (`templates`) start a new\n * one from a template.\n */\nexport function OpenPresentationDialog({\n open,\n onOpenChange,\n onOpened,\n templates = false,\n}: DialogProps & {\n /**\n * Show the chosen presentation (the viewer's slides tab opens its document, and loads it);\n * after a template, `null`: a new presentation, its look and slides already loaded.\n */\n onOpened: (documentId: string | null) => void\n templates?: boolean\n}) {\n const { confirm } = useBlocksEnvironment()\n const notify = usePresentation((s) => s.notify)\n const { list, startFromTemplate } = usePresentationFiles()\n const [entries, setEntries] = useState<SavedPresentationEntry[] | null>(null)\n const [opening, setOpening] = useState<string | null>(null)\n\n useEffect(() => {\n if (!open) return\n setEntries(null)\n list(templates ? 'templates' : 'presentations')\n .then(setEntries)\n .catch(() => setEntries([]))\n }, [open, list, templates])\n\n const choose = async (entry: SavedPresentationEntry) => {\n if (!templates) {\n onOpenChange(false)\n onOpened(entry.id)\n return\n }\n if (usePresentation.getState().clips.length) {\n const ok = await confirm({\n title: 'New from template',\n message: 'Replace the presentation that is open? Save it first to keep it.',\n kind: 'confirm',\n })\n if (!ok) return\n }\n setOpening(entry.id)\n try {\n await startFromTemplate(entry.id)\n onOpenChange(false)\n onOpened(null)\n } catch (error) {\n notify(error instanceof Error ? error.message : 'The template could not be opened', 'error')\n } finally {\n setOpening(null)\n }\n }\n\n return (\n <ModalScaffold\n open={open}\n onOpenChange={onOpenChange}\n title={templates ? 'New from template' : 'Open presentation'}\n description={\n templates\n ? 'A new presentation with the template\u2019s look and slides.'\n : 'Presentations saved in this workspace.'\n }\n showDescription\n icon={templates ? <LayoutTemplate className=\"size-5\" /> : <FolderOpen className=\"size-5\" />}\n testId={templates ? 'presentation-template-dialog' : 'presentation-open-dialog'}\n >\n <ModalScaffold.Body>\n {entries === null ? (\n <p className=\"flex items-center gap-2 text-sm text-muted-foreground\">\n <Loader2 className=\"size-4 animate-spin\" /> Loading\u2026\n </p>\n ) : entries.length === 0 ? (\n <p className=\"text-sm text-muted-foreground\">\n {templates\n ? 'No templates yet. Save as template\u2026 keeps one in Files \u203A Presentations \u203A Templates.'\n : 'No saved presentations yet.'}\n </p>\n ) : (\n <ul className=\"divide-y divide-border rounded-lg border border-border\">\n {entries.map((entry) => (\n <li key={entry.id}>\n <button\n type=\"button\"\n disabled={!!opening}\n onClick={() => void choose(entry)}\n className=\"flex w-full items-center gap-3 px-3 py-2.5 text-left hover:bg-muted focus-visible:bg-muted focus-visible:outline-none disabled:opacity-60 pointer-coarse:min-h-11\"\n >\n {opening === entry.id ? (\n <Loader2 className=\"size-4 shrink-0 animate-spin text-muted-foreground\" />\n ) : (\n <Presentation className=\"size-4 shrink-0 text-muted-foreground\" />\n )}\n <span className=\"min-w-0 flex-1 truncate text-sm font-medium\">{entry.title}</span>\n {entry.updatedAt && (\n <span className=\"shrink-0 text-xs text-muted-foreground\">\n {new Date(entry.updatedAt).toLocaleDateString()}\n </span>\n )}\n </button>\n </li>\n ))}\n </ul>\n )}\n </ModalScaffold.Body>\n </ModalScaffold>\n )\n}\n\nconst IMAGE_FILE = /\\.(png|jpe?g|gif|webp|svg)$/i\n\n/** Design \u203A Logo: one of the workspace's images, in the footer of every slide. */\nexport function ChooseLogoDialog({ open, onOpenChange }: DialogProps) {\n const setTheme = usePresentation((s) => s.setTheme)\n const corner = usePresentation((s) => s.theme.logo?.corner ?? 'br')\n const { data: documents } = useDocuments(undefined, { enabled: open })\n const [picked, setPicked] = useState('')\n const groups = useMemo<PickerGroup[]>(\n () => [\n {\n id: 'images',\n docs: (documents ?? [])\n .filter((doc) => IMAGE_FILE.test(doc.file_name ?? ''))\n .map((doc) => ({\n id: doc.external_id,\n title: getDocumentTitle(doc, 'Untitled'),\n fileName: doc.file_name,\n }))\n .sort((a, b) => a.title.localeCompare(b.title)),\n },\n ],\n [documents]\n )\n const selected = groups[0].docs.find((doc) => doc.id === picked)\n const use = () => {\n if (!selected) return\n setTheme({ logo: { documentId: selected.id, fileName: selected.fileName ?? '', corner } })\n setPicked('')\n onOpenChange(false)\n }\n return (\n <ModalScaffold\n open={open}\n onOpenChange={onOpenChange}\n title=\"Logo\"\n description=\"An image of this workspace (a PNG with a transparent background looks best), small in the footer of every slide.\"\n showDescription\n icon={<ImageIcon className=\"size-5\" />}\n size=\"sm\"\n testId=\"presentation-logo-dialog\"\n >\n <ModalScaffold.Body>\n <DocumentPicker\n groups={groups}\n value={picked}\n onValueChange={setPicked}\n labels={{ placeholder: 'Choose an image', noDocuments: 'No images in this workspace.' }}\n />\n </ModalScaffold.Body>\n <ModalScaffold.Footer>\n <Button type=\"button\" variant=\"outline\" onClick={() => onOpenChange(false)}>\n Cancel\n </Button>\n <Button\n type=\"button\"\n onClick={use}\n disabled={!selected}\n data-testid=\"presentation-logo-use\"\n >\n Use as logo\n </Button>\n </ModalScaffold.Footer>\n </ModalScaffold>\n )\n}\n"],
5
+ "mappings": ";AAqEI,cA6GI,YA7GJ;AA/DJ,SAAS,aAAa,WAAW,SAAS,gBAAgB;AAC1D;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,oBAAoB;AAC7B,SAAS,QAAQ,OAAO,wBAAwB;AAChD,SAAS,sBAAwC;AACjD,SAAS,qBAAqB;AAC9B,SAAS,4BAA4B;AACrC,SAAS,yBAAyB;AAElC,SAAS,8BAA8B;AACvC,SAAS,8BAA8B;AACvC,SAAS,uBAAuB;AAChC,SAAS,8BAA8B;AACvC,SAAS,4BAAyD;AAY3D,SAAS,oBAAoB;AAAA,EAClC;AAAA,EACA;AAAA,EACA;AACF,GAAkD;AAChD,QAAM,SAAS,gBAAgB,CAAC,MAAM,EAAE,MAAM;AAC9C,QAAM,EAAE,OAAO,IAAI,uBAAuB;AAC1C,QAAM,MAAM,uBAAuB;AAEnC,QAAM,YAAY;AAAA,IAChB,MACE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M,oBAAC,aAAU,WAAU,UAAS;AAAA,MACpC,MAAK;AAAA,MACL,QAAO;AAAA,MAEP;AAAA,4BAAC,cAAc,MAAd,EACC;AAAA,UAAC;AAAA;AAAA,YACC;AAAA,YACA,OAAO;AAAA,YACP,eAAe;AAAA,YACf,QAAQ,EAAE,aAAa,mBAAmB,aAAa,+BAA+B;AAAA;AAAA,QACxF,GACF;AAAA,QACA,qBAAC,cAAc,QAAd,EACC;AAAA,8BAAC,UAAO,MAAK,UAAS,SAAQ,WAAU,SAAS,MAAM,aAAa,KAAK,GAAG,oBAE5E;AAAA,UACA;AAAA,YAAC;AAAA;AAAA,cACC,MAAK;AAAA,cACL,SAAS;AAAA,cACT,UAAU,CAAC;AAAA,cACX,eAAY;AAAA,cACb;AAAA;AAAA,UAED;AAAA,WACF;AAAA;AAAA;AAAA,EACF;AAEJ;",
6
+ "names": []
7
+ }
@@ -0,0 +1,10 @@
1
+ /**
2
+ * A presentation saved before presentations were PDFs (the editable data alone), in the viewer's
3
+ * PDF tab: it has no slides to show there, so the card says what it is and opens its slides.
4
+ */
5
+ export interface PresentationFileCardProps {
6
+ documentId: string;
7
+ fileName: string;
8
+ }
9
+ /** A presentation saved in the older format: opening it and saving makes it a presentation PDF. */
10
+ export declare function PresentationFileCard({ documentId, fileName }: PresentationFileCardProps): import("react").JSX.Element;
@@ -0,0 +1,35 @@
1
+ "use client";
2
+ import { jsx, jsxs } from "react/jsx-runtime";
3
+ import { Pencil, Presentation } from "lucide-react";
4
+ import { useArbiSessionStore } from "@arbidocs/react";
5
+ import { Button } from "@arbidocs/react/ui";
6
+ import { EmptyState } from "../../components/EmptyState.js";
7
+ import { presentationTitle } from "../../presentation/persistence.js";
8
+ import { editPresentation } from "./requests.js";
9
+ function PresentationFileCard({ documentId, fileName }) {
10
+ const session = useArbiSessionStore();
11
+ return /* @__PURE__ */ jsx("div", { className: "flex h-full items-center justify-center p-6", "data-testid": "presentation-file", children: /* @__PURE__ */ jsx(
12
+ EmptyState,
13
+ {
14
+ icon: Presentation,
15
+ title: presentationTitle(fileName),
16
+ description: "A presentation saved in an earlier format, without its slides. Open it and save it to keep it as a presentation PDF; this file can then be deleted.",
17
+ action: /* @__PURE__ */ jsxs(
18
+ Button,
19
+ {
20
+ type: "button",
21
+ onClick: () => editPresentation(session, { kind: "open", documentId }),
22
+ "data-testid": "presentation-file-edit",
23
+ children: [
24
+ /* @__PURE__ */ jsx(Pencil, { className: "size-4" }),
25
+ "Open the slides"
26
+ ]
27
+ }
28
+ )
29
+ }
30
+ ) });
31
+ }
32
+ export {
33
+ PresentationFileCard
34
+ };
35
+ //# sourceMappingURL=PresentationFileCard.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/connection/presentation/PresentationFileCard.tsx"],
4
+ "sourcesContent": ["/**\n * A presentation saved before presentations were PDFs (the editable data alone), in the viewer's\n * PDF tab: it has no slides to show there, so the card says what it is and opens its slides.\n */\n\nimport { Pencil, Presentation } from 'lucide-react'\nimport { useArbiSessionStore } from '@arbidocs/react'\nimport { Button } from '@arbidocs/react/ui'\nimport { EmptyState } from '../../components/EmptyState'\nimport { presentationTitle } from '../../presentation/persistence'\nimport { editPresentation } from './requests'\n\nexport interface PresentationFileCardProps {\n documentId: string\n fileName: string\n}\n\n/** A presentation saved in the older format: opening it and saving makes it a presentation PDF. */\nexport function PresentationFileCard({ documentId, fileName }: PresentationFileCardProps) {\n const session = useArbiSessionStore()\n return (\n <div className=\"flex h-full items-center justify-center p-6\" data-testid=\"presentation-file\">\n <EmptyState\n icon={Presentation}\n title={presentationTitle(fileName)}\n description=\"A presentation saved in an earlier format, without its slides. Open it and save it to keep it as a presentation PDF; this file can then be deleted.\"\n action={\n <Button\n type=\"button\"\n onClick={() => editPresentation(session, { kind: 'open', documentId })}\n data-testid=\"presentation-file-edit\"\n >\n <Pencil className=\"size-4\" />\n Open the slides\n </Button>\n }\n />\n </div>\n )\n}\n"],
5
+ "mappings": ";AA2BU,SAKE,KALF;AAtBV,SAAS,QAAQ,oBAAoB;AACrC,SAAS,2BAA2B;AACpC,SAAS,cAAc;AACvB,SAAS,kBAAkB;AAC3B,SAAS,yBAAyB;AAClC,SAAS,wBAAwB;AAQ1B,SAAS,qBAAqB,EAAE,YAAY,SAAS,GAA8B;AACxF,QAAM,UAAU,oBAAoB;AACpC,SACE,oBAAC,SAAI,WAAU,+CAA8C,eAAY,qBACvE;AAAA,IAAC;AAAA;AAAA,MACC,MAAM;AAAA,MACN,OAAO,kBAAkB,QAAQ;AAAA,MACjC,aAAY;AAAA,MACZ,QACE;AAAA,QAAC;AAAA;AAAA,UACC,MAAK;AAAA,UACL,SAAS,MAAM,iBAAiB,SAAS,EAAE,MAAM,QAAQ,WAAW,CAAC;AAAA,UACrE,eAAY;AAAA,UAEZ;AAAA,gCAAC,UAAO,WAAU,UAAS;AAAA,YAAE;AAAA;AAAA;AAAA,MAE/B;AAAA;AAAA,EAEJ,GACF;AAEJ;",
6
+ "names": []
7
+ }
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Back to the presentation, from any document the viewer shows (clips are gathered while reading,
3
+ * then arranged): its title and how many clips wait in its tray. Shown while a presentation is
4
+ * being made and the viewer is elsewhere.
5
+ */
6
+ export declare function PresentationPill({ compact }: {
7
+ compact: boolean;
8
+ }): import("react").JSX.Element | null;
@@ -0,0 +1,44 @@
1
+ "use client";
2
+ import { jsx, jsxs } from "react/jsx-runtime";
3
+ import { Presentation } from "lucide-react";
4
+ import { DOCUMENT_VIEWER_PANEL, useArbiSessionState, useArbiSessionStore } from "@arbidocs/react";
5
+ import { Button } from "@arbidocs/react/ui";
6
+ import { usePresentation } from "../../presentation/store.js";
7
+ import { editPresentation } from "./requests.js";
8
+ function PresentationPill({ compact }) {
9
+ const session = useArbiSessionStore();
10
+ const boundTo = usePresentation((s) => s.boundTo);
11
+ const clips = usePresentation((s) => s.clips.length);
12
+ const title = usePresentation((s) => s.title);
13
+ const onIt = useArbiSessionState(
14
+ (s) => s.viewingDocument?.id === boundTo && s.documentViewer.tab === "slides"
15
+ );
16
+ if (onIt || boundTo === null && clips === 0) return null;
17
+ const back = () => {
18
+ if (boundTo === null) return editPresentation(session, { kind: "new" });
19
+ session.setViewingDocument({ id: boundTo, page: null });
20
+ session.setDocumentViewer({ tab: "slides" });
21
+ session.openPanel(DOCUMENT_VIEWER_PANEL, "docked");
22
+ };
23
+ return /* @__PURE__ */ jsxs(
24
+ Button,
25
+ {
26
+ type: "button",
27
+ variant: "outline",
28
+ size: "sm",
29
+ className: "h-7 max-w-56 gap-1.5 rounded-full px-2.5 text-xs",
30
+ onClick: back,
31
+ title: `Back to the presentation "${title}": ${clips} clip${clips === 1 ? "" : "s"} to arrange`,
32
+ "data-testid": "presentation-pill",
33
+ children: [
34
+ /* @__PURE__ */ jsx(Presentation, { className: "size-3.5 shrink-0" }),
35
+ !compact && /* @__PURE__ */ jsx("span", { className: "min-w-0 truncate", children: title }),
36
+ clips > 0 && /* @__PURE__ */ jsx("span", { className: "rounded-full bg-primary px-1.5 text-[10px] font-semibold leading-4 text-primary-foreground", children: clips })
37
+ ]
38
+ }
39
+ );
40
+ }
41
+ export {
42
+ PresentationPill
43
+ };
44
+ //# sourceMappingURL=PresentationPill.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/connection/presentation/PresentationPill.tsx"],
4
+ "sourcesContent": ["import { Presentation } from 'lucide-react'\nimport { DOCUMENT_VIEWER_PANEL, useArbiSessionState, useArbiSessionStore } from '@arbidocs/react'\nimport { Button } from '@arbidocs/react/ui'\nimport { usePresentation } from '../../presentation/store'\nimport { editPresentation } from './requests'\n\n/**\n * Back to the presentation, from any document the viewer shows (clips are gathered while reading,\n * then arranged): its title and how many clips wait in its tray. Shown while a presentation is\n * being made and the viewer is elsewhere.\n */\nexport function PresentationPill({ compact }: { compact: boolean }) {\n const session = useArbiSessionStore()\n const boundTo = usePresentation((s) => s.boundTo)\n const clips = usePresentation((s) => s.clips.length)\n const title = usePresentation((s) => s.title)\n const onIt = useArbiSessionState(\n (s) => s.viewingDocument?.id === boundTo && s.documentViewer.tab === 'slides'\n )\n if (onIt || (boundTo === null && clips === 0)) return null\n const back = () => {\n if (boundTo === null) return editPresentation(session, { kind: 'new' })\n session.setViewingDocument({ id: boundTo, page: null })\n session.setDocumentViewer({ tab: 'slides' })\n session.openPanel(DOCUMENT_VIEWER_PANEL, 'docked')\n }\n return (\n <Button\n type=\"button\"\n variant=\"outline\"\n size=\"sm\"\n className=\"h-7 max-w-56 gap-1.5 rounded-full px-2.5 text-xs\"\n onClick={back}\n title={`Back to the presentation \"${title}\": ${clips} clip${clips === 1 ? '' : 's'} to arrange`}\n data-testid=\"presentation-pill\"\n >\n <Presentation className=\"size-3.5 shrink-0\" />\n {!compact && <span className=\"min-w-0 truncate\">{title}</span>}\n {clips > 0 && (\n <span className=\"rounded-full bg-primary px-1.5 text-[10px] font-semibold leading-4 text-primary-foreground\">\n {clips}\n </span>\n )}\n </Button>\n )\n}\n"],
5
+ "mappings": ";AA2BI,SASE,KATF;AA3BJ,SAAS,oBAAoB;AAC7B,SAAS,uBAAuB,qBAAqB,2BAA2B;AAChF,SAAS,cAAc;AACvB,SAAS,uBAAuB;AAChC,SAAS,wBAAwB;AAO1B,SAAS,iBAAiB,EAAE,QAAQ,GAAyB;AAClE,QAAM,UAAU,oBAAoB;AACpC,QAAM,UAAU,gBAAgB,CAAC,MAAM,EAAE,OAAO;AAChD,QAAM,QAAQ,gBAAgB,CAAC,MAAM,EAAE,MAAM,MAAM;AACnD,QAAM,QAAQ,gBAAgB,CAAC,MAAM,EAAE,KAAK;AAC5C,QAAM,OAAO;AAAA,IACX,CAAC,MAAM,EAAE,iBAAiB,OAAO,WAAW,EAAE,eAAe,QAAQ;AAAA,EACvE;AACA,MAAI,QAAS,YAAY,QAAQ,UAAU,EAAI,QAAO;AACtD,QAAM,OAAO,MAAM;AACjB,QAAI,YAAY,KAAM,QAAO,iBAAiB,SAAS,EAAE,MAAM,MAAM,CAAC;AACtE,YAAQ,mBAAmB,EAAE,IAAI,SAAS,MAAM,KAAK,CAAC;AACtD,YAAQ,kBAAkB,EAAE,KAAK,SAAS,CAAC;AAC3C,YAAQ,UAAU,uBAAuB,QAAQ;AAAA,EACnD;AACA,SACE;AAAA,IAAC;AAAA;AAAA,MACC,MAAK;AAAA,MACL,SAAQ;AAAA,MACR,MAAK;AAAA,MACL,WAAU;AAAA,MACV,SAAS;AAAA,MACT,OAAO,6BAA6B,KAAK,MAAM,KAAK,QAAQ,UAAU,IAAI,KAAK,GAAG;AAAA,MAClF,eAAY;AAAA,MAEZ;AAAA,4BAAC,gBAAa,WAAU,qBAAoB;AAAA,QAC3C,CAAC,WAAW,oBAAC,UAAK,WAAU,oBAAoB,iBAAM;AAAA,QACtD,QAAQ,KACP,oBAAC,UAAK,WAAU,8FACb,iBACH;AAAA;AAAA;AAAA,EAEJ;AAEJ;",
6
+ "names": []
7
+ }
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Where the app shell mounts the presentation module: nothing (and none of the PDF engine) until
3
+ * the presentation is first opened, then `ConnectedPresentation` for the rest of the page's life,
4
+ * so the clips survive the presentation window being closed. A failure inside it is contained
5
+ * here: the presentation goes, the rest of the app stays.
6
+ */
7
+ export declare function PresentationSlot(): import("react").JSX.Element | null;
@@ -0,0 +1,35 @@
1
+ "use client";
2
+ import { jsx } from "react/jsx-runtime";
3
+ import { lazy, Suspense, useEffect, useState } from "react";
4
+ import { isPanelOpen, useArbiSessionState, useArbiSessionStore } from "@arbidocs/react";
5
+ import { logger } from "@arbidocs/client";
6
+ import { ErrorBoundary } from "../../components/ErrorBoundary.js";
7
+ import { PRESENTATION_PANEL, presentationOpenedInThisPage } from "../../presentation/panel-id.js";
8
+ const ConnectedPresentation = lazy(
9
+ () => import("./ConnectedPresentation.js").then((m) => ({ default: m.ConnectedPresentation }))
10
+ );
11
+ function PresentationSlot() {
12
+ const session = useArbiSessionStore();
13
+ const isOpen = useArbiSessionState((state) => isPanelOpen(state, PRESENTATION_PANEL));
14
+ const [mounted, setMounted] = useState(false);
15
+ const opened = isOpen && presentationOpenedInThisPage();
16
+ useEffect(() => {
17
+ if (opened) setMounted(true);
18
+ else if (isOpen) session.closePanel(PRESENTATION_PANEL);
19
+ }, [opened, isOpen, session]);
20
+ return mounted ? /* @__PURE__ */ jsx(
21
+ ErrorBoundary,
22
+ {
23
+ fallback: () => null,
24
+ onError: (error) => {
25
+ logger.error("The presentation failed", error);
26
+ session.closePanel(PRESENTATION_PANEL);
27
+ },
28
+ children: /* @__PURE__ */ jsx(Suspense, { fallback: null, children: /* @__PURE__ */ jsx(ConnectedPresentation, {}) })
29
+ }
30
+ ) : null;
31
+ }
32
+ export {
33
+ PresentationSlot
34
+ };
35
+ //# sourceMappingURL=PresentationSlot.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/connection/presentation/PresentationSlot.tsx"],
4
+ "sourcesContent": ["/**\n * Where the app shell mounts the presentation module: nothing (and none of the PDF engine) until\n * the presentation is first opened, then `ConnectedPresentation` for the rest of the page's life,\n * so the clips survive the presentation window being closed. A failure inside it is contained\n * here: the presentation goes, the rest of the app stays.\n */\n\nimport { lazy, Suspense, useEffect, useState } from 'react'\nimport { isPanelOpen, useArbiSessionState, useArbiSessionStore } from '@arbidocs/react'\nimport { logger } from '@arbidocs/client'\nimport { ErrorBoundary } from '../../components/ErrorBoundary'\nimport { PRESENTATION_PANEL, presentationOpenedInThisPage } from '../../presentation/panel-id'\n\nconst ConnectedPresentation = lazy(() =>\n import('./ConnectedPresentation').then((m) => ({ default: m.ConnectedPresentation }))\n)\n\nexport function PresentationSlot() {\n const session = useArbiSessionStore()\n const isOpen = useArbiSessionState((state) => isPanelOpen(state, PRESENTATION_PANEL))\n const [mounted, setMounted] = useState(false)\n const opened = isOpen && presentationOpenedInThisPage()\n\n useEffect(() => {\n if (opened) setMounted(true)\n // Restored open from an earlier page: there is nothing to present.\n else if (isOpen) session.closePanel(PRESENTATION_PANEL)\n }, [opened, isOpen, session])\n\n return mounted ? (\n <ErrorBoundary\n fallback={() => null}\n onError={(error) => {\n logger.error('The presentation failed', error)\n session.closePanel(PRESENTATION_PANEL)\n }}\n >\n <Suspense fallback={null}>\n <ConnectedPresentation />\n </Suspense>\n </ErrorBoundary>\n ) : null\n}\n"],
5
+ "mappings": ";AAsCQ;AA/BR,SAAS,MAAM,UAAU,WAAW,gBAAgB;AACpD,SAAS,aAAa,qBAAqB,2BAA2B;AACtE,SAAS,cAAc;AACvB,SAAS,qBAAqB;AAC9B,SAAS,oBAAoB,oCAAoC;AAEjE,MAAM,wBAAwB;AAAA,EAAK,MACjC,OAAO,yBAAyB,EAAE,KAAK,CAAC,OAAO,EAAE,SAAS,EAAE,sBAAsB,EAAE;AACtF;AAEO,SAAS,mBAAmB;AACjC,QAAM,UAAU,oBAAoB;AACpC,QAAM,SAAS,oBAAoB,CAAC,UAAU,YAAY,OAAO,kBAAkB,CAAC;AACpF,QAAM,CAAC,SAAS,UAAU,IAAI,SAAS,KAAK;AAC5C,QAAM,SAAS,UAAU,6BAA6B;AAEtD,YAAU,MAAM;AACd,QAAI,OAAQ,YAAW,IAAI;AAAA,aAElB,OAAQ,SAAQ,WAAW,kBAAkB;AAAA,EACxD,GAAG,CAAC,QAAQ,QAAQ,OAAO,CAAC;AAE5B,SAAO,UACL;AAAA,IAAC;AAAA;AAAA,MACC,UAAU,MAAM;AAAA,MAChB,SAAS,CAAC,UAAU;AAClB,eAAO,MAAM,2BAA2B,KAAK;AAC7C,gBAAQ,WAAW,kBAAkB;AAAA,MACvC;AAAA,MAEA,8BAAC,YAAS,UAAU,MAClB,8BAAC,yBAAsB,GACzB;AAAA;AAAA,EACF,IACE;AACN;",
6
+ "names": []
7
+ }
@@ -0,0 +1,16 @@
1
+ import { type ArbiSessionStore } from '@arbidocs/react';
2
+ type Session = Pick<ArbiSessionStore, 'setViewingDocument' | 'setDocumentViewer' | 'openPanel' | 'startDraftDocument'>;
3
+ /** A presentation to edit: a new one, or a saved one (as of `version`; default its current one). */
4
+ export type PresentationRequest = {
5
+ kind: 'new';
6
+ } | {
7
+ kind: 'open';
8
+ documentId: string;
9
+ version?: number;
10
+ };
11
+ /**
12
+ * Edit a presentation in the viewer's slides tab: a saved one (its document, on that tab), or a
13
+ * new one (a presentation draft, saved into Files › Presentations when it is first saved).
14
+ */
15
+ export declare function editPresentation(session: Session, request: PresentationRequest): void;
16
+ export {};
@@ -0,0 +1,20 @@
1
+ "use client";
2
+ import { DOCUMENT_VIEWER_PANEL } from "@arbidocs/react";
3
+ import { versionRef } from "@arbidocs/react/artifacts";
4
+ function editPresentation(session, request) {
5
+ if (request.kind === "new") {
6
+ session.startDraftDocument("presentation");
7
+ return;
8
+ }
9
+ const { documentId, version } = request;
10
+ session.setViewingDocument({
11
+ id: version ? versionRef(documentId, version) : documentId,
12
+ page: null
13
+ });
14
+ session.setDocumentViewer({ tab: "slides" });
15
+ session.openPanel(DOCUMENT_VIEWER_PANEL, "docked");
16
+ }
17
+ export {
18
+ editPresentation
19
+ };
20
+ //# sourceMappingURL=requests.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/connection/presentation/requests.ts"],
4
+ "sourcesContent": ["import { DOCUMENT_VIEWER_PANEL, type ArbiSessionStore } from '@arbidocs/react'\nimport { versionRef } from '@arbidocs/react/artifacts'\n\ntype Session = Pick<\n ArbiSessionStore,\n 'setViewingDocument' | 'setDocumentViewer' | 'openPanel' | 'startDraftDocument'\n>\n\n/** A presentation to edit: a new one, or a saved one (as of `version`; default its current one). */\nexport type PresentationRequest =\n { kind: 'new' } | { kind: 'open'; documentId: string; version?: number }\n\n/**\n * Edit a presentation in the viewer's slides tab: a saved one (its document, on that tab), or a\n * new one (a presentation draft, saved into Files \u203A Presentations when it is first saved).\n */\nexport function editPresentation(session: Session, request: PresentationRequest): void {\n if (request.kind === 'new') {\n session.startDraftDocument('presentation')\n return\n }\n const { documentId, version } = request\n session.setViewingDocument({\n id: version ? versionRef(documentId, version) : documentId,\n page: null,\n })\n session.setDocumentViewer({ tab: 'slides' })\n session.openPanel(DOCUMENT_VIEWER_PANEL, 'docked')\n}\n"],
5
+ "mappings": ";AAAA,SAAS,6BAAoD;AAC7D,SAAS,kBAAkB;AAepB,SAAS,iBAAiB,SAAkB,SAAoC;AACrF,MAAI,QAAQ,SAAS,OAAO;AAC1B,YAAQ,mBAAmB,cAAc;AACzC;AAAA,EACF;AACA,QAAM,EAAE,YAAY,QAAQ,IAAI;AAChC,UAAQ,mBAAmB;AAAA,IACzB,IAAI,UAAU,WAAW,YAAY,OAAO,IAAI;AAAA,IAChD,MAAM;AAAA,EACR,CAAC;AACD,UAAQ,kBAAkB,EAAE,KAAK,SAAS,CAAC;AAC3C,UAAQ,UAAU,uBAAuB,QAAQ;AACnD;",
6
+ "names": []
7
+ }
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Generate image, for a presentation: the app's own Generate image dialog (the workflow's form:
3
+ * prompt, source images to edit or combine, shape) launched here instead of into a chat. The run is
4
+ * the platform's `/image` command sent exactly as that workflow sends it (`PROMPT_BINDINGS`: the
5
+ * shape and source images ride structured tool arguments); like the workflow it leaves a thread
6
+ * and the image as a document in the workspace. The image is then added to the presentation as a
7
+ * clip of the whole picture.
8
+ */
9
+ import type { OnWorkflowLaunch } from '../../agents/workflows/types';
10
+ /** The Generate image dialog's launch, run for the presentation: the image becomes a clip. */
11
+ export declare function useGenerateImageLaunch(): OnWorkflowLaunch;