@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,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/capabilities/spotlight-dismiss/spotlight-dismiss.ts"],
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"]
7
+ }
@@ -1,18 +1,21 @@
1
1
  import {
2
2
  SimpleLayoutState
3
- } from "./chunk-CLPGTNWJ.mjs";
3
+ } from "./chunk-MRR7PXSM.mjs";
4
4
 
5
5
  // src/capabilities/state/state.tsx
6
6
  import { Atom } from "@effect-atom/atom-react";
7
7
  import * as Effect from "effect/Effect";
8
- import { Capability, Common } from "@dxos/app-framework";
8
+ import { Capability } from "@dxos/app-framework";
9
+ import { AppCapabilities } from "@dxos/app-toolkit";
9
10
  import { Node } from "@dxos/plugin-graph";
10
11
  var defaultState = {
11
12
  dialogOpen: false,
12
13
  workspace: Node.RootId,
13
14
  previousWorkspace: Node.RootId,
14
15
  history: [],
15
- isPopover: false
16
+ isPopover: false,
17
+ companionVariant: void 0,
18
+ drawerState: "closed"
16
19
  };
17
20
  var state_default = Capability.makeModule(({ initialState } = {}) => Effect.sync(() => {
18
21
  const stateAtom = Atom.make({
@@ -36,10 +39,10 @@ var state_default = Capability.makeModule(({ initialState } = {}) => Effect.sync
36
39
  });
37
40
  return [
38
41
  Capability.contributes(SimpleLayoutState, stateAtom),
39
- Capability.contributes(Common.Capability.Layout, layoutAtom)
42
+ Capability.contributes(AppCapabilities.Layout, layoutAtom)
40
43
  ];
41
44
  }));
42
45
  export {
43
46
  state_default as default
44
47
  };
45
- //# sourceMappingURL=state-H4IGICBB.mjs.map
48
+ //# sourceMappingURL=state-TXSMUWYI.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/capabilities/state/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 { type SimpleLayoutState } from '../../types';\nimport { SimpleLayoutState as SimpleLayoutStateCapability } from '../../types';\n\nconst defaultState: 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<SimpleLayoutState>;\n};\n\nexport default Capability.makeModule(({ initialState }: SimpleLayoutStateOptions = {}) =>\n Effect.sync(() => {\n const stateAtom = Atom.make<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(SimpleLayoutStateCapability, 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;AAKrB,IAAMC,eAAkC;EACtCC,YAAY;EACZC,WAAWC,KAAKC;EAChBC,mBAAmBF,KAAKC;EACxBE,SAAS,CAAA;EACTC,WAAW;EACXC,kBAAkBC;EAClBC,aAAa;AACf;AAMA,IAAA,gBAAeC,WAAWC,WAAW,CAAC,EAAEC,aAAY,IAA+B,CAAC,MAC3EC,YAAK,MAAA;AACV,QAAMC,YAAYC,KAAKC,KAAwB;IAAE,GAAGjB;IAAc,GAAGa;EAAa,CAAA;AAElF,QAAMK,aAAaF,KAAKC,KAAK,CAACE,QAAAA;AAC5B,UAAMC,QAAQD,IAAIJ,SAAAA;AAClB,WAAO;MACLM,MAAM;MACNpB,YAAYmB,MAAMnB;MAClBqB,aAAa;MACbC,0BAA0B;MAC1BrB,WAAWkB,MAAMlB;MACjBsB,QAAQJ,MAAMI,SAAS;QAACJ,MAAMI;UAAU,CAAA;MACxCC,UAAU,CAAA;MACVC,gBAAgBjB;IAClB;EACF,CAAA;AAEA,SAAO;IACLE,WAAWgB,YAAYC,mBAA6Bb,SAAAA;IACpDJ,WAAWgB,YAAYE,gBAAgBC,QAAQZ,UAAAA;;AAEnD,CAAA,CAAA;",
6
+ "names": ["Atom", "Effect", "Capability", "AppCapabilities", "Node", "defaultState", "dialogOpen", "workspace", "Node", "RootId", "previousWorkspace", "history", "isPopover", "companionVariant", "undefined", "drawerState", "Capability", "makeModule", "initialState", "sync", "stateAtom", "Atom", "make", "layoutAtom", "get", "state", "mode", "sidebarOpen", "complementarySidebarOpen", "active", "inactive", "scrollIntoView", "contributes", "SimpleLayoutStateCapability", "AppCapabilities", "Layout"]
7
+ }
@@ -0,0 +1,24 @@
1
+ import {
2
+ layoutStateAccess
3
+ } from "./chunk-XJVW3PRY.mjs";
4
+ import "./chunk-MRR7PXSM.mjs";
5
+
6
+ // src/operations/switch-workspace.ts
7
+ import * as Effect from "effect/Effect";
8
+ import { isPinnedWorkspace, LayoutOperation } from "@dxos/app-toolkit";
9
+ import { Operation } from "@dxos/operation";
10
+ var handler = LayoutOperation.SwitchWorkspace.pipe(Operation.withHandler(Effect.fnUntraced(function* (input) {
11
+ const { updateState } = yield* layoutStateAccess;
12
+ updateState((state) => ({
13
+ ...state,
14
+ previousWorkspace: !isPinnedWorkspace(state.workspace) ? state.workspace : state.previousWorkspace,
15
+ workspace: input.subject,
16
+ active: void 0,
17
+ history: []
18
+ }));
19
+ })));
20
+ var switch_workspace_default = handler;
21
+ export {
22
+ switch_workspace_default as default
23
+ };
24
+ //# sourceMappingURL=switch-workspace-5Y6T4BWJ.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 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"],
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
+ "names": ["Effect", "isPinnedWorkspace", "LayoutOperation", "Operation", "handler", "LayoutOperation", "SwitchWorkspace", "pipe", "Operation", "withHandler", "fnUntraced", "input", "updateState", "layoutStateAccess", "state", "previousWorkspace", "isPinnedWorkspace", "workspace", "subject", "active", "undefined", "history"]
7
+ }
@@ -0,0 +1,31 @@
1
+ import {
2
+ layoutStateAccess
3
+ } from "./chunk-XJVW3PRY.mjs";
4
+ import "./chunk-MRR7PXSM.mjs";
5
+
6
+ // src/operations/update-complementary.ts
7
+ import * as Effect from "effect/Effect";
8
+ import { getCompanionVariant, LayoutOperation } from "@dxos/app-toolkit";
9
+ import { Operation } from "@dxos/operation";
10
+ var handler = LayoutOperation.UpdateComplementary.pipe(Operation.withHandler(Effect.fnUntraced(function* (input) {
11
+ const { updateState } = yield* layoutStateAccess;
12
+ if (input.state === "closed") {
13
+ updateState((state) => ({
14
+ ...state,
15
+ drawerState: "closed",
16
+ companionVariant: void 0
17
+ }));
18
+ } else if (input.subject) {
19
+ const variant = getCompanionVariant(input.subject);
20
+ updateState((state) => ({
21
+ ...state,
22
+ companionVariant: variant,
23
+ drawerState: input.state === "expanded" ? "expanded" : "open"
24
+ }));
25
+ }
26
+ })));
27
+ var update_complementary_default = handler;
28
+ export {
29
+ update_complementary_default as default
30
+ };
31
+ //# sourceMappingURL=update-complementary-MX3TTVAB.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 { getCompanionVariant, LayoutOperation } from '@dxos/app-toolkit';\nimport { Operation } from '@dxos/operation';\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 = getCompanionVariant(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,qBAAqBC,uBAAuB;AACrD,SAASC,iBAAiB;AAI1B,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,oBAAoBT,MAAMO,OAAO;AACjDN,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", "getCompanionVariant", "LayoutOperation", "Operation", "handler", "LayoutOperation", "UpdateComplementary", "pipe", "Operation", "withHandler", "fnUntraced", "input", "updateState", "layoutStateAccess", "state", "drawerState", "companionVariant", "undefined", "subject", "variant", "getCompanionVariant"]
7
+ }
@@ -0,0 +1,29 @@
1
+ import {
2
+ layoutStateAccess
3
+ } from "./chunk-XJVW3PRY.mjs";
4
+ import "./chunk-MRR7PXSM.mjs";
5
+
6
+ // src/operations/update-dialog.ts
7
+ import * as Effect from "effect/Effect";
8
+ import { LayoutOperation } from "@dxos/app-toolkit";
9
+ import { Operation } from "@dxos/operation";
10
+ var handler = LayoutOperation.UpdateDialog.pipe(Operation.withHandler(Effect.fnUntraced(function* (input) {
11
+ const { updateState } = yield* layoutStateAccess;
12
+ updateState((state) => ({
13
+ ...state,
14
+ dialogOpen: input.state ?? Boolean(input.subject),
15
+ dialogType: input.type ?? "default",
16
+ dialogBlockAlign: input.blockAlign ?? "center",
17
+ dialogOverlayClasses: input.overlayClasses,
18
+ dialogOverlayStyle: input.overlayStyle,
19
+ dialogContent: input.subject ? {
20
+ component: input.subject,
21
+ props: input.props
22
+ } : void 0
23
+ }));
24
+ })));
25
+ var update_dialog_default = handler;
26
+ export {
27
+ update_dialog_default as default
28
+ };
29
+ //# sourceMappingURL=update-dialog-FPAPZXKO.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 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"],
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
+ "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
+ }
@@ -0,0 +1,33 @@
1
+ import {
2
+ layoutStateAccess
3
+ } from "./chunk-XJVW3PRY.mjs";
4
+ import "./chunk-MRR7PXSM.mjs";
5
+
6
+ // src/operations/update-popover.ts
7
+ import * as Effect from "effect/Effect";
8
+ import { LayoutOperation } from "@dxos/app-toolkit";
9
+ import { Operation } from "@dxos/operation";
10
+ var handler = LayoutOperation.UpdatePopover.pipe(Operation.withHandler(Effect.fnUntraced(function* (input) {
11
+ const { updateState } = yield* layoutStateAccess;
12
+ updateState((state) => ({
13
+ ...state,
14
+ popoverOpen: input.state ?? Boolean(input.subject),
15
+ popoverKind: input.kind ?? "base",
16
+ popoverTitle: input.kind === "card" ? input.title : void 0,
17
+ popoverContent: typeof input.subject === "string" ? {
18
+ component: input.subject,
19
+ props: input.props
20
+ } : input.subject ? {
21
+ subject: input.subject
22
+ } : void 0,
23
+ popoverSide: input.side,
24
+ popoverVariant: input.variant,
25
+ popoverAnchor: input.variant === "virtual" ? input.anchor : state.popoverAnchor,
26
+ popoverAnchorId: input.variant !== "virtual" ? input.anchorId : state.popoverAnchorId
27
+ }));
28
+ })));
29
+ var update_popover_default = handler;
30
+ export {
31
+ update_popover_default as default
32
+ };
33
+ //# sourceMappingURL=update-popover-6V5ZTIYN.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 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"],
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
+ "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
+ }
@@ -0,0 +1,10 @@
1
+ // src/operations/update-sidebar.ts
2
+ import * as Effect from "effect/Effect";
3
+ import { LayoutOperation } from "@dxos/app-toolkit";
4
+ import { Operation } from "@dxos/operation";
5
+ var handler = LayoutOperation.UpdateSidebar.pipe(Operation.withHandler(() => Effect.void));
6
+ var update_sidebar_default = handler;
7
+ export {
8
+ update_sidebar_default as default
9
+ };
10
+ //# sourceMappingURL=update-sidebar-WHDKYMV7.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/operation';\n\nconst handler: Operation.WithHandler<typeof LayoutOperation.UpdateSidebar> = LayoutOperation.UpdateSidebar.pipe(\n Operation.withHandler(() => Effect.void),\n);\n\nexport default handler;\n"],
5
+ "mappings": ";AAEA,YAAYA,YAAY;AAExB,SAASC,uBAAuB;AAChC,SAASC,iBAAiB;AAE1B,IAAMC,UAAuEC,gBAAgBC,cAAcC,KACzGC,UAAUC,YAAY,MAAaC,WAAI,CAAA;AAGzC,IAAA,yBAAeN;",
6
+ "names": ["Effect", "LayoutOperation", "Operation", "handler", "LayoutOperation", "UpdateSidebar", "pipe", "Operation", "withHandler", "void"]
7
+ }
@@ -0,0 +1,163 @@
1
+ import {
2
+ SimpleLayoutState
3
+ } from "./chunk-MRR7PXSM.mjs";
4
+
5
+ // src/capabilities/url-handler/url-handler.ts
6
+ import * as Effect from "effect/Effect";
7
+ import { Capabilities, Capability } from "@dxos/app-framework";
8
+ import { LayoutOperation, fromUrlPath, getWorkspaceFromPath, toUrlPath } from "@dxos/app-toolkit";
9
+ import { log } from "@dxos/log";
10
+ import { isTauri } from "@dxos/util";
11
+ var __dxlog_file = "/__w/dxos/dxos/packages/plugins/plugin-simple-layout/src/capabilities/url-handler/url-handler.ts";
12
+ var url_handler_default = Capability.makeModule(Effect.fnUntraced(function* () {
13
+ const { invokePromise } = yield* Capability.get(Capabilities.OperationInvoker);
14
+ const handlePathNavigation = (pathname) => {
15
+ if (isFilePath(pathname)) {
16
+ log.info("[UrlHandler] Skipping file path (not a graph node)", {
17
+ pathname
18
+ }, {
19
+ F: __dxlog_file,
20
+ L: 31,
21
+ S: this,
22
+ C: (f, a) => f(...a)
23
+ });
24
+ pathname = "/";
25
+ }
26
+ log.info("[UrlHandler] Navigating to path", {
27
+ pathname
28
+ }, {
29
+ F: __dxlog_file,
30
+ L: 35,
31
+ S: this,
32
+ C: (f, a) => f(...a)
33
+ });
34
+ const qualifiedId = fromUrlPath(pathname);
35
+ const workspace = getWorkspaceFromPath(qualifiedId);
36
+ void invokePromise(LayoutOperation.SwitchWorkspace, {
37
+ subject: workspace
38
+ });
39
+ const activeId = qualifiedId !== workspace ? qualifiedId : void 0;
40
+ if (activeId) {
41
+ void invokePromise(LayoutOperation.Open, {
42
+ subject: [
43
+ activeId
44
+ ]
45
+ });
46
+ }
47
+ };
48
+ const onNavigation = handleNavigation(handlePathNavigation);
49
+ yield* Effect.sync(() => onNavigation());
50
+ window.addEventListener("popstate", onNavigation);
51
+ let unlistenDeepLink;
52
+ if (isTauri()) {
53
+ yield* Effect.tryPromise({
54
+ try: async () => {
55
+ const { getCurrent, onOpenUrl } = await import("@tauri-apps/plugin-deep-link");
56
+ const launchUrls = await getCurrent();
57
+ if (launchUrls && launchUrls.length > 0) {
58
+ log.info("[UrlHandler] App launched with deep links", {
59
+ urls: launchUrls
60
+ }, {
61
+ F: __dxlog_file,
62
+ L: 61,
63
+ S: this,
64
+ C: (f, a) => f(...a)
65
+ });
66
+ for (const url of launchUrls) {
67
+ handleDeepLink(url, handlePathNavigation);
68
+ }
69
+ }
70
+ unlistenDeepLink = await onOpenUrl((urls) => {
71
+ log.info("[UrlHandler] Deep links received", {
72
+ urls
73
+ }, {
74
+ F: __dxlog_file,
75
+ L: 68,
76
+ S: this,
77
+ C: (f, a) => f(...a)
78
+ });
79
+ for (const url of urls) {
80
+ handleDeepLink(url, handlePathNavigation);
81
+ }
82
+ });
83
+ log.info("[UrlHandler] Deep link listener initialized", void 0, {
84
+ F: __dxlog_file,
85
+ L: 74,
86
+ S: this,
87
+ C: (f, a) => f(...a)
88
+ });
89
+ },
90
+ catch: (error) => {
91
+ log.warn("[UrlHandler] Failed to initialize deep link listener", {
92
+ error
93
+ }, {
94
+ F: __dxlog_file,
95
+ L: 77,
96
+ S: this,
97
+ C: (f, a) => f(...a)
98
+ });
99
+ return error;
100
+ }
101
+ }).pipe(Effect.catchAll(() => Effect.void));
102
+ }
103
+ let lastWorkspace;
104
+ let lastActive;
105
+ const unsubscribe = yield* Capabilities.subscribeAtom(SimpleLayoutState, (state) => {
106
+ const { workspace, active } = state;
107
+ if (workspace !== lastWorkspace || active !== lastActive) {
108
+ lastWorkspace = workspace;
109
+ lastActive = active;
110
+ const path = active ? toUrlPath(active) : toUrlPath(workspace);
111
+ if (window.location.pathname !== path) {
112
+ history.pushState(null, "", `${path}${window.location.search}`);
113
+ }
114
+ }
115
+ });
116
+ return Capability.contributes(Capabilities.Null, null, () => Effect.sync(() => {
117
+ window.removeEventListener("popstate", onNavigation);
118
+ unsubscribe();
119
+ unlistenDeepLink?.();
120
+ }));
121
+ }));
122
+ var isRedirectPath = (pathname) => pathname.startsWith("/redirect/");
123
+ var isFilePath = (pathname) => /\.[a-z]+$/i.test(pathname);
124
+ var handleNavigation = (navigate) => () => navigate(window.location.pathname);
125
+ var handleDeepLink = (urlString, navigate) => {
126
+ log.info("[UrlHandler] Deep link received", {
127
+ url: urlString
128
+ }, {
129
+ F: __dxlog_file,
130
+ L: 134,
131
+ S: void 0,
132
+ C: (f, a) => f(...a)
133
+ });
134
+ try {
135
+ const url = new URL(urlString);
136
+ if (isRedirectPath(url.pathname)) {
137
+ log.info("[UrlHandler] Skipping redirect path (handled elsewhere)", {
138
+ pathname: url.pathname
139
+ }, {
140
+ F: __dxlog_file,
141
+ L: 138,
142
+ S: void 0,
143
+ C: (f, a) => f(...a)
144
+ });
145
+ return;
146
+ }
147
+ navigate(url.pathname);
148
+ } catch (error) {
149
+ log.warn("[UrlHandler] Failed to parse deep link URL", {
150
+ urlString,
151
+ error
152
+ }, {
153
+ F: __dxlog_file,
154
+ L: 143,
155
+ S: void 0,
156
+ C: (f, a) => f(...a)
157
+ });
158
+ }
159
+ };
160
+ export {
161
+ url_handler_default as default
162
+ };
163
+ //# sourceMappingURL=url-handler-GUJ3L7Y3.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/capabilities/url-handler/url-handler.ts"],
4
+ "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\n\nimport { Capabilities, Capability } from '@dxos/app-framework';\nimport { LayoutOperation, fromUrlPath, getWorkspaceFromPath, toUrlPath } from '@dxos/app-toolkit';\nimport { log } from '@dxos/log';\nimport { isTauri } from '@dxos/util';\n\nimport { type SimpleLayoutState, SimpleLayoutState as SimpleLayoutStateCapability } from '../../types';\n\n/**\n * URL handler for simple layout that syncs browser URL with layout state.\n * URL paths map directly to qualified graph IDs with the leading `root` segment stripped.\n * Root is represented as `/`.\n *\n * On mobile Tauri, also listens for deep links via the deep-link plugin.\n */\nexport default Capability.makeModule(\n Effect.fnUntraced(function* () {\n const { invokePromise } = yield* Capability.get(Capabilities.OperationInvoker);\n\n /**\n * Handle navigation from a pathname.\n * Restores the qualified graph ID and dispatches layout operations.\n */\n const handlePathNavigation = (pathname: string) => {\n if (isFilePath(pathname)) {\n log.info('[UrlHandler] Skipping file path (not a graph node)', { pathname });\n pathname = '/';\n }\n\n log.info('[UrlHandler] Navigating to path', { pathname });\n\n const qualifiedId = fromUrlPath(pathname);\n const workspace = getWorkspaceFromPath(qualifiedId);\n\n void invokePromise(LayoutOperation.SwitchWorkspace, { subject: workspace });\n\n const activeId = qualifiedId !== workspace ? qualifiedId : undefined;\n if (activeId) {\n void invokePromise(LayoutOperation.Open, { subject: [activeId] });\n }\n };\n\n const onNavigation = handleNavigation(handlePathNavigation);\n\n yield* Effect.sync(() => onNavigation());\n window.addEventListener('popstate', onNavigation);\n\n let unlistenDeepLink: (() => void) | undefined;\n if (isTauri()) {\n yield* Effect.tryPromise({\n try: async () => {\n const { getCurrent, onOpenUrl } = await import('@tauri-apps/plugin-deep-link');\n\n const launchUrls = await getCurrent();\n if (launchUrls && launchUrls.length > 0) {\n log.info('[UrlHandler] App launched with deep links', { urls: launchUrls });\n for (const url of launchUrls) {\n handleDeepLink(url, handlePathNavigation);\n }\n }\n\n unlistenDeepLink = await onOpenUrl((urls) => {\n log.info('[UrlHandler] Deep links received', { urls });\n for (const url of urls) {\n handleDeepLink(url, handlePathNavigation);\n }\n });\n\n log.info('[UrlHandler] Deep link listener initialized');\n },\n catch: (error) => {\n log.warn('[UrlHandler] Failed to initialize deep link listener', { error });\n return error;\n },\n }).pipe(Effect.catchAll(() => Effect.void));\n }\n\n let lastWorkspace: string | undefined;\n let lastActive: string | undefined;\n const unsubscribe = yield* Capabilities.subscribeAtom(SimpleLayoutStateCapability, (state: SimpleLayoutState) => {\n const { workspace, active } = state;\n\n if (workspace !== lastWorkspace || active !== lastActive) {\n lastWorkspace = workspace;\n lastActive = active;\n\n const path = active ? toUrlPath(active) : toUrlPath(workspace);\n if (window.location.pathname !== path) {\n history.pushState(null, '', `${path}${window.location.search}`);\n }\n }\n });\n\n return Capability.contributes(Capabilities.Null, null, () =>\n Effect.sync(() => {\n window.removeEventListener('popstate', onNavigation);\n unsubscribe();\n unlistenDeepLink?.();\n }),\n );\n }),\n);\n\n/**\n * Check if a path is a special redirect path that shouldn't be navigated to.\n * These paths are handled by other systems (e.g., OAuth).\n */\nconst isRedirectPath = (pathname: string): boolean => pathname.startsWith('/redirect/');\n\n/**\n * Paths with file extensions (e.g., `/iframe.html`) are not graph node paths.\n * This guards against embedded contexts like Storybook iframes interpreting\n * the host pathname as a navigation target.\n */\nconst isFilePath = (pathname: string): boolean => /\\.[a-z]+$/i.test(pathname);\n\n/**\n * Returns a handler for navigation events (initial load and popstate) that navigates to current pathname.\n */\nconst handleNavigation =\n (navigate: (pathname: string) => void): (() => void) =>\n () =>\n navigate(window.location.pathname);\n\n/**\n * Handle deep link URL from Tauri. Parses the URL and calls navigate unless it's a redirect path.\n */\nconst handleDeepLink = (urlString: string, navigate: (pathname: string) => void): void => {\n log.info('[UrlHandler] Deep link received', { url: urlString });\n try {\n const url = new URL(urlString);\n if (isRedirectPath(url.pathname)) {\n log.info('[UrlHandler] Skipping redirect path (handled elsewhere)', { pathname: url.pathname });\n return;\n }\n navigate(url.pathname);\n } catch (error) {\n log.warn('[UrlHandler] Failed to parse deep link URL', { urlString, error });\n }\n};\n"],
5
+ "mappings": "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",
6
+ "names": ["Effect", "Capabilities", "Capability", "LayoutOperation", "fromUrlPath", "getWorkspaceFromPath", "toUrlPath", "log", "isTauri", "Capability", "makeModule", "fnUntraced", "invokePromise", "get", "Capabilities", "OperationInvoker", "handlePathNavigation", "pathname", "isFilePath", "log", "info", "qualifiedId", "fromUrlPath", "workspace", "getWorkspaceFromPath", "LayoutOperation", "SwitchWorkspace", "subject", "activeId", "undefined", "Open", "onNavigation", "handleNavigation", "sync", "window", "addEventListener", "unlistenDeepLink", "isTauri", "tryPromise", "try", "getCurrent", "onOpenUrl", "launchUrls", "length", "urls", "url", "handleDeepLink", "catch", "error", "warn", "pipe", "catchAll", "void", "lastWorkspace", "lastActive", "unsubscribe", "subscribeAtom", "SimpleLayoutStateCapability", "state", "active", "path", "toUrlPath", "location", "history", "pushState", "search", "contributes", "Null", "removeEventListener", "isRedirectPath", "startsWith", "test", "navigate", "urlString", "URL"]
7
+ }
@@ -0,0 +1,23 @@
1
+ import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
2
+ import {
3
+ SimpleLayoutState
4
+ } from "./chunk-WMNTJ2MK.mjs";
5
+
6
+ // src/operations/state-access.ts
7
+ import * as Effect from "effect/Effect";
8
+ import { Capabilities, Capability } from "@dxos/app-framework";
9
+ var layoutStateAccess = Effect.gen(function* () {
10
+ const registry = yield* Capability.get(Capabilities.AtomRegistry);
11
+ const stateAtom = yield* Capability.get(SimpleLayoutState);
12
+ return {
13
+ getState: () => registry.get(stateAtom),
14
+ updateState: (fn) => {
15
+ registry.set(stateAtom, fn(registry.get(stateAtom)));
16
+ }
17
+ };
18
+ });
19
+
20
+ export {
21
+ layoutStateAccess
22
+ };
23
+ //# sourceMappingURL=chunk-27K22G6S.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/operations/state-access.ts"],
4
+ "sourcesContent": ["// Copyright 2025 DXOS.org\n\nimport * as Effect from 'effect/Effect';\n\nimport { Capabilities, Capability } from '@dxos/app-framework';\n\nimport { type SimpleLayoutState, SimpleLayoutState as SimpleLayoutStateCapability } from '../types';\n\nexport const layoutStateAccess = Effect.gen(function* () {\n const registry = yield* Capability.get(Capabilities.AtomRegistry);\n const stateAtom = yield* Capability.get(SimpleLayoutStateCapability);\n\n return {\n getState: () => registry.get(stateAtom),\n updateState: (fn: (current: SimpleLayoutState) => SimpleLayoutState) => {\n registry.set(stateAtom, fn(registry.get(stateAtom)));\n },\n };\n});\n"],
5
+ "mappings": ";;;;;;AAEA,YAAYA,YAAY;AAExB,SAASC,cAAcC,kBAAkB;AAIlC,IAAMC,oBAA2BC,WAAI,aAAA;AAC1C,QAAMC,WAAW,OAAOC,WAAWC,IAAIC,aAAaC,YAAY;AAChE,QAAMC,YAAY,OAAOJ,WAAWC,IAAII,iBAAAA;AAExC,SAAO;IACLC,UAAU,MAAMP,SAASE,IAAIG,SAAAA;IAC7BG,aAAa,CAACC,OAAAA;AACZT,eAASU,IAAIL,WAAWI,GAAGT,SAASE,IAAIG,SAAAA,CAAAA,CAAAA;IAC1C;EACF;AACF,CAAA;",
6
+ "names": ["Effect", "Capabilities", "Capability", "layoutStateAccess", "gen", "registry", "Capability", "get", "Capabilities", "AtomRegistry", "stateAtom", "SimpleLayoutStateCapability", "getState", "updateState", "fn", "set"]
7
+ }