@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.
Files changed (294) hide show
  1. package/LICENSE +102 -5
  2. package/dist/lib/neutral/SimpleLayoutPlugin.mjs +52 -0
  3. package/dist/lib/neutral/SimpleLayoutPlugin.mjs.map +7 -0
  4. package/dist/lib/neutral/app-graph-builder-EYQKLRRP.mjs +21 -0
  5. package/dist/lib/neutral/app-graph-builder-EYQKLRRP.mjs.map +7 -0
  6. package/dist/lib/neutral/capabilities/index.mjs +21 -0
  7. package/dist/lib/neutral/capabilities/index.mjs.map +7 -0
  8. package/dist/lib/neutral/chunk-5LQGH5KW.mjs +20 -0
  9. package/dist/lib/neutral/chunk-5LQGH5KW.mjs.map +7 -0
  10. package/dist/lib/{browser/chunk-XJVW3PRY.mjs → neutral/chunk-7UDV3JDT.mjs} +4 -4
  11. package/dist/lib/neutral/chunk-7UDV3JDT.mjs.map +7 -0
  12. package/dist/lib/neutral/chunk-FD2CAY4Q.mjs +26 -0
  13. package/dist/lib/neutral/chunk-FD2CAY4Q.mjs.map +7 -0
  14. package/dist/lib/neutral/chunk-J5LGTIGS.mjs +10 -0
  15. package/dist/lib/neutral/chunk-J5LGTIGS.mjs.map +7 -0
  16. package/dist/lib/neutral/chunk-Y2QR5SYD.mjs +8 -0
  17. package/dist/lib/neutral/chunk-Y2QR5SYD.mjs.map +7 -0
  18. package/dist/lib/{browser/close-OT5JOGVY.mjs → neutral/close-WKMURGUB.mjs} +5 -4
  19. package/dist/lib/{node-esm/close-PEVHREL2.mjs.map → neutral/close-WKMURGUB.mjs.map} +1 -1
  20. package/dist/lib/{browser/chunk-J5FQ32AV.mjs → neutral/components/index.mjs} +261 -591
  21. package/dist/lib/neutral/components/index.mjs.map +7 -0
  22. package/dist/lib/neutral/hooks/index.mjs +332 -0
  23. package/dist/lib/neutral/hooks/index.mjs.map +7 -0
  24. package/dist/lib/neutral/index.mjs +14 -0
  25. package/dist/lib/neutral/index.mjs.map +7 -0
  26. package/dist/lib/neutral/meta.json +1 -0
  27. package/dist/lib/neutral/meta.mjs +8 -0
  28. package/dist/lib/neutral/meta.mjs.map +7 -0
  29. package/dist/lib/neutral/open-PEVXNVTV.mjs +51 -0
  30. package/dist/lib/neutral/open-PEVXNVTV.mjs.map +7 -0
  31. package/dist/lib/neutral/operation-handler-EAIE7KPR.mjs +13 -0
  32. package/dist/lib/neutral/operation-handler-EAIE7KPR.mjs.map +7 -0
  33. package/dist/lib/neutral/operations/index.mjs +8 -0
  34. package/dist/lib/neutral/operations/index.mjs.map +7 -0
  35. package/dist/lib/neutral/plugin.mjs +16 -0
  36. package/dist/lib/neutral/plugin.mjs.map +7 -0
  37. package/dist/lib/{browser/react-root-6KIGPLUT.mjs → neutral/react-root-VE265VX4.mjs} +5 -8
  38. package/dist/lib/neutral/react-root-VE265VX4.mjs.map +7 -0
  39. package/dist/lib/{node-esm/react-surface-WLKB6AET.mjs → neutral/react-surface-YHXOHJI7.mjs} +16 -15
  40. package/dist/lib/neutral/react-surface-YHXOHJI7.mjs.map +7 -0
  41. package/dist/lib/{browser/revert-workspace-DLE265AN.mjs → neutral/revert-workspace-ST6NZUNG.mjs} +5 -4
  42. package/dist/lib/{node-esm/revert-workspace-XZXT64YA.mjs.map → neutral/revert-workspace-ST6NZUNG.mjs.map} +1 -1
  43. package/dist/lib/{browser/set-52HGTSH4.mjs → neutral/set-6ZRLWPJS.mjs} +5 -4
  44. package/dist/lib/{node-esm/set-5I6LFH5L.mjs.map → neutral/set-6ZRLWPJS.mjs.map} +1 -1
  45. package/dist/lib/{browser/set-layout-mode-T6QI3DGU.mjs → neutral/set-layout-mode-L22HRCKS.mjs} +4 -2
  46. package/dist/lib/neutral/set-layout-mode-L22HRCKS.mjs.map +7 -0
  47. package/dist/lib/{browser/spotlight-dismiss-67PHYS5B.mjs → neutral/spotlight-dismiss-EIYW5E7M.mjs} +7 -15
  48. package/dist/lib/{node-esm/spotlight-dismiss-RMLRZUVY.mjs.map → neutral/spotlight-dismiss-EIYW5E7M.mjs.map} +3 -3
  49. package/dist/lib/{browser/state-TXSMUWYI.mjs → neutral/state-7NXKBLPY.mjs} +5 -6
  50. package/dist/lib/neutral/state-7NXKBLPY.mjs.map +7 -0
  51. package/dist/lib/{browser/switch-workspace-5Y6T4BWJ.mjs → neutral/switch-workspace-PYWPTMFO.mjs} +5 -4
  52. package/dist/lib/{node-esm/switch-workspace-PB6T2SGY.mjs.map → neutral/switch-workspace-PYWPTMFO.mjs.map} +1 -1
  53. package/dist/lib/neutral/translations.mjs +36 -0
  54. package/dist/lib/neutral/translations.mjs.map +7 -0
  55. package/dist/lib/neutral/types/index.mjs +10 -0
  56. package/dist/lib/neutral/types/index.mjs.map +7 -0
  57. package/dist/lib/{browser/update-complementary-MX3TTVAB.mjs → neutral/update-complementary-HKWF5OXT.mjs} +8 -6
  58. package/dist/lib/neutral/update-complementary-HKWF5OXT.mjs.map +7 -0
  59. package/dist/lib/{browser/update-dialog-FPAPZXKO.mjs → neutral/update-dialog-P4ASXCE7.mjs} +5 -4
  60. package/dist/lib/{node-esm/update-dialog-ID267DCL.mjs.map → neutral/update-dialog-P4ASXCE7.mjs.map} +1 -1
  61. package/dist/lib/{browser/update-popover-6V5ZTIYN.mjs → neutral/update-popover-REAKC2GN.mjs} +5 -4
  62. package/dist/lib/{node-esm/update-popover-RLHU2HF4.mjs.map → neutral/update-popover-REAKC2GN.mjs.map} +1 -1
  63. package/dist/lib/{browser/update-sidebar-WHDKYMV7.mjs → neutral/update-sidebar-O5SQPR6Q.mjs} +4 -2
  64. package/dist/lib/neutral/update-sidebar-O5SQPR6Q.mjs.map +7 -0
  65. package/dist/lib/{node-esm/url-handler-WMONO2T6.mjs → neutral/url-handler-GZXUUAHD.mjs} +45 -80
  66. package/dist/lib/neutral/url-handler-GZXUUAHD.mjs.map +7 -0
  67. package/dist/types/src/SimpleLayoutPlugin.d.ts +1 -0
  68. package/dist/types/src/SimpleLayoutPlugin.d.ts.map +1 -1
  69. package/dist/types/src/capabilities/app-graph-builder.d.ts +6 -0
  70. package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -0
  71. package/dist/types/src/capabilities/index.d.ts +21 -6
  72. package/dist/types/src/capabilities/index.d.ts.map +1 -1
  73. package/dist/types/src/capabilities/{operation-handler/operation-handler.d.ts → operation-handler.d.ts} +1 -1
  74. package/dist/types/src/capabilities/operation-handler.d.ts.map +1 -0
  75. package/dist/types/src/capabilities/react-root.d.ts.map +1 -0
  76. package/dist/types/src/capabilities/react-surface.d.ts.map +1 -0
  77. package/dist/types/src/capabilities/{spotlight-dismiss/spotlight-dismiss.d.ts → spotlight-dismiss.d.ts} +1 -1
  78. package/dist/types/src/capabilities/spotlight-dismiss.d.ts.map +1 -0
  79. package/dist/types/src/capabilities/{state/state.d.ts → state.d.ts} +3 -3
  80. package/dist/types/src/capabilities/state.d.ts.map +1 -0
  81. package/dist/types/src/capabilities/{url-handler/url-handler.d.ts → url-handler.d.ts} +1 -1
  82. package/dist/types/src/capabilities/url-handler.d.ts.map +1 -0
  83. package/dist/types/src/components/ContentError.stories.d.ts +21 -19
  84. package/dist/types/src/components/ContentError.stories.d.ts.map +1 -1
  85. package/dist/types/src/components/DebugOverlay/DebugOverlay.d.ts.map +1 -1
  86. package/dist/types/src/components/Dialog/Dialog.d.ts.map +1 -1
  87. package/dist/types/src/components/Home/Home.d.ts.map +1 -1
  88. package/dist/types/src/components/Loading/Loading.stories.d.ts.map +1 -1
  89. package/dist/types/src/components/MobileLayout/MobileLayout.d.ts +2 -2
  90. package/dist/types/src/components/MobileLayout/MobileLayout.d.ts.map +1 -1
  91. package/dist/types/src/components/MobileLayout/MobileLayout.stories.d.ts.map +1 -1
  92. package/dist/types/src/components/NavBranch/NavBranch.d.ts.map +1 -1
  93. package/dist/types/src/components/Popover/Popover.d.ts.map +1 -1
  94. package/dist/types/src/components/SimpleLayout/AppBar.d.ts +1 -5
  95. package/dist/types/src/components/SimpleLayout/AppBar.d.ts.map +1 -1
  96. package/dist/types/src/components/SimpleLayout/AppBar.stories.d.ts +21 -19
  97. package/dist/types/src/components/SimpleLayout/AppBar.stories.d.ts.map +1 -1
  98. package/dist/types/src/components/SimpleLayout/Drawer.d.ts +4 -7
  99. package/dist/types/src/components/SimpleLayout/Drawer.d.ts.map +1 -1
  100. package/dist/types/src/components/SimpleLayout/Main.d.ts +4 -7
  101. package/dist/types/src/components/SimpleLayout/Main.d.ts.map +1 -1
  102. package/dist/types/src/components/SimpleLayout/NavBar.d.ts +1 -5
  103. package/dist/types/src/components/SimpleLayout/NavBar.d.ts.map +1 -1
  104. package/dist/types/src/components/SimpleLayout/NavBar.stories.d.ts +22 -24
  105. package/dist/types/src/components/SimpleLayout/NavBar.stories.d.ts.map +1 -1
  106. package/dist/types/src/components/SimpleLayout/SimpleLayout.stories.d.ts +21 -19
  107. package/dist/types/src/components/SimpleLayout/SimpleLayout.stories.d.ts.map +1 -1
  108. package/dist/types/src/components/hooks.d.ts.map +1 -1
  109. package/dist/types/src/hooks/actions.d.ts +3 -3
  110. package/dist/types/src/hooks/actions.d.ts.map +1 -1
  111. package/dist/types/src/hooks/useAppBarProps.d.ts +2 -2
  112. package/dist/types/src/hooks/useAppBarProps.d.ts.map +1 -1
  113. package/dist/types/src/hooks/useCompanions.d.ts.map +1 -1
  114. package/dist/types/src/hooks/useDrawerActions.d.ts.map +1 -1
  115. package/dist/types/src/hooks/useSimpleLayoutState.d.ts +3 -3
  116. package/dist/types/src/hooks/useSimpleLayoutState.d.ts.map +1 -1
  117. package/dist/types/src/index.d.ts +2 -1
  118. package/dist/types/src/index.d.ts.map +1 -1
  119. package/dist/types/src/meta.d.ts.map +1 -1
  120. package/dist/types/src/operations/close.d.ts +1 -1
  121. package/dist/types/src/operations/close.d.ts.map +1 -1
  122. package/dist/types/src/operations/index.d.ts +1 -1
  123. package/dist/types/src/operations/index.d.ts.map +1 -1
  124. package/dist/types/src/operations/open.d.ts +1 -1
  125. package/dist/types/src/operations/open.d.ts.map +1 -1
  126. package/dist/types/src/operations/revert-workspace.d.ts +1 -1
  127. package/dist/types/src/operations/revert-workspace.d.ts.map +1 -1
  128. package/dist/types/src/operations/set-layout-mode.d.ts +1 -1
  129. package/dist/types/src/operations/set-layout-mode.d.ts.map +1 -1
  130. package/dist/types/src/operations/set.d.ts +1 -1
  131. package/dist/types/src/operations/set.d.ts.map +1 -1
  132. package/dist/types/src/operations/state-access.d.ts +3 -3
  133. package/dist/types/src/operations/state-access.d.ts.map +1 -1
  134. package/dist/types/src/operations/switch-workspace.d.ts +1 -1
  135. package/dist/types/src/operations/switch-workspace.d.ts.map +1 -1
  136. package/dist/types/src/operations/update-complementary.d.ts +1 -1
  137. package/dist/types/src/operations/update-complementary.d.ts.map +1 -1
  138. package/dist/types/src/operations/update-dialog.d.ts +1 -1
  139. package/dist/types/src/operations/update-dialog.d.ts.map +1 -1
  140. package/dist/types/src/operations/update-popover.d.ts +1 -1
  141. package/dist/types/src/operations/update-popover.d.ts.map +1 -1
  142. package/dist/types/src/operations/update-sidebar.d.ts +1 -1
  143. package/dist/types/src/operations/update-sidebar.d.ts.map +1 -1
  144. package/dist/types/src/plugin.d.ts +4 -0
  145. package/dist/types/src/plugin.d.ts.map +1 -0
  146. package/dist/types/src/translations.d.ts +21 -20
  147. package/dist/types/src/translations.d.ts.map +1 -1
  148. package/dist/types/src/types/{capabilities.d.ts → SimpleLayoutCapabilities.d.ts} +12 -10
  149. package/dist/types/src/types/SimpleLayoutCapabilities.d.ts.map +1 -0
  150. package/dist/types/src/types/SimpleLayoutEvents.d.ts +4 -0
  151. package/dist/types/src/types/SimpleLayoutEvents.d.ts.map +1 -0
  152. package/dist/types/src/types/index.d.ts +2 -2
  153. package/dist/types/src/types/index.d.ts.map +1 -1
  154. package/dist/types/tsconfig.tsbuildinfo +1 -1
  155. package/package.json +87 -33
  156. package/src/SimpleLayoutPlugin.ts +17 -6
  157. package/src/capabilities/app-graph-builder.ts +21 -0
  158. package/src/capabilities/index.ts +13 -6
  159. package/src/capabilities/{operation-handler/operation-handler.ts → operation-handler.ts} +2 -2
  160. package/src/capabilities/{react-root/react-root.tsx → react-root.tsx} +2 -2
  161. package/src/capabilities/{react-surface/react-surface.tsx → react-surface.tsx} +13 -6
  162. package/src/capabilities/{state/state.tsx → state.tsx} +5 -6
  163. package/src/capabilities/url-handler.ts +164 -0
  164. package/src/components/ContentError.stories.tsx +1 -1
  165. package/src/components/Dialog/Dialog.tsx +14 -3
  166. package/src/components/Home/Home.tsx +3 -2
  167. package/src/components/Loading/Loading.tsx +1 -1
  168. package/src/components/MobileLayout/MobileLayout.stories.tsx +13 -13
  169. package/src/components/MobileLayout/MobileLayout.tsx +0 -2
  170. package/src/components/NavBranch/NavBranch.tsx +4 -7
  171. package/src/components/Popover/Popover.tsx +10 -5
  172. package/src/components/SimpleLayout/AppBar.stories.tsx +7 -7
  173. package/src/components/SimpleLayout/AppBar.tsx +45 -42
  174. package/src/components/SimpleLayout/Drawer.tsx +24 -16
  175. package/src/components/SimpleLayout/Main.tsx +5 -5
  176. package/src/components/SimpleLayout/NavBar.stories.tsx +2 -2
  177. package/src/components/SimpleLayout/SimpleLayout.stories.tsx +10 -10
  178. package/src/components/SimpleLayout/SimpleLayout.tsx +9 -9
  179. package/src/components/hooks.ts +1 -1
  180. package/src/hooks/actions.ts +8 -5
  181. package/src/hooks/useAppBarProps.ts +4 -24
  182. package/src/hooks/useDrawerActions.ts +6 -6
  183. package/src/hooks/useNavbarActions.ts +4 -4
  184. package/src/hooks/useSimpleLayoutState.ts +7 -5
  185. package/src/index.ts +2 -1
  186. package/src/meta.ts +3 -1
  187. package/src/operations/close.ts +1 -1
  188. package/src/operations/index.ts +1 -1
  189. package/src/operations/open.ts +36 -3
  190. package/src/operations/revert-workspace.ts +1 -1
  191. package/src/operations/set-layout-mode.ts +1 -1
  192. package/src/operations/set.ts +1 -1
  193. package/src/operations/state-access.ts +5 -3
  194. package/src/operations/switch-workspace.ts +1 -1
  195. package/src/operations/update-complementary.ts +4 -3
  196. package/src/operations/update-dialog.ts +1 -1
  197. package/src/operations/update-popover.ts +1 -1
  198. package/src/operations/update-sidebar.ts +1 -1
  199. package/src/plugin.ts +11 -0
  200. package/src/translations.ts +20 -19
  201. package/src/types/{capabilities.ts → SimpleLayoutCapabilities.ts} +6 -18
  202. package/src/types/SimpleLayoutEvents.ts +15 -0
  203. package/src/types/index.ts +2 -2
  204. package/dist/lib/browser/chunk-J5FQ32AV.mjs.map +0 -7
  205. package/dist/lib/browser/chunk-MRR7PXSM.mjs +0 -29
  206. package/dist/lib/browser/chunk-MRR7PXSM.mjs.map +0 -7
  207. package/dist/lib/browser/chunk-XJVW3PRY.mjs.map +0 -7
  208. package/dist/lib/browser/close-OT5JOGVY.mjs.map +0 -7
  209. package/dist/lib/browser/index.mjs +0 -102
  210. package/dist/lib/browser/index.mjs.map +0 -7
  211. package/dist/lib/browser/meta.json +0 -1
  212. package/dist/lib/browser/open-4FQ44Z5G.mjs +0 -31
  213. package/dist/lib/browser/open-4FQ44Z5G.mjs.map +0 -7
  214. package/dist/lib/browser/operation-handler-OAD7LISD.mjs +0 -16
  215. package/dist/lib/browser/operation-handler-OAD7LISD.mjs.map +0 -7
  216. package/dist/lib/browser/react-root-6KIGPLUT.mjs.map +0 -7
  217. package/dist/lib/browser/react-surface-JLIEQGOL.mjs +0 -44
  218. package/dist/lib/browser/react-surface-JLIEQGOL.mjs.map +0 -7
  219. package/dist/lib/browser/revert-workspace-DLE265AN.mjs.map +0 -7
  220. package/dist/lib/browser/set-52HGTSH4.mjs.map +0 -7
  221. package/dist/lib/browser/set-layout-mode-T6QI3DGU.mjs.map +0 -7
  222. package/dist/lib/browser/spotlight-dismiss-67PHYS5B.mjs.map +0 -7
  223. package/dist/lib/browser/state-TXSMUWYI.mjs.map +0 -7
  224. package/dist/lib/browser/switch-workspace-5Y6T4BWJ.mjs.map +0 -7
  225. package/dist/lib/browser/update-complementary-MX3TTVAB.mjs.map +0 -7
  226. package/dist/lib/browser/update-dialog-FPAPZXKO.mjs.map +0 -7
  227. package/dist/lib/browser/update-popover-6V5ZTIYN.mjs.map +0 -7
  228. package/dist/lib/browser/update-sidebar-WHDKYMV7.mjs.map +0 -7
  229. package/dist/lib/browser/url-handler-GUJ3L7Y3.mjs +0 -163
  230. package/dist/lib/browser/url-handler-GUJ3L7Y3.mjs.map +0 -7
  231. package/dist/lib/node-esm/chunk-27K22G6S.mjs +0 -23
  232. package/dist/lib/node-esm/chunk-27K22G6S.mjs.map +0 -7
  233. package/dist/lib/node-esm/chunk-EXNDYZTP.mjs +0 -1257
  234. package/dist/lib/node-esm/chunk-EXNDYZTP.mjs.map +0 -7
  235. package/dist/lib/node-esm/chunk-WMNTJ2MK.mjs +0 -31
  236. package/dist/lib/node-esm/chunk-WMNTJ2MK.mjs.map +0 -7
  237. package/dist/lib/node-esm/close-PEVHREL2.mjs +0 -35
  238. package/dist/lib/node-esm/index.mjs +0 -103
  239. package/dist/lib/node-esm/index.mjs.map +0 -7
  240. package/dist/lib/node-esm/meta.json +0 -1
  241. package/dist/lib/node-esm/open-LMJY7JCJ.mjs +0 -32
  242. package/dist/lib/node-esm/open-LMJY7JCJ.mjs.map +0 -7
  243. package/dist/lib/node-esm/operation-handler-A2DC4WHC.mjs +0 -18
  244. package/dist/lib/node-esm/operation-handler-A2DC4WHC.mjs.map +0 -7
  245. package/dist/lib/node-esm/react-root-5SCW2KTH.mjs +0 -22
  246. package/dist/lib/node-esm/react-root-5SCW2KTH.mjs.map +0 -7
  247. package/dist/lib/node-esm/react-surface-WLKB6AET.mjs.map +0 -7
  248. package/dist/lib/node-esm/revert-workspace-XZXT64YA.mjs +0 -22
  249. package/dist/lib/node-esm/set-5I6LFH5L.mjs +0 -22
  250. package/dist/lib/node-esm/set-layout-mode-F5B6QLZM.mjs +0 -13
  251. package/dist/lib/node-esm/set-layout-mode-F5B6QLZM.mjs.map +0 -7
  252. package/dist/lib/node-esm/spotlight-dismiss-RMLRZUVY.mjs +0 -68
  253. package/dist/lib/node-esm/state-JMX6FAG4.mjs +0 -49
  254. package/dist/lib/node-esm/state-JMX6FAG4.mjs.map +0 -7
  255. package/dist/lib/node-esm/switch-workspace-PB6T2SGY.mjs +0 -25
  256. package/dist/lib/node-esm/update-complementary-FTW423IY.mjs +0 -32
  257. package/dist/lib/node-esm/update-complementary-FTW423IY.mjs.map +0 -7
  258. package/dist/lib/node-esm/update-dialog-ID267DCL.mjs +0 -30
  259. package/dist/lib/node-esm/update-popover-RLHU2HF4.mjs +0 -34
  260. package/dist/lib/node-esm/update-sidebar-BJ7HTNZ4.mjs +0 -12
  261. package/dist/lib/node-esm/update-sidebar-BJ7HTNZ4.mjs.map +0 -7
  262. package/dist/lib/node-esm/url-handler-WMONO2T6.mjs.map +0 -7
  263. package/dist/types/src/capabilities/operation-handler/index.d.ts +0 -4
  264. package/dist/types/src/capabilities/operation-handler/index.d.ts.map +0 -1
  265. package/dist/types/src/capabilities/operation-handler/operation-handler.d.ts.map +0 -1
  266. package/dist/types/src/capabilities/react-root/index.d.ts +0 -6
  267. package/dist/types/src/capabilities/react-root/index.d.ts.map +0 -1
  268. package/dist/types/src/capabilities/react-root/react-root.d.ts.map +0 -1
  269. package/dist/types/src/capabilities/react-surface/index.d.ts +0 -3
  270. package/dist/types/src/capabilities/react-surface/index.d.ts.map +0 -1
  271. package/dist/types/src/capabilities/react-surface/react-surface.d.ts.map +0 -1
  272. package/dist/types/src/capabilities/spotlight-dismiss/index.d.ts +0 -3
  273. package/dist/types/src/capabilities/spotlight-dismiss/index.d.ts.map +0 -1
  274. package/dist/types/src/capabilities/spotlight-dismiss/spotlight-dismiss.d.ts.map +0 -1
  275. package/dist/types/src/capabilities/state/index.d.ts +0 -13
  276. package/dist/types/src/capabilities/state/index.d.ts.map +0 -1
  277. package/dist/types/src/capabilities/state/state.d.ts.map +0 -1
  278. package/dist/types/src/capabilities/url-handler/index.d.ts +0 -3
  279. package/dist/types/src/capabilities/url-handler/index.d.ts.map +0 -1
  280. package/dist/types/src/capabilities/url-handler/url-handler.d.ts.map +0 -1
  281. package/dist/types/src/types/capabilities.d.ts.map +0 -1
  282. package/dist/types/src/types/events.d.ts +0 -6
  283. package/dist/types/src/types/events.d.ts.map +0 -1
  284. package/src/capabilities/operation-handler/index.ts +0 -9
  285. package/src/capabilities/react-root/index.ts +0 -7
  286. package/src/capabilities/react-surface/index.ts +0 -7
  287. package/src/capabilities/spotlight-dismiss/index.ts +0 -7
  288. package/src/capabilities/state/index.ts +0 -9
  289. package/src/capabilities/url-handler/index.ts +0 -7
  290. package/src/capabilities/url-handler/url-handler.ts +0 -145
  291. package/src/types/events.ts +0 -15
  292. /package/dist/types/src/capabilities/{react-root/react-root.d.ts → react-root.d.ts} +0 -0
  293. /package/dist/types/src/capabilities/{react-surface/react-surface.d.ts → react-surface.d.ts} +0 -0
  294. /package/src/capabilities/{spotlight-dismiss/spotlight-dismiss.ts → spotlight-dismiss.ts} +0 -0
