@arbidocs/blocks 0.5.119 → 0.5.121

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (463) hide show
  1. package/dist/ClippingMediaViewer-B6WG7Q64.cjs +156 -0
  2. package/dist/ClippingMediaViewer-B6WG7Q64.cjs.map +1 -0
  3. package/dist/ClippingPdfViewer-6GCVTV3V.cjs +79 -0
  4. package/dist/ClippingPdfViewer-6GCVTV3V.cjs.map +1 -0
  5. package/dist/{ConnectedCallDock-WER7R222.cjs → ConnectedCallDock-DC5V5OUJ.cjs} +25 -23
  6. package/dist/ConnectedCallDock-DC5V5OUJ.cjs.map +1 -0
  7. package/dist/{ConnectedCallRoom-T7OBQTYP.cjs → ConnectedCallRoom-FQLXWTFB.cjs} +18 -16
  8. package/dist/{ConnectedCallRoom-T7OBQTYP.cjs.map → ConnectedCallRoom-FQLXWTFB.cjs.map} +1 -1
  9. package/dist/{ConnectedNativeDocxComparison-546ILGLW.cjs → ConnectedNativeDocxComparison-4Q5S7VLD.cjs} +17 -17
  10. package/dist/{ConnectedNativeDocxComparison-546ILGLW.cjs.map → ConnectedNativeDocxComparison-4Q5S7VLD.cjs.map} +1 -1
  11. package/dist/ConnectedPresentation-4HLDZDWV.cjs +183 -0
  12. package/dist/ConnectedPresentation-4HLDZDWV.cjs.map +1 -0
  13. package/dist/{ConnectedProductionSetDialog-LHB4VQWC.cjs → ConnectedProductionSetDialog-4EAY6KAZ.cjs} +3 -3
  14. package/dist/{ConnectedProductionSetDialog-LHB4VQWC.cjs.map → ConnectedProductionSetDialog-4EAY6KAZ.cjs.map} +1 -1
  15. package/dist/ConnectedSlidesTab-7QDE2CZD.cjs +234 -0
  16. package/dist/ConnectedSlidesTab-7QDE2CZD.cjs.map +1 -0
  17. package/dist/{ConnectedStreamedWordArtifact-S2ZFZLZQ.cjs → ConnectedStreamedWordArtifact-FFOQJBOI.cjs} +17 -17
  18. package/dist/{ConnectedStreamedWordArtifact-S2ZFZLZQ.cjs.map → ConnectedStreamedWordArtifact-FFOQJBOI.cjs.map} +1 -1
  19. package/dist/{DocumentReviewCard-ZSBZBGFK.cjs → DocumentReviewCard-SNWVEZ7S.cjs} +19 -18
  20. package/dist/DocumentReviewCard-SNWVEZ7S.cjs.map +1 -0
  21. package/dist/{FilesViewerDialog-6UKR5WEF.cjs → FilesViewerDialog-IZI63FOV.cjs} +54 -47
  22. package/dist/FilesViewerDialog-IZI63FOV.cjs.map +1 -0
  23. package/dist/{GridViewImpl-ZMJJWTOM.cjs → GridViewImpl-LTYET77Q.cjs} +3 -3
  24. package/dist/GridViewImpl-LTYET77Q.cjs.map +1 -0
  25. package/dist/{WorkspaceTableView-J3C6VH4T.cjs → WorkspaceTableView-TEIRB6VJ.cjs} +11 -10
  26. package/dist/WorkspaceTableView-TEIRB6VJ.cjs.map +1 -0
  27. package/dist/agents/index.cjs +297 -297
  28. package/dist/agents/tasks/ConversationListView.js +10 -2
  29. package/dist/agents/tasks/ConversationListView.js.map +2 -2
  30. package/dist/agents/tasks/TaskTable.js +5 -4
  31. package/dist/agents/tasks/TaskTable.js.map +2 -2
  32. package/dist/agents/tasks/WorkflowsTable.js +4 -5
  33. package/dist/agents/tasks/WorkflowsTable.js.map +2 -2
  34. package/dist/agents/tasks/taskColumns.js +1 -1
  35. package/dist/agents/tasks/taskColumns.js.map +1 -1
  36. package/dist/agents/tasks/taskTableLabels.js +1 -1
  37. package/dist/agents/tasks/taskTableLabels.js.map +1 -1
  38. package/dist/agents/tasks/workflowTableLabels.js +1 -1
  39. package/dist/agents/tasks/workflowTableLabels.js.map +1 -1
  40. package/dist/{ai-IM4A23YT.cjs → ai-KBYNRNZ6.cjs} +28 -26
  41. package/dist/ai-KBYNRNZ6.cjs.map +1 -0
  42. package/dist/calls/connected/CallControls.d.ts +2 -0
  43. package/dist/calls/connected/CallControls.js +71 -9
  44. package/dist/calls/connected/CallControls.js.map +2 -2
  45. package/dist/calls/connected/ShareDocumentDialog.d.ts +14 -0
  46. package/dist/calls/connected/ShareDocumentDialog.js +77 -0
  47. package/dist/calls/connected/ShareDocumentDialog.js.map +7 -0
  48. package/dist/calls/index.cjs +121 -121
  49. package/dist/chat/index.cjs +9 -8
  50. package/dist/{chunk-T23UTIRI.cjs → chunk-2PZT3J34.cjs} +6 -6
  51. package/dist/{chunk-T23UTIRI.cjs.map → chunk-2PZT3J34.cjs.map} +1 -1
  52. package/dist/{chunk-SGYSDABK.cjs → chunk-2W5E62EY.cjs} +6 -6
  53. package/dist/{chunk-SGYSDABK.cjs.map → chunk-2W5E62EY.cjs.map} +1 -1
  54. package/dist/{chunk-TDO5UWXF.cjs → chunk-3SCNXNHI.cjs} +5 -5
  55. package/dist/{chunk-TDO5UWXF.cjs.map → chunk-3SCNXNHI.cjs.map} +1 -1
  56. package/dist/{chunk-KTQOGT2L.cjs → chunk-474GPLCM.cjs} +7 -7
  57. package/dist/{chunk-KTQOGT2L.cjs.map → chunk-474GPLCM.cjs.map} +1 -1
  58. package/dist/{chunk-TP5PGWIO.cjs → chunk-4IOYQLKG.cjs} +3 -3
  59. package/dist/{chunk-TP5PGWIO.cjs.map → chunk-4IOYQLKG.cjs.map} +1 -1
  60. package/dist/{chunk-NY3YUCOW.cjs → chunk-4NPCDS2X.cjs} +3 -3
  61. package/dist/{chunk-NY3YUCOW.cjs.map → chunk-4NPCDS2X.cjs.map} +1 -1
  62. package/dist/{chunk-CPG7II4E.cjs → chunk-4RBQ44RY.cjs} +28 -28
  63. package/dist/chunk-4RBQ44RY.cjs.map +1 -0
  64. package/dist/{chunk-BQ5RIWWT.cjs → chunk-4VZZWYEC.cjs} +3 -3
  65. package/dist/{chunk-BQ5RIWWT.cjs.map → chunk-4VZZWYEC.cjs.map} +1 -1
  66. package/dist/{chunk-Y24V6HPR.cjs → chunk-52KGMAO5.cjs} +15 -15
  67. package/dist/{chunk-Y24V6HPR.cjs.map → chunk-52KGMAO5.cjs.map} +1 -1
  68. package/dist/{chunk-HB2O4THB.cjs → chunk-5534FYXP.cjs} +4 -4
  69. package/dist/{chunk-HB2O4THB.cjs.map → chunk-5534FYXP.cjs.map} +1 -1
  70. package/dist/chunk-5GCCUXMT.cjs +63 -0
  71. package/dist/chunk-5GCCUXMT.cjs.map +1 -0
  72. package/dist/chunk-5LTIZ44D.cjs +95 -0
  73. package/dist/chunk-5LTIZ44D.cjs.map +1 -0
  74. package/dist/{chunk-YGXOKB5Z.cjs → chunk-734NPQNR.cjs} +4 -4
  75. package/dist/{chunk-YGXOKB5Z.cjs.map → chunk-734NPQNR.cjs.map} +1 -1
  76. package/dist/{chunk-SB4M3ITT.cjs → chunk-7VUJGHMY.cjs} +444 -100
  77. package/dist/chunk-7VUJGHMY.cjs.map +1 -0
  78. package/dist/chunk-AFQTQC7A.cjs +35 -0
  79. package/dist/chunk-AFQTQC7A.cjs.map +1 -0
  80. package/dist/{chunk-XKVPSOKP.cjs → chunk-AY6EZSZB.cjs} +4 -4
  81. package/dist/{chunk-XKVPSOKP.cjs.map → chunk-AY6EZSZB.cjs.map} +1 -1
  82. package/dist/{chunk-TT4IF52H.cjs → chunk-BVAT4EVC.cjs} +40 -41
  83. package/dist/chunk-BVAT4EVC.cjs.map +1 -0
  84. package/dist/{chunk-VGCTYTEW.cjs → chunk-C2OICDMI.cjs} +10 -10
  85. package/dist/{chunk-VGCTYTEW.cjs.map → chunk-C2OICDMI.cjs.map} +1 -1
  86. package/dist/{chunk-CPR6EHG7.cjs → chunk-DR2AH7JL.cjs} +179 -55
  87. package/dist/chunk-DR2AH7JL.cjs.map +1 -0
  88. package/dist/{chunk-NJCK6V6U.cjs → chunk-EATIFPKP.cjs} +4 -60
  89. package/dist/chunk-EATIFPKP.cjs.map +1 -0
  90. package/dist/{chunk-B3LZITVF.cjs → chunk-EHP6OH5D.cjs} +11 -451
  91. package/dist/chunk-EHP6OH5D.cjs.map +1 -0
  92. package/dist/{chunk-DDIW4HLU.cjs → chunk-ENGL7P3I.cjs} +46 -37
  93. package/dist/chunk-ENGL7P3I.cjs.map +1 -0
  94. package/dist/{chunk-QHOHDNBU.cjs → chunk-FKFQCK3C.cjs} +4 -4
  95. package/dist/{chunk-QHOHDNBU.cjs.map → chunk-FKFQCK3C.cjs.map} +1 -1
  96. package/dist/{chunk-6UTKM5AB.cjs → chunk-GKVE5JGB.cjs} +76 -76
  97. package/dist/chunk-GKVE5JGB.cjs.map +1 -0
  98. package/dist/{chunk-B2HNNG25.cjs → chunk-GPX5VC57.cjs} +50 -50
  99. package/dist/{chunk-B2HNNG25.cjs.map → chunk-GPX5VC57.cjs.map} +1 -1
  100. package/dist/{chunk-WAV762GP.cjs → chunk-GQXPNIRE.cjs} +6 -6
  101. package/dist/{chunk-WAV762GP.cjs.map → chunk-GQXPNIRE.cjs.map} +1 -1
  102. package/dist/chunk-GX2EBMJW.cjs +133 -0
  103. package/dist/chunk-GX2EBMJW.cjs.map +1 -0
  104. package/dist/{chunk-7OPOPYV6.cjs → chunk-H5OLHP2U.cjs} +3 -3
  105. package/dist/{chunk-7OPOPYV6.cjs.map → chunk-H5OLHP2U.cjs.map} +1 -1
  106. package/dist/chunk-HYUKPHCT.cjs +66 -0
  107. package/dist/chunk-HYUKPHCT.cjs.map +1 -0
  108. package/dist/{chunk-NNUK5ZM7.cjs → chunk-JQLWKNJO.cjs} +29 -27
  109. package/dist/chunk-JQLWKNJO.cjs.map +1 -0
  110. package/dist/{chunk-OEREKAAP.cjs → chunk-JZEYHDWJ.cjs} +75 -75
  111. package/dist/{chunk-OEREKAAP.cjs.map → chunk-JZEYHDWJ.cjs.map} +1 -1
  112. package/dist/{chunk-PGJYD67F.cjs → chunk-KNGZZC4O.cjs} +7 -6
  113. package/dist/chunk-KNGZZC4O.cjs.map +1 -0
  114. package/dist/{chunk-NIE3N6OM.cjs → chunk-KP5AITQ4.cjs} +10 -10
  115. package/dist/{chunk-NIE3N6OM.cjs.map → chunk-KP5AITQ4.cjs.map} +1 -1
  116. package/dist/{chunk-YYPZOEED.cjs → chunk-LHWOKOMP.cjs} +23 -2
  117. package/dist/chunk-LHWOKOMP.cjs.map +1 -0
  118. package/dist/{chunk-57NHXEU2.cjs → chunk-MXBXZXXQ.cjs} +5 -5
  119. package/dist/{chunk-57NHXEU2.cjs.map → chunk-MXBXZXXQ.cjs.map} +1 -1
  120. package/dist/{chunk-WXUU3COI.cjs → chunk-MZ2KZXNU.cjs} +3 -3
  121. package/dist/{chunk-WXUU3COI.cjs.map → chunk-MZ2KZXNU.cjs.map} +1 -1
  122. package/dist/chunk-NAJN32MF.cjs +154 -0
  123. package/dist/chunk-NAJN32MF.cjs.map +1 -0
  124. package/dist/{chunk-557MJ4IH.cjs → chunk-NLOETJCB.cjs} +17 -154
  125. package/dist/chunk-NLOETJCB.cjs.map +1 -0
  126. package/dist/{chunk-4XJEHKVZ.cjs → chunk-PIYYBPHH.cjs} +4 -4
  127. package/dist/{chunk-4XJEHKVZ.cjs.map → chunk-PIYYBPHH.cjs.map} +1 -1
  128. package/dist/chunk-Q3XJUXID.cjs +4774 -0
  129. package/dist/chunk-Q3XJUXID.cjs.map +1 -0
  130. package/dist/{chunk-325GVZE6.cjs → chunk-Q6DQGGP4.cjs} +3 -3
  131. package/dist/{chunk-325GVZE6.cjs.map → chunk-Q6DQGGP4.cjs.map} +1 -1
  132. package/dist/chunk-QFXILJMJ.cjs +458 -0
  133. package/dist/chunk-QFXILJMJ.cjs.map +1 -0
  134. package/dist/{chunk-R7CJEIA5.cjs → chunk-RYVZDFVO.cjs} +8 -9
  135. package/dist/chunk-RYVZDFVO.cjs.map +1 -0
  136. package/dist/{chunk-VLCY46K6.cjs → chunk-TG2GM7WJ.cjs} +4 -3
  137. package/dist/chunk-TG2GM7WJ.cjs.map +1 -0
  138. package/dist/{chunk-EOG6OT5I.cjs → chunk-TXP2N3DC.cjs} +4 -4
  139. package/dist/{chunk-EOG6OT5I.cjs.map → chunk-TXP2N3DC.cjs.map} +1 -1
  140. package/dist/{chunk-KXIRVKCJ.cjs → chunk-UUENH4BJ.cjs} +3 -3
  141. package/dist/{chunk-KXIRVKCJ.cjs.map → chunk-UUENH4BJ.cjs.map} +1 -1
  142. package/dist/chunk-VJ5ZLRBD.cjs +27 -0
  143. package/dist/chunk-VJ5ZLRBD.cjs.map +1 -0
  144. package/dist/{chunk-P77YTTJ3.cjs → chunk-W6B3RYTX.cjs} +4 -4
  145. package/dist/{chunk-P77YTTJ3.cjs.map → chunk-W6B3RYTX.cjs.map} +1 -1
  146. package/dist/chunk-WOOOMTTA.cjs +19 -0
  147. package/dist/chunk-WOOOMTTA.cjs.map +1 -0
  148. package/dist/{chunk-ZPPMAL5P.cjs → chunk-WQMR3O2D.cjs} +6 -10
  149. package/dist/chunk-WQMR3O2D.cjs.map +1 -0
  150. package/dist/{chunk-CJYWHUZR.cjs → chunk-XCKHOXRP.cjs} +4 -4
  151. package/dist/{chunk-CJYWHUZR.cjs.map → chunk-XCKHOXRP.cjs.map} +1 -1
  152. package/dist/{chunk-6WMMZLEV.cjs → chunk-XJEXFEWG.cjs} +2 -27
  153. package/dist/chunk-XJEXFEWG.cjs.map +1 -0
  154. package/dist/chunk-XK4TVJKD.cjs +73 -0
  155. package/dist/chunk-XK4TVJKD.cjs.map +1 -0
  156. package/dist/chunk-XTR26TNE.cjs +1358 -0
  157. package/dist/chunk-XTR26TNE.cjs.map +1 -0
  158. package/dist/{chunk-E7TE2WVT.cjs → chunk-ZVEW3JBT.cjs} +3 -3
  159. package/dist/{chunk-E7TE2WVT.cjs.map → chunk-ZVEW3JBT.cjs.map} +1 -1
  160. package/dist/collaboration/index.cjs +73 -73
  161. package/dist/collaboration/sharing/ShareControl.js +10 -2
  162. package/dist/collaboration/sharing/ShareControl.js.map +2 -2
  163. package/dist/components/SharedCell.d.ts +2 -4
  164. package/dist/components/SharedCell.js +4 -8
  165. package/dist/components/SharedCell.js.map +2 -2
  166. package/dist/components/ZoomSlider.d.ts +25 -0
  167. package/dist/components/ZoomSlider.js +59 -0
  168. package/dist/components/ZoomSlider.js.map +7 -0
  169. package/dist/connect/docx.cjs +20 -20
  170. package/dist/connect/index.cjs +1210 -1264
  171. package/dist/connect/index.cjs.map +1 -1
  172. package/dist/connect/viewer.cjs +42 -36
  173. package/dist/connection/ai.d.ts +1 -1
  174. package/dist/connection/facts/factPageColumns.js +3 -9
  175. package/dist/connection/facts/factPageColumns.js.map +2 -2
  176. package/dist/connection/files/ConnectedNewFileMenu.d.ts +2 -1
  177. package/dist/connection/files/ConnectedNewFileMenu.js +9 -3
  178. package/dist/connection/files/ConnectedNewFileMenu.js.map +2 -2
  179. package/dist/connection/files/explorer/ConnectedFilesExplorer.js +1 -1
  180. package/dist/connection/files/explorer/ConnectedFilesExplorer.js.map +2 -2
  181. package/dist/connection/files/explorer/FileTiles.js +1 -1
  182. package/dist/connection/files/explorer/FileTiles.js.map +2 -2
  183. package/dist/connection/files/fields/documentField.js +1 -1
  184. package/dist/connection/files/fields/documentField.js.map +2 -2
  185. package/dist/connection/files/grid/cells.js +1 -3
  186. package/dist/connection/files/grid/cells.js.map +2 -2
  187. package/dist/connection/files/grid/documentColumns.js +4 -3
  188. package/dist/connection/files/grid/documentColumns.js.map +2 -2
  189. package/dist/connection/files/page/DocumentsFilterBarActions.js +17 -28
  190. package/dist/connection/files/page/DocumentsFilterBarActions.js.map +2 -2
  191. package/dist/connection/mail/useMailboxDefaults.js +1 -1
  192. package/dist/connection/mail/useMailboxDefaults.js.map +2 -2
  193. package/dist/connection/panels/useSessionPanelMode.js +3 -2
  194. package/dist/connection/panels/useSessionPanelMode.js.map +2 -2
  195. package/dist/connection/presentation/ClippingMediaViewer.d.ts +12 -0
  196. package/dist/connection/presentation/ClippingMediaViewer.js +153 -0
  197. package/dist/connection/presentation/ClippingMediaViewer.js.map +7 -0
  198. package/dist/connection/presentation/ClippingPdfViewer.d.ts +22 -0
  199. package/dist/connection/presentation/ClippingPdfViewer.js +75 -0
  200. package/dist/connection/presentation/ClippingPdfViewer.js.map +7 -0
  201. package/dist/connection/presentation/ConnectedPresentation.d.ts +12 -0
  202. package/dist/connection/presentation/ConnectedPresentation.js +100 -0
  203. package/dist/connection/presentation/ConnectedPresentation.js.map +7 -0
  204. package/dist/connection/presentation/ConnectedSlidesTab.d.ts +20 -0
  205. package/dist/connection/presentation/ConnectedSlidesTab.js +220 -0
  206. package/dist/connection/presentation/ConnectedSlidesTab.js.map +7 -0
  207. package/dist/connection/presentation/CropClipDialog.d.ts +11 -0
  208. package/dist/connection/presentation/CropClipDialog.js +86 -0
  209. package/dist/connection/presentation/CropClipDialog.js.map +7 -0
  210. package/dist/connection/presentation/GenerateTile.d.ts +4 -0
  211. package/dist/connection/presentation/GenerateTile.js +24 -0
  212. package/dist/connection/presentation/GenerateTile.js.map +7 -0
  213. package/dist/connection/presentation/LabelColumnMenu.d.ts +8 -0
  214. package/dist/connection/presentation/LabelColumnMenu.js +38 -0
  215. package/dist/connection/presentation/LabelColumnMenu.js.map +7 -0
  216. package/dist/connection/presentation/PresentationDialogs.d.ts +39 -0
  217. package/dist/connection/presentation/PresentationDialogs.js +295 -0
  218. package/dist/connection/presentation/PresentationDialogs.js.map +7 -0
  219. package/dist/connection/presentation/PresentationFileCard.d.ts +10 -0
  220. package/dist/connection/presentation/PresentationFileCard.js +35 -0
  221. package/dist/connection/presentation/PresentationFileCard.js.map +7 -0
  222. package/dist/connection/presentation/PresentationPill.d.ts +8 -0
  223. package/dist/connection/presentation/PresentationPill.js +44 -0
  224. package/dist/connection/presentation/PresentationPill.js.map +7 -0
  225. package/dist/connection/presentation/PresentationSlot.d.ts +7 -0
  226. package/dist/connection/presentation/PresentationSlot.js +35 -0
  227. package/dist/connection/presentation/PresentationSlot.js.map +7 -0
  228. package/dist/connection/presentation/requests.d.ts +16 -0
  229. package/dist/connection/presentation/requests.js +20 -0
  230. package/dist/connection/presentation/requests.js.map +7 -0
  231. package/dist/connection/presentation/useImageGeneration.d.ts +11 -0
  232. package/dist/connection/presentation/useImageGeneration.js +66 -0
  233. package/dist/connection/presentation/useImageGeneration.js.map +7 -0
  234. package/dist/connection/presentation/useLabelColumns.d.ts +15 -0
  235. package/dist/connection/presentation/useLabelColumns.js +33 -0
  236. package/dist/connection/presentation/useLabelColumns.js.map +7 -0
  237. package/dist/connection/presentation/usePresentationController.d.ts +15 -0
  238. package/dist/connection/presentation/usePresentationController.js +118 -0
  239. package/dist/connection/presentation/usePresentationController.js.map +7 -0
  240. package/dist/connection/presentation/usePresentationFiles.d.ts +44 -0
  241. package/dist/connection/presentation/usePresentationFiles.js +307 -0
  242. package/dist/connection/presentation/usePresentationFiles.js.map +7 -0
  243. package/dist/connection/presentation/useViewerClipping.d.ts +14 -0
  244. package/dist/connection/presentation/useViewerClipping.js +18 -0
  245. package/dist/connection/presentation/useViewerClipping.js.map +7 -0
  246. package/dist/connection/sharing/WorkspaceMembersList.d.ts +4 -0
  247. package/dist/connection/sharing/WorkspaceMembersList.js +34 -0
  248. package/dist/connection/sharing/WorkspaceMembersList.js.map +7 -0
  249. package/dist/connection/shell/ConnectedAppShell.js +9 -1
  250. package/dist/connection/shell/ConnectedAppShell.js.map +2 -2
  251. package/dist/connection/viewer/CleanViewControl.d.ts +8 -0
  252. package/dist/connection/viewer/CleanViewControl.js +76 -0
  253. package/dist/connection/viewer/CleanViewControl.js.map +7 -0
  254. package/dist/connection/viewer/ConnectedDocumentViewer.js +31 -31
  255. package/dist/connection/viewer/ConnectedDocumentViewer.js.map +2 -2
  256. package/dist/connection/viewer/ViewerCropModal.d.ts +5 -0
  257. package/dist/connection/viewer/ViewerCropModal.js +22 -0
  258. package/dist/connection/viewer/ViewerCropModal.js.map +7 -0
  259. package/dist/connection/viewer/ViewerPdfPane.d.ts +3 -1
  260. package/dist/connection/viewer/ViewerPdfPane.js +57 -2
  261. package/dist/connection/viewer/ViewerPdfPane.js.map +2 -2
  262. package/dist/connection/viewer/drafts.js +6 -4
  263. package/dist/connection/viewer/drafts.js.map +2 -2
  264. package/dist/connection/viewer/pdf/PdfPassageHighlights.d.ts +12 -0
  265. package/dist/connection/viewer/pdf/PdfPassageHighlights.js +36 -0
  266. package/dist/connection/viewer/pdf/PdfPassageHighlights.js.map +7 -0
  267. package/dist/connection/viewer/pdf/passageHighlights.d.ts +26 -0
  268. package/dist/connection/viewer/pdf/passageHighlights.js +40 -0
  269. package/dist/connection/viewer/pdf/passageHighlights.js.map +7 -0
  270. package/dist/connection/viewer/pdf/usePdfPassageHighlights.d.ts +9 -0
  271. package/dist/connection/viewer/pdf/usePdfPassageHighlights.js +47 -0
  272. package/dist/connection/viewer/pdf/usePdfPassageHighlights.js.map +7 -0
  273. package/dist/connection/viewer/shareDocument.d.ts +11 -0
  274. package/dist/connection/viewer/shareDocument.js +11 -0
  275. package/dist/connection/viewer/shareDocument.js.map +7 -0
  276. package/dist/connection/viewer/slidesTabChunk.d.ts +2 -0
  277. package/dist/connection/viewer/slidesTabChunk.js +9 -0
  278. package/dist/connection/viewer/slidesTabChunk.js.map +7 -0
  279. package/dist/connection/viewer/useCleanView.d.ts +14 -0
  280. package/dist/connection/viewer/useCleanView.js +29 -0
  281. package/dist/connection/viewer/useCleanView.js.map +7 -0
  282. package/dist/connection/viewer/useViewedDocument.d.ts +1 -0
  283. package/dist/connection/viewer/useViewedDocument.js +9 -1
  284. package/dist/connection/viewer/useViewedDocument.js.map +2 -2
  285. package/dist/connection/viewer/useViewerTabs.js +18 -4
  286. package/dist/connection/viewer/useViewerTabs.js.map +2 -2
  287. package/dist/connection/workflows/ConnectedWorkflowStart.d.ts +14 -2
  288. package/dist/connection/workflows/ConnectedWorkflowStart.js +5 -2
  289. package/dist/connection/workflows/ConnectedWorkflowStart.js.map +2 -2
  290. package/dist/connection/workflows/workflowsPageLabels.js +1 -1
  291. package/dist/connection/workflows/workflowsPageLabels.js.map +1 -1
  292. package/dist/dashboards/index.cjs +1 -1
  293. package/dist/databases/index.cjs +49 -49
  294. package/dist/document-tools/DocumentToolButtons.d.ts +2 -0
  295. package/dist/document-tools/DocumentToolButtons.js +22 -1
  296. package/dist/document-tools/DocumentToolButtons.js.map +2 -2
  297. package/dist/document-tools/index.cjs +16 -12
  298. package/dist/document-tools/index.d.ts +1 -1
  299. package/dist/document-tools/index.js +2 -0
  300. package/dist/document-tools/index.js.map +2 -2
  301. package/dist/embed/index.cjs +43 -41
  302. package/dist/facts/factColumns.js +3 -3
  303. package/dist/facts/factColumns.js.map +1 -1
  304. package/dist/facts/index.cjs +42 -42
  305. package/dist/files/GridViewImpl.js +1 -1
  306. package/dist/files/GridViewImpl.js.map +2 -2
  307. package/dist/files/HtmlViewerParts.js +7 -15
  308. package/dist/files/HtmlViewerParts.js.map +2 -2
  309. package/dist/files/ViewerChrome.d.ts +5 -1
  310. package/dist/files/ViewerChrome.js +16 -6
  311. package/dist/files/ViewerChrome.js.map +2 -2
  312. package/dist/files/index.cjs +226 -226
  313. package/dist/files/navigator/DocumentSearchList.js +1 -1
  314. package/dist/files/navigator/DocumentSearchList.js.map +2 -2
  315. package/dist/index.cjs +1668 -1666
  316. package/dist/index.cjs.map +1 -1
  317. package/dist/presentation/BoxActionBar.d.ts +11 -0
  318. package/dist/presentation/BoxActionBar.js +182 -0
  319. package/dist/presentation/BoxActionBar.js.map +7 -0
  320. package/dist/presentation/ClipActionBar.d.ts +26 -0
  321. package/dist/presentation/ClipActionBar.js +103 -0
  322. package/dist/presentation/ClipActionBar.js.map +7 -0
  323. package/dist/presentation/ClipCaptureOverlay.d.ts +14 -0
  324. package/dist/presentation/ClipCaptureOverlay.js +69 -0
  325. package/dist/presentation/ClipCaptureOverlay.js.map +7 -0
  326. package/dist/presentation/ClipImage.d.ts +21 -0
  327. package/dist/presentation/ClipImage.js +119 -0
  328. package/dist/presentation/ClipImage.js.map +7 -0
  329. package/dist/presentation/ClipTray.d.ts +11 -0
  330. package/dist/presentation/ClipTray.js +152 -0
  331. package/dist/presentation/ClipTray.js.map +7 -0
  332. package/dist/presentation/ClipViewControls.d.ts +11 -0
  333. package/dist/presentation/ClipViewControls.js +142 -0
  334. package/dist/presentation/ClipViewControls.js.map +7 -0
  335. package/dist/presentation/DesignMenu.d.ts +8 -0
  336. package/dist/presentation/DesignMenu.js +199 -0
  337. package/dist/presentation/DesignMenu.js.map +7 -0
  338. package/dist/presentation/LayoutMenu.d.ts +17 -0
  339. package/dist/presentation/LayoutMenu.js +122 -0
  340. package/dist/presentation/LayoutMenu.js.map +7 -0
  341. package/dist/presentation/MediaClip.d.ts +15 -0
  342. package/dist/presentation/MediaClip.js +67 -0
  343. package/dist/presentation/MediaClip.js.map +7 -0
  344. package/dist/presentation/Notice.d.ts +6 -0
  345. package/dist/presentation/Notice.js +43 -0
  346. package/dist/presentation/Notice.js.map +7 -0
  347. package/dist/presentation/PresentationStage.d.ts +32 -0
  348. package/dist/presentation/PresentationStage.js +232 -0
  349. package/dist/presentation/PresentationStage.js.map +7 -0
  350. package/dist/presentation/PresenterView.d.ts +16 -0
  351. package/dist/presentation/PresenterView.js +69 -0
  352. package/dist/presentation/PresenterView.js.map +7 -0
  353. package/dist/presentation/SlideDecor.d.ts +25 -0
  354. package/dist/presentation/SlideDecor.js +189 -0
  355. package/dist/presentation/SlideDecor.js.map +7 -0
  356. package/dist/presentation/SlidesEditor.d.ts +25 -0
  357. package/dist/presentation/SlidesEditor.js +359 -0
  358. package/dist/presentation/SlidesEditor.js.map +7 -0
  359. package/dist/presentation/StageBox.d.ts +30 -0
  360. package/dist/presentation/StageBox.js +281 -0
  361. package/dist/presentation/StageBox.js.map +7 -0
  362. package/dist/presentation/StageItem.d.ts +37 -0
  363. package/dist/presentation/StageItem.js +211 -0
  364. package/dist/presentation/StageItem.js.map +7 -0
  365. package/dist/presentation/box-style.d.ts +6 -0
  366. package/dist/presentation/box-style.js +19 -0
  367. package/dist/presentation/box-style.js.map +7 -0
  368. package/dist/presentation/boxes.d.ts +105 -0
  369. package/dist/presentation/boxes.js +103 -0
  370. package/dist/presentation/boxes.js.map +7 -0
  371. package/dist/presentation/draw-boxes.d.ts +8 -0
  372. package/dist/presentation/draw-boxes.js +130 -0
  373. package/dist/presentation/draw-boxes.js.map +7 -0
  374. package/dist/presentation/export-boxes.d.ts +10 -0
  375. package/dist/presentation/export-boxes.js +74 -0
  376. package/dist/presentation/export-boxes.js.map +7 -0
  377. package/dist/presentation/export-pptx.d.ts +16 -0
  378. package/dist/presentation/export-pptx.js +194 -0
  379. package/dist/presentation/export-pptx.js.map +7 -0
  380. package/dist/presentation/import-pptx.d.ts +35 -0
  381. package/dist/presentation/import-pptx.js +659 -0
  382. package/dist/presentation/import-pptx.js.map +7 -0
  383. package/dist/presentation/merge-outside-edits.d.ts +12 -0
  384. package/dist/presentation/merge-outside-edits.js +35 -0
  385. package/dist/presentation/merge-outside-edits.js.map +7 -0
  386. package/dist/presentation/model.d.ts +201 -0
  387. package/dist/presentation/model.js +271 -0
  388. package/dist/presentation/model.js.map +7 -0
  389. package/dist/presentation/panel-id.d.ts +34 -0
  390. package/dist/presentation/panel-id.js +24 -0
  391. package/dist/presentation/panel-id.js.map +7 -0
  392. package/dist/presentation/persistence.d.ts +121 -0
  393. package/dist/presentation/persistence.js +141 -0
  394. package/dist/presentation/persistence.js.map +7 -0
  395. package/dist/presentation/pptx-data.d.ts +22 -0
  396. package/dist/presentation/pptx-data.js +83 -0
  397. package/dist/presentation/pptx-data.js.map +7 -0
  398. package/dist/presentation/pptx-xml.d.ts +90 -0
  399. package/dist/presentation/pptx-xml.js +333 -0
  400. package/dist/presentation/pptx-xml.js.map +7 -0
  401. package/dist/presentation/render-slides.d.ts +58 -0
  402. package/dist/presentation/render-slides.js +309 -0
  403. package/dist/presentation/render-slides.js.map +7 -0
  404. package/dist/presentation/saved-boxes.d.ts +11 -0
  405. package/dist/presentation/saved-boxes.js +80 -0
  406. package/dist/presentation/saved-boxes.js.map +7 -0
  407. package/dist/presentation/slide-layout.d.ts +54 -0
  408. package/dist/presentation/slide-layout.js +117 -0
  409. package/dist/presentation/slide-layout.js.map +7 -0
  410. package/dist/presentation/stage-videos.d.ts +5 -0
  411. package/dist/presentation/stage-videos.js +19 -0
  412. package/dist/presentation/stage-videos.js.map +7 -0
  413. package/dist/presentation/store.d.ts +203 -0
  414. package/dist/presentation/store.js +429 -0
  415. package/dist/presentation/store.js.map +7 -0
  416. package/dist/presentation/theme.d.ts +102 -0
  417. package/dist/presentation/theme.js +276 -0
  418. package/dist/presentation/theme.js.map +7 -0
  419. package/dist/presentation/useClipDrag.d.ts +26 -0
  420. package/dist/presentation/useClipDrag.js +65 -0
  421. package/dist/presentation/useClipDrag.js.map +7 -0
  422. package/dist/presentation/useObjectUrl.d.ts +6 -0
  423. package/dist/presentation/useObjectUrl.js +15 -0
  424. package/dist/presentation/useObjectUrl.js.map +7 -0
  425. package/dist/presentation/usePresenterKeys.d.ts +13 -0
  426. package/dist/presentation/usePresenterKeys.js +62 -0
  427. package/dist/presentation/usePresenterKeys.js.map +7 -0
  428. package/dist/settings/index.cjs +151 -150
  429. package/dist/shell/PanelPortal.js +1 -0
  430. package/dist/shell/PanelPortal.js.map +2 -2
  431. package/dist/shell/index.cjs +112 -110
  432. package/dist/shell/panel-windows.d.ts +2 -0
  433. package/dist/shell/panel-windows.js +7 -2
  434. package/dist/shell/panel-windows.js.map +2 -2
  435. package/dist/studio/index.cjs +28 -26
  436. package/dist/studio/index.cjs.map +1 -1
  437. package/dist/styles.css +1 -1
  438. package/dist/workflow-canvas/index.cjs +58 -57
  439. package/dist/workflow-canvas/index.cjs.map +1 -1
  440. package/node_modules/@arbidocs/coedit/package.json +1 -1
  441. package/package.json +6 -5
  442. package/dist/ConnectedCallDock-WER7R222.cjs.map +0 -1
  443. package/dist/DocumentReviewCard-ZSBZBGFK.cjs.map +0 -1
  444. package/dist/FilesViewerDialog-6UKR5WEF.cjs.map +0 -1
  445. package/dist/GridViewImpl-ZMJJWTOM.cjs.map +0 -1
  446. package/dist/WorkspaceTableView-J3C6VH4T.cjs.map +0 -1
  447. package/dist/ai-IM4A23YT.cjs.map +0 -1
  448. package/dist/chunk-557MJ4IH.cjs.map +0 -1
  449. package/dist/chunk-6UTKM5AB.cjs.map +0 -1
  450. package/dist/chunk-6WMMZLEV.cjs.map +0 -1
  451. package/dist/chunk-B3LZITVF.cjs.map +0 -1
  452. package/dist/chunk-CPG7II4E.cjs.map +0 -1
  453. package/dist/chunk-CPR6EHG7.cjs.map +0 -1
  454. package/dist/chunk-DDIW4HLU.cjs.map +0 -1
  455. package/dist/chunk-NJCK6V6U.cjs.map +0 -1
  456. package/dist/chunk-NNUK5ZM7.cjs.map +0 -1
  457. package/dist/chunk-PGJYD67F.cjs.map +0 -1
  458. package/dist/chunk-R7CJEIA5.cjs.map +0 -1
  459. package/dist/chunk-SB4M3ITT.cjs.map +0 -1
  460. package/dist/chunk-TT4IF52H.cjs.map +0 -1
  461. package/dist/chunk-VLCY46K6.cjs.map +0 -1
  462. package/dist/chunk-YYPZOEED.cjs.map +0 -1
  463. package/dist/chunk-ZPPMAL5P.cjs.map +0 -1
