@dxos/plugin-simple-layout 0.8.4-main.7996785055 → 0.8.4-main.8baae0fced
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/dist/lib/neutral/SimpleLayoutPlugin.mjs +52 -0
- package/dist/lib/neutral/SimpleLayoutPlugin.mjs.map +7 -0
- package/dist/lib/neutral/app-graph-builder-EYQKLRRP.mjs +21 -0
- package/dist/lib/neutral/app-graph-builder-EYQKLRRP.mjs.map +7 -0
- package/dist/lib/neutral/capabilities/index.mjs +21 -0
- package/dist/lib/neutral/capabilities/index.mjs.map +7 -0
- package/dist/lib/neutral/chunk-5LQGH5KW.mjs +20 -0
- package/dist/lib/neutral/chunk-5LQGH5KW.mjs.map +7 -0
- package/dist/lib/{browser/chunk-XJVW3PRY.mjs → neutral/chunk-7UDV3JDT.mjs} +4 -4
- package/dist/lib/neutral/chunk-7UDV3JDT.mjs.map +7 -0
- package/dist/lib/neutral/chunk-FD2CAY4Q.mjs +26 -0
- package/dist/lib/neutral/chunk-FD2CAY4Q.mjs.map +7 -0
- package/dist/lib/neutral/chunk-J5LGTIGS.mjs +10 -0
- package/dist/lib/neutral/chunk-J5LGTIGS.mjs.map +7 -0
- package/dist/lib/neutral/chunk-Y2QR5SYD.mjs +8 -0
- package/dist/lib/neutral/chunk-Y2QR5SYD.mjs.map +7 -0
- package/dist/lib/{browser/close-OT5JOGVY.mjs → neutral/close-WKMURGUB.mjs} +5 -4
- package/dist/lib/{node-esm/close-PEVHREL2.mjs.map → neutral/close-WKMURGUB.mjs.map} +1 -1
- package/dist/lib/{browser/chunk-J5FQ32AV.mjs → neutral/components/index.mjs} +261 -591
- package/dist/lib/neutral/components/index.mjs.map +7 -0
- package/dist/lib/neutral/hooks/index.mjs +332 -0
- package/dist/lib/neutral/hooks/index.mjs.map +7 -0
- package/dist/lib/neutral/index.mjs +14 -0
- package/dist/lib/neutral/index.mjs.map +7 -0
- package/dist/lib/neutral/meta.json +1 -0
- package/dist/lib/neutral/meta.mjs +8 -0
- package/dist/lib/neutral/meta.mjs.map +7 -0
- package/dist/lib/neutral/open-PEVXNVTV.mjs +51 -0
- package/dist/lib/neutral/open-PEVXNVTV.mjs.map +7 -0
- package/dist/lib/neutral/operation-handler-EAIE7KPR.mjs +13 -0
- package/dist/lib/neutral/operation-handler-EAIE7KPR.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/{browser/react-root-6KIGPLUT.mjs → neutral/react-root-VE265VX4.mjs} +5 -8
- package/dist/lib/neutral/react-root-VE265VX4.mjs.map +7 -0
- package/dist/lib/{node-esm/react-surface-WLKB6AET.mjs → neutral/react-surface-YHXOHJI7.mjs} +16 -15
- package/dist/lib/neutral/react-surface-YHXOHJI7.mjs.map +7 -0
- package/dist/lib/{browser/revert-workspace-DLE265AN.mjs → neutral/revert-workspace-ST6NZUNG.mjs} +5 -4
- package/dist/lib/{node-esm/revert-workspace-XZXT64YA.mjs.map → neutral/revert-workspace-ST6NZUNG.mjs.map} +1 -1
- package/dist/lib/{browser/set-52HGTSH4.mjs → neutral/set-6ZRLWPJS.mjs} +5 -4
- package/dist/lib/{node-esm/set-5I6LFH5L.mjs.map → neutral/set-6ZRLWPJS.mjs.map} +1 -1
- package/dist/lib/{browser/set-layout-mode-T6QI3DGU.mjs → neutral/set-layout-mode-L22HRCKS.mjs} +4 -2
- package/dist/lib/neutral/set-layout-mode-L22HRCKS.mjs.map +7 -0
- package/dist/lib/{browser/spotlight-dismiss-67PHYS5B.mjs → neutral/spotlight-dismiss-EIYW5E7M.mjs} +7 -15
- package/dist/lib/{node-esm/spotlight-dismiss-RMLRZUVY.mjs.map → neutral/spotlight-dismiss-EIYW5E7M.mjs.map} +3 -3
- package/dist/lib/{browser/state-TXSMUWYI.mjs → neutral/state-7NXKBLPY.mjs} +5 -6
- package/dist/lib/neutral/state-7NXKBLPY.mjs.map +7 -0
- package/dist/lib/{browser/switch-workspace-5Y6T4BWJ.mjs → neutral/switch-workspace-PYWPTMFO.mjs} +5 -4
- package/dist/lib/{node-esm/switch-workspace-PB6T2SGY.mjs.map → neutral/switch-workspace-PYWPTMFO.mjs.map} +1 -1
- package/dist/lib/neutral/translations.mjs +36 -0
- package/dist/lib/neutral/translations.mjs.map +7 -0
- package/dist/lib/neutral/types/index.mjs +10 -0
- package/dist/lib/neutral/types/index.mjs.map +7 -0
- package/dist/lib/{browser/update-complementary-MX3TTVAB.mjs → neutral/update-complementary-HKWF5OXT.mjs} +8 -6
- package/dist/lib/neutral/update-complementary-HKWF5OXT.mjs.map +7 -0
- package/dist/lib/{browser/update-dialog-FPAPZXKO.mjs → neutral/update-dialog-P4ASXCE7.mjs} +5 -4
- package/dist/lib/{node-esm/update-dialog-ID267DCL.mjs.map → neutral/update-dialog-P4ASXCE7.mjs.map} +1 -1
- package/dist/lib/{browser/update-popover-6V5ZTIYN.mjs → neutral/update-popover-REAKC2GN.mjs} +5 -4
- package/dist/lib/{node-esm/update-popover-RLHU2HF4.mjs.map → neutral/update-popover-REAKC2GN.mjs.map} +1 -1
- package/dist/lib/{browser/update-sidebar-WHDKYMV7.mjs → neutral/update-sidebar-O5SQPR6Q.mjs} +4 -2
- package/dist/lib/neutral/update-sidebar-O5SQPR6Q.mjs.map +7 -0
- package/dist/lib/{node-esm/url-handler-WMONO2T6.mjs → neutral/url-handler-GZXUUAHD.mjs} +45 -80
- package/dist/lib/neutral/url-handler-GZXUUAHD.mjs.map +7 -0
- package/dist/types/src/SimpleLayoutPlugin.d.ts +1 -0
- package/dist/types/src/SimpleLayoutPlugin.d.ts.map +1 -1
- package/dist/types/src/capabilities/app-graph-builder.d.ts +6 -0
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -0
- package/dist/types/src/capabilities/index.d.ts +21 -6
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/{operation-handler/operation-handler.d.ts → operation-handler.d.ts} +1 -1
- package/dist/types/src/capabilities/operation-handler.d.ts.map +1 -0
- package/dist/types/src/capabilities/react-root.d.ts.map +1 -0
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -0
- package/dist/types/src/capabilities/{spotlight-dismiss/spotlight-dismiss.d.ts → spotlight-dismiss.d.ts} +1 -1
- package/dist/types/src/capabilities/spotlight-dismiss.d.ts.map +1 -0
- package/dist/types/src/capabilities/{state/state.d.ts → state.d.ts} +3 -3
- package/dist/types/src/capabilities/state.d.ts.map +1 -0
- package/dist/types/src/capabilities/{url-handler/url-handler.d.ts → url-handler.d.ts} +1 -1
- package/dist/types/src/capabilities/url-handler.d.ts.map +1 -0
- package/dist/types/src/components/ContentError.stories.d.ts +21 -19
- package/dist/types/src/components/ContentError.stories.d.ts.map +1 -1
- package/dist/types/src/components/DebugOverlay/DebugOverlay.d.ts.map +1 -1
- package/dist/types/src/components/Dialog/Dialog.d.ts.map +1 -1
- package/dist/types/src/components/Home/Home.d.ts.map +1 -1
- package/dist/types/src/components/Loading/Loading.stories.d.ts.map +1 -1
- package/dist/types/src/components/MobileLayout/MobileLayout.d.ts +2 -2
- package/dist/types/src/components/MobileLayout/MobileLayout.d.ts.map +1 -1
- package/dist/types/src/components/MobileLayout/MobileLayout.stories.d.ts.map +1 -1
- package/dist/types/src/components/NavBranch/NavBranch.d.ts.map +1 -1
- package/dist/types/src/components/Popover/Popover.d.ts.map +1 -1
- package/dist/types/src/components/SimpleLayout/AppBar.d.ts +1 -5
- package/dist/types/src/components/SimpleLayout/AppBar.d.ts.map +1 -1
- package/dist/types/src/components/SimpleLayout/AppBar.stories.d.ts +21 -19
- package/dist/types/src/components/SimpleLayout/AppBar.stories.d.ts.map +1 -1
- package/dist/types/src/components/SimpleLayout/Drawer.d.ts +4 -7
- package/dist/types/src/components/SimpleLayout/Drawer.d.ts.map +1 -1
- package/dist/types/src/components/SimpleLayout/Main.d.ts +4 -7
- package/dist/types/src/components/SimpleLayout/Main.d.ts.map +1 -1
- package/dist/types/src/components/SimpleLayout/NavBar.d.ts +1 -5
- package/dist/types/src/components/SimpleLayout/NavBar.d.ts.map +1 -1
- package/dist/types/src/components/SimpleLayout/NavBar.stories.d.ts +22 -24
- package/dist/types/src/components/SimpleLayout/NavBar.stories.d.ts.map +1 -1
- package/dist/types/src/components/SimpleLayout/SimpleLayout.stories.d.ts +21 -19
- package/dist/types/src/components/SimpleLayout/SimpleLayout.stories.d.ts.map +1 -1
- package/dist/types/src/components/hooks.d.ts.map +1 -1
- package/dist/types/src/hooks/actions.d.ts +3 -3
- package/dist/types/src/hooks/actions.d.ts.map +1 -1
- package/dist/types/src/hooks/useAppBarProps.d.ts +2 -2
- package/dist/types/src/hooks/useAppBarProps.d.ts.map +1 -1
- package/dist/types/src/hooks/useCompanions.d.ts.map +1 -1
- package/dist/types/src/hooks/useDrawerActions.d.ts.map +1 -1
- package/dist/types/src/hooks/useSimpleLayoutState.d.ts +3 -3
- package/dist/types/src/hooks/useSimpleLayoutState.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +2 -1
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/meta.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/index.d.ts +1 -1
- 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/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/state-access.d.ts +3 -3
- package/dist/types/src/operations/state-access.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-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-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 +21 -20
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/{capabilities.d.ts → SimpleLayoutCapabilities.d.ts} +12 -10
- package/dist/types/src/types/SimpleLayoutCapabilities.d.ts.map +1 -0
- package/dist/types/src/types/SimpleLayoutEvents.d.ts +4 -0
- package/dist/types/src/types/SimpleLayoutEvents.d.ts.map +1 -0
- package/dist/types/src/types/index.d.ts +2 -2
- package/dist/types/src/types/index.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +87 -33
- package/src/SimpleLayoutPlugin.ts +17 -6
- package/src/capabilities/app-graph-builder.ts +21 -0
- package/src/capabilities/index.ts +13 -6
- package/src/capabilities/{operation-handler/operation-handler.ts → operation-handler.ts} +2 -2
- package/src/capabilities/{react-root/react-root.tsx → react-root.tsx} +2 -2
- package/src/capabilities/{react-surface/react-surface.tsx → react-surface.tsx} +13 -6
- package/src/capabilities/{state/state.tsx → state.tsx} +5 -6
- package/src/capabilities/url-handler.ts +164 -0
- package/src/components/ContentError.stories.tsx +1 -1
- package/src/components/Dialog/Dialog.tsx +14 -3
- package/src/components/Home/Home.tsx +3 -2
- package/src/components/Loading/Loading.tsx +1 -1
- package/src/components/MobileLayout/MobileLayout.stories.tsx +13 -13
- package/src/components/MobileLayout/MobileLayout.tsx +0 -2
- package/src/components/NavBranch/NavBranch.tsx +4 -7
- package/src/components/Popover/Popover.tsx +10 -5
- package/src/components/SimpleLayout/AppBar.stories.tsx +7 -7
- package/src/components/SimpleLayout/AppBar.tsx +45 -42
- package/src/components/SimpleLayout/Drawer.tsx +24 -16
- package/src/components/SimpleLayout/Main.tsx +5 -5
- package/src/components/SimpleLayout/NavBar.stories.tsx +2 -2
- package/src/components/SimpleLayout/SimpleLayout.stories.tsx +10 -10
- package/src/components/SimpleLayout/SimpleLayout.tsx +9 -9
- package/src/components/hooks.ts +1 -1
- package/src/hooks/actions.ts +8 -5
- package/src/hooks/useAppBarProps.ts +4 -24
- package/src/hooks/useDrawerActions.ts +6 -6
- package/src/hooks/useNavbarActions.ts +4 -4
- package/src/hooks/useSimpleLayoutState.ts +7 -5
- package/src/index.ts +2 -1
- package/src/meta.ts +3 -1
- package/src/operations/close.ts +1 -1
- package/src/operations/index.ts +1 -1
- package/src/operations/open.ts +36 -3
- package/src/operations/revert-workspace.ts +1 -1
- package/src/operations/set-layout-mode.ts +1 -1
- package/src/operations/set.ts +1 -1
- package/src/operations/state-access.ts +5 -3
- package/src/operations/switch-workspace.ts +1 -1
- package/src/operations/update-complementary.ts +4 -3
- package/src/operations/update-dialog.ts +1 -1
- 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 +20 -19
- package/src/types/{capabilities.ts → SimpleLayoutCapabilities.ts} +6 -18
- package/src/types/SimpleLayoutEvents.ts +15 -0
- package/src/types/index.ts +2 -2
- package/dist/lib/browser/chunk-J5FQ32AV.mjs.map +0 -7
- package/dist/lib/browser/chunk-MRR7PXSM.mjs +0 -29
- package/dist/lib/browser/chunk-MRR7PXSM.mjs.map +0 -7
- package/dist/lib/browser/chunk-XJVW3PRY.mjs.map +0 -7
- package/dist/lib/browser/close-OT5JOGVY.mjs.map +0 -7
- package/dist/lib/browser/index.mjs +0 -102
- package/dist/lib/browser/index.mjs.map +0 -7
- package/dist/lib/browser/meta.json +0 -1
- package/dist/lib/browser/open-4FQ44Z5G.mjs +0 -31
- package/dist/lib/browser/open-4FQ44Z5G.mjs.map +0 -7
- package/dist/lib/browser/operation-handler-OAD7LISD.mjs +0 -16
- package/dist/lib/browser/operation-handler-OAD7LISD.mjs.map +0 -7
- package/dist/lib/browser/react-root-6KIGPLUT.mjs.map +0 -7
- package/dist/lib/browser/react-surface-JLIEQGOL.mjs +0 -44
- package/dist/lib/browser/react-surface-JLIEQGOL.mjs.map +0 -7
- package/dist/lib/browser/revert-workspace-DLE265AN.mjs.map +0 -7
- package/dist/lib/browser/set-52HGTSH4.mjs.map +0 -7
- package/dist/lib/browser/set-layout-mode-T6QI3DGU.mjs.map +0 -7
- package/dist/lib/browser/spotlight-dismiss-67PHYS5B.mjs.map +0 -7
- package/dist/lib/browser/state-TXSMUWYI.mjs.map +0 -7
- package/dist/lib/browser/switch-workspace-5Y6T4BWJ.mjs.map +0 -7
- package/dist/lib/browser/update-complementary-MX3TTVAB.mjs.map +0 -7
- package/dist/lib/browser/update-dialog-FPAPZXKO.mjs.map +0 -7
- package/dist/lib/browser/update-popover-6V5ZTIYN.mjs.map +0 -7
- package/dist/lib/browser/update-sidebar-WHDKYMV7.mjs.map +0 -7
- package/dist/lib/browser/url-handler-GUJ3L7Y3.mjs +0 -163
- package/dist/lib/browser/url-handler-GUJ3L7Y3.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-27K22G6S.mjs +0 -23
- package/dist/lib/node-esm/chunk-27K22G6S.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-EXNDYZTP.mjs +0 -1257
- package/dist/lib/node-esm/chunk-EXNDYZTP.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-WMNTJ2MK.mjs +0 -31
- package/dist/lib/node-esm/chunk-WMNTJ2MK.mjs.map +0 -7
- package/dist/lib/node-esm/close-PEVHREL2.mjs +0 -35
- package/dist/lib/node-esm/index.mjs +0 -103
- 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-LMJY7JCJ.mjs +0 -32
- package/dist/lib/node-esm/open-LMJY7JCJ.mjs.map +0 -7
- package/dist/lib/node-esm/operation-handler-A2DC4WHC.mjs +0 -18
- package/dist/lib/node-esm/operation-handler-A2DC4WHC.mjs.map +0 -7
- package/dist/lib/node-esm/react-root-5SCW2KTH.mjs +0 -22
- package/dist/lib/node-esm/react-root-5SCW2KTH.mjs.map +0 -7
- package/dist/lib/node-esm/react-surface-WLKB6AET.mjs.map +0 -7
- package/dist/lib/node-esm/revert-workspace-XZXT64YA.mjs +0 -22
- package/dist/lib/node-esm/set-5I6LFH5L.mjs +0 -22
- package/dist/lib/node-esm/set-layout-mode-F5B6QLZM.mjs +0 -13
- package/dist/lib/node-esm/set-layout-mode-F5B6QLZM.mjs.map +0 -7
- package/dist/lib/node-esm/spotlight-dismiss-RMLRZUVY.mjs +0 -68
- package/dist/lib/node-esm/state-JMX6FAG4.mjs +0 -49
- package/dist/lib/node-esm/state-JMX6FAG4.mjs.map +0 -7
- package/dist/lib/node-esm/switch-workspace-PB6T2SGY.mjs +0 -25
- package/dist/lib/node-esm/update-complementary-FTW423IY.mjs +0 -32
- package/dist/lib/node-esm/update-complementary-FTW423IY.mjs.map +0 -7
- package/dist/lib/node-esm/update-dialog-ID267DCL.mjs +0 -30
- package/dist/lib/node-esm/update-popover-RLHU2HF4.mjs +0 -34
- package/dist/lib/node-esm/update-sidebar-BJ7HTNZ4.mjs +0 -12
- package/dist/lib/node-esm/update-sidebar-BJ7HTNZ4.mjs.map +0 -7
- package/dist/lib/node-esm/url-handler-WMONO2T6.mjs.map +0 -7
- package/dist/types/src/capabilities/operation-handler/index.d.ts +0 -4
- package/dist/types/src/capabilities/operation-handler/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/operation-handler/operation-handler.d.ts.map +0 -1
- package/dist/types/src/capabilities/react-root/index.d.ts +0 -6
- package/dist/types/src/capabilities/react-root/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/react-root/react-root.d.ts.map +0 -1
- package/dist/types/src/capabilities/react-surface/index.d.ts +0 -3
- package/dist/types/src/capabilities/react-surface/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/react-surface/react-surface.d.ts.map +0 -1
- package/dist/types/src/capabilities/spotlight-dismiss/index.d.ts +0 -3
- package/dist/types/src/capabilities/spotlight-dismiss/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/spotlight-dismiss/spotlight-dismiss.d.ts.map +0 -1
- package/dist/types/src/capabilities/state/index.d.ts +0 -13
- package/dist/types/src/capabilities/state/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/state/state.d.ts.map +0 -1
- package/dist/types/src/capabilities/url-handler/index.d.ts +0 -3
- package/dist/types/src/capabilities/url-handler/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/url-handler/url-handler.d.ts.map +0 -1
- package/dist/types/src/types/capabilities.d.ts.map +0 -1
- package/dist/types/src/types/events.d.ts +0 -6
- package/dist/types/src/types/events.d.ts.map +0 -1
- package/src/capabilities/operation-handler/index.ts +0 -9
- package/src/capabilities/react-root/index.ts +0 -7
- package/src/capabilities/react-surface/index.ts +0 -7
- package/src/capabilities/spotlight-dismiss/index.ts +0 -7
- package/src/capabilities/state/index.ts +0 -9
- package/src/capabilities/url-handler/index.ts +0 -7
- package/src/capabilities/url-handler/url-handler.ts +0 -145
- package/src/types/events.ts +0 -15
- /package/dist/types/src/capabilities/{react-root/react-root.d.ts → react-root.d.ts} +0 -0
- /package/dist/types/src/capabilities/{react-surface/react-surface.d.ts → react-surface.d.ts} +0 -0
- /package/src/capabilities/{spotlight-dismiss/spotlight-dismiss.ts → spotlight-dismiss.ts} +0 -0
|
@@ -12,9 +12,9 @@ import { Node, useActionRunner } from '@dxos/plugin-graph';
|
|
|
12
12
|
import { useTranslation } from '@dxos/react-ui';
|
|
13
13
|
import { type ActionExecutor, type ActionGraphProps, createGapSeparator } from '@dxos/react-ui-menu';
|
|
14
14
|
|
|
15
|
-
import { useMobileLayout } from '
|
|
16
|
-
import { meta } from '
|
|
17
|
-
import {
|
|
15
|
+
import { useMobileLayout } from '#components';
|
|
16
|
+
import { meta } from '#meta';
|
|
17
|
+
import { SimpleLayoutCapabilities } from '#types';
|
|
18
18
|
|
|
19
19
|
import { createCompanionActions } from './actions';
|
|
20
20
|
import { useSimpleLayoutState } from './useSimpleLayoutState';
|
|
@@ -31,7 +31,7 @@ export type DrawerActions = {
|
|
|
31
31
|
*/
|
|
32
32
|
export const useDrawerActions = (consumerName: string): DrawerActions => {
|
|
33
33
|
const { t } = useTranslation(meta.id);
|
|
34
|
-
const stateAtom = useCapability(
|
|
34
|
+
const stateAtom = useCapability(SimpleLayoutCapabilities.State);
|
|
35
35
|
const { graph } = useAppGraph();
|
|
36
36
|
const runAction = useActionRunner();
|
|
37
37
|
const { updateState } = useSimpleLayoutState();
|
|
@@ -64,7 +64,7 @@ export const useDrawerActions = (consumerName: string): DrawerActions => {
|
|
|
64
64
|
type: Node.ActionType,
|
|
65
65
|
properties: {
|
|
66
66
|
icon: isExpanded ? 'ph--arrow-down--regular' : 'ph--arrow-up--regular',
|
|
67
|
-
label: isExpanded ? t('collapse
|
|
67
|
+
label: isExpanded ? t('collapse-drawer.label') : t('expand-drawer.label'),
|
|
68
68
|
iconOnly: true,
|
|
69
69
|
},
|
|
70
70
|
data: () =>
|
|
@@ -80,7 +80,7 @@ export const useDrawerActions = (consumerName: string): DrawerActions => {
|
|
|
80
80
|
type: Node.ActionType,
|
|
81
81
|
properties: {
|
|
82
82
|
icon: 'ph--x--regular',
|
|
83
|
-
label: t('close
|
|
83
|
+
label: t('close-drawer.label'),
|
|
84
84
|
iconOnly: true,
|
|
85
85
|
},
|
|
86
86
|
data: () =>
|
|
@@ -16,8 +16,8 @@ import {
|
|
|
16
16
|
createMenuItemGroup,
|
|
17
17
|
} from '@dxos/react-ui-menu';
|
|
18
18
|
|
|
19
|
-
import { meta } from '
|
|
20
|
-
import {
|
|
19
|
+
import { meta } from '#meta';
|
|
20
|
+
import { SimpleLayoutCapabilities } from '#types';
|
|
21
21
|
|
|
22
22
|
import { createCompanionActions } from './actions';
|
|
23
23
|
import { useSimpleLayoutState } from './useSimpleLayoutState';
|
|
@@ -39,7 +39,7 @@ export const useNavbarActions = (): NavbarActions => {
|
|
|
39
39
|
const { t } = useTranslation(meta.id);
|
|
40
40
|
const { graph } = useAppGraph();
|
|
41
41
|
const runAction = useActionRunner();
|
|
42
|
-
const stateAtom = useCapability(
|
|
42
|
+
const stateAtom = useCapability(SimpleLayoutCapabilities.State);
|
|
43
43
|
const { updateState } = useSimpleLayoutState();
|
|
44
44
|
|
|
45
45
|
// Create a computed atom that derives everything from graph connections and state.
|
|
@@ -62,7 +62,7 @@ export const useNavbarActions = (): NavbarActions => {
|
|
|
62
62
|
variant: 'dropdownMenu',
|
|
63
63
|
icon: 'ph--list--regular',
|
|
64
64
|
iconOnly: true,
|
|
65
|
-
label: t('main
|
|
65
|
+
label: t('main-menu.label'),
|
|
66
66
|
testId: 'simpleLayoutPlugin.addSpace',
|
|
67
67
|
});
|
|
68
68
|
nodes.push(mainMenuGroup);
|
|
@@ -7,20 +7,22 @@ import { useCallback, useContext } from 'react';
|
|
|
7
7
|
|
|
8
8
|
import { useCapability } from '@dxos/app-framework/ui';
|
|
9
9
|
|
|
10
|
-
import {
|
|
10
|
+
import { SimpleLayoutCapabilities } from '#types';
|
|
11
11
|
|
|
12
12
|
export type UseSimpleLayoutState = {
|
|
13
|
-
state: SimpleLayoutState;
|
|
14
|
-
updateState: (
|
|
13
|
+
state: SimpleLayoutCapabilities.SimpleLayoutState;
|
|
14
|
+
updateState: (
|
|
15
|
+
fn: (current: SimpleLayoutCapabilities.SimpleLayoutState) => SimpleLayoutCapabilities.SimpleLayoutState,
|
|
16
|
+
) => void;
|
|
15
17
|
};
|
|
16
18
|
|
|
17
19
|
export const useSimpleLayoutState = (): UseSimpleLayoutState => {
|
|
18
20
|
const registry = useContext(RegistryContext);
|
|
19
|
-
const stateAtom = useCapability(
|
|
21
|
+
const stateAtom = useCapability(SimpleLayoutCapabilities.State);
|
|
20
22
|
const state = useAtomValue(stateAtom);
|
|
21
23
|
|
|
22
24
|
const updateState = useCallback(
|
|
23
|
-
(fn: (current: SimpleLayoutState) => SimpleLayoutState) => {
|
|
25
|
+
(fn: (current: SimpleLayoutCapabilities.SimpleLayoutState) => SimpleLayoutCapabilities.SimpleLayoutState) => {
|
|
24
26
|
registry.set(stateAtom, fn(registry.get(stateAtom)));
|
|
25
27
|
},
|
|
26
28
|
[registry, stateAtom],
|
package/src/index.ts
CHANGED
package/src/meta.ts
CHANGED
|
@@ -6,11 +6,13 @@ import { type Plugin } from '@dxos/app-framework';
|
|
|
6
6
|
import { trim } from '@dxos/util';
|
|
7
7
|
|
|
8
8
|
export const meta: Plugin.Meta = {
|
|
9
|
-
id: 'org.dxos.plugin.
|
|
9
|
+
id: 'org.dxos.plugin.simpleLayout',
|
|
10
10
|
name: 'Simple Layout',
|
|
11
|
+
author: 'DXOS',
|
|
11
12
|
description: trim`
|
|
12
13
|
Minimal layout plugin for simplified UI contexts like popover windows.
|
|
13
14
|
Provides basic content rendering without sidebars or complex navigation.
|
|
14
15
|
`,
|
|
15
16
|
icon: 'ph--layout--regular',
|
|
17
|
+
tags: ['system'],
|
|
16
18
|
};
|
package/src/operations/close.ts
CHANGED
package/src/operations/index.ts
CHANGED
package/src/operations/open.ts
CHANGED
|
@@ -2,27 +2,60 @@
|
|
|
2
2
|
|
|
3
3
|
import * as Effect from 'effect/Effect';
|
|
4
4
|
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
5
|
+
import { Capability } from '@dxos/app-framework';
|
|
6
|
+
import {
|
|
7
|
+
AppCapabilities,
|
|
8
|
+
LayoutOperation,
|
|
9
|
+
createEdgeExistenceChecker,
|
|
10
|
+
validateNavigationTarget,
|
|
11
|
+
} from '@dxos/app-toolkit';
|
|
12
|
+
import { Operation } from '@dxos/compute';
|
|
13
|
+
import { Context } from '@dxos/context';
|
|
14
|
+
import { log } from '@dxos/log';
|
|
15
|
+
import { ClientCapabilities } from '@dxos/plugin-client';
|
|
7
16
|
|
|
8
17
|
import { layoutStateAccess } from './state-access';
|
|
9
18
|
|
|
10
19
|
const handler: Operation.WithHandler<typeof LayoutOperation.Open> = LayoutOperation.Open.pipe(
|
|
11
20
|
Operation.withHandler(
|
|
12
21
|
Effect.fnUntraced(function* (input) {
|
|
22
|
+
log('LayoutOperation.Open handler start');
|
|
23
|
+
const { graph } = yield* Capability.get(AppCapabilities.AppGraph);
|
|
13
24
|
const { updateState } = yield* layoutStateAccess;
|
|
14
25
|
const id = input.subject[0];
|
|
15
26
|
|
|
27
|
+
// Validate navigation target, redirecting to 404 if not found.
|
|
28
|
+
const capabilities = yield* Capability.Service;
|
|
29
|
+
const pathResolvers = capabilities.getAll(AppCapabilities.NavigationPathResolver);
|
|
30
|
+
const checkRemoteExistence = yield* Capability.get(ClientCapabilities.Client).pipe(
|
|
31
|
+
Effect.map((client) =>
|
|
32
|
+
createEdgeExistenceChecker((spaceId, body) => client.edge.http.execQuery(new Context(), spaceId, body)),
|
|
33
|
+
),
|
|
34
|
+
Effect.catchAll(() => Effect.succeed(undefined)),
|
|
35
|
+
);
|
|
36
|
+
|
|
37
|
+
const validatedId =
|
|
38
|
+
input.navigation === 'immediate'
|
|
39
|
+
? id
|
|
40
|
+
: yield* validateNavigationTarget({
|
|
41
|
+
graph,
|
|
42
|
+
subjectId: id,
|
|
43
|
+
pathResolvers,
|
|
44
|
+
checkRemoteExistence,
|
|
45
|
+
});
|
|
46
|
+
|
|
16
47
|
updateState((state) => {
|
|
17
48
|
const newHistory = state.active ? [...state.history, state.active] : state.history;
|
|
18
49
|
const trimmedHistory =
|
|
19
50
|
newHistory.length > MAX_HISTORY_LENGTH ? newHistory.slice(-MAX_HISTORY_LENGTH) : newHistory;
|
|
20
51
|
return {
|
|
21
52
|
...state,
|
|
22
|
-
active:
|
|
53
|
+
active: validatedId,
|
|
23
54
|
history: trimmedHistory,
|
|
24
55
|
};
|
|
25
56
|
});
|
|
57
|
+
|
|
58
|
+
return [validatedId];
|
|
26
59
|
}),
|
|
27
60
|
),
|
|
28
61
|
);
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import * as Effect from 'effect/Effect';
|
|
4
4
|
|
|
5
5
|
import { LayoutOperation } from '@dxos/app-toolkit';
|
|
6
|
-
import { Operation } from '@dxos/
|
|
6
|
+
import { Operation } from '@dxos/compute';
|
|
7
7
|
|
|
8
8
|
const handler: Operation.WithHandler<typeof LayoutOperation.SetLayoutMode> = LayoutOperation.SetLayoutMode.pipe(
|
|
9
9
|
Operation.withHandler(Effect.fnUntraced(function* () {})),
|
package/src/operations/set.ts
CHANGED
|
@@ -4,15 +4,17 @@ import * as Effect from 'effect/Effect';
|
|
|
4
4
|
|
|
5
5
|
import { Capabilities, Capability } from '@dxos/app-framework';
|
|
6
6
|
|
|
7
|
-
import {
|
|
7
|
+
import { SimpleLayoutCapabilities } from '../types';
|
|
8
8
|
|
|
9
9
|
export const layoutStateAccess = Effect.gen(function* () {
|
|
10
10
|
const registry = yield* Capability.get(Capabilities.AtomRegistry);
|
|
11
|
-
const stateAtom = yield* Capability.get(
|
|
11
|
+
const stateAtom = yield* Capability.get(SimpleLayoutCapabilities.State);
|
|
12
12
|
|
|
13
13
|
return {
|
|
14
14
|
getState: () => registry.get(stateAtom),
|
|
15
|
-
updateState: (
|
|
15
|
+
updateState: (
|
|
16
|
+
fn: (current: SimpleLayoutCapabilities.SimpleLayoutState) => SimpleLayoutCapabilities.SimpleLayoutState,
|
|
17
|
+
) => {
|
|
16
18
|
registry.set(stateAtom, fn(registry.get(stateAtom)));
|
|
17
19
|
},
|
|
18
20
|
};
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import * as Effect from 'effect/Effect';
|
|
4
4
|
|
|
5
5
|
import { isPinnedWorkspace, LayoutOperation } from '@dxos/app-toolkit';
|
|
6
|
-
import { Operation } from '@dxos/
|
|
6
|
+
import { Operation } from '@dxos/compute';
|
|
7
7
|
|
|
8
8
|
import { layoutStateAccess } from './state-access';
|
|
9
9
|
|
|
@@ -2,8 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
import * as Effect from 'effect/Effect';
|
|
4
4
|
|
|
5
|
-
import {
|
|
6
|
-
import { Operation } from '@dxos/
|
|
5
|
+
import { LayoutOperation } from '@dxos/app-toolkit';
|
|
6
|
+
import { Operation } from '@dxos/compute';
|
|
7
|
+
import { getLinkedVariant } from '@dxos/react-ui-attention';
|
|
7
8
|
|
|
8
9
|
import { layoutStateAccess } from './state-access';
|
|
9
10
|
|
|
@@ -20,7 +21,7 @@ const handler: Operation.WithHandler<typeof LayoutOperation.UpdateComplementary>
|
|
|
20
21
|
companionVariant: undefined,
|
|
21
22
|
}));
|
|
22
23
|
} else if (input.subject) {
|
|
23
|
-
const variant =
|
|
24
|
+
const variant = getLinkedVariant(input.subject);
|
|
24
25
|
updateState((state) => ({
|
|
25
26
|
...state,
|
|
26
27
|
companionVariant: variant,
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import * as Effect from 'effect/Effect';
|
|
4
4
|
|
|
5
5
|
import { LayoutOperation } from '@dxos/app-toolkit';
|
|
6
|
-
import { Operation } from '@dxos/
|
|
6
|
+
import { Operation } from '@dxos/compute';
|
|
7
7
|
|
|
8
8
|
const handler: Operation.WithHandler<typeof LayoutOperation.UpdateSidebar> = LayoutOperation.UpdateSidebar.pipe(
|
|
9
9
|
Operation.withHandler(() => Effect.void),
|
package/src/plugin.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { Plugin } from '@dxos/app-framework';
|
|
6
|
+
|
|
7
|
+
import { meta } from './meta';
|
|
8
|
+
|
|
9
|
+
export const SimpleLayoutPlugin = Plugin.lazy(meta, () => import('#plugin'));
|
|
10
|
+
|
|
11
|
+
export { SimpleLayoutOperationHandlerSet } from './operations';
|
package/src/translations.ts
CHANGED
|
@@ -3,32 +3,33 @@
|
|
|
3
3
|
//
|
|
4
4
|
|
|
5
5
|
import { type Resource } from '@dxos/react-ui';
|
|
6
|
-
import { translations as searchTranslations } from '@dxos/react-ui-search';
|
|
6
|
+
import { translations as searchTranslations } from '@dxos/react-ui-search/translations';
|
|
7
7
|
|
|
8
|
-
import { meta } from '
|
|
8
|
+
import { meta } from '#meta';
|
|
9
9
|
|
|
10
10
|
export const translations = [
|
|
11
11
|
...searchTranslations,
|
|
12
12
|
{
|
|
13
13
|
'en-US': {
|
|
14
14
|
[meta.id]: {
|
|
15
|
-
'plugin
|
|
16
|
-
'settings
|
|
17
|
-
'workspaces
|
|
18
|
-
'settings
|
|
19
|
-
'back
|
|
20
|
-
'browse
|
|
21
|
-
'notifications
|
|
22
|
-
'profile
|
|
23
|
-
'app
|
|
24
|
-
'main
|
|
25
|
-
'companions
|
|
26
|
-
'error
|
|
27
|
-
'drawer
|
|
28
|
-
'close
|
|
29
|
-
'expand
|
|
30
|
-
'collapse
|
|
31
|
-
'actions
|
|
15
|
+
'plugin.name': 'Simple layout',
|
|
16
|
+
'settings.title': 'Simple layout settings',
|
|
17
|
+
'workspaces.heading': 'Workspaces',
|
|
18
|
+
'settings.heading': 'Settings',
|
|
19
|
+
'back.label': 'Back',
|
|
20
|
+
'browse.label': 'Browse',
|
|
21
|
+
'notifications.label': 'Notifications',
|
|
22
|
+
'profile.label': 'Profile',
|
|
23
|
+
'app-menu.label': 'App menu',
|
|
24
|
+
'main-menu.label': 'Main menu',
|
|
25
|
+
'companions-menu.label': 'Companions',
|
|
26
|
+
'error-fallback.message': 'An error occurred',
|
|
27
|
+
'drawer.label': 'Drawer',
|
|
28
|
+
'close-drawer.label': 'Close drawer',
|
|
29
|
+
'expand-drawer.label': 'Expand drawer',
|
|
30
|
+
'collapse-drawer.label': 'Collapse drawer',
|
|
31
|
+
'actions-menu.label': 'Actions',
|
|
32
|
+
'done.label': 'Done',
|
|
32
33
|
},
|
|
33
34
|
},
|
|
34
35
|
},
|
|
@@ -2,32 +2,28 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
+
// @import-as-namespace
|
|
6
|
+
|
|
5
7
|
import { type Atom } from '@effect-atom/atom-react';
|
|
6
8
|
|
|
7
9
|
import { Capability } from '@dxos/app-framework';
|
|
8
10
|
import { type Label } from '@dxos/react-ui';
|
|
9
11
|
|
|
10
|
-
import { meta } from '
|
|
12
|
+
import { meta } from '#meta';
|
|
11
13
|
|
|
12
14
|
export type DrawerState = 'closed' | 'open' | 'expanded';
|
|
13
15
|
|
|
14
|
-
// TODO(wittjosiah): Handle toasts.
|
|
15
16
|
export type SimpleLayoutState = {
|
|
16
|
-
/** Data to be passed to the main content Surface. */
|
|
17
17
|
content?: any;
|
|
18
|
-
|
|
19
18
|
previousWorkspace: string;
|
|
20
19
|
workspace: string;
|
|
21
20
|
active?: string;
|
|
22
|
-
|
|
23
21
|
dialogOpen: boolean;
|
|
24
22
|
dialogType?: 'default' | 'alert';
|
|
25
23
|
dialogBlockAlign?: 'start' | 'center' | 'end';
|
|
26
24
|
dialogOverlayClasses?: string;
|
|
27
25
|
dialogOverlayStyle?: Record<string, any>;
|
|
28
|
-
|
|
29
|
-
dialogContent?: any;
|
|
30
|
-
|
|
26
|
+
dialogContent?: { component: string; props?: any } | null;
|
|
31
27
|
popoverOpen?: boolean;
|
|
32
28
|
popoverSide?: 'top' | 'right' | 'bottom' | 'left';
|
|
33
29
|
popoverVariant?: 'virtual' | 'react';
|
|
@@ -35,19 +31,11 @@ export type SimpleLayoutState = {
|
|
|
35
31
|
popoverAnchorId?: string;
|
|
36
32
|
popoverKind?: 'base' | 'card';
|
|
37
33
|
popoverTitle?: Label;
|
|
38
|
-
popoverContent?: any;
|
|
39
|
-
|
|
40
|
-
/** Bottom drawer state. */
|
|
34
|
+
popoverContent?: { component: string; props?: any } | { subject: any } | null;
|
|
41
35
|
drawerState: DrawerState;
|
|
42
|
-
|
|
43
|
-
/** Stack of previously active item IDs for back navigation. */
|
|
44
36
|
history: string[];
|
|
45
|
-
|
|
46
|
-
/** Whether running in popover window context (hides mobile-specific UI). */
|
|
47
37
|
isPopover?: boolean;
|
|
48
|
-
|
|
49
|
-
/** Variant of the companion to display in the drawer (e.g., "comments", "assistant-chat"). */
|
|
50
38
|
companionVariant?: string;
|
|
51
39
|
};
|
|
52
40
|
|
|
53
|
-
export const
|
|
41
|
+
export const State = Capability.make<Atom.Writable<SimpleLayoutState>>(`${meta.id}.state`);
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
// @import-as-namespace
|
|
6
|
+
|
|
7
|
+
import { type ActivationEvent } from '@dxos/app-framework';
|
|
8
|
+
import { AppActivationEvents } from '@dxos/app-toolkit';
|
|
9
|
+
|
|
10
|
+
import * as SimpleLayoutCapabilities from './SimpleLayoutCapabilities';
|
|
11
|
+
|
|
12
|
+
/** Fired when State capability is ready. */
|
|
13
|
+
export const StateReady: ActivationEvent.ActivationEvent = AppActivationEvents.createStateEvent(
|
|
14
|
+
SimpleLayoutCapabilities.State.identifier,
|
|
15
|
+
);
|
package/src/types/index.ts
CHANGED