@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,39 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import * as Effect from 'effect/Effect';
|
|
6
|
+
|
|
7
|
+
import { Capability } from '@dxos/app-framework';
|
|
8
|
+
import { AppCapabilities } from '@dxos/app-toolkit';
|
|
9
|
+
import { createKvsStore } from '@dxos/effect';
|
|
10
|
+
|
|
11
|
+
import { meta } from '../../meta';
|
|
12
|
+
import { DeckCapabilities, DeckSettingsSchema } from '../../types';
|
|
13
|
+
|
|
14
|
+
export default Capability.makeModule(() =>
|
|
15
|
+
Effect.sync(() => {
|
|
16
|
+
const settingsAtom = createKvsStore({
|
|
17
|
+
key: meta.id,
|
|
18
|
+
schema: DeckSettingsSchema,
|
|
19
|
+
defaultValue: () => ({
|
|
20
|
+
showHints: false,
|
|
21
|
+
enableDeck: false,
|
|
22
|
+
enableStatusbar: false,
|
|
23
|
+
enableNativeRedirect: false,
|
|
24
|
+
newPlankPositioning: 'start' as const,
|
|
25
|
+
overscroll: 'none' as const,
|
|
26
|
+
encapsulatedPlanks: false,
|
|
27
|
+
}),
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
return [
|
|
31
|
+
Capability.contributes(DeckCapabilities.Settings, settingsAtom),
|
|
32
|
+
Capability.contributes(AppCapabilities.Settings, {
|
|
33
|
+
prefix: meta.id,
|
|
34
|
+
schema: DeckSettingsSchema,
|
|
35
|
+
atom: settingsAtom,
|
|
36
|
+
}),
|
|
37
|
+
];
|
|
38
|
+
}),
|
|
39
|
+
);
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { Atom } from '@effect-atom/atom-react';
|
|
6
|
+
import * as Effect from 'effect/Effect';
|
|
7
|
+
|
|
8
|
+
import { Capabilities, Capability } from '@dxos/app-framework';
|
|
9
|
+
import { AppCapabilities } from '@dxos/app-toolkit';
|
|
10
|
+
import { createKvsStore } from '@dxos/effect';
|
|
11
|
+
import { invariant } from '@dxos/invariant';
|
|
12
|
+
|
|
13
|
+
import { meta } from '../../meta';
|
|
14
|
+
import {
|
|
15
|
+
DeckCapabilities,
|
|
16
|
+
type DeckEphemeralStateProps,
|
|
17
|
+
type DeckStateProps,
|
|
18
|
+
DeckStateSchema,
|
|
19
|
+
defaultDeck,
|
|
20
|
+
getMode,
|
|
21
|
+
} from '../../types';
|
|
22
|
+
import { sanitizePersistedState } from '../../util';
|
|
23
|
+
|
|
24
|
+
/** Default persisted state. */
|
|
25
|
+
const defaultDeckState: DeckStateProps = {
|
|
26
|
+
sidebarState: 'expanded',
|
|
27
|
+
complementarySidebarState: 'collapsed',
|
|
28
|
+
complementarySidebarPanel: undefined,
|
|
29
|
+
activeDeck: 'default',
|
|
30
|
+
previousDeck: 'default',
|
|
31
|
+
decks: {
|
|
32
|
+
default: { ...defaultDeck },
|
|
33
|
+
},
|
|
34
|
+
previousMode: {},
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
/** Default ephemeral state. */
|
|
38
|
+
const defaultDeckEphemeralState: DeckEphemeralStateProps = {
|
|
39
|
+
dialogContent: null,
|
|
40
|
+
dialogOpen: false,
|
|
41
|
+
dialogBlockAlign: undefined,
|
|
42
|
+
dialogType: undefined,
|
|
43
|
+
popoverContent: null,
|
|
44
|
+
popoverAnchor: undefined,
|
|
45
|
+
popoverAnchorId: undefined,
|
|
46
|
+
popoverOpen: false,
|
|
47
|
+
toasts: [],
|
|
48
|
+
currentUndoId: undefined,
|
|
49
|
+
scrollIntoView: undefined,
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
export default Capability.makeModule(
|
|
53
|
+
Effect.fnUntraced(function* () {
|
|
54
|
+
const registry = yield* Capability.get(Capabilities.AtomRegistry);
|
|
55
|
+
|
|
56
|
+
// Persisted state using KVS store.
|
|
57
|
+
const stateAtom = createKvsStore({
|
|
58
|
+
key: `${meta.id}.state`,
|
|
59
|
+
schema: DeckStateSchema,
|
|
60
|
+
defaultValue: () => ({ ...defaultDeckState }),
|
|
61
|
+
});
|
|
62
|
+
|
|
63
|
+
// Ephemeral state (not persisted, but kept alive to prevent GC resets).
|
|
64
|
+
const ephemeralAtom = Atom.make<DeckEphemeralStateProps>({ ...defaultDeckEphemeralState }).pipe(Atom.keepAlive);
|
|
65
|
+
|
|
66
|
+
// Sanitize persisted state on startup (see sanitizePersistedState for details).
|
|
67
|
+
const currentState = registry.get(stateAtom);
|
|
68
|
+
const sanitizedState = sanitizePersistedState(currentState);
|
|
69
|
+
if (sanitizedState !== currentState) {
|
|
70
|
+
registry.set(stateAtom, sanitizedState);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
// Create derived layout atom (read-only) from both state atoms.
|
|
74
|
+
const layoutAtom = Atom.make((get) => {
|
|
75
|
+
const state = get(stateAtom);
|
|
76
|
+
const ephemeral = get(ephemeralAtom);
|
|
77
|
+
const deck = state.decks[state.activeDeck];
|
|
78
|
+
invariant(deck, `Deck not found: ${state.activeDeck}`);
|
|
79
|
+
return {
|
|
80
|
+
mode: getMode(deck),
|
|
81
|
+
dialogOpen: ephemeral.dialogOpen,
|
|
82
|
+
sidebarOpen: state.sidebarState === 'expanded',
|
|
83
|
+
complementarySidebarOpen: state.complementarySidebarState === 'expanded',
|
|
84
|
+
workspace: state.activeDeck,
|
|
85
|
+
active: deck.solo ? [deck.solo] : deck.active,
|
|
86
|
+
inactive: deck.inactive,
|
|
87
|
+
scrollIntoView: ephemeral.scrollIntoView,
|
|
88
|
+
} satisfies AppCapabilities.Layout;
|
|
89
|
+
}).pipe(Atom.keepAlive);
|
|
90
|
+
|
|
91
|
+
return [
|
|
92
|
+
Capability.contributes(DeckCapabilities.State, stateAtom),
|
|
93
|
+
Capability.contributes(DeckCapabilities.EphemeralState, ephemeralAtom),
|
|
94
|
+
Capability.contributes(AppCapabilities.Layout, layoutAtom),
|
|
95
|
+
];
|
|
96
|
+
}),
|
|
97
|
+
);
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
// ISSUE(burdon): tools
|
|
6
|
+
// @ts-nocheck
|
|
7
|
+
|
|
8
|
+
import * as Effect from 'effect/Effect';
|
|
9
|
+
import * as Schema from 'effect/Schema';
|
|
10
|
+
|
|
11
|
+
import {
|
|
12
|
+
Capabilities,
|
|
13
|
+
Capability,
|
|
14
|
+
LayoutAction,
|
|
15
|
+
type PromiseIntentDispatcher,
|
|
16
|
+
createIntent,
|
|
17
|
+
} from '@dxos/app-framework';
|
|
18
|
+
import { type OperationInvoker } from '@dxos/app-framework/plugin-operation/invoker';
|
|
19
|
+
import { invariant } from '@dxos/invariant';
|
|
20
|
+
import { trim } from '@dxos/util';
|
|
21
|
+
|
|
22
|
+
import { meta } from '../../meta';
|
|
23
|
+
import { DeckOperation } from '../../operations';
|
|
24
|
+
|
|
25
|
+
// TODO(burdon): Factor out.
|
|
26
|
+
declare global {
|
|
27
|
+
interface ToolContextExtensions {
|
|
28
|
+
dispatch?: PromiseIntentDispatcher;
|
|
29
|
+
pivotId?: string;
|
|
30
|
+
part?: 'deck' | 'dialog';
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export default Capability.makeModule(() =>
|
|
35
|
+
Effect.succeed(
|
|
36
|
+
Capability.contributes(Capabilities.Tools, [
|
|
37
|
+
createTool(meta.id, {
|
|
38
|
+
name: 'show',
|
|
39
|
+
description: trim`
|
|
40
|
+
Show an item as a companion to an existing plank.
|
|
41
|
+
When supplying IDs, they must be fully qualified like this: space-key:object-id
|
|
42
|
+
`,
|
|
43
|
+
caption: 'Showing item...',
|
|
44
|
+
// TODO(wittjosiah): Refactor Layout/Navigation/Deck actions so that they can be used directly.
|
|
45
|
+
schema: Schema.Struct({
|
|
46
|
+
id: Schema.String.annotations({
|
|
47
|
+
description: 'The ID of the item to show.',
|
|
48
|
+
}),
|
|
49
|
+
}),
|
|
50
|
+
execute: async ({ id }, { extensions }) => {
|
|
51
|
+
invariant(extensions);
|
|
52
|
+
const { pivotId, dispatch, invokePromise, part } = extensions as {
|
|
53
|
+
pivotId: string;
|
|
54
|
+
dispatch: PromiseIntentDispatcher;
|
|
55
|
+
invokePromise: OperationInvoker['invokePromise'];
|
|
56
|
+
part: string;
|
|
57
|
+
};
|
|
58
|
+
invariant(pivotId, 'No pivot ID');
|
|
59
|
+
invariant(invokePromise, 'No operation invoker');
|
|
60
|
+
|
|
61
|
+
if (part === 'deck') {
|
|
62
|
+
const { error } = await invokePromise(DeckOperation.ChangeCompanion, {
|
|
63
|
+
companion: id,
|
|
64
|
+
});
|
|
65
|
+
if (error) {
|
|
66
|
+
return ToolResult.Error(error.message);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
return ToolResult.Success({});
|
|
70
|
+
} else {
|
|
71
|
+
const { data, error } = await dispatch(
|
|
72
|
+
createIntent(LayoutAction.Open, {
|
|
73
|
+
subject: [id],
|
|
74
|
+
part: 'main',
|
|
75
|
+
options: {
|
|
76
|
+
pivotId,
|
|
77
|
+
positioning: 'end',
|
|
78
|
+
},
|
|
79
|
+
}),
|
|
80
|
+
);
|
|
81
|
+
if (error) {
|
|
82
|
+
return ToolResult.Error(error.message);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
return ToolResult.Success(data);
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
}),
|
|
89
|
+
]),
|
|
90
|
+
),
|
|
91
|
+
);
|
|
@@ -0,0 +1,108 @@
|
|
|
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, fromUrlPath, getWorkspaceFromPath, toUrlPath } from '@dxos/app-toolkit';
|
|
9
|
+
import { invariant } from '@dxos/invariant';
|
|
10
|
+
import { Node } from '@dxos/plugin-graph';
|
|
11
|
+
|
|
12
|
+
import { DeckCapabilities, type DeckStateProps, defaultDeck } from '../../types';
|
|
13
|
+
|
|
14
|
+
export default Capability.makeModule(
|
|
15
|
+
Effect.fnUntraced(function* () {
|
|
16
|
+
const { invokePromise } = yield* Capability.get(Capabilities.OperationInvoker);
|
|
17
|
+
const registry = yield* Capability.get(Capabilities.AtomRegistry);
|
|
18
|
+
const stateAtom = yield* Capability.get(DeckCapabilities.State);
|
|
19
|
+
|
|
20
|
+
// Helper to get state.
|
|
21
|
+
const getState = () => registry.get(stateAtom);
|
|
22
|
+
|
|
23
|
+
// Helper to get computed deck from state.
|
|
24
|
+
const getDeck = () => {
|
|
25
|
+
const state = getState();
|
|
26
|
+
const deck = state.decks[state.activeDeck];
|
|
27
|
+
invariant(deck, `Deck not found: ${state.activeDeck}`);
|
|
28
|
+
return deck;
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
// Helper to update state.
|
|
32
|
+
const updateState = (fn: (current: DeckStateProps) => DeckStateProps) => {
|
|
33
|
+
registry.set(stateAtom, fn(getState()));
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
const handleNavigation = async () => {
|
|
37
|
+
const pathname = window.location.pathname;
|
|
38
|
+
const state = getState();
|
|
39
|
+
if (pathname === '/reset') {
|
|
40
|
+
updateState((s) => ({
|
|
41
|
+
...s,
|
|
42
|
+
activeDeck: 'default',
|
|
43
|
+
decks: {
|
|
44
|
+
default: { ...defaultDeck },
|
|
45
|
+
},
|
|
46
|
+
}));
|
|
47
|
+
window.location.pathname = '/';
|
|
48
|
+
return;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
const qualifiedId = fromUrlPath(pathname);
|
|
52
|
+
const workspace = getWorkspaceFromPath(qualifiedId);
|
|
53
|
+
if (workspace !== Node.RootId && workspace !== state.activeDeck) {
|
|
54
|
+
await invokePromise(LayoutOperation.SwitchWorkspace, { subject: workspace });
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
const deck = getDeck();
|
|
58
|
+
const activeId = qualifiedId !== workspace ? qualifiedId : undefined;
|
|
59
|
+
if (activeId) {
|
|
60
|
+
// Ensure the object referenced by the URL is open in the deck.
|
|
61
|
+
await invokePromise(LayoutOperation.Open, { subject: [activeId] });
|
|
62
|
+
// If not already in solo mode, switch to solo for the target object.
|
|
63
|
+
if (!deck.solo) {
|
|
64
|
+
await invokePromise(LayoutOperation.SetLayoutMode, { subject: activeId, mode: 'solo' });
|
|
65
|
+
}
|
|
66
|
+
} else if (deck.solo) {
|
|
67
|
+
// Stay in solo mode; redirect URL to reflect the current solo item.
|
|
68
|
+
// Do not switch to deck mode here — only explicit user action should change layout mode.
|
|
69
|
+
const path = toUrlPath(deck.solo);
|
|
70
|
+
if (window.location.pathname !== path) {
|
|
71
|
+
history.replaceState(null, '', `${path}${window.location.search}`);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
yield* Effect.promise(() => handleNavigation());
|
|
77
|
+
window.addEventListener('popstate', handleNavigation);
|
|
78
|
+
|
|
79
|
+
// Subscribe to state changes to update the URL.
|
|
80
|
+
let lastSolo: string | undefined;
|
|
81
|
+
let lastActiveDeck: string | undefined;
|
|
82
|
+
const unsubscribe = registry.subscribe(stateAtom, () => {
|
|
83
|
+
const state = getState();
|
|
84
|
+
const deck = getDeck();
|
|
85
|
+
const solo = deck.solo;
|
|
86
|
+
const activeDeck = state.activeDeck;
|
|
87
|
+
|
|
88
|
+
// Only update URL if relevant state changed.
|
|
89
|
+
if (solo !== lastSolo || activeDeck !== lastActiveDeck) {
|
|
90
|
+
lastSolo = solo;
|
|
91
|
+
lastActiveDeck = activeDeck;
|
|
92
|
+
|
|
93
|
+
const path = solo ? toUrlPath(solo) : toUrlPath(activeDeck);
|
|
94
|
+
if (window.location.pathname !== path) {
|
|
95
|
+
// TODO(thure): In some browsers, this only preserves the most recent state change, even though this is not `history.replace`…
|
|
96
|
+
history.pushState(null, '', `${path}${window.location.search}`);
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
});
|
|
100
|
+
|
|
101
|
+
return Capability.contributes(Capabilities.Null, null, () =>
|
|
102
|
+
Effect.sync(() => {
|
|
103
|
+
window.removeEventListener('popstate', handleNavigation);
|
|
104
|
+
unsubscribe();
|
|
105
|
+
}),
|
|
106
|
+
);
|
|
107
|
+
}),
|
|
108
|
+
);
|
|
@@ -4,7 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
import React from 'react';
|
|
6
6
|
|
|
7
|
-
import { Surface
|
|
7
|
+
import { Surface } from '@dxos/app-framework/ui';
|
|
8
|
+
import { useAppGraph } from '@dxos/app-toolkit/ui';
|
|
8
9
|
import { useNode } from '@dxos/plugin-graph';
|
|
9
10
|
import { useAttended } from '@dxos/react-ui-attention';
|
|
10
11
|
|
|
@@ -21,7 +22,7 @@ export const ActiveNode = () => {
|
|
|
21
22
|
<div role='none' className='sr-only'>
|
|
22
23
|
{/* TODO(wittjosiah): Weird that this is a surface, feel like it's not really render logic.
|
|
23
24
|
Probably this lives in React-land currently in order to access translations? */}
|
|
24
|
-
<Surface role='document-title' data={{ subject: activeNode }} limit={1} />
|
|
25
|
+
<Surface.Surface role='document-title' data={{ subject: activeNode }} limit={1} />
|
|
25
26
|
</div>
|
|
26
27
|
);
|
|
27
28
|
};
|
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
|
|
5
5
|
import React from 'react';
|
|
6
6
|
|
|
7
|
-
import { Surface } from '@dxos/app-framework/
|
|
7
|
+
import { Surface } from '@dxos/app-framework/ui';
|
|
8
8
|
import { type ThemedClassName, useTranslation } from '@dxos/react-ui';
|
|
9
|
-
import { mx } from '@dxos/
|
|
9
|
+
import { mx, osTranslations } from '@dxos/ui-theme';
|
|
10
10
|
|
|
11
11
|
import { meta } from '../../meta';
|
|
12
12
|
import { CloseSidebarButton, ToggleSidebarButton } from '../Sidebar';
|
|
@@ -16,24 +16,24 @@ export const Banner = ({ variant, classNames }: ThemedClassName<{ variant?: 'top
|
|
|
16
16
|
return (
|
|
17
17
|
<header
|
|
18
18
|
className={mx(
|
|
19
|
-
'flex items-stretch relative
|
|
19
|
+
'flex items-stretch relative py-1 ps-1 pe-2',
|
|
20
20
|
variant === 'topbar' &&
|
|
21
|
-
'fixed inset-
|
|
21
|
+
'fixed inset-x-0 top-[env(safe-area-inset-top)] h-(--dx-rail-size) border-b border-separator',
|
|
22
22
|
classNames,
|
|
23
23
|
)}
|
|
24
24
|
>
|
|
25
25
|
{variant === 'sidebar' ? <CloseSidebarButton /> : <ToggleSidebarButton />}
|
|
26
|
-
<span className='self-center grow
|
|
26
|
+
<span className='self-center grow ms-1'>{t('current app name', { ns: osTranslations })}</span>
|
|
27
27
|
{variant === 'topbar' && (
|
|
28
28
|
<div role='none' className='absolute inset-0 pointer-events-none'>
|
|
29
|
-
<div role='none' className='grid
|
|
30
|
-
<Surface role='search-input' limit={1} />
|
|
29
|
+
<div role='none' className='grid h-full pointer-fine:p-1 max-w-md mx-auto pointer-events-auto'>
|
|
30
|
+
<Surface.Surface role='search-input' limit={1} />
|
|
31
31
|
</div>
|
|
32
32
|
</div>
|
|
33
33
|
)}
|
|
34
34
|
<span role='none' className='grow' />
|
|
35
|
-
<Surface role='
|
|
36
|
-
<Surface role='notch-start' limit={1} />
|
|
35
|
+
<Surface.Surface role='version-info' limit={1} />
|
|
36
|
+
<Surface.Surface role='notch-start' limit={1} />
|
|
37
37
|
</header>
|
|
38
38
|
);
|
|
39
39
|
};
|
|
@@ -4,10 +4,9 @@
|
|
|
4
4
|
|
|
5
5
|
import React from 'react';
|
|
6
6
|
|
|
7
|
-
import { Surface
|
|
7
|
+
import { Surface } from '@dxos/app-framework/ui';
|
|
8
8
|
|
|
9
|
-
import {
|
|
10
|
-
import { useBreakpoints } from '../../hooks';
|
|
9
|
+
import { useBreakpoints, useDeckState } from '../../hooks';
|
|
11
10
|
import { getMode } from '../../types';
|
|
12
11
|
import { layoutAppliesTopbar } from '../../util';
|
|
13
12
|
import { fixedSidebarToggleStyles } from '../fragments';
|
|
@@ -15,16 +14,16 @@ import { ToggleSidebarButton } from '../Sidebar';
|
|
|
15
14
|
|
|
16
15
|
export const ContentEmpty = () => {
|
|
17
16
|
const breakpoint = useBreakpoints();
|
|
18
|
-
const { deck } =
|
|
17
|
+
const { deck } = useDeckState();
|
|
19
18
|
const layoutMode = getMode(deck);
|
|
20
19
|
const topbar = layoutAppliesTopbar(breakpoint, layoutMode);
|
|
21
20
|
return (
|
|
22
21
|
<div
|
|
23
22
|
role='none'
|
|
24
|
-
className='grid place-items-center p-8 relative bg-
|
|
23
|
+
className='grid place-items-center p-8 relative bg-deck-surface'
|
|
25
24
|
data-testid='layoutPlugin.firstRunMessage'
|
|
26
25
|
>
|
|
27
|
-
<Surface role='keyshortcuts' />
|
|
26
|
+
<Surface.Surface role='keyshortcuts' />
|
|
28
27
|
{!topbar && <ToggleSidebarButton variant='default' classNames={fixedSidebarToggleStyles} />}
|
|
29
28
|
</div>
|
|
30
29
|
);
|
|
@@ -5,49 +5,38 @@
|
|
|
5
5
|
import { type Meta, type StoryObj } from '@storybook/react-vite';
|
|
6
6
|
import React from 'react';
|
|
7
7
|
|
|
8
|
-
import {
|
|
8
|
+
import { Capability, Plugin } from '@dxos/app-framework';
|
|
9
9
|
import { withPluginManager } from '@dxos/app-framework/testing';
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
10
|
+
import { AppActivationEvents, AppPlugin } from '@dxos/app-toolkit';
|
|
11
|
+
import { corePlugins } from '@dxos/plugin-testing';
|
|
12
|
+
import { withLayout } from '@dxos/react-ui/testing';
|
|
13
13
|
|
|
14
|
-
import {
|
|
14
|
+
import { DeckState, OperationHandler } from '../../capabilities';
|
|
15
15
|
import { meta as pluginMeta } from '../../meta';
|
|
16
16
|
import { translations } from '../../translations';
|
|
17
17
|
|
|
18
18
|
import { DeckLayout } from './DeckLayout';
|
|
19
19
|
|
|
20
|
+
const TestPlugin = Plugin.define(pluginMeta).pipe(
|
|
21
|
+
Plugin.addModule({
|
|
22
|
+
id: Capability.getModuleTag(DeckState),
|
|
23
|
+
activatesOn: AppActivationEvents.AppGraphReady,
|
|
24
|
+
activate: () => DeckState(),
|
|
25
|
+
}),
|
|
26
|
+
AppPlugin.addOperationHandlerModule({
|
|
27
|
+
activate: OperationHandler,
|
|
28
|
+
}),
|
|
29
|
+
Plugin.make,
|
|
30
|
+
);
|
|
31
|
+
|
|
20
32
|
const meta = {
|
|
21
|
-
title: 'plugins/plugin-deck/DeckLayout',
|
|
33
|
+
title: 'plugins/plugin-deck/components/DeckLayout',
|
|
22
34
|
component: DeckLayout,
|
|
23
35
|
render: (args) => <DeckLayout {...args} />,
|
|
24
36
|
decorators: [
|
|
25
|
-
|
|
37
|
+
withLayout({ layout: 'fullscreen' }),
|
|
26
38
|
withPluginManager({
|
|
27
|
-
plugins: [
|
|
28
|
-
AttentionPlugin(),
|
|
29
|
-
SettingsPlugin(),
|
|
30
|
-
IntentPlugin(),
|
|
31
|
-
GraphPlugin(),
|
|
32
|
-
definePlugin(
|
|
33
|
-
{
|
|
34
|
-
id: 'example.com/plutin/testing',
|
|
35
|
-
name: 'Testing',
|
|
36
|
-
},
|
|
37
|
-
() => [
|
|
38
|
-
defineModule({
|
|
39
|
-
id: `${pluginMeta.id}/module/deck-state`,
|
|
40
|
-
activatesOn: Events.AppGraphReady,
|
|
41
|
-
activate: () => DeckStateFactory(),
|
|
42
|
-
}),
|
|
43
|
-
defineModule({
|
|
44
|
-
id: `${pluginMeta.id}/module/layout-intent-resolver`,
|
|
45
|
-
activatesOn: Events.SetupIntentResolver,
|
|
46
|
-
activate: LayoutIntentResolver,
|
|
47
|
-
}),
|
|
48
|
-
],
|
|
49
|
-
)(),
|
|
50
|
-
],
|
|
39
|
+
plugins: [...corePlugins(), TestPlugin()],
|
|
51
40
|
}),
|
|
52
41
|
],
|
|
53
42
|
parameters: {
|
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
|
|
5
5
|
import React from 'react';
|
|
6
6
|
|
|
7
|
-
import {
|
|
7
|
+
import { Mosaic } from '@dxos/react-ui-mosaic';
|
|
8
8
|
|
|
9
|
-
import {
|
|
9
|
+
import { useDeckState } from '../../hooks';
|
|
10
10
|
|
|
11
11
|
import { ActiveNode } from './ActiveNode';
|
|
12
12
|
import { DeckMain } from './DeckMain';
|
|
@@ -17,16 +17,18 @@ import { Toaster, type ToasterProps } from './Toast';
|
|
|
17
17
|
export type DeckLayoutProps = Pick<ToasterProps, 'onDismissToast'>;
|
|
18
18
|
|
|
19
19
|
export const DeckLayout = ({ onDismissToast }: DeckLayoutProps) => {
|
|
20
|
-
const
|
|
21
|
-
const { toasts } =
|
|
20
|
+
const { state } = useDeckState();
|
|
21
|
+
const { toasts } = state;
|
|
22
22
|
|
|
23
23
|
return (
|
|
24
|
-
<
|
|
25
|
-
<
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
24
|
+
<Mosaic.Root>
|
|
25
|
+
<PopoverRoot>
|
|
26
|
+
<ActiveNode />
|
|
27
|
+
<DeckMain />
|
|
28
|
+
<PopoverContent />
|
|
29
|
+
<Dialog />
|
|
30
|
+
<Toaster toasts={toasts} onDismissToast={onDismissToast} />
|
|
31
|
+
</PopoverRoot>
|
|
32
|
+
</Mosaic.Root>
|
|
31
33
|
);
|
|
32
34
|
};
|