@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
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
|
|
2
|
-
import {
|
|
3
|
-
layoutStateAccess
|
|
4
|
-
} from "./chunk-27K22G6S.mjs";
|
|
5
|
-
import "./chunk-WMNTJ2MK.mjs";
|
|
6
|
-
|
|
7
|
-
// src/operations/update-dialog.ts
|
|
8
|
-
import * as Effect from "effect/Effect";
|
|
9
|
-
import { LayoutOperation } from "@dxos/app-toolkit";
|
|
10
|
-
import { Operation } from "@dxos/operation";
|
|
11
|
-
var handler = LayoutOperation.UpdateDialog.pipe(Operation.withHandler(Effect.fnUntraced(function* (input) {
|
|
12
|
-
const { updateState } = yield* layoutStateAccess;
|
|
13
|
-
updateState((state) => ({
|
|
14
|
-
...state,
|
|
15
|
-
dialogOpen: input.state ?? Boolean(input.subject),
|
|
16
|
-
dialogType: input.type ?? "default",
|
|
17
|
-
dialogBlockAlign: input.blockAlign ?? "center",
|
|
18
|
-
dialogOverlayClasses: input.overlayClasses,
|
|
19
|
-
dialogOverlayStyle: input.overlayStyle,
|
|
20
|
-
dialogContent: input.subject ? {
|
|
21
|
-
component: input.subject,
|
|
22
|
-
props: input.props
|
|
23
|
-
} : void 0
|
|
24
|
-
}));
|
|
25
|
-
})));
|
|
26
|
-
var update_dialog_default = handler;
|
|
27
|
-
export {
|
|
28
|
-
update_dialog_default as default
|
|
29
|
-
};
|
|
30
|
-
//# sourceMappingURL=update-dialog-ID267DCL.mjs.map
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
|
|
2
|
-
import {
|
|
3
|
-
layoutStateAccess
|
|
4
|
-
} from "./chunk-27K22G6S.mjs";
|
|
5
|
-
import "./chunk-WMNTJ2MK.mjs";
|
|
6
|
-
|
|
7
|
-
// src/operations/update-popover.ts
|
|
8
|
-
import * as Effect from "effect/Effect";
|
|
9
|
-
import { LayoutOperation } from "@dxos/app-toolkit";
|
|
10
|
-
import { Operation } from "@dxos/operation";
|
|
11
|
-
var handler = LayoutOperation.UpdatePopover.pipe(Operation.withHandler(Effect.fnUntraced(function* (input) {
|
|
12
|
-
const { updateState } = yield* layoutStateAccess;
|
|
13
|
-
updateState((state) => ({
|
|
14
|
-
...state,
|
|
15
|
-
popoverOpen: input.state ?? Boolean(input.subject),
|
|
16
|
-
popoverKind: input.kind ?? "base",
|
|
17
|
-
popoverTitle: input.kind === "card" ? input.title : void 0,
|
|
18
|
-
popoverContent: typeof input.subject === "string" ? {
|
|
19
|
-
component: input.subject,
|
|
20
|
-
props: input.props
|
|
21
|
-
} : input.subject ? {
|
|
22
|
-
subject: input.subject
|
|
23
|
-
} : void 0,
|
|
24
|
-
popoverSide: input.side,
|
|
25
|
-
popoverVariant: input.variant,
|
|
26
|
-
popoverAnchor: input.variant === "virtual" ? input.anchor : state.popoverAnchor,
|
|
27
|
-
popoverAnchorId: input.variant !== "virtual" ? input.anchorId : state.popoverAnchorId
|
|
28
|
-
}));
|
|
29
|
-
})));
|
|
30
|
-
var update_popover_default = handler;
|
|
31
|
-
export {
|
|
32
|
-
update_popover_default as default
|
|
33
|
-
};
|
|
34
|
-
//# sourceMappingURL=update-popover-RLHU2HF4.mjs.map
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
|
|
2
|
-
|
|
3
|
-
// src/operations/update-sidebar.ts
|
|
4
|
-
import * as Effect from "effect/Effect";
|
|
5
|
-
import { LayoutOperation } from "@dxos/app-toolkit";
|
|
6
|
-
import { Operation } from "@dxos/operation";
|
|
7
|
-
var handler = LayoutOperation.UpdateSidebar.pipe(Operation.withHandler(() => Effect.void));
|
|
8
|
-
var update_sidebar_default = handler;
|
|
9
|
-
export {
|
|
10
|
-
update_sidebar_default as default
|
|
11
|
-
};
|
|
12
|
-
//# sourceMappingURL=update-sidebar-BJ7HTNZ4.mjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/operations/update-sidebar.ts"],
|
|
4
|
-
"sourcesContent": ["// Copyright 2025 DXOS.org\n\nimport * as Effect from 'effect/Effect';\n\nimport { LayoutOperation } from '@dxos/app-toolkit';\nimport { Operation } from '@dxos/operation';\n\nconst handler: Operation.WithHandler<typeof LayoutOperation.UpdateSidebar> = LayoutOperation.UpdateSidebar.pipe(\n Operation.withHandler(() => Effect.void),\n);\n\nexport default handler;\n"],
|
|
5
|
-
"mappings": ";;;AAEA,YAAYA,YAAY;AAExB,SAASC,uBAAuB;AAChC,SAASC,iBAAiB;AAE1B,IAAMC,UAAuEC,gBAAgBC,cAAcC,KACzGC,UAAUC,YAAY,MAAaC,WAAI,CAAA;AAGzC,IAAA,yBAAeN;",
|
|
6
|
-
"names": ["Effect", "LayoutOperation", "Operation", "handler", "LayoutOperation", "UpdateSidebar", "pipe", "Operation", "withHandler", "void"]
|
|
7
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/capabilities/url-handler/url-handler.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\n\nimport { Capabilities, Capability } from '@dxos/app-framework';\nimport { LayoutOperation, fromUrlPath, getWorkspaceFromPath, toUrlPath } from '@dxos/app-toolkit';\nimport { log } from '@dxos/log';\nimport { isTauri } from '@dxos/util';\n\nimport { type SimpleLayoutState, SimpleLayoutState as SimpleLayoutStateCapability } from '../../types';\n\n/**\n * URL handler for simple layout that syncs browser URL with layout state.\n * URL paths map directly to qualified graph IDs with the leading `root` segment stripped.\n * Root is represented as `/`.\n *\n * On mobile Tauri, also listens for deep links via the deep-link plugin.\n */\nexport default Capability.makeModule(\n Effect.fnUntraced(function* () {\n const { invokePromise } = yield* Capability.get(Capabilities.OperationInvoker);\n\n /**\n * Handle navigation from a pathname.\n * Restores the qualified graph ID and dispatches layout operations.\n */\n const handlePathNavigation = (pathname: string) => {\n if (isFilePath(pathname)) {\n log.info('[UrlHandler] Skipping file path (not a graph node)', { pathname });\n pathname = '/';\n }\n\n log.info('[UrlHandler] Navigating to path', { pathname });\n\n const qualifiedId = fromUrlPath(pathname);\n const workspace = getWorkspaceFromPath(qualifiedId);\n\n void invokePromise(LayoutOperation.SwitchWorkspace, { subject: workspace });\n\n const activeId = qualifiedId !== workspace ? qualifiedId : undefined;\n if (activeId) {\n void invokePromise(LayoutOperation.Open, { subject: [activeId] });\n }\n };\n\n const onNavigation = handleNavigation(handlePathNavigation);\n\n yield* Effect.sync(() => onNavigation());\n window.addEventListener('popstate', onNavigation);\n\n let unlistenDeepLink: (() => void) | undefined;\n if (isTauri()) {\n yield* Effect.tryPromise({\n try: async () => {\n const { getCurrent, onOpenUrl } = await import('@tauri-apps/plugin-deep-link');\n\n const launchUrls = await getCurrent();\n if (launchUrls && launchUrls.length > 0) {\n log.info('[UrlHandler] App launched with deep links', { urls: launchUrls });\n for (const url of launchUrls) {\n handleDeepLink(url, handlePathNavigation);\n }\n }\n\n unlistenDeepLink = await onOpenUrl((urls) => {\n log.info('[UrlHandler] Deep links received', { urls });\n for (const url of urls) {\n handleDeepLink(url, handlePathNavigation);\n }\n });\n\n log.info('[UrlHandler] Deep link listener initialized');\n },\n catch: (error) => {\n log.warn('[UrlHandler] Failed to initialize deep link listener', { error });\n return error;\n },\n }).pipe(Effect.catchAll(() => Effect.void));\n }\n\n let lastWorkspace: string | undefined;\n let lastActive: string | undefined;\n const unsubscribe = yield* Capabilities.subscribeAtom(SimpleLayoutStateCapability, (state: SimpleLayoutState) => {\n const { workspace, active } = state;\n\n if (workspace !== lastWorkspace || active !== lastActive) {\n lastWorkspace = workspace;\n lastActive = active;\n\n const path = active ? toUrlPath(active) : toUrlPath(workspace);\n if (window.location.pathname !== path) {\n history.pushState(null, '', `${path}${window.location.search}`);\n }\n }\n });\n\n return Capability.contributes(Capabilities.Null, null, () =>\n Effect.sync(() => {\n window.removeEventListener('popstate', onNavigation);\n unsubscribe();\n unlistenDeepLink?.();\n }),\n );\n }),\n);\n\n/**\n * Check if a path is a special redirect path that shouldn't be navigated to.\n * These paths are handled by other systems (e.g., OAuth).\n */\nconst isRedirectPath = (pathname: string): boolean => pathname.startsWith('/redirect/');\n\n/**\n * Paths with file extensions (e.g., `/iframe.html`) are not graph node paths.\n * This guards against embedded contexts like Storybook iframes interpreting\n * the host pathname as a navigation target.\n */\nconst isFilePath = (pathname: string): boolean => /\\.[a-z]+$/i.test(pathname);\n\n/**\n * Returns a handler for navigation events (initial load and popstate) that navigates to current pathname.\n */\nconst handleNavigation =\n (navigate: (pathname: string) => void): (() => void) =>\n () =>\n navigate(window.location.pathname);\n\n/**\n * Handle deep link URL from Tauri. Parses the URL and calls navigate unless it's a redirect path.\n */\nconst handleDeepLink = (urlString: string, navigate: (pathname: string) => void): void => {\n log.info('[UrlHandler] Deep link received', { url: urlString });\n try {\n const url = new URL(urlString);\n if (isRedirectPath(url.pathname)) {\n log.info('[UrlHandler] Skipping redirect path (handled elsewhere)', { pathname: url.pathname });\n return;\n }\n navigate(url.pathname);\n } catch (error) {\n log.warn('[UrlHandler] Failed to parse deep link URL', { urlString, error });\n }\n};\n"],
|
|
5
|
-
"mappings": "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",
|
|
6
|
-
"names": ["Effect", "Capabilities", "Capability", "LayoutOperation", "fromUrlPath", "getWorkspaceFromPath", "toUrlPath", "log", "isTauri", "Capability", "makeModule", "fnUntraced", "invokePromise", "get", "Capabilities", "OperationInvoker", "handlePathNavigation", "pathname", "isFilePath", "log", "info", "qualifiedId", "fromUrlPath", "workspace", "getWorkspaceFromPath", "LayoutOperation", "SwitchWorkspace", "subject", "activeId", "undefined", "Open", "onNavigation", "handleNavigation", "sync", "window", "addEventListener", "unlistenDeepLink", "isTauri", "tryPromise", "try", "getCurrent", "onOpenUrl", "launchUrls", "length", "urls", "url", "handleDeepLink", "catch", "error", "warn", "pipe", "catchAll", "void", "lastWorkspace", "lastActive", "unsubscribe", "subscribeAtom", "SimpleLayoutStateCapability", "state", "active", "path", "toUrlPath", "location", "history", "pushState", "search", "contributes", "Null", "removeEventListener", "isRedirectPath", "startsWith", "test", "navigate", "urlString", "URL"]
|
|
7
|
-
}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { Capability } from '@dxos/app-framework';
|
|
2
|
-
import { OperationHandlerSet } from '@dxos/operation';
|
|
3
|
-
export declare const OperationHandler: Capability.LazyCapability<OperationHandlerSet.OperationHandlerSet, Capability.ModuleReturn, Error>;
|
|
4
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/capabilities/operation-handler/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAEtD,eAAO,MAAM,gBAAgB,oGAG5B,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"operation-handler.d.ts","sourceRoot":"","sources":["../../../../../src/capabilities/operation-handler/operation-handler.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAExC,OAAO,EAAgB,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAC/D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;;AAI3D,wBAIE"}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { Capability } from '@dxos/app-framework';
|
|
2
|
-
export declare const ReactRoot: Capability.LazyCapability<void, Capability.Capability<Capability.InterfaceDef<Readonly<{
|
|
3
|
-
id: string;
|
|
4
|
-
root: import("react").FC<import("react").PropsWithChildren>;
|
|
5
|
-
}>>>, Error>;
|
|
6
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/capabilities/react-root/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEjD,eAAO,MAAM,SAAS;;;YAA6D,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"react-root.d.ts","sourceRoot":"","sources":["../../../../../src/capabilities/react-root/react-root.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAgB,UAAU,EAAE,MAAM,qBAAqB,CAAC;;;;;AAK/D,wBASE"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/capabilities/react-surface/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEjD,eAAO,MAAM,YAAY,iJAAmE,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"react-surface.d.ts","sourceRoot":"","sources":["../../../../../src/capabilities/react-surface/react-surface.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAGxC,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;;AAc/D,wBAqBE"}
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import { Capability } from '@dxos/app-framework';
|
|
2
|
-
export declare const SpotlightDismiss: Capability.LazyCapability<import("./spotlight-dismiss").SpotlightDismissOptions | undefined, [] | Capability.Capability<Capability.InterfaceDef<null>>, Error>;
|
|
3
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/capabilities/spotlight-dismiss/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEjD,eAAO,MAAM,gBAAgB,gKAA2E,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"spotlight-dismiss.d.ts","sourceRoot":"","sources":["../../../../../src/capabilities/spotlight-dismiss/spotlight-dismiss.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAExC,OAAO,EAAgB,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAoB/D,MAAM,MAAM,uBAAuB,GAAG;IACpC,iDAAiD;IACjD,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB,CAAC;AAEF;;;;GAIG;;AACH,wBA8CE"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { Capability } from '@dxos/app-framework';
|
|
2
|
-
export declare const State: Capability.LazyCapability<import("./state").SimpleLayoutStateOptions | undefined, [Capability.Capability<Capability.InterfaceDef<import("@effect-atom/atom/Atom").Writable<import("../../types").SimpleLayoutState, import("../../types").SimpleLayoutState>>>, Capability.Capability<Capability.InterfaceDef<import("@effect-atom/atom/Atom").Atom<Readonly<{
|
|
3
|
-
mode: string;
|
|
4
|
-
dialogOpen: boolean;
|
|
5
|
-
sidebarOpen: boolean;
|
|
6
|
-
complementarySidebarOpen: boolean;
|
|
7
|
-
workspace: string;
|
|
8
|
-
active: string[];
|
|
9
|
-
inactive: string[];
|
|
10
|
-
scrollIntoView: string | undefined;
|
|
11
|
-
}>>>>], Error>;
|
|
12
|
-
export type { SimpleLayoutStateOptions } from './state';
|
|
13
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/capabilities/state/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEjD,eAAO,MAAM,KAAK;;;;;;;;;cAAoD,CAAC;AAEvE,YAAY,EAAE,wBAAwB,EAAE,MAAM,SAAS,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"state.d.ts","sourceRoot":"","sources":["../../../../../src/capabilities/state/state.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAC/C,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAExC,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAIjD,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAarD,MAAM,MAAM,wBAAwB,GAAG;IACrC,YAAY,CAAC,EAAE,OAAO,CAAC,iBAAiB,CAAC,CAAC;CAC3C,CAAC;;;;;;;;;;;AAEF,wBAuBE"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/capabilities/url-handler/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEjD,eAAO,MAAM,UAAU,8FAA+D,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"url-handler.d.ts","sourceRoot":"","sources":["../../../../../src/capabilities/url-handler/url-handler.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAExC,OAAO,EAAgB,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAO/D;;;;;;GAMG;;AACH,wBAsFE"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"capabilities.d.ts","sourceRoot":"","sources":["../../../../src/types/capabilities.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAEpD,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAI5C,MAAM,MAAM,WAAW,GAAG,QAAQ,GAAG,MAAM,GAAG,UAAU,CAAC;AAGzD,MAAM,MAAM,iBAAiB,GAAG;IAC9B,qDAAqD;IACrD,OAAO,CAAC,EAAE,GAAG,CAAC;IAEd,iBAAiB,EAAE,MAAM,CAAC;IAC1B,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB,UAAU,EAAE,OAAO,CAAC;IACpB,UAAU,CAAC,EAAE,SAAS,GAAG,OAAO,CAAC;IACjC,gBAAgB,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,KAAK,CAAC;IAC9C,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,kBAAkB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IACzC,+CAA+C;IAC/C,aAAa,CAAC,EAAE,GAAG,CAAC;IAEpB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,WAAW,CAAC,EAAE,KAAK,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,CAAC;IAClD,cAAc,CAAC,EAAE,SAAS,GAAG,OAAO,CAAC;IACrC,aAAa,CAAC,EAAE,iBAAiB,CAAC;IAClC,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,WAAW,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC9B,YAAY,CAAC,EAAE,KAAK,CAAC;IACrB,cAAc,CAAC,EAAE,GAAG,CAAC;IAErB,2BAA2B;IAC3B,WAAW,EAAE,WAAW,CAAC;IAEzB,+DAA+D;IAC/D,OAAO,EAAE,MAAM,EAAE,CAAC;IAElB,4EAA4E;IAC5E,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB,8FAA8F;IAC9F,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B,CAAC;AAEF,eAAO,MAAM,iBAAiB,8EAAwE,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../../../src/types/events.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAK3D,yBAAiB,kBAAkB,CAAC;IAClC,wDAAwD;IACjD,MAAM,UAAU,EAAE,eAAe,CAAC,eAExC,CAAC;CACH"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
// Copyright 2025 DXOS.org
|
|
2
|
-
|
|
3
|
-
import { Capability } from '@dxos/app-framework';
|
|
4
|
-
import { OperationHandlerSet } from '@dxos/operation';
|
|
5
|
-
|
|
6
|
-
export const OperationHandler = Capability.lazy<OperationHandlerSet.OperationHandlerSet>(
|
|
7
|
-
'OperationHandler',
|
|
8
|
-
() => import('./operation-handler'),
|
|
9
|
-
);
|
|
@@ -1,145 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2025 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
import * as Effect from 'effect/Effect';
|
|
6
|
-
|
|
7
|
-
import { Capabilities, Capability } from '@dxos/app-framework';
|
|
8
|
-
import { LayoutOperation, fromUrlPath, getWorkspaceFromPath, toUrlPath } from '@dxos/app-toolkit';
|
|
9
|
-
import { log } from '@dxos/log';
|
|
10
|
-
import { isTauri } from '@dxos/util';
|
|
11
|
-
|
|
12
|
-
import { type SimpleLayoutState, SimpleLayoutState as SimpleLayoutStateCapability } from '../../types';
|
|
13
|
-
|
|
14
|
-
/**
|
|
15
|
-
* URL handler for simple layout that syncs browser URL with layout state.
|
|
16
|
-
* URL paths map directly to qualified graph IDs with the leading `root` segment stripped.
|
|
17
|
-
* Root is represented as `/`.
|
|
18
|
-
*
|
|
19
|
-
* On mobile Tauri, also listens for deep links via the deep-link plugin.
|
|
20
|
-
*/
|
|
21
|
-
export default Capability.makeModule(
|
|
22
|
-
Effect.fnUntraced(function* () {
|
|
23
|
-
const { invokePromise } = yield* Capability.get(Capabilities.OperationInvoker);
|
|
24
|
-
|
|
25
|
-
/**
|
|
26
|
-
* Handle navigation from a pathname.
|
|
27
|
-
* Restores the qualified graph ID and dispatches layout operations.
|
|
28
|
-
*/
|
|
29
|
-
const handlePathNavigation = (pathname: string) => {
|
|
30
|
-
if (isFilePath(pathname)) {
|
|
31
|
-
log.info('[UrlHandler] Skipping file path (not a graph node)', { pathname });
|
|
32
|
-
pathname = '/';
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
log.info('[UrlHandler] Navigating to path', { pathname });
|
|
36
|
-
|
|
37
|
-
const qualifiedId = fromUrlPath(pathname);
|
|
38
|
-
const workspace = getWorkspaceFromPath(qualifiedId);
|
|
39
|
-
|
|
40
|
-
void invokePromise(LayoutOperation.SwitchWorkspace, { subject: workspace });
|
|
41
|
-
|
|
42
|
-
const activeId = qualifiedId !== workspace ? qualifiedId : undefined;
|
|
43
|
-
if (activeId) {
|
|
44
|
-
void invokePromise(LayoutOperation.Open, { subject: [activeId] });
|
|
45
|
-
}
|
|
46
|
-
};
|
|
47
|
-
|
|
48
|
-
const onNavigation = handleNavigation(handlePathNavigation);
|
|
49
|
-
|
|
50
|
-
yield* Effect.sync(() => onNavigation());
|
|
51
|
-
window.addEventListener('popstate', onNavigation);
|
|
52
|
-
|
|
53
|
-
let unlistenDeepLink: (() => void) | undefined;
|
|
54
|
-
if (isTauri()) {
|
|
55
|
-
yield* Effect.tryPromise({
|
|
56
|
-
try: async () => {
|
|
57
|
-
const { getCurrent, onOpenUrl } = await import('@tauri-apps/plugin-deep-link');
|
|
58
|
-
|
|
59
|
-
const launchUrls = await getCurrent();
|
|
60
|
-
if (launchUrls && launchUrls.length > 0) {
|
|
61
|
-
log.info('[UrlHandler] App launched with deep links', { urls: launchUrls });
|
|
62
|
-
for (const url of launchUrls) {
|
|
63
|
-
handleDeepLink(url, handlePathNavigation);
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
unlistenDeepLink = await onOpenUrl((urls) => {
|
|
68
|
-
log.info('[UrlHandler] Deep links received', { urls });
|
|
69
|
-
for (const url of urls) {
|
|
70
|
-
handleDeepLink(url, handlePathNavigation);
|
|
71
|
-
}
|
|
72
|
-
});
|
|
73
|
-
|
|
74
|
-
log.info('[UrlHandler] Deep link listener initialized');
|
|
75
|
-
},
|
|
76
|
-
catch: (error) => {
|
|
77
|
-
log.warn('[UrlHandler] Failed to initialize deep link listener', { error });
|
|
78
|
-
return error;
|
|
79
|
-
},
|
|
80
|
-
}).pipe(Effect.catchAll(() => Effect.void));
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
let lastWorkspace: string | undefined;
|
|
84
|
-
let lastActive: string | undefined;
|
|
85
|
-
const unsubscribe = yield* Capabilities.subscribeAtom(SimpleLayoutStateCapability, (state: SimpleLayoutState) => {
|
|
86
|
-
const { workspace, active } = state;
|
|
87
|
-
|
|
88
|
-
if (workspace !== lastWorkspace || active !== lastActive) {
|
|
89
|
-
lastWorkspace = workspace;
|
|
90
|
-
lastActive = active;
|
|
91
|
-
|
|
92
|
-
const path = active ? toUrlPath(active) : toUrlPath(workspace);
|
|
93
|
-
if (window.location.pathname !== path) {
|
|
94
|
-
history.pushState(null, '', `${path}${window.location.search}`);
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
});
|
|
98
|
-
|
|
99
|
-
return Capability.contributes(Capabilities.Null, null, () =>
|
|
100
|
-
Effect.sync(() => {
|
|
101
|
-
window.removeEventListener('popstate', onNavigation);
|
|
102
|
-
unsubscribe();
|
|
103
|
-
unlistenDeepLink?.();
|
|
104
|
-
}),
|
|
105
|
-
);
|
|
106
|
-
}),
|
|
107
|
-
);
|
|
108
|
-
|
|
109
|
-
/**
|
|
110
|
-
* Check if a path is a special redirect path that shouldn't be navigated to.
|
|
111
|
-
* These paths are handled by other systems (e.g., OAuth).
|
|
112
|
-
*/
|
|
113
|
-
const isRedirectPath = (pathname: string): boolean => pathname.startsWith('/redirect/');
|
|
114
|
-
|
|
115
|
-
/**
|
|
116
|
-
* Paths with file extensions (e.g., `/iframe.html`) are not graph node paths.
|
|
117
|
-
* This guards against embedded contexts like Storybook iframes interpreting
|
|
118
|
-
* the host pathname as a navigation target.
|
|
119
|
-
*/
|
|
120
|
-
const isFilePath = (pathname: string): boolean => /\.[a-z]+$/i.test(pathname);
|
|
121
|
-
|
|
122
|
-
/**
|
|
123
|
-
* Returns a handler for navigation events (initial load and popstate) that navigates to current pathname.
|
|
124
|
-
*/
|
|
125
|
-
const handleNavigation =
|
|
126
|
-
(navigate: (pathname: string) => void): (() => void) =>
|
|
127
|
-
() =>
|
|
128
|
-
navigate(window.location.pathname);
|
|
129
|
-
|
|
130
|
-
/**
|
|
131
|
-
* Handle deep link URL from Tauri. Parses the URL and calls navigate unless it's a redirect path.
|
|
132
|
-
*/
|
|
133
|
-
const handleDeepLink = (urlString: string, navigate: (pathname: string) => void): void => {
|
|
134
|
-
log.info('[UrlHandler] Deep link received', { url: urlString });
|
|
135
|
-
try {
|
|
136
|
-
const url = new URL(urlString);
|
|
137
|
-
if (isRedirectPath(url.pathname)) {
|
|
138
|
-
log.info('[UrlHandler] Skipping redirect path (handled elsewhere)', { pathname: url.pathname });
|
|
139
|
-
return;
|
|
140
|
-
}
|
|
141
|
-
navigate(url.pathname);
|
|
142
|
-
} catch (error) {
|
|
143
|
-
log.warn('[UrlHandler] Failed to parse deep link URL', { urlString, error });
|
|
144
|
-
}
|
|
145
|
-
};
|
package/src/types/events.ts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2025 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
import { type ActivationEvent } from '@dxos/app-framework';
|
|
6
|
-
import { AppActivationEvents } from '@dxos/app-toolkit';
|
|
7
|
-
|
|
8
|
-
import { SimpleLayoutState } from './capabilities';
|
|
9
|
-
|
|
10
|
-
export namespace SimpleLayoutEvents {
|
|
11
|
-
/** Fired when SimpleLayoutState capability is ready. */
|
|
12
|
-
export const StateReady: ActivationEvent.ActivationEvent = AppActivationEvents.createStateEvent(
|
|
13
|
-
SimpleLayoutState.identifier,
|
|
14
|
-
);
|
|
15
|
-
}
|
|
File without changes
|
/package/dist/types/src/capabilities/{react-surface/react-surface.d.ts → react-surface.d.ts}
RENAMED
|
File without changes
|
|
File without changes
|