@@ -1,9 +1,11 @@
1
- // src/capabilities/spotlight-dismiss/spotlight-dismiss.ts
1
+ import "./chunk-J5LGTIGS.mjs";
2
+
3
+ // src/capabilities/spotlight-dismiss.ts
2
4
  import * as Effect from "effect/Effect";
3
5
  import { Capabilities, Capability } from "@dxos/app-framework";
4
6
  import { log } from "@dxos/log";
5
7
  import { isTauri } from "@dxos/util";
6
- var __dxlog_file = "/__w/dxos/dxos/packages/plugins/plugin-simple-layout/src/capabilities/spotlight-dismiss/spotlight-dismiss.ts";
8
+ var __dxlog_file = "/__w/dxos/dxos/packages/plugins/plugin-simple-layout/src/capabilities/spotlight-dismiss.ts";
7
9
  var getTauriWindow = () => {
8
10
  const tauri = globalThis.__TAURI__;
9
11
  return tauri?.window;
@@ -29,12 +31,7 @@ var spotlight_dismiss_default = Capability.makeModule(({ isPopover = false } = {
29
31
  });
30
32
  }
31
33
  } catch (err) {
32
- log.catch(err, void 0, {
33
- F: __dxlog_file,
34
- L: 60,
35
- S: void 0,
36
- C: (f, a) => f(...a)
37
- });
34
+ log.catch(err, void 0, { "~LogMeta": "~LogMeta", F: __dxlog_file, L: 44, S: void 0 });
38
35
  }
