@arbidocs/blocks 0.5.120 → 0.5.121
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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-SGE4R3M4.cjs → ConnectedNativeDocxComparison-4Q5S7VLD.cjs} +17 -17
- package/dist/{ConnectedNativeDocxComparison-SGE4R3M4.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-6MCLJRIT.cjs → ConnectedStreamedWordArtifact-FFOQJBOI.cjs} +17 -17
- package/dist/{ConnectedStreamedWordArtifact-6MCLJRIT.cjs.map → ConnectedStreamedWordArtifact-FFOQJBOI.cjs.map} +1 -1
- package/dist/{DocumentReviewCard-BPIAJJED.cjs → DocumentReviewCard-SNWVEZ7S.cjs} +17 -16
- package/dist/DocumentReviewCard-SNWVEZ7S.cjs.map +1 -0
- package/dist/{FilesViewerDialog-67WK3TZC.cjs → FilesViewerDialog-IZI63FOV.cjs} +52 -45
- 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/{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-HA66DHW6.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-BP3IJ34D.cjs → chunk-52KGMAO5.cjs} +15 -15
- package/dist/{chunk-BP3IJ34D.cjs.map → chunk-52KGMAO5.cjs.map} +1 -1
- package/dist/{chunk-5IZFSAEZ.cjs → chunk-5534FYXP.cjs} +4 -4
- package/dist/{chunk-5IZFSAEZ.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-DFBDQKGE.cjs → chunk-734NPQNR.cjs} +4 -4
- package/dist/{chunk-DFBDQKGE.cjs.map → chunk-734NPQNR.cjs.map} +1 -1
- package/dist/{chunk-X36UR4A7.cjs → chunk-7VUJGHMY.cjs} +323 -96
- 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-YYSBWMDJ.cjs → chunk-AY6EZSZB.cjs} +4 -4
- package/dist/{chunk-YYSBWMDJ.cjs.map → chunk-AY6EZSZB.cjs.map} +1 -1
- package/dist/{chunk-BUVIBHFU.cjs → chunk-BVAT4EVC.cjs} +38 -38
- package/dist/chunk-BVAT4EVC.cjs.map +1 -0
- package/dist/{chunk-ECLUFKYR.cjs → chunk-C2OICDMI.cjs} +10 -10
- package/dist/{chunk-ECLUFKYR.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-775S43W7.cjs → chunk-ENGL7P3I.cjs} +31 -31
- package/dist/{chunk-775S43W7.cjs.map → chunk-ENGL7P3I.cjs.map} +1 -1
- package/dist/{chunk-VZCPMXWC.cjs → chunk-FKFQCK3C.cjs} +4 -4
- package/dist/{chunk-VZCPMXWC.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-Q6CLWOP2.cjs → chunk-GPX5VC57.cjs} +50 -50
- package/dist/{chunk-Q6CLWOP2.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-NLSWDP42.cjs → chunk-JQLWKNJO.cjs} +22 -12
- package/dist/chunk-JQLWKNJO.cjs.map +1 -0
- package/dist/{chunk-CKCG4NDB.cjs → chunk-JZEYHDWJ.cjs} +75 -75
- package/dist/{chunk-CKCG4NDB.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-W6INT5GS.cjs → chunk-KP5AITQ4.cjs} +10 -10
- package/dist/{chunk-W6INT5GS.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-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-QQWHG3KF.cjs → chunk-RYVZDFVO.cjs} +5 -5
- package/dist/{chunk-QQWHG3KF.cjs.map → chunk-RYVZDFVO.cjs.map} +1 -1
- 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-3GWWOYGS.cjs → chunk-W6B3RYTX.cjs} +4 -4
- package/dist/{chunk-3GWWOYGS.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-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 +70 -70
- 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 +1150 -1232
- package/dist/connect/index.cjs.map +1 -1
- package/dist/connect/viewer.cjs +40 -34
- package/dist/connection/ai.d.ts +1 -1
- 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/documentColumns.js +1 -1
- 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/shell/ConnectedAppShell.js +5 -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 +28 -29
- 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 +37 -0
- 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/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/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 +41 -39
- package/dist/files/GridViewImpl.js +1 -1
- package/dist/files/GridViewImpl.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 +225 -225
- package/dist/files/navigator/DocumentSearchList.js +1 -1
- package/dist/files/navigator/DocumentSearchList.js.map +2 -2
- package/dist/index.cjs +1666 -1664
- 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 +55 -54
- 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-BPIAJJED.cjs.map +0 -1
- package/dist/FilesViewerDialog-67WK3TZC.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-BUVIBHFU.cjs.map +0 -1
- package/dist/chunk-CPR6EHG7.cjs.map +0 -1
- package/dist/chunk-HA66DHW6.cjs.map +0 -1
- package/dist/chunk-NJCK6V6U.cjs.map +0 -1
- package/dist/chunk-NLSWDP42.cjs.map +0 -1
- package/dist/chunk-PGJYD67F.cjs.map +0 -1
- package/dist/chunk-X36UR4A7.cjs.map +0 -1
- package/dist/chunk-YYPZOEED.cjs.map +0 -1
|
@@ -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;AACt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AM,MACV,OAAO,CAAC,SAAS,SAAS,KAAK,IAAI,KAAK,CAAC,EACzC,IAAI,CAAC,UAAU,EAAE,GAAG,MAAM,MAAM,SAAS,KAAK,IAAI,EAAE,EAAE;AAAA,QAC3D,EAAE;AAAA,QACF;AAAA,MACF,CAAC;AACD,aAAO;AAAA,QACL,SAAS,OAAO,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
|
+
}
|
|
@@ -22,6 +22,7 @@ import {
|
|
|
22
22
|
RoutedShellTopbar
|
|
23
23
|
} from "./RoutedShellChrome.js";
|
|
24
24
|
import { ShellNavigationProvider } from "./ShellNavigationProvider.js";
|
|
25
|
+
import { PresentationSlot } from "../presentation/PresentationSlot.js";
|
|
25
26
|
import { useShellNavigation } from "./shell-navigation.js";
|
|
26
27
|
const ROUTED_PAGE_INSET = "pt-4 sm:pt-6";
|
|
27
28
|
function PaletteSlot({ palette }) {
|
|
@@ -109,7 +110,10 @@ function ConnectedAppShell({
|
|
|
109
110
|
)
|
|
110
111
|
}
|
|
111
112
|
);
|
|
112
|
-
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
|
+
] });
|
|
113
117
|
}
|
|
114
118
|
export {
|
|
115
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 { 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 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 </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,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AAmB,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;
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { useCallback, useEffect, useState } from "react";
|
|
4
|
+
import { Maximize, PanelTop } from "lucide-react";
|
|
5
|
+
import { Button, cn } from "@arbidocs/react/ui";
|
|
6
|
+
import { toggleFullscreen } from "../../presentation/usePresenterKeys.js";
|
|
7
|
+
const IDLE_MS = 2e3;
|
|
8
|
+
function CleanViewControl({ onExit }) {
|
|
9
|
+
const [view, setView] = useState(null);
|
|
10
|
+
const [shown, setShown] = useState(true);
|
|
11
|
+
const ref = useCallback((node) => {
|
|
12
|
+
setView(node?.ownerDocument.defaultView ?? null);
|
|
13
|
+
}, []);
|
|
14
|
+
useEffect(() => {
|
|
15
|
+
if (!view) return;
|
|
16
|
+
let timer = view.setTimeout(() => setShown(false), IDLE_MS);
|
|
17
|
+
const wake = () => {
|
|
18
|
+
setShown(true);
|
|
19
|
+
view.clearTimeout(timer);
|
|
20
|
+
timer = view.setTimeout(() => setShown(false), IDLE_MS);
|
|
21
|
+
};
|
|
22
|
+
view.addEventListener("pointermove", wake);
|
|
23
|
+
view.addEventListener("keydown", wake);
|
|
24
|
+
return () => {
|
|
25
|
+
view.clearTimeout(timer);
|
|
26
|
+
view.removeEventListener("pointermove", wake);
|
|
27
|
+
view.removeEventListener("keydown", wake);
|
|
28
|
+
};
|
|
29
|
+
}, [view]);
|
|
30
|
+
return /* @__PURE__ */ jsxs(
|
|
31
|
+
"div",
|
|
32
|
+
{
|
|
33
|
+
ref,
|
|
34
|
+
className: cn(
|
|
35
|
+
"absolute right-3 top-3 z-20 flex gap-1 rounded-md bg-background/90 p-1 shadow-md transition-opacity",
|
|
36
|
+
shown ? "opacity-100" : "pointer-events-none opacity-0"
|
|
37
|
+
),
|
|
38
|
+
"data-testid": "viewer-clean-control",
|
|
39
|
+
children: [
|
|
40
|
+
/* @__PURE__ */ jsxs(
|
|
41
|
+
Button,
|
|
42
|
+
{
|
|
43
|
+
type: "button",
|
|
44
|
+
size: "sm",
|
|
45
|
+
variant: "ghost",
|
|
46
|
+
className: "h-7",
|
|
47
|
+
onClick: () => view && toggleFullscreen(view),
|
|
48
|
+
children: [
|
|
49
|
+
/* @__PURE__ */ jsx(Maximize, { className: "size-3.5" }),
|
|
50
|
+
"Full screen"
|
|
51
|
+
]
|
|
52
|
+
}
|
|
53
|
+
),
|
|
54
|
+
/* @__PURE__ */ jsxs(
|
|
55
|
+
Button,
|
|
56
|
+
{
|
|
57
|
+
type: "button",
|
|
58
|
+
size: "sm",
|
|
59
|
+
variant: "ghost",
|
|
60
|
+
className: "h-7",
|
|
61
|
+
onClick: onExit,
|
|
62
|
+
"data-testid": "viewer-clean-exit",
|
|
63
|
+
children: [
|
|
64
|
+
/* @__PURE__ */ jsx(PanelTop, { className: "size-3.5" }),
|
|
65
|
+
"Show controls"
|
|
66
|
+
]
|
|
67
|
+
}
|
|
68
|
+
)
|
|
69
|
+
]
|
|
70
|
+
}
|
|
71
|
+
);
|
|
72
|
+
}
|
|
73
|
+
export {
|
|
74
|
+
CleanViewControl
|
|
75
|
+
};
|
|
76
|
+
//# sourceMappingURL=CleanViewControl.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/connection/viewer/CleanViewControl.tsx"],
|
|
4
|
+
"sourcesContent": ["import { useCallback, useEffect, useState } from 'react'\nimport { Maximize, PanelTop } from 'lucide-react'\nimport { Button, cn } from '@arbidocs/react/ui'\nimport { toggleFullscreen } from '../../presentation/usePresenterKeys'\n\nconst IDLE_MS = 2000\n\n/**\n * Over the viewer's clean view: Full screen, and Show controls (leave the clean view). It shows\n * while the pointer moves or a key is pressed and fades after a moment, so a share rarely\n * catches it.\n */\nexport function CleanViewControl({ onExit }: { onExit: () => void }) {\n const [view, setView] = useState<Window | null>(null)\n const [shown, setShown] = useState(true)\n const ref = useCallback((node: HTMLDivElement | null) => {\n setView(node?.ownerDocument.defaultView ?? null)\n }, [])\n\n useEffect(() => {\n if (!view) return\n let timer = view.setTimeout(() => setShown(false), IDLE_MS)\n const wake = () => {\n setShown(true)\n view.clearTimeout(timer)\n timer = view.setTimeout(() => setShown(false), IDLE_MS)\n }\n view.addEventListener('pointermove', wake)\n view.addEventListener('keydown', wake)\n return () => {\n view.clearTimeout(timer)\n view.removeEventListener('pointermove', wake)\n view.removeEventListener('keydown', wake)\n }\n }, [view])\n\n return (\n <div\n ref={ref}\n className={cn(\n 'absolute right-3 top-3 z-20 flex gap-1 rounded-md bg-background/90 p-1 shadow-md transition-opacity',\n shown ? 'opacity-100' : 'pointer-events-none opacity-0'\n )}\n data-testid=\"viewer-clean-control\"\n >\n <Button\n type=\"button\"\n size=\"sm\"\n variant=\"ghost\"\n className=\"h-7\"\n onClick={() => view && toggleFullscreen(view)}\n >\n <Maximize className=\"size-3.5\" />\n Full screen\n </Button>\n <Button\n type=\"button\"\n size=\"sm\"\n variant=\"ghost\"\n className=\"h-7\"\n onClick={onExit}\n data-testid=\"viewer-clean-exit\"\n >\n <PanelTop className=\"size-3.5\" />\n Show controls\n </Button>\n </div>\n )\n}\n"],
|
|
5
|
+
"mappings": ";AA6CM,SAOE,KAPF;AA7CN,SAAS,aAAa,WAAW,gBAAgB;AACjD,SAAS,UAAU,gBAAgB;AACnC,SAAS,QAAQ,UAAU;AAC3B,SAAS,wBAAwB;AAEjC,MAAM,UAAU;AAOT,SAAS,iBAAiB,EAAE,OAAO,GAA2B;AACnE,QAAM,CAAC,MAAM,OAAO,IAAI,SAAwB,IAAI;AACpD,QAAM,CAAC,OAAO,QAAQ,IAAI,SAAS,IAAI;AACvC,QAAM,MAAM,YAAY,CAAC,SAAgC;AACvD,YAAQ,MAAM,cAAc,eAAe,IAAI;AAAA,EACjD,GAAG,CAAC,CAAC;AAEL,YAAU,MAAM;AACd,QAAI,CAAC,KAAM;AACX,QAAI,QAAQ,KAAK,WAAW,MAAM,SAAS,KAAK,GAAG,OAAO;AAC1D,UAAM,OAAO,MAAM;AACjB,eAAS,IAAI;AACb,WAAK,aAAa,KAAK;AACvB,cAAQ,KAAK,WAAW,MAAM,SAAS,KAAK,GAAG,OAAO;AAAA,IACxD;AACA,SAAK,iBAAiB,eAAe,IAAI;AACzC,SAAK,iBAAiB,WAAW,IAAI;AACrC,WAAO,MAAM;AACX,WAAK,aAAa,KAAK;AACvB,WAAK,oBAAoB,eAAe,IAAI;AAC5C,WAAK,oBAAoB,WAAW,IAAI;AAAA,IAC1C;AAAA,EACF,GAAG,CAAC,IAAI,CAAC;AAET,SACE;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA,WAAW;AAAA,QACT;AAAA,QACA,QAAQ,gBAAgB;AAAA,MAC1B;AAAA,MACA,eAAY;AAAA,MAEZ;AAAA;AAAA,UAAC;AAAA;AAAA,YACC,MAAK;AAAA,YACL,MAAK;AAAA,YACL,SAAQ;AAAA,YACR,WAAU;AAAA,YACV,SAAS,MAAM,QAAQ,iBAAiB,IAAI;AAAA,YAE5C;AAAA,kCAAC,YAAS,WAAU,YAAW;AAAA,cAAE;AAAA;AAAA;AAAA,QAEnC;AAAA,QACA;AAAA,UAAC;AAAA;AAAA,YACC,MAAK;AAAA,YACL,MAAK;AAAA,YACL,SAAQ;AAAA,YACR,WAAU;AAAA,YACV,SAAS;AAAA,YACT,eAAY;AAAA,YAEZ;AAAA,kCAAC,YAAS,WAAU,YAAW;AAAA,cAAE;AAAA;AAAA;AAAA,QAEnC;AAAA;AAAA;AAAA,EACF;AAEJ;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -10,13 +10,7 @@ import {
|
|
|
10
10
|
PenLine,
|
|
11
11
|
Users
|
|
12
12
|
} from "lucide-react";
|
|
13
|
-
import {
|
|
14
|
-
DEFAULT_ASPECT_OPTIONS,
|
|
15
|
-
ImageCropModal,
|
|
16
|
-
useArbi,
|
|
17
|
-
useArbiSessionState,
|
|
18
|
-
useArbiSessionStore
|
|
19
|
-
} from "@arbidocs/react";
|
|
13
|
+
import { useArbi, useArbiSessionState, useArbiSessionStore } from "@arbidocs/react";
|
|
20
14
|
import { findVersion, parseVersionRef, versionLabel } from "@arbidocs/react/artifacts";
|
|
21
15
|
import {
|
|
22
16
|
SIGNED_LOCKED_REASON,
|
|
@@ -63,6 +57,8 @@ import {
|
|
|
63
57
|
SignatureStatus,
|
|
64
58
|
VersionSnapshotBar
|
|
65
59
|
} from "../../document-tools/index.js";
|
|
60
|
+
import { useViewerClipping } from "../presentation/useViewerClipping.js";
|
|
61
|
+
import { useCleanView } from "./useCleanView.js";
|
|
66
62
|
import {
|
|
67
63
|
DocumentLabelBar,
|
|
68
64
|
PdfPageNav,
|
|
@@ -89,6 +85,7 @@ import { ConnectedDocumentToolsProvider } from "./ConnectedDocumentToolsProvider
|
|
|
89
85
|
import { FinaliseTranslationButton } from "./FinaliseTranslationButton.js";
|
|
90
86
|
import { useDocumentViewerSupport } from "./support.js";
|
|
91
87
|
import { useImageCrop } from "./useImageCrop.js";
|
|
88
|
+
import { ViewerCropModal } from "./ViewerCropModal.js";
|
|
92
89
|
import { useViewedDocument } from "./useViewedDocument.js";
|
|
93
90
|
import { useViewerBlobs } from "./useViewerBlobs.js";
|
|
94
91
|
import { useViewerTabs } from "./useViewerTabs.js";
|
|
@@ -98,6 +95,7 @@ import { ParsedTextView } from "./parsed/ParsedTextView.js";
|
|
|
98
95
|
import { ViewerPdfPane } from "./ViewerPdfPane.js";
|
|
99
96
|
import { ConnectedNativeDocxEditor as NativeDocxEditor } from "../docx/ConnectedNativeDocxEditor.js";
|
|
100
97
|
import { canChangeVisibility } from "../../files/permissions.js";
|
|
98
|
+
import { SlidesTab } from "./slidesTabChunk.js";
|
|
101
99
|
const StreamedWordArtifact = lazy(
|
|
102
100
|
() => import("../docx/ConnectedStreamedWordArtifact.js").then((m) => ({
|
|
103
101
|
default: m.ConnectedStreamedWordArtifact
|
|
@@ -179,6 +177,7 @@ function DocumentViewerContent({
|
|
|
179
177
|
streamingDoc,
|
|
180
178
|
isStreaming,
|
|
181
179
|
draftDoc,
|
|
180
|
+
isPresentation,
|
|
182
181
|
isDraft,
|
|
183
182
|
isCaptureDraft,
|
|
184
183
|
labelSummaries,
|
|
@@ -298,7 +297,7 @@ function DocumentViewerContent({
|
|
|
298
297
|
signatureDocumentId,
|
|
299
298
|
!isDraft && !liveKind
|
|
300
299
|
);
|
|
301
|
-
const isCoEditing = !snapshotDocumentId && !compareDocumentId && !isDraft && (activeTab === "docx" && isDocx || activeTab === "edit" && isArtifact && !liveKind && !isStreaming);
|
|
300
|
+
const isCoEditing = !snapshotDocumentId && !compareDocumentId && !isDraft && (activeTab === "docx" && isDocx || activeTab === "slides" && isPresentation || activeTab === "edit" && isArtifact && !liveKind && !isStreaming);
|
|
302
301
|
const currentVersionLabel = isCoEditing ? void 0 : !snapshotDocumentId && !compareDocumentId && (isDocx || isArtifact && !liveKind) ? "Live" : versionLabel(versions, snapshotDocumentId || documentId);
|
|
303
302
|
const compareVersionLabel = versionLabel(versions, compareDocumentId);
|
|
304
303
|
const snapshotNumber = findVersion(versions, snapshotDocumentId)?.number;
|
|
@@ -422,6 +421,8 @@ function DocumentViewerContent({
|
|
|
422
421
|
isSnapshot: !!snapshotDocumentId,
|
|
423
422
|
isComparing
|
|
424
423
|
});
|
|
424
|
+
const clip = useViewerClipping(annotatable || !!pdfBlob && (isImage || isVideo), isCompact);
|
|
425
|
+
const clean = useCleanView();
|
|
425
426
|
const signatureBanner = !isDraft && !liveKind && !snapshotDocumentId && /* @__PURE__ */ jsx(
|
|
426
427
|
SignatureRequestBanner,
|
|
427
428
|
{
|
|
@@ -460,11 +461,13 @@ function DocumentViewerContent({
|
|
|
460
461
|
compact: isCompact,
|
|
461
462
|
onClick: () => {
|
|
462
463
|
setPlacingSignature(false);
|
|
464
|
+
clip.stop();
|
|
463
465
|
markup.setShowOriginal(false);
|
|
464
466
|
setAnnotating((on) => !on);
|
|
465
467
|
}
|
|
466
468
|
}
|
|
467
469
|
),
|
|
470
|
+
clip.button,
|
|
468
471
|
activeTab === "pdf" && pdfBlob && !placingSignature && (markup.hasMarkup || annotating) && /* @__PURE__ */ jsx(
|
|
469
472
|
ShowOriginalButton,
|
|
470
473
|
{
|
|
@@ -725,22 +728,8 @@ function DocumentViewerContent({
|
|
|
725
728
|
)
|
|
726
729
|
] }),
|
|
727
730
|
compareRow: isComparing ? compareIndicator || void 0 : void 0,
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
/* @__PURE__ */ jsx(
|
|
731
|
-
ImageCropModal,
|
|
732
|
-
{
|
|
733
|
-
open: crop.cropImageUrl !== null,
|
|
734
|
-
image: crop.cropImageUrl,
|
|
735
|
-
title: "Crop image",
|
|
736
|
-
saveLabel: "Save as a copy",
|
|
737
|
-
aspectOptions: DEFAULT_ASPECT_OPTIONS,
|
|
738
|
-
output: { mimeType: "image/png" },
|
|
739
|
-
onComplete: crop.handleCropComplete,
|
|
740
|
-
onCancel: crop.closeCrop
|
|
741
|
-
}
|
|
742
|
-
)
|
|
743
|
-
),
|
|
731
|
+
...clean.frame,
|
|
732
|
+
footer: /* @__PURE__ */ jsx(ViewerCropModal, { crop }),
|
|
744
733
|
children: [
|
|
745
734
|
isComparing && /* @__PURE__ */ jsx(Suspense, { fallback: /* @__PURE__ */ jsx(ViewerMessage, { children: "Loading comparison\u2026" }), children: /* @__PURE__ */ jsx(
|
|
746
735
|
NativeDocxComparison,
|
|
@@ -752,14 +741,14 @@ function DocumentViewerContent({
|
|
|
752
741
|
) }),
|
|
753
742
|
isCaptureDraft && /* @__PURE__ */ jsx(ViewerCaptureDraft, { documentId }),
|
|
754
743
|
!isCaptureDraft && (activeTab === "pdf" || isMedia && activeTab === "html") && (!isArtifact || isDocx && !isDraft && !isStreaming && !liveKind) && !isComparing && /* @__PURE__ */ jsxs(ViewerPane, { hidden: activeTab !== "pdf", children: [
|
|
755
|
-
/* @__PURE__ */ jsx(DocumentLabelBar, { summaries: labelSummaries }),
|
|
756
|
-
!isMedia && !isImage && signatureBanner,
|
|
757
|
-
activeTab === "pdf" && pdfBlob && !pdfVerified && /* @__PURE__ */ jsxs(ViewerMessage, { children: [
|
|
744
|
+
!clean.on && /* @__PURE__ */ jsx(DocumentLabelBar, { summaries: labelSummaries }),
|
|
745
|
+
!clean.on && !isMedia && !isImage && signatureBanner,
|
|
746
|
+
!clean.on && activeTab === "pdf" && pdfBlob && !pdfVerified && /* @__PURE__ */ jsxs(ViewerMessage, { children: [
|
|
758
747
|
"Offline copy: its version cannot be verified. Reconnect before signing.",
|
|
759
748
|
" ",
|
|
760
749
|
/* @__PURE__ */ jsx("button", { type: "button", onClick: () => void blobs.retryPdf(), className: "underline", children: "Retry loading the current PDF" })
|
|
761
750
|
] }),
|
|
762
|
-
activeTab === "pdf" && !isMedia && !isImage && /* @__PURE__ */ jsx(
|
|
751
|
+
!clean.on && activeTab === "pdf" && !isMedia && !isImage && /* @__PURE__ */ jsx(
|
|
763
752
|
MarkupNotices,
|
|
764
753
|
{
|
|
765
754
|
legacyPrompt: markup.legacyPrompt,
|
|
@@ -767,7 +756,7 @@ function DocumentViewerContent({
|
|
|
767
756
|
onOpenVersion: (n) => setSnapshotDocumentId(`${documentId}@v${n}`)
|
|
768
757
|
}
|
|
769
758
|
),
|
|
770
|
-
/* @__PURE__ */ jsx(ViewerControlBar, { controls: activeTab === "pdf" && pageNav, children: /* @__PURE__ */ jsx(
|
|
759
|
+
/* @__PURE__ */ jsx(ViewerControlBar, { controls: !clean.on && activeTab === "pdf" && pageNav, children: /* @__PURE__ */ jsx(
|
|
771
760
|
ViewerPdfPane,
|
|
772
761
|
{
|
|
773
762
|
documentId,
|
|
@@ -788,6 +777,7 @@ function DocumentViewerContent({
|
|
|
788
777
|
setIsSignOpen(true);
|
|
789
778
|
},
|
|
790
779
|
annotating,
|
|
780
|
+
clipping: clip.clipping,
|
|
791
781
|
markup,
|
|
792
782
|
pdfSnapshotNumber,
|
|
793
783
|
isSigned,
|
|
@@ -851,6 +841,15 @@ function DocumentViewerContent({
|
|
|
851
841
|
}
|
|
852
842
|
),
|
|
853
843
|
activeTab === "xlsx" && isXlsx && (xlsxBlob ? /* @__PURE__ */ jsx(XlsxViewer, { blob: xlsxBlob }) : /* @__PURE__ */ jsx(ViewerMessage, { children: xlsxError ? "Failed to load spreadsheet" : "Loading spreadsheet..." })),
|
|
844
|
+
activeTab === "slides" && isPresentation && /* @__PURE__ */ jsx(Suspense, { fallback: /* @__PURE__ */ jsx(ViewerMessage, { children: "Loading slides\u2026" }), children: /* @__PURE__ */ jsx(
|
|
845
|
+
SlidesTab,
|
|
846
|
+
{
|
|
847
|
+
documentId,
|
|
848
|
+
version: snapshotDocumentId ? snapshotNumber : void 0,
|
|
849
|
+
currentVersion: documentData?.current_version ?? void 0,
|
|
850
|
+
draftTitle: isDraft ? draftDoc?.title ?? "" : void 0
|
|
851
|
+
}
|
|
852
|
+
) }),
|
|
854
853
|
activeTab === "docx" && isDocx && !isComparing && /* @__PURE__ */ jsxs(Suspense, { fallback: /* @__PURE__ */ jsx(ViewerMessage, { children: "Loading editor\u2026" }), children: [
|
|
855
854
|
signatureBanner,
|
|
856
855
|
isSigned && !snapshotDocumentId && /* @__PURE__ */ jsx(SignedEditNote, {}),
|