@dxos/plugin-simple-layout 0.8.4-main.69d29f4 → 0.8.4-main.7996785055

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (294) hide show
  1. package/dist/lib/browser/chunk-J5FQ32AV.mjs +1256 -0
  2. package/dist/lib/browser/chunk-J5FQ32AV.mjs.map +7 -0
  3. package/dist/lib/browser/{chunk-CLPGTNWJ.mjs → chunk-MRR7PXSM.mjs} +5 -5
  4. package/dist/lib/browser/chunk-MRR7PXSM.mjs.map +7 -0
  5. package/dist/lib/browser/chunk-XJVW3PRY.mjs +22 -0
  6. package/dist/lib/browser/chunk-XJVW3PRY.mjs.map +7 -0
  7. package/dist/lib/browser/close-OT5JOGVY.mjs +34 -0
  8. package/dist/lib/browser/close-OT5JOGVY.mjs.map +7 -0
  9. package/dist/lib/browser/index.mjs +40 -32
  10. package/dist/lib/browser/index.mjs.map +4 -4
  11. package/dist/lib/browser/meta.json +1 -1
  12. package/dist/lib/browser/open-4FQ44Z5G.mjs +31 -0
  13. package/dist/lib/browser/open-4FQ44Z5G.mjs.map +7 -0
  14. package/dist/lib/browser/operation-handler-OAD7LISD.mjs +16 -0
  15. package/dist/lib/browser/operation-handler-OAD7LISD.mjs.map +7 -0
  16. package/dist/lib/browser/{react-root-6ARAPH3O.mjs → react-root-6KIGPLUT.mjs} +5 -5
  17. package/dist/lib/browser/react-root-6KIGPLUT.mjs.map +7 -0
  18. package/dist/lib/browser/{react-surface-SO7B23GS.mjs → react-surface-JLIEQGOL.mjs} +18 -13
  19. package/dist/lib/browser/react-surface-JLIEQGOL.mjs.map +7 -0
  20. package/dist/lib/browser/revert-workspace-DLE265AN.mjs +21 -0
  21. package/dist/lib/browser/revert-workspace-DLE265AN.mjs.map +7 -0
  22. package/dist/lib/browser/set-52HGTSH4.mjs +21 -0
  23. package/dist/lib/browser/set-52HGTSH4.mjs.map +7 -0
  24. package/dist/lib/browser/set-layout-mode-T6QI3DGU.mjs +11 -0
  25. package/dist/lib/browser/set-layout-mode-T6QI3DGU.mjs.map +7 -0
  26. package/dist/lib/browser/{spotlight-dismiss-VSNOPETH.mjs → spotlight-dismiss-67PHYS5B.mjs} +3 -3
  27. package/dist/lib/browser/spotlight-dismiss-67PHYS5B.mjs.map +7 -0
  28. package/dist/lib/browser/{state-H4IGICBB.mjs → state-TXSMUWYI.mjs} +8 -5
  29. package/dist/lib/browser/state-TXSMUWYI.mjs.map +7 -0
  30. package/dist/lib/browser/switch-workspace-5Y6T4BWJ.mjs +24 -0
  31. package/dist/lib/browser/switch-workspace-5Y6T4BWJ.mjs.map +7 -0
  32. package/dist/lib/browser/update-complementary-MX3TTVAB.mjs +31 -0
  33. package/dist/lib/browser/update-complementary-MX3TTVAB.mjs.map +7 -0
  34. package/dist/lib/browser/update-dialog-FPAPZXKO.mjs +29 -0
  35. package/dist/lib/browser/update-dialog-FPAPZXKO.mjs.map +7 -0
  36. package/dist/lib/browser/update-popover-6V5ZTIYN.mjs +33 -0
  37. package/dist/lib/browser/update-popover-6V5ZTIYN.mjs.map +7 -0
  38. package/dist/lib/browser/update-sidebar-WHDKYMV7.mjs +10 -0
  39. package/dist/lib/browser/update-sidebar-WHDKYMV7.mjs.map +7 -0
  40. package/dist/lib/browser/url-handler-GUJ3L7Y3.mjs +163 -0
  41. package/dist/lib/browser/url-handler-GUJ3L7Y3.mjs.map +7 -0
  42. package/dist/lib/node-esm/chunk-27K22G6S.mjs +23 -0
  43. package/dist/lib/node-esm/chunk-27K22G6S.mjs.map +7 -0
  44. package/dist/lib/node-esm/chunk-EXNDYZTP.mjs +1257 -0
  45. package/dist/lib/node-esm/chunk-EXNDYZTP.mjs.map +7 -0
  46. package/dist/lib/node-esm/{chunk-MUVVYBUE.mjs → chunk-WMNTJ2MK.mjs} +5 -5
  47. package/dist/lib/node-esm/chunk-WMNTJ2MK.mjs.map +7 -0
  48. package/dist/lib/node-esm/close-PEVHREL2.mjs +35 -0
  49. package/dist/lib/node-esm/close-PEVHREL2.mjs.map +7 -0
  50. package/dist/lib/node-esm/index.mjs +40 -32
  51. package/dist/lib/node-esm/index.mjs.map +4 -4
  52. package/dist/lib/node-esm/meta.json +1 -1
  53. package/dist/lib/node-esm/open-LMJY7JCJ.mjs +32 -0
  54. package/dist/lib/node-esm/open-LMJY7JCJ.mjs.map +7 -0
  55. package/dist/lib/node-esm/operation-handler-A2DC4WHC.mjs +18 -0
  56. package/dist/lib/node-esm/operation-handler-A2DC4WHC.mjs.map +7 -0
  57. package/dist/lib/node-esm/{react-root-2CPA2ZUS.mjs → react-root-5SCW2KTH.mjs} +5 -5
  58. package/dist/lib/node-esm/react-root-5SCW2KTH.mjs.map +7 -0
  59. package/dist/lib/node-esm/{react-surface-FKAV56MO.mjs → react-surface-WLKB6AET.mjs} +18 -13
  60. package/dist/lib/node-esm/react-surface-WLKB6AET.mjs.map +7 -0
  61. package/dist/lib/node-esm/revert-workspace-XZXT64YA.mjs +22 -0
  62. package/dist/lib/node-esm/revert-workspace-XZXT64YA.mjs.map +7 -0
  63. package/dist/lib/node-esm/set-5I6LFH5L.mjs +22 -0
  64. package/dist/lib/node-esm/set-5I6LFH5L.mjs.map +7 -0
  65. package/dist/lib/node-esm/set-layout-mode-F5B6QLZM.mjs +13 -0
  66. package/dist/lib/node-esm/set-layout-mode-F5B6QLZM.mjs.map +7 -0
  67. package/dist/lib/node-esm/{spotlight-dismiss-L5PCWIJG.mjs → spotlight-dismiss-RMLRZUVY.mjs} +3 -3
  68. package/dist/lib/node-esm/spotlight-dismiss-RMLRZUVY.mjs.map +7 -0
  69. package/dist/lib/node-esm/{state-QIU2LMLT.mjs → state-JMX6FAG4.mjs} +8 -5
  70. package/dist/lib/node-esm/state-JMX6FAG4.mjs.map +7 -0
  71. package/dist/lib/node-esm/switch-workspace-PB6T2SGY.mjs +25 -0
  72. package/dist/lib/node-esm/switch-workspace-PB6T2SGY.mjs.map +7 -0
  73. package/dist/lib/node-esm/update-complementary-FTW423IY.mjs +32 -0
  74. package/dist/lib/node-esm/update-complementary-FTW423IY.mjs.map +7 -0
  75. package/dist/lib/node-esm/update-dialog-ID267DCL.mjs +30 -0
  76. package/dist/lib/node-esm/update-dialog-ID267DCL.mjs.map +7 -0
  77. package/dist/lib/node-esm/update-popover-RLHU2HF4.mjs +34 -0
  78. package/dist/lib/node-esm/update-popover-RLHU2HF4.mjs.map +7 -0
  79. package/dist/lib/node-esm/update-sidebar-BJ7HTNZ4.mjs +12 -0
  80. package/dist/lib/node-esm/update-sidebar-BJ7HTNZ4.mjs.map +7 -0
  81. package/dist/lib/node-esm/url-handler-WMONO2T6.mjs +164 -0
  82. package/dist/lib/node-esm/url-handler-WMONO2T6.mjs.map +7 -0
  83. package/dist/types/src/SimpleLayoutPlugin.d.ts +1 -1
  84. package/dist/types/src/SimpleLayoutPlugin.d.ts.map +1 -1
  85. package/dist/types/src/capabilities/index.d.ts +1 -1
  86. package/dist/types/src/capabilities/index.d.ts.map +1 -1
  87. package/dist/types/src/capabilities/operation-handler/index.d.ts +4 -0
  88. package/dist/types/src/capabilities/operation-handler/index.d.ts.map +1 -0
  89. package/dist/types/src/capabilities/operation-handler/operation-handler.d.ts +6 -0
  90. package/dist/types/src/capabilities/operation-handler/operation-handler.d.ts.map +1 -0
  91. package/dist/types/src/capabilities/react-root/react-root.d.ts +1 -1
  92. package/dist/types/src/capabilities/react-root/react-root.d.ts.map +1 -1
  93. package/dist/types/src/capabilities/react-surface/index.d.ts +1 -1
  94. package/dist/types/src/capabilities/react-surface/index.d.ts.map +1 -1
  95. package/dist/types/src/capabilities/react-surface/react-surface.d.ts +2 -2
  96. package/dist/types/src/capabilities/react-surface/react-surface.d.ts.map +1 -1
  97. package/dist/types/src/capabilities/spotlight-dismiss/index.d.ts +1 -1
  98. package/dist/types/src/capabilities/spotlight-dismiss/index.d.ts.map +1 -1
  99. package/dist/types/src/capabilities/spotlight-dismiss/spotlight-dismiss.d.ts +1 -1
  100. package/dist/types/src/capabilities/spotlight-dismiss/spotlight-dismiss.d.ts.map +1 -1
  101. package/dist/types/src/capabilities/state/index.d.ts +1 -1
  102. package/dist/types/src/capabilities/state/state.d.ts +1 -1
  103. package/dist/types/src/capabilities/state/state.d.ts.map +1 -1
  104. package/dist/types/src/capabilities/url-handler/url-handler.d.ts +5 -3
  105. package/dist/types/src/capabilities/url-handler/url-handler.d.ts.map +1 -1
  106. package/dist/types/src/components/ContentError.stories.d.ts +13 -4
  107. package/dist/types/src/components/ContentError.stories.d.ts.map +1 -1
  108. package/dist/types/src/components/DebugOverlay/DebugOverlay.d.ts +19 -0
  109. package/dist/types/src/components/DebugOverlay/DebugOverlay.d.ts.map +1 -0
  110. package/dist/types/src/components/DebugOverlay/index.d.ts +2 -0
  111. package/dist/types/src/components/DebugOverlay/index.d.ts.map +1 -0
  112. package/dist/types/src/components/Home/Home.d.ts.map +1 -1
  113. package/dist/types/src/components/Loading/Loading.d.ts +3 -0
  114. package/dist/types/src/components/Loading/Loading.d.ts.map +1 -0
  115. package/dist/types/src/components/{ContentLoading.stories.d.ts → Loading/Loading.stories.d.ts} +1 -1
  116. package/dist/types/src/components/Loading/Loading.stories.d.ts.map +1 -0
  117. package/dist/types/src/components/Loading/index.d.ts +2 -0
  118. package/dist/types/src/components/Loading/index.d.ts.map +1 -0
  119. package/dist/types/src/components/MobileLayout/MobileLayout.d.ts +35 -0
  120. package/dist/types/src/components/MobileLayout/MobileLayout.d.ts.map +1 -0
  121. package/dist/types/src/components/MobileLayout/MobileLayout.stories.d.ts +7 -0
  122. package/dist/types/src/components/MobileLayout/MobileLayout.stories.d.ts.map +1 -0
  123. package/dist/types/src/components/MobileLayout/index.d.ts +2 -0
  124. package/dist/types/src/components/MobileLayout/index.d.ts.map +1 -0
  125. package/dist/types/src/components/NavBranch/NavBranch.d.ts +11 -0
  126. package/dist/types/src/components/NavBranch/NavBranch.d.ts.map +1 -0
  127. package/dist/types/src/components/NavBranch/index.d.ts +2 -0
  128. package/dist/types/src/components/NavBranch/index.d.ts.map +1 -0
  129. package/dist/types/src/components/Popover/Popover.d.ts.map +1 -1
  130. package/dist/types/src/components/SimpleLayout/AppBar.d.ts +28 -0
  131. package/dist/types/src/components/SimpleLayout/AppBar.d.ts.map +1 -0
  132. package/dist/types/src/components/SimpleLayout/AppBar.stories.d.ts +52 -0
  133. package/dist/types/src/components/SimpleLayout/AppBar.stories.d.ts.map +1 -0
  134. package/dist/types/src/components/SimpleLayout/Drawer.d.ts +9 -0
  135. package/dist/types/src/components/SimpleLayout/Drawer.d.ts.map +1 -0
  136. package/dist/types/src/components/SimpleLayout/Main.d.ts +1 -1
  137. package/dist/types/src/components/SimpleLayout/Main.d.ts.map +1 -1
  138. package/dist/types/src/components/SimpleLayout/NavBar.d.ts +18 -6
  139. package/dist/types/src/components/SimpleLayout/NavBar.d.ts.map +1 -1
  140. package/dist/types/src/components/SimpleLayout/NavBar.stories.d.ts +22 -10
  141. package/dist/types/src/components/SimpleLayout/NavBar.stories.d.ts.map +1 -1
  142. package/dist/types/src/components/SimpleLayout/SimpleLayout.d.ts.map +1 -1
  143. package/dist/types/src/components/SimpleLayout/SimpleLayout.stories.d.ts +16 -7
  144. package/dist/types/src/components/SimpleLayout/SimpleLayout.stories.d.ts.map +1 -1
  145. package/dist/types/src/components/SimpleLayout/index.d.ts +3 -0
  146. package/dist/types/src/components/SimpleLayout/index.d.ts.map +1 -1
  147. package/dist/types/src/components/hooks.d.ts +4 -2
  148. package/dist/types/src/components/hooks.d.ts.map +1 -1
  149. package/dist/types/src/components/index.d.ts +4 -2
  150. package/dist/types/src/components/index.d.ts.map +1 -1
  151. package/dist/types/src/hooks/actions.d.ts +19 -0
  152. package/dist/types/src/hooks/actions.d.ts.map +1 -0
  153. package/dist/types/src/hooks/index.d.ts +5 -0
  154. package/dist/types/src/hooks/index.d.ts.map +1 -1
  155. package/dist/types/src/hooks/useAppBarProps.d.ts +7 -0
  156. package/dist/types/src/hooks/useAppBarProps.d.ts.map +1 -0
  157. package/dist/types/src/hooks/useCompanions.d.ts +12 -0
  158. package/dist/types/src/hooks/useCompanions.d.ts.map +1 -0
  159. package/dist/types/src/hooks/useDrawerActions.d.ts +13 -0
  160. package/dist/types/src/hooks/useDrawerActions.d.ts.map +1 -0
  161. package/dist/types/src/hooks/useNavbarActions.d.ts +14 -0
  162. package/dist/types/src/hooks/useNavbarActions.d.ts.map +1 -0
  163. package/dist/types/src/hooks/useSimpleLayoutState.d.ts +3 -3
  164. package/dist/types/src/hooks/useSimpleLayoutState.d.ts.map +1 -1
  165. package/dist/types/src/operations/close.d.ts +5 -0
  166. package/dist/types/src/operations/close.d.ts.map +1 -0
  167. package/dist/types/src/operations/index.d.ts +3 -0
  168. package/dist/types/src/operations/index.d.ts.map +1 -0
  169. package/dist/types/src/operations/open.d.ts +5 -0
  170. package/dist/types/src/operations/open.d.ts.map +1 -0
  171. package/dist/types/src/operations/revert-workspace.d.ts +5 -0
  172. package/dist/types/src/operations/revert-workspace.d.ts.map +1 -0
  173. package/dist/types/src/operations/set-layout-mode.d.ts +5 -0
  174. package/dist/types/src/operations/set-layout-mode.d.ts.map +1 -0
  175. package/dist/types/src/operations/set.d.ts +5 -0
  176. package/dist/types/src/operations/set.d.ts.map +1 -0
  177. package/dist/types/src/operations/state-access.d.ts +8 -0
  178. package/dist/types/src/operations/state-access.d.ts.map +1 -0
  179. package/dist/types/src/operations/switch-workspace.d.ts +5 -0
  180. package/dist/types/src/operations/switch-workspace.d.ts.map +1 -0
  181. package/dist/types/src/operations/update-complementary.d.ts +5 -0
  182. package/dist/types/src/operations/update-complementary.d.ts.map +1 -0
  183. package/dist/types/src/operations/update-dialog.d.ts +5 -0
  184. package/dist/types/src/operations/update-dialog.d.ts.map +1 -0
  185. package/dist/types/src/operations/update-popover.d.ts +5 -0
  186. package/dist/types/src/operations/update-popover.d.ts.map +1 -0
  187. package/dist/types/src/operations/update-sidebar.d.ts +5 -0
  188. package/dist/types/src/operations/update-sidebar.d.ts.map +1 -0
  189. package/dist/types/src/translations.d.ts +12 -1
  190. package/dist/types/src/translations.d.ts.map +1 -1
  191. package/dist/types/src/types/capabilities.d.ts +8 -3
  192. package/dist/types/src/types/capabilities.d.ts.map +1 -1
  193. package/dist/types/src/types/events.d.ts.map +1 -1
  194. package/dist/types/tsconfig.tsbuildinfo +1 -1
  195. package/package.json +36 -30
  196. package/src/SimpleLayoutPlugin.ts +12 -11
  197. package/src/capabilities/index.ts +1 -1
  198. package/src/capabilities/operation-handler/index.ts +9 -0
  199. package/src/capabilities/operation-handler/operation-handler.ts +14 -0
  200. package/src/capabilities/react-root/react-root.tsx +2 -2
  201. package/src/capabilities/react-surface/react-surface.tsx +14 -11
  202. package/src/capabilities/spotlight-dismiss/spotlight-dismiss.ts +2 -2
  203. package/src/capabilities/state/state.tsx +6 -3
  204. package/src/capabilities/url-handler/url-handler.ts +110 -45
  205. package/src/components/ContentError.stories.tsx +8 -7
  206. package/src/components/DebugOverlay/DebugOverlay.tsx +96 -0
  207. package/src/components/DebugOverlay/index.ts +5 -0
  208. package/src/components/Dialog/Dialog.tsx +5 -5
  209. package/src/components/Home/Home.tsx +49 -42
  210. package/src/components/{ContentLoading.stories.tsx → Loading/Loading.stories.tsx} +5 -5
  211. package/src/components/{ContentLoading.tsx → Loading/Loading.tsx} +2 -2
  212. package/src/components/Loading/index.ts +5 -0
  213. package/src/components/MobileLayout/MobileLayout.stories.tsx +133 -0
  214. package/src/components/MobileLayout/MobileLayout.tsx +374 -0
  215. package/src/components/MobileLayout/index.ts +5 -0
  216. package/src/components/NavBranch/NavBranch.tsx +127 -0
  217. package/src/components/{Workspace → NavBranch}/index.ts +1 -1
  218. package/src/components/Popover/Popover.tsx +7 -7
  219. package/src/components/SimpleLayout/AppBar.stories.tsx +144 -0
  220. package/src/components/SimpleLayout/AppBar.tsx +93 -0
  221. package/src/components/SimpleLayout/Drawer.tsx +96 -0
  222. package/src/components/SimpleLayout/Main.tsx +45 -48
  223. package/src/components/SimpleLayout/NavBar.stories.tsx +131 -26
  224. package/src/components/SimpleLayout/NavBar.tsx +21 -62
  225. package/src/components/SimpleLayout/SimpleLayout.stories.tsx +43 -53
  226. package/src/components/SimpleLayout/SimpleLayout.tsx +44 -6
  227. package/src/components/SimpleLayout/index.ts +3 -0
  228. package/src/components/hooks.ts +10 -14
  229. package/src/components/index.ts +4 -2
  230. package/src/hooks/actions.ts +83 -0
  231. package/src/hooks/index.ts +5 -0
  232. package/src/hooks/useAppBarProps.ts +115 -0
  233. package/src/hooks/useCompanions.ts +22 -0
  234. package/src/hooks/useDrawerActions.ts +100 -0
  235. package/src/hooks/useNavbarActions.ts +87 -0
  236. package/src/hooks/useSimpleLayoutState.ts +5 -5
  237. package/src/meta.ts +1 -1
  238. package/src/operations/close.ts +34 -0
  239. package/src/operations/index.ts +16 -0
  240. package/src/operations/open.ts +32 -0
  241. package/src/operations/revert-workspace.ts +22 -0
  242. package/src/operations/set-layout-mode.ts +12 -0
  243. package/src/operations/set.ts +23 -0
  244. package/src/operations/state-access.ts +19 -0
  245. package/src/operations/switch-workspace.ts +26 -0
  246. package/src/operations/update-complementary.ts +34 -0
  247. package/src/operations/update-dialog.ts +28 -0
  248. package/src/operations/update-popover.ts +35 -0
  249. package/src/operations/update-sidebar.ts +12 -0
  250. package/src/translations.ts +8 -1
  251. package/src/types/capabilities.ts +13 -4
  252. package/src/types/events.ts +3 -2
  253. package/dist/lib/browser/chunk-CLPGTNWJ.mjs.map +0 -7
  254. package/dist/lib/browser/chunk-FK4M7GJV.mjs +0 -613
  255. package/dist/lib/browser/chunk-FK4M7GJV.mjs.map +0 -7
  256. package/dist/lib/browser/operation-resolver-LTB63NKP.mjs +0 -168
  257. package/dist/lib/browser/operation-resolver-LTB63NKP.mjs.map +0 -7
  258. package/dist/lib/browser/react-root-6ARAPH3O.mjs.map +0 -7
  259. package/dist/lib/browser/react-surface-SO7B23GS.mjs.map +0 -7
  260. package/dist/lib/browser/spotlight-dismiss-VSNOPETH.mjs.map +0 -7
  261. package/dist/lib/browser/state-H4IGICBB.mjs.map +0 -7
  262. package/dist/lib/browser/url-handler-7CFGTLNG.mjs +0 -54
  263. package/dist/lib/browser/url-handler-7CFGTLNG.mjs.map +0 -7
  264. package/dist/lib/node-esm/chunk-EGFZAVBD.mjs +0 -614
  265. package/dist/lib/node-esm/chunk-EGFZAVBD.mjs.map +0 -7
  266. package/dist/lib/node-esm/chunk-MUVVYBUE.mjs.map +0 -7
  267. package/dist/lib/node-esm/operation-resolver-7O6O7T4Q.mjs +0 -169
  268. package/dist/lib/node-esm/operation-resolver-7O6O7T4Q.mjs.map +0 -7
  269. package/dist/lib/node-esm/react-root-2CPA2ZUS.mjs.map +0 -7
  270. package/dist/lib/node-esm/react-surface-FKAV56MO.mjs.map +0 -7
  271. package/dist/lib/node-esm/spotlight-dismiss-L5PCWIJG.mjs.map +0 -7
  272. package/dist/lib/node-esm/state-QIU2LMLT.mjs.map +0 -7
  273. package/dist/lib/node-esm/url-handler-4LYP3JM7.mjs +0 -55
  274. package/dist/lib/node-esm/url-handler-4LYP3JM7.mjs.map +0 -7
  275. package/dist/types/src/capabilities/operation-resolver/index.d.ts +0 -3
  276. package/dist/types/src/capabilities/operation-resolver/index.d.ts.map +0 -1
  277. package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts +0 -5
  278. package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts.map +0 -1
  279. package/dist/types/src/components/ContentError.d.ts +0 -5
  280. package/dist/types/src/components/ContentError.d.ts.map +0 -1
  281. package/dist/types/src/components/ContentLoading.d.ts +0 -3
  282. package/dist/types/src/components/ContentLoading.d.ts.map +0 -1
  283. package/dist/types/src/components/ContentLoading.stories.d.ts.map +0 -1
  284. package/dist/types/src/components/SimpleLayout/Banner.d.ts +0 -8
  285. package/dist/types/src/components/SimpleLayout/Banner.d.ts.map +0 -1
  286. package/dist/types/src/components/Workspace/Workspace.d.ts +0 -9
  287. package/dist/types/src/components/Workspace/Workspace.d.ts.map +0 -1
  288. package/dist/types/src/components/Workspace/index.d.ts +0 -2
  289. package/dist/types/src/components/Workspace/index.d.ts.map +0 -1
  290. package/src/capabilities/operation-resolver/index.ts +0 -10
  291. package/src/capabilities/operation-resolver/operation-resolver.ts +0 -178
  292. package/src/components/ContentError.tsx +0 -23
  293. package/src/components/SimpleLayout/Banner.tsx +0 -82
  294. package/src/components/Workspace/Workspace.tsx +0 -115