39
36
  const handleKeyDown = async (event) => {
40
37
  if (event.key === "Escape") {
@@ -45,12 +42,7 @@ var spotlight_dismiss_default = Capability.makeModule(({ isPopover = false } = {
45
42
  await tauriCore.invoke("hide_spotlight");
46
43
  }
47
44
  } catch (err) {
48
- log.catch(err, void 0, {
49
- F: __dxlog_file,
50
- L: 73,
51
- S: void 0,
52
- C: (f, a) => f(...a)
53
- });
45
+ log.catch(err, void 0, { "~LogMeta": "~LogMeta", F: __dxlog_file, L: 56, S: void 0 });
54
46
  }
55
47
  }
56
48
  };
@@ -63,4 +55,4 @@ var spotlight_dismiss_default = Capability.makeModule(({ isPopover = false } = {
63
55
  export {
64
56
  spotlight_dismiss_default as default
65
57
  };
66
- //# sourceMappingURL=spotlight-dismiss-67PHYS5B.mjs.map
58
+ //# sourceMappingURL=spotlight-dismiss-EIYW5E7M.mjs.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../../src/capabilities/spotlight-dismiss/spotlight-dismiss.ts"],
3
+ "sources": ["../../../src/capabilities/spotlight-dismiss.ts"],
4
4
  "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\n// Based on the frontend-driven dismiss pattern from:\n// https://github.com/Jedliu/tauri-template-demo\n\nimport * as Effect from 'effect/Effect';\n\nimport { Capabilities, Capability } from '@dxos/app-framework';\nimport { log } from '@dxos/log';\nimport { isTauri } from '@dxos/util';\n\n/**\n * Get the Tauri window API from the global object.\n */\nconst getTauriWindow = (): any => {\n const tauri = (globalThis as any).__TAURI__;\n return tauri?.window;\n};\n\n/**\n * Get the Tauri core API (invoke) from the global object.\n */\nconst getTauriCore = (): any => {\n const tauri = (globalThis as any).__TAURI__;\n return tauri?.core;\n};\n\nexport type SpotlightDismissOptions = {\n /** Whether running in popover window context. */\n isPopover?: boolean;\n};\n\n/**\n * Capability that sets up spotlight panel dismiss behavior.\n * When running in Tauri popover mode, listens for focus loss and Escape key\n * to dismiss the spotlight panel. Runs at startup before React renders.\n */\nexport default Capability.makeModule(({ isPopover = false }: SpotlightDismissOptions = {}) =>\n Effect.promise(async () => {\n if (!isPopover || !isTauri()) {\n return [];\n }\n\n // Set up focus listener.\n let focusCleanup: (() => void) | undefined;\n try {\n const tauriWindow = getTauriWindow();\n const tauriCore = getTauriCore();\n if (tauriWindow && tauriCore) {\n const win = tauriWindow.getCurrentWindow();\n focusCleanup = await win.onFocusChanged(async ({ payload }: { payload: boolean }) => {\n if (!payload) {\n await tauriCore.invoke('hide_spotlight');\n }\n });\n }\n } catch (err) {\n log.catch(err);\n }\n\n // Set up Escape key listener.\n const handleKeyDown = async (event: KeyboardEvent) => {\n if (event.key === 'Escape') {\n event.preventDefault();\n try {\n const tauriCore = getTauriCore();\n if (tauriCore) {\n await tauriCore.invoke('hide_spotlight');\n }\n } catch (err) {\n log.catch(err);\n }\n }\n };\n window.addEventListener('keydown', handleKeyDown);\n\n return Capability.contributes(Capabilities.Null, null, () =>\n Effect.sync(() => {\n focusCleanup?.();\n window.removeEventListener('keydown', handleKeyDown);\n }),\n );\n }),\n);\n"],
5
- "mappings": ";;;AAOA,YAAYA,YAAY;AAExB,SAASC,cAAcC,kBAAkB;AACzC,SAASC,WAAW;AACpB,SAASC,eAAe;;AAKxB,IAAMC,iBAAiB,MAAA;AACrB,QAAMC,QAASC,WAAmBC;AAClC,SAAOF,OAAOG;AAChB;AAKA,IAAMC,eAAe,MAAA;AACnB,QAAMJ,QAASC,WAAmBC;AAClC,SAAOF,OAAOK;AAChB;AAYA,IAAA,4BAAeT,WAAWU,WAAW,CAAC,EAAEC,YAAY,MAAK,IAA8B,CAAC,MAC/EC,eAAQ,YAAA;AACb,MAAI,CAACD,aAAa,CAACT,QAAAA,GAAW;AAC5B,WAAO,CAAA;EACT;AAGA,MAAIW;AACJ,MAAI;AACF,UAAMC,cAAcX,eAAAA;AACpB,UAAMY,YAAYP,aAAAA;AAClB,QAAIM,eAAeC,WAAW;AAC5B,YAAMC,MAAMF,YAAYG,iBAAgB;AACxCJ,qBAAe,MAAMG,IAAIE,eAAe,OAAO,EAAEC,QAAO,MAAwB;AAC9E,YAAI,CAACA,SAAS;AACZ,gBAAMJ,UAAUK,OAAO,gBAAA;QACzB;MACF,CAAA;IACF;EACF,SAASC,KAAK;AACZpB,QAAIqB,MAAMD,KAAAA,QAAAA;;;;;;EACZ;AAGA,QAAME,gBAAgB,OAAOC,UAAAA;AAC3B,QAAIA,MAAMC,QAAQ,UAAU;AAC1BD,YAAME,eAAc;AACpB,UAAI;AACF,cAAMX,YAAYP,aAAAA;AAClB,YAAIO,WAAW;AACb,gBAAMA,UAAUK,OAAO,gBAAA;QACzB;MACF,SAASC,KAAK;AACZpB,YAAIqB,MAAMD,KAAAA,QAAAA;;;;;;MACZ;IACF;EACF;AACAd,SAAOoB,iBAAiB,WAAWJ,aAAAA;AAEnC,SAAOvB,WAAW4B,YAAY7B,aAAa8B,MAAM,MAAM,MAC9CC,YAAK,MAAA;AACVjB,mBAAAA;AACAN,WAAOwB,oBAAoB,WAAWR,aAAAA;EACxC,CAAA,CAAA;AAEJ,CAAA,CAAA;",
6
- "names": ["Effect", "Capabilities", "Capability", "log", "isTauri", "getTauriWindow", "tauri", "globalThis", "__TAURI__", "window", "getTauriCore", "core", "makeModule", "isPopover", "promise", "focusCleanup", "tauriWindow", "tauriCore", "win", "getCurrentWindow", "onFocusChanged", "payload", "invoke", "err", "catch", "handleKeyDown", "event", "key", "preventDefault", "addEventListener", "contributes", "Null", "sync", "removeEventListener"]
5
+ "mappings": ";;;AAOA,YAAYA,YAAY;AAExB,SAASC,cAAcC,kBAAkB;AACzC,SAASC,WAAW;AACpB,SAASC,eAAe;AAExB,IAAA,eAAA;AAKE,IAAA,iBAAcC,MAAAA;AAChB,QAAA,QAAA,WAAA;AAEA,SAAA,OAAA;;AAKE,IAAA,eAAcC,MAAAA;AAChB,QAAA,QAAA,WAAA;AAOA,SAAA,OAAA;;gCAQa,WAAE,WAAA,CAAA,EAAA,YAAA,MAAA,IAAA,CAAA,MAAA,eAAA,YAAA;AACX,MAAA,CAAA,aAAA,CAAA,QAAA,GAAA;AAEA,WAAA,CAAA;EACA;MAEE;MACA;AACA,UAAIC,cAAeC,eAAW;UAC5B,YAAYD,aAAYE;QACxBC,eAAe,WAAUC;YACvB,MAAKC,YAAS,iBAAA;qBACNJ,MAAAA,IAAUK,eAAO,OAAA,EAAA,QAAA,MAAA;AACzB,YAAA,CAAA,SAAA;AACF,gBAAA,UAAA,OAAA,gBAAA;QACF;MACA,CAAOC;IACPX;EACF,SAAA,KAAA;AAEA,QAAA,MAAA,KAAA,QAAA,EAAA,YAA8B,YAAA,GAAA,cAAA,GAAA,IAAA,GAAA,OAAA,CAAA;EAC9B;wBAEUY,OAAc,UAAA;QACpB,MAAI,QAAA,UAAA;YACF,eAAMP;UACN;cACE,YAAMA,aAAiB;AACzB,YAAA,WAAA;AACA,gBAAY,UAAA,OAAA,gBAAA;QACZL;MACF,SAAA,KAAA;AACF,YAAA,MAAA,KAAA,QAAA,EAAA,YAAA,YAAA,GAAA,cAAA,GAAA,IAAA,GAAA,OAAA,CAAA;MACF;IACAE;EAEA;0BAEIK,WAAAA,aAAAA;oBACOM,YAAAA,aAAoB,MAAWC,MAAAA,MAAAA,YAAAA,MAAAA;AACxC,mBAAA;AAGJ,WAAA,oBAAA,WAAA,aAAA;;;",
6
+ "names": ["Effect", "Capabilities", "Capability", "log", "isTauri", "window", "core", "tauriWindow", "tauriCore", "getCurrentWindow", "focusCleanup", "onFocusChanged", "payload", "invoke", "err", "preventDefault", "removeEventListener", "handleKeyDown"]
7
7
  }
@@ -1,13 +1,12 @@
1
- import {
2
- SimpleLayoutState
3
- } from "./chunk-MRR7PXSM.mjs";
1
+ import "./chunk-J5LGTIGS.mjs";
4
2
 
5
- // src/capabilities/state/state.tsx
3
+ // src/capabilities/state.tsx
6
4
  import { Atom } from "@effect-atom/atom-react";
7
5
  import * as Effect from "effect/Effect";
8
6
  import { Capability } from "@dxos/app-framework";
9
7
  import { AppCapabilities } from "@dxos/app-toolkit";
10
8
  import { Node } from "@dxos/plugin-graph";
9
+ import { SimpleLayoutCapabilities } from "#types";
11
10
  var defaultState = {
12
11
  dialogOpen: false,
13
12
  workspace: Node.RootId,
@@ -38,11 +37,11 @@ var state_default = Capability.makeModule(({ initialState } = {}) => Effect.sync
38
37
  };
39
38
  });
40
39
  return [
41
- Capability.contributes(SimpleLayoutState, stateAtom),
40
+ Capability.contributes(SimpleLayoutCapabilities.State, stateAtom),
42
41
  Capability.contributes(AppCapabilities.Layout, layoutAtom)
43
42
  ];
44
43
  }));
