@dxos/plugin-deck 0.8.4-main.74a063c4e0 → 0.8.4-main.765dc60934
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/LICENSE +102 -5
- package/README.md +1 -1
- package/dist/lib/neutral/DeckLayout-6SICSSUF.mjs +278 -0
- package/dist/lib/neutral/DeckLayout-6SICSSUF.mjs.map +7 -0
- package/dist/lib/neutral/DeckPlugin.mjs +70 -0
- package/dist/lib/neutral/DeckPlugin.mjs.map +7 -0
- package/dist/lib/neutral/DeckPlugin.node.mjs +18 -0
- package/dist/lib/neutral/DeckPlugin.node.mjs.map +7 -0
- package/dist/lib/neutral/DeckSettings-W5I57OXM.mjs +27 -0
- package/dist/lib/neutral/DeckSettings-W5I57OXM.mjs.map +7 -0
- package/dist/lib/{browser/add-toast-HW74YZHJ.mjs → neutral/add-toast-2OMTFZ2L.mjs} +5 -5
- package/dist/lib/{browser/add-toast-HW74YZHJ.mjs.map → neutral/add-toast-2OMTFZ2L.mjs.map} +2 -2
- package/dist/lib/{browser/adjust-OXVHZTBE.mjs → neutral/adjust-RXTF3IT3.mjs} +17 -20
- package/dist/lib/neutral/adjust-RXTF3IT3.mjs.map +7 -0
- package/dist/lib/neutral/app-graph-builder-GZYYAN5B.mjs +129 -0
- package/dist/lib/neutral/app-graph-builder-GZYYAN5B.mjs.map +7 -0
- package/dist/lib/neutral/capabilities/index.mjs +23 -0
- package/dist/lib/neutral/capabilities/index.mjs.map +7 -0
- package/dist/lib/neutral/check-app-scheme-A7FZVNZO.mjs +10 -0
- package/dist/lib/neutral/chunk-4MYX2NT3.mjs +1335 -0
- package/dist/lib/neutral/chunk-4MYX2NT3.mjs.map +7 -0
- package/dist/lib/neutral/chunk-64ODQD6S.mjs +282 -0
- package/dist/lib/neutral/chunk-64ODQD6S.mjs.map +7 -0
- package/dist/lib/neutral/chunk-6MOYMDKQ.mjs +8 -0
- package/dist/lib/neutral/chunk-6MOYMDKQ.mjs.map +7 -0
- package/dist/lib/neutral/chunk-GBIGQKYW.mjs +112 -0
- package/dist/lib/neutral/chunk-GBIGQKYW.mjs.map +7 -0
- package/dist/lib/{browser/chunk-KUTDCWZF.mjs → neutral/chunk-GLB73Q6U.mjs} +2 -10
- package/dist/lib/{node-esm/chunk-MLVJ2ODW.mjs.map → neutral/chunk-GLB73Q6U.mjs.map} +2 -2
- package/dist/lib/neutral/chunk-JMYWDX4I.mjs +19 -0
- package/dist/lib/neutral/chunk-JMYWDX4I.mjs.map +7 -0
- package/dist/lib/neutral/chunk-VHETZ22W.mjs +101 -0
- package/dist/lib/neutral/chunk-VHETZ22W.mjs.map +7 -0
- package/dist/lib/{browser/chunk-DF2VZ6W3.mjs → neutral/chunk-ZYYOSX5I.mjs} +1 -1
- package/dist/lib/{browser/chunk-DF2VZ6W3.mjs.map → neutral/chunk-ZYYOSX5I.mjs.map} +2 -2
- package/dist/lib/{browser/close-N5FCDT7Y.mjs → neutral/close-DG5IVQCE.mjs} +12 -12
- package/dist/lib/{browser/close-N5FCDT7Y.mjs.map → neutral/close-DG5IVQCE.mjs.map} +2 -2
- package/dist/lib/neutral/components/index.mjs +126 -0
- package/dist/lib/neutral/components/index.mjs.map +7 -0
- package/dist/lib/neutral/containers/index.mjs +32 -0
- package/dist/lib/neutral/containers/index.mjs.map +7 -0
- package/dist/lib/neutral/hooks/index.mjs +178 -0
- package/dist/lib/neutral/hooks/index.mjs.map +7 -0
- package/dist/lib/{node-esm/types → neutral}/index.mjs +13 -8
- package/dist/lib/neutral/meta.json +1 -0
- package/dist/lib/neutral/meta.mjs +8 -0
- package/dist/lib/{browser/open-J5HV42UN.mjs → neutral/open-SGYZO7RF.mjs} +21 -24
- package/dist/lib/neutral/open-SGYZO7RF.mjs.map +7 -0
- package/dist/lib/neutral/operation-handler-266CVMTW.mjs +13 -0
- package/dist/lib/neutral/operation-handler-266CVMTW.mjs.map +7 -0
- package/dist/lib/neutral/operations/index.mjs +8 -0
- package/dist/lib/neutral/operations/index.mjs.map +7 -0
- package/dist/lib/neutral/plugin.mjs +16 -0
- package/dist/lib/neutral/plugin.mjs.map +7 -0
- package/dist/lib/neutral/react-root-WZ6KH27J.mjs +41 -0
- package/dist/lib/neutral/react-root-WZ6KH27J.mjs.map +7 -0
- package/dist/lib/neutral/react-surface-KAAZDHV3.mjs +34 -0
- package/dist/lib/neutral/react-surface-KAAZDHV3.mjs.map +7 -0
- package/dist/lib/{browser/revert-workspace-VWNN7RYF.mjs → neutral/revert-workspace-V6D7W6CL.mjs} +5 -5
- package/dist/lib/{browser/revert-workspace-VWNN7RYF.mjs.map → neutral/revert-workspace-V6D7W6CL.mjs.map} +2 -2
- package/dist/lib/{browser/scroll-into-view-CA7E3PSO.mjs → neutral/scroll-into-view-UM446Q2T.mjs} +5 -5
- package/dist/lib/{browser/scroll-into-view-CA7E3PSO.mjs.map → neutral/scroll-into-view-UM446Q2T.mjs.map} +2 -2
- package/dist/lib/{browser/set-YVWQQZLE.mjs → neutral/set-JFFKT32S.mjs} +11 -11
- package/dist/lib/{browser/set-YVWQQZLE.mjs.map → neutral/set-JFFKT32S.mjs.map} +2 -2
- package/dist/lib/{browser/set-layout-mode-DRNBZHE7.mjs → neutral/set-layout-mode-I4YV5V2Y.mjs} +10 -15
- package/dist/lib/neutral/set-layout-mode-I4YV5V2Y.mjs.map +7 -0
- package/dist/lib/neutral/settings-FE7AC5VS.mjs +34 -0
- package/dist/lib/neutral/settings-FE7AC5VS.mjs.map +7 -0
- package/dist/lib/{browser/show-undo-KA2XHQ6E.mjs → neutral/show-undo-ZCMF4J2Q.mjs} +5 -5
- package/dist/lib/{browser/show-undo-KA2XHQ6E.mjs.map → neutral/show-undo-ZCMF4J2Q.mjs.map} +2 -2
- package/dist/lib/neutral/state-IIDXMQUO.mjs +86 -0
- package/dist/lib/neutral/state-IIDXMQUO.mjs.map +7 -0
- package/dist/lib/{browser/switch-workspace-U7SPENHU.mjs → neutral/switch-workspace-CVDYG5YZ.mjs} +8 -16
- package/dist/lib/neutral/switch-workspace-CVDYG5YZ.mjs.map +7 -0
- package/dist/lib/neutral/translations.mjs +57 -0
- package/dist/lib/neutral/translations.mjs.map +7 -0
- package/dist/lib/{browser → neutral}/types/index.mjs +7 -5
- package/dist/lib/neutral/types/index.mjs.map +7 -0
- package/dist/lib/neutral/update-companion-VPCM7FJX.mjs +32 -0
- package/dist/lib/neutral/update-companion-VPCM7FJX.mjs.map +7 -0
- package/dist/lib/{browser/update-complementary-W6UVLWLI.mjs → neutral/update-complementary-SEQ6DDWA.mjs} +6 -6
- package/dist/lib/neutral/update-complementary-SEQ6DDWA.mjs.map +7 -0
- package/dist/lib/{browser/update-dialog-VCTI7WKS.mjs → neutral/update-dialog-VDHYE4QH.mjs} +5 -5
- package/dist/lib/{browser/update-dialog-VCTI7WKS.mjs.map → neutral/update-dialog-VDHYE4QH.mjs.map} +2 -2
- package/dist/lib/neutral/update-plank-size-ZXOUZD7Y.mjs +26 -0
- package/dist/lib/neutral/update-plank-size-ZXOUZD7Y.mjs.map +7 -0
- package/dist/lib/{browser/update-popover-4EVVZSB6.mjs → neutral/update-popover-VFP32W57.mjs} +5 -5
- package/dist/lib/{browser/update-popover-4EVVZSB6.mjs.map → neutral/update-popover-VFP32W57.mjs.map} +2 -2
- package/dist/lib/{browser/update-sidebar-PAZARC4Q.mjs → neutral/update-sidebar-O5HBOXYH.mjs} +6 -6
- package/dist/lib/{browser/update-sidebar-PAZARC4Q.mjs.map → neutral/update-sidebar-O5HBOXYH.mjs.map} +2 -2
- package/dist/lib/neutral/url-handler-3QTKEM2K.mjs +184 -0
- package/dist/lib/neutral/url-handler-3QTKEM2K.mjs.map +7 -0
- package/dist/types/src/DeckPlugin.d.ts +1 -0
- package/dist/types/src/DeckPlugin.d.ts.map +1 -1
- package/dist/types/src/DeckPlugin.node.d.ts +4 -0
- package/dist/types/src/DeckPlugin.node.d.ts.map +1 -0
- package/dist/types/src/DeckPlugin.test.d.ts +2 -0
- package/dist/types/src/DeckPlugin.test.d.ts.map +1 -0
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
- package/dist/types/src/capabilities/check-app-scheme.d.ts +1 -1
- package/dist/types/src/capabilities/check-app-scheme.d.ts.map +1 -1
- package/dist/types/src/capabilities/index.d.ts +18 -30
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/operation-handler.d.ts +1 -1
- package/dist/types/src/capabilities/operation-handler.d.ts.map +1 -1
- package/dist/types/src/capabilities/react-root.d.ts.map +1 -1
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
- package/dist/types/src/capabilities/settings.d.ts +2 -13
- package/dist/types/src/capabilities/settings.d.ts.map +1 -1
- package/dist/types/src/capabilities/state.d.ts +16 -16
- package/dist/types/src/capabilities/state.d.ts.map +1 -1
- package/dist/types/src/capabilities/tools.d.ts.map +1 -1
- package/dist/types/src/capabilities/url-handler.d.ts +1 -1
- package/dist/types/src/capabilities/url-handler.d.ts.map +1 -1
- package/dist/types/src/components/DeckSettings/DeckSettings.d.ts.map +1 -1
- package/dist/types/src/components/DeckSettings/DeckSettings.stories.d.ts +42 -52
- package/dist/types/src/components/DeckSettings/DeckSettings.stories.d.ts.map +1 -1
- package/dist/types/src/components/Matrix/Matrix.d.ts +2 -10
- package/dist/types/src/components/Matrix/Matrix.d.ts.map +1 -1
- package/dist/types/src/components/Matrix/Matrix.stories.d.ts.map +1 -1
- package/dist/types/src/containers/Deck/Banner.d.ts +1 -1
- package/dist/types/src/containers/Deck/Banner.d.ts.map +1 -1
- package/dist/types/src/containers/Deck/Deck.d.ts.map +1 -1
- package/dist/types/src/containers/Deck/Deck.stories.d.ts +42 -52
- package/dist/types/src/containers/Deck/Deck.stories.d.ts.map +1 -1
- package/dist/types/src/containers/Deck/DeckContent.d.ts +4 -4
- package/dist/types/src/containers/Deck/DeckContent.d.ts.map +1 -1
- package/dist/types/src/containers/Deck/DeckRoot.d.ts +5 -8
- package/dist/types/src/containers/Deck/DeckRoot.d.ts.map +1 -1
- package/dist/types/src/containers/Deck/DeckViewport.d.ts +4 -7
- package/dist/types/src/containers/Deck/DeckViewport.d.ts.map +1 -1
- package/dist/types/src/containers/Deck/StatusBar.d.ts.map +1 -1
- package/dist/types/src/containers/DeckLayout/DeckLayout.d.ts.map +1 -1
- package/dist/types/src/containers/DeckLayout/DeckLayout.stories.d.ts +42 -52
- package/dist/types/src/containers/DeckLayout/DeckLayout.stories.d.ts.map +1 -1
- package/dist/types/src/containers/DeckLayout/Dialog.d.ts.map +1 -1
- package/dist/types/src/containers/DeckLayout/Popover.d.ts.map +1 -1
- package/dist/types/src/containers/DeckLayout/Toast.d.ts +1 -1
- package/dist/types/src/containers/DeckLayout/Toast.d.ts.map +1 -1
- package/dist/types/src/containers/DeckLayout/index.d.ts.map +1 -1
- package/dist/types/src/containers/Plank/Plank.d.ts +2 -6
- package/dist/types/src/containers/Plank/Plank.d.ts.map +1 -1
- package/dist/types/src/containers/Plank/Plank.stories.d.ts +43 -52
- package/dist/types/src/containers/Plank/Plank.stories.d.ts.map +1 -1
- package/dist/types/src/containers/Plank/PlankComponent.d.ts +2 -0
- package/dist/types/src/containers/Plank/PlankComponent.d.ts.map +1 -1
- package/dist/types/src/containers/Plank/PlankContent.d.ts +1 -5
- package/dist/types/src/containers/Plank/PlankContent.d.ts.map +1 -1
- package/dist/types/src/containers/Plank/PlankControls.d.ts.map +1 -1
- package/dist/types/src/containers/Plank/PlankError.d.ts +1 -1
- package/dist/types/src/containers/Plank/PlankError.d.ts.map +1 -1
- package/dist/types/src/containers/Plank/PlankHeading.d.ts +2 -1
- package/dist/types/src/containers/Plank/PlankHeading.d.ts.map +1 -1
- package/dist/types/src/containers/Plank/PlankRoot.d.ts +3 -3
- package/dist/types/src/containers/Plank/PlankRoot.d.ts.map +1 -1
- package/dist/types/src/containers/Sidebar/ComplementarySidebar.d.ts.map +1 -1
- package/dist/types/src/containers/Sidebar/SidebarButton.d.ts +1 -1
- package/dist/types/src/containers/Sidebar/SidebarButton.d.ts.map +1 -1
- package/dist/types/src/hooks/useBreakpoints.d.ts +1 -1
- package/dist/types/src/hooks/useCompanions.d.ts.map +1 -1
- package/dist/types/src/hooks/useDeckCompanions.d.ts +2 -1
- package/dist/types/src/hooks/useDeckCompanions.d.ts.map +1 -1
- package/dist/types/src/hooks/useHoistStatusbar.d.ts.map +1 -1
- package/dist/types/src/hooks/useMainSize.d.ts.map +1 -1
- package/dist/types/src/hooks/useNodeActionExpander.d.ts.map +1 -1
- package/dist/types/src/hooks/useSelectedCompanion.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +1 -3
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/layout.d.ts.map +1 -1
- package/dist/types/src/meta.d.ts.map +1 -1
- package/dist/types/src/operations/add-toast.d.ts +1 -1
- package/dist/types/src/operations/add-toast.d.ts.map +1 -1
- package/dist/types/src/operations/adjust.d.ts +3 -3
- package/dist/types/src/operations/adjust.d.ts.map +1 -1
- package/dist/types/src/operations/close.d.ts +1 -1
- package/dist/types/src/operations/close.d.ts.map +1 -1
- package/dist/types/src/operations/helpers.d.ts.map +1 -1
- package/dist/types/src/operations/index.d.ts +1 -2
- package/dist/types/src/operations/index.d.ts.map +1 -1
- package/dist/types/src/operations/open.d.ts +1 -1
- package/dist/types/src/operations/open.d.ts.map +1 -1
- package/dist/types/src/operations/revert-workspace.d.ts +1 -1
- package/dist/types/src/operations/revert-workspace.d.ts.map +1 -1
- package/dist/types/src/operations/scroll-into-view.d.ts +1 -1
- package/dist/types/src/operations/scroll-into-view.d.ts.map +1 -1
- package/dist/types/src/operations/set-layout-mode.d.ts +1 -1
- package/dist/types/src/operations/set-layout-mode.d.ts.map +1 -1
- package/dist/types/src/operations/set.d.ts +1 -1
- package/dist/types/src/operations/set.d.ts.map +1 -1
- package/dist/types/src/operations/show-undo.d.ts +1 -1
- package/dist/types/src/operations/show-undo.d.ts.map +1 -1
- package/dist/types/src/operations/switch-workspace.d.ts +1 -1
- package/dist/types/src/operations/switch-workspace.d.ts.map +1 -1
- package/dist/types/src/operations/update-companion.d.ts +5 -0
- package/dist/types/src/operations/update-companion.d.ts.map +1 -0
- package/dist/types/src/operations/update-complementary.d.ts +1 -1
- package/dist/types/src/operations/update-complementary.d.ts.map +1 -1
- package/dist/types/src/operations/update-dialog.d.ts +1 -1
- package/dist/types/src/operations/update-dialog.d.ts.map +1 -1
- package/dist/types/src/operations/update-plank-size.d.ts +3 -3
- package/dist/types/src/operations/update-plank-size.d.ts.map +1 -1
- package/dist/types/src/operations/update-popover.d.ts +1 -1
- package/dist/types/src/operations/update-popover.d.ts.map +1 -1
- package/dist/types/src/operations/update-sidebar.d.ts +1 -1
- package/dist/types/src/operations/update-sidebar.d.ts.map +1 -1
- package/dist/types/src/plugin.d.ts +4 -0
- package/dist/types/src/plugin.d.ts.map +1 -0
- package/dist/types/src/translations.d.ts +42 -53
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/DeckCapabilities.d.ts +188 -0
- package/dist/types/src/types/DeckCapabilities.d.ts.map +1 -0
- package/dist/types/src/types/DeckEvents.d.ts +5 -0
- package/dist/types/src/types/DeckEvents.d.ts.map +1 -0
- package/dist/types/src/{operations/definitions.d.ts → types/DeckOperation.d.ts} +3 -6
- package/dist/types/src/types/DeckOperation.d.ts.map +1 -0
- package/dist/types/src/types/Settings.d.ts +7 -6
- package/dist/types/src/types/Settings.d.ts.map +1 -1
- package/dist/types/src/types/index.d.ts +3 -2
- package/dist/types/src/types/index.d.ts.map +1 -1
- package/dist/types/src/types/schema.d.ts +0 -11
- package/dist/types/src/types/schema.d.ts.map +1 -1
- package/dist/types/src/util/layoutAppliesTopbar.d.ts.map +1 -1
- package/dist/types/src/util/plank-url-params.d.ts.map +1 -1
- package/dist/types/src/util/sanitize-persisted-state.d.ts.map +1 -1
- package/dist/types/src/util/set-active.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +104 -78
- package/src/DeckPlugin.node.ts +17 -0
- package/src/DeckPlugin.test.ts +27 -0
- package/src/DeckPlugin.ts +6 -5
- package/src/capabilities/app-graph-builder.ts +6 -6
- package/src/capabilities/index.ts +1 -1
- package/src/capabilities/operation-handler.ts +1 -1
- package/src/capabilities/react-surface.tsx +1 -2
- package/src/capabilities/settings.ts +1 -1
- package/src/capabilities/tools.ts +3 -3
- package/src/capabilities/url-handler.ts +6 -1
- package/src/components/DeckSettings/DeckSettings.stories.tsx +2 -1
- package/src/components/DeckSettings/DeckSettings.tsx +8 -47
- package/src/components/Matrix/Matrix.stories.tsx +22 -15
- package/src/components/Matrix/Matrix.tsx +1 -1
- package/src/components/Matrix/SPEC.md +1 -1
- package/src/containers/Deck/Banner.tsx +2 -2
- package/src/containers/Deck/Deck.stories.tsx +1 -3
- package/src/containers/Deck/DeckContent.tsx +1 -1
- package/src/containers/Deck/DeckViewport.tsx +14 -19
- package/src/containers/DeckLayout/ActiveNode.tsx +3 -3
- package/src/containers/DeckLayout/DeckLayout.stories.tsx +90 -90
- package/src/containers/DeckLayout/Dialog.tsx +8 -2
- package/src/containers/DeckLayout/Fallback.tsx +1 -1
- package/src/containers/DeckLayout/Popover.tsx +6 -4
- package/src/containers/Plank/Plank.stories.tsx +11 -8
- package/src/containers/Plank/PlankComponent.tsx +58 -21
- package/src/containers/Plank/PlankControls.tsx +2 -2
- package/src/containers/Plank/PlankError.tsx +1 -1
- package/src/containers/Plank/PlankHeading.tsx +18 -8
- package/src/containers/Plank/PlankLoading.tsx +1 -1
- package/src/containers/Plank/PlankRoot.tsx +3 -3
- package/src/containers/Sidebar/ComplementarySidebar.tsx +7 -8
- package/src/containers/Sidebar/Sidebar.tsx +2 -2
- package/src/containers/Sidebar/SidebarButton.tsx +7 -1
- package/src/hooks/useDeckCompanions.ts +2 -1
- package/src/index.ts +1 -3
- package/src/meta.ts +1 -0
- package/src/operations/add-toast.ts +1 -1
- package/src/operations/adjust.ts +5 -6
- package/src/operations/close.ts +2 -2
- package/src/operations/index.ts +2 -4
- package/src/operations/open.ts +7 -7
- package/src/operations/revert-workspace.ts +1 -1
- package/src/operations/scroll-into-view.ts +1 -1
- package/src/operations/set-layout-mode.ts +1 -1
- package/src/operations/set.ts +2 -2
- package/src/operations/show-undo.ts +1 -1
- package/src/operations/switch-workspace.ts +1 -1
- package/src/operations/{change-companion.ts → update-companion.ts} +5 -5
- package/src/operations/update-complementary.ts +1 -1
- package/src/operations/update-dialog.ts +1 -1
- package/src/operations/update-plank-size.ts +3 -4
- package/src/operations/update-popover.ts +1 -1
- package/src/operations/update-sidebar.ts +1 -1
- package/src/plugin.ts +11 -0
- package/src/translations.ts +2 -12
- package/src/types/DeckCapabilities.ts +34 -0
- package/src/types/DeckEvents.ts +21 -0
- package/src/{operations/definitions.ts → types/DeckOperation.ts} +4 -14
- package/src/types/Settings.ts +31 -6
- package/src/types/index.ts +4 -2
- package/src/types/schema.ts +0 -9
- package/dist/lib/browser/adjust-OXVHZTBE.mjs.map +0 -7
- package/dist/lib/browser/change-companion-Z3Q2UPX4.mjs +0 -34
- package/dist/lib/browser/change-companion-Z3Q2UPX4.mjs.map +0 -7
- package/dist/lib/browser/chunk-2YNVGCOQ.mjs +0 -88
- package/dist/lib/browser/chunk-2YNVGCOQ.mjs.map +0 -7
- package/dist/lib/browser/chunk-BRZAVPMC.mjs +0 -48
- package/dist/lib/browser/chunk-BRZAVPMC.mjs.map +0 -7
- package/dist/lib/browser/chunk-GFOCQS7S.mjs +0 -216
- package/dist/lib/browser/chunk-GFOCQS7S.mjs.map +0 -7
- package/dist/lib/browser/chunk-KUTDCWZF.mjs.map +0 -7
- package/dist/lib/browser/index.mjs +0 -201
- package/dist/lib/browser/index.mjs.map +0 -7
- package/dist/lib/browser/meta.json +0 -1
- package/dist/lib/browser/open-J5HV42UN.mjs.map +0 -7
- package/dist/lib/browser/operations/index.mjs +0 -13
- package/dist/lib/browser/operations/index.mjs.map +0 -7
- package/dist/lib/browser/set-layout-mode-DRNBZHE7.mjs.map +0 -7
- package/dist/lib/browser/switch-workspace-U7SPENHU.mjs.map +0 -7
- package/dist/lib/browser/update-complementary-W6UVLWLI.mjs.map +0 -7
- package/dist/lib/browser/update-plank-size-6TPVOYLT.mjs +0 -28
- package/dist/lib/browser/update-plank-size-6TPVOYLT.mjs.map +0 -7
- package/dist/lib/node-esm/add-toast-FA7NTWKA.mjs +0 -25
- package/dist/lib/node-esm/add-toast-FA7NTWKA.mjs.map +0 -7
- package/dist/lib/node-esm/adjust-G6FGZW6H.mjs +0 -97
- package/dist/lib/node-esm/adjust-G6FGZW6H.mjs.map +0 -7
- package/dist/lib/node-esm/change-companion-V6343HMY.mjs +0 -35
- package/dist/lib/node-esm/change-companion-V6343HMY.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-6BWQJDNT.mjs +0 -217
- package/dist/lib/node-esm/chunk-6BWQJDNT.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-GI5JXNBT.mjs +0 -89
- package/dist/lib/node-esm/chunk-GI5JXNBT.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-HSLMI22Q.mjs +0 -11
- package/dist/lib/node-esm/chunk-IRWCUYJY.mjs +0 -71
- package/dist/lib/node-esm/chunk-IRWCUYJY.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-MB4SDDVY.mjs +0 -50
- package/dist/lib/node-esm/chunk-MB4SDDVY.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-MLVJ2ODW.mjs +0 -32
- package/dist/lib/node-esm/close-AMA63RJN.mjs +0 -45
- package/dist/lib/node-esm/close-AMA63RJN.mjs.map +0 -7
- package/dist/lib/node-esm/index.mjs +0 -202
- package/dist/lib/node-esm/index.mjs.map +0 -7
- package/dist/lib/node-esm/meta.json +0 -1
- package/dist/lib/node-esm/open-KRCARMEB.mjs +0 -151
- package/dist/lib/node-esm/open-KRCARMEB.mjs.map +0 -7
- package/dist/lib/node-esm/operations/index.mjs +0 -14
- package/dist/lib/node-esm/operations/index.mjs.map +0 -7
- package/dist/lib/node-esm/revert-workspace-A2K3JQFS.mjs +0 -22
- package/dist/lib/node-esm/revert-workspace-A2K3JQFS.mjs.map +0 -7
- package/dist/lib/node-esm/scroll-into-view-B2U4RQK7.mjs +0 -22
- package/dist/lib/node-esm/scroll-into-view-B2U4RQK7.mjs.map +0 -7
- package/dist/lib/node-esm/set-HCWNW76S.mjs +0 -38
- package/dist/lib/node-esm/set-HCWNW76S.mjs.map +0 -7
- package/dist/lib/node-esm/set-layout-mode-E27AI5KE.mjs +0 -91
- package/dist/lib/node-esm/set-layout-mode-E27AI5KE.mjs.map +0 -7
- package/dist/lib/node-esm/show-undo-YTZXH422.mjs +0 -60
- package/dist/lib/node-esm/show-undo-YTZXH422.mjs.map +0 -7
- package/dist/lib/node-esm/switch-workspace-AQCNGS4Y.mjs +0 -69
- package/dist/lib/node-esm/switch-workspace-AQCNGS4Y.mjs.map +0 -7
- package/dist/lib/node-esm/update-complementary-7HIRM7OT.mjs +0 -29
- package/dist/lib/node-esm/update-complementary-7HIRM7OT.mjs.map +0 -7
- package/dist/lib/node-esm/update-dialog-F3JF7MBZ.mjs +0 -30
- package/dist/lib/node-esm/update-dialog-F3JF7MBZ.mjs.map +0 -7
- package/dist/lib/node-esm/update-plank-size-IIZKU7YR.mjs +0 -29
- package/dist/lib/node-esm/update-plank-size-IIZKU7YR.mjs.map +0 -7
- package/dist/lib/node-esm/update-popover-RO5QEH4C.mjs +0 -34
- package/dist/lib/node-esm/update-popover-RO5QEH4C.mjs.map +0 -7
- package/dist/lib/node-esm/update-sidebar-2RX6VLEK.mjs +0 -26
- package/dist/lib/node-esm/update-sidebar-2RX6VLEK.mjs.map +0 -7
- package/dist/types/src/operations/change-companion.d.ts +0 -5
- package/dist/types/src/operations/change-companion.d.ts.map +0 -1
- package/dist/types/src/operations/definitions.d.ts.map +0 -1
- package/dist/types/src/types/capabilities.d.ts +0 -202
- package/dist/types/src/types/capabilities.d.ts.map +0 -1
- package/dist/types/src/types/events.d.ts +0 -7
- package/dist/types/src/types/events.d.ts.map +0 -1
- package/src/types/capabilities.ts +0 -35
- package/src/types/events.ts +0 -21
- /package/dist/lib/{browser/chunk-J5LGTIGS.mjs.map → neutral/check-app-scheme-A7FZVNZO.mjs.map} +0 -0
- /package/dist/lib/{browser → neutral}/chunk-J5LGTIGS.mjs +0 -0
- /package/dist/lib/{browser/types/index.mjs.map → neutral/chunk-J5LGTIGS.mjs.map} +0 -0
- /package/dist/lib/{node-esm/types → neutral}/index.mjs.map +0 -0
- /package/dist/lib/{node-esm/chunk-HSLMI22Q.mjs.map → neutral/meta.mjs.map} +0 -0
|
@@ -6,12 +6,12 @@ import { useFocusFinders } from '@fluentui/react-tabster';
|
|
|
6
6
|
import React, { type KeyboardEvent, memo, useCallback, useLayoutEffect, useMemo, useRef } from 'react';
|
|
7
7
|
|
|
8
8
|
import { Surface } from '@dxos/app-framework/ui';
|
|
9
|
-
import {
|
|
9
|
+
import { AppSurface } from '@dxos/app-toolkit/ui';
|
|
10
10
|
import { debounce } from '@dxos/async';
|
|
11
11
|
import { type Node } from '@dxos/plugin-graph';
|
|
12
12
|
import { getLinkedVariant } from '@dxos/react-ui-attention';
|
|
13
13
|
import { useAttentionAttributes } from '@dxos/react-ui-attention';
|
|
14
|
-
import { StackItem, railGridHorizontal } from '@dxos/react-ui-stack';
|
|
14
|
+
import { StackItem, type StackItemSize, railGridHorizontal } from '@dxos/react-ui-stack';
|
|
15
15
|
import { mainIntrinsicSize, mx } from '@dxos/ui-theme';
|
|
16
16
|
|
|
17
17
|
import { useMainSize } from '#hooks';
|
|
@@ -22,6 +22,32 @@ import { PlankHeading } from './PlankHeading';
|
|
|
22
22
|
import { PlankLoading } from './PlankLoading';
|
|
23
23
|
import { PlankRootProps, usePlankContext } from './PlankRoot';
|
|
24
24
|
|
|
25
|
+
/**
|
|
26
|
+
* JS-based smooth scroll that won't be interrupted by MutationObserver or layout changes.
|
|
27
|
+
*/
|
|
28
|
+
const smoothScrollTo = (element: HTMLElement, target: number, duration: number) => {
|
|
29
|
+
const start = element.scrollLeft;
|
|
30
|
+
const distance = target - start;
|
|
31
|
+
const startTime = performance.now();
|
|
32
|
+
|
|
33
|
+
const step = (currentTime: number) => {
|
|
34
|
+
const elapsed = currentTime - startTime;
|
|
35
|
+
const progress = Math.min(elapsed / duration, 1);
|
|
36
|
+
// Ease-out cubic.
|
|
37
|
+
const eased = 1 - Math.pow(1 - progress, 3);
|
|
38
|
+
element.scrollLeft = start + distance * eased;
|
|
39
|
+
if (progress < 1) {
|
|
40
|
+
requestAnimationFrame(step);
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
requestAnimationFrame(step);
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
// NOTE: Calibrated to show PLANK + COMPANION on MBP 16" screen.
|
|
48
|
+
export const DEFAULT_SIZE = 48 satisfies StackItemSize;
|
|
49
|
+
export const DEFAULT_COMPANION_SIZE = 35 satisfies StackItemSize;
|
|
50
|
+
|
|
25
51
|
export type PlankComponentProps = Pick<PlankRootProps, 'part'> & {
|
|
26
52
|
id: string;
|
|
27
53
|
path?: string[];
|
|
@@ -40,25 +66,29 @@ export const PlankComponent = memo(
|
|
|
40
66
|
|
|
41
67
|
const canResize = layoutMode === 'multi';
|
|
42
68
|
const { findFirstFocusable } = useFocusFinders();
|
|
69
|
+
const isCompanion = companioned === 'companion';
|
|
43
70
|
const attentionAttrs = useAttentionAttributes(primary?.id ?? id);
|
|
44
|
-
const orderId =
|
|
71
|
+
const orderId = isCompanion ? primary?.id : id;
|
|
45
72
|
const index = orderId && active ? active.findIndex((entryId) => entryId === orderId) : -1;
|
|
46
73
|
const length = active?.length ?? 1;
|
|
47
74
|
const isOrdered = !!active && index >= 0;
|
|
48
75
|
const canIncrementStart = isOrdered && index > 0;
|
|
49
76
|
const canIncrementEnd = isOrdered && index < length - 1;
|
|
50
|
-
|
|
51
77
|
const rootElement = useRef<HTMLDivElement | null>(null);
|
|
52
|
-
|
|
53
78
|
const variant = node?.type === PLANK_COMPANION_TYPE ? getLinkedVariant(id) : undefined;
|
|
54
|
-
const sizeKey = id.split('+')[0];
|
|
55
|
-
const size = plankSizing?.[sizeKey] as number | undefined;
|
|
56
79
|
|
|
80
|
+
// Sizing.
|
|
81
|
+
const sizeAttrs = useMainSize();
|
|
82
|
+
const sizeKey = id.split('+')[0];
|
|
83
|
+
const size = isCompanion
|
|
84
|
+
? DEFAULT_COMPANION_SIZE
|
|
85
|
+
: ((plankSizing?.[sizeKey] as number | undefined) ?? DEFAULT_SIZE);
|
|
57
86
|
const handleSizeChange = useCallback(
|
|
58
87
|
debounce((nextSize: number) => {
|
|
59
|
-
|
|
88
|
+
const size = Math.round(nextSize);
|
|
89
|
+
onResize?.(sizeKey, size);
|
|
60
90
|
}, 200),
|
|
61
|
-
[
|
|
91
|
+
[sizeKey, onResize],
|
|
62
92
|
);
|
|
63
93
|
|
|
64
94
|
// TODO(thure): Tabster's focus group should handle moving focus to Main, but something is blocking it.
|
|
@@ -76,8 +106,17 @@ export const PlankComponent = memo(
|
|
|
76
106
|
}, []);
|
|
77
107
|
|
|
78
108
|
useLayoutEffect(() => {
|
|
79
|
-
if (scrollIntoView === id) {
|
|
80
|
-
|
|
109
|
+
if (scrollIntoView === id && layoutMode === 'multi' && rootElement.current) {
|
|
110
|
+
const element = rootElement.current;
|
|
111
|
+
const scrollParent = element.closest('[style*="overflow"], .overflow-x-auto') as HTMLElement | null;
|
|
112
|
+
if (scrollParent) {
|
|
113
|
+
const elementRect = element.getBoundingClientRect();
|
|
114
|
+
const parentRect = scrollParent.getBoundingClientRect();
|
|
115
|
+
const targetScrollLeft = scrollParent.scrollLeft + (elementRect.left - parentRect.left);
|
|
116
|
+
|
|
117
|
+
smoothScrollTo(scrollParent, targetScrollLeft, 300);
|
|
118
|
+
}
|
|
119
|
+
|
|
81
120
|
onScrollIntoView?.(undefined);
|
|
82
121
|
}
|
|
83
122
|
}, [id, scrollIntoView, layoutMode, onScrollIntoView]);
|
|
@@ -85,7 +124,6 @@ export const PlankComponent = memo(
|
|
|
85
124
|
const isSolo = layoutMode.startsWith('solo') && part === 'solo';
|
|
86
125
|
const isAttendable =
|
|
87
126
|
(layoutMode.startsWith('solo') && part.startsWith('solo')) || (layoutMode === 'multi' && part === 'multi');
|
|
88
|
-
const sizeAttrs = useMainSize();
|
|
89
127
|
|
|
90
128
|
const data = useMemo<AppSurface.ArticleData | undefined>(
|
|
91
129
|
() =>
|
|
@@ -104,8 +142,9 @@ export const PlankComponent = memo(
|
|
|
104
142
|
// TODO(wittjosiah): Change prop to accept a component.
|
|
105
143
|
const placeholder = useMemo(() => <PlankLoading />, []);
|
|
106
144
|
|
|
145
|
+
const Root = part.startsWith('solo') ? 'article' : StackItem.Root;
|
|
107
146
|
const fullscreen = layoutMode === 'solo--fullscreen';
|
|
108
|
-
const
|
|
147
|
+
const classNames = [
|
|
109
148
|
'dx-attention-surface relative dx-focus-ring-inset-over-all dx-density-coarse',
|
|
110
149
|
isSolo && 'absolute inset-0',
|
|
111
150
|
isSolo && mainIntrinsicSize,
|
|
@@ -113,14 +152,12 @@ export const PlankComponent = memo(
|
|
|
113
152
|
part.startsWith('solo') && 'grid',
|
|
114
153
|
part.startsWith('solo-') && 'grid-rows-subgrid row-span-2 min-w-0',
|
|
115
154
|
fullscreen && 'grid-rows-1',
|
|
116
|
-
part === 'multi' && (
|
|
155
|
+
part === 'multi' && (isCompanion ? 'border-separator! border-e' : 'border-separator! border-x'),
|
|
117
156
|
part === 'solo-companion' && 'border-separator! border-s',
|
|
118
157
|
settings?.encapsulatedPlanks &&
|
|
119
158
|
!part.startsWith('solo') &&
|
|
120
159
|
'mx-(--main-spacing) border-separator! border rounded-sm overflow-hidden',
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
const Root = part.startsWith('solo') ? 'article' : StackItem.Root;
|
|
160
|
+
];
|
|
124
161
|
|
|
125
162
|
return (
|
|
126
163
|
<Root
|
|
@@ -130,15 +167,15 @@ export const PlankComponent = memo(
|
|
|
130
167
|
tabIndex={0}
|
|
131
168
|
{...(part.startsWith('solo')
|
|
132
169
|
? ({
|
|
133
|
-
className,
|
|
170
|
+
className: mx(classNames),
|
|
134
171
|
...sizeAttrs,
|
|
135
172
|
} as any)
|
|
136
173
|
: {
|
|
137
174
|
role: 'article',
|
|
138
|
-
|
|
175
|
+
item: { id },
|
|
176
|
+
classNames,
|
|
139
177
|
order,
|
|
140
178
|
size,
|
|
141
|
-
item: { id },
|
|
142
179
|
onSizeChange: handleSizeChange,
|
|
143
180
|
})}
|
|
144
181
|
{...(isAttendable ? attentionAttrs : {})}
|
|
@@ -163,7 +200,7 @@ export const PlankComponent = memo(
|
|
|
163
200
|
)}
|
|
164
201
|
<Surface.Surface
|
|
165
202
|
key={node.id}
|
|
166
|
-
|
|
203
|
+
type={AppSurface.Article}
|
|
167
204
|
data={data}
|
|
168
205
|
limit={1}
|
|
169
206
|
fallback={PlankErrorFallback}
|
|
@@ -5,10 +5,10 @@
|
|
|
5
5
|
import React, { forwardRef, useCallback } from 'react';
|
|
6
6
|
|
|
7
7
|
import { useOperationInvoker } from '@dxos/app-framework/ui';
|
|
8
|
+
import { LayoutOperation } from '@dxos/app-toolkit';
|
|
8
9
|
import { ButtonGroup, type ButtonGroupProps, type ButtonProps, IconButton, useTranslation } from '@dxos/react-ui';
|
|
9
10
|
|
|
10
11
|
import { meta } from '#meta';
|
|
11
|
-
import { DeckOperation } from '#operations';
|
|
12
12
|
import { type DeckAction, type LayoutMode } from '#types';
|
|
13
13
|
|
|
14
14
|
export type PlankControlHandler = (event: DeckAction.PartAdjustment) => void;
|
|
@@ -37,7 +37,7 @@ export const PlankCompanionControls = forwardRef<HTMLDivElement, PlankCompanionC
|
|
|
37
37
|
const { t } = useTranslation(meta.id);
|
|
38
38
|
const { invokePromise } = useOperationInvoker();
|
|
39
39
|
const handleCloseCompanion = useCallback(() => {
|
|
40
|
-
return invokePromise(
|
|
40
|
+
return invokePromise(LayoutOperation.UpdateCompanion, { subject: null });
|
|
41
41
|
}, [invokePromise]);
|
|
42
42
|
return (
|
|
43
43
|
<div ref={forwardedRef} className='contents dx-app-no-drag'>
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
import React, { Fragment, type MouseEvent, memo, useCallback, useEffect, useMemo } from 'react';
|
|
6
6
|
|
|
7
7
|
import { Surface } from '@dxos/app-framework/ui';
|
|
8
|
-
import {
|
|
8
|
+
import { AppSurface } from '@dxos/app-toolkit/ui';
|
|
9
9
|
import { Graph, type Node, useActionRunner } from '@dxos/plugin-graph';
|
|
10
10
|
import { Icon, IconButton, Popover, toLocalizedString, useTranslation } from '@dxos/react-ui';
|
|
11
11
|
import { getLinkedVariant } from '@dxos/react-ui-attention';
|
|
@@ -15,7 +15,7 @@ import { hoverableControls, hoverableFocusedWithinControls, iconSize } from '@dx
|
|
|
15
15
|
|
|
16
16
|
import { useBreakpoints } from '#hooks';
|
|
17
17
|
import { meta } from '#meta';
|
|
18
|
-
import { DeckOperation } from '#
|
|
18
|
+
import { DeckOperation } from '#types';
|
|
19
19
|
import { type LayoutMode, PLANK_COMPANION_TYPE, type ResolvedPart } from '#types';
|
|
20
20
|
|
|
21
21
|
import { PlankCompanionControls, PlankControls } from './PlankControls';
|
|
@@ -37,6 +37,7 @@ export type PlankHeadingProps = {
|
|
|
37
37
|
companioned?: 'primary' | 'companion';
|
|
38
38
|
companions?: Node.Node[];
|
|
39
39
|
actions?: StackItemSigilAction[];
|
|
40
|
+
debug?: boolean;
|
|
40
41
|
};
|
|
41
42
|
|
|
42
43
|
export const PlankHeading = memo(
|
|
@@ -54,9 +55,10 @@ export const PlankHeading = memo(
|
|
|
54
55
|
companions,
|
|
55
56
|
layoutMode,
|
|
56
57
|
actions = [],
|
|
58
|
+
debug = false,
|
|
57
59
|
}: PlankHeadingProps) => {
|
|
58
60
|
const { t } = useTranslation(meta.id);
|
|
59
|
-
const { graph, onAdjust,
|
|
61
|
+
const { graph, onAdjust, onUpdateCompanion } = usePlankContext('PlankHeading');
|
|
60
62
|
const runAction = useActionRunner();
|
|
61
63
|
const breakpoint = useBreakpoints();
|
|
62
64
|
const icon = node?.properties?.icon ?? 'ph--placeholder--regular';
|
|
@@ -129,10 +131,10 @@ export const PlankHeading = memo(
|
|
|
129
131
|
const target = (event.target as HTMLElement).closest('[data-id]') as HTMLElement | null;
|
|
130
132
|
const tabId = target?.dataset?.id;
|
|
131
133
|
if (tabId) {
|
|
132
|
-
|
|
134
|
+
onUpdateCompanion?.(tabId);
|
|
133
135
|
}
|
|
134
136
|
},
|
|
135
|
-
[
|
|
137
|
+
[onUpdateCompanion],
|
|
136
138
|
);
|
|
137
139
|
|
|
138
140
|
return (
|
|
@@ -159,7 +161,7 @@ export const PlankHeading = memo(
|
|
|
159
161
|
>
|
|
160
162
|
{companions && isCompanionNode ? (
|
|
161
163
|
/* TODO(thure): IMPORTANT: This is a tablist; it should be implemented as such. */
|
|
162
|
-
<div data-tauri-drag-region
|
|
164
|
+
<div data-tauri-drag-region className='flex-1 min-w-0 overflow-x-auto scrollbar-none flex gap-1'>
|
|
163
165
|
{companions.map(({ id, properties: { icon, label } }) => (
|
|
164
166
|
<IconButton
|
|
165
167
|
key={id}
|
|
@@ -185,7 +187,7 @@ export const PlankHeading = memo(
|
|
|
185
187
|
onAction={handleAction}
|
|
186
188
|
>
|
|
187
189
|
<Surface.Surface
|
|
188
|
-
|
|
190
|
+
type={AppSurface.MenuFooter}
|
|
189
191
|
data={{ subject: node.data } satisfies AppSurface.MenuFooterData}
|
|
190
192
|
/>
|
|
191
193
|
</StackItem.Sigil>
|
|
@@ -208,8 +210,16 @@ export const PlankHeading = memo(
|
|
|
208
210
|
</TextTooltip>
|
|
209
211
|
</>
|
|
210
212
|
)}
|
|
213
|
+
{debug && (
|
|
214
|
+
<div className='flex items-center text-sm text-info-text'>
|
|
215
|
+
{layoutMode}:{part}:{companioned}
|
|
216
|
+
</div>
|
|
217
|
+
)}
|
|
211
218
|
{node && part !== 'complementary' && (
|
|
212
|
-
<Surface.Surface
|
|
219
|
+
<Surface.Surface
|
|
220
|
+
type={AppSurface.NavbarEnd}
|
|
221
|
+
data={{ subject: node.data } satisfies AppSurface.NavbarEndData}
|
|
222
|
+
/>
|
|
213
223
|
)}
|
|
214
224
|
{companioned === 'companion' ? (
|
|
215
225
|
<PlankCompanionControls primary={primaryId} />
|
|
@@ -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
|
|
9
|
+
return <div className='grid place-items-center dx-attention-surface' />;
|
|
10
10
|
};
|
|
@@ -7,7 +7,7 @@ import React, { PropsWithChildren } from 'react';
|
|
|
7
7
|
|
|
8
8
|
import { type Graph } from '@dxos/plugin-graph';
|
|
9
9
|
|
|
10
|
-
import { type DeckOperation } from '#
|
|
10
|
+
import { type DeckOperation } from '#types';
|
|
11
11
|
import { type LayoutMode, type PlankSizing, type ResolvedPart, type Settings } from '#types';
|
|
12
12
|
|
|
13
13
|
const PLANK_NAME = 'Plank';
|
|
@@ -33,8 +33,8 @@ export type PlankContextValue = {
|
|
|
33
33
|
onResize?: (id: string, size: number) => void;
|
|
34
34
|
/** Callback to clear scroll-into-view state. */
|
|
35
35
|
onScrollIntoView?: (id?: string) => void;
|
|
36
|
-
/** Callback to
|
|
37
|
-
|
|
36
|
+
/** Callback to update the companion. */
|
|
37
|
+
onUpdateCompanion?: (companion: string | null) => void;
|
|
38
38
|
};
|
|
39
39
|
|
|
40
40
|
export const [PlankProvider, usePlankContext] = createContext<PlankContextValue>(PLANK_NAME);
|
|
@@ -84,13 +84,12 @@ export const ComplementarySidebar = ({ current }: ComplementarySidebarProps) =>
|
|
|
84
84
|
]}
|
|
85
85
|
>
|
|
86
86
|
{/* R0 Tabs */}
|
|
87
|
-
<Tabs.Root orientation='vertical' value={internalValue}
|
|
87
|
+
<Tabs.Root classNames='contents' orientation='vertical' value={internalValue}>
|
|
88
88
|
<div
|
|
89
89
|
data-tauri-drag-region
|
|
90
|
-
role='none'
|
|
91
90
|
style={iconSize(5)}
|
|
92
91
|
className={mx(
|
|
93
|
-
'absolute z-
|
|
92
|
+
'absolute z-1 inset-y-0 end-0 w-(--dx-r0-size)!',
|
|
94
93
|
'py-[env(safe-area-inset-top)] pb-[env(safe-area-inset-bottom)] border-s border-subdued-separator',
|
|
95
94
|
'grid grid-cols-1 grid-rows-[1fr_min-content] bg-toolbar-surface dx-contain-layout dx-app-drag',
|
|
96
95
|
)}
|
|
@@ -105,6 +104,7 @@ export const ComplementarySidebar = ({ current }: ComplementarySidebarProps) =>
|
|
|
105
104
|
iconOnly
|
|
106
105
|
tooltipSide='left'
|
|
107
106
|
data-value={getLinkedVariant(companion.id)}
|
|
107
|
+
{...(companion.properties.joyride && { 'data-joyride': companion.properties.joyride })}
|
|
108
108
|
variant={
|
|
109
109
|
activeId === getLinkedVariant(companion.id)
|
|
110
110
|
? state.complementarySidebarState === 'expanded'
|
|
@@ -119,14 +119,13 @@ export const ComplementarySidebar = ({ current }: ComplementarySidebarProps) =>
|
|
|
119
119
|
</Tabs.Tablist>
|
|
120
120
|
{!hoistStatusbar && (
|
|
121
121
|
<div
|
|
122
|
-
|
|
123
|
-
className='grid grid-cols-1 auto-rows-(--dx-rail-item) gap-0.5 overflow-y-auto'
|
|
122
|
+
className='grid grid-cols-1 auto-rows-(--dx-rail-item) py-0.5 gap-0.5 overflow-y-auto scrollbar-none'
|
|
124
123
|
style={iconSize(4)}
|
|
125
124
|
>
|
|
126
125
|
<Surface.Surface role='status-indicator' />
|
|
127
126
|
</div>
|
|
128
127
|
)}
|
|
129
|
-
<div
|
|
128
|
+
<div className='hidden lg:grid grid-cols-1 auto-rows-(--dx-rail-action) p-1'>
|
|
130
129
|
<ToggleComplementarySidebarButton />
|
|
131
130
|
</div>
|
|
132
131
|
</div>
|
|
@@ -139,7 +138,7 @@ export const ComplementarySidebar = ({ current }: ComplementarySidebarProps) =>
|
|
|
139
138
|
value={getLinkedVariant(companion.id)}
|
|
140
139
|
classNames={[
|
|
141
140
|
'absolute data-[state="inactive"]:-z-[1] overflow-hidden',
|
|
142
|
-
'inset-y-0 start-0 w-
|
|
141
|
+
'inset-y-0 start-0 w-full lg:w-(--dx-r1-size)',
|
|
143
142
|
]}
|
|
144
143
|
{...(state.complementarySidebarState !== 'expanded' && { inert: true })}
|
|
145
144
|
>
|
|
@@ -200,7 +199,7 @@ const ComplementarySidebarPanel = ({ companion, activeId, data, hoistStatusbar }
|
|
|
200
199
|
/>
|
|
201
200
|
</Panel.Content>
|
|
202
201
|
{!hoistStatusbar && (
|
|
203
|
-
<Panel.Statusbar
|
|
202
|
+
<Panel.Statusbar size='sm'>
|
|
204
203
|
<Surface.Surface role='status-bar--r1-footer' limit={1} />
|
|
205
204
|
</Panel.Statusbar>
|
|
206
205
|
)}
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
import React, { useMemo } from 'react';
|
|
6
6
|
|
|
7
7
|
import { Surface } from '@dxos/app-framework/ui';
|
|
8
|
-
import {
|
|
8
|
+
import { AppSurface } from '@dxos/app-toolkit/ui';
|
|
9
9
|
import { type Label, Main } from '@dxos/react-ui';
|
|
10
10
|
|
|
11
11
|
import { useBreakpoints, useDeckState, useHoistStatusbar } from '#hooks';
|
|
@@ -38,7 +38,7 @@ export const Sidebar = () => {
|
|
|
38
38
|
hoistStatusbar && 'bottom-(--dx-statusbar-size)',
|
|
39
39
|
]}
|
|
40
40
|
>
|
|
41
|
-
<Surface.Surface
|
|
41
|
+
<Surface.Surface type={AppSurface.Navigation} data={navigationData} limit={1} />
|
|
42
42
|
</Main.NavigationSidebar>
|
|
43
43
|
);
|
|
44
44
|
};
|
|
@@ -80,13 +80,19 @@ export const ToggleComplementarySidebarButton = ({
|
|
|
80
80
|
}
|
|
81
81
|
}, [state, updateState, current, companions, invokePromise]);
|
|
82
82
|
|
|
83
|
+
const label = t(
|
|
84
|
+
state.complementarySidebarState === 'expanded'
|
|
85
|
+
? 'close-complementary-sidebar.label'
|
|
86
|
+
: 'open-complementary-sidebar.label',
|
|
87
|
+
);
|
|
88
|
+
|
|
83
89
|
return (
|
|
84
90
|
<IconButton
|
|
85
91
|
variant='ghost'
|
|
86
92
|
classNames={['[&>svg]:-scale-x-100', classNames]}
|
|
87
93
|
icon='ph--sidebar-simple--regular'
|
|
88
94
|
iconOnly
|
|
89
|
-
label={
|
|
95
|
+
label={label}
|
|
90
96
|
tooltipSide={inR0 ? 'left' : undefined}
|
|
91
97
|
onClick={handleClick}
|
|
92
98
|
/>
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
import { useAppGraph } from '@dxos/app-toolkit/ui';
|
|
6
6
|
import { Node, type Node as NodeType } from '@dxos/plugin-graph';
|
|
7
7
|
import { useConnections } from '@dxos/plugin-graph';
|
|
8
|
-
import { type Label } from '@dxos/ui-types';
|
|
8
|
+
import { type Label } from '@dxos/ui-types/translations';
|
|
9
9
|
import { type Position, byPosition } from '@dxos/util';
|
|
10
10
|
|
|
11
11
|
import { DECK_COMPANION_TYPE } from '#types';
|
|
@@ -19,6 +19,7 @@ export type DeckCompanion = NodeType.Node<
|
|
|
19
19
|
/** If true, the panel will not be wrapped in a scroll area. */
|
|
20
20
|
fixed?: boolean;
|
|
21
21
|
position?: Position;
|
|
22
|
+
joyride?: string;
|
|
22
23
|
}
|
|
23
24
|
>;
|
|
24
25
|
|
package/src/index.ts
CHANGED
package/src/meta.ts
CHANGED
|
@@ -6,7 +6,7 @@ import * as Effect from 'effect/Effect';
|
|
|
6
6
|
|
|
7
7
|
import { Capabilities } from '@dxos/app-framework';
|
|
8
8
|
import { LayoutOperation } from '@dxos/app-toolkit';
|
|
9
|
-
import { Operation } from '@dxos/
|
|
9
|
+
import { Operation } from '@dxos/compute';
|
|
10
10
|
|
|
11
11
|
import { DeckCapabilities } from '../types';
|
|
12
12
|
|
package/src/operations/adjust.ts
CHANGED
|
@@ -8,18 +8,17 @@ import * as Option from 'effect/Option';
|
|
|
8
8
|
|
|
9
9
|
import { Capabilities, Capability } from '@dxos/app-framework';
|
|
10
10
|
import { AppCapabilities, LayoutOperation } from '@dxos/app-toolkit';
|
|
11
|
-
import { Operation } from '@dxos/
|
|
12
|
-
import { AttentionCapabilities } from '@dxos/plugin-attention
|
|
11
|
+
import { Operation } from '@dxos/compute';
|
|
12
|
+
import { AttentionCapabilities } from '@dxos/plugin-attention';
|
|
13
13
|
import { Graph } from '@dxos/plugin-graph';
|
|
14
14
|
import { byPosition } from '@dxos/util';
|
|
15
15
|
|
|
16
16
|
import { incrementPlank } from '../layout';
|
|
17
|
-
import { DeckCapabilities, PLANK_COMPANION_TYPE } from '../types';
|
|
17
|
+
import { DeckCapabilities, DeckOperation, PLANK_COMPANION_TYPE } from '../types';
|
|
18
18
|
import { computeActiveUpdates } from '../util';
|
|
19
|
-
import { Adjust, ChangeCompanion } from './definitions';
|
|
20
19
|
import { updateActiveDeck } from './helpers';
|
|
21
20
|
|
|
22
|
-
const handler: Operation.WithHandler<typeof Adjust> = Adjust.pipe(
|
|
21
|
+
const handler: Operation.WithHandler<typeof DeckOperation.Adjust> = DeckOperation.Adjust.pipe(
|
|
23
22
|
Operation.withHandler(
|
|
24
23
|
Effect.fnUntraced(function* (input) {
|
|
25
24
|
const _state = yield* Capabilities.getAtomValue(DeckCapabilities.State);
|
|
@@ -73,7 +72,7 @@ const handler: Operation.WithHandler<typeof Adjust> = Adjust.pipe(
|
|
|
73
72
|
);
|
|
74
73
|
|
|
75
74
|
if (Option.isSome(companion)) {
|
|
76
|
-
yield* Operation.invoke(
|
|
75
|
+
yield* Operation.invoke(LayoutOperation.UpdateCompanion, { subject: companion.value.id });
|
|
77
76
|
}
|
|
78
77
|
}
|
|
79
78
|
}),
|
package/src/operations/close.ts
CHANGED
|
@@ -6,8 +6,8 @@ import * as Effect from 'effect/Effect';
|
|
|
6
6
|
|
|
7
7
|
import { Capabilities, Capability } from '@dxos/app-framework';
|
|
8
8
|
import { LayoutOperation } from '@dxos/app-toolkit';
|
|
9
|
-
import { Operation } from '@dxos/
|
|
10
|
-
import { AttentionCapabilities } from '@dxos/plugin-attention
|
|
9
|
+
import { Operation } from '@dxos/compute';
|
|
10
|
+
import { AttentionCapabilities } from '@dxos/plugin-attention';
|
|
11
11
|
|
|
12
12
|
import { closeEntry } from '../layout';
|
|
13
13
|
import { DeckCapabilities } from '../types';
|
package/src/operations/index.ts
CHANGED
|
@@ -2,14 +2,11 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import { OperationHandlerSet } from '@dxos/
|
|
6
|
-
|
|
7
|
-
export * as DeckOperation from './definitions';
|
|
5
|
+
import { OperationHandlerSet } from '@dxos/compute';
|
|
8
6
|
|
|
9
7
|
export const DeckOperationHandlerSet = OperationHandlerSet.lazy(
|
|
10
8
|
() => import('./add-toast'),
|
|
11
9
|
() => import('./adjust'),
|
|
12
|
-
() => import('./change-companion'),
|
|
13
10
|
() => import('./close'),
|
|
14
11
|
() => import('./open'),
|
|
15
12
|
() => import('./revert-workspace'),
|
|
@@ -18,6 +15,7 @@ export const DeckOperationHandlerSet = OperationHandlerSet.lazy(
|
|
|
18
15
|
() => import('./set-layout-mode'),
|
|
19
16
|
() => import('./show-undo'),
|
|
20
17
|
() => import('./switch-workspace'),
|
|
18
|
+
() => import('./update-companion'),
|
|
21
19
|
() => import('./update-complementary'),
|
|
22
20
|
() => import('./update-dialog'),
|
|
23
21
|
() => import('./update-plank-size'),
|
package/src/operations/open.ts
CHANGED
|
@@ -13,13 +13,13 @@ import {
|
|
|
13
13
|
expandPath,
|
|
14
14
|
validateNavigationTarget,
|
|
15
15
|
} from '@dxos/app-toolkit';
|
|
16
|
+
import { Operation } from '@dxos/compute';
|
|
16
17
|
import { Context } from '@dxos/context';
|
|
17
18
|
import { Obj } from '@dxos/echo';
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import { ClientCapabilities } from '@dxos/plugin-client/types';
|
|
19
|
+
import { AttentionCapabilities } from '@dxos/plugin-attention';
|
|
20
|
+
import { ClientCapabilities } from '@dxos/plugin-client';
|
|
21
21
|
import { Graph } from '@dxos/plugin-graph';
|
|
22
|
-
import { ObservabilityOperation } from '@dxos/plugin-observability
|
|
22
|
+
import { ObservabilityOperation } from '@dxos/plugin-observability';
|
|
23
23
|
|
|
24
24
|
import { openSubjectsOnActiveDeck } from '../layout';
|
|
25
25
|
import { DeckCapabilities } from '../types';
|
|
@@ -74,7 +74,7 @@ const handler: Operation.WithHandler<typeof LayoutOperation.Open> = LayoutOperat
|
|
|
74
74
|
const deck = yield* DeckCapabilities.getDeck();
|
|
75
75
|
const active = !deck.solo && deck.initialized ? deck.active : [];
|
|
76
76
|
if (active.length > 0 && input.subject.length > 0) {
|
|
77
|
-
const
|
|
77
|
+
const resolveDXN = (qualifiedPath: string) =>
|
|
78
78
|
Effect.reduce(pathResolvers, Option.none<string>(), (acc, resolver) =>
|
|
79
79
|
Option.isSome(acc)
|
|
80
80
|
? Effect.succeed(acc)
|
|
@@ -88,7 +88,7 @@ const handler: Operation.WithHandler<typeof LayoutOperation.Open> = LayoutOperat
|
|
|
88
88
|
const deckDxnMap = new Map<string, string>();
|
|
89
89
|
yield* Effect.all(
|
|
90
90
|
active.map((deckId) =>
|
|
91
|
-
|
|
91
|
+
resolveDXN(deckId).pipe(
|
|
92
92
|
Effect.map((opt) => {
|
|
93
93
|
if (Option.isSome(opt)) {
|
|
94
94
|
deckDxnMap.set(opt.value, deckId);
|
|
@@ -103,7 +103,7 @@ const handler: Operation.WithHandler<typeof LayoutOperation.Open> = LayoutOperat
|
|
|
103
103
|
if (deckDxnMap.size > 0) {
|
|
104
104
|
const remapped = yield* Effect.all(
|
|
105
105
|
input.subject.map((subjectId) =>
|
|
106
|
-
|
|
106
|
+
resolveDXN(subjectId).pipe(
|
|
107
107
|
Effect.map((opt) => {
|
|
108
108
|
if (Option.isSome(opt)) {
|
|
109
109
|
const existing = deckDxnMap.get(opt.value);
|
|
@@ -6,7 +6,7 @@ import * as Effect from 'effect/Effect';
|
|
|
6
6
|
|
|
7
7
|
import { Capabilities } from '@dxos/app-framework';
|
|
8
8
|
import { LayoutOperation } from '@dxos/app-toolkit';
|
|
9
|
-
import { Operation } from '@dxos/
|
|
9
|
+
import { Operation } from '@dxos/compute';
|
|
10
10
|
|
|
11
11
|
import { DeckCapabilities } from '../types';
|
|
12
12
|
|
|
@@ -6,7 +6,7 @@ import * as Effect from 'effect/Effect';
|
|
|
6
6
|
|
|
7
7
|
import { Capabilities } from '@dxos/app-framework';
|
|
8
8
|
import { LayoutOperation } from '@dxos/app-toolkit';
|
|
9
|
-
import { Operation } from '@dxos/
|
|
9
|
+
import { Operation } from '@dxos/compute';
|
|
10
10
|
|
|
11
11
|
import { DeckCapabilities } from '../types';
|
|
12
12
|
|
|
@@ -6,8 +6,8 @@ import * as Effect from 'effect/Effect';
|
|
|
6
6
|
|
|
7
7
|
import { Capabilities } from '@dxos/app-framework';
|
|
8
8
|
import { LayoutOperation } from '@dxos/app-toolkit';
|
|
9
|
+
import { Operation } from '@dxos/compute';
|
|
9
10
|
import { log } from '@dxos/log';
|
|
10
|
-
import { Operation } from '@dxos/operation';
|
|
11
11
|
import { isNonNullable } from '@dxos/util';
|
|
12
12
|
|
|
13
13
|
import { DeckCapabilities, type DeckState, type LayoutMode, getMode, isLayoutMode } from '../types';
|
package/src/operations/set.ts
CHANGED
|
@@ -6,8 +6,8 @@ import * as Effect from 'effect/Effect';
|
|
|
6
6
|
|
|
7
7
|
import { Capabilities, Capability } from '@dxos/app-framework';
|
|
8
8
|
import { LayoutOperation } from '@dxos/app-toolkit';
|
|
9
|
-
import { Operation } from '@dxos/
|
|
10
|
-
import { AttentionCapabilities } from '@dxos/plugin-attention
|
|
9
|
+
import { Operation } from '@dxos/compute';
|
|
10
|
+
import { AttentionCapabilities } from '@dxos/plugin-attention';
|
|
11
11
|
|
|
12
12
|
import { DeckCapabilities } from '../types';
|
|
13
13
|
import { computeActiveUpdates } from '../util';
|
|
@@ -6,7 +6,7 @@ import * as Effect from 'effect/Effect';
|
|
|
6
6
|
|
|
7
7
|
import { Capabilities, Capability, UndoOperation } from '@dxos/app-framework';
|
|
8
8
|
import { LayoutOperation } from '@dxos/app-toolkit';
|
|
9
|
-
import { Operation } from '@dxos/
|
|
9
|
+
import { Operation } from '@dxos/compute';
|
|
10
10
|
|
|
11
11
|
import { meta } from '#meta';
|
|
12
12
|
|
|
@@ -6,8 +6,8 @@ import * as Effect from 'effect/Effect';
|
|
|
6
6
|
|
|
7
7
|
import { Capabilities, Capability } from '@dxos/app-framework';
|
|
8
8
|
import { AppCapabilities, isPinnedWorkspace, LayoutOperation } from '@dxos/app-toolkit';
|
|
9
|
+
import { Operation } from '@dxos/compute';
|
|
9
10
|
import { invariant } from '@dxos/invariant';
|
|
10
|
-
import { Operation } from '@dxos/operation';
|
|
11
11
|
import { Graph, Node } from '@dxos/plugin-graph';
|
|
12
12
|
|
|
13
13
|
import { DeckCapabilities, defaultDeck } from '../types';
|