@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,271 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
const SLIDE_LAYOUTS = [
|
|
3
|
+
"clips",
|
|
4
|
+
"points",
|
|
5
|
+
"compare",
|
|
6
|
+
"title",
|
|
7
|
+
"section",
|
|
8
|
+
"free"
|
|
9
|
+
];
|
|
10
|
+
const STAGE_ASPECT = 16 / 9;
|
|
11
|
+
const STAGE_MARGIN = 0.03;
|
|
12
|
+
const STAGE_GAP = 0.02;
|
|
13
|
+
const MIN_FRAME_WIDTH = 0.05;
|
|
14
|
+
const SNAP_DISTANCE = 0.012;
|
|
15
|
+
const CAPTION_SPACE = 0.06;
|
|
16
|
+
const SLIDE_CAPTION_SPACE = 0.1;
|
|
17
|
+
const NO_RESERVE = { top: 0, below: 0 };
|
|
18
|
+
function frameHeight(frame, aspect) {
|
|
19
|
+
return frame.w * STAGE_ASPECT / aspect;
|
|
20
|
+
}
|
|
21
|
+
function containWidth(aspect, width, height) {
|
|
22
|
+
return Math.max(0, Math.min(width, height * aspect / STAGE_ASPECT));
|
|
23
|
+
}
|
|
24
|
+
function autoLayout(aspects, reserve = NO_RESERVE) {
|
|
25
|
+
const n = aspects.length;
|
|
26
|
+
if (n === 0) return [];
|
|
27
|
+
const { top, below, right = 0, bottom = 0, columns, inset = 0 } = reserve;
|
|
28
|
+
const left = STAGE_MARGIN + inset;
|
|
29
|
+
const innerW = 1 - 2 * left - right;
|
|
30
|
+
const innerH = 1 - 2 * STAGE_MARGIN - top - bottom;
|
|
31
|
+
let best = null;
|
|
32
|
+
const fixed = columns ? Math.min(columns, n) : 0;
|
|
33
|
+
for (let cols = fixed || 1; cols <= (fixed || n); cols++) {
|
|
34
|
+
const rows = Math.ceil(n / cols);
|
|
35
|
+
const cellW = (innerW - (cols - 1) * STAGE_GAP) / cols;
|
|
36
|
+
const cellH = (innerH - (rows - 1) * STAGE_GAP) / rows;
|
|
37
|
+
if (cellW <= 0 || cellH <= below) continue;
|
|
38
|
+
const frames = [];
|
|
39
|
+
let area = 0;
|
|
40
|
+
for (let i = 0; i < n; i++) {
|
|
41
|
+
const row = Math.floor(i / cols);
|
|
42
|
+
const inRow = row === rows - 1 ? n - row * cols : cols;
|
|
43
|
+
const col = i - row * cols;
|
|
44
|
+
const rowStart = left + (cols - inRow) * (cellW + STAGE_GAP) / 2;
|
|
45
|
+
const w = containWidth(aspects[i], cellW, cellH - below);
|
|
46
|
+
const h = frameHeight({ w }, aspects[i]);
|
|
47
|
+
frames.push({
|
|
48
|
+
x: rowStart + col * (cellW + STAGE_GAP) + (cellW - w) / 2,
|
|
49
|
+
y: STAGE_MARGIN + top + row * (cellH + STAGE_GAP) + (cellH - h - below) / 2,
|
|
50
|
+
w
|
|
51
|
+
});
|
|
52
|
+
area += w * h;
|
|
53
|
+
}
|
|
54
|
+
if (!best || area > best.area + 1e-9) best = { frames, area };
|
|
55
|
+
}
|
|
56
|
+
return best?.frames ?? [];
|
|
57
|
+
}
|
|
58
|
+
function fitFrame(aspect, reserve = NO_RESERVE) {
|
|
59
|
+
return autoLayout([aspect], reserve)[0];
|
|
60
|
+
}
|
|
61
|
+
function fullWidthFrame(frame, aspect, reserve = NO_RESERVE) {
|
|
62
|
+
const { top, below, right = 0, bottom = 0, inset = 0 } = reserve;
|
|
63
|
+
const w = 1 - 2 * (STAGE_MARGIN + inset) - right;
|
|
64
|
+
const h = frameHeight({ w }, aspect);
|
|
65
|
+
if (h + below > 1 - 2 * STAGE_MARGIN - top - bottom) return fitFrame(aspect, reserve);
|
|
66
|
+
const centre = frame.y + frameHeight(frame, aspect) / 2;
|
|
67
|
+
return {
|
|
68
|
+
x: STAGE_MARGIN + inset,
|
|
69
|
+
y: clamp(centre - h / 2, STAGE_MARGIN + top, 1 - STAGE_MARGIN - h - below - bottom),
|
|
70
|
+
w
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
function fullHeightFrame(frame, aspect, reserve = NO_RESERVE) {
|
|
74
|
+
const { top, below, right = 0, bottom = 0 } = reserve;
|
|
75
|
+
const inner = 1 - 2 * STAGE_MARGIN;
|
|
76
|
+
const w = (inner - top - below - bottom) * aspect / STAGE_ASPECT;
|
|
77
|
+
if (w > inner - right) return fitFrame(aspect, reserve);
|
|
78
|
+
const centre = frame.x + frame.w / 2;
|
|
79
|
+
return {
|
|
80
|
+
x: clamp(centre - w / 2, STAGE_MARGIN, 1 - STAGE_MARGIN - right - w),
|
|
81
|
+
y: STAGE_MARGIN + top,
|
|
82
|
+
w
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
function clamp(value, min, max) {
|
|
86
|
+
return max < min ? (min + max) / 2 : Math.min(Math.max(value, min), max);
|
|
87
|
+
}
|
|
88
|
+
const SNAP_DISTANCE_Y = SNAP_DISTANCE * STAGE_ASPECT;
|
|
89
|
+
function snapTargets(axis, others) {
|
|
90
|
+
const targets = [0, STAGE_MARGIN, 0.5, 1 - STAGE_MARGIN, 1];
|
|
91
|
+
for (const { frame, aspect } of others) {
|
|
92
|
+
const start = axis === "x" ? frame.x : frame.y;
|
|
93
|
+
const size = axis === "x" ? frame.w : frameHeight(frame, aspect);
|
|
94
|
+
targets.push(start, start + size / 2, start + size);
|
|
95
|
+
}
|
|
96
|
+
return targets;
|
|
97
|
+
}
|
|
98
|
+
function snapSpan(start, size, targets, distance) {
|
|
99
|
+
let best = null;
|
|
100
|
+
let bestDistance = distance;
|
|
101
|
+
for (const target of targets) {
|
|
102
|
+
for (const offset of [0, size / 2, size]) {
|
|
103
|
+
const d = Math.abs(start + offset - target);
|
|
104
|
+
if (d < bestDistance) {
|
|
105
|
+
bestDistance = d;
|
|
106
|
+
best = { start: target - offset, at: target };
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
return best;
|
|
111
|
+
}
|
|
112
|
+
function moveFrame(frame, aspect, dx, dy, others = [], free = false) {
|
|
113
|
+
const h = frameHeight(frame, aspect);
|
|
114
|
+
let x = frame.x + dx;
|
|
115
|
+
let y = frame.y + dy;
|
|
116
|
+
const guides = [];
|
|
117
|
+
if (!free) {
|
|
118
|
+
const sx = snapSpan(x, frame.w, snapTargets("x", others), SNAP_DISTANCE);
|
|
119
|
+
const sy = snapSpan(y, h, snapTargets("y", others), SNAP_DISTANCE_Y);
|
|
120
|
+
if (sx) {
|
|
121
|
+
x = sx.start;
|
|
122
|
+
guides.push({ axis: "x", at: sx.at });
|
|
123
|
+
}
|
|
124
|
+
if (sy) {
|
|
125
|
+
y = sy.start;
|
|
126
|
+
guides.push({ axis: "y", at: sy.at });
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
return { frame: { x: clamp(x, 0, 1 - frame.w), y: clamp(y, 0, 1 - h), w: frame.w }, guides };
|
|
130
|
+
}
|
|
131
|
+
function resizeFrame(frame, aspect, corner, dx, dy, others = [], free = false) {
|
|
132
|
+
const h0 = frameHeight(frame, aspect);
|
|
133
|
+
const west = corner === "nw" || corner === "sw";
|
|
134
|
+
const north = corner === "nw" || corner === "ne";
|
|
135
|
+
const anchorX = west ? frame.x + frame.w : frame.x;
|
|
136
|
+
const anchorY = north ? frame.y + h0 : frame.y;
|
|
137
|
+
const pointerX = (west ? frame.x : frame.x + frame.w) + dx;
|
|
138
|
+
const pointerY = (north ? frame.y : frame.y + h0) + dy;
|
|
139
|
+
const widthOfHeight = (height) => height * aspect / STAGE_ASPECT;
|
|
140
|
+
let w = Math.max(Math.abs(pointerX - anchorX), widthOfHeight(Math.abs(pointerY - anchorY)));
|
|
141
|
+
const guides = [];
|
|
142
|
+
if (!free) {
|
|
143
|
+
const edgeX = west ? anchorX - w : anchorX + w;
|
|
144
|
+
const edgeY = north ? anchorY - frameHeight({ w }, aspect) : anchorY + frameHeight({ w }, aspect);
|
|
145
|
+
const sx = snapSpan(edgeX, 0, snapTargets("x", others), SNAP_DISTANCE);
|
|
146
|
+
const sy = snapSpan(edgeY, 0, snapTargets("y", others), SNAP_DISTANCE_Y);
|
|
147
|
+
const dxSnap = sx ? Math.abs(sx.at - edgeX) : Infinity;
|
|
148
|
+
const dySnap = sy ? Math.abs(sy.at - edgeY) / STAGE_ASPECT : Infinity;
|
|
149
|
+
if (sx && dxSnap <= dySnap) {
|
|
150
|
+
w = Math.abs(sx.at - anchorX);
|
|
151
|
+
guides.push({ axis: "x", at: sx.at });
|
|
152
|
+
} else if (sy) {
|
|
153
|
+
w = widthOfHeight(Math.abs(sy.at - anchorY));
|
|
154
|
+
guides.push({ axis: "y", at: sy.at });
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
const maxW = Math.min(west ? anchorX : 1 - anchorX, widthOfHeight(north ? anchorY : 1 - anchorY));
|
|
158
|
+
w = clamp(w, Math.min(MIN_FRAME_WIDTH, maxW), maxW);
|
|
159
|
+
const h = frameHeight({ w }, aspect);
|
|
160
|
+
return { frame: { x: west ? anchorX - w : anchorX, y: north ? anchorY - h : anchorY, w }, guides };
|
|
161
|
+
}
|
|
162
|
+
const MIN_CLIP_SPAN = 0.02;
|
|
163
|
+
function reshapeFrame(frame, clip, edge, dx, dy, others = [], free = false) {
|
|
164
|
+
const { rect, aspect } = clip;
|
|
165
|
+
const horizontal = edge === "e" || edge === "w";
|
|
166
|
+
const far = edge === "e" || edge === "s";
|
|
167
|
+
const start = horizontal ? frame.x : frame.y;
|
|
168
|
+
const size = horizontal ? frame.w : frameHeight(frame, aspect);
|
|
169
|
+
const sourceStart = horizontal ? rect.x : rect.y;
|
|
170
|
+
const sourceSize = horizontal ? rect.w : rect.h;
|
|
171
|
+
const scale = size / sourceSize;
|
|
172
|
+
const axis = horizontal ? "x" : "y";
|
|
173
|
+
let at = (far ? start + size : start) + (horizontal ? dx : dy);
|
|
174
|
+
if (!free) {
|
|
175
|
+
const distance = horizontal ? SNAP_DISTANCE : SNAP_DISTANCE_Y;
|
|
176
|
+
const snap = snapSpan(at, 0, snapTargets(axis, others), distance);
|
|
177
|
+
if (snap) at = snap.at;
|
|
178
|
+
}
|
|
179
|
+
const least = Math.min(
|
|
180
|
+
size,
|
|
181
|
+
Math.max(horizontal ? MIN_FRAME_WIDTH : MIN_FRAME_WIDTH * STAGE_ASPECT, MIN_CLIP_SPAN * scale)
|
|
182
|
+
);
|
|
183
|
+
const end = start + size;
|
|
184
|
+
const most = far ? Math.min(1 - start, (1 - sourceStart) * scale) : Math.min(end, (sourceStart + sourceSize) * scale);
|
|
185
|
+
const nextSize = clamp(far ? at - start : end - at, least, Math.max(most, size));
|
|
186
|
+
const nextSourceSize = nextSize / scale;
|
|
187
|
+
const nextStart = far ? start : end - nextSize;
|
|
188
|
+
const nextSourceStart = far ? sourceStart : sourceStart + sourceSize - nextSourceSize;
|
|
189
|
+
const nextRect = horizontal ? { ...rect, x: nextSourceStart, w: nextSourceSize } : { ...rect, y: nextSourceStart, h: nextSourceSize };
|
|
190
|
+
const sourceAspect = aspect * rect.h / rect.w;
|
|
191
|
+
const edgeAt = far ? nextStart + nextSize : nextStart;
|
|
192
|
+
return {
|
|
193
|
+
frame: horizontal ? { x: nextStart, y: frame.y, w: nextSize } : { x: frame.x, y: nextStart, w: frame.w },
|
|
194
|
+
rect: nextRect,
|
|
195
|
+
aspect: sourceAspect * nextRect.w / nextRect.h,
|
|
196
|
+
// A guide only where the edge did snap (not where a bound stopped it).
|
|
197
|
+
guides: !free && Math.abs(edgeAt - at) < 1e-9 && snapTargets(axis, others).includes(at) ? [{ axis, at }] : []
|
|
198
|
+
};
|
|
199
|
+
}
|
|
200
|
+
function alignFrame(frame, aspect, alignment, reserve = NO_RESERVE) {
|
|
201
|
+
const h = frameHeight(frame, aspect);
|
|
202
|
+
const right = reserve.right ?? 0;
|
|
203
|
+
const side = STAGE_MARGIN + (reserve.inset ?? 0);
|
|
204
|
+
const below = reserve.below + (reserve.bottom ?? 0);
|
|
205
|
+
switch (alignment) {
|
|
206
|
+
case "left":
|
|
207
|
+
return { ...frame, x: side };
|
|
208
|
+
case "centre":
|
|
209
|
+
return { ...frame, x: (1 - right - frame.w) / 2 };
|
|
210
|
+
case "right":
|
|
211
|
+
return { ...frame, x: 1 - side - right - frame.w };
|
|
212
|
+
case "top":
|
|
213
|
+
return { ...frame, y: STAGE_MARGIN + reserve.top };
|
|
214
|
+
case "middle":
|
|
215
|
+
return { ...frame, y: (1 + reserve.top - below - h) / 2 };
|
|
216
|
+
case "bottom":
|
|
217
|
+
return { ...frame, y: 1 - STAGE_MARGIN - below - h };
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
function dropFrame(aspect, at) {
|
|
221
|
+
const fit = fitFrame(aspect);
|
|
222
|
+
const w = Math.min(fit.w, 0.45);
|
|
223
|
+
const h = frameHeight({ w }, aspect);
|
|
224
|
+
return { x: clamp(at.x - w / 2, 0, 1 - w), y: clamp(at.y - h / 2, 0, 1 - h), w };
|
|
225
|
+
}
|
|
226
|
+
function defaultCaption(fileName, page) {
|
|
227
|
+
return `${documentName(fileName)} \xB7 p. ${page}`;
|
|
228
|
+
}
|
|
229
|
+
const documentName = (fileName) => fileName.replace(/\.[a-z0-9]{1,5}$/i, "") || "Document";
|
|
230
|
+
function formatTime(seconds) {
|
|
231
|
+
const total = Math.max(0, Math.floor(seconds));
|
|
232
|
+
const h = Math.floor(total / 3600);
|
|
233
|
+
const m = Math.floor(total % 3600 / 60);
|
|
234
|
+
const s = String(total % 60).padStart(2, "0");
|
|
235
|
+
return h ? `${h}:${String(m).padStart(2, "0")}:${s}` : `${m}:${s}`;
|
|
236
|
+
}
|
|
237
|
+
function clipLabel(clip, columnValues) {
|
|
238
|
+
const value = columnValues[clip.documentId]?.trim();
|
|
239
|
+
if (!value) return clip.caption;
|
|
240
|
+
return clip.caption ? `${value} \xB7 ${clip.caption}` : value;
|
|
241
|
+
}
|
|
242
|
+
function mediaCaption(fileName, start) {
|
|
243
|
+
const name = documentName(fileName);
|
|
244
|
+
return start === void 0 ? name : `${name} \xB7 ${formatTime(start)}`;
|
|
245
|
+
}
|
|
246
|
+
export {
|
|
247
|
+
CAPTION_SPACE,
|
|
248
|
+
MIN_FRAME_WIDTH,
|
|
249
|
+
NO_RESERVE,
|
|
250
|
+
SLIDE_CAPTION_SPACE,
|
|
251
|
+
SLIDE_LAYOUTS,
|
|
252
|
+
SNAP_DISTANCE,
|
|
253
|
+
STAGE_ASPECT,
|
|
254
|
+
STAGE_GAP,
|
|
255
|
+
STAGE_MARGIN,
|
|
256
|
+
alignFrame,
|
|
257
|
+
autoLayout,
|
|
258
|
+
clipLabel,
|
|
259
|
+
defaultCaption,
|
|
260
|
+
dropFrame,
|
|
261
|
+
fitFrame,
|
|
262
|
+
formatTime,
|
|
263
|
+
frameHeight,
|
|
264
|
+
fullHeightFrame,
|
|
265
|
+
fullWidthFrame,
|
|
266
|
+
mediaCaption,
|
|
267
|
+
moveFrame,
|
|
268
|
+
reshapeFrame,
|
|
269
|
+
resizeFrame
|
|
270
|
+
};
|
|
271
|
+
//# sourceMappingURL=model.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/presentation/model.ts"],
|
|
4
|
+
"sourcesContent": ["/**\n * A presentation: clips (a rectangle of a PDF page) arranged on 16:9 slides, shown on a stage that\n * can be shared or projected. A clip is a reference to its source (document, version, page,\n * rectangle), never a picture of it: it is drawn again from the PDF at whatever size it is shown,\n * and a later \"save as PDF\" can embed the same region as vector content.\n *\n * Layout is pure: a frame is the clip's place on the slide as fractions of the stage, and its\n * height always follows from the clip's own aspect, so a clip is never stretched.\n */\n\nimport type { SlideBackground, SlideBox } from './boxes'\n\n/** Fractions of a page or of the stage, origin top-left. */\nexport interface Rect {\n x: number\n y: number\n w: number\n h: number\n}\n\n/**\n * What a clip is cut from: a PDF page (drawn again from the PDF at the size shown), an image or a\n * video (the original file shown cropped, so at its own resolution; a video plays on the stage).\n */\nexport type ClipKind = 'pdf' | 'image' | 'video'\n\nexport interface Clip {\n id: string\n kind: ClipKind\n documentId: string\n /** The version clipped; absent = the current version when it was clipped. */\n version?: number\n fileName: string\n /** 1-based page number (1 for an image or a video). */\n page: number\n /** The clipped area, as fractions of the displayed page, image or video frame. */\n rect: Rect\n /** Width / height of the clipped area as displayed. */\n aspect: number\n caption: string\n /** Redactions over the clipped area (page fractions), painted black wherever it shows. */\n masks: Rect[]\n /** The file the clip is cut from (this session only; never stored). */\n source: Blob\n /**\n * The clip's width (a fraction of its source) when it was cut, so its zoom reads against that\n * (100%); absent = its width now.\n */\n zoomBase?: number\n /** A video clip starts playing here (seconds). */\n start?: number\n /**\n * An image embedded in the presentation itself (a key of its media), not a document: a picture\n * of a deck imported from PowerPoint. Its `documentId` is empty.\n */\n media?: string\n /**\n * Drawn as it is: no rounded corners, soft edge, shadow or source label (a picture that is part\n * of a slide's design, or a part of an imported slide shown as it was).\n */\n plain?: boolean\n}\n\n/** A clip's place on a slide: its left, top and width as fractions of the stage. */\nexport interface Frame {\n x: number\n y: number\n w: number\n}\n\nexport interface SlideItem {\n clipId: string\n frame: Frame\n}\n\nexport interface Slide {\n id: string\n items: SlideItem[]\n /** Arranged automatically (fit to the stage) until an item is moved by hand. */\n auto: boolean\n /** Shown across the top of the slide (e.g. \"Claims and defences\"); empty for none. */\n caption: string\n /** Where its title, text and clips go (`slide-layout`). */\n layout: SlideLayout\n /** Its text: one point per line (the subtitle on a title or section slide); empty for none. */\n points: string\n /** Its text boxes and shapes (`boxes`), in drawing order. */\n boxes: SlideBox[]\n /** Its own background, over the theme's (an imported slide's). */\n background?: SlideBackground\n /** What the presenter says (speaker notes: not shown on the slide). */\n notes?: string\n}\n\n/**\n * A slide's layout: a title slide, a section break, clips under a title, clips beside points, or\n * two clips side by side; or blank (`free`): only what is placed on it, its text in boxes (a slide\n * imported from PowerPoint).\n */\nexport type SlideLayout = 'title' | 'section' | 'clips' | 'points' | 'compare' | 'free'\n\nexport const SLIDE_LAYOUTS: readonly SlideLayout[] = [\n 'clips',\n 'points',\n 'compare',\n 'title',\n 'section',\n 'free',\n]\n\n/** The stage is 16:9, the shape of a shared screen or a projector. */\nexport const STAGE_ASPECT = 16 / 9\n/** Space kept clear around the edge of the stage, and between auto-arranged clips. */\nexport const STAGE_MARGIN = 0.03\nexport const STAGE_GAP = 0.02\n/** The smallest a clip can be resized to (fraction of the stage width). */\nexport const MIN_FRAME_WIDTH = 0.05\n/** How close (fraction of the stage) an edge or centre must come to snap. */\nexport const SNAP_DISTANCE = 0.012\n/**\n * Room kept under a clip for its source label (document \u00B7 page), as a fraction of the stage\n * height, while labels show: it sits below the clip, never over it, so it hides nothing.\n */\nexport const CAPTION_SPACE = 0.06\n/** Room kept across the top of a slide for its caption, when it has one (stage height). */\nexport const SLIDE_CAPTION_SPACE = 0.1\n\n/**\n * Room an arrangement keeps free: above the clips and under each clip (stage height), at the right\n * (stage width, e.g. a slide's points) and at the bottom (the footer); `columns` fixes the grid's\n * columns (two clips side by side).\n */\nexport interface Reserve {\n top: number\n below: number\n right?: number\n bottom?: number\n columns?: number\n /** More room on both sides, beyond the stage margin (clips line up with a slide's text). */\n inset?: number\n}\nexport const NO_RESERVE: Reserve = { top: 0, below: 0 }\n\n/** The frame's height as a fraction of the stage height. */\nexport function frameHeight(frame: Pick<Frame, 'w'>, aspect: number): number {\n return (frame.w * STAGE_ASPECT) / aspect\n}\n\n/** The widest a clip can be inside a `width \u00D7 height` box (stage fractions). */\nfunction containWidth(aspect: number, width: number, height: number): number {\n return Math.max(0, Math.min(width, (height * aspect) / STAGE_ASPECT))\n}\n\n/**\n * Clips arranged to fill the stage: every grid of columns \u00D7 rows is tried and the one where the\n * clips are largest wins (two wide clips stack, two tall ones go side by side). Each clip is\n * centred in its cell; a last, shorter row is centred too. `reserve` keeps a band free above the\n * clips (the slide's caption) and room under each clip (its source label).\n */\nexport function autoLayout(aspects: readonly number[], reserve: Reserve = NO_RESERVE): Frame[] {\n const n = aspects.length\n if (n === 0) return []\n const { top, below, right = 0, bottom = 0, columns, inset = 0 } = reserve\n const left = STAGE_MARGIN + inset\n const innerW = 1 - 2 * left - right\n const innerH = 1 - 2 * STAGE_MARGIN - top - bottom\n let best: { frames: Frame[]; area: number } | null = null\n const fixed = columns ? Math.min(columns, n) : 0\n for (let cols = fixed || 1; cols <= (fixed || n); cols++) {\n const rows = Math.ceil(n / cols)\n const cellW = (innerW - (cols - 1) * STAGE_GAP) / cols\n const cellH = (innerH - (rows - 1) * STAGE_GAP) / rows\n if (cellW <= 0 || cellH <= below) continue\n const frames: Frame[] = []\n let area = 0\n for (let i = 0; i < n; i++) {\n const row = Math.floor(i / cols)\n const inRow = row === rows - 1 ? n - row * cols : cols\n const col = i - row * cols\n const rowStart = left + ((cols - inRow) * (cellW + STAGE_GAP)) / 2\n const w = containWidth(aspects[i], cellW, cellH - below)\n const h = frameHeight({ w }, aspects[i])\n frames.push({\n x: rowStart + col * (cellW + STAGE_GAP) + (cellW - w) / 2,\n y: STAGE_MARGIN + top + row * (cellH + STAGE_GAP) + (cellH - h - below) / 2,\n w,\n })\n area += w * h\n }\n // Strictly larger wins, so ties keep fewer columns.\n if (!best || area > best.area + 1e-9) best = { frames, area }\n }\n return best?.frames ?? []\n}\n\n/** As large as the stage allows, centred (keeping `reserve` free). */\nexport function fitFrame(aspect: number, reserve: Reserve = NO_RESERVE): Frame {\n return autoLayout([aspect], reserve)[0]\n}\n\n/** The full width of the stage (inside the margin), centred on the frame's own height. */\nexport function fullWidthFrame(frame: Frame, aspect: number, reserve: Reserve = NO_RESERVE): Frame {\n const { top, below, right = 0, bottom = 0, inset = 0 } = reserve\n const w = 1 - 2 * (STAGE_MARGIN + inset) - right\n const h = frameHeight({ w }, aspect)\n // Too tall to be full width: as large as fits instead.\n if (h + below > 1 - 2 * STAGE_MARGIN - top - bottom) return fitFrame(aspect, reserve)\n const centre = frame.y + frameHeight(frame, aspect) / 2\n return {\n x: STAGE_MARGIN + inset,\n y: clamp(centre - h / 2, STAGE_MARGIN + top, 1 - STAGE_MARGIN - h - below - bottom),\n w,\n }\n}\n\n/** The full height of the stage (inside the margin), centred on the frame's own centre. */\nexport function fullHeightFrame(\n frame: Frame,\n aspect: number,\n reserve: Reserve = NO_RESERVE\n): Frame {\n const { top, below, right = 0, bottom = 0 } = reserve\n const inner = 1 - 2 * STAGE_MARGIN\n const w = ((inner - top - below - bottom) * aspect) / STAGE_ASPECT\n if (w > inner - right) return fitFrame(aspect, reserve)\n const centre = frame.x + frame.w / 2\n return {\n x: clamp(centre - w / 2, STAGE_MARGIN, 1 - STAGE_MARGIN - right - w),\n y: STAGE_MARGIN + top,\n w,\n }\n}\n\nfunction clamp(value: number, min: number, max: number): number {\n return max < min ? (min + max) / 2 : Math.min(Math.max(value, min), max)\n}\n\n/** A clip on the slide (the others a moving clip snaps to). */\nexport interface Placed {\n frame: Frame\n aspect: number\n}\n\n/** A line a clip snapped to, drawn while it is dragged: `at` is a stage fraction on `axis`. */\nexport interface Guide {\n axis: 'x' | 'y'\n at: number\n}\n\n/** The snap distance across the stage height: the same on screen as SNAP_DISTANCE across. */\nconst SNAP_DISTANCE_Y = SNAP_DISTANCE * STAGE_ASPECT\n\n/**\n * What a clip's edges and centre snap to on one axis: the stage's edges, margins and centre line,\n * and the edges and centres of the other clips on the slide.\n */\nfunction snapTargets(axis: Guide['axis'], others: readonly Placed[]): number[] {\n const targets = [0, STAGE_MARGIN, 0.5, 1 - STAGE_MARGIN, 1]\n for (const { frame, aspect } of others) {\n const start = axis === 'x' ? frame.x : frame.y\n const size = axis === 'x' ? frame.w : frameHeight(frame, aspect)\n targets.push(start, start + size / 2, start + size)\n }\n return targets\n}\n\n/** The nearest snap for a span `start \u2026 start + size` on an axis (its edges or centre), if any. */\nfunction snapSpan(\n start: number,\n size: number,\n targets: readonly number[],\n distance: number\n): { start: number; at: number } | null {\n let best: { start: number; at: number } | null = null\n let bestDistance = distance\n for (const target of targets) {\n for (const offset of [0, size / 2, size]) {\n const d = Math.abs(start + offset - target)\n if (d < bestDistance) {\n bestDistance = d\n best = { start: target - offset, at: target }\n }\n }\n }\n return best\n}\n\n/**\n * The frame moved by `dx, dy` (stage fractions) and kept on the stage. Unless `free`, its edges\n * and centre snap to the stage's lines and to the other clips', and the lines snapped to are\n * returned as guides.\n */\nexport function moveFrame(\n frame: Frame,\n aspect: number,\n dx: number,\n dy: number,\n others: readonly Placed[] = [],\n free = false\n): { frame: Frame; guides: Guide[] } {\n const h = frameHeight(frame, aspect)\n let x = frame.x + dx\n let y = frame.y + dy\n const guides: Guide[] = []\n if (!free) {\n const sx = snapSpan(x, frame.w, snapTargets('x', others), SNAP_DISTANCE)\n const sy = snapSpan(y, h, snapTargets('y', others), SNAP_DISTANCE_Y)\n if (sx) {\n x = sx.start\n guides.push({ axis: 'x', at: sx.at })\n }\n if (sy) {\n y = sy.start\n guides.push({ axis: 'y', at: sy.at })\n }\n }\n return { frame: { x: clamp(x, 0, 1 - frame.w), y: clamp(y, 0, 1 - h), w: frame.w }, guides }\n}\n\n/** A corner a clip is resized from. */\nexport type Corner = 'nw' | 'ne' | 'sw' | 'se'\n\n/**\n * The frame resized by dragging `corner` by `dx, dy`: the opposite corner stays put, the aspect is\n * kept and the clip stays on the stage. Unless `free`, the moving edges snap like a move does.\n */\nexport function resizeFrame(\n frame: Frame,\n aspect: number,\n corner: Corner,\n dx: number,\n dy: number,\n others: readonly Placed[] = [],\n free = false\n): { frame: Frame; guides: Guide[] } {\n const h0 = frameHeight(frame, aspect)\n const west = corner === 'nw' || corner === 'sw'\n const north = corner === 'nw' || corner === 'ne'\n // The corner that stays put, and where the dragged one is now.\n const anchorX = west ? frame.x + frame.w : frame.x\n const anchorY = north ? frame.y + h0 : frame.y\n const pointerX = (west ? frame.x : frame.x + frame.w) + dx\n const pointerY = (north ? frame.y : frame.y + h0) + dy\n const widthOfHeight = (height: number) => (height * aspect) / STAGE_ASPECT\n // Follow whichever of the two directions the pointer has gone further in.\n let w = Math.max(Math.abs(pointerX - anchorX), widthOfHeight(Math.abs(pointerY - anchorY)))\n const guides: Guide[] = []\n if (!free) {\n const edgeX = west ? anchorX - w : anchorX + w\n const edgeY = north\n ? anchorY - frameHeight({ w }, aspect)\n : anchorY + frameHeight({ w }, aspect)\n const sx = snapSpan(edgeX, 0, snapTargets('x', others), SNAP_DISTANCE)\n const sy = snapSpan(edgeY, 0, snapTargets('y', others), SNAP_DISTANCE_Y)\n // The nearer snap wins (distances compared on screen); the other edge follows the aspect.\n const dxSnap = sx ? Math.abs(sx.at - edgeX) : Infinity\n const dySnap = sy ? Math.abs(sy.at - edgeY) / STAGE_ASPECT : Infinity\n if (sx && dxSnap <= dySnap) {\n w = Math.abs(sx.at - anchorX)\n guides.push({ axis: 'x', at: sx.at })\n } else if (sy) {\n w = widthOfHeight(Math.abs(sy.at - anchorY))\n guides.push({ axis: 'y', at: sy.at })\n }\n }\n // As large as the stage allows on the dragged side.\n const maxW = Math.min(west ? anchorX : 1 - anchorX, widthOfHeight(north ? anchorY : 1 - anchorY))\n w = clamp(w, Math.min(MIN_FRAME_WIDTH, maxW), maxW)\n const h = frameHeight({ w }, aspect)\n return { frame: { x: west ? anchorX - w : anchorX, y: north ? anchorY - h : anchorY, w }, guides }\n}\n\n/** An edge a clip is reshaped from. */\nexport type Edge = 'n' | 'e' | 's' | 'w'\n\n/** The least of its source a clip shows, each way (a fraction of the page, image or frame). */\nconst MIN_CLIP_SPAN = 0.02\n\n/**\n * The clip reshaped by dragging `edge` by `dx, dy`, at the same scale: the edge moves on the slide\n * and over the source together, so the clip shows more (or less) of the page beside it, never past\n * the source's edge or the stage's. Unless `free`, the edge snaps like a move does.\n */\nexport function reshapeFrame(\n frame: Frame,\n clip: Pick<Clip, 'rect' | 'aspect'>,\n edge: Edge,\n dx: number,\n dy: number,\n others: readonly Placed[] = [],\n free = false\n): { frame: Frame; rect: Rect; aspect: number; guides: Guide[] } {\n const { rect, aspect } = clip\n const horizontal = edge === 'e' || edge === 'w'\n const far = edge === 'e' || edge === 's'\n const start = horizontal ? frame.x : frame.y\n const size = horizontal ? frame.w : frameHeight(frame, aspect)\n const sourceStart = horizontal ? rect.x : rect.y\n const sourceSize = horizontal ? rect.w : rect.h\n // Stage per source along this axis: kept, so nothing on the clip changes size.\n const scale = size / sourceSize\n\n const axis: Guide['axis'] = horizontal ? 'x' : 'y'\n let at = (far ? start + size : start) + (horizontal ? dx : dy)\n if (!free) {\n const distance = horizontal ? SNAP_DISTANCE : SNAP_DISTANCE_Y\n const snap = snapSpan(at, 0, snapTargets(axis, others), distance)\n if (snap) at = snap.at\n }\n // As far as the stage and the source go; no smaller than a sliver of either.\n const least = Math.min(\n size,\n Math.max(horizontal ? MIN_FRAME_WIDTH : MIN_FRAME_WIDTH * STAGE_ASPECT, MIN_CLIP_SPAN * scale)\n )\n const end = start + size\n const most = far\n ? Math.min(1 - start, (1 - sourceStart) * scale)\n : Math.min(end, (sourceStart + sourceSize) * scale)\n const nextSize = clamp(far ? at - start : end - at, least, Math.max(most, size))\n const nextSourceSize = nextSize / scale\n const nextStart = far ? start : end - nextSize\n const nextSourceStart = far ? sourceStart : sourceStart + sourceSize - nextSourceSize\n\n const nextRect = horizontal\n ? { ...rect, x: nextSourceStart, w: nextSourceSize }\n : { ...rect, y: nextSourceStart, h: nextSourceSize }\n // The source's own shape (width / height as displayed), from the clip's.\n const sourceAspect = (aspect * rect.h) / rect.w\n const edgeAt = far ? nextStart + nextSize : nextStart\n return {\n frame: horizontal\n ? { x: nextStart, y: frame.y, w: nextSize }\n : { x: frame.x, y: nextStart, w: frame.w },\n rect: nextRect,\n aspect: (sourceAspect * nextRect.w) / nextRect.h,\n // A guide only where the edge did snap (not where a bound stopped it).\n guides:\n !free && Math.abs(edgeAt - at) < 1e-9 && snapTargets(axis, others).includes(at)\n ? [{ axis, at }]\n : [],\n }\n}\n\n/** Where a clip can be aligned on the stage. */\nexport type Alignment = 'left' | 'centre' | 'right' | 'top' | 'middle' | 'bottom'\n\n/** The frame aligned on the stage, inside its margins and the slide's reserved room. */\nexport function alignFrame(\n frame: Frame,\n aspect: number,\n alignment: Alignment,\n reserve: Reserve = NO_RESERVE\n): Frame {\n const h = frameHeight(frame, aspect)\n const right = reserve.right ?? 0\n const side = STAGE_MARGIN + (reserve.inset ?? 0)\n const below = reserve.below + (reserve.bottom ?? 0)\n switch (alignment) {\n case 'left':\n return { ...frame, x: side }\n case 'centre':\n return { ...frame, x: (1 - right - frame.w) / 2 }\n case 'right':\n return { ...frame, x: 1 - side - right - frame.w }\n case 'top':\n return { ...frame, y: STAGE_MARGIN + reserve.top }\n case 'middle':\n return { ...frame, y: (1 + reserve.top - below - h) / 2 }\n case 'bottom':\n return { ...frame, y: 1 - STAGE_MARGIN - below - h }\n }\n}\n\n/** A clip dropped at a point (stage fractions): centred there, at most 45% of the stage wide. */\nexport function dropFrame(aspect: number, at: { x: number; y: number }): Frame {\n const fit = fitFrame(aspect)\n const w = Math.min(fit.w, 0.45)\n const h = frameHeight({ w }, aspect)\n return { x: clamp(at.x - w / 2, 0, 1 - w), y: clamp(at.y - h / 2, 0, 1 - h), w }\n}\n\n/** \"Exhibit 12.pdf\", page 4 \u2192 \"Exhibit 12 \u00B7 p. 4\". */\nexport function defaultCaption(fileName: string, page: number): string {\n return `${documentName(fileName)} \u00B7 p. ${page}`\n}\n\nconst documentName = (fileName: string) => fileName.replace(/\\.[a-z0-9]{1,5}$/i, '') || 'Document'\n\n/** \"1:05\" (or \"1:02:05\"): a point in a video. */\nexport function formatTime(seconds: number): string {\n const total = Math.max(0, Math.floor(seconds))\n const h = Math.floor(total / 3600)\n const m = Math.floor((total % 3600) / 60)\n const s = String(total % 60).padStart(2, '0')\n return h ? `${h}:${String(m).padStart(2, '0')}:${s}` : `${m}:${s}`\n}\n\n/**\n * A clip's label as shown: its document's value in the presentation's label column (an exhibit\n * number, \"R-100\"), then its own label. `columnValues` maps a document id to that value.\n */\nexport function clipLabel(\n clip: Pick<Clip, 'caption' | 'documentId'>,\n columnValues: Readonly<Record<string, string>>\n): string {\n const value = columnValues[clip.documentId]?.trim()\n if (!value) return clip.caption\n return clip.caption ? `${value} \u00B7 ${clip.caption}` : value\n}\n\n/** The source label of a clip of an image (\"Photo 3\") or a video, from where it starts (\"Interview \u00B7 1:05\"). */\nexport function mediaCaption(fileName: string, start?: number): string {\n const name = documentName(fileName)\n return start === undefined ? name : `${name} \u00B7 ${formatTime(start)}`\n}\n"],
|
|
5
|
+
"mappings": ";AAqGO,MAAM,gBAAwC;AAAA,EACnD;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAGO,MAAM,eAAe,KAAK;AAE1B,MAAM,eAAe;AACrB,MAAM,YAAY;AAElB,MAAM,kBAAkB;AAExB,MAAM,gBAAgB;AAKtB,MAAM,gBAAgB;AAEtB,MAAM,sBAAsB;AAgB5B,MAAM,aAAsB,EAAE,KAAK,GAAG,OAAO,EAAE;AAG/C,SAAS,YAAY,OAAyB,QAAwB;AAC3E,SAAQ,MAAM,IAAI,eAAgB;AACpC;AAGA,SAAS,aAAa,QAAgB,OAAe,QAAwB;AAC3E,SAAO,KAAK,IAAI,GAAG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ACxC,QAAM,IAAI,OAAO,QAAQ,EAAE,EAAE,SAAS,GAAG,GAAG;AAC5C,SAAO,IAAI,GAAG,CAAC,IAAI,OAAO,CAAC,EAAE,SAAS,GAAG,GAAG,CAAC,IAAI,CAAC,KAAK,GAAG,CAAC,IAAI,CAAC;AAClE;AAMO,SAAS,UACd,MACA,cACQ;AACR,QAAM,QAAQ,aAAa,KAAK,UAAU,GAAG,KAAK;AAClD,MAAI,CAAC,MAAO,QAAO,KAAK;AACxB,SAAO,KAAK,UAAU,GAAG,KAAK,SAAM,KAAK,OAAO,KAAK;AACvD;AAGO,SAAS,aAAa,UAAkB,OAAwB;AACrE,QAAM,OAAO,aAAa,QAAQ;AAClC,SAAO,UAAU,SAAY,OAAO,GAAG,IAAI,SAAM,WAAW,KAAK,CAAC;AACpE;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The presentation window's entry points, for any surface. Light: no PDF engine, no presentation
|
|
3
|
+
* module (that loads with the window or the viewer's slides tab).
|
|
4
|
+
*
|
|
5
|
+
* A presentation is edited in the viewer's slides tab, or in a window of its own (`openPresentation`)
|
|
6
|
+
* beside the documents its clips come from; Present always shows in that window, alone, to share.
|
|
7
|
+
*/
|
|
8
|
+
/** The session's panel for the presentation's own window (`ConnectedPresentation`). */
|
|
9
|
+
export declare const PRESENTATION_PANEL = "presentation-panel";
|
|
10
|
+
/**
|
|
11
|
+
* The names presentations were saved under before they were known by their folder (a saved
|
|
12
|
+
* presentation is now `<title>.pdf` in Files › Presentations): `.presentation.pdf`, and
|
|
13
|
+
* `.presentation.json` (the editable data alone, from before presentations were PDFs).
|
|
14
|
+
*/
|
|
15
|
+
export declare const PRESENTATION_FILE_SUFFIX = ".presentation.pdf";
|
|
16
|
+
export declare const LEGACY_PRESENTATION_SUFFIX = ".presentation.json";
|
|
17
|
+
/** A presentation saved before it was a PDF: its data alone, no slides to view. */
|
|
18
|
+
export declare const isLegacyPresentationFile: (fileName: string | null | undefined) => boolean;
|
|
19
|
+
type Session = {
|
|
20
|
+
openPanel(panelId: string, mode: 'popout' | 'docked' | 'overlay' | 'main'): void;
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
* Open the presentation's own window (a pop-out: call it from a click), to edit the presentation
|
|
24
|
+
* there, or (`present`) only to present it: that window closes when presenting ends. Recorded, so
|
|
25
|
+
* a window the saved layout restores after a reload, with nothing in it (a presentation lives in
|
|
26
|
+
* memory), is closed rather than reopened.
|
|
27
|
+
*/
|
|
28
|
+
export declare function openPresentation(session: Session, { present }?: {
|
|
29
|
+
present?: boolean | undefined;
|
|
30
|
+
}): void;
|
|
31
|
+
export declare const presentationOpenedInThisPage: () => boolean;
|
|
32
|
+
/** The window was opened only to present (it closes when presenting ends). */
|
|
33
|
+
export declare const presentationWindowOnlyPresents: () => boolean;
|
|
34
|
+
export {};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
const PRESENTATION_PANEL = "presentation-panel";
|
|
3
|
+
const PRESENTATION_FILE_SUFFIX = ".presentation.pdf";
|
|
4
|
+
const LEGACY_PRESENTATION_SUFFIX = ".presentation.json";
|
|
5
|
+
const isLegacyPresentationFile = (fileName) => !!fileName && fileName.endsWith(LEGACY_PRESENTATION_SUFFIX);
|
|
6
|
+
let openedInThisPage = false;
|
|
7
|
+
let presentOnly = false;
|
|
8
|
+
function openPresentation(session, { present = false } = {}) {
|
|
9
|
+
openedInThisPage = true;
|
|
10
|
+
presentOnly = present;
|
|
11
|
+
session.openPanel(PRESENTATION_PANEL, "popout");
|
|
12
|
+
}
|
|
13
|
+
const presentationOpenedInThisPage = () => openedInThisPage;
|
|
14
|
+
const presentationWindowOnlyPresents = () => presentOnly;
|
|
15
|
+
export {
|
|
16
|
+
LEGACY_PRESENTATION_SUFFIX,
|
|
17
|
+
PRESENTATION_FILE_SUFFIX,
|
|
18
|
+
PRESENTATION_PANEL,
|
|
19
|
+
isLegacyPresentationFile,
|
|
20
|
+
openPresentation,
|
|
21
|
+
presentationOpenedInThisPage,
|
|
22
|
+
presentationWindowOnlyPresents
|
|
23
|
+
};
|
|
24
|
+
//# sourceMappingURL=panel-id.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/presentation/panel-id.ts"],
|
|
4
|
+
"sourcesContent": ["/**\n * The presentation window's entry points, for any surface. Light: no PDF engine, no presentation\n * module (that loads with the window or the viewer's slides tab).\n *\n * A presentation is edited in the viewer's slides tab, or in a window of its own (`openPresentation`)\n * beside the documents its clips come from; Present always shows in that window, alone, to share.\n */\n\n/** The session's panel for the presentation's own window (`ConnectedPresentation`). */\nexport const PRESENTATION_PANEL = 'presentation-panel'\n\n/**\n * The names presentations were saved under before they were known by their folder (a saved\n * presentation is now `<title>.pdf` in Files \u203A Presentations): `.presentation.pdf`, and\n * `.presentation.json` (the editable data alone, from before presentations were PDFs).\n */\nexport const PRESENTATION_FILE_SUFFIX = '.presentation.pdf'\nexport const LEGACY_PRESENTATION_SUFFIX = '.presentation.json'\n\n/** A presentation saved before it was a PDF: its data alone, no slides to view. */\nexport const isLegacyPresentationFile = (fileName: string | null | undefined): boolean =>\n !!fileName && fileName.endsWith(LEGACY_PRESENTATION_SUFFIX)\n\ntype Session = { openPanel(panelId: string, mode: 'popout' | 'docked' | 'overlay' | 'main'): void }\n\nlet openedInThisPage = false\nlet presentOnly = false\n\n/**\n * Open the presentation's own window (a pop-out: call it from a click), to edit the presentation\n * there, or (`present`) only to present it: that window closes when presenting ends. Recorded, so\n * a window the saved layout restores after a reload, with nothing in it (a presentation lives in\n * memory), is closed rather than reopened.\n */\nexport function openPresentation(session: Session, { present = false } = {}): void {\n openedInThisPage = true\n presentOnly = present\n session.openPanel(PRESENTATION_PANEL, 'popout')\n}\n\nexport const presentationOpenedInThisPage = (): boolean => openedInThisPage\n\n/** The window was opened only to present (it closes when presenting ends). */\nexport const presentationWindowOnlyPresents = (): boolean => presentOnly\n"],
|
|
5
|
+
"mappings": ";AASO,MAAM,qBAAqB;AAO3B,MAAM,2BAA2B;AACjC,MAAM,6BAA6B;AAGnC,MAAM,2BAA2B,CAAC,aACvC,CAAC,CAAC,YAAY,SAAS,SAAS,0BAA0B;AAI5D,IAAI,mBAAmB;AACvB,IAAI,cAAc;AAQX,SAAS,iBAAiB,SAAkB,EAAE,UAAU,MAAM,IAAI,CAAC,GAAS;AACjF,qBAAmB;AACnB,gBAAc;AACd,UAAQ,UAAU,oBAAoB,QAAQ;AAChD;AAEO,MAAM,+BAA+B,MAAe;AAGpD,MAAM,iCAAiC,MAAe;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A presentation saved as a document of the workspace's `Presentations` folder,
|
|
3
|
+
* `<title>.presentation.pdf`: a PDF of its slides (each an image as presented, redactions burnt in,
|
|
4
|
+
* its words searchable), with its editable data attached to the PDF as `arbi-presentation.json`
|
|
5
|
+
* (the format below; see docs/presentation-format.md). One file: viewing, searching, downloading,
|
|
6
|
+
* copying and versions are a PDF's, and the editable data can never part from its slides.
|
|
7
|
+
*
|
|
8
|
+
* The data holds references, never pixels: for each clip its source document (and version), page,
|
|
9
|
+
* area and label; for each slide its title and where its clips sit. Opening it fetches the sources
|
|
10
|
+
* again (so clips stay sharp and editable) and reads their redactions again (so a newer redaction
|
|
11
|
+
* applies too).
|
|
12
|
+
*
|
|
13
|
+
* Agents and the API: read and write the attachment with any PDF library. Changing the data cannot
|
|
14
|
+
* redraw the slides (that needs the sources and their redactions, decrypted in the app), so set
|
|
15
|
+
* `slidesStale: true`: the editor says so on opening, and its next save draws them again.
|
|
16
|
+
*/
|
|
17
|
+
import { type Clip, type ClipKind, type Frame, type Rect, type SlideLayout } from './model';
|
|
18
|
+
import { type Theme } from './theme';
|
|
19
|
+
import { type SavedBox } from './saved-boxes';
|
|
20
|
+
import type { SlideBackground, SlideBox } from './boxes';
|
|
21
|
+
export declare const PRESENTATIONS_FOLDER = "Presentations";
|
|
22
|
+
/**
|
|
23
|
+
* Templates: presentations kept here are offered by New from template (their look and slides,
|
|
24
|
+
* without clips). A firm keeps its house look by keeping one here.
|
|
25
|
+
*/
|
|
26
|
+
export declare const TEMPLATES_FOLDER = "Presentations/Templates";
|
|
27
|
+
/** Exported PDFs and PowerPoint decks: kept apart, so they are not taken for presentations. */
|
|
28
|
+
export declare const EXPORTS_FOLDER = "Presentations/Exports";
|
|
29
|
+
/** The name of the editable data attached to a presentation's PDF. */
|
|
30
|
+
export declare const PRESENTATION_ATTACHMENT = "arbi-presentation.json";
|
|
31
|
+
declare const FORMAT = "arbi-presentation";
|
|
32
|
+
export interface SavedClip {
|
|
33
|
+
kind: ClipKind;
|
|
34
|
+
documentId: string;
|
|
35
|
+
version?: number;
|
|
36
|
+
fileName: string;
|
|
37
|
+
page: number;
|
|
38
|
+
rect: Rect;
|
|
39
|
+
aspect: number;
|
|
40
|
+
caption: string;
|
|
41
|
+
start?: number;
|
|
42
|
+
zoomBase?: number;
|
|
43
|
+
/** An image embedded in the presentation (a key of `media`); `documentId` is empty. */
|
|
44
|
+
media?: string;
|
|
45
|
+
/** Drawn as it is (no frame finish, no label). */
|
|
46
|
+
plain?: boolean;
|
|
47
|
+
}
|
|
48
|
+
export interface SavedSlide {
|
|
49
|
+
caption: string;
|
|
50
|
+
auto: boolean;
|
|
51
|
+
/** Absent in files saved before layouts: 'clips'. */
|
|
52
|
+
layout?: SlideLayout;
|
|
53
|
+
/** One point per line (a subtitle on a title or section slide). */
|
|
54
|
+
points?: string;
|
|
55
|
+
/** `clip` is an index into `clips`. */
|
|
56
|
+
items: {
|
|
57
|
+
clip: number;
|
|
58
|
+
frame: Frame;
|
|
59
|
+
}[];
|
|
60
|
+
/** Its text boxes and shapes (`boxes`). */
|
|
61
|
+
boxes?: SavedBox[];
|
|
62
|
+
background?: SlideBackground;
|
|
63
|
+
/** Speaker notes. */
|
|
64
|
+
notes?: string;
|
|
65
|
+
/**
|
|
66
|
+
* What its PowerPoint slide looked like when saved (`slideFingerprint`): a slide whose
|
|
67
|
+
* fingerprint no longer matches was changed in PowerPoint, and is imported again.
|
|
68
|
+
*/
|
|
69
|
+
fingerprint?: string;
|
|
70
|
+
}
|
|
71
|
+
export interface SavedPresentation {
|
|
72
|
+
format: typeof FORMAT;
|
|
73
|
+
version: 1;
|
|
74
|
+
title: string;
|
|
75
|
+
captions: boolean;
|
|
76
|
+
/** The annotation column (tag id) whose value leads each clip's label, e.g. its exhibit number. */
|
|
77
|
+
labelColumn?: string;
|
|
78
|
+
/** Absent in files saved before themes: the default theme. */
|
|
79
|
+
theme?: Theme;
|
|
80
|
+
clips: SavedClip[];
|
|
81
|
+
slides: SavedSlide[];
|
|
82
|
+
/** Images embedded in the presentation (an imported deck's pictures), as data URLs. */
|
|
83
|
+
media?: Record<string, string>;
|
|
84
|
+
/** The data was changed outside the editor (an agent): the PDF's slides do not show it yet. */
|
|
85
|
+
slidesStale?: boolean;
|
|
86
|
+
}
|
|
87
|
+
export interface PresentationSnapshot {
|
|
88
|
+
title: string;
|
|
89
|
+
captions: boolean;
|
|
90
|
+
labelColumn?: string | null;
|
|
91
|
+
theme?: Theme;
|
|
92
|
+
clips: readonly Clip[];
|
|
93
|
+
slides: readonly {
|
|
94
|
+
caption: string;
|
|
95
|
+
auto: boolean;
|
|
96
|
+
layout?: SlideLayout;
|
|
97
|
+
points?: string;
|
|
98
|
+
items: {
|
|
99
|
+
clipId: string;
|
|
100
|
+
frame: Frame;
|
|
101
|
+
}[];
|
|
102
|
+
boxes?: readonly SlideBox[];
|
|
103
|
+
background?: SlideBackground;
|
|
104
|
+
notes?: string;
|
|
105
|
+
}[];
|
|
106
|
+
/** Embedded images by key (data URLs). */
|
|
107
|
+
media?: Readonly<Record<string, string>>;
|
|
108
|
+
/** Each slide's PowerPoint fingerprint, as just written (`slideFingerprint`). */
|
|
109
|
+
fingerprints?: readonly string[];
|
|
110
|
+
}
|
|
111
|
+
/** The presentation as saved: references only. */
|
|
112
|
+
export declare function serializePresentation(snapshot: PresentationSnapshot): SavedPresentation;
|
|
113
|
+
/** A saved presentation read from a file, checked; throws on anything else. */
|
|
114
|
+
export declare function parsePresentation(text: string): SavedPresentation;
|
|
115
|
+
/** A title as a file name stem (characters a file name can hold). */
|
|
116
|
+
export declare function safeFileStem(title: string): string;
|
|
117
|
+
/** "Opening statement" → "Opening statement.pptx": a presentation is a PowerPoint file. */
|
|
118
|
+
export declare function presentationFileName(title: string): string;
|
|
119
|
+
/** The title of a saved presentation, from its file name (older names too). */
|
|
120
|
+
export declare function presentationTitle(fileName: string): string;
|
|
121
|
+
export {};
|