45
44
  export {
46
45
  state_default as default
47
46
  };
48
- //# sourceMappingURL=state-TXSMUWYI.mjs.map
47
+ //# sourceMappingURL=state-7NXKBLPY.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/capabilities/state.tsx"],
4
+ "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { Atom } from '@effect-atom/atom-react';\nimport * as Effect from 'effect/Effect';\n\nimport { Capability } from '@dxos/app-framework';\nimport { AppCapabilities } from '@dxos/app-toolkit';\nimport { Node } from '@dxos/plugin-graph';\n\nimport { SimpleLayoutCapabilities } from '#types';\n\nconst defaultState: SimpleLayoutCapabilities.SimpleLayoutState = {\n dialogOpen: false,\n workspace: Node.RootId,\n previousWorkspace: Node.RootId,\n history: [],\n isPopover: false,\n companionVariant: undefined,\n drawerState: 'closed',\n};\n\nexport type SimpleLayoutStateOptions = {\n initialState?: Partial<SimpleLayoutCapabilities.SimpleLayoutState>;\n};\n\nexport default Capability.makeModule(({ initialState }: SimpleLayoutStateOptions = {}) =>\n Effect.sync(() => {\n const stateAtom = Atom.make<SimpleLayoutCapabilities.SimpleLayoutState>({ ...defaultState, ...initialState });\n\n const layoutAtom = Atom.make((get): AppCapabilities.Layout => {\n const state = get(stateAtom);\n return {\n mode: 'simple',\n dialogOpen: state.dialogOpen,\n sidebarOpen: false,\n complementarySidebarOpen: false,\n workspace: state.workspace,\n active: state.active ? [state.active] : [],\n inactive: [],\n scrollIntoView: undefined,\n };\n });\n\n return [\n Capability.contributes(SimpleLayoutCapabilities.State, stateAtom),\n Capability.contributes(AppCapabilities.Layout, layoutAtom),\n ];\n }),\n);\n"],
5
+ "mappings": ";;;AAIA,SAASA,YAAY;AACrB,YAAYC,YAAY;AAExB,SAASC,kBAAkB;AAC3B,SAASC,uBAAuB;AAChC,SAASC,YAAY;AAErB,SAASC,gCAAgC;AAEzC,IAAMC,eAA2D;EAC/DC,YAAY;EACZC,WAAWJ,KAAKK;EAChBC,mBAAmBN,KAAKK;EACxBE,SAAS,CAAA;EACTC,WAAW;EACXC,kBAAkBC;EAClBC,aAAa;AACf;AAMA,IAAA,gBAAeb,WAAWc,WAAW,CAAC,EAAEC,aAAY,IAA+B,CAAC,MAC3EC,YAAK,MAAA;AACV,QAAMC,YAAYnB,KAAKoB,KAAiD;IAAE,GAAGd;IAAc,GAAGW;EAAa,CAAA;AAE3G,QAAMI,aAAarB,KAAKoB,KAAK,CAACE,QAAAA;AAC5B,UAAMC,QAAQD,IAAIH,SAAAA;AAClB,WAAO;MACLK,MAAM;MACNjB,YAAYgB,MAAMhB;MAClBkB,aAAa;MACbC,0BAA0B;MAC1BlB,WAAWe,MAAMf;MACjBmB,QAAQJ,MAAMI,SAAS;QAACJ,MAAMI;UAAU,CAAA;MACxCC,UAAU,CAAA;MACVC,gBAAgBf;IAClB;EACF,CAAA;AAEA,SAAO;IACLZ,WAAW4B,YAAYzB,yBAAyB0B,OAAOZ,SAAAA;IACvDjB,WAAW4B,YAAY3B,gBAAgB6B,QAAQX,UAAAA;;AAEnD,CAAA,CAAA;",
6
+ "names": ["Atom", "Effect", "Capability", "AppCapabilities", "Node", "SimpleLayoutCapabilities", "defaultState", "dialogOpen", "workspace", "RootId", "previousWorkspace", "history", "isPopover", "companionVariant", "undefined", "drawerState", "makeModule", "initialState", "sync", "stateAtom", "make", "layoutAtom", "get", "state", "mode", "sidebarOpen", "complementarySidebarOpen", "active", "inactive", "scrollIntoView", "contributes", "State", "Layout"]
7
+ }
@@ -1,12 +1,13 @@
1
1
  import {
2
2
  layoutStateAccess
3
- } from "./chunk-XJVW3PRY.mjs";
4
- import "./chunk-MRR7PXSM.mjs";
3
+ } from "./chunk-7UDV3JDT.mjs";
4
+ import "./chunk-FD2CAY4Q.mjs";
5
+ import "./chunk-J5LGTIGS.mjs";
5
6
 
6
7
  // src/operations/switch-workspace.ts
7
8
  import * as Effect from "effect/Effect";
8
9
  import { isPinnedWorkspace, LayoutOperation } from "@dxos/app-toolkit";
