@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,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=\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,GACF;AAAA,EAEJ;AACA,MAAI,YAAY,YAAY,QAAQ;AAClC,WACE,oBAAC,SAAI,WAAU,+CAA8C,eAAY,mBACvE;AAAA,MAAC;AAAA;AAAA,QACC,MAAM;AAAA,QACN,OAAM;AAAA,QACN,aAAY;AAAA,QACZ,QACE,oBAAC,UAAO,MAAK,UAAS,SAAQ,WAAU,SAAS,MAAM,SAAS,CAAC,MAAM,IAAI,CAAC,GAAG,mCAE/E;AAAA;AAAA,IAEJ,GACF;AAAA,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;
@@ -0,0 +1,86 @@
1
+ "use client";
2
+ import { jsx, jsxs } from "react/jsx-runtime";
3
+ import { useEffect, useState } from "react";
4
+ import { Crop } from "lucide-react";
5
+ import { ImageCropper } from "@arbidocs/react";
6
+ import { Button } from "@arbidocs/react/ui";
7
+ import { ModalScaffold } from "../../settings/ModalScaffold.js";
8
+ import { usePresentation } from "../../presentation/store.js";
9
+ import { useObjectUrl } from "../../presentation/useObjectUrl.js";
10
+ function CropClipDialog({ clip, onOpenChange }) {
11
+ const url = useObjectUrl(clip?.source ?? EMPTY);
12
+ const [natural, setNatural] = useState(null);
13
+ const [area, setArea] = useState(null);
14
+ useEffect(() => {
15
+ setNatural(null);
16
+ setArea(null);
17
+ if (!clip) return;
18
+ let cancelled = false;
19
+ void createImageBitmap(clip.source).then((bitmap) => {
20
+ if (!cancelled) setNatural({ width: bitmap.width, height: bitmap.height });
21
+ bitmap.close();
22
+ });
23
+ return () => {
24
+ cancelled = true;
25
+ };
26
+ }, [clip]);
27
+ const original = natural ? natural.width / natural.height : 1;
28
+ const apply = () => {
29
+ if (!clip || !natural || !area || !area.width || !area.height) return;
30
+ const rect = {
31
+ x: Math.max(0, area.x / natural.width),
32
+ y: Math.max(0, area.y / natural.height),
33
+ w: Math.min(1, area.width / natural.width),
34
+ h: Math.min(1, area.height / natural.height)
35
+ };
36
+ usePresentation.getState().cropClip(clip.id, rect, area.width / area.height);
37
+ onOpenChange(false);
38
+ };
39
+ return /* @__PURE__ */ jsxs(
40
+ ModalScaffold,
41
+ {
42
+ open: !!clip,
43
+ onOpenChange,
44
+ title: "Crop",
45
+ description: "Choose the part of the image the clip shows.",
46
+ icon: /* @__PURE__ */ jsx(Crop, { className: "size-5" }),
47
+ size: "lg",
48
+ testId: "presentation-crop-dialog",
49
+ children: [
50
+ /* @__PURE__ */ jsx(ModalScaffold.Body, { children: url && natural && /* @__PURE__ */ jsx(
51
+ ImageCropper,
52
+ {
53
+ image: url,
54
+ aspect: original,
55
+ aspectOptions: [
56
+ { label: "Original", value: original },
57
+ { label: "16:9", value: 16 / 9 },
58
+ { label: "4:3", value: 4 / 3 },
59
+ { label: "1:1", value: 1 },
60
+ { label: "3:4", value: 3 / 4 }
61
+ ],
62
+ onCropComplete: (next) => setArea(next)
63
+ }
64
+ ) }),
65
+ /* @__PURE__ */ jsxs(ModalScaffold.Footer, { children: [
66
+ /* @__PURE__ */ jsx(Button, { type: "button", variant: "outline", onClick: () => onOpenChange(false), children: "Cancel" }),
67
+ /* @__PURE__ */ jsx(
68
+ Button,
69
+ {
70
+ type: "button",
71
+ onClick: apply,
72
+ disabled: !area,
73
+ "data-testid": "presentation-crop-apply",
74
+ children: "Crop"
75
+ }
76
+ )
77
+ ] })
78
+ ]
79
+ }
80
+ );
81
+ }
82
+ const EMPTY = new Blob();
83
+ export {
84
+ CropClipDialog
85
+ };
86
+ //# sourceMappingURL=CropClipDialog.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/connection/presentation/CropClipDialog.tsx"],
4
+ "sourcesContent": ["/**\n * Crop an image clip: the app's image cropper over the whole source image, to choose the part the\n * clip shows (and its shape). The image itself is untouched: only the clip's area changes, so it\n * can be cropped again, wider or narrower, at any time.\n */\n\nimport { useEffect, useState } from 'react'\nimport { Crop } from 'lucide-react'\nimport { ImageCropper, type CropArea } from '@arbidocs/react'\nimport { Button } from '@arbidocs/react/ui'\nimport { ModalScaffold } from '../../settings/ModalScaffold'\nimport type { Clip } from '../../presentation/model'\nimport { usePresentation } from '../../presentation/store'\nimport { useObjectUrl } from '../../presentation/useObjectUrl'\n\nexport interface CropClipDialogProps {\n clip: Clip | null\n onOpenChange: (open: boolean) => void\n}\n\nexport function CropClipDialog({ clip, onOpenChange }: CropClipDialogProps) {\n const url = useObjectUrl(clip?.source ?? EMPTY)\n const [natural, setNatural] = useState<{ width: number; height: number } | null>(null)\n const [area, setArea] = useState<CropArea | null>(null)\n\n // The source's own size, to turn the cropper's pixels into fractions of the image.\n useEffect(() => {\n setNatural(null)\n setArea(null)\n if (!clip) return\n let cancelled = false\n void createImageBitmap(clip.source).then((bitmap) => {\n if (!cancelled) setNatural({ width: bitmap.width, height: bitmap.height })\n bitmap.close()\n })\n return () => {\n cancelled = true\n }\n }, [clip])\n\n const original = natural ? natural.width / natural.height : 1\n const apply = () => {\n if (!clip || !natural || !area || !area.width || !area.height) return\n const rect = {\n x: Math.max(0, area.x / natural.width),\n y: Math.max(0, area.y / natural.height),\n w: Math.min(1, area.width / natural.width),\n h: Math.min(1, area.height / natural.height),\n }\n usePresentation.getState().cropClip(clip.id, rect, area.width / area.height)\n onOpenChange(false)\n }\n\n return (\n <ModalScaffold\n open={!!clip}\n onOpenChange={onOpenChange}\n title=\"Crop\"\n description=\"Choose the part of the image the clip shows.\"\n icon={<Crop className=\"size-5\" />}\n size=\"lg\"\n testId=\"presentation-crop-dialog\"\n >\n <ModalScaffold.Body>\n {url && natural && (\n <ImageCropper\n image={url}\n aspect={original}\n aspectOptions={[\n { label: 'Original', value: original },\n { label: '16:9', value: 16 / 9 },\n { label: '4:3', value: 4 / 3 },\n { label: '1:1', value: 1 },\n { label: '3:4', value: 3 / 4 },\n ]}\n onCropComplete={(next) => setArea(next)}\n />\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={apply}\n disabled={!area}\n data-testid=\"presentation-crop-apply\"\n >\n Crop\n </Button>\n </ModalScaffold.Footer>\n </ModalScaffold>\n )\n}\n\nconst EMPTY = new Blob()\n"],
5
+ "mappings": ";AA2DY,cAoBN,YApBM;AArDZ,SAAS,WAAW,gBAAgB;AACpC,SAAS,YAAY;AACrB,SAAS,oBAAmC;AAC5C,SAAS,cAAc;AACvB,SAAS,qBAAqB;AAE9B,SAAS,uBAAuB;AAChC,SAAS,oBAAoB;AAOtB,SAAS,eAAe,EAAE,MAAM,aAAa,GAAwB;AAC1E,QAAM,MAA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Ad,EACE,iBAAO,WACN;AAAA,UAAC;AAAA;AAAA,YACC,OAAO;AAAA,YACP,QAAQ;AAAA,YACR,eAAe;AAAA,cACb,EAAE,OAAO,YAAY,OAAO,SAAS;AAAA,cACrC,EAAE,OAAO,QAAQ,OAAO,KAAK,EAAE;AAAA,cAC/B,EAAE,OAAO,OAAO,OAAO,IAAI,EAAE;AAAA,cAC7B,EAAE,OAAO,OAAO,OAAO,EAAE;AAAA,cACzB,EAAE,OAAO,OAAO,OAAO,IAAI,EAAE;AAAA,YAC/B;AAAA,YACA,gBAAgB,CAAC,SAAS,QAAQ,IAAI;AAAA;AAAA,QACxC,GAEJ;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;AAEA,MAAM,QAAQ,IAAI,KAAK;",
6
+ "names": []
7
+ }
@@ -0,0 +1,4 @@
1
+ /** The dashed first tile of the clip tray: Generate image. */
2
+ export declare function GenerateTile({ onClick }: {
3
+ onClick: () => void;
4
+ }): import("react").JSX.Element;
@@ -0,0 +1,24 @@
1
+ "use client";
2
+ import { jsx, jsxs } from "react/jsx-runtime";
3
+ import { Sparkles } from "lucide-react";
4
+ function GenerateTile({ onClick }) {
5
+ return /* @__PURE__ */ jsxs(
6
+ "button",
7
+ {
8
+ type: "button",
9
+ onClick,
10
+ title: "Generate an image",
11
+ "aria-label": "Generate image",
12
+ className: "flex h-[72px] w-[72px] flex-col items-center justify-center gap-1 rounded-lg border border-dashed border-border text-muted-foreground hover:bg-muted hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
13
+ "data-testid": "presentation-generate-image",
14
+ children: [
15
+ /* @__PURE__ */ jsx(Sparkles, { className: "size-4" }),
16
+ /* @__PURE__ */ jsx("span", { className: "text-[10px] font-medium", children: "Generate" })
17
+ ]
18
+ }
19
+ );
20
+ }
21
+ export {
22
+ GenerateTile
23
+ };
24
+ //# sourceMappingURL=GenerateTile.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/connection/presentation/GenerateTile.tsx"],
4
+ "sourcesContent": ["import { Sparkles } from 'lucide-react'\n\n/** The dashed first tile of the clip tray: Generate image. */\nexport function GenerateTile({ onClick }: { onClick: () => void }) {\n return (\n <button\n type=\"button\"\n onClick={onClick}\n title=\"Generate an image\"\n aria-label=\"Generate image\"\n className=\"flex h-[72px] w-[72px] flex-col items-center justify-center gap-1 rounded-lg border border-dashed border-border text-muted-foreground hover:bg-muted hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring\"\n data-testid=\"presentation-generate-image\"\n >\n <Sparkles className=\"size-4\" />\n <span className=\"text-[10px] font-medium\">Generate</span>\n </button>\n )\n}\n"],
5
+ "mappings": ";AAKI,SAQE,KARF;AALJ,SAAS,gBAAgB;AAGlB,SAAS,aAAa,EAAE,QAAQ,GAA4B;AACjE,SACE;AAAA,IAAC;AAAA;AAAA,MACC,MAAK;AAAA,MACL;AAAA,MACA,OAAM;AAAA,MACN,cAAW;AAAA,MACX,WAAU;AAAA,MACV,eAAY;AAAA,MAEZ;AAAA,4BAAC,YAAS,WAAU,UAAS;AAAA,QAC7B,oBAAC,UAAK,WAAU,2BAA0B,sBAAQ;AAAA;AAAA;AAAA,EACpD;AAEJ;",
6
+ "names": []
7
+ }
@@ -0,0 +1,8 @@
1
+ import type { LabelColumn } from './useLabelColumns';
2
+ /**
3
+ * "Label clips with" in the presentation's menu: no column, or one of the workspace's annotation
4
+ * columns (`useLabelColumns`), whose value leads each clip's label.
5
+ */
6
+ export declare function LabelColumnMenu({ columns }: {
7
+ columns: LabelColumn[];
8
+ }): import("react").JSX.Element | null;
@@ -0,0 +1,38 @@
1
+ "use client";
2
+ import { jsx, jsxs } from "react/jsx-runtime";
3
+ import {
4
+ DropdownMenuRadioGroup,
5
+ DropdownMenuRadioItem,
6
+ DropdownMenuSub,
7
+ DropdownMenuSubContent,
8
+ DropdownMenuSubTrigger
9
+ } from "@arbidocs/react/ui";
10
+ import { usePresentation } from "../../presentation/store.js";
11
+ const NONE = "none";
12
+ function LabelColumnMenu({ columns }) {
13
+ const labelColumn = usePresentation((s) => s.labelColumn);
14
+ const setLabelColumn = usePresentation((s) => s.setLabelColumn);
15
+ if (!columns.length) return null;
16
+ const chosen = columns.find((column) => column.id === labelColumn);
17
+ return /* @__PURE__ */ jsxs(DropdownMenuSub, { children: [
18
+ /* @__PURE__ */ jsxs(DropdownMenuSubTrigger, { "data-testid": "presentation-label-column", children: [
19
+ "Label clips with",
20
+ /* @__PURE__ */ jsx("span", { className: "ml-auto pl-3 text-xs text-muted-foreground", children: chosen?.name ?? "None" })
21
+ ] }),
22
+ /* @__PURE__ */ jsx(DropdownMenuSubContent, { children: /* @__PURE__ */ jsxs(
23
+ DropdownMenuRadioGroup,
24
+ {
25
+ value: chosen?.id ?? NONE,
26
+ onValueChange: (value) => setLabelColumn(value === NONE ? null : value),
27
+ children: [
28
+ /* @__PURE__ */ jsx(DropdownMenuRadioItem, { value: NONE, children: "No column" }),
29
+ columns.map((column) => /* @__PURE__ */ jsx(DropdownMenuRadioItem, { value: column.id, children: column.name }, column.id))
30
+ ]
31
+ }
32
+ ) })
33
+ ] });
34
+ }
35
+ export {
36
+ LabelColumnMenu
37
+ };
38
+ //# sourceMappingURL=LabelColumnMenu.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/connection/presentation/LabelColumnMenu.tsx"],
4
+ "sourcesContent": ["import {\n DropdownMenuRadioGroup,\n DropdownMenuRadioItem,\n DropdownMenuSub,\n DropdownMenuSubContent,\n DropdownMenuSubTrigger,\n} from '@arbidocs/react/ui'\nimport { usePresentation } from '../../presentation/store'\nimport type { LabelColumn } from './useLabelColumns'\n\nconst NONE = 'none'\n\n/**\n * \"Label clips with\" in the presentation's menu: no column, or one of the workspace's annotation\n * columns (`useLabelColumns`), whose value leads each clip's label.\n */\nexport function LabelColumnMenu({ columns }: { columns: LabelColumn[] }) {\n const labelColumn = usePresentation((s) => s.labelColumn)\n const setLabelColumn = usePresentation((s) => s.setLabelColumn)\n if (!columns.length) return null\n const chosen = columns.find((column) => column.id === labelColumn)\n return (\n <DropdownMenuSub>\n <DropdownMenuSubTrigger data-testid=\"presentation-label-column\">\n Label clips with\n <span className=\"ml-auto pl-3 text-xs text-muted-foreground\">{chosen?.name ?? 'None'}</span>\n </DropdownMenuSubTrigger>\n <DropdownMenuSubContent>\n <DropdownMenuRadioGroup\n value={chosen?.id ?? NONE}\n onValueChange={(value) => setLabelColumn(value === NONE ? null : value)}\n >\n <DropdownMenuRadioItem value={NONE}>No column</DropdownMenuRadioItem>\n {columns.map((column) => (\n <DropdownMenuRadioItem key={column.id} value={column.id}>\n {column.name}\n </DropdownMenuRadioItem>\n ))}\n </DropdownMenuRadioGroup>\n </DropdownMenuSubContent>\n </DropdownMenuSub>\n )\n}\n"],
5
+ "mappings": ";AAuBM,SAEE,KAFF;AAvBN;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,uBAAuB;AAGhC,MAAM,OAAO;AAMN,SAAS,gBAAgB,EAAE,QAAQ,GAA+B;AACvE,QAAM,cAAc,gBAAgB,CAAC,MAAM,EAAE,WAAW;AACxD,QAAM,iBAAiB,gBAAgB,CAAC,MAAM,EAAE,cAAc;AAC9D,MAAI,CAAC,QAAQ,OAAQ,QAAO;AAC5B,QAAM,SAAS,QAAQ,KAAK,CAAC,WAAW,OAAO,OAAO,WAAW;AACjE,SACE,qBAAC,mBACC;AAAA,yBAAC,0BAAuB,eAAY,6BAA4B;AAAA;AAAA,MAE9D,oBAAC,UAAK,WAAU,8CAA8C,kBAAQ,QAAQ,QAAO;AAAA,OACvF;AAAA,IACA,oBAAC,0BACC;AAAA,MAAC;AAAA;AAAA,QACC,OAAO,QAAQ,MAAM;AAAA,QACrB,eAAe,CAAC,UAAU,eAAe,UAAU,OAAO,OAAO,KAAK;AAAA,QAEtE;AAAA,8BAAC,yBAAsB,OAAO,MAAM,uBAAS;AAAA,UAC5C,QAAQ,IAAI,CAAC,WACZ,oBAAC,yBAAsC,OAAO,OAAO,IAClD,iBAAO,QADkB,OAAO,EAEnC,CACD;AAAA;AAAA;AAAA,IACH,GACF;AAAA,KACF;AAEJ;",
6
+ "names": []
7
+ }
@@ -0,0 +1,39 @@
1
+ /**
2
+ * The presentation's dialogs: the app's Generate image (to create or edit an image into the clips),
3
+ * save under a title (or as a template), open a saved one (or start from a template), choose the
4
+ * theme's logo.
5
+ */
6
+ interface DialogProps {
7
+ open: boolean;
8
+ onOpenChange: (open: boolean) => void;
9
+ }
10
+ /**
11
+ * Generate image, from the presentation: the app's own Generate image dialog (the workflow's form),
12
+ * opened straight on its form, with `referenceId` as its source image when editing one. Its run
13
+ * adds the image to the clips instead of opening a chat.
14
+ */
15
+ export declare function GenerateImageDialog({ open, onOpenChange, referenceId, }: DialogProps & {
16
+ referenceId?: string | null;
17
+ }): import("react").JSX.Element | null;
18
+ /** Save the presentation under a title (in the workspace's Presentations folder). */
19
+ /** How the presentation is saved: again, as a new copy, as a template, or exported as a PDF. */
20
+ export type SaveMode = 'save' | 'saveAs' | 'export' | 'template';
21
+ /** Save under a name you type, in the workspace's Presentations folder. */
22
+ export declare function SavePresentationDialog({ open, onOpenChange, mode, }: DialogProps & {
23
+ mode?: SaveMode;
24
+ }): import("react").JSX.Element;
25
+ /**
26
+ * Open a presentation saved in this workspace, in place of this one; or (`templates`) start a new
27
+ * one from a template.
28
+ */
29
+ export declare function OpenPresentationDialog({ open, onOpenChange, onOpened, templates, }: DialogProps & {
30
+ /**
31
+ * Show the chosen presentation (the viewer's slides tab opens its document, and loads it);
32
+ * after a template, `null`: a new presentation, its look and slides already loaded.
33
+ */
34
+ onOpened: (documentId: string | null) => void;
35
+ templates?: boolean;
36
+ }): import("react").JSX.Element;
37
+ /** Design › Logo: one of the workspace's images, in the footer of every slide. */
38
+ export declare function ChooseLogoDialog({ open, onOpenChange }: DialogProps): import("react").JSX.Element;
39
+ export {};