@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
|
@@ -13,20 +13,20 @@ import React, {
|
|
|
13
13
|
useRef,
|
|
14
14
|
} from 'react';
|
|
15
15
|
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
16
|
+
import { Surface, useOperationInvoker } from '@dxos/app-framework/ui';
|
|
17
|
+
import { LayoutOperation, getCompanionVariant } from '@dxos/app-toolkit';
|
|
18
|
+
import { useAppGraph } from '@dxos/app-toolkit/ui';
|
|
18
19
|
import { debounce } from '@dxos/async';
|
|
19
20
|
import { type Node, useNode } from '@dxos/plugin-graph';
|
|
20
|
-
import {
|
|
21
|
+
import { useAttentionAttributes } from '@dxos/react-ui-attention';
|
|
21
22
|
import { StackItem, railGridHorizontal } from '@dxos/react-ui-stack';
|
|
22
|
-
import { mainIntrinsicSize, mx } from '@dxos/
|
|
23
|
+
import { mainIntrinsicSize, mx } from '@dxos/ui-theme';
|
|
23
24
|
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import { DeckAction, type DeckSettingsProps, type LayoutMode, type ResolvedPart } from '../../types';
|
|
25
|
+
import { useCompanions, useDeckState, useMainSize, useSelectedCompanion } from '../../hooks';
|
|
26
|
+
import { type DeckSettingsProps, type LayoutMode, PLANK_COMPANION_TYPE, type ResolvedPart } from '../../types';
|
|
27
|
+
import { DeckOperation } from '../../operations';
|
|
28
28
|
|
|
29
|
-
import {
|
|
29
|
+
import { PlankError, PlankErrorFallback } from './PlankError';
|
|
30
30
|
import { PlankHeading } from './PlankHeading';
|
|
31
31
|
import { PlankLoading } from './PlankLoading';
|
|
32
32
|
|
|
@@ -38,7 +38,7 @@ const UNKNOWN_ID = 'unknown_id';
|
|
|
38
38
|
|
|
39
39
|
export type PlankProps = Pick<PlankComponentProps, 'layoutMode' | 'part' | 'path' | 'order' | 'active' | 'settings'> & {
|
|
40
40
|
id?: string;
|
|
41
|
-
|
|
41
|
+
companionVariant?: string;
|
|
42
42
|
};
|
|
43
43
|
|
|
44
44
|
// TODO(burdon): Factor out conditional rendering.
|
|
@@ -49,22 +49,24 @@ export type PlankProps = Pick<PlankComponentProps, 'layoutMode' | 'part' | 'path
|
|
|
49
49
|
// benefits. I think where we anticipate users will definitely want to quickly switch between showing and hiding entire
|
|
50
50
|
// articles, over the (again probably large) performance benefit that unmounting them would confer, we can mount and
|
|
51
51
|
// hide them, but I think that scenario in its most unambiguous form is probably rare. You could extrapolate
|
|
52
|
-
// the scenario to include all
|
|
53
|
-
// don
|
|
52
|
+
// the scenario to include all "potential" planks such as companions, which we could keep mounted and hidden, but I
|
|
53
|
+
// don't think the resulting performance would be acceptable. I think the real issue is "perceived performance" which
|
|
54
54
|
// has mitigations that are in between mounting and un-mounting since both of those have tradeoffs; we may need one or more
|
|
55
|
-
//
|
|
55
|
+
// "partially-mounted" experiences, like loading skeletons at the simple end, or screenshots of "sleeping" planks at
|
|
56
56
|
// the advanced end.
|
|
57
57
|
|
|
58
58
|
/**
|
|
59
59
|
* A Plank is the main container for surfaces within a Deck.
|
|
60
60
|
* It may be paired with a companion plank that enables the user to select one of multiple companion surfaces.
|
|
61
61
|
*/
|
|
62
|
-
export const Plank = memo(({ id = UNKNOWN_ID,
|
|
62
|
+
export const Plank = memo(({ id = UNKNOWN_ID, companionVariant, ...props }: PlankProps) => {
|
|
63
63
|
const { graph } = useAppGraph();
|
|
64
64
|
const node = useNode(graph, id);
|
|
65
65
|
const companions = useCompanions(id);
|
|
66
|
-
const
|
|
67
|
-
const
|
|
66
|
+
const { companionId } = useSelectedCompanion(companions, companionVariant);
|
|
67
|
+
const resolvedCompanionId = companionVariant ? companionId : undefined;
|
|
68
|
+
const currentCompanion = companions.find(({ id }) => id === resolvedCompanionId);
|
|
69
|
+
const hasCompanion = !!(resolvedCompanionId && currentCompanion);
|
|
68
70
|
|
|
69
71
|
return (
|
|
70
72
|
<PlankContainer
|
|
@@ -82,7 +84,7 @@ export const Plank = memo(({ id = UNKNOWN_ID, companionId, ...props }: PlankProp
|
|
|
82
84
|
/>
|
|
83
85
|
{hasCompanion && (
|
|
84
86
|
<PlankComponent
|
|
85
|
-
id={
|
|
87
|
+
id={resolvedCompanionId}
|
|
86
88
|
node={currentCompanion}
|
|
87
89
|
primary={node}
|
|
88
90
|
companions={companions}
|
|
@@ -113,8 +115,8 @@ const PlankContainer = ({ children, solo, companion, encapsulate }: PlankContain
|
|
|
113
115
|
role='none'
|
|
114
116
|
data-popover-collision-boundary={true}
|
|
115
117
|
className={mx(
|
|
116
|
-
'absolute inset-
|
|
117
|
-
encapsulate && 'border border-separator rounded overflow-hidden',
|
|
118
|
+
'absolute inset-(--main-spacing) grid',
|
|
119
|
+
encapsulate && 'border border-separator rounded-sm overflow-hidden',
|
|
118
120
|
companion && 'grid-cols-[6fr_4fr]', // TODO(burdon): Resize.
|
|
119
121
|
railGridHorizontal,
|
|
120
122
|
mainIntrinsicSize,
|
|
@@ -138,9 +140,9 @@ type PlankComponentProps = {
|
|
|
138
140
|
order?: number;
|
|
139
141
|
active?: string[];
|
|
140
142
|
companioned?: 'primary' | 'companion';
|
|
141
|
-
node?: Node;
|
|
142
|
-
primary?: Node;
|
|
143
|
-
companions?: Node[];
|
|
143
|
+
node?: Node.Node;
|
|
144
|
+
primary?: Node.Node;
|
|
145
|
+
companions?: Node.Node[];
|
|
144
146
|
settings?: DeckSettingsProps;
|
|
145
147
|
};
|
|
146
148
|
|
|
@@ -158,8 +160,9 @@ const PlankComponent = memo(
|
|
|
158
160
|
companions,
|
|
159
161
|
settings,
|
|
160
162
|
}: PlankComponentProps) => {
|
|
161
|
-
const {
|
|
162
|
-
const {
|
|
163
|
+
const { invokePromise } = useOperationInvoker();
|
|
164
|
+
const { state, deck } = useDeckState();
|
|
165
|
+
const { popoverAnchorId, scrollIntoView } = state;
|
|
163
166
|
const { findFirstFocusable } = useFocusFinders();
|
|
164
167
|
const canResize = layoutMode === 'deck';
|
|
165
168
|
|
|
@@ -171,18 +174,18 @@ const PlankComponent = memo(
|
|
|
171
174
|
|
|
172
175
|
const rootElement = useRef<HTMLDivElement | null>(null);
|
|
173
176
|
|
|
174
|
-
const
|
|
175
|
-
const sizeKey =
|
|
177
|
+
const variant = node?.type === PLANK_COMPANION_TYPE ? getCompanionVariant(id) : undefined;
|
|
178
|
+
const sizeKey = id.split('+')[0];
|
|
176
179
|
const size = deck.plankSizing[sizeKey] as number | undefined;
|
|
177
180
|
|
|
178
181
|
const handleSizeChange = useCallback(
|
|
179
182
|
debounce((nextSize: number) => {
|
|
180
|
-
return
|
|
183
|
+
return invokePromise(DeckOperation.UpdatePlankSize, { id: sizeKey, size: nextSize });
|
|
181
184
|
}, 200),
|
|
182
|
-
[
|
|
185
|
+
[invokePromise, sizeKey],
|
|
183
186
|
);
|
|
184
187
|
|
|
185
|
-
// TODO(thure): Tabster
|
|
188
|
+
// TODO(thure): Tabster's focus group should handle moving focus to Main, but something is blocking it.
|
|
186
189
|
const handleKeyDown = useCallback((event: KeyboardEvent) => {
|
|
187
190
|
if (event.target === event.currentTarget) {
|
|
188
191
|
switch (event.key) {
|
|
@@ -200,9 +203,9 @@ const PlankComponent = memo(
|
|
|
200
203
|
if (scrollIntoView === id) {
|
|
201
204
|
layoutMode === 'deck' && rootElement.current?.scrollIntoView({ behavior: 'smooth', inline: 'center' });
|
|
202
205
|
// Clear the scroll into view state once it has been actioned.
|
|
203
|
-
void
|
|
206
|
+
void invokePromise(LayoutOperation.ScrollIntoView, { subject: undefined });
|
|
204
207
|
}
|
|
205
|
-
}, [id, scrollIntoView, layoutMode]);
|
|
208
|
+
}, [id, scrollIntoView, layoutMode, invokePromise]);
|
|
206
209
|
|
|
207
210
|
const isSolo = layoutMode.startsWith('solo') && part === 'solo';
|
|
208
211
|
const isAttendable =
|
|
@@ -230,18 +233,18 @@ const PlankComponent = memo(
|
|
|
230
233
|
const Root = part.startsWith('solo') ? 'article' : StackItem.Root;
|
|
231
234
|
const fullscreen = layoutMode === 'solo--fullscreen';
|
|
232
235
|
const className = mx(
|
|
233
|
-
'attention-surface relative dx-focus-ring-inset-over-all density-coarse',
|
|
236
|
+
'dx-attention-surface relative dx-focus-ring-inset-over-all dx-density-coarse',
|
|
234
237
|
isSolo && 'absolute inset-0',
|
|
235
238
|
isSolo && mainIntrinsicSize,
|
|
236
239
|
railGridHorizontal,
|
|
237
240
|
part.startsWith('solo') && 'grid',
|
|
238
|
-
part.startsWith('solo-') && 'grid-rows-subgrid row-span-2 min-
|
|
241
|
+
part.startsWith('solo-') && 'grid-rows-subgrid row-span-2 min-w-0',
|
|
239
242
|
fullscreen && 'grid-rows-1',
|
|
240
|
-
part === 'deck' && (companioned === 'companion' ? '
|
|
241
|
-
part === 'solo-companion' && '
|
|
243
|
+
part === 'deck' && (companioned === 'companion' ? 'border-separator! border-e' : 'border-separator! border-x'),
|
|
244
|
+
part === 'solo-companion' && 'border-separator! border-s',
|
|
242
245
|
settings?.encapsulatedPlanks &&
|
|
243
246
|
!part.startsWith('solo') &&
|
|
244
|
-
'
|
|
247
|
+
'mx-(--main-spacing) border-separator! border rounded-sm overflow-hidden',
|
|
245
248
|
);
|
|
246
249
|
|
|
247
250
|
return (
|
|
@@ -280,12 +283,12 @@ const PlankComponent = memo(
|
|
|
280
283
|
companions={companions}
|
|
281
284
|
/>
|
|
282
285
|
)}
|
|
283
|
-
<Surface
|
|
286
|
+
<Surface.Surface
|
|
284
287
|
key={node.id}
|
|
285
288
|
role='article'
|
|
286
289
|
data={data}
|
|
287
290
|
limit={1}
|
|
288
|
-
fallback={
|
|
291
|
+
fallback={PlankErrorFallback}
|
|
289
292
|
placeholder={placeholder}
|
|
290
293
|
/>
|
|
291
294
|
</>
|
|
@@ -4,13 +4,12 @@
|
|
|
4
4
|
|
|
5
5
|
import React, { forwardRef, useCallback } from 'react';
|
|
6
6
|
|
|
7
|
-
import {
|
|
8
|
-
import { useIntentDispatcher } from '@dxos/app-framework/react';
|
|
9
|
-
import { invariant } from '@dxos/invariant';
|
|
7
|
+
import { useOperationInvoker } from '@dxos/app-framework/ui';
|
|
10
8
|
import { ButtonGroup, type ButtonGroupProps, type ButtonProps, IconButton, useTranslation } from '@dxos/react-ui';
|
|
11
9
|
|
|
12
10
|
import { meta } from '../../meta';
|
|
13
|
-
import { DeckAction, type LayoutMode } from '../../types';
|
|
11
|
+
import { type DeckAction, type LayoutMode } from '../../types';
|
|
12
|
+
import { DeckOperation } from '../../operations';
|
|
14
13
|
|
|
15
14
|
export type PlankControlHandler = (event: DeckAction.PartAdjustment) => void;
|
|
16
15
|
|
|
@@ -36,7 +35,7 @@ const PlankControl = ({ icon, label, ...props }: Omit<ButtonProps, 'children'> &
|
|
|
36
35
|
return <IconButton label={label} icon={icon} iconOnly variant='ghost' tooltipSide='bottom' {...props} />;
|
|
37
36
|
};
|
|
38
37
|
|
|
39
|
-
const plankControlSpacing = '
|
|
38
|
+
const plankControlSpacing = 'px-2';
|
|
40
39
|
|
|
41
40
|
type PlankComplimentControlsProps = {
|
|
42
41
|
primary?: string;
|
|
@@ -45,13 +44,12 @@ type PlankComplimentControlsProps = {
|
|
|
45
44
|
export const PlankCompanionControls = forwardRef<HTMLDivElement, PlankComplimentControlsProps>(
|
|
46
45
|
({ primary }, forwardedRef) => {
|
|
47
46
|
const { t } = useTranslation(meta.id);
|
|
48
|
-
const {
|
|
47
|
+
const { invokePromise } = useOperationInvoker();
|
|
49
48
|
const handleCloseCompanion = useCallback(() => {
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
}, []);
|
|
49
|
+
return invokePromise(DeckOperation.ChangeCompanion, { companion: null });
|
|
50
|
+
}, [invokePromise]);
|
|
53
51
|
return (
|
|
54
|
-
<div ref={forwardedRef} className='contents app-no-drag'>
|
|
52
|
+
<div ref={forwardedRef} className='contents dx-app-no-drag'>
|
|
55
53
|
<PlankControl
|
|
56
54
|
label={t('close companion label')}
|
|
57
55
|
variant='ghost'
|
|
@@ -79,7 +77,7 @@ export const PlankControls = forwardRef<HTMLDivElement, PlankControlsProps>(
|
|
|
79
77
|
const layoutIsAnySolo = !!layoutMode?.startsWith('solo');
|
|
80
78
|
|
|
81
79
|
return (
|
|
82
|
-
<ButtonGroup {...props} classNames={['app-no-drag
|
|
80
|
+
<ButtonGroup {...props} classNames={['dx-app-no-drag opacity-100!', classNames]} ref={forwardedRef}>
|
|
83
81
|
{capabilities.deck ? (
|
|
84
82
|
<>
|
|
85
83
|
{capabilities.solo && (
|
|
@@ -2,48 +2,78 @@
|
|
|
2
2
|
// Copyright 2024 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import React, { useEffect, useState } from 'react';
|
|
5
|
+
import React, { useEffect, useMemo, useState } from 'react';
|
|
6
6
|
|
|
7
|
+
import { TimeoutError } from '@dxos/errors';
|
|
8
|
+
import { log } from '@dxos/log';
|
|
7
9
|
import { type Node } from '@dxos/plugin-graph';
|
|
8
|
-
import { useTranslation } from '@dxos/react-ui';
|
|
9
|
-
import { descriptionMessage, mx } from '@dxos/
|
|
10
|
+
import { ErrorFallback, type ErrorFallbackProps, useTranslation } from '@dxos/react-ui';
|
|
11
|
+
import { descriptionMessage, mx } from '@dxos/ui-theme';
|
|
10
12
|
|
|
11
13
|
import { meta } from '../../meta';
|
|
12
14
|
|
|
13
15
|
import { PlankHeading, type PlankHeadingProps } from './PlankHeading';
|
|
14
16
|
import { PlankLoading } from './PlankLoading';
|
|
15
17
|
|
|
16
|
-
export const PlankContentError = ({ error }: { error?: Error }) => {
|
|
17
|
-
const { t } = useTranslation(meta.id);
|
|
18
|
-
const errorString = error?.toString() ?? '';
|
|
19
|
-
return (
|
|
20
|
-
<div role='none' className='overflow-y-auto p-8 attention-surface grid place-items-center'>
|
|
21
|
-
<p role='alert' className={mx(descriptionMessage, 'break-all rounded-md p-4')}>
|
|
22
|
-
{error ? errorString : t('error fallback message')}
|
|
23
|
-
</p>
|
|
24
|
-
</div>
|
|
25
|
-
);
|
|
26
|
-
};
|
|
27
|
-
|
|
28
18
|
export const PlankError = ({
|
|
29
19
|
id,
|
|
30
20
|
part,
|
|
31
21
|
node,
|
|
32
|
-
error,
|
|
22
|
+
error: errorProp,
|
|
33
23
|
}: {
|
|
34
24
|
id: string;
|
|
35
25
|
part: PlankHeadingProps['part'];
|
|
36
|
-
node?: Node;
|
|
26
|
+
node?: Node.Node;
|
|
37
27
|
error?: Error;
|
|
38
28
|
}) => {
|
|
39
29
|
const [timedOut, setTimedOut] = useState(false);
|
|
40
30
|
useEffect(() => {
|
|
41
|
-
setTimeout(() => setTimedOut(true),
|
|
31
|
+
const timer = setTimeout(() => setTimedOut(true), 5_000);
|
|
32
|
+
return () => clearTimeout(timer);
|
|
42
33
|
}, []);
|
|
34
|
+
|
|
35
|
+
const error = useMemo(() => {
|
|
36
|
+
if (timedOut) {
|
|
37
|
+
return new TimeoutError({ message: 'Timeout loading content' });
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
return errorProp;
|
|
41
|
+
}, [timedOut, errorProp]);
|
|
42
|
+
|
|
43
43
|
return (
|
|
44
44
|
<>
|
|
45
45
|
<PlankHeading id={id} part={part} node={node} pending={!timedOut} />
|
|
46
|
-
{timedOut ? <
|
|
46
|
+
{timedOut ? <PlankErrorFallback error={error} /> : <PlankLoading />}
|
|
47
47
|
</>
|
|
48
48
|
);
|
|
49
49
|
};
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* User facing error fallback.
|
|
53
|
+
*/
|
|
54
|
+
export const PlankErrorFallback = ({ error }: ErrorFallbackProps) => {
|
|
55
|
+
const { t } = useTranslation(meta.id);
|
|
56
|
+
|
|
57
|
+
useEffect(() => {
|
|
58
|
+
if (error) {
|
|
59
|
+
log.error(error);
|
|
60
|
+
}
|
|
61
|
+
}, [error]);
|
|
62
|
+
|
|
63
|
+
if (process.env.NODE_ENV === 'development') {
|
|
64
|
+
return <ErrorFallback title='Plank Error' error={error} />;
|
|
65
|
+
} else {
|
|
66
|
+
const errorString = error?.toString() ?? '';
|
|
67
|
+
return (
|
|
68
|
+
<div
|
|
69
|
+
role='alert'
|
|
70
|
+
data-testid='plank-content-error'
|
|
71
|
+
className='dx-attention-surface overflow-y-auto p-8 grid place-items-center'
|
|
72
|
+
>
|
|
73
|
+
<p className={mx(descriptionMessage, 'break-all rounded-md p-4')}>
|
|
74
|
+
{error ? errorString : t('error fallback message')}
|
|
75
|
+
</p>
|
|
76
|
+
</div>
|
|
77
|
+
);
|
|
78
|
+
}
|
|
79
|
+
};
|
|
@@ -4,18 +4,19 @@
|
|
|
4
4
|
|
|
5
5
|
import React, { Fragment, type MouseEvent, memo, useCallback, useEffect, useMemo } from 'react';
|
|
6
6
|
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
7
|
+
import { Surface, useOperationInvoker } from '@dxos/app-framework/ui';
|
|
8
|
+
import { LayoutOperation, getCompanionVariant } from '@dxos/app-toolkit';
|
|
9
|
+
import { useAppGraph } from '@dxos/app-toolkit/ui';
|
|
10
|
+
import { Graph, type Node, useActionRunner } from '@dxos/plugin-graph';
|
|
10
11
|
import { Icon, IconButton, Popover, toLocalizedString, useTranslation } from '@dxos/react-ui';
|
|
11
12
|
import { StackItem, type StackItemSigilAction } from '@dxos/react-ui-stack';
|
|
12
13
|
import { TextTooltip } from '@dxos/react-ui-text-tooltip';
|
|
13
|
-
import { hoverableControls, hoverableFocusedWithinControls } from '@dxos/
|
|
14
|
+
import { hoverableControls, hoverableFocusedWithinControls, iconSize } from '@dxos/ui-theme';
|
|
14
15
|
|
|
15
16
|
import { useBreakpoints } from '../../hooks';
|
|
16
|
-
import { parseEntryId } from '../../layout';
|
|
17
17
|
import { meta } from '../../meta';
|
|
18
|
-
import {
|
|
18
|
+
import { type LayoutMode, PLANK_COMPANION_TYPE, type ResolvedPart } from '../../types';
|
|
19
|
+
import { DeckOperation } from '../../operations';
|
|
19
20
|
import { soloInlinePadding } from '../fragments';
|
|
20
21
|
|
|
21
22
|
import { PlankCompanionControls, PlankControls } from './PlankControls';
|
|
@@ -26,7 +27,7 @@ export type PlankHeadingProps = {
|
|
|
26
27
|
id: string;
|
|
27
28
|
part: ResolvedPart;
|
|
28
29
|
layoutMode?: LayoutMode;
|
|
29
|
-
node?: Node;
|
|
30
|
+
node?: Node.Node;
|
|
30
31
|
deckEnabled?: boolean;
|
|
31
32
|
canIncrementStart?: boolean;
|
|
32
33
|
canIncrementEnd?: boolean;
|
|
@@ -34,7 +35,7 @@ export type PlankHeadingProps = {
|
|
|
34
35
|
primaryId?: string;
|
|
35
36
|
pending?: boolean;
|
|
36
37
|
companioned?: 'primary' | 'companion';
|
|
37
|
-
companions?: Node[];
|
|
38
|
+
companions?: Node.Node[];
|
|
38
39
|
actions?: StackItemSigilAction[];
|
|
39
40
|
};
|
|
40
41
|
|
|
@@ -55,7 +56,8 @@ export const PlankHeading = memo(
|
|
|
55
56
|
actions = [],
|
|
56
57
|
}: PlankHeadingProps) => {
|
|
57
58
|
const { t } = useTranslation(meta.id);
|
|
58
|
-
const {
|
|
59
|
+
const { invokePromise } = useOperationInvoker();
|
|
60
|
+
const runAction = useActionRunner();
|
|
59
61
|
const { graph } = useAppGraph();
|
|
60
62
|
const breakpoint = useBreakpoints();
|
|
61
63
|
const icon = node?.properties?.icon ?? 'ph--placeholder--regular';
|
|
@@ -69,7 +71,7 @@ export const PlankHeading = memo(
|
|
|
69
71
|
const frame = requestAnimationFrame(() => {
|
|
70
72
|
// Load actions for the node.
|
|
71
73
|
if (node) {
|
|
72
|
-
void
|
|
74
|
+
void Graph.expand(graph, node.id, 'child');
|
|
73
75
|
}
|
|
74
76
|
});
|
|
75
77
|
|
|
@@ -89,7 +91,7 @@ export const PlankHeading = memo(
|
|
|
89
91
|
[breakpoint, part, companions, canIncrementStart, canIncrementEnd, isCompanionNode, deckEnabled],
|
|
90
92
|
);
|
|
91
93
|
|
|
92
|
-
const
|
|
94
|
+
const variant = isCompanionNode ? getCompanionVariant(id) : undefined;
|
|
93
95
|
const sigilActions = useMemo(() => {
|
|
94
96
|
if (!node) {
|
|
95
97
|
return undefined;
|
|
@@ -98,81 +100,73 @@ export const PlankHeading = memo(
|
|
|
98
100
|
} else {
|
|
99
101
|
return [
|
|
100
102
|
actions,
|
|
101
|
-
graph
|
|
102
|
-
.
|
|
103
|
-
|
|
103
|
+
Graph.getActions(graph, node.id).filter((action) =>
|
|
104
|
+
['list-item', 'list-item-primary', 'heading-list-item'].includes(action.properties.disposition),
|
|
105
|
+
),
|
|
104
106
|
].filter((a) => a.length > 0);
|
|
105
107
|
}
|
|
106
108
|
}, [actions, node, variant, graph]);
|
|
107
109
|
|
|
108
110
|
const handleAction = useCallback(
|
|
109
111
|
(action: StackItemSigilAction) => {
|
|
110
|
-
typeof action.data === 'function'
|
|
112
|
+
if (typeof action.data === 'function') {
|
|
113
|
+
void runAction(action as Node.Action, { parent: node, caller: meta.id });
|
|
114
|
+
}
|
|
111
115
|
},
|
|
112
|
-
[node],
|
|
116
|
+
[node, runAction],
|
|
113
117
|
);
|
|
114
118
|
|
|
115
119
|
const handlePlankAction = useCallback(
|
|
116
|
-
(eventType:
|
|
120
|
+
(eventType: DeckOperation.PartAdjustment) => {
|
|
117
121
|
if (eventType.startsWith('solo')) {
|
|
118
|
-
return
|
|
122
|
+
return invokePromise(DeckOperation.Adjust, { type: eventType, id });
|
|
119
123
|
} else if (eventType === 'close') {
|
|
120
124
|
if (part === 'complementary') {
|
|
121
|
-
return
|
|
122
|
-
createIntent(LayoutAction.UpdateComplementary, {
|
|
123
|
-
part: 'complementary',
|
|
124
|
-
options: { state: 'collapsed' },
|
|
125
|
-
}),
|
|
126
|
-
);
|
|
125
|
+
return invokePromise(LayoutOperation.UpdateComplementary, { state: 'collapsed' });
|
|
127
126
|
} else {
|
|
128
|
-
return
|
|
129
|
-
createIntent(LayoutAction.Close, { part: 'main', subject: [id], options: { state: false } }),
|
|
130
|
-
);
|
|
127
|
+
return invokePromise(LayoutOperation.Close, { subject: [id] });
|
|
131
128
|
}
|
|
132
129
|
} else {
|
|
133
|
-
return
|
|
130
|
+
return invokePromise(DeckOperation.Adjust, { type: eventType, id });
|
|
134
131
|
}
|
|
135
132
|
},
|
|
136
|
-
[
|
|
133
|
+
[invokePromise, id, part],
|
|
137
134
|
);
|
|
138
135
|
|
|
139
|
-
const ActionRoot = node && popoverAnchorId ===
|
|
136
|
+
const ActionRoot = node && popoverAnchorId === `${meta.id}:${node.id}` ? Popover.Anchor : Fragment;
|
|
140
137
|
|
|
141
138
|
const handleTabClick = useCallback(
|
|
142
139
|
(event: MouseEvent) => {
|
|
143
140
|
const target = (event.target as HTMLElement).closest('[data-id]') as HTMLElement | null;
|
|
144
141
|
const tabId = target?.dataset?.id;
|
|
145
|
-
if (
|
|
146
|
-
void
|
|
147
|
-
createIntent(DeckAction.ChangeCompanion, {
|
|
148
|
-
primary: primaryId,
|
|
149
|
-
companion: tabId,
|
|
150
|
-
}),
|
|
151
|
-
);
|
|
142
|
+
if (tabId) {
|
|
143
|
+
void invokePromise(DeckOperation.ChangeCompanion, { companion: tabId });
|
|
152
144
|
}
|
|
153
145
|
},
|
|
154
|
-
[
|
|
146
|
+
[invokePromise],
|
|
155
147
|
);
|
|
156
148
|
|
|
157
149
|
return (
|
|
158
150
|
<StackItem.Heading
|
|
151
|
+
data-tauri-drag-region
|
|
152
|
+
data-plank-heading
|
|
153
|
+
style={iconSize(5)}
|
|
159
154
|
classNames={[
|
|
160
|
-
'
|
|
161
|
-
part === 'solo' ? soloInlinePadding : '
|
|
155
|
+
'py-1 items-stretch gap-1 sticky left-12 dx-app-drag min-w-0 dx-contain-layout dx-density-coarse',
|
|
156
|
+
part === 'solo' ? soloInlinePadding : 'px-1',
|
|
162
157
|
...(layoutMode === 'solo--fullscreen'
|
|
163
158
|
? [
|
|
164
159
|
hoverableControls,
|
|
165
160
|
hoverableFocusedWithinControls,
|
|
166
|
-
'*:transition-opacity *:opacity-
|
|
167
|
-
'hover-hover:hover:bg-
|
|
161
|
+
'*:transition-opacity *:opacity-(--controls-opacity) bg-transparent border-transparent transition-[background-color,border-color]',
|
|
162
|
+
'hover-hover:hover:bg-header-surface focus-within:bg-header-surface hover-hover:hover:border-subdued-separator focus-within:border-subdued-separator',
|
|
168
163
|
]
|
|
169
164
|
: []),
|
|
170
165
|
]}
|
|
171
|
-
data-plank-heading
|
|
172
166
|
>
|
|
173
167
|
{companions && isCompanionNode ? (
|
|
174
168
|
/* TODO(thure): IMPORTANT: This is a tablist; it should be implemented as such. */
|
|
175
|
-
<div role='none' className='flex-1 min-
|
|
169
|
+
<div data-tauri-drag-region role='none' className='flex-1 min-w-0 overflow-x-auto scrollbar-none flex gap-1'>
|
|
176
170
|
{companions.map(({ id, properties: { icon, label } }) => (
|
|
177
171
|
<IconButton
|
|
178
172
|
key={id}
|
|
@@ -197,7 +191,7 @@ export const PlankHeading = memo(
|
|
|
197
191
|
actions={sigilActions}
|
|
198
192
|
onAction={handleAction}
|
|
199
193
|
>
|
|
200
|
-
<Surface role='menu-footer' data={{ subject: node.data }} />
|
|
194
|
+
<Surface.Surface role='menu-footer' data={{ subject: node.data }} />
|
|
201
195
|
</StackItem.Sigil>
|
|
202
196
|
) : (
|
|
203
197
|
<StackItem.SigilButton>
|
|
@@ -208,6 +202,7 @@ export const PlankHeading = memo(
|
|
|
208
202
|
</ActionRoot>
|
|
209
203
|
<TextTooltip text={label} onlyWhenTruncating>
|
|
210
204
|
<StackItem.HeadingLabel
|
|
205
|
+
data-tauri-drag-region
|
|
211
206
|
attendableId={attendableId}
|
|
212
207
|
related={part === 'complementary'}
|
|
213
208
|
{...(pending && { classNames: 'text-description' })}
|
|
@@ -217,7 +212,7 @@ export const PlankHeading = memo(
|
|
|
217
212
|
</TextTooltip>
|
|
218
213
|
</>
|
|
219
214
|
)}
|
|
220
|
-
{node && part !== 'complementary' && <Surface role='navbar-end' data={{ subject: node.data }} />}
|
|
215
|
+
{node && part !== 'complementary' && <Surface.Surface role='navbar-end' data={{ subject: node.data }} />}
|
|
221
216
|
{companioned === 'companion' ? (
|
|
222
217
|
<PlankCompanionControls primary={primaryId} />
|
|
223
218
|
) : (
|
|
@@ -6,5 +6,5 @@ import React from 'react';
|
|
|
6
6
|
|
|
7
7
|
// TODO(burdon): Show skeleton: https://github.com/dxos/dxos/issues/8259
|
|
8
8
|
export const PlankLoading = () => {
|
|
9
|
-
return <div role='none' className='grid place-items-center attention-surface' />;
|
|
9
|
+
return <div role='none' className='grid place-items-center dx-attention-surface' />;
|
|
10
10
|
};
|