9
- import { Operation } from "@dxos/operation";
10
+ import { Operation } from "@dxos/compute";
10
11
  var handler = LayoutOperation.SwitchWorkspace.pipe(Operation.withHandler(Effect.fnUntraced(function* (input) {
11
12
  const { updateState } = yield* layoutStateAccess;
12
13
  updateState((state) => ({
@@ -21,4 +22,4 @@ var switch_workspace_default = handler;
21
22
  export {
22
23
  switch_workspace_default as default
23
24
  };
24
- //# sourceMappingURL=switch-workspace-5Y6T4BWJ.mjs.map
25
+ //# sourceMappingURL=switch-workspace-PYWPTMFO.mjs.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/operations/switch-workspace.ts"],
4
- "sourcesContent": ["// Copyright 2025 DXOS.org\n\nimport * as Effect from 'effect/Effect';\n\nimport { isPinnedWorkspace, LayoutOperation } from '@dxos/app-toolkit';\nimport { Operation } from '@dxos/operation';\n\nimport { layoutStateAccess } from './state-access';\n\nconst handler: Operation.WithHandler<typeof LayoutOperation.SwitchWorkspace> = LayoutOperation.SwitchWorkspace.pipe(\n Operation.withHandler(\n Effect.fnUntraced(function* (input) {\n const { updateState } = yield* layoutStateAccess;\n\n updateState((state) => ({\n ...state,\n previousWorkspace: !isPinnedWorkspace(state.workspace) ? state.workspace : state.previousWorkspace,\n workspace: input.subject,\n active: undefined,\n history: [],\n }));\n }),\n ),\n);\n\nexport default handler;\n"],
4
+ "sourcesContent": ["// Copyright 2025 DXOS.org\n\nimport * as Effect from 'effect/Effect';\n\nimport { isPinnedWorkspace, LayoutOperation } from '@dxos/app-toolkit';\nimport { Operation } from '@dxos/compute';\n\nimport { layoutStateAccess } from './state-access';\n\nconst handler: Operation.WithHandler<typeof LayoutOperation.SwitchWorkspace> = LayoutOperation.SwitchWorkspace.pipe(\n Operation.withHandler(\n Effect.fnUntraced(function* (input) {\n const { updateState } = yield* layoutStateAccess;\n\n updateState((state) => ({\n ...state,\n previousWorkspace: !isPinnedWorkspace(state.workspace) ? state.workspace : state.previousWorkspace,\n workspace: input.subject,\n active: undefined,\n history: [],\n }));\n }),\n ),\n);\n\nexport default handler;\n"],
5
5
  "mappings": ";;;;;;;AAEA,YAAYA,YAAY;AAExB,SAASC,mBAAmBC,uBAAuB;AACnD,SAASC,iBAAiB;AAI1B,IAAMC,UAAyEC,gBAAgBC,gBAAgBC,KAC7GC,UAAUC,YACDC,kBAAW,WAAWC,OAAK;AAChC,QAAM,EAAEC,YAAW,IAAK,OAAOC;AAE/BD,cAAY,CAACE,WAAW;IACtB,GAAGA;IACHC,mBAAmB,CAACC,kBAAkBF,MAAMG,SAAS,IAAIH,MAAMG,YAAYH,MAAMC;IACjFE,WAAWN,MAAMO;IACjBC,QAAQC;IACRC,SAAS,CAAA;EACX,EAAA;AACF,CAAA,CAAA,CAAA;AAIJ,IAAA,2BAAejB;",
6
6
  "names": ["Effect", "isPinnedWorkspace", "LayoutOperation", "Operation", "handler", "LayoutOperation", "SwitchWorkspace", "pipe", "Operation", "withHandler", "fnUntraced", "input", "updateState", "layoutStateAccess", "state", "previousWorkspace", "isPinnedWorkspace", "workspace", "subject", "active", "undefined", "history"]
7
7
  }
@@ -0,0 +1,36 @@
1
+ import "./chunk-J5LGTIGS.mjs";
2
+
3
+ // src/translations.ts
4
+ import { translations as searchTranslations } from "@dxos/react-ui-search/translations";
5
+ import { meta } from "#meta";
6
+ var translations = [
7
+ ...searchTranslations,
8
+ {
9
+ "en-US": {
10
+ [meta.id]: {
11
+ "plugin.name": "Simple layout",
12
+ "settings.title": "Simple layout settings",
13
+ "workspaces.heading": "Workspaces",
14
+ "settings.heading": "Settings",
15
+ "back.label": "Back",
16
+ "browse.label": "Browse",
17
+ "notifications.label": "Notifications",
18
+ "profile.label": "Profile",
19
+ "app-menu.label": "App menu",
20
+ "main-menu.label": "Main menu",
21
+ "companions-menu.label": "Companions",
22
+ "error-fallback.message": "An error occurred",
23
+ "drawer.label": "Drawer",
24
+ "close-drawer.label": "Close drawer",
25
+ "expand-drawer.label": "Expand drawer",
26
+ "collapse-drawer.label": "Collapse drawer",
27
+ "actions-menu.label": "Actions",
28
+ "done.label": "Done"
29
+ }
30
+ }
31
+ }
32
+ ];
33
+ export {
34
+ translations
35
+ };
36
+ //# sourceMappingURL=translations.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/translations.ts"],
4
+ "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { type Resource } from '@dxos/react-ui';\nimport { translations as searchTranslations } from '@dxos/react-ui-search/translations';\n\nimport { meta } from '#meta';\n\nexport const translations = [\n ...searchTranslations,\n {\n 'en-US': {\n [meta.id]: {\n 'plugin.name': 'Simple layout',\n 'settings.title': 'Simple layout settings',\n 'workspaces.heading': 'Workspaces',\n 'settings.heading': 'Settings',\n 'back.label': 'Back',\n 'browse.label': 'Browse',\n 'notifications.label': 'Notifications',\n 'profile.label': 'Profile',\n 'app-menu.label': 'App menu',\n 'main-menu.label': 'Main menu',\n 'companions-menu.label': 'Companions',\n 'error-fallback.message': 'An error occurred',\n 'drawer.label': 'Drawer',\n 'close-drawer.label': 'Close drawer',\n 'expand-drawer.label': 'Expand drawer',\n 'collapse-drawer.label': 'Collapse drawer',\n 'actions-menu.label': 'Actions',\n 'done.label': 'Done',\n },\n },\n },\n] as const satisfies Resource[];\n"],
5
+ "mappings": ";;;AAKA,SAASA,gBAAgBC,0BAA0B;AAEnD,SAASC,YAAY;AAEd,IAAMF,eAAe;KACvBC;EACH;IACE,SAAS;MACP,CAACC,KAAKC,EAAE,GAAG;QACT,eAAe;QACf,kBAAkB;QAClB,sBAAsB;QACtB,oBAAoB;QACpB,cAAc;QACd,gBAAgB;QAChB,uBAAuB;QACvB,iBAAiB;QACjB,kBAAkB;QAClB,mBAAmB;QACnB,yBAAyB;QACzB,0BAA0B;QAC1B,gBAAgB;QAChB,sBAAsB;QACtB,uBAAuB;QACvB,yBAAyB;QACzB,sBAAsB;QACtB,cAAc;MAChB;IACF;EACF;;",
6
+ "names": ["translations", "searchTranslations", "meta", "id"]
7
+ }
@@ -0,0 +1,10 @@
1
+ import {
2
+ SimpleLayoutCapabilities_exports,
3
+ SimpleLayoutEvents_exports
4
+ } from "../chunk-FD2CAY4Q.mjs";
5
+ import "../chunk-J5LGTIGS.mjs";
6
+ export {
7
+ SimpleLayoutCapabilities_exports as SimpleLayoutCapabilities,
8
+ SimpleLayoutEvents_exports as SimpleLayoutEvents
9
+ };
10
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": [],
4
+ "sourcesContent": [],
5
+ "mappings": "",
6
+ "names": []
7
+ }
@@ -1,12 +1,14 @@
1
1
  import {
2
2
  layoutStateAccess
3
- } from "./chunk-XJVW3PRY.mjs";
4
- import "./chunk-MRR7PXSM.mjs";
3
+ } from "./chunk-7UDV3JDT.mjs";
4
+ import "./chunk-FD2CAY4Q.mjs";
5
+ import "./chunk-J5LGTIGS.mjs";
5
6
 
6
7
  // src/operations/update-complementary.ts
7
8
  import * as Effect from "effect/Effect";
8
- import { getCompanionVariant, LayoutOperation } from "@dxos/app-toolkit";
9
- import { Operation } from "@dxos/operation";
9
+ import { LayoutOperation } from "@dxos/app-toolkit";
10
+ import { Operation } from "@dxos/compute";
11
+ import { getLinkedVariant } from "@dxos/react-ui-attention";
10
12
  var handler = LayoutOperation.UpdateComplementary.pipe(Operation.withHandler(Effect.fnUntraced(function* (input) {
11
13
  const { updateState } = yield* layoutStateAccess;
12
14
  if (input.state === "closed") {
@@ -16,7 +18,7 @@ var handler = LayoutOperation.UpdateComplementary.pipe(Operation.withHandler(Eff
16
18
  companionVariant: void 0
17
19
  }));
18
20
  } else if (input.subject) {
19
- const variant = getCompanionVariant(input.subject);
21
+ const variant = getLinkedVariant(input.subject);
20
22
  updateState((state) => ({
21
23
  ...state,
22
24
  companionVariant: variant,
@@ -28,4 +30,4 @@ var update_complementary_default = handler;
28
30
  export {
29
31
  update_complementary_default as default
30
32
  };
31
- //# sourceMappingURL=update-complementary-MX3TTVAB.mjs.map
33
+ //# sourceMappingURL=update-complementary-HKWF5OXT.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/operations/update-complementary.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/compute';\nimport { getLinkedVariant } from '@dxos/react-ui-attention';\n\nimport { layoutStateAccess } from './state-access';\n\nconst handler: Operation.WithHandler<typeof LayoutOperation.UpdateComplementary> =\n LayoutOperation.UpdateComplementary.pipe(\n Operation.withHandler(\n Effect.fnUntraced(function* (input) {\n const { updateState } = yield* layoutStateAccess;\n\n if (input.state === 'closed') {\n updateState((state) => ({\n ...state,\n drawerState: 'closed',\n companionVariant: undefined,\n }));\n } else if (input.subject) {\n const variant = getLinkedVariant(input.subject);\n updateState((state) => ({\n ...state,\n companionVariant: variant,\n drawerState: input.state === 'expanded' ? 'expanded' : 'open',\n }));\n }\n }),\n ),\n );\n\nexport default handler;\n"],
5
+ "mappings": ";;;;;;;AAEA,YAAYA,YAAY;AAExB,SAASC,uBAAuB;AAChC,SAASC,iBAAiB;AAC1B,SAASC,wBAAwB;AAIjC,IAAMC,UACJC,gBAAgBC,oBAAoBC,KAClCC,UAAUC,YACDC,kBAAW,WAAWC,OAAK;AAChC,QAAM,EAAEC,YAAW,IAAK,OAAOC;AAE/B,MAAIF,MAAMG,UAAU,UAAU;AAC5BF,gBAAY,CAACE,WAAW;MACtB,GAAGA;MACHC,aAAa;MACbC,kBAAkBC;IACpB,EAAA;EACF,WAAWN,MAAMO,SAAS;AACxB,UAAMC,UAAUC,iBAAiBT,MAAMO,OAAO;AAC9CN,gBAAY,CAACE,WAAW;MACtB,GAAGA;MACHE,kBAAkBG;MAClBJ,aAAaJ,MAAMG,UAAU,aAAa,aAAa;IACzD,EAAA;EACF;AACF,CAAA,CAAA,CAAA;AAIN,IAAA,+BAAeV;",
6
+ "names": ["Effect", "LayoutOperation", "Operation", "getLinkedVariant", "handler", "LayoutOperation", "UpdateComplementary", "pipe", "Operation", "withHandler", "fnUntraced", "input", "updateState", "layoutStateAccess", "state", "drawerState", "companionVariant", "undefined", "subject", "variant", "getLinkedVariant"]
7
+ }
@@ -1,12 +1,13 @@
1
1
  import {
2
2
  layoutStateAccess
3
- } from "./chunk-XJVW3PRY.mjs";
4
- import "./chunk-MRR7PXSM.mjs";
3
+ } from "./chunk-7UDV3JDT.mjs";
4
+ import "./chunk-FD2CAY4Q.mjs";
5
+ import "./chunk-J5LGTIGS.mjs";
5
6
 
6
7
  // src/operations/update-dialog.ts
7
8
  import * as Effect from "effect/Effect";
8
9
  import { LayoutOperation } from "@dxos/app-toolkit";
9
- import { Operation } from "@dxos/operation";
10
+ import { Operation } from "@dxos/compute";
10
11
  var handler = LayoutOperation.UpdateDialog.pipe(Operation.withHandler(Effect.fnUntraced(function* (input) {
11
12
  const { updateState } = yield* layoutStateAccess;
12
13
  updateState((state) => ({
@@ -26,4 +27,4 @@ var update_dialog_default = handler;
26
27
  export {
27
28
  update_dialog_default as default
28
29
  };
29
- //# sourceMappingURL=update-dialog-FPAPZXKO.mjs.map
30
+ //# sourceMappingURL=update-dialog-P4ASXCE7.mjs.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/operations/update-dialog.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\nimport { layoutStateAccess } from './state-access';\n\nconst handler: Operation.WithHandler<typeof LayoutOperation.UpdateDialog> = LayoutOperation.UpdateDialog.pipe(\n Operation.withHandler(\n Effect.fnUntraced(function* (input) {\n const { updateState } = yield* layoutStateAccess;\n\n updateState((state) => ({\n ...state,\n dialogOpen: input.state ?? Boolean(input.subject),\n dialogType: input.type ?? 'default',\n dialogBlockAlign: input.blockAlign ?? 'center',\n dialogOverlayClasses: input.overlayClasses,\n dialogOverlayStyle: input.overlayStyle,\n dialogContent: input.subject ? { component: input.subject, props: input.props } : undefined,\n }));\n }),\n ),\n);\n\nexport default handler;\n"],
4
+ "sourcesContent": ["// Copyright 2025 DXOS.org\n\nimport * as Effect from 'effect/Effect';\n\nimport { LayoutOperation } from '@dxos/app-toolkit';\nimport { Operation } from '@dxos/compute';\n\nimport { layoutStateAccess } from './state-access';\n\nconst handler: Operation.WithHandler<typeof LayoutOperation.UpdateDialog> = LayoutOperation.UpdateDialog.pipe(\n Operation.withHandler(\n Effect.fnUntraced(function* (input) {\n const { updateState } = yield* layoutStateAccess;\n\n updateState((state) => ({\n ...state,\n dialogOpen: input.state ?? Boolean(input.subject),\n dialogType: input.type ?? 'default',\n dialogBlockAlign: input.blockAlign ?? 'center',\n dialogOverlayClasses: input.overlayClasses,\n dialogOverlayStyle: input.overlayStyle,\n dialogContent: input.subject ? { component: input.subject, props: input.props } : undefined,\n }));\n }),\n ),\n);\n\nexport default handler;\n"],
5
5
  "mappings": ";;;;;;;AAEA,YAAYA,YAAY;AAExB,SAASC,uBAAuB;AAChC,SAASC,iBAAiB;AAI1B,IAAMC,UAAsEC,gBAAgBC,aAAaC,KACvGC,UAAUC,YACDC,kBAAW,WAAWC,OAAK;AAChC,QAAM,EAAEC,YAAW,IAAK,OAAOC;AAE/BD,cAAY,CAACE,WAAW;IACtB,GAAGA;IACHC,YAAYJ,MAAMG,SAASE,QAAQL,MAAMM,OAAO;IAChDC,YAAYP,MAAMQ,QAAQ;IAC1BC,kBAAkBT,MAAMU,cAAc;IACtCC,sBAAsBX,MAAMY;IAC5BC,oBAAoBb,MAAMc;IAC1BC,eAAef,MAAMM,UAAU;MAAEU,WAAWhB,MAAMM;MAASW,OAAOjB,MAAMiB;IAAM,IAAIC;EACpF,EAAA;AACF,CAAA,CAAA,CAAA;AAIJ,IAAA,wBAAezB;",
6
6
  "names": ["Effect", "LayoutOperation", "Operation", "handler", "LayoutOperation", "UpdateDialog", "pipe", "Operation", "withHandler", "fnUntraced", "input", "updateState", "layoutStateAccess", "state", "dialogOpen", "Boolean", "subject", "dialogType", "type", "dialogBlockAlign", "blockAlign", "dialogOverlayClasses", "overlayClasses", "dialogOverlayStyle", "overlayStyle", "dialogContent", "component", "props", "undefined"]
7
7
  }
@@ -1,12 +1,13 @@
1
1
  import {
2
2
  layoutStateAccess
3
- } from "./chunk-XJVW3PRY.mjs";
4
- import "./chunk-MRR7PXSM.mjs";
3
+ } from "./chunk-7UDV3JDT.mjs";
4
+ import "./chunk-FD2CAY4Q.mjs";
5
+ import "./chunk-J5LGTIGS.mjs";
5
6
 
6
7
  // src/operations/update-popover.ts
7
8
  import * as Effect from "effect/Effect";
8
9
  import { LayoutOperation } from "@dxos/app-toolkit";
9
- import { Operation } from "@dxos/operation";
10
+ import { Operation } from "@dxos/compute";
10
11
  var handler = LayoutOperation.UpdatePopover.pipe(Operation.withHandler(Effect.fnUntraced(function* (input) {
11
12
  const { updateState } = yield* layoutStateAccess;
12
13
  updateState((state) => ({
@@ -30,4 +31,4 @@ var update_popover_default = handler;
30
31
  export {
31
32
  update_popover_default as default
32
33
  };
33
- //# sourceMappingURL=update-popover-6V5ZTIYN.mjs.map
34
+ //# sourceMappingURL=update-popover-REAKC2GN.mjs.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/operations/update-popover.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\nimport { layoutStateAccess } from './state-access';\n\nconst handler: Operation.WithHandler<typeof LayoutOperation.UpdatePopover> = LayoutOperation.UpdatePopover.pipe(\n Operation.withHandler(\n Effect.fnUntraced(function* (input) {\n const { updateState } = yield* layoutStateAccess;\n\n updateState((state) => ({\n ...state,\n popoverOpen: input.state ?? Boolean(input.subject),\n popoverKind: input.kind ?? 'base',\n popoverTitle: input.kind === 'card' ? input.title : undefined,\n popoverContent:\n typeof input.subject === 'string'\n ? { component: input.subject, props: input.props }\n : input.subject\n ? { subject: input.subject }\n : undefined,\n popoverSide: input.side,\n popoverVariant: input.variant,\n popoverAnchor: input.variant === 'virtual' ? input.anchor : state.popoverAnchor,\n popoverAnchorId: input.variant !== 'virtual' ? input.anchorId : state.popoverAnchorId,\n }));\n }),\n ),\n);\n\nexport default handler;\n"],
4
+ "sourcesContent": ["// Copyright 2025 DXOS.org\n\nimport * as Effect from 'effect/Effect';\n\nimport { LayoutOperation } from '@dxos/app-toolkit';\nimport { Operation } from '@dxos/compute';\n\nimport { layoutStateAccess } from './state-access';\n\nconst handler: Operation.WithHandler<typeof LayoutOperation.UpdatePopover> = LayoutOperation.UpdatePopover.pipe(\n Operation.withHandler(\n Effect.fnUntraced(function* (input) {\n const { updateState } = yield* layoutStateAccess;\n\n updateState((state) => ({\n ...state,\n popoverOpen: input.state ?? Boolean(input.subject),\n popoverKind: input.kind ?? 'base',\n popoverTitle: input.kind === 'card' ? input.title : undefined,\n popoverContent:\n typeof input.subject === 'string'\n ? { component: input.subject, props: input.props }\n : input.subject\n ? { subject: input.subject }\n : undefined,\n popoverSide: input.side,\n popoverVariant: input.variant,\n popoverAnchor: input.variant === 'virtual' ? input.anchor : state.popoverAnchor,\n popoverAnchorId: input.variant !== 'virtual' ? input.anchorId : state.popoverAnchorId,\n }));\n }),\n ),\n);\n\nexport default handler;\n"],
5
5
  "mappings": ";;;;;;;AAEA,YAAYA,YAAY;AAExB,SAASC,uBAAuB;AAChC,SAASC,iBAAiB;AAI1B,IAAMC,UAAuEC,gBAAgBC,cAAcC,KACzGC,UAAUC,YACDC,kBAAW,WAAWC,OAAK;AAChC,QAAM,EAAEC,YAAW,IAAK,OAAOC;AAE/BD,cAAY,CAACE,WAAW;IACtB,GAAGA;IACHC,aAAaJ,MAAMG,SAASE,QAAQL,MAAMM,OAAO;IACjDC,aAAaP,MAAMQ,QAAQ;IAC3BC,cAAcT,MAAMQ,SAAS,SAASR,MAAMU,QAAQC;IACpDC,gBACE,OAAOZ,MAAMM,YAAY,WACrB;MAAEO,WAAWb,MAAMM;MAASQ,OAAOd,MAAMc;IAAM,IAC/Cd,MAAMM,UACJ;MAAEA,SAASN,MAAMM;IAAQ,IACzBK;IACRI,aAAaf,MAAMgB;IACnBC,gBAAgBjB,MAAMkB;IACtBC,eAAenB,MAAMkB,YAAY,YAAYlB,MAAMoB,SAASjB,MAAMgB;IAClEE,iBAAiBrB,MAAMkB,YAAY,YAAYlB,MAAMsB,WAAWnB,MAAMkB;EACxE,EAAA;AACF,CAAA,CAAA,CAAA;AAIJ,IAAA,yBAAe5B;",
6
6
  "names": ["Effect", "LayoutOperation", "Operation", "handler", "LayoutOperation", "UpdatePopover", "pipe", "Operation", "withHandler", "fnUntraced", "input", "updateState", "layoutStateAccess", "state", "popoverOpen", "Boolean", "subject", "popoverKind", "kind", "popoverTitle", "title", "undefined", "popoverContent", "component", "props", "popoverSide", "side", "popoverVariant", "variant", "popoverAnchor", "anchor", "popoverAnchorId", "anchorId"]
7
7
  }
@@ -1,10 +1,12 @@
1
+ import "./chunk-J5LGTIGS.mjs";
2
+
1
3
  // src/operations/update-sidebar.ts
2
4
  import * as Effect from "effect/Effect";
3
5
  import { LayoutOperation } from "@dxos/app-toolkit";
4
- import { Operation } from "@dxos/operation";
6
+ import { Operation } from "@dxos/compute";
5
7
  var handler = LayoutOperation.UpdateSidebar.pipe(Operation.withHandler(() => Effect.void));
6
8
  var update_sidebar_default = handler;
7
9
  export {
8
10
  update_sidebar_default as default
9
11
  };
10
- //# sourceMappingURL=update-sidebar-WHDKYMV7.mjs.map
12
+ //# sourceMappingURL=update-sidebar-O5SQPR6Q.mjs.map
@@ -0,0 +1,7 @@
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/compute';\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,UAAuEF,gBAAgBG,cAAcC,KACzGH,UAAUI,YAAY,MAAaC,WAAI,CAAA;AAGzC,IAAA,yBAAeJ;",
6
+ "names": ["Effect", "LayoutOperation", "Operation", "handler", "UpdateSidebar", "pipe", "withHandler", "void"]
7
+ }
@@ -1,37 +1,33 @@
1
- import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
2
- import {
3
- SimpleLayoutState
4
- } from "./chunk-WMNTJ2MK.mjs";
1
+ import "./chunk-J5LGTIGS.mjs";
5
2
 
6
- // src/capabilities/url-handler/url-handler.ts
3
+ // src/capabilities/url-handler.ts
7
4
  import * as Effect from "effect/Effect";
8
5
  import { Capabilities, Capability } from "@dxos/app-framework";
9
- import { LayoutOperation, fromUrlPath, getWorkspaceFromPath, toUrlPath } from "@dxos/app-toolkit";
6
+ import { AppCapabilities, LayoutOperation, fromUrlPath, getWorkspaceFromPath, toUrlPath } from "@dxos/app-toolkit";
7
+ import { runAndForwardErrors } from "@dxos/effect";
10
8
  import { log } from "@dxos/log";
11
9
  import { isTauri } from "@dxos/util";
12
- var __dxlog_file = "/__w/dxos/dxos/packages/plugins/plugin-simple-layout/src/capabilities/url-handler/url-handler.ts";
10
+ import { SimpleLayoutCapabilities } from "#types";
11
+ var __dxlog_file = "/__w/dxos/dxos/packages/plugins/plugin-simple-layout/src/capabilities/url-handler.ts";
13
12
  var url_handler_default = Capability.makeModule(Effect.fnUntraced(function* () {
14
13
  const { invokePromise } = yield* Capability.get(Capabilities.OperationInvoker);
15
- const handlePathNavigation = (pathname) => {
14
+ const capabilities = yield* Capability.Service;
15
+ const dispatchNavigationHandlers = (url) => Effect.gen(function* () {
16
+ const handlers = yield* Capability.getAll(AppCapabilities.NavigationHandler);
17
+ yield* Effect.all(handlers.map((handler) => handler(url)), {
18
+ concurrency: "unbounded"
19
+ });
20
+ }).pipe(Effect.provideService(Capability.Service, capabilities), runAndForwardErrors);
21
+ const handlePathNavigation = (url) => {
22
+ const resolvedUrl = url ?? new URL(window.location.href);
23
+ void dispatchNavigationHandlers(resolvedUrl);
24
+ let pathname = resolvedUrl.pathname;
16
25
  if (isFilePath(pathname)) {
17
26
  log.info("[UrlHandler] Skipping file path (not a graph node)", {
18
27
  pathname
19
- }, {
20
- F: __dxlog_file,
21
- L: 31,
22
- S: this,
23
- C: (f, a) => f(...a)
24
- });
28
+ }, { "~LogMeta": "~LogMeta", F: __dxlog_file, L: 34, S: this });
25
29
  pathname = "/";
26
30
  }
27
- log.info("[UrlHandler] Navigating to path", {
28
- pathname
29
- }, {
30
- F: __dxlog_file,
31
- L: 35,
32
- S: this,
33
- C: (f, a) => f(...a)
34
- });
35
31
  const qualifiedId = fromUrlPath(pathname);
36
32
  const workspace = getWorkspaceFromPath(qualifiedId);
37
33
  void invokePromise(LayoutOperation.SwitchWorkspace, {
@@ -46,9 +42,11 @@ var url_handler_default = Capability.makeModule(Effect.fnUntraced(function* () {
46
42
  });
47
43
  }
48
44
  };
49
- const onNavigation = handleNavigation(handlePathNavigation);
50
- yield* Effect.sync(() => onNavigation());
51
- window.addEventListener("popstate", onNavigation);
45
+ const onPopState = () => {
46
+ handlePathNavigation();
47
+ };
48
+ yield* Effect.sync(() => handlePathNavigation());
49
+ window.addEventListener("popstate", onPopState);
52
50
  let unlistenDeepLink;
53
51
  if (isTauri()) {
54
52
  yield* Effect.tryPromise({
@@ -58,52 +56,31 @@ var url_handler_default = Capability.makeModule(Effect.fnUntraced(function* () {
58
56
  if (launchUrls && launchUrls.length > 0) {
59
57
  log.info("[UrlHandler] App launched with deep links", {
60
58
  urls: launchUrls
61
- }, {
62
- F: __dxlog_file,
63
- L: 61,
64
- S: this,
65
- C: (f, a) => f(...a)
66
- });
67
- for (const url of launchUrls) {
68
- handleDeepLink(url, handlePathNavigation);
59
+ }, { "~LogMeta": "~LogMeta", F: __dxlog_file, L: 67, S: this });
60
+ for (const urlString of launchUrls) {
61
+ handleDeepLink(urlString, handlePathNavigation);
69
62
  }
70
63
  }
71
64
  unlistenDeepLink = await onOpenUrl((urls) => {
72
65
  log.info("[UrlHandler] Deep links received", {
73
66
  urls
74
- }, {
75
- F: __dxlog_file,
76
- L: 68,
77
- S: this,
78
- C: (f, a) => f(...a)
79
- });
80
- for (const url of urls) {
81
- handleDeepLink(url, handlePathNavigation);
67
+ }, { "~LogMeta": "~LogMeta", F: __dxlog_file, L: 75, S: this });
68
+ for (const urlString of urls) {
69
+ handleDeepLink(urlString, handlePathNavigation);
82
70
  }
83
71
  });
84
- log.info("[UrlHandler] Deep link listener initialized", void 0, {
85
- F: __dxlog_file,
86
- L: 74,
87
- S: this,
88
- C: (f, a) => f(...a)
89
- });
90
72
  },
91
73
  catch: (error) => {
92
74
  log.warn("[UrlHandler] Failed to initialize deep link listener", {
93
75
  error
94
- }, {
95
- F: __dxlog_file,
96
- L: 77,
97
- S: this,
98
- C: (f, a) => f(...a)
99
- });
76
+ }, { "~LogMeta": "~LogMeta", F: __dxlog_file, L: 84, S: this });
100
77
  return error;
101
78
  }
102
79
  }).pipe(Effect.catchAll(() => Effect.void));
103
80
  }
104
81
  let lastWorkspace;
105
82
  let lastActive;
106
- const unsubscribe = yield* Capabilities.subscribeAtom(SimpleLayoutState, (state) => {
83
+ const unsubscribe = yield* Capabilities.subscribeAtom(SimpleLayoutCapabilities.State, (state) => {
107
84
  const { workspace, active } = state;
108
85
  if (workspace !== lastWorkspace || active !== lastActive) {
109
86
  lastWorkspace = workspace;
@@ -115,50 +92,38 @@ var url_handler_default = Capability.makeModule(Effect.fnUntraced(function* () {
115
92
  }
116
93
  });
117
94
  return Capability.contributes(Capabilities.Null, null, () => Effect.sync(() => {
118
- window.removeEventListener("popstate", onNavigation);
95
+ window.removeEventListener("popstate", onPopState);
119
96
  unsubscribe();
120
97
  unlistenDeepLink?.();
121
98
  }));
122
99
  }));
123
100
  var isRedirectPath = (pathname) => pathname.startsWith("/redirect/");
124
101
  var isFilePath = (pathname) => /\.[a-z]+$/i.test(pathname);
125
- var handleNavigation = (navigate) => () => navigate(window.location.pathname);
126
102
  var handleDeepLink = (urlString, navigate) => {
127
103
  log.info("[UrlHandler] Deep link received", {
128
104
  url: urlString
129
- }, {
130
- F: __dxlog_file,
131
- L: 134,
132
- S: void 0,
133
- C: (f, a) => f(...a)
134
- });
105
+ }, { "~LogMeta": "~LogMeta", F: __dxlog_file, L: 114, S: void 0 });
135
106
  try {
136
- const url = new URL(urlString);
137
- if (isRedirectPath(url.pathname)) {
138
- log.info("[UrlHandler] Skipping redirect path (handled elsewhere)", {
139
- pathname: url.pathname
140
- }, {
141
- F: __dxlog_file,
142
- L: 138,
143
- S: void 0,
144
- C: (f, a) => f(...a)
145
- });
107
+ const deepLinkUrl = new URL(urlString);
108
+ const fullPath = deepLinkUrl.protocol !== "https:" && deepLinkUrl.protocol !== "http:" && deepLinkUrl.hostname ? "/" + deepLinkUrl.hostname + deepLinkUrl.pathname : deepLinkUrl.pathname;
109
+ if (isRedirectPath(fullPath)) {
146
110
  return;
147
111
  }
148
- navigate(url.pathname);
112
+ const current = new URL(window.location.href);
113
+ if (deepLinkUrl.search) {
114
+ deepLinkUrl.searchParams.forEach((value, key) => current.searchParams.set(key, value));
115
+ }
116
+ current.pathname = fullPath;
117
+ history.replaceState(null, "", current.pathname + current.search);
118
+ navigate(current);
149
119
  } catch (error) {
150
120
  log.warn("[UrlHandler] Failed to parse deep link URL", {
151
121
  urlString,
152
122
  error
153
- }, {
154
- F: __dxlog_file,
155
- L: 143,
156
- S: void 0,
157
- C: (f, a) => f(...a)
158
- });
123
+ }, { "~LogMeta": "~LogMeta", F: __dxlog_file, L: 134, S: void 0 });
159
124
  }
160
125
  };
161
126
  export {
162
127
  url_handler_default as default
163
128
  };
164
- //# sourceMappingURL=url-handler-WMONO2T6.mjs.map
129
+ //# sourceMappingURL=url-handler-GZXUUAHD.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/capabilities/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 { AppCapabilities, LayoutOperation, fromUrlPath, getWorkspaceFromPath, toUrlPath } from '@dxos/app-toolkit';\nimport { runAndForwardErrors } from '@dxos/effect';\nimport { log } from '@dxos/log';\nimport { isTauri } from '@dxos/util';\n\nimport { SimpleLayoutCapabilities } 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 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 const capabilities = yield* Capability.Service;\n\n /** Dispatch all NavigationHandler contributions with a given URL. */\n const dispatchNavigationHandlers = (url: URL) =>\n Effect.gen(function* () {\n const handlers = yield* Capability.getAll(AppCapabilities.NavigationHandler);\n yield* Effect.all(\n handlers.map((handler) => handler(url)),\n { concurrency: 'unbounded' },\n );\n }).pipe(Effect.provideService(Capability.Service, capabilities), runAndForwardErrors);\n\n /**\n * Handle navigation from a URL.\n * Dispatches to NavigationHandler contributions, then handles pathname routing.\n */\n const handlePathNavigation = (url?: URL) => {\n const resolvedUrl = url ?? new URL(window.location.href);\n void dispatchNavigationHandlers(resolvedUrl);\n\n let pathname = resolvedUrl.pathname;\n if (isFilePath(pathname)) {\n log.info('[UrlHandler] Skipping file path (not a graph node)', { pathname });\n pathname = '/';\n }\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 onPopState = () => {\n handlePathNavigation();\n };\n\n // Initial navigation.\n yield* Effect.sync(() => handlePathNavigation());\n window.addEventListener('popstate', onPopState);\n\n // Tauri deep link support.\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 urlString of launchUrls) {\n handleDeepLink(urlString, handlePathNavigation);\n }\n }\n\n unlistenDeepLink = await onOpenUrl((urls) => {\n log.info('[UrlHandler] Deep links received', { urls });\n for (const urlString of urls) {\n handleDeepLink(urlString, handlePathNavigation);\n }\n });\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 // Sync URL with layout state changes.\n let lastWorkspace: string | undefined;\n let lastActive: string | undefined;\n const unsubscribe = yield* Capabilities.subscribeAtom(\n SimpleLayoutCapabilities.State,\n (state: SimpleLayoutCapabilities.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\n return Capability.contributes(Capabilities.Null, null, () =>\n Effect.sync(() => {\n window.removeEventListener('popstate', onPopState);\n unsubscribe();\n unlistenDeepLink?.();\n }),\n );\n }),\n);\n\n/** Check if a path is a redirect path handled elsewhere (e.g., OAuth). */\nconst isRedirectPath = (pathname: string): boolean => pathname.startsWith('/redirect/');\n\n/** Paths with file extensions are not graph node paths. */\nconst isFilePath = (pathname: string): boolean => /\\.[a-z]+$/i.test(pathname);\n\n/** Handle a deep link URL string. Merges query params into window.location and navigates. */\nconst handleDeepLink = (urlString: string, navigate: (url?: URL) => void): void => {\n log.info('[UrlHandler] Deep link received', { url: urlString });\n try {\n const deepLinkUrl = new URL(urlString);\n\n // For custom schemes (e.g., composer://a/b/c), new URL() treats the first segment as the\n // hostname. Reconstruct the full path from hostname + pathname.\n const fullPath =\n deepLinkUrl.protocol !== 'https:' && deepLinkUrl.protocol !== 'http:' && deepLinkUrl.hostname\n ? '/' + deepLinkUrl.hostname + deepLinkUrl.pathname\n : deepLinkUrl.pathname;\n\n if (isRedirectPath(fullPath)) {\n return;\n }\n\n // Merge deep link query params into the current window URL so handlers can read them.\n const current = new URL(window.location.href);\n if (deepLinkUrl.search) {\n deepLinkUrl.searchParams.forEach((value, key) => current.searchParams.set(key, value));\n }\n current.pathname = fullPath;\n history.replaceState(null, '', current.pathname + current.search);\n\n navigate(current);\n } catch (error) {\n log.warn('[UrlHandler] Failed to parse deep link URL', { urlString, error });\n }\n};\n"],
5
+ "mappings": ";;;AAIA,YAAYA,YAAY;AAExB,SAASC,cAAcC,kBAAkB;AACzC,SAASC,iBAAiBC,iBAAiBC,aAAaC,sBAAsBC,iBAAiB;AAC/F,SAASC,2BAA2B;AACpC,SAASC,WAAW;AACpB,SAASC,eAAe;AAExB,SAASC,gCAAgC;AAEzC,IAAA,eAAA;AAUI,IAAMC,sBAAAA,WAAe,WAAkBC,kBAAO,aAAA;AAE9C,QAAA,EAAA,cAAA,IAAA,OAAA,WAAA,IAAA,aAAA,gBACMC;uBAEIC,OAAW,WAAOb;AAGtB,QAAA,6BAAA,CAAA,QAAA,WAAA,aAAA;UAAEc,WAAa,OAAA,WAAA,OAAA,gBAAA,iBAAA;AAAY,WAAA,WAAA,SAAA,IAAA,CAAA,YAAA,QAAA,GAAA,CAAA,GAAA;MAEvBhB,aAAOiB;IAEjB,CAAA;;AAME,QAAKH,uBAAAA,CAAAA,QAA2BI;AAEhC,UAAIC,cAAWD,OAAYC,IAAAA,IAAQ,OAAA,SAAA,IAAA;AACnC,SAAIC,2BAAsB,WAAA;QACxBX,WAAS,YAAA;mBAAwDU,QAAAA,GAAAA;AAAS,UAAA,KAAA,sDAAA;QAC1EA;MACF,GAAA,EAAA,YAAA,YAAA,GAAA,cAAA,GAAA,IAAA,GAAA,KAAA,CAAA;AAEA,iBAAME;IACN;AAEA,UAAKC,cAAclB,YAAAA,QAAgBmB;UAAmBC,YAASC,qBAAAA,WAAAA;AAAU,SAAA,cAAA,gBAAA,iBAAA;MAEzE,SAAMC;IACN,CAAA;UACE,WAAKJ,gBAAclB,YAAsB,cAAA;kBAAEoB;yBAAUE,gBAAAA,MAAAA;iBAAS;UAAC;QACjE;MACF,CAAA;IAEA;;AAEA,QAAA,aAAA,MAAA;AAEA,yBAAsB;EACtB;AAGA,SAAA,YAAA,MAAA,qBAA2B,CAAA;AAC3B,SAAIC,iBAAAA,YAAAA,UAAAA;MAEF;cACEC,GAAK;WACG,kBAAEC;WAER,YAAMC;AACN,cAAIA,EAAAA,YAAcA,UAAWC,IAAAA,MAAS,OAAG,8BAAA;cACvCtB,aAAS,MAAA,WAAA;0BAAqDqB,WAAAA,SAAAA,GAAAA;AAAW,cAAA,KAAA,6CAAA;YACzE,MAAK;2BACHE,YAAeC,GAAAA,cAAWC,GAAAA,IAAAA,GAAAA,KAAAA,CAAAA;AAC5B,qBAAA,aAAA,YAAA;AACF,2BAAA,WAAA,oBAAA;UAEAP;;2BACiDQ,MAAAA,UAAAA,CAAAA,SAAAA;AAAK,cAAA,KAAA,oCAAA;YACpD;2BACEH,YAAeC,GAAAA,cAAWC,GAAAA,IAAAA,GAAAA,KAAAA,CAAAA;AAC5B,qBAAA,aAAA,MAAA;AACF,2BAAA,WAAA,oBAAA;UACF;QACAE,CAAAA;;cACqEC,UAAAA;AAAM,YAAA,KAAA,wDAAA;UACzE;QACF,GAAA,EAAA,YAAA,YAAA,GAAA,cAAA,GAAA,IAAA,GAAA,KAAA,CAAA;AACMrC,eAAOsC;MACjB;IAEA,CAAA,EAAA,KAAA,gBAAA,MAAsC,WAAA,CAAA;EACtC;AAEA,MAAA;MAGI;QAEA,cAAIb,OAAcc,aAAiBC,cAAWC,yBAAY,OAAA,CAAA,UAAA;UACxDF,EAAAA,WAAAA,OAAgBd,IAAAA;QAChBgB,cAAaD,iBAAAA,WAAAA,YAAAA;AAEb,sBAAaA;AACb,mBAAWE;YACTC,OAAQC,SAAU,UAAU,MAAGC,IAAOC,UAAOJ,SAASK;AACxD,UAAA,OAAA,SAAA,aAAA,MAAA;AACF,gBAAA,UAAA,MAAA,IAAA,GAAA,IAAA,GAAA,OAAA,SAAA,MAAA,EAAA;MACF;IAGF;;oBAGIC,YAAAA,aAAAA,MAAAA,MAAAA,MAAAA,YAAAA,MAAAA;AACArB,WAAAA,oBAAAA,YAAAA,UAAAA;AACF,gBAAA;AAGJ,uBAAA;EAEF,CAAA,CAAA;AAGA,CAAA,CAAA;AAGA,IAAA,iBACA,CAAA,aAAMK,SAAkBC,WAAmBgB,YAAAA;AACG,IAAA,aAAA,CAAA,aAAA,aAAA,KAAA,QAAA;AAAOhB,IAAAA,iBAAAA,CAAAA,WAAAA,aAAAA;AAAU,MAAA,KAAA,mCAAA;IACzD,KAAA;mBACIiB,YAAc,GAAA,cAAQjB,GAAAA,KAAAA,GAAAA,OAAAA,CAAAA;MAE5B;AACA,UAAA,cAAA,IAAA,IAAA,SAAA;UAOE,WAAA,YAAA,aAAA,YAAA,YAAA,aAAA,WAAA,YAAA,WAAA,MAAA,YAAA,WAAA,YAAA,WAAA,YAAA;AACF,QAAA,eAAA,QAAA,GAAA;AAEA;IACA;UAEEiB,UAAYC,IAAAA,IAAAA,OAAaC,SAASC,IAAAA;AACpC,QAAA,YAAA,QAAA;AACAC,kBAAgB,aAAGC,QAAAA,CAAAA,OAAAA,QAAAA,QAAAA,aAAAA,IAAAA,KAAAA,KAAAA,CAAAA;IACnBZ;AAEAM,YAAAA,WAASK;AACT,YAAOjB,aAAO,MAAA,IAAA,QAAA,WAAA,QAAA,MAAA;AACd5B,aAAS,OAAA;WAAgDwB,OAAAA;QAAWI,KAAAA,8CAAAA;MAAM;MAC5E;IACF,GAAA,EAAA,YAAA,YAAA,GAAA,cAAA,GAAA,KAAA,GAAA,OAAA,CAAA;;;",
6
+ "names": ["Effect", "Capabilities", "Capability", "AppCapabilities", "LayoutOperation", "fromUrlPath", "getWorkspaceFromPath", "toUrlPath", "runAndForwardErrors", "log", "isTauri", "SimpleLayoutCapabilities", "capabilities", "Service", "dispatchNavigationHandlers", "handlers", "concurrency", "provideService", "resolvedUrl", "pathname", "isFilePath", "qualifiedId", "invokePromise", "SwitchWorkspace", "subject", "workspace", "activeId", "unlistenDeepLink", "try", "getCurrent", "launchUrls", "length", "handleDeepLink", "urlString", "handlePathNavigation", "urls", "catch", "error", "catchAll", "lastWorkspace", "active", "lastActive", "location", "history", "pushState", "path", "window", "search", "unsubscribe", "navigate", "deepLinkUrl", "searchParams", "forEach", "value", "current", "fullPath"]
7
+ }
@@ -4,4 +4,5 @@ export type SimpleLayoutPluginOptions = {
4
4
  isPopover?: boolean;
5
5
  };
6
6
  export declare const SimpleLayoutPlugin: Plugin.PluginFactory<SimpleLayoutPluginOptions>;
7
+ export default SimpleLayoutPlugin;
7
8
  //# sourceMappingURL=SimpleLayoutPlugin.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"SimpleLayoutPlugin.d.ts","sourceRoot":"","sources":["../../../src/SimpleLayoutPlugin.ts"],"names":[],"mappings":"AAIA,OAAO,EAAiD,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAQ5F,MAAM,MAAM,yBAAyB,GAAG;IACtC,kFAAkF;IAClF,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB,CAAC;AAEF,eAAO,MAAM,kBAAkB,iDA8B9B,CAAC"}
1
+ {"version":3,"file":"SimpleLayoutPlugin.d.ts","sourceRoot":"","sources":["../../../src/SimpleLayoutPlugin.ts"],"names":[],"mappings":"AAIA,OAAO,EAAiD,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAgB5F,MAAM,MAAM,yBAAyB,GAAG;IACtC,kFAAkF;IAClF,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB,CAAC;AAEF,eAAO,MAAM,kBAAkB,iDA+B9B,CAAC;eAEa,kBAAkB"}
@@ -0,0 +1,6 @@
1
+ import * as Effect from 'effect/Effect';
2
+ import { Capability } from '@dxos/app-framework';
3
+ import { GraphBuilder } from '@dxos/plugin-graph';
4
+ declare const _default: (props: void) => Effect.Effect<Capability.Capability<Capability.InterfaceDef<GraphBuilder.BuilderExtensions>>, never, never>;
5
+ export default _default;
6
+ //# sourceMappingURL=app-graph-builder.d.ts.map