@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,199 @@
1
+ "use client";
2
+ import { jsx, jsxs } from "react/jsx-runtime";
3
+ import { Check, ImagePlus, Palette, Plus, Trash2 } from "lucide-react";
4
+ import { Button, Popover, PopoverContent, PopoverTrigger, cn } from "@arbidocs/react/ui";
5
+ import { usePresentation } from "./store.js";
6
+ import {
7
+ ACCENTS,
8
+ BACKGROUNDS,
9
+ FONTS,
10
+ backgroundCss,
11
+ accentColor,
12
+ isHexColor
13
+ } from "./theme.js";
14
+ function Section({ title, children }) {
15
+ return /* @__PURE__ */ jsxs("section", { className: "flex flex-col gap-2", children: [
16
+ /* @__PURE__ */ jsx("h3", { className: "text-xs font-medium text-muted-foreground", children: title }),
17
+ children
18
+ ] });
19
+ }
20
+ function CustomColor({
21
+ value,
22
+ selected,
23
+ label,
24
+ round,
25
+ onChange
26
+ }) {
27
+ return /* @__PURE__ */ jsxs(
28
+ "label",
29
+ {
30
+ title: label,
31
+ className: cn(
32
+ "relative flex size-8 cursor-pointer items-center justify-center border border-dashed border-border text-muted-foreground hover:text-foreground",
33
+ round ? "rounded-full" : "rounded-md",
34
+ selected && "border-solid ring-2 ring-primary ring-offset-1 ring-offset-background"
35
+ ),
36
+ style: selected ? { background: value } : void 0,
37
+ children: [
38
+ !selected && /* @__PURE__ */ jsx(Plus, { className: "size-3.5" }),
39
+ /* @__PURE__ */ jsx(
40
+ "input",
41
+ {
42
+ type: "color",
43
+ value: isHexColor(value) ? value : "#1f2937",
44
+ onChange: (event) => onChange(event.target.value),
45
+ "aria-label": label,
46
+ className: "absolute inset-0 cursor-pointer opacity-0"
47
+ }
48
+ )
49
+ ]
50
+ }
51
+ );
52
+ }
53
+ function DesignMenu({ onChooseLogo }) {
54
+ const theme = usePresentation((s) => s.theme);
55
+ const setTheme = usePresentation((s) => s.setTheme);
56
+ const customBackground = isHexColor(theme.background);
57
+ const customAccent = !ACCENTS.some((accent) => accent.color === theme.accent);
58
+ return /* @__PURE__ */ jsxs(Popover, { children: [
59
+ /* @__PURE__ */ jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsx(
60
+ Button,
61
+ {
62
+ type: "button",
63
+ size: "icon",
64
+ variant: "ghost",
65
+ className: "size-8 text-muted-foreground hover:text-foreground pointer-coarse:size-11",
66
+ title: "Design: background, typeface, accent, logo",
67
+ "aria-label": "Design",
68
+ "data-testid": "presentation-design",
69
+ children: /* @__PURE__ */ jsx(Palette, { className: "size-4" })
70
+ }
71
+ ) }),
72
+ /* @__PURE__ */ jsxs(PopoverContent, { align: "end", className: "flex w-[21.5rem] flex-col gap-4 overflow-x-hidden p-4", children: [
73
+ /* @__PURE__ */ jsx(Section, { title: "Background", children: /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-7 gap-2", children: [
74
+ BACKGROUNDS.map((preset) => /* @__PURE__ */ jsx(
75
+ "button",
76
+ {
77
+ type: "button",
78
+ title: preset.label,
79
+ "aria-label": `${preset.label} background`,
80
+ "aria-pressed": theme.background === preset.id,
81
+ onClick: () => setTheme({ background: preset.id }),
82
+ className: cn(
83
+ "size-8 rounded-md border border-border shadow-sm",
84
+ theme.background === preset.id && "ring-2 ring-primary ring-offset-1 ring-offset-background"
85
+ ),
86
+ style: { background: backgroundCss(preset.id), containerType: "inline-size" },
87
+ "data-testid": `design-background-${preset.id}`
88
+ },
89
+ preset.id
90
+ )),
91
+ /* @__PURE__ */ jsx(
92
+ CustomColor,
93
+ {
94
+ value: theme.background,
95
+ selected: customBackground,
96
+ label: "Your own background colour",
97
+ onChange: (background) => setTheme({ background })
98
+ }
99
+ )
100
+ ] }) }),
101
+ /* @__PURE__ */ jsx(Section, { title: "Typeface", children: /* @__PURE__ */ jsx("div", { className: "grid grid-cols-3 gap-2", children: Object.keys(FONTS).map((font) => /* @__PURE__ */ jsxs(
102
+ "button",
103
+ {
104
+ type: "button",
105
+ "aria-pressed": theme.font === font,
106
+ onClick: () => setTheme({ font }),
107
+ className: cn(
108
+ "flex flex-col items-center gap-0.5 rounded-md border border-border px-2 py-1.5 hover:bg-muted",
109
+ theme.font === font && "border-primary bg-primary/5"
110
+ ),
111
+ "data-testid": `design-font-${font}`,
112
+ children: [
113
+ /* @__PURE__ */ jsx("span", { className: "text-xl leading-tight", style: { fontFamily: FONTS[font].css }, children: "Aa" }),
114
+ /* @__PURE__ */ jsx("span", { className: "text-[11px] text-muted-foreground", children: FONTS[font].label })
115
+ ]
116
+ },
117
+ font
118
+ )) }) }),
119
+ /* @__PURE__ */ jsx(Section, { title: "Accent", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
120
+ ACCENTS.map((accent) => /* @__PURE__ */ jsx(
121
+ "button",
122
+ {
123
+ type: "button",
124
+ title: accent.label,
125
+ "aria-label": `${accent.label} accent`,
126
+ "aria-pressed": theme.accent === accent.color,
127
+ onClick: () => setTheme({ accent: accent.color }),
128
+ className: cn(
129
+ "flex size-8 items-center justify-center rounded-full border border-black/10 shadow-sm",
130
+ theme.accent === accent.color && "ring-2 ring-primary ring-offset-1 ring-offset-background"
131
+ ),
132
+ style: { background: accentColor(accent.color) },
133
+ children: theme.accent === accent.color && /* @__PURE__ */ jsx(Check, { className: "size-3.5 text-black/70" })
134
+ },
135
+ accent.color
136
+ )),
137
+ /* @__PURE__ */ jsx(
138
+ CustomColor,
139
+ {
140
+ value: accentColor(theme.accent),
141
+ selected: customAccent,
142
+ label: "Your own accent colour",
143
+ round: true,
144
+ onChange: (accent) => setTheme({ accent })
145
+ }
146
+ )
147
+ ] }) }),
148
+ /* @__PURE__ */ jsx(Section, { title: "Logo", children: theme.logo ? /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
149
+ /* @__PURE__ */ jsx("span", { className: "min-w-0 flex-1 truncate text-sm", title: theme.logo.fileName, children: theme.logo.fileName || "Logo" }),
150
+ /* @__PURE__ */ jsx("div", { className: "flex rounded-md border border-border p-0.5", role: "group", children: ["bl", "br"].map((corner) => /* @__PURE__ */ jsx(
151
+ "button",
152
+ {
153
+ type: "button",
154
+ "aria-pressed": theme.logo?.corner === corner,
155
+ onClick: () => theme.logo && setTheme({ logo: { ...theme.logo, corner } }),
156
+ className: cn(
157
+ "rounded px-2 py-0.5 text-xs text-muted-foreground",
158
+ theme.logo?.corner === corner && "bg-muted text-foreground"
159
+ ),
160
+ children: corner === "bl" ? "Left" : "Right"
161
+ },
162
+ corner
163
+ )) }),
164
+ /* @__PURE__ */ jsx(
165
+ Button,
166
+ {
167
+ type: "button",
168
+ size: "icon",
169
+ variant: "ghost",
170
+ className: "size-7 text-muted-foreground",
171
+ title: "Remove the logo",
172
+ "aria-label": "Remove the logo",
173
+ onClick: () => setTheme({ logo: null }),
174
+ children: /* @__PURE__ */ jsx(Trash2, { className: "size-3.5" })
175
+ }
176
+ )
177
+ ] }) : /* @__PURE__ */ jsxs(
178
+ Button,
179
+ {
180
+ type: "button",
181
+ variant: "outline",
182
+ size: "sm",
183
+ className: "self-start",
184
+ disabled: !onChooseLogo,
185
+ onClick: onChooseLogo,
186
+ "data-testid": "design-choose-logo",
187
+ children: [
188
+ /* @__PURE__ */ jsx(ImagePlus, { className: "size-4" }),
189
+ "Choose an image\u2026"
190
+ ]
191
+ }
192
+ ) })
193
+ ] })
194
+ ] });
195
+ }
196
+ export {
197
+ DesignMenu
198
+ };
199
+ //# sourceMappingURL=DesignMenu.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/presentation/DesignMenu.tsx"],
4
+ "sourcesContent": ["/**\n * Design: the presentation's one look, for every slide \u2014 its background (a preset, or any\n * colour), typeface, accent colour and footer logo. A popover from the header; each choice applies\n * at once (the stage behind it shows the result).\n */\n\nimport type { ReactNode } from 'react'\nimport { Check, ImagePlus, Palette, Plus, Trash2 } from 'lucide-react'\nimport { Button, Popover, PopoverContent, PopoverTrigger, cn } from '@arbidocs/react/ui'\nimport { usePresentation } from './store'\nimport {\n ACCENTS,\n BACKGROUNDS,\n FONTS,\n backgroundCss,\n accentColor,\n isHexColor,\n type FontId,\n type LogoCorner,\n} from './theme'\n\nfunction Section({ title, children }: { title: string; children: ReactNode }) {\n return (\n <section className=\"flex flex-col gap-2\">\n <h3 className=\"text-xs font-medium text-muted-foreground\">{title}</h3>\n {children}\n </section>\n )\n}\n\n/** A colour well: a swatch that opens the system colour picker. */\nfunction CustomColor({\n value,\n selected,\n label,\n round,\n onChange,\n}: {\n value: string\n selected: boolean\n label: string\n round?: boolean\n onChange: (color: string) => void\n}) {\n return (\n <label\n title={label}\n className={cn(\n 'relative flex size-8 cursor-pointer items-center justify-center border border-dashed border-border text-muted-foreground hover:text-foreground',\n round ? 'rounded-full' : 'rounded-md',\n selected && 'border-solid ring-2 ring-primary ring-offset-1 ring-offset-background'\n )}\n style={selected ? { background: value } : undefined}\n >\n {!selected && <Plus className=\"size-3.5\" />}\n <input\n type=\"color\"\n value={isHexColor(value) ? value : '#1f2937'}\n onChange={(event) => onChange(event.target.value)}\n aria-label={label}\n className=\"absolute inset-0 cursor-pointer opacity-0\"\n />\n </label>\n )\n}\n\nexport function DesignMenu({ onChooseLogo }: { onChooseLogo?: () => void }) {\n const theme = usePresentation((s) => s.theme)\n const setTheme = usePresentation((s) => s.setTheme)\n const customBackground = isHexColor(theme.background)\n const customAccent = !ACCENTS.some((accent) => accent.color === theme.accent)\n\n return (\n <Popover>\n <PopoverTrigger asChild>\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=\"Design: background, typeface, accent, logo\"\n aria-label=\"Design\"\n data-testid=\"presentation-design\"\n >\n <Palette className=\"size-4\" />\n </Button>\n </PopoverTrigger>\n <PopoverContent align=\"end\" className=\"flex w-[21.5rem] flex-col gap-4 overflow-x-hidden p-4\">\n <Section title=\"Background\">\n <div className=\"grid grid-cols-7 gap-2\">\n {BACKGROUNDS.map((preset) => (\n <button\n key={preset.id}\n type=\"button\"\n title={preset.label}\n aria-label={`${preset.label} background`}\n aria-pressed={theme.background === preset.id}\n onClick={() => setTheme({ background: preset.id })}\n className={cn(\n 'size-8 rounded-md border border-border shadow-sm',\n theme.background === preset.id &&\n 'ring-2 ring-primary ring-offset-1 ring-offset-background'\n )}\n style={{ background: backgroundCss(preset.id), containerType: 'inline-size' }}\n data-testid={`design-background-${preset.id}`}\n />\n ))}\n <CustomColor\n value={theme.background}\n selected={customBackground}\n label=\"Your own background colour\"\n onChange={(background) => setTheme({ background })}\n />\n </div>\n </Section>\n\n <Section title=\"Typeface\">\n <div className=\"grid grid-cols-3 gap-2\">\n {(Object.keys(FONTS) as FontId[]).map((font) => (\n <button\n key={font}\n type=\"button\"\n aria-pressed={theme.font === font}\n onClick={() => setTheme({ font })}\n className={cn(\n 'flex flex-col items-center gap-0.5 rounded-md border border-border px-2 py-1.5 hover:bg-muted',\n theme.font === font && 'border-primary bg-primary/5'\n )}\n data-testid={`design-font-${font}`}\n >\n <span className=\"text-xl leading-tight\" style={{ fontFamily: FONTS[font].css }}>\n Aa\n </span>\n <span className=\"text-[11px] text-muted-foreground\">{FONTS[font].label}</span>\n </button>\n ))}\n </div>\n </Section>\n\n <Section title=\"Accent\">\n <div className=\"flex items-center gap-2\">\n {ACCENTS.map((accent) => (\n <button\n key={accent.color}\n type=\"button\"\n title={accent.label}\n aria-label={`${accent.label} accent`}\n aria-pressed={theme.accent === accent.color}\n onClick={() => setTheme({ accent: accent.color })}\n className={cn(\n 'flex size-8 items-center justify-center rounded-full border border-black/10 shadow-sm',\n theme.accent === accent.color &&\n 'ring-2 ring-primary ring-offset-1 ring-offset-background'\n )}\n style={{ background: accentColor(accent.color) }}\n >\n {theme.accent === accent.color && <Check className=\"size-3.5 text-black/70\" />}\n </button>\n ))}\n <CustomColor\n value={accentColor(theme.accent)}\n selected={customAccent}\n label=\"Your own accent colour\"\n round\n onChange={(accent) => setTheme({ accent })}\n />\n </div>\n </Section>\n\n <Section title=\"Logo\">\n {theme.logo ? (\n <div className=\"flex items-center gap-2\">\n <span className=\"min-w-0 flex-1 truncate text-sm\" title={theme.logo.fileName}>\n {theme.logo.fileName || 'Logo'}\n </span>\n <div className=\"flex rounded-md border border-border p-0.5\" role=\"group\">\n {(['bl', 'br'] as LogoCorner[]).map((corner) => (\n <button\n key={corner}\n type=\"button\"\n aria-pressed={theme.logo?.corner === corner}\n onClick={() => theme.logo && setTheme({ logo: { ...theme.logo, corner } })}\n className={cn(\n 'rounded px-2 py-0.5 text-xs text-muted-foreground',\n theme.logo?.corner === corner && 'bg-muted text-foreground'\n )}\n >\n {corner === 'bl' ? 'Left' : 'Right'}\n </button>\n ))}\n </div>\n <Button\n type=\"button\"\n size=\"icon\"\n variant=\"ghost\"\n className=\"size-7 text-muted-foreground\"\n title=\"Remove the logo\"\n aria-label=\"Remove the logo\"\n onClick={() => setTheme({ logo: null })}\n >\n <Trash2 className=\"size-3.5\" />\n </Button>\n </div>\n ) : (\n <Button\n type=\"button\"\n variant=\"outline\"\n size=\"sm\"\n className=\"self-start\"\n disabled={!onChooseLogo}\n onClick={onChooseLogo}\n data-testid=\"design-choose-logo\"\n >\n <ImagePlus className=\"size-4\" />\n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MAAK,SAC7D,WAAC,MAAM,IAAI,EAAmB,IAAI,CAAC,WACnC;AAAA,UAAC;AAAA;AAAA,YAEC,MAAK;AAAA,YACL,gBAAc,MAAM,MAAM,WAAW;AAAA,YACrC,SAAS,MAAM,MAAM,QAAQ,SAAS,EAAE,MAAM,EAAE,GAAG,MAAM,MAAM,OAAO,EAAE,CAAC;AAAA,YACzE,WAAW;AAAA,cACT;AAAA,cACA,MAAM,MAAM,WAAW,UAAU;AAAA,YACnC;AAAA,YAEC,qBAAW,OAAO,SAAS;AAAA;AAAA,UATvB;AAAA,QAUP,CACD,GACH;AAAA,QACA;AAAA,UAAC;AAAA;AAAA,YACC,MAAK;AAAA,YACL,MAAK;AAAA,YACL,SAAQ;AAAA,YACR,WAAU;AAAA,YACV,OAAM;AAAA,YACN,cAAW;AAAA,YACX,SAAS,MAAM,SAAS,EAAE,MAAM,KAAK,CAAC;AAAA,YAEtC,8BAAC,UAAO,WAAU,YAAW;AAAA;AAAA,QAC/B;AAAA,SACF,IAEA;AAAA,QAAC;AAAA;AAAA,UACC,MAAK;AAAA,UACL,SAAQ;AAAA,UACR,MAAK;AAAA,UACL,WAAU;AAAA,UACV,UAAU,CAAC;AAAA,UACX,SAAS;AAAA,UACT,eAAY;AAAA,UAEZ;AAAA,gCAAC,aAAU,WAAU,UAAS;AAAA,YAAE;AAAA;AAAA;AAAA,MAElC,GAEJ;AAAA,OACF;AAAA,KACF;AAEJ;",
6
+ "names": []
7
+ }
@@ -0,0 +1,17 @@
1
+ /**
2
+ * The current slide's layout: a menu of the layouts, each drawn in miniature from the geometry
3
+ * the stage uses (its title, text and the room its clips take), so what is picked is what shows.
4
+ */
5
+ import { type SlideLayout } from './model';
6
+ /** A layout in miniature: title and text as bars, the clips' room as light blocks. */
7
+ export declare function LayoutThumb({ layout, className }: {
8
+ layout: SlideLayout;
9
+ className?: string;
10
+ }): import("react").JSX.Element;
11
+ /** A slide's layout (default the current slide's). */
12
+ export declare function LayoutMenu({ index, className, compact, }: {
13
+ index?: number;
14
+ className?: string;
15
+ /** The layout's miniature alone (no chevron): a narrow column. */
16
+ compact?: boolean;
17
+ }): import("react").JSX.Element;
@@ -0,0 +1,122 @@
1
+ "use client";
2
+ import { jsx, jsxs } from "react/jsx-runtime";
3
+ import { ChevronDown } from "lucide-react";
4
+ import {
5
+ Button,
6
+ DropdownMenu,
7
+ DropdownMenuContent,
8
+ DropdownMenuItem,
9
+ DropdownMenuTrigger,
10
+ cn
11
+ } from "@arbidocs/react/ui";
12
+ import { STAGE_MARGIN, SLIDE_LAYOUTS } from "./model.js";
13
+ import { LAYOUT_INFO, slideGeometry } from "./slide-layout.js";
14
+ import { currentSlide, usePresentation } from "./store.js";
15
+ const at = (box) => ({
16
+ left: `${box.x * 100}%`,
17
+ top: `${box.y * 100}%`,
18
+ width: `${box.w * 100}%`,
19
+ height: `${box.h * 100}%`
20
+ });
21
+ function LayoutThumb({ layout, className }) {
22
+ const geometry = slideGeometry({ layout, caption: "Title" }, { labels: false, logo: null });
23
+ const { top, right = 0, bottom = 0, columns } = geometry.reserve;
24
+ const room = {
25
+ x: STAGE_MARGIN,
26
+ y: STAGE_MARGIN + top,
27
+ w: 1 - 2 * STAGE_MARGIN - right,
28
+ h: 1 - 2 * STAGE_MARGIN - top - bottom
29
+ };
30
+ const blocks = layout === "title" || layout === "section" || layout === "free" ? [] : columns === 2 ? [
31
+ { ...room, w: room.w / 2 - 0.02 },
32
+ { ...room, x: room.x + room.w / 2 + 0.02, w: room.w / 2 - 0.02 }
33
+ ] : [room];
34
+ const title = geometry.title;
35
+ return /* @__PURE__ */ jsxs(
36
+ "span",
37
+ {
38
+ "aria-hidden": true,
39
+ className: cn(
40
+ "relative block aspect-video shrink-0 overflow-hidden rounded-[3px] bg-zinc-800",
41
+ className
42
+ ),
43
+ children: [
44
+ title && /* @__PURE__ */ jsx(
45
+ "span",
46
+ {
47
+ className: "absolute rounded-full bg-white/90",
48
+ style: at({
49
+ x: title.align === "center" ? title.x + title.w * 0.2 : title.x,
50
+ y: title.y + title.h * 0.3,
51
+ w: title.align === "center" ? title.w * 0.6 : title.w * 0.55,
52
+ h: Math.max(0.05, title.h * 0.35)
53
+ })
54
+ }
55
+ ),
56
+ geometry.text && [0, 1, 2].slice(0, geometry.text.bullets ? 3 : 1).map((line) => /* @__PURE__ */ jsx(
57
+ "span",
58
+ {
59
+ className: "absolute rounded-full bg-white/45",
60
+ style: at({
61
+ x: geometry.text.align === "center" ? geometry.text.x + geometry.text.w * 0.3 : geometry.text.x,
62
+ y: geometry.text.y + line * 0.1,
63
+ w: geometry.text.align === "center" ? geometry.text.w * 0.4 : geometry.text.w * 0.85,
64
+ h: 0.045
65
+ })
66
+ },
67
+ line
68
+ )),
69
+ blocks.map((block, index) => /* @__PURE__ */ jsx("span", { className: "absolute rounded-[1px] bg-white/25", style: at(block) }, index))
70
+ ]
71
+ }
72
+ );
73
+ }
74
+ function LayoutMenu({
75
+ index,
76
+ className,
77
+ compact = false
78
+ }) {
79
+ const layout = usePresentation(
80
+ (s) => (index === void 0 ? currentSlide(s) : s.slides[index])?.layout ?? "clips"
81
+ );
82
+ const setSlideLayout = usePresentation((s) => s.setSlideLayout);
83
+ return /* @__PURE__ */ jsxs(DropdownMenu, { children: [
84
+ /* @__PURE__ */ jsx(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsxs(
85
+ Button,
86
+ {
87
+ type: "button",
88
+ variant: "ghost",
89
+ size: "sm",
90
+ className: cn(
91
+ "h-7 gap-1.5 px-1.5 text-xs text-muted-foreground hover:text-foreground",
92
+ className
93
+ ),
94
+ title: "Slide layout",
95
+ "aria-label": `Slide layout: ${LAYOUT_INFO[layout].label}`,
96
+ "data-testid": "presentation-layout",
97
+ children: [
98
+ /* @__PURE__ */ jsx(LayoutThumb, { layout, className: compact ? "w-6" : "w-7" }),
99
+ !compact && /* @__PURE__ */ jsx(ChevronDown, { className: "size-3" })
100
+ ]
101
+ }
102
+ ) }),
103
+ /* @__PURE__ */ jsx(DropdownMenuContent, { align: "start", className: "w-56", children: SLIDE_LAYOUTS.map((option) => /* @__PURE__ */ jsxs(
104
+ DropdownMenuItem,
105
+ {
106
+ onSelect: () => setSlideLayout(option, index),
107
+ className: cn(option === layout && "bg-accent"),
108
+ "data-testid": `presentation-layout-${option}`,
109
+ children: [
110
+ /* @__PURE__ */ jsx(LayoutThumb, { layout: option, className: "w-12" }),
111
+ /* @__PURE__ */ jsx("span", { children: LAYOUT_INFO[option].label })
112
+ ]
113
+ },
114
+ option
115
+ )) })
116
+ ] });
117
+ }
118
+ export {
119
+ LayoutMenu,
120
+ LayoutThumb
121
+ };
122
+ //# sourceMappingURL=LayoutMenu.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/presentation/LayoutMenu.tsx"],
4
+ "sourcesContent": ["/**\n * The current slide's layout: a menu of the layouts, each drawn in miniature from the geometry\n * the stage uses (its title, text and the room its clips take), so what is picked is what shows.\n */\n\nimport { ChevronDown } from 'lucide-react'\nimport {\n Button,\n DropdownMenu,\n DropdownMenuContent,\n DropdownMenuItem,\n DropdownMenuTrigger,\n cn,\n} from '@arbidocs/react/ui'\nimport { STAGE_MARGIN, SLIDE_LAYOUTS, type SlideLayout } from './model'\nimport { LAYOUT_INFO, slideGeometry, type Box } from './slide-layout'\nimport { currentSlide, usePresentation } from './store'\n\nconst at = (box: Box) => ({\n left: `${box.x * 100}%`,\n top: `${box.y * 100}%`,\n width: `${box.w * 100}%`,\n height: `${box.h * 100}%`,\n})\n\n/** A layout in miniature: title and text as bars, the clips' room as light blocks. */\nexport function LayoutThumb({ layout, className }: { layout: SlideLayout; className?: string }) {\n const geometry = slideGeometry({ layout, caption: 'Title' }, { labels: false, logo: null })\n const { top, right = 0, bottom = 0, columns } = geometry.reserve\n const room = {\n x: STAGE_MARGIN,\n y: STAGE_MARGIN + top,\n w: 1 - 2 * STAGE_MARGIN - right,\n h: 1 - 2 * STAGE_MARGIN - top - bottom,\n }\n const blocks =\n layout === 'title' || layout === 'section' || layout === 'free'\n ? []\n : columns === 2\n ? [\n { ...room, w: room.w / 2 - 0.02 },\n { ...room, x: room.x + room.w / 2 + 0.02, w: room.w / 2 - 0.02 },\n ]\n : [room]\n const title = geometry.title\n return (\n <span\n aria-hidden\n className={cn(\n 'relative block aspect-video shrink-0 overflow-hidden rounded-[3px] bg-zinc-800',\n className\n )}\n >\n {title && (\n <span\n className=\"absolute rounded-full bg-white/90\"\n style={at({\n x: title.align === 'center' ? title.x + title.w * 0.2 : title.x,\n y: title.y + title.h * 0.3,\n w: title.align === 'center' ? title.w * 0.6 : title.w * 0.55,\n h: Math.max(0.05, title.h * 0.35),\n })}\n />\n )}\n {geometry.text &&\n [0, 1, 2].slice(0, geometry.text.bullets ? 3 : 1).map((line) => (\n <span\n key={line}\n className=\"absolute rounded-full bg-white/45\"\n style={at({\n x:\n geometry.text!.align === 'center'\n ? geometry.text!.x + geometry.text!.w * 0.3\n : geometry.text!.x,\n y: geometry.text!.y + line * 0.1,\n w:\n geometry.text!.align === 'center'\n ? geometry.text!.w * 0.4\n : geometry.text!.w * 0.85,\n h: 0.045,\n })}\n />\n ))}\n {blocks.map((block, index) => (\n <span key={index} className=\"absolute rounded-[1px] bg-white/25\" style={at(block)} />\n ))}\n </span>\n )\n}\n\n/** A slide's layout (default the current slide's). */\nexport function LayoutMenu({\n index,\n className,\n compact = false,\n}: {\n index?: number\n className?: string\n /** The layout's miniature alone (no chevron): a narrow column. */\n compact?: boolean\n}) {\n const layout = usePresentation(\n (s) => (index === undefined ? currentSlide(s) : s.slides[index])?.layout ?? 'clips'\n )\n const setSlideLayout = usePresentation((s) => s.setSlideLayout)\n return (\n <DropdownMenu>\n <DropdownMenuTrigger asChild>\n <Button\n type=\"button\"\n variant=\"ghost\"\n size=\"sm\"\n className={cn(\n 'h-7 gap-1.5 px-1.5 text-xs text-muted-foreground hover:text-foreground',\n className\n )}\n title=\"Slide layout\"\n aria-label={`Slide layout: ${LAYOUT_INFO[layout].label}`}\n data-testid=\"presentation-layout\"\n >\n <LayoutThumb layout={layout} className={compact ? 'w-6' : 'w-7'} />\n {!compact && <ChevronDown className=\"size-3\" />}\n </Button>\n </DropdownMenuTrigger>\n <DropdownMenuContent align=\"start\" className=\"w-56\">\n {SLIDE_LAYOUTS.map((option) => (\n <DropdownMenuItem\n key={option}\n onSelect={() => setSlideLayout(option, index)}\n className={cn(option === layout && 'bg-accent')}\n data-testid={`presentation-layout-${option}`}\n >\n <LayoutThumb layout={option} className=\"w-12\" />\n <span>{LAYOUT_INFO[option].label}</span>\n </DropdownMenuItem>\n ))}\n </DropdownMenuContent>\n </DropdownMenu>\n )\n}\n"],
5
+ "mappings": ";AA8CI,SAQI,KARJ;AAzCJ,SAAS,mBAAmB;AAC5B;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,cAAc,qBAAuC;AAC9D,SAAS,aAAa,qBAA+B;AACrD,SAAS,cAAc,uBAAuB;AAE9C,MAAM,KAAK,CAAC,SAAc;AAAA,EACxB,MAAM,GAAG,IAAI,IAAI,GAAG;AAAA,EACpB,KAAK,GAAG,IAAI,IAAI,GAAG;AAAA,EACnB,OAAO,GAAG,IAAI,IAAI,GAAG;AAAA,EACrB,QAAQ,GAAG,IAAI,IAAI,GAAG;AACxB;AAGO,SAAS,YAAY,EAAE,QAAQ,UAAU,GAAgD;AAC9F,QAAM,WAAW,cAAc,EAAE,QAAQ,SAAS,QAAQ,GAAG,EAAE,QAAQ,OAAO,MAAM,KAAK,CAAC;AAC1F,QAAM,EAAE,KAAK,QAAQ,GAAG,SAAS,GAAG,QAAQ,IAAI,SAAS;AACzD,QAAM,OAAO;AAAA,IACX,GAAG;AAAA,IACH,GAAG,eAAe;AAAA,IAClB,GAAG,IAAI,IAAI,eAAe;AAAA,IAC1B,GAAG,IAAI,IAAI,eAAe,MAAM;AAAA,EAClC;AACA,QAAM,SACJ,WAAW,WAAW,WAAW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AAqC,OAAO,GAAG,KAAK,KAArE,KAAwE,CACpF;AAAA;AAAA;AAAA,EACH;AAEJ;AAGO,SAAS,WAAW;AAAA,EACzB;AAAA,EACA;AAAA,EACA,UAAU;AACZ,GAKG;AACD,QAAM,SAAS;AAAA,IACb,CAAC,OAAO,UAAU,SAAY,aAAa,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,UAAU;AAAA,EAC9E;AACA,QAAM,iBAAiB,gBAAgB,CAAC,MAAM,EAAE,cAAc;AAC9D,SACE,qBAAC,gBACC;AAAA,wBAAC,uBAAoB,SAAO,MAC1B;AAAA,MAAC;AAAA;AAAA,QACC,MAAK;AAAA,QACL,SAAQ;AAAA,QACR,MAAK;AAAA,QACL,WAAW;AAAA,UACT;AAAA,UACA;AAAA,QACF;AAAA,QACA,OAAM;AAAA,QACN,cAAY,iBAAiB,YAAY,MAAM,EAAE,KAAK;AAAA,QACtD,eAAY;AAAA,QAEZ;AAAA,8BAAC,eAAY,QAAgB,WAAW,UAAU,QAAQ,OAAO;AAAA,UAChE,CAAC,WAAW,oBAAC,eAAY,WAAU,UAAS;AAAA;AAAA;AAAA,IAC/C,GACF;AAAA,IACA,oBAAC,uBAAoB,OAAM,SAAQ,WAAU,QAC1C,wBAAc,IAAI,CAAC,WAClB;AAAA,MAAC;AAAA;AAAA,QAEC,UAAU,MAAM,eAAe,QAAQ,KAAK;AAAA,QAC5C,WAAW,GAAG,WAAW,UAAU,WAAW;AAAA,QAC9C,eAAa,uBAAuB,MAAM;AAAA,QAE1C;AAAA,8BAAC,eAAY,QAAQ,QAAQ,WAAU,QAAO;AAAA,UAC9C,oBAAC,UAAM,sBAAY,MAAM,EAAE,OAAM;AAAA;AAAA;AAAA,MAN5B;AAAA,IAOP,CACD,GACH;AAAA,KACF;AAEJ;",
6
+ "names": []
7
+ }
@@ -0,0 +1,15 @@
1
+ /**
2
+ * An image or video clip: the original file, cropped to the clipped area with CSS (the element is
3
+ * scaled so the area fills the box), so the browser draws it from the file's own pixels: its
4
+ * native resolution, nothing re-encoded.
5
+ *
6
+ * A video clip waits at its start, muted, in the editor and the tray. On the presented stage
7
+ * (`live`) it has its sound and is played and paused with Space (`toggleStageVideos`); no
8
+ * controls are ever drawn, since the stage is what the audience sees.
9
+ */
10
+ import type { Clip } from './model';
11
+ export declare function MediaClip({ clip, className, live, }: {
12
+ clip: Clip;
13
+ className?: string;
14
+ live: boolean;
15
+ }): import("react").JSX.Element;
@@ -0,0 +1,67 @@
1
+ "use client";
2
+ import { jsx } from "react/jsx-runtime";
3
+ import { useEffect, useRef } from "react";
4
+ import { cn } from "@arbidocs/react/ui";
5
+ import { STAGE_VIDEO_ATTRIBUTE } from "./stage-videos.js";
6
+ import { useObjectUrl } from "./useObjectUrl.js";
7
+ function cropStyle(rect) {
8
+ return {
9
+ position: "absolute",
10
+ width: `${100 / rect.w}%`,
11
+ height: `${100 / rect.h}%`,
12
+ left: `${-rect.x / rect.w * 100}%`,
13
+ top: `${-rect.y / rect.h * 100}%`,
14
+ maxWidth: "none"
15
+ };
16
+ }
17
+ function MediaClip({
18
+ clip,
19
+ className,
20
+ live
21
+ }) {
22
+ const url = useObjectUrl(clip.source);
23
+ const videoRef = useRef(null);
24
+ useEffect(() => {
25
+ const video = videoRef.current;
26
+ if (!video) return;
27
+ const toStart = () => {
28
+ video.currentTime = clip.start ?? 0;
29
+ };
30
+ if (video.readyState >= 1) toStart();
31
+ else video.addEventListener("loadedmetadata", toStart, { once: true });
32
+ return () => video.removeEventListener("loadedmetadata", toStart);
33
+ }, [clip.start, url]);
34
+ return /* @__PURE__ */ jsx(
35
+ "div",
36
+ {
37
+ className: cn("relative h-full w-full overflow-hidden bg-black", className),
38
+ "data-testid": `clip-image-${clip.id}`,
39
+ children: clip.kind === "video" ? /* @__PURE__ */ jsx(
40
+ "video",
41
+ {
42
+ ref: videoRef,
43
+ src: url,
44
+ muted: !live,
45
+ playsInline: true,
46
+ preload: "auto",
47
+ className: "pointer-events-none block select-none",
48
+ style: cropStyle(clip.rect),
49
+ ...live ? { [STAGE_VIDEO_ATTRIBUTE]: "" } : {}
50
+ }
51
+ ) : /* @__PURE__ */ jsx(
52
+ "img",
53
+ {
54
+ src: url,
55
+ alt: clip.caption,
56
+ draggable: false,
57
+ className: "pointer-events-none block select-none",
58
+ style: cropStyle(clip.rect)
59
+ }
60
+ )
61
+ }
62
+ );
63
+ }
64
+ export {
65
+ MediaClip
66
+ };
67
+ //# sourceMappingURL=MediaClip.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/presentation/MediaClip.tsx"],
4
+ "sourcesContent": ["/**\n * An image or video clip: the original file, cropped to the clipped area with CSS (the element is\n * scaled so the area fills the box), so the browser draws it from the file's own pixels: its\n * native resolution, nothing re-encoded.\n *\n * A video clip waits at its start, muted, in the editor and the tray. On the presented stage\n * (`live`) it has its sound and is played and paused with Space (`toggleStageVideos`); no\n * controls are ever drawn, since the stage is what the audience sees.\n */\n\nimport { useEffect, useRef, type CSSProperties } from 'react'\nimport { cn } from '@arbidocs/react/ui'\nimport type { Clip } from './model'\nimport { STAGE_VIDEO_ATTRIBUTE } from './stage-videos'\nimport { useObjectUrl } from './useObjectUrl'\n\n/** The element scaled and shifted so the clipped area fills its box. */\nfunction cropStyle(rect: Clip['rect']): CSSProperties {\n return {\n position: 'absolute',\n width: `${100 / rect.w}%`,\n height: `${100 / rect.h}%`,\n left: `${(-rect.x / rect.w) * 100}%`,\n top: `${(-rect.y / rect.h) * 100}%`,\n maxWidth: 'none',\n }\n}\n\nexport function MediaClip({\n clip,\n className,\n live,\n}: {\n clip: Clip\n className?: string\n live: boolean\n}) {\n const url = useObjectUrl(clip.source)\n const videoRef = useRef<HTMLVideoElement>(null)\n\n // A video shows its first frame at the clip's start.\n useEffect(() => {\n const video = videoRef.current\n if (!video) return\n const toStart = () => {\n video.currentTime = clip.start ?? 0\n }\n if (video.readyState >= 1) toStart()\n else video.addEventListener('loadedmetadata', toStart, { once: true })\n return () => video.removeEventListener('loadedmetadata', toStart)\n }, [clip.start, url])\n\n return (\n <div\n className={cn('relative h-full w-full overflow-hidden bg-black', className)}\n data-testid={`clip-image-${clip.id}`}\n >\n {clip.kind === 'video' ? (\n <video\n ref={videoRef}\n src={url}\n muted={!live}\n playsInline\n preload=\"auto\"\n className=\"pointer-events-none block select-none\"\n style={cropStyle(clip.rect)}\n {...(live ? { [STAGE_VIDEO_ATTRIBUTE]: '' } : {})}\n />\n ) : (\n <img\n src={url}\n alt={clip.caption}\n draggable={false}\n className=\"pointer-events-none block select-none\"\n style={cropStyle(clip.rect)}\n />\n )}\n </div>\n )\n}\n"],
5
+ "mappings": ";AA0DQ;AAhDR,SAAS,WAAW,cAAkC;AACtD,SAAS,UAAU;AAEnB,SAAS,6BAA6B;AACtC,SAAS,oBAAoB;AAG7B,SAAS,UAAU,MAAmC;AACpD,SAAO;AAAA,IACL,UAAU;AAAA,IACV,OAAO,GAAG,MAAM,KAAK,CAAC;AAAA,IACtB,QAAQ,GAAG,MAAM,KAAK,CAAC;AAAA,IACvB,MAAM,GAAI,CAAC,KAAK,IAAI,KAAK,IAAK,GAAG;AAAA,IACjC,KAAK,GAAI,CAAC,KAAK,IAAI,KAAK,IAAK,GAAG;AAAA,IAChC,UAAU;AAAA,EACZ;AACF;AAEO,SAAS,UAAU;AAAA,EACxB;AAAA,EACA;AAAA,EACA;AACF,GAIG;AACD,QAAM,MAAM,aAAa,KAAK,MAAM;AACpC,QAAM,WAAW,OAAyB,IAAI;AAG9C,YAAU,MAAM;AACd,UAAM,QAAQ,SAAS;AACvB,QAAI,CAAC,MAAO;AACZ,UAAM,UAAU,MAAM;AACpB,YAAM,cAAc,KAAK,SAAS;AAAA,IACpC;AACA,QAAI,MAAM,cAAc,EAAG,SAAQ;AAAA,QAC9B,OAAM,iBAAiB,kBAAkB,SAAS,EAAE,MAAM,KAAK,CAAC;AACrE,WAAO,MAAM,MAAM,oBAAoB,kBAAkB,OAAO;AAAA,EAClE,GAAG,CAAC,KAAK,OAAO,GAAG,CAAC;AAEpB,SACE;AAAA,IAAC;AAAA;AAAA,MACC,WAAW,GAAG,mDAAmD,SAAS;AAAA,MAC1E,eAAa,cAAc,KAAK,EAAE;AAAA,MAEjC,eAAK,SAAS,UACb;AAAA,QAAC;AAAA;AAAA,UACC,KAAK;AAAA,UACL,KAAK;AAAA,UACL,OAAO,CAAC;AAAA,UACR,aAAW;AAAA,UACX,SAAQ;AAAA,UACR,WAAU;AAAA,UACV,OAAO,UAAU,KAAK,IAAI;AAAA,UACzB,GAAI,OAAO,EAAE,CAAC,qBAAqB,GAAG,GAAG,IAAI,CAAC;AAAA;AAAA,MACjD,IAEA;AAAA,QAAC;AAAA;AAAA,UACC,KAAK;AAAA,UACL,KAAK,KAAK;AAAA,UACV,WAAW;AAAA,UACX,WAAU;AAAA,UACV,OAAO,UAAU,KAAK,IAAI;AAAA;AAAA,MAC5B;AAAA;AAAA,EAEJ;AAEJ;",
6
+ "names": []
7
+ }
@@ -0,0 +1,6 @@
1
+ /**
2
+ * The presentation's own messages (saved, failed…), shown where it is edited: the app's
3
+ * notifications show in the app's window, out of sight behind a popped-out editor. Above its
4
+ * dialogs.
5
+ */
6
+ export declare function Notice(): import("react").JSX.Element | null;
@@ -0,0 +1,43 @@
1
+ "use client";
2
+ import { jsx, jsxs } from "react/jsx-runtime";
3
+ import { useEffect } from "react";
4
+ import { CircleAlert, CircleCheck, X } from "lucide-react";
5
+ import { usePresentation } from "./store.js";
6
+ function Notice() {
7
+ const notice = usePresentation((s) => s.notice);
8
+ useEffect(() => {
9
+ if (!notice) return;
10
+ const timer = setTimeout(
11
+ () => usePresentation.getState().clearNotice(notice.id),
12
+ notice.kind === "error" ? 8e3 : 3e3
13
+ );
14
+ return () => clearTimeout(timer);
15
+ }, [notice]);
16
+ if (!notice) return null;
17
+ return /* @__PURE__ */ jsxs(
18
+ "div",
19
+ {
20
+ role: notice.kind === "error" ? "alert" : "status",
21
+ className: "pointer-events-auto fixed left-1/2 top-3 z-[100] flex max-w-[90vw] -translate-x-1/2 items-center gap-2 rounded-lg border border-border bg-popover px-3 py-2 text-sm shadow-lg",
22
+ "data-testid": "presentation-notice",
23
+ children: [
24
+ notice.kind === "error" ? /* @__PURE__ */ jsx(CircleAlert, { className: "size-4 shrink-0 text-destructive" }) : /* @__PURE__ */ jsx(CircleCheck, { className: "size-4 shrink-0 text-primary" }),
25
+ /* @__PURE__ */ jsx("span", { children: notice.text }),
26
+ /* @__PURE__ */ jsx(
27
+ "button",
28
+ {
29
+ type: "button",
30
+ className: "ml-1 rounded p-0.5 text-muted-foreground hover:text-foreground",
31
+ "aria-label": "Dismiss",
32
+ onClick: () => usePresentation.getState().clearNotice(notice.id),
33
+ children: /* @__PURE__ */ jsx(X, { className: "size-3.5" })
34
+ }
35
+ )
36
+ ]
37
+ }
38
+ );
39
+ }
40
+ export {
41
+ Notice
42
+ };
43
+ //# sourceMappingURL=Notice.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/presentation/Notice.tsx"],
4
+ "sourcesContent": ["import { useEffect } from 'react'\nimport { CircleAlert, CircleCheck, X } from 'lucide-react'\nimport { usePresentation } from './store'\n\n/**\n * The presentation's own messages (saved, failed\u2026), shown where it is edited: the app's\n * notifications show in the app's window, out of sight behind a popped-out editor. Above its\n * dialogs.\n */\nexport function Notice() {\n const notice = usePresentation((s) => s.notice)\n useEffect(() => {\n if (!notice) return\n const timer = setTimeout(\n () => usePresentation.getState().clearNotice(notice.id),\n notice.kind === 'error' ? 8000 : 3000\n )\n return () => clearTimeout(timer)\n }, [notice])\n if (!notice) return null\n return (\n <div\n role={notice.kind === 'error' ? 'alert' : 'status'}\n className=\"pointer-events-auto fixed left-1/2 top-3 z-[100] flex max-w-[90vw] -translate-x-1/2 items-center gap-2 rounded-lg border border-border bg-popover px-3 py-2 text-sm shadow-lg\"\n data-testid=\"presentation-notice\"\n >\n {notice.kind === 'error' ? (\n <CircleAlert className=\"size-4 shrink-0 text-destructive\" />\n ) : (\n <CircleCheck className=\"size-4 shrink-0 text-primary\" />\n )}\n <span>{notice.text}</span>\n <button\n type=\"button\"\n className=\"ml-1 rounded p-0.5 text-muted-foreground hover:text-foreground\"\n aria-label=\"Dismiss\"\n onClick={() => usePresentation.getState().clearNotice(notice.id)}\n >\n <X className=\"size-3.5\" />\n </button>\n </div>\n )\n}\n"],
5
+ "mappings": ";AAqBI,SAMI,KANJ;AArBJ,SAAS,iBAAiB;AAC1B,SAAS,aAAa,aAAa,SAAS;AAC5C,SAAS,uBAAuB;AAOzB,SAAS,SAAS;AACvB,QAAM,SAAS,gBAAgB,CAAC,MAAM,EAAE,MAAM;AAC9C,YAAU,MAAM;AACd,QAAI,CAAC,OAAQ;AACb,UAAM,QAAQ;AAAA,MACZ,MAAM,gBAAgB,SAAS,EAAE,YAAY,OAAO,EAAE;AAAA,MACtD,OAAO,SAAS,UAAU,MAAO;AAAA,IACnC;AACA,WAAO,MAAM,aAAa,KAAK;AAAA,EACjC,GAAG,CAAC,MAAM,CAAC;AACX,MAAI,CAAC,OAAQ,QAAO;AACpB,SACE;AAAA,IAAC;AAAA;AAAA,MACC,MAAM,OAAO,SAAS,UAAU,UAAU;AAAA,MAC1C,WAAU;AAAA,MACV,eAAY;AAAA,MAEX;AAAA,eAAO,SAAS,UACf,oBAAC,eAAY,WAAU,oCAAmC,IAE1D,oBAAC,eAAY,WAAU,gCAA+B;AAAA,QAExD,oBAAC,UAAM,iBAAO,MAAK;AAAA,QACnB;AAAA,UAAC;AAAA;AAAA,YACC,MAAK;AAAA,YACL,WAAU;AAAA,YACV,cAAW;AAAA,YACX,SAAS,MAAM,gBAAgB,SAAS,EAAE,YAAY,OAAO,EAAE;AAAA,YAE/D,8BAAC,KAAE,WAAU,YAAW;AAAA;AAAA,QAC1B;AAAA;AAAA;AAAA,EACF;AAEJ;",
6
+ "names": []
7
+ }
@@ -0,0 +1,32 @@
1
+ /**
2
+ * The 16:9 stage: a slide's clips in their frames, its title, points and logo, as large as the
3
+ * container allows. Presenting shows it bare; the editor's copy is `editable`: each clip
4
+ * (`StageItem`) is moved, resized and reshaped by dragging, snapping with guide lines; clips are
5
+ * selected for their floating actions, and clips dragged from the tray are dropped onto it.
6
+ *
7
+ * A slide's stage re-renders only when its slide (or the clips, theme or labels) change; a clip's
8
+ * drag re-renders nothing here but the guides and, at its start and end, the floating actions.
9
+ */
10
+ import { type ReactNode } from 'react';
11
+ import { type SlideTextEditing } from './SlideDecor';
12
+ import { type Guide } from './model';
13
+ export interface PresentationStageProps {
14
+ editable?: boolean;
15
+ /** The slide shown (default: the current one). */
16
+ slideIndex?: number;
17
+ selected?: string | null;
18
+ onSelect?: (clipId: string | null) => void;
19
+ /** Offered on a selected image clip: make a new version of it. */
20
+ onEditImage?: (clipId: string) => void;
21
+ /** Offered on a selected image clip: choose the part of the image it shows. */
22
+ onCropImage?: (clipId: string) => void;
23
+ /** Typing the slide's title and points on the slide itself (the editor's stages). */
24
+ textEditing?: SlideTextEditing;
25
+ /** Over the slide (e.g. the editor's hover actions). */
26
+ overlay?: ReactNode;
27
+ className?: string;
28
+ }
29
+ export interface GuideLayerHandle {
30
+ set(guides: Guide[]): void;
31
+ }
32
+ export declare function PresentationStage({ editable, slideIndex, selected, onSelect, onEditImage, onCropImage, textEditing, overlay, className, }: PresentationStageProps): import("react").JSX.Element;