@dxos/plugin-deck 0.8.4-main.72ec0f3 → 0.8.4-main.7996785055
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/lib/browser/Banner-TJ4ZQ7A6.mjs +16 -0
- package/dist/lib/browser/Banner-TJ4ZQ7A6.mjs.map +7 -0
- package/dist/lib/browser/DeckSettings-CZ3KWAXT.mjs +96 -0
- package/dist/lib/browser/DeckSettings-CZ3KWAXT.mjs.map +7 -0
- package/dist/lib/browser/add-toast-XOLZDESF.mjs +24 -0
- package/dist/lib/browser/add-toast-XOLZDESF.mjs.map +7 -0
- package/dist/lib/browser/adjust-N4YCWW3J.mjs +96 -0
- package/dist/lib/browser/adjust-N4YCWW3J.mjs.map +7 -0
- package/dist/lib/browser/app-graph-builder-34HXGUI2.mjs +123 -0
- package/dist/lib/browser/app-graph-builder-34HXGUI2.mjs.map +7 -0
- package/dist/lib/browser/change-companion-ONLIPI6F.mjs +34 -0
- package/dist/lib/browser/change-companion-ONLIPI6F.mjs.map +7 -0
- package/dist/lib/browser/check-app-scheme-72BBQSF6.mjs +33 -0
- package/dist/lib/browser/check-app-scheme-72BBQSF6.mjs.map +7 -0
- package/dist/lib/browser/chunk-26ZKVZIN.mjs +112 -0
- package/dist/lib/browser/chunk-26ZKVZIN.mjs.map +7 -0
- package/dist/lib/browser/chunk-4RO3FRCR.mjs +187 -0
- package/dist/lib/browser/chunk-4RO3FRCR.mjs.map +7 -0
- package/dist/lib/browser/chunk-4TLX2UGY.mjs +88 -0
- package/dist/lib/browser/chunk-4TLX2UGY.mjs.map +7 -0
- package/dist/lib/browser/chunk-J6OERAED.mjs +69 -0
- package/dist/lib/browser/chunk-J6OERAED.mjs.map +7 -0
- package/dist/lib/browser/chunk-PPM7LZSC.mjs +8 -0
- package/dist/lib/browser/chunk-PPM7LZSC.mjs.map +7 -0
- package/dist/lib/browser/chunk-RCLJGMR7.mjs +1417 -0
- package/dist/lib/browser/chunk-RCLJGMR7.mjs.map +7 -0
- package/dist/lib/browser/{chunk-UXLU6CMW.mjs → chunk-UN7XQWDE.mjs} +9 -2
- package/dist/lib/browser/chunk-UN7XQWDE.mjs.map +7 -0
- package/dist/lib/browser/{chunk-F3VCCHVL.mjs → chunk-WZXKWTDN.mjs} +74 -35
- package/dist/lib/browser/chunk-WZXKWTDN.mjs.map +7 -0
- package/dist/lib/browser/chunk-YAAXLCVX.mjs +30 -0
- package/dist/lib/browser/chunk-YAAXLCVX.mjs.map +7 -0
- package/dist/lib/browser/close-SPUQQH2F.mjs +44 -0
- package/dist/lib/browser/close-SPUQQH2F.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +77 -76
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/open-2DK2GFUW.mjs +95 -0
- package/dist/lib/browser/open-2DK2GFUW.mjs.map +7 -0
- package/dist/lib/browser/operation-handler-ETCDHJUK.mjs +16 -0
- package/dist/lib/browser/operation-handler-ETCDHJUK.mjs.map +7 -0
- package/dist/lib/browser/operations/index.mjs +12 -0
- package/dist/lib/browser/react-root-2IXL32LF.mjs +50 -0
- package/dist/lib/browser/react-root-2IXL32LF.mjs.map +7 -0
- package/dist/lib/browser/react-surface-LMALTBUM.mjs +44 -0
- package/dist/lib/browser/react-surface-LMALTBUM.mjs.map +7 -0
- package/dist/lib/browser/revert-workspace-NIXRKBAQ.mjs +21 -0
- package/dist/lib/browser/revert-workspace-NIXRKBAQ.mjs.map +7 -0
- package/dist/lib/browser/scroll-into-view-QUORIGE3.mjs +21 -0
- package/dist/lib/browser/scroll-into-view-QUORIGE3.mjs.map +7 -0
- package/dist/lib/browser/set-GKTHE4IZ.mjs +37 -0
- package/dist/lib/browser/set-GKTHE4IZ.mjs.map +7 -0
- package/dist/lib/browser/set-layout-mode-TRWCEJAO.mjs +91 -0
- package/dist/lib/browser/set-layout-mode-TRWCEJAO.mjs.map +7 -0
- package/dist/lib/browser/settings-3MYJVL5V.mjs +40 -0
- package/dist/lib/browser/settings-3MYJVL5V.mjs.map +7 -0
- package/dist/lib/browser/show-undo-OSWJQUSO.mjs +60 -0
- package/dist/lib/browser/show-undo-OSWJQUSO.mjs.map +7 -0
- package/dist/lib/browser/state-CFEZH3DH.mjs +100 -0
- package/dist/lib/browser/state-CFEZH3DH.mjs.map +7 -0
- package/dist/lib/browser/switch-workspace-JXIYKYFR.mjs +68 -0
- package/dist/lib/browser/switch-workspace-JXIYKYFR.mjs.map +7 -0
- package/dist/lib/browser/types/index.mjs +12 -8
- package/dist/lib/browser/update-complementary-IDQANYVM.mjs +28 -0
- package/dist/lib/browser/update-complementary-IDQANYVM.mjs.map +7 -0
- package/dist/lib/browser/update-dialog-LEF6XOAA.mjs +29 -0
- package/dist/lib/browser/update-dialog-LEF6XOAA.mjs.map +7 -0
- package/dist/lib/browser/update-plank-size-VMGJQJKT.mjs +28 -0
- package/dist/lib/browser/update-plank-size-VMGJQJKT.mjs.map +7 -0
- package/dist/lib/browser/update-popover-HLFD3DXD.mjs +33 -0
- package/dist/lib/browser/update-popover-HLFD3DXD.mjs.map +7 -0
- package/dist/lib/browser/update-sidebar-NJ3PB2Z4.mjs +25 -0
- package/dist/lib/browser/update-sidebar-NJ3PB2Z4.mjs.map +7 -0
- package/dist/lib/browser/url-handler-2QE6C6KP.mjs +106 -0
- package/dist/lib/browser/url-handler-2QE6C6KP.mjs.map +7 -0
- package/dist/lib/node-esm/Banner-3Y6W3VK3.mjs +17 -0
- package/dist/lib/node-esm/Banner-3Y6W3VK3.mjs.map +7 -0
- package/dist/lib/node-esm/DeckSettings-ULPBDAT3.mjs +97 -0
- package/dist/lib/node-esm/DeckSettings-ULPBDAT3.mjs.map +7 -0
- package/dist/lib/node-esm/add-toast-HQEPHXHX.mjs +25 -0
- package/dist/lib/node-esm/add-toast-HQEPHXHX.mjs.map +7 -0
- package/dist/lib/node-esm/adjust-MR6Z7HI3.mjs +97 -0
- package/dist/lib/node-esm/adjust-MR6Z7HI3.mjs.map +7 -0
- package/dist/lib/node-esm/app-graph-builder-4BD6BABT.mjs +124 -0
- package/dist/lib/node-esm/app-graph-builder-4BD6BABT.mjs.map +7 -0
- package/dist/lib/node-esm/change-companion-JJ6MFJYZ.mjs +35 -0
- package/dist/lib/node-esm/change-companion-JJ6MFJYZ.mjs.map +7 -0
- package/dist/lib/node-esm/check-app-scheme-NNJD4MJ3.mjs +34 -0
- package/dist/lib/node-esm/check-app-scheme-NNJD4MJ3.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-2K2OUSFN.mjs +10 -0
- package/dist/lib/node-esm/chunk-2K2OUSFN.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-3QUPGLN4.mjs +188 -0
- package/dist/lib/node-esm/chunk-3QUPGLN4.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-4EIUXR64.mjs +71 -0
- package/dist/lib/node-esm/chunk-4EIUXR64.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-4NLQZESJ.mjs +89 -0
- package/dist/lib/node-esm/chunk-4NLQZESJ.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-CMISPQAO.mjs +24 -0
- package/dist/lib/node-esm/chunk-CMISPQAO.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-HM4KJZ6L.mjs +1418 -0
- package/dist/lib/node-esm/chunk-HM4KJZ6L.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-J2AFCKMH.mjs +202 -0
- package/dist/lib/node-esm/chunk-J2AFCKMH.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-WD6BJV6B.mjs +32 -0
- package/dist/lib/node-esm/chunk-WD6BJV6B.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-YYXVVZSS.mjs +114 -0
- package/dist/lib/node-esm/chunk-YYXVVZSS.mjs.map +7 -0
- package/dist/lib/node-esm/close-FWQQ3IH2.mjs +45 -0
- package/dist/lib/node-esm/close-FWQQ3IH2.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +176 -0
- package/dist/lib/node-esm/index.mjs.map +7 -0
- package/dist/lib/node-esm/meta.json +1 -0
- package/dist/lib/node-esm/open-FCSJ42AD.mjs +96 -0
- package/dist/lib/node-esm/open-FCSJ42AD.mjs.map +7 -0
- package/dist/lib/node-esm/operation-handler-A3FWOT4M.mjs +17 -0
- package/dist/lib/node-esm/operation-handler-A3FWOT4M.mjs.map +7 -0
- package/dist/lib/node-esm/operations/index.mjs +13 -0
- package/dist/lib/node-esm/operations/index.mjs.map +7 -0
- package/dist/lib/node-esm/react-root-44EZV4V7.mjs +51 -0
- package/dist/lib/node-esm/react-root-44EZV4V7.mjs.map +7 -0
- package/dist/lib/node-esm/react-surface-KFFPAGAC.mjs +45 -0
- package/dist/lib/node-esm/react-surface-KFFPAGAC.mjs.map +7 -0
- package/dist/lib/node-esm/revert-workspace-APB6WY3W.mjs +22 -0
- package/dist/lib/node-esm/revert-workspace-APB6WY3W.mjs.map +7 -0
- package/dist/lib/node-esm/scroll-into-view-YZVRLJKB.mjs +22 -0
- package/dist/lib/node-esm/scroll-into-view-YZVRLJKB.mjs.map +7 -0
- package/dist/lib/node-esm/set-WSNRQ3DI.mjs +38 -0
- package/dist/lib/node-esm/set-WSNRQ3DI.mjs.map +7 -0
- package/dist/lib/node-esm/set-layout-mode-LGAF5R4U.mjs +92 -0
- package/dist/lib/node-esm/set-layout-mode-LGAF5R4U.mjs.map +7 -0
- package/dist/lib/node-esm/settings-77JXSDLC.mjs +41 -0
- package/dist/lib/node-esm/settings-77JXSDLC.mjs.map +7 -0
- package/dist/lib/node-esm/show-undo-R3LATVTS.mjs +61 -0
- package/dist/lib/node-esm/show-undo-R3LATVTS.mjs.map +7 -0
- package/dist/lib/node-esm/state-I3LRM7SB.mjs +101 -0
- package/dist/lib/node-esm/state-I3LRM7SB.mjs.map +7 -0
- package/dist/lib/node-esm/switch-workspace-FKZT6EL4.mjs +69 -0
- package/dist/lib/node-esm/switch-workspace-FKZT6EL4.mjs.map +7 -0
- package/dist/lib/node-esm/types/index.mjs +37 -0
- package/dist/lib/node-esm/types/index.mjs.map +7 -0
- package/dist/lib/node-esm/update-complementary-KVLJTKK3.mjs +29 -0
- package/dist/lib/node-esm/update-complementary-KVLJTKK3.mjs.map +7 -0
- package/dist/lib/node-esm/update-dialog-EXY2PCHT.mjs +30 -0
- package/dist/lib/node-esm/update-dialog-EXY2PCHT.mjs.map +7 -0
- package/dist/lib/node-esm/update-plank-size-67U7Z5VK.mjs +29 -0
- package/dist/lib/node-esm/update-plank-size-67U7Z5VK.mjs.map +7 -0
- package/dist/lib/node-esm/update-popover-MDOZNY2D.mjs +34 -0
- package/dist/lib/node-esm/update-popover-MDOZNY2D.mjs.map +7 -0
- package/dist/lib/node-esm/update-sidebar-5LEWTTGW.mjs +26 -0
- package/dist/lib/node-esm/update-sidebar-5LEWTTGW.mjs.map +7 -0
- package/dist/lib/node-esm/url-handler-WSC5K5ME.mjs +107 -0
- package/dist/lib/node-esm/url-handler-WSC5K5ME.mjs.map +7 -0
- package/dist/types/src/DeckPlugin.d.ts +2 -1
- package/dist/types/src/DeckPlugin.d.ts.map +1 -1
- package/dist/types/src/capabilities/app-graph-builder/app-graph-builder.d.ts +6 -0
- package/dist/types/src/capabilities/app-graph-builder/app-graph-builder.d.ts.map +1 -0
- package/dist/types/src/capabilities/app-graph-builder/index.d.ts +3 -0
- package/dist/types/src/capabilities/app-graph-builder/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/check-app-scheme/check-app-scheme.d.ts +5 -0
- package/dist/types/src/capabilities/check-app-scheme/check-app-scheme.d.ts.map +1 -0
- package/dist/types/src/capabilities/check-app-scheme/index.d.ts +3 -0
- package/dist/types/src/capabilities/check-app-scheme/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/index.d.ts +7 -13
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/operation-handler/index.d.ts +4 -0
- package/dist/types/src/capabilities/operation-handler/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/operation-handler/operation-handler.d.ts +6 -0
- package/dist/types/src/capabilities/operation-handler/operation-handler.d.ts.map +1 -0
- package/dist/types/src/capabilities/react-root/index.d.ts +6 -0
- package/dist/types/src/capabilities/react-root/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/react-root/react-root.d.ts +9 -0
- package/dist/types/src/capabilities/react-root/react-root.d.ts.map +1 -0
- package/dist/types/src/capabilities/react-surface/index.d.ts +3 -0
- package/dist/types/src/capabilities/react-surface/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/react-surface/react-surface.d.ts +5 -0
- package/dist/types/src/capabilities/react-surface/react-surface.d.ts.map +1 -0
- package/dist/types/src/capabilities/settings/index.d.ts +19 -0
- package/dist/types/src/capabilities/settings/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/settings/settings.d.ts +22 -0
- package/dist/types/src/capabilities/settings/settings.d.ts.map +1 -0
- package/dist/types/src/capabilities/state/index.d.ts +172 -0
- package/dist/types/src/capabilities/state/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/state/state.d.ts +175 -0
- package/dist/types/src/capabilities/state/state.d.ts.map +1 -0
- package/dist/types/src/capabilities/tools/index.d.ts +3 -0
- package/dist/types/src/capabilities/tools/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/tools/tools.d.ts +12 -0
- package/dist/types/src/capabilities/tools/tools.d.ts.map +1 -0
- package/dist/types/src/capabilities/url-handler/index.d.ts +3 -0
- package/dist/types/src/capabilities/url-handler/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/url-handler/url-handler.d.ts +5 -0
- package/dist/types/src/capabilities/url-handler/url-handler.d.ts.map +1 -0
- package/dist/types/src/components/DeckLayout/ActiveNode.d.ts.map +1 -1
- package/dist/types/src/components/DeckLayout/ContentEmpty.d.ts.map +1 -1
- package/dist/types/src/components/DeckLayout/DeckLayout.d.ts.map +1 -1
- package/dist/types/src/components/DeckLayout/DeckLayout.stories.d.ts +2 -1
- package/dist/types/src/components/DeckLayout/DeckLayout.stories.d.ts.map +1 -1
- package/dist/types/src/components/DeckLayout/DeckMain.d.ts.map +1 -1
- package/dist/types/src/components/DeckLayout/Dialog.d.ts.map +1 -1
- package/dist/types/src/components/DeckLayout/Fallback.d.ts.map +1 -1
- package/dist/types/src/components/DeckLayout/Popover.d.ts.map +1 -1
- package/dist/types/src/components/DeckLayout/Toast.d.ts +3 -3
- package/dist/types/src/components/DeckLayout/Toast.d.ts.map +1 -1
- package/dist/types/src/components/Plank/Plank.d.ts +5 -5
- package/dist/types/src/components/Plank/Plank.d.ts.map +1 -1
- package/dist/types/src/components/Plank/Plank.stories.d.ts +26 -7
- package/dist/types/src/components/Plank/Plank.stories.d.ts.map +1 -1
- package/dist/types/src/components/Plank/PlankControls.d.ts +1 -1
- package/dist/types/src/components/Plank/PlankControls.d.ts.map +1 -1
- package/dist/types/src/components/Plank/PlankError.d.ts +7 -5
- package/dist/types/src/components/Plank/PlankError.d.ts.map +1 -1
- package/dist/types/src/components/Plank/PlankHeading.d.ts +2 -2
- package/dist/types/src/components/Plank/PlankHeading.d.ts.map +1 -1
- package/dist/types/src/components/Sidebar/ComplementarySidebar.d.ts.map +1 -1
- package/dist/types/src/components/Sidebar/Sidebar.d.ts.map +1 -1
- package/dist/types/src/components/Sidebar/SidebarButton.d.ts.map +1 -1
- package/dist/types/src/components/fragments.d.ts +4 -1
- package/dist/types/src/components/fragments.d.ts.map +1 -1
- package/dist/types/src/components/index.d.ts +0 -1
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/containers/Banner/Banner.d.ts +2 -0
- package/dist/types/src/containers/Banner/Banner.d.ts.map +1 -0
- package/dist/types/src/containers/Banner/index.d.ts +3 -0
- package/dist/types/src/containers/Banner/index.d.ts.map +1 -0
- package/dist/types/src/containers/DeckSettings/DeckSettings.d.ts +8 -0
- package/dist/types/src/containers/DeckSettings/DeckSettings.d.ts.map +1 -0
- package/dist/types/src/containers/DeckSettings/index.d.ts +3 -0
- package/dist/types/src/containers/DeckSettings/index.d.ts.map +1 -0
- package/dist/types/src/containers/index.d.ts +4 -0
- package/dist/types/src/containers/index.d.ts.map +1 -0
- package/dist/types/src/hooks/index.d.ts +2 -0
- package/dist/types/src/hooks/index.d.ts.map +1 -1
- package/dist/types/src/hooks/useDeckCompanions.d.ts +3 -4
- package/dist/types/src/hooks/useDeckCompanions.d.ts.map +1 -1
- package/dist/types/src/hooks/useDeckState.d.ts +17 -0
- package/dist/types/src/hooks/useDeckState.d.ts.map +1 -0
- package/dist/types/src/hooks/useHoistStatusbar.d.ts +1 -1
- package/dist/types/src/hooks/useHoistStatusbar.d.ts.map +1 -1
- package/dist/types/src/hooks/useMainSize.d.ts +2 -2
- package/dist/types/src/hooks/useNodeActionExpander.d.ts +1 -1
- package/dist/types/src/hooks/useNodeActionExpander.d.ts.map +1 -1
- package/dist/types/src/hooks/useSelectedCompanion.d.ts +13 -0
- package/dist/types/src/hooks/useSelectedCompanion.d.ts.map +1 -0
- package/dist/types/src/index.d.ts +1 -2
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/layout.d.ts +1 -7
- package/dist/types/src/layout.d.ts.map +1 -1
- package/dist/types/src/meta.d.ts +2 -2
- package/dist/types/src/meta.d.ts.map +1 -1
- package/dist/types/src/operations/add-toast.d.ts +5 -0
- package/dist/types/src/operations/add-toast.d.ts.map +1 -0
- package/dist/types/src/operations/adjust.d.ts +5 -0
- package/dist/types/src/operations/adjust.d.ts.map +1 -0
- package/dist/types/src/operations/change-companion.d.ts +5 -0
- package/dist/types/src/operations/change-companion.d.ts.map +1 -0
- package/dist/types/src/operations/close.d.ts +5 -0
- package/dist/types/src/operations/close.d.ts.map +1 -0
- package/dist/types/src/operations/definitions.d.ts +18 -0
- package/dist/types/src/operations/definitions.d.ts.map +1 -0
- package/dist/types/src/operations/helpers.d.ts +3 -0
- package/dist/types/src/operations/helpers.d.ts.map +1 -0
- package/dist/types/src/operations/index.d.ts +4 -0
- package/dist/types/src/operations/index.d.ts.map +1 -0
- package/dist/types/src/operations/open.d.ts +5 -0
- package/dist/types/src/operations/open.d.ts.map +1 -0
- package/dist/types/src/operations/revert-workspace.d.ts +5 -0
- package/dist/types/src/operations/revert-workspace.d.ts.map +1 -0
- package/dist/types/src/operations/scroll-into-view.d.ts +5 -0
- package/dist/types/src/operations/scroll-into-view.d.ts.map +1 -0
- package/dist/types/src/operations/set-layout-mode.d.ts +5 -0
- package/dist/types/src/operations/set-layout-mode.d.ts.map +1 -0
- package/dist/types/src/operations/set.d.ts +5 -0
- package/dist/types/src/operations/set.d.ts.map +1 -0
- package/dist/types/src/operations/show-undo.d.ts +5 -0
- package/dist/types/src/operations/show-undo.d.ts.map +1 -0
- package/dist/types/src/operations/switch-workspace.d.ts +5 -0
- package/dist/types/src/operations/switch-workspace.d.ts.map +1 -0
- package/dist/types/src/operations/update-complementary.d.ts +5 -0
- package/dist/types/src/operations/update-complementary.d.ts.map +1 -0
- package/dist/types/src/operations/update-dialog.d.ts +5 -0
- package/dist/types/src/operations/update-dialog.d.ts.map +1 -0
- package/dist/types/src/operations/update-plank-size.d.ts +5 -0
- package/dist/types/src/operations/update-plank-size.d.ts.map +1 -0
- package/dist/types/src/operations/update-popover.d.ts +5 -0
- package/dist/types/src/operations/update-popover.d.ts.map +1 -0
- package/dist/types/src/operations/update-sidebar.d.ts +5 -0
- package/dist/types/src/operations/update-sidebar.d.ts.map +1 -0
- package/dist/types/src/translations.d.ts +2 -1
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/{capabilities → types}/capabilities.d.ts +96 -90
- package/dist/types/src/types/capabilities.d.ts.map +1 -0
- package/dist/types/src/types/events.d.ts +7 -0
- package/dist/types/src/types/events.d.ts.map +1 -0
- package/dist/types/src/types/index.d.ts +2 -0
- package/dist/types/src/types/index.d.ts.map +1 -1
- package/dist/types/src/types/schema.d.ts +40 -38
- package/dist/types/src/types/schema.d.ts.map +1 -1
- package/dist/types/src/util/index.d.ts +1 -0
- package/dist/types/src/util/index.d.ts.map +1 -1
- package/dist/types/src/util/sanitize-persisted-state.d.ts +19 -0
- package/dist/types/src/util/sanitize-persisted-state.d.ts.map +1 -0
- package/dist/types/src/util/sanitize-persisted-state.test.d.ts +2 -0
- package/dist/types/src/util/sanitize-persisted-state.test.d.ts.map +1 -0
- package/dist/types/src/util/set-active.d.ts +18 -3
- package/dist/types/src/util/set-active.d.ts.map +1 -1
- package/dist/types/src/util/set-active.test.d.ts +2 -0
- package/dist/types/src/util/set-active.test.d.ts.map +1 -0
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +69 -49
- package/src/DeckPlugin.ts +26 -52
- package/src/capabilities/app-graph-builder/app-graph-builder.ts +119 -0
- package/src/capabilities/app-graph-builder/index.ts +7 -0
- package/src/capabilities/check-app-scheme/check-app-scheme.ts +45 -0
- package/src/capabilities/check-app-scheme/index.ts +7 -0
- package/src/capabilities/index.ts +8 -14
- package/src/capabilities/operation-handler/index.ts +11 -0
- package/src/capabilities/operation-handler/operation-handler.ts +16 -0
- package/src/capabilities/react-root/index.ts +7 -0
- package/src/capabilities/react-root/react-root.tsx +47 -0
- package/src/capabilities/react-surface/index.ts +7 -0
- package/src/capabilities/react-surface/react-surface.tsx +38 -0
- package/src/capabilities/settings/index.ts +7 -0
- package/src/capabilities/settings/settings.ts +39 -0
- package/src/capabilities/state/index.ts +7 -0
- package/src/capabilities/state/state.ts +97 -0
- package/src/capabilities/tools/index.ts +7 -0
- package/src/capabilities/tools/tools.ts +91 -0
- package/src/capabilities/url-handler/index.ts +7 -0
- package/src/capabilities/url-handler/url-handler.ts +108 -0
- package/src/components/DeckLayout/ActiveNode.tsx +3 -2
- package/src/components/DeckLayout/Banner.tsx +9 -9
- package/src/components/DeckLayout/ContentEmpty.tsx +5 -6
- package/src/components/DeckLayout/DeckLayout.stories.tsx +20 -31
- package/src/components/DeckLayout/DeckLayout.tsx +13 -11
- package/src/components/DeckLayout/DeckMain.tsx +65 -59
- package/src/components/DeckLayout/Dialog.tsx +22 -13
- package/src/components/DeckLayout/Fallback.tsx +2 -6
- package/src/components/DeckLayout/Popover.tsx +83 -22
- package/src/components/DeckLayout/StatusBar.tsx +4 -4
- package/src/components/DeckLayout/Toast.tsx +4 -4
- package/src/components/Plank/Plank.stories.tsx +18 -9
- package/src/components/Plank/Plank.tsx +41 -38
- package/src/components/Plank/PlankControls.tsx +9 -11
- package/src/components/Plank/PlankError.tsx +49 -19
- package/src/components/Plank/PlankHeading.tsx +41 -46
- package/src/components/Plank/PlankLoading.tsx +1 -1
- package/src/components/Sidebar/ComplementarySidebar.tsx +78 -86
- package/src/components/Sidebar/Sidebar.tsx +7 -7
- package/src/components/Sidebar/SidebarButton.tsx +31 -26
- package/src/components/fragments.ts +10 -5
- package/src/components/index.ts +0 -1
- package/src/containers/Banner/Banner.tsx +5 -0
- package/src/containers/Banner/index.ts +7 -0
- package/src/{components → containers}/DeckSettings/DeckSettings.tsx +41 -31
- package/src/containers/DeckSettings/index.ts +7 -0
- package/src/containers/index.ts +8 -0
- package/src/hooks/index.ts +2 -0
- package/src/hooks/useCompanions.ts +2 -2
- package/src/hooks/useDeckCompanions.ts +7 -11
- package/src/hooks/useDeckState.ts +82 -0
- package/src/hooks/useHoistStatusbar.ts +3 -6
- package/src/hooks/useMainSize.ts +2 -2
- package/src/hooks/useNodeActionExpander.ts +4 -4
- package/src/hooks/useSelectedCompanion.ts +32 -0
- package/src/index.ts +1 -2
- package/src/layout.ts +1 -14
- package/src/meta.ts +3 -3
- package/src/operations/add-toast.ts +24 -0
- package/src/operations/adjust.ts +83 -0
- package/src/operations/change-companion.ts +35 -0
- package/src/operations/close.ts +35 -0
- package/src/operations/definitions.ts +61 -0
- package/src/operations/helpers.ts +22 -0
- package/src/operations/index.ts +26 -0
- package/src/operations/open.ts +89 -0
- package/src/operations/revert-workspace.ts +22 -0
- package/src/operations/scroll-into-view.ts +24 -0
- package/src/operations/set-layout-mode.ts +80 -0
- package/src/operations/set.ts +36 -0
- package/src/operations/show-undo.ts +46 -0
- package/src/operations/switch-workspace.ts +60 -0
- package/src/operations/update-complementary.ts +33 -0
- package/src/operations/update-dialog.ts +34 -0
- package/src/operations/update-plank-size.ts +29 -0
- package/src/operations/update-popover.ts +36 -0
- package/src/operations/update-sidebar.ts +28 -0
- package/src/translations.ts +2 -1
- package/src/types/capabilities.ts +33 -0
- package/src/types/events.ts +21 -0
- package/src/types/index.ts +2 -0
- package/src/types/schema.ts +32 -25
- package/src/util/index.ts +1 -0
- package/src/util/layoutAppliesTopbar.ts +1 -1
- package/src/util/overscroll.ts +3 -3
- package/src/util/sanitize-persisted-state.test.ts +79 -0
- package/src/util/sanitize-persisted-state.ts +52 -0
- package/src/util/set-active.test.ts +106 -0
- package/src/util/set-active.ts +49 -29
- package/dist/lib/browser/app-graph-builder-D74NTOMK.mjs +0 -128
- package/dist/lib/browser/app-graph-builder-D74NTOMK.mjs.map +0 -7
- package/dist/lib/browser/check-app-scheme-HIEVFAAX.mjs +0 -32
- package/dist/lib/browser/check-app-scheme-HIEVFAAX.mjs.map +0 -7
- package/dist/lib/browser/chunk-5KMJPIQC.mjs +0 -16
- package/dist/lib/browser/chunk-5KMJPIQC.mjs.map +0 -7
- package/dist/lib/browser/chunk-CNTGBCMK.mjs +0 -145
- package/dist/lib/browser/chunk-CNTGBCMK.mjs.map +0 -7
- package/dist/lib/browser/chunk-F3VCCHVL.mjs.map +0 -7
- package/dist/lib/browser/chunk-OLDBLCAX.mjs +0 -128
- package/dist/lib/browser/chunk-OLDBLCAX.mjs.map +0 -7
- package/dist/lib/browser/chunk-SDIYDK47.mjs +0 -1553
- package/dist/lib/browser/chunk-SDIYDK47.mjs.map +0 -7
- package/dist/lib/browser/chunk-UXLU6CMW.mjs.map +0 -7
- package/dist/lib/browser/chunk-VBYJ664A.mjs +0 -132
- package/dist/lib/browser/chunk-VBYJ664A.mjs.map +0 -7
- package/dist/lib/browser/intent-resolver-UA4YQGAC.mjs +0 -524
- package/dist/lib/browser/intent-resolver-UA4YQGAC.mjs.map +0 -7
- package/dist/lib/browser/react-root-76RSDA6R.mjs +0 -44
- package/dist/lib/browser/react-root-76RSDA6R.mjs.map +0 -7
- package/dist/lib/browser/react-surface-2CSKDN7K.mjs +0 -40
- package/dist/lib/browser/react-surface-2CSKDN7K.mjs.map +0 -7
- package/dist/lib/browser/settings-SDPTOCCM.mjs +0 -30
- package/dist/lib/browser/settings-SDPTOCCM.mjs.map +0 -7
- package/dist/lib/browser/state-7IFAGZQO.mjs +0 -12
- package/dist/lib/browser/toolkit-L5CFXJCF.mjs +0 -52
- package/dist/lib/browser/toolkit-L5CFXJCF.mjs.map +0 -7
- package/dist/lib/browser/url-handler-QEYGYE2H.mjs +0 -70
- package/dist/lib/browser/url-handler-QEYGYE2H.mjs.map +0 -7
- package/dist/types/src/capabilities/app-graph-builder.d.ts +0 -4
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +0 -1
- package/dist/types/src/capabilities/capabilities.d.ts.map +0 -1
- package/dist/types/src/capabilities/check-app-scheme.d.ts +0 -4
- package/dist/types/src/capabilities/check-app-scheme.d.ts.map +0 -1
- package/dist/types/src/capabilities/intent-resolver.d.ts +0 -4
- package/dist/types/src/capabilities/intent-resolver.d.ts.map +0 -1
- package/dist/types/src/capabilities/react-root.d.ts +0 -7
- package/dist/types/src/capabilities/react-root.d.ts.map +0 -1
- package/dist/types/src/capabilities/react-surface.d.ts +0 -4
- package/dist/types/src/capabilities/react-surface.d.ts.map +0 -1
- package/dist/types/src/capabilities/settings.d.ts +0 -4
- package/dist/types/src/capabilities/settings.d.ts.map +0 -1
- package/dist/types/src/capabilities/state.d.ts +0 -104
- package/dist/types/src/capabilities/state.d.ts.map +0 -1
- package/dist/types/src/capabilities/toolkit.d.ts +0 -25
- package/dist/types/src/capabilities/toolkit.d.ts.map +0 -1
- package/dist/types/src/capabilities/tools.d.ts +0 -11
- package/dist/types/src/capabilities/tools.d.ts.map +0 -1
- package/dist/types/src/capabilities/url-handler.d.ts +0 -4
- package/dist/types/src/capabilities/url-handler.d.ts.map +0 -1
- package/dist/types/src/components/DeckSettings/DeckSettings.d.ts +0 -6
- package/dist/types/src/components/DeckSettings/DeckSettings.d.ts.map +0 -1
- package/dist/types/src/components/DeckSettings/index.d.ts +0 -2
- package/dist/types/src/components/DeckSettings/index.d.ts.map +0 -1
- package/dist/types/src/events.d.ts +0 -4
- package/dist/types/src/events.d.ts.map +0 -1
- package/src/capabilities/app-graph-builder.ts +0 -143
- package/src/capabilities/capabilities.ts +0 -14
- package/src/capabilities/check-app-scheme.ts +0 -40
- package/src/capabilities/intent-resolver.ts +0 -471
- package/src/capabilities/react-root.tsx +0 -40
- package/src/capabilities/react-surface.tsx +0 -30
- package/src/capabilities/settings.ts +0 -27
- package/src/capabilities/state.ts +0 -113
- package/src/capabilities/toolkit.ts +0 -66
- package/src/capabilities/tools.ts +0 -84
- package/src/capabilities/url-handler.ts +0 -60
- package/src/components/DeckSettings/index.ts +0 -5
- package/src/events.ts +0 -11
- /package/dist/lib/browser/{state-7IFAGZQO.mjs.map → operations/index.mjs.map} +0 -0
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import * as Effect from 'effect/Effect';
|
|
6
|
+
|
|
7
|
+
import { Capabilities } from '@dxos/app-framework';
|
|
8
|
+
import { LayoutOperation } from '@dxos/app-toolkit';
|
|
9
|
+
import { Operation } from '@dxos/operation';
|
|
10
|
+
|
|
11
|
+
import { DeckCapabilities } from '../types';
|
|
12
|
+
|
|
13
|
+
const handler: Operation.WithHandler<typeof LayoutOperation.ScrollIntoView> = LayoutOperation.ScrollIntoView.pipe(
|
|
14
|
+
Operation.withHandler(
|
|
15
|
+
Effect.fnUntraced(function* (input) {
|
|
16
|
+
yield* Capabilities.updateAtomValue(DeckCapabilities.EphemeralState, (state) => ({
|
|
17
|
+
...state,
|
|
18
|
+
scrollIntoView: input.subject,
|
|
19
|
+
}));
|
|
20
|
+
}),
|
|
21
|
+
),
|
|
22
|
+
);
|
|
23
|
+
|
|
24
|
+
export default handler;
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import * as Effect from 'effect/Effect';
|
|
6
|
+
|
|
7
|
+
import { Capabilities } from '@dxos/app-framework';
|
|
8
|
+
import { LayoutOperation } from '@dxos/app-toolkit';
|
|
9
|
+
import { log } from '@dxos/log';
|
|
10
|
+
import { Operation } from '@dxos/operation';
|
|
11
|
+
import { isNonNullable } from '@dxos/util';
|
|
12
|
+
|
|
13
|
+
import { updateActiveDeck } from './helpers';
|
|
14
|
+
import { DeckCapabilities, type DeckState, type LayoutMode, getMode, isLayoutMode } from '../types';
|
|
15
|
+
|
|
16
|
+
const handler: Operation.WithHandler<typeof LayoutOperation.SetLayoutMode> = LayoutOperation.SetLayoutMode.pipe(
|
|
17
|
+
Operation.withHandler(
|
|
18
|
+
Effect.fnUntraced(function* (input) {
|
|
19
|
+
if ('mode' in input && !isLayoutMode(input.mode)) {
|
|
20
|
+
return;
|
|
21
|
+
}
|
|
22
|
+
const state = yield* Capabilities.getAtomValue(DeckCapabilities.State);
|
|
23
|
+
const deck = yield* DeckCapabilities.getDeck();
|
|
24
|
+
|
|
25
|
+
const computeModeUpdate = (mode: LayoutMode, subject?: string): Partial<DeckState> => {
|
|
26
|
+
const current = deck.solo ? [deck.solo] : deck.active;
|
|
27
|
+
const next = (mode !== 'deck' ? [subject ?? deck.solo ?? deck.active[0]] : [...deck.active, deck.solo]).filter(
|
|
28
|
+
isNonNullable,
|
|
29
|
+
);
|
|
30
|
+
|
|
31
|
+
const removed = current.filter((id: string) => !next.includes(id));
|
|
32
|
+
const closed = Array.from(new Set([...deck.inactive.filter((id: string) => !next.includes(id)), ...removed]));
|
|
33
|
+
|
|
34
|
+
const soloUpdate =
|
|
35
|
+
mode !== 'deck' && next[0]
|
|
36
|
+
? { solo: next[0] }
|
|
37
|
+
: mode === 'deck' && deck.solo
|
|
38
|
+
? { solo: undefined, initialized: true }
|
|
39
|
+
: {};
|
|
40
|
+
|
|
41
|
+
const fullscreenUpdate = mode === 'solo--fullscreen' ? { fullscreen: !deck.fullscreen } : {};
|
|
42
|
+
|
|
43
|
+
return {
|
|
44
|
+
inactive: closed,
|
|
45
|
+
...soloUpdate,
|
|
46
|
+
...fullscreenUpdate,
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
if ('mode' in input) {
|
|
51
|
+
const currentMode = getMode(deck);
|
|
52
|
+
const subject = 'subject' in input ? input.subject : undefined;
|
|
53
|
+
const deckUpdates = computeModeUpdate(input.mode as LayoutMode, subject);
|
|
54
|
+
|
|
55
|
+
yield* Capabilities.updateAtomValue(DeckCapabilities.State, (state) => {
|
|
56
|
+
const newPreviousMode =
|
|
57
|
+
currentMode !== input.mode
|
|
58
|
+
? { ...state.previousMode, [state.activeDeck]: currentMode }
|
|
59
|
+
: state.previousMode;
|
|
60
|
+
return {
|
|
61
|
+
...updateActiveDeck(state, deckUpdates),
|
|
62
|
+
previousMode: newPreviousMode,
|
|
63
|
+
};
|
|
64
|
+
});
|
|
65
|
+
|
|
66
|
+
if (subject) {
|
|
67
|
+
yield* Operation.schedule(LayoutOperation.Expose, { subject });
|
|
68
|
+
}
|
|
69
|
+
} else if ('revert' in input) {
|
|
70
|
+
const last = state.previousMode[state.activeDeck];
|
|
71
|
+
const deckUpdates = computeModeUpdate(last ?? 'solo');
|
|
72
|
+
yield* Capabilities.updateAtomValue(DeckCapabilities.State, (state) => updateActiveDeck(state, deckUpdates));
|
|
73
|
+
} else {
|
|
74
|
+
log.warn('Invalid layout mode', input);
|
|
75
|
+
}
|
|
76
|
+
}),
|
|
77
|
+
),
|
|
78
|
+
);
|
|
79
|
+
|
|
80
|
+
export default handler;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import * as Effect from 'effect/Effect';
|
|
6
|
+
|
|
7
|
+
import { Capabilities, Capability } from '@dxos/app-framework';
|
|
8
|
+
import { LayoutOperation } from '@dxos/app-toolkit';
|
|
9
|
+
import { Operation } from '@dxos/operation';
|
|
10
|
+
import { AttentionCapabilities } from '@dxos/plugin-attention';
|
|
11
|
+
|
|
12
|
+
import { updateActiveDeck } from './helpers';
|
|
13
|
+
import { DeckCapabilities } from '../types';
|
|
14
|
+
import { computeActiveUpdates } from '../util';
|
|
15
|
+
|
|
16
|
+
const handler: Operation.WithHandler<typeof LayoutOperation.Set> = LayoutOperation.Set.pipe(
|
|
17
|
+
Operation.withHandler(
|
|
18
|
+
Effect.fnUntraced(function* (input) {
|
|
19
|
+
const deck = yield* DeckCapabilities.getDeck();
|
|
20
|
+
const attention = yield* Capability.get(AttentionCapabilities.Attention);
|
|
21
|
+
|
|
22
|
+
const { deckUpdates, toAttend } = computeActiveUpdates({
|
|
23
|
+
next: input.subject as string[],
|
|
24
|
+
deck,
|
|
25
|
+
attention,
|
|
26
|
+
});
|
|
27
|
+
yield* Capabilities.updateAtomValue(DeckCapabilities.State, (state) => updateActiveDeck(state, deckUpdates));
|
|
28
|
+
|
|
29
|
+
if (toAttend) {
|
|
30
|
+
yield* Operation.schedule(LayoutOperation.ScrollIntoView, { subject: toAttend });
|
|
31
|
+
}
|
|
32
|
+
}),
|
|
33
|
+
),
|
|
34
|
+
);
|
|
35
|
+
|
|
36
|
+
export default handler;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import * as Effect from 'effect/Effect';
|
|
6
|
+
|
|
7
|
+
import { Capabilities, Capability, UndoOperation } from '@dxos/app-framework';
|
|
8
|
+
import { LayoutOperation } from '@dxos/app-toolkit';
|
|
9
|
+
import { Operation } from '@dxos/operation';
|
|
10
|
+
|
|
11
|
+
import { meta } from '../meta';
|
|
12
|
+
import { DeckCapabilities } from '../types';
|
|
13
|
+
|
|
14
|
+
const handler: Operation.WithHandler<typeof UndoOperation.ShowUndo> = UndoOperation.ShowUndo.pipe(
|
|
15
|
+
Operation.withHandler(
|
|
16
|
+
Effect.fnUntraced(function* (input) {
|
|
17
|
+
const historyTracker = yield* Capability.get(Capabilities.HistoryTracker);
|
|
18
|
+
|
|
19
|
+
const newUndoId = `show-undo-${Date.now()}`;
|
|
20
|
+
// TODO(wittjosiah): Support undoing further back than the last action.
|
|
21
|
+
yield* Capabilities.updateAtomValue(DeckCapabilities.EphemeralState, (state) => {
|
|
22
|
+
const filteredToasts = state.currentUndoId
|
|
23
|
+
? state.toasts.filter((toast) => toast.id !== state.currentUndoId)
|
|
24
|
+
: state.toasts;
|
|
25
|
+
|
|
26
|
+
const toast: LayoutOperation.Toast = {
|
|
27
|
+
id: newUndoId,
|
|
28
|
+
title: input.message ?? ['undo available label', { ns: meta.id }],
|
|
29
|
+
duration: 10_000,
|
|
30
|
+
actionLabel: ['undo action label', { ns: meta.id }],
|
|
31
|
+
actionAlt: ['undo action alt', { ns: meta.id }],
|
|
32
|
+
closeLabel: ['undo close label', { ns: meta.id }],
|
|
33
|
+
onAction: () => historyTracker.undoPromise(),
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
return {
|
|
37
|
+
...state,
|
|
38
|
+
currentUndoId: newUndoId,
|
|
39
|
+
toasts: [...filteredToasts, toast],
|
|
40
|
+
};
|
|
41
|
+
});
|
|
42
|
+
}),
|
|
43
|
+
),
|
|
44
|
+
);
|
|
45
|
+
|
|
46
|
+
export default handler;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import * as Effect from 'effect/Effect';
|
|
6
|
+
|
|
7
|
+
import { Capabilities, Capability } from '@dxos/app-framework';
|
|
8
|
+
import { AppCapabilities, isPinnedWorkspace, LayoutOperation } from '@dxos/app-toolkit';
|
|
9
|
+
import { invariant } from '@dxos/invariant';
|
|
10
|
+
import { Operation } from '@dxos/operation';
|
|
11
|
+
import { Graph, Node } from '@dxos/plugin-graph';
|
|
12
|
+
|
|
13
|
+
import { DeckCapabilities, defaultDeck } from '../types';
|
|
14
|
+
|
|
15
|
+
const handler: Operation.WithHandler<typeof LayoutOperation.SwitchWorkspace> = LayoutOperation.SwitchWorkspace.pipe(
|
|
16
|
+
Operation.withHandler(
|
|
17
|
+
Effect.fnUntraced(function* (input) {
|
|
18
|
+
const { graph } = yield* Capability.get(AppCapabilities.AppGraph);
|
|
19
|
+
|
|
20
|
+
{
|
|
21
|
+
const state = yield* Capabilities.getAtomValue(DeckCapabilities.State);
|
|
22
|
+
// TODO(wittjosiah): This is a hack to prevent the previous deck from being set for pinned items.
|
|
23
|
+
// Ideally this should be worked into the data model in a generic way.
|
|
24
|
+
const shouldUpdatePrevious = !isPinnedWorkspace(state.activeDeck);
|
|
25
|
+
|
|
26
|
+
yield* Capabilities.updateAtomValue(DeckCapabilities.State, (state) => {
|
|
27
|
+
const newDecks = state.decks[input.subject]
|
|
28
|
+
? state.decks
|
|
29
|
+
: { ...state.decks, [input.subject]: { ...defaultDeck } };
|
|
30
|
+
return {
|
|
31
|
+
...state,
|
|
32
|
+
previousDeck: shouldUpdatePrevious ? state.activeDeck : state.previousDeck,
|
|
33
|
+
activeDeck: input.subject,
|
|
34
|
+
decks: newDecks,
|
|
35
|
+
};
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
{
|
|
40
|
+
const state = yield* Capabilities.getAtomValue(DeckCapabilities.State);
|
|
41
|
+
const deck = state.decks[input.subject];
|
|
42
|
+
invariant(deck, `Deck not found: ${input.subject}`);
|
|
43
|
+
|
|
44
|
+
const first = deck.solo ? deck.solo : deck.active[0];
|
|
45
|
+
if (first) {
|
|
46
|
+
yield* Operation.schedule(LayoutOperation.ScrollIntoView, { subject: first });
|
|
47
|
+
} else {
|
|
48
|
+
const [item] = Graph.getConnections(graph, input.subject, 'child').filter(
|
|
49
|
+
(node) => !Node.isActionLike(node) && !node.properties.disposition,
|
|
50
|
+
);
|
|
51
|
+
if (item) {
|
|
52
|
+
yield* Operation.schedule(LayoutOperation.Open, { subject: [item.id] });
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}),
|
|
57
|
+
),
|
|
58
|
+
);
|
|
59
|
+
|
|
60
|
+
export default handler;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import * as Effect from 'effect/Effect';
|
|
6
|
+
|
|
7
|
+
import { Capabilities } from '@dxos/app-framework';
|
|
8
|
+
import { LayoutOperation } from '@dxos/app-toolkit';
|
|
9
|
+
import { Operation } from '@dxos/operation';
|
|
10
|
+
|
|
11
|
+
import { DeckCapabilities } from '../types';
|
|
12
|
+
|
|
13
|
+
const handler: Operation.WithHandler<typeof LayoutOperation.UpdateComplementary> =
|
|
14
|
+
LayoutOperation.UpdateComplementary.pipe(
|
|
15
|
+
Operation.withHandler(
|
|
16
|
+
Effect.fnUntraced(function* (input) {
|
|
17
|
+
const state = yield* Capabilities.getAtomValue(DeckCapabilities.State);
|
|
18
|
+
const panelChanged = state.complementarySidebarPanel !== input.subject;
|
|
19
|
+
const next = input.subject ? 'expanded' : (input.state ?? state.complementarySidebarState);
|
|
20
|
+
const stateChanged = next !== state.complementarySidebarState;
|
|
21
|
+
|
|
22
|
+
if (panelChanged || stateChanged) {
|
|
23
|
+
yield* Capabilities.updateAtomValue(DeckCapabilities.State, (state) => ({
|
|
24
|
+
...state,
|
|
25
|
+
complementarySidebarPanel: panelChanged ? input.subject : state.complementarySidebarPanel,
|
|
26
|
+
complementarySidebarState: stateChanged ? next : state.complementarySidebarState,
|
|
27
|
+
}));
|
|
28
|
+
}
|
|
29
|
+
}),
|
|
30
|
+
),
|
|
31
|
+
);
|
|
32
|
+
|
|
33
|
+
export default handler;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import * as Effect from 'effect/Effect';
|
|
6
|
+
|
|
7
|
+
import { Capabilities } from '@dxos/app-framework';
|
|
8
|
+
import { LayoutOperation } from '@dxos/app-toolkit';
|
|
9
|
+
import { Operation } from '@dxos/operation';
|
|
10
|
+
|
|
11
|
+
import { DeckCapabilities } from '../types';
|
|
12
|
+
|
|
13
|
+
const handler: Operation.WithHandler<typeof LayoutOperation.UpdateDialog> = LayoutOperation.UpdateDialog.pipe(
|
|
14
|
+
Operation.withHandler(
|
|
15
|
+
Effect.fnUntraced(function* (input) {
|
|
16
|
+
yield* Capabilities.updateAtomValue(DeckCapabilities.EphemeralState, (state) => ({
|
|
17
|
+
...state,
|
|
18
|
+
dialogOpen: input.state ?? Boolean(input.subject),
|
|
19
|
+
dialogType: input.type ?? 'default',
|
|
20
|
+
dialogBlockAlign: input.blockAlign ?? 'center',
|
|
21
|
+
dialogOverlayClasses: input.overlayClasses,
|
|
22
|
+
dialogOverlayStyle: input.overlayStyle,
|
|
23
|
+
dialogContent: input.subject
|
|
24
|
+
? {
|
|
25
|
+
component: input.subject,
|
|
26
|
+
props: input.props,
|
|
27
|
+
}
|
|
28
|
+
: null,
|
|
29
|
+
}));
|
|
30
|
+
}),
|
|
31
|
+
),
|
|
32
|
+
);
|
|
33
|
+
|
|
34
|
+
export default handler;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import * as Effect from 'effect/Effect';
|
|
6
|
+
|
|
7
|
+
import { Capabilities } from '@dxos/app-framework';
|
|
8
|
+
import { Operation } from '@dxos/operation';
|
|
9
|
+
|
|
10
|
+
import { UpdatePlankSize } from './definitions';
|
|
11
|
+
import { updateActiveDeck } from './helpers';
|
|
12
|
+
import { DeckCapabilities } from '../types';
|
|
13
|
+
|
|
14
|
+
const handler: Operation.WithHandler<typeof UpdatePlankSize> = UpdatePlankSize.pipe(
|
|
15
|
+
Operation.withHandler(
|
|
16
|
+
Effect.fnUntraced(function* (input) {
|
|
17
|
+
yield* Capabilities.updateAtomValue(DeckCapabilities.State, (state) =>
|
|
18
|
+
updateActiveDeck(state, {
|
|
19
|
+
plankSizing: {
|
|
20
|
+
...state.decks[state.activeDeck]?.plankSizing,
|
|
21
|
+
[input.id]: input.size,
|
|
22
|
+
},
|
|
23
|
+
}),
|
|
24
|
+
);
|
|
25
|
+
}),
|
|
26
|
+
),
|
|
27
|
+
);
|
|
28
|
+
|
|
29
|
+
export default handler;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import * as Effect from 'effect/Effect';
|
|
6
|
+
|
|
7
|
+
import { Capabilities } from '@dxos/app-framework';
|
|
8
|
+
import { LayoutOperation } from '@dxos/app-toolkit';
|
|
9
|
+
import { Operation } from '@dxos/operation';
|
|
10
|
+
|
|
11
|
+
import { DeckCapabilities } from '../types';
|
|
12
|
+
|
|
13
|
+
const handler: Operation.WithHandler<typeof LayoutOperation.UpdatePopover> = LayoutOperation.UpdatePopover.pipe(
|
|
14
|
+
Operation.withHandler(
|
|
15
|
+
Effect.fnUntraced(function* (input) {
|
|
16
|
+
yield* Capabilities.updateAtomValue(DeckCapabilities.EphemeralState, (state) => ({
|
|
17
|
+
...state,
|
|
18
|
+
popoverOpen: input.state ?? Boolean(input.subject),
|
|
19
|
+
popoverKind: input.kind ?? 'base',
|
|
20
|
+
popoverTitle: input.kind === 'card' ? input.title : undefined,
|
|
21
|
+
popoverContentRef: input.subjectRef,
|
|
22
|
+
popoverContent:
|
|
23
|
+
typeof input.subject === 'string'
|
|
24
|
+
? { component: input.subject, props: input.props }
|
|
25
|
+
: input.subject
|
|
26
|
+
? { subject: input.subject }
|
|
27
|
+
: null,
|
|
28
|
+
popoverSide: input.side,
|
|
29
|
+
popoverAnchor: input.variant === 'virtual' ? input.anchor : state.popoverAnchor,
|
|
30
|
+
popoverAnchorId: input.variant !== 'virtual' ? input.anchorId : state.popoverAnchorId,
|
|
31
|
+
}));
|
|
32
|
+
}),
|
|
33
|
+
),
|
|
34
|
+
);
|
|
35
|
+
|
|
36
|
+
export default handler;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import * as Effect from 'effect/Effect';
|
|
6
|
+
|
|
7
|
+
import { Capabilities } from '@dxos/app-framework';
|
|
8
|
+
import { LayoutOperation } from '@dxos/app-toolkit';
|
|
9
|
+
import { Operation } from '@dxos/operation';
|
|
10
|
+
|
|
11
|
+
import { DeckCapabilities } from '../types';
|
|
12
|
+
|
|
13
|
+
const handler: Operation.WithHandler<typeof LayoutOperation.UpdateSidebar> = LayoutOperation.UpdateSidebar.pipe(
|
|
14
|
+
Operation.withHandler(
|
|
15
|
+
Effect.fnUntraced(function* (input) {
|
|
16
|
+
const state = yield* Capabilities.getAtomValue(DeckCapabilities.State);
|
|
17
|
+
const next = input.state ?? state.sidebarState;
|
|
18
|
+
if (next !== state.sidebarState) {
|
|
19
|
+
yield* Capabilities.updateAtomValue(DeckCapabilities.State, (state) => ({
|
|
20
|
+
...state,
|
|
21
|
+
sidebarState: next,
|
|
22
|
+
}));
|
|
23
|
+
}
|
|
24
|
+
}),
|
|
25
|
+
),
|
|
26
|
+
);
|
|
27
|
+
|
|
28
|
+
export default handler;
|
package/src/translations.ts
CHANGED
|
@@ -34,7 +34,7 @@ export const translations = [
|
|
|
34
34
|
'undo action label': 'Undo',
|
|
35
35
|
'undo action alt': 'Undo previous action',
|
|
36
36
|
'undo close label': 'Dismiss',
|
|
37
|
-
'error fallback message': 'Unable to open this
|
|
37
|
+
'error fallback message': 'Unable to open this object',
|
|
38
38
|
'plank heading fallback label': 'Untitled',
|
|
39
39
|
'actions menu label': 'Options',
|
|
40
40
|
'settings deck label': 'Disable deck',
|
|
@@ -64,6 +64,7 @@ export const translations = [
|
|
|
64
64
|
'close others label': 'Close other planks',
|
|
65
65
|
'close all label': 'Close all planks',
|
|
66
66
|
'companion plank heading fallback label': 'Related',
|
|
67
|
+
'open item label': 'Open',
|
|
67
68
|
},
|
|
68
69
|
},
|
|
69
70
|
},
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { type Atom } from '@effect-atom/atom-react';
|
|
6
|
+
import * as Effect from 'effect/Effect';
|
|
7
|
+
|
|
8
|
+
import { Capabilities, Capability } from '@dxos/app-framework';
|
|
9
|
+
import { invariant } from '@dxos/invariant';
|
|
10
|
+
|
|
11
|
+
import { meta } from '../meta';
|
|
12
|
+
import { type DeckEphemeralStateProps, type DeckSettingsProps, type DeckState, type DeckStateProps } from '../types';
|
|
13
|
+
|
|
14
|
+
export namespace DeckCapabilities {
|
|
15
|
+
export const Settings = Capability.make<Atom.Writable<DeckSettingsProps>>(`${meta.id}.capability.settings`);
|
|
16
|
+
|
|
17
|
+
/** Persisted state (stored in KVS/localStorage). */
|
|
18
|
+
export const State = Capability.make<Atom.Writable<DeckStateProps>>(`${meta.id}.capability.state`);
|
|
19
|
+
|
|
20
|
+
/** Transient/ephemeral state (not persisted). */
|
|
21
|
+
export const EphemeralState = Capability.make<Atom.Writable<DeckEphemeralStateProps>>(
|
|
22
|
+
`${meta.id}.capability.ephemeral-state`,
|
|
23
|
+
);
|
|
24
|
+
|
|
25
|
+
/** Get the current active deck from state. */
|
|
26
|
+
export const getDeck = (): Effect.Effect<DeckState, Error, Capability.Service> =>
|
|
27
|
+
Effect.gen(function* () {
|
|
28
|
+
const state = yield* Capabilities.getAtomValue(State);
|
|
29
|
+
const deck = state.decks[state.activeDeck];
|
|
30
|
+
invariant(deck, `Deck not found: ${state.activeDeck}`);
|
|
31
|
+
return deck;
|
|
32
|
+
});
|
|
33
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { type ActivationEvent } from '@dxos/app-framework';
|
|
6
|
+
import { AppActivationEvents } from '@dxos/app-toolkit';
|
|
7
|
+
|
|
8
|
+
import { meta } from '../meta';
|
|
9
|
+
|
|
10
|
+
import { DeckCapabilities } from './capabilities';
|
|
11
|
+
|
|
12
|
+
export namespace DeckEvents {
|
|
13
|
+
export const StateReady: ActivationEvent.ActivationEvent = AppActivationEvents.createStateEvent(
|
|
14
|
+
`${meta.id}.state-ready`,
|
|
15
|
+
);
|
|
16
|
+
|
|
17
|
+
/** Fired when DeckSettings capability is ready. */
|
|
18
|
+
export const SettingsReady: ActivationEvent.ActivationEvent = AppActivationEvents.createSettingsEvent(
|
|
19
|
+
DeckCapabilities.Settings.identifier,
|
|
20
|
+
);
|
|
21
|
+
}
|
package/src/types/index.ts
CHANGED
package/src/types/schema.ts
CHANGED
|
@@ -4,22 +4,20 @@
|
|
|
4
4
|
|
|
5
5
|
import * as Schema from 'effect/Schema';
|
|
6
6
|
|
|
7
|
-
import {
|
|
7
|
+
import { Label, LayoutOperation } from '@dxos/app-toolkit';
|
|
8
8
|
import { type DeepReadonly } from '@dxos/util';
|
|
9
9
|
|
|
10
10
|
import { meta } from '../meta';
|
|
11
11
|
|
|
12
|
-
export
|
|
13
|
-
|
|
14
|
-
export const PLANK_COMPANION_TYPE = `${meta.id}/plank-companion`;
|
|
15
|
-
export const DECK_COMPANION_TYPE = `${meta.id}/deck-companion`;
|
|
12
|
+
export const PLANK_COMPANION_TYPE = `${meta.id}.plank-companion`;
|
|
13
|
+
export const DECK_COMPANION_TYPE = `${meta.id}.deck-companion`;
|
|
16
14
|
|
|
17
15
|
// TODO(Zan): In the future we should consider adding new planks adjacent to the attended plank.
|
|
18
16
|
export const NewPlankPositions = ['start', 'end'] as const;
|
|
19
17
|
export type NewPlankPositioning = (typeof NewPlankPositions)[number];
|
|
20
18
|
|
|
21
|
-
export const
|
|
22
|
-
export type Overscroll = (typeof
|
|
19
|
+
export const OverScrollToProps = ['none', 'centering'] as const;
|
|
20
|
+
export type Overscroll = (typeof OverScrollToProps)[number];
|
|
23
21
|
|
|
24
22
|
export type Part = 'solo' | 'deck' | 'complementary';
|
|
25
23
|
export type ResolvedPart = Part | 'solo-primary' | 'solo-companion';
|
|
@@ -30,7 +28,7 @@ export const DeckSettingsSchema = Schema.Struct({
|
|
|
30
28
|
enableStatusbar: Schema.optional(Schema.Boolean),
|
|
31
29
|
enableNativeRedirect: Schema.optional(Schema.Boolean),
|
|
32
30
|
newPlankPositioning: Schema.optional(Schema.Literal(...NewPlankPositions)),
|
|
33
|
-
overscroll: Schema.optional(Schema.Literal(...
|
|
31
|
+
overscroll: Schema.optional(Schema.Literal(...OverScrollToProps)),
|
|
34
32
|
// TODO(burdon): Rename layoutMode? (e.g., bento | encapsulated?)
|
|
35
33
|
encapsulatedPlanks: Schema.optional(Schema.Boolean),
|
|
36
34
|
}).pipe(Schema.mutable);
|
|
@@ -44,8 +42,8 @@ export const DeckState = Schema.Struct({
|
|
|
44
42
|
/** If false, the deck has not yet left solo mode and new planks should be soloed. */
|
|
45
43
|
initialized: Schema.Boolean,
|
|
46
44
|
active: Schema.mutable(Schema.Array(Schema.String)),
|
|
47
|
-
|
|
48
|
-
|
|
45
|
+
companionOpen: Schema.Boolean,
|
|
46
|
+
companionVariant: Schema.optional(Schema.String),
|
|
49
47
|
inactive: Schema.mutable(Schema.Array(Schema.String)),
|
|
50
48
|
solo: Schema.optional(Schema.String),
|
|
51
49
|
fullscreen: Schema.Boolean,
|
|
@@ -57,7 +55,8 @@ export type DeckState = Schema.Schema.Type<typeof DeckState>;
|
|
|
57
55
|
export const defaultDeck: DeckState = {
|
|
58
56
|
initialized: false,
|
|
59
57
|
active: [],
|
|
60
|
-
|
|
58
|
+
companionOpen: false,
|
|
59
|
+
companionVariant: undefined,
|
|
61
60
|
inactive: [],
|
|
62
61
|
solo: undefined,
|
|
63
62
|
fullscreen: false,
|
|
@@ -77,12 +76,21 @@ export const getMode = (deck: DeckState | DeepReadonly<DeckState>): LayoutMode =
|
|
|
77
76
|
return 'deck';
|
|
78
77
|
};
|
|
79
78
|
|
|
80
|
-
//
|
|
81
|
-
export const
|
|
79
|
+
// Persisted plugin state (stored in KVS/localStorage).
|
|
80
|
+
export const DeckStateSchema = Schema.Struct({
|
|
82
81
|
sidebarState: Schema.Literal('closed', 'collapsed', 'expanded'),
|
|
83
82
|
complementarySidebarState: Schema.Literal('closed', 'collapsed', 'expanded'),
|
|
84
83
|
complementarySidebarPanel: Schema.optional(Schema.String),
|
|
84
|
+
activeDeck: Schema.String,
|
|
85
|
+
previousDeck: Schema.String,
|
|
86
|
+
decks: Schema.mutable(Schema.Record({ key: Schema.String, value: Schema.mutable(DeckState) })),
|
|
87
|
+
previousMode: Schema.mutable(Schema.Record({ key: Schema.String, value: LayoutMode })),
|
|
88
|
+
}).pipe(Schema.mutable);
|
|
89
|
+
export type DeckStateProps = Schema.Schema.Type<typeof DeckStateSchema>;
|
|
85
90
|
|
|
91
|
+
// TODO(burdon): Factor out state (in common with other layouts?)
|
|
92
|
+
// Transient/ephemeral plugin state (not persisted).
|
|
93
|
+
export const DeckEphemeralStateSchema = Schema.Struct({
|
|
86
94
|
dialogOpen: Schema.Boolean,
|
|
87
95
|
dialogType: Schema.optional(Schema.Literal('default', 'alert')),
|
|
88
96
|
dialogBlockAlign: Schema.optional(Schema.Literal('start', 'center', 'end')),
|
|
@@ -95,23 +103,23 @@ export const DeckPluginState = Schema.Struct({
|
|
|
95
103
|
popoverSide: Schema.optional(Schema.Literal('top', 'right', 'bottom', 'left')),
|
|
96
104
|
popoverAnchor: Schema.optional(Schema.Any),
|
|
97
105
|
popoverAnchorId: Schema.optional(Schema.String),
|
|
106
|
+
popoverKind: Schema.optional(Schema.Literal('base', 'card')),
|
|
107
|
+
popoverTitle: Schema.optional(Label.annotations({ description: 'The title of the popover.' })),
|
|
108
|
+
/** Ref of the subject to be passed to the popover Surface. */
|
|
109
|
+
popoverContentRef: Schema.optional(Schema.String),
|
|
98
110
|
/** Data to be passed to the popover Surface. */
|
|
99
111
|
popoverContent: Schema.optional(Schema.Any),
|
|
100
112
|
|
|
101
|
-
toasts: Schema.mutable(Schema.Array(
|
|
113
|
+
toasts: Schema.mutable(Schema.Array(LayoutOperation.Toast)),
|
|
102
114
|
currentUndoId: Schema.optional(Schema.String),
|
|
103
115
|
|
|
104
|
-
activeDeck: Schema.String,
|
|
105
|
-
previousDeck: Schema.String,
|
|
106
|
-
decks: Schema.mutable(Schema.Record({ key: Schema.String, value: Schema.mutable(DeckState) })),
|
|
107
|
-
previousMode: Schema.mutable(Schema.Record({ key: Schema.String, value: LayoutMode })),
|
|
108
|
-
deck: Schema.mutable(DeckState),
|
|
109
|
-
|
|
110
116
|
/** The identifier of a component to scroll into view when it is mounted. */
|
|
111
117
|
scrollIntoView: Schema.optional(Schema.String),
|
|
112
118
|
}).pipe(Schema.mutable);
|
|
119
|
+
export type DeckEphemeralStateProps = Schema.Schema.Type<typeof DeckEphemeralStateSchema>;
|
|
113
120
|
|
|
114
|
-
|
|
121
|
+
// Combined state type (for convenience in components that need both).
|
|
122
|
+
export type DeckPluginState = DeckStateProps & DeckEphemeralStateProps;
|
|
115
123
|
|
|
116
124
|
export namespace DeckAction {
|
|
117
125
|
const PartAdjustmentSchema = Schema.Union(
|
|
@@ -127,12 +135,12 @@ export namespace DeckAction {
|
|
|
127
135
|
export type Adjustment = Schema.Schema.Type<typeof Adjustment>;
|
|
128
136
|
|
|
129
137
|
// An atomic transaction to apply to the deck, describing which element to move to which location.
|
|
130
|
-
export class Adjust extends Schema.TaggedClass<Adjust>()(`${meta.id}
|
|
138
|
+
export class Adjust extends Schema.TaggedClass<Adjust>()(`${meta.id}.action.adjust`, {
|
|
131
139
|
input: Adjustment,
|
|
132
140
|
output: Schema.Void,
|
|
133
141
|
}) {}
|
|
134
142
|
|
|
135
|
-
export class UpdatePlankSize extends Schema.TaggedClass<UpdatePlankSize>()(`${meta.id}
|
|
143
|
+
export class UpdatePlankSize extends Schema.TaggedClass<UpdatePlankSize>()(`${meta.id}.action.update-plank-size`, {
|
|
136
144
|
input: Schema.Struct({
|
|
137
145
|
id: Schema.String,
|
|
138
146
|
size: Schema.Number,
|
|
@@ -140,9 +148,8 @@ export namespace DeckAction {
|
|
|
140
148
|
output: Schema.Void,
|
|
141
149
|
}) {}
|
|
142
150
|
|
|
143
|
-
export class ChangeCompanion extends Schema.TaggedClass<ChangeCompanion>()(`${meta.id}
|
|
151
|
+
export class ChangeCompanion extends Schema.TaggedClass<ChangeCompanion>()(`${meta.id}.action.change-companion`, {
|
|
144
152
|
input: Schema.Struct({
|
|
145
|
-
primary: Schema.String,
|
|
146
153
|
companion: Schema.Union(Schema.String, Schema.Null),
|
|
147
154
|
}),
|
|
148
155
|
output: Schema.Void,
|
package/src/util/index.ts
CHANGED
|
@@ -6,7 +6,7 @@ import { type LayoutMode } from '../types';
|
|
|
6
6
|
|
|
7
7
|
export const layoutAppliesTopbar = (breakpoint: string, layoutMode?: LayoutMode) => {
|
|
8
8
|
return (
|
|
9
|
-
document.body.getAttribute('data-platform') === '
|
|
9
|
+
document.body.getAttribute('data-platform') === 'windows' &&
|
|
10
10
|
breakpoint === 'desktop' &&
|
|
11
11
|
layoutMode !== 'solo--fullscreen'
|
|
12
12
|
);
|