@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,1358 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
var chunkVJ5ZLRBD_cjs = require('./chunk-VJ5ZLRBD.cjs');
|
|
5
|
+
var zustand = require('zustand');
|
|
6
|
+
var viewers = require('@arbidocs/react/viewers');
|
|
7
|
+
|
|
8
|
+
// src/presentation/model.ts
|
|
9
|
+
var SLIDE_LAYOUTS = [
|
|
10
|
+
"clips",
|
|
11
|
+
"points",
|
|
12
|
+
"compare",
|
|
13
|
+
"title",
|
|
14
|
+
"section",
|
|
15
|
+
"free"
|
|
16
|
+
];
|
|
17
|
+
var STAGE_ASPECT = 16 / 9;
|
|
18
|
+
var STAGE_MARGIN = 0.03;
|
|
19
|
+
var STAGE_GAP = 0.02;
|
|
20
|
+
var MIN_FRAME_WIDTH = 0.05;
|
|
21
|
+
var SNAP_DISTANCE = 0.012;
|
|
22
|
+
var CAPTION_SPACE = 0.06;
|
|
23
|
+
var NO_RESERVE = { top: 0, below: 0 };
|
|
24
|
+
function frameHeight(frame, aspect) {
|
|
25
|
+
return frame.w * STAGE_ASPECT / aspect;
|
|
26
|
+
}
|
|
27
|
+
function containWidth(aspect, width, height) {
|
|
28
|
+
return Math.max(0, Math.min(width, height * aspect / STAGE_ASPECT));
|
|
29
|
+
}
|
|
30
|
+
function autoLayout(aspects, reserve = NO_RESERVE) {
|
|
31
|
+
const n = aspects.length;
|
|
32
|
+
if (n === 0) return [];
|
|
33
|
+
const { top, below, right = 0, bottom = 0, columns, inset = 0 } = reserve;
|
|
34
|
+
const left = STAGE_MARGIN + inset;
|
|
35
|
+
const innerW = 1 - 2 * left - right;
|
|
36
|
+
const innerH = 1 - 2 * STAGE_MARGIN - top - bottom;
|
|
37
|
+
let best = null;
|
|
38
|
+
const fixed = columns ? Math.min(columns, n) : 0;
|
|
39
|
+
for (let cols = fixed || 1; cols <= (fixed || n); cols++) {
|
|
40
|
+
const rows = Math.ceil(n / cols);
|
|
41
|
+
const cellW = (innerW - (cols - 1) * STAGE_GAP) / cols;
|
|
42
|
+
const cellH = (innerH - (rows - 1) * STAGE_GAP) / rows;
|
|
43
|
+
if (cellW <= 0 || cellH <= below) continue;
|
|
44
|
+
const frames = [];
|
|
45
|
+
let area = 0;
|
|
46
|
+
for (let i = 0; i < n; i++) {
|
|
47
|
+
const row = Math.floor(i / cols);
|
|
48
|
+
const inRow = row === rows - 1 ? n - row * cols : cols;
|
|
49
|
+
const col = i - row * cols;
|
|
50
|
+
const rowStart = left + (cols - inRow) * (cellW + STAGE_GAP) / 2;
|
|
51
|
+
const w = containWidth(aspects[i], cellW, cellH - below);
|
|
52
|
+
const h = frameHeight({ w }, aspects[i]);
|
|
53
|
+
frames.push({
|
|
54
|
+
x: rowStart + col * (cellW + STAGE_GAP) + (cellW - w) / 2,
|
|
55
|
+
y: STAGE_MARGIN + top + row * (cellH + STAGE_GAP) + (cellH - h - below) / 2,
|
|
56
|
+
w
|
|
57
|
+
});
|
|
58
|
+
area += w * h;
|
|
59
|
+
}
|
|
60
|
+
if (!best || area > best.area + 1e-9) best = { frames, area };
|
|
61
|
+
}
|
|
62
|
+
return best?.frames ?? [];
|
|
63
|
+
}
|
|
64
|
+
function fitFrame(aspect, reserve = NO_RESERVE) {
|
|
65
|
+
return autoLayout([aspect], reserve)[0];
|
|
66
|
+
}
|
|
67
|
+
function fullWidthFrame(frame, aspect, reserve = NO_RESERVE) {
|
|
68
|
+
const { top, below, right = 0, bottom = 0, inset = 0 } = reserve;
|
|
69
|
+
const w = 1 - 2 * (STAGE_MARGIN + inset) - right;
|
|
70
|
+
const h = frameHeight({ w }, aspect);
|
|
71
|
+
if (h + below > 1 - 2 * STAGE_MARGIN - top - bottom) return fitFrame(aspect, reserve);
|
|
72
|
+
const centre = frame.y + frameHeight(frame, aspect) / 2;
|
|
73
|
+
return {
|
|
74
|
+
x: STAGE_MARGIN + inset,
|
|
75
|
+
y: clamp(centre - h / 2, STAGE_MARGIN + top, 1 - STAGE_MARGIN - h - below - bottom),
|
|
76
|
+
w
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
function fullHeightFrame(frame, aspect, reserve = NO_RESERVE) {
|
|
80
|
+
const { top, below, right = 0, bottom = 0 } = reserve;
|
|
81
|
+
const inner = 1 - 2 * STAGE_MARGIN;
|
|
82
|
+
const w = (inner - top - below - bottom) * aspect / STAGE_ASPECT;
|
|
83
|
+
if (w > inner - right) return fitFrame(aspect, reserve);
|
|
84
|
+
const centre = frame.x + frame.w / 2;
|
|
85
|
+
return {
|
|
86
|
+
x: clamp(centre - w / 2, STAGE_MARGIN, 1 - STAGE_MARGIN - right - w),
|
|
87
|
+
y: STAGE_MARGIN + top,
|
|
88
|
+
w
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
function clamp(value, min, max) {
|
|
92
|
+
return max < min ? (min + max) / 2 : Math.min(Math.max(value, min), max);
|
|
93
|
+
}
|
|
94
|
+
var SNAP_DISTANCE_Y = SNAP_DISTANCE * STAGE_ASPECT;
|
|
95
|
+
function snapTargets(axis, others) {
|
|
96
|
+
const targets = [0, STAGE_MARGIN, 0.5, 1 - STAGE_MARGIN, 1];
|
|
97
|
+
for (const { frame, aspect } of others) {
|
|
98
|
+
const start = axis === "x" ? frame.x : frame.y;
|
|
99
|
+
const size = axis === "x" ? frame.w : frameHeight(frame, aspect);
|
|
100
|
+
targets.push(start, start + size / 2, start + size);
|
|
101
|
+
}
|
|
102
|
+
return targets;
|
|
103
|
+
}
|
|
104
|
+
function snapSpan(start, size, targets, distance) {
|
|
105
|
+
let best = null;
|
|
106
|
+
let bestDistance = distance;
|
|
107
|
+
for (const target of targets) {
|
|
108
|
+
for (const offset of [0, size / 2, size]) {
|
|
109
|
+
const d = Math.abs(start + offset - target);
|
|
110
|
+
if (d < bestDistance) {
|
|
111
|
+
bestDistance = d;
|
|
112
|
+
best = { start: target - offset, at: target };
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
return best;
|
|
117
|
+
}
|
|
118
|
+
function moveFrame(frame, aspect, dx, dy, others = [], free = false) {
|
|
119
|
+
const h = frameHeight(frame, aspect);
|
|
120
|
+
let x = frame.x + dx;
|
|
121
|
+
let y = frame.y + dy;
|
|
122
|
+
const guides = [];
|
|
123
|
+
if (!free) {
|
|
124
|
+
const sx = snapSpan(x, frame.w, snapTargets("x", others), SNAP_DISTANCE);
|
|
125
|
+
const sy = snapSpan(y, h, snapTargets("y", others), SNAP_DISTANCE_Y);
|
|
126
|
+
if (sx) {
|
|
127
|
+
x = sx.start;
|
|
128
|
+
guides.push({ axis: "x", at: sx.at });
|
|
129
|
+
}
|
|
130
|
+
if (sy) {
|
|
131
|
+
y = sy.start;
|
|
132
|
+
guides.push({ axis: "y", at: sy.at });
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
return { frame: { x: clamp(x, 0, 1 - frame.w), y: clamp(y, 0, 1 - h), w: frame.w }, guides };
|
|
136
|
+
}
|
|
137
|
+
function resizeFrame(frame, aspect, corner, dx, dy, others = [], free = false) {
|
|
138
|
+
const h0 = frameHeight(frame, aspect);
|
|
139
|
+
const west = corner === "nw" || corner === "sw";
|
|
140
|
+
const north = corner === "nw" || corner === "ne";
|
|
141
|
+
const anchorX = west ? frame.x + frame.w : frame.x;
|
|
142
|
+
const anchorY = north ? frame.y + h0 : frame.y;
|
|
143
|
+
const pointerX = (west ? frame.x : frame.x + frame.w) + dx;
|
|
144
|
+
const pointerY = (north ? frame.y : frame.y + h0) + dy;
|
|
145
|
+
const widthOfHeight = (height) => height * aspect / STAGE_ASPECT;
|
|
146
|
+
let w = Math.max(Math.abs(pointerX - anchorX), widthOfHeight(Math.abs(pointerY - anchorY)));
|
|
147
|
+
const guides = [];
|
|
148
|
+
if (!free) {
|
|
149
|
+
const edgeX = west ? anchorX - w : anchorX + w;
|
|
150
|
+
const edgeY = north ? anchorY - frameHeight({ w }, aspect) : anchorY + frameHeight({ w }, aspect);
|
|
151
|
+
const sx = snapSpan(edgeX, 0, snapTargets("x", others), SNAP_DISTANCE);
|
|
152
|
+
const sy = snapSpan(edgeY, 0, snapTargets("y", others), SNAP_DISTANCE_Y);
|
|
153
|
+
const dxSnap = sx ? Math.abs(sx.at - edgeX) : Infinity;
|
|
154
|
+
const dySnap = sy ? Math.abs(sy.at - edgeY) / STAGE_ASPECT : Infinity;
|
|
155
|
+
if (sx && dxSnap <= dySnap) {
|
|
156
|
+
w = Math.abs(sx.at - anchorX);
|
|
157
|
+
guides.push({ axis: "x", at: sx.at });
|
|
158
|
+
} else if (sy) {
|
|
159
|
+
w = widthOfHeight(Math.abs(sy.at - anchorY));
|
|
160
|
+
guides.push({ axis: "y", at: sy.at });
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
const maxW = Math.min(west ? anchorX : 1 - anchorX, widthOfHeight(north ? anchorY : 1 - anchorY));
|
|
164
|
+
w = clamp(w, Math.min(MIN_FRAME_WIDTH, maxW), maxW);
|
|
165
|
+
const h = frameHeight({ w }, aspect);
|
|
166
|
+
return { frame: { x: west ? anchorX - w : anchorX, y: north ? anchorY - h : anchorY, w }, guides };
|
|
167
|
+
}
|
|
168
|
+
var MIN_CLIP_SPAN = 0.02;
|
|
169
|
+
function reshapeFrame(frame, clip, edge, dx, dy, others = [], free = false) {
|
|
170
|
+
const { rect, aspect } = clip;
|
|
171
|
+
const horizontal = edge === "e" || edge === "w";
|
|
172
|
+
const far = edge === "e" || edge === "s";
|
|
173
|
+
const start = horizontal ? frame.x : frame.y;
|
|
174
|
+
const size = horizontal ? frame.w : frameHeight(frame, aspect);
|
|
175
|
+
const sourceStart = horizontal ? rect.x : rect.y;
|
|
176
|
+
const sourceSize = horizontal ? rect.w : rect.h;
|
|
177
|
+
const scale = size / sourceSize;
|
|
178
|
+
const axis = horizontal ? "x" : "y";
|
|
179
|
+
let at = (far ? start + size : start) + (horizontal ? dx : dy);
|
|
180
|
+
if (!free) {
|
|
181
|
+
const distance = horizontal ? SNAP_DISTANCE : SNAP_DISTANCE_Y;
|
|
182
|
+
const snap = snapSpan(at, 0, snapTargets(axis, others), distance);
|
|
183
|
+
if (snap) at = snap.at;
|
|
184
|
+
}
|
|
185
|
+
const least = Math.min(
|
|
186
|
+
size,
|
|
187
|
+
Math.max(horizontal ? MIN_FRAME_WIDTH : MIN_FRAME_WIDTH * STAGE_ASPECT, MIN_CLIP_SPAN * scale)
|
|
188
|
+
);
|
|
189
|
+
const end = start + size;
|
|
190
|
+
const most = far ? Math.min(1 - start, (1 - sourceStart) * scale) : Math.min(end, (sourceStart + sourceSize) * scale);
|
|
191
|
+
const nextSize = clamp(far ? at - start : end - at, least, Math.max(most, size));
|
|
192
|
+
const nextSourceSize = nextSize / scale;
|
|
193
|
+
const nextStart = far ? start : end - nextSize;
|
|
194
|
+
const nextSourceStart = far ? sourceStart : sourceStart + sourceSize - nextSourceSize;
|
|
195
|
+
const nextRect = horizontal ? { ...rect, x: nextSourceStart, w: nextSourceSize } : { ...rect, y: nextSourceStart, h: nextSourceSize };
|
|
196
|
+
const sourceAspect = aspect * rect.h / rect.w;
|
|
197
|
+
const edgeAt = far ? nextStart + nextSize : nextStart;
|
|
198
|
+
return {
|
|
199
|
+
frame: horizontal ? { x: nextStart, y: frame.y, w: nextSize } : { x: frame.x, y: nextStart, w: frame.w },
|
|
200
|
+
rect: nextRect,
|
|
201
|
+
aspect: sourceAspect * nextRect.w / nextRect.h,
|
|
202
|
+
// A guide only where the edge did snap (not where a bound stopped it).
|
|
203
|
+
guides: !free && Math.abs(edgeAt - at) < 1e-9 && snapTargets(axis, others).includes(at) ? [{ axis, at }] : []
|
|
204
|
+
};
|
|
205
|
+
}
|
|
206
|
+
function alignFrame(frame, aspect, alignment, reserve = NO_RESERVE) {
|
|
207
|
+
const h = frameHeight(frame, aspect);
|
|
208
|
+
const right = reserve.right ?? 0;
|
|
209
|
+
const side = STAGE_MARGIN + (reserve.inset ?? 0);
|
|
210
|
+
const below = reserve.below + (reserve.bottom ?? 0);
|
|
211
|
+
switch (alignment) {
|
|
212
|
+
case "left":
|
|
213
|
+
return { ...frame, x: side };
|
|
214
|
+
case "centre":
|
|
215
|
+
return { ...frame, x: (1 - right - frame.w) / 2 };
|
|
216
|
+
case "right":
|
|
217
|
+
return { ...frame, x: 1 - side - right - frame.w };
|
|
218
|
+
case "top":
|
|
219
|
+
return { ...frame, y: STAGE_MARGIN + reserve.top };
|
|
220
|
+
case "middle":
|
|
221
|
+
return { ...frame, y: (1 + reserve.top - below - h) / 2 };
|
|
222
|
+
case "bottom":
|
|
223
|
+
return { ...frame, y: 1 - STAGE_MARGIN - below - h };
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
function dropFrame(aspect, at) {
|
|
227
|
+
const fit = fitFrame(aspect);
|
|
228
|
+
const w = Math.min(fit.w, 0.45);
|
|
229
|
+
const h = frameHeight({ w }, aspect);
|
|
230
|
+
return { x: clamp(at.x - w / 2, 0, 1 - w), y: clamp(at.y - h / 2, 0, 1 - h), w };
|
|
231
|
+
}
|
|
232
|
+
function defaultCaption(fileName, page) {
|
|
233
|
+
return `${documentName(fileName)} \xB7 p. ${page}`;
|
|
234
|
+
}
|
|
235
|
+
var documentName = (fileName) => fileName.replace(/\.[a-z0-9]{1,5}$/i, "") || "Document";
|
|
236
|
+
function formatTime(seconds) {
|
|
237
|
+
const total = Math.max(0, Math.floor(seconds));
|
|
238
|
+
const h = Math.floor(total / 3600);
|
|
239
|
+
const m = Math.floor(total % 3600 / 60);
|
|
240
|
+
const s = String(total % 60).padStart(2, "0");
|
|
241
|
+
return h ? `${h}:${String(m).padStart(2, "0")}:${s}` : `${m}:${s}`;
|
|
242
|
+
}
|
|
243
|
+
function clipLabel(clip, columnValues) {
|
|
244
|
+
const value = columnValues[clip.documentId]?.trim();
|
|
245
|
+
if (!value) return clip.caption;
|
|
246
|
+
return clip.caption ? `${value} \xB7 ${clip.caption}` : value;
|
|
247
|
+
}
|
|
248
|
+
function mediaCaption(fileName, start) {
|
|
249
|
+
const name = documentName(fileName);
|
|
250
|
+
return start === void 0 ? name : `${name} \xB7 ${formatTime(start)}`;
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
// src/presentation/slide-layout.ts
|
|
254
|
+
var TEXT_INSET = 0.06;
|
|
255
|
+
var LAYOUT_INFO = {
|
|
256
|
+
clips: { label: "Title and clips" },
|
|
257
|
+
points: { label: "Clips and points", text: "One point per line" },
|
|
258
|
+
compare: { label: "Side by side" },
|
|
259
|
+
title: { label: "Title slide", text: "Subtitle" },
|
|
260
|
+
section: { label: "Section", text: "Subtitle" },
|
|
261
|
+
free: { label: "Blank" }
|
|
262
|
+
};
|
|
263
|
+
var FOOTER = 0.085;
|
|
264
|
+
function slideGeometry(slide, options) {
|
|
265
|
+
const below = options.labels ? CAPTION_SPACE : 0;
|
|
266
|
+
const bottom = options.logo ? FOOTER : 0;
|
|
267
|
+
const logo = options.logo ? {
|
|
268
|
+
x: options.logo === "bl" ? TEXT_INSET : 1 - TEXT_INSET - 0.16,
|
|
269
|
+
y: 1 - 0.03 - 0.055,
|
|
270
|
+
w: 0.16,
|
|
271
|
+
h: 0.055
|
|
272
|
+
} : null;
|
|
273
|
+
const hasTitle = slide.caption.trim() !== "";
|
|
274
|
+
if (slide.layout === "free") {
|
|
275
|
+
return { title: null, rule: null, text: null, logo, reserve: { top: 0, below, bottom } };
|
|
276
|
+
}
|
|
277
|
+
if (slide.layout === "title" || slide.layout === "section") {
|
|
278
|
+
const centred = slide.layout === "title";
|
|
279
|
+
const title2 = centred ? {
|
|
280
|
+
x: 0.1,
|
|
281
|
+
y: 0.28,
|
|
282
|
+
w: 0.8,
|
|
283
|
+
h: 0.2,
|
|
284
|
+
size: 0.052,
|
|
285
|
+
weight: 700,
|
|
286
|
+
align: "center",
|
|
287
|
+
tone: "title",
|
|
288
|
+
leading: 1.1,
|
|
289
|
+
// Just above the rule, however many lines it takes.
|
|
290
|
+
anchor: "bottom"
|
|
291
|
+
} : {
|
|
292
|
+
x: TEXT_INSET + 0.02,
|
|
293
|
+
y: 0.36,
|
|
294
|
+
w: 0.8,
|
|
295
|
+
h: 0.18,
|
|
296
|
+
size: 0.046,
|
|
297
|
+
weight: 700,
|
|
298
|
+
align: "left",
|
|
299
|
+
tone: "title",
|
|
300
|
+
leading: 1.1
|
|
301
|
+
};
|
|
302
|
+
return {
|
|
303
|
+
title: title2,
|
|
304
|
+
rule: centred ? { x: 0.47, y: 0.505, w: 0.06, h: 7e-3 } : { x: TEXT_INSET + 0.02, y: 0.33, w: 0.07, h: 8e-3 },
|
|
305
|
+
text: {
|
|
306
|
+
x: title2.x,
|
|
307
|
+
y: centred ? 0.545 : 0.555,
|
|
308
|
+
w: title2.w,
|
|
309
|
+
h: 0.1,
|
|
310
|
+
size: 0.021,
|
|
311
|
+
weight: 400,
|
|
312
|
+
align: title2.align,
|
|
313
|
+
tone: "muted",
|
|
314
|
+
leading: 1.3
|
|
315
|
+
},
|
|
316
|
+
logo,
|
|
317
|
+
// Clips, if any, go under the text.
|
|
318
|
+
reserve: { top: 0.62, below, bottom }
|
|
319
|
+
};
|
|
320
|
+
}
|
|
321
|
+
const title = {
|
|
322
|
+
x: TEXT_INSET,
|
|
323
|
+
y: 0.05,
|
|
324
|
+
w: 1 - 2 * TEXT_INSET,
|
|
325
|
+
h: 0.075,
|
|
326
|
+
size: 0.03,
|
|
327
|
+
weight: 600,
|
|
328
|
+
align: "left",
|
|
329
|
+
tone: "title",
|
|
330
|
+
leading: 1.15
|
|
331
|
+
};
|
|
332
|
+
const top = hasTitle ? 0.14 : 0;
|
|
333
|
+
const inset = hasTitle || slide.layout === "points" ? TEXT_INSET - STAGE_MARGIN : 0;
|
|
334
|
+
const geometry = {
|
|
335
|
+
title,
|
|
336
|
+
rule: hasTitle ? { x: TEXT_INSET, y: 0.128, w: 0.045, h: 6e-3 } : null,
|
|
337
|
+
text: null,
|
|
338
|
+
logo,
|
|
339
|
+
reserve: { top, below, bottom, inset }
|
|
340
|
+
};
|
|
341
|
+
if (slide.layout === "points") {
|
|
342
|
+
const y = STAGE_MARGIN + top;
|
|
343
|
+
geometry.text = {
|
|
344
|
+
x: 0.6,
|
|
345
|
+
y,
|
|
346
|
+
w: 1 - 0.6 - TEXT_INSET,
|
|
347
|
+
h: 1 - y - STAGE_MARGIN - bottom - below,
|
|
348
|
+
// Level with the clips, which are centred in their room.
|
|
349
|
+
anchor: "middle",
|
|
350
|
+
size: 0.0195,
|
|
351
|
+
weight: 400,
|
|
352
|
+
align: "left",
|
|
353
|
+
tone: "body",
|
|
354
|
+
bullets: true,
|
|
355
|
+
leading: 1.45
|
|
356
|
+
};
|
|
357
|
+
geometry.reserve = { ...geometry.reserve, right: 0.4 - inset };
|
|
358
|
+
}
|
|
359
|
+
if (slide.layout === "compare") geometry.reserve = { ...geometry.reserve, columns: 2 };
|
|
360
|
+
return geometry;
|
|
361
|
+
}
|
|
362
|
+
var textLines = (text) => text.split("\n").map((line) => line.trim()).filter(Boolean);
|
|
363
|
+
|
|
364
|
+
// src/presentation/theme.ts
|
|
365
|
+
var BRAND = "brand";
|
|
366
|
+
var DEFAULT_THEME = {
|
|
367
|
+
background: BRAND,
|
|
368
|
+
font: "sans",
|
|
369
|
+
accent: BRAND,
|
|
370
|
+
logo: null
|
|
371
|
+
};
|
|
372
|
+
var BACKGROUNDS = [
|
|
373
|
+
// The app's primary colour, read from its tokens when drawn (`brandColors`).
|
|
374
|
+
{ id: BRAND, label: "Brand", from: "", to: "", glow: 0.1 },
|
|
375
|
+
{ id: "graphite", label: "Graphite", from: "#2b3038", to: "#0c0e11", glow: 0.09 },
|
|
376
|
+
{ id: "midnight", label: "Midnight", from: "#17294a", to: "#050a15", glow: 0.1 },
|
|
377
|
+
{ id: "oxford", label: "Oxford", from: "#123d45", to: "#04141a", glow: 0.08 },
|
|
378
|
+
{ id: "claret", label: "Claret", from: "#4b1526", to: "#110409", glow: 0.08 },
|
|
379
|
+
{ id: "linen", label: "Linen", from: "#2a2b30", to: "#111215", glow: 0.06, texture: "linen" },
|
|
380
|
+
{ id: "onyx", label: "Onyx", from: "#000000", to: "#000000", glow: 0 }
|
|
381
|
+
];
|
|
382
|
+
var FONTS = {
|
|
383
|
+
sans: {
|
|
384
|
+
label: "Modern",
|
|
385
|
+
css: 'Calibri, Carlito, "Segoe UI", "Helvetica Neue", Arial, sans-serif',
|
|
386
|
+
pptx: "Calibri"
|
|
387
|
+
},
|
|
388
|
+
serif: {
|
|
389
|
+
label: "Editorial",
|
|
390
|
+
css: 'Georgia, Gelasio, "Times New Roman", serif',
|
|
391
|
+
pptx: "Georgia"
|
|
392
|
+
},
|
|
393
|
+
classic: {
|
|
394
|
+
label: "Classic",
|
|
395
|
+
css: 'Garamond, "EB Garamond", "Cormorant Garamond", "Times New Roman", serif',
|
|
396
|
+
pptx: "Garamond"
|
|
397
|
+
}
|
|
398
|
+
};
|
|
399
|
+
var ACCENTS = [
|
|
400
|
+
{ label: "Brand", color: BRAND },
|
|
401
|
+
{ label: "Gold", color: "#c9a96e" },
|
|
402
|
+
{ label: "Teal", color: "#4fb3bf" },
|
|
403
|
+
{ label: "Blue", color: "#6b9bf2" },
|
|
404
|
+
{ label: "Coral", color: "#e57a6e" },
|
|
405
|
+
{ label: "Silver", color: "#cfd4dc" }
|
|
406
|
+
];
|
|
407
|
+
var TEXT_COLORS = { title: "#ffffff", body: "#e6e8ec", muted: "#aab0ba" };
|
|
408
|
+
var HEX = /^#[0-9a-f]{6}$/i;
|
|
409
|
+
var isHexColor = (value) => HEX.test(value);
|
|
410
|
+
function mix(hex, toward, amount) {
|
|
411
|
+
const channel = (i) => {
|
|
412
|
+
const value = parseInt(hex.slice(1 + i * 2, 3 + i * 2), 16);
|
|
413
|
+
return Math.round(value + (toward - value) * amount).toString(16).padStart(2, "0");
|
|
414
|
+
};
|
|
415
|
+
return `#${channel(0)}${channel(1)}${channel(2)}`;
|
|
416
|
+
}
|
|
417
|
+
var BRAND_TOKENS = { primary: "229.85 50.43% 25.29%", secondary: "195 100% 47%" };
|
|
418
|
+
function hslToHex(h, s, l) {
|
|
419
|
+
const k = (n) => (n + h / 30) % 12;
|
|
420
|
+
const a = s * Math.min(l, 1 - l);
|
|
421
|
+
const f = (n) => l - a * Math.max(-1, Math.min(k(n) - 3, Math.min(9 - k(n), 1)));
|
|
422
|
+
return `#${[f(0), f(8), f(4)].map(
|
|
423
|
+
(x) => Math.round(x * 255).toString(16).padStart(2, "0")
|
|
424
|
+
).join("")}`;
|
|
425
|
+
}
|
|
426
|
+
function readToken(name, fallback) {
|
|
427
|
+
const value = typeof document !== "undefined" && getComputedStyle(document.documentElement).getPropertyValue(name).trim() || fallback;
|
|
428
|
+
const [h, s, l] = value.split(/\s+/).map((part) => parseFloat(part));
|
|
429
|
+
return [h, s / 100, l / 100];
|
|
430
|
+
}
|
|
431
|
+
var brand = null;
|
|
432
|
+
function brandColors() {
|
|
433
|
+
if (brand) return brand;
|
|
434
|
+
const [ph, ps, pl] = readToken("--primary", BRAND_TOKENS.primary);
|
|
435
|
+
const [sh, ss, sl] = readToken("--secondary", BRAND_TOKENS.secondary);
|
|
436
|
+
brand = { primary: hslToHex(ph, ps, Math.min(pl, 0.3)), secondary: hslToHex(sh, ss, sl) };
|
|
437
|
+
return brand;
|
|
438
|
+
}
|
|
439
|
+
var accentColor = (accent) => accent === BRAND ? brandColors().secondary : accent;
|
|
440
|
+
function backgroundSpec(background) {
|
|
441
|
+
if (background === BRAND) {
|
|
442
|
+
const { primary } = brandColors();
|
|
443
|
+
return { from: mix(primary, 255, 0.05), to: mix(primary, 0, 0.6), glow: 0.1 };
|
|
444
|
+
}
|
|
445
|
+
const preset = BACKGROUNDS.find((entry) => entry.id === background);
|
|
446
|
+
if (preset) return preset;
|
|
447
|
+
if (isHexColor(background)) {
|
|
448
|
+
return { from: mix(background, 255, 0.06), to: mix(background, 0, 0.62), glow: 0.08 };
|
|
449
|
+
}
|
|
450
|
+
return backgroundSpec(BRAND);
|
|
451
|
+
}
|
|
452
|
+
function backgroundCss(background) {
|
|
453
|
+
const spec = backgroundSpec(background);
|
|
454
|
+
const layers = [];
|
|
455
|
+
if (spec.glow > 0) {
|
|
456
|
+
layers.push(
|
|
457
|
+
`radial-gradient(120% 90% at 12% -10%, rgba(255,255,255,${spec.glow}), transparent 60%)`
|
|
458
|
+
);
|
|
459
|
+
}
|
|
460
|
+
if (spec.texture === "linen") {
|
|
461
|
+
layers.push(
|
|
462
|
+
"repeating-linear-gradient(45deg, rgba(255,255,255,0.025) 0 0.06cqw, transparent 0.06cqw 0.32cqw)",
|
|
463
|
+
"repeating-linear-gradient(-45deg, rgba(255,255,255,0.02) 0 0.06cqw, transparent 0.06cqw 0.32cqw)"
|
|
464
|
+
);
|
|
465
|
+
}
|
|
466
|
+
layers.push(`linear-gradient(155deg, ${spec.from} 0%, ${spec.to} 100%)`);
|
|
467
|
+
return layers.join(", ");
|
|
468
|
+
}
|
|
469
|
+
function paintBackground(context, width, height, background) {
|
|
470
|
+
const spec = backgroundSpec(background);
|
|
471
|
+
const angle = 155 * Math.PI / 180;
|
|
472
|
+
const dx = Math.sin(angle);
|
|
473
|
+
const dy = -Math.cos(angle);
|
|
474
|
+
const length = Math.abs(width * dx) + Math.abs(height * dy);
|
|
475
|
+
const cx = width / 2;
|
|
476
|
+
const cy = height / 2;
|
|
477
|
+
const gradient = context.createLinearGradient(
|
|
478
|
+
cx - dx * length / 2,
|
|
479
|
+
cy - dy * length / 2,
|
|
480
|
+
cx + dx * length / 2,
|
|
481
|
+
cy + dy * length / 2
|
|
482
|
+
);
|
|
483
|
+
gradient.addColorStop(0, spec.from);
|
|
484
|
+
gradient.addColorStop(1, spec.to);
|
|
485
|
+
context.fillStyle = gradient;
|
|
486
|
+
context.fillRect(0, 0, width, height);
|
|
487
|
+
if (spec.texture === "linen") {
|
|
488
|
+
const step = width * 32e-4;
|
|
489
|
+
context.save();
|
|
490
|
+
context.lineWidth = width * 6e-4;
|
|
491
|
+
for (const [direction, alpha] of [
|
|
492
|
+
[1, 0.025],
|
|
493
|
+
[-1, 0.02]
|
|
494
|
+
]) {
|
|
495
|
+
context.strokeStyle = `rgba(255,255,255,${alpha})`;
|
|
496
|
+
context.beginPath();
|
|
497
|
+
for (let offset = -height; offset < width + height; offset += step) {
|
|
498
|
+
context.moveTo(offset, direction === 1 ? height : 0);
|
|
499
|
+
context.lineTo(offset + height, direction === 1 ? 0 : height);
|
|
500
|
+
}
|
|
501
|
+
context.stroke();
|
|
502
|
+
}
|
|
503
|
+
context.restore();
|
|
504
|
+
}
|
|
505
|
+
if (spec.glow > 0) {
|
|
506
|
+
const rx = width * 1.2;
|
|
507
|
+
const ry = height * 0.9;
|
|
508
|
+
context.save();
|
|
509
|
+
context.translate(width * 0.12, -height * 0.1);
|
|
510
|
+
context.scale(rx, ry);
|
|
511
|
+
const glow = context.createRadialGradient(0, 0, 0, 0, 0, 1);
|
|
512
|
+
glow.addColorStop(0, `rgba(255,255,255,${spec.glow})`);
|
|
513
|
+
glow.addColorStop(0.6, "rgba(255,255,255,0)");
|
|
514
|
+
context.fillStyle = glow;
|
|
515
|
+
context.fillRect(-1, -1, 2, 2);
|
|
516
|
+
context.restore();
|
|
517
|
+
}
|
|
518
|
+
}
|
|
519
|
+
var CLIP_EDGE_SOLID = 2e-3;
|
|
520
|
+
var CLIP_EDGE_FADE = 9e-3;
|
|
521
|
+
var CLIP_EDGE_MAX = 0.08;
|
|
522
|
+
function clipEdgeCss() {
|
|
523
|
+
const solid = `min(${CLIP_EDGE_SOLID * 100}cqw, ${CLIP_EDGE_MAX * 25}%)`;
|
|
524
|
+
const fade = `min(${CLIP_EDGE_FADE * 100}cqw, ${CLIP_EDGE_MAX * 100}%)`;
|
|
525
|
+
return ["to right", "to left", "to bottom", "to top"].map(
|
|
526
|
+
(direction) => `linear-gradient(${direction}, #fff 0, #fff ${solid}, rgba(255,255,255,0) ${fade})`
|
|
527
|
+
).join(", ");
|
|
528
|
+
}
|
|
529
|
+
function paintClipEdge(context, box, stageWidth) {
|
|
530
|
+
const sides = [
|
|
531
|
+
{ length: box.width, from: [box.x, 0], to: [box.x + 1, 0] },
|
|
532
|
+
{ length: box.width, from: [box.x + box.width, 0], to: [box.x + box.width - 1, 0] },
|
|
533
|
+
{ length: box.height, from: [0, box.y], to: [0, box.y + 1] },
|
|
534
|
+
{ length: box.height, from: [0, box.y + box.height], to: [0, box.y + box.height - 1] }
|
|
535
|
+
];
|
|
536
|
+
for (const side of sides) {
|
|
537
|
+
const fade = Math.min(CLIP_EDGE_FADE * stageWidth, CLIP_EDGE_MAX * side.length);
|
|
538
|
+
const solid = Math.min(CLIP_EDGE_SOLID * stageWidth, CLIP_EDGE_MAX * 0.25 * side.length);
|
|
539
|
+
const [fx, fy] = side.from;
|
|
540
|
+
const [tx, ty] = side.to;
|
|
541
|
+
const gradient = context.createLinearGradient(
|
|
542
|
+
fx,
|
|
543
|
+
fy,
|
|
544
|
+
fx + (tx - fx) * fade,
|
|
545
|
+
fy + (ty - fy) * fade
|
|
546
|
+
);
|
|
547
|
+
gradient.addColorStop(0, "rgba(255,255,255,1)");
|
|
548
|
+
gradient.addColorStop(Math.min(1, solid / fade), "rgba(255,255,255,1)");
|
|
549
|
+
gradient.addColorStop(1, "rgba(255,255,255,0)");
|
|
550
|
+
context.fillStyle = gradient;
|
|
551
|
+
context.fillRect(box.x, box.y, box.width, box.height);
|
|
552
|
+
}
|
|
553
|
+
}
|
|
554
|
+
function slideBackgroundCss(background, media) {
|
|
555
|
+
const image = background.image ? media[background.image] : void 0;
|
|
556
|
+
if (image) return `center / cover no-repeat url("${image}")`;
|
|
557
|
+
if (background.gradient) {
|
|
558
|
+
const { angle, from, to } = background.gradient;
|
|
559
|
+
return `linear-gradient(${angle}deg, ${from}, ${to})`;
|
|
560
|
+
}
|
|
561
|
+
return background.color ?? "#ffffff";
|
|
562
|
+
}
|
|
563
|
+
async function paintSlideBackground(context, width, height, background, media) {
|
|
564
|
+
const image = background.image ? media[background.image] : void 0;
|
|
565
|
+
if (image) {
|
|
566
|
+
const picture = new Image();
|
|
567
|
+
picture.src = image;
|
|
568
|
+
await picture.decode();
|
|
569
|
+
const scale = Math.max(width / picture.width, height / picture.height);
|
|
570
|
+
const w = picture.width * scale;
|
|
571
|
+
const h = picture.height * scale;
|
|
572
|
+
context.drawImage(picture, (width - w) / 2, (height - h) / 2, w, h);
|
|
573
|
+
return;
|
|
574
|
+
}
|
|
575
|
+
if (background.gradient) {
|
|
576
|
+
const { angle, from, to } = background.gradient;
|
|
577
|
+
const radians = angle * Math.PI / 180;
|
|
578
|
+
const dx = Math.sin(radians);
|
|
579
|
+
const dy = -Math.cos(radians);
|
|
580
|
+
const length = Math.abs(width * dx) + Math.abs(height * dy);
|
|
581
|
+
const gradient = context.createLinearGradient(
|
|
582
|
+
width / 2 - dx * length / 2,
|
|
583
|
+
height / 2 - dy * length / 2,
|
|
584
|
+
width / 2 + dx * length / 2,
|
|
585
|
+
height / 2 + dy * length / 2
|
|
586
|
+
);
|
|
587
|
+
gradient.addColorStop(0, from);
|
|
588
|
+
gradient.addColorStop(1, to);
|
|
589
|
+
context.fillStyle = gradient;
|
|
590
|
+
} else {
|
|
591
|
+
context.fillStyle = background.color ?? "#ffffff";
|
|
592
|
+
}
|
|
593
|
+
context.fillRect(0, 0, width, height);
|
|
594
|
+
}
|
|
595
|
+
function isLightBackground(background) {
|
|
596
|
+
const color2 = background?.gradient?.from ?? background?.color;
|
|
597
|
+
if (!color2 || !isHexColor(color2)) return false;
|
|
598
|
+
const n = parseInt(color2.slice(1), 16);
|
|
599
|
+
const luminance = 0.2126 * (n >> 16 & 255) + 0.7152 * (n >> 8 & 255) + 0.0722 * (n & 255);
|
|
600
|
+
return luminance > 150;
|
|
601
|
+
}
|
|
602
|
+
function parseTheme(value) {
|
|
603
|
+
const data = value ?? {};
|
|
604
|
+
const logo = data.logo;
|
|
605
|
+
return {
|
|
606
|
+
background: typeof data.background === "string" && (BACKGROUNDS.some((entry) => entry.id === data.background) || isHexColor(data.background)) ? data.background : DEFAULT_THEME.background,
|
|
607
|
+
font: data.font && data.font in FONTS ? data.font : DEFAULT_THEME.font,
|
|
608
|
+
accent: typeof data.accent === "string" && (isHexColor(data.accent) || data.accent === BRAND) ? data.accent : DEFAULT_THEME.accent,
|
|
609
|
+
logo: logo && typeof logo.documentId === "string" ? {
|
|
610
|
+
documentId: logo.documentId,
|
|
611
|
+
fileName: typeof logo.fileName === "string" ? logo.fileName : "",
|
|
612
|
+
corner: logo.corner === "bl" ? "bl" : "br"
|
|
613
|
+
} : null
|
|
614
|
+
};
|
|
615
|
+
}
|
|
616
|
+
|
|
617
|
+
// src/presentation/saved-boxes.ts
|
|
618
|
+
var HEX2 = /^#[0-9a-f]{6}$/i;
|
|
619
|
+
var SHAPES = ["text", "rect", "roundRect", "ellipse", "line"];
|
|
620
|
+
var ALIGNS = ["left", "center", "right", "justify"];
|
|
621
|
+
var num = (v) => typeof v === "number" && Number.isFinite(v);
|
|
622
|
+
var color = (v) => typeof v === "string" && HEX2.test(v) ? v.toLowerCase() : void 0;
|
|
623
|
+
function parseRun(value) {
|
|
624
|
+
const run = value;
|
|
625
|
+
if (!run || typeof run.text !== "string") return null;
|
|
626
|
+
return {
|
|
627
|
+
text: run.text,
|
|
628
|
+
...num(run.size) && run.size > 0 && run.size < 400 ? { size: run.size } : {},
|
|
629
|
+
...run.bold === true ? { bold: true } : {},
|
|
630
|
+
...run.italic === true ? { italic: true } : {},
|
|
631
|
+
...run.underline === true ? { underline: true } : {},
|
|
632
|
+
...color(run.color) ? { color: color(run.color) } : {},
|
|
633
|
+
...typeof run.font === "string" && run.font ? { font: run.font.slice(0, 64) } : {}
|
|
634
|
+
};
|
|
635
|
+
}
|
|
636
|
+
function parseParagraph(value) {
|
|
637
|
+
const paragraph = value;
|
|
638
|
+
if (!paragraph || !Array.isArray(paragraph.runs)) return null;
|
|
639
|
+
return {
|
|
640
|
+
runs: paragraph.runs.map(parseRun).filter((run) => run !== null),
|
|
641
|
+
...ALIGNS.includes(paragraph.align) ? { align: paragraph.align } : {},
|
|
642
|
+
...num(paragraph.level) && paragraph.level > 0 ? { level: Math.min(8, Math.round(paragraph.level)) } : {},
|
|
643
|
+
...paragraph.bullet === true ? { bullet: true } : {}
|
|
644
|
+
};
|
|
645
|
+
}
|
|
646
|
+
function parseBox(value) {
|
|
647
|
+
const box = value;
|
|
648
|
+
const frame = box?.frame;
|
|
649
|
+
if (!box || !frame || !num(frame.x) || !num(frame.y) || !num(frame.w) || !num(frame.h) || frame.w < 0 || frame.h < 0 || !SHAPES.includes(box.shape)) {
|
|
650
|
+
return null;
|
|
651
|
+
}
|
|
652
|
+
const line = box.line;
|
|
653
|
+
return {
|
|
654
|
+
frame: { x: frame.x, y: frame.y, w: frame.w, h: frame.h },
|
|
655
|
+
shape: box.shape,
|
|
656
|
+
paragraphs: Array.isArray(box.paragraphs) ? box.paragraphs.map(parseParagraph).filter((p) => p !== null) : [],
|
|
657
|
+
...num(box.rotation) && box.rotation % 360 !== 0 ? { rotation: box.rotation % 360 } : {},
|
|
658
|
+
...box.flipH === true ? { flipH: true } : {},
|
|
659
|
+
...box.flipV === true ? { flipV: true } : {},
|
|
660
|
+
...color(box.fill) ? { fill: color(box.fill) } : {},
|
|
661
|
+
...num(box.fillAlpha) && box.fillAlpha >= 0 && box.fillAlpha < 1 ? { fillAlpha: box.fillAlpha } : {},
|
|
662
|
+
...line && color(line.color) && num(line.width) && line.width >= 0 ? {
|
|
663
|
+
line: {
|
|
664
|
+
color: color(line.color),
|
|
665
|
+
width: line.width,
|
|
666
|
+
...line.dash === true ? { dash: true } : {}
|
|
667
|
+
}
|
|
668
|
+
} : {},
|
|
669
|
+
...box.anchor === "middle" || box.anchor === "bottom" || box.anchor === "top" ? { anchor: box.anchor } : {},
|
|
670
|
+
...num(box.inset) && box.inset >= 0 ? { inset: box.inset } : {},
|
|
671
|
+
...box.role === "title" || box.role === "body" ? { role: box.role } : {},
|
|
672
|
+
...box.front === true ? { front: true } : {}
|
|
673
|
+
};
|
|
674
|
+
}
|
|
675
|
+
function parseBoxes(value) {
|
|
676
|
+
return Array.isArray(value) ? value.map(parseBox).filter((b) => b !== null) : [];
|
|
677
|
+
}
|
|
678
|
+
function parseBackground(value, media) {
|
|
679
|
+
const background = value;
|
|
680
|
+
if (!background || typeof background !== "object") return void 0;
|
|
681
|
+
const gradient = background.gradient;
|
|
682
|
+
const parsed = {
|
|
683
|
+
...color(background.color) ? { color: color(background.color) } : {},
|
|
684
|
+
...gradient && color(gradient.from) && color(gradient.to) && num(gradient.angle) ? {
|
|
685
|
+
gradient: { from: color(gradient.from), to: color(gradient.to), angle: gradient.angle }
|
|
686
|
+
} : {},
|
|
687
|
+
...typeof background.image === "string" && media[background.image] ? { image: background.image } : {}
|
|
688
|
+
};
|
|
689
|
+
return Object.keys(parsed).length ? parsed : void 0;
|
|
690
|
+
}
|
|
691
|
+
|
|
692
|
+
// src/presentation/persistence.ts
|
|
693
|
+
var PRESENTATIONS_FOLDER = "Presentations";
|
|
694
|
+
var TEMPLATES_FOLDER = `${PRESENTATIONS_FOLDER}/Templates`;
|
|
695
|
+
var EXPORTS_FOLDER = `${PRESENTATIONS_FOLDER}/Exports`;
|
|
696
|
+
var PRESENTATION_ATTACHMENT = "arbi-presentation.json";
|
|
697
|
+
var FORMAT = "arbi-presentation";
|
|
698
|
+
function serializePresentation(snapshot) {
|
|
699
|
+
const index = new Map(snapshot.clips.map((clip, i) => [clip.id, i]));
|
|
700
|
+
return {
|
|
701
|
+
format: FORMAT,
|
|
702
|
+
version: 1,
|
|
703
|
+
title: snapshot.title,
|
|
704
|
+
captions: snapshot.captions,
|
|
705
|
+
...snapshot.labelColumn ? { labelColumn: snapshot.labelColumn } : {},
|
|
706
|
+
...snapshot.theme ? { theme: snapshot.theme } : {},
|
|
707
|
+
clips: snapshot.clips.map((clip) => ({
|
|
708
|
+
kind: clip.kind,
|
|
709
|
+
documentId: clip.documentId,
|
|
710
|
+
...clip.version !== void 0 ? { version: clip.version } : {},
|
|
711
|
+
fileName: clip.fileName,
|
|
712
|
+
page: clip.page,
|
|
713
|
+
rect: clip.rect,
|
|
714
|
+
aspect: clip.aspect,
|
|
715
|
+
caption: clip.caption,
|
|
716
|
+
...clip.start !== void 0 ? { start: clip.start } : {},
|
|
717
|
+
...clip.zoomBase !== void 0 ? { zoomBase: clip.zoomBase } : {},
|
|
718
|
+
...clip.media ? { media: clip.media } : {},
|
|
719
|
+
...clip.plain ? { plain: true } : {}
|
|
720
|
+
})),
|
|
721
|
+
slides: snapshot.slides.map((slide, i) => ({
|
|
722
|
+
caption: slide.caption,
|
|
723
|
+
auto: slide.auto,
|
|
724
|
+
layout: slide.layout ?? "clips",
|
|
725
|
+
...slide.points ? { points: slide.points } : {},
|
|
726
|
+
items: slide.items.filter((item) => index.has(item.clipId)).map((item) => ({ clip: index.get(item.clipId), frame: item.frame })),
|
|
727
|
+
...slide.boxes?.length ? { boxes: slide.boxes.map(({ id: _id, ...box }) => (box)) } : {},
|
|
728
|
+
...slide.background ? { background: slide.background } : {},
|
|
729
|
+
...slide.notes?.trim() ? { notes: slide.notes } : {},
|
|
730
|
+
...snapshot.fingerprints?.[i] ? { fingerprint: snapshot.fingerprints[i] } : {}
|
|
731
|
+
})),
|
|
732
|
+
...usedMedia(snapshot) ? { media: usedMedia(snapshot) } : {}
|
|
733
|
+
};
|
|
734
|
+
}
|
|
735
|
+
function usedMedia(snapshot) {
|
|
736
|
+
const media = snapshot.media ?? {};
|
|
737
|
+
const keys = /* @__PURE__ */ new Set();
|
|
738
|
+
for (const clip of snapshot.clips) if (clip.media) keys.add(clip.media);
|
|
739
|
+
for (const slide of snapshot.slides) if (slide.background?.image) keys.add(slide.background.image);
|
|
740
|
+
const used = Object.fromEntries(
|
|
741
|
+
[...keys].filter((key) => media[key]).map((key) => [key, media[key]])
|
|
742
|
+
);
|
|
743
|
+
return Object.keys(used).length ? used : void 0;
|
|
744
|
+
}
|
|
745
|
+
var isNumber = (v) => typeof v === "number" && Number.isFinite(v);
|
|
746
|
+
var isRect = (v) => {
|
|
747
|
+
const r = v;
|
|
748
|
+
return !!r && isNumber(r.x) && isNumber(r.y) && isNumber(r.w) && isNumber(r.h) && r.w > 0 && r.h > 0;
|
|
749
|
+
};
|
|
750
|
+
var isFrame = (v) => {
|
|
751
|
+
const f = v;
|
|
752
|
+
return !!f && isNumber(f.x) && isNumber(f.y) && isNumber(f.w) && f.w > 0;
|
|
753
|
+
};
|
|
754
|
+
function parsePresentation(text) {
|
|
755
|
+
const data = JSON.parse(text);
|
|
756
|
+
if (data?.format !== FORMAT || data.version !== 1) throw new Error("Not a presentation file");
|
|
757
|
+
const clips = Array.isArray(data.clips) ? data.clips : [];
|
|
758
|
+
const slides = Array.isArray(data.slides) ? data.slides : [];
|
|
759
|
+
const media = data.media && typeof data.media === "object" ? Object.fromEntries(
|
|
760
|
+
Object.entries(data.media).filter(
|
|
761
|
+
([, url]) => typeof url === "string" && url.startsWith("data:image/")
|
|
762
|
+
)
|
|
763
|
+
) : {};
|
|
764
|
+
for (const clip of clips) {
|
|
765
|
+
if (!["pdf", "image", "video"].includes(clip.kind) || typeof clip.documentId !== "string" || clip.media !== void 0 && !media[clip.media] || !isRect(clip.rect) || !isNumber(clip.aspect) || !isNumber(clip.page)) {
|
|
766
|
+
throw new Error("The presentation file is damaged");
|
|
767
|
+
}
|
|
768
|
+
}
|
|
769
|
+
for (const slide of slides) {
|
|
770
|
+
if (!Array.isArray(slide.items)) throw new Error("The presentation file is damaged");
|
|
771
|
+
for (const item of slide.items) {
|
|
772
|
+
if (!isNumber(item.clip) || !clips[item.clip] || !isFrame(item.frame)) {
|
|
773
|
+
throw new Error("The presentation file is damaged");
|
|
774
|
+
}
|
|
775
|
+
}
|
|
776
|
+
}
|
|
777
|
+
return {
|
|
778
|
+
format: FORMAT,
|
|
779
|
+
version: 1,
|
|
780
|
+
title: typeof data.title === "string" ? data.title : "Presentation",
|
|
781
|
+
captions: data.captions !== false,
|
|
782
|
+
...data.theme !== void 0 ? { theme: parseTheme(data.theme) } : {},
|
|
783
|
+
...typeof data.labelColumn === "string" && data.labelColumn ? { labelColumn: data.labelColumn } : {},
|
|
784
|
+
clips,
|
|
785
|
+
slides: slides.map((slide) => {
|
|
786
|
+
const { boxes, background, fingerprint, notes, ...rest } = slide;
|
|
787
|
+
const parsedBoxes = parseBoxes(boxes);
|
|
788
|
+
const parsedBackground = parseBackground(background, media);
|
|
789
|
+
return {
|
|
790
|
+
...rest,
|
|
791
|
+
layout: SLIDE_LAYOUTS.includes(slide.layout) ? slide.layout : "clips",
|
|
792
|
+
...typeof slide.points === "string" && slide.points ? { points: slide.points } : {},
|
|
793
|
+
...parsedBoxes.length ? { boxes: parsedBoxes } : {},
|
|
794
|
+
...parsedBackground ? { background: parsedBackground } : {},
|
|
795
|
+
...typeof fingerprint === "string" ? { fingerprint } : {},
|
|
796
|
+
...typeof notes === "string" && notes.trim() ? { notes } : {}
|
|
797
|
+
};
|
|
798
|
+
}),
|
|
799
|
+
...Object.keys(media).length ? { media } : {},
|
|
800
|
+
...data.slidesStale === true ? { slidesStale: true } : {}
|
|
801
|
+
};
|
|
802
|
+
}
|
|
803
|
+
function safeFileStem(title) {
|
|
804
|
+
return title.replace(/[\\/:*?"<>|]+/g, " ").trim() || "Presentation";
|
|
805
|
+
}
|
|
806
|
+
function presentationFileName(title) {
|
|
807
|
+
return `${safeFileStem(title)}.pptx`;
|
|
808
|
+
}
|
|
809
|
+
function presentationTitle(fileName) {
|
|
810
|
+
for (const suffix of [chunkVJ5ZLRBD_cjs.PRESENTATION_FILE_SUFFIX, chunkVJ5ZLRBD_cjs.LEGACY_PRESENTATION_SUFFIX, ".pptx", ".pdf"]) {
|
|
811
|
+
if (fileName.endsWith(suffix)) return fileName.slice(0, -suffix.length);
|
|
812
|
+
}
|
|
813
|
+
return fileName;
|
|
814
|
+
}
|
|
815
|
+
|
|
816
|
+
// src/presentation/boxes.ts
|
|
817
|
+
var SLIDE_POINTS = { w: 960, h: 540 };
|
|
818
|
+
var DEFAULT_TEXT_SIZE = 18;
|
|
819
|
+
var DEFAULT_INSET = 7.2;
|
|
820
|
+
var MIN_BOX = 0.02;
|
|
821
|
+
var pointsToStage = (points) => points / SLIDE_POINTS.w;
|
|
822
|
+
var boxText = (box) => box.paragraphs.map((paragraph) => paragraph.runs.map((run) => run.text).join("")).join("\n");
|
|
823
|
+
function withText(box, text) {
|
|
824
|
+
const lines = text.split("\n");
|
|
825
|
+
const fallback = box.paragraphs[box.paragraphs.length - 1] ?? { runs: [{ text: "" }] };
|
|
826
|
+
const paragraphs = lines.map((line, index) => {
|
|
827
|
+
const before = box.paragraphs[index] ?? fallback;
|
|
828
|
+
const { text: _old, ...style } = before.runs[0] ?? { text: "" };
|
|
829
|
+
return { ...before, runs: [{ ...style, text: line }] };
|
|
830
|
+
});
|
|
831
|
+
return { ...box, paragraphs };
|
|
832
|
+
}
|
|
833
|
+
function styleRuns(box, change) {
|
|
834
|
+
return {
|
|
835
|
+
...box,
|
|
836
|
+
paragraphs: box.paragraphs.map((paragraph) => ({
|
|
837
|
+
...paragraph,
|
|
838
|
+
runs: paragraph.runs.map(change)
|
|
839
|
+
}))
|
|
840
|
+
};
|
|
841
|
+
}
|
|
842
|
+
var firstRun = (box) => box.paragraphs.find((paragraph) => paragraph.runs.length)?.runs[0];
|
|
843
|
+
var clamp2 = (value, min, max) => max < min ? (min + max) / 2 : Math.min(Math.max(value, min), max);
|
|
844
|
+
function moveBox(frame, dx, dy) {
|
|
845
|
+
return {
|
|
846
|
+
...frame,
|
|
847
|
+
x: clamp2(frame.x + dx, -frame.w / 2, 1 - frame.w / 2),
|
|
848
|
+
y: clamp2(frame.y + dy, -frame.h / 2, 1 - frame.h / 2)
|
|
849
|
+
};
|
|
850
|
+
}
|
|
851
|
+
function stretchBox(frame, handle, dx, dy) {
|
|
852
|
+
let { x, y, w, h } = frame;
|
|
853
|
+
if (handle.includes("w")) {
|
|
854
|
+
const right = x + w;
|
|
855
|
+
x = Math.min(x + dx, right - MIN_BOX);
|
|
856
|
+
w = right - x;
|
|
857
|
+
} else if (handle.includes("e")) {
|
|
858
|
+
w = Math.max(MIN_BOX, w + dx);
|
|
859
|
+
}
|
|
860
|
+
if (handle.startsWith("n")) {
|
|
861
|
+
const bottom = y + h;
|
|
862
|
+
y = Math.min(y + dy, bottom - MIN_BOX);
|
|
863
|
+
h = bottom - y;
|
|
864
|
+
} else if (handle.startsWith("s")) {
|
|
865
|
+
h = Math.max(MIN_BOX, h + dy);
|
|
866
|
+
}
|
|
867
|
+
return { x, y, w, h };
|
|
868
|
+
}
|
|
869
|
+
var sequence = 0;
|
|
870
|
+
var nextBoxId = () => `box-${Date.now().toString(36)}-${++sequence}`;
|
|
871
|
+
function newBox(shape, accent) {
|
|
872
|
+
const id = nextBoxId();
|
|
873
|
+
if (shape === "text") {
|
|
874
|
+
return {
|
|
875
|
+
id,
|
|
876
|
+
shape,
|
|
877
|
+
frame: { x: 0.3, y: 0.42, w: 0.4, h: 0.12 },
|
|
878
|
+
paragraphs: [{ runs: [{ text: "", size: 24 }] }],
|
|
879
|
+
front: true
|
|
880
|
+
};
|
|
881
|
+
}
|
|
882
|
+
if (shape === "line") {
|
|
883
|
+
return {
|
|
884
|
+
id,
|
|
885
|
+
shape,
|
|
886
|
+
frame: { x: 0.35, y: 0.5, w: 0.3, h: 0 },
|
|
887
|
+
line: { color: accent, width: 2 },
|
|
888
|
+
paragraphs: [],
|
|
889
|
+
front: true
|
|
890
|
+
};
|
|
891
|
+
}
|
|
892
|
+
return {
|
|
893
|
+
id,
|
|
894
|
+
shape,
|
|
895
|
+
frame: { x: 0.35, y: 0.35, w: 0.3, h: 0.3 },
|
|
896
|
+
fill: accent,
|
|
897
|
+
paragraphs: [{ runs: [{ text: "", size: 20, color: "#ffffff" }], align: "center" }],
|
|
898
|
+
anchor: "middle",
|
|
899
|
+
front: false
|
|
900
|
+
};
|
|
901
|
+
}
|
|
902
|
+
|
|
903
|
+
// src/presentation/store.ts
|
|
904
|
+
var MIN_CLIP_AREA = 0.02;
|
|
905
|
+
var MAX_ITEMS_PER_SLIDE = 6;
|
|
906
|
+
var AUTO_PLACE_BELOW = 2;
|
|
907
|
+
var sequence2 = 0;
|
|
908
|
+
var nextId = (kind) => `${kind}-${Date.now().toString(36)}-${++sequence2}`;
|
|
909
|
+
var emptySlide = (layout = "clips") => ({
|
|
910
|
+
id: nextId("slide"),
|
|
911
|
+
items: [],
|
|
912
|
+
auto: true,
|
|
913
|
+
caption: "",
|
|
914
|
+
layout,
|
|
915
|
+
points: "",
|
|
916
|
+
boxes: []
|
|
917
|
+
});
|
|
918
|
+
var initialState = () => ({
|
|
919
|
+
clips: [],
|
|
920
|
+
slides: [emptySlide()],
|
|
921
|
+
current: 0,
|
|
922
|
+
blank: false,
|
|
923
|
+
captions: true,
|
|
924
|
+
theme: DEFAULT_THEME,
|
|
925
|
+
logoImage: null,
|
|
926
|
+
labelColumn: null,
|
|
927
|
+
columnValues: {},
|
|
928
|
+
presenting: false,
|
|
929
|
+
dragging: null,
|
|
930
|
+
notice: null,
|
|
931
|
+
title: "Untitled presentation",
|
|
932
|
+
savedId: null,
|
|
933
|
+
version: null,
|
|
934
|
+
boundTo: null,
|
|
935
|
+
clean: null,
|
|
936
|
+
media: {}
|
|
937
|
+
});
|
|
938
|
+
function arranged(slide, clips, look) {
|
|
939
|
+
const aspects = slide.items.map((item) => aspectOf(clips, item.clipId));
|
|
940
|
+
const frames = autoLayout(aspects, reserveOf(slide, look));
|
|
941
|
+
return {
|
|
942
|
+
...slide,
|
|
943
|
+
auto: true,
|
|
944
|
+
items: slide.items.map((item, i) => ({ ...item, frame: frames[i] }))
|
|
945
|
+
};
|
|
946
|
+
}
|
|
947
|
+
var reserveOf = (slide, look) => slideGeometry(slide, { labels: look.captions, logo: look.theme.logo?.corner ?? null }).reserve;
|
|
948
|
+
function aspectOf(clips, clipId) {
|
|
949
|
+
return clips.find((clip) => clip.id === clipId)?.aspect ?? 1;
|
|
950
|
+
}
|
|
951
|
+
var usePresentation = zustand.create()((set, get) => {
|
|
952
|
+
const updateSlide = (change, at) => set((state) => {
|
|
953
|
+
const index = at ?? state.current;
|
|
954
|
+
const slide = state.slides[index];
|
|
955
|
+
if (!slide) return state;
|
|
956
|
+
const next = change(slide, state.clips);
|
|
957
|
+
if (next === slide) return state;
|
|
958
|
+
const slides = state.slides.slice();
|
|
959
|
+
slides[index] = next.auto ? arranged(next, state.clips, state) : next;
|
|
960
|
+
return { slides };
|
|
961
|
+
});
|
|
962
|
+
const updateBoxes = (boxId, change) => set((state) => {
|
|
963
|
+
const index = state.slides.findIndex((slide2) => slide2.boxes.some((box) => box.id === boxId));
|
|
964
|
+
if (index < 0) return state;
|
|
965
|
+
const slide = state.slides[index];
|
|
966
|
+
const slides = state.slides.slice();
|
|
967
|
+
slides[index] = {
|
|
968
|
+
...slide,
|
|
969
|
+
boxes: change(
|
|
970
|
+
slide.boxes,
|
|
971
|
+
slide.boxes.findIndex((box) => box.id === boxId)
|
|
972
|
+
)
|
|
973
|
+
};
|
|
974
|
+
return { slides };
|
|
975
|
+
});
|
|
976
|
+
const restack = (clipId, to) => set((state) => {
|
|
977
|
+
const slide = state.slides[state.current];
|
|
978
|
+
const item = slide?.items.find((entry) => entry.clipId === clipId);
|
|
979
|
+
if (!slide || !item) return state;
|
|
980
|
+
const rest = slide.items.filter((entry) => entry !== item);
|
|
981
|
+
const items = to === "front" ? [...rest, item] : [item, ...rest];
|
|
982
|
+
if (items.every((entry, i) => entry === slide.items[i])) return state;
|
|
983
|
+
const slides = state.slides.slice();
|
|
984
|
+
slides[state.current] = { ...slide, items };
|
|
985
|
+
return { slides };
|
|
986
|
+
});
|
|
987
|
+
return {
|
|
988
|
+
...initialState(),
|
|
989
|
+
addClip(clip) {
|
|
990
|
+
const id = nextId("clip");
|
|
991
|
+
const full = {
|
|
992
|
+
...clip,
|
|
993
|
+
id,
|
|
994
|
+
caption: clip.caption ?? defaultCaption(clip.fileName, clip.page),
|
|
995
|
+
zoomBase: clip.zoomBase ?? clip.rect.w
|
|
996
|
+
};
|
|
997
|
+
set((state) => ({ clips: [...state.clips, full] }));
|
|
998
|
+
const slide = get().slides[get().current];
|
|
999
|
+
if (slide && slide.items.length < AUTO_PLACE_BELOW) get().place(id);
|
|
1000
|
+
return id;
|
|
1001
|
+
},
|
|
1002
|
+
removeClip(clipId) {
|
|
1003
|
+
const { clips, slides } = get();
|
|
1004
|
+
const removed = clips.find((clip) => clip.id === clipId);
|
|
1005
|
+
if (!removed) return;
|
|
1006
|
+
const rest = clips.filter((clip) => clip.id !== clipId);
|
|
1007
|
+
set({
|
|
1008
|
+
clips: rest,
|
|
1009
|
+
slides: slides.map((slide) => {
|
|
1010
|
+
if (!slide.items.some((item) => item.clipId === clipId)) return slide;
|
|
1011
|
+
const next = { ...slide, items: slide.items.filter((item) => item.clipId !== clipId) };
|
|
1012
|
+
return next.auto ? arranged(next, rest, get()) : next;
|
|
1013
|
+
})
|
|
1014
|
+
});
|
|
1015
|
+
if (!rest.some((clip) => clip.source === removed.source))
|
|
1016
|
+
viewers.releasePdfRegionSource(removed.source);
|
|
1017
|
+
},
|
|
1018
|
+
setCaption: (clipId, caption) => set((state) => ({
|
|
1019
|
+
clips: state.clips.map((clip) => clip.id === clipId ? { ...clip, caption } : clip)
|
|
1020
|
+
})),
|
|
1021
|
+
place: (clipId, at) => updateSlide((slide, clips) => {
|
|
1022
|
+
if (!clips.some((clip) => clip.id === clipId)) return slide;
|
|
1023
|
+
const others = slide.items.filter((item) => item.clipId !== clipId);
|
|
1024
|
+
if (!at && others.length < slide.items.length) return slide;
|
|
1025
|
+
if (others.length >= MAX_ITEMS_PER_SLIDE) return slide;
|
|
1026
|
+
const aspect = aspectOf(clips, clipId);
|
|
1027
|
+
const frame = slide.auto ? fitFrame(aspect) : dropFrame(aspect, at ?? { x: 0.5, y: 0.5 });
|
|
1028
|
+
return { ...slide, items: [...others, { clipId, frame }] };
|
|
1029
|
+
}),
|
|
1030
|
+
unplace: (clipId) => updateSlide(
|
|
1031
|
+
(slide) => slide.items.some((item) => item.clipId === clipId) ? { ...slide, items: slide.items.filter((item) => item.clipId !== clipId) } : slide
|
|
1032
|
+
),
|
|
1033
|
+
setFrame: (clipId, frame) => updateSlide((slide) => ({
|
|
1034
|
+
...slide,
|
|
1035
|
+
auto: false,
|
|
1036
|
+
items: slide.items.map((item) => item.clipId === clipId ? { ...item, frame } : item)
|
|
1037
|
+
})),
|
|
1038
|
+
applyFrame(clipId, command) {
|
|
1039
|
+
const slide = get().slides[get().current];
|
|
1040
|
+
const item = slide?.items.find((entry) => entry.clipId === clipId);
|
|
1041
|
+
if (!item) return;
|
|
1042
|
+
const aspect = aspectOf(get().clips, clipId);
|
|
1043
|
+
const reserve = reserveOf(slide, get());
|
|
1044
|
+
const frame = command === "fullWidth" ? fullWidthFrame(item.frame, aspect, reserve) : command === "fullHeight" ? fullHeightFrame(item.frame, aspect, reserve) : fitFrame(aspect, reserve);
|
|
1045
|
+
get().setFrame(clipId, frame);
|
|
1046
|
+
get().bringToFront(clipId);
|
|
1047
|
+
},
|
|
1048
|
+
bringToFront: (clipId) => restack(clipId, "front"),
|
|
1049
|
+
sendToBack: (clipId) => restack(clipId, "back"),
|
|
1050
|
+
panClip: (clipId, dx, dy) => set((state) => {
|
|
1051
|
+
const clip = state.clips.find((entry) => entry.id === clipId);
|
|
1052
|
+
if (!clip) return state;
|
|
1053
|
+
const { rect } = clip;
|
|
1054
|
+
const x = Math.min(Math.max(rect.x + dx, 0), 1 - rect.w);
|
|
1055
|
+
const y = Math.min(Math.max(rect.y + dy, 0), 1 - rect.h);
|
|
1056
|
+
if (x === rect.x && y === rect.y) return state;
|
|
1057
|
+
return {
|
|
1058
|
+
clips: state.clips.map(
|
|
1059
|
+
(entry) => entry === clip ? { ...clip, rect: { ...rect, x, y } } : entry
|
|
1060
|
+
)
|
|
1061
|
+
};
|
|
1062
|
+
}),
|
|
1063
|
+
zoomClip: (clipId, factor) => set((state) => {
|
|
1064
|
+
const clip = state.clips.find((entry) => entry.id === clipId);
|
|
1065
|
+
if (!clip || !(factor > 0)) return state;
|
|
1066
|
+
const { rect } = clip;
|
|
1067
|
+
const largest = Math.min(1 / rect.w, 1 / rect.h);
|
|
1068
|
+
const smallest = Math.max(MIN_CLIP_AREA / rect.w, MIN_CLIP_AREA / rect.h);
|
|
1069
|
+
const scale = Math.min(Math.max(1 / factor, smallest), largest);
|
|
1070
|
+
if (scale === 1) return state;
|
|
1071
|
+
const w = rect.w * scale;
|
|
1072
|
+
const h = rect.h * scale;
|
|
1073
|
+
const x = Math.min(Math.max(rect.x + (rect.w - w) / 2, 0), 1 - w);
|
|
1074
|
+
const y = Math.min(Math.max(rect.y + (rect.h - h) / 2, 0), 1 - h);
|
|
1075
|
+
return {
|
|
1076
|
+
clips: state.clips.map(
|
|
1077
|
+
(entry) => entry === clip ? { ...clip, rect: { x, y, w, h } } : entry
|
|
1078
|
+
)
|
|
1079
|
+
};
|
|
1080
|
+
}),
|
|
1081
|
+
setClipZoom(clipId, percent) {
|
|
1082
|
+
const clip = get().clips.find((entry) => entry.id === clipId);
|
|
1083
|
+
if (!clip || !(percent > 0)) return;
|
|
1084
|
+
const width = (clip.zoomBase ?? clip.rect.w) / (percent / 100);
|
|
1085
|
+
get().zoomClip(clipId, clip.rect.w / width);
|
|
1086
|
+
},
|
|
1087
|
+
align(clipId, alignment) {
|
|
1088
|
+
const slide = get().slides[get().current];
|
|
1089
|
+
const item = slide?.items.find((entry) => entry.clipId === clipId);
|
|
1090
|
+
if (!slide || !item) return;
|
|
1091
|
+
const aspect = aspectOf(get().clips, clipId);
|
|
1092
|
+
get().setFrame(clipId, alignFrame(item.frame, aspect, alignment, reserveOf(slide, get())));
|
|
1093
|
+
},
|
|
1094
|
+
nudge(clipId, dx, dy) {
|
|
1095
|
+
const slide = get().slides[get().current];
|
|
1096
|
+
const item = slide?.items.find((entry) => entry.clipId === clipId);
|
|
1097
|
+
if (!item) return;
|
|
1098
|
+
const aspect = aspectOf(get().clips, clipId);
|
|
1099
|
+
get().setFrame(clipId, moveFrame(item.frame, aspect, dx, dy, [], true).frame);
|
|
1100
|
+
},
|
|
1101
|
+
// An auto slide makes (or gives back) the caption's room; one arranged by hand keeps its places.
|
|
1102
|
+
// A blank slide's title is its title box's text.
|
|
1103
|
+
setSlideCaption: (caption, index) => updateSlide(
|
|
1104
|
+
(slide) => ({
|
|
1105
|
+
...slide,
|
|
1106
|
+
caption,
|
|
1107
|
+
boxes: slide.boxes.map((box) => box.role === "title" ? withText(box, caption) : box)
|
|
1108
|
+
}),
|
|
1109
|
+
index
|
|
1110
|
+
),
|
|
1111
|
+
setSlideLayout: (layout, index) => updateSlide((slide) => ({ ...slide, layout, auto: true }), index),
|
|
1112
|
+
setSlidePoints: (points, index) => updateSlide((slide) => ({ ...slide, points }), index),
|
|
1113
|
+
setTheme: (change) => set((state) => {
|
|
1114
|
+
const theme = { ...state.theme, ...change };
|
|
1115
|
+
const logoMoved = (theme.logo?.corner ?? null) !== (state.theme.logo?.corner ?? null);
|
|
1116
|
+
return {
|
|
1117
|
+
theme,
|
|
1118
|
+
...theme.logo?.documentId !== state.theme.logo?.documentId ? { logoImage: null } : {},
|
|
1119
|
+
slides: logoMoved ? state.slides.map(
|
|
1120
|
+
(slide) => slide.auto ? arranged(slide, state.clips, { ...state, theme }) : slide
|
|
1121
|
+
) : state.slides
|
|
1122
|
+
};
|
|
1123
|
+
}),
|
|
1124
|
+
setLogoImage: (logoImage) => set({ logoImage }),
|
|
1125
|
+
arrange: () => updateSlide((slide) => ({ ...slide, auto: true })),
|
|
1126
|
+
addSlide: (layout, after) => set((state) => {
|
|
1127
|
+
const at = (after ?? state.current) + 1;
|
|
1128
|
+
const slides = state.slides.slice();
|
|
1129
|
+
const before = state.slides[at - 1];
|
|
1130
|
+
const slide = emptySlide(layout ?? before?.layout ?? "clips");
|
|
1131
|
+
slides.splice(
|
|
1132
|
+
at,
|
|
1133
|
+
0,
|
|
1134
|
+
before?.background ? { ...slide, background: before.background } : slide
|
|
1135
|
+
);
|
|
1136
|
+
return { slides, current: at };
|
|
1137
|
+
}),
|
|
1138
|
+
removeSlide: (index) => set((state) => {
|
|
1139
|
+
const target = index ?? state.current;
|
|
1140
|
+
if (state.slides.length <= 1) return { slides: [emptySlide()], current: 0 };
|
|
1141
|
+
const slides = state.slides.filter((_, i) => i !== target);
|
|
1142
|
+
const current = state.current > target ? state.current - 1 : state.current;
|
|
1143
|
+
return { slides, current: Math.min(current, slides.length - 1) };
|
|
1144
|
+
}),
|
|
1145
|
+
duplicateSlide: (index) => set((state) => {
|
|
1146
|
+
const slide = state.slides[index];
|
|
1147
|
+
if (!slide) return state;
|
|
1148
|
+
const slides = state.slides.slice();
|
|
1149
|
+
slides.splice(index + 1, 0, {
|
|
1150
|
+
...slide,
|
|
1151
|
+
id: nextId("slide"),
|
|
1152
|
+
items: slide.items.map((item) => ({ ...item, frame: { ...item.frame } })),
|
|
1153
|
+
boxes: slide.boxes.map((box) => ({ ...box, id: nextBoxId() }))
|
|
1154
|
+
});
|
|
1155
|
+
return { slides, current: index + 1 };
|
|
1156
|
+
}),
|
|
1157
|
+
moveSlide: (index, to) => set((state) => {
|
|
1158
|
+
if (to < 0 || to >= state.slides.length || index === to || !state.slides[index]) {
|
|
1159
|
+
return state;
|
|
1160
|
+
}
|
|
1161
|
+
const slides = state.slides.slice();
|
|
1162
|
+
const [slide] = slides.splice(index, 1);
|
|
1163
|
+
slides.splice(to, 0, slide);
|
|
1164
|
+
return { slides, current: to };
|
|
1165
|
+
}),
|
|
1166
|
+
goTo: (index) => set(
|
|
1167
|
+
(state) => index < 0 || index >= state.slides.length || index === state.current ? state : { current: index }
|
|
1168
|
+
),
|
|
1169
|
+
setBlank: (blank) => set({ blank }),
|
|
1170
|
+
// Slides arranged automatically make (or give back) the captions' room.
|
|
1171
|
+
setCaptions: (captions) => set((state) => ({
|
|
1172
|
+
captions,
|
|
1173
|
+
slides: state.slides.map(
|
|
1174
|
+
(slide) => slide.auto ? arranged(slide, state.clips, { ...state, captions }) : slide
|
|
1175
|
+
)
|
|
1176
|
+
})),
|
|
1177
|
+
setLabelColumn: (labelColumn) => set({ labelColumn }),
|
|
1178
|
+
setColumnValues: (columnValues) => set({ columnValues }),
|
|
1179
|
+
setPresenting: (presenting) => set({ presenting }),
|
|
1180
|
+
setDragging: (dragging) => set({ dragging }),
|
|
1181
|
+
setTitle: (title) => set({ title }),
|
|
1182
|
+
notify: (text, kind) => set({ notice: { text, kind, id: ++sequence2 } }),
|
|
1183
|
+
clearNotice: (id) => set((state) => state.notice?.id === id ? { notice: null } : state),
|
|
1184
|
+
cropClip: (clipId, rect, aspect) => set((state) => {
|
|
1185
|
+
const clips = state.clips.map(
|
|
1186
|
+
(clip) => clip.id === clipId ? { ...clip, rect, aspect } : clip
|
|
1187
|
+
);
|
|
1188
|
+
return {
|
|
1189
|
+
clips,
|
|
1190
|
+
// Its shape changed: slides arranged automatically arrange again around it.
|
|
1191
|
+
slides: state.slides.map(
|
|
1192
|
+
(slide) => slide.auto && slide.items.some((item) => item.clipId === clipId) ? arranged(slide, clips, state) : slide
|
|
1193
|
+
)
|
|
1194
|
+
};
|
|
1195
|
+
}),
|
|
1196
|
+
reshapeClip: (clipId, frame, rect, aspect) => set((state) => {
|
|
1197
|
+
const clip = state.clips.find((entry) => entry.id === clipId);
|
|
1198
|
+
if (!clip) return state;
|
|
1199
|
+
const zoomBase = (clip.zoomBase ?? clip.rect.w) * rect.w / clip.rect.w;
|
|
1200
|
+
const clips = state.clips.map(
|
|
1201
|
+
(entry) => entry === clip ? { ...clip, rect, aspect, zoomBase } : entry
|
|
1202
|
+
);
|
|
1203
|
+
return {
|
|
1204
|
+
clips,
|
|
1205
|
+
slides: state.slides.map((slide, index) => {
|
|
1206
|
+
if (index === state.current) {
|
|
1207
|
+
return {
|
|
1208
|
+
...slide,
|
|
1209
|
+
auto: false,
|
|
1210
|
+
items: slide.items.map(
|
|
1211
|
+
(item) => item.clipId === clipId ? { ...item, frame } : item
|
|
1212
|
+
)
|
|
1213
|
+
};
|
|
1214
|
+
}
|
|
1215
|
+
return slide.auto && slide.items.some((item) => item.clipId === clipId) ? arranged(slide, clips, state) : slide;
|
|
1216
|
+
})
|
|
1217
|
+
};
|
|
1218
|
+
}),
|
|
1219
|
+
addBox(box, index) {
|
|
1220
|
+
const id = nextBoxId();
|
|
1221
|
+
updateSlide((slide) => ({ ...slide, boxes: [...slide.boxes, { ...box, id }] }), index);
|
|
1222
|
+
return id;
|
|
1223
|
+
},
|
|
1224
|
+
updateBox: (boxId, change) => updateBoxes(boxId, (boxes, at) => {
|
|
1225
|
+
const next = boxes.slice();
|
|
1226
|
+
next[at] = change(boxes[at]);
|
|
1227
|
+
return next;
|
|
1228
|
+
}),
|
|
1229
|
+
setBoxText(boxId, text) {
|
|
1230
|
+
get().updateBox(boxId, (box) => withText(box, text));
|
|
1231
|
+
set((state) => ({
|
|
1232
|
+
slides: state.slides.map(
|
|
1233
|
+
(slide) => slide.boxes.some((box) => box.id === boxId && box.role === "title") ? { ...slide, caption: text.replace(/\s*\n\s*/g, " ").trim() } : slide
|
|
1234
|
+
)
|
|
1235
|
+
}));
|
|
1236
|
+
},
|
|
1237
|
+
removeBox: (boxId) => updateBoxes(boxId, (boxes, at) => boxes.filter((_, i) => i !== at)),
|
|
1238
|
+
restackBox: (boxId, to) => updateBoxes(boxId, (boxes, at) => {
|
|
1239
|
+
const box = { ...boxes[at], front: to === "front" };
|
|
1240
|
+
const rest = boxes.filter((_, i) => i !== at);
|
|
1241
|
+
return to === "front" ? [...rest, box] : [box, ...rest];
|
|
1242
|
+
}),
|
|
1243
|
+
setSlideNotes: (notes, index) => updateSlide((slide) => ({ ...slide, notes }), index),
|
|
1244
|
+
setSlideBackground: (background, index) => updateSlide((slide) => {
|
|
1245
|
+
const { background: _old, ...rest } = slide;
|
|
1246
|
+
return background ? { ...rest, background } : rest;
|
|
1247
|
+
}, index),
|
|
1248
|
+
setSaved: (savedId, title, version = null) => {
|
|
1249
|
+
set({ savedId, title, boundTo: savedId, version });
|
|
1250
|
+
set({ clean: snapshotOf(get()) });
|
|
1251
|
+
},
|
|
1252
|
+
bind: (boundTo) => set({ boundTo }),
|
|
1253
|
+
adoptClips: (adopted) => set((state) => ({
|
|
1254
|
+
clips: [
|
|
1255
|
+
...state.clips,
|
|
1256
|
+
...adopted.filter((clip) => !state.clips.some((entry) => entry.id === clip.id))
|
|
1257
|
+
]
|
|
1258
|
+
})),
|
|
1259
|
+
load(opened) {
|
|
1260
|
+
get().reset();
|
|
1261
|
+
const clips = opened.clips.map((clip) => ({ ...clip, id: nextId("clip") }));
|
|
1262
|
+
const slides = opened.slides.map((slide) => ({
|
|
1263
|
+
id: nextId("slide"),
|
|
1264
|
+
caption: slide.caption,
|
|
1265
|
+
auto: slide.auto,
|
|
1266
|
+
layout: slide.layout ?? "clips",
|
|
1267
|
+
points: slide.points ?? "",
|
|
1268
|
+
// Items whose clip could not be opened are left out.
|
|
1269
|
+
items: slide.items.filter((item) => clips[item.clip]).map((item) => ({ clipId: clips[item.clip].id, frame: item.frame })),
|
|
1270
|
+
boxes: (slide.boxes ?? []).map((box) => ({ ...box, id: nextBoxId() })),
|
|
1271
|
+
...slide.background ? { background: slide.background } : {},
|
|
1272
|
+
...slide.notes ? { notes: slide.notes } : {}
|
|
1273
|
+
}));
|
|
1274
|
+
set({
|
|
1275
|
+
title: opened.title,
|
|
1276
|
+
savedId: opened.savedId,
|
|
1277
|
+
version: opened.version ?? null,
|
|
1278
|
+
boundTo: opened.boundTo ?? opened.savedId,
|
|
1279
|
+
captions: opened.captions,
|
|
1280
|
+
labelColumn: opened.labelColumn ?? null,
|
|
1281
|
+
theme: opened.theme ?? DEFAULT_THEME,
|
|
1282
|
+
clips,
|
|
1283
|
+
slides: slides.length ? slides : [emptySlide()],
|
|
1284
|
+
current: 0,
|
|
1285
|
+
media: opened.media ?? {}
|
|
1286
|
+
});
|
|
1287
|
+
set({ clean: opened.savedId ? snapshotOf(get()) : null });
|
|
1288
|
+
},
|
|
1289
|
+
reset() {
|
|
1290
|
+
for (const source of new Set(get().clips.map((clip) => clip.source))) {
|
|
1291
|
+
viewers.releasePdfRegionSource(source);
|
|
1292
|
+
}
|
|
1293
|
+
set(initialState());
|
|
1294
|
+
}
|
|
1295
|
+
};
|
|
1296
|
+
});
|
|
1297
|
+
var currentSlide = (state) => state.slides[state.current];
|
|
1298
|
+
function snapshotOf(state) {
|
|
1299
|
+
return JSON.stringify(serializePresentation({ ...state, media: void 0 }));
|
|
1300
|
+
}
|
|
1301
|
+
function hasUnsavedChanges(state) {
|
|
1302
|
+
if (state.clean !== null) return snapshotOf(state) !== state.clean;
|
|
1303
|
+
return state.clips.length > 0 || state.slides.some(
|
|
1304
|
+
(slide) => slide.items.length || slide.boxes.length || slide.caption.trim() || slide.points.trim()
|
|
1305
|
+
);
|
|
1306
|
+
}
|
|
1307
|
+
|
|
1308
|
+
exports.ACCENTS = ACCENTS;
|
|
1309
|
+
exports.BACKGROUNDS = BACKGROUNDS;
|
|
1310
|
+
exports.DEFAULT_INSET = DEFAULT_INSET;
|
|
1311
|
+
exports.DEFAULT_TEXT_SIZE = DEFAULT_TEXT_SIZE;
|
|
1312
|
+
exports.DEFAULT_THEME = DEFAULT_THEME;
|
|
1313
|
+
exports.EXPORTS_FOLDER = EXPORTS_FOLDER;
|
|
1314
|
+
exports.FONTS = FONTS;
|
|
1315
|
+
exports.LAYOUT_INFO = LAYOUT_INFO;
|
|
1316
|
+
exports.PRESENTATIONS_FOLDER = PRESENTATIONS_FOLDER;
|
|
1317
|
+
exports.PRESENTATION_ATTACHMENT = PRESENTATION_ATTACHMENT;
|
|
1318
|
+
exports.SLIDE_LAYOUTS = SLIDE_LAYOUTS;
|
|
1319
|
+
exports.SLIDE_POINTS = SLIDE_POINTS;
|
|
1320
|
+
exports.STAGE_ASPECT = STAGE_ASPECT;
|
|
1321
|
+
exports.STAGE_MARGIN = STAGE_MARGIN;
|
|
1322
|
+
exports.TEMPLATES_FOLDER = TEMPLATES_FOLDER;
|
|
1323
|
+
exports.TEXT_COLORS = TEXT_COLORS;
|
|
1324
|
+
exports.accentColor = accentColor;
|
|
1325
|
+
exports.backgroundCss = backgroundCss;
|
|
1326
|
+
exports.boxText = boxText;
|
|
1327
|
+
exports.clipEdgeCss = clipEdgeCss;
|
|
1328
|
+
exports.clipLabel = clipLabel;
|
|
1329
|
+
exports.currentSlide = currentSlide;
|
|
1330
|
+
exports.firstRun = firstRun;
|
|
1331
|
+
exports.formatTime = formatTime;
|
|
1332
|
+
exports.frameHeight = frameHeight;
|
|
1333
|
+
exports.hasUnsavedChanges = hasUnsavedChanges;
|
|
1334
|
+
exports.isHexColor = isHexColor;
|
|
1335
|
+
exports.isLightBackground = isLightBackground;
|
|
1336
|
+
exports.mediaCaption = mediaCaption;
|
|
1337
|
+
exports.moveBox = moveBox;
|
|
1338
|
+
exports.moveFrame = moveFrame;
|
|
1339
|
+
exports.newBox = newBox;
|
|
1340
|
+
exports.paintBackground = paintBackground;
|
|
1341
|
+
exports.paintClipEdge = paintClipEdge;
|
|
1342
|
+
exports.paintSlideBackground = paintSlideBackground;
|
|
1343
|
+
exports.parsePresentation = parsePresentation;
|
|
1344
|
+
exports.pointsToStage = pointsToStage;
|
|
1345
|
+
exports.presentationFileName = presentationFileName;
|
|
1346
|
+
exports.presentationTitle = presentationTitle;
|
|
1347
|
+
exports.reshapeFrame = reshapeFrame;
|
|
1348
|
+
exports.resizeFrame = resizeFrame;
|
|
1349
|
+
exports.safeFileStem = safeFileStem;
|
|
1350
|
+
exports.serializePresentation = serializePresentation;
|
|
1351
|
+
exports.slideBackgroundCss = slideBackgroundCss;
|
|
1352
|
+
exports.slideGeometry = slideGeometry;
|
|
1353
|
+
exports.stretchBox = stretchBox;
|
|
1354
|
+
exports.styleRuns = styleRuns;
|
|
1355
|
+
exports.textLines = textLines;
|
|
1356
|
+
exports.usePresentation = usePresentation;
|
|
1357
|
+
//# sourceMappingURL=chunk-XTR26TNE.cjs.map
|
|
1358
|
+
//# sourceMappingURL=chunk-XTR26TNE.cjs.map
|