@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,307 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useCallback } from "react";
|
|
3
|
+
import { useArbi, useArbiSessionState } from "@arbidocs/react";
|
|
4
|
+
import { isPresentationFileName } from "@arbidocs/react/ui";
|
|
5
|
+
import {
|
|
6
|
+
createMarkupStore,
|
|
7
|
+
fetchDocumentPdf,
|
|
8
|
+
imagesToPdf,
|
|
9
|
+
MarkupStoreError,
|
|
10
|
+
readPdfAttachment,
|
|
11
|
+
useDocumentTools
|
|
12
|
+
} from "@arbidocs/react/document-tools";
|
|
13
|
+
import {
|
|
14
|
+
EXPORTS_FOLDER,
|
|
15
|
+
PRESENTATIONS_FOLDER,
|
|
16
|
+
PRESENTATION_ATTACHMENT,
|
|
17
|
+
TEMPLATES_FOLDER,
|
|
18
|
+
parsePresentation,
|
|
19
|
+
presentationFileName,
|
|
20
|
+
presentationTitle,
|
|
21
|
+
safeFileStem,
|
|
22
|
+
serializePresentation
|
|
23
|
+
} from "../../presentation/persistence.js";
|
|
24
|
+
import { usePresentation } from "../../presentation/store.js";
|
|
25
|
+
import { renderSlide } from "../../presentation/render-slides.js";
|
|
26
|
+
import { buildPptx } from "../../presentation/export-pptx.js";
|
|
27
|
+
import {
|
|
28
|
+
isZipBytes,
|
|
29
|
+
readPptxPresentationData,
|
|
30
|
+
writePptxPresentationData
|
|
31
|
+
} from "../../presentation/pptx-data.js";
|
|
32
|
+
import { importPptx, slideFingerprints } from "../../presentation/import-pptx.js";
|
|
33
|
+
import { mergeOutsideEdits } from "../../presentation/merge-outside-edits.js";
|
|
34
|
+
const PPTX_TYPE = "application/vnd.openxmlformats-officedocument.presentationml.presentation";
|
|
35
|
+
const SLIDE_PAGE = { width: 1280, height: 720 };
|
|
36
|
+
function dataUrlBlob(url) {
|
|
37
|
+
const [head, body] = url.split(",", 2);
|
|
38
|
+
const type = /^data:([^;]+)/.exec(head)?.[1] ?? "application/octet-stream";
|
|
39
|
+
const binary = atob(body ?? "");
|
|
40
|
+
const bytes = new Uint8Array(binary.length);
|
|
41
|
+
for (let i = 0; i < binary.length; i++) bytes[i] = binary.charCodeAt(i);
|
|
42
|
+
return new Blob([bytes], { type });
|
|
43
|
+
}
|
|
44
|
+
async function presentationData(bytes) {
|
|
45
|
+
if (isZipBytes(bytes)) return readPptxPresentationData(bytes);
|
|
46
|
+
const isPdf = bytes[0] === 37 && bytes[1] === 80 && bytes[2] === 68 && bytes[3] === 70;
|
|
47
|
+
if (!isPdf) return new TextDecoder().decode(bytes);
|
|
48
|
+
const data = await readPdfAttachment(bytes, PRESENTATION_ATTACHMENT);
|
|
49
|
+
if (!data) {
|
|
50
|
+
throw new Error(
|
|
51
|
+
"This PDF has no editable presentation in it (it may have been changed outside ARBI)."
|
|
52
|
+
);
|
|
53
|
+
}
|
|
54
|
+
return new TextDecoder().decode(data);
|
|
55
|
+
}
|
|
56
|
+
function current(withoutClips) {
|
|
57
|
+
const state = usePresentation.getState();
|
|
58
|
+
return withoutClips ? {
|
|
59
|
+
...state,
|
|
60
|
+
clips: [],
|
|
61
|
+
slides: state.slides.map((slide) => ({ ...slide, items: [] }))
|
|
62
|
+
} : state;
|
|
63
|
+
}
|
|
64
|
+
const lookOf = (state) => ({
|
|
65
|
+
labels: state.captions,
|
|
66
|
+
columnValues: state.columnValues,
|
|
67
|
+
theme: state.theme,
|
|
68
|
+
logo: state.logoImage,
|
|
69
|
+
media: state.media
|
|
70
|
+
});
|
|
71
|
+
function usePresentationFiles() {
|
|
72
|
+
const arbi = useArbi();
|
|
73
|
+
const { client } = useDocumentTools();
|
|
74
|
+
const workspaceId = useArbiSessionState((s) => s.workspaceId);
|
|
75
|
+
const buildFile = useCallback(async (title, withoutClips) => {
|
|
76
|
+
const state = current(withoutClips);
|
|
77
|
+
const deck = await buildPptx({ title, slides: state.slides, clips: state.clips }, lookOf(state));
|
|
78
|
+
const fingerprints = await slideFingerprints(deck);
|
|
79
|
+
const data = serializePresentation({ ...state, title, fingerprints });
|
|
80
|
+
return writePptxPresentationData(deck, JSON.stringify(data, null, 2));
|
|
81
|
+
}, []);
|
|
82
|
+
const save = useCallback(
|
|
83
|
+
async (title, { asNew = false, template = false } = {}) => {
|
|
84
|
+
if (!arbi || !workspaceId) throw new Error("Open a workspace to save the presentation.");
|
|
85
|
+
const state = usePresentation.getState();
|
|
86
|
+
const versionOf = asNew || template ? null : state.savedId;
|
|
87
|
+
const deck = await buildFile(title, template);
|
|
88
|
+
const file = new File([deck], presentationFileName(title), { type: PPTX_TYPE });
|
|
89
|
+
const result = await arbi.documents.upload([file], {
|
|
90
|
+
folder: template ? TEMPLATES_FOLDER : PRESENTATIONS_FOLDER,
|
|
91
|
+
workspaceExtId: workspaceId,
|
|
92
|
+
...versionOf ? { versionOf } : {}
|
|
93
|
+
});
|
|
94
|
+
const id = versionOf ?? result.doc_ext_ids?.[0];
|
|
95
|
+
if (!id) throw new Error("The presentation could not be saved.");
|
|
96
|
+
if (!template) {
|
|
97
|
+
const [doc] = await arbi.documents.get([id]).catch(() => []);
|
|
98
|
+
state.setSaved(id, title, doc?.current_version ?? null);
|
|
99
|
+
}
|
|
100
|
+
return id;
|
|
101
|
+
},
|
|
102
|
+
[arbi, workspaceId, buildFile]
|
|
103
|
+
);
|
|
104
|
+
const exportPdf = useCallback(
|
|
105
|
+
async (title) => {
|
|
106
|
+
if (!arbi || !workspaceId) throw new Error("Open a workspace to export the PDF.");
|
|
107
|
+
const state = current(false);
|
|
108
|
+
const pages = [];
|
|
109
|
+
for (const slide of state.slides) {
|
|
110
|
+
const { image, text } = await renderSlide(slide, state.clips, lookOf(state));
|
|
111
|
+
pages.push({ image, text, width: SLIDE_PAGE.width, height: SLIDE_PAGE.height });
|
|
112
|
+
}
|
|
113
|
+
const pdf = await imagesToPdf(pages, { title });
|
|
114
|
+
const result = await arbi.documents.upload(
|
|
115
|
+
[new File([pdf], `${safeFileStem(title)}.pdf`, { type: "application/pdf" })],
|
|
116
|
+
{ folder: EXPORTS_FOLDER, workspaceExtId: workspaceId }
|
|
117
|
+
);
|
|
118
|
+
const id = result.doc_ext_ids?.[0];
|
|
119
|
+
if (!id) throw new Error("The PDF could not be saved.");
|
|
120
|
+
return id;
|
|
121
|
+
},
|
|
122
|
+
[arbi, workspaceId]
|
|
123
|
+
);
|
|
124
|
+
const list = useCallback(
|
|
125
|
+
async (scope = "presentations") => {
|
|
126
|
+
if (!arbi || !workspaceId) return [];
|
|
127
|
+
const docs = await arbi.documents.list({ workspaceId });
|
|
128
|
+
return docs.filter((doc) => {
|
|
129
|
+
const folder = doc.folder ?? "";
|
|
130
|
+
if (!isPresentationFileName(doc.file_name, folder)) return false;
|
|
131
|
+
return scope === "templates" ? folder === TEMPLATES_FOLDER : folder.startsWith(PRESENTATIONS_FOLDER) && folder !== TEMPLATES_FOLDER && !folder.startsWith(EXPORTS_FOLDER);
|
|
132
|
+
}).map((doc) => ({
|
|
133
|
+
id: doc.external_id,
|
|
134
|
+
title: presentationTitle(doc.file_name ?? ""),
|
|
135
|
+
updatedAt: doc.updated_at ?? doc.created_at ?? null
|
|
136
|
+
})).sort((a, b) => (a.updatedAt ?? "") < (b.updatedAt ?? "") ? 1 : -1);
|
|
137
|
+
},
|
|
138
|
+
[arbi, workspaceId]
|
|
139
|
+
);
|
|
140
|
+
const readSaved = useCallback(
|
|
141
|
+
async (id, version) => {
|
|
142
|
+
if (!arbi) throw new Error("Sign in to open a presentation.");
|
|
143
|
+
const response = await arbi.documents.download(id, version);
|
|
144
|
+
const bytes = new Uint8Array(await response.arrayBuffer());
|
|
145
|
+
const text = await presentationData(bytes);
|
|
146
|
+
const [doc] = await arbi.documents.get([id]).catch(() => []);
|
|
147
|
+
const openedVersion = version ?? doc?.current_version ?? null;
|
|
148
|
+
if (text === null) {
|
|
149
|
+
const imported = await importPptx(bytes, {
|
|
150
|
+
title: presentationTitle(doc?.file_name ?? "Presentation.pptx"),
|
|
151
|
+
documentId: id,
|
|
152
|
+
version: version ?? doc?.current_version,
|
|
153
|
+
fileName: doc?.file_name ?? void 0
|
|
154
|
+
});
|
|
155
|
+
return {
|
|
156
|
+
saved: imported.saved,
|
|
157
|
+
legacy: false,
|
|
158
|
+
imported: { notes: imported.notes },
|
|
159
|
+
openedVersion
|
|
160
|
+
};
|
|
161
|
+
}
|
|
162
|
+
let saved = parsePresentation(text);
|
|
163
|
+
let changedOutside;
|
|
164
|
+
if (isZipBytes(bytes) && saved.slides.some((slide) => slide.fingerprint)) {
|
|
165
|
+
const now = await slideFingerprints(bytes);
|
|
166
|
+
const unchanged = now.length === saved.slides.length && now.every((fingerprint, i) => fingerprint === saved.slides[i].fingerprint);
|
|
167
|
+
if (!unchanged) {
|
|
168
|
+
const imported = await importPptx(bytes, {
|
|
169
|
+
title: saved.title,
|
|
170
|
+
documentId: id,
|
|
171
|
+
version: version ?? doc?.current_version,
|
|
172
|
+
fileName: doc?.file_name ?? void 0
|
|
173
|
+
});
|
|
174
|
+
const merged = mergeOutsideEdits(saved, imported.saved, now);
|
|
175
|
+
saved = merged.saved;
|
|
176
|
+
changedOutside = merged.changed;
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
return {
|
|
180
|
+
saved,
|
|
181
|
+
// Saved before presentations were PowerPoint files: its next save is a new PowerPoint
|
|
182
|
+
// file, not a version of this one (a document's versions keep one format).
|
|
183
|
+
legacy: !isZipBytes(bytes),
|
|
184
|
+
changedOutside,
|
|
185
|
+
openedVersion
|
|
186
|
+
};
|
|
187
|
+
},
|
|
188
|
+
[arbi]
|
|
189
|
+
);
|
|
190
|
+
const startFromTemplate = useCallback(
|
|
191
|
+
async (id) => {
|
|
192
|
+
const { saved } = await readSaved(id);
|
|
193
|
+
usePresentation.getState().load({
|
|
194
|
+
title: "Untitled presentation",
|
|
195
|
+
savedId: null,
|
|
196
|
+
captions: saved.captions,
|
|
197
|
+
labelColumn: saved.labelColumn ?? null,
|
|
198
|
+
theme: saved.theme,
|
|
199
|
+
clips: [],
|
|
200
|
+
slides: saved.slides.map((slide) => ({ ...slide, items: [] })),
|
|
201
|
+
media: saved.media
|
|
202
|
+
});
|
|
203
|
+
},
|
|
204
|
+
[readSaved]
|
|
205
|
+
);
|
|
206
|
+
const downloadFile = useCallback(
|
|
207
|
+
async (id) => {
|
|
208
|
+
if (!arbi) throw new Error("Sign in to read the file.");
|
|
209
|
+
return (await arbi.documents.download(id)).blob();
|
|
210
|
+
},
|
|
211
|
+
[arbi]
|
|
212
|
+
);
|
|
213
|
+
const open = useCallback(
|
|
214
|
+
async (id, version) => {
|
|
215
|
+
if (!arbi) throw new Error("Sign in to open a presentation.");
|
|
216
|
+
const { saved, legacy, imported, changedOutside, openedVersion } = await readSaved(
|
|
217
|
+
id,
|
|
218
|
+
version
|
|
219
|
+
);
|
|
220
|
+
const media = saved.media ?? {};
|
|
221
|
+
const sources = /* @__PURE__ */ new Map();
|
|
222
|
+
const sourceOf = (clip) => {
|
|
223
|
+
if (clip.media) {
|
|
224
|
+
const url = media[clip.media];
|
|
225
|
+
return url ? Promise.resolve(dataUrlBlob(url)) : Promise.reject(new Error("No image"));
|
|
226
|
+
}
|
|
227
|
+
const key = `${clip.kind === "pdf" ? "pdf" : "file"}:${clip.documentId}@${clip.version ?? ""}`;
|
|
228
|
+
let pending = sources.get(key);
|
|
229
|
+
if (!pending) {
|
|
230
|
+
pending = clip.kind === "pdf" ? fetchDocumentPdf(client, clip.documentId, { version: clip.version ?? null }) : arbi.documents.download(clip.documentId, clip.version).then((r) => r.blob());
|
|
231
|
+
sources.set(key, pending);
|
|
232
|
+
}
|
|
233
|
+
return pending;
|
|
234
|
+
};
|
|
235
|
+
const markups = /* @__PURE__ */ new Map();
|
|
236
|
+
const masksOf = (clip) => {
|
|
237
|
+
const key = `${clip.documentId}@${clip.version ?? ""}`;
|
|
238
|
+
let pending = markups.get(key);
|
|
239
|
+
if (!pending) {
|
|
240
|
+
pending = createMarkupStore({ version: clip.version, client }).load(clip.documentId).then((layer) => {
|
|
241
|
+
const byPage = /* @__PURE__ */ new Map();
|
|
242
|
+
for (const mark of layer.annotations) {
|
|
243
|
+
if (mark.kind !== "redaction" || mark.status === "rejected") continue;
|
|
244
|
+
byPage.set(mark.page, [...byPage.get(mark.page) ?? [], ...mark.rects]);
|
|
245
|
+
}
|
|
246
|
+
return byPage;
|
|
247
|
+
}).catch((error) => {
|
|
248
|
+
if (error instanceof MarkupStoreError && error.status === 404) return /* @__PURE__ */ new Map();
|
|
249
|
+
throw error;
|
|
250
|
+
});
|
|
251
|
+
markups.set(key, pending);
|
|
252
|
+
}
|
|
253
|
+
return pending;
|
|
254
|
+
};
|
|
255
|
+
const opened = await Promise.all(
|
|
256
|
+
saved.clips.map(async (clip) => {
|
|
257
|
+
try {
|
|
258
|
+
const [source, masks] = await Promise.all([
|
|
259
|
+
sourceOf(clip),
|
|
260
|
+
clip.kind === "pdf" && !clip.media ? masksOf(clip) : Promise.resolve(/* @__PURE__ */ new Map())
|
|
261
|
+
]);
|
|
262
|
+
return { ...clip, source, masks: masks.get(clip.page) ?? [] };
|
|
263
|
+
} catch {
|
|
264
|
+
return null;
|
|
265
|
+
}
|
|
266
|
+
})
|
|
267
|
+
);
|
|
268
|
+
const kept = [];
|
|
269
|
+
const newIndex = opened.map((clip) => clip ? kept.push(clip) - 1 : -1);
|
|
270
|
+
usePresentation.getState().load({
|
|
271
|
+
title: saved.title,
|
|
272
|
+
savedId: legacy ? null : id,
|
|
273
|
+
version: legacy ? null : openedVersion,
|
|
274
|
+
boundTo: id,
|
|
275
|
+
captions: saved.captions,
|
|
276
|
+
labelColumn: saved.labelColumn ?? null,
|
|
277
|
+
theme: saved.theme,
|
|
278
|
+
clips: kept,
|
|
279
|
+
slides: saved.slides.map((slide) => ({
|
|
280
|
+
...slide,
|
|
281
|
+
items: slide.items.filter((item) => newIndex[item.clip] >= 0).map((item) => ({ ...item, clip: newIndex[item.clip] }))
|
|
282
|
+
})),
|
|
283
|
+
media
|
|
284
|
+
});
|
|
285
|
+
return {
|
|
286
|
+
missing: opened.length - kept.length,
|
|
287
|
+
stale: saved.slidesStale === true,
|
|
288
|
+
...imported ? { imported } : {},
|
|
289
|
+
...changedOutside?.length ? { changedOutside } : {}
|
|
290
|
+
};
|
|
291
|
+
},
|
|
292
|
+
[arbi, client, readSaved]
|
|
293
|
+
);
|
|
294
|
+
return {
|
|
295
|
+
save,
|
|
296
|
+
exportPdf,
|
|
297
|
+
list,
|
|
298
|
+
open,
|
|
299
|
+
startFromTemplate,
|
|
300
|
+
downloadFile,
|
|
301
|
+
canSave: !!arbi && !!workspaceId
|
|
302
|
+
};
|
|
303
|
+
}
|
|
304
|
+
export {
|
|
305
|
+
usePresentationFiles
|
|
306
|
+
};
|
|
307
|
+
//# sourceMappingURL=usePresentationFiles.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/connection/presentation/usePresentationFiles.ts"],
|
|
4
|
+
"sourcesContent": ["/**\n * Saving and opening presentations as documents of the open workspace's `Presentations` folder:\n * a PowerPoint file (`<title>.pptx`: its slides as editable PowerPoint, the presentation's own data\n * inside it, `pptx-data`). Saving again adds a version to the same document; Export PDF saves a\n * PDF of the slides.\n *\n * Opening fetches each clip's source again: the PDF the viewer shows for a page clip (so Word and\n * text documents work too), the original file for an image or a video. A page clip's redactions\n * are read again from the markup; a clip whose source or redactions cannot be read is left out\n * (never shown unredacted), and how many were is reported.\n *\n * Presentations saved before they were PowerPoint files (a PDF with the data attached, or the data\n * alone) still open; their first save makes a PowerPoint file of them.\n */\n\nimport { useCallback } from 'react'\nimport { useArbi, useArbiSessionState } from '@arbidocs/react'\nimport { isPresentationFileName } from '@arbidocs/react/ui'\nimport {\n createMarkupStore,\n fetchDocumentPdf,\n imagesToPdf,\n MarkupStoreError,\n readPdfAttachment,\n useDocumentTools,\n} from '@arbidocs/react/document-tools'\nimport type { Clip, Rect, Slide } from '../../presentation/model'\nimport {\n EXPORTS_FOLDER,\n PRESENTATIONS_FOLDER,\n PRESENTATION_ATTACHMENT,\n TEMPLATES_FOLDER,\n parsePresentation,\n presentationFileName,\n presentationTitle,\n safeFileStem,\n serializePresentation,\n type SavedClip,\n} from '../../presentation/persistence'\nimport { usePresentation } from '../../presentation/store'\nimport { renderSlide } from '../../presentation/render-slides'\nimport { buildPptx } from '../../presentation/export-pptx'\nimport {\n isZipBytes,\n readPptxPresentationData,\n writePptxPresentationData,\n} from '../../presentation/pptx-data'\nimport { importPptx, slideFingerprints } from '../../presentation/import-pptx'\nimport { mergeOutsideEdits } from '../../presentation/merge-outside-edits'\nimport type { SavedPresentation } from '../../presentation/persistence'\n\nconst PPTX_TYPE = 'application/vnd.openxmlformats-officedocument.presentationml.presentation'\n\n/** A slide's page in the exported PDF, in points: 16:9. */\nconst SLIDE_PAGE = { width: 1280, height: 720 }\n\n/** An image embedded as a data URL, as a file. */\nfunction dataUrlBlob(url: string): Blob {\n const [head, body] = url.split(',', 2)\n const type = /^data:([^;]+)/.exec(head)?.[1] ?? 'application/octet-stream'\n const binary = atob(body ?? '')\n const bytes = new Uint8Array(binary.length)\n for (let i = 0; i < binary.length; i++) bytes[i] = binary.charCodeAt(i)\n return new Blob([bytes], { type })\n}\n\n/** What opening a presentation found besides its content. */\nexport interface OpenedPresentation {\n /** Clips whose source could not be opened (left out). */\n missing: number\n /** Changed outside the editor (an agent): the slides are drawn again on the next save. */\n stale: boolean\n /** A PowerPoint made elsewhere, imported: what did not come across as it was. */\n imported?: { notes: string[] }\n /** Slides (1-based) changed in PowerPoint since the editor saved it, brought in. */\n changedOutside?: number[]\n}\n\n/**\n * The editable data of a saved presentation: inside its PowerPoint file; or, saved before that,\n * attached to its PDF, or the file itself.\n */\nasync function presentationData(bytes: Uint8Array): Promise<string | null> {\n if (isZipBytes(bytes)) return readPptxPresentationData(bytes)\n const isPdf = bytes[0] === 0x25 && bytes[1] === 0x50 && bytes[2] === 0x44 && bytes[3] === 0x46\n if (!isPdf) return new TextDecoder().decode(bytes)\n const data = await readPdfAttachment(bytes, PRESENTATION_ATTACHMENT)\n if (!data) {\n throw new Error(\n 'This PDF has no editable presentation in it (it may have been changed outside ARBI).'\n )\n }\n return new TextDecoder().decode(data)\n}\n\nexport interface SavedPresentationEntry {\n id: string\n title: string\n updatedAt: string | null\n}\n\n/** The presentation as it is now, or (`withoutClips`) its look and slides only: a template. */\nfunction current(withoutClips: boolean) {\n const state = usePresentation.getState()\n return withoutClips\n ? {\n ...state,\n clips: [],\n slides: state.slides.map((slide): Slide => ({ ...slide, items: [] })),\n }\n : state\n}\n\nconst lookOf = (state: ReturnType<typeof current>) => ({\n labels: state.captions,\n columnValues: state.columnValues,\n theme: state.theme,\n logo: state.logoImage,\n media: state.media,\n})\n\nexport function usePresentationFiles() {\n const arbi = useArbi()\n const { client } = useDocumentTools()\n const workspaceId = useArbiSessionState((s) => s.workspaceId)\n\n /** The presentation as its PowerPoint file, its editable data inside. */\n const buildFile = useCallback(async (title: string, withoutClips: boolean): Promise<Blob> => {\n const state = current(withoutClips)\n const deck = await buildPptx({ title, slides: state.slides, clips: state.clips }, lookOf(state))\n // Drawn just now from the presentation itself: never stale. Each slide's fingerprint tells,\n // when it is opened again, which slides were changed in PowerPoint meanwhile.\n const fingerprints = await slideFingerprints(deck)\n const data = serializePresentation({ ...state, title, fingerprints })\n return writePptxPresentationData(deck, JSON.stringify(data, null, 2))\n }, [])\n\n /**\n * Save the presentation: `<title>.pptx` in Presentations, through the ordinary upload, so it is\n * viewed, searched and downloaded like any document (and opens in PowerPoint). A new version of\n * the document it was saved as, or (never saved, or `asNew`: Save as) a new document named\n * `title`; a template (its look and slides, no clips) goes to Presentations/Templates. Resolves\n * with its id.\n */\n const save = useCallback(\n async (\n title: string,\n { asNew = false, template = false }: { asNew?: boolean; template?: boolean } = {}\n ): Promise<string> => {\n if (!arbi || !workspaceId) throw new Error('Open a workspace to save the presentation.')\n const state = usePresentation.getState()\n // A template is always a new document; the open presentation stays what it was.\n const versionOf = asNew || template ? null : state.savedId\n const deck = await buildFile(title, template)\n const file = new File([deck], presentationFileName(title), { type: PPTX_TYPE })\n const result = await arbi.documents.upload([file], {\n folder: template ? TEMPLATES_FOLDER : PRESENTATIONS_FOLDER,\n workspaceExtId: workspaceId,\n ...(versionOf ? { versionOf } : {}),\n })\n const id = versionOf ?? result.doc_ext_ids?.[0]\n if (!id) throw new Error('The presentation could not be saved.')\n if (!template) {\n // The version just saved: a newer one (saved by ARBI, or someone else) is then told apart.\n const [doc] = await arbi.documents.get([id]).catch(() => [])\n state.setSaved(id, title, doc?.current_version ?? null)\n }\n return id\n },\n [arbi, workspaceId, buildFile]\n )\n\n /**\n * Export the slides as a PDF named `title` (in Presentations/Exports): to send outside or file\n * in a bundle, each slide a page as presented, redactions burnt in.\n */\n const exportPdf = useCallback(\n async (title: string): Promise<string> => {\n if (!arbi || !workspaceId) throw new Error('Open a workspace to export the PDF.')\n const state = current(false)\n const pages = []\n for (const slide of state.slides) {\n const { image, text } = await renderSlide(slide, state.clips, lookOf(state))\n pages.push({ image, text, width: SLIDE_PAGE.width, height: SLIDE_PAGE.height })\n }\n const pdf = await imagesToPdf(pages, { title })\n const result = await arbi.documents.upload(\n [new File([pdf], `${safeFileStem(title)}.pdf`, { type: 'application/pdf' })],\n { folder: EXPORTS_FOLDER, workspaceExtId: workspaceId }\n )\n const id = result.doc_ext_ids?.[0]\n if (!id) throw new Error('The PDF could not be saved.')\n return id\n },\n [arbi, workspaceId]\n )\n\n /** The presentations saved in the open workspace (or its templates), newest first. */\n const list = useCallback(\n async (\n scope: 'presentations' | 'templates' = 'presentations'\n ): Promise<SavedPresentationEntry[]> => {\n if (!arbi || !workspaceId) return []\n const docs = await arbi.documents.list({ workspaceId })\n return docs\n .filter((doc) => {\n const folder = doc.folder ?? ''\n if (!isPresentationFileName(doc.file_name, folder)) return false\n return scope === 'templates'\n ? folder === TEMPLATES_FOLDER\n : folder.startsWith(PRESENTATIONS_FOLDER) &&\n folder !== TEMPLATES_FOLDER &&\n !folder.startsWith(EXPORTS_FOLDER)\n })\n .map((doc) => ({\n id: doc.external_id,\n title: presentationTitle(doc.file_name ?? ''),\n updatedAt: doc.updated_at ?? doc.created_at ?? null,\n }))\n .sort((a, b) => ((a.updatedAt ?? '') < (b.updatedAt ?? '') ? 1 : -1))\n },\n [arbi, workspaceId]\n )\n\n /**\n * A saved presentation's data: from its PowerPoint file (slides changed in PowerPoint since\n * brought in), its PDF's attachment or a file saved before that; a PowerPoint made elsewhere is\n * imported.\n */\n const readSaved = useCallback(\n async (id: string, version?: number) => {\n if (!arbi) throw new Error('Sign in to open a presentation.')\n const response = await arbi.documents.download(id, version)\n const bytes = new Uint8Array(await response.arrayBuffer())\n const text = await presentationData(bytes)\n const [doc] = await arbi.documents.get([id]).catch(() => [])\n const openedVersion = version ?? doc?.current_version ?? null\n if (text === null) {\n // A PowerPoint made elsewhere: imported, the version imported pinned (what cannot be edited\n // here is shown from that version's PDF).\n const imported = await importPptx(bytes, {\n title: presentationTitle(doc?.file_name ?? 'Presentation.pptx'),\n documentId: id,\n version: version ?? doc?.current_version,\n fileName: doc?.file_name ?? undefined,\n })\n return {\n saved: imported.saved,\n legacy: false,\n imported: { notes: imported.notes },\n openedVersion,\n }\n }\n let saved: SavedPresentation = parsePresentation(text)\n let changedOutside: number[] | undefined\n if (isZipBytes(bytes) && saved.slides.some((slide) => slide.fingerprint)) {\n const now = await slideFingerprints(bytes)\n const unchanged =\n now.length === saved.slides.length &&\n now.every((fingerprint, i) => fingerprint === saved.slides[i].fingerprint)\n if (!unchanged) {\n const imported = await importPptx(bytes, {\n title: saved.title,\n documentId: id,\n version: version ?? doc?.current_version,\n fileName: doc?.file_name ?? undefined,\n })\n const merged = mergeOutsideEdits(saved, imported.saved, now)\n saved = merged.saved\n changedOutside = merged.changed\n }\n }\n return {\n saved,\n // Saved before presentations were PowerPoint files: its next save is a new PowerPoint\n // file, not a version of this one (a document's versions keep one format).\n legacy: !isZipBytes(bytes),\n changedOutside,\n openedVersion,\n }\n },\n [arbi]\n )\n\n /** A new presentation from a template: its look and slides, without clips, unsaved. */\n const startFromTemplate = useCallback(\n async (id: string) => {\n const { saved } = await readSaved(id)\n usePresentation.getState().load({\n title: 'Untitled presentation',\n savedId: null,\n captions: saved.captions,\n labelColumn: saved.labelColumn ?? null,\n theme: saved.theme,\n clips: [],\n slides: saved.slides.map((slide) => ({ ...slide, items: [] })),\n media: saved.media,\n })\n },\n [readSaved]\n )\n\n /** A file of the workspace (e.g. the theme's logo). */\n const downloadFile = useCallback(\n async (id: string): Promise<Blob> => {\n if (!arbi) throw new Error('Sign in to read the file.')\n return (await arbi.documents.download(id)).blob()\n },\n [arbi]\n )\n\n /**\n * Open a saved presentation (as of `version`; default its current one) in place of this one.\n * Resolves with how many clips were left out, and whether its slides are stale (its data was\n * changed outside the editor: the next save draws them again).\n */\n const open = useCallback(\n async (id: string, version?: number): Promise<OpenedPresentation> => {\n if (!arbi) throw new Error('Sign in to open a presentation.')\n const { saved, legacy, imported, changedOutside, openedVersion } = await readSaved(\n id,\n version\n )\n const media = saved.media ?? {}\n\n // Each source fetched once, however many clips come from it.\n const sources = new Map<string, Promise<Blob>>()\n const sourceOf = (clip: SavedClip) => {\n if (clip.media) {\n const url = media[clip.media]\n return url ? Promise.resolve(dataUrlBlob(url)) : Promise.reject(new Error('No image'))\n }\n const key = `${clip.kind === 'pdf' ? 'pdf' : 'file'}:${clip.documentId}@${clip.version ?? ''}`\n let pending = sources.get(key)\n if (!pending) {\n pending =\n clip.kind === 'pdf'\n ? fetchDocumentPdf(client, clip.documentId, { version: clip.version ?? null })\n : arbi.documents.download(clip.documentId, clip.version).then((r) => r.blob())\n sources.set(key, pending)\n }\n return pending\n }\n // Redactions per page, read once per source version.\n const markups = new Map<string, Promise<Map<number, Rect[]>>>()\n const masksOf = (clip: SavedClip) => {\n const key = `${clip.documentId}@${clip.version ?? ''}`\n let pending = markups.get(key)\n if (!pending) {\n pending = createMarkupStore({ version: clip.version, client })\n .load(clip.documentId)\n .then((layer) => {\n const byPage = new Map<number, Rect[]>()\n for (const mark of layer.annotations) {\n if (mark.kind !== 'redaction' || mark.status === 'rejected') continue\n byPage.set(mark.page, [...(byPage.get(mark.page) ?? []), ...mark.rects])\n }\n return byPage\n })\n .catch((error: unknown) => {\n // No markup at all is no redaction; anything else is a reason not to show it.\n if (error instanceof MarkupStoreError && error.status === 404) return new Map()\n throw error\n })\n markups.set(key, pending)\n }\n return pending\n }\n\n const opened = await Promise.all(\n saved.clips.map(async (clip): Promise<Omit<Clip, 'id'> | null> => {\n try {\n const [source, masks] = await Promise.all([\n sourceOf(clip),\n clip.kind === 'pdf' && !clip.media\n ? masksOf(clip)\n : Promise.resolve(new Map<number, Rect[]>()),\n ])\n return { ...clip, source, masks: masks.get(clip.page) ?? [] }\n } catch {\n return null\n }\n })\n )\n // Keep slide items pointing at the right clips once the missing ones are dropped.\n const kept: Omit<Clip, 'id'>[] = []\n const newIndex = opened.map((clip) => (clip ? kept.push(clip) - 1 : -1))\n usePresentation.getState().load({\n title: saved.title,\n savedId: legacy ? null : id,\n version: legacy ? null : openedVersion,\n boundTo: id,\n captions: saved.captions,\n labelColumn: saved.labelColumn ?? null,\n theme: saved.theme,\n clips: kept,\n slides: saved.slides.map((slide) => ({\n ...slide,\n items: slide.items\n .filter((item) => newIndex[item.clip] >= 0)\n .map((item) => ({ ...item, clip: newIndex[item.clip] })),\n })),\n media,\n })\n return {\n missing: opened.length - kept.length,\n stale: saved.slidesStale === true,\n ...(imported ? { imported } : {}),\n ...(changedOutside?.length ? { changedOutside } : {}),\n }\n },\n [arbi, client, readSaved]\n )\n\n return {\n save,\n exportPdf,\n list,\n open,\n startFromTemplate,\n downloadFile,\n canSave: !!arbi && !!workspaceId,\n }\n}\n"],
|
|
5
|
+
"mappings": ";AAeA,SAAS,mBAAmB;AAC5B,SAAS,SAAS,2BAA2B;AAC7C,SAAS,8BAA8B;AACvC;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAEP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAEK;AACP,SAAS,uBAAuB;AAChC,SAAS,mBAAmB;AAC5B,SAAS,iBAAiB;AAC1B;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,YAAY,yBAAyB;AAC9C,SAAS,yBAAyB;AAGlC,MAAM,YAAY;AAGlB,MAAM,aAAa,EAAE,OAAO,MAAM,QAAQ,IAAI;AAG9C,SAAS,YAAY,KAAmB;AACtC,QAAM,CAAC,MAAM,IAAI,IAAI,IAAI,MAAM,KAAK,CAAC;AACrC,QAAM,OAAO,gBAAgB,KAAK,IAAI,IAAI,CAAC,KAAK;AAChD,QAAM,SAAS,KAAK,QAAQ,EAAE;AAC9B,QAAM,QAAQ,IAAI,WAAW,OAAO,MAAM;AAC1C,WAAS,IAA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AO,SAAS,KAAK;AAAA,QAC9B,OAAO,MAAM,gBAAgB;AAAA,QAC7B,GAAI,WAAW,EAAE,SAAS,IAAI,CAAC;AAAA,QAC/B,GAAI,gBAAgB,SAAS,EAAE,eAAe,IAAI,CAAC;AAAA,MACrD;AAAA,IACF;AAAA,IACA,CAAC,MAAM,QAAQ,SAAS;AAAA,EAC1B;AAEA,SAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,SAAS,CAAC,CAAC,QAAQ,CAAC,CAAC;AAAA,EACvB;AACF;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The document viewer's Clip mode: whether it is on, and its header controls. Clips made in it
|
|
3
|
+
* join the presentation's tray (a presentation being made, or one started from them); it stays on
|
|
4
|
+
* from one document to the next, so clips are gathered from several documents in a row. Beside it,
|
|
5
|
+
* the Presentation pill goes back to arrange them.
|
|
6
|
+
*/
|
|
7
|
+
import { type ReactNode } from 'react';
|
|
8
|
+
export declare function useViewerClipping(
|
|
9
|
+
/** A PDF, an image or a video is on screen. Clip mode shows over the viewer's other modes. */
|
|
10
|
+
clippable: boolean, compact: boolean): {
|
|
11
|
+
clipping: boolean;
|
|
12
|
+
stop: () => void;
|
|
13
|
+
button: ReactNode;
|
|
14
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { useCallback, useState } from "react";
|
|
4
|
+
import { ClipButton } from "../../document-tools/DocumentToolButtons.js";
|
|
5
|
+
import { PresentationPill } from "./PresentationPill.js";
|
|
6
|
+
function useViewerClipping(clippable, compact) {
|
|
7
|
+
const [on, setOn] = useState(false);
|
|
8
|
+
const stop = useCallback(() => setOn(false), []);
|
|
9
|
+
const button = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
10
|
+
/* @__PURE__ */ jsx(PresentationPill, { compact }),
|
|
11
|
+
clippable && /* @__PURE__ */ jsx(ClipButton, { active: on, compact, onClick: () => setOn(!on) })
|
|
12
|
+
] });
|
|
13
|
+
return { clipping: on && clippable, stop, button };
|
|
14
|
+
}
|
|
15
|
+
export {
|
|
16
|
+
useViewerClipping
|
|
17
|
+
};
|
|
18
|
+
//# sourceMappingURL=useViewerClipping.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/connection/presentation/useViewerClipping.tsx"],
|
|
4
|
+
"sourcesContent": ["/**\n * The document viewer's Clip mode: whether it is on, and its header controls. Clips made in it\n * join the presentation's tray (a presentation being made, or one started from them); it stays on\n * from one document to the next, so clips are gathered from several documents in a row. Beside it,\n * the Presentation pill goes back to arrange them.\n */\n\nimport { useCallback, useState, type ReactNode } from 'react'\nimport { ClipButton } from '../../document-tools/DocumentToolButtons'\nimport { PresentationPill } from './PresentationPill'\n\nexport function useViewerClipping(\n /** A PDF, an image or a video is on screen. Clip mode shows over the viewer's other modes. */\n clippable: boolean,\n compact: boolean\n): { clipping: boolean; stop: () => void; button: ReactNode } {\n const [on, setOn] = useState(false)\n const stop = useCallback(() => setOn(false), [])\n const button = (\n <>\n <PresentationPill compact={compact} />\n {clippable && <ClipButton active={on} compact={compact} onClick={() => setOn(!on)} />}\n </>\n )\n return { clipping: on && clippable, stop, button }\n}\n"],
|
|
5
|
+
"mappings": ";AAmBI,mBACE,KADF;AAZJ,SAAS,aAAa,gBAAgC;AACtD,SAAS,kBAAkB;AAC3B,SAAS,wBAAwB;AAE1B,SAAS,kBAEd,WACA,SAC4D;AAC5D,QAAM,CAAC,IAAI,KAAK,IAAI,SAAS,KAAK;AAClC,QAAM,OAAO,YAAY,MAAM,MAAM,KAAK,GAAG,CAAC,CAAC;AAC/C,QAAM,SACJ,iCACE;AAAA,wBAAC,oBAAiB,SAAkB;AAAA,IACnC,aAAa,oBAAC,cAAW,QAAQ,IAAI,SAAkB,SAAS,MAAM,MAAM,CAAC,EAAE,GAAG;AAAA,KACrF;AAEF,SAAO,EAAE,UAAU,MAAM,WAAW,MAAM,OAAO;AACnD;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { useWorkspaceUsers } from "@arbidocs/react";
|
|
4
|
+
import { formatRole } from "../../workspaces/workspace-roles.js";
|
|
5
|
+
const ROLE_ORDER = { owner: 0, collaborator: 1, guest: 2 };
|
|
6
|
+
function memberName(member) {
|
|
7
|
+
const { given_name, family_name, email } = member.user;
|
|
8
|
+
return [given_name, family_name].filter(Boolean).join(" ") || email;
|
|
9
|
+
}
|
|
10
|
+
function sortMembers(members) {
|
|
11
|
+
return [...members].sort(
|
|
12
|
+
(a, b) => (ROLE_ORDER[a.role] ?? 3) - (ROLE_ORDER[b.role] ?? 3) || memberName(a).localeCompare(memberName(b))
|
|
13
|
+
);
|
|
14
|
+
}
|
|
15
|
+
function WorkspaceMembersList({ workspaceId }) {
|
|
16
|
+
const { data, isLoading, isError } = useWorkspaceUsers(workspaceId);
|
|
17
|
+
if (isLoading) return /* @__PURE__ */ jsx("p", { className: "text-xs text-muted-foreground", children: "Loading members\u2026" });
|
|
18
|
+
if (isError || !data) return /* @__PURE__ */ jsx("p", { className: "text-xs text-muted-foreground", children: "Members unavailable" });
|
|
19
|
+
return /* @__PURE__ */ jsx("ul", { className: "max-h-60 space-y-1.5 overflow-y-auto", "data-testid": "sharing-members", children: sortMembers(data).map((m) => /* @__PURE__ */ jsxs("li", { className: "flex items-center justify-between gap-3 text-xs", children: [
|
|
20
|
+
/* @__PURE__ */ jsx("span", { className: "truncate", title: m.user.email, children: memberName(m) }),
|
|
21
|
+
/* @__PURE__ */ jsx(
|
|
22
|
+
"span",
|
|
23
|
+
{
|
|
24
|
+
className: "shrink-0 rounded bg-muted px-1.5 py-0.5 text-muted-foreground",
|
|
25
|
+
"data-role": m.role,
|
|
26
|
+
children: formatRole(m.role)
|
|
27
|
+
}
|
|
28
|
+
)
|
|
29
|
+
] }, m.user.external_id)) });
|
|
30
|
+
}
|
|
31
|
+
export {
|
|
32
|
+
WorkspaceMembersList
|
|
33
|
+
};
|
|
34
|
+
//# sourceMappingURL=WorkspaceMembersList.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/connection/sharing/WorkspaceMembersList.tsx"],
|
|
4
|
+
"sourcesContent": ["import { useWorkspaceUsers, type WorkspaceMember } from '@arbidocs/react'\nimport { formatRole } from '../../workspaces/workspace-roles'\n\nconst ROLE_ORDER: Record<string, number> = { owner: 0, collaborator: 1, guest: 2 }\n\nfunction memberName(member: WorkspaceMember): string {\n const { given_name, family_name, email } = member.user\n return [given_name, family_name].filter(Boolean).join(' ') || email\n}\n\n/** Owners first, then collaborators, then read-only members; alphabetical within a role. */\nfunction sortMembers(members: readonly WorkspaceMember[]): WorkspaceMember[] {\n return [...members].sort(\n (a, b) =>\n (ROLE_ORDER[a.role] ?? 3) - (ROLE_ORDER[b.role] ?? 3) ||\n memberName(a).localeCompare(memberName(b))\n )\n}\n\n/** The workspace's members with their role; mounted only while a card is open, so read on first hover. */\nexport function WorkspaceMembersList({ workspaceId }: { workspaceId?: string | null }) {\n const { data, isLoading, isError } = useWorkspaceUsers(workspaceId)\n if (isLoading) return <p className=\"text-xs text-muted-foreground\">Loading members\u2026</p>\n if (isError || !data) return <p className=\"text-xs text-muted-foreground\">Members unavailable</p>\n return (\n <ul className=\"max-h-60 space-y-1.5 overflow-y-auto\" data-testid=\"sharing-members\">\n {sortMembers(data).map((m) => (\n <li key={m.user.external_id} className=\"flex items-center justify-between gap-3 text-xs\">\n <span className=\"truncate\" title={m.user.email}>\n {memberName(m)}\n </span>\n <span\n className=\"shrink-0 rounded bg-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}
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { useEffect } from "react";
|
|
4
4
|
import { useArbiSessionState, useArbiSessionStore } from "@arbidocs/react";
|
|
5
|
+
import { configureSharingMembers } from "@arbidocs/react/ui";
|
|
6
|
+
import { WorkspaceMembersList } from "../sharing/WorkspaceMembersList.js";
|
|
5
7
|
import { DockZone } from "../../shell/DockZone.js";
|
|
6
8
|
import {
|
|
7
9
|
PageContainer,
|
|
@@ -20,12 +22,14 @@ import {
|
|
|
20
22
|
RoutedShellTopbar
|
|
21
23
|
} from "./RoutedShellChrome.js";
|
|
22
24
|
import { ShellNavigationProvider } from "./ShellNavigationProvider.js";
|
|
25
|
+
import { PresentationSlot } from "../presentation/PresentationSlot.js";
|
|
23
26
|
import { useShellNavigation } from "./shell-navigation.js";
|
|
24
27
|
const ROUTED_PAGE_INSET = "pt-4 sm:pt-6";
|
|
25
28
|
function PaletteSlot({ palette }) {
|
|
26
29
|
const visibleItems = useShellNavigation()?.visibleItems ?? [];
|
|
27
30
|
return /* @__PURE__ */ jsx(Fragment, { children: typeof palette === "function" ? palette(visibleItems) : palette });
|
|
28
31
|
}
|
|
32
|
+
const SHARING_MEMBERS = /* @__PURE__ */ jsx(WorkspaceMembersList, {});
|
|
29
33
|
function ConnectedAppShell({
|
|
30
34
|
banner,
|
|
31
35
|
topbar,
|
|
@@ -51,6 +55,7 @@ function ConnectedAppShell({
|
|
|
51
55
|
tools,
|
|
52
56
|
...rootProps
|
|
53
57
|
}) {
|
|
58
|
+
configureSharingMembers(SHARING_MEMBERS);
|
|
54
59
|
const session = useArbiSessionStore();
|
|
55
60
|
const dockedPanel = useArbiSessionState((state) => state.shell.panels.docked);
|
|
56
61
|
const dockSqueezed = useMediaQuery(sidebarPolicy?.dockedRailQuery ?? "(max-width: 0px)");
|
|
@@ -105,7 +110,10 @@ function ConnectedAppShell({
|
|
|
105
110
|
)
|
|
106
111
|
}
|
|
107
112
|
);
|
|
108
|
-
return /* @__PURE__ */
|
|
113
|
+
return /* @__PURE__ */ jsxs(AppShellContext.Provider, { value: controller, children: [
|
|
114
|
+
navigation ? /* @__PURE__ */ jsx(ShellNavigationProvider, { navigation, children: root }) : root,
|
|
115
|
+
/* @__PURE__ */ jsx(PresentationSlot, {})
|
|
116
|
+
] });
|
|
109
117
|
}
|
|
110
118
|
export {
|
|
111
119
|
ConnectedAppShell
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/connection/shell/ConnectedAppShell.tsx"],
|
|
4
|
-
"sourcesContent": ["import { useEffect, type ReactNode } from 'react'\nimport { useArbiSessionState, useArbiSessionStore } from '@arbidocs/react'\nimport { DockZone } from '../../shell/DockZone'\nimport {\n PageContainer,\n Shell,\n type PageContainerProps,\n type ShellContentProps,\n type ShellRootProps,\n} from '../../shell/Shell'\nimport {\n useSidebarController,\n type UseSidebarControllerOptions,\n} from '../../shell/use-sidebar-controller'\nimport { useMediaQuery } from '../../lib/use-media-query'\nimport { useSessionSidebar } from '../useSessionSidebar'\nimport { AppShellContext, type AppShellController } from './app-shell-controller'\nimport {\n RoutedShellDock,\n RoutedShellSidebar,\n RoutedShellTabBar,\n RoutedShellTopbar,\n type RoutedShellChromeProps,\n} from './RoutedShellChrome'\nimport { ShellNavigationProvider } from './ShellNavigationProvider'\nimport type { AppNavItem } from '../../nav/types'\nimport { useShellNavigation, type ShellNavigation } from './shell-navigation'\n\ntype ShellSlot = ReactNode | ((controller: AppShellController) => ReactNode)\n\n/**\n * A routed page's top inset when the host sets no `page.innerClassName`: a page that opens with\n * its title (`PageHeader`) clears the top edge. The registry shell (no `navigation`) has none.\n */\nconst ROUTED_PAGE_INSET = 'pt-4 sm:pt-6'\ntype ShellRegions = 'banner' | 'topbar' | 'sidebar' | 'tabBar' | 'aside' | 'overlays'\n\n/**\n * A routed host's chrome as configuration: `navigation` (`defineNavigation`) and the routed props.\n * The shell draws the sidebar's sections, the phone app bar, drawer and tab bar, and the assistant\n * dock from them. The current row comes from the environment's `useLocation`; choosing a row is a\n * real link through its `navigate`. A region still given as a slot replaces only that part.\n */\nexport interface RoutedShellProps extends RoutedShellChromeProps {\n navigation: ShellNavigation\n}\n\n/** Without `navigation` every region is a slot, and the routed props do not apply. */\ntype SlotShellProps = { navigation?: undefined } & {\n [K in keyof RoutedShellChromeProps]?: never\n}\n\ninterface ConnectedAppShellBaseProps extends Omit<ShellRootProps, ShellRegions | 'children'> {\n /**\n * The command palette, mounted once inside the shell (`ConnectedCommandPalette`). A function\n * gets a routed shell's visible destinations (gates applied), so a hidden row never shows there.\n */\n palette?: ReactNode | ((navigation: readonly AppNavItem[]) => ReactNode)\n banner?: ShellSlot\n topbar?: ShellSlot\n sidebar?: ShellSlot\n tabBar?: ShellSlot\n aside?: ShellSlot\n overlays?: ShellSlot\n children: ReactNode\n /** The host's navigation identity. A change closes the phone drawer, without changing scroll. */\n navigationKey?: string\n sidebarPolicy?: Pick<UseSidebarControllerOptions, 'hoverExpansion'> & {\n /** A docked panel squeezes this host's sidebar into a rail below this media query. */\n dockedRailQuery?: string\n }\n /** Page layout only; routes, permissions and whether a main panel is visible belong to the host. */\n content?:\n | { mode: 'routed' }\n | { mode: 'docked'; mainPanelVisible: boolean; mainZoneId?: string; testId?: string }\n /**\n * The page column. With `navigation` it has a top inset (`pt-4 sm:pt-6`), skipped only when the\n * host sets `innerClassName` (then the host's classes are the column's); `maxWidth`, `padding` and\n * `wide` alone keep it.\n */\n page?: Omit<PageContainerProps, 'children'>\n /** Clicking the content also selects the session's main focus area (away from any panel). */\n contentProps?: Omit<ShellContentProps, 'children'>\n}\n\nexport type ConnectedAppShellProps = ConnectedAppShellBaseProps &\n (RoutedShellProps | SlotShellProps)\n\n/** The palette slot; a function gets the routed shell's visible destinations. */\nfunction PaletteSlot({ palette }: { palette: NonNullable<ConnectedAppShellProps['palette']> }) {\n const visibleItems = useShellNavigation()?.visibleItems ?? []\n return <>{typeof palette === 'function' ? palette(visibleItems) : palette}</>\n}\n\n/**\n * Session-backed application frame. Routing stays in the host, which gives its chrome as region\n * slots or, for a routed custom site, as `navigation` and the routed props; the frame\n * shares its sidebar controller and assembles routed pages or persistent page/main-panel zones.\n * It never resets scroll: a host's page navigation and restored thread position remain distinct.\n */\nexport function ConnectedAppShell({\n banner,\n topbar,\n sidebar: sidebarSlot,\n tabBar,\n aside,\n overlays,\n children,\n navigationKey,\n sidebarPolicy,\n content = { mode: 'routed' },\n page,\n contentProps,\n navigation,\n palette,\n brand,\n account,\n ask,\n dock,\n switcher,\n tabBarIds,\n tabBarLabel,\n tools,\n ...rootProps\n}: ConnectedAppShellProps) {\n const session = useArbiSessionStore()\n const dockedPanel = useArbiSessionState((state) => state.shell.panels.docked)\n const dockSqueezed = useMediaQuery(sidebarPolicy?.dockedRailQuery ?? '(max-width: 0px)')\n const sidebar = useSidebarController({\n ...useSessionSidebar(),\n forceRail: !!sidebarPolicy?.dockedRailQuery && dockSqueezed && dockedPanel !== null,\n hoverExpansion: sidebarPolicy?.hoverExpansion,\n })\n const { closeDrawer } = sidebar\n useEffect(() => {\n if (navigationKey !== undefined) closeDrawer()\n }, [navigationKey, closeDrawer])\n\n const controller = { sidebar }\n const renderSlot = (slot: ShellSlot) => (typeof slot === 'function' ? slot(controller) : slot)\n // A routed page clears the top edge. Only the host's own `page.innerClassName` replaces the inset\n // (its whole column classes); other `page` props (`maxWidth`, `padding`, `wide`) keep it.\n const pageProps =\n navigation && page?.innerClassName === undefined\n ? { ...page, innerClassName: ROUTED_PAGE_INSET }\n : page\n const pageContent = <PageContainer {...pageProps}>{children}</PageContainer>\n const chrome = { brand: brand!, account, ask, dock, switcher, tools }\n // A routed host's chrome from its navigation; any region it gives as a slot wins.\n const region = (slot: ShellSlot, routed: ReactNode) =>\n slot === undefined && navigation ? routed : renderSlot(slot)\n const overlayContent = renderSlot(overlays)\n\n const root = (\n <Shell.Root\n {...rootProps}\n banner={renderSlot(banner)}\n topbar={region(topbar, <RoutedShellTopbar {...chrome} />)}\n sidebar={region(sidebarSlot, <RoutedShellSidebar {...chrome} />)}\n tabBar={region(tabBar, <RoutedShellTabBar tabBarIds={tabBarIds} tabBarLabel={tabBarLabel} />)}\n aside={region(aside, <RoutedShellDock dock={dock} />)}\n overlays={\n palette ? (\n <>\n {overlayContent}\n <PaletteSlot palette={palette} />\n </>\n ) : (\n overlayContent\n )\n }\n >\n <Shell.Content\n {...contentProps}\n onClick={(event) => {\n session.setFocusedArea('main')\n contentProps?.onClick?.(event)\n }}\n >\n {content.mode === 'docked' ? (\n <DockZone data-testid={content.testId}>\n {/* Keep the page mounted beneath a replacing panel, including drafts and scroll.\n The definite height chain also keeps sticky page footers inside the scroller. */}\n <div className={content.mainPanelVisible ? 'hidden' : 'h-full min-h-0'}>\n {pageContent}\n </div>\n <div\n id={content.mainZoneId ?? 'main-zone'}\n className={content.mainPanelVisible ? 'h-full' : 'hidden'}\n />\n </DockZone>\n ) : (\n pageContent\n )}\n </Shell.Content>\n </Shell.Root>\n )\n\n return (\n <AppShellContext.Provider value={controller}>\n {navigation ? (\n <ShellNavigationProvider navigation={navigation}>{root}</ShellNavigationProvider>\n ) : (\n root\n )}\n </AppShellContext.Provider>\n )\n}\n"],
|
|
5
|
-
"mappings": ";
|
|
4
|
+
"sourcesContent": ["import { useEffect, type ReactNode } from 'react'\nimport { useArbiSessionState, useArbiSessionStore } from '@arbidocs/react'\nimport { configureSharingMembers } from '@arbidocs/react/ui'\nimport { WorkspaceMembersList } from '../sharing/WorkspaceMembersList'\nimport { DockZone } from '../../shell/DockZone'\nimport {\n PageContainer,\n Shell,\n type PageContainerProps,\n type ShellContentProps,\n type ShellRootProps,\n} from '../../shell/Shell'\nimport {\n useSidebarController,\n type UseSidebarControllerOptions,\n} from '../../shell/use-sidebar-controller'\nimport { useMediaQuery } from '../../lib/use-media-query'\nimport { useSessionSidebar } from '../useSessionSidebar'\nimport { AppShellContext, type AppShellController } from './app-shell-controller'\nimport {\n RoutedShellDock,\n RoutedShellSidebar,\n RoutedShellTabBar,\n RoutedShellTopbar,\n type RoutedShellChromeProps,\n} from './RoutedShellChrome'\nimport { ShellNavigationProvider } from './ShellNavigationProvider'\nimport { PresentationSlot } from '../presentation/PresentationSlot'\nimport type { AppNavItem } from '../../nav/types'\nimport { useShellNavigation, type ShellNavigation } from './shell-navigation'\n\ntype ShellSlot = ReactNode | ((controller: AppShellController) => ReactNode)\n\n/**\n * A routed page's top inset when the host sets no `page.innerClassName`: a page that opens with\n * its title (`PageHeader`) clears the top edge. The registry shell (no `navigation`) has none.\n */\nconst ROUTED_PAGE_INSET = 'pt-4 sm:pt-6'\ntype ShellRegions = 'banner' | 'topbar' | 'sidebar' | 'tabBar' | 'aside' | 'overlays'\n\n/**\n * A routed host's chrome as configuration: `navigation` (`defineNavigation`) and the routed props.\n * The shell draws the sidebar's sections, the phone app bar, drawer and tab bar, and the assistant\n * dock from them. The current row comes from the environment's `useLocation`; choosing a row is a\n * real link through its `navigate`. A region still given as a slot replaces only that part.\n */\nexport interface RoutedShellProps extends RoutedShellChromeProps {\n navigation: ShellNavigation\n}\n\n/** Without `navigation` every region is a slot, and the routed props do not apply. */\ntype SlotShellProps = { navigation?: undefined } & {\n [K in keyof RoutedShellChromeProps]?: never\n}\n\ninterface ConnectedAppShellBaseProps extends Omit<ShellRootProps, ShellRegions | 'children'> {\n /**\n * The command palette, mounted once inside the shell (`ConnectedCommandPalette`). A function\n * gets a routed shell's visible destinations (gates applied), so a hidden row never shows there.\n */\n palette?: ReactNode | ((navigation: readonly AppNavItem[]) => ReactNode)\n banner?: ShellSlot\n topbar?: ShellSlot\n sidebar?: ShellSlot\n tabBar?: ShellSlot\n aside?: ShellSlot\n overlays?: ShellSlot\n children: ReactNode\n /** The host's navigation identity. A change closes the phone drawer, without changing scroll. */\n navigationKey?: string\n sidebarPolicy?: Pick<UseSidebarControllerOptions, 'hoverExpansion'> & {\n /** A docked panel squeezes this host's sidebar into a rail below this media query. */\n dockedRailQuery?: string\n }\n /** Page layout only; routes, permissions and whether a main panel is visible belong to the host. */\n content?:\n | { mode: 'routed' }\n | { mode: 'docked'; mainPanelVisible: boolean; mainZoneId?: string; testId?: string }\n /**\n * The page column. With `navigation` it has a top inset (`pt-4 sm:pt-6`), skipped only when the\n * host sets `innerClassName` (then the host's classes are the column's); `maxWidth`, `padding` and\n * `wide` alone keep it.\n */\n page?: Omit<PageContainerProps, 'children'>\n /** Clicking the content also selects the session's main focus area (away from any panel). */\n contentProps?: Omit<ShellContentProps, 'children'>\n}\n\nexport type ConnectedAppShellProps = ConnectedAppShellBaseProps &\n (RoutedShellProps | SlotShellProps)\n\n/** The palette slot; a function gets the routed shell's visible destinations. */\nfunction PaletteSlot({ palette }: { palette: NonNullable<ConnectedAppShellProps['palette']> }) {\n const visibleItems = useShellNavigation()?.visibleItems ?? []\n return <>{typeof palette === 'function' ? palette(visibleItems) : palette}</>\n}\n\nconst SHARING_MEMBERS = <WorkspaceMembersList />\n\n/**\n * Session-backed application frame. Routing stays in the host, which gives its chrome as region\n * slots or, for a routed custom site, as `navigation` and the routed props; the frame\n * shares its sidebar controller and assembles routed pages or persistent page/main-panel zones.\n * It never resets scroll: a host's page navigation and restored thread position remain distinct.\n */\nexport function ConnectedAppShell({\n banner,\n topbar,\n sidebar: sidebarSlot,\n tabBar,\n aside,\n overlays,\n children,\n navigationKey,\n sidebarPolicy,\n content = { mode: 'routed' },\n page,\n contentProps,\n navigation,\n palette,\n brand,\n account,\n ask,\n dock,\n switcher,\n tabBarIds,\n tabBarLabel,\n tools,\n ...rootProps\n}: ConnectedAppShellProps) {\n // Every sharing pill (also in panels portalled out of this tree) lists the workspace's members.\n configureSharingMembers(SHARING_MEMBERS)\n const session = useArbiSessionStore()\n const dockedPanel = useArbiSessionState((state) => state.shell.panels.docked)\n const dockSqueezed = useMediaQuery(sidebarPolicy?.dockedRailQuery ?? '(max-width: 0px)')\n const sidebar = useSidebarController({\n ...useSessionSidebar(),\n forceRail: !!sidebarPolicy?.dockedRailQuery && dockSqueezed && dockedPanel !== null,\n hoverExpansion: sidebarPolicy?.hoverExpansion,\n })\n const { closeDrawer } = sidebar\n useEffect(() => {\n if (navigationKey !== undefined) closeDrawer()\n }, [navigationKey, closeDrawer])\n\n const controller = { sidebar }\n const renderSlot = (slot: ShellSlot) => (typeof slot === 'function' ? slot(controller) : slot)\n // A routed page clears the top edge. Only the host's own `page.innerClassName` replaces the inset\n // (its whole column classes); other `page` props (`maxWidth`, `padding`, `wide`) keep it.\n const pageProps =\n navigation && page?.innerClassName === undefined\n ? { ...page, innerClassName: ROUTED_PAGE_INSET }\n : page\n const pageContent = <PageContainer {...pageProps}>{children}</PageContainer>\n const chrome = { brand: brand!, account, ask, dock, switcher, tools }\n // A routed host's chrome from its navigation; any region it gives as a slot wins.\n const region = (slot: ShellSlot, routed: ReactNode) =>\n slot === undefined && navigation ? routed : renderSlot(slot)\n const overlayContent = renderSlot(overlays)\n\n const root = (\n <Shell.Root\n {...rootProps}\n banner={renderSlot(banner)}\n topbar={region(topbar, <RoutedShellTopbar {...chrome} />)}\n sidebar={region(sidebarSlot, <RoutedShellSidebar {...chrome} />)}\n tabBar={region(tabBar, <RoutedShellTabBar tabBarIds={tabBarIds} tabBarLabel={tabBarLabel} />)}\n aside={region(aside, <RoutedShellDock dock={dock} />)}\n overlays={\n palette ? (\n <>\n {overlayContent}\n <PaletteSlot palette={palette} />\n </>\n ) : (\n overlayContent\n )\n }\n >\n <Shell.Content\n {...contentProps}\n onClick={(event) => {\n session.setFocusedArea('main')\n contentProps?.onClick?.(event)\n }}\n >\n {content.mode === 'docked' ? (\n <DockZone data-testid={content.testId}>\n {/* Keep the page mounted beneath a replacing panel, including drafts and scroll.\n The definite height chain also keeps sticky page footers inside the scroller. */}\n <div className={content.mainPanelVisible ? 'hidden' : 'h-full min-h-0'}>\n {pageContent}\n </div>\n <div\n id={content.mainZoneId ?? 'main-zone'}\n className={content.mainPanelVisible ? 'h-full' : 'hidden'}\n />\n </DockZone>\n ) : (\n pageContent\n )}\n </Shell.Content>\n </Shell.Root>\n )\n\n return (\n <AppShellContext.Provider value={controller}>\n {navigation ? (\n <ShellNavigationProvider navigation={navigation}>{root}</ShellNavigationProvider>\n ) : (\n root\n )}\n {/* The presentation module (presenter panel, stage window), once a presentation opens. */}\n <PresentationSlot />\n </AppShellContext.Provider>\n )\n}\n"],
|
|
5
|
+
"mappings": ";AA8FS,wBA4EC,YA5ED;AA9FT,SAAS,iBAAiC;AAC1C,SAAS,qBAAqB,2BAA2B;AACzD,SAAS,+BAA+B;AACxC,SAAS,4BAA4B;AACrC,SAAS,gBAAgB;AACzB;AAAA,EACE;AAAA,EACA;AAAA,OAIK;AACP;AAAA,EACE;AAAA,OAEK;AACP,SAAS,qBAAqB;AAC9B,SAAS,yBAAyB;AAClC,SAAS,uBAAgD;AACzD;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAEK;AACP,SAAS,+BAA+B;AACxC,SAAS,wBAAwB;AAEjC,SAAS,0BAAgD;AAQzD,MAAM,oBAAoB;AAuD1B,SAAS,YAAY,EAAE,QAAQ,GAAgE;AAC7F,QAAM,eAAe,mBAAmB,GAAG,gBAAgB,CAAC;AAC5D,SAAO,gCAAG,iBAAO,YAAY,aAAa,QAAQ,YAAY,IAAI,SAAQ;AAC5E;AAEA,MAAM,kBAAkB,oBAAC,wBAAqB;AAQvC,SAAS,kBAAkB;AAAA,EAChC;AAAA,EACA;AAAA,EACA,SAAS;AAAA,EACT;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,UAAU,EAAE,MAAM,SAAS;AAAA,EAC3B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,GAA2B;AAEzB,0BAAwB,e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QACD,oBAAC,eAAY,SAAkB;AAAA,SACjC,IAEA;AAAA,MAIJ;AAAA,QAAC,MAAM;AAAA,QAAN;AAAA,UACE,GAAG;AAAA,UACJ,SAAS,CAAC,UAAU;AAClB,oBAAQ,eAAe,MAAM;AAC7B,0BAAc,UAAU,KAAK;AAAA,UAC/B;AAAA,UAEC,kBAAQ,SAAS,WAChB,qBAAC,YAAS,eAAa,QAAQ,QAG7B;AAAA,gCAAC,SAAI,WAAW,QAAQ,mBAAmB,WAAW,kBACnD,uBACH;AAAA,YACA;AAAA,cAAC;AAAA;AAAA,gBACC,IAAI,QAAQ,cAAc;AAAA,gBAC1B,WAAW,QAAQ,mBAAmB,WAAW;AAAA;AAAA,YACnD;AAAA,aACF,IAEA;AAAA;AAAA,MAEJ;AAAA;AAAA,EACF;AAGF,SACE,qBAAC,gBAAgB,UAAhB,EAAyB,OAAO,YAC9B;AAAA,iBACC,oBAAC,2BAAwB,YAAyB,gBAAK,IAEvD;AAAA,IAGF,oBAAC,oBAAiB;AAAA,KACpB;AAEJ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Over the viewer's clean view: Full screen, and Show controls (leave the clean view). It shows
|
|
3
|
+
* while the pointer moves or a key is pressed and fades after a moment, so a share rarely
|
|
4
|
+
* catches it.
|
|
5
|
+
*/
|
|
6
|
+
export declare function CleanViewControl({ onExit }: {
|
|
7
|
+
onExit: () => void;
|
|
8
|
+
}): import("react").JSX.Element;
|