@@ -0,0 +1,87 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import { Atom } from '@effect-atom/atom-react';
6
+ import { useMemo } from 'react';
7
+
8
+ import { useCapability } from '@dxos/app-framework/ui';
9
+ import { useAppGraph } from '@dxos/app-toolkit/ui';
10
+ import { Node, useActionRunner } from '@dxos/plugin-graph';
11
+ import { useTranslation } from '@dxos/react-ui';
12
+ import {
13
+ type ActionExecutor,
14
+ type ActionGraphProps,
15
+ createGapSeparator,
16
+ createMenuItemGroup,
17
+ } from '@dxos/react-ui-menu';
18
+
19
+ import { meta } from '../meta';
20
+ import { SimpleLayoutState } from '../types';
21
+
22
+ import { createCompanionActions } from './actions';
23
+ import { useSimpleLayoutState } from './useSimpleLayoutState';
24
+
25
+ const MAIN_MENU_GROUP_ID = 'navbar-main-menu';
26
+
27
+ export type NavbarActions = {
28
+ /** Action graph atom for the navbar. */
29
+ actions: Atom.Atom<ActionGraphProps>;
30
+ /** Action executor callback. */
31
+ onAction: ActionExecutor;
32
+ };
33
+
34
+ /**
35
+ * Builds the navbar actions including companion icons, separator, and main menu dropdown.
36
+ * Derives everything from graph connection atoms for proper reactivity.
37
+ */
38
+ export const useNavbarActions = (): NavbarActions => {
39
+ const { t } = useTranslation(meta.id);
40
+ const { graph } = useAppGraph();
41
+ const runAction = useActionRunner();
42
+ const stateAtom = useCapability(SimpleLayoutState);
43
+ const { updateState } = useSimpleLayoutState();
44
+
45
+ // Create a computed atom that derives everything from graph connections and state.
46
+ const actionsAtom = useMemo(
47
+ () =>
48
+ Atom.make((get): ActionGraphProps => {
49
+ // Add companion actions.
50
+ const { nodes, edges } = createCompanionActions(graph, stateAtom, get, {
51
+ idPrefix: 'navbar',
52
+ updateState,
53
+ });
54
+
55
+ // Add gap separator.
56
+ const gapSeparator = createGapSeparator('navbar-gap');
57
+ nodes.push(...gapSeparator.nodes);
58
+ edges.push(...gapSeparator.edges);
59
+
60
+ // Add main menu dropdown group.
61
+ const mainMenuGroup = createMenuItemGroup(MAIN_MENU_GROUP_ID, {
62
+ variant: 'dropdownMenu',
63
+ icon: 'ph--list--regular',
64
+ iconOnly: true,
65
+ label: t('main menu label'),
66
+ testId: 'simpleLayoutPlugin.addSpace',
67
+ });
68
+ nodes.push(mainMenuGroup);
69
+ edges.push({ source: 'root', target: mainMenuGroup.id, relation: 'child' });
70
+
71
+ // Get menu actions from root actions (on 'action' edge relation).
72
+ const rootActions = get(graph.actions(Node.RootId));
73
+ const menuActions = rootActions.filter((node) => node.properties.disposition === 'menu');
74
+
75
+ // Add menu actions as children of the dropdown group.
76
+ menuActions.forEach((menuAction) => {
77
+ nodes.push(menuAction as ActionGraphProps['nodes'][number]);
78
+ edges.push({ source: MAIN_MENU_GROUP_ID, target: menuAction.id, relation: 'child' });
79
+ });
80
+
81
+ return { nodes, edges };
82
+ }),
83
+ [graph, stateAtom, updateState, t],
84
+ );
85
+
86
+ return { actions: actionsAtom, onAction: runAction };
87
+ };
@@ -5,18 +5,18 @@
5
5
  import { RegistryContext, useAtomValue } from '@effect-atom/atom-react';