@@ -0,0 +1,5 @@
1
+ /** The presented stage's videos, which the presenter plays and pauses with Space. */
2
+ /** Marks the stage's videos, for the presenter's Space key. */
3
+ export declare const STAGE_VIDEO_ATTRIBUTE = "data-presentation-video";
4
+ /** Play the presented stage's videos, or pause them if any is playing. */
5
+ export declare function toggleStageVideos(doc: Document): boolean;
@@ -0,0 +1,19 @@
1
+ "use client";
2
+ const STAGE_VIDEO_ATTRIBUTE = "data-presentation-video";
3
+ function toggleStageVideos(doc) {
4
+ const videos = Array.from(
5
+ doc.querySelectorAll(`video[${STAGE_VIDEO_ATTRIBUTE}]`)
6
+ );
7
+ if (!videos.length) return false;
8
+ const playing = videos.some((video) => !video.paused);
9
+ for (const video of videos) {
10
+ if (playing) video.pause();
11
+ else void video.play().catch(() => void 0);
12
+ }
13
+ return true;
14
+ }
15
+ export {
16
+ STAGE_VIDEO_ATTRIBUTE,
17
+ toggleStageVideos
18
+ };
19
+ //# sourceMappingURL=stage-videos.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/presentation/stage-videos.ts"],
4
+ "sourcesContent": ["/** The presented stage's videos, which the presenter plays and pauses with Space. */\n\n/** Marks the stage's videos, for the presenter's Space key. */\nexport const STAGE_VIDEO_ATTRIBUTE = 'data-presentation-video'\n\n/** Play the presented stage's videos, or pause them if any is playing. */\nexport function toggleStageVideos(doc: Document): boolean {\n const videos = Array.from(\n doc.querySelectorAll<HTMLVideoElement>(`video[${STAGE_VIDEO_ATTRIBUTE}]`)\n )\n if (!videos.length) return false\n const playing = videos.some((video) => !video.paused)\n for (const video of videos) {\n if (playing) video.pause()\n else void video.play().catch(() => undefined)\n }\n return true\n}\n"],
5
+ "mappings": ";AAGO,MAAM,wBAAwB;AAG9B,SAAS,kBAAkB,KAAwB;AACxD,QAAM,SAAS,MAAM;AAAA,IACnB,IAAI,iBAAmC,SAAS,qBAAqB,GAAG;AAAA,EAC1E;AACA,MAAI,CAAC,OAAO,OAAQ,QAAO;AAC3B,QAAM,UAAU,OAAO,KAAK,CAAC,UAAU,CAAC,MAAM,MAAM;AACpD,aAAW,SAAS,QAAQ;AAC1B,QAAI,QAAS,OAAM,MAAM;AAAA,QACpB,MAAK,MAAM,KAAK,EAAE,MAAM,MAAM,MAAS;AAAA,EAC9C;AACA,SAAO;AACT;",
6
+ "names": []
7
+ }
@@ -0,0 +1,203 @@
1
+ /**
2
+ * The presentation of this session: the clips taken, the slides they are arranged on, the slide on
3
+ * the stage, whether the stage is blanked and whether the presentation window presents (shows only
4
+ * the stage, for sharing) or edits. Clips taken in the app's viewer land in it at once.
5
+ *
6
+ * Kept in memory only: a clip holds the decrypted PDF it is drawn from, so nothing is written to
7
+ * storage, and everything is cleared when the session signs out (`ConnectedPresentation`).
8
+ */
9
+ import { type Alignment, type Clip, type Rect, type Reserve, type Frame, type Slide, type SlideLayout } from './model';
10
+ import { type Theme } from './theme';
11
+ import { type SlideBackground, type SlideBox } from './boxes';
12
+ import type { SavedBox } from './saved-boxes';
13
+ /** A slide holds a handful of clips: more would be too small to read on a shared screen. */
14
+ export declare const MAX_ITEMS_PER_SLIDE = 6;
15
+ export type NewClip = Omit<Clip, 'id' | 'caption'> & {
16
+ caption?: string;
17
+ };
18
+ export type FrameCommand = 'fullWidth' | 'fullHeight' | 'fit';
19
+ interface PresentationState {
20
+ clips: Clip[];
21
+ slides: Slide[];
22
+ /** Index of the slide on the stage. */
23
+ current: number;
24
+ /** The stage shows nothing (black) while true. */
25
+ blank: boolean;
26
+ captions: boolean;
27
+ /** One look for every slide: background, typeface, accent, logo. Saved. */
28
+ theme: Theme;
29
+ /** The theme's logo image (this session only; fetched by the host from `theme.logo`). */
30
+ logoImage: Blob | null;
31
+ /**
32
+ * The annotation column (a tag's id) whose value for each clip's document leads its label: an
33
+ * Exhibit column's "R-100". Saved with the presentation.
34
+ */
35
+ labelColumn: string | null;
36
+ /** Each clip document's value in `labelColumn`, kept current by the host (not saved). */
37
+ columnValues: Readonly<Record<string, string>>;
38
+ /** Present mode: the presentation window shows only the stage (what is shared). */
39
+ presenting: boolean;
40
+ /** The presentation's name (its file's, once saved). */
41
+ title: string;
42
+ /** The document it is saved as, once saved: saving again adds a version to it. */
43
+ savedId: string | null;
44
+ /** Which version of that document this is (as opened or saved), when known. */
45
+ version: number | null;
46
+ /**
47
+ * The document (or draft) this presentation is edited as, in the viewer: its slides tab shows
48
+ * it. Null: clips gathered with no presentation open yet (a new one takes them).
49
+ */
50
+ boundTo: string | null;
51
+ /** The presentation as last opened or saved (serialised), to tell unsaved changes; null: never. */
52
+ clean: string | null;
53
+ /**
54
+ * A message for the presentation window itself (saved, failed…): the app's notifications show in
55
+ * the app's window, out of sight behind a popped-out presentation.
56
+ */
57
+ notice: {
58
+ text: string;
59
+ kind: 'success' | 'error';
60
+ id: number;
61
+ } | null;
62
+ /** The clip being dragged from the tray, while it is (the drop targets light up). */
63
+ dragging: string | null;
64
+ /** Images embedded in the presentation (an imported deck's pictures), as data URLs, by key. */
65
+ media: Readonly<Record<string, string>>;
66
+ }
67
+ interface PresentationActions {
68
+ /** Add a clip; it is placed on the current slide while that has fewer than two. */
69
+ addClip(clip: NewClip): string;
70
+ removeClip(clipId: string): void;
71
+ setCaption(clipId: string, caption: string): void;
72
+ /** Put a clip on the current slide (at a point, when dropped there). */
73
+ place(clipId: string, at?: {
74
+ x: number;
75
+ y: number;
76
+ }): void;
77
+ unplace(clipId: string): void;
78
+ /** Move or resize a clip by hand: the slide stops arranging itself. */
79
+ setFrame(clipId: string, frame: Frame): void;
80
+ applyFrame(clipId: string, command: FrameCommand): void;
81
+ /** Overlapping clips: this one on top of the others (later items are drawn over earlier ones). */
82
+ bringToFront(clipId: string): void;
83
+ /** Overlapping clips: this one under the others. */
84
+ sendToBack(clipId: string): void;
85
+ /**
86
+ * Scroll what a clip shows over its page, image or video by `dx, dy` (fractions of the source),
87
+ * its size kept and kept within the source: e.g. to show the lines above or below a passage.
88
+ */
89
+ panClip(clipId: string, dx: number, dy: number): void;
90
+ /**
91
+ * Zoom what a clip shows by `factor` (2: twice as close) about its centre: its area over the
92
+ * source shrinks or grows, its shape kept, never past the source's edges.
93
+ */
94
+ zoomClip(clipId: string, factor: number): void;
95
+ /** Zoom a clip to `percent` of how close it was cut (100: as cut), about its centre. */
96
+ setClipZoom(clipId: string, percent: number): void;
97
+ /** Align a clip on the stage (inside the margins and the slide's reserved room). */
98
+ align(clipId: string, alignment: Alignment): void;
99
+ /** Nudge a clip by `dx, dy` (stage fractions), kept on the stage, not snapped. */
100
+ nudge(clipId: string, dx: number, dy: number): void;
101
+ /** The current slide's caption (shown across its top; empty for none). */
102
+ /** A slide's title (default the current slide's). */
103
+ setSlideCaption(caption: string, index?: number): void;
104
+ /** The current slide's layout: it is arranged for it again. */
105
+ setSlideLayout(layout: SlideLayout, index?: number): void;
106
+ /** The current slide's text (its points, or subtitle). */
107
+ setSlidePoints(points: string, index?: number): void;
108
+ /** Change the theme; slides arranging themselves make room for a logo (or give it back). */
109
+ setTheme(change: Partial<Theme>): void;
110
+ setLogoImage(image: Blob | null): void;
111
+ /** Arrange the current slide automatically again. */
112
+ arrange(): void;
113
+ /** A new slide after the current one (by default with the current slide's layout). */
114
+ addSlide(layout?: SlideLayout, after?: number): void;
115
+ /** Remove a slide (default the current one); the last one left is emptied instead. */
116
+ removeSlide(index?: number): void;
117
+ /** A copy of a slide (its title, points and clips), right after it. */
118
+ duplicateSlide(index: number): void;
119
+ /** Move a slide to `to` (the others shift up or down). */
120
+ moveSlide(index: number, to: number): void;
121
+ goTo(index: number): void;
122
+ setBlank(blank: boolean): void;
123
+ setCaptions(captions: boolean): void;
124
+ setLabelColumn(tagId: string | null): void;
125
+ setColumnValues(values: Readonly<Record<string, string>>): void;
126
+ setPresenting(presenting: boolean): void;
127
+ setDragging(clipId: string | null): void;
128
+ setTitle(title: string): void;
129
+ notify(text: string, kind: 'success' | 'error'): void;
130
+ clearNotice(id: number): void;
131
+ /** Show another part of an image or video clip's source (a new crop): its area and shape. */
132
+ cropClip(clipId: string, rect: Rect, aspect: number): void;
133
+ /**
134
+ * A clip reshaped on the current slide (`reshapeFrame`): it shows `rect` of its source, in
135
+ * `frame`, at the same scale and zoom. Slides arranging themselves arrange around its new shape.
136
+ */
137
+ reshapeClip(clipId: string, frame: Frame, rect: Rect, aspect: number): void;
138
+ /** A text box or shape on a slide (default the current one), on top; resolves with its id. */
139
+ addBox(box: Omit<SlideBox, 'id'>, index?: number): string;
140
+ /** Change a box (wherever it is). */
141
+ updateBox(boxId: string, change: (box: SlideBox) => SlideBox): void;
142
+ /** Type a box's text (one paragraph per line, each keeping its style). */
143
+ setBoxText(boxId: string, text: string): void;
144
+ removeBox(boxId: string): void;
145
+ /** A box over the slide's clips and other boxes, or under them all. */
146
+ restackBox(boxId: string, to: 'front' | 'back'): void;
147
+ /** A slide's speaker notes (default the current slide's). */
148
+ setSlideNotes(notes: string, index?: number): void;
149
+ /** A slide's own background (none: the theme's). */
150
+ setSlideBackground(background: SlideBackground | undefined, index?: number): void;
151
+ /** Saved as this document (under this title), as its `version`. */
152
+ setSaved(savedId: string, title: string, version?: number | null): void;
153
+ /** Edited as this document or draft (see `boundTo`). */
154
+ bind(boundTo: string | null): void;
155
+ /** Clips gathered before (with no presentation open), added to the tray, not placed. */
156
+ adoptClips(clips: readonly Clip[]): void;
157
+ /** Replace the presentation with one opened from a file (its clips' sources fetched). */
158
+ load(opened: {
159
+ title: string;
160
+ /** The document it is saved as; null for a new one (from a template). */
161
+ savedId: string | null;
162
+ /** Its version, when known. */
163
+ version?: number | null;
164
+ /** Edited as (default `savedId`): an older file opened unsaved is still its own. */
165
+ boundTo?: string | null;
166
+ captions: boolean;
167
+ labelColumn?: string | null;
168
+ theme?: Theme;
169
+ clips: Omit<Clip, 'id'>[];
170
+ slides: {
171
+ caption: string;
172
+ auto: boolean;
173
+ layout?: SlideLayout;
174
+ points?: string;
175
+ items: {
176
+ clip: number;
177
+ frame: Frame;
178
+ }[];
179
+ boxes?: readonly SavedBox[];
180
+ background?: SlideBackground;
181
+ notes?: string;
182
+ }[];
183
+ media?: Readonly<Record<string, string>>;
184
+ }): void;
185
+ reset(): void;
186
+ }
187
+ export type PresentationStore = PresentationState & PresentationActions;
188
+ /** What arranging a slide depends on besides its clips: labels shown, a logo in the footer. */
189
+ type Look = Pick<PresentationState, 'captions' | 'theme'>;
190
+ /**
191
+ * The room a slide keeps free of clips: its title and text (by its layout), each clip's label
192
+ * under it, the footer while a logo shows.
193
+ */
194
+ export declare const reserveOf: (slide: Pick<Slide, "caption" | "layout">, look: Look) => Reserve;
195
+ export declare const usePresentation: import("zustand").UseBoundStore<import("zustand").StoreApi<PresentationStore>>;
196
+ /** The slide on the stage. */
197
+ export declare const currentSlide: (state: PresentationState) => Slide | undefined;
198
+ /**
199
+ * The presentation has changes not saved: since it was opened or saved; or, never saved, anything
200
+ * in it at all (a clip, a title, a point).
201
+ */
202
+ export declare function hasUnsavedChanges(state: PresentationState): boolean;
203
+ export {};
@@ -0,0 +1,429 @@
1
+ "use client";
2
+ import { create } from "zustand";
3
+ import { releasePdfRegionSource } from "@arbidocs/react/viewers";
4
+ import {
5
+ alignFrame,
6
+ autoLayout,
7
+ defaultCaption,
8
+ dropFrame,
9
+ fitFrame,
10
+ fullHeightFrame,
11
+ fullWidthFrame,
12
+ moveFrame
13
+ } from "./model.js";
14
+ import { slideGeometry } from "./slide-layout.js";
15
+ import { DEFAULT_THEME } from "./theme.js";
16
+ import { serializePresentation } from "./persistence.js";
17
+ import { nextBoxId, withText } from "./boxes.js";
18
+ const MIN_CLIP_AREA = 0.02;
19
+ const MAX_ITEMS_PER_SLIDE = 6;
20
+ const AUTO_PLACE_BELOW = 2;
21
+ let sequence = 0;
22
+ const nextId = (kind) => `${kind}-${Date.now().toString(36)}-${++sequence}`;
23
+ const emptySlide = (layout = "clips") => ({
24
+ id: nextId("slide"),
25
+ items: [],
26
+ auto: true,
27
+ caption: "",
28
+ layout,
29
+ points: "",
30
+ boxes: []
31
+ });
32
+ const initialState = () => ({
33
+ clips: [],
34
+ slides: [emptySlide()],
35
+ current: 0,
36
+ blank: false,
37
+ captions: true,
38
+ theme: DEFAULT_THEME,
39
+ logoImage: null,
40
+ labelColumn: null,
41
+ columnValues: {},
42
+ presenting: false,
43
+ dragging: null,
44
+ notice: null,
45
+ title: "Untitled presentation",
46
+ savedId: null,
47
+ version: null,
48
+ boundTo: null,
49
+ clean: null,
50
+ media: {}
51
+ });
52
+ function arranged(slide, clips, look) {
53
+ const aspects = slide.items.map((item) => aspectOf(clips, item.clipId));
54
+ const frames = autoLayout(aspects, reserveOf(slide, look));
55
+ return {
56
+ ...slide,
57
+ auto: true,
58
+ items: slide.items.map((item, i) => ({ ...item, frame: frames[i] }))
59
+ };
60
+ }
61
+ const reserveOf = (slide, look) => slideGeometry(slide, { labels: look.captions, logo: look.theme.logo?.corner ?? null }).reserve;
62
+ function aspectOf(clips, clipId) {
63
+ return clips.find((clip) => clip.id === clipId)?.aspect ?? 1;
64
+ }
65
+ const usePresentation = create()((set, get) => {
66
+ const updateSlide = (change, at) => set((state) => {
67
+ const index = at ?? state.current;
68
+ const slide = state.slides[index];
69
+ if (!slide) return state;
70
+ const next = change(slide, state.clips);
71
+ if (next === slide) return state;
72
+ const slides = state.slides.slice();
73
+ slides[index] = next.auto ? arranged(next, state.clips, state) : next;
74
+ return { slides };
75
+ });
76
+ const updateBoxes = (boxId, change) => set((state) => {
77
+ const index = state.slides.findIndex((slide2) => slide2.boxes.some((box) => box.id === boxId));
78
+ if (index < 0) return state;
79
+ const slide = state.slides[index];
80
+ const slides = state.slides.slice();
81
+ slides[index] = {
82
+ ...slide,
83
+ boxes: change(
84
+ slide.boxes,
85
+ slide.boxes.findIndex((box) => box.id === boxId)
86
+ )
87
+ };
88
+ return { slides };
89
+ });
90
+ const restack = (clipId, to) => set((state) => {
91
+ const slide = state.slides[state.current];
92
+ const item = slide?.items.find((entry) => entry.clipId === clipId);
93
+ if (!slide || !item) return state;
94
+ const rest = slide.items.filter((entry) => entry !== item);
95
+ const items = to === "front" ? [...rest, item] : [item, ...rest];
96
+ if (items.every((entry, i) => entry === slide.items[i])) return state;
97
+ const slides = state.slides.slice();
98
+ slides[state.current] = { ...slide, items };
99
+ return { slides };
100
+ });
101
+ return {
102
+ ...initialState(),
103
+ addClip(clip) {
104
+ const id = nextId("clip");
105
+ const full = {
106
+ ...clip,
107
+ id,
108
+ caption: clip.caption ?? defaultCaption(clip.fileName, clip.page),
109
+ zoomBase: clip.zoomBase ?? clip.rect.w
110
+ };
111
+ set((state) => ({ clips: [...state.clips, full] }));
112
+ const slide = get().slides[get().current];
113
+ if (slide && slide.items.length < AUTO_PLACE_BELOW) get().place(id);
114
+ return id;
115
+ },
116
+ removeClip(clipId) {
117
+ const { clips, slides } = get();
118
+ const removed = clips.find((clip) => clip.id === clipId);
119
+ if (!removed) return;
120
+ const rest = clips.filter((clip) => clip.id !== clipId);
121
+ set({
122
+ clips: rest,
123
+ slides: slides.map((slide) => {
124
+ if (!slide.items.some((item) => item.clipId === clipId)) return slide;
125
+ const next = { ...slide, items: slide.items.filter((item) => item.clipId !== clipId) };
126
+ return next.auto ? arranged(next, rest, get()) : next;
127
+ })
128
+ });
129
+ if (!rest.some((clip) => clip.source === removed.source))
130
+ releasePdfRegionSource(removed.source);
131
+ },
132
+ setCaption: (clipId, caption) => set((state) => ({
133
+ clips: state.clips.map((clip) => clip.id === clipId ? { ...clip, caption } : clip)
134
+ })),
135
+ place: (clipId, at) => updateSlide((slide, clips) => {
136
+ if (!clips.some((clip) => clip.id === clipId)) return slide;
137
+ const others = slide.items.filter((item) => item.clipId !== clipId);
138
+ if (!at && others.length < slide.items.length) return slide;
139
+ if (others.length >= MAX_ITEMS_PER_SLIDE) return slide;
140
+ const aspect = aspectOf(clips, clipId);
141
+ const frame = slide.auto ? fitFrame(aspect) : dropFrame(aspect, at ?? { x: 0.5, y: 0.5 });
142
+ return { ...slide, items: [...others, { clipId, frame }] };
143
+ }),
144
+ unplace: (clipId) => updateSlide(
145
+ (slide) => slide.items.some((item) => item.clipId === clipId) ? { ...slide, items: slide.items.filter((item) => item.clipId !== clipId) } : slide
146
+ ),
147
+ setFrame: (clipId, frame) => updateSlide((slide) => ({
148
+ ...slide,
149
+ auto: false,
150
+ items: slide.items.map((item) => item.clipId === clipId ? { ...item, frame } : item)
151
+ })),
152
+ applyFrame(clipId, command) {
153
+ const slide = get().slides[get().current];
154
+ const item = slide?.items.find((entry) => entry.clipId === clipId);
155
+ if (!item) return;
156
+ const aspect = aspectOf(get().clips, clipId);
157
+ const reserve = reserveOf(slide, get());
158
+ const frame = command === "fullWidth" ? fullWidthFrame(item.frame, aspect, reserve) : command === "fullHeight" ? fullHeightFrame(item.frame, aspect, reserve) : fitFrame(aspect, reserve);
159
+ get().setFrame(clipId, frame);
160
+ get().bringToFront(clipId);
161
+ },
162
+ bringToFront: (clipId) => restack(clipId, "front"),
163
+ sendToBack: (clipId) => restack(clipId, "back"),
164
+ panClip: (clipId, dx, dy) => set((state) => {
165
+ const clip = state.clips.find((entry) => entry.id === clipId);
166
+ if (!clip) return state;
167
+ const { rect } = clip;
168
+ const x = Math.min(Math.max(rect.x + dx, 0), 1 - rect.w);
169
+ const y = Math.min(Math.max(rect.y + dy, 0), 1 - rect.h);
170
+ if (x === rect.x && y === rect.y) return state;
171
+ return {
172
+ clips: state.clips.map(
173
+ (entry) => entry === clip ? { ...clip, rect: { ...rect, x, y } } : entry
174
+ )
175
+ };
176
+ }),
177
+ zoomClip: (clipId, factor) => set((state) => {
178
+ const clip = state.clips.find((entry) => entry.id === clipId);
179
+ if (!clip || !(factor > 0)) return state;
180
+ const { rect } = clip;
181
+ const largest = Math.min(1 / rect.w, 1 / rect.h);
182
+ const smallest = Math.max(MIN_CLIP_AREA / rect.w, MIN_CLIP_AREA / rect.h);
183
+ const scale = Math.min(Math.max(1 / factor, smallest), largest);
184
+ if (scale === 1) return state;
185
+ const w = rect.w * scale;
186
+ const h = rect.h * scale;
187
+ const x = Math.min(Math.max(rect.x + (rect.w - w) / 2, 0), 1 - w);
188
+ const y = Math.min(Math.max(rect.y + (rect.h - h) / 2, 0), 1 - h);
189
+ return {
190
+ clips: state.clips.map(
191
+ (entry) => entry === clip ? { ...clip, rect: { x, y, w, h } } : entry
192
+ )
193
+ };
194
+ }),
195
+ setClipZoom(clipId, percent) {
196
+ const clip = get().clips.find((entry) => entry.id === clipId);
197
+ if (!clip || !(percent > 0)) return;
198
+ const width = (clip.zoomBase ?? clip.rect.w) / (percent / 100);
199
+ get().zoomClip(clipId, clip.rect.w / width);
200
+ },
201
+ align(clipId, alignment) {
202
+ const slide = get().slides[get().current];
203
+ const item = slide?.items.find((entry) => entry.clipId === clipId);
204
+ if (!slide || !item) return;
205
+ const aspect = aspectOf(get().clips, clipId);
206
+ get().setFrame(clipId, alignFrame(item.frame, aspect, alignment, reserveOf(slide, get())));
207
+ },
208
+ nudge(clipId, dx, dy) {
209
+ const slide = get().slides[get().current];
210
+ const item = slide?.items.find((entry) => entry.clipId === clipId);
211
+ if (!item) return;
212
+ const aspect = aspectOf(get().clips, clipId);
213
+ get().setFrame(clipId, moveFrame(item.frame, aspect, dx, dy, [], true).frame);
214
+ },
215
+ // An auto slide makes (or gives back) the caption's room; one arranged by hand keeps its places.
216
+ // A blank slide's title is its title box's text.
217
+ setSlideCaption: (caption, index) => updateSlide(
218
+ (slide) => ({
219
+ ...slide,
220
+ caption,
221
+ boxes: slide.boxes.map((box) => box.role === "title" ? withText(box, caption) : box)
222
+ }),
223
+ index
224
+ ),
225
+ setSlideLayout: (layout, index) => updateSlide((slide) => ({ ...slide, layout, auto: true }), index),
226
+ setSlidePoints: (points, index) => updateSlide((slide) => ({ ...slide, points }), index),
227
+ setTheme: (change) => set((state) => {
228
+ const theme = { ...state.theme, ...change };
229
+ const logoMoved = (theme.logo?.corner ?? null) !== (state.theme.logo?.corner ?? null);
230
+ return {
231
+ theme,
232
+ ...theme.logo?.documentId !== state.theme.logo?.documentId ? { logoImage: null } : {},
233
+ slides: logoMoved ? state.slides.map(
234
+ (slide) => slide.auto ? arranged(slide, state.clips, { ...state, theme }) : slide
235
+ ) : state.slides
236
+ };
237
+ }),
238
+ setLogoImage: (logoImage) => set({ logoImage }),
239
+ arrange: () => updateSlide((slide) => ({ ...slide, auto: true })),
240
+ addSlide: (layout, after) => set((state) => {
241
+ const at = (after ?? state.current) + 1;
242
+ const slides = state.slides.slice();
243
+ const before = state.slides[at - 1];
244
+ const slide = emptySlide(layout ?? before?.layout ?? "clips");
245
+ slides.splice(
246
+ at,
247
+ 0,
248
+ before?.background ? { ...slide, background: before.background } : slide
249
+ );
250
+ return { slides, current: at };
251
+ }),
252
+ removeSlide: (index) => set((state) => {
253
+ const target = index ?? state.current;
254
+ if (state.slides.length <= 1) return { slides: [emptySlide()], current: 0 };
255
+ const slides = state.slides.filter((_, i) => i !== target);
256
+ const current = state.current > target ? state.current - 1 : state.current;
257
+ return { slides, current: Math.min(current, slides.length - 1) };
258
+ }),
259
+ duplicateSlide: (index) => set((state) => {
260
+ const slide = state.slides[index];
261
+ if (!slide) return state;
262
+ const slides = state.slides.slice();
263
+ slides.splice(index + 1, 0, {
264
+ ...slide,
265
+ id: nextId("slide"),
266
+ items: slide.items.map((item) => ({ ...item, frame: { ...item.frame } })),
267
+ boxes: slide.boxes.map((box) => ({ ...box, id: nextBoxId() }))
268
+ });
269
+ return { slides, current: index + 1 };
270
+ }),
271
+ moveSlide: (index, to) => set((state) => {
272
+ if (to < 0 || to >= state.slides.length || index === to || !state.slides[index]) {
273
+ return state;
274
+ }
275
+ const slides = state.slides.slice();
276
+ const [slide] = slides.splice(index, 1);
277
+ slides.splice(to, 0, slide);
278
+ return { slides, current: to };
279
+ }),
280
+ goTo: (index) => set(
281
+ (state) => index < 0 || index >= state.slides.length || index === state.current ? state : { current: index }
282
+ ),
283
+ setBlank: (blank) => set({ blank }),
284
+ // Slides arranged automatically make (or give back) the captions' room.
285
+ setCaptions: (captions) => set((state) => ({
286
+ captions,
287
+ slides: state.slides.map(
288
+ (slide) => slide.auto ? arranged(slide, state.clips, { ...state, captions }) : slide
289
+ )
290
+ })),
291
+ setLabelColumn: (labelColumn) => set({ labelColumn }),
292
+ setColumnValues: (columnValues) => set({ columnValues }),
293
+ setPresenting: (presenting) => set({ presenting }),
294
+ setDragging: (dragging) => set({ dragging }),
295
+ setTitle: (title) => set({ title }),
296
+ notify: (text, kind) => set({ notice: { text, kind, id: ++sequence } }),
297
+ clearNotice: (id) => set((state) => state.notice?.id === id ? { notice: null } : state),
298
+ cropClip: (clipId, rect, aspect) => set((state) => {
299
+ const clips = state.clips.map(
300
+ (clip) => clip.id === clipId ? { ...clip, rect, aspect } : clip
301
+ );
302
+ return {
303
+ clips,
304
+ // Its shape changed: slides arranged automatically arrange again around it.
305
+ slides: state.slides.map(
306
+ (slide) => slide.auto && slide.items.some((item) => item.clipId === clipId) ? arranged(slide, clips, state) : slide
307
+ )
308
+ };
309
+ }),
310
+ reshapeClip: (clipId, frame, rect, aspect) => set((state) => {
311
+ const clip = state.clips.find((entry) => entry.id === clipId);
312
+ if (!clip) return state;
313
+ const zoomBase = (clip.zoomBase ?? clip.rect.w) * rect.w / clip.rect.w;
314
+ const clips = state.clips.map(
315
+ (entry) => entry === clip ? { ...clip, rect, aspect, zoomBase } : entry
316
+ );
317
+ return {
318
+ clips,
319
+ slides: state.slides.map((slide, index) => {
320
+ if (index === state.current) {
321
+ return {
322
+ ...slide,
323
+ auto: false,
324
+ items: slide.items.map(
325
+ (item) => item.clipId === clipId ? { ...item, frame } : item
326
+ )
327
+ };
328
+ }
329
+ return slide.auto && slide.items.some((item) => item.clipId === clipId) ? arranged(slide, clips, state) : slide;
330
+ })
331
+ };
332
+ }),
333
+ addBox(box, index) {
334
+ const id = nextBoxId();
335
+ updateSlide((slide) => ({ ...slide, boxes: [...slide.boxes, { ...box, id }] }), index);
336
+ return id;
337
+ },
338
+ updateBox: (boxId, change) => updateBoxes(boxId, (boxes, at) => {
339
+ const next = boxes.slice();
340
+ next[at] = change(boxes[at]);
341
+ return next;
342
+ }),
343
+ setBoxText(boxId, text) {
344
+ get().updateBox(boxId, (box) => withText(box, text));
345
+ set((state) => ({
346
+ slides: state.slides.map(
347
+ (slide) => slide.boxes.some((box) => box.id === boxId && box.role === "title") ? { ...slide, caption: text.replace(/\s*\n\s*/g, " ").trim() } : slide
348
+ )
349
+ }));
350
+ },
351
+ removeBox: (boxId) => updateBoxes(boxId, (boxes, at) => boxes.filter((_, i) => i !== at)),
352
+ restackBox: (boxId, to) => updateBoxes(boxId, (boxes, at) => {
353
+ const box = { ...boxes[at], front: to === "front" };
354
+ const rest = boxes.filter((_, i) => i !== at);
355
+ return to === "front" ? [...rest, box] : [box, ...rest];
356
+ }),
357
+ setSlideNotes: (notes, index) => updateSlide((slide) => ({ ...slide, notes }), index),
358
+ setSlideBackground: (background, index) => updateSlide((slide) => {
359
+ const { background: _old, ...rest } = slide;
360
+ void _old;
361
+ return background ? { ...rest, background } : rest;
362
+ }, index),
363
+ setSaved: (savedId, title, version = null) => {
364
+ set({ savedId, title, boundTo: savedId, version });
365
+ set({ clean: snapshotOf(get()) });
366
+ },
367
+ bind: (boundTo) => set({ boundTo }),
368
+ adoptClips: (adopted) => set((state) => ({
369
+ clips: [
370
+ ...state.clips,
371
+ ...adopted.filter((clip) => !state.clips.some((entry) => entry.id === clip.id))
372
+ ]
373
+ })),
374
+ load(opened) {
375
+ get().reset();
376
+ const clips = opened.clips.map((clip) => ({ ...clip, id: nextId("clip") }));
377
+ const slides = opened.slides.map((slide) => ({
378
+ id: nextId("slide"),
379
+ caption: slide.caption,
380
+ auto: slide.auto,
381
+ layout: slide.layout ?? "clips",
382
+ points: slide.points ?? "",
383
+ // Items whose clip could not be opened are left out.
384
+ items: slide.items.filter((item) => clips[item.clip]).map((item) => ({ clipId: clips[item.clip].id, frame: item.frame })),
385
+ boxes: (slide.boxes ?? []).map((box) => ({ ...box, id: nextBoxId() })),
386
+ ...slide.background ? { background: slide.background } : {},
387
+ ...slide.notes ? { notes: slide.notes } : {}
388
+ }));
389
+ set({
390
+ title: opened.title,
391
+ savedId: opened.savedId,
392
+ version: opened.version ?? null,
393
+ boundTo: opened.boundTo ?? opened.savedId,
394
+ captions: opened.captions,
395
+ labelColumn: opened.labelColumn ?? null,
396
+ theme: opened.theme ?? DEFAULT_THEME,
397
+ clips,
398
+ slides: slides.length ? slides : [emptySlide()],
399
+ current: 0,
400
+ media: opened.media ?? {}
401
+ });
402
+ set({ clean: opened.savedId ? snapshotOf(get()) : null });
403
+ },
404
+ reset() {
405
+ for (const source of new Set(get().clips.map((clip) => clip.source))) {
406
+ releasePdfRegionSource(source);
407
+ }
408
+ set(initialState());
409
+ }
410
+ };
411
+ });
412
+ const currentSlide = (state) => state.slides[state.current];
413
+ function snapshotOf(state) {
414
+ return JSON.stringify(serializePresentation({ ...state, media: void 0 }));
415
+ }
416
+ function hasUnsavedChanges(state) {
417
+ if (state.clean !== null) return snapshotOf(state) !== state.clean;
418
+ return state.clips.length > 0 || state.slides.some(
419
+ (slide) => slide.items.length || slide.boxes.length || slide.caption.trim() || slide.points.trim()
420
+ );
421
+ }
422
+ export {
423
+ MAX_ITEMS_PER_SLIDE,
424
+ currentSlide,
425
+ hasUnsavedChanges,
426
+ reserveOf,
427
+ usePresentation
428
+ };
429
+ //# sourceMappingURL=store.js.map