@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.
- package/dist/ClippingMediaViewer-B6WG7Q64.cjs +156 -0
- package/dist/ClippingMediaViewer-B6WG7Q64.cjs.map +1 -0
- package/dist/ClippingPdfViewer-6GCVTV3V.cjs +79 -0
- package/dist/ClippingPdfViewer-6GCVTV3V.cjs.map +1 -0
- package/dist/{ConnectedCallDock-WER7R222.cjs → ConnectedCallDock-DC5V5OUJ.cjs} +25 -23
- package/dist/ConnectedCallDock-DC5V5OUJ.cjs.map +1 -0
- package/dist/{ConnectedCallRoom-T7OBQTYP.cjs → ConnectedCallRoom-FQLXWTFB.cjs} +18 -16
- package/dist/{ConnectedCallRoom-T7OBQTYP.cjs.map → ConnectedCallRoom-FQLXWTFB.cjs.map} +1 -1
- package/dist/{ConnectedNativeDocxComparison-546ILGLW.cjs → ConnectedNativeDocxComparison-4Q5S7VLD.cjs} +17 -17
- package/dist/{ConnectedNativeDocxComparison-546ILGLW.cjs.map → ConnectedNativeDocxComparison-4Q5S7VLD.cjs.map} +1 -1
- package/dist/ConnectedPresentation-4HLDZDWV.cjs +183 -0
- package/dist/ConnectedPresentation-4HLDZDWV.cjs.map +1 -0
- package/dist/{ConnectedProductionSetDialog-LHB4VQWC.cjs → ConnectedProductionSetDialog-4EAY6KAZ.cjs} +3 -3
- package/dist/{ConnectedProductionSetDialog-LHB4VQWC.cjs.map → ConnectedProductionSetDialog-4EAY6KAZ.cjs.map} +1 -1
- package/dist/ConnectedSlidesTab-7QDE2CZD.cjs +234 -0
- package/dist/ConnectedSlidesTab-7QDE2CZD.cjs.map +1 -0
- package/dist/{ConnectedStreamedWordArtifact-S2ZFZLZQ.cjs → ConnectedStreamedWordArtifact-FFOQJBOI.cjs} +17 -17
- package/dist/{ConnectedStreamedWordArtifact-S2ZFZLZQ.cjs.map → ConnectedStreamedWordArtifact-FFOQJBOI.cjs.map} +1 -1
- package/dist/{DocumentReviewCard-ZSBZBGFK.cjs → DocumentReviewCard-SNWVEZ7S.cjs} +19 -18
- package/dist/DocumentReviewCard-SNWVEZ7S.cjs.map +1 -0
- package/dist/{FilesViewerDialog-6UKR5WEF.cjs → FilesViewerDialog-IZI63FOV.cjs} +54 -47
- package/dist/FilesViewerDialog-IZI63FOV.cjs.map +1 -0
- package/dist/{GridViewImpl-ZMJJWTOM.cjs → GridViewImpl-LTYET77Q.cjs} +3 -3
- package/dist/GridViewImpl-LTYET77Q.cjs.map +1 -0
- package/dist/{WorkspaceTableView-J3C6VH4T.cjs → WorkspaceTableView-TEIRB6VJ.cjs} +11 -10
- package/dist/WorkspaceTableView-TEIRB6VJ.cjs.map +1 -0
- package/dist/agents/index.cjs +297 -297
- package/dist/agents/tasks/ConversationListView.js +10 -2
- package/dist/agents/tasks/ConversationListView.js.map +2 -2
- package/dist/agents/tasks/TaskTable.js +5 -4
- package/dist/agents/tasks/TaskTable.js.map +2 -2
- package/dist/agents/tasks/WorkflowsTable.js +4 -5
- package/dist/agents/tasks/WorkflowsTable.js.map +2 -2
- package/dist/agents/tasks/taskColumns.js +1 -1
- package/dist/agents/tasks/taskColumns.js.map +1 -1
- package/dist/agents/tasks/taskTableLabels.js +1 -1
- package/dist/agents/tasks/taskTableLabels.js.map +1 -1
- package/dist/agents/tasks/workflowTableLabels.js +1 -1
- package/dist/agents/tasks/workflowTableLabels.js.map +1 -1
- package/dist/{ai-IM4A23YT.cjs → ai-KBYNRNZ6.cjs} +28 -26
- package/dist/ai-KBYNRNZ6.cjs.map +1 -0
- package/dist/calls/connected/CallControls.d.ts +2 -0
- package/dist/calls/connected/CallControls.js +71 -9
- package/dist/calls/connected/CallControls.js.map +2 -2
- package/dist/calls/connected/ShareDocumentDialog.d.ts +14 -0
- package/dist/calls/connected/ShareDocumentDialog.js +77 -0
- package/dist/calls/connected/ShareDocumentDialog.js.map +7 -0
- package/dist/calls/index.cjs +121 -121
- package/dist/chat/index.cjs +9 -8
- package/dist/{chunk-T23UTIRI.cjs → chunk-2PZT3J34.cjs} +6 -6
- package/dist/{chunk-T23UTIRI.cjs.map → chunk-2PZT3J34.cjs.map} +1 -1
- package/dist/{chunk-SGYSDABK.cjs → chunk-2W5E62EY.cjs} +6 -6
- package/dist/{chunk-SGYSDABK.cjs.map → chunk-2W5E62EY.cjs.map} +1 -1
- package/dist/{chunk-TDO5UWXF.cjs → chunk-3SCNXNHI.cjs} +5 -5
- package/dist/{chunk-TDO5UWXF.cjs.map → chunk-3SCNXNHI.cjs.map} +1 -1
- package/dist/{chunk-KTQOGT2L.cjs → chunk-474GPLCM.cjs} +7 -7
- package/dist/{chunk-KTQOGT2L.cjs.map → chunk-474GPLCM.cjs.map} +1 -1
- package/dist/{chunk-TP5PGWIO.cjs → chunk-4IOYQLKG.cjs} +3 -3
- package/dist/{chunk-TP5PGWIO.cjs.map → chunk-4IOYQLKG.cjs.map} +1 -1
- package/dist/{chunk-NY3YUCOW.cjs → chunk-4NPCDS2X.cjs} +3 -3
- package/dist/{chunk-NY3YUCOW.cjs.map → chunk-4NPCDS2X.cjs.map} +1 -1
- package/dist/{chunk-CPG7II4E.cjs → chunk-4RBQ44RY.cjs} +28 -28
- package/dist/chunk-4RBQ44RY.cjs.map +1 -0
- package/dist/{chunk-BQ5RIWWT.cjs → chunk-4VZZWYEC.cjs} +3 -3
- package/dist/{chunk-BQ5RIWWT.cjs.map → chunk-4VZZWYEC.cjs.map} +1 -1
- package/dist/{chunk-Y24V6HPR.cjs → chunk-52KGMAO5.cjs} +15 -15
- package/dist/{chunk-Y24V6HPR.cjs.map → chunk-52KGMAO5.cjs.map} +1 -1
- package/dist/{chunk-HB2O4THB.cjs → chunk-5534FYXP.cjs} +4 -4
- package/dist/{chunk-HB2O4THB.cjs.map → chunk-5534FYXP.cjs.map} +1 -1
- package/dist/chunk-5GCCUXMT.cjs +63 -0
- package/dist/chunk-5GCCUXMT.cjs.map +1 -0
- package/dist/chunk-5LTIZ44D.cjs +95 -0
- package/dist/chunk-5LTIZ44D.cjs.map +1 -0
- package/dist/{chunk-YGXOKB5Z.cjs → chunk-734NPQNR.cjs} +4 -4
- package/dist/{chunk-YGXOKB5Z.cjs.map → chunk-734NPQNR.cjs.map} +1 -1
- package/dist/{chunk-SB4M3ITT.cjs → chunk-7VUJGHMY.cjs} +444 -100
- package/dist/chunk-7VUJGHMY.cjs.map +1 -0
- package/dist/chunk-AFQTQC7A.cjs +35 -0
- package/dist/chunk-AFQTQC7A.cjs.map +1 -0
- package/dist/{chunk-XKVPSOKP.cjs → chunk-AY6EZSZB.cjs} +4 -4
- package/dist/{chunk-XKVPSOKP.cjs.map → chunk-AY6EZSZB.cjs.map} +1 -1
- package/dist/{chunk-TT4IF52H.cjs → chunk-BVAT4EVC.cjs} +40 -41
- package/dist/chunk-BVAT4EVC.cjs.map +1 -0
- package/dist/{chunk-VGCTYTEW.cjs → chunk-C2OICDMI.cjs} +10 -10
- package/dist/{chunk-VGCTYTEW.cjs.map → chunk-C2OICDMI.cjs.map} +1 -1
- package/dist/{chunk-CPR6EHG7.cjs → chunk-DR2AH7JL.cjs} +179 -55
- package/dist/chunk-DR2AH7JL.cjs.map +1 -0
- package/dist/{chunk-NJCK6V6U.cjs → chunk-EATIFPKP.cjs} +4 -60
- package/dist/chunk-EATIFPKP.cjs.map +1 -0
- package/dist/{chunk-B3LZITVF.cjs → chunk-EHP6OH5D.cjs} +11 -451
- package/dist/chunk-EHP6OH5D.cjs.map +1 -0
- package/dist/{chunk-DDIW4HLU.cjs → chunk-ENGL7P3I.cjs} +46 -37
- package/dist/chunk-ENGL7P3I.cjs.map +1 -0
- package/dist/{chunk-QHOHDNBU.cjs → chunk-FKFQCK3C.cjs} +4 -4
- package/dist/{chunk-QHOHDNBU.cjs.map → chunk-FKFQCK3C.cjs.map} +1 -1
- package/dist/{chunk-6UTKM5AB.cjs → chunk-GKVE5JGB.cjs} +76 -76
- package/dist/chunk-GKVE5JGB.cjs.map +1 -0
- package/dist/{chunk-B2HNNG25.cjs → chunk-GPX5VC57.cjs} +50 -50
- package/dist/{chunk-B2HNNG25.cjs.map → chunk-GPX5VC57.cjs.map} +1 -1
- package/dist/{chunk-WAV762GP.cjs → chunk-GQXPNIRE.cjs} +6 -6
- package/dist/{chunk-WAV762GP.cjs.map → chunk-GQXPNIRE.cjs.map} +1 -1
- package/dist/chunk-GX2EBMJW.cjs +133 -0
- package/dist/chunk-GX2EBMJW.cjs.map +1 -0
- package/dist/{chunk-7OPOPYV6.cjs → chunk-H5OLHP2U.cjs} +3 -3
- package/dist/{chunk-7OPOPYV6.cjs.map → chunk-H5OLHP2U.cjs.map} +1 -1
- package/dist/chunk-HYUKPHCT.cjs +66 -0
- package/dist/chunk-HYUKPHCT.cjs.map +1 -0
- package/dist/{chunk-NNUK5ZM7.cjs → chunk-JQLWKNJO.cjs} +29 -27
- package/dist/chunk-JQLWKNJO.cjs.map +1 -0
- package/dist/{chunk-OEREKAAP.cjs → chunk-JZEYHDWJ.cjs} +75 -75
- package/dist/{chunk-OEREKAAP.cjs.map → chunk-JZEYHDWJ.cjs.map} +1 -1
- package/dist/{chunk-PGJYD67F.cjs → chunk-KNGZZC4O.cjs} +7 -6
- package/dist/chunk-KNGZZC4O.cjs.map +1 -0
- package/dist/{chunk-NIE3N6OM.cjs → chunk-KP5AITQ4.cjs} +10 -10
- package/dist/{chunk-NIE3N6OM.cjs.map → chunk-KP5AITQ4.cjs.map} +1 -1
- package/dist/{chunk-YYPZOEED.cjs → chunk-LHWOKOMP.cjs} +23 -2
- package/dist/chunk-LHWOKOMP.cjs.map +1 -0
- package/dist/{chunk-57NHXEU2.cjs → chunk-MXBXZXXQ.cjs} +5 -5
- package/dist/{chunk-57NHXEU2.cjs.map → chunk-MXBXZXXQ.cjs.map} +1 -1
- package/dist/{chunk-WXUU3COI.cjs → chunk-MZ2KZXNU.cjs} +3 -3
- package/dist/{chunk-WXUU3COI.cjs.map → chunk-MZ2KZXNU.cjs.map} +1 -1
- package/dist/chunk-NAJN32MF.cjs +154 -0
- package/dist/chunk-NAJN32MF.cjs.map +1 -0
- package/dist/{chunk-557MJ4IH.cjs → chunk-NLOETJCB.cjs} +17 -154
- package/dist/chunk-NLOETJCB.cjs.map +1 -0
- package/dist/{chunk-4XJEHKVZ.cjs → chunk-PIYYBPHH.cjs} +4 -4
- package/dist/{chunk-4XJEHKVZ.cjs.map → chunk-PIYYBPHH.cjs.map} +1 -1
- package/dist/chunk-Q3XJUXID.cjs +4774 -0
- package/dist/chunk-Q3XJUXID.cjs.map +1 -0
- package/dist/{chunk-325GVZE6.cjs → chunk-Q6DQGGP4.cjs} +3 -3
- package/dist/{chunk-325GVZE6.cjs.map → chunk-Q6DQGGP4.cjs.map} +1 -1
- package/dist/chunk-QFXILJMJ.cjs +458 -0
- package/dist/chunk-QFXILJMJ.cjs.map +1 -0
- package/dist/{chunk-R7CJEIA5.cjs → chunk-RYVZDFVO.cjs} +8 -9
- package/dist/chunk-RYVZDFVO.cjs.map +1 -0
- package/dist/{chunk-VLCY46K6.cjs → chunk-TG2GM7WJ.cjs} +4 -3
- package/dist/chunk-TG2GM7WJ.cjs.map +1 -0
- package/dist/{chunk-EOG6OT5I.cjs → chunk-TXP2N3DC.cjs} +4 -4
- package/dist/{chunk-EOG6OT5I.cjs.map → chunk-TXP2N3DC.cjs.map} +1 -1
- package/dist/{chunk-KXIRVKCJ.cjs → chunk-UUENH4BJ.cjs} +3 -3
- package/dist/{chunk-KXIRVKCJ.cjs.map → chunk-UUENH4BJ.cjs.map} +1 -1
- package/dist/chunk-VJ5ZLRBD.cjs +27 -0
- package/dist/chunk-VJ5ZLRBD.cjs.map +1 -0
- package/dist/{chunk-P77YTTJ3.cjs → chunk-W6B3RYTX.cjs} +4 -4
- package/dist/{chunk-P77YTTJ3.cjs.map → chunk-W6B3RYTX.cjs.map} +1 -1
- package/dist/chunk-WOOOMTTA.cjs +19 -0
- package/dist/chunk-WOOOMTTA.cjs.map +1 -0
- package/dist/{chunk-ZPPMAL5P.cjs → chunk-WQMR3O2D.cjs} +6 -10
- package/dist/chunk-WQMR3O2D.cjs.map +1 -0
- package/dist/{chunk-CJYWHUZR.cjs → chunk-XCKHOXRP.cjs} +4 -4
- package/dist/{chunk-CJYWHUZR.cjs.map → chunk-XCKHOXRP.cjs.map} +1 -1
- package/dist/{chunk-6WMMZLEV.cjs → chunk-XJEXFEWG.cjs} +2 -27
- package/dist/chunk-XJEXFEWG.cjs.map +1 -0
- package/dist/chunk-XK4TVJKD.cjs +73 -0
- package/dist/chunk-XK4TVJKD.cjs.map +1 -0
- package/dist/chunk-XTR26TNE.cjs +1358 -0
- package/dist/chunk-XTR26TNE.cjs.map +1 -0
- package/dist/{chunk-E7TE2WVT.cjs → chunk-ZVEW3JBT.cjs} +3 -3
- package/dist/{chunk-E7TE2WVT.cjs.map → chunk-ZVEW3JBT.cjs.map} +1 -1
- package/dist/collaboration/index.cjs +73 -73
- package/dist/collaboration/sharing/ShareControl.js +10 -2
- package/dist/collaboration/sharing/ShareControl.js.map +2 -2
- package/dist/components/SharedCell.d.ts +2 -4
- package/dist/components/SharedCell.js +4 -8
- package/dist/components/SharedCell.js.map +2 -2
- package/dist/components/ZoomSlider.d.ts +25 -0
- package/dist/components/ZoomSlider.js +59 -0
- package/dist/components/ZoomSlider.js.map +7 -0
- package/dist/connect/docx.cjs +20 -20
- package/dist/connect/index.cjs +1210 -1264
- package/dist/connect/index.cjs.map +1 -1
- package/dist/connect/viewer.cjs +42 -36
- package/dist/connection/ai.d.ts +1 -1
- package/dist/connection/facts/factPageColumns.js +3 -9
- package/dist/connection/facts/factPageColumns.js.map +2 -2
- package/dist/connection/files/ConnectedNewFileMenu.d.ts +2 -1
- package/dist/connection/files/ConnectedNewFileMenu.js +9 -3
- package/dist/connection/files/ConnectedNewFileMenu.js.map +2 -2
- package/dist/connection/files/explorer/ConnectedFilesExplorer.js +1 -1
- package/dist/connection/files/explorer/ConnectedFilesExplorer.js.map +2 -2
- package/dist/connection/files/explorer/FileTiles.js +1 -1
- package/dist/connection/files/explorer/FileTiles.js.map +2 -2
- package/dist/connection/files/fields/documentField.js +1 -1
- package/dist/connection/files/fields/documentField.js.map +2 -2
- package/dist/connection/files/grid/cells.js +1 -3
- package/dist/connection/files/grid/cells.js.map +2 -2
- package/dist/connection/files/grid/documentColumns.js +4 -3
- package/dist/connection/files/grid/documentColumns.js.map +2 -2
- package/dist/connection/files/page/DocumentsFilterBarActions.js +17 -28
- package/dist/connection/files/page/DocumentsFilterBarActions.js.map +2 -2
- package/dist/connection/mail/useMailboxDefaults.js +1 -1
- package/dist/connection/mail/useMailboxDefaults.js.map +2 -2
- package/dist/connection/panels/useSessionPanelMode.js +3 -2
- package/dist/connection/panels/useSessionPanelMode.js.map +2 -2
- package/dist/connection/presentation/ClippingMediaViewer.d.ts +12 -0
- package/dist/connection/presentation/ClippingMediaViewer.js +153 -0
- package/dist/connection/presentation/ClippingMediaViewer.js.map +7 -0
- package/dist/connection/presentation/ClippingPdfViewer.d.ts +22 -0
- package/dist/connection/presentation/ClippingPdfViewer.js +75 -0
- package/dist/connection/presentation/ClippingPdfViewer.js.map +7 -0
- package/dist/connection/presentation/ConnectedPresentation.d.ts +12 -0
- package/dist/connection/presentation/ConnectedPresentation.js +100 -0
- package/dist/connection/presentation/ConnectedPresentation.js.map +7 -0
- package/dist/connection/presentation/ConnectedSlidesTab.d.ts +20 -0
- package/dist/connection/presentation/ConnectedSlidesTab.js +220 -0
- package/dist/connection/presentation/ConnectedSlidesTab.js.map +7 -0
- package/dist/connection/presentation/CropClipDialog.d.ts +11 -0
- package/dist/connection/presentation/CropClipDialog.js +86 -0
- package/dist/connection/presentation/CropClipDialog.js.map +7 -0
- package/dist/connection/presentation/GenerateTile.d.ts +4 -0
- package/dist/connection/presentation/GenerateTile.js +24 -0
- package/dist/connection/presentation/GenerateTile.js.map +7 -0
- package/dist/connection/presentation/LabelColumnMenu.d.ts +8 -0
- package/dist/connection/presentation/LabelColumnMenu.js +38 -0
- package/dist/connection/presentation/LabelColumnMenu.js.map +7 -0
- package/dist/connection/presentation/PresentationDialogs.d.ts +39 -0
- package/dist/connection/presentation/PresentationDialogs.js +295 -0
- package/dist/connection/presentation/PresentationDialogs.js.map +7 -0
- package/dist/connection/presentation/PresentationFileCard.d.ts +10 -0
- package/dist/connection/presentation/PresentationFileCard.js +35 -0
- package/dist/connection/presentation/PresentationFileCard.js.map +7 -0
- package/dist/connection/presentation/PresentationPill.d.ts +8 -0
- package/dist/connection/presentation/PresentationPill.js +44 -0
- package/dist/connection/presentation/PresentationPill.js.map +7 -0
- package/dist/connection/presentation/PresentationSlot.d.ts +7 -0
- package/dist/connection/presentation/PresentationSlot.js +35 -0
- package/dist/connection/presentation/PresentationSlot.js.map +7 -0
- package/dist/connection/presentation/requests.d.ts +16 -0
- package/dist/connection/presentation/requests.js +20 -0
- package/dist/connection/presentation/requests.js.map +7 -0
- package/dist/connection/presentation/useImageGeneration.d.ts +11 -0
- package/dist/connection/presentation/useImageGeneration.js +66 -0
- package/dist/connection/presentation/useImageGeneration.js.map +7 -0
- package/dist/connection/presentation/useLabelColumns.d.ts +15 -0
- package/dist/connection/presentation/useLabelColumns.js +33 -0
- package/dist/connection/presentation/useLabelColumns.js.map +7 -0
- package/dist/connection/presentation/usePresentationController.d.ts +15 -0
- package/dist/connection/presentation/usePresentationController.js +118 -0
- package/dist/connection/presentation/usePresentationController.js.map +7 -0
- package/dist/connection/presentation/usePresentationFiles.d.ts +44 -0
- package/dist/connection/presentation/usePresentationFiles.js +307 -0
- package/dist/connection/presentation/usePresentationFiles.js.map +7 -0
- package/dist/connection/presentation/useViewerClipping.d.ts +14 -0
- package/dist/connection/presentation/useViewerClipping.js +18 -0
- package/dist/connection/presentation/useViewerClipping.js.map +7 -0
- package/dist/connection/sharing/WorkspaceMembersList.d.ts +4 -0
- package/dist/connection/sharing/WorkspaceMembersList.js +34 -0
- package/dist/connection/sharing/WorkspaceMembersList.js.map +7 -0
- package/dist/connection/shell/ConnectedAppShell.js +9 -1
- package/dist/connection/shell/ConnectedAppShell.js.map +2 -2
- package/dist/connection/viewer/CleanViewControl.d.ts +8 -0
- package/dist/connection/viewer/CleanViewControl.js +76 -0
- package/dist/connection/viewer/CleanViewControl.js.map +7 -0
- package/dist/connection/viewer/ConnectedDocumentViewer.js +31 -31
- package/dist/connection/viewer/ConnectedDocumentViewer.js.map +2 -2
- package/dist/connection/viewer/ViewerCropModal.d.ts +5 -0
- package/dist/connection/viewer/ViewerCropModal.js +22 -0
- package/dist/connection/viewer/ViewerCropModal.js.map +7 -0
- package/dist/connection/viewer/ViewerPdfPane.d.ts +3 -1
- package/dist/connection/viewer/ViewerPdfPane.js +57 -2
- package/dist/connection/viewer/ViewerPdfPane.js.map +2 -2
- package/dist/connection/viewer/drafts.js +6 -4
- package/dist/connection/viewer/drafts.js.map +2 -2
- package/dist/connection/viewer/pdf/PdfPassageHighlights.d.ts +12 -0
- package/dist/connection/viewer/pdf/PdfPassageHighlights.js +36 -0
- package/dist/connection/viewer/pdf/PdfPassageHighlights.js.map +7 -0
- package/dist/connection/viewer/pdf/passageHighlights.d.ts +26 -0
- package/dist/connection/viewer/pdf/passageHighlights.js +40 -0
- package/dist/connection/viewer/pdf/passageHighlights.js.map +7 -0
- package/dist/connection/viewer/pdf/usePdfPassageHighlights.d.ts +9 -0
- package/dist/connection/viewer/pdf/usePdfPassageHighlights.js +47 -0
- package/dist/connection/viewer/pdf/usePdfPassageHighlights.js.map +7 -0
- package/dist/connection/viewer/shareDocument.d.ts +11 -0
- package/dist/connection/viewer/shareDocument.js +11 -0
- package/dist/connection/viewer/shareDocument.js.map +7 -0
- package/dist/connection/viewer/slidesTabChunk.d.ts +2 -0
- package/dist/connection/viewer/slidesTabChunk.js +9 -0
- package/dist/connection/viewer/slidesTabChunk.js.map +7 -0
- package/dist/connection/viewer/useCleanView.d.ts +14 -0
- package/dist/connection/viewer/useCleanView.js +29 -0
- package/dist/connection/viewer/useCleanView.js.map +7 -0
- package/dist/connection/viewer/useViewedDocument.d.ts +1 -0
- package/dist/connection/viewer/useViewedDocument.js +9 -1
- package/dist/connection/viewer/useViewedDocument.js.map +2 -2
- package/dist/connection/viewer/useViewerTabs.js +18 -4
- package/dist/connection/viewer/useViewerTabs.js.map +2 -2
- package/dist/connection/workflows/ConnectedWorkflowStart.d.ts +14 -2
- package/dist/connection/workflows/ConnectedWorkflowStart.js +5 -2
- package/dist/connection/workflows/ConnectedWorkflowStart.js.map +2 -2
- package/dist/connection/workflows/workflowsPageLabels.js +1 -1
- package/dist/connection/workflows/workflowsPageLabels.js.map +1 -1
- package/dist/dashboards/index.cjs +1 -1
- package/dist/databases/index.cjs +49 -49
- package/dist/document-tools/DocumentToolButtons.d.ts +2 -0
- package/dist/document-tools/DocumentToolButtons.js +22 -1
- package/dist/document-tools/DocumentToolButtons.js.map +2 -2
- package/dist/document-tools/index.cjs +16 -12
- package/dist/document-tools/index.d.ts +1 -1
- package/dist/document-tools/index.js +2 -0
- package/dist/document-tools/index.js.map +2 -2
- package/dist/embed/index.cjs +43 -41
- package/dist/facts/factColumns.js +3 -3
- package/dist/facts/factColumns.js.map +1 -1
- package/dist/facts/index.cjs +42 -42
- package/dist/files/GridViewImpl.js +1 -1
- package/dist/files/GridViewImpl.js.map +2 -2
- package/dist/files/HtmlViewerParts.js +7 -15
- package/dist/files/HtmlViewerParts.js.map +2 -2
- package/dist/files/ViewerChrome.d.ts +5 -1
- package/dist/files/ViewerChrome.js +16 -6
- package/dist/files/ViewerChrome.js.map +2 -2
- package/dist/files/index.cjs +226 -226
- package/dist/files/navigator/DocumentSearchList.js +1 -1
- package/dist/files/navigator/DocumentSearchList.js.map +2 -2
- package/dist/index.cjs +1668 -1666
- package/dist/index.cjs.map +1 -1
- package/dist/presentation/BoxActionBar.d.ts +11 -0
- package/dist/presentation/BoxActionBar.js +182 -0
- package/dist/presentation/BoxActionBar.js.map +7 -0
- package/dist/presentation/ClipActionBar.d.ts +26 -0
- package/dist/presentation/ClipActionBar.js +103 -0
- package/dist/presentation/ClipActionBar.js.map +7 -0
- package/dist/presentation/ClipCaptureOverlay.d.ts +14 -0
- package/dist/presentation/ClipCaptureOverlay.js +69 -0
- package/dist/presentation/ClipCaptureOverlay.js.map +7 -0
- package/dist/presentation/ClipImage.d.ts +21 -0
- package/dist/presentation/ClipImage.js +119 -0
- package/dist/presentation/ClipImage.js.map +7 -0
- package/dist/presentation/ClipTray.d.ts +11 -0
- package/dist/presentation/ClipTray.js +152 -0
- package/dist/presentation/ClipTray.js.map +7 -0
- package/dist/presentation/ClipViewControls.d.ts +11 -0
- package/dist/presentation/ClipViewControls.js +142 -0
- package/dist/presentation/ClipViewControls.js.map +7 -0
- package/dist/presentation/DesignMenu.d.ts +8 -0
- package/dist/presentation/DesignMenu.js +199 -0
- package/dist/presentation/DesignMenu.js.map +7 -0
- package/dist/presentation/LayoutMenu.d.ts +17 -0
- package/dist/presentation/LayoutMenu.js +122 -0
- package/dist/presentation/LayoutMenu.js.map +7 -0
- package/dist/presentation/MediaClip.d.ts +15 -0
- package/dist/presentation/MediaClip.js +67 -0
- package/dist/presentation/MediaClip.js.map +7 -0
- package/dist/presentation/Notice.d.ts +6 -0
- package/dist/presentation/Notice.js +43 -0
- package/dist/presentation/Notice.js.map +7 -0
- package/dist/presentation/PresentationStage.d.ts +32 -0
- package/dist/presentation/PresentationStage.js +232 -0
- package/dist/presentation/PresentationStage.js.map +7 -0
- package/dist/presentation/PresenterView.d.ts +16 -0
- package/dist/presentation/PresenterView.js +69 -0
- package/dist/presentation/PresenterView.js.map +7 -0
- package/dist/presentation/SlideDecor.d.ts +25 -0
- package/dist/presentation/SlideDecor.js +189 -0
- package/dist/presentation/SlideDecor.js.map +7 -0
- package/dist/presentation/SlidesEditor.d.ts +25 -0
- package/dist/presentation/SlidesEditor.js +359 -0
- package/dist/presentation/SlidesEditor.js.map +7 -0
- package/dist/presentation/StageBox.d.ts +30 -0
- package/dist/presentation/StageBox.js +281 -0
- package/dist/presentation/StageBox.js.map +7 -0
- package/dist/presentation/StageItem.d.ts +37 -0
- package/dist/presentation/StageItem.js +211 -0
- package/dist/presentation/StageItem.js.map +7 -0
- package/dist/presentation/box-style.d.ts +6 -0
- package/dist/presentation/box-style.js +19 -0
- package/dist/presentation/box-style.js.map +7 -0
- package/dist/presentation/boxes.d.ts +105 -0
- package/dist/presentation/boxes.js +103 -0
- package/dist/presentation/boxes.js.map +7 -0
- package/dist/presentation/draw-boxes.d.ts +8 -0
- package/dist/presentation/draw-boxes.js +130 -0
- package/dist/presentation/draw-boxes.js.map +7 -0
- package/dist/presentation/export-boxes.d.ts +10 -0
- package/dist/presentation/export-boxes.js +74 -0
- package/dist/presentation/export-boxes.js.map +7 -0
- package/dist/presentation/export-pptx.d.ts +16 -0
- package/dist/presentation/export-pptx.js +194 -0
- package/dist/presentation/export-pptx.js.map +7 -0
- package/dist/presentation/import-pptx.d.ts +35 -0
- package/dist/presentation/import-pptx.js +659 -0
- package/dist/presentation/import-pptx.js.map +7 -0
- package/dist/presentation/merge-outside-edits.d.ts +12 -0
- package/dist/presentation/merge-outside-edits.js +35 -0
- package/dist/presentation/merge-outside-edits.js.map +7 -0
- package/dist/presentation/model.d.ts +201 -0
- package/dist/presentation/model.js +271 -0
- package/dist/presentation/model.js.map +7 -0
- package/dist/presentation/panel-id.d.ts +34 -0
- package/dist/presentation/panel-id.js +24 -0
- package/dist/presentation/panel-id.js.map +7 -0
- package/dist/presentation/persistence.d.ts +121 -0
- package/dist/presentation/persistence.js +141 -0
- package/dist/presentation/persistence.js.map +7 -0
- package/dist/presentation/pptx-data.d.ts +22 -0
- package/dist/presentation/pptx-data.js +83 -0
- package/dist/presentation/pptx-data.js.map +7 -0
- package/dist/presentation/pptx-xml.d.ts +90 -0
- package/dist/presentation/pptx-xml.js +333 -0
- package/dist/presentation/pptx-xml.js.map +7 -0
- package/dist/presentation/render-slides.d.ts +58 -0
- package/dist/presentation/render-slides.js +309 -0
- package/dist/presentation/render-slides.js.map +7 -0
- package/dist/presentation/saved-boxes.d.ts +11 -0
- package/dist/presentation/saved-boxes.js +80 -0
- package/dist/presentation/saved-boxes.js.map +7 -0
- package/dist/presentation/slide-layout.d.ts +54 -0
- package/dist/presentation/slide-layout.js +117 -0
- package/dist/presentation/slide-layout.js.map +7 -0
- package/dist/presentation/stage-videos.d.ts +5 -0
- package/dist/presentation/stage-videos.js +19 -0
- package/dist/presentation/stage-videos.js.map +7 -0
- package/dist/presentation/store.d.ts +203 -0
- package/dist/presentation/store.js +429 -0
- package/dist/presentation/store.js.map +7 -0
- package/dist/presentation/theme.d.ts +102 -0
- package/dist/presentation/theme.js +276 -0
- package/dist/presentation/theme.js.map +7 -0
- package/dist/presentation/useClipDrag.d.ts +26 -0
- package/dist/presentation/useClipDrag.js +65 -0
- package/dist/presentation/useClipDrag.js.map +7 -0
- package/dist/presentation/useObjectUrl.d.ts +6 -0
- package/dist/presentation/useObjectUrl.js +15 -0
- package/dist/presentation/useObjectUrl.js.map +7 -0
- package/dist/presentation/usePresenterKeys.d.ts +13 -0
- package/dist/presentation/usePresenterKeys.js +62 -0
- package/dist/presentation/usePresenterKeys.js.map +7 -0
- package/dist/settings/index.cjs +151 -150
- package/dist/shell/PanelPortal.js +1 -0
- package/dist/shell/PanelPortal.js.map +2 -2
- package/dist/shell/index.cjs +112 -110
- package/dist/shell/panel-windows.d.ts +2 -0
- package/dist/shell/panel-windows.js +7 -2
- package/dist/shell/panel-windows.js.map +2 -2
- package/dist/studio/index.cjs +28 -26
- package/dist/studio/index.cjs.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/workflow-canvas/index.cjs +58 -57
- package/dist/workflow-canvas/index.cjs.map +1 -1
- package/node_modules/@arbidocs/coedit/package.json +1 -1
- package/package.json +6 -5
- package/dist/ConnectedCallDock-WER7R222.cjs.map +0 -1
- package/dist/DocumentReviewCard-ZSBZBGFK.cjs.map +0 -1
- package/dist/FilesViewerDialog-6UKR5WEF.cjs.map +0 -1
- package/dist/GridViewImpl-ZMJJWTOM.cjs.map +0 -1
- package/dist/WorkspaceTableView-J3C6VH4T.cjs.map +0 -1
- package/dist/ai-IM4A23YT.cjs.map +0 -1
- package/dist/chunk-557MJ4IH.cjs.map +0 -1
- package/dist/chunk-6UTKM5AB.cjs.map +0 -1
- package/dist/chunk-6WMMZLEV.cjs.map +0 -1
- package/dist/chunk-B3LZITVF.cjs.map +0 -1
- package/dist/chunk-CPG7II4E.cjs.map +0 -1
- package/dist/chunk-CPR6EHG7.cjs.map +0 -1
- package/dist/chunk-DDIW4HLU.cjs.map +0 -1
- package/dist/chunk-NJCK6V6U.cjs.map +0 -1
- package/dist/chunk-NNUK5ZM7.cjs.map +0 -1
- package/dist/chunk-PGJYD67F.cjs.map +0 -1
- package/dist/chunk-R7CJEIA5.cjs.map +0 -1
- package/dist/chunk-SB4M3ITT.cjs.map +0 -1
- package/dist/chunk-TT4IF52H.cjs.map +0 -1
- package/dist/chunk-VLCY46K6.cjs.map +0 -1
- package/dist/chunk-YYPZOEED.cjs.map +0 -1
- package/dist/chunk-ZPPMAL5P.cjs.map +0 -1
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/connection/presentation/PresentationFileCard.tsx"],
|
|
4
|
+
"sourcesContent": ["/**\n * A presentation saved before presentations were PDFs (the editable data alone), in the viewer's\n * PDF tab: it has no slides to show there, so the card says what it is and opens its slides.\n */\n\nimport { Pencil, Presentation } from 'lucide-react'\nimport { useArbiSessionStore } from '@arbidocs/react'\nimport { Button } from '@arbidocs/react/ui'\nimport { EmptyState } from '../../components/EmptyState'\nimport { presentationTitle } from '../../presentation/persistence'\nimport { editPresentation } from './requests'\n\nexport interface PresentationFileCardProps {\n documentId: string\n fileName: string\n}\n\n/** A presentation saved in the older format: opening it and saving makes it a presentation PDF. */\nexport function PresentationFileCard({ documentId, fileName }: PresentationFileCardProps) {\n const session = useArbiSessionStore()\n return (\n <div className=\"flex h-full items-center justify-center p-6\" data-testid=\"presentation-file\">\n <EmptyState\n icon={Presentation}\n title={presentationTitle(fileName)}\n description=\"A presentation saved in an earlier format, without its slides. Open it and save it to keep it as a presentation PDF; this file can then be deleted.\"\n action={\n <Button\n type=\"button\"\n onClick={() => editPresentation(session, { kind: 'open', documentId })}\n data-testid=\"presentation-file-edit\"\n >\n <Pencil className=\"size-4\" />\n Open the slides\n </Button>\n }\n />\n </div>\n )\n}\n"],
|
|
5
|
+
"mappings": ";AA2BU,SAKE,KALF;AAtBV,SAAS,QAAQ,oBAAoB;AACrC,SAAS,2BAA2B;AACpC,SAAS,cAAc;AACvB,SAAS,kBAAkB;AAC3B,SAAS,yBAAyB;AAClC,SAAS,wBAAwB;AAQ1B,SAAS,qBAAqB,EAAE,YAAY,SAAS,GAA8B;AACxF,QAAM,UAAU,oBAAoB;AACpC,SACE,oBAAC,SAAI,WAAU,+CAA8C,eAAY,qBACvE;AAAA,IAAC;AAAA;AAAA,MACC,MAAM;AAAA,MACN,OAAO,kBAAkB,QAAQ;AAAA,MACjC,aAAY;AAAA,MACZ,QACE;AAAA,QAAC;AAAA;AAAA,UACC,MAAK;AAAA,UACL,SAAS,MAAM,iBAAiB,SAAS,EAAE,MAAM,QAAQ,WAAW,CAAC;AAAA,UACrE,eAAY;AAAA,UAEZ;AAAA,gCAAC,UAAO,WAAU,UAAS;AAAA,YAAE;AAAA;AAAA;AAAA,MAE/B;AAAA;AAAA,EAEJ,GACF;AAEJ;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Back to the presentation, from any document the viewer shows (clips are gathered while reading,
|
|
3
|
+
* then arranged): its title and how many clips wait in its tray. Shown while a presentation is
|
|
4
|
+
* being made and the viewer is elsewhere.
|
|
5
|
+
*/
|
|
6
|
+
export declare function PresentationPill({ compact }: {
|
|
7
|
+
compact: boolean;
|
|
8
|
+
}): import("react").JSX.Element | null;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { Presentation } from "lucide-react";
|
|
4
|
+
import { DOCUMENT_VIEWER_PANEL, useArbiSessionState, useArbiSessionStore } from "@arbidocs/react";
|
|
5
|
+
import { Button } from "@arbidocs/react/ui";
|
|
6
|
+
import { usePresentation } from "../../presentation/store.js";
|
|
7
|
+
import { editPresentation } from "./requests.js";
|
|
8
|
+
function PresentationPill({ compact }) {
|
|
9
|
+
const session = useArbiSessionStore();
|
|
10
|
+
const boundTo = usePresentation((s) => s.boundTo);
|
|
11
|
+
const clips = usePresentation((s) => s.clips.length);
|
|
12
|
+
const title = usePresentation((s) => s.title);
|
|
13
|
+
const onIt = useArbiSessionState(
|
|
14
|
+
(s) => s.viewingDocument?.id === boundTo && s.documentViewer.tab === "slides"
|
|
15
|
+
);
|
|
16
|
+
if (onIt || boundTo === null && clips === 0) return null;
|
|
17
|
+
const back = () => {
|
|
18
|
+
if (boundTo === null) return editPresentation(session, { kind: "new" });
|
|
19
|
+
session.setViewingDocument({ id: boundTo, page: null });
|
|
20
|
+
session.setDocumentViewer({ tab: "slides" });
|
|
21
|
+
session.openPanel(DOCUMENT_VIEWER_PANEL, "docked");
|
|
22
|
+
};
|
|
23
|
+
return /* @__PURE__ */ jsxs(
|
|
24
|
+
Button,
|
|
25
|
+
{
|
|
26
|
+
type: "button",
|
|
27
|
+
variant: "outline",
|
|
28
|
+
size: "sm",
|
|
29
|
+
className: "h-7 max-w-56 gap-1.5 rounded-full px-2.5 text-xs",
|
|
30
|
+
onClick: back,
|
|
31
|
+
title: `Back to the presentation "${title}": ${clips} clip${clips === 1 ? "" : "s"} to arrange`,
|
|
32
|
+
"data-testid": "presentation-pill",
|
|
33
|
+
children: [
|
|
34
|
+
/* @__PURE__ */ jsx(Presentation, { className: "size-3.5 shrink-0" }),
|
|
35
|
+
!compact && /* @__PURE__ */ jsx("span", { className: "min-w-0 truncate", children: title }),
|
|
36
|
+
clips > 0 && /* @__PURE__ */ jsx("span", { className: "rounded-full bg-primary px-1.5 text-[10px] font-semibold leading-4 text-primary-foreground", children: clips })
|
|
37
|
+
]
|
|
38
|
+
}
|
|
39
|
+
);
|
|
40
|
+
}
|
|
41
|
+
export {
|
|
42
|
+
PresentationPill
|
|
43
|
+
};
|
|
44
|
+
//# sourceMappingURL=PresentationPill.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/connection/presentation/PresentationPill.tsx"],
|
|
4
|
+
"sourcesContent": ["import { Presentation } from 'lucide-react'\nimport { DOCUMENT_VIEWER_PANEL, useArbiSessionState, useArbiSessionStore } from '@arbidocs/react'\nimport { Button } from '@arbidocs/react/ui'\nimport { usePresentation } from '../../presentation/store'\nimport { editPresentation } from './requests'\n\n/**\n * Back to the presentation, from any document the viewer shows (clips are gathered while reading,\n * then arranged): its title and how many clips wait in its tray. Shown while a presentation is\n * being made and the viewer is elsewhere.\n */\nexport function PresentationPill({ compact }: { compact: boolean }) {\n const session = useArbiSessionStore()\n const boundTo = usePresentation((s) => s.boundTo)\n const clips = usePresentation((s) => s.clips.length)\n const title = usePresentation((s) => s.title)\n const onIt = useArbiSessionState(\n (s) => s.viewingDocument?.id === boundTo && s.documentViewer.tab === 'slides'\n )\n if (onIt || (boundTo === null && clips === 0)) return null\n const back = () => {\n if (boundTo === null) return editPresentation(session, { kind: 'new' })\n session.setViewingDocument({ id: boundTo, page: null })\n session.setDocumentViewer({ tab: 'slides' })\n session.openPanel(DOCUMENT_VIEWER_PANEL, 'docked')\n }\n return (\n <Button\n type=\"button\"\n variant=\"outline\"\n size=\"sm\"\n className=\"h-7 max-w-56 gap-1.5 rounded-full px-2.5 text-xs\"\n onClick={back}\n title={`Back to the presentation \"${title}\": ${clips} clip${clips === 1 ? '' : 's'} to arrange`}\n data-testid=\"presentation-pill\"\n >\n <Presentation className=\"size-3.5 shrink-0\" />\n {!compact && <span className=\"min-w-0 truncate\">{title}</span>}\n {clips > 0 && (\n <span className=\"rounded-full bg-primary px-1.5 text-[10px] font-semibold leading-4 text-primary-foreground\">\n {clips}\n </span>\n )}\n </Button>\n )\n}\n"],
|
|
5
|
+
"mappings": ";AA2BI,SASE,KATF;AA3BJ,SAAS,oBAAoB;AAC7B,SAAS,uBAAuB,qBAAqB,2BAA2B;AAChF,SAAS,cAAc;AACvB,SAAS,uBAAuB;AAChC,SAAS,wBAAwB;AAO1B,SAAS,iBAAiB,EAAE,QAAQ,GAAyB;AAClE,QAAM,UAAU,oBAAoB;AACpC,QAAM,UAAU,gBAAgB,CAAC,MAAM,EAAE,OAAO;AAChD,QAAM,QAAQ,gBAAgB,CAAC,MAAM,EAAE,MAAM,MAAM;AACnD,QAAM,QAAQ,gBAAgB,CAAC,MAAM,EAAE,KAAK;AAC5C,QAAM,OAAO;AAAA,IACX,CAAC,MAAM,EAAE,iBAAiB,OAAO,WAAW,EAAE,eAAe,QAAQ;AAAA,EACvE;AACA,MAAI,QAAS,YAAY,QAAQ,UAAU,EAAI,QAAO;AACtD,QAAM,OAAO,MAAM;AACjB,QAAI,YAAY,KAAM,QAAO,iBAAiB,SAAS,EAAE,MAAM,MAAM,CAAC;AACtE,YAAQ,mBAAmB,EAAE,IAAI,SAAS,MAAM,KAAK,CAAC;AACtD,YAAQ,kBAAkB,EAAE,KAAK,SAAS,CAAC;AAC3C,YAAQ,UAAU,uBAAuB,QAAQ;AAAA,EACnD;AACA,SACE;AAAA,IAAC;AAAA;AAAA,MACC,MAAK;AAAA,MACL,SAAQ;AAAA,MACR,MAAK;AAAA,MACL,WAAU;AAAA,MACV,SAAS;AAAA,MACT,OAAO,6BAA6B,KAAK,MAAM,KAAK,QAAQ,UAAU,IAAI,KAAK,GAAG;AAAA,MAClF,eAAY;AAAA,MAEZ;AAAA,4BAAC,gBAAa,WAAU,qBAAoB;AAAA,QAC3C,CAAC,WAAW,oBAAC,UAAK,WAAU,oBAAoB,iBAAM;AAAA,QACtD,QAAQ,KACP,oBAAC,UAAK,WAAU,8FACb,iBACH;AAAA;AAAA;AAAA,EAEJ;AAEJ;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Where the app shell mounts the presentation module: nothing (and none of the PDF engine) until
|
|
3
|
+
* the presentation is first opened, then `ConnectedPresentation` for the rest of the page's life,
|
|
4
|
+
* so the clips survive the presentation window being closed. A failure inside it is contained
|
|
5
|
+
* here: the presentation goes, the rest of the app stays.
|
|
6
|
+
*/
|
|
7
|
+
export declare function PresentationSlot(): import("react").JSX.Element | null;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import { lazy, Suspense, useEffect, useState } from "react";
|
|
4
|
+
import { isPanelOpen, useArbiSessionState, useArbiSessionStore } from "@arbidocs/react";
|
|
5
|
+
import { logger } from "@arbidocs/client";
|
|
6
|
+
import { ErrorBoundary } from "../../components/ErrorBoundary.js";
|
|
7
|
+
import { PRESENTATION_PANEL, presentationOpenedInThisPage } from "../../presentation/panel-id.js";
|
|
8
|
+
const ConnectedPresentation = lazy(
|
|
9
|
+
() => import("./ConnectedPresentation.js").then((m) => ({ default: m.ConnectedPresentation }))
|
|
10
|
+
);
|
|
11
|
+
function PresentationSlot() {
|
|
12
|
+
const session = useArbiSessionStore();
|
|
13
|
+
const isOpen = useArbiSessionState((state) => isPanelOpen(state, PRESENTATION_PANEL));
|
|
14
|
+
const [mounted, setMounted] = useState(false);
|
|
15
|
+
const opened = isOpen && presentationOpenedInThisPage();
|
|
16
|
+
useEffect(() => {
|
|
17
|
+
if (opened) setMounted(true);
|
|
18
|
+
else if (isOpen) session.closePanel(PRESENTATION_PANEL);
|
|
19
|
+
}, [opened, isOpen, session]);
|
|
20
|
+
return mounted ? /* @__PURE__ */ jsx(
|
|
21
|
+
ErrorBoundary,
|
|
22
|
+
{
|
|
23
|
+
fallback: () => null,
|
|
24
|
+
onError: (error) => {
|
|
25
|
+
logger.error("The presentation failed", error);
|
|
26
|
+
session.closePanel(PRESENTATION_PANEL);
|
|
27
|
+
},
|
|
28
|
+
children: /* @__PURE__ */ jsx(Suspense, { fallback: null, children: /* @__PURE__ */ jsx(ConnectedPresentation, {}) })
|
|
29
|
+
}
|
|
30
|
+
) : null;
|
|
31
|
+
}
|
|
32
|
+
export {
|
|
33
|
+
PresentationSlot
|
|
34
|
+
};
|
|
35
|
+
//# sourceMappingURL=PresentationSlot.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/connection/presentation/PresentationSlot.tsx"],
|
|
4
|
+
"sourcesContent": ["/**\n * Where the app shell mounts the presentation module: nothing (and none of the PDF engine) until\n * the presentation is first opened, then `ConnectedPresentation` for the rest of the page's life,\n * so the clips survive the presentation window being closed. A failure inside it is contained\n * here: the presentation goes, the rest of the app stays.\n */\n\nimport { lazy, Suspense, useEffect, useState } from 'react'\nimport { isPanelOpen, useArbiSessionState, useArbiSessionStore } from '@arbidocs/react'\nimport { logger } from '@arbidocs/client'\nimport { ErrorBoundary } from '../../components/ErrorBoundary'\nimport { PRESENTATION_PANEL, presentationOpenedInThisPage } from '../../presentation/panel-id'\n\nconst ConnectedPresentation = lazy(() =>\n import('./ConnectedPresentation').then((m) => ({ default: m.ConnectedPresentation }))\n)\n\nexport function PresentationSlot() {\n const session = useArbiSessionStore()\n const isOpen = useArbiSessionState((state) => isPanelOpen(state, PRESENTATION_PANEL))\n const [mounted, setMounted] = useState(false)\n const opened = isOpen && presentationOpenedInThisPage()\n\n useEffect(() => {\n if (opened) setMounted(true)\n // Restored open from an earlier page: there is nothing to present.\n else if (isOpen) session.closePanel(PRESENTATION_PANEL)\n }, [opened, isOpen, session])\n\n return mounted ? (\n <ErrorBoundary\n fallback={() => null}\n onError={(error) => {\n logger.error('The presentation failed', error)\n session.closePanel(PRESENTATION_PANEL)\n }}\n >\n <Suspense fallback={null}>\n <ConnectedPresentation />\n </Suspense>\n </ErrorBoundary>\n ) : null\n}\n"],
|
|
5
|
+
"mappings": ";AAsCQ;AA/BR,SAAS,MAAM,UAAU,WAAW,gBAAgB;AACpD,SAAS,aAAa,qBAAqB,2BAA2B;AACtE,SAAS,cAAc;AACvB,SAAS,qBAAqB;AAC9B,SAAS,oBAAoB,oCAAoC;AAEjE,MAAM,wBAAwB;AAAA,EAAK,MACjC,OAAO,yBAAyB,EAAE,KAAK,CAAC,OAAO,EAAE,SAAS,EAAE,sBAAsB,EAAE;AACtF;AAEO,SAAS,mBAAmB;AACjC,QAAM,UAAU,oBAAoB;AACpC,QAAM,SAAS,oBAAoB,CAAC,UAAU,YAAY,OAAO,kBAAkB,CAAC;AACpF,QAAM,CAAC,SAAS,UAAU,IAAI,SAAS,KAAK;AAC5C,QAAM,SAAS,UAAU,6BAA6B;AAEtD,YAAU,MAAM;AACd,QAAI,OAAQ,YAAW,IAAI;AAAA,aAElB,OAAQ,SAAQ,WAAW,kBAAkB;AAAA,EACxD,GAAG,CAAC,QAAQ,QAAQ,OAAO,CAAC;AAE5B,SAAO,UACL;AAAA,IAAC;AAAA;AAAA,MACC,UAAU,MAAM;AAAA,MAChB,SAAS,CAAC,UAAU;AAClB,eAAO,MAAM,2BAA2B,KAAK;AAC7C,gBAAQ,WAAW,kBAAkB;AAAA,MACvC;AAAA,MAEA,8BAAC,YAAS,UAAU,MAClB,8BAAC,yBAAsB,GACzB;AAAA;AAAA,EACF,IACE;AACN;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { type ArbiSessionStore } from '@arbidocs/react';
|
|
2
|
+
type Session = Pick<ArbiSessionStore, 'setViewingDocument' | 'setDocumentViewer' | 'openPanel' | 'startDraftDocument'>;
|
|
3
|
+
/** A presentation to edit: a new one, or a saved one (as of `version`; default its current one). */
|
|
4
|
+
export type PresentationRequest = {
|
|
5
|
+
kind: 'new';
|
|
6
|
+
} | {
|
|
7
|
+
kind: 'open';
|
|
8
|
+
documentId: string;
|
|
9
|
+
version?: number;
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* Edit a presentation in the viewer's slides tab: a saved one (its document, on that tab), or a
|
|
13
|
+
* new one (a presentation draft, saved into Files › Presentations when it is first saved).
|
|
14
|
+
*/
|
|
15
|
+
export declare function editPresentation(session: Session, request: PresentationRequest): void;
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { DOCUMENT_VIEWER_PANEL } from "@arbidocs/react";
|
|
3
|
+
import { versionRef } from "@arbidocs/react/artifacts";
|
|
4
|
+
function editPresentation(session, request) {
|
|
5
|
+
if (request.kind === "new") {
|
|
6
|
+
session.startDraftDocument("presentation");
|
|
7
|
+
return;
|
|
8
|
+
}
|
|
9
|
+
const { documentId, version } = request;
|
|
10
|
+
session.setViewingDocument({
|
|
11
|
+
id: version ? versionRef(documentId, version) : documentId,
|
|
12
|
+
page: null
|
|
13
|
+
});
|
|
14
|
+
session.setDocumentViewer({ tab: "slides" });
|
|
15
|
+
session.openPanel(DOCUMENT_VIEWER_PANEL, "docked");
|
|
16
|
+
}
|
|
17
|
+
export {
|
|
18
|
+
editPresentation
|
|
19
|
+
};
|
|
20
|
+
//# sourceMappingURL=requests.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/connection/presentation/requests.ts"],
|
|
4
|
+
"sourcesContent": ["import { DOCUMENT_VIEWER_PANEL, type ArbiSessionStore } from '@arbidocs/react'\nimport { versionRef } from '@arbidocs/react/artifacts'\n\ntype Session = Pick<\n ArbiSessionStore,\n 'setViewingDocument' | 'setDocumentViewer' | 'openPanel' | 'startDraftDocument'\n>\n\n/** A presentation to edit: a new one, or a saved one (as of `version`; default its current one). */\nexport type PresentationRequest =\n { kind: 'new' } | { kind: 'open'; documentId: string; version?: number }\n\n/**\n * Edit a presentation in the viewer's slides tab: a saved one (its document, on that tab), or a\n * new one (a presentation draft, saved into Files \u203A Presentations when it is first saved).\n */\nexport function editPresentation(session: Session, request: PresentationRequest): void {\n if (request.kind === 'new') {\n session.startDraftDocument('presentation')\n return\n }\n const { documentId, version } = request\n session.setViewingDocument({\n id: version ? versionRef(documentId, version) : documentId,\n page: null,\n })\n session.setDocumentViewer({ tab: 'slides' })\n session.openPanel(DOCUMENT_VIEWER_PANEL, 'docked')\n}\n"],
|
|
5
|
+
"mappings": ";AAAA,SAAS,6BAAoD;AAC7D,SAAS,kBAAkB;AAepB,SAAS,iBAAiB,SAAkB,SAAoC;AACrF,MAAI,QAAQ,SAAS,OAAO;AAC1B,YAAQ,mBAAmB,cAAc;AACzC;AAAA,EACF;AACA,QAAM,EAAE,YAAY,QAAQ,IAAI;AAChC,UAAQ,mBAAmB;AAAA,IACzB,IAAI,UAAU,WAAW,YAAY,OAAO,IAAI;AAAA,IAChD,MAAM;AAAA,EACR,CAAC;AACD,UAAQ,kBAAkB,EAAE,KAAK,SAAS,CAAC;AAC3C,UAAQ,UAAU,uBAAuB,QAAQ;AACnD;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generate image, for a presentation: the app's own Generate image dialog (the workflow's form:
|
|
3
|
+
* prompt, source images to edit or combine, shape) launched here instead of into a chat. The run is
|
|
4
|
+
* the platform's `/image` command sent exactly as that workflow sends it (`PROMPT_BINDINGS`: the
|
|
5
|
+
* shape and source images ride structured tool arguments); like the workflow it leaves a thread
|
|
6
|
+
* and the image as a document in the workspace. The image is then added to the presentation as a
|
|
7
|
+
* clip of the whole picture.
|
|
8
|
+
*/
|
|
9
|
+
import type { OnWorkflowLaunch } from '../../agents/workflows/types';
|
|
10
|
+
/** The Generate image dialog's launch, run for the presentation: the image becomes a clip. */
|
|
11
|
+
export declare function useGenerateImageLaunch(): OnWorkflowLaunch;
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useCallback } from "react";
|
|
3
|
+
import { useArbi, useArbiSessionState } from "@arbidocs/react";
|
|
4
|
+
import { GENERATE_IMAGE_ID } from "../../agents/workflows/catalogue/seed.js";
|
|
5
|
+
import { PROMPT_BINDINGS } from "../workflows/launch-bindings.js";
|
|
6
|
+
import { mediaCaption } from "../../presentation/model.js";
|
|
7
|
+
import { usePresentation } from "../../presentation/store.js";
|
|
8
|
+
const WHOLE = { x: 0, y: 0, w: 1, h: 1 };
|
|
9
|
+
async function aspectOf(blob) {
|
|
10
|
+
const bitmap = await createImageBitmap(blob);
|
|
11
|
+
const aspect = bitmap.width / bitmap.height;
|
|
12
|
+
bitmap.close();
|
|
13
|
+
return aspect;
|
|
14
|
+
}
|
|
15
|
+
function useGenerateImageLaunch() {
|
|
16
|
+
const arbi = useArbi();
|
|
17
|
+
const workspaceId = useArbiSessionState((s) => s.workspaceId);
|
|
18
|
+
return useCallback(
|
|
19
|
+
async ({ inputs }) => {
|
|
20
|
+
if (!arbi || !workspaceId) throw new Error("Open a workspace to generate images.");
|
|
21
|
+
const prompt = typeof inputs.prompt === "string" ? inputs.prompt.trim() : "";
|
|
22
|
+
if (!prompt) return;
|
|
23
|
+
const tools = PROMPT_BINDINGS[GENERATE_IMAGE_ID].tools?.(inputs);
|
|
24
|
+
let image;
|
|
25
|
+
let answer = "";
|
|
26
|
+
let failure = "";
|
|
27
|
+
await arbi.assistant.ask(
|
|
28
|
+
{ question: `/image ${prompt}`, workspaceId, ...tools ? { tools } : {} },
|
|
29
|
+
{
|
|
30
|
+
onToken: (token) => {
|
|
31
|
+
answer += token;
|
|
32
|
+
},
|
|
33
|
+
onError: (error) => {
|
|
34
|
+
failure = error instanceof Error ? error.message : String(error);
|
|
35
|
+
},
|
|
36
|
+
onArtifact: (artifact) => {
|
|
37
|
+
if (artifact.mode === "image" && artifact.doc_ext_id) image = artifact;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
).catch((error) => {
|
|
41
|
+
failure ||= error instanceof Error ? error.message : String(error);
|
|
42
|
+
});
|
|
43
|
+
const documentId = image?.doc_ext_id;
|
|
44
|
+
if (!documentId)
|
|
45
|
+
throw new Error(failure || answer.trim() || "The image could not be generated.");
|
|
46
|
+
const source = await (await arbi.documents.download(documentId)).blob();
|
|
47
|
+
const fileName = `${prompt.split("\n")[0].slice(0, 60)}.png`;
|
|
48
|
+
usePresentation.getState().addClip({
|
|
49
|
+
kind: "image",
|
|
50
|
+
documentId,
|
|
51
|
+
fileName,
|
|
52
|
+
page: 1,
|
|
53
|
+
rect: WHOLE,
|
|
54
|
+
aspect: await aspectOf(source),
|
|
55
|
+
masks: [],
|
|
56
|
+
source,
|
|
57
|
+
caption: mediaCaption(fileName)
|
|
58
|
+
});
|
|
59
|
+
},
|
|
60
|
+
[arbi, workspaceId]
|
|
61
|
+
);
|
|
62
|
+
}
|
|
63
|
+
export {
|
|
64
|
+
useGenerateImageLaunch
|
|
65
|
+
};
|
|
66
|
+
//# sourceMappingURL=useImageGeneration.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/connection/presentation/useImageGeneration.ts"],
|
|
4
|
+
"sourcesContent": ["/**\n * Generate image, for a presentation: the app's own Generate image dialog (the workflow's form:\n * prompt, source images to edit or combine, shape) launched here instead of into a chat. The run is\n * the platform's `/image` command sent exactly as that workflow sends it (`PROMPT_BINDINGS`: the\n * shape and source images ride structured tool arguments); like the workflow it leaves a thread\n * and the image as a document in the workspace. The image is then added to the presentation as a\n * clip of the whole picture.\n */\n\nimport { useCallback } from 'react'\nimport { useArbi, useArbiSessionState } from '@arbidocs/react'\nimport type { ArtifactEvent } from '@arbidocs/sdk/browser'\nimport { GENERATE_IMAGE_ID } from '../../agents/workflows/catalogue/seed'\nimport type { OnWorkflowLaunch } from '../../agents/workflows/types'\nimport { PROMPT_BINDINGS } from '../workflows/launch-bindings'\nimport { mediaCaption } from '../../presentation/model'\nimport { usePresentation } from '../../presentation/store'\n\nconst WHOLE = { x: 0, y: 0, w: 1, h: 1 }\n\n/** An image's width / height. */\nasync function aspectOf(blob: Blob): Promise<number> {\n const bitmap = await createImageBitmap(blob)\n const aspect = bitmap.width / bitmap.height\n bitmap.close()\n return aspect\n}\n\n/** The Generate image dialog's launch, run for the presentation: the image becomes a clip. */\nexport function useGenerateImageLaunch(): OnWorkflowLaunch {\n const arbi = useArbi()\n const workspaceId = useArbiSessionState((s) => s.workspaceId)\n\n return useCallback(\n async ({ inputs }) => {\n if (!arbi || !workspaceId) throw new Error('Open a workspace to generate images.')\n const prompt = typeof inputs.prompt === 'string' ? inputs.prompt.trim() : ''\n if (!prompt) return\n const tools = PROMPT_BINDINGS[GENERATE_IMAGE_ID].tools?.(inputs)\n let image: ArtifactEvent | undefined\n let answer = ''\n let failure = ''\n await arbi.assistant\n .ask(\n { question: `/image ${prompt}`, workspaceId, ...(tools ? { tools } : {}) },\n {\n onToken: (token) => {\n answer += token\n },\n onError: (error) => {\n failure = error instanceof Error ? error.message : String(error)\n },\n onArtifact: (artifact) => {\n if (artifact.mode === 'image' && artifact.doc_ext_id) image = artifact\n },\n }\n )\n .catch((error: unknown) => {\n failure ||= error instanceof Error ? error.message : String(error)\n })\n const documentId = image?.doc_ext_id\n // `/image` reports a refused or failed generation as its answer text.\n if (!documentId)\n throw new Error(failure || answer.trim() || 'The image could not be generated.')\n const source = await (await arbi.documents.download(documentId)).blob()\n const fileName = `${prompt.split('\\n')[0].slice(0, 60)}.png`\n usePresentation.getState().addClip({\n kind: 'image',\n documentId,\n fileName,\n page: 1,\n rect: WHOLE,\n aspect: await aspectOf(source),\n masks: [],\n source,\n caption: mediaCaption(fileName),\n })\n },\n [arbi, workspaceId]\n )\n}\n"],
|
|
5
|
+
"mappings": ";AASA,SAAS,mBAAmB;AAC5B,SAAS,SAAS,2BAA2B;AAE7C,SAAS,yBAAyB;AAElC,SAAS,uBAAuB;AAChC,SAAS,oBAAoB;AAC7B,SAAS,uBAAuB;AAEhC,MAAM,QAAQ,EAAE,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,EAAE;AAGvC,eAAe,SAAS,MAA6B;AACnD,QAAM,SAAS,MAAM,kBAAkB,IAAI;AAC3C,QAAM,SAAS,OAAO,QAAQ,OAAO;AACrC,SAAO,MAAM;AACb,SAAO;AACT;AAGO,SAAS,yBAA2C;AACzD,QAAM,OAAO,QAAQ;AACrB,QAAM,cAAc,oBAAoB,CAAC,MAAM,EAAE,WAAW;AAE5D,SAAO;AAAA,IACL,OAAO,EAAE,OAAO,MAAM;AACpB,UAAI,CAAC,QAAQ,CAAC,YAAa,OAAM,IAAI,MAAM,sCAAsC;AACjF,YAAM,SAAS,OAAO,OAAO,WAAW,WAAW,OAAO,OAAO,KAAK,IAAI;AAC1E,UAAI,CAAC,OAAQ;AACb,YAAM,QAAQ,gBAAgB,iBAAiB,EAAE,QAAQ,MAAM;AAC/D,UAAI;AACJ,UAAI,SAAS;AACb,UAAI,UAAU;AACd,YAAM,KAAK,UACR;AAAA,QACC,EAAE,UAAU,UAAU,MAAM,IAAI,aAAa,GAAI,QAAQ,EAAE,MAAM,IAAI,CAAC,EAAG;AAAA,QACzE;AAAA,UACE,SAAS,CAAC,UAAU;AAClB,sBAAU;AAAA,UACZ;AAAA,UACA,SAAS,CAAC,UAAU;AAClB,sBAAU,iBAAiB,QAAQ,MAAM,UAAU,OAAO,KAAK;AAAA,UACjE;AAAA,UACA,YAAY,CAAC,aAAa;AACxB,gBAAI,SAAS,SAAS,WAAW,SAAS,WAAY,SAAQ;AAAA,UAChE;AAAA,QACF;AAAA,MACF,EACC,MAAM,CAAC,UAAmB;AACzB,oBAAY,iBAAiB,QAAQ,MAAM,UAAU,OAAO,KAAK;AAAA,MACnE,CAAC;AACH,YAAM,aAAa,OAAO;AAE1B,UAAI,CAAC;AACH,cAAM,IAAI,MAAM,WAAW,OAAO,KAAK,KAAK,mCAAmC;AACjF,YAAM,SAAS,OAAO,MAAM,KAAK,UAAU,SAAS,UAAU,GAAG,KAAK;AACtE,YAAM,WAAW,GAAG,OAAO,MAAM,IAAI,EAAE,CAAC,EAAE,MAAM,GAAG,EAAE,CAAC;AACtD,sBAAgB,SAAS,EAAE,QAAQ;AAAA,QACjC,MAAM;AAAA,QACN;AAAA,QACA;AAAA,QACA,MAAM;AAAA,QACN,MAAM;AAAA,QACN,QAAQ,MAAM,SAAS,MAAM;AAAA,QAC7B,OAAO,CAAC;AAAA,QACR;AAAA,QACA,SAAS,aAAa,QAAQ;AAAA,MAChC,CAAC;AAAA,IACH;AAAA,IACA,CAAC,MAAM,WAAW;AAAA,EACpB;AACF;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Labelling clips with an annotation column: an Exhibit column's "R-100" leads the label of every
|
|
3
|
+
* clip of that document ("R-100 · Statement of case · p. 3"), so a hearing bundle's numbering is on
|
|
4
|
+
* the slide. The values are read live from the documents (editing one in Files updates the slides);
|
|
5
|
+
* only the column's choice is saved with the presentation.
|
|
6
|
+
*/
|
|
7
|
+
export interface LabelColumn {
|
|
8
|
+
id: string;
|
|
9
|
+
name: string;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* The workspace's columns a clip can be labelled with, and (while the presentation is open) each
|
|
13
|
+
* clip document's value in the chosen one, kept in the presentation store.
|
|
14
|
+
*/
|
|
15
|
+
export declare function useLabelColumns(active: boolean): LabelColumn[];
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useEffect, useMemo } from "react";
|
|
3
|
+
import { useArbiSessionState, useDocuments, useTags } from "@arbidocs/react";
|
|
4
|
+
import { usePresentation } from "../../presentation/store.js";
|
|
5
|
+
const VALUE_FORMATS = /* @__PURE__ */ new Set(["text", "number", "select"]);
|
|
6
|
+
function useLabelColumns(active) {
|
|
7
|
+
const workspaceId = useArbiSessionState((s) => s.workspaceId);
|
|
8
|
+
const { data: tags } = useTags(workspaceId, { enabled: active });
|
|
9
|
+
const { data: documents } = useDocuments(workspaceId, { enabled: active });
|
|
10
|
+
const labelColumn = usePresentation((s) => s.labelColumn);
|
|
11
|
+
const documentIds = usePresentation((s) => s.clips.map((clip) => clip.documentId).join(" "));
|
|
12
|
+
const columns = useMemo(
|
|
13
|
+
() => (tags ?? []).filter((tag) => tag.kind !== "search" && VALUE_FORMATS.has(tag.tag_type.type)).map((tag) => ({ id: tag.external_id, name: tag.name })).sort((a, b) => a.name.localeCompare(b.name)),
|
|
14
|
+
[tags]
|
|
15
|
+
);
|
|
16
|
+
useEffect(() => {
|
|
17
|
+
const values = {};
|
|
18
|
+
if (labelColumn) {
|
|
19
|
+
const wanted = new Set(documentIds.split(" "));
|
|
20
|
+
for (const doc of documents ?? []) {
|
|
21
|
+
if (!wanted.has(doc.external_id)) continue;
|
|
22
|
+
const note = doc.doctags?.find((dt) => dt.tag_ext_id === labelColumn)?.note?.trim();
|
|
23
|
+
if (note) values[doc.external_id] = note;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
usePresentation.getState().setColumnValues(values);
|
|
27
|
+
}, [labelColumn, documentIds, documents]);
|
|
28
|
+
return columns;
|
|
29
|
+
}
|
|
30
|
+
export {
|
|
31
|
+
useLabelColumns
|
|
32
|
+
};
|
|
33
|
+
//# sourceMappingURL=useLabelColumns.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/connection/presentation/useLabelColumns.ts"],
|
|
4
|
+
"sourcesContent": ["/**\n * Labelling clips with an annotation column: an Exhibit column's \"R-100\" leads the label of every\n * clip of that document (\"R-100 \u00B7 Statement of case \u00B7 p. 3\"), so a hearing bundle's numbering is on\n * the slide. The values are read live from the documents (editing one in Files updates the slides);\n * only the column's choice is saved with the presentation.\n */\n\nimport { useEffect, useMemo } from 'react'\nimport { useArbiSessionState, useDocuments, useTags } from '@arbidocs/react'\nimport { usePresentation } from '../../presentation/store'\n\n/** Column formats that hold one value per document (a checkbox only says yes or no). */\nconst VALUE_FORMATS = new Set(['text', 'number', 'select'])\n\nexport interface LabelColumn {\n id: string\n name: string\n}\n\n/**\n * The workspace's columns a clip can be labelled with, and (while the presentation is open) each\n * clip document's value in the chosen one, kept in the presentation store.\n */\nexport function useLabelColumns(active: boolean): LabelColumn[] {\n const workspaceId = useArbiSessionState((s) => s.workspaceId)\n const { data: tags } = useTags(workspaceId, { enabled: active })\n const { data: documents } = useDocuments(workspaceId, { enabled: active })\n const labelColumn = usePresentation((s) => s.labelColumn)\n const documentIds = usePresentation((s) => s.clips.map((clip) => clip.documentId).join(' '))\n\n const columns = useMemo(\n () =>\n (tags ?? [])\n .filter((tag) => tag.kind !== 'search' && VALUE_FORMATS.has(tag.tag_type.type))\n .map((tag) => ({ id: tag.external_id, name: tag.name }))\n .sort((a, b) => a.name.localeCompare(b.name)),\n [tags]\n )\n\n useEffect(() => {\n const values: Record<string, string> = {}\n if (labelColumn) {\n const wanted = new Set(documentIds.split(' '))\n for (const doc of documents ?? []) {\n if (!wanted.has(doc.external_id)) continue\n const note = doc.doctags?.find((dt) => dt.tag_ext_id === labelColumn)?.note?.trim()\n if (note) values[doc.external_id] = note\n }\n }\n usePresentation.getState().setColumnValues(values)\n }, [labelColumn, documentIds, documents])\n\n return columns\n}\n"],
|
|
5
|
+
"mappings": ";AAOA,SAAS,WAAW,eAAe;AACnC,SAAS,qBAAqB,cAAc,eAAe;AAC3D,SAAS,uBAAuB;AAGhC,MAAM,gBAAgB,oBAAI,IAAI,CAAC,QAAQ,UAAU,QAAQ,CAAC;AAWnD,SAAS,gBAAgB,QAAgC;AAC9D,QAAM,cAAc,oBAAoB,CAAC,MAAM,EAAE,WAAW;AAC5D,QAAM,EAAE,MAAM,KAAK,IAAI,QAAQ,aAAa,EAAE,SAAS,OAAO,CAAC;AAC/D,QAAM,EAAE,MAAM,UAAU,IAAI,aAAa,aAAa,EAAE,SAAS,OAAO,CAAC;AACzE,QAAM,cAAc,gBAAgB,CAAC,MAAM,EAAE,WAAW;AACxD,QAAM,cAAc,gBAAgB,CAAC,MAAM,EAAE,MAAM,IAAI,CAAC,SAAS,KAAK,UAAU,EAAE,KAAK,GAAG,CAAC;AAE3F,QAAM,UAAU;AAAA,IACd,OACG,QAAQ,CAAC,GACP,OAAO,CAAC,QAAQ,IAAI,SAAS,YAAY,cAAc,IAAI,IAAI,SAAS,IAAI,CAAC,EAC7E,IAAI,CAAC,SAAS,EAAE,IAAI,IAAI,aAAa,MAAM,IAAI,KAAK,EAAE,EACtD,KAAK,CAAC,GAAG,MAAM,EAAE,KAAK,cAAc,EAAE,IAAI,CAAC;AAAA,IAChD,CAAC,IAAI;AAAA,EACP;AAEA,YAAU,MAAM;AACd,UAAM,SAAiC,CAAC;AACxC,QAAI,aAAa;AACf,YAAM,SAAS,IAAI,IAAI,YAAY,MAAM,GAAG,CAAC;AAC7C,iBAAW,OAAO,aAAa,CAAC,GAAG;AACjC,YAAI,CAAC,OAAO,IAAI,IAAI,WAAW,EAAG;AAClC,cAAM,OAAO,IAAI,SAAS,KAAK,CAAC,OAAO,GAAG,eAAe,WAAW,GAAG,MAAM,KAAK;AAClF,YAAI,KAAM,QAAO,IAAI,WAAW,IAAI;AAAA,MACtC;AAAA,IACF;AACA,oBAAgB,SAAS,EAAE,gBAAgB,MAAM;AAAA,EACnD,GAAG,CAAC,aAAa,aAAa,SAAS,CAAC;AAExC,SAAO;AACT;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What the presentation editor gets from the session, wherever it is mounted (the viewer's slides
|
|
3
|
+
* tab, or the presentation's own window): Save, the "…" menu (Open, New from template, Save as,
|
|
4
|
+
* Save as template, Export PowerPoint, Export PDF, label column), Generate image, crop and the logo
|
|
5
|
+
* picker, and the dialogs they open (rendered by the host, in its own window).
|
|
6
|
+
*/
|
|
7
|
+
import { type ReactNode } from 'react';
|
|
8
|
+
import type { SlidesEditorProps } from '../../presentation/SlidesEditor';
|
|
9
|
+
export interface PresentationController {
|
|
10
|
+
/** The editor's session parts (the host adds its own actions and Present). */
|
|
11
|
+
editor: Omit<SlidesEditorProps, 'onPresent'>;
|
|
12
|
+
/** The dialogs, for the host to render in its window. */
|
|
13
|
+
dialogs: ReactNode;
|
|
14
|
+
}
|
|
15
|
+
export declare function usePresentationController(active: boolean): PresentationController;
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { useCallback, useState } from "react";
|
|
4
|
+
import { Save } from "lucide-react";
|
|
5
|
+
import { useArbiSessionStore } from "@arbidocs/react";
|
|
6
|
+
import { Button, DropdownMenuItem } from "@arbidocs/react/ui";
|
|
7
|
+
import { usePresentation } from "../../presentation/store.js";
|
|
8
|
+
import {
|
|
9
|
+
ChooseLogoDialog,
|
|
10
|
+
GenerateImageDialog,
|
|
11
|
+
OpenPresentationDialog,
|
|
12
|
+
SavePresentationDialog
|
|
13
|
+
} from "./PresentationDialogs.js";
|
|
14
|
+
import { CropClipDialog } from "./CropClipDialog.js";
|
|
15
|
+
import { LabelColumnMenu } from "./LabelColumnMenu.js";
|
|
16
|
+
import { GenerateTile } from "./GenerateTile.js";
|
|
17
|
+
import { editPresentation } from "./requests.js";
|
|
18
|
+
import { useLabelColumns } from "./useLabelColumns.js";
|
|
19
|
+
import { usePresentationFiles } from "./usePresentationFiles.js";
|
|
20
|
+
function usePresentationController(active) {
|
|
21
|
+
const session = useArbiSessionStore();
|
|
22
|
+
const notify = usePresentation((s) => s.notify);
|
|
23
|
+
const { save, canSave } = usePresentationFiles();
|
|
24
|
+
const labelColumns = useLabelColumns(active);
|
|
25
|
+
const [dialog, setDialog] = useState(null);
|
|
26
|
+
const [reference, setReference] = useState(null);
|
|
27
|
+
const [cropping, setCropping] = useState(null);
|
|
28
|
+
const cropClip = usePresentation((s) => s.clips.find((c) => c.id === cropping) ?? null);
|
|
29
|
+
const [saving, setSaving] = useState(false);
|
|
30
|
+
const close = (open) => !open && setDialog(null);
|
|
31
|
+
const quickSave = useCallback(async () => {
|
|
32
|
+
const { savedId, title } = usePresentation.getState();
|
|
33
|
+
if (!savedId) return setDialog("save");
|
|
34
|
+
setSaving(true);
|
|
35
|
+
try {
|
|
36
|
+
await save(title);
|
|
37
|
+
notify("Presentation saved", "success");
|
|
38
|
+
} catch (error) {
|
|
39
|
+
notify(
|
|
40
|
+
error instanceof Error ? error.message : "The presentation could not be saved",
|
|
41
|
+
"error"
|
|
42
|
+
);
|
|
43
|
+
} finally {
|
|
44
|
+
setSaving(false);
|
|
45
|
+
}
|
|
46
|
+
}, [save, notify]);
|
|
47
|
+
const generate = useCallback((referenceId) => {
|
|
48
|
+
setReference(referenceId);
|
|
49
|
+
setDialog("generate");
|
|
50
|
+
}, []);
|
|
51
|
+
const saveModes = ["save", "saveAs", "export", "template"];
|
|
52
|
+
const dialogs = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
53
|
+
/* @__PURE__ */ jsx(
|
|
54
|
+
SavePresentationDialog,
|
|
55
|
+
{
|
|
56
|
+
open: saveModes.includes(dialog),
|
|
57
|
+
mode: saveModes.includes(dialog) ? dialog : "save",
|
|
58
|
+
onOpenChange: close
|
|
59
|
+
}
|
|
60
|
+
),
|
|
61
|
+
/* @__PURE__ */ jsx(
|
|
62
|
+
OpenPresentationDialog,
|
|
63
|
+
{
|
|
64
|
+
open: dialog === "open" || dialog === "fromTemplate",
|
|
65
|
+
templates: dialog === "fromTemplate",
|
|
66
|
+
onOpened: (id) => editPresentation(session, id ? { kind: "open", documentId: id } : { kind: "new" }),
|
|
67
|
+
onOpenChange: close
|
|
68
|
+
}
|
|
69
|
+
),
|
|
70
|
+
/* @__PURE__ */ jsx(ChooseLogoDialog, { open: dialog === "logo", onOpenChange: close }),
|
|
71
|
+
/* @__PURE__ */ jsx(CropClipDialog, { clip: cropClip, onOpenChange: (open) => !open && setCropping(null) }),
|
|
72
|
+
/* @__PURE__ */ jsx(
|
|
73
|
+
GenerateImageDialog,
|
|
74
|
+
{
|
|
75
|
+
open: dialog === "generate",
|
|
76
|
+
referenceId: reference,
|
|
77
|
+
onOpenChange: close
|
|
78
|
+
}
|
|
79
|
+
)
|
|
80
|
+
] });
|
|
81
|
+
const editor = {
|
|
82
|
+
actions: canSave && /* @__PURE__ */ jsx(
|
|
83
|
+
Button,
|
|
84
|
+
{
|
|
85
|
+
type: "button",
|
|
86
|
+
size: "icon",
|
|
87
|
+
variant: "ghost",
|
|
88
|
+
className: "size-8 text-muted-foreground hover:text-foreground pointer-coarse:size-11",
|
|
89
|
+
title: "Save (in Files \u203A Presentations)",
|
|
90
|
+
"aria-label": "Save",
|
|
91
|
+
disabled: saving,
|
|
92
|
+
onClick: () => void quickSave(),
|
|
93
|
+
"data-testid": "presentation-save",
|
|
94
|
+
children: /* @__PURE__ */ jsx(Save, { className: "size-4" })
|
|
95
|
+
}
|
|
96
|
+
),
|
|
97
|
+
menuItems: canSave && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
98
|
+
/* @__PURE__ */ jsx(DropdownMenuItem, { onSelect: () => setDialog("open"), children: "Open\u2026" }),
|
|
99
|
+
/* @__PURE__ */ jsx(DropdownMenuItem, { onSelect: () => setDialog("fromTemplate"), children: "New from template\u2026" }),
|
|
100
|
+
/* @__PURE__ */ jsx(DropdownMenuItem, { onSelect: () => setDialog("saveAs"), children: "Save as\u2026" }),
|
|
101
|
+
/* @__PURE__ */ jsx(DropdownMenuItem, { onSelect: () => setDialog("template"), children: "Save as template\u2026" }),
|
|
102
|
+
/* @__PURE__ */ jsx(DropdownMenuItem, { onSelect: () => setDialog("export"), children: "Export PDF\u2026" }),
|
|
103
|
+
/* @__PURE__ */ jsx(LabelColumnMenu, { columns: labelColumns })
|
|
104
|
+
] }),
|
|
105
|
+
trayStart: canSave && /* @__PURE__ */ jsx(GenerateTile, { onClick: () => generate(null) }),
|
|
106
|
+
onChooseLogo: canSave ? () => setDialog("logo") : void 0,
|
|
107
|
+
onEditImage: (clipId) => {
|
|
108
|
+
const clip = usePresentation.getState().clips.find((c) => c.id === clipId);
|
|
109
|
+
if (clip) generate(clip.documentId);
|
|
110
|
+
},
|
|
111
|
+
onCropImage: setCropping
|
|
112
|
+
};
|
|
113
|
+
return { editor, dialogs };
|
|
114
|
+
}
|
|
115
|
+
export {
|
|
116
|
+
usePresentationController
|
|
117
|
+
};
|
|
118
|
+
//# sourceMappingURL=usePresentationController.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/connection/presentation/usePresentationController.tsx"],
|
|
4
|
+
"sourcesContent": ["/**\n * What the presentation editor gets from the session, wherever it is mounted (the viewer's slides\n * tab, or the presentation's own window): Save, the \"\u2026\" menu (Open, New from template, Save as,\n * Save as template, Export PowerPoint, Export PDF, label column), Generate image, crop and the logo\n * picker, and the dialogs they open (rendered by the host, in its own window).\n */\n\nimport { useCallback, useState, type ReactNode } from 'react'\nimport { Save } from 'lucide-react'\nimport { useArbiSessionStore } from '@arbidocs/react'\nimport { Button, DropdownMenuItem } from '@arbidocs/react/ui'\nimport type { SlidesEditorProps } from '../../presentation/SlidesEditor'\nimport { usePresentation } from '../../presentation/store'\nimport {\n ChooseLogoDialog,\n GenerateImageDialog,\n OpenPresentationDialog,\n SavePresentationDialog,\n type SaveMode,\n} from './PresentationDialogs'\nimport { CropClipDialog } from './CropClipDialog'\nimport { LabelColumnMenu } from './LabelColumnMenu'\nimport { GenerateTile } from './GenerateTile'\nimport { editPresentation } from './requests'\nimport { useLabelColumns } from './useLabelColumns'\nimport { usePresentationFiles } from './usePresentationFiles'\n\ntype Dialog = SaveMode | 'open' | 'fromTemplate' | 'generate' | 'logo'\n\nexport interface PresentationController {\n /** The editor's session parts (the host adds its own actions and Present). */\n editor: Omit<SlidesEditorProps, 'onPresent'>\n /** The dialogs, for the host to render in its window. */\n dialogs: ReactNode\n}\n\nexport function usePresentationController(active: boolean): PresentationController {\n const session = useArbiSessionStore()\n const notify = usePresentation((s) => s.notify)\n const { save, canSave } = usePresentationFiles()\n const labelColumns = useLabelColumns(active)\n const [dialog, setDialog] = useState<Dialog | null>(null)\n const [reference, setReference] = useState<string | null>(null)\n const [cropping, setCropping] = useState<string | null>(null)\n const cropClip = usePresentation((s) => s.clips.find((c) => c.id === cropping) ?? null)\n const [saving, setSaving] = useState(false)\n const close = (open: boolean) => !open && setDialog(null)\n\n // Saved before: save again (a new version) at once; never saved: ask for a title.\n const quickSave = useCallback(async () => {\n const { savedId, title } = usePresentation.getState()\n if (!savedId) return setDialog('save')\n setSaving(true)\n try {\n await save(title)\n notify('Presentation saved', 'success')\n } catch (error) {\n notify(\n error instanceof Error ? error.message : 'The presentation could not be saved',\n 'error'\n )\n } finally {\n setSaving(false)\n }\n }, [save, notify])\n\n const generate = useCallback((referenceId: string | null) => {\n setReference(referenceId)\n setDialog('generate')\n }, [])\n\n const saveModes: SaveMode[] = ['save', 'saveAs', 'export', 'template']\n const dialogs = (\n <>\n <SavePresentationDialog\n open={saveModes.includes(dialog as SaveMode)}\n mode={saveModes.includes(dialog as SaveMode) ? (dialog as SaveMode) : 'save'}\n onOpenChange={close}\n />\n <OpenPresentationDialog\n open={dialog === 'open' || dialog === 'fromTemplate'}\n templates={dialog === 'fromTemplate'}\n // A saved one opens in the viewer's slides tab (its document); a template, as a new one.\n onOpened={(id) =>\n editPresentation(session, id ? { kind: 'open', documentId: id } : { kind: 'new' })\n }\n onOpenChange={close}\n />\n <ChooseLogoDialog open={dialog === 'logo'} onOpenChange={close} />\n <CropClipDialog clip={cropClip} onOpenChange={(open) => !open && setCropping(null)} />\n <GenerateImageDialog\n open={dialog === 'generate'}\n referenceId={reference}\n onOpenChange={close}\n />\n </>\n )\n\n const editor: PresentationController['editor'] = {\n actions: canSave && (\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=\"Save (in Files \u203A Presentations)\"\n aria-label=\"Save\"\n disabled={saving}\n onClick={() => void quickSave()}\n data-testid=\"presentation-save\"\n >\n <Save className=\"size-4\" />\n </Button>\n ),\n menuItems: canSave && (\n <>\n <DropdownMenuItem onSelect={() => setDialog('open')}>Open\u2026</DropdownMenuItem>\n <DropdownMenuItem onSelect={() => setDialog('fromTemplate')}>\n New from template\u2026\n </DropdownMenuItem>\n <DropdownMenuItem onSelect={() => setDialog('saveAs')}>Save as\u2026</DropdownMenuItem>\n <DropdownMenuItem onSelect={() => setDialog('template')}>\n Save as template\u2026\n </DropdownMenuItem>\n <DropdownMenuItem onSelect={() => setDialog('export')}>Export PDF\u2026</DropdownMenuItem>\n <LabelColumnMenu columns={labelColumns} />\n </>\n ),\n trayStart: canSave && <GenerateTile onClick={() => generate(null)} />,\n onChooseLogo: canSave ? () => setDialog('logo') : undefined,\n onEditImage: (clipId) => {\n const clip = usePresentation.getState().clips.find((c) => c.id === clipId)\n if (clip) generate(clip.documentId)\n },\n onCropImage: setCropping,\n }\n return { editor, dialogs }\n}\n"],
|
|
5
|
+
"mappings": ";AAyEI,mBACE,KADF;AAlEJ,SAAS,aAAa,gBAAgC;AACtD,SAAS,YAAY;AACrB,SAAS,2BAA2B;AACpC,SAAS,QAAQ,wBAAwB;AAEzC,SAAS,uBAAuB;AAChC;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAEK;AACP,SAAS,sBAAsB;AAC/B,SAAS,uBAAuB;AAChC,SAAS,oBAAoB;AAC7B,SAAS,wBAAwB;AACjC,SAAS,uBAAuB;AAChC,SAAS,4BAA4B;AAW9B,SAAS,0BAA0B,QAAyC;AACjF,QAAM,UAAU,oBAAoB;AACpC,QAAM,SAAS,gBAAgB,CAAC,MAAM,EAAE,MAAM;AAC9C,QAAM,EAAE,MAAM,QAAQ,IAAI,qBAAqB;AAC/C,QAAM,eAAe,gBAAgB,MAAM;AAC3C,QAAM,CAAC,QAAQ,SAAS,IAAI,SAAwB,IAAI;AACxD,QAAM,CAAC,WAAW,YAAY,IAAI,SAAwB,IAAI;AAC9D,QAAM,CAAC,UAAU,WAAW,IAAI,SAAwB,IAAI;AAC5D,QAAM,WAAW,gBAAgB,CAAC,MAAM,EAAE,MAAM,KAAK,CAAC,MAAM,EAAE,OAAO,QAAQ,KAAK,IAAI;AACtF,QAAM,CAAC,QAAQ,SAAS,IAAI,SAAS,KAAK;AAC1C,QAAM,QAAQ,CAAC,SAAkB,CAAC,QAAQ,UAAU,IAAI;AAGxD,QAAM,YAAY,YAAY,YAAY;AACxC,UAAM,EAAE,SAAS,MAAM,IAAI,gBAAgB,SAAS;AACpD,QAAI,CAAC,QAAS,QAAO,UAAU,MAAM;AACrC,cAAU,IAAI;AACd,QAAI;AACF,YAAM,KAAK,KAAK;AAChB,aAAO,sBAAsB,SAAS;AAAA,IACxC,SAAS,OAAO;AACd;AAAA,QACE,iBAAiB,QAAQ,MAAM,UAAU;AAAA,QACzC;AAAA,MACF;AAAA,IACF,UAAE;AACA,gBAAU,KAAK;AAAA,IACjB;AAAA,EACF,GAAG,CAAC,MAAM,MAAM,CAAC;AAEjB,QAAM,WAAW,YAAY,CAAC,gBAA+B;AAC3D,iBAAa,WAAW;AACxB,cAAU,UAAU;AAAA,EACtB,GAAG,CAAC,CAAC;AAEL,QAAM,YAAwB,CAAC,QAAQ,UAAU,UAAU,UAAU;AACrE,QAAM,UACJ,iCACE;AAAA;AAAA,MAAC;AAAA;AAAA,QACC,MAAM,UAAU,SAAS,MAAkB;AAAA,QAC3C,MAAM,UAAU,SAAS,MAAkB,IAAK,SAAsB;AAAA,QACtE,cAAc;AAAA;AAAA,IAChB;AAAA,IACA;AAAA,MAAC;AAAA;AAAA,QACC,MAAM,WAAW,UAAU,WAAW;AAAA,QACtC,WAAW,WAAW;AAAA,QAEtB,UAAU,CAAC,OACT,iBAAiB,SAAS,KAAK,EAAE,MAAM,QAAQ,YAAY,GAAG,IAAI,EAAE,MAAM,MAAM,CAAC;AAAA,QAEnF,cAAc;AAAA;AAAA,IAChB;AAAA,IACA,oBAAC,oBAAiB,MAAM,WAAW,QAAQ,cAAc,OAAO;AAAA,IAChE,oBAAC,kBAAe,MAAM,UAAU,cAAc,CAAC,SAAS,CAAC,QAAQ,YAAY,IAAI,GAAG;AAAA,IACpF;AAAA,MAAC;AAAA;AAAA,QACC,MAAM,WAAW;AAAA,QACjB,aAAa;AAAA,QACb,cAAc;AAAA;AAAA,IAChB;AAAA,KACF;AAGF,QAAM,SAA2C;AAAA,IAC/C,SAAS,WACP;AAAA,MAAC;AAAA;AAAA,QACC,MAAK;AAAA,QACL,MAAK;AAAA,QACL,SAAQ;AAAA,QACR,WAAU;AAAA,QACV,OAAM;AAAA,QACN,cAAW;AAAA,QACX,UAAU;AAAA,QACV,SAAS,MAAM,KAAK,UAAU;AAAA,QAC9B,eAAY;AAAA,QAEZ,8BAAC,QAAK,WAAU,UAAS;AAAA;AAAA,IAC3B;AAAA,IAEF,WAAW,WACT,iCACE;AAAA,0BAAC,oBAAiB,UAAU,MAAM,UAAU,MAAM,GAAG,wBAAK;AAAA,MAC1D,oBAAC,oBAAiB,UAAU,MAAM,UAAU,cAAc,GAAG,qCAE7D;AAAA,MACA,oBAAC,oBAAiB,UAAU,MAAM,UAAU,QAAQ,GAAG,2BAAQ;AAAA,MAC/D,oBAAC,oBAAiB,UAAU,MAAM,UAAU,UAAU,GAAG,oCAEzD;AAAA,MACA,oBAAC,oBAAiB,UAAU,MAAM,UAAU,QAAQ,GAAG,8BAAW;AAAA,MAClE,oBAAC,mBAAgB,SAAS,cAAc;AAAA,OAC1C;AAAA,IAEF,WAAW,WAAW,oBAAC,gBAAa,SAAS,MAAM,SAAS,IAAI,GAAG;AAAA,IACnE,cAAc,UAAU,MAAM,UAAU,MAAM,IAAI;AAAA,IAClD,aAAa,CAAC,WAAW;AACvB,YAAM,OAAO,gBAAgB,SAAS,EAAE,MAAM,KAAK,CAAC,MAAM,EAAE,OAAO,MAAM;AACzE,UAAI,KAAM,UAAS,KAAK,UAAU;AAAA,IACpC;AAAA,IACA,aAAa;AAAA,EACf;AACA,SAAO,EAAE,QAAQ,QAAQ;AAC3B;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Saving and opening presentations as documents of the open workspace's `Presentations` folder:
|
|
3
|
+
* a PowerPoint file (`<title>.pptx`: its slides as editable PowerPoint, the presentation's own data
|
|
4
|
+
* inside it, `pptx-data`). Saving again adds a version to the same document; Export PDF saves a
|
|
5
|
+
* PDF of the slides.
|
|
6
|
+
*
|
|
7
|
+
* Opening fetches each clip's source again: the PDF the viewer shows for a page clip (so Word and
|
|
8
|
+
* text documents work too), the original file for an image or a video. A page clip's redactions
|
|
9
|
+
* are read again from the markup; a clip whose source or redactions cannot be read is left out
|
|
10
|
+
* (never shown unredacted), and how many were is reported.
|
|
11
|
+
*
|
|
12
|
+
* Presentations saved before they were PowerPoint files (a PDF with the data attached, or the data
|
|
13
|
+
* alone) still open; their first save makes a PowerPoint file of them.
|
|
14
|
+
*/
|
|
15
|
+
/** What opening a presentation found besides its content. */
|
|
16
|
+
export interface OpenedPresentation {
|
|
17
|
+
/** Clips whose source could not be opened (left out). */
|
|
18
|
+
missing: number;
|
|
19
|
+
/** Changed outside the editor (an agent): the slides are drawn again on the next save. */
|
|
20
|
+
stale: boolean;
|
|
21
|
+
/** A PowerPoint made elsewhere, imported: what did not come across as it was. */
|
|
22
|
+
imported?: {
|
|
23
|
+
notes: string[];
|
|
24
|
+
};
|
|
25
|
+
/** Slides (1-based) changed in PowerPoint since the editor saved it, brought in. */
|
|
26
|
+
changedOutside?: number[];
|
|
27
|
+
}
|
|
28
|
+
export interface SavedPresentationEntry {
|
|
29
|
+
id: string;
|
|
30
|
+
title: string;
|
|
31
|
+
updatedAt: string | null;
|
|
32
|
+
}
|
|
33
|
+
export declare function usePresentationFiles(): {
|
|
34
|
+
save: (title: string, { asNew, template }?: {
|
|
35
|
+
asNew?: boolean;
|
|
36
|
+
template?: boolean;
|
|
37
|
+
}) => Promise<string>;
|
|
38
|
+
exportPdf: (title: string) => Promise<string>;
|
|
39
|
+
list: (scope?: "presentations" | "templates") => Promise<SavedPresentationEntry[]>;
|
|
40
|
+
open: (id: string, version?: number) => Promise<OpenedPresentation>;
|
|
41
|
+
startFromTemplate: (id: string) => Promise<void>;
|
|
42
|
+
downloadFile: (id: string) => Promise<Blob>;
|
|
43
|
+
canSave: boolean;
|
|
44
|
+
};
|