6
6
  import { useCallback, useContext } from 'react';
7
7
 
8
- import { useCapability } from '@dxos/app-framework/react';
8
+ import { useCapability } from '@dxos/app-framework/ui';
9
9
 
10
- import { type SimpleLayoutState, SimpleLayoutState as SimpleLayoutStateCapability } from '../types';
10
+ import { SimpleLayoutState } from '../types';
11
11
 
12
- export type SimpleLayoutStateHook = {
12
+ export type UseSimpleLayoutState = {
13
13
  state: SimpleLayoutState;
14
14
  updateState: (fn: (current: SimpleLayoutState) => SimpleLayoutState) => void;
15
15
  };
16
16
 
17
- export const useSimpleLayoutState = (): SimpleLayoutStateHook => {
17
+ export const useSimpleLayoutState = (): UseSimpleLayoutState => {
18
18
  const registry = useContext(RegistryContext);
19
- const stateAtom = useCapability(SimpleLayoutStateCapability);
19
+ const stateAtom = useCapability(SimpleLayoutState);
20
20
  const state = useAtomValue(stateAtom);
21
21
 
22
22
  const updateState = useCallback(
package/src/meta.ts CHANGED
@@ -6,7 +6,7 @@ import { type Plugin } from '@dxos/app-framework';
6
6
  import { trim } from '@dxos/util';
7
7
 
8
8
  export const meta: Plugin.Meta = {
9
- id: 'dxos.org/plugin/simple-layout',
9
+ id: 'org.dxos.plugin.simple-layout',
10
10
  name: 'Simple Layout',
11
11
  description: trim`
12
12
  Minimal layout plugin for simplified UI contexts like popover windows.
@@ -0,0 +1,34 @@
1
+ // Copyright 2025 DXOS.org
2
+
3
+ import * as Effect from 'effect/Effect';
4
+
5
+ import { LayoutOperation } from '@dxos/app-toolkit';
6
+ import { Operation } from '@dxos/operation';
7
+
8
+ import { layoutStateAccess } from './state-access';
9
+
10
+ const handler: Operation.WithHandler<typeof LayoutOperation.Close> = LayoutOperation.Close.pipe(
11
+ Operation.withHandler(
12
+ Effect.fnUntraced(function* () {
13
+ const { updateState } = yield* layoutStateAccess;
14
+
15
+ updateState((state) => {
16
+ if (state.history.length > 0) {
17
+ const newHistory = [...state.history];
18
+ const previousActive = newHistory.pop();
19
+ return {
20
+ ...state,
21
+ active: previousActive,
22
+ history: newHistory,
23
+ };
24
+ }
25
+ return {
26
+ ...state,
27
+ active: undefined,
28
+ };
29
+ });
30
+ }),
31
+ ),
32
+ );
33
+
34
+ export default handler;
@@ -0,0 +1,16 @@
1
+ // Copyright 2025 DXOS.org
2
+
3
+ import { OperationHandlerSet } from '@dxos/operation';
4
+
5
+ export const SimpleLayoutOperationHandlerSet = OperationHandlerSet.lazy(
6
+ () => import('./close'),
7
+ () => import('./open'),
8
+ () => import('./revert-workspace'),
9
+ () => import('./set'),
10
+ () => import('./set-layout-mode'),
11
+ () => import('./switch-workspace'),
12
+ () => import('./update-complementary'),
13
+ () => import('./update-dialog'),
14
+ () => import('./update-popover'),
15
+ () => import('./update-sidebar'),
16
+ );
@@ -0,0 +1,32 @@
1
+ // Copyright 2025 DXOS.org
2
+
3
+ import * as Effect from 'effect/Effect';
4
+
5
+ import { LayoutOperation } from '@dxos/app-toolkit';
6
+ import { Operation } from '@dxos/operation';
7
+
8
+ import { layoutStateAccess } from './state-access';
9
+
10
+ const handler: Operation.WithHandler<typeof LayoutOperation.Open> = LayoutOperation.Open.pipe(
11
+ Operation.withHandler(
12
+ Effect.fnUntraced(function* (input) {
13
+ const { updateState } = yield* layoutStateAccess;
14
+ const id = input.subject[0];
15
+
16
+ updateState((state) => {
17
+ const newHistory = state.active ? [...state.history, state.active] : state.history;
18
+ const trimmedHistory =
19
+ newHistory.length > MAX_HISTORY_LENGTH ? newHistory.slice(-MAX_HISTORY_LENGTH) : newHistory;
20
+ return {
21
+ ...state,
22
+ active: id,
23
+ history: trimmedHistory,
24
+ };
25
+ });
26
+ }),
27
+ ),
28
+ );
29
+
30
+ export default handler;
31
+
32
+ const MAX_HISTORY_LENGTH = 50;
@@ -0,0 +1,22 @@
1
+ // Copyright 2025 DXOS.org
2
+
3
+ import * as Effect from 'effect/Effect';
4
+
5
+ import { LayoutOperation } from '@dxos/app-toolkit';
6
+ import { Operation } from '@dxos/operation';
7
+
8
+ import { layoutStateAccess } from './state-access';
9
+
10
+ const handler: Operation.WithHandler<typeof LayoutOperation.RevertWorkspace> = LayoutOperation.RevertWorkspace.pipe(
11
+ Operation.withHandler(
12
+ Effect.fnUntraced(function* () {
13
+ const { getState } = yield* layoutStateAccess;
14
+ const state = getState();
15
+ yield* Operation.invoke(LayoutOperation.SwitchWorkspace, {
16
+ subject: state.previousWorkspace,
17
+ });
18
+ }),
19
+ ),
20
+ );
21
+
22
+ export default handler;
@@ -0,0 +1,12 @@
1
+ // Copyright 2025 DXOS.org
2
+
3
+ import * as Effect from 'effect/Effect';
4
+
5
+ import { LayoutOperation } from '@dxos/app-toolkit';
6
+ import { Operation } from '@dxos/operation';
7
+
8
+ const handler: Operation.WithHandler<typeof LayoutOperation.SetLayoutMode> = LayoutOperation.SetLayoutMode.pipe(
9
+ Operation.withHandler(Effect.fnUntraced(function* () {})),
10
+ );
11
+
12
+ export default handler;
@@ -0,0 +1,23 @@
1
+ // Copyright 2025 DXOS.org
2
+
3
+ import * as Effect from 'effect/Effect';
4
+
5
+ import { LayoutOperation } from '@dxos/app-toolkit';
6
+ import { Operation } from '@dxos/operation';
7
+
8
+ import { layoutStateAccess } from './state-access';
9
+
10
+ const handler: Operation.WithHandler<typeof LayoutOperation.Set> = LayoutOperation.Set.pipe(
11
+ Operation.withHandler(
12
+ Effect.fnUntraced(function* (input) {
13
+ const { updateState } = yield* layoutStateAccess;
14
+
15
+ updateState((state) => ({
16
+ ...state,
17
+ active: input.subject[0],
18
+ }));
19
+ }),
20
+ ),
21
+ );
22
+
23
+ export default handler;
@@ -0,0 +1,19 @@
1
+ // Copyright 2025 DXOS.org
2
+
3
+ import * as Effect from 'effect/Effect';
4
+
5
+ import { Capabilities, Capability } from '@dxos/app-framework';
6
+
7
+ import { type SimpleLayoutState, SimpleLayoutState as SimpleLayoutStateCapability } from '../types';
8
+
9
+ export const layoutStateAccess = Effect.gen(function* () {
10
+ const registry = yield* Capability.get(Capabilities.AtomRegistry);
11
+ const stateAtom = yield* Capability.get(SimpleLayoutStateCapability);
12
+
13
+ return {
14
+ getState: () => registry.get(stateAtom),
15
+ updateState: (fn: (current: SimpleLayoutState) => SimpleLayoutState) => {
16
+ registry.set(stateAtom, fn(registry.get(stateAtom)));
17
+ },
18
+ };
19
+ });
@@ -0,0 +1,26 @@
1
+ // Copyright 2025 DXOS.org
2
+
3
+ import * as Effect from 'effect/Effect';
4
+
5
+ import { isPinnedWorkspace, LayoutOperation } from '@dxos/app-toolkit';
6
+ import { Operation } from '@dxos/operation';
7
+
8
+ import { layoutStateAccess } from './state-access';
9
+
10
+ const handler: Operation.WithHandler<typeof LayoutOperation.SwitchWorkspace> = LayoutOperation.SwitchWorkspace.pipe(
11
+ Operation.withHandler(
12
+ Effect.fnUntraced(function* (input) {
13
+ const { updateState } = yield* layoutStateAccess;
14
+
15
+ updateState((state) => ({
16
+ ...state,
17
+ previousWorkspace: !isPinnedWorkspace(state.workspace) ? state.workspace : state.previousWorkspace,
18
+ workspace: input.subject,
19
+ active: undefined,
20
+ history: [],
21
+ }));
22
+ }),
23
+ ),
24
+ );
25
+
26
+ export default handler;
@@ -0,0 +1,34 @@
1
+ // Copyright 2025 DXOS.org
2
+
3
+ import * as Effect from 'effect/Effect';
4
+
5
+ import { getCompanionVariant, LayoutOperation } from '@dxos/app-toolkit';
6
+ import { Operation } from '@dxos/operation';
7
+
8
+ import { layoutStateAccess } from './state-access';
9
+
10
+ const handler: Operation.WithHandler<typeof LayoutOperation.UpdateComplementary> =
11
+ LayoutOperation.UpdateComplementary.pipe(
12
+ Operation.withHandler(
13
+ Effect.fnUntraced(function* (input) {
14
+ const { updateState } = yield* layoutStateAccess;
15
+
16
+ if (input.state === 'closed') {
17
+ updateState((state) => ({
18
+ ...state,
19
+ drawerState: 'closed',
20
+ companionVariant: undefined,
21
+ }));
22
+ } else if (input.subject) {
23
+ const variant = getCompanionVariant(input.subject);
24
+ updateState((state) => ({
25
+ ...state,
26
+ companionVariant: variant,
27
+ drawerState: input.state === 'expanded' ? 'expanded' : 'open',
28
+ }));
29
+ }
30
+ }),
31
+ ),
32
+ );
33
+
34
+ export default handler;
@@ -0,0 +1,28 @@
1
+ // Copyright 2025 DXOS.org
2
+
3
+ import * as Effect from 'effect/Effect';
4
+
5
+ import { LayoutOperation } from '@dxos/app-toolkit';
6
+ import { Operation } from '@dxos/operation';
7
+
8
+ import { layoutStateAccess } from './state-access';
9
+
10
+ const handler: Operation.WithHandler<typeof LayoutOperation.UpdateDialog> = LayoutOperation.UpdateDialog.pipe(
11
+ Operation.withHandler(
12
+ Effect.fnUntraced(function* (input) {
13
+ const { updateState } = yield* layoutStateAccess;
14
+
15
+ updateState((state) => ({
16
+ ...state,
17
+ dialogOpen: input.state ?? Boolean(input.subject),
18
+ dialogType: input.type ?? 'default',
19
+ dialogBlockAlign: input.blockAlign ?? 'center',
20
+ dialogOverlayClasses: input.overlayClasses,
21
+ dialogOverlayStyle: input.overlayStyle,
22
+ dialogContent: input.subject ? { component: input.subject, props: input.props } : undefined,
23
+ }));
24
+ }),
25
+ ),
26
+ );
27
+
28
+ export default handler;
@@ -0,0 +1,35 @@
1
+ // Copyright 2025 DXOS.org
2
+
3
+ import * as Effect from 'effect/Effect';
4
+
5
+ import { LayoutOperation } from '@dxos/app-toolkit';
6
+ import { Operation } from '@dxos/operation';
7
+
8
+ import { layoutStateAccess } from './state-access';
9
+
10
+ const handler: Operation.WithHandler<typeof LayoutOperation.UpdatePopover> = LayoutOperation.UpdatePopover.pipe(
11
+ Operation.withHandler(
12
+ Effect.fnUntraced(function* (input) {
13
+ const { updateState } = yield* layoutStateAccess;
14
+
15
+ updateState((state) => ({
16
+ ...state,
17
+ popoverOpen: input.state ?? Boolean(input.subject),
18
+ popoverKind: input.kind ?? 'base',
19
+ popoverTitle: input.kind === 'card' ? input.title : undefined,
20
+ popoverContent:
21
+ typeof input.subject === 'string'
22
+ ? { component: input.subject, props: input.props }
23
+ : input.subject
24
+ ? { subject: input.subject }
25
+ : undefined,
26
+ popoverSide: input.side,
27
+ popoverVariant: input.variant,
28
+ popoverAnchor: input.variant === 'virtual' ? input.anchor : state.popoverAnchor,
29
+ popoverAnchorId: input.variant !== 'virtual' ? input.anchorId : state.popoverAnchorId,
30
+ }));
31
+ }),
32
+ ),
33
+ );
34
+
35
+ export default handler;
@@ -0,0 +1,12 @@
1
+ // Copyright 2025 DXOS.org
2
+
3
+ import * as Effect from 'effect/Effect';
4
+
5
+ import { LayoutOperation } from '@dxos/app-toolkit';
6
+ import { Operation } from '@dxos/operation';
7
+
8
+ const handler: Operation.WithHandler<typeof LayoutOperation.UpdateSidebar> = LayoutOperation.UpdateSidebar.pipe(
9
+ Operation.withHandler(() => Effect.void),
10
+ );
11
+
12
+ export default handler;
@@ -3,10 +3,12 @@
3
3
  //
4
4
 
5
5
  import { type Resource } from '@dxos/react-ui';
6
+ import { translations as searchTranslations } from '@dxos/react-ui-search';
6
7
 
7
8
  import { meta } from './meta';
8
9
 
9
10
  export const translations = [
11
+ ...searchTranslations,
10
12
  {
11
13
  'en-US': {
12
14
  [meta.id]: {
@@ -20,8 +22,13 @@ export const translations = [
20
22
  'profile label': 'Profile',
21
23
  'app menu label': 'App menu',
22
24
  'main menu label': 'Main menu',
25
+ 'companions menu label': 'Companions',
23
26
  'error fallback message': 'An error occurred',
24
- 'search placeholder': 'Search...',
27
+ 'drawer label': 'Drawer',
28
+ 'close drawer label': 'Close drawer',
29
+ 'expand drawer label': 'Expand drawer',
30
+ 'collapse drawer label': 'Collapse drawer',
31
+ 'actions menu label': 'Actions',
25
32
  },
26
33
  },
27
34
  },
@@ -9,11 +9,17 @@ import { type Label } from '@dxos/react-ui';
9
9
 
10
10
  import { meta } from '../meta';
11
11
 
12
+ export type DrawerState = 'closed' | 'open' | 'expanded';
13
+
12
14
  // TODO(wittjosiah): Handle toasts.
13
15
  export type SimpleLayoutState = {
14
16
  /** Data to be passed to the main content Surface. */
15
17
  content?: any;
16
18
 
19
+ previousWorkspace: string;
20
+ workspace: string;
21
+ active?: string;
22
+
17
23
  dialogOpen: boolean;
18
24
  dialogType?: 'default' | 'alert';
19
25
  dialogBlockAlign?: 'start' | 'center' | 'end';
@@ -31,14 +37,17 @@ export type SimpleLayoutState = {
31
37
  popoverTitle?: Label;
32
38
  popoverContent?: any;
33
39
 
34
- workspace: string;
35
- previousWorkspace: string;
36
- active?: string;
40
+ /** Bottom drawer state. */
41
+ drawerState: DrawerState;
42
+
37
43
  /** Stack of previously active item IDs for back navigation. */
38
44
  history: string[];
39
45
 
40
46
  /** Whether running in popover window context (hides mobile-specific UI). */
41
47
  isPopover?: boolean;
48
+
49
+ /** Variant of the companion to display in the drawer (e.g., "comments", "assistant-chat"). */
50
+ companionVariant?: string;
42
51
  };
43
52
 
44
- export const SimpleLayoutState = Capability.make<Atom.Writable<SimpleLayoutState>>(`${meta.id}/state`);
53
+ export const SimpleLayoutState = Capability.make<Atom.Writable<SimpleLayoutState>>(`${meta.id}.state`);
@@ -2,13 +2,14 @@
2
2
  // Copyright 2025 DXOS.org
3
3
  //
4
4
 
5
- import { type ActivationEvent, Common } from '@dxos/app-framework';
5
+ import { type ActivationEvent } from '@dxos/app-framework';
6
+ import { AppActivationEvents } from '@dxos/app-toolkit';
6
7
 
7
8
  import { SimpleLayoutState } from './capabilities';
8
9
 
9
10
  export namespace SimpleLayoutEvents {
10
11
  /** Fired when SimpleLayoutState capability is ready. */
11
- export const StateReady: ActivationEvent.ActivationEvent = Common.ActivationEvent.createStateEvent(
12
+ export const StateReady: ActivationEvent.ActivationEvent = AppActivationEvents.createStateEvent(
12
13
  SimpleLayoutState.identifier,
13
14
  );
14
15
  }
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/meta.ts", "../../../src/types/capabilities.ts", "../../../src/types/events.ts"],
4
- "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { type Plugin } from '@dxos/app-framework';\nimport { trim } from '@dxos/util';\n\nexport const meta: Plugin.Meta = {\n id: 'dxos.org/plugin/simple-layout',\n name: 'Simple Layout',\n description: trim`\n Minimal layout plugin for simplified UI contexts like popover windows.\n Provides basic content rendering without sidebars or complex navigation.\n `,\n icon: 'ph--layout--regular',\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { type Atom } from '@effect-atom/atom-react';\n\nimport { Capability } from '@dxos/app-framework';\nimport { type Label } from '@dxos/react-ui';\n\nimport { meta } from '../meta';\n\n// TODO(wittjosiah): Handle toasts.\nexport type SimpleLayoutState = {\n /** Data to be passed to the main content Surface. */\n content?: any;\n\n dialogOpen: boolean;\n dialogType?: 'default' | 'alert';\n dialogBlockAlign?: 'start' | 'center' | 'end';\n dialogOverlayClasses?: string;\n dialogOverlayStyle?: Record<string, any>;\n /** Data to be passed to the dialog Surface. */\n dialogContent?: any;\n\n popoverOpen?: boolean;\n popoverSide?: 'top' | 'right' | 'bottom' | 'left';\n popoverVariant?: 'virtual' | 'react';\n popoverAnchor?: HTMLButtonElement;\n popoverAnchorId?: string;\n popoverKind?: 'base' | 'card';\n popoverTitle?: Label;\n popoverContent?: any;\n\n workspace: string;\n previousWorkspace: string;\n active?: string;\n /** Stack of previously active item IDs for back navigation. */\n history: string[];\n\n /** Whether running in popover window context (hides mobile-specific UI). */\n isPopover?: boolean;\n};\n\nexport const SimpleLayoutState = Capability.make<Atom.Writable<SimpleLayoutState>>(`${meta.id}/state`);\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { type ActivationEvent, Common } from '@dxos/app-framework';\n\nimport { SimpleLayoutState } from './capabilities';\n\nexport namespace SimpleLayoutEvents {\n /** Fired when SimpleLayoutState capability is ready. */\n export const StateReady: ActivationEvent.ActivationEvent = Common.ActivationEvent.createStateEvent(\n SimpleLayoutState.identifier,\n );\n}\n"],
5
- "mappings": ";AAKA,SAASA,YAAY;AAEd,IAAMC,OAAoB;EAC/BC,IAAI;EACJC,MAAM;EACNC,aAAaC;;;;EAIbC,MAAM;AACR;;;ACTA,SAASC,kBAAkB;AAqCpB,IAAMC,oBAAoBC,WAAWC,KAAuC,GAAGC,KAAKC,EAAE,QAAQ;;;ACvCrG,SAA+BC,cAAc;UAI5BC,qBAAAA;sBAEFC,aAA8CC,OAAOC,gBAAgBC,iBAChFC,kBAAkBC,UAAU;AAEhC,GALiBN,uBAAAA,qBAAAA,CAAAA,EAAAA;;",
6
- "names": ["trim", "meta", "id", "name", "description", "trim", "icon", "Capability", "SimpleLayoutState", "Capability", "make", "meta", "id", "Common", "SimpleLayoutEvents", "StateReady", "Common", "ActivationEvent", "createStateEvent", "SimpleLayoutState", "identifier"]